@public-ui/sample-react 4.4.0-rc.0 → 4.4.1-bde9d4afe5ffb980a06192e5a34307404ba14869.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/package.json +4 -4
- package/src/App.tsx +13 -2
- package/src/components/Sidebar.tsx +56 -1
- package/src/components/table/aria-labelledby.tsx +0 -1
- package/src/components/table/interactive-child-elements.tsx +2 -2
- package/src/components/table/stateless-async-paging.tsx +1 -1
- package/src/components/table/stateless-with-selection.tsx +1 -1
- package/src/components/table/stateless-with-settings-menu.tsx +1 -1
- package/src/components/table/stateless-with-single-selection.tsx +1 -1
- package/src/components/table/stateless.tsx +1 -1
- package/src/hooks/useColorScheme.ts +56 -0
- package/src/shares/colorScheme.ts +60 -0
- package/src/shares/theme.ts +6 -0
package/README.md
CHANGED
|
@@ -23,6 +23,12 @@ The sample is built with **Vite** for fast development and production builds.
|
|
|
23
23
|
- `src/scenarios` – cross component scenarios
|
|
24
24
|
- `src/shares` – shared utilities
|
|
25
25
|
|
|
26
|
+
## Color scheme
|
|
27
|
+
|
|
28
|
+
The Sidebar carries a **Color scheme** select with the states Auto, Light and Dark. Light and Dark set the plain CSS `color-scheme` property on `<html>`; Auto removes it again so the host app's own `:root { color-scheme: light dark }` applies and the operating system decides. Because `color-scheme` is inherited and inheritance crosses the shadow boundary, the page and every KoliBri component follow the same value. The choice applies without a reload and is remembered in `localStorage`, and `?colorScheme=dark` on a route sets it from a link.
|
|
29
|
+
|
|
30
|
+
The mechanics live in `src/shares/colorScheme.ts` and `src/hooks/useColorScheme.ts`, modelled on the visual block outline next to them. Because this package is mounted by both the presentation app and the visual-test host app, the select appears in both.
|
|
31
|
+
|
|
26
32
|
## Installation and usage
|
|
27
33
|
|
|
28
34
|
```bash
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@public-ui/sample-react",
|
|
3
|
-
"version": "4.4.
|
|
3
|
+
"version": "4.4.1-bde9d4afe5ffb980a06192e5a34307404ba14869.0",
|
|
4
4
|
"description": "This app contains samples for the KoliBri/Public UI",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "EUPL-1.2",
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
"typescript": "5.9.3",
|
|
21
21
|
"world_countries_lists": "3.3.0",
|
|
22
22
|
"zod": "4.4.3",
|
|
23
|
-
"@public-ui/react-
|
|
24
|
-
"@public-ui/react-
|
|
23
|
+
"@public-ui/react-hook-form-adapter": "4.4.1-bde9d4afe5ffb980a06192e5a34307404ba14869.0",
|
|
24
|
+
"@public-ui/react-v19": "4.4.1-bde9d4afe5ffb980a06192e5a34307404ba14869.0"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@types/react": "19.2.18",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"react": "19.2.8",
|
|
38
38
|
"react-dom": "19.2.8",
|
|
39
39
|
"react-router": "8.3.0",
|
|
40
|
-
"@public-ui/components": "4.4.
|
|
40
|
+
"@public-ui/components": "4.4.1-bde9d4afe5ffb980a06192e5a34307404ba14869.0"
|
|
41
41
|
},
|
|
42
42
|
"files": [
|
|
43
43
|
"assets",
|
package/src/App.tsx
CHANGED
|
@@ -6,13 +6,14 @@ import PackageJson from '@public-ui/components/package.json';
|
|
|
6
6
|
|
|
7
7
|
import { BackPage } from './components/BackPage';
|
|
8
8
|
import { Sidebar } from './components/Sidebar';
|
|
9
|
+
import { useColorScheme } from './hooks/useColorScheme';
|
|
9
10
|
import { useSetCurrentLocation } from './hooks/useSetCurrentLocation';
|
|
10
11
|
import { useVisualBlockOutline } from './hooks/useVisualBlockOutline';
|
|
11
12
|
import { HideMenusContext } from './shares/HideMenusContext';
|
|
12
13
|
import { ROUTES } from './shares/routes';
|
|
13
14
|
import { sampleAppDataService } from './shares/sampleAppDataService';
|
|
14
15
|
import { getTheme, getThemeName, setRegisteredThemes, setStorage, setTheme } from './shares/store';
|
|
15
|
-
import { PUBLIC_THEMES, UNSTYLED_THEME } from './shares/theme';
|
|
16
|
+
import { DARK_CAPABLE_THEMES, PUBLIC_THEMES, UNSTYLED_THEME } from './shares/theme';
|
|
16
17
|
|
|
17
18
|
import type { Route as MyRoute, Routes as MyRoutes } from './shares/types';
|
|
18
19
|
|
|
@@ -142,6 +143,8 @@ export const App: FC<Props> = ({ customThemes }) => {
|
|
|
142
143
|
setTheme(theme); // set for `getTheme` usages within the application
|
|
143
144
|
useSetCurrentLocation();
|
|
144
145
|
useVisualBlockOutline();
|
|
146
|
+
const supportsDark = DARK_CAPABLE_THEMES.includes(theme);
|
|
147
|
+
const [colorScheme, setColorScheme] = useColorScheme(supportsDark);
|
|
145
148
|
|
|
146
149
|
useEffect(() => {
|
|
147
150
|
document.title = `KoliBri-Handout - ${getThemeName(getTheme())} | v${PackageJson.version}`;
|
|
@@ -150,7 +153,12 @@ export const App: FC<Props> = ({ customThemes }) => {
|
|
|
150
153
|
}, [theme]);
|
|
151
154
|
|
|
152
155
|
const handleThemeChange = (theme: unknown) => {
|
|
153
|
-
|
|
156
|
+
/* The updater form keeps the other parameters – replacing the object would drop `hideMenus`,
|
|
157
|
+
`visualBlocks` and `colorScheme` on every theme change. */
|
|
158
|
+
setSearchParams((previous) => {
|
|
159
|
+
previous.set('theme', theme as string);
|
|
160
|
+
return previous;
|
|
161
|
+
});
|
|
154
162
|
window.location.reload();
|
|
155
163
|
};
|
|
156
164
|
|
|
@@ -177,7 +185,10 @@ export const App: FC<Props> = ({ customThemes }) => {
|
|
|
177
185
|
routeList={ROUTE_LIST}
|
|
178
186
|
buildDate={process.env.BUILD_DATE}
|
|
179
187
|
commitHash={process.env.COMMIT_HASH}
|
|
188
|
+
colorScheme={colorScheme}
|
|
189
|
+
supportsDark={supportsDark}
|
|
180
190
|
onThemeChange={handleThemeChange}
|
|
191
|
+
onColorSchemeChange={setColorScheme}
|
|
181
192
|
/>
|
|
182
193
|
)}
|
|
183
194
|
|
|
@@ -6,10 +6,13 @@ import { useMobile } from '../hooks/useMobile';
|
|
|
6
6
|
|
|
7
7
|
import type { SelectOption } from '@public-ui/components';
|
|
8
8
|
import { useLocation } from 'react-router';
|
|
9
|
+
import type { ColorSchemePreference } from '../shares/colorScheme';
|
|
9
10
|
import type { Theme } from '../shares/theme';
|
|
10
11
|
import type { Routes } from '../shares/types';
|
|
11
12
|
import Navigation from './Navigation';
|
|
12
13
|
|
|
14
|
+
const getThemeLabel = (themes: Theme[], theme: string) => themes.find((candidate) => candidate.key === theme)?.name ?? theme;
|
|
15
|
+
|
|
13
16
|
type BuildInformationProps = {
|
|
14
17
|
buildDate?: string | null;
|
|
15
18
|
commitHash?: string | null;
|
|
@@ -46,10 +49,32 @@ type Props = {
|
|
|
46
49
|
sample: string;
|
|
47
50
|
buildDate?: string;
|
|
48
51
|
commitHash?: string;
|
|
52
|
+
colorScheme: ColorSchemePreference;
|
|
53
|
+
supportsDark: boolean;
|
|
49
54
|
onThemeChange: (theme: unknown) => void;
|
|
55
|
+
onColorSchemeChange: (colorScheme: ColorSchemePreference) => void;
|
|
50
56
|
};
|
|
51
57
|
|
|
52
|
-
|
|
58
|
+
const COLOR_SCHEME_OPTIONS: SelectOption<ColorSchemePreference>[] = [
|
|
59
|
+
{ label: 'Auto (follow the OS)', value: 'auto' },
|
|
60
|
+
{ label: 'Light', value: 'light' },
|
|
61
|
+
{ label: 'Dark (untested)', value: 'dark' },
|
|
62
|
+
];
|
|
63
|
+
|
|
64
|
+
export const Sidebar: FC<Props> = ({
|
|
65
|
+
version,
|
|
66
|
+
themes,
|
|
67
|
+
theme,
|
|
68
|
+
routes,
|
|
69
|
+
routeList,
|
|
70
|
+
sample,
|
|
71
|
+
buildDate,
|
|
72
|
+
commitHash,
|
|
73
|
+
colorScheme,
|
|
74
|
+
supportsDark,
|
|
75
|
+
onThemeChange,
|
|
76
|
+
onColorSchemeChange,
|
|
77
|
+
}) => {
|
|
53
78
|
/* KolSelect calls onChange initially by design - work around this with a state variable */
|
|
54
79
|
|
|
55
80
|
const getIndexOfSample = () => routeList.indexOf(sample);
|
|
@@ -59,6 +84,14 @@ export const Sidebar: FC<Props> = ({ version, themes, theme, routes, routeList,
|
|
|
59
84
|
onThemeChange(value as string);
|
|
60
85
|
};
|
|
61
86
|
|
|
87
|
+
const handleColorSchemeSelectChange = (_event: Event, value: unknown) => {
|
|
88
|
+
onColorSchemeChange(value as ColorSchemePreference);
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
/* A theme without a dark palette is pinned to light by `useColorScheme`. Disabling the select
|
|
92
|
+
says so at a glance; the hint explains why, for anyone who wonders. */
|
|
93
|
+
const colorSchemeHint = supportsDark ? undefined : `The ${getThemeLabel(themes, theme)} theme has no dark palette yet, so the scheme stays light.`;
|
|
94
|
+
|
|
62
95
|
const handlePreviousClick = () => {
|
|
63
96
|
const currentIndex = getIndexOfSample();
|
|
64
97
|
const nextIndex = currentIndex <= 0 ? routeList.length - 1 : currentIndex - 1;
|
|
@@ -100,6 +133,19 @@ export const Sidebar: FC<Props> = ({ version, themes, theme, routes, routeList,
|
|
|
100
133
|
</div>
|
|
101
134
|
<BuildInformation buildDate={buildDate} commitHash={commitHash} />
|
|
102
135
|
{!isMobile ? <KolSelect _label="Theme" _options={themeOption} _on={{ onChange: handleThemeSelectChange }} _value={theme} class="mt"></KolSelect> : ''}
|
|
136
|
+
{!isMobile ? (
|
|
137
|
+
<KolSelect
|
|
138
|
+
_label="Color scheme"
|
|
139
|
+
_disabled={!supportsDark}
|
|
140
|
+
_hint={colorSchemeHint}
|
|
141
|
+
_options={COLOR_SCHEME_OPTIONS}
|
|
142
|
+
_on={{ onChange: handleColorSchemeSelectChange }}
|
|
143
|
+
_value={colorScheme}
|
|
144
|
+
class="mt"
|
|
145
|
+
></KolSelect>
|
|
146
|
+
) : (
|
|
147
|
+
''
|
|
148
|
+
)}
|
|
103
149
|
{!isMobile ? <KolHeading _label="Components" _level={2} className="block mt"></KolHeading> : ''}
|
|
104
150
|
<div className="flex flex-justify-between flex-items-center mt">
|
|
105
151
|
<KolButton _icons="kolicon-chevron-left" _hideLabel _label="Previous component" _on={{ onClick: handlePreviousClick }} />
|
|
@@ -122,6 +168,15 @@ export const Sidebar: FC<Props> = ({ version, themes, theme, routes, routeList,
|
|
|
122
168
|
{isMobile ? (
|
|
123
169
|
<KolDrawer _align="top" _label="Navigation" _hasCloser={true} ref={drawerElement}>
|
|
124
170
|
<KolSelect _label="Theme" _options={themeOption} _on={{ onChange: handleThemeSelectChange }} _value={theme} class="mt"></KolSelect>
|
|
171
|
+
<KolSelect
|
|
172
|
+
_label="Color scheme"
|
|
173
|
+
_disabled={!supportsDark}
|
|
174
|
+
_hint={colorSchemeHint}
|
|
175
|
+
_options={COLOR_SCHEME_OPTIONS}
|
|
176
|
+
_on={{ onChange: handleColorSchemeSelectChange }}
|
|
177
|
+
_value={colorScheme}
|
|
178
|
+
class="mt"
|
|
179
|
+
></KolSelect>
|
|
125
180
|
<KolHeading _label="Components" _level={2} className="block mt"></KolHeading>
|
|
126
181
|
<Navigation routes={routes} />
|
|
127
182
|
</KolDrawer>
|
|
@@ -49,7 +49,7 @@ export const InteractiveChildElements: FC = () => (
|
|
|
49
49
|
<section className="w-full flex flex-col">
|
|
50
50
|
<KolTableStateless
|
|
51
51
|
_label="Button styles"
|
|
52
|
-
|
|
52
|
+
_headers={{
|
|
53
53
|
horizontal: [
|
|
54
54
|
[
|
|
55
55
|
getButtonHeaderCell('primary'),
|
|
@@ -87,7 +87,7 @@ export const InteractiveChildElements: FC = () => (
|
|
|
87
87
|
|
|
88
88
|
<KolTableStateless
|
|
89
89
|
_label="Link styles"
|
|
90
|
-
|
|
90
|
+
_headers={{
|
|
91
91
|
horizontal: [
|
|
92
92
|
[
|
|
93
93
|
{
|
|
@@ -50,7 +50,7 @@ export const TableStatelessAsync: FC = () => {
|
|
|
50
50
|
<KolTableStateless
|
|
51
51
|
_label="Table for demonstration purposes"
|
|
52
52
|
_loading={loading}
|
|
53
|
-
|
|
53
|
+
_headers={HEADERS_HORIZONTAL}
|
|
54
54
|
_data={complexData}
|
|
55
55
|
_on={{
|
|
56
56
|
onSort: () => loadData(),
|
|
@@ -76,7 +76,7 @@ export const TableStatelessWithSelection: FC = () => {
|
|
|
76
76
|
<SampleBlock id="selection" className="w-full">
|
|
77
77
|
<KolTableStateless
|
|
78
78
|
_label="Table with selection checkboxes"
|
|
79
|
-
|
|
79
|
+
_headers={{
|
|
80
80
|
horizontal: [
|
|
81
81
|
[
|
|
82
82
|
{ key: 'id', label: '#ID', textAlign: 'left' },
|
|
@@ -76,7 +76,7 @@ export const TableStatelessWithSingleSelection: FC = () => {
|
|
|
76
76
|
<SampleBlock id="single-selection" className="w-full" fitContent>
|
|
77
77
|
<KolTableStateless
|
|
78
78
|
_label="Table with selection checkboxes"
|
|
79
|
-
|
|
79
|
+
_headers={{
|
|
80
80
|
horizontal: [
|
|
81
81
|
[
|
|
82
82
|
{ key: 'id', label: '#ID', textAlign: 'left' },
|
|
@@ -15,7 +15,7 @@ export const TableStateless: FC = () => (
|
|
|
15
15
|
<SampleBlock id="stateless" className="w-full" fitContent>
|
|
16
16
|
<KolTableStateless
|
|
17
17
|
_label="Table for demonstration purposes"
|
|
18
|
-
|
|
18
|
+
_headers={{
|
|
19
19
|
horizontal: [
|
|
20
20
|
[
|
|
21
21
|
{ key: 'left', label: 'left', textAlign: 'left', sortDirection: 'ASC' },
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
2
|
+
import { useSearchParams } from 'react-router';
|
|
3
|
+
|
|
4
|
+
import { applyColorScheme, isColorSchemePreference, persistColorScheme, readStoredColorScheme } from '../shares/colorScheme';
|
|
5
|
+
|
|
6
|
+
import type { ColorSchemePreference } from '../shares/colorScheme';
|
|
7
|
+
|
|
8
|
+
const SEARCH_PARAM = 'colorScheme';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Makes the color scheme (see `shares/colorScheme`) switchable at runtime:
|
|
12
|
+
* - `?colorScheme=dark` opens a route in dark mode right away – combinable with `?hideMenus`,
|
|
13
|
+
* - the Sidebar's select changes it without a reload and remembers the choice for the next visit.
|
|
14
|
+
*
|
|
15
|
+
* Without the URL parameter the remembered choice applies; the parameter always wins.
|
|
16
|
+
*
|
|
17
|
+
* `supportsDark` says whether the active theme ships a dark palette. It does not: the scheme is
|
|
18
|
+
* forced to light, because such a theme would otherwise render light components on a page that
|
|
19
|
+
* follows the scheme. The remembered choice stays untouched and applies again as soon as a theme
|
|
20
|
+
* with a dark palette is selected.
|
|
21
|
+
*
|
|
22
|
+
* Returns the scheme that is actually on the document, which is what the Sidebar's select shows.
|
|
23
|
+
*/
|
|
24
|
+
export const useColorScheme = (supportsDark: boolean): [ColorSchemePreference, (preference: ColorSchemePreference) => void] => {
|
|
25
|
+
const [searchParams] = useSearchParams();
|
|
26
|
+
const param = searchParams.get(SEARCH_PARAM);
|
|
27
|
+
const [preference, setPreference] = useState<ColorSchemePreference>(() => (isColorSchemePreference(param) ? param : readStoredColorScheme()));
|
|
28
|
+
|
|
29
|
+
useEffect(() => {
|
|
30
|
+
/* The URL wins over the stored value but must not overwrite it – reading a link should not
|
|
31
|
+
change what the next visit without a parameter shows. */
|
|
32
|
+
setPreference(isColorSchemePreference(param) ? param : readStoredColorScheme());
|
|
33
|
+
}, [param]);
|
|
34
|
+
|
|
35
|
+
const scheme: ColorSchemePreference = supportsDark ? preference : 'light';
|
|
36
|
+
|
|
37
|
+
useEffect(() => {
|
|
38
|
+
applyColorScheme(scheme);
|
|
39
|
+
}, [scheme]);
|
|
40
|
+
|
|
41
|
+
const schemeRef = useRef(scheme);
|
|
42
|
+
schemeRef.current = scheme;
|
|
43
|
+
|
|
44
|
+
const choose = useCallback((next: ColorSchemePreference) => {
|
|
45
|
+
/* KolSelect emits onChange once while mounting, carrying the value it was given. Ignoring a
|
|
46
|
+
value that is already the active one keeps that echo from persisting a preference the user
|
|
47
|
+
never chose – which matters most while a theme without a dark palette forces light. */
|
|
48
|
+
if (schemeRef.current === next) {
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
setPreference(next);
|
|
52
|
+
persistColorScheme(next);
|
|
53
|
+
}, []);
|
|
54
|
+
|
|
55
|
+
return [scheme, choose];
|
|
56
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lets the sample apps switch the color scheme at runtime.
|
|
3
|
+
*
|
|
4
|
+
* There is nothing KoliBri specific about it: `color-scheme` is an inherited CSS property and
|
|
5
|
+
* inheritance follows the flat tree, so setting it on `documentElement` reaches the page and every
|
|
6
|
+
* component's shadow root alike. The themes declare no `color-scheme` of their own precisely so
|
|
7
|
+
* that the application stays the single source of truth.
|
|
8
|
+
*
|
|
9
|
+
* `auto` removes the inline property again and lets the host app's own `:root { color-scheme: light
|
|
10
|
+
* dark }` apply, which is what hands the decision to the operating system. The
|
|
11
|
+
* `data-kol-color-scheme` attribute is set alongside it: it makes the state visible in the DOM and
|
|
12
|
+
* matches the selectors in `@public-ui/theme-default/color-scheme.css`. That stylesheet is not
|
|
13
|
+
* loaded here — the visual-test host has to stay theme agnostic and the presentation app offers six
|
|
14
|
+
* themes — so the inline property is what actually does the work.
|
|
15
|
+
*
|
|
16
|
+
* See `hooks/useColorScheme` for the URL parameter and the persistence.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
const COLOR_SCHEME_PREFERENCES = ['auto', 'light', 'dark'] as const;
|
|
20
|
+
export type ColorSchemePreference = (typeof COLOR_SCHEME_PREFERENCES)[number];
|
|
21
|
+
|
|
22
|
+
const ROOT_ATTRIBUTE = 'data-kol-color-scheme';
|
|
23
|
+
const STORAGE_KEY = 'public-ui.sample.color-scheme';
|
|
24
|
+
|
|
25
|
+
export function isColorSchemePreference(value: unknown): value is ColorSchemePreference {
|
|
26
|
+
return typeof value === 'string' && (COLOR_SCHEME_PREFERENCES as readonly string[]).includes(value);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export function applyColorScheme(scheme: ColorSchemePreference): void {
|
|
30
|
+
const { documentElement } = document;
|
|
31
|
+
if (scheme === 'auto') {
|
|
32
|
+
documentElement.removeAttribute(ROOT_ATTRIBUTE);
|
|
33
|
+
documentElement.style.removeProperty('color-scheme');
|
|
34
|
+
} else {
|
|
35
|
+
documentElement.setAttribute(ROOT_ATTRIBUTE, scheme);
|
|
36
|
+
documentElement.style.setProperty('color-scheme', scheme);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Kept apart from `applyColorScheme`, because the scheme that ends up on the document is not always
|
|
42
|
+
* the one the user chose: a theme without a dark palette forces light, and that must not overwrite
|
|
43
|
+
* what they picked for the themes that do have one.
|
|
44
|
+
*/
|
|
45
|
+
export function persistColorScheme(preference: ColorSchemePreference): void {
|
|
46
|
+
try {
|
|
47
|
+
localStorage.setItem(STORAGE_KEY, preference);
|
|
48
|
+
} catch {
|
|
49
|
+
// Storage can be unavailable (private mode, blocked cookies) – the choice just won't be remembered.
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function readStoredColorScheme(): ColorSchemePreference {
|
|
54
|
+
try {
|
|
55
|
+
const stored = localStorage.getItem(STORAGE_KEY);
|
|
56
|
+
return isColorSchemePreference(stored) ? stored : 'auto';
|
|
57
|
+
} catch {
|
|
58
|
+
return 'auto';
|
|
59
|
+
}
|
|
60
|
+
}
|
package/src/shares/theme.ts
CHANGED
|
@@ -34,3 +34,9 @@ export const PUBLIC_THEMES: Theme[] = [
|
|
|
34
34
|
key: 'desy-v11',
|
|
35
35
|
},
|
|
36
36
|
];
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Themes that ship a dark palette. Every other theme keeps its light colors whatever the color
|
|
40
|
+
* scheme says, which is what the Sidebar's hint tells the user.
|
|
41
|
+
*/
|
|
42
|
+
export const DARK_CAPABLE_THEMES: string[] = ['default'];
|