@public-ui/sample-react 2.0.1 → 2.0.3

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 (192) hide show
  1. package/dist/{5183.js → 1090.js} +2 -2
  2. package/dist/1181.js +2 -0
  3. package/dist/1218.js +2 -0
  4. package/dist/1338.js +2 -0
  5. package/dist/1517.js +2 -0
  6. package/dist/{5382.js → 1532.js} +2 -2
  7. package/dist/1596.js +2 -0
  8. package/dist/{7380.js → 2079.js} +2 -2
  9. package/dist/2163.js +2 -0
  10. package/dist/2415.js +2 -0
  11. package/dist/2594.js +2 -0
  12. package/dist/2611.js +2 -0
  13. package/dist/2643.js +2 -0
  14. package/dist/{2738.js → 3034.js} +2 -2
  15. package/dist/3145.js +2 -0
  16. package/dist/3345.js +2 -0
  17. package/dist/{5862.js → 3388.js} +2 -2
  18. package/dist/3466.js +2 -0
  19. package/dist/3580.js +2 -0
  20. package/dist/3619.js +2 -0
  21. package/dist/3776.js +2 -0
  22. package/dist/4114.js +2 -0
  23. package/dist/{1474.js → 4150.js} +2 -2
  24. package/dist/42.js +2 -0
  25. package/dist/4279.js +2 -0
  26. package/dist/{4891.js → 4463.js} +2 -2
  27. package/dist/4563.js +2 -0
  28. package/dist/{8065.js → 4669.js} +2 -2
  29. package/dist/{8073.js → 4686.js} +2 -2
  30. package/dist/4756.js +2 -0
  31. package/dist/5027.js +2 -0
  32. package/dist/521.js +2 -0
  33. package/dist/{6813.js → 5324.js} +2 -2
  34. package/dist/5373.js +2 -0
  35. package/dist/5496.js +2 -0
  36. package/dist/5518.js +2 -0
  37. package/dist/{9734.js → 5615.js} +2 -2
  38. package/dist/5767.js +2 -0
  39. package/dist/5853.js +2 -0
  40. package/dist/{4022.js → 6010.js} +2 -2
  41. package/dist/6308.js +2 -0
  42. package/dist/{1644.js → 6805.js} +2 -2
  43. package/dist/7170.js +2 -0
  44. package/dist/7232.js +2 -0
  45. package/dist/7271.js +2 -0
  46. package/dist/{3429.js → 7432.js} +2 -2
  47. package/dist/755.js +2 -0
  48. package/dist/7654.js +2 -0
  49. package/dist/{8709.js → 8037.js} +1 -1
  50. package/dist/817.js +2 -0
  51. package/dist/{6068.js → 8612.js} +2 -2
  52. package/dist/8734.js +2 -0
  53. package/dist/881.js +2 -0
  54. package/dist/{7858.js → 8869.js} +2 -2
  55. package/dist/892.js +2 -0
  56. package/dist/8948.js +2 -0
  57. package/dist/8951.js +2 -0
  58. package/dist/9317.js +2 -0
  59. package/dist/{9895.js → 9330.js} +2 -2
  60. package/dist/9727.js +2 -0
  61. package/dist/9797.js +2 -0
  62. package/dist/{4195.js → 9865.js} +2 -2
  63. package/dist/{8061.js → 9886.js} +2 -2
  64. package/dist/9984.js +2 -0
  65. package/dist/main.css +1 -1
  66. package/dist/main.js +113 -32447
  67. package/dist/main.js.LICENSE.txt +2 -4
  68. package/package.json +15 -16
  69. package/src/App.tsx +16 -16
  70. package/src/components/SampleDescription.tsx +1 -1
  71. package/src/components/alert/html.tsx +1 -2
  72. package/src/components/button/access-key.tsx +1 -1
  73. package/src/components/button/width.tsx +2 -2
  74. package/src/components/card/selection.tsx +4 -4
  75. package/src/components/input-date/partials/cases.tsx +2 -2
  76. package/src/components/link-button/basic.tsx +1 -1
  77. package/src/components/split-button/basic.tsx +5 -5
  78. package/src/components/table/badge-size.tsx +3 -2
  79. package/src/components/table/column-alignment.tsx +84 -0
  80. package/src/components/table/render-cell.tsx +3 -2
  81. package/src/components/table/routes.ts +4 -4
  82. package/src/components/table/{sort-date.tsx → sort-data.tsx} +1 -1
  83. package/src/react.main.tsx +2 -3
  84. package/src/scenarios/appointment-form/DistrictForm.tsx +11 -11
  85. package/src/shares/theme.ts +12 -38
  86. package/dist/1130.js +0 -2
  87. package/dist/183.js +0 -2
  88. package/dist/2337.js +0 -2
  89. package/dist/2412.js +0 -2
  90. package/dist/3303.js +0 -2
  91. package/dist/3325.js +0 -2
  92. package/dist/3459.js +0 -2
  93. package/dist/3932.js +0 -2
  94. package/dist/4164.js +0 -2
  95. package/dist/4291.js +0 -2
  96. package/dist/4323.js +0 -2
  97. package/dist/4355.js +0 -2
  98. package/dist/4564.js +0 -2
  99. package/dist/5369.js +0 -2
  100. package/dist/5390.js +0 -2
  101. package/dist/540.js +0 -2
  102. package/dist/5717.js +0 -2
  103. package/dist/5860.js +0 -2
  104. package/dist/5866.js +0 -2
  105. package/dist/589.js +0 -2
  106. package/dist/6012.js +0 -2
  107. package/dist/6210.js +0 -2
  108. package/dist/6320.js +0 -2
  109. package/dist/6558.js +0 -2
  110. package/dist/6908.js +0 -2
  111. package/dist/7029.js +0 -2
  112. package/dist/7255.js +0 -2
  113. package/dist/7447.js +0 -2
  114. package/dist/7535.js +0 -2
  115. package/dist/7715.js +0 -2
  116. package/dist/7722.js +0 -2
  117. package/dist/7734.js +0 -2
  118. package/dist/7801.js +0 -2
  119. package/dist/7955.js +0 -2
  120. package/dist/7995.js +0 -2
  121. package/dist/8111.js +0 -2
  122. package/dist/8255.js +0 -2
  123. package/dist/8291.js +0 -2
  124. package/dist/8761.js +0 -2
  125. package/dist/9747.js +0 -2
  126. package/dist/979.js +0 -2
  127. package/dist/9792.js +0 -2
  128. package/dist/9963.js +0 -2
  129. package/dist/9972.js +0 -2
  130. /package/dist/{1130.js.LICENSE.txt → 1090.js.LICENSE.txt} +0 -0
  131. /package/dist/{1474.js.LICENSE.txt → 1181.js.LICENSE.txt} +0 -0
  132. /package/dist/{1644.js.LICENSE.txt → 1218.js.LICENSE.txt} +0 -0
  133. /package/dist/{183.js.LICENSE.txt → 1338.js.LICENSE.txt} +0 -0
  134. /package/dist/{2337.js.LICENSE.txt → 1517.js.LICENSE.txt} +0 -0
  135. /package/dist/{2412.js.LICENSE.txt → 1532.js.LICENSE.txt} +0 -0
  136. /package/dist/{2738.js.LICENSE.txt → 1596.js.LICENSE.txt} +0 -0
  137. /package/dist/{3303.js.LICENSE.txt → 2079.js.LICENSE.txt} +0 -0
  138. /package/dist/{3325.js.LICENSE.txt → 2163.js.LICENSE.txt} +0 -0
  139. /package/dist/{3429.js.LICENSE.txt → 2415.js.LICENSE.txt} +0 -0
  140. /package/dist/{3459.js.LICENSE.txt → 2594.js.LICENSE.txt} +0 -0
  141. /package/dist/{3932.js.LICENSE.txt → 2611.js.LICENSE.txt} +0 -0
  142. /package/dist/{4022.js.LICENSE.txt → 2643.js.LICENSE.txt} +0 -0
  143. /package/dist/{4164.js.LICENSE.txt → 3034.js.LICENSE.txt} +0 -0
  144. /package/dist/{4195.js.LICENSE.txt → 3145.js.LICENSE.txt} +0 -0
  145. /package/dist/{4291.js.LICENSE.txt → 3345.js.LICENSE.txt} +0 -0
  146. /package/dist/{4323.js.LICENSE.txt → 3388.js.LICENSE.txt} +0 -0
  147. /package/dist/{4355.js.LICENSE.txt → 3466.js.LICENSE.txt} +0 -0
  148. /package/dist/{4564.js.LICENSE.txt → 3580.js.LICENSE.txt} +0 -0
  149. /package/dist/{4891.js.LICENSE.txt → 3619.js.LICENSE.txt} +0 -0
  150. /package/dist/{5183.js.LICENSE.txt → 3776.js.LICENSE.txt} +0 -0
  151. /package/dist/{5369.js.LICENSE.txt → 4114.js.LICENSE.txt} +0 -0
  152. /package/dist/{5382.js.LICENSE.txt → 4150.js.LICENSE.txt} +0 -0
  153. /package/dist/{5390.js.LICENSE.txt → 42.js.LICENSE.txt} +0 -0
  154. /package/dist/{540.js.LICENSE.txt → 4279.js.LICENSE.txt} +0 -0
  155. /package/dist/{5717.js.LICENSE.txt → 4463.js.LICENSE.txt} +0 -0
  156. /package/dist/{5860.js.LICENSE.txt → 4563.js.LICENSE.txt} +0 -0
  157. /package/dist/{5862.js.LICENSE.txt → 4669.js.LICENSE.txt} +0 -0
  158. /package/dist/{5866.js.LICENSE.txt → 4686.js.LICENSE.txt} +0 -0
  159. /package/dist/{589.js.LICENSE.txt → 4756.js.LICENSE.txt} +0 -0
  160. /package/dist/{6012.js.LICENSE.txt → 5027.js.LICENSE.txt} +0 -0
  161. /package/dist/{6068.js.LICENSE.txt → 521.js.LICENSE.txt} +0 -0
  162. /package/dist/{6210.js.LICENSE.txt → 5324.js.LICENSE.txt} +0 -0
  163. /package/dist/{6320.js.LICENSE.txt → 5373.js.LICENSE.txt} +0 -0
  164. /package/dist/{6558.js.LICENSE.txt → 5496.js.LICENSE.txt} +0 -0
  165. /package/dist/{6813.js.LICENSE.txt → 5518.js.LICENSE.txt} +0 -0
  166. /package/dist/{6908.js.LICENSE.txt → 5615.js.LICENSE.txt} +0 -0
  167. /package/dist/{7029.js.LICENSE.txt → 5767.js.LICENSE.txt} +0 -0
  168. /package/dist/{7255.js.LICENSE.txt → 5853.js.LICENSE.txt} +0 -0
  169. /package/dist/{7380.js.LICENSE.txt → 6010.js.LICENSE.txt} +0 -0
  170. /package/dist/{7447.js.LICENSE.txt → 6308.js.LICENSE.txt} +0 -0
  171. /package/dist/{7535.js.LICENSE.txt → 6805.js.LICENSE.txt} +0 -0
  172. /package/dist/{7715.js.LICENSE.txt → 7170.js.LICENSE.txt} +0 -0
  173. /package/dist/{7722.js.LICENSE.txt → 7232.js.LICENSE.txt} +0 -0
  174. /package/dist/{7734.js.LICENSE.txt → 7271.js.LICENSE.txt} +0 -0
  175. /package/dist/{7801.js.LICENSE.txt → 7432.js.LICENSE.txt} +0 -0
  176. /package/dist/{7858.js.LICENSE.txt → 755.js.LICENSE.txt} +0 -0
  177. /package/dist/{7955.js.LICENSE.txt → 7654.js.LICENSE.txt} +0 -0
  178. /package/dist/{7995.js.LICENSE.txt → 817.js.LICENSE.txt} +0 -0
  179. /package/dist/{8061.js.LICENSE.txt → 8612.js.LICENSE.txt} +0 -0
  180. /package/dist/{8065.js.LICENSE.txt → 8734.js.LICENSE.txt} +0 -0
  181. /package/dist/{8073.js.LICENSE.txt → 881.js.LICENSE.txt} +0 -0
  182. /package/dist/{8111.js.LICENSE.txt → 8869.js.LICENSE.txt} +0 -0
  183. /package/dist/{8255.js.LICENSE.txt → 892.js.LICENSE.txt} +0 -0
  184. /package/dist/{8291.js.LICENSE.txt → 8948.js.LICENSE.txt} +0 -0
  185. /package/dist/{8761.js.LICENSE.txt → 8951.js.LICENSE.txt} +0 -0
  186. /package/dist/{9734.js.LICENSE.txt → 9317.js.LICENSE.txt} +0 -0
  187. /package/dist/{9747.js.LICENSE.txt → 9330.js.LICENSE.txt} +0 -0
  188. /package/dist/{979.js.LICENSE.txt → 9727.js.LICENSE.txt} +0 -0
  189. /package/dist/{9792.js.LICENSE.txt → 9797.js.LICENSE.txt} +0 -0
  190. /package/dist/{9895.js.LICENSE.txt → 9865.js.LICENSE.txt} +0 -0
  191. /package/dist/{9963.js.LICENSE.txt → 9886.js.LICENSE.txt} +0 -0
  192. /package/dist/{9972.js.LICENSE.txt → 9984.js.LICENSE.txt} +0 -0
@@ -2,8 +2,6 @@
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
4
 
5
- /*!__STENCIL_STATIC_IMPORT_SWITCH__*/
6
-
7
5
  /**
8
6
  * @license React
9
7
  * react-dom.production.min.js
@@ -35,7 +33,7 @@
35
33
  */
36
34
 
37
35
  /**
38
- * @remix-run/router v1.14.0
36
+ * @remix-run/router v1.14.1
39
37
  *
40
38
  * Copyright (c) Remix Software Inc.
41
39
  *
@@ -46,7 +44,7 @@
46
44
  */
47
45
 
48
46
  /**
49
- * React Router v6.21.0
47
+ * React Router v6.21.1
50
48
  *
51
49
  * Copyright (c) Remix Software Inc.
52
50
  *
package/package.json CHANGED
@@ -1,33 +1,32 @@
1
1
  {
2
2
  "name": "@public-ui/sample-react",
3
- "version": "2.0.1",
3
+ "version": "2.0.3",
4
4
  "description": "This app contains samples for the KoliBri/Public UI",
5
5
  "license": "EUPL-1.2",
6
6
  "dependencies": {
7
- "@leanup/stack": "1.3.48",
8
- "@leanup/stack-react": "1.3.48",
9
- "@leanup/stack-webpack": "1.3.48",
10
- "@public-oss/kolibri-themes": "0.0.3",
11
- "@public-ui/components": "2.0.1",
12
- "@public-ui/react": "2.0.1",
13
- "@public-ui/themes": "2.0.1",
14
- "@types/node": "20.10.5",
15
- "@types/react": "18.2.45",
7
+ "@leanup/stack": "1.3.49",
8
+ "@leanup/stack-react": "1.3.49",
9
+ "@leanup/stack-webpack": "1.3.49",
10
+ "@public-ui/components": "2.0.3",
11
+ "@public-ui/react": "2.0.3",
12
+ "@public-ui/themes": "2.0.3",
13
+ "@types/node": "20.10.6",
14
+ "@types/react": "18.2.46",
16
15
  "@types/react-dom": "18.2.18",
17
- "@unocss/preset-uno": "0.58.0",
18
- "@unocss/webpack": "0.58.0",
16
+ "@unocss/preset-uno": "0.58.3",
17
+ "@unocss/webpack": "0.58.3",
19
18
  "ajv": "8.12.0",
20
- "chromedriver": "120.0.0",
19
+ "chromedriver": "120.0.1",
21
20
  "cpy-cli": "5.0.0",
22
21
  "eslint-plugin-jsx-a11y": "6.8.0",
23
22
  "eslint-plugin-react": "7.33.2",
24
23
  "formik": "2.4.5",
25
- "nightwatch-axe-verbose": "2.2.2",
24
+ "nightwatch-axe-verbose": "2.2.3",
26
25
  "npm-run-all": "4.1.5",
27
26
  "react": "18.2.0",
28
27
  "react-dom": "18.2.0",
29
- "react-router": "6.21.0",
30
- "react-router-dom": "6.21.0",
28
+ "react-router": "6.21.1",
29
+ "react-router-dom": "6.21.1",
31
30
  "rimraf": "3.0.2",
32
31
  "ts-prune": "0.10.3",
33
32
  "typescript": "5.3.3",
package/src/App.tsx CHANGED
@@ -3,9 +3,9 @@ import { Navigate, Route, Routes, useSearchParams } from 'react-router-dom';
3
3
  import { Route as MyRoute, Routes as MyRoutes } from './shares/types';
4
4
 
5
5
  import { Option } from '@public-ui/components';
6
- import { KolAlert } from '@public-ui/react';
6
+ import { KolAlert, KolBadge } from '@public-ui/react';
7
7
  import { ROUTES } from './shares/routes';
8
- import { Theme, THEME_OPTIONS } from './shares/theme';
8
+ import { isDraftTheme, Theme, THEME_OPTIONS } from './shares/theme';
9
9
  import PackageJson from '@public-ui/components/package.json';
10
10
  import { getTheme, getThemeName, setStorage, setTheme } from './shares/store';
11
11
  import { Sidebar } from './components/Sidebar';
@@ -45,20 +45,19 @@ const getRouteTree = (routes: MyRoutes): ReturnType<typeof Route>[] => {
45
45
  path={`${path}/all`}
46
46
  element={
47
47
  <div className="d-grid gap-4">
48
- {THEME_OPTIONS.filter(
49
- (theme) =>
50
- ['bmf', 'default', 'bzst-v1', 'ecl-ec', 'ecl-eu', 'itzbund', 'mapz', 'zoll-v2', 'zoll-v3'].indexOf((theme as Option<Theme>).value) >= 0,
51
- ).map((theme) => (
52
- <div className="d-grid gap-2" key={(theme as Option<Theme>).value} data-theme={(theme as Option<Theme>).value}>
53
- <div className="mt-4">
54
- <strong>{theme.label}</strong>
48
+ {THEME_OPTIONS.filter((theme) => ['bmf', 'default', 'ecl-ec', 'ecl-eu', 'itzbund'].indexOf((theme as Option<Theme>).value) >= 0).map(
49
+ (theme) => (
50
+ <div className="d-grid gap-2" key={(theme as Option<Theme>).value} data-theme={(theme as Option<Theme>).value}>
51
+ <div className="mt-4">
52
+ <strong>{theme.label}</strong>
53
+ </div>
54
+ <div className="my-2">
55
+ <ThisRoute />
56
+ </div>
57
+ <hr aria-hidden="true" />
55
58
  </div>
56
- <div className="my-2">
57
- <ThisRoute />
58
- </div>
59
- <hr aria-hidden="true" />
60
- </div>
61
- ))}
59
+ ),
60
+ )}
62
61
  </div>
63
62
  }
64
63
  />,
@@ -104,7 +103,7 @@ ROUTE_LIST.forEach((route) => {
104
103
  export const App: FC = () => {
105
104
  const routerLocation = useLocation();
106
105
  const [searchParams, setSearchParams] = useSearchParams();
107
- const theme = searchParams.get('theme') ?? getTheme();
106
+ const theme: Theme = (searchParams.get('theme') as Theme) ?? getTheme();
108
107
  const hideMenus = searchParams.has('hideMenus');
109
108
 
110
109
  setTheme(theme as Theme); // set for `getTheme` usages within the application
@@ -134,6 +133,7 @@ export const App: FC = () => {
134
133
  )}
135
134
 
136
135
  <div className="p-4" id="route-container">
136
+ {!hideMenus && isDraftTheme(theme) && <KolBadge className="mb-3" _label="DRAFT" _color="#db5461" />}
137
137
  <Routes>
138
138
  {ROUTE_TREE}
139
139
  <Route path="*" element={<KolAlert _type="info">This code example has not been migrated yet - it&#39;s coming soon!</KolAlert>} />
@@ -6,7 +6,7 @@ export const SampleDescription: FC<PropsWithChildren> = (props) => {
6
6
  const hideMenus = useContext(HideMenusContext);
7
7
 
8
8
  return hideMenus ? null : (
9
- <div className="flex">
9
+ <div className="flex mb-sm">
10
10
  <KolIndentedText>{props.children}</KolIndentedText>
11
11
  <KolLink
12
12
  _hideLabel
@@ -6,9 +6,8 @@ import { FC } from 'react';
6
6
  export const AlertHtml: FC = () => (
7
7
  <div>
8
8
  <KolAlert _label="Ausgabe von HTML-Code im Alert" _type="info">
9
- {' '}
10
9
  <h2 className="mt-2 mb-3">Hier wird eine H2-Überschrift ausgegeben</h2>
11
- <div style={{ display: 'grid', gridAutoFlow: 'column', gap: '1rem' }}>
10
+ <div className="grid gap-4 sm:grid-cols-2">
12
11
  <div>
13
12
  <h4>Text in einer linken Spalte</h4>
14
13
  <p>
@@ -2,7 +2,7 @@ import { KolButton } from '@public-ui/react';
2
2
  import React, { FC } from 'react';
3
3
 
4
4
  export const ButtonAccessKey: FC = () => (
5
- <div className="flex gap-4">
5
+ <div className="flex flex-wrap gap-4">
6
6
  <KolButton _label="Mit S access key" _accessKey="S"></KolButton>
7
7
  <KolButton _label="Sehr kleines s" _accessKey="s"></KolButton>
8
8
  <KolButton _label="Access key kommt nicht in label vor" _accessKey="x"></KolButton>
@@ -12,14 +12,14 @@ const ARGS = {
12
12
 
13
13
  export const ButtonWidth: FC = () => (
14
14
  <div className="grid gap-14">
15
- <div className="flex flex-warp gap-14">
15
+ <div className="flex flex-wrap gap-14">
16
16
  <KolButton _label="Primary" _variant="primary" {...ARGS}></KolButton>
17
17
  <KolButton _label="Secondary" _variant="secondary" {...ARGS}></KolButton>
18
18
  <KolButton _label="Normal" _variant="normal" {...ARGS}></KolButton>
19
19
  <KolButton _label="Danger" _variant="danger" {...ARGS}></KolButton>
20
20
  <KolButton _label="Ghost" _variant="ghost" {...ARGS}></KolButton>
21
21
  </div>
22
- <div className="flex flex-warp gap-14">
22
+ <div className="flex flex-wrap gap-14">
23
23
  <KolButton _disabled _label="Primary" _variant="primary" {...ARGS}></KolButton>
24
24
  <KolButton _disabled _label="Secondary" _variant="secondary" {...ARGS}></KolButton>
25
25
  <KolButton _disabled _label="Normal" _variant="normal" {...ARGS}></KolButton>
@@ -11,8 +11,8 @@ const STYLE = {
11
11
  };
12
12
 
13
13
  export const CardSelection: FC = () => (
14
- <div className="flex gap-2">
15
- <KolCard _label="DEBTI-25437/17-1">
14
+ <div className="flex flex-wrap gap-2">
15
+ <KolCard _label="DEBTI-25437/17-1" className="lg:w-[calc(33.33%-16px)] md:w-[calc(50%-16px)] sm:w-full">
16
16
  <div>
17
17
  <div>
18
18
  TeCorp Endplatte
@@ -32,7 +32,7 @@ export const CardSelection: FC = () => (
32
32
  </div>
33
33
  </div>
34
34
  </KolCard>
35
- <KolCard _label="DEBTI-25437/17-1">
35
+ <KolCard _label="DEBTI-25437/17-1" className="lg:w-[calc(33.33%-16px)] md:w-[calc(50%-16px)] sm:w-full">
36
36
  <div>
37
37
  <div>
38
38
  TeCorp Endplatte
@@ -52,7 +52,7 @@ export const CardSelection: FC = () => (
52
52
  </div>
53
53
  </div>
54
54
  </KolCard>
55
- <KolCard _label="DEBTI-25437/17-1">
55
+ <KolCard _label="DEBTI-25437/17-1" className="lg:w-[calc(33.33%-16px)] md:w-[calc(50%-16px)] sm:w-full">
56
56
  <div>
57
57
  <div>
58
58
  TeCorp Endplatte
@@ -15,8 +15,8 @@ export const InputDateCases = forwardRef<HTMLKolInputDateElement, Components.Kol
15
15
  <KolInputDate {...props} ref={ref} _accessKey="W" _type="week" _label="Woche" _required />
16
16
  <KolInputDate {...props} _type="time" _label="Zeit (Standard)" _required />
17
17
  <KolInputDate {...props} _step={1} _type="time" _label="Zeit (mit Sekunden)" _required />
18
- <KolInputDate {...props} _readOnly _label="Zahleneingabe (Readonly)" _required />
19
- <KolInputDate {...props} _disabled _label="Zahleneingabe (Disabled)" _required />
18
+ <KolInputDate {...props} _readOnly _label="Datumseingabe (Readonly)" _required />
19
+ <KolInputDate {...props} _disabled _label="Datumseingabe (Disabled)" _required />
20
20
  </div>
21
21
  );
22
22
  });
@@ -11,7 +11,7 @@ const ARGS = {
11
11
 
12
12
  export const LinkButtonBasic: FC = () => (
13
13
  <div className="grid gap-14">
14
- <div className="flex flex-warp gap-14">
14
+ <div className="flex flex-wrap gap-14">
15
15
  <KolLinkButton _label="Primary" _variant="primary" {...ARGS}></KolLinkButton>
16
16
  <KolLinkButton _label="Secondary" _variant="secondary" {...ARGS}></KolLinkButton>
17
17
  <KolLinkButton _label="Normal" _variant="normal" {...ARGS}></KolLinkButton>
@@ -14,12 +14,12 @@ export const SplitButtonBasic: FC = () => {
14
14
  };
15
15
 
16
16
  return (
17
- <div className="grid gap-4">
18
- <KolSplitButton _label="Nur der Pfeil öffnet" className="w-200px" _on={{ onClick: handleButtonClick }}>
19
- Drowndown-Inhalt
17
+ <div className="flex gap-4">
18
+ <KolSplitButton _label="Nur der Pfeil öffnet" _on={{ onClick: handleButtonClick }}>
19
+ Dropdown-Inhalt
20
20
  </KolSplitButton>
21
- <KolSplitButton _label="ohne label" _hide-label _icons="codicon codicon-git-pull-request" className="w-200px">
22
- Drowndown-Inhalt
21
+ <KolSplitButton _label="Schalter ohne sichtbares Label" _hideLabel _icons="codicon codicon-git-pull-request">
22
+ Dropdown-Inhalt
23
23
  </KolSplitButton>
24
24
  </div>
25
25
  );
@@ -15,11 +15,12 @@ const DATE_FORMATTER = Intl.DateTimeFormat('de-DE', {
15
15
  const HEADERS: KoliBriTableHeaders = {
16
16
  horizontal: [
17
17
  [
18
- { label: 'order', key: 'order', textAlign: 'center' },
18
+ { label: 'order', key: 'order', textAlign: 'center', width: '10em' },
19
19
  {
20
20
  label: 'date',
21
21
  key: 'date',
22
22
  textAlign: 'center',
23
+ width: '20em',
23
24
  render: (_el, _cell, tupel) => DATE_FORMATTER.format((tupel as Data).date),
24
25
  sort: (data: Data[]) =>
25
26
  data.sort((data0, data1) => {
@@ -48,4 +49,4 @@ const HEADERS: KoliBriTableHeaders = {
48
49
  ],
49
50
  };
50
51
 
51
- export const TableBadgeSize: FC = () => <KolTable _label="Sort a date column" _data={DATA} _headers={HEADERS} className="block" />;
52
+ export const TableBadgeSize: FC = () => <KolTable _label="Sort a date column" _data={DATA} _headers={HEADERS} className="block min-w-75em" />;
@@ -0,0 +1,84 @@
1
+ import React, { FC } from 'react';
2
+
3
+ import { KolTable, KolHeading } from '@public-ui/react';
4
+ import { SampleDescription } from '../SampleDescription';
5
+
6
+ const DATA = [{ left: 'Left Example', center: 'Center Example', right: 'Right Example' }];
7
+ type Data = (typeof DATA)[0];
8
+ const genericNonSorter = (data: Data[]): Data[] => data;
9
+
10
+ export const TableColumnAlignment: FC = () => (
11
+ <>
12
+ <SampleDescription>Table with columns headers and data in different text alignments.</SampleDescription>
13
+
14
+ <KolHeading _label="Simple table" _level={3}></KolHeading>
15
+ <KolTable
16
+ _label="Table for demonstration purposes with different text align properties"
17
+ _headers={{
18
+ horizontal: [
19
+ [
20
+ { label: 'left', key: 'left', textAlign: 'left' },
21
+ { label: 'center', key: 'center', textAlign: 'center' },
22
+ { label: 'right', key: 'right', textAlign: 'right' },
23
+ ],
24
+ ],
25
+ }}
26
+ _data={DATA}
27
+ className="block"
28
+ style={{ maxWidth: '600px' }}
29
+ />
30
+
31
+ <KolHeading _label="Table with sortable columns" _level={3} className="block mt-6"></KolHeading>
32
+ <KolTable
33
+ _label="Table for demonstration purposes with sortable columns"
34
+ _headers={{
35
+ horizontal: [
36
+ [
37
+ { label: 'left', key: 'left', textAlign: 'left', sort: genericNonSorter },
38
+ { label: 'center', key: 'center', textAlign: 'center', sort: genericNonSorter },
39
+ { label: 'right', key: 'right', textAlign: 'right', sort: genericNonSorter },
40
+ ],
41
+ ],
42
+ }}
43
+ _data={DATA}
44
+ className="block"
45
+ style={{ maxWidth: '600px' }}
46
+ />
47
+
48
+ <KolHeading _label="Table some sortable columns" _level={3} className="block mt-6"></KolHeading>
49
+ <KolTable
50
+ _label="Table for demonstration purposes with some but not all columns sortable"
51
+ _headers={{
52
+ horizontal: [
53
+ [
54
+ { label: 'left', key: 'left', textAlign: 'left', sort: genericNonSorter },
55
+ { label: 'center', key: 'center', textAlign: 'center', sort: genericNonSorter },
56
+ { label: 'right', key: 'right', textAlign: 'right' },
57
+ ],
58
+ ],
59
+ }}
60
+ _data={DATA}
61
+ className="block"
62
+ style={{ maxWidth: '600px' }}
63
+ />
64
+
65
+ <KolHeading _label="Table with vertical heading" _level={3} className="block mt-6"></KolHeading>
66
+ <KolTable
67
+ _label="Table for demonstration purposes with vertical heading"
68
+ _headers={{
69
+ horizontal: [
70
+ [
71
+ { label: '', asTd: true },
72
+ { label: 'left', key: 'left', textAlign: 'left' },
73
+ { label: 'center', key: 'center', textAlign: 'center' },
74
+ { label: 'right', key: 'right', textAlign: 'right' },
75
+ ],
76
+ ],
77
+ vertical: [[{ label: 'Vertical' }]],
78
+ }}
79
+ _data={DATA}
80
+ className="block"
81
+ style={{ maxWidth: '600px' }}
82
+ />
83
+ </>
84
+ );
@@ -11,10 +11,11 @@ import { SampleDescription } from '../SampleDescription';
11
11
  const HEADERS: KoliBriTableHeaders = {
12
12
  horizontal: [
13
13
  [
14
- { label: '#', key: 'order', textAlign: 'center' },
14
+ { label: '#', key: 'order', textAlign: 'center', width: '10em' },
15
15
  {
16
16
  label: 'Datum (string)',
17
17
  key: 'date',
18
+ width: '20em',
18
19
  textAlign: 'center',
19
20
  render: (el, tupel) => {
20
21
  // https://reactjs.org/docs/portals.html
@@ -51,6 +52,6 @@ export const TableRenderCell: FC = () => (
51
52
  <SampleDescription>
52
53
  <p>This sample simulates the usage of React render functions for the table column contents.</p>
53
54
  </SampleDescription>
54
- <KolTable _label="Sort a date column" _data={DATA} _headers={HEADERS} className="block" />
55
+ <KolTable _label="Sort a date column" _data={DATA} _headers={HEADERS} className="block min-w-75em" />
55
56
  </>
56
57
  );
@@ -1,17 +1,17 @@
1
1
  import { Routes } from '../../shares/types';
2
2
 
3
3
  import { TableBadgeSize } from './badge-size';
4
-
4
+ import { TableColumnAlignment } from './column-alignment';
5
5
  import { TableRenderCell } from './render-cell';
6
-
7
- import { TableSortTable } from './sort-date';
6
+ import { TableSortData } from './sort-data';
8
7
  import { TableWithPagination } from './with-pagination';
9
8
 
10
9
  export const TABLE_ROUTES: Routes = {
11
10
  table: {
12
11
  'badge-size': TableBadgeSize,
12
+ 'column-alignment': TableColumnAlignment,
13
13
  'render-cell': TableRenderCell,
14
- 'sort-data': TableSortTable,
14
+ 'sort-data': TableSortData,
15
15
  'with-pagination': TableWithPagination,
16
16
  },
17
17
  };
@@ -30,4 +30,4 @@ const HEADERS: KoliBriTableHeaders = {
30
30
  ],
31
31
  };
32
32
 
33
- export const TableSortTable: FC = () => <KolTable _label="Sort a date column" _data={DATA} _headers={HEADERS} className="block" />;
33
+ export const TableSortData: FC = () => <KolTable _label="Sort a date column" _data={DATA} _headers={HEADERS} className="block" />;
@@ -5,8 +5,7 @@ import { HashRouter as Router } from 'react-router-dom';
5
5
  import { defineCustomElements } from '@public-ui/components/dist/loader';
6
6
  import type { Generic } from 'adopted-style-sheets';
7
7
  import { register } from '@public-ui/components';
8
- import { BAMF, BMF, BZStv1, DEFAULT, DESYv1, DESYv2, ECL_EC, ECL_EU, ITZBund, MAPZ, ZOLLv2, ZOLLv3 } from '@public-ui/themes';
9
- import { TH } from '@public-oss/kolibri-themes';
8
+ import { BMF, DEFAULT, ECL_EC, ECL_EU, ITZBund } from '@public-ui/themes';
10
9
  import { App } from './App';
11
10
 
12
11
  type Theme = Generic.Theming.RegisterPatch<string, string, string>;
@@ -23,7 +22,7 @@ void (async () => {
23
22
  } else {
24
23
  /* Regular mode: Register all known themes. */
25
24
  try {
26
- await register([BAMF, BMF, DEFAULT, BZStv1, DESYv1, DESYv2, ECL_EC, ECL_EU, ITZBund, MAPZ, ZOLLv2, ZOLLv3, TH], defineCustomElements, {
25
+ await register([BMF, DEFAULT, ECL_EC, ECL_EU, ITZBund], defineCustomElements, {
27
26
  theme: {
28
27
  detect: 'auto',
29
28
  },
@@ -1,8 +1,8 @@
1
- import React, { useState } from 'react';
1
+ import React from 'react';
2
2
  import { KolButton, KolForm, KolHeading, KolSelect } from '@public-ui/react';
3
3
  import { Field, FieldProps, useFormikContext } from 'formik';
4
4
  import { FormValues } from './AppointmentForm';
5
- import { ErrorList } from './ErrorList';
5
+ import { ErrorListPropType } from '@public-ui/components';
6
6
 
7
7
  const LOCATION_OPTIONS = [
8
8
  {
@@ -29,23 +29,23 @@ const LOCATION_OPTIONS = [
29
29
 
30
30
  export function DistrictForm() {
31
31
  const form = useFormikContext<FormValues>();
32
- const [sectionSubmitted, setSectionSubmitted] = useState(false);
32
+ const errorList = createErrorList(form.errors);
33
+
34
+ function createErrorList(formikErrors: Record<string, string>): ErrorListPropType[] {
35
+ return Object.keys(formikErrors).map((fieldName) => ({
36
+ message: formikErrors[fieldName],
37
+ selector: `#field-${fieldName}`,
38
+ }));
39
+ }
33
40
 
34
41
  return (
35
42
  <div className="p-2">
36
43
  <KolHeading _level={2} _label="Wählen Sie einen Stadtteil aus"></KolHeading>
37
-
38
- {sectionSubmitted && Object.keys(form.errors).length ? (
39
- <div className="mt-2">
40
- <ErrorList errors={form.errors} />
41
- </div>
42
- ) : null}
43
-
44
44
  <KolForm
45
+ _errorList={errorList}
45
46
  _on={{
46
47
  onSubmit: () => {
47
48
  void form.submitForm();
48
- setSectionSubmitted(true);
49
49
  },
50
50
  }}
51
51
  >
@@ -1,21 +1,15 @@
1
1
  import { SelectOption } from '@public-ui/components';
2
2
 
3
- export type Theme = 'bmf' | 'bzst-v1' | 'default' | 'ecl-ec' | 'ecl-eu' | 'itzbund' | 'mapz' | 'th' | 'unstyled' | 'zoll-v2' | 'zoll-v3';
3
+ export type Theme = 'bmf' | 'default' | 'ecl-ec' | 'ecl-eu' | 'itzbund' | 'unstyled';
4
+
5
+ const drafts: Theme[] = ['ecl-ec', 'ecl-eu', 'itzbund'];
6
+
7
+ export const isDraftTheme = (theme: Theme) => drafts.includes(theme);
4
8
 
5
9
  export const isTheme = (value: unknown) => {
6
10
  return (
7
11
  typeof value === 'string' &&
8
- (value === 'unstyled' ||
9
- value === 'bmf' ||
10
- value === 'bzst-v1' ||
11
- value === 'default' ||
12
- value === 'ecl-ec' ||
13
- value === 'ecl-eu' ||
14
- value === 'itzbund' ||
15
- value === 'mapz' ||
16
- value === 'th' ||
17
- value === 'zoll-v2' ||
18
- value === 'zoll-v3')
12
+ (value === 'bmf' || value === 'default' || value === 'ecl-ec' || value === 'ecl-eu' || value === 'itzbund' || value === 'unstyled')
19
13
  );
20
14
  };
21
15
 
@@ -26,47 +20,27 @@ export type Store = {
26
20
 
27
21
  export const THEME_OPTIONS: SelectOption<Theme>[] = [
28
22
  {
29
- label: 'Unstyled',
23
+ label: 'Unstyled (Uncolored)',
30
24
  value: 'unstyled',
31
25
  },
32
26
  {
33
- label: 'Bundesministerium der Finanzen',
27
+ label: 'Bundesministerium der Finanzen (Tested)',
34
28
  value: 'bmf',
35
29
  },
36
30
  {
37
- label: 'Bundeszentralamt für Steuern (v1)',
38
- value: 'bzst-v1',
39
- },
40
- {
41
- label: 'Default',
31
+ label: 'Default (Tested)',
42
32
  value: 'default',
43
33
  },
44
34
  {
45
- label: 'European Commission (ECL)',
35
+ label: 'European Commission (Draft)',
46
36
  value: 'ecl-ec',
47
37
  },
48
38
  {
49
- label: 'European Union (ECL)',
39
+ label: 'European Union (Draft)',
50
40
  value: 'ecl-eu',
51
41
  },
52
42
  {
53
- label: 'Informationstechnikzentrum Bund',
43
+ label: 'Informationstechnikzentrum Bund (Draft)',
54
44
  value: 'itzbund',
55
45
  },
56
- {
57
- label: '.',
58
- value: 'mapz',
59
- },
60
- {
61
- label: 'Freistaat Thüringen',
62
- value: 'th',
63
- },
64
- {
65
- label: '..',
66
- value: 'zoll-v2',
67
- },
68
- {
69
- label: '...',
70
- value: 'zoll-v3',
71
- },
72
46
  ];
package/dist/1130.js DELETED
@@ -1,2 +0,0 @@
1
- /*! For license information please see 1130.js.LICENSE.txt */
2
- "use strict";(self.webpackChunk_public_ui_sample_react=self.webpackChunk_public_ui_sample_react||[]).push([[1130],{1130:(e,t,a)=>{switch(location.pathname){case"/dev/toaster.html":a.e(5860).then(a.bind(a,5860));break;case"/dev/reprod-accordion-does-not-toggle-with-open.html":a.e(7380).then(a.bind(a,7380));break;case"/dev/details-synced-open-state.html":a.e(2738).then(a.bind(a,2738))}}}]);
package/dist/183.js DELETED
@@ -1,2 +0,0 @@
1
- /*! For license information please see 183.js.LICENSE.txt */
2
- "use strict";(self.webpackChunk_public_ui_sample_react=self.webpackChunk_public_ui_sample_react||[]).push([[183],{183:(t,n,e)=>{e.r(n),e.d(n,{kol_link_group:()=>h});var i=e(1349),a=e(1292),l=e(5382),o=e(6297),s=e(4364);const r=t=>{const n=[];return t.links.map(((e,a)=>{n.push((0,i.h)("li",{key:a,class:{ident:a>0&&"vertical"===t.orientation,"list-none":0===a&&"horizontal"===t.orientation},style:{listStyleType:t.listStyleType}},(0,i.h)("kol-link",Object.assign({},e))))})),n},h=class{constructor(t){(0,i.r)(this,t),this.isUl=!0,this._listStyleType=void 0,this._label=void 0,this._links=void 0,this._orientation="vertical",this.state={_label:"…",_listStyleType:"disc",_links:[],_orientation:"vertical"}}render(){return(0,i.h)("nav",{"aria-label":this.state._label,class:{vertical:"vertical"===this.state._orientation,horizontal:"horizontal"===this.state._orientation}},!1===this.isUl?(0,i.h)("ol",null,(0,i.h)(r,{links:this.state._links,orientation:this.state._orientation,listStyleType:this.state._listStyleType})):(0,i.h)("ul",null,(0,i.h)(r,{links:this.state._links,orientation:this.state._orientation,listStyleType:this.state._listStyleType})))}validateLabel(t,n,e=!1){e||(0,o.r)(this.state._label),(0,a.v)(this,t),(0,o.a)(this.state._label)}validateListStyleType(t){(0,l.w)(this,"_listStyleType",(t=>{switch(t){case"disc":case"circle":case"square":case"none":return this.isUl=!0,!0;case"decimal":case"decimal-leading-zero":case"lower-alpha":case"lower-latin":case"lower-greek":case"lower-roman":case"upper-alpha":case"upper-latin":case"upper-roman":return this.isUl=!1,!0;default:return!1}}),new Set(["https://www.w3schools.com/tags/tag_ol.asp"]),t)}validateLinks(t){(0,s.w)("KolLinkGroup",this,t)}validateOrientation(t){(0,l.w)(this,"_orientation",(t=>"horizontal"===t||"vertical"===t),new Set(["Orientation {horizontal, vertical}"]),t,{defaultValue:"vertical"})}componentWillLoad(){this.validateLabel(this._label,void 0,!0),this.validateListStyleType(this._listStyleType),this.validateLinks(this._links),this.validateOrientation(this._orientation)}disconnectedCallback(){(0,o.r)(this.state._label)}static get watchers(){return{_label:["validateLabel"],_listStyleType:["validateListStyleType"],_links:["validateLinks"],_orientation:["validateOrientation"]}}};h.style={default:"/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n\t:host {\n\t\t/*\n\t\t * Minimum size of interactive elements.\n\t\t */\n\t\t--a11y-min-size: 44px;\n\t\t/*\n\t\t * No element should be used without a background and font color whose contrast ratio has\n\t\t * not been checked. By initially setting the background color to white and the font color\n\t\t * to black, the contrast ratio is ensured and explicit adjustment is forced.\n\t\t */\n\t\tbackground-color: white;\n\t\tcolor: black;\n\t\t/*\n\t\t * Verdana is an accessible font that can be used without requiring additional loading time.\n\t\t */\n\t\tfont-family: Verdana;\n\t}\n\n\t* {\n\t\t/*\n\t\t * This rule enables the word dividing for all texts. That is important for high zoom levels.\n\t\t */\n\t\thyphens: auto;\n\t\t/*\n\t\t * Letter spacing is required for all texts.\n\t\t */\n\t\tletter-spacing: inherit;\n\t\t/*\n\t\t * This rule enables the word dividing for all texts. That is important for high zoom levels.\n\t\t */\n\t\tword-break: break-word;\n\t\t/*\n\t\t * Word spacing is required for all texts.\n\t\t */\n\t\tword-spacing: inherit;\n\t}\n\n\t/*\n\t * All interactive elements should have a minimum size of 44px.\n\t */\n\t/* input:not([type='checkbox'], [type='radio'], [type='range']), */\n\t/* option, */\n\t/* select, */\n\t/* textarea, */\n\t[role='button'],\n\tbutton:not([role='link']),\n\tkol-input .input {\n\t\tmin-height: var(--a11y-min-size);\n\t\tmin-width: var(--a11y-min-size);\n\t}\n\n\t/*\n\t * Some interactive elements should not inherit the font-family and font-size.\n\t */\n\ta,\n\tbutton,\n\th1,\n\th2,\n\th3,\n\th4,\n\th5,\n\th6,\n\tinput,\n\toption,\n\tselect,\n\ttextarea {\n\t\t/*\n\t\t * All elements should inherit the font family from his parent element.\n\t\t */\n\t\tfont-family: inherit;\n\t\t/*\n\t\t * All elements should inherit the font size from his parent element.\n\t\t */\n\t\tfont-size: inherit;\n\t}\n}\n\n/**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n.visually-hidden {\n\tclip: rect(0 0 0 0);\n\tclip-path: inset(50%);\n\theight: 1px;\n\toverflow: hidden;\n\tposition: absolute;\n\twhite-space: nowrap;\n\twidth: 1px;\n}\n\n@layer kol-global {\n\t/*\n\t * Dieses CSS stellt sicher, dass der Standard-Style\n\t * von A und Button resettet werden.\n\t */\n\t:is(a, button) {\n\t\tbackground-color: transparent;\n\t\tborder: none;\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t\twidth: 100%; /* 100% needed for custom width from outside */\n\t}\n\n\t/*\n\t * Ensure elements with hidden attribute to be actually not visible\n\t * @see https://meowni.ca/hidden.is.a.lie.html\n\t */\n\t[hidden] {\n\t\tdisplay: none !important;\n\t}\n}\n\n@layer kol-global {\n\t:host {\n\t\t/*\n\t\t * The max-width is needed to prevent the table from overflowing the\n\t\t * parent node, if the table is wider than the parent node.\n\t\t */\n\t\tmax-width: 100%;\n\t}\n\n\t* {\n\t\t/*\n\t\t * We prefer to box-sizing: border-box for all elements.\n\t\t */\n\t\tbox-sizing: border-box;\n\t}\n\n\t/* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n\tkol-span-wc {\n\t\tdisplay: grid;\n\t\tplace-items: center;\n\t}\n\n\t/* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n\tkol-span-wc > span {\n\t\tdisplay: flex;\n\t\tplace-items: center;\n\t}\n\n\ta,\n\tbutton {\n\t\tcursor: pointer;\n\t}\n\n\t/* This is the text label. */\n\t.icon-only > kol-span-wc > span > span {\n\t\tdisplay: none;\n\t}\n}\n\n@layer kol-component {\n\tul {\n\t\tlist-style: none;\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t}\n\n\tnav.horizontal ul {\n\t\tdisplay: flex;\n\t\tflex-wrap: wrap;\n\t}\n\n\tnav.horizontal li {\n\t\tmargin-left: 1.25rem;\n\t\tmargin-right: 0.25rem;\n\t}\n\n\tnav.horizontal li:first-child {\n\t\tmargin-left: 0;\n\t}\n\n\tnav.horizontal li:last-child {\n\t\tmargin-right: 0;\n\t}\n\n\tnav.vertical li {\n\t\tmargin-left: 1.75rem;\n\t\tmargin-right: 0.5rem;\n\t}\n\n\tli.list-none {\n\t\tlist-style-type: none !important;\n\t\tmargin-left: 0;\n\t}\n}\n"}},1292:(t,n,e)=>{e.d(n,{a:()=>d,c:()=>r,h:()=>s,v:()=>c});var i=e(2333),a=e(5382);const l=/[a-zA-Z0-9äöüÄÖÜß]/g,o=/^\d+$/;function s(t,n=1){return function(t){var n;return"string"==typeof t&&(null===(n=t.match(l))||void 0===n?void 0:n.length)||0}(t)>=n}function r(t){return o.test(t)}const h=new Set(["string"]),c=(t,n,e={})=>{(0,a.w)(t,"_label",(t=>"string"==typeof t),h,n,function(t){var n;return{hooks:{afterPatch:(n,e,a,l)=>{var o,h;"function"==typeof(null===(o=t.hooks)||void 0===o?void 0:o.afterPatch)&&(null===(h=t.hooks)||void 0===h||h.afterPatch(n,e,a,l)),"string"==typeof n&&!1===s(n,3)&&!1===r(n)&&(0,i.a)(`The heading or label ("${n}") is not accessible. A label should consist of at least three readable characters.`),"string"==typeof n&&n.length>80&&(0,i.u)("A heading or label should not be longer than 80 characters.")},beforePatch:null===(n=t.hooks)||void 0===n?void 0:n.beforePatch}}}(e))},d=c},6297:(t,n,e)=>{e.d(n,{a:()=>a,r:()=>l});const i=new Set;function a(t){i.has(t)?console.error(`There already is a nav element with the label "${t}"`):i.add(t)}function l(t){i.delete(t)}},4364:(t,n,e)=>{e.d(n,{w:()=>l});var i=e(2333),a=e(5382);const l=(t,n,e)=>{(0,a.c)(n,"_links",(t=>"object"==typeof t&&("string"==typeof t._href||"string"==typeof t._label)),e),(0,i.c)(t,n.state._links.length)}}}]);
package/dist/2337.js DELETED
@@ -1,2 +0,0 @@
1
- /*! For license information please see 2337.js.LICENSE.txt */
2
- "use strict";(self.webpackChunk_public_ui_sample_react=self.webpackChunk_public_ui_sample_react||[]).push([[2337],{2337:(t,e,n)=>{n.r(e),n.d(e,{kol_input_file:()=>p});var i=n(1349),a=n(5578),l=n(347),o=n(6088),s=n(6715),r=n(5382),d=n(5547),h=n(4336);class c extends d.I{constructor(t,e,n){super(t,e,n),this.component=t}validateAccept(t){(0,r.d)(this.component,"_accept",t)}validateMultiple(t){(0,r.a)(this.component,"_multiple",t)}validateRequired(t){(0,r.a)(this.component,"_required",t)}validateValue(t){(0,r.d)(this.component,"_value",t),this.setFormAssociatedValue(this.component._value)}componentWillLoad(){super.componentWillLoad(),this.validateAccept(this.component._accept),this.validateMultiple(this.component._multiple),this.validateRequired(this.component._required),this.validateValue(this.component._value)}}const p=class{getValue(){return t=this,null,e=function*(){var t;return null===(t=this.ref)||void 0===t?void 0:t.files},new Promise(((n,i)=>{var a=t=>{try{o(e.next(t))}catch(t){i(t)}},l=t=>{try{o(e.throw(t))}catch(t){i(t)}},o=t=>t.done?n(t.value):Promise.resolve(t.value).then(a,l);o((e=e.apply(t,null)).next())}));var t,e}render(){const{ariaDescribedBy:t}=(0,s.g)(this.state),e=(0,o.s)(this.state._label);return(0,i.h)(i.H,null,(0,i.h)("kol-input",{class:{file:!0,"hide-label":!!this.state._hideLabel},_accessKey:this.state._accessKey,_disabled:this.state._disabled,_error:this.state._error,_hideError:this.state._hideError,_hideLabel:this.state._hideLabel,_hint:this.state._hint,_icons:this.state._icons,_id:this.state._id,_label:this.state._label,_required:this.state._required,_smartButton:this.state._smartButton,_tooltipAlign:this._tooltipAlign,_touched:this.state._touched,onClick:()=>{var t;return null===(t=this.ref)||void 0===t?void 0:t.focus()}},(0,i.h)("span",{slot:"label"},e?(0,i.h)("slot",{name:"expert"}):"string"==typeof this.state._accessKey?(0,i.h)(i.F,null,(0,i.h)(h.I,{accessKey:this.state._accessKey,label:this.state._label})," ",(0,i.h)("span",{class:"access-key-hint","aria-hidden":"true"},this.state._accessKey)):(0,i.h)("span",null,this.state._label)),(0,i.h)("div",{slot:"input"},(0,i.h)("input",Object.assign({ref:this.catchRef,title:"",accept:this.state._accept,accessKey:this.state._accessKey,"aria-describedby":t.length>0?t.join(" "):void 0,"aria-label":this.state._hideLabel&&"string"==typeof this.state._label?this.state._label:void 0,autoCapitalize:"off",autoCorrect:"off",disabled:this.state._disabled,id:this.state._id,multiple:this.state._multiple,name:this.state._name,required:this.state._required,spellcheck:"false",type:"file",value:this.state._value},this.controller.onFacade,{onChange:this.onChange})))))}constructor(t){(0,i.r)(this,t),this.catchRef=t=>{this.ref=t,(0,o.a)(this.host,this.ref)},this.onChange=t=>{var e;if(this.ref instanceof HTMLInputElement&&"file"===this.ref.type){const n=this.ref.files;(0,l.s)(t),(0,l.t)("change",this.host,n),this.controller.setFormAssociatedValue(n),"function"==typeof(null===(e=this.state._on)||void 0===e?void 0:e.onChange)&&this.state._on.onChange(t,n)}},this._accept=void 0,this._accessKey=void 0,this._alert=!0,this._disabled=!1,this._error=void 0,this._hideError=!1,this._hideLabel=!1,this._hint="",this._icons=void 0,this._id=void 0,this._label=void 0,this._multiple=!1,this._name=void 0,this._on=void 0,this._required=!1,this._smartButton=void 0,this._syncValueBySelector=void 0,this._tabIndex=void 0,this._tooltipAlign="top",this._touched=!1,this._value=void 0,this.state={_hideError:!1,_id:`id-${(0,a.n)()}`,_label:""},this.controller=new c(this,"input-file",this.host)}validateAccept(t){this.controller.validateAccept(t)}validateAccessKey(t){this.controller.validateAccessKey(t)}validateAlert(t){this.controller.validateAlert(t)}validateDisabled(t){this.controller.validateDisabled(t)}validateError(t){this.controller.validateError(t)}validateHideError(t){this.controller.validateHideError(t)}validateHideLabel(t){this.controller.validateHideLabel(t)}validateHint(t){this.controller.validateHint(t)}validateIcons(t){this.controller.validateIcons(t)}validateId(t){this.controller.validateId(t)}validateLabel(t){this.controller.validateLabel(t)}validateMultiple(t){this.controller.validateMultiple(t)}validateName(t){this.controller.validateName(t)}validateOn(t){this.controller.validateOn(t)}validateRequired(t){this.controller.validateRequired(t)}validateSmartButton(t){this.controller.validateSmartButton(t)}validateSyncValueBySelector(t){this.controller.validateSyncValueBySelector(t)}validateTabIndex(t){this.controller.validateTabIndex(t)}validateTouched(t){this.controller.validateTouched(t)}validateValue(t){this.controller.validateValue(t)}componentWillLoad(){this._alert=!0===this._alert,this._touched=!0===this._touched,this.controller.componentWillLoad()}get host(){return(0,i.g)(this)}static get watchers(){return{_accept:["validateAccept"],_accessKey:["validateAccessKey"],_alert:["validateAlert"],_disabled:["validateDisabled"],_error:["validateError"],_hideError:["validateHideError"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_multiple:["validateMultiple"],_name:["validateName"],_on:["validateOn"],_required:["validateRequired"],_smartButton:["validateSmartButton"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_touched:["validateTouched"],_value:["validateValue"]}}};p.style={default:"/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n\t:host {\n\t\t/*\n\t\t * Minimum size of interactive elements.\n\t\t */\n\t\t--a11y-min-size: 44px;\n\t\t/*\n\t\t * No element should be used without a background and font color whose contrast ratio has\n\t\t * not been checked. By initially setting the background color to white and the font color\n\t\t * to black, the contrast ratio is ensured and explicit adjustment is forced.\n\t\t */\n\t\tbackground-color: white;\n\t\tcolor: black;\n\t\t/*\n\t\t * Verdana is an accessible font that can be used without requiring additional loading time.\n\t\t */\n\t\tfont-family: Verdana;\n\t}\n\n\t* {\n\t\t/*\n\t\t * This rule enables the word dividing for all texts. That is important for high zoom levels.\n\t\t */\n\t\thyphens: auto;\n\t\t/*\n\t\t * Letter spacing is required for all texts.\n\t\t */\n\t\tletter-spacing: inherit;\n\t\t/*\n\t\t * This rule enables the word dividing for all texts. That is important for high zoom levels.\n\t\t */\n\t\tword-break: break-word;\n\t\t/*\n\t\t * Word spacing is required for all texts.\n\t\t */\n\t\tword-spacing: inherit;\n\t}\n\n\t/*\n\t * All interactive elements should have a minimum size of 44px.\n\t */\n\t/* input:not([type='checkbox'], [type='radio'], [type='range']), */\n\t/* option, */\n\t/* select, */\n\t/* textarea, */\n\t[role='button'],\n\tbutton:not([role='link']),\n\tkol-input .input {\n\t\tmin-height: var(--a11y-min-size);\n\t\tmin-width: var(--a11y-min-size);\n\t}\n\n\t/*\n\t * Some interactive elements should not inherit the font-family and font-size.\n\t */\n\ta,\n\tbutton,\n\th1,\n\th2,\n\th3,\n\th4,\n\th5,\n\th6,\n\tinput,\n\toption,\n\tselect,\n\ttextarea {\n\t\t/*\n\t\t * All elements should inherit the font family from his parent element.\n\t\t */\n\t\tfont-family: inherit;\n\t\t/*\n\t\t * All elements should inherit the font size from his parent element.\n\t\t */\n\t\tfont-size: inherit;\n\t}\n}\n\n/**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n.visually-hidden {\n\tclip: rect(0 0 0 0);\n\tclip-path: inset(50%);\n\theight: 1px;\n\toverflow: hidden;\n\tposition: absolute;\n\twhite-space: nowrap;\n\twidth: 1px;\n}\n\n@layer kol-global {\n\t/*\n\t * Dieses CSS stellt sicher, dass der Standard-Style\n\t * von A und Button resettet werden.\n\t */\n\t:is(a, button) {\n\t\tbackground-color: transparent;\n\t\tborder: none;\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t\twidth: 100%; /* 100% needed for custom width from outside */\n\t}\n\n\t/*\n\t * Ensure elements with hidden attribute to be actually not visible\n\t * @see https://meowni.ca/hidden.is.a.lie.html\n\t */\n\t[hidden] {\n\t\tdisplay: none !important;\n\t}\n}\n\n@layer kol-global {\n\t:host {\n\t\t/*\n\t\t * The max-width is needed to prevent the table from overflowing the\n\t\t * parent node, if the table is wider than the parent node.\n\t\t */\n\t\tmax-width: 100%;\n\t}\n\n\t* {\n\t\t/*\n\t\t * We prefer to box-sizing: border-box for all elements.\n\t\t */\n\t\tbox-sizing: border-box;\n\t}\n\n\t/* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n\tkol-span-wc {\n\t\tdisplay: grid;\n\t\tplace-items: center;\n\t}\n\n\t/* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n\tkol-span-wc > span {\n\t\tdisplay: flex;\n\t\tplace-items: center;\n\t}\n\n\ta,\n\tbutton {\n\t\tcursor: pointer;\n\t}\n\n\t/* This is the text label. */\n\t.icon-only > kol-span-wc > span > span {\n\t\tdisplay: none;\n\t}\n}\n\n@layer kol-component {\n\t.required label > span::after,\n\t.required legend > span::after {\n\t\tcontent: '*';\n\t}\n}\n\n@layer kol-component {\n\t:host {\n\t\tdisplay: block;\n\t}\n}\n\n@layer kol-component {\n\tinput,\n\ttextarea {\n\t\tcursor: text;\n\t}\n\n\tinput[type='checkbox'],\n\tinput[type='color'],\n\tinput[type='file'],\n\tinput[type='radio'],\n\tinput[type='range'],\n\tlabel,\n\toption,\n\tselect {\n\t\tcursor: pointer;\n\t}\n\n\t/* input[type='checkbox'], */\n\t/* input[type='radio'], */\n\t/* input[type='range'], */\n\tinput[type='color'],\n\tinput[type='date'],\n\tinput[type='datetime-local'],\n\tinput[type='email'],\n\tinput[type='file'],\n\tinput[type='month'],\n\tinput[type='number'],\n\tinput[type='password'],\n\tinput[type='search'],\n\tinput[type='tel'],\n\tinput[type='text'],\n\tinput[type='time'],\n\tinput[type='url'],\n\tinput[type='week'],\n\tselect,\n\tselect[multiple] option,\n\ttextarea {\n\t\tfont-size: 1rem;\n\t\twidth: 100%;\n\t}\n\n\t/* needed hack for vertical alignment */\n\tinput[type='file'] {\n\t\tpadding: calc((var(--a11y-min-size) - 1rem) / 10) 0.5em;\n\t}\n\n\t/* needed hack for vertical alignment */\n\tselect[multiple] option {\n\t\tpadding: calc((var(--a11y-min-size) - 1rem) / 2) 0.5em;\n\t}\n\n\tkol-input.disabled :is(button, input, option, select, textarea, .input-label) {\n\t\tcursor: not-allowed;\n\t\topacity: 0.5;\n\t}\n}\n\n@layer kol-component {\n\tkol-input {\n\t\tdisplay: grid;\n\t}\n\n\tkol-input .input-slot {\n\t\tflex-grow: 1;\n\t}\n\n\tinput:not([type='checkbox'], [type='radio']),\n\tselect:not([multiple], [size]) {\n\t\theight: 2.75em;\n\t}\n\n\tinput:focus,\n\toption:focus,\n\tselect:focus,\n\ttextarea:focus {\n\t\toutline: 0;\n\t}\n\n\t.input {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t}\n\n\t.input > kol-icon {\n\t\tdisplay: grid;\n\t\theight: var(--a11y-min-size);\n\t\tplace-items: center;\n\t}\n\n\tkol-input.required .input-tooltip .span-label::after {\n\t\tcontent: '*';\n\t}\n}\n\n@layer kol-component {\n\tlabel input[type='file']::-webkit-file-upload-button {\n\t\tdisplay: none;\n\t}\n\n\tlabel input[type='file']:before {\n\t\tcontent: 'Datei auswählen';\n\t}\n\n\tlabel input[multiple]:before {\n\t\tcontent: 'Dateien auswählen';\n\t}\n\n\tdiv.input {\n\t\tcursor: pointer;\n\t}\n\n\t.error.hidden {\n\t\tdisplay: none;\n\t}\n}\n"}}}]);