@public-ui/sample-react 2.1.2 → 2.1.4-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/1069.js +2 -0
- package/dist/1085.js +2 -0
- package/dist/1184.js +2 -0
- package/dist/1222.js +2 -0
- package/dist/1278.js +1 -1
- package/dist/1325.js +2 -0
- package/dist/1333.js +2 -0
- package/dist/1661.js +2 -0
- package/dist/1703.js +2 -0
- package/dist/1711.js +2 -0
- package/dist/1771.js +2 -0
- package/dist/1792.js +2 -0
- package/dist/1793.js +2 -0
- package/dist/1878.js +2 -0
- package/dist/1957.js +2 -0
- package/dist/2305.js +2 -0
- package/dist/2471.js +2 -0
- package/dist/2538.js +2 -0
- package/dist/279.js +2 -0
- package/dist/2830.js +2 -0
- package/dist/3180.js +2 -0
- package/dist/3332.js +2 -0
- package/dist/{7055.js → 3454.js} +2 -2
- package/dist/3596.js +2 -0
- package/dist/{9730.js → 3714.js} +2 -2
- package/dist/3797.js +2 -0
- package/dist/3974.js +2 -0
- package/dist/3990.js +2 -0
- package/dist/4014.js +1 -1
- package/dist/4102.js +2 -0
- package/dist/4218.js +2 -0
- package/dist/{5599.js → 4303.js} +2 -2
- package/dist/4404.js +2 -0
- package/dist/453.js +2 -0
- package/dist/4941.js +2 -0
- package/dist/500.js +2 -0
- package/dist/5139.js +2 -0
- package/dist/5164.js +2 -0
- package/dist/5365.js +2 -0
- package/dist/{4212.js → 5540.js} +2 -2
- package/dist/{7132.js → 5756.js} +2 -2
- package/dist/6393.js +2 -0
- package/dist/6682.js +2 -0
- package/dist/6781.js +2 -0
- package/dist/7100.js +2 -0
- package/dist/7238.js +2 -0
- package/dist/{3869.js → 7245.js} +2 -2
- package/dist/{2879.js → 7263.js} +2 -2
- package/dist/7512.js +2 -0
- package/dist/7856.js +2 -0
- package/dist/8002.js +2 -0
- package/dist/8189.js +2 -0
- package/dist/8264.js +2 -0
- package/dist/8384.js +2 -0
- package/dist/8389.js +2 -0
- package/dist/8515.js +2 -0
- package/dist/8557.js +2 -0
- package/dist/8588.js +2 -0
- package/dist/8631.js +2 -0
- package/dist/{1524.js → 8724.js} +2 -2
- package/dist/8791.js +2 -0
- package/dist/882.js +2 -0
- package/dist/8823.js +2 -0
- package/dist/895.js +2 -0
- package/dist/{2545.js → 8993.js} +2 -2
- package/dist/902.js +2 -0
- package/dist/9175.js +2 -0
- package/dist/9202.js +2 -0
- package/dist/9265.js +2 -0
- package/dist/9833.js +2 -0
- package/dist/9961.js +2 -0
- package/dist/main.js +1 -1
- package/dist/main.js.LICENSE.txt +2 -2
- package/package.json +13 -13
- package/src/components/FormWrap.tsx +22 -29
- package/src/components/alert/basic.tsx +1 -1
- package/src/components/button/basic.tsx +2 -3
- package/src/components/button/partials/cases.tsx +5 -5
- package/src/components/button/partials/variants.tsx +7 -8
- package/src/components/card/routes.ts +0 -2
- package/src/components/combobox/partials/cases.tsx +3 -3
- package/src/components/combobox/partials/variants.tsx +3 -3
- package/src/components/drawer/basic.tsx +61 -0
- package/src/components/drawer/controlled.tsx +47 -0
- package/src/components/drawer/partials/align.tsx +26 -0
- package/src/components/drawer/routes.ts +10 -0
- package/src/components/handout/basic.tsx +5 -550
- package/src/components/handout/table-data.ts +543 -0
- package/src/components/input-checkbox/button.tsx +3 -2
- package/src/components/input-password/show-password.tsx +3 -41
- package/src/components/input-text/routes.ts +0 -2
- package/src/components/skip-nav/basic.tsx +3 -3
- package/src/components/table/badge-size.tsx +4 -4
- package/src/components/table/column-alignment.tsx +1 -2
- package/src/components/table/horizontal-scrollbar.tsx +1 -1
- package/src/components/table/render-cell.tsx +1 -1
- package/src/components/table/sort-data.tsx +6 -6
- package/src/components/table/stateful-with-selection.tsx +8 -6
- package/src/components/table/stateless-with-selection.tsx +6 -4
- package/src/components/tabs/basic.tsx +1 -1
- package/src/components/tabs/icons-only.tsx +2 -1
- package/src/scenarios/focus-elements.tsx +140 -0
- package/src/scenarios/inputs-get-value.tsx +15 -2
- package/src/scenarios/routes.ts +2 -0
- package/src/scenarios/static-form.tsx +3 -0
- package/src/shares/routes.ts +2 -0
- package/dist/1016.js +0 -2
- package/dist/121.js +0 -2
- package/dist/1443.js +0 -2
- package/dist/149.js +0 -2
- package/dist/2072.js +0 -2
- package/dist/2221.js +0 -2
- package/dist/2252.js +0 -2
- package/dist/2256.js +0 -2
- package/dist/2381.js +0 -2
- package/dist/2416.js +0 -2
- package/dist/2615.js +0 -2
- package/dist/263.js +0 -2
- package/dist/2639.js +0 -2
- package/dist/2657.js +0 -2
- package/dist/2669.js +0 -2
- package/dist/277.js +0 -2
- package/dist/2858.js +0 -2
- package/dist/3110.js +0 -2
- package/dist/3261.js +0 -2
- package/dist/3353.js +0 -2
- package/dist/3510.js +0 -2
- package/dist/3563.js +0 -2
- package/dist/4082.js +0 -2
- package/dist/4156.js +0 -2
- package/dist/4177.js +0 -2
- package/dist/4178.js +0 -2
- package/dist/4179.js +0 -2
- package/dist/4318.js +0 -2
- package/dist/4346.js +0 -2
- package/dist/4486.js +0 -2
- package/dist/4702.js +0 -2
- package/dist/4723.js +0 -2
- package/dist/4893.js +0 -2
- package/dist/5018.js +0 -2
- package/dist/5157.js +0 -2
- package/dist/5244.js +0 -2
- package/dist/5350.js +0 -2
- package/dist/5670.js +0 -2
- package/dist/5716.js +0 -2
- package/dist/5973.js +0 -2
- package/dist/605.js +0 -2
- package/dist/6284.js +0 -2
- package/dist/6295.js +0 -2
- package/dist/6402.js +0 -2
- package/dist/6596.js +0 -2
- package/dist/6629.js +0 -2
- package/dist/6636.js +0 -2
- package/dist/6716.js +0 -2
- package/dist/7219.js +0 -2
- package/dist/7305.js +0 -2
- package/dist/7367.js +0 -2
- package/dist/7372.js +0 -2
- package/dist/7533.js +0 -2
- package/dist/7677.js +0 -2
- package/dist/8310.js +0 -2
- package/dist/8516.js +0 -2
- package/dist/8642.js +0 -2
- package/dist/8797.js +0 -2
- package/dist/8804.js +0 -2
- package/dist/8809.js +0 -2
- package/dist/8928.js +0 -2
- package/dist/9031.js +0 -2
- package/dist/9031.js.LICENSE.txt +0 -3
- package/dist/9116.js +0 -2
- package/dist/9116.js.LICENSE.txt +0 -3
- package/dist/9344.js +0 -2
- package/dist/9344.js.LICENSE.txt +0 -3
- package/dist/9673.js +0 -2
- package/dist/9673.js.LICENSE.txt +0 -3
- package/dist/9730.js.LICENSE.txt +0 -3
- package/src/components/FocusInput.tsx +0 -23
- package/src/components/input-text/focus.tsx +0 -33
- package/src/components/types.tsx +0 -43
- /package/dist/{1016.js.LICENSE.txt → 1069.js.LICENSE.txt} +0 -0
- /package/dist/{121.js.LICENSE.txt → 1085.js.LICENSE.txt} +0 -0
- /package/dist/{1443.js.LICENSE.txt → 1184.js.LICENSE.txt} +0 -0
- /package/dist/{149.js.LICENSE.txt → 1222.js.LICENSE.txt} +0 -0
- /package/dist/{1524.js.LICENSE.txt → 1325.js.LICENSE.txt} +0 -0
- /package/dist/{2072.js.LICENSE.txt → 1333.js.LICENSE.txt} +0 -0
- /package/dist/{2221.js.LICENSE.txt → 1661.js.LICENSE.txt} +0 -0
- /package/dist/{2252.js.LICENSE.txt → 1703.js.LICENSE.txt} +0 -0
- /package/dist/{2256.js.LICENSE.txt → 1711.js.LICENSE.txt} +0 -0
- /package/dist/{2381.js.LICENSE.txt → 1771.js.LICENSE.txt} +0 -0
- /package/dist/{2416.js.LICENSE.txt → 1792.js.LICENSE.txt} +0 -0
- /package/dist/{2545.js.LICENSE.txt → 1793.js.LICENSE.txt} +0 -0
- /package/dist/{2615.js.LICENSE.txt → 1878.js.LICENSE.txt} +0 -0
- /package/dist/{263.js.LICENSE.txt → 1957.js.LICENSE.txt} +0 -0
- /package/dist/{2639.js.LICENSE.txt → 2305.js.LICENSE.txt} +0 -0
- /package/dist/{2657.js.LICENSE.txt → 2471.js.LICENSE.txt} +0 -0
- /package/dist/{2669.js.LICENSE.txt → 2538.js.LICENSE.txt} +0 -0
- /package/dist/{277.js.LICENSE.txt → 279.js.LICENSE.txt} +0 -0
- /package/dist/{2858.js.LICENSE.txt → 2830.js.LICENSE.txt} +0 -0
- /package/dist/{2879.js.LICENSE.txt → 3180.js.LICENSE.txt} +0 -0
- /package/dist/{3110.js.LICENSE.txt → 3332.js.LICENSE.txt} +0 -0
- /package/dist/{3261.js.LICENSE.txt → 3454.js.LICENSE.txt} +0 -0
- /package/dist/{3353.js.LICENSE.txt → 3596.js.LICENSE.txt} +0 -0
- /package/dist/{3510.js.LICENSE.txt → 3714.js.LICENSE.txt} +0 -0
- /package/dist/{3563.js.LICENSE.txt → 3797.js.LICENSE.txt} +0 -0
- /package/dist/{3869.js.LICENSE.txt → 3974.js.LICENSE.txt} +0 -0
- /package/dist/{4082.js.LICENSE.txt → 3990.js.LICENSE.txt} +0 -0
- /package/dist/{4156.js.LICENSE.txt → 4102.js.LICENSE.txt} +0 -0
- /package/dist/{4177.js.LICENSE.txt → 4218.js.LICENSE.txt} +0 -0
- /package/dist/{4178.js.LICENSE.txt → 4303.js.LICENSE.txt} +0 -0
- /package/dist/{4179.js.LICENSE.txt → 4404.js.LICENSE.txt} +0 -0
- /package/dist/{4212.js.LICENSE.txt → 453.js.LICENSE.txt} +0 -0
- /package/dist/{4318.js.LICENSE.txt → 4941.js.LICENSE.txt} +0 -0
- /package/dist/{4346.js.LICENSE.txt → 500.js.LICENSE.txt} +0 -0
- /package/dist/{4486.js.LICENSE.txt → 5139.js.LICENSE.txt} +0 -0
- /package/dist/{4702.js.LICENSE.txt → 5164.js.LICENSE.txt} +0 -0
- /package/dist/{4723.js.LICENSE.txt → 5365.js.LICENSE.txt} +0 -0
- /package/dist/{4893.js.LICENSE.txt → 5540.js.LICENSE.txt} +0 -0
- /package/dist/{5018.js.LICENSE.txt → 5756.js.LICENSE.txt} +0 -0
- /package/dist/{5157.js.LICENSE.txt → 6393.js.LICENSE.txt} +0 -0
- /package/dist/{5244.js.LICENSE.txt → 6682.js.LICENSE.txt} +0 -0
- /package/dist/{5350.js.LICENSE.txt → 6781.js.LICENSE.txt} +0 -0
- /package/dist/{5599.js.LICENSE.txt → 7100.js.LICENSE.txt} +0 -0
- /package/dist/{5670.js.LICENSE.txt → 7238.js.LICENSE.txt} +0 -0
- /package/dist/{5716.js.LICENSE.txt → 7245.js.LICENSE.txt} +0 -0
- /package/dist/{5973.js.LICENSE.txt → 7263.js.LICENSE.txt} +0 -0
- /package/dist/{605.js.LICENSE.txt → 7512.js.LICENSE.txt} +0 -0
- /package/dist/{6284.js.LICENSE.txt → 7856.js.LICENSE.txt} +0 -0
- /package/dist/{6295.js.LICENSE.txt → 8002.js.LICENSE.txt} +0 -0
- /package/dist/{6402.js.LICENSE.txt → 8189.js.LICENSE.txt} +0 -0
- /package/dist/{6596.js.LICENSE.txt → 8264.js.LICENSE.txt} +0 -0
- /package/dist/{6629.js.LICENSE.txt → 8384.js.LICENSE.txt} +0 -0
- /package/dist/{6636.js.LICENSE.txt → 8389.js.LICENSE.txt} +0 -0
- /package/dist/{6716.js.LICENSE.txt → 8515.js.LICENSE.txt} +0 -0
- /package/dist/{7055.js.LICENSE.txt → 8557.js.LICENSE.txt} +0 -0
- /package/dist/{7132.js.LICENSE.txt → 8588.js.LICENSE.txt} +0 -0
- /package/dist/{7219.js.LICENSE.txt → 8631.js.LICENSE.txt} +0 -0
- /package/dist/{7305.js.LICENSE.txt → 8724.js.LICENSE.txt} +0 -0
- /package/dist/{7367.js.LICENSE.txt → 8791.js.LICENSE.txt} +0 -0
- /package/dist/{7372.js.LICENSE.txt → 882.js.LICENSE.txt} +0 -0
- /package/dist/{7533.js.LICENSE.txt → 8823.js.LICENSE.txt} +0 -0
- /package/dist/{7677.js.LICENSE.txt → 895.js.LICENSE.txt} +0 -0
- /package/dist/{8310.js.LICENSE.txt → 8993.js.LICENSE.txt} +0 -0
- /package/dist/{8516.js.LICENSE.txt → 902.js.LICENSE.txt} +0 -0
- /package/dist/{8642.js.LICENSE.txt → 9175.js.LICENSE.txt} +0 -0
- /package/dist/{8797.js.LICENSE.txt → 9202.js.LICENSE.txt} +0 -0
- /package/dist/{8804.js.LICENSE.txt → 9265.js.LICENSE.txt} +0 -0
- /package/dist/{8809.js.LICENSE.txt → 9833.js.LICENSE.txt} +0 -0
- /package/dist/{8928.js.LICENSE.txt → 9961.js.LICENSE.txt} +0 -0
|
@@ -69,7 +69,7 @@ const HEADERS: KoliBriTableHeaders = {
|
|
|
69
69
|
render: (el, cell) => {
|
|
70
70
|
el.innerHTML = `<strong>${DATE_FORMATTER.format(cell.label as unknown as Date)}</strong>`;
|
|
71
71
|
},
|
|
72
|
-
sort: (data
|
|
72
|
+
sort: (data) => data.sort((data0, data1) => (data0 as Data).date.getTime() - (data1 as Data).date.getTime()),
|
|
73
73
|
},
|
|
74
74
|
{
|
|
75
75
|
label: 'Action (react)',
|
|
@@ -22,10 +22,10 @@ const HEADERS_HORIZONTAL: KoliBriTableHeaders = {
|
|
|
22
22
|
key: 'date',
|
|
23
23
|
textAlign: 'center',
|
|
24
24
|
render: (_el, _cell, tupel) => DATE_FORMATTER.format((tupel as Data).date),
|
|
25
|
-
sort: (data
|
|
25
|
+
sort: (data) =>
|
|
26
26
|
data.sort((data0, data1) => {
|
|
27
|
-
if (data0.date < data1.date) return -1;
|
|
28
|
-
else if (data1.date < data0.date) return 1;
|
|
27
|
+
if ((data0 as Data).date < (data1 as Data).date) return -1;
|
|
28
|
+
else if ((data1 as Data).date < (data0 as Data).date) return 1;
|
|
29
29
|
else return 0;
|
|
30
30
|
}),
|
|
31
31
|
},
|
|
@@ -42,10 +42,10 @@ const HEADERS_VERTICAL: KoliBriTableHeaders = {
|
|
|
42
42
|
key: 'date',
|
|
43
43
|
textAlign: 'center',
|
|
44
44
|
render: (_el, _cell, tupel) => DATE_FORMATTER.format((tupel as Data).date),
|
|
45
|
-
sort: (data
|
|
45
|
+
sort: (data) =>
|
|
46
46
|
data.sort((data0, data1) => {
|
|
47
|
-
if (data0.date < data1.date) return -1;
|
|
48
|
-
else if (data1.date < data0.date) return 1;
|
|
47
|
+
if ((data0 as Data).date < (data1 as Data).date) return -1;
|
|
48
|
+
else if ((data1 as Data).date < (data0 as Data).date) return 1;
|
|
49
49
|
else return 0;
|
|
50
50
|
}),
|
|
51
51
|
},
|
|
@@ -2,7 +2,7 @@ import type { FC } from 'react';
|
|
|
2
2
|
import React, { useEffect, useRef, useState } from 'react';
|
|
3
3
|
import { KolButton, KolTableStateful } from '@public-ui/react';
|
|
4
4
|
import { SampleDescription } from '../SampleDescription';
|
|
5
|
-
import type { KoliBriTableSelection } from '@public-ui/components';
|
|
5
|
+
import type { KoliBriTableDataType, KoliBriTableSelection } from '@public-ui/components';
|
|
6
6
|
|
|
7
7
|
const DATA = [
|
|
8
8
|
{ id: '1001', name: 'Foo Bar' },
|
|
@@ -14,29 +14,31 @@ export const TableStatefulWithSelection: FC = () => {
|
|
|
14
14
|
const [selectedValue, setSelectedValue] = useState<Data[]>();
|
|
15
15
|
|
|
16
16
|
const selection: KoliBriTableSelection = {
|
|
17
|
-
label: (row
|
|
17
|
+
label: (row) => `Selection for ${(row as Data).name}`,
|
|
18
18
|
selectedKeys: selectedValue ? selectedValue.map((element) => element.id) : [],
|
|
19
19
|
keyPropertyName: 'id',
|
|
20
20
|
};
|
|
21
21
|
|
|
22
|
-
const kolTableStatefulRef = useRef<HTMLKolTableStatefulElement>();
|
|
22
|
+
const kolTableStatefulRef = useRef<HTMLKolTableStatefulElement>(null);
|
|
23
23
|
|
|
24
|
-
const handleSelectionChangeEvent = ({ detail: selection }) => {
|
|
24
|
+
const handleSelectionChangeEvent = ({ detail: selection }: { detail: Data[] }) => {
|
|
25
25
|
console.log('Selection change via event', selection);
|
|
26
26
|
};
|
|
27
|
-
const handleSelectionChangeCallback = (_event, selection) => {
|
|
27
|
+
const handleSelectionChangeCallback = (_event: Event, selection: KoliBriTableDataType[]) => {
|
|
28
28
|
console.log('Selection change via callback', selection);
|
|
29
29
|
};
|
|
30
30
|
|
|
31
31
|
const handleButtonClick = async () => {
|
|
32
32
|
const selection = await kolTableStatefulRef.current?.getSelection();
|
|
33
|
-
setSelectedValue(selection);
|
|
33
|
+
setSelectedValue(selection as Data[]);
|
|
34
34
|
};
|
|
35
35
|
|
|
36
36
|
useEffect(() => {
|
|
37
|
+
// @ts-expect-error https://github.com/Microsoft/TypeScript/issues/28357
|
|
37
38
|
kolTableStatefulRef.current?.addEventListener('kol-selection-change', handleSelectionChangeEvent);
|
|
38
39
|
|
|
39
40
|
return () => {
|
|
41
|
+
// @ts-expect-error https://github.com/Microsoft/TypeScript/issues/28357
|
|
40
42
|
kolTableStatefulRef.current?.removeEventListener('kol-selection-change', handleSelectionChangeEvent);
|
|
41
43
|
};
|
|
42
44
|
}, [kolTableStatefulRef]);
|
|
@@ -12,24 +12,26 @@ type Data = (typeof DATA)[0];
|
|
|
12
12
|
|
|
13
13
|
export const TableStatelessWithSelection: FC = () => {
|
|
14
14
|
const selection: KoliBriTableSelection = {
|
|
15
|
-
label: (row
|
|
15
|
+
label: (row) => `Selection for ${(row as Data).name}`,
|
|
16
16
|
selectedKeys: ['1002'],
|
|
17
17
|
keyPropertyName: 'id',
|
|
18
18
|
};
|
|
19
19
|
|
|
20
|
-
const kolTableStatelessRef = useRef<HTMLKolTableStatelessElement>();
|
|
20
|
+
const kolTableStatelessRef = useRef<HTMLKolTableStatelessElement>(null);
|
|
21
21
|
|
|
22
|
-
const handleSelectionChangeEvent = ({ detail: selection }) => {
|
|
22
|
+
const handleSelectionChangeEvent = ({ detail: selection }: { detail: string[] }) => {
|
|
23
23
|
console.log('Selection change via event', selection);
|
|
24
24
|
};
|
|
25
|
-
const handleSelectionChangeCallback = (_event, selection) => {
|
|
25
|
+
const handleSelectionChangeCallback = (_event: Event, selection: string[]) => {
|
|
26
26
|
console.log('Selection change via callback', selection);
|
|
27
27
|
};
|
|
28
28
|
|
|
29
29
|
useEffect(() => {
|
|
30
|
+
// @ts-expect-error https://github.com/Microsoft/TypeScript/issues/28357
|
|
30
31
|
kolTableStatelessRef.current?.addEventListener('kol-selection-change', handleSelectionChangeEvent);
|
|
31
32
|
|
|
32
33
|
return () => {
|
|
34
|
+
// @ts-expect-error https://github.com/Microsoft/TypeScript/issues/28357
|
|
33
35
|
kolTableStatelessRef.current?.removeEventListener('kol-selection-change', handleSelectionChangeEvent);
|
|
34
36
|
};
|
|
35
37
|
}, [kolTableStatelessRef]);
|
|
@@ -32,7 +32,8 @@ export const TabsIconsOnly: FC = () => (
|
|
|
32
32
|
<SampleDescription>
|
|
33
33
|
<p>Hier sind verschiedene Varianten von Tabs mit Icons. Nur der Inhalt eines Tabs wird gleichzeitig angezeigt.</p>
|
|
34
34
|
</SampleDescription>
|
|
35
|
-
|
|
35
|
+
|
|
36
|
+
<KolTabs _label="Tabs with icons" _tabs={tabs}>
|
|
36
37
|
<div slot="tab-0">Inhalte von Tab 1</div>
|
|
37
38
|
<div slot="tab-1">Inhalte von Tab 2</div>
|
|
38
39
|
<div slot="tab-2">Inhalte von Tab 3</div>
|
|
@@ -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
|
+
};
|
|
@@ -16,12 +16,16 @@ import {
|
|
|
16
16
|
KolInputRange,
|
|
17
17
|
KolInputText,
|
|
18
18
|
KolSelect,
|
|
19
|
+
KolCombobox,
|
|
19
20
|
KolTextarea,
|
|
20
21
|
} from '@public-ui/react';
|
|
21
22
|
|
|
22
23
|
import { SampleDescription } from '../components/SampleDescription';
|
|
24
|
+
import { COUNTRY_SUGGESTIONS } from '../shares/country';
|
|
23
25
|
|
|
24
26
|
import type { HTMLStencilElement } from '@stencil/core/internal';
|
|
27
|
+
import type { W3CInputValue } from '@public-ui/components';
|
|
28
|
+
|
|
25
29
|
const EventTargetContext = createContext<EventTarget | undefined>(undefined);
|
|
26
30
|
const EventLoggerActiveContext = createContext<boolean>(false);
|
|
27
31
|
|
|
@@ -55,7 +59,7 @@ const Scenario = (props: Props) => {
|
|
|
55
59
|
const eventListeners = Object.fromEntries(
|
|
56
60
|
['onInput', 'onChange', 'onBlur', 'onClick', 'onFocus', 'onMouseDown'].map((eventName) => [
|
|
57
61
|
eventName,
|
|
58
|
-
(event, value) => {
|
|
62
|
+
(event: Event, value: W3CInputValue) => {
|
|
59
63
|
if (eventLoggerActive) {
|
|
60
64
|
console.log(props.inputProps._label, eventName, value, event);
|
|
61
65
|
}
|
|
@@ -105,7 +109,8 @@ export const InputsGetValue: FC = () => {
|
|
|
105
109
|
|
|
106
110
|
<div className="grid gap-4">
|
|
107
111
|
<Scenario InputComponent={KolInputText} inputProps={{ _label: 'InputText' }} />
|
|
108
|
-
<Scenario InputComponent={KolInputCheckbox} inputProps={{ _label: 'KolInputCheckbox' }} />
|
|
112
|
+
<Scenario InputComponent={KolInputCheckbox} inputProps={{ _label: 'KolInputCheckbox (value)', _value: 'Checkbox True Value' }} />
|
|
113
|
+
<Scenario InputComponent={KolInputCheckbox} inputProps={{ _label: 'KolInputCheckbox (boolean)' }} />
|
|
109
114
|
<Scenario InputComponent={KolInputColor} inputProps={{ _label: 'KolInputColor' }} />
|
|
110
115
|
<Scenario InputComponent={KolInputDate} inputProps={{ _label: 'KolInputDate' }} />
|
|
111
116
|
<Scenario InputComponent={KolInputEmail} inputProps={{ _label: 'KolInputEmail' }} />
|
|
@@ -147,6 +152,14 @@ export const InputsGetValue: FC = () => {
|
|
|
147
152
|
],
|
|
148
153
|
}}
|
|
149
154
|
/>
|
|
155
|
+
<Scenario
|
|
156
|
+
InputComponent={KolCombobox}
|
|
157
|
+
inputProps={{
|
|
158
|
+
_label: 'KolCombobox',
|
|
159
|
+
_suggestions: COUNTRY_SUGGESTIONS,
|
|
160
|
+
_value: 'Deutschland',
|
|
161
|
+
}}
|
|
162
|
+
/>
|
|
150
163
|
<Scenario
|
|
151
164
|
InputComponent={KolTextarea}
|
|
152
165
|
inputProps={{
|
package/src/scenarios/routes.ts
CHANGED
|
@@ -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
|
};
|
|
@@ -11,11 +11,13 @@ import {
|
|
|
11
11
|
KolInputRange,
|
|
12
12
|
KolInputText,
|
|
13
13
|
KolSelect,
|
|
14
|
+
KolCombobox,
|
|
14
15
|
KolTextarea,
|
|
15
16
|
} from '@public-ui/react';
|
|
16
17
|
import type { FC } from 'react';
|
|
17
18
|
import React from 'react';
|
|
18
19
|
import { SampleDescription } from '../components/SampleDescription';
|
|
20
|
+
import { COUNTRY_SUGGESTIONS } from '../shares/country';
|
|
19
21
|
|
|
20
22
|
export const StaticForm: FC = () => {
|
|
21
23
|
const { searchParams } = new URL(location.href);
|
|
@@ -90,6 +92,7 @@ export const StaticForm: FC = () => {
|
|
|
90
92
|
]}
|
|
91
93
|
_rows={2}
|
|
92
94
|
/>
|
|
95
|
+
<KolCombobox _name="combobox" _label="Combobox" _suggestions={COUNTRY_SUGGESTIONS} />
|
|
93
96
|
<KolTextarea _name="textarea" _label="Textarea" _rows={5} />
|
|
94
97
|
<div className="flex flex-wrap gap-4">
|
|
95
98
|
<KolButton _label="Submit" _type="submit" _variant="primary" />
|
package/src/shares/routes.ts
CHANGED
|
@@ -9,6 +9,7 @@ import { BUTTON_LINK_ROUTES } from '../components/button-link/routes';
|
|
|
9
9
|
import { BUTTON_ROUTES } from '../components/button/routes';
|
|
10
10
|
import { CARD_ROUTES } from '../components/card/routes';
|
|
11
11
|
import { DETAILS_ROUTES } from '../components/details/routes';
|
|
12
|
+
import { DRAWER_ROUTES } from '../components/drawer/routes';
|
|
12
13
|
import { FORM_ROUTES } from '../components/form/routes';
|
|
13
14
|
import { HANDOUT_ROUTES } from '../components/handout/routes';
|
|
14
15
|
import { HEADING_ROUTES } from '../components/heading/routes';
|
|
@@ -63,6 +64,7 @@ export const ROUTES: Routes = {
|
|
|
63
64
|
...CARD_ROUTES,
|
|
64
65
|
...COMBOBOX_ROUTES,
|
|
65
66
|
...DETAILS_ROUTES,
|
|
67
|
+
...DRAWER_ROUTES,
|
|
66
68
|
...FORM_ROUTES,
|
|
67
69
|
...HEADING_ROUTES,
|
|
68
70
|
...ICON_ROUTES,
|
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 (‘).")}}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/1443.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 1443.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunk_public_ui_sample_react=self.webpackChunk_public_ui_sample_react||[]).push([[1443],{1443:(n,e,t)=>{t.r(e),t.d(e,{kol_link_button:()=>a});var i=t(3685),o=t(1301),s=t(2466);const a=class{constructor(n){(0,i.r)(this,n),this.catchRef=n=>{(0,s.a)(this.host,n)},this._accessKey=void 0,this._ariaCurrentValue=void 0,this._customClass=void 0,this._disabled=!1,this._download=void 0,this._hideLabel=!1,this._href=void 0,this._icons=void 0,this._label=void 0,this._on=void 0,this._role=void 0,this._tabIndex=void 0,this._target=void 0,this._tooltipAlign="right",this._variant="normal"}render(){return(0,i.h)(i.H,{key:"48b7c1ddbc5bf67ffcd240f66344f2726421e504",class:"kol-link-button"},(0,i.h)(o.n,{key:"3c5dd469e4c56704f1b2965d835e6b8062f51830",ref:this.catchRef,class:{button:!0,[this._variant]:"custom"!==this._variant,[this._customClass]:"custom"===this._variant&&"string"==typeof this._customClass&&this._customClass.length>0},_accessKey:this._accessKey,_ariaCurrentValue:this._ariaCurrentValue,_disabled:this._disabled,_download:this._download,_hideLabel:this._hideLabel,_href:this._href,_icons:this._icons,_label:this._label,_on:this._on,_role:"button",_tabIndex:this._tabIndex,_target:this._target,_tooltipAlign:this._tooltipAlign},(0,i.h)("slot",{key:"55d4e4041b79de0efc434b0effea997c85a0958c",name:"expert",slot:"expert"})))}get host(){return(0,i.g)(this)}};a.style={default:"@charset \"UTF-8\";\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 font-style: calc(16rem / var(--kolibri-root-font-size, 16));\n display: inline-block;\n }\n :is(a, button) {\n display: inline-flex;\n place-items: center;\n text-align: center;\n text-decoration-line: none;\n }\n :is(a, button)::before {\n /* Render zero-width character as first element to set the baseline correctly. */\n content: \"\";\n }\n /* TODO: Why we need this? */\n :is(a, button) > .kol-span-wc {\n margin: auto;\n width: 100%;\n }\n}"}}}]);
|
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/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/2221.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 2221.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunk_public_ui_sample_react=self.webpackChunk_public_ui_sample_react||[]).push([[2221],{2221:(n,e,t)=>{t.r(e),t.d(e,{kol_indented_text:()=>o});var i=t(3685);const o=class{constructor(n){(0,i.r)(this,n),this.state={}}render(){return(0,i.h)(i.H,{key:"6097077f44baffeaab91669a12c8e3897f83e46a",class:"kol-indented-text-wc"},(0,i.h)("div",{key:"b534e57df62b8714e6bed627268ce784a67490f8"},(0,i.h)("slot",{key:"99d0151973c297b5f23acfb2217b4c41b58327b6"})))}};o.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@layer kol-component {\n :host {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n :host > div {\n border-left-style: solid;\n padding-left: 0.5em;\n }\n}"}}}]);
|
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.")}}})}}}]);
|
package/dist/2256.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 2256.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunk_public_ui_sample_react=self.webpackChunk_public_ui_sample_react||[]).push([[2256],{4688:(t,i,e)=>{e.d(i,{F:()=>o});var s=e(3685),a=e(1301);const o=({_alert:t,_msg:i,_hideError:e,_id:o})=>(0,s.h)(a.d,Object.assign({"aria-hidden":"true",id:`${o}-error`,_alert:t,_type:"error",class:{error:!0,"visually-hidden":!0===e}},i),(null==i?void 0:i._description)||void 0)},8426:(t,i,e)=>{e.d(i,{t:()=>o});var s=e(7394),a=e(2466);let o=(t,i)=>{var e;return(null!==(e=(0,s.g)())&&void 0!==e?e:(0,s.i)("de")).translate(t,i)};"test"===a.p&&(o=t=>t)},2256:(t,i,e)=>{e.r(i),e.d(i,{kol_input:()=>d});var s=e(3685),a=e(8426),o=e(4688),l=e(1301),h=e(2466);function r(t){var i,e,s="";if("string"==typeof t||"number"==typeof t)s+=t;else if("object"==typeof t)if(Array.isArray(t)){var a=t.length;for(i=0;i<a;i++)t[i]&&(e=r(t[i]))&&(s&&(s+=" "),s+=e)}else for(e in t)t[e]&&(s&&(s+=" "),s+=e);return s}function n(){for(var t,i,e=0,s="",a=arguments.length;e<a;e++)(t=arguments[e])&&(i=r(t))&&(s&&(s+=" "),s+=i);return s}const d=class{constructor(t){(0,s.r)(this,t),this.slotName="input",this.catchInputSlot=t=>{(0,h.h)(this.host,t,this.slotName)},this._accessKey=void 0,this._alert=!0,this._currentLength=void 0,this._disabled=!1,this._hasCounter=!1,this._hideError=!1,this._hideLabel=!1,this._hint="",this._icons=void 0,this._id=void 0,this._label=void 0,this._maxLength=void 0,this._msg=void 0,this._readOnly=!1,this._renderNoLabel=!1,this._required=!1,this._slotName=void 0,this._suggestions=void 0,this._smartButton=void 0,this._tooltipAlign="top",this._touched=!1}componentWillRender(){this.slotName=this._slotName?this._slotName:"input"}getIconStyles(t){return t&&"object"==typeof t&&t.style?t.style:{}}render(){var t,i,e,r,d,_,c,u,b,f,g,p;const v=Boolean("error"===(null===(t=this._msg)||void 0===t?void 0:t._type)&&this._msg._description&&(null===(i=this._msg._description)||void 0===i?void 0:i.length)>0),y=!this._readOnly&&v&&!0===this._touched,m=Boolean(y||"error"!==(null===(e=this._msg)||void 0===e?void 0:e._type)&&(null===(r=this._msg)||void 0===r?void 0:r._description)),k=(0,h.s)(this._label),B="string"==typeof this._hint&&this._hint.length>0,L=!k&&this._hideLabel;return(0,s.h)(s.H,{key:"9c06a3c09f115feeb894dc7591756ec10667eca5",class:n("kol-input",this.getModifierClassNameByMsgType(),{disabled:!0===this._disabled,error:!0===y,"read-only":!0===this._readOnly,required:!0===this._required,touched:!0===this._touched,"hidden-error":!0===this._hideError})},(0,s.h)("label",{key:"1422b4945c13e4b88d284dfae59e969cb080f3e4",class:"input-label",id:L?void 0:`${this._id}-label`,hidden:L,htmlFor:this._id},(0,s.h)("span",{key:"de58719c55353655e34db3a85443f4b3063201e4",class:"input-label-span"},(0,s.h)("slot",{key:"558aa3c075ef092de6d192beb325f2defd406aca",name:"label"}))),B&&(0,s.h)("span",{key:"c29aeeabea1c1c48ebc8c060ee5f085a65582f95",class:"hint",id:`${this._id}-hint`},this._hint),(0,s.h)("div",{key:"77a150ca760d8b26ec7e2a2cb2ebb6190ed3c748",class:{input:!0,"icon-left":"object"==typeof(null===(d=this._icons)||void 0===d?void 0:d.left),"icon-right":"object"==typeof(null===(_=this._icons)||void 0===_?void 0:_.right)}},(null===(c=this._icons)||void 0===c?void 0:c.left)&&(0,s.h)(l.g,{key:"91485bd06330be0fbf6de460773b9bf2e4e8c1ba",_label:"",_icons:(null===(u=this._icons)||void 0===u?void 0:u.left).icon,style:this.getIconStyles(null===(b=this._icons)||void 0===b?void 0:b.left)}),(0,s.h)("div",{key:"00f88767c05428529c9d1ce274ae6c8a03f2e259",ref:this.catchInputSlot,id:this.slotName,class:"input-slot"}),"object"==typeof this._smartButton&&null!==this._smartButton&&(0,s.h)(l.c,{key:"4ca328a780e2a95dd18ab0fb8f57654e6ee9f43b",_customClass:this._smartButton._customClass,_disabled:this._smartButton._disabled,_icons:this._smartButton._icons,_hideLabel:!0,_id:this._smartButton._id,_label:this._smartButton._label,_on:this._smartButton._on,_tooltipAlign:this._smartButton._tooltipAlign,_variant:this._smartButton._variant}),(null===(f=this._icons)||void 0===f?void 0:f.right)&&(0,s.h)(l.g,{key:"4daf4db4e8a669cdd8c749b7296ab1b2da1e4a06",_label:"",_icons:(null===(g=this._icons)||void 0===g?void 0:g.right).icon,style:this.getIconStyles(null===(p=this._icons)||void 0===p?void 0:p.right)})),L&&(0,s.h)(l.a,{key:"2abc09595c2b383aa48b9af5f73f77ea3ea48169","aria-hidden":"true",class:"input-tooltip",_accessKey:this._accessKey,_align:this._tooltipAlign,_id:this._hideLabel?`${this._id}-label`:void 0,_label:this._label}),m&&(0,s.h)(o.F,{key:"682d59034d314a11bc1fa39940f5f9457e5f8ef8",_alert:this._alert,_hideError:this._hideError,_msg:this._msg,_id:this._id}),Array.isArray(this._suggestions)&&this._suggestions.length>0&&(0,s.h)("datalist",{key:"5f06bd47b6d135c9154412f1c3f8a4f2cf2b13ee",id:`${this._id}-list`},this._suggestions.map((t=>(0,s.h)("option",{value:t})))),this._hasCounter&&(0,s.h)("span",{key:"8baec4fa545909af2598ec851451b34fbaefafb7",class:"counter","aria-atomic":"true","aria-live":"polite"},this._currentLength,this._maxLength&&(0,s.h)(s.F,null,(0,s.h)("span",{key:"56d16164763271aac8302a6063bcdd675f679191","aria-label":(0,a.t)("kol-of"),role:"img"},"/"),this._maxLength)," ",(0,s.h)("span",{key:"cb75b8e24b69db57c8536185ad287024f732ec28"},(0,a.t)("kol-characters"))))}getModifierClassNameByMsgType(){var t,i;if(null===(t=this._msg)||void 0===t?void 0:t._type)return{default:"msg-type-default",info:"msg-type-info",success:"msg-type-success",warning:"msg-type-warning",error:"msg-type-error"}[null===(i=this._msg)||void 0===i?void 0:i._type]}get host(){return(0,s.g)(this)}}}}]);
|