@public-ui/sample-react 2.1.2 → 2.1.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 (212) hide show
  1. package/dist/1069.js +2 -0
  2. package/dist/1085.js +2 -0
  3. package/dist/1184.js +2 -0
  4. package/dist/1204.js +2 -0
  5. package/dist/1222.js +2 -0
  6. package/dist/1278.js +1 -1
  7. package/dist/1325.js +2 -0
  8. package/dist/1333.js +2 -0
  9. package/dist/1661.js +2 -0
  10. package/dist/{9031.js → 1703.js} +2 -2
  11. package/dist/{7055.js → 1711.js} +2 -2
  12. package/dist/{2256.js → 1792.js} +2 -2
  13. package/dist/1793.js +2 -0
  14. package/dist/{4486.js → 1878.js} +2 -2
  15. package/dist/1957.js +2 -0
  16. package/dist/2305.js +2 -0
  17. package/dist/2471.js +2 -0
  18. package/dist/{2858.js → 2538.js} +2 -2
  19. package/dist/279.js +2 -0
  20. package/dist/2830.js +2 -0
  21. package/dist/{6716.js → 3180.js} +2 -2
  22. package/dist/{8516.js → 3332.js} +2 -2
  23. package/dist/{4318.js → 3454.js} +2 -2
  24. package/dist/{4156.js → 3596.js} +2 -2
  25. package/dist/3714.js +2 -0
  26. package/dist/{6629.js → 3797.js} +2 -2
  27. package/dist/3974.js +2 -0
  28. package/dist/{3510.js → 3990.js} +2 -2
  29. package/dist/4014.js +1 -1
  30. package/dist/{5670.js → 4102.js} +2 -2
  31. package/dist/4218.js +2 -0
  32. package/dist/{4702.js → 4303.js} +2 -2
  33. package/dist/4404.js +2 -0
  34. package/dist/453.js +2 -0
  35. package/dist/4941.js +2 -0
  36. package/dist/500.js +2 -0
  37. package/dist/5139.js +2 -0
  38. package/dist/5164.js +2 -0
  39. package/dist/{5973.js → 5365.js} +2 -2
  40. package/dist/5540.js +2 -0
  41. package/dist/5756.js +2 -0
  42. package/dist/6393.js +2 -0
  43. package/dist/6682.js +2 -0
  44. package/dist/6781.js +2 -0
  45. package/dist/{6284.js → 7100.js} +2 -2
  46. package/dist/7245.js +2 -0
  47. package/dist/7263.js +2 -0
  48. package/dist/7512.js +2 -0
  49. package/dist/7856.js +2 -0
  50. package/dist/7909.js +2 -0
  51. package/dist/{4178.js → 8002.js} +2 -2
  52. package/dist/{2381.js → 8189.js} +2 -2
  53. package/dist/8264.js +2 -0
  54. package/dist/8384.js +2 -0
  55. package/dist/8389.js +2 -0
  56. package/dist/{1443.js → 8515.js} +2 -2
  57. package/dist/{2221.js → 8557.js} +2 -2
  58. package/dist/8588.js +2 -0
  59. package/dist/8724.js +2 -0
  60. package/dist/882.js +2 -0
  61. package/dist/8823.js +2 -0
  62. package/dist/8890.js +2 -0
  63. package/dist/8921.js +2 -0
  64. package/dist/895.js +2 -0
  65. package/dist/8993.js +2 -0
  66. package/dist/902.js +2 -0
  67. package/dist/9175.js +2 -0
  68. package/dist/9202.js +2 -0
  69. package/dist/9833.js +2 -0
  70. package/dist/9961.js +2 -0
  71. package/dist/main.js +1 -1
  72. package/dist/main.js.LICENSE.txt +2 -2
  73. package/package.json +12 -12
  74. package/src/components/FormWrap.tsx +2 -5
  75. package/src/components/button/basic.tsx +2 -3
  76. package/src/components/input-password/show-password.tsx +3 -41
  77. package/src/components/input-text/routes.ts +0 -2
  78. package/src/components/types.tsx +0 -17
  79. package/src/scenarios/focus-elements.tsx +140 -0
  80. package/src/scenarios/inputs-get-value.tsx +2 -1
  81. package/src/scenarios/routes.ts +2 -0
  82. package/dist/1016.js +0 -2
  83. package/dist/121.js +0 -2
  84. package/dist/149.js +0 -2
  85. package/dist/1524.js +0 -2
  86. package/dist/2072.js +0 -2
  87. package/dist/2252.js +0 -2
  88. package/dist/2416.js +0 -2
  89. package/dist/2545.js +0 -2
  90. package/dist/2615.js +0 -2
  91. package/dist/263.js +0 -2
  92. package/dist/2639.js +0 -2
  93. package/dist/2657.js +0 -2
  94. package/dist/2669.js +0 -2
  95. package/dist/277.js +0 -2
  96. package/dist/2879.js +0 -2
  97. package/dist/3110.js +0 -2
  98. package/dist/3261.js +0 -2
  99. package/dist/3353.js +0 -2
  100. package/dist/3563.js +0 -2
  101. package/dist/3869.js +0 -2
  102. package/dist/4082.js +0 -2
  103. package/dist/4177.js +0 -2
  104. package/dist/4179.js +0 -2
  105. package/dist/4212.js +0 -2
  106. package/dist/4346.js +0 -2
  107. package/dist/4723.js +0 -2
  108. package/dist/4893.js +0 -2
  109. package/dist/5018.js +0 -2
  110. package/dist/5157.js +0 -2
  111. package/dist/5244.js +0 -2
  112. package/dist/5350.js +0 -2
  113. package/dist/5599.js +0 -2
  114. package/dist/5716.js +0 -2
  115. package/dist/605.js +0 -2
  116. package/dist/6295.js +0 -2
  117. package/dist/6402.js +0 -2
  118. package/dist/6596.js +0 -2
  119. package/dist/6636.js +0 -2
  120. package/dist/7132.js +0 -2
  121. package/dist/7219.js +0 -2
  122. package/dist/7305.js +0 -2
  123. package/dist/7367.js +0 -2
  124. package/dist/7372.js +0 -2
  125. package/dist/7533.js +0 -2
  126. package/dist/7677.js +0 -2
  127. package/dist/8310.js +0 -2
  128. package/dist/8642.js +0 -2
  129. package/dist/8797.js +0 -2
  130. package/dist/8804.js +0 -2
  131. package/dist/8809.js +0 -2
  132. package/dist/8928.js +0 -2
  133. package/dist/8928.js.LICENSE.txt +0 -3
  134. package/dist/9031.js.LICENSE.txt +0 -3
  135. package/dist/9116.js +0 -2
  136. package/dist/9116.js.LICENSE.txt +0 -3
  137. package/dist/9344.js +0 -2
  138. package/dist/9344.js.LICENSE.txt +0 -3
  139. package/dist/9673.js +0 -2
  140. package/dist/9673.js.LICENSE.txt +0 -3
  141. package/dist/9730.js +0 -2
  142. package/dist/9730.js.LICENSE.txt +0 -3
  143. package/src/components/FocusInput.tsx +0 -23
  144. package/src/components/input-text/focus.tsx +0 -33
  145. /package/dist/{1016.js.LICENSE.txt → 1069.js.LICENSE.txt} +0 -0
  146. /package/dist/{121.js.LICENSE.txt → 1085.js.LICENSE.txt} +0 -0
  147. /package/dist/{1443.js.LICENSE.txt → 1184.js.LICENSE.txt} +0 -0
  148. /package/dist/{149.js.LICENSE.txt → 1204.js.LICENSE.txt} +0 -0
  149. /package/dist/{1524.js.LICENSE.txt → 1222.js.LICENSE.txt} +0 -0
  150. /package/dist/{2072.js.LICENSE.txt → 1325.js.LICENSE.txt} +0 -0
  151. /package/dist/{2221.js.LICENSE.txt → 1333.js.LICENSE.txt} +0 -0
  152. /package/dist/{2252.js.LICENSE.txt → 1661.js.LICENSE.txt} +0 -0
  153. /package/dist/{2256.js.LICENSE.txt → 1703.js.LICENSE.txt} +0 -0
  154. /package/dist/{2381.js.LICENSE.txt → 1711.js.LICENSE.txt} +0 -0
  155. /package/dist/{2416.js.LICENSE.txt → 1792.js.LICENSE.txt} +0 -0
  156. /package/dist/{2545.js.LICENSE.txt → 1793.js.LICENSE.txt} +0 -0
  157. /package/dist/{2615.js.LICENSE.txt → 1878.js.LICENSE.txt} +0 -0
  158. /package/dist/{263.js.LICENSE.txt → 1957.js.LICENSE.txt} +0 -0
  159. /package/dist/{2639.js.LICENSE.txt → 2305.js.LICENSE.txt} +0 -0
  160. /package/dist/{2657.js.LICENSE.txt → 2471.js.LICENSE.txt} +0 -0
  161. /package/dist/{2669.js.LICENSE.txt → 2538.js.LICENSE.txt} +0 -0
  162. /package/dist/{277.js.LICENSE.txt → 279.js.LICENSE.txt} +0 -0
  163. /package/dist/{2858.js.LICENSE.txt → 2830.js.LICENSE.txt} +0 -0
  164. /package/dist/{2879.js.LICENSE.txt → 3180.js.LICENSE.txt} +0 -0
  165. /package/dist/{3110.js.LICENSE.txt → 3332.js.LICENSE.txt} +0 -0
  166. /package/dist/{3261.js.LICENSE.txt → 3454.js.LICENSE.txt} +0 -0
  167. /package/dist/{3353.js.LICENSE.txt → 3596.js.LICENSE.txt} +0 -0
  168. /package/dist/{3510.js.LICENSE.txt → 3714.js.LICENSE.txt} +0 -0
  169. /package/dist/{3563.js.LICENSE.txt → 3797.js.LICENSE.txt} +0 -0
  170. /package/dist/{3869.js.LICENSE.txt → 3974.js.LICENSE.txt} +0 -0
  171. /package/dist/{4082.js.LICENSE.txt → 3990.js.LICENSE.txt} +0 -0
  172. /package/dist/{4156.js.LICENSE.txt → 4102.js.LICENSE.txt} +0 -0
  173. /package/dist/{4177.js.LICENSE.txt → 4218.js.LICENSE.txt} +0 -0
  174. /package/dist/{4178.js.LICENSE.txt → 4303.js.LICENSE.txt} +0 -0
  175. /package/dist/{4179.js.LICENSE.txt → 4404.js.LICENSE.txt} +0 -0
  176. /package/dist/{4212.js.LICENSE.txt → 453.js.LICENSE.txt} +0 -0
  177. /package/dist/{4318.js.LICENSE.txt → 4941.js.LICENSE.txt} +0 -0
  178. /package/dist/{4346.js.LICENSE.txt → 500.js.LICENSE.txt} +0 -0
  179. /package/dist/{4486.js.LICENSE.txt → 5139.js.LICENSE.txt} +0 -0
  180. /package/dist/{4702.js.LICENSE.txt → 5164.js.LICENSE.txt} +0 -0
  181. /package/dist/{4723.js.LICENSE.txt → 5365.js.LICENSE.txt} +0 -0
  182. /package/dist/{4893.js.LICENSE.txt → 5540.js.LICENSE.txt} +0 -0
  183. /package/dist/{5018.js.LICENSE.txt → 5756.js.LICENSE.txt} +0 -0
  184. /package/dist/{5157.js.LICENSE.txt → 6393.js.LICENSE.txt} +0 -0
  185. /package/dist/{5244.js.LICENSE.txt → 6682.js.LICENSE.txt} +0 -0
  186. /package/dist/{5350.js.LICENSE.txt → 6781.js.LICENSE.txt} +0 -0
  187. /package/dist/{5599.js.LICENSE.txt → 7100.js.LICENSE.txt} +0 -0
  188. /package/dist/{5670.js.LICENSE.txt → 7245.js.LICENSE.txt} +0 -0
  189. /package/dist/{5716.js.LICENSE.txt → 7263.js.LICENSE.txt} +0 -0
  190. /package/dist/{5973.js.LICENSE.txt → 7512.js.LICENSE.txt} +0 -0
  191. /package/dist/{605.js.LICENSE.txt → 7856.js.LICENSE.txt} +0 -0
  192. /package/dist/{6284.js.LICENSE.txt → 7909.js.LICENSE.txt} +0 -0
  193. /package/dist/{6295.js.LICENSE.txt → 8002.js.LICENSE.txt} +0 -0
  194. /package/dist/{6402.js.LICENSE.txt → 8189.js.LICENSE.txt} +0 -0
  195. /package/dist/{6596.js.LICENSE.txt → 8264.js.LICENSE.txt} +0 -0
  196. /package/dist/{6629.js.LICENSE.txt → 8384.js.LICENSE.txt} +0 -0
  197. /package/dist/{6636.js.LICENSE.txt → 8389.js.LICENSE.txt} +0 -0
  198. /package/dist/{6716.js.LICENSE.txt → 8515.js.LICENSE.txt} +0 -0
  199. /package/dist/{7055.js.LICENSE.txt → 8557.js.LICENSE.txt} +0 -0
  200. /package/dist/{7132.js.LICENSE.txt → 8588.js.LICENSE.txt} +0 -0
  201. /package/dist/{7219.js.LICENSE.txt → 8724.js.LICENSE.txt} +0 -0
  202. /package/dist/{7305.js.LICENSE.txt → 882.js.LICENSE.txt} +0 -0
  203. /package/dist/{7367.js.LICENSE.txt → 8823.js.LICENSE.txt} +0 -0
  204. /package/dist/{7372.js.LICENSE.txt → 8890.js.LICENSE.txt} +0 -0
  205. /package/dist/{7533.js.LICENSE.txt → 8921.js.LICENSE.txt} +0 -0
  206. /package/dist/{7677.js.LICENSE.txt → 895.js.LICENSE.txt} +0 -0
  207. /package/dist/{8310.js.LICENSE.txt → 8993.js.LICENSE.txt} +0 -0
  208. /package/dist/{8516.js.LICENSE.txt → 902.js.LICENSE.txt} +0 -0
  209. /package/dist/{8642.js.LICENSE.txt → 9175.js.LICENSE.txt} +0 -0
  210. /package/dist/{8797.js.LICENSE.txt → 9202.js.LICENSE.txt} +0 -0
  211. /package/dist/{8804.js.LICENSE.txt → 9833.js.LICENSE.txt} +0 -0
  212. /package/dist/{8809.js.LICENSE.txt → 9961.js.LICENSE.txt} +0 -0
@@ -33,7 +33,7 @@
33
33
  */
34
34
 
35
35
  /**
36
- * @remix-run/router v1.16.1
36
+ * @remix-run/router v1.17.0
37
37
  *
38
38
  * Copyright (c) Remix Software Inc.
39
39
  *
@@ -44,7 +44,7 @@
44
44
  */
45
45
 
46
46
  /**
47
- * React Router v6.23.1
47
+ * React Router v6.24.0
48
48
  *
49
49
  * Copyright (c) Remix Software Inc.
50
50
  *
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@public-ui/sample-react",
3
- "version": "2.1.2",
3
+ "version": "2.1.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.53",
8
- "@leanup/stack-react": "1.3.53",
9
- "@leanup/stack-webpack": "1.3.53",
7
+ "@leanup/stack": "1.3.54",
8
+ "@leanup/stack-react": "1.3.54",
9
+ "@leanup/stack-webpack": "1.3.54",
10
10
  "@types/node": "ts5.4",
11
11
  "@types/react": "18.3.3",
12
12
  "@types/react-dom": "18.3.0",
@@ -15,23 +15,23 @@
15
15
  "ajv": "8.16.0",
16
16
  "chromedriver": "124.0.4",
17
17
  "cpy-cli": "5.0.0",
18
- "eslint-plugin-jsx-a11y": "6.8.0",
19
- "eslint-plugin-react": "7.34.2",
18
+ "eslint-plugin-jsx-a11y": "6.9.0",
19
+ "eslint-plugin-react": "7.34.3",
20
20
  "formik": "2.4.6",
21
21
  "nightwatch-axe-verbose": "2.3.1",
22
22
  "npm-run-all": "4.1.5",
23
23
  "react": "18.3.1",
24
24
  "react-dom": "18.3.1",
25
- "react-router": "6.23.1",
26
- "react-router-dom": "6.23.1",
25
+ "react-router": "6.24.0",
26
+ "react-router-dom": "6.24.0",
27
27
  "rimraf": "5.0.7",
28
28
  "ts-prune": "0.10.3",
29
- "typescript": "5.4.5",
29
+ "typescript": "5.5.2",
30
30
  "world_countries_lists": "2.9.0",
31
31
  "yup": "1.4.0",
32
- "@public-ui/components": "2.1.2",
33
- "@public-ui/themes": "2.1.2",
34
- "@public-ui/react": "2.1.2"
32
+ "@public-ui/react": "2.1.3",
33
+ "@public-ui/components": "2.1.3",
34
+ "@public-ui/themes": "2.1.3"
35
35
  },
36
36
  "files": [
37
37
  ".eslintignore",
@@ -1,10 +1,7 @@
1
+ import type { FC } from 'react';
1
2
  import React from 'react';
2
3
 
3
4
  import { KolButton, KolForm } from '@public-ui/react';
4
-
5
- import { FocusElement } from './FocusInput';
6
-
7
- import type { FC } from 'react';
8
5
  import type { RefFormComponent } from './types';
9
6
 
10
7
  type FormWrapProps = {
@@ -14,7 +11,7 @@ type FormWrapProps = {
14
11
  export const FormWrap: FC<FormWrapProps> = (props) => (
15
12
  <KolForm>
16
13
  <div className="grid gap-4">
17
- <FocusElement {...props} />
14
+ <props.RefComponent {...props} />
18
15
  <div className="flex gap-4">
19
16
  <KolButton _label="Submit" _icons="codicon codicon-arrow-right" _type="submit" _variant="primary" />
20
17
  <KolButton
@@ -1,7 +1,5 @@
1
1
  import type { FC } from 'react';
2
2
  import React from 'react';
3
-
4
- import { FocusElement } from '../FocusInput';
5
3
  import { ButtonVariants } from './partials/variants';
6
4
  import { SampleDescription } from '../SampleDescription';
7
5
 
@@ -10,6 +8,7 @@ export const ButtonBasic: FC = () => (
10
8
  <SampleDescription>
11
9
  <p>Hier sind anklickbare und nicht anklickbare Buttons. Es gibt außerdem Buttons mit Label und ohne Label.</p>
12
10
  </SampleDescription>
13
- <FocusElement RefComponent={ButtonVariants} />
11
+
12
+ <ButtonVariants />
14
13
  </>
15
14
  );
@@ -1,21 +1,11 @@
1
1
  import type { FC } from 'react';
2
- import React, { useEffect, useRef, useState } from 'react';
2
+ import React, { useRef } from 'react';
3
3
 
4
4
  import { KolForm, KolInputPassword } from '@public-ui/react';
5
5
  import { SampleDescription } from '../SampleDescription';
6
6
 
7
7
  export const InputPasswordShowPassword: FC = () => {
8
- const [isPasswordVisible, setIsPasswordVisible] = useState(false);
9
8
  const passwordRef = useRef<HTMLKolInputPasswordElement>(null);
10
- const handleTogglePasswordClick = () => {
11
- setIsPasswordVisible(!isPasswordVisible);
12
- };
13
- useEffect(() => {
14
- const input = passwordRef.current?.shadowRoot?.querySelector('input');
15
- if (input) {
16
- input.type = isPasswordVisible ? 'text' : 'password';
17
- }
18
- }, [isPasswordVisible]);
19
9
 
20
10
  return (
21
11
  <>
@@ -26,42 +16,14 @@ export const InputPasswordShowPassword: FC = () => {
26
16
  </p>
27
17
  </SampleDescription>
28
18
  <KolForm>
29
- <KolInputPassword
30
- _placeholder="Mit 'Passwort anzeigen' Button"
31
- _label="Passwort"
32
- ref={passwordRef}
33
- _smartButton={{
34
- _icons: {
35
- left: {
36
- icon: 'codicon codicon-eye',
37
- },
38
- },
39
- _hideLabel: true,
40
- _label: `Passwort ${isPasswordVisible ? 'ausblenden' : 'einblenden'}`,
41
- _on: {
42
- onClick: handleTogglePasswordClick,
43
- },
44
- }}
45
- className="block"
46
- />
19
+ <KolInputPassword _placeholder="Mit 'Passwort anzeigen' Button" _label="Passwort" ref={passwordRef} className="block" _variant="visibility-toggle" />
47
20
  <KolInputPassword
48
21
  _placeholder="Mit 'Passwort anzeigen' Button und disabled"
49
22
  _label="Passwort"
50
23
  ref={passwordRef}
51
- _smartButton={{
52
- _icons: {
53
- left: {
54
- icon: 'codicon codicon-eye',
55
- },
56
- },
57
- _hideLabel: true,
58
- _label: `Passwort ${isPasswordVisible ? 'ausblenden' : 'einblenden'}`,
59
- _on: {
60
- onClick: handleTogglePasswordClick,
61
- },
62
- }}
63
24
  className="block"
64
25
  _disabled
26
+ _variant="visibility-toggle"
65
27
  />
66
28
  </KolForm>
67
29
  </>
@@ -1,14 +1,12 @@
1
1
  import { Routes } from '../../shares/types';
2
2
  import { InputTextBasic } from './basic';
3
3
  import { InputTextBlur } from './blur';
4
- import { InputTextFocus } from './focus';
5
4
  import { InputTextHideErrors } from './hide-errors';
6
5
 
7
6
  export const INPUT_TEXT_ROUTES: Routes = {
8
7
  'input-text': {
9
8
  basic: InputTextBasic,
10
9
  blur: InputTextBlur,
11
- focus: InputTextFocus,
12
10
  'hide-errors': InputTextHideErrors,
13
11
  },
14
12
  };
@@ -1,6 +1,3 @@
1
- import { FormWrap } from './FormWrap';
2
-
3
- import type { ButtonVariants } from './button/partials/variants';
4
1
  import type { InputCheckboxVariants } from './input-checkbox/partials/variants';
5
2
  import type { InputColorVariants } from './input-color/partials/variants';
6
3
  import type { InputDateVariants } from './input-date/partials/variants';
@@ -27,17 +24,3 @@ export type RefFormComponent =
27
24
  | typeof InputTextVariants
28
25
  | typeof SelectVariants
29
26
  | typeof TextareaVariants;
30
-
31
- export type RefComponent =
32
- // | typeof AbbrVariants
33
- // | typeof AccordionVariants
34
- // | typeof AlertVariants
35
- | typeof ButtonVariants
36
- // | typeof ButtonLinkVariants
37
- // | typeof CardVariants
38
- // | typeof LinkVariants
39
- // | typeof LinkButtonVariants
40
- // | typeof PopoverVariants
41
- // | typeof SplitButtonVariants
42
- // | typeof TabsVariants
43
- | RefFormComponent;
@@ -0,0 +1,140 @@
1
+ import {
2
+ KolAccordion,
3
+ KolAlert,
4
+ KolButton,
5
+ KolButtonLink,
6
+ KolDetails,
7
+ KolInputCheckbox,
8
+ KolInputColor,
9
+ KolInputDate,
10
+ KolInputEmail,
11
+ KolInputFile,
12
+ KolInputNumber,
13
+ KolInputPassword,
14
+ KolInputRadio,
15
+ KolInputRange,
16
+ KolInputText,
17
+ KolLink,
18
+ KolLinkButton,
19
+ KolSelect,
20
+ KolTextarea,
21
+ } from '@public-ui/react';
22
+ import type { FC, ForwardRefRenderFunction } from 'react';
23
+ import { useMemo } from 'react';
24
+ import React, { forwardRef, useLayoutEffect, useRef } from 'react';
25
+ import { useSearchParams } from 'react-router-dom';
26
+
27
+ const getFocusElements = () => {
28
+ const focusElements = new Map<string, ForwardRefRenderFunction<any, any>>();
29
+ focusElements.set('inputCheckbox', (_, ref) => <KolInputCheckbox _name="checkbox" _label="Checkbox" ref={ref} />);
30
+ focusElements.set('inputColor', (_, ref) => <KolInputColor _name="color" _label="Color" ref={ref} />);
31
+ focusElements.set('inputDate', (_, ref) => <KolInputDate _name="date" _label="Date" ref={ref} />);
32
+ focusElements.set('inputEmail', (_, ref) => <KolInputEmail _name="email" _label="Email" ref={ref} />);
33
+ focusElements.set('inputFile', (_, ref) => <KolInputFile _name="file" _label="File" ref={ref} />);
34
+ focusElements.set('inputFileMultiple', (_, ref) => <KolInputFile _name="file" _label="Files (multiple)" _multiple ref={ref} />);
35
+ focusElements.set('inputNumber', (_, ref) => <KolInputNumber _name="number" _label="Number" ref={ref} />);
36
+ focusElements.set('inputPassword', (_, ref) => <KolInputPassword _name="password" _label="Password" ref={ref} />);
37
+ focusElements.set('inputRadio', (_, ref) => (
38
+ <KolInputRadio
39
+ _name="radio"
40
+ _label="Radio"
41
+ _options={[
42
+ { label: 'Option A', value: 'A' },
43
+ { label: 'Option B', value: 'B' },
44
+ ]}
45
+ _value="A"
46
+ ref={ref}
47
+ />
48
+ ));
49
+ focusElements.set('inputRange', (_, ref) => <KolInputRange _name="range" _label="Range" ref={ref} />);
50
+ focusElements.set('inputText', (_, ref) => <KolInputText _name="text" _label="Text" ref={ref} />);
51
+ focusElements.set('select', (_, ref) => (
52
+ <KolSelect
53
+ _name="select"
54
+ _label="Select"
55
+ _options={[
56
+ { label: 'Option A', value: 'A' },
57
+ { label: 'Option B', value: 'B' },
58
+ ]}
59
+ ref={ref}
60
+ />
61
+ ));
62
+ focusElements.set('selectMultiple', (_, ref) => (
63
+ <KolSelect
64
+ _name="select"
65
+ _label="Select (multiple)"
66
+ _multiple
67
+ _options={[
68
+ { label: 'Option A', value: 'A' },
69
+ { label: 'Option B', value: 'B' },
70
+ ]}
71
+ _rows={2}
72
+ ref={ref}
73
+ />
74
+ ));
75
+ focusElements.set('textarea', (_, ref) => <KolTextarea _name="textarea" _label="Textarea" _rows={5} ref={ref} />);
76
+ focusElements.set('accordion', (_, ref) => <KolAccordion _label="Accordion here" ref={ref} />);
77
+ focusElements.set('button', (_, ref) => <KolButton _label="Button here" ref={ref}></KolButton>);
78
+ focusElements.set('buttonLink', (_, ref) => <KolButtonLink _label="ButtonLink here" ref={ref}></KolButtonLink>);
79
+ focusElements.set('details', (_, ref) => (
80
+ <KolDetails _label="Details here" ref={ref}>
81
+ detailed details
82
+ </KolDetails>
83
+ ));
84
+ focusElements.set('link', (_, ref) => <KolLink _label="Link here" _href="#" ref={ref}></KolLink>);
85
+ focusElements.set('linkButton', (_, ref) => <KolLinkButton _label="LinkButton here" _href="#" ref={ref}></KolLinkButton>);
86
+
87
+ return focusElements;
88
+ };
89
+
90
+ type FallbackProps = {
91
+ invalidComponent?: boolean;
92
+ };
93
+ const Fallback = (props: FallbackProps) => {
94
+ const focusElements = useMemo(() => getFocusElements(), []);
95
+ const componentNames = [...focusElements.keys()].map((key) => key);
96
+
97
+ return (
98
+ <div>
99
+ {props.invalidComponent && (
100
+ <KolAlert _type="error" _variant="card">
101
+ Component not found.
102
+ </KolAlert>
103
+ )}
104
+
105
+ <h4>Focus Test Cases</h4>
106
+ <ul>
107
+ {componentNames.map((componentName) => (
108
+ <li key={componentName}>
109
+ <KolLink _label={componentName} _href={`#/scenarios/focus-elements?component=${componentName}`}></KolLink>
110
+ </li>
111
+ ))}
112
+ </ul>
113
+ </div>
114
+ );
115
+ };
116
+
117
+ export const FocusElements: FC = () => {
118
+ const ref = useRef(null);
119
+ const focusElements = useMemo(() => getFocusElements(), []);
120
+ const [searchParams] = useSearchParams();
121
+ const componentName = searchParams.get('component');
122
+
123
+ useLayoutEffect(() => {
124
+ setTimeout(() => {
125
+ (ref.current as unknown as HTMLElement)?.focus();
126
+ }, 500);
127
+ }, [ref]);
128
+
129
+ if (componentName) {
130
+ const Component = focusElements.get(componentName);
131
+ if (!Component) {
132
+ return <Fallback invalidComponent />;
133
+ }
134
+ const Element = forwardRef(Component);
135
+
136
+ return <Element ref={ref} />;
137
+ } else {
138
+ return <Fallback />;
139
+ }
140
+ };
@@ -105,7 +105,8 @@ export const InputsGetValue: FC = () => {
105
105
 
106
106
  <div className="grid gap-4">
107
107
  <Scenario InputComponent={KolInputText} inputProps={{ _label: 'InputText' }} />
108
- <Scenario InputComponent={KolInputCheckbox} inputProps={{ _label: 'KolInputCheckbox' }} />
108
+ <Scenario InputComponent={KolInputCheckbox} inputProps={{ _label: 'KolInputCheckbox (value)', _value: 'Checkbox True Value' }} />
109
+ <Scenario InputComponent={KolInputCheckbox} inputProps={{ _label: 'KolInputCheckbox (boolean)' }} />
109
110
  <Scenario InputComponent={KolInputColor} inputProps={{ _label: 'KolInputColor' }} />
110
111
  <Scenario InputComponent={KolInputDate} inputProps={{ _label: 'KolInputDate' }} />
111
112
  <Scenario InputComponent={KolInputEmail} inputProps={{ _label: 'KolInputEmail' }} />
@@ -4,6 +4,7 @@ import { CustomTooltipWidth } from './custom-tooltip-width';
4
4
  import { DisabledInteractiveElements } from './disabled-interactive-elements';
5
5
  import { InputsGetValue } from './inputs-get-value';
6
6
  import { StaticForm } from './static-form';
7
+ import { FocusElements } from './focus-elements';
7
8
 
8
9
  export const SCENARIO_ROUTES: Routes = {
9
10
  scenarios: {
@@ -12,5 +13,6 @@ export const SCENARIO_ROUTES: Routes = {
12
13
  'custom-tooltip-width': CustomTooltipWidth,
13
14
  'static-form': StaticForm,
14
15
  'disabled-interactive-scenario': DisabledInteractiveElements,
16
+ 'focus-elements': FocusElements,
15
17
  },
16
18
  };
package/dist/1016.js DELETED
@@ -1,2 +0,0 @@
1
- /*! For license information please see 1016.js.LICENSE.txt */
2
- "use strict";(self.webpackChunk_public_ui_sample_react=self.webpackChunk_public_ui_sample_react||[]).push([[1016],{8426:(e,t,r)=>{r.d(t,{t:()=>o});var i=r(7394),s=r(2466);let o=(e,t)=>{var r;return(null!==(r=(0,i.g)())&&void 0!==r?r:(0,i.i)("de")).translate(e,t)};"test"===s.p&&(o=e=>e)},1016:(e,t,r)=>{r.r(t),r.d(t,{kol_form:()=>n});var i=r(3685),s=r(8426),o=r(1301),a=r(121);const n=class{constructor(e){(0,i.r)(this,e),this.onSubmit=e=>{var t,r;e.preventDefault(),e.stopPropagation(),"function"==typeof(null===(t=this.state._on)||void 0===t?void 0:t.onSubmit)&&(null===(r=this.state._on)||void 0===r||r.onSubmit(e))},this.onReset=e=>{var t,r;e.preventDefault(),e.stopPropagation(),"function"==typeof(null===(t=this.state._on)||void 0===t?void 0:t.onReset)&&(null===(r=this.state._on)||void 0===r||r.onReset(e))},this.handleLinkClick=e=>{var t;const r=null===(t=e.target)||void 0===t?void 0:t.href;if(r){const e=new URL(r),t=document.querySelector(e.hash);t&&"function"==typeof t.focus&&(t.scrollIntoView({behavior:"smooth"}),t.focus())}},this._on=void 0,this._requiredText=!0,this._errorList=void 0,this.state={}}render(){return(0,i.h)(i.H,{key:"c2f978944c0da89b0c1f721e48e62c20897c6e84",class:"kol-form"},this._errorList&&this._errorList.length>0&&(0,i.h)(o.k,{key:"89cc664c87a2aa777ff084d447f16cebf36d33ae",_type:"error"},(0,s.t)("kol-error-list-message"),(0,i.h)("nav",{key:"1720c956e40dd31ebbc4e97aef78f8e1f8c204ae","aria-label":(0,s.t)("kol-error-list")},(0,i.h)("ul",{key:"f99ca1869fdc217c7ebca978c2f92bf1467e19a7"},this._errorList.map(((e,t)=>(0,i.h)("li",{key:t},(0,i.h)(o.h,{_href:e.selector,_label:e.message,_on:{onClick:this.handleLinkClick},ref:e=>{0===t&&(this.errorListElement=e)}}))))))),(0,i.h)("form",{key:"9076849c5f027e66ca37da072ac15271b19ae464",method:"post",onSubmit:this.onSubmit,onReset:this.onReset,autoComplete:"off",noValidate:!0},!0===this.state._requiredText?(0,i.h)("p",null,(0,i.h)(o.j,null,(0,s.t)("kol-form-description"))):"string"==typeof this.state._requiredText&&this.state._requiredText.length>0?(0,i.h)("p",null,(0,i.h)(o.j,null,this.state._requiredText)):null,(0,i.h)("slot",{key:"c94ae6cfb941c2a73196cb77361fb74bcaff9d0f"})))}focusErrorList(){return e=this,t=function*(){return setTimeout((()=>{var e;this._errorList&&this._errorList.length>0&&(null===(e=this.errorListElement)||void 0===e||e.focus())}),300),Promise.resolve()},new Promise(((r,i)=>{var s=e=>{try{a(t.next(e))}catch(e){i(e)}},o=e=>{try{a(t.throw(e))}catch(e){i(e)}},a=e=>e.done?r(e.value):Promise.resolve(e.value).then(s,o);a((t=t.apply(e,null)).next())}));var e,t}validateOn(e){"object"==typeof e&&null!==e&&(this.state=Object.assign(Object.assign({},this.state),{_on:e}))}validateRequiredText(e){"boolean"==typeof e?(0,a.b)(this,"_requiredText",e):(0,a.i)(this,"_requiredText",e)}validateErrorList(e){((e,t)=>{(0,a.w)(e,"errorList",(e=>"object"==typeof e),new Set(["Object"]),t)})(this,e)}componentWillLoad(){this.validateOn(this._on),this.validateRequiredText(this._requiredText),this.validateErrorList(this._errorList)}static get watchers(){return{_on:["validateOn"],_requiredText:["validateRequiredText"],_errorList:["validateErrorList"]}}}}}]);
package/dist/121.js DELETED
@@ -1,2 +0,0 @@
1
- /*! For license information please see 121.js.LICENSE.txt */
2
- "use strict";(self.webpackChunk_public_ui_sample_react=self.webpackChunk_public_ui_sample_react||[]).push([[121],{121:(e,t,r)=>{r.d(t,{A:()=>ce,B:()=>ne,C:()=>se,D:()=>Q,K:()=>de,a:()=>i,b:()=>B,c:()=>b,d:()=>A,e:()=>v,f:()=>h,g:()=>U,h:()=>m,i:()=>K,j:()=>u,k:()=>F,l:()=>d,m:()=>G,n:()=>c,o:()=>T,p:()=>ee,q:()=>R,r:()=>H,s:()=>J,t:()=>z,u:()=>p,v:()=>oe,w:()=>I,x:()=>te,y:()=>re,z:()=>ue});var o=r(8453),n=r(881);const a=new Set,i=(e,t)=>{(!1===a.has(e)||(null==t?void 0:t.force))&&(a.add(e),n.L.debug([e].concat((null==t?void 0:t.details)||[]),{classifier:"✋ a11y",forceLog:!!(null==t?void 0:t.force),overwriteStyle:"; background-color: #09f"}))},l=new Set,c=(e,t)=>{(!1===l.has(e)||(null==t?void 0:t.force))&&(l.add(e),n.L.warn([e].concat((null==t?void 0:t.details)||[]),{classifier:"🔥 deprecated",forceLog:!!(null==t?void 0:t.force),overwriteStyle:"; background-color: #f00"}))},s=new Set,u=(e,t)=>{(!1===s.has(e)||(null==t?void 0:t.force))&&(s.add(e),n.L.debug([e].concat((null==t?void 0:t.details)||[]),{classifier:"💻 dev",forceLog:!!(null==t?void 0:t.force),overwriteStyle:"; background-color: #f09"}))},d=(e,t)=>{(!1===s.has(e)||(null==t?void 0:t.force))&&(s.add(e),n.L.warn([e].concat((null==t?void 0:t.details)||[]),{classifier:"⚠️ dev",forceLog:!!(null==t?void 0:t.force),overwriteStyle:"; background-color: #f09"}))},f=new Set,h=(e,t=!1,r)=>{(!1===f.has(e)||(null==r?void 0:r.force))&&(f.add(e),e+=!0===t?" ✅":"",n.L.debug([e].concat((null==r?void 0:r.details)||[]),{classifier:"🌟 feature",forceLog:!!(null==r?void 0:r.force),overwriteStyle:"; background-color: #309"}))};u("Wir freuen uns über jedes Feedback, Kommentare, Screenshots oder Demo-Links von einer auf KoliBri-basierenden Anwendung (kolibri@itzbund.de). Vielen Dank!");const g=new Set,p=(e,t)=>{(!1===g.has(e)||(null==t?void 0:t.force))&&(g.add(e),n.L.debug([e].concat((null==t?void 0:t.details)||[]),{classifier:"📑 ui/ux",forceLog:!!(null==t?void 0:t.force),overwriteStyle:"; background-color: #060;"}))},b=()=>{i('"Disabled" schränkt die Zugänglichkeit und Sichtbarkeit ein. Wir empfehlen aus Sicht der Barrierefreiheit readonly- statt disabled-Attribut zu verwenden.\n- https://uxdesign.cc/is-it-ok-to-grey-out-disabled-buttons-8afa74a0fae')},v=e=>{"string"==typeof e&&""!==e||i("Manche Strukturelemente, wie bspw. der nav-Tag, können mehrfach in einer Webseite verwendet werden. Damit die gleichnamigen Strukturelemente voneinander unterschieden werden können, ist es erforderlich ein Aria-Label zu setzen.\n- https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/Navigation_Role#accessibility_concerns")},m=(e,t=8)=>{t>7&&p(`[${e}] Innerhalb von Navigationsstrukturen wird empfohlen nicht mehr als 7 Menüpunkte zu verwenden.\n\nLinks:\n- https://de.ryte.com/wiki/Millersche_Zahl\n- https://de.wikipedia.org/wiki/Millersche_Zahl`)};var y=.2126,w=.7152,S=.0722,k=1/12.92;function x(e){return Math.pow((e+.055)/1.055,2.4)}function N(e){var t=e[0]/255,r=e[1]/255,o=e[2]/255,n=t<=.03928?t*k:x(t),a=r<=.03928?r*k:x(r),i=o<=.03928?o*k:x(o);return n*y+a*w+i*S}function L(e){var t=255;8===(e=e.replace(/^#/,"")).length&&(t=parseInt(e.slice(6,8),16),e=e.substring(0,6)),4===e.length&&(t=parseInt(e.slice(3,4).repeat(2),16),e=e.substring(0,3)),3===e.length&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);var r=parseInt(e,16);return[r>>16,r>>8&255,255&r,t]}function A(e,t){return function(e,t){return function(e,t){return(Math.max(e,t)+.05)/(Math.min(e,t)+.05)}(N(e),N(t))}(L(e),L(t))}var M={exports:{}};function O(e){var t=C(e);return 3==t.length?t.concat(255):(t[3]=Math.round(t[3]),t)}function C(e){return"string"==typeof e?("red"==(t=e=e.toLowerCase())?[255,0,0]:"green"==t?[0,255,0]:"blue"==t?[0,0,255]:"black"==t?[0,0,0]:"white"==t?[255,255,255]:"cyan"==t?[0,255,255]:"gray"==t||"grey"==t?[128,128,128]:"magenta"==t||"pink"==t?[255,0,255]:"yellow"==t?[255,255,0]:void 0)||function(e){var t=e.replace(/^#/,""),r=t.length;if(3==r||4==r){var o=j(t[0]),n=j(t[1]),a=j(t[2]),i=3==r?255:j(t[3]);if(isNaN(o)||isNaN(n)||isNaN(a)||isNaN(i))return;return[o,n,a,i]}}(e)||function(e){var t=e.replace(/^#/,""),r=t.length;if(6==r||8==r){var o=j(t.slice(0,2)),n=j(t.slice(2,4)),a=j(t.slice(4,6)),i=6==r?255:j(t.slice(6,8));if(isNaN(o)||isNaN(n)||isNaN(a)||isNaN(i))return;return[o,n,a,i]}}(e)||function(e){if("rgb("==e.substr(0,4)){var t=(e=e.match(/^rgb\(([^)]+)\)/)[1]).split(/ *, */).map(Number),r=D(t[0],!0),o=D(t[1],!0),n=D(t[2],!0);if(-1!=r&&-1!=o&&-1!=n)return[r,o,n,255]}}(e)||function(e){if("rgba("==e.substr(0,5)){var t=(e=e.match(/^rgba\(([^)]+)\)/)[1]).split(/ *, */).map(Number),r=D(t[0],!0),o=D(t[1],!0),n=D(t[2],!0),a=D(255*t[3]);if(-1!=r&&-1!=o&&-1!=n&&-1!=a)return[r,o,n,a]}}(e)||[0,0,0,255]:function(e){if("[object Object]"===Object.prototype.toString.call(e)&&Object.getPrototypeOf(e)===Object.getPrototypeOf({})){var t=D(null!=e.r?e.r:null!=e.red?e.red:0,!0),r=D(null!=e.g?e.g:null!=e.green?e.green:0,!0),o=D(null!=e.b?e.b:null!=e.blue?e.blue:0,!0),n=D(null!=e.a?e.a:null!=e.alpha?e.alpha:255,!0);if(-1!=t&&-1!=r&&-1!=o&&-1!=n)return[t,r,o,n]}}(e)||function(e){if(Array.isArray(e)&&(3==e.length||4==e.length)){var t=D(e[0],!0),r=D(e[1],!0),o=D(e[2],!0),n=D(null!=e[3]?e[3]:255,!0);if(-1!=t&&-1!=r&&-1!=o&&-1!=n)return[t,r,o,n]}}(e)||function(e){if("number"==typeof e&&Math.floor(e)==e&&e<=4294967295&&e>=0)return[e>>16&255,e>>8&255,255&e,e>>24&255]}(e)||[0,0,0,255];var t}function E(e){var t=e.toString(16);return 1==t.length?"0"+t:t}function j(e){return 1==e.length?parseInt(e+e,16):parseInt(e,16)}function D(e,t){return"number"!=typeof e||!0===t&&Math.floor(e)!==e?-1:e>=0&&e<=255?e:-1}M.exports=O,M.exports.arr=O,M.exports.obj=function(e){var t=C(e);return{r:t[0],g:t[1],b:t[2],a:3==t.length?255:Math.round(t[3])}},M.exports.css=function(e){var t=C(e);return 3==t.length&&t.push(255),255==t[3]?"rgb("+t[0]+", "+t[1]+", "+t[2]+")":0==t[3]?"rgba("+t[0]+", "+t[1]+", "+t[2]+", 0)":"rgba("+t[0]+", "+t[1]+", "+t[2]+", "+String(t[3]/255).substr(1)+")"},M.exports.hex=function(e){3==(a=C(e)).length&&a.push(255);var t=255==a[3],r=E(a[0]),o=E(a[1]),n=E(a[2]),a=E(Math.round(a[3])),i=function(e,t,r,o){var n=["ff","00","11","22","33","44","55","66","77","88","99","aa","bb","cc","dd","ee"];return-1!=n.indexOf(e)&&-1!=n.indexOf(t)&&-1!=n.indexOf(r)&&-1!=n.indexOf(o)}(r,o,n,a);return t?i?"#"+r.charAt(0)+o.charAt(0)+n.charAt(0):"#"+r+o+n:i?"#"+r.charAt(0)+o.charAt(0)+n.charAt(0)+a.charAt(0):"#"+r+o+n+a},M.exports.num=function(e){var t=C(e);return 3==t.length?t.push(255):t[3]=Math.round(t[3]),(t[3]<<24>>>0|t[0]<<16|t[1]<<8|t[2])>>>0};const H=M.exports,q=(e,t)=>{t.forEach((t=>{!1===e.has(t)&&e.add(t)}))},P=(e,t=document)=>{if(t instanceof Document||t instanceof HTMLElement||t instanceof ShadowRoot){const r=new Set;q(r,t.querySelectorAll(e));const o=t.querySelectorAll('[class*="hydrated"]');for(let t=0;t<o.length;t++){const n=o[t].shadowRoot;q(r,P(e,"object"==typeof n&&null!==n?n:o[t]))}return Array.from(r)}throw new Error("The parameter document for the method querySelectorAll is not type of Document, HTMLElement or ShadowRoot.")},$=(e,t=document)=>{if(t instanceof Document||t instanceof HTMLElement||t instanceof ShadowRoot){let r=t.querySelector(e);if(null===r){const o=t.querySelectorAll('[class*="hydrated"]');for(let t=0;t<o.length;t++){const n=o[t].shadowRoot;if(r=$(e,"object"==typeof n&&null!==n?n:o[t]),null!==r)break}}return r}throw new Error("The parameter document for the method querySelector is not type of Document, HTMLElement or ShadowRoot.")},_=/\[object Object\]/,T=(e,t)=>{"string"==typeof e&&_.test(e)||t()},z=(e,t)=>{"string"==typeof e&&""===e||t()},R=(e,t)=>{(0,n.a)()&&(n.L.debug([e,t]),n.L.debug("↑ We propagate the (submit) event to this target.")),Object.defineProperty(e,"target",{value:t,writable:!1})},J=(e,t,r,o={})=>{var n,a;void 0===e.nextHooks&&(e.nextHooks=new Map),void 0===e.nextState&&(e.nextState=new Map),e.nextHooks.get(t)instanceof Map==0&&e.nextHooks.set(t,new Map),"function"==typeof o.afterPatch&&(null===(n=e.nextHooks.get(t))||void 0===n||n.set("afterPatch",o.afterPatch)),"function"==typeof o.beforePatch&&(null===(a=e.nextHooks.get(t))||void 0===a||a.set("beforePatch",o.beforePatch)),e.nextState.set(t,r),(e=>{var t,r,o;null===(t=e.nextHooks)||void 0===t||t.forEach(((t,r)=>{var o;const n=t.get("beforePatch");"function"==typeof n&&n(null===(o=e.nextState)||void 0===o?void 0:o.get(r),e.nextState,e,r)})),(null===(r=e.nextState)||void 0===r?void 0:r.size)>0&&(e.state=Object.assign(Object.assign({},e.state),Object.fromEntries(e.nextState)),delete e.nextState,null===(o=e.nextHooks)||void 0===o||o.forEach(((t,r)=>{const o=t.get("afterPatch");"function"==typeof o&&o(e.state[r],e.state,e,r)}))),delete e.nextHooks})(e)},W=(e,t,r,o)=>{u(`[${e.constructor.name}] Der Property-Wert (${r}) für '${t}' ist nicht valide. Folgende Werte sind erlaubt: ${Array.from(o).join(", ")}`)};function I(e,t,r,o,n,a={}){r(n)?J(e,t,n,a.hooks):void 0===n&&!0!==a.required&&r(a.defaultValue)?J(e,t,a.defaultValue,a.hooks):(a.required||o.add(null),W(e,t,n,o))}const B=(e,t,r,o)=>{I(e,t,(e=>"boolean"==typeof e),new Set(["Boolean {true, false}"]),r,o)},K=(e,t,r,o={})=>{const n="number"==typeof o.minLength?null==o?void 0:o.minLength:0;I(e,t,(e=>"string"==typeof e&&e.length>=n&&(void 0===(null==o?void 0:o.maxLength)||e.length<=o.maxLength)),new Set(["String"]),r,o)},F=(e,t,r,o)=>{I(e,t,(e=>"number"==typeof e&&(void 0===(null==o?void 0:o.min)||"number"==typeof(null==o?void 0:o.min)&&e>=o.min)&&(void 0===(null==o?void 0:o.max)||"number"==typeof(null==o?void 0:o.max)&&e<=o.max)),new Set(["Number"]),r,o)},U=(e,t,r,o,a=(e=>e==e),i={})=>{z(o,(()=>{T(o,(()=>{void 0===o&&(o=[]);try{try{o=ee(o)}catch(e){}if(Array.isArray(o)){const l=o.find((e=>!r(e)));void 0===l&&a(o)?J(e,t,o,i.hooks):T(l,(()=>{throw n.L.debug(l),new Error("↑ Das Schema für das Property (_options) ist nicht valide. Der Wert wird nicht geändert.")}))}else T(o,(()=>{throw n.L.debug(o),new Error("↑ Das Schema für das Property (_options) ist nicht valide. Der Wert wird nicht geändert.")}))}catch(e){n.L.debug(e)}}))}))},V=/^(true|false)$/,Z=/^-?(0|[1-9]\d*)$/,Y=/^-?(0.|[1-9]\d*.)\d*[1-9]$/,G=e=>{const t=typeof e,r=`${e}`;if("string"==typeof e)if(V.test(e))e="true"===e;else if(Z.test(e))e=parseInt(e);else if(Y.test(e))e=parseFloat(e);else if(X.test(e))try{e=ee(e)}catch(e){}return t!==typeof e&&u(`You have used a stringified property value (${r} to ${JSON.stringify(e)}) which type switched from ${t} to ${typeof e}!`),e},Q=e=>{try{return JSON.stringify(e).replace(/"/g,"'")}catch(t){throw n.L.warn(["stringifyJson",e]),n.L.error("↑ Das JSON konnte nicht in einen String umgewandelt werden. Es wird ein stringifizierbares JSON erwartet."),new Error}},X=/^[{[]/,ee=e=>{if("string"==typeof e)try{return JSON.parse(e)}catch(t){if(X.test(e))try{return JSON.parse(e.replace(/'/g,'"'))}catch(t){n.L.warn(["parseJson",e]),n.L.error("↑ Der JSON-String konnte nicht geparsed werden. Achten Sie darauf, dass einfache Anführungszeichen im Text maskiert werden (&#8216;).")}}throw new Error},te=e=>"boolean"==typeof e?!0===e?"true":"false":void 0,re=e=>"string"==typeof e?e:te(e),oe=(e,t)=>$(e,t||(0,n.g)()),ne=(e,t)=>P(e,t||(0,n.g)());let ae=null;const ie=()=>(ae=ae||{backgroundColor:"#00000000",color:"#00000000",domNode:(0,n.g)().body,level:"Fail",score:1},ae),le=/(\d+, ){3}0\)/,ce=(e,t=ie())=>{const r=getComputedStyle(e),o=le.test(r.backgroundColor)?t.backgroundColor:H.hex(r.backgroundColor),a=le.test(r.color)?t.color:H.hex(r.color),i=A(o,a),l={backgroundColor:o,color:a,domNode:e,level:(c=i,c>=7?"AAA":c>=4.5?"AA":c>=3?"AA Large":"Fail"),score:i};var c;return i<4.5&&n.L.error(["Color-Contrast-Error",{backgroundColor:l.backgroundColor,color:l.color,level:l.level,score:l.score},l.domNode]),l},se=(e,t=ie())=>{t.domNode instanceof HTMLElement&&(t=ce(t.domNode,t));const r=t.domNode.querySelector(e);if(null===r){const r=t.domNode.querySelectorAll('[class="hydrated"]');for(let o=0;o<r.length&&(t.domNode=r[o],null===(t=se(e,t)).domNode);o++);return t}return ce(r,t)};class ue{static queryHtmlElementColors(e,t,r=!1,o=!0){let a=null;if(!0===r||!1===ue.executionLock)if(!1===r&&(ue.cache.clear(),ue.cache.set(t.domNode,t),ue.executionLock=!0,!0===o&&n.L.debug("[KoliBriUtils] Color contrast analysis started...")),e===t.domNode)a=t;else{const r=new Set;if(t.domNode.shadowRoot){const e=t.domNode.shadowRoot.children;for(let t=0;t<e.length;t++)r.add(e[t])}const o=t.domNode;if("function"==typeof o.assignedNodes){const e=o.assignedNodes();for(let t=0;t<e.length;t++)e[t]instanceof HTMLElement&&r.add(e[t])}const n=t.domNode.children;for(let e=0;e<n.length;e++)r.add(n[e]);const i=Array.from(r);for(let r=0;r<i.length;r++){let o=ue.cache.get(i[r]);void 0===o&&(o=ce(i[r],t)),ue.cache.set(i[r],o);const n=ue.queryHtmlElementColors(e,o,!0,!1);if(null!==n){a=n;break}}}else n.L.debug("[KoliBriUtils] Call aborted because a color contrast analysis is currently being executed.");return!1===r&&(!0===o&&n.L.debug(`[KoliBriUtils] Color contrast analysis finished (${ue.cache.size} DOM elements are analysed).`),ue.executionLock=!1,ue.cache.clear()),a}}ue.executionLock=!1,ue.cache=new Map;class de{}de.getCssStyle=o.p,de.patchTheme=o.x,de.patchThemeTag=o.z,de.querySelector=oe,de.querySelectorAll=ne,de.stringifyJson=Q}}]);
package/dist/149.js DELETED
@@ -1,2 +0,0 @@
1
- /*! For license information please see 149.js.LICENSE.txt */
2
- "use strict";(self.webpackChunk_public_ui_sample_react=self.webpackChunk_public_ui_sample_react||[]).push([[149],{5981:(e,t,a)=>{a.d(t,{v:()=>i});var l=a(121);const i=(e,t)=>{(0,l.b)(e,"_hasCloser",t)}},8426:(e,t,a)=>{a.d(t,{t:()=>s});var l=a(7394),i=a(2466);let s=(e,t)=>{var a;return(null!==(a=(0,l.g)())&&void 0!==a?a:(0,l.i)("de")).translate(e,t)};"test"===i.p&&(s=e=>e)},149:(e,t,a)=>{a.r(t),a.d(t,{kol_alert_wc:()=>f});var l=a(3685),i=a(8426),s=a(4501),o=a(1301),n=a(881),r=a(121),c=a(5981),d=a(9921);const h=["default","info","success","warning","error"],b=["card","msg"],v=e=>(0,l.h)(o.g,{class:"heading-icon",_label:"string"==typeof e.label&&e.label.length>0?"":e.ariaLabel,_icons:e.icon}),_=e=>{switch(e.type){case"error":return(0,l.h)(v,{ariaLabel:(0,i.t)("kol-error"),icon:"codicon codicon-error",label:e.label});case"info":return(0,l.h)(v,{ariaLabel:(0,i.t)("kol-info"),icon:"codicon codicon-info",label:e.label});case"warning":return(0,l.h)(v,{ariaLabel:(0,i.t)("kol-warning"),icon:"codicon codicon-warning",label:e.label});case"success":return(0,l.h)(v,{ariaLabel:(0,i.t)("kol-success"),icon:"codicon codicon-pass",label:e.label});default:return(0,l.h)(v,{ariaLabel:(0,i.t)("kol-message"),icon:"codicon codicon-comment",label:e.label})}},f=class{constructor(e){(0,l.r)(this,e),this.close=()=>{var e;void 0!==(null===(e=this._on)||void 0===e?void 0:e.onClose)&&this._on.onClose(new Event("Close"))},this.on={onClick:this.close},this.validateOnValue=e=>"object"==typeof e&&null!==e&&"function"==typeof e.onClose,this._alert=!1,this._hasCloser=!1,this._label=void 0,this._level=1,this._on=void 0,this._type="default",this._variant="msg",this.state={_level:1}}render(){var e;if(this.state._alert){try{n.L.debug(["Navigator should vibrate ...",navigator.vibrate([100,75,100,75,100])])}catch(e){n.L.debug("Navigator does not support vibration.")}setTimeout((()=>{this.validateAlert(!1)}),1e4)}return(0,l.h)(l.H,{key:"ecb2cd45b14f92cc1c337d2b81382a8cc820e869",class:{"kol-alert-wc":!0,alert:!0,[this.state._type]:!0,[this.state._variant]:!0,hasCloser:!!this.state._hasCloser},role:this.state._alert?"alert":void 0},(0,l.h)("div",{key:"b190de9f62c33d970daabc1b5638132da33c936e",class:"heading"},(0,l.h)(_,{key:"e1da8b194a13ec6f9270efc2234caadcee77e827",label:this.state._label,type:this.state._type}),(0,l.h)("div",{key:"7ffd000cfbe218c582791e8646ff5caf9bad5b25",class:"heading-content"},"string"==typeof this.state._label&&(null===(e=this.state._label)||void 0===e?void 0:e.length)>0&&(0,l.h)(o.b,{key:"f9e7c598243a4868b80b248fdf4dfdeed5d24a2b",_label:this.state._label,_level:this.state._level}),"msg"===this.state._variant&&(0,l.h)("div",{key:"b5b70319b6c7747872e9d8072a1fe7565938f7c1",class:"content"},(0,l.h)("slot",{key:"b75edf24762d861147d5ee5fa0701b4c5a30eed1"}))),this.state._hasCloser&&(0,l.h)(o.c,{key:"cd46afacd1afbc415e1184604b3b1ac9af901c97",class:"close",_hideLabel:!0,_icons:{left:{icon:"codicon codicon-close"}},_label:(0,i.t)("kol-close-alert",{placeholders:{label:this.state._label}}),_on:this.on,_tooltipAlign:"left"})),"card"===this.state._variant&&(0,l.h)("div",{key:"2a9670974b00907497abd255e02194301df0c0a2",class:"content"},(0,l.h)("slot",{key:"9bd3de7e485b9865d5f74dfbce4f421d4b1dc9b5"})))}validateAlert(e){(0,r.b)(this,"_alert",e)}validateHasCloser(e){(0,c.v)(this,e)}validateLabel(e){(0,d.v)(this,e)}validateLevel(e){(0,s.w)(this,e)}validateOn(e){this.validateOnValue(e)&&(0,r.s)(this,"_on",{onClose:e.onClose})}validateType(e){(0,r.w)(this,"_type",(e=>"string"==typeof e&&h.includes(e)),new Set(`String {${h.join(", ")}`),e)}validateVariant(e){(0,r.w)(this,"_variant",(e=>"string"==typeof e&&b.includes(e)),new Set(`AlertVariant {${b.join(", ")}`),e)}componentWillLoad(){this.validateAlert(this._alert),this.validateHasCloser(this._hasCloser),this.validateLabel(this._label),this.validateLevel(this._level),this.validateOn(this._on),this.validateType(this._type),this.validateVariant(this._variant)}static get watchers(){return{_alert:["validateAlert"],_hasCloser:["validateHasCloser"],_label:["validateLabel"],_level:["validateLevel"],_on:["validateOn"],_type:["validateType"],_variant:["validateVariant"]}}}},9921:(e,t,a)=>{a.d(t,{a:()=>h,b:()=>n,c:()=>r,h:()=>i,v:()=>d});var l=a(121);const i=[0,1,2,3,4,5,6],s=/[a-zA-Z0-9äöüÄÖÜß]/g,o=/^\d+$/;function n(e,t=1){return function(e){var t;return"string"==typeof e&&(null===(t=e.match(s))||void 0===t?void 0:t.length)||0}(e)>=t}function r(e){return o.test(e)}const c=new Set(["string"]),d=(e,t,a={})=>{(0,l.w)(e,"_label",(e=>"string"==typeof e),c,t,function(e){var t;return Object.assign(Object.assign({},e),{hooks:{afterPatch:(t,a,i,s)=>{var o,c;"function"==typeof(null===(o=e.hooks)||void 0===o?void 0:o.afterPatch)&&(null===(c=e.hooks)||void 0===c||c.afterPatch(t,a,i,s)),"string"==typeof t&&!1===n(t,3)&&!1===r(t)&&(0,l.a)(`The heading or label ("${t}") is not accessible. A label should consist of at least three readable characters.`),"string"==typeof t&&t.length>80&&(0,l.u)("A heading or label should not be longer than 80 characters.")},beforePatch:null===(t=e.hooks)||void 0===t?void 0:t.beforePatch}})}(a))},h=d},4501:(e,t,a)=>{a.d(t,{w:()=>s});var l=a(9921),i=a(121);const s=(e,t)=>{(0,i.w)(e,"_level",(e=>"number"==typeof e&&l.h.includes(e)),new Set([`Number {${l.h.join(", ")}`]),t,{defaultValue:1,required:!0})}}}]);
package/dist/1524.js DELETED
@@ -1,2 +0,0 @@
1
- /*! For license information please see 1524.js.LICENSE.txt */
2
- "use strict";(self.webpackChunk_public_ui_sample_react=self.webpackChunk_public_ui_sample_react||[]).push([[1524],{1524:(e,n,t)=>{t.r(n),t.d(n,{kol_popover_wc:()=>l});var i=t(3685),o=t(5533),s=t(881),a=t(7223),r=t(4761);const l=class{constructor(e){(0,i.r)(this,e),this.hidePopoverByEscape=e=>{"Escape"===e.key&&this.hidePopover()},this.hidePopoverByClickOutside=e=>{this.host&&!this.host.contains(e.target)&&this.hidePopover()},this.catchHostAndTriggerElement=e=>{e&&(this.host=e,this.triggerElement=e.previousElementSibling)},this.catchPopoverElement=e=>{this.popoverElement=e},this.catchArrowElement=e=>{this.arrowElement=e},this._align="top",this._show=!1,this.state={_align:"top",_show:!1,_visible:!1}}showPopover(){return e=this,n=function*(){this.addListenersToBody(),this.triggerElement&&this.popoverElement&&(yield(0,o.a)({align:this._align,referenceElement:this.triggerElement,arrowElement:this.arrowElement,floatingElement:this.popoverElement}),this.state=Object.assign(Object.assign({},this.state),{_visible:!0}))},new Promise(((t,i)=>{var o=e=>{try{a(n.next(e))}catch(e){i(e)}},s=e=>{try{a(n.throw(e))}catch(e){i(e)}},a=e=>e.done?t(e.value):Promise.resolve(e.value).then(o,s);a((n=n.apply(e,null)).next())}));var e,n}hidePopover(){var e;this.state=Object.assign(Object.assign({},this.state),{_visible:!1}),this._show=!1,null===(e=this.triggerElement)||void 0===e||e.focus(),this.removeListenersToBody()}addListenersToBody(){var e;const n=(0,s.g)().body;n.addEventListener("keyup",this.hidePopoverByEscape),n.addEventListener("click",this.hidePopoverByClickOutside),null===(e=document.scrollingElement)||void 0===e||e.addEventListener("scroll",(()=>{this.showPopover()}),{passive:!0})}removeListenersToBody(){var e;const n=(0,s.g)().body;n.removeEventListener("keyup",this.hidePopoverByEscape),n.removeEventListener("click",this.hidePopoverByClickOutside),null===(e=document.scrollingElement)||void 0===e||e.removeEventListener("scroll",(()=>{this.showPopover()}))}render(){return(0,i.h)(i.H,{key:"300c5938b894d91a742353f79f6a96da6f4fc59f",ref:this.catchHostAndTriggerElement,class:"kol-popover-wc"},(0,i.h)("div",{key:"f1141877e7fe0cf9118e32012dcbaccf443d6067",class:{popover:!0,show:this.state._visible},ref:this.catchPopoverElement,hidden:!this.state._show},(0,i.h)("div",{key:"a4d43160414c7a0ed78edd1c7a04b88446c77e63",class:`arrow ${this.state._align}`,ref:this.catchArrowElement}),(0,i.h)("slot",{key:"8a65a9097d526128e6b548133f98eb7578314944"})))}validateAlign(e){(0,a.a)(this,e)}validateShow(e){(0,r.v)(this,e),e&&this.showPopover()}componentWillLoad(){this.validateAlign(this._align),this.validateShow(this._show)}static get watchers(){return{_align:["validateAlign"],_show:["validateShow"]}}};l.style="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: 44px;\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of 44px.\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]),\n .kol-input .input {\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\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 clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px;\n}\n\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n border: none;\n margin: 0;\n padding: 0;\n width: 100%; /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n .kol-span-wc {\n display: grid;\n place-items: center;\n }\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n .kol-span-wc > span {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n /* This is the text label. */\n .hide-label > .kol-span-wc > span > span {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span-wc,\n [disabled]:focus .kol-span-wc {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n .kol-popover {\n height: 0;\n position: absolute;\n }\n .kol-popover .popover {\n background-color: #fff;\n min-height: max-content;\n min-width: max-content;\n opacity: 0;\n position: absolute;\n }\n .kol-popover .show {\n animation: 0.3s ease-in forwards fadeInOpacity;\n }\n .kol-popover .disappear {\n animation: 0.3s ease-in backwards fadeInOpacity;\n }\n .kol-popover .arrow {\n background-color: inherit;\n height: var(--font-size);\n position: absolute;\n rotate: 0.125turn;\n width: var(--font-size);\n z-index: -1;\n }\n @keyframes fadeInOpacity {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}"},4761:(e,n,t)=>{t.d(n,{v:()=>o});var i=t(121);const o=(e,n,t)=>{(0,i.b)(e,"_show",n,t)}}}]);
package/dist/2072.js DELETED
@@ -1,2 +0,0 @@
1
- /*! For license information please see 2072.js.LICENSE.txt */
2
- "use strict";(self.webpackChunk_public_ui_sample_react=self.webpackChunk_public_ui_sample_react||[]).push([[2072],{5389:(e,t,n)=>{n.d(t,{a:()=>l,p:()=>r});var i=n(1301),a=n(121),o=n(881);const s=e=>{for((0,o.a)()&&((0,a.j)("↓ Search form element start."),console.log(e));e instanceof HTMLElement&&"FORM"!==e.tagName&&e.tagName!==i.m.toUpperCase();){try{e=e.parentElement instanceof HTMLElement?e.parentElement:e.parentNode instanceof ShadowRoot?e.parentNode.host:null}catch(e){}(0,o.a)()&&(console.log(e),(0,a.j)("↑ Search form element finished."))}return e},l=(e={})=>{var t,n;const o=s(e.form);if(o instanceof HTMLElement){const e=new Event("reset",{bubbles:!0,cancelable:!0});if("FORM"===o.tagName)(0,a.q)(e,o),o.dispatchEvent(e);else if(o.tagName===i.m.toUpperCase()){(0,a.q)(e,a.K.querySelector("form",o));const i=o;"function"==typeof(null===(t=i._on)||void 0===t?void 0:t.onReset)&&(null===(n=i._on)||void 0===n||n.onReset(e))}}},r=(e={})=>{const t=s(e.form);if(t instanceof HTMLElement){const e=new SubmitEvent("submit",{bubbles:!0,cancelable:!0,submitter:t});if("FORM"===t.tagName)(0,o.a)()&&!1===t.noValidate&&(0,a.j)("If you have not focusable or hidden form fields in your form, you should enable noValidate for your form.",{force:!0}),setTimeout((()=>{"function"==typeof t.requestSubmit?t.requestSubmit():((0,a.q)(e,t),t.dispatchEvent(e))}));else if(t.tagName===i.m.toUpperCase()){(0,a.q)(e,a.K.querySelector("form",t));const n=t;setTimeout((()=>{var t,i;"function"==typeof(null===(t=n._on)||void 0===t?void 0:t.onSubmit)&&(null===(i=n._on)||void 0===i||i.onSubmit(e))}))}}}},8504:(e,t,n)=>{n.d(t,{I:()=>r});var i=n(1008),a=n(4480),o=n(121),s=n(2466);const l=(e,t)=>{const n=e;"object"==typeof n&&null!==n&&((0,s.i)(n.right,1)&&(n.right={icon:n.right}),(0,s.i)(n.left,1)&&(n.left={icon:n.left}),t.set("_icons",n))};class r extends i.I{constructor(e,t,n){super(e,t,n),this.component=e}validateIcon(e){this.validateIcons(e)}validateIcons(e){(0,o.o)(e,(()=>{try{e=(0,o.p)(e)}catch(e){}(0,o.w)(this.component,"_icons",(e=>"object"==typeof e&&null!==e&&((0,s.i)(e.left,1)||(0,a.i)(e.left)||(0,s.i)(e.right,1)||(0,a.i)(e.right))),new Set(["KoliBriHorizontalIcon"]),e,{hooks:{beforePatch:l},required:!0})}))}componentWillLoad(){super.componentWillLoad(),this.validateIcons(this.component._icons||this.component._icon)}}},4480:(e,t,n)=>{n.d(t,{i:()=>s,v:()=>l});var i=n(121),a=n(2466);const o=(e,t,n)=>{(0,a.c)(n)?e[t]=n:(0,a.i)(n,1)&&(e[t]={icon:n})},s=e=>"object"==typeof e&&null!==e&&(void 0===e.style||(0,a.b)(e.style))&&(void 0===e.label||(0,a.i)(e.label))&&(0,a.i)(e.icon,1),l=(e,t,n={})=>{(0,i.o)(t,(()=>{var l;try{t=(0,i.p)(t)}catch(e){}(0,i.w)(e,"_icons",(e=>{const t="object"==typeof e&&null!==e&&0===Object.keys(e).length;return null===e||t||(0,a.i)(e,1)||"object"==typeof e&&null!==e&&((0,a.i)(e.left,1)||s(e.left)||(0,a.i)(e.right,1)||s(e.right)||(0,a.i)(e.top,1)||s(e.top)||(0,a.i)(e.bottom,1)||s(e.bottom))}),new Set(["KoliBriIcon"]),t,Object.assign(Object.assign({},n),{defaultValue:{},hooks:{afterPatch:null===(l=n.hooks)||void 0===l?void 0:l.afterPatch,beforePatch:(e,t,i,s)=>{var l,r;"function"==typeof(null===(l=n.hooks)||void 0===l?void 0:l.beforePatch)&&(null===(r=n.hooks)||void 0===r||r.beforePatch(e,t,i,s)),(e=>{var t,n,i;if(null===(t=e.nextState)||void 0===t?void 0:t.has("_icons")){const t=null===(n=e.nextState)||void 0===n?void 0:n.get("_icons");null===(i=e.nextState)||void 0===i||i.set("_icons",(e=>{let t={};return(0,a.i)(e,1)?t={left:{icon:e}}:"object"==typeof e&&null!==e&&(o(t,"top",e.top),o(t,"right",e.right),o(t,"bottom",e.bottom),o(t,"left",e.left)),t})(t))}})(i)}}}))}))}},2072:(e,t,n)=>{n.r(t),n.d(t,{kol_input_range:()=>m});var i=n(3685),a=n(2477),o=n(5389),s=n(1008),l=n(1165),r=n(8504),d=n(121),h=n(2028),c=n(1301),p=n(2466);class u extends r.I{constructor(e,t,n){super(e,t,n),this.component=e}validateAutoComplete(e){(0,d.w)(this.component,"_autoComplete",(e=>"string"==typeof e&&("on"===e||"off"===e)),new Set(["on | off"]),e)}validateMax(e){(0,d.k)(this.component,"_max",e)}validateMin(e){(0,d.k)(this.component,"_min",e)}validateStep(e){(0,d.k)(this.component,"_step",e)}validateSuggestions(e){(0,h.v)(this.component,e)}validateValue(e){(0,d.k)(this.component,"_value",e),this.setFormAssociatedValue(this.component.state._value)}componentWillLoad(){super.componentWillLoad(),this.validateAutoComplete(this.component._autoComplete),this.validateMax(this.component._max),this.validateMin(this.component._min),this.validateStep(this.component._step),this.validateSuggestions(this.component._suggestions),this.validateValue(this.component._value)}}const m=class{getSanitizedFloatValue(e){const t=parseFloat(e);return this.state._max&&t>this.state._max?this.state._max:this.state._min&&t<this.state._min?this.state._min:t}getValue(){return e=this,t=function*(){if(void 0!==this.refInputNumber){const e=this.refInputNumber.value;return this.getSanitizedFloatValue(e)}},new Promise(((n,i)=>{var a=e=>{try{s(t.next(e))}catch(e){i(e)}},o=e=>{try{s(t.throw(e))}catch(e){i(e)}},s=e=>e.done?n(e.value):Promise.resolve(e.value).then(a,o);s((t=t.apply(e,null)).next())}));var e,t}componentDidLoad(){var e;!this._value&&(null===(e=this.refInputRange)||void 0===e?void 0:e.value)&&this.validateValue(parseFloat(this.refInputRange.value))}render(){const{ariaDescribedBy:e}=(0,s.g)(this.state),t=Array.isArray(this.state._suggestions)&&this.state._suggestions.length>0,n=(0,p.s)(this.state._label);return(0,i.h)(i.H,{key:"7b64631487a3803774d80e3e70370c94490a9857",class:"kol-input-range"},(0,i.h)(c.l,{key:"85101ed185396991337d173ce303ba75f2074c06",class:{range:!0,"hide-label":!!this.state._hideLabel},_accessKey:this.state._accessKey,_disabled:this.state._disabled,_msg:this.state._msg,_hideError:this.state._hideError,_hideLabel:this.state._hideLabel,_hint:this.state._hint,_icons:this.state._icons,_id:this.state._id,_label:this.state._label,_tooltipAlign:this._tooltipAlign,_touched:this.state._touched},(0,i.h)("span",{key:"3e171dbf810c32a19e852a04744f247168803238",slot:"label"},n?(0,i.h)("slot",{name:"expert"}):"string"==typeof this.state._accessKey?(0,i.h)(i.F,null,(0,i.h)(l.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",{key:"9d600093cff9813f86c7da0462412bc7defd99b0",slot:"input"},(0,i.h)("div",{key:"f57c4c85cb9922268eb0690a4a5fbc1fd39ddbcc",class:"inputs-wrapper",style:{"--kolibri-input-range--input-number--width":`${this.state._max}`.length+.5+"em"}},(0,i.h)("input",Object.assign({key:"733e6dfef18d2999fb242016b22f514e5569d2a6",ref:this.catchInputRangeRef,title:"",accessKey:this.state._accessKey,"aria-describedby":e.length>0?e.join(" "):void 0,"aria-label":this.state._hideLabel&&"string"==typeof this.state._label?this.state._label:void 0,"aria-hidden":"true",autoCapitalize:"off",autoComplete:this.state._autoComplete,autoCorrect:"off",disabled:this.state._disabled,list:t?`${this.state._id}-list`:void 0,max:this.state._max,min:this.state._min,name:this.state._name?`${this.state._name}-range`:void 0,spellcheck:"false",step:this.state._step,tabIndex:-1,type:"range",value:this.state._value},this.controller.onFacade,{onChange:this.onChange})),(0,i.h)("input",Object.assign({key:"76d774a129cb72c84f9ec4af991c9d26ff5b5099",ref:this.catchInputNumberRef,title:"",accessKey:this.state._accessKey,"aria-describedby":e.length>0?e.join(" "):void 0,"aria-label":this.state._hideLabel&&"string"==typeof this.state._label?this.state._label:void 0,autoCapitalize:"off",autoComplete:this.state._autoComplete,autoCorrect:"off",disabled:this.state._disabled,id:this.state._id,list:t?`${this.state._id}-list`:void 0,max:this.state._max,min:this.state._min,name:this.state._name?`${this.state._name}-number`:void 0,step:this.state._step,type:"number",value:this.state._value},this.controller.onFacade,{onKeyDown:this.onKeyDown,onChange:this.onChange}))),t&&[(0,i.h)("datalist",{key:"b1c6c238050830f943300523363a08eae7c7d4d9",id:`${this.state._id}-list`},this.state._suggestions.map((e=>(0,i.h)("option",{value:e}))))])))}constructor(e){(0,i.r)(this,e),this.catchInputNumberRef=e=>{var t;e&&(this.refInputNumber=e,(0,p.a)(this.host,e),!this._value&&(null===(t=this.refInputNumber)||void 0===t?void 0:t.value)&&this.validateValue(parseFloat(this.refInputNumber.value)))},this.catchInputRangeRef=e=>{e&&(this.refInputRange=e)},this.onChange=e=>{var t,n;const i=e.target.value,a=this.getSanitizedFloatValue(i);this.validateValue(a),"function"==typeof(null===(t=this.state._on)||void 0===t?void 0:t.onChange)&&(null===(n=this.state._on)||void 0===n||n.onChange(e,a))},this.onKeyDown=e=>{"Enter"!==e.code&&"NumpadEnter"!==e.code||(0,o.p)({form:this.host,ref:this.refInputNumber})},this._accessKey=void 0,this._alert=!0,this._autoComplete=void 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._max=void 0,this._min=void 0,this._msg=void 0,this._name=void 0,this._on=void 0,this._step=void 0,this._suggestions=void 0,this._syncValueBySelector=void 0,this._tabIndex=void 0,this._tooltipAlign="top",this._touched=!1,this._value=void 0,this.state={_autoComplete:"off",_hideError:!1,_id:`id-${(0,a.n)()}`,_label:"",_suggestions:[]},this.controller=new u(this,"range",this.host)}validateAccessKey(e){this.controller.validateAccessKey(e)}validateAlert(e){this.controller.validateAlert(e)}validateAutoComplete(e){this.controller.validateAutoComplete(e)}validateDisabled(e){this.controller.validateDisabled(e)}validateError(e){this.controller.validateError(e)}validateHideError(e){this.controller.validateHideError(e)}validateHideLabel(e){this.controller.validateHideLabel(e)}validateHint(e){this.controller.validateHint(e)}validateIcons(e){this.controller.validateIcons(e)}validateId(e){this.controller.validateId(e)}validateLabel(e){this.controller.validateLabel(e)}validateMax(e){this.controller.validateMax(e)}validateMin(e){this.controller.validateMin(e)}validateMsg(e){this.controller.validateMsg(e)}validateName(e){this.controller.validateName(e)}validateOn(e){this.controller.validateOn(e)}validateStep(e){this.controller.validateStep(e)}validateSuggestions(e){this.controller.validateSuggestions(e)}validateSyncValueBySelector(e){this.controller.validateSyncValueBySelector(e)}validateTabIndex(e){this.controller.validateTabIndex(e)}validateTouched(e){this.controller.validateTouched(e)}validateValue(e){this.controller.validateValue(e)}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{_accessKey:["validateAccessKey"],_alert:["validateAlert"],_autoComplete:["validateAutoComplete"],_disabled:["validateDisabled"],_error:["validateError"],_hideError:["validateHideError"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_max:["validateMax"],_min:["validateMin"],_msg:["validateMsg"],_name:["validateName"],_on:["validateOn"],_step:["validateStep"],_suggestions:["validateSuggestions"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_touched:["validateTouched"],_value:["validateValue"]}}};m.style={default:"/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: 44px;\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of 44px.\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]),\n .kol-input .input {\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\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 clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px;\n}\n\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n border: none;\n margin: 0;\n padding: 0;\n width: 100%; /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n .kol-span-wc {\n display: grid;\n place-items: center;\n }\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n .kol-span-wc > span {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n /* This is the text label. */\n .hide-label > .kol-span-wc > span > span {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span-wc,\n [disabled]:focus .kol-span-wc {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: 44px;\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of 44px.\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]),\n .kol-input .input {\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\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 clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px;\n}\n\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n border: none;\n margin: 0;\n padding: 0;\n width: 100%; /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n .kol-span-wc {\n display: grid;\n place-items: center;\n }\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n .kol-span-wc > span {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n /* This is the text label. */\n .hide-label > .kol-span-wc > span > span {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span-wc,\n [disabled]:focus .kol-span-wc {\n outline: none !important;\n }\n}\n@layer kol-component {\n .required label > span::after,\n .required legend > span::after {\n content: \"*\";\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n input,\n textarea {\n cursor: text;\n }\n input[type=checkbox],\n input[type=color],\n input[type=file],\n input[type=radio],\n input[type=range],\n label,\n option,\n select {\n cursor: pointer;\n }\n /* input[type='checkbox'], */\n /* input[type='radio'], */\n /* input[type='range'], */\n input[type=color],\n input[type=date],\n input[type=datetime-local],\n input[type=email],\n input[type=file],\n input[type=month],\n input[type=number],\n input[type=password],\n input[type=search],\n input[type=tel],\n input[type=text],\n input[type=time],\n input[type=url],\n input[type=week],\n select,\n select[multiple] option,\n textarea {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n width: 100%;\n }\n /* needed hack for vertical alignment */\n input[type=file] {\n padding: calc((var(--a11y-min-size) - (16rem / var(--kolibri-root-font-size, 16))) / 10) 0.5em;\n }\n /* needed hack for vertical alignment */\n select[multiple] option {\n padding: calc((var(--a11y-min-size) - (16rem / var(--kolibri-root-font-size, 16))) / 2) 0.5em;\n }\n}\n@layer kol-component {\n .kol-input {\n display: grid;\n }\n .kol-input .input-slot {\n flex-grow: 1;\n }\n input:not([type=checkbox], [type=radio]),\n select:not([multiple], [size]) {\n height: 2.75em;\n }\n input:focus,\n option:focus,\n select:focus,\n textarea:focus {\n outline: 0;\n }\n .input {\n display: flex;\n align-items: center;\n }\n .input > .kol-icon {\n display: grid;\n height: var(--a11y-min-size);\n place-items: center;\n }\n .kol-input.required .input-tooltip .span-label::after {\n content: \"*\";\n }\n}\n@layer kol-component {\n .kol-alert-wc {\n display: grid;\n }\n .kol-alert-wc .heading {\n display: flex;\n place-items: center;\n }\n .kol-alert-wc .heading > div {\n flex-grow: 1;\n }\n .close {\n /* Visible with forced colors */\n outline: transparent solid 1px;\n }\n}\n@layer kol-component {\n :host {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n .inputs-wrapper {\n align-items: center;\n display: flex;\n flex-direction: row;\n }\n input[type=number] {\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n width: var(--kolibri-input-range--input-number--width);\n }\n /*\n * For Chrome and Firefox is it needed to use redundant style definitions with separate selectors. The reason is unknown.\n */\n input[type=range] {\n appearance: none;\n background-color: #d3d3d3;\n border: 1px solid #000;\n display: inline-block;\n flex-grow: 1;\n height: calc(8rem / var(--kolibri-root-font-size, 16));\n line-height: 1.5em;\n padding: 0;\n margin: 0;\n /* Design-Hack - related with flex-grow */\n width: 0;\n }\n input[type=range]::-webkit-slider-thumb {\n box-sizing: border-box;\n background-color: #000;\n height: 20px;\n width: 20px;\n border-radius: 20px;\n cursor: pointer;\n -webkit-appearance: none;\n }\n input[type=range]::-moz-range-thumb {\n box-sizing: border-box;\n background-color: #000;\n height: 20px;\n width: 20px;\n border-radius: 20px;\n cursor: pointer;\n -moz-appearance: none;\n }\n}\n/* Fix missing outline in Chromium-based browsers on Windows in high contrast mode. */\n@media (prefers-contrast: more) {\n ::-webkit-slider-thumb {\n outline: 1px solid currentColor;\n }\n}"}},2028:(e,t,n)=>{n.d(t,{v:()=>a});var i=n(121);const a=(e,t)=>{(0,i.g)(e,"_suggestions",(e=>"string"==typeof e||"number"==typeof e),t,void 0,{hooks:{afterPatch:e=>{Array.isArray(e)&&e.length&&(0,i.a)("Property suggestions: Options have accessibility issues in how browsers implemented them and should not be used for now.")}}})}}}]);
package/dist/2252.js DELETED
@@ -1,2 +0,0 @@
1
- /*! For license information please see 2252.js.LICENSE.txt */
2
- "use strict";(self.webpackChunk_public_ui_sample_react=self.webpackChunk_public_ui_sample_react||[]).push([[2252],{5389:(e,t,n)=>{n.d(t,{a:()=>s,p:()=>r});var i=n(1301),a=n(121),o=n(881);const l=e=>{for((0,o.a)()&&((0,a.j)("↓ Search form element start."),console.log(e));e instanceof HTMLElement&&"FORM"!==e.tagName&&e.tagName!==i.m.toUpperCase();){try{e=e.parentElement instanceof HTMLElement?e.parentElement:e.parentNode instanceof ShadowRoot?e.parentNode.host:null}catch(e){}(0,o.a)()&&(console.log(e),(0,a.j)("↑ Search form element finished."))}return e},s=(e={})=>{var t,n;const o=l(e.form);if(o instanceof HTMLElement){const e=new Event("reset",{bubbles:!0,cancelable:!0});if("FORM"===o.tagName)(0,a.q)(e,o),o.dispatchEvent(e);else if(o.tagName===i.m.toUpperCase()){(0,a.q)(e,a.K.querySelector("form",o));const i=o;"function"==typeof(null===(t=i._on)||void 0===t?void 0:t.onReset)&&(null===(n=i._on)||void 0===n||n.onReset(e))}}},r=(e={})=>{const t=l(e.form);if(t instanceof HTMLElement){const e=new SubmitEvent("submit",{bubbles:!0,cancelable:!0,submitter:t});if("FORM"===t.tagName)(0,o.a)()&&!1===t.noValidate&&(0,a.j)("If you have not focusable or hidden form fields in your form, you should enable noValidate for your form.",{force:!0}),setTimeout((()=>{"function"==typeof t.requestSubmit?t.requestSubmit():((0,a.q)(e,t),t.dispatchEvent(e))}));else if(t.tagName===i.m.toUpperCase()){(0,a.q)(e,a.K.querySelector("form",t));const n=t;setTimeout((()=>{var t,i;"function"==typeof(null===(t=n._on)||void 0===t?void 0:t.onSubmit)&&(null===(i=n._on)||void 0===i||i.onSubmit(e))}))}}}},8504:(e,t,n)=>{n.d(t,{I:()=>r});var i=n(1008),a=n(4480),o=n(121),l=n(2466);const s=(e,t)=>{const n=e;"object"==typeof n&&null!==n&&((0,l.i)(n.right,1)&&(n.right={icon:n.right}),(0,l.i)(n.left,1)&&(n.left={icon:n.left}),t.set("_icons",n))};class r extends i.I{constructor(e,t,n){super(e,t,n),this.component=e}validateIcon(e){this.validateIcons(e)}validateIcons(e){(0,o.o)(e,(()=>{try{e=(0,o.p)(e)}catch(e){}(0,o.w)(this.component,"_icons",(e=>"object"==typeof e&&null!==e&&((0,l.i)(e.left,1)||(0,a.i)(e.left)||(0,l.i)(e.right,1)||(0,a.i)(e.right))),new Set(["KoliBriHorizontalIcon"]),e,{hooks:{beforePatch:s},required:!0})}))}componentWillLoad(){super.componentWillLoad(),this.validateIcons(this.component._icons||this.component._icon)}}},4480:(e,t,n)=>{n.d(t,{i:()=>l,v:()=>s});var i=n(121),a=n(2466);const o=(e,t,n)=>{(0,a.c)(n)?e[t]=n:(0,a.i)(n,1)&&(e[t]={icon:n})},l=e=>"object"==typeof e&&null!==e&&(void 0===e.style||(0,a.b)(e.style))&&(void 0===e.label||(0,a.i)(e.label))&&(0,a.i)(e.icon,1),s=(e,t,n={})=>{(0,i.o)(t,(()=>{var s;try{t=(0,i.p)(t)}catch(e){}(0,i.w)(e,"_icons",(e=>{const t="object"==typeof e&&null!==e&&0===Object.keys(e).length;return null===e||t||(0,a.i)(e,1)||"object"==typeof e&&null!==e&&((0,a.i)(e.left,1)||l(e.left)||(0,a.i)(e.right,1)||l(e.right)||(0,a.i)(e.top,1)||l(e.top)||(0,a.i)(e.bottom,1)||l(e.bottom))}),new Set(["KoliBriIcon"]),t,Object.assign(Object.assign({},n),{defaultValue:{},hooks:{afterPatch:null===(s=n.hooks)||void 0===s?void 0:s.afterPatch,beforePatch:(e,t,i,l)=>{var s,r;"function"==typeof(null===(s=n.hooks)||void 0===s?void 0:s.beforePatch)&&(null===(r=n.hooks)||void 0===r||r.beforePatch(e,t,i,l)),(e=>{var t,n,i;if(null===(t=e.nextState)||void 0===t?void 0:t.has("_icons")){const t=null===(n=e.nextState)||void 0===n?void 0:n.get("_icons");null===(i=e.nextState)||void 0===i||i.set("_icons",(e=>{let t={};return(0,a.i)(e,1)?t={left:{icon:e}}:"object"==typeof e&&null!==e&&(o(t,"top",e.top),o(t,"right",e.right),o(t,"bottom",e.bottom),o(t,"left",e.left)),t})(t))}})(i)}}}))}))}},2252:(e,t,n)=>{n.r(t),n.d(t,{kol_input_number:()=>m});var i=n(3685),a=n(2477),o=n(5389),l=n(1008),s=n(1165),r=n(8504),d=n(121),h=n(2028),c=n(1301),u=n(2466);class p extends r.I{constructor(e,t,n){super(e,t,n),this.numberOrIsoDateRegex=/^\d+$|(^\d{4}-([0]\d|1[0-2])-([0-2]\d|3[01])([T ][0-2]\d:[0-5]\d:[0-5]\d(?:\.\d+)?([+-][0-2]\d:[0-5]\d|Z)?)?$)|(^[0-2]\d:[0-5]\d(:[0-5]\d)?$)/,this.parseToString=e=>"string"==typeof e?e:"number"==typeof e?`${e}`:"object"==typeof e&&e instanceof Date?e.toISOString():"",this.validateIso8601=(e,t,n)=>{const i=parseFloat(t),a=i==t;return(0,d.w)(this.component,e,(e=>void 0===e||""===e||a&&"number"==typeof i||this.numberOrIsoDateRegex.test(e)),new Set(["number","Date","string{ISO-8601}"]),this.parseToString(t),{hooks:{afterPatch:e=>{"string"==typeof e&&n&&n(e)}}})},this.component=e}validateAutoComplete(e){(0,d.w)(this.component,"_autoComplete",(e=>"string"==typeof e&&("on"===e||"off"===e)),new Set(["on | off"]),e)}validateSuggestions(e){(0,h.v)(this.component,e)}onChange(e){super.onChange(e),!!e.target.value!=!!this.component._value&&(this.component._value=e.target.value)}validateMax(e){this.validateIso8601("_max",e)}validateMin(e){this.validateIso8601("_min",e)}validatePlaceholder(e){(0,d.i)(this.component,"_placeholder",e)}validateReadOnly(e){(0,d.b)(this.component,"_readOnly",e)}validateRequired(e){(0,d.b)(this.component,"_required",e)}validateStep(e){(0,d.k)(this.component,"_step",e)}validateValue(e){this.validateValueEx(e)}validateValueEx(e,t){this.validateIso8601("_value",e,t),this.setFormAssociatedValue(this.component.state._value)}componentWillLoad(){super.componentWillLoad(),this.validateAutoComplete(this.component._autoComplete),this.validateMax(this.component._max),this.validateMin(this.component._min),this.validateSuggestions(this.component._suggestions),this.validatePlaceholder(this.component._placeholder),this.validateReadOnly(this.component._readOnly),this.validateRequired(this.component._required),this.validateStep(this.component._step),this.validateValue(this.component._value)}}const m=class{getValue(){return e=this,t=function*(){var e;return null===(e=this.ref)||void 0===e?void 0:e.value},new Promise(((n,i)=>{var a=e=>{try{l(t.next(e))}catch(e){i(e)}},o=e=>{try{l(t.throw(e))}catch(e){i(e)}},l=e=>e.done?n(e.value):Promise.resolve(e.value).then(a,o);l((t=t.apply(e,null)).next())}));var e,t}render(){const{ariaDescribedBy:e}=(0,l.g)(this.state),t=Array.isArray(this.state._suggestions)&&this.state._suggestions.length>0,n=(0,u.s)(this.state._label);return(0,i.h)(i.H,{key:"12a1ad10dfa78c9c2b2555d5c9c4fe1087f1dc80",class:{"kol-input-number":!0,"has-value":this.state._hasValue}},(0,i.h)(c.l,{key:"27898a9e7d0b9c87ac279dd65dbad8f410ffd2e3",class:{number:!0,"hide-label":!!this.state._hideLabel},_accessKey:this.state._accessKey,_disabled:this.state._disabled,_msg:this.state._msg,_hideError:this.state._hideError,_hideLabel:this.state._hideLabel,_hint:this.state._hint,_icons:this.state._icons,_id:this.state._id,_label:this.state._label,_suggestions:this.state._suggestions,_readOnly:this.state._readOnly,_required:this.state._required,_smartButton:this.state._smartButton,_tooltipAlign:this._tooltipAlign,_touched:this.state._touched},(0,i.h)("span",{key:"24338a5e5fea9b88352e47680ef18160f52e9ee2",slot:"label"},n?(0,i.h)("slot",{name:"expert"}):"string"==typeof this.state._accessKey?(0,i.h)(i.F,null,(0,i.h)(s.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",{key:"b770a2335c7f888d51b424c24eba5c8c92ea7536",slot:"input"},(0,i.h)("input",Object.assign({key:"5bf1cc6188a34d0b66006c153dd817879f7de00f",ref:this.catchRef,title:"",accessKey:this.state._accessKey,"aria-describedby":e.length>0?e.join(" "):void 0,"aria-label":this.state._hideLabel&&"string"==typeof this.state._label?this.state._label:void 0,autoCapitalize:"off",autoComplete:this.state._autoComplete,autoCorrect:"off",disabled:this.state._disabled,id:this.state._id,list:t?`${this.state._id}-list`:void 0,max:this.state._max,min:this.state._min,name:this.state._name,readOnly:this.state._readOnly,required:this.state._required,placeholder:this.state._placeholder,step:this.state._step,spellcheck:"false",type:"number",value:this.state._value},this.controller.onFacade,{onKeyDown:this.onKeyDown})))))}constructor(e){(0,i.r)(this,e),this.catchRef=e=>{this.ref=e,(0,u.a)(this.host,this.ref)},this.onKeyDown=e=>{"Enter"!==e.code&&"NumpadEnter"!==e.code||(0,o.p)({form:this.host,ref:this.ref})},this._accessKey=void 0,this._alert=!0,this._autoComplete=void 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._max=void 0,this._min=void 0,this._msg=void 0,this._name=void 0,this._on=void 0,this._placeholder=void 0,this._readOnly=!1,this._required=!1,this._smartButton=void 0,this._suggestions=void 0,this._step=void 0,this._syncValueBySelector=void 0,this._tabIndex=void 0,this._tooltipAlign="top",this._touched=!1,this._value=void 0,this.state={_autoComplete:"off",_hasValue:!1,_hideError:!1,_id:`id-${(0,a.n)()}`,_label:"",_suggestions:[]},this.controller=new p(this,"number",this.host)}validateAccessKey(e){this.controller.validateAccessKey(e)}validateAlert(e){this.controller.validateAlert(e)}validateAutoComplete(e){this.controller.validateAutoComplete(e)}validateDisabled(e){this.controller.validateDisabled(e)}validateError(e){this.controller.validateError(e)}validateHideError(e){this.controller.validateHideError(e)}validateHideLabel(e){this.controller.validateHideLabel(e)}validateHint(e){this.controller.validateHint(e)}validateIcons(e){this.controller.validateIcons(e)}validateId(e){this.controller.validateId(e)}validateLabel(e){this.controller.validateLabel(e)}validateMax(e){this.controller.validateMax(e)}validateMin(e){this.controller.validateMin(e)}validateMsg(e){this.controller.validateMsg(e)}validateName(e){this.controller.validateName(e)}validateOn(e){this.controller.validateOn(e)}validatePlaceholder(e){this.controller.validatePlaceholder(e)}validateReadOnly(e){this.controller.validateReadOnly(e)}validateRequired(e){this.controller.validateRequired(e)}validateSmartButton(e){this.controller.validateSmartButton(e)}validateSuggestions(e){this.controller.validateSuggestions(e)}validateStep(e){this.controller.validateStep(e)}validateSyncValueBySelector(e){this.controller.validateSyncValueBySelector(e)}validateTabIndex(e){this.controller.validateTabIndex(e)}validateTouched(e){this.controller.validateTouched(e)}validateValue(e){this.controller.validateValueEx(e,(e=>{""===e&&this.ref&&(this.ref.value="")}))}componentWillLoad(){this._alert=!0===this._alert,this._touched=!0===this._touched,this.controller.componentWillLoad(),this.state._hasValue=!!this.state._value,this.controller.addValueChangeListener((e=>this.state._hasValue=!!e))}get host(){return(0,i.g)(this)}static get watchers(){return{_accessKey:["validateAccessKey"],_alert:["validateAlert"],_autoComplete:["validateAutoComplete"],_disabled:["validateDisabled"],_error:["validateError"],_hideError:["validateHideError"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_max:["validateMax"],_min:["validateMin"],_msg:["validateMsg"],_name:["validateName"],_on:["validateOn"],_placeholder:["validatePlaceholder"],_readOnly:["validateReadOnly"],_required:["validateRequired"],_smartButton:["validateSmartButton"],_suggestions:["validateSuggestions"],_step:["validateStep"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_touched:["validateTouched"],_value:["validateValue"]}}};m.style={default:"/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: 44px;\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of 44px.\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]),\n .kol-input .input {\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\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 clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px;\n}\n\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n border: none;\n margin: 0;\n padding: 0;\n width: 100%; /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n .kol-span-wc {\n display: grid;\n place-items: center;\n }\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n .kol-span-wc > span {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n /* This is the text label. */\n .hide-label > .kol-span-wc > span > span {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span-wc,\n [disabled]:focus .kol-span-wc {\n outline: none !important;\n }\n}\n@layer kol-component {\n .required label > span::after,\n .required legend > span::after {\n content: \"*\";\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n input,\n textarea {\n cursor: text;\n }\n input[type=checkbox],\n input[type=color],\n input[type=file],\n input[type=radio],\n input[type=range],\n label,\n option,\n select {\n cursor: pointer;\n }\n /* input[type='checkbox'], */\n /* input[type='radio'], */\n /* input[type='range'], */\n input[type=color],\n input[type=date],\n input[type=datetime-local],\n input[type=email],\n input[type=file],\n input[type=month],\n input[type=number],\n input[type=password],\n input[type=search],\n input[type=tel],\n input[type=text],\n input[type=time],\n input[type=url],\n input[type=week],\n select,\n select[multiple] option,\n textarea {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n width: 100%;\n }\n /* needed hack for vertical alignment */\n input[type=file] {\n padding: calc((var(--a11y-min-size) - (16rem / var(--kolibri-root-font-size, 16))) / 10) 0.5em;\n }\n /* needed hack for vertical alignment */\n select[multiple] option {\n padding: calc((var(--a11y-min-size) - (16rem / var(--kolibri-root-font-size, 16))) / 2) 0.5em;\n }\n}\n@layer kol-component {\n .kol-input {\n display: grid;\n }\n .kol-input .input-slot {\n flex-grow: 1;\n }\n input:not([type=checkbox], [type=radio]),\n select:not([multiple], [size]) {\n height: 2.75em;\n }\n input:focus,\n option:focus,\n select:focus,\n textarea:focus {\n outline: 0;\n }\n .input {\n display: flex;\n align-items: center;\n }\n .input > .kol-icon {\n display: grid;\n height: var(--a11y-min-size);\n place-items: center;\n }\n .kol-input.required .input-tooltip .span-label::after {\n content: \"*\";\n }\n}\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: 44px;\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of 44px.\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]),\n .kol-input .input {\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\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 clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px;\n}\n\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n border: none;\n margin: 0;\n padding: 0;\n width: 100%; /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n .kol-span-wc {\n display: grid;\n place-items: center;\n }\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n .kol-span-wc > span {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n /* This is the text label. */\n .hide-label > .kol-span-wc > span > span {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span-wc,\n [disabled]:focus .kol-span-wc {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n .kol-alert-wc {\n display: grid;\n }\n .kol-alert-wc .heading {\n display: flex;\n place-items: center;\n }\n .kol-alert-wc .heading > div {\n flex-grow: 1;\n }\n .close {\n /* Visible with forced colors */\n outline: transparent solid 1px;\n }\n}\n@layer kol-component {\n :host {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n}"}},2028:(e,t,n)=>{n.d(t,{v:()=>a});var i=n(121);const a=(e,t)=>{(0,i.g)(e,"_suggestions",(e=>"string"==typeof e||"number"==typeof e),t,void 0,{hooks:{afterPatch:e=>{Array.isArray(e)&&e.length&&(0,i.a)("Property suggestions: Options have accessibility issues in how browsers implemented them and should not be used for now.")}}})}}}]);