Skip to content

Commit

Permalink
Remove legacy themes (#5830)
Browse files Browse the repository at this point in the history
  • Loading branch information
laske185 authored Dec 22, 2023
2 parents cc8b11e + fa14dc7 commit 274195e
Show file tree
Hide file tree
Showing 513 changed files with 58 additions and 121,268 deletions.
3 changes: 0 additions & 3 deletions lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,9 @@
"packages/schema",
"packages/themes",
"packages/themes/bmf",
"packages/themes/bzst",
"packages/themes/default",
"packages/themes/ecl",
"packages/themes/itzbund",
"packages/themes/mfm",
"packages/themes/zoll",
"packages/tools/kolibri-cli",
"packages/tools/visual-tests"
],
Expand Down
9 changes: 4 additions & 5 deletions packages/components/src/components/kolibri/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,9 @@ Diese Komponente implementiert das Logo von KoliBri.

## Properties

| Property | Attribute | Description | Type | Default |
| ---------- | ---------- | ------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- |
| `_animate` | `_animate` | Gibt an, ob das Bild-Logo farblich animiert werden soll. | `boolean \| undefined` | `false` |
| `_color` | `_color` | Gibt an, in welcher Farbe das Bild-Logo initial dargestellt werden soll. | `string \| undefined \| { backgroundColor: string; color: string; } \| { backgroundColor: string; foregroundColor: Stringified<CharacteristicColors>; }` | `'#003c78'` |
| `_labeled` | `_labeled` | Defines whether the component has a label. | `boolean \| undefined` | `undefined` |
| Property | Attribute | Description | Type | Default |
| ---------- | ---------- | ------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- |
| `_color` | `_color` | Defines the color of the logo and label. | `string \| undefined \| { backgroundColor: string; color: string; } \| { backgroundColor: string; foregroundColor: Stringified<CharacteristicColors>; }` | `'#003c78'` |
| `_labeled` | `_labeled` | Defines whether the component has a label. | `boolean \| undefined` | `undefined` |

---
4 changes: 2 additions & 2 deletions packages/designer/src/solid.main.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { render } from 'solid-js/web';

import { defineCustomElements } from '@public-ui/components/dist/loader';
import { ITZBund, BAMF, BMF, BZSt, DEFAULT, DESYv1, DESYv2, ECL_EC, ECL_EU, MAPZ, ZOLLv2 } from '@public-ui/themes';
import { BMF, DEFAULT, ECL_EC, ECL_EU, ITZBund } from '@public-ui/themes';
import { TH } from '@public-oss/kolibri-themes';
import { AppComponent } from './components/app/component.solid';
import { register } from '@public-ui/components';

register([BAMF, BMF, BZSt, DEFAULT, DESYv1, DESYv2, ECL_EC, ECL_EU, ITZBund, MAPZ, TH, ZOLLv2], defineCustomElements, {
register([BMF, DEFAULT, ECL_EC, ECL_EU, ITZBund, TH], defineCustomElements, {
theme: {
detect: 'auto',
},
Expand Down
24 changes: 12 additions & 12 deletions packages/samples/react/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,19 @@ const getRouteTree = (routes: MyRoutes): ReturnType<typeof Route>[] => {
path={`${path}/all`}
element={
<div className="d-grid gap-4">
{THEME_OPTIONS.filter(
(theme) => ['bmf', 'default', 'ecl-ec', 'ecl-eu', 'itzbund', 'mapz', 'zoll-v2'].indexOf((theme as Option<Theme>).value) >= 0,
).map((theme) => (
<div className="d-grid gap-2" key={(theme as Option<Theme>).value} data-theme={(theme as Option<Theme>).value}>
<div className="mt-4">
<strong>{theme.label}</strong>
{THEME_OPTIONS.filter((theme) => ['bmf', 'default', 'ecl-ec', 'ecl-eu', 'itzbund'].indexOf((theme as Option<Theme>).value) >= 0).map(
(theme) => (
<div className="d-grid gap-2" key={(theme as Option<Theme>).value} data-theme={(theme as Option<Theme>).value}>
<div className="mt-4">
<strong>{theme.label}</strong>
</div>
<div className="my-2">
<ThisRoute />
</div>
<hr aria-hidden="true" />
</div>
<div className="my-2">
<ThisRoute />
</div>
<hr aria-hidden="true" />
</div>
))}
),
)}
</div>
}
/>,
Expand Down
4 changes: 2 additions & 2 deletions packages/samples/react/src/react.main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { HashRouter as Router } from 'react-router-dom';
import { TH } from '@public-oss/kolibri-themes';
import { register } from '@public-ui/components';
import { defineCustomElements } from '@public-ui/components/dist/loader';
import { BAMF, BMF, BZSt, DEFAULT, DESYv1, DESYv2, ECL_EC, ECL_EU, ITZBund, MAPZ, ZOLLv2 } from '@public-ui/themes';
import { BMF, DEFAULT, ECL_EC, ECL_EU, ITZBund } from '@public-ui/themes';
import type { Generic } from 'adopted-style-sheets';
import { App } from './App';

Expand All @@ -23,7 +23,7 @@ void (async () => {
} else {
/* Regular mode: Register all known themes. */
try {
await register([BAMF, BMF, DEFAULT, BZSt, DESYv1, DESYv2, ECL_EC, ECL_EU, ITZBund, MAPZ, ZOLLv2, TH], defineCustomElements, {
await register([BMF, DEFAULT, ECL_EC, ECL_EU, ITZBund, TH], defineCustomElements, {
theme: {
detect: 'auto',
},
Expand Down
34 changes: 9 additions & 25 deletions packages/samples/react/src/shares/theme.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { SelectOption } from '@public-ui/components';

export type Theme = 'bmf' | 'default' | 'ecl-ec' | 'ecl-eu' | 'itzbund' | 'mapz' | 'th' | 'unstyled' | 'zoll-v2';
export type Theme = 'bmf' | 'default' | 'ecl-ec' | 'ecl-eu' | 'itzbund' | 'th' | 'unstyled';

const drafts: Theme[] = ['ecl-ec', 'ecl-eu', 'itzbund', 'th'];

Expand All @@ -9,15 +9,7 @@ export const isDraftTheme = (theme: Theme) => drafts.includes(theme);
export const isTheme = (value: unknown) => {
return (
typeof value === 'string' &&
(value === 'unstyled' ||
value === 'bmf' ||
value === 'default' ||
value === 'ecl-ec' ||
value === 'ecl-eu' ||
value === 'itzbund' ||
value === 'mapz' ||
value === 'th' ||
value === 'zoll-v2')
(value === 'bmf' || value === 'default' || value === 'ecl-ec' || value === 'ecl-eu' || value === 'itzbund' || value === 'th' || value === 'unstyled')
);
};

Expand All @@ -28,39 +20,31 @@ export type Store = {

export const THEME_OPTIONS: SelectOption<Theme>[] = [
{
label: 'Unstyled',
label: 'Unstyled (Uncolored)',
value: 'unstyled',
},
{
label: 'Bundesministerium der Finanzen',
label: 'Bundesministerium der Finanzen (Tested)',
value: 'bmf',
},
{
label: 'Default',
label: 'Default (Tested)',
value: 'default',
},
{
label: 'European Commission (ECL)',
label: 'European Commission (Draft)',
value: 'ecl-ec',
},
{
label: 'European Union (ECL)',
label: 'European Union (Draft)',
value: 'ecl-eu',
},
{
label: 'Informationstechnikzentrum Bund',
label: 'Informationstechnikzentrum Bund (Draft)',
value: 'itzbund',
},
{
label: '.',
value: 'mapz',
},
{
label: 'Freistaat Thüringen',
label: 'Freistaat Thüringen (Draft)',
value: 'th',
},
{
label: '..',
value: 'zoll-v2',
},
];
1 change: 0 additions & 1 deletion packages/storybook/src/998-changelog.stories.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,6 @@ _data="[{'symbol':'🌟','desc':'Neue Funktion'},{'symbol':'🚹','desc':'Barrie
<li>👩‍🎨 Input-Text: Icons links oder/und rechts im Eingabefeld</li>
<li>👩‍🎨 Input-Text: Redesign, Label, Input und Fehler beliebige Reihenfolge</li>
<li>🔧 Tabs: Event-Callbacks Typo verbessert</li>
<li>👩‍🎨 Style: MAPZoll Theme vollständig überarbeitet</li>
<li>🔥 Property _nested ersatzlos entfernt</li>
<li>🌟 Pagination: Erweiterung der Properties um _variant, _customClass und tooltopAlign.</li>
<li>🔥 Global KoliBri-Style aus der Lib und Demo entfernt, weil diese Datei nicht erforderlich ist. (kolibri.css)</li>
Expand Down
12 changes: 0 additions & 12 deletions packages/storybook/src/components/bik-bitv-test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,26 +117,14 @@ export class BikBitvTest extends Component<Props, State> {
label: 'Neutral',
value: '',
},
{
label: 'BAMF-Styleguide',
value: 'bamf',
},
{
label: 'BMF-Styleguide',
value: 'default',
},
{
label: 'BZSt-Styleguide',
value: 'bzst',
},
{
label: 'ITZBund-Styleguide',
value: 'itzbund',
},
{
label: 'MAPZoll-Styleguide',
value: 'default',
},
]}
_on={{
onChange: (_event, value) => {
Expand Down
8 changes: 0 additions & 8 deletions packages/themes/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,6 @@ Mehr zum **Projekt** kann in der [README](https://public-ui.github.io/docs) nach

We use **pnpm** as package manager and there is a tiny typing issue with the default typescript setup.

**What happens?**

We got a type annotation error in TypeScript.

```bash
The inferred type of 'THEME' cannot be named without a reference to '.pnpm/@a11y-ui+core@***/node_modules/@a11y-ui/core/types/theming'. This is likely not portable. A type annotation is necessary.ts(2742)
```

**What does we know?**

This seems to be a general issue:
Expand Down
165 changes: 0 additions & 165 deletions packages/themes/bzst/assets/fontawesome-free/LICENSE.txt

This file was deleted.

Loading

0 comments on commit 274195e

Please sign in to comment.