@public-ui/sample-react 3.0.0-rc.7 → 3.0.0-rc.8

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.
Files changed (101) hide show
  1. package/dist/1006.js +1 -1
  2. package/dist/1752.js +1 -1
  3. package/dist/1932.js +1 -1
  4. package/dist/2069.js +1 -1
  5. package/dist/2212.js +1 -1
  6. package/dist/2231.js +1 -1
  7. package/dist/2321.js +1 -1
  8. package/dist/2596.js +1 -1
  9. package/dist/2827.js +1 -1
  10. package/dist/2894.js +1 -1
  11. package/dist/3022.js +2 -0
  12. package/dist/3099.js +1 -1
  13. package/dist/3151.js +1 -1
  14. package/dist/3203.js +1 -1
  15. package/dist/3540.js +1 -1
  16. package/dist/373.js +1 -1
  17. package/dist/3918.js +1 -1
  18. package/dist/3920.js +1 -1
  19. package/dist/4030.js +1 -1
  20. package/dist/4048.js +1 -1
  21. package/dist/4201.js +1 -1
  22. package/dist/4587.js +1 -1
  23. package/dist/4611.js +2 -0
  24. package/dist/4641.js +1 -1
  25. package/dist/4776.js +2 -0
  26. package/dist/4876.js +1 -1
  27. package/dist/5249.js +1 -1
  28. package/dist/5301.js +1 -1
  29. package/dist/5359.js +2 -0
  30. package/dist/5690.js +1 -1
  31. package/dist/5746.js +1 -1
  32. package/dist/6047.js +1 -1
  33. package/dist/6066.js +1 -1
  34. package/dist/6256.js +2 -0
  35. package/dist/6304.js +1 -1
  36. package/dist/6781.js +1 -1
  37. package/dist/6790.js +1 -1
  38. package/dist/6984.js +1 -1
  39. package/dist/7013.js +1 -1
  40. package/dist/7178.js +1 -1
  41. package/dist/7347.js +1 -1
  42. package/dist/740.js +1 -1
  43. package/dist/7444.js +1 -1
  44. package/dist/7533.js +1 -1
  45. package/dist/7535.js +1 -1
  46. package/dist/775.js +1 -1
  47. package/dist/8137.js +1 -1
  48. package/dist/8180.js +1 -1
  49. package/dist/8192.js +1 -1
  50. package/dist/8246.js +1 -1
  51. package/dist/833.js +1 -1
  52. package/dist/8378.js +1 -1
  53. package/dist/8605.js +1 -1
  54. package/dist/8625.js +1 -1
  55. package/dist/8786.js +2 -0
  56. package/dist/907.js +1 -1
  57. package/dist/9108.js +1 -1
  58. package/dist/9255.js +1 -1
  59. package/dist/9322.js +1 -1
  60. package/dist/9581.js +1 -1
  61. package/dist/9719.js +1 -1
  62. package/dist/9731.js +1 -1
  63. package/dist/9907.js +2 -0
  64. package/dist/9907.js.LICENSE.txt +3 -0
  65. package/dist/9930.js +1 -1
  66. package/dist/9938.js +1 -1
  67. package/dist/main.css +2 -2
  68. package/dist/main.js +1 -1
  69. package/package.json +13 -9
  70. package/src/components/SampleDescription.tsx +27 -15
  71. package/src/components/Sidebar.tsx +29 -10
  72. package/src/components/badge/basic.tsx +1 -1
  73. package/src/components/badge/button.tsx +1 -1
  74. package/src/components/button/baselined.tsx +1 -1
  75. package/src/components/drawer/basic.tsx +7 -5
  76. package/src/components/handout/basic.tsx +5 -3
  77. package/src/components/link-button/aria-description.tsx +1 -1
  78. package/src/components/link-button/basic.tsx +8 -10
  79. package/src/components/table/predefined-settings.tsx +41 -0
  80. package/src/components/table/render-cell.tsx +1 -1
  81. package/src/components/table/routes.ts +6 -4
  82. package/src/components/tree/basic.tsx +1 -1
  83. package/src/react.main.tsx +2 -11
  84. package/src/scenarios/change-tabindex.tsx +23 -21
  85. package/src/style.scss +15 -4
  86. package/unocss.config.ts +67 -68
  87. package/webpack.config.js +12 -23
  88. package/dist/1573.js +0 -2
  89. package/dist/5750.js +0 -2
  90. package/dist/5794.js +0 -2
  91. package/dist/8570.js +0 -2
  92. package/dist/8826.js +0 -2
  93. package/dist/9162.js +0 -2
  94. package/dist/assets/README.md +0 -1
  95. package/public/assets/README.md +0 -1
  96. /package/dist/{1573.js.LICENSE.txt → 3022.js.LICENSE.txt} +0 -0
  97. /package/dist/{5750.js.LICENSE.txt → 4611.js.LICENSE.txt} +0 -0
  98. /package/dist/{5794.js.LICENSE.txt → 4776.js.LICENSE.txt} +0 -0
  99. /package/dist/{8570.js.LICENSE.txt → 5359.js.LICENSE.txt} +0 -0
  100. /package/dist/{8826.js.LICENSE.txt → 6256.js.LICENSE.txt} +0 -0
  101. /package/dist/{9162.js.LICENSE.txt → 8786.js.LICENSE.txt} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@public-ui/sample-react",
3
- "version": "3.0.0-rc.7",
3
+ "version": "3.0.0-rc.8",
4
4
  "description": "This app contains samples for the KoliBri/Public UI",
5
5
  "license": "EUPL-1.2",
6
6
  "repository": {
@@ -49,6 +49,10 @@
49
49
  "rimraf": "6.0.1",
50
50
  "sass-loader": "16.0.5",
51
51
  "string-replace-loader": "3.1.0",
52
+ "stylelint": "16.17.0",
53
+ "stylelint-config-recommended-scss": "14.1.0",
54
+ "stylelint-config-standard": "37.0.0",
55
+ "stylelint-scss": "6.11.1",
52
56
  "tslib": "2.8.1",
53
57
  "typescript": "5.8.2",
54
58
  "webpack": "5.98.0",
@@ -56,12 +60,9 @@
56
60
  "webpack-dev-server": "5.2.0",
57
61
  "world_countries_lists": "2.9.0",
58
62
  "yup": "1.6.1",
59
- "@public-ui/components": "3.0.0-rc.7",
60
- "@public-ui/react": "3.0.0-rc.7",
61
- "@public-ui/theme-default": "3.0.0-rc.7"
62
- },
63
- "optionalDependencies": {
64
- "@public-ui-/theme-ecl": "2.1.3"
63
+ "@public-ui/components": "3.0.0-rc.8",
64
+ "@public-ui/themes": "3.0.0-rc.8",
65
+ "@public-ui/react": "3.0.0-rc.8"
65
66
  },
66
67
  "files": [
67
68
  ".eslintignore",
@@ -78,11 +79,14 @@
78
79
  "webpack.config.js"
79
80
  ],
80
81
  "scripts": {
81
- "prebuild": "pnpm -r --filter=@public-ui/theme-* --filter @public-ui-/theme-* build",
82
+ "prebuild": "pnpm -r --filter=@public-ui/themes build",
82
83
  "build": "rimraf dist && cross-env NODE_ENV=production webpack",
83
84
  "build:deps": "pnpm --filter @public-ui/sample-react^... build",
84
85
  "format": "prettier --check src",
85
- "lint": "tsc --noemit && eslint \"{src,tests,e2e}/**/*.{html,js,json,jsx,ts,tsx,gql,graphql}\"",
86
+ "lint": "pnpm lint:eslint && pnpm lint:stylelint && pnpm lint:tsc",
87
+ "lint:eslint": "eslint src",
88
+ "lint:stylelint": "stylelint \"src/**/*.{css,scss}\"",
89
+ "lint:tsc": "tsc --noemit",
86
90
  "postinstall": "pnpm exec playwright install",
87
91
  "prepare:components-assets": "cpy \"node_modules/@public-ui/components/assets/**/*\" public/assets --dot",
88
92
  "prepare:themes-assets": "cpy \"node_modules/@public-ui/theme-default/assets/**/*\" public/assets --dot",
@@ -6,36 +6,48 @@ import { PUBLIC_CODE_COMPONENT_URL, PUBLIC_DOC_COMPONENT_URL } from '../shares/c
6
6
  import { KolLink } from '@public-ui/react';
7
7
 
8
8
  import { HideMenusContext } from '../shares/HideMenusContext';
9
-
10
- const getLocationPaths = () => {
11
- return location.hash.split('/').slice(1);
12
- };
9
+ import { useLocation } from 'react-router';
13
10
 
14
11
  export const SampleDescription: FC<PropsWithChildren> = (props) => {
15
12
  const hideMenus = useContext(HideMenusContext);
13
+ const location = useLocation();
14
+ const paths = location.pathname.split('/').slice(1);
16
15
 
17
16
  const docLink = useMemo(() => {
18
- const paths = getLocationPaths();
19
17
  return paths[0] === 'scenarios'
20
18
  ? null // Scenarios are not a component and hence have no documentation.
21
19
  : `${PUBLIC_DOC_COMPONENT_URL}/${paths[0]}`;
22
20
  }, [location.hash]);
23
21
 
24
22
  const codeLink = useMemo(() => {
25
- const paths = getLocationPaths();
26
23
  return paths[0] === 'scenarios'
27
24
  ? null // Scenarios are not a component and hence have no documentation.
28
25
  : `${PUBLIC_CODE_COMPONENT_URL}/${paths[0]}/${paths[1]}.tsx`;
29
26
  }, [location.hash]);
30
27
 
31
- return hideMenus ? null : (
32
- <div className="flex justify-between mb-sm">
33
- <div className="indented-text">{props.children}</div>
34
- <div className="flex flex-wrap gap-2 shrink-0 ml">
35
- {codeLink && <KolLink _href={codeLink} _label="Code" _target="_blank" />}
36
- {docLink && <KolLink _href={docLink} _label="Documentation" _target="_blank" />}
37
- <KolLink _href={`${location.href}?hideMenus`} _label="Standalone example" _target="_blank" />
38
- </div>
39
- </div>
28
+ return (
29
+ <>
30
+ <h1 className="visually-hidden">{location.pathname.replace(/\//g, ' ')}</h1>
31
+ {hideMenus ? null : (
32
+ <div className="grid sm:flex gap-4 justify-between pb-sm border-b-1 border-b-solid border-gray mb-2">
33
+ <div className="indented-text">{props.children}</div>
34
+ <ul className="flex flex-wrap gap-2 list-none m-0 p-0">
35
+ {codeLink && (
36
+ <li>
37
+ <KolLink _href={codeLink} _label="Code" _target="_blank" />
38
+ </li>
39
+ )}
40
+ {docLink && (
41
+ <li>
42
+ <KolLink _href={docLink} _label="Documentation" _target="_blank" />
43
+ </li>
44
+ )}
45
+ <li>
46
+ <KolLink _href={`#${location.pathname}?hideMenus`} _label="Standalone example" _target="_blank" />
47
+ </li>
48
+ </ul>
49
+ </div>
50
+ )}
51
+ </>
40
52
  );
41
53
  };
@@ -7,6 +7,34 @@ import { THEME_OPTIONS } from '../shares/theme';
7
7
 
8
8
  import type { Routes } from '../shares/types';
9
9
  import Navigation from './Navigation';
10
+
11
+ type BuildInformationProps = {
12
+ buildDate?: string | null;
13
+ commitHash?: string | null;
14
+ };
15
+ const BuildInformation: FC<BuildInformationProps> = ({ buildDate, commitHash }) => {
16
+ if (!buildDate && !commitHash) {
17
+ return '';
18
+ }
19
+
20
+ return (
21
+ <div className="text-sm font-mono color-gray-5 m-t-2">
22
+ {buildDate && commitHash ? ( // date and hash provided
23
+ <>
24
+ Build: {commitHash}
25
+ <br />
26
+ at {buildDate}
27
+ </>
28
+ ) : commitHash ? ( // hash only
29
+ `Build: ${commitHash}`
30
+ ) : (
31
+ // date only
32
+ `Build date: ${buildDate}`
33
+ )}
34
+ </div>
35
+ );
36
+ };
37
+
10
38
  type Props = {
11
39
  version: string;
12
40
  theme: string;
@@ -47,16 +75,8 @@ export const Sidebar: FC<Props> = ({ version, theme, routes, routeList, sample,
47
75
  <KolHeading _label="KoliBri React"></KolHeading>
48
76
  <KolVersion _label={version}></KolVersion>
49
77
  </div>
50
- {(buildDate || commitHash) && (
51
- <div className="text-sm font-mono color-gray-5 m-t-2">
52
- {commitHash ? `Build: ${commitHash}` : ''}
53
- <br />
54
- {buildDate ? `at ${buildDate}` : ''}
55
- </div>
56
- )}
57
-
78
+ <BuildInformation buildDate={buildDate} commitHash={commitHash} />
58
79
  <KolSelect _label="Theme" _options={THEME_OPTIONS} _on={{ onChange: handleThemeSelectChange }} _value={[theme]} class="mt"></KolSelect>
59
-
60
80
  <KolHeading _label="Components" _level={2} className="block mt"></KolHeading>
61
81
  <div className="flex flex-justify-between flex-items-center mt">
62
82
  <KolButton _icons="codicon codicon-arrow-left" _hideLabel _label="Previous component" _on={{ onClick: handlePreviousClick }} />
@@ -65,7 +85,6 @@ export const Sidebar: FC<Props> = ({ version, theme, routes, routeList, sample,
65
85
  </span>
66
86
  <KolButton _icons="codicon codicon-arrow-right" _hideLabel _label="Next component" _on={{ onClick: handleNextClick }} />
67
87
  </div>
68
-
69
88
  <Navigation routes={routes} />
70
89
  </div>
71
90
  </aside>
@@ -11,7 +11,7 @@ export const BadgeBasic: FC = () => (
11
11
  <p>KolBadge shows badges with a label, background color and optional icon.</p>
12
12
  </SampleDescription>
13
13
 
14
- <div className="flex gap-2">
14
+ <div className="flex flex-wrap gap-2">
15
15
  <KolBadge _label="black"></KolBadge>
16
16
  <KolBadge _color="#86ffc6" _label="teal"></KolBadge>
17
17
  <KolBadge _color="#06539e" _label="blue"></KolBadge>
@@ -23,7 +23,7 @@ export const BadgeButton: FC = () => (
23
23
  </p>
24
24
  </SampleDescription>
25
25
 
26
- <div className="flex gap-2">
26
+ <div className="flex flex-wrap gap-2">
27
27
  <KolBadge {...createBadgeProps('black')}></KolBadge>
28
28
  <KolBadge _color="#86ffc6" {...createBadgeProps('teal')}></KolBadge>
29
29
  <KolBadge _color="#06539e" {...createBadgeProps('blue')}></KolBadge>
@@ -19,7 +19,7 @@ export const ButtonBaselined: FC = () => {
19
19
  <p>This KolButton sample is used for internal testing purposes: It features multiple buttons with and without icons which are vertically aligned.</p>
20
20
  </SampleDescription>
21
21
 
22
- <div className="flex">
22
+ <div className="flex flex-wrap gap-2">
23
23
  <KolButton _label="Label-Text" _on={dummyEventHandler}></KolButton>
24
24
  <KolButton _label="Label-Text" _on={dummyEventHandler}></KolButton>
25
25
  <KolButton _label="Label-Text" _on={dummyEventHandler}></KolButton>
@@ -30,11 +30,13 @@ export const DrawerBasic: FC = () => {
30
30
  <DrawerRadioAlign value={align} onChange={(_, value) => setAlign(value as AlignPropType)} />
31
31
  <div className="flex flex-wrap gap-4">
32
32
  <KolDrawer ref={drawerElement} _label="I am a drawer" _align={align} _on={{ onClose: () => console.log('Drawer onClose triggered!') }}>
33
- <p>
34
- Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
35
- voluptua.
36
- </p>
37
- <KolButton _label="Close drawer" _on={{ onClick: () => drawerElement.current?.close() }} />
33
+ <div className={align === 'left' || align == 'right' ? 'drawer-content-vertical' : ''}>
34
+ <p>
35
+ Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
36
+ voluptua.
37
+ </p>
38
+ <KolButton _label="Close drawer" _on={{ onClick: () => drawerElement.current?.close() }} />
39
+ </div>
38
40
  </KolDrawer>
39
41
  <KolButton _label="Open drawer" _on={{ onClick: () => drawerElement.current?.open() }} />
40
42
  </div>
@@ -190,7 +190,7 @@ export const HandoutBasic: FC = () => {
190
190
 
191
191
  return (
192
192
  <div className="grid gap-4">
193
- <div className="grid gap-4 grid-cols-[auto_1fr_1fr] items-center">
193
+ <div className="grid gap-4 md:grid-cols-[auto_1fr_1fr] items-center">
194
194
  <KolKolibri className="block w-75px" _labeled={false}></KolKolibri>
195
195
  <KolHeading _label="" _level={1}>
196
196
  <span slot="expert">
@@ -441,7 +441,7 @@ export const HandoutBasic: FC = () => {
441
441
  </KolCard>
442
442
  <KolCard className="col-span-6 sm:col-span-6 md:col-span-4 xl:col-span-5" _label="Input" _level={2}>
443
443
  <KolForm slot="">
444
- <div className="grid gap-4 grid-cols-3 p-2">
444
+ <div className="grid gap-4 sm:grid-cols-2 md:grid-cols-3 p-2">
445
445
  <KolInputColor _label={`Color`} />
446
446
  <KolInputFile _label={`Upload file`} />
447
447
  <KolInputNumber _label={`Number input`} />
@@ -460,7 +460,9 @@ export const HandoutBasic: FC = () => {
460
460
  <div className="grid gap-4">
461
461
  <KolInputRadio _orientation="horizontal" _options="[{'label':'Mr.','value':0},{'label':'Mrs.','value':1}]" _value="0" _label={`Salutation`} />
462
462
  <KolInputCheckbox _label="">
463
- I accept the <KolAbbr _label="General Terms and Conditions">AGB</KolAbbr>.
463
+ <span slot="expert">
464
+ I accept the <KolAbbr _label="General Terms and Conditions">AGB</KolAbbr>.
465
+ </span>
464
466
  </KolInputCheckbox>
465
467
  </div>
466
468
  <KolTextarea _rows={4} _label={`Textarea`} />
@@ -9,7 +9,7 @@ export const LinkButtonAriaDescription: FC = () => (
9
9
  <p>This sample shows KolLinkButton with aria-description</p>
10
10
  </SampleDescription>
11
11
 
12
- <div className="flex flex-wrap gap-4">
12
+ <div className="flex flex-wrap gap-2">
13
13
  <KolLinkButton _href="#/back-page" _label="Link Button Text without area description"></KolLinkButton>
14
14
  <KolLinkButton _href="#/back-page" _label="Link Button Text" _ariaDescription="Link Button Area Description"></KolLinkButton>
15
15
  </div>
@@ -15,16 +15,14 @@ export const LinkButtonBasic: FC = () => (
15
15
  <p>KolLinkButton renders a link that looks like a button. The sample shows the different styling variants.</p>
16
16
  </SampleDescription>
17
17
 
18
- <div className="grid gap-14">
19
- <div className="flex flex-wrap gap-14">
20
- <KolLinkButton _label="Primary" _variant="primary" {...ARGS}></KolLinkButton>
21
- <KolLinkButton _label="Secondary" _variant="secondary" {...ARGS}></KolLinkButton>
22
- <KolLinkButton _label="Normal" _variant="normal" {...ARGS}></KolLinkButton>
23
- <KolLinkButton _label="Danger" _variant="danger" {...ARGS}></KolLinkButton>
24
- <KolLinkButton _label="Ghost" _variant="ghost" {...ARGS}></KolLinkButton>
25
- <KolLinkButton _label="Access Key" _variant="primary" _accessKey="c" {...ARGS}></KolLinkButton>
26
- <KolLinkButton _label="Short Key" _variant="primary" _shortKey="s" {...ARGS}></KolLinkButton>
27
- </div>
18
+ <div className="flex flex-wrap gap-2">
19
+ <KolLinkButton _label="Primary" _variant="primary" {...ARGS}></KolLinkButton>
20
+ <KolLinkButton _label="Secondary" _variant="secondary" {...ARGS}></KolLinkButton>
21
+ <KolLinkButton _label="Normal" _variant="normal" {...ARGS}></KolLinkButton>
22
+ <KolLinkButton _label="Danger" _variant="danger" {...ARGS}></KolLinkButton>
23
+ <KolLinkButton _label="Ghost" _variant="ghost" {...ARGS}></KolLinkButton>
24
+ <KolLinkButton _label="Access Key" _variant="primary" _accessKey="c" {...ARGS}></KolLinkButton>
25
+ <KolLinkButton _label="Short Key" _variant="primary" _shortKey="s" {...ARGS}></KolLinkButton>
28
26
  </div>
29
27
  </>
30
28
  );
@@ -0,0 +1,41 @@
1
+ import { SampleDescription } from '../SampleDescription';
2
+ import { KolTableStateful } from '@public-ui/react';
3
+ import type { FC } from 'react';
4
+ import React from 'react';
5
+
6
+ const DATA = [{ columnA: 'Column A', columnB: 'Column B', columnC: 'Column C' }];
7
+
8
+ export const PredefinedSettings: FC = () => {
9
+ return (
10
+ <>
11
+ <SampleDescription>
12
+ <p>This example shows the table with predefined settings.</p>
13
+ </SampleDescription>
14
+
15
+ <KolTableStateful
16
+ _label="Table for demonstration purposes with predefined settings"
17
+ _minWidth="auto"
18
+ _headers={{
19
+ horizontal: [
20
+ [
21
+ { label: 'column A', key: 'columnA' },
22
+ { label: 'column B', key: 'columnB' },
23
+ { label: 'column C', key: 'columnC' },
24
+ ],
25
+ ],
26
+ }}
27
+ _tableSettings={{
28
+ columns: [
29
+ { key: 'columnA', visible: false, label: 'Column A', position: 2 },
30
+ { key: 'columnB', visible: true, label: 'Column B', position: 1, width: 20 },
31
+ { key: 'columnC', visible: true, label: 'Column C', position: 0, width: 45 },
32
+ ],
33
+ }}
34
+ _data={DATA}
35
+ _min-width="500px"
36
+ className="block"
37
+ style={{ maxWidth: '600px' }}
38
+ />
39
+ </>
40
+ );
41
+ };
@@ -84,7 +84,7 @@ const HEADERS: KoliBriTableHeaders = {
84
84
  },
85
85
  {
86
86
  label: 'Action (react)',
87
- key: 'order',
87
+ key: 'action',
88
88
  width: '20em',
89
89
 
90
90
  /* Example 4: Render function using React */
@@ -14,23 +14,25 @@ import { TableStatelessWithSingleSelection } from './stateless-with-single-selec
14
14
  import { TableWithPagination } from './with-pagination';
15
15
  import { InteractiveChildElements } from './interactive-child-elements';
16
16
  import { MultiSortTable } from './multi-sort';
17
+ import { PredefinedSettings } from './predefined-settings';
17
18
 
18
19
  export const TABLE_ROUTES: Routes = {
19
20
  table: {
20
21
  'column-alignment': TableColumnAlignment,
21
22
  'complex-headers': TableComplexHeaders,
22
23
  'horizontal-scrollbar': TableHorizontalScrollbar,
24
+ 'interactive-child-elements': InteractiveChildElements,
25
+ 'multi-sort': MultiSortTable,
23
26
  'pagination-position': PaginationPosition,
27
+ 'predefined-settings': PredefinedSettings,
24
28
  'render-cell': TableRenderCell,
25
29
  'sort-data': TableSortData,
26
- 'with-footer': TableWithFooter,
27
30
  'stateful-with-selection': TableStatefulWithSelection,
28
31
  'stateful-with-single-selection': TableStatefulWithSingleSelection,
32
+ stateless: TableStateless,
29
33
  'stateless-with-selection': TableStatelessWithSelection,
30
34
  'stateless-with-single-selection': TableStatelessWithSingleSelection,
35
+ 'with-footer': TableWithFooter,
31
36
  'with-pagination': TableWithPagination,
32
- 'interactive-child-elements': InteractiveChildElements,
33
- stateless: TableStateless,
34
- 'multi-sort': MultiSortTable,
35
37
  },
36
38
  };
@@ -66,7 +66,7 @@ export const TreeBasic: FC = () => {
66
66
 
67
67
  <p>Current tree item: {subPage ?? 'none'}</p>
68
68
 
69
- <div className="flex flex-row gap-2">
69
+ <div className="flex flex-wrap gap-2">
70
70
  <KolButton _label="Change label for '1 Home'" _on={{ onClick: updateHomeLabel }}></KolButton>
71
71
  <KolButton _label="Toggle '2.1.2.2 Pets'" _on={{ onClick: () => setShowPets(!showPets) }}></KolButton>
72
72
  <KolButton _label="Toggle '2.2.1 Europe' (two levels at once)" _on={{ onClick: () => setShowEurope(!showEurope) }}></KolButton>
@@ -5,7 +5,7 @@ import { setTagNameTransformer } from '@public-ui/react';
5
5
 
6
6
  import { bootstrap, KoliBriDevHelper } from '@public-ui/components';
7
7
  import { defineCustomElements } from '@public-ui/components/dist/loader';
8
- import { DEFAULT } from '@public-ui/theme-default';
8
+ import { DEFAULT, ECL_EC, ECL_EU } from '@public-ui/themes';
9
9
 
10
10
  import { App } from './App';
11
11
 
@@ -34,17 +34,8 @@ const getThemes = async () => {
34
34
  return [theme];
35
35
  }
36
36
 
37
- const optionalThemes: Theme[] = [];
38
- const { ECL_EC, ECL_EU } = await import('@public-ui-/theme-ecl');
39
-
40
- if (ECL_EC && ECL_EU) {
41
- optionalThemes.push(ECL_EC, ECL_EU);
42
- } else {
43
- console.warn('Theme package @public-ui-/theme-ecl not available. Continuing without it.');
44
- }
45
-
46
37
  /* List of regular sample app themes */
47
- return [DEFAULT, ...optionalThemes] as Theme[];
38
+ return [DEFAULT, ECL_EC, ECL_EU] as Theme[];
48
39
  };
49
40
 
50
41
  void (async () => {
@@ -37,7 +37,7 @@ export const ChangeTabindex: FC = () => {
37
37
 
38
38
  <div className="w-full grid gap-4">
39
39
  <KolCard _label="Button" _level={0}>
40
- <div className="flex flex-wrap gap-4">
40
+ <div className="grid sm:flex flex-wrap gap-4 items-end">
41
41
  <KolButton _label="Button 1, Tabindex 4" _variant="primary" tabIndex={4} />
42
42
  <KolButton _disabled _label="Button 2, Tabindex 3" _variant="primary" tabIndex={3} />
43
43
  <KolButton _label="Button 3, Tabindex 2" _variant="primary" tabIndex={2} />
@@ -46,7 +46,7 @@ export const ChangeTabindex: FC = () => {
46
46
  </KolCard>
47
47
 
48
48
  <KolCard _label="ButtonLink" _level={0}>
49
- <div className="flex flex-wrap gap-4">
49
+ <div className="grid sm:flex flex-wrap gap-4 items-end">
50
50
  <KolButtonLink _label="ButtonLink 1, Tabindex 4" tabIndex={4} />
51
51
  <KolButtonLink _disabled _label="ButtonLink 2, Tabindex 3" tabIndex={3} />
52
52
  <KolButtonLink _label="ButtonLink 3, Tabindex 2" tabIndex={2} />
@@ -55,7 +55,7 @@ export const ChangeTabindex: FC = () => {
55
55
  </KolCard>
56
56
 
57
57
  <KolCard _label="Combobox" _level={0}>
58
- <div className="flex flex-wrap gap-4">
58
+ <div className="grid sm:flex flex-wrap gap-4 items-end">
59
59
  <KolCombobox _hint={HINT_MSG} _label="Combobox 1, Tabindex 4" _suggestions={COUNTRY_SUGGESTIONS} _value={'Deutschland'} tabIndex={4} />
60
60
  <KolCombobox _disabled _hint={HINT_MSG} _label="Combobox 2, Tabindex 3" _suggestions={COUNTRY_SUGGESTIONS} _value={'Deutschland'} tabIndex={3} />
61
61
  <KolCombobox
@@ -72,7 +72,7 @@ export const ChangeTabindex: FC = () => {
72
72
  </KolCard>
73
73
 
74
74
  <KolCard _label="InputCheckbox" _level={0}>
75
- <div className="flex flex-wrap gap-4">
75
+ <div className="grid sm:flex flex-wrap gap-4 items-end">
76
76
  <KolInputCheckbox _label="InputCheckbox 4, Tabindex 1" _value={false} tabIndex={4} />
77
77
  <KolInputCheckbox _disabled _label="InputCheckbox 3, Tabindex 2" _value={false} tabIndex={3} />
78
78
  <KolInputCheckbox _touched _label="InputCheckbox 2, Tabindex 3" _msg={{ _type: 'error', _description: ERROR_MSG }} _value={false} tabIndex={2} />
@@ -81,7 +81,7 @@ export const ChangeTabindex: FC = () => {
81
81
  </KolCard>
82
82
 
83
83
  <KolCard _label="InputColor" _level={0}>
84
- <div className="flex flex-wrap gap-4">
84
+ <div className="grid sm:flex flex-wrap gap-4 items-end">
85
85
  <KolInputColor _value="#f08080" _label="InputCheckbox 1, Tabindex 4" tabIndex={4} />
86
86
  <KolInputColor _disabled _value="#f08080" _label="InputCheckbox 2, Tabindex 3" tabIndex={3} />
87
87
  <KolInputColor _touched _value="#f08080" _label="InputCheckbox 3, Tabindex 2" _msg={{ _type: 'error', _description: ERROR_MSG }} tabIndex={2} />
@@ -90,7 +90,7 @@ export const ChangeTabindex: FC = () => {
90
90
  </KolCard>
91
91
 
92
92
  <KolCard _label="InputDate" _level={0}>
93
- <div className="flex flex-wrap gap-4">
93
+ <div className="grid sm:flex flex-wrap gap-4 items-end">
94
94
  <KolInputDate _type="datetime-local" _label="InputCheckbox 1, Tabindex 4" tabIndex={4} />
95
95
  <KolInputDate _disabled _type="datetime-local" _label="InputCheckbox 2, Tabindex 3" tabIndex={3} />
96
96
  <KolInputDate
@@ -105,7 +105,7 @@ export const ChangeTabindex: FC = () => {
105
105
  </KolCard>
106
106
 
107
107
  <KolCard _label="InputEmail" _level={0}>
108
- <div className="flex flex-wrap gap-4">
108
+ <div className="grid sm:flex flex-wrap gap-4 items-end">
109
109
  <KolInputEmail _label="InputEmail 1, Tabindex 4" tabIndex={4} />
110
110
  <KolInputEmail _disabled _label="InputEmail 2, Tabindex 3" tabIndex={3} />
111
111
  <KolInputEmail _touched _label="InputEmail 3, Tabindex 2" _msg={{ _type: 'error', _description: ERROR_MSG }} tabIndex={2} />
@@ -114,7 +114,7 @@ export const ChangeTabindex: FC = () => {
114
114
  </KolCard>
115
115
 
116
116
  <KolCard _label="InputFile" _level={0}>
117
- <div className="flex flex-wrap gap-4">
117
+ <div className="grid sm:flex flex-wrap gap-4 items-end">
118
118
  <KolInputFile _label="InputFile 1, Tabindex 4" tabIndex={4} />
119
119
  <KolInputFile _disabled _label="InputFile 2, Tabindex 3" tabIndex={3} />
120
120
  <KolInputFile _touched _label="InputFile 3, Tabindex 2" _msg={{ _type: 'error', _description: ERROR_MSG }} tabIndex={2} />
@@ -123,7 +123,7 @@ export const ChangeTabindex: FC = () => {
123
123
  </KolCard>
124
124
 
125
125
  <KolCard _label="InputNumber" _level={0}>
126
- <div className="flex flex-wrap gap-4">
126
+ <div className="grid sm:flex flex-wrap gap-4 items-end">
127
127
  <KolInputNumber _label="InputNumber 1, Tabindex 4" tabIndex={4} />
128
128
  <KolInputNumber _disabled _label="InputNumber 2, Tabindex 3" tabIndex={3} />
129
129
  <KolInputNumber _touched _label="InputNumber 3, Tabindex 2" _msg={{ _type: 'error', _description: ERROR_MSG }} tabIndex={2} />
@@ -132,7 +132,7 @@ export const ChangeTabindex: FC = () => {
132
132
  </KolCard>
133
133
 
134
134
  <KolCard _label="InputPassword" _level={0}>
135
- <div className="flex flex-wrap gap-4">
135
+ <div className="grid sm:flex flex-wrap gap-4 items-end">
136
136
  <KolInputPassword _label="InputPassword 1, Tabindex 4" tabIndex={4} />
137
137
  <KolInputPassword _disabled _label="InputPassword 2, Tabindex 3" tabIndex={3} />
138
138
  <KolInputPassword _touched _label="InputPassword 3, Tabindex 2" _msg={{ _type: 'error', _description: ERROR_MSG }} tabIndex={2} />
@@ -141,7 +141,7 @@ export const ChangeTabindex: FC = () => {
141
141
  </KolCard>
142
142
 
143
143
  <KolCard _label="InputRadio" _level={0}>
144
- <div className="flex flex-wrap gap-4">
144
+ <div className="grid sm:flex flex-wrap gap-4 items-end">
145
145
  <KolInputRadio
146
146
  _options="[{'label':'Mrs.','value':'Mrs.'},{'disabled':true,'label':'Mr. (disabled)','value':'Mr.'},{'label':'Company','value':'Company'}]"
147
147
  _label="InputRadio 1, Tabindex 4"
@@ -169,7 +169,7 @@ export const ChangeTabindex: FC = () => {
169
169
  </KolCard>
170
170
 
171
171
  <KolCard _label="InputRange" _level={0}>
172
- <div className="flex flex-wrap gap-4">
172
+ <div className="grid sm:flex flex-wrap gap-4 items-end">
173
173
  <KolInputRange _label="InputRange 1, Tabindex 4" _min={0} _max={50} tabIndex={4} />
174
174
  <KolInputRange _disabled _label="InputRange 2, Tabindex 3" _min={0} _max={50} tabIndex={3} />
175
175
  <KolInputRange _touched _label="InputRange 3, Tabindex 2" _min={0} _max={50} _msg={{ _type: 'error', _description: ERROR_MSG }} tabIndex={2} />
@@ -178,7 +178,7 @@ export const ChangeTabindex: FC = () => {
178
178
  </KolCard>
179
179
 
180
180
  <KolCard _label="InputText" _level={0}>
181
- <div className="flex flex-wrap gap-4">
181
+ <div className="grid sm:flex flex-wrap gap-4 items-end">
182
182
  <KolInputText _label="InputText 1, Tabindex 4" tabIndex={4} />
183
183
  <KolInputText _disabled _label="InputText 2, Tabindex 3" tabIndex={3} />
184
184
  <KolInputText _touched _label="InputText 3, Tabindex 2" _msg={{ _type: 'error', _description: ERROR_MSG }} tabIndex={2} />
@@ -187,7 +187,7 @@ export const ChangeTabindex: FC = () => {
187
187
  </KolCard>
188
188
 
189
189
  <KolCard _label="LinkButton" _level={0}>
190
- <div className="flex flex-wrap gap-4">
190
+ <div className="grid sm:flex flex-wrap gap-4 items-end">
191
191
  <KolLinkButton _href={'#/back-page'} _label="InputText 1, Tabindex 4" _variant="primary" tabIndex={4}></KolLinkButton>
192
192
  <KolLinkButton _disabled _href={'#/back-page'} _label="InputText 2, Tabindex 3" _variant="primary" tabIndex={3}></KolLinkButton>
193
193
  <KolLinkButton _href={'#/back-page'} _label="InputText 3, Tabindex 2" _variant="primary" tabIndex={2}></KolLinkButton>
@@ -196,14 +196,16 @@ export const ChangeTabindex: FC = () => {
196
196
  </KolCard>
197
197
 
198
198
  <KolCard _label="Link" _level={0}>
199
- <KolLink _href="#/back-page" _label="InputText 1, Tabindex 4" tabIndex={4} />
200
- <KolLink _disabled _href="#/back-page" _label="InputText 2, Tabindex 3" tabIndex={3} />
201
- <KolLink _href="#/back-page" _label="InputText 3, Tabindex 2" tabIndex={2} />
202
- <KolLink _href="#/back-page" _label="InputText 4, Tabindex 1" tabIndex={1} />
199
+ <div className="grid sm:flex flex-wrap gap-4 items-end">
200
+ <KolLink _href="#/back-page" _label="InputText 1, Tabindex 4" tabIndex={4} />
201
+ <KolLink _disabled _href="#/back-page" _label="InputText 2, Tabindex 3" tabIndex={3} />
202
+ <KolLink _href="#/back-page" _label="InputText 3, Tabindex 2" tabIndex={2} />
203
+ <KolLink _href="#/back-page" _label="InputText 4, Tabindex 1" tabIndex={1} />
204
+ </div>
203
205
  </KolCard>
204
206
 
205
207
  <KolCard _label="SingleSelect" _level={0}>
206
- <div className="flex flex-wrap gap-4">
208
+ <div className="grid sm:flex flex-wrap gap-4 items-end">
207
209
  <KolSingleSelect _label="InputText 1, Tabindex 4" _options={COUNTRY_OPTIONS as Option<StencilUnknown>[]} _value={'de'} tabIndex={4} />
208
210
  <KolSingleSelect _disabled _label="InputText 2, Tabindex 3" _options={COUNTRY_OPTIONS as Option<StencilUnknown>[]} _value={'de'} tabIndex={3} />
209
211
  <KolSingleSelect
@@ -219,7 +221,7 @@ export const ChangeTabindex: FC = () => {
219
221
  </KolCard>
220
222
 
221
223
  <KolCard _label="SplitButton" _level={0}>
222
- <div className="flex flex-wrap gap-4">
224
+ <div className="grid sm:flex flex-wrap gap-4 items-end">
223
225
  <KolSplitButton _label="InputText 1, Tabindex 4" tabIndex={4}>
224
226
  Dropdown-Inhalt
225
227
  </KolSplitButton>
@@ -236,7 +238,7 @@ export const ChangeTabindex: FC = () => {
236
238
  </KolCard>
237
239
 
238
240
  <KolCard _label="Textarea" _level={0}>
239
- <div className="flex flex-wrap gap-4">
241
+ <div className="grid sm:flex flex-wrap gap-4 items-end">
240
242
  <KolTextarea _label="Textarea 1, Tabindex 4" _rows={3} _placeholder="Placeholder" tabIndex={4} />
241
243
  <KolTextarea _disabled _label="Textarea 2, Tabindex 3" _rows={3} _placeholder="Placeholder" tabIndex={3} />
242
244
  <KolTextarea
package/src/style.scss CHANGED
@@ -23,13 +23,20 @@ hr {
23
23
 
24
24
  .indented-text {
25
25
  p {
26
- font-family: var(--font-family);
27
- border-left: -2px solid var(--color-primary-variant);
28
- padding: 0 calc(8rem / var(--kolibri-root-font-size, 16));
29
- margin-left: rem(-2);
26
+ margin: 0;
30
27
  }
31
28
  }
32
29
 
30
+ .visually-hidden {
31
+ clip: rect(0 0 0 0);
32
+ clip-path: inset(50%);
33
+ height: 1px;
34
+ overflow: hidden;
35
+ position: absolute;
36
+ white-space: nowrap;
37
+ width: 1px;
38
+ }
39
+
33
40
  .black-background {
34
41
  background-color: black;
35
42
  display: flex;
@@ -41,6 +48,10 @@ hr {
41
48
  width: 500px;
42
49
  }
43
50
 
51
+ .drawer-content-vertical {
52
+ width: rem(400);
53
+ }
54
+
44
55
  @media (min-width: 1024px) {
45
56
  .app-container {
46
57
  display: grid;