@public-ui/sample-react 3.0.0-rc.2 → 3.0.0-rc.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/1055.js +2 -0
- package/dist/1068.js +1 -1
- package/dist/1219.js +1 -1
- package/dist/136.js +1 -1
- package/dist/1416.js +1 -1
- package/dist/1657.js +2 -0
- package/dist/1676.js +1 -1
- package/dist/{3241.js → 1714.js} +2 -2
- package/dist/1718.js +1 -1
- package/dist/1744.js +1 -1
- package/dist/1791.js +1 -1
- package/dist/2078.js +1 -1
- package/dist/2115.js +1 -1
- package/dist/2195.js +1 -1
- package/dist/3021.js +1 -1
- package/dist/3027.js +1 -1
- package/dist/3186.js +1 -1
- package/dist/364.js +1 -1
- package/dist/3758.js +1 -1
- package/dist/3836.js +1 -1
- package/dist/3872.js +1 -1
- package/dist/3879.js +1 -1
- package/dist/3949.js +1 -1
- package/dist/4211.js +1 -1
- package/dist/4350.js +1 -1
- package/dist/4390.js +1 -1
- package/dist/4566.js +1 -1
- package/dist/4662.js +1 -1
- package/dist/4928.js +1 -1
- package/dist/5000.js +1 -1
- package/dist/5151.js +1 -1
- package/dist/5171.js +1 -1
- package/dist/5792.js +1 -1
- package/dist/5876.js +1 -1
- package/dist/597.js +1 -1
- package/dist/6018.js +2 -0
- package/dist/{1298.js → 6203.js} +2 -2
- package/dist/6420.js +2 -0
- package/dist/6420.js.LICENSE.txt +3 -0
- package/dist/6451.js +1 -1
- package/dist/6480.js +1 -1
- package/dist/6577.js +1 -1
- package/dist/6983.js +1 -1
- package/dist/7084.js +1 -1
- package/dist/7225.js +1 -1
- package/dist/7267.js +1 -1
- package/dist/7958.js +1 -1
- package/dist/7997.js +1 -1
- package/dist/8069.js +1 -1
- package/dist/8177.js +1 -1
- package/dist/8212.js +1 -1
- package/dist/8243.js +1 -1
- package/dist/8283.js +1 -1
- package/dist/8478.js +1 -1
- package/dist/851.js +1 -1
- package/dist/8573.js +1 -1
- package/dist/8728.js +1 -1
- package/dist/8808.js +1 -1
- package/dist/8999.js +1 -1
- package/dist/9068.js +1 -1
- package/dist/9130.js +1 -1
- package/dist/9162.js +1 -1
- package/dist/9219.js +1 -1
- package/dist/9423.js +1 -1
- package/dist/9430.js +1 -1
- package/dist/9929.js +1 -1
- package/dist/993.js +1 -1
- package/dist/main.js +1 -1
- package/dist/main.js.LICENSE.txt +2 -2
- package/package.json +11 -11
- package/src/App.tsx +1 -1
- package/src/components/drawer/basic.tsx +2 -20
- package/src/components/drawer/controlled.tsx +0 -8
- package/src/components/form/error-list.tsx +38 -24
- package/src/components/input-color/partials/cases.tsx +4 -2
- package/src/components/input-date/partials/cases.tsx +6 -3
- package/src/components/input-email/partials/cases.tsx +6 -3
- package/src/components/input-file/partials/cases.tsx +6 -3
- package/src/components/input-password/partials/cases.tsx +8 -5
- package/src/components/input-range/partials/cases.tsx +6 -3
- package/src/components/textarea/partials/cases.tsx +9 -4
- package/src/react.main.tsx +2 -2
- package/src/shares/theme.ts +4 -8
- package/dist/1258.js +0 -2
- package/dist/7779.js +0 -2
- package/dist/9542.js +0 -2
- /package/dist/{1258.js.LICENSE.txt → 1055.js.LICENSE.txt} +0 -0
- /package/dist/{1298.js.LICENSE.txt → 1657.js.LICENSE.txt} +0 -0
- /package/dist/{3241.js.LICENSE.txt → 1714.js.LICENSE.txt} +0 -0
- /package/dist/{7779.js.LICENSE.txt → 6018.js.LICENSE.txt} +0 -0
- /package/dist/{9542.js.LICENSE.txt → 6203.js.LICENSE.txt} +0 -0
package/dist/main.js.LICENSE.txt
CHANGED
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
*/
|
|
34
34
|
|
|
35
35
|
/**
|
|
36
|
-
* @remix-run/router v1.21.
|
|
36
|
+
* @remix-run/router v1.21.1
|
|
37
37
|
*
|
|
38
38
|
* Copyright (c) Remix Software Inc.
|
|
39
39
|
*
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
*/
|
|
45
45
|
|
|
46
46
|
/**
|
|
47
|
-
* React Router v6.28.
|
|
47
|
+
* React Router v6.28.2
|
|
48
48
|
*
|
|
49
49
|
* Copyright (c) Remix Software Inc.
|
|
50
50
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@public-ui/sample-react",
|
|
3
|
-
"version": "3.0.0-rc.
|
|
3
|
+
"version": "3.0.0-rc.3",
|
|
4
4
|
"description": "This app contains samples for the KoliBri/Public UI",
|
|
5
5
|
"license": "EUPL-1.2",
|
|
6
6
|
"repository": {
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
"@types/node": "ts5.7",
|
|
17
17
|
"@types/react": "18.3.4",
|
|
18
18
|
"@types/react-dom": "18.3.5",
|
|
19
|
-
"@typescript-eslint/eslint-plugin": "8.18.
|
|
20
|
-
"@typescript-eslint/parser": "8.18.
|
|
19
|
+
"@typescript-eslint/eslint-plugin": "8.18.2",
|
|
20
|
+
"@typescript-eslint/parser": "8.18.2",
|
|
21
21
|
"@unocss/preset-uno": "0.58.9",
|
|
22
22
|
"@unocss/webpack": "0.58.9",
|
|
23
23
|
"adopted-style-sheets": "1.1.7",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"eslint-plugin-html": "8.1.2",
|
|
32
32
|
"eslint-plugin-json": "^3",
|
|
33
33
|
"eslint-plugin-jsx-a11y": "6.10.2",
|
|
34
|
-
"eslint-plugin-react": "7.37.
|
|
34
|
+
"eslint-plugin-react": "7.37.4",
|
|
35
35
|
"file-loader": "6.2.0",
|
|
36
36
|
"formik": "2.4.6",
|
|
37
37
|
"knip": "5.40.0",
|
|
@@ -43,22 +43,22 @@
|
|
|
43
43
|
"prettier": "3.4.2",
|
|
44
44
|
"react": "18.3.1",
|
|
45
45
|
"react-dom": "18.3.1",
|
|
46
|
-
"react-number-format": "5.4.
|
|
47
|
-
"react-router": "6.28.
|
|
48
|
-
"react-router-dom": "6.28.
|
|
46
|
+
"react-number-format": "5.4.3",
|
|
47
|
+
"react-router": "6.28.2",
|
|
48
|
+
"react-router-dom": "6.28.2",
|
|
49
49
|
"rimraf": "6.0.1",
|
|
50
50
|
"sass-loader": "16.0.4",
|
|
51
51
|
"string-replace-loader": "3.1.0",
|
|
52
52
|
"tslib": "2.8.1",
|
|
53
|
-
"typescript": "5.7.
|
|
53
|
+
"typescript": "5.7.3",
|
|
54
54
|
"webpack": "5.97.1",
|
|
55
55
|
"webpack-cli": "5.1.4",
|
|
56
56
|
"webpack-dev-server": "5.2.0",
|
|
57
57
|
"world_countries_lists": "2.9.0",
|
|
58
58
|
"yup": "1.5.0",
|
|
59
|
-
"@public-ui/
|
|
60
|
-
"@public-ui/
|
|
61
|
-
"@public-ui/
|
|
59
|
+
"@public-ui/react": "3.0.0-rc.3",
|
|
60
|
+
"@public-ui/components": "3.0.0-rc.3",
|
|
61
|
+
"@public-ui/themes": "3.0.0-rc.3"
|
|
62
62
|
},
|
|
63
63
|
"files": [
|
|
64
64
|
".eslintignore",
|
package/src/App.tsx
CHANGED
|
@@ -137,7 +137,7 @@ export const App: FC = () => {
|
|
|
137
137
|
)}
|
|
138
138
|
|
|
139
139
|
<main className="flex flex-col items-stretch p-4" id="route-container">
|
|
140
|
-
{!hideMenus && isDraftTheme(theme) && <KolBadge className="block mb-3" _label="
|
|
140
|
+
{!hideMenus && isDraftTheme(theme) && <KolBadge className="block mb-3" _label="In progress" _color="#db5461" />}
|
|
141
141
|
<Routes>
|
|
142
142
|
{ROUTE_TREE}
|
|
143
143
|
<Route path="*" element={<Navigate to={ROUTE_LIST[0]} replace />} />
|
|
@@ -14,21 +14,17 @@ export const DrawerBasic: FC = () => {
|
|
|
14
14
|
const defaultAlign = searchParams.get('align') as AlignPropType;
|
|
15
15
|
const hideMenus = useContext(HideMenusContext);
|
|
16
16
|
const drawerElement = useRef<HTMLKolDrawerElement>(null);
|
|
17
|
-
const drawerModalElement = useRef<HTMLKolDrawerElement>(null);
|
|
18
17
|
const [align, setAlign] = useState<AlignPropType>(defaultAlign || 'left');
|
|
19
18
|
useEffect(() => {
|
|
20
19
|
if (defaultAlign) {
|
|
21
|
-
|
|
20
|
+
drawerElement.current?.open();
|
|
22
21
|
}
|
|
23
22
|
}, [defaultAlign]);
|
|
24
23
|
return (
|
|
25
24
|
<>
|
|
26
25
|
{!hideMenus && <KolBadge className="block mb-3" _label="Component is a DRAFT - Don't use in production yet." _color="#db5461" />}
|
|
27
26
|
<SampleDescription>
|
|
28
|
-
<p>
|
|
29
|
-
KolDrawer shows a dialog attached to one of the sides of the viewport, when opened. This sample illustrates the four alignments and the modal- and
|
|
30
|
-
non-modal modes.
|
|
31
|
-
</p>
|
|
27
|
+
<p>KolDrawer shows a dialog attached to one of the sides of the viewport, when opened. This sample illustrates the four alignments.</p>
|
|
32
28
|
</SampleDescription>
|
|
33
29
|
|
|
34
30
|
<DrawerRadioAlign value={align} onChange={(_, value) => setAlign(value as AlignPropType)} />
|
|
@@ -41,20 +37,6 @@ export const DrawerBasic: FC = () => {
|
|
|
41
37
|
<KolButton _label="Close drawer" _on={{ onClick: () => drawerElement.current?.close() }} />
|
|
42
38
|
</KolDrawer>
|
|
43
39
|
<KolButton _label="Open drawer" _on={{ onClick: () => drawerElement.current?.open() }} />
|
|
44
|
-
<KolDrawer
|
|
45
|
-
ref={drawerModalElement}
|
|
46
|
-
_modal
|
|
47
|
-
_align={align}
|
|
48
|
-
_label="I am a Drawer Modal"
|
|
49
|
-
_on={{ onClose: () => console.log('Drawer Modal onClose triggered!') }}
|
|
50
|
-
>
|
|
51
|
-
<p>
|
|
52
|
-
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
|
|
53
|
-
voluptua.
|
|
54
|
-
</p>
|
|
55
|
-
<KolButton _label="Close drawer modal" _on={{ onClick: () => drawerModalElement.current?.close() }} />
|
|
56
|
-
</KolDrawer>
|
|
57
|
-
<KolButton _label="Open drawer as modal" _on={{ onClick: () => drawerModalElement.current?.open() }} />
|
|
58
40
|
</div>
|
|
59
41
|
</>
|
|
60
42
|
);
|
|
@@ -14,7 +14,6 @@ export const DrawerControlled: FC = () => {
|
|
|
14
14
|
const defaultAlign = searchParams.get('align') as AlignPropType;
|
|
15
15
|
const hideMenus = useContext(HideMenusContext);
|
|
16
16
|
const [open, setOpen] = useState(false);
|
|
17
|
-
const [modalOpen, setModalOpen] = useState(false);
|
|
18
17
|
const [align, setAlign] = useState<AlignPropType>(defaultAlign || 'left');
|
|
19
18
|
return (
|
|
20
19
|
<div>
|
|
@@ -34,13 +33,6 @@ export const DrawerControlled: FC = () => {
|
|
|
34
33
|
</div>
|
|
35
34
|
</KolDrawer>
|
|
36
35
|
<KolButton _label="Open drawer" _on={{ onClick: () => setOpen(true) }} />
|
|
37
|
-
<KolDrawer _open={modalOpen} _modal _align={align} _label="I'm a controlled modal drawer" _on={{ onClose: () => setModalOpen(false) }}>
|
|
38
|
-
<div>
|
|
39
|
-
<p>Lorem ipsum dolor sit amet,</p>
|
|
40
|
-
<KolButton _label="Close drawer" _on={{ onClick: () => setModalOpen(false) }} />
|
|
41
|
-
</div>
|
|
42
|
-
</KolDrawer>
|
|
43
|
-
<KolButton _label="Open drawer as modal" _on={{ onClick: () => setModalOpen(true) }} />
|
|
44
36
|
</div>
|
|
45
37
|
</div>
|
|
46
38
|
);
|
|
@@ -1,28 +1,42 @@
|
|
|
1
|
+
import { KolButton, KolForm, KolInputText } from '@public-ui/react';
|
|
1
2
|
import type { FC } from 'react';
|
|
2
|
-
import React from 'react';
|
|
3
|
+
import React, { useRef } from 'react';
|
|
3
4
|
import { SampleDescription } from '../SampleDescription';
|
|
4
|
-
import { KolForm, KolInputText } from '@public-ui/react';
|
|
5
5
|
|
|
6
|
-
export const FormErrorList: FC = () =>
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
export const FormErrorList: FC = () => {
|
|
7
|
+
const formRef = useRef<HTMLKolFormElement | null>(null);
|
|
8
|
+
return (
|
|
9
|
+
<>
|
|
10
|
+
<SampleDescription>
|
|
11
|
+
<p>This sample shows a form with error messages.</p>
|
|
12
|
+
</SampleDescription>
|
|
11
13
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
{
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
<
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
14
|
+
<KolForm
|
|
15
|
+
className="w-full"
|
|
16
|
+
ref={formRef}
|
|
17
|
+
_errorList={[
|
|
18
|
+
{
|
|
19
|
+
message: 'Error in Input 2',
|
|
20
|
+
selector: '#input2',
|
|
21
|
+
},
|
|
22
|
+
]}
|
|
23
|
+
>
|
|
24
|
+
<div className="grid gap-2">
|
|
25
|
+
<KolInputText id="input1" _label="Input 1" />
|
|
26
|
+
<KolInputText id="input2" _label="Input 2" _touched _msg={{ _description: 'Input error', _type: 'error' }} />
|
|
27
|
+
<KolInputText id="input3" _label="Input 3" />
|
|
28
|
+
<div>
|
|
29
|
+
<KolButton
|
|
30
|
+
_label="ScrollTo"
|
|
31
|
+
_on={{
|
|
32
|
+
onClick: () => {
|
|
33
|
+
formRef.current?.focusErrorList();
|
|
34
|
+
},
|
|
35
|
+
}}
|
|
36
|
+
/>
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
</KolForm>
|
|
40
|
+
</>
|
|
41
|
+
);
|
|
42
|
+
};
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import React, { forwardRef } from 'react';
|
|
2
|
-
|
|
3
2
|
import { KolInputColor } from '@public-ui/react';
|
|
3
|
+
import type { Components } from '@public-ui/components';
|
|
4
4
|
|
|
5
5
|
import { ERROR_MSG } from '../../../shares/constants';
|
|
6
6
|
|
|
7
|
-
import type { Components } from '@public-ui/components';
|
|
8
7
|
export const InputColorCases = forwardRef<HTMLKolInputColorElement, Components.KolInputColor>(function InputColorCases(props, ref) {
|
|
9
8
|
return (
|
|
10
9
|
<div className="grid gap-4">
|
|
@@ -26,6 +25,9 @@ export const InputColorCases = forwardRef<HTMLKolInputColorElement, Components.K
|
|
|
26
25
|
_suggestions="['#000000','#f08080', '#0000ff','#00ff00']"
|
|
27
26
|
_touched
|
|
28
27
|
/>
|
|
28
|
+
<KolInputColor {...props} _msg={{ _type: 'info', _description: 'Just a hint' }} _label="Color" />
|
|
29
|
+
<KolInputColor {...props} _msg={{ _type: 'warning', _description: 'Small warning' }} _label="Color" />
|
|
30
|
+
<KolInputColor {...props} _msg={{ _type: 'success', _description: 'Success message' }} _label="Color" />
|
|
29
31
|
<KolInputColor {...props} ref={ref} _accessKey="C" _hint="Hint text" _label="Color with hint" _value="#f08080" />
|
|
30
32
|
<KolInputColor {...props} _disabled _label="Color (Disabled)" _value="#f08080" />
|
|
31
33
|
<KolInputColor {...props} _label="With access key" _accessKey="c"></KolInputColor>
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import React, { forwardRef } from 'react';
|
|
2
|
-
|
|
3
2
|
import { KolInputDate } from '@public-ui/react';
|
|
3
|
+
import type { Components } from '@public-ui/components';
|
|
4
4
|
|
|
5
|
-
import { ERROR_MSG } from '../../../shares/constants';
|
|
5
|
+
import { ERROR_MSG, HINT_MSG } from '../../../shares/constants';
|
|
6
6
|
|
|
7
|
-
import type { Components } from '@public-ui/components';
|
|
8
7
|
export const InputDateCases = forwardRef<HTMLKolInputDateElement, Components.KolInputDate>(function InputDateCases(props, ref) {
|
|
9
8
|
return (
|
|
10
9
|
<div className="grid gap-4">
|
|
@@ -16,11 +15,15 @@ export const InputDateCases = forwardRef<HTMLKolInputDateElement, Components.Kol
|
|
|
16
15
|
{...props}
|
|
17
16
|
_step={1}
|
|
18
17
|
_type="datetime-local"
|
|
18
|
+
_hint={HINT_MSG}
|
|
19
19
|
_msg={{ _type: 'error', _description: ERROR_MSG }}
|
|
20
20
|
_label="Local datetime (with seconds)"
|
|
21
21
|
_required
|
|
22
22
|
_touched
|
|
23
23
|
/>
|
|
24
|
+
<KolInputDate {...props} _msg={{ _type: 'info', _description: 'Just a hint' }} _label="Color" />
|
|
25
|
+
<KolInputDate {...props} _msg={{ _type: 'warning', _description: 'Small warning' }} _label="Color" />
|
|
26
|
+
<KolInputDate {...props} _msg={{ _type: 'success', _description: 'Success message' }} _label="Color" />
|
|
24
27
|
<KolInputDate {...props} _type="month" _label="Month" _required />
|
|
25
28
|
<KolInputDate {...props} ref={ref} _accessKey="W" _type="week" _label="Week" _required />
|
|
26
29
|
<KolInputDate {...props} _type="time" _label="Time (standard)" _required />
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import React, { forwardRef } from 'react';
|
|
2
|
-
|
|
3
2
|
import { KolInputEmail } from '@public-ui/react';
|
|
3
|
+
import type { Components } from '@public-ui/components';
|
|
4
4
|
|
|
5
|
-
import { ERROR_MSG } from '../../../shares/constants';
|
|
5
|
+
import { ERROR_MSG, HINT_MSG } from '../../../shares/constants';
|
|
6
6
|
|
|
7
|
-
import type { Components } from '@public-ui/components';
|
|
8
7
|
export const InputEmailCases = forwardRef<HTMLKolInputEmailElement, Components.KolInputEmail>(function InputEmailCases(props, ref) {
|
|
9
8
|
return (
|
|
10
9
|
<div className="grid gap-4">
|
|
@@ -18,6 +17,7 @@ export const InputEmailCases = forwardRef<HTMLKolInputEmailElement, Components.K
|
|
|
18
17
|
_placeholder="elke@mustermann.de"
|
|
19
18
|
_suggestions="['test1@mail.de', 'test2@mail.de', 'test3@mail.de']"
|
|
20
19
|
_label="E-Mail (list)"
|
|
20
|
+
_hint={HINT_MSG}
|
|
21
21
|
_msg={{ _type: 'error', _description: ERROR_MSG }}
|
|
22
22
|
_touched
|
|
23
23
|
_icons={{
|
|
@@ -29,6 +29,9 @@ export const InputEmailCases = forwardRef<HTMLKolInputEmailElement, Components.K
|
|
|
29
29
|
},
|
|
30
30
|
}}
|
|
31
31
|
/>
|
|
32
|
+
<KolInputEmail {...props} _msg={{ _type: 'info', _description: 'Just a hint' }} _label="E-Mail" />
|
|
33
|
+
<KolInputEmail {...props} _msg={{ _type: 'warning', _description: 'Small warning' }} _label="E-Mail" />
|
|
34
|
+
<KolInputEmail {...props} _msg={{ _type: 'success', _description: 'Success message' }} _label="E-Mail" />
|
|
32
35
|
<KolInputEmail {...props} _disabled _value="test@mail.de" _label="E-Mail (Disabled)" />
|
|
33
36
|
<KolInputEmail {...props} _readOnly _value="test@mail.de" _label="E-Mail (Readonly)" />
|
|
34
37
|
<KolInputEmail {...props} _value="test@mail.de" _label="With access key" _accessKey="c" />
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import React, { forwardRef } from 'react';
|
|
2
|
-
|
|
3
2
|
import { KolInputFile } from '@public-ui/react';
|
|
3
|
+
import type { Components } from '@public-ui/components';
|
|
4
4
|
|
|
5
|
-
import { ERROR_MSG } from '../../../shares/constants';
|
|
5
|
+
import { ERROR_MSG, HINT_MSG } from '../../../shares/constants';
|
|
6
6
|
|
|
7
|
-
import type { Components } from '@public-ui/components';
|
|
8
7
|
export const InputFileCases = forwardRef<HTMLKolInputFileElement, Components.KolInputFile>(function InputFileCases(props, ref) {
|
|
9
8
|
return (
|
|
10
9
|
<div className="grid gap-4">
|
|
@@ -23,6 +22,7 @@ export const InputFileCases = forwardRef<HTMLKolInputFileElement, Components.Kol
|
|
|
23
22
|
<KolInputFile
|
|
24
23
|
{...props}
|
|
25
24
|
_required
|
|
25
|
+
_hint={HINT_MSG}
|
|
26
26
|
_msg={{ _type: 'error', _description: ERROR_MSG }}
|
|
27
27
|
_label="Upload file (Black background test)"
|
|
28
28
|
_icons={{
|
|
@@ -32,6 +32,9 @@ export const InputFileCases = forwardRef<HTMLKolInputFileElement, Components.Kol
|
|
|
32
32
|
}}
|
|
33
33
|
_touched
|
|
34
34
|
/>
|
|
35
|
+
<KolInputFile {...props} _msg={{ _type: 'info', _description: 'Just a hint' }} _label="Upload file" />
|
|
36
|
+
<KolInputFile {...props} _msg={{ _type: 'warning', _description: 'Small warning' }} _label="Upload file" />
|
|
37
|
+
<KolInputFile {...props} _msg={{ _type: 'success', _description: 'Success message' }} _label="Upload file" />
|
|
35
38
|
<KolInputFile {...props} ref={ref} _accessKey="h" _multiple _msg={{ _type: 'error', _description: ERROR_MSG }} _label="Upload file (Multiple)" />
|
|
36
39
|
<KolInputFile {...props} _disabled _label="Upload file (Disabled)" />
|
|
37
40
|
<KolInputFile {...props} _label="With access key" _accessKey="c" />
|
|
@@ -1,23 +1,21 @@
|
|
|
1
1
|
import React, { forwardRef } from 'react';
|
|
2
|
-
|
|
3
2
|
import { KolInputPassword } from '@public-ui/react';
|
|
3
|
+
import type { Components } from '@public-ui/components';
|
|
4
4
|
|
|
5
|
-
import { ERROR_MSG } from '../../../shares/constants';
|
|
5
|
+
import { ERROR_MSG, HINT_MSG } from '../../../shares/constants';
|
|
6
6
|
|
|
7
|
-
import type { Components } from '@public-ui/components';
|
|
8
7
|
export const InputPasswordCases = forwardRef<HTMLKolInputPasswordElement, Components.KolInputPassword>(function InputPasswordCases(props, ref) {
|
|
9
8
|
return (
|
|
10
9
|
<div className="grid gap-4">
|
|
11
10
|
<div className="black-background">
|
|
12
11
|
<KolInputPassword {...props} _label="Passwort (Black background test)" />
|
|
13
12
|
</div>
|
|
14
|
-
<KolInputPassword {...props} _disabled _msg={{ _type: 'error', _description: ERROR_MSG }} _label="Passwort (Disabled)" _touched />
|
|
15
|
-
<KolInputPassword {...props} _readOnly _label="Passwort (Readonly)" />
|
|
16
13
|
<KolInputPassword
|
|
17
14
|
{...props}
|
|
18
15
|
ref={ref}
|
|
19
16
|
_accessKey="P"
|
|
20
17
|
_required
|
|
18
|
+
_hint={HINT_MSG}
|
|
21
19
|
_msg={{ _type: 'error', _description: ERROR_MSG }}
|
|
22
20
|
_placeholder="Mit Icons"
|
|
23
21
|
_label="Passwort"
|
|
@@ -31,6 +29,11 @@ export const InputPasswordCases = forwardRef<HTMLKolInputPasswordElement, Compon
|
|
|
31
29
|
}}
|
|
32
30
|
_touched
|
|
33
31
|
/>
|
|
32
|
+
<KolInputPassword {...props} _placeholder="Placeholder" _msg={{ _type: 'info', _description: 'Just a hint' }} _label="Password" />
|
|
33
|
+
<KolInputPassword {...props} _placeholder="Placeholder" _msg={{ _type: 'warning', _description: 'Small warning' }} _label="Password" />
|
|
34
|
+
<KolInputPassword {...props} _placeholder="Placeholder" _msg={{ _type: 'success', _description: 'Success message' }} _label="Password" />
|
|
35
|
+
<KolInputPassword {...props} _disabled _msg={{ _type: 'error', _description: ERROR_MSG }} _label="Passwort (Disabled)" _touched />
|
|
36
|
+
<KolInputPassword {...props} _readOnly _label="Passwort (Readonly)" />
|
|
34
37
|
<KolInputPassword {...props} ref={ref} _shortKey="c" _label="With access key" />
|
|
35
38
|
<KolInputPassword {...props} ref={ref} _shortKey="s" _label="With short key" />
|
|
36
39
|
</div>
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import React, { forwardRef } from 'react';
|
|
2
|
-
|
|
3
2
|
import { KolInputRange } from '@public-ui/react';
|
|
3
|
+
import type { Components } from '@public-ui/components';
|
|
4
4
|
|
|
5
|
-
import { ERROR_MSG } from '../../../shares/constants';
|
|
5
|
+
import { ERROR_MSG, HINT_MSG } from '../../../shares/constants';
|
|
6
6
|
|
|
7
|
-
import type { Components } from '@public-ui/components';
|
|
8
7
|
export const InputRangeCases = forwardRef<HTMLKolInputRangeElement, Components.KolInputRange>(function InputRangeCases(props, ref) {
|
|
9
8
|
return (
|
|
10
9
|
<div className="grid gap-4">
|
|
@@ -33,10 +32,14 @@ export const InputRangeCases = forwardRef<HTMLKolInputRangeElement, Components.K
|
|
|
33
32
|
_min={0}
|
|
34
33
|
_max={50}
|
|
35
34
|
_step={10}
|
|
35
|
+
_hint={HINT_MSG}
|
|
36
36
|
_msg={{ _type: 'error', _description: ERROR_MSG }}
|
|
37
37
|
_label="Slider with error"
|
|
38
38
|
_touched
|
|
39
39
|
/>
|
|
40
|
+
<KolInputRange {...props} _msg={{ _type: 'info', _description: 'Just a hint' }} _label="Slider" />
|
|
41
|
+
<KolInputRange {...props} _msg={{ _type: 'warning', _description: 'Small warning' }} _label="Slider" />
|
|
42
|
+
<KolInputRange {...props} _msg={{ _type: 'success', _description: 'Success message' }} _label="Slider" />
|
|
40
43
|
<KolInputRange {...props} _disabled _min={0} _max={50} _label="Slider (disabled)" />
|
|
41
44
|
<KolInputRange {...props} _min={0} _max={50} _label="With access key" _accessKey="c" />
|
|
42
45
|
<KolInputRange {...props} _min={0} _max={50} _label="With short key" _shortKey="s" />
|
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
import React, { forwardRef } from 'react';
|
|
2
|
-
|
|
3
2
|
import { KolTextarea } from '@public-ui/react';
|
|
3
|
+
import type { Components } from '@public-ui/components';
|
|
4
4
|
|
|
5
|
-
import { ERROR_MSG } from '../../../shares/constants';
|
|
5
|
+
import { ERROR_MSG, HINT_MSG } from '../../../shares/constants';
|
|
6
6
|
|
|
7
|
-
import type { Components } from '@public-ui/components';
|
|
8
7
|
export const TextareaCases = forwardRef<HTMLKolTextareaElement, Components.KolTextarea>(function TextareaCases(props, ref) {
|
|
9
8
|
return (
|
|
10
9
|
<div className="grid gap-4">
|
|
11
|
-
<
|
|
10
|
+
<div className="black-background">
|
|
11
|
+
<KolTextarea {...props} ref={ref} _placeholder="Placeholder" _label="Text" />
|
|
12
|
+
</div>
|
|
13
|
+
<KolTextarea {...props} _placeholder="Placeholder" _required _msg={{ _type: 'error', _description: ERROR_MSG }} _label="Text" _touched _hint={HINT_MSG} />
|
|
14
|
+
<KolTextarea {...props} _placeholder="Placeholder" _label="Text" _msg={{ _type: 'info', _description: 'Just a hint' }} />
|
|
15
|
+
<KolTextarea {...props} _placeholder="Placeholder" _label="Text" _msg={{ _type: 'warning', _description: 'Small warning' }} />
|
|
16
|
+
<KolTextarea {...props} _placeholder="Placeholder" _label="Text" _msg={{ _type: 'success', _description: 'Success message' }} />
|
|
12
17
|
<KolTextarea {...props} ref={ref} _accessKey="T" _label="Text (3 rows)" _rows={3} />
|
|
13
18
|
<KolTextarea {...props} ref={ref} _label="Text (placeholder)" _rows={3} _placeholder="Placeholder" />
|
|
14
19
|
<KolTextarea {...props} ref={ref} _label="Text (disabled & placeholder)" _rows={3} _placeholder="Placeholder" _disabled />
|
package/src/react.main.tsx
CHANGED
|
@@ -5,7 +5,7 @@ import { setTagNameTransformer } from '@public-ui/react';
|
|
|
5
5
|
|
|
6
6
|
import { bootstrap, KoliBriDevHelper } from '@public-ui/components';
|
|
7
7
|
import { defineCustomElements } from '@public-ui/components/dist/loader';
|
|
8
|
-
import { DEFAULT, ECL_EC, ECL_EU
|
|
8
|
+
import { DEFAULT, ECL_EC, ECL_EU } from '@public-ui/themes';
|
|
9
9
|
|
|
10
10
|
import { App } from './App';
|
|
11
11
|
|
|
@@ -35,7 +35,7 @@ const getThemes = async () => {
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
/* List of regular sample app themes */
|
|
38
|
-
return [DEFAULT, ECL_EC, ECL_EU
|
|
38
|
+
return [DEFAULT, ECL_EC, ECL_EU] as Theme[];
|
|
39
39
|
};
|
|
40
40
|
|
|
41
41
|
void (async () => {
|
package/src/shares/theme.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { SelectOption } from '@public-ui/components';
|
|
2
2
|
|
|
3
|
-
export const THEMES = ['default', 'ecl-ec', 'ecl-eu', '
|
|
3
|
+
export const THEMES = ['default', 'ecl-ec', 'ecl-eu', 'unstyled'] as const;
|
|
4
4
|
export type Theme = (typeof THEMES)[number];
|
|
5
5
|
export type ThemeAndUnstyled = Theme | 'unstyled';
|
|
6
6
|
|
|
7
|
-
const drafts: ThemeAndUnstyled[] = ['ecl-ec', 'ecl-eu'
|
|
7
|
+
const drafts: ThemeAndUnstyled[] = ['ecl-ec', 'ecl-eu'];
|
|
8
8
|
|
|
9
9
|
export const isDraftTheme = (theme: ThemeAndUnstyled) => drafts.includes(theme);
|
|
10
10
|
|
|
@@ -27,15 +27,11 @@ export const THEME_OPTIONS: SelectOption<ThemeAndUnstyled>[] = [
|
|
|
27
27
|
value: 'default',
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
|
-
label: 'European Commission (
|
|
30
|
+
label: 'European Commission (in progress)',
|
|
31
31
|
value: 'ecl-ec',
|
|
32
32
|
},
|
|
33
33
|
{
|
|
34
|
-
label: 'European Union (
|
|
34
|
+
label: 'European Union (in progress)',
|
|
35
35
|
value: 'ecl-eu',
|
|
36
36
|
},
|
|
37
|
-
{
|
|
38
|
-
label: 'Informationstechnikzentrum Bund (Draft)',
|
|
39
|
-
value: 'itzbund',
|
|
40
|
-
},
|
|
41
37
|
];
|
package/dist/1258.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 1258.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunk_public_ui_sample_react=self.webpackChunk_public_ui_sample_react||[]).push([[1258],{9246:(t,e,n)=>{n.d(e,{a:()=>i,v:()=>l});var o=n(5800);const i=(t,e,n)=>{(0,o.w)(t,e,(t=>"string"==typeof t&&r.includes(t)),new Set(r),n,{defaultValue:"top"})},r=["left","right","top","bottom"],l=(t,e)=>{i(t,"_align",e)}},7189:(t,e,n)=>{n.d(e,{a:()=>bt,b:()=>yt});var o=n(5687),i=Object.defineProperty,r=Object.defineProperties,l=Object.getOwnPropertyDescriptors,c=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable,a=(t,e,n)=>e in t?i(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,u=(t,e)=>{for(var n in e||(e={}))s.call(e,n)&&a(t,n,e[n]);if(c)for(var n of c(e))f.call(e,n)&&a(t,n,e[n]);return t},d=(t,e)=>r(t,l(e)),p=(t,e)=>{var n={};for(var o in t)s.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(null!=t&&c)for(var o of c(t))e.indexOf(o)<0&&f.call(t,o)&&(n[o]=t[o]);return n},h=(t,e,n)=>new Promise(((o,i)=>{var r=t=>{try{c(n.next(t))}catch(t){i(t)}},l=t=>{try{c(n.throw(t))}catch(t){i(t)}},c=t=>t.done?o(t.value):Promise.resolve(t.value).then(r,l);c((n=n.apply(t,e)).next())}));const m=Math.min,g=Math.max,y=Math.round,x=Math.floor,v=t=>({x:t,y:t}),w={left:"right",right:"left",bottom:"top",top:"bottom"},b={start:"end",end:"start"};function R(t,e,n){return g(t,m(e,n))}function O(t,e){return"function"==typeof t?t(e):t}function T(t){return t.split("-")[0]}function E(t){return t.split("-")[1]}function L(t){return"x"===t?"y":"x"}function A(t){return"y"===t?"height":"width"}function P(t){return["top","bottom"].includes(T(t))?"y":"x"}function D(t){return L(P(t))}function S(t){return t.replace(/start|end/g,(t=>b[t]))}function k(t){return t.replace(/left|right|bottom|top/g,(t=>w[t]))}function C(t){return"number"!=typeof t?function(t){return u({top:0,right:0,bottom:0,left:0},t)}(t):{top:t,right:t,bottom:t,left:t}}function F(t){const{x:e,y:n,width:o,height:i}=t;return{width:o,height:i,top:n,left:e,right:e+o,bottom:n+i,x:e,y:n}}function H(t,e,n){let{reference:o,floating:i}=t;const r=P(e),l=D(e),c=A(l),s=T(e),f="y"===r,a=o.x+o.width/2-i.width/2,u=o.y+o.height/2-i.height/2,d=o[c]/2-i[c]/2;let p;switch(s){case"top":p={x:a,y:o.y-i.height};break;case"bottom":p={x:a,y:o.y+o.height};break;case"right":p={x:o.x+o.width,y:u};break;case"left":p={x:o.x-i.width,y:u};break;default:p={x:o.x,y:o.y}}switch(E(e)){case"start":p[l]-=d*(n&&f?-1:1);break;case"end":p[l]+=d*(n&&f?-1:1)}return p}function W(t,e){return h(this,null,(function*(){var n;void 0===e&&(e={});const{x:o,y:i,platform:r,rects:l,elements:c,strategy:s}=t,{boundary:f="clippingAncestors",rootBoundary:a="viewport",elementContext:u="floating",altBoundary:d=!1,padding:p=0}=O(e,t),h=C(p),m=c[d?"floating"===u?"reference":"floating":u],g=F(yield r.getClippingRect({element:null==(n=yield null==r.isElement?void 0:r.isElement(m))||n?m:m.contextElement||(yield null==r.getDocumentElement?void 0:r.getDocumentElement(c.floating)),boundary:f,rootBoundary:a,strategy:s})),y="floating"===u?{x:o,y:i,width:l.floating.width,height:l.floating.height}:l.reference,x=yield null==r.getOffsetParent?void 0:r.getOffsetParent(c.floating),v=(yield null==r.isElement?void 0:r.isElement(x))&&(yield null==r.getScale?void 0:r.getScale(x))||{x:1,y:1},w=F(r.convertOffsetParentRelativeRectToViewportRelativeRect?yield r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:y,offsetParent:x,strategy:s}):y);return{top:(g.top-w.top+h.top)/v.y,bottom:(w.bottom-g.bottom+h.bottom)/v.y,left:(g.left-w.left+h.left)/v.x,right:(w.right-g.right+h.right)/v.x}}))}function j(){return"undefined"!=typeof window}function _(t){return M(t)?(t.nodeName||"").toLowerCase():"#document"}function B(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function V(t){var e;return null==(e=(M(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function M(t){return!!j()&&(t instanceof Node||t instanceof B(t).Node)}function z(t){return!!j()&&(t instanceof Element||t instanceof B(t).Element)}function N(t){return!!j()&&(t instanceof HTMLElement||t instanceof B(t).HTMLElement)}function $(t){return!(!j()||"undefined"==typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof B(t).ShadowRoot)}function I(t){const{overflow:e,overflowX:n,overflowY:o,display:i}=K(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!["inline","contents"].includes(i)}function q(t){return["table","td","th"].includes(_(t))}function X(t){return[":popover-open",":modal"].some((e=>{try{return t.matches(e)}catch(t){return!1}}))}function Y(t){const e=G(),n=z(t)?K(t):t;return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!e&&!!n.backdropFilter&&"none"!==n.backdropFilter||!e&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((t=>(n.willChange||"").includes(t)))||["paint","layout","strict","content"].some((t=>(n.contain||"").includes(t)))}function G(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function J(t){return["html","body","#document"].includes(_(t))}function K(t){return B(t).getComputedStyle(t)}function Q(t){return z(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function U(t){if("html"===_(t))return t;const e=t.assignedSlot||t.parentNode||$(t)&&t.host||V(t);return $(e)?e.host:e}function Z(t){const e=U(t);return J(e)?t.ownerDocument?t.ownerDocument.body:t.body:N(e)&&I(e)?e:Z(e)}function tt(t,e,n){var o;void 0===e&&(e=[]),void 0===n&&(n=!0);const i=Z(t),r=i===(null==(o=t.ownerDocument)?void 0:o.body),l=B(i);if(r){const t=et(l);return e.concat(l,l.visualViewport||[],I(i)?i:[],t&&n?tt(t):[])}return e.concat(i,tt(i,[],n))}function et(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function nt(t){const e=K(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const i=N(t),r=i?t.offsetWidth:n,l=i?t.offsetHeight:o,c=y(n)!==r||y(o)!==l;return c&&(n=r,o=l),{width:n,height:o,$:c}}function ot(t){return z(t)?t:t.contextElement}function it(t){const e=ot(t);if(!N(e))return v(1);const n=e.getBoundingClientRect(),{width:o,height:i,$:r}=nt(e);let l=(r?y(n.width):n.width)/o,c=(r?y(n.height):n.height)/i;return l&&Number.isFinite(l)||(l=1),c&&Number.isFinite(c)||(c=1),{x:l,y:c}}const rt=v(0);function lt(t){const e=B(t);return G()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:rt}function ct(t,e,n,o){void 0===e&&(e=!1),void 0===n&&(n=!1);const i=t.getBoundingClientRect(),r=ot(t);let l=v(1);e&&(o?z(o)&&(l=it(o)):l=it(t));const c=function(t,e,n){return void 0===e&&(e=!1),!(!n||e&&n!==B(t))&&e}(r,n,o)?lt(r):v(0);let s=(i.left+c.x)/l.x,f=(i.top+c.y)/l.y,a=i.width/l.x,u=i.height/l.y;if(r){const t=B(r),e=o&&z(o)?B(o):o;let n=t,i=et(n);for(;i&&o&&e!==n;){const t=it(i),e=i.getBoundingClientRect(),o=K(i),r=e.left+(i.clientLeft+parseFloat(o.paddingLeft))*t.x,l=e.top+(i.clientTop+parseFloat(o.paddingTop))*t.y;s*=t.x,f*=t.y,a*=t.x,u*=t.y,s+=r,f+=l,n=B(i),i=et(n)}}return F({width:a,height:u,x:s,y:f})}function st(t,e){const n=Q(t).scrollLeft;return e?e.left+n:ct(V(t)).left+n}function ft(t,e,n){void 0===n&&(n=!1);const o=t.getBoundingClientRect();return{x:o.left+e.scrollLeft-(n?0:st(t,o)),y:o.top+e.scrollTop}}function at(t,e,n){let o;if("viewport"===e)o=function(t,e){const n=B(t),o=V(t),i=n.visualViewport;let r=o.clientWidth,l=o.clientHeight,c=0,s=0;if(i){r=i.width,l=i.height;const t=G();(!t||t&&"fixed"===e)&&(c=i.offsetLeft,s=i.offsetTop)}return{width:r,height:l,x:c,y:s}}(t,n);else if("document"===e)o=function(t){const e=V(t),n=Q(t),o=t.ownerDocument.body,i=g(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),r=g(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let l=-n.scrollLeft+st(t);const c=-n.scrollTop;return"rtl"===K(o).direction&&(l+=g(e.clientWidth,o.clientWidth)-i),{width:i,height:r,x:l,y:c}}(V(t));else if(z(e))o=function(t,e){const n=ct(t,!0,"fixed"===e),o=n.top+t.clientTop,i=n.left+t.clientLeft,r=N(t)?it(t):v(1);return{width:t.clientWidth*r.x,height:t.clientHeight*r.y,x:i*r.x,y:o*r.y}}(e,n);else{const n=lt(t);o={x:e.x-n.x,y:e.y-n.y,width:e.width,height:e.height}}return F(o)}function ut(t,e){const n=U(t);return!(n===e||!z(n)||J(n))&&("fixed"===K(n).position||ut(n,e))}function dt(t,e,n){const o=N(e),i=V(e),r="fixed"===n,l=ct(t,!0,r,e);let c={scrollLeft:0,scrollTop:0};const s=v(0);if(o||!o&&!r)if(("body"!==_(e)||I(i))&&(c=Q(e)),o){const t=ct(e,!0,r,e);s.x=t.x+e.clientLeft,s.y=t.y+e.clientTop}else i&&(s.x=st(i));const f=!i||o||r?v(0):ft(i,c);return{x:l.left+c.scrollLeft-s.x-f.x,y:l.top+c.scrollTop-s.y-f.y,width:l.width,height:l.height}}function pt(t){return"static"===K(t).position}function ht(t,e){if(!N(t)||"fixed"===K(t).position)return null;if(e)return e(t);let n=t.offsetParent;return V(t)===n&&(n=n.ownerDocument.body),n}function mt(t,e){const n=B(t);if(X(t))return n;if(!N(t)){let e=U(t);for(;e&&!J(e);){if(z(e)&&!pt(e))return e;e=U(e)}return n}let o=ht(t,e);for(;o&&q(o)&&pt(o);)o=ht(o,e);return o&&J(o)&&pt(o)&&!Y(o)?n:o||function(t){let e=U(t);for(;N(e)&&!J(e);){if(Y(e))return e;if(X(e))return null;e=U(e)}return null}(t)||n}const gt={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t;const r="fixed"===i,l=V(o),c=!!e&&X(e.floating);if(o===l||c&&r)return n;let s={scrollLeft:0,scrollTop:0},f=v(1);const a=v(0),u=N(o);if((u||!u&&!r)&&(("body"!==_(o)||I(l))&&(s=Q(o)),N(o))){const t=ct(o);f=it(o),a.x=t.x+o.clientLeft,a.y=t.y+o.clientTop}const d=!l||u||r?v(0):ft(l,s,!0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-s.scrollLeft*f.x+a.x+d.x,y:n.y*f.y-s.scrollTop*f.y+a.y+d.y}},getDocumentElement:V,getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t;const r=[..."clippingAncestors"===n?X(e)?[]:function(t,e){const n=e.get(t);if(n)return n;let o=tt(t,[],!1).filter((t=>z(t)&&"body"!==_(t))),i=null;const r="fixed"===K(t).position;let l=r?U(t):t;for(;z(l)&&!J(l);){const e=K(l),n=Y(l);n||"fixed"!==e.position||(i=null),(r?!n&&!i:!n&&"static"===e.position&&i&&["absolute","fixed"].includes(i.position)||I(l)&&!n&&ut(t,l))?o=o.filter((t=>t!==l)):i=e,l=U(l)}return e.set(t,o),o}(e,this._c):[].concat(n),o],l=r[0],c=r.reduce(((t,n)=>{const o=at(e,n,i);return t.top=g(o.top,t.top),t.right=m(o.right,t.right),t.bottom=m(o.bottom,t.bottom),t.left=g(o.left,t.left),t}),at(e,l,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}},getOffsetParent:mt,getElementRects:function(t){return h(this,null,(function*(){const e=this.getOffsetParent||mt,n=this.getDimensions,o=yield n(t.floating);return{reference:dt(t.reference,yield e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}}))},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:e,height:n}=nt(t);return{width:e,height:n}},getScale:it,isElement:z,isRTL:function(t){return"rtl"===K(t).direction}};function yt(t,e,n,o){void 0===o&&(o={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:l="function"==typeof ResizeObserver,layoutShift:c="function"==typeof IntersectionObserver,animationFrame:s=!1}=o,f=ot(t),a=i||r?[...f?tt(f):[],...tt(e)]:[];a.forEach((t=>{i&&t.addEventListener("scroll",n,{passive:!0}),r&&t.addEventListener("resize",n)}));const p=f&&c?function(t,e){let n,o=null;const i=V(t);function r(){var t;clearTimeout(n),null==(t=o)||t.disconnect(),o=null}return function l(c,s){void 0===c&&(c=!1),void 0===s&&(s=1),r();const{left:f,top:a,width:p,height:h}=t.getBoundingClientRect();if(c||e(),!p||!h)return;const y={rootMargin:-x(a)+"px "+-x(i.clientWidth-(f+p))+"px "+-x(i.clientHeight-(a+h))+"px "+-x(f)+"px",threshold:g(0,m(1,s))||1};let v=!0;function w(t){const e=t[0].intersectionRatio;if(e!==s){if(!v)return l();e?l(!1,e):n=setTimeout((()=>{l(!1,1e-7)}),1e3)}v=!1}try{o=new IntersectionObserver(w,d(u({},y),{root:i.ownerDocument}))}catch(t){o=new IntersectionObserver(w,y)}o.observe(t)}(!0),r}(f,n):null;let h,y=-1,v=null;l&&(v=new ResizeObserver((t=>{let[o]=t;o&&o.target===f&&v&&(v.unobserve(e),cancelAnimationFrame(y),y=requestAnimationFrame((()=>{var t;null==(t=v)||t.observe(e)}))),n()})),f&&!s&&v.observe(f),v.observe(e));let w=s?ct(t):null;return s&&function e(){const o=ct(t);!w||o.x===w.x&&o.y===w.y&&o.width===w.width&&o.height===w.height||n(),w=o,h=requestAnimationFrame(e)}(),n(),()=>{var t;a.forEach((t=>{i&&t.removeEventListener("scroll",n),r&&t.removeEventListener("resize",n)})),null==p||p(),null==(t=v)||t.disconnect(),v=null,s&&cancelAnimationFrame(h)}}const xt=function(t){return void 0===t&&(t={}),{name:"shift",options:t,fn(e){return h(this,null,(function*(){const{x:n,y:o,placement:i}=e,r=O(t,e),{mainAxis:l=!0,crossAxis:c=!1,limiter:s={fn:t=>{let{x:e,y:n}=t;return{x:e,y:n}}}}=r,f=p(r,["mainAxis","crossAxis","limiter"]),a={x:n,y:o},h=yield W(e,f),m=P(T(i)),g=L(m);let y=a[g],x=a[m];if(l){const t="y"===g?"bottom":"right";y=R(y+h["y"===g?"top":"left"],y,y-h[t])}if(c){const t="y"===m?"bottom":"right";x=R(x+h["y"===m?"top":"left"],x,x-h[t])}const v=s.fn(d(u({},e),{[g]:y,[m]:x}));return d(u({},v),{data:{x:v.x-n,y:v.y-o}})}))}}},vt=function(t){return void 0===t&&(t={}),{name:"flip",options:t,fn(e){return h(this,null,(function*(){var n,o;const{placement:i,middlewareData:r,rects:l,initialPlacement:c,platform:s,elements:f}=e,a=O(t,e),{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:y=!0}=a,x=p(a,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if(null!=(n=r.arrow)&&n.alignmentOffset)return{};const v=T(i),w=P(c),b=T(c)===c,R=yield null==s.isRTL?void 0:s.isRTL(f.floating),L=h||(b||!y?[k(c)]:function(t){const e=k(t);return[S(t),e,S(e)]}(c)),C="none"!==g;!h&&C&&L.push(...function(t,e,n,o){const i=E(t);let r=function(t,e,n){const o=["left","right"],i=["right","left"],r=["top","bottom"],l=["bottom","top"];switch(t){case"top":case"bottom":return n?e?i:o:e?o:i;case"left":case"right":return e?r:l;default:return[]}}(T(t),"start"===n,o);return i&&(r=r.map((t=>t+"-"+i)),e&&(r=r.concat(r.map(S)))),r}(c,y,g,R));const F=[c,...L],H=yield W(e,x),j=[];let _=(null==(o=r.flip)?void 0:o.overflows)||[];if(u&&j.push(H[v]),d){const t=function(t,e,n){void 0===n&&(n=!1);const o=E(t),i=D(t),r=A(i);let l="x"===i?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return e.reference[r]>e.floating[r]&&(l=k(l)),[l,k(l)]}(i,l,R);j.push(H[t[0]],H[t[1]])}if(_=[..._,{placement:i,overflows:j}],!j.every((t=>t<=0))){var B,V;const t=((null==(B=r.flip)?void 0:B.index)||0)+1,e=F[t];if(e)return{data:{index:t,overflows:_},reset:{placement:e}};let n=null==(V=_.filter((t=>t.overflows[0]<=0)).sort(((t,e)=>t.overflows[1]-e.overflows[1]))[0])?void 0:V.placement;if(!n)switch(m){case"bestFit":{var M;const t=null==(M=_.filter((t=>{if(C){const e=P(t.placement);return e===w||"y"===e}return!0})).map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,e)=>t+e),0)])).sort(((t,e)=>t[1]-e[1]))[0])?void 0:M[0];t&&(n=t);break}case"initialPlacement":n=c}if(i!==n)return{reset:{placement:n}}}return{}}))}}},wt=t=>({name:"arrow",options:t,fn(e){return h(this,null,(function*(){const{x:n,y:o,placement:i,rects:r,platform:l,elements:c,middlewareData:s}=e,{element:f,padding:a=0}=O(t,e)||{};if(null==f)return{};const d=C(a),p={x:n,y:o},h=D(i),g=A(h),y=yield l.getDimensions(f),x="y"===h,v=x?"top":"left",w=x?"bottom":"right",b=x?"clientHeight":"clientWidth",T=r.reference[g]+r.reference[h]-p[h]-r.floating[g],L=p[h]-r.reference[h],P=yield null==l.getOffsetParent?void 0:l.getOffsetParent(f);let S=P?P[b]:0;S&&(yield null==l.isElement?void 0:l.isElement(P))||(S=c.floating[b]||r.floating[g]);const k=T/2-L/2,F=S/2-y[g]/2-1,H=m(d[v],F),W=m(d[w],F),j=H,_=S-y[g]-W,B=S/2-y[g]/2+k,V=R(j,B,_),M=!s.arrow&&null!=E(i)&&B!==V&&r.reference[g]/2-(B<j?H:W)-y[g]/2<0,z=M?B<j?B-j:B-_:0;return{[h]:p[h]+z,data:u({[h]:V,centerOffset:B-V-z},M&&{alignmentOffset:z}),reset:M}}))}}),bt=t=>h(void 0,[t],(function*({floatingElement:t,referenceElement:e,arrowElement:n,align:i="top"}){var r,l,c,s;if("test"!==o.p){const o=[(s=null!==(r=null==n?void 0:n.offsetHeight)&&void 0!==r?r:10,void 0===s&&(s=0),{name:"offset",options:s,fn(t){return h(this,null,(function*(){var e,n;const{x:o,y:i,placement:r,middlewareData:l}=t,c=yield function(t,e){return h(this,null,(function*(){const{placement:n,platform:o,elements:i}=t,r=yield null==o.isRTL?void 0:o.isRTL(i.floating),l=T(n),c=E(n),s="y"===P(n),f=["left","top"].includes(l)?-1:1,a=r&&s?-1:1,d=O(e,t);let{mainAxis:p,crossAxis:h,alignmentAxis:m}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:u({mainAxis:0,crossAxis:0,alignmentAxis:null},d);return c&&"number"==typeof m&&(h="end"===c?-1*m:m),s?{x:h*a,y:p*f}:{x:p*f,y:h*a}}))}(t,s);return r===(null==(e=l.offset)?void 0:e.placement)&&null!=(n=l.arrow)&&n.alignmentOffset?{}:{x:o+c.x,y:i+c.y,data:d(u({},c),{placement:r})}}))}}),vt(),xt()];n&&o.push(wt({element:n}));const{x:f,y:a,middlewareData:p,placement:m}=yield((t,e,n)=>{const o=new Map,i=u({platform:gt},n),r=d(u({},i.platform),{_c:o});return((t,e,n)=>h(void 0,null,(function*(){const{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:l}=n,c=r.filter(Boolean),s=yield null==l.isRTL?void 0:l.isRTL(e);let f=yield l.getElementRects({reference:t,floating:e,strategy:i}),{x:a,y:p}=H(f,o,s),h=o,m={},g=0;for(let n=0;n<c.length;n++){const{name:r,fn:y}=c[n],{x,y:v,data:w,reset:b}=yield y({x:a,y:p,initialPlacement:o,placement:h,strategy:i,middlewareData:m,rects:f,platform:l,elements:{reference:t,floating:e}});a=null!=x?x:a,p=null!=v?v:p,m=d(u({},m),{[r]:u(u({},m[r]),w)}),b&&g<=50&&(g++,"object"==typeof b&&(b.placement&&(h=b.placement),b.rects&&(f=!0===b.rects?yield l.getElementRects({reference:t,floating:e,strategy:i}):b.rects),({x:a,y:p}=H(f,h,s))),n=-1)}return{x:a,y:p,placement:h,strategy:i,middlewareData:m}})))(t,e,d(u({},i),{platform:r}))})(e,t,{placement:i,middleware:o,strategy:"fixed"});Object.assign(t.style,{left:`${f}px`,top:`${a}px`,visibility:"visible"}),n&&((null===(l=p.arrow)||void 0===l?void 0:l.x)?Object.assign(n.style,{left:`${p.arrow.x}px`,top:"bottom"===m?-n.offsetHeight/2+"px":"",bottom:"top"===m?-n.offsetHeight/2+"px":""}):(null===(c=p.arrow)||void 0===c?void 0:c.y)&&Object.assign(n.style,{left:"right"===m?-n.offsetWidth/2+"px":"",right:"left"===m?-n.offsetWidth/2+"px":"",top:`${p.arrow.y}px`}))}}))}}]);
|
package/dist/7779.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 7779.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunk_public_ui_sample_react=self.webpackChunk_public_ui_sample_react||[]).push([[7779],{3364:(e,t,n)=>{n.d(t,{K:()=>u});var o=n(4600),l=n(6970),r=n(9060),i=n(3584),a=n(7767),s=n(4916);const c=({ariaLabel:e,icon:t})=>(0,l.h)(a.d,{class:"kol-alert__heading-icon",_label:e,_icons:t}),d=({type:e,label:t})=>{switch(e){case"error":return(0,l.h)(c,{ariaLabel:(0,i.t)("kol-error"),icon:"codicon codicon-error",label:t});case"info":return(0,l.h)(c,{ariaLabel:(0,i.t)("kol-info"),icon:"codicon codicon-info",label:t});case"warning":return(0,l.h)(c,{ariaLabel:(0,i.t)("kol-warning"),icon:"codicon codicon-warning",label:t});case"success":return(0,l.h)(c,{ariaLabel:(0,i.t)("kol-success"),icon:"codicon codicon-pass",label:t});default:return(0,l.h)(c,{ariaLabel:(0,i.t)("kol-message"),icon:"codicon codicon-comment",label:t})}},u=(e,t)=>{var n,c;const{class:u={},type:h="default",variant:b="msg",label:p,hasCloser:g,alert:v,onAlertTimeout:_,onCloserClick:f,level:y}=e,m=(0,o._)(e,["class","type","variant","label","hasCloser","alert","onAlertTimeout","onCloserClick","level"]);v&&((null===(n=navigator.userActivation)||void 0===n?void 0:n.hasBeenActive)&&(null===(c=null===navigator||void 0===navigator?void 0:navigator.vibrate)||void 0===c||c.call(navigator,[100,75,100,75,100])),setTimeout((()=>{null==_||_()}),1e4));const j=Object.assign({class:(0,r.c)("kol-alert",`kol-alert--${h}`,`kol-alert--${b}`,{"kol-alert--hasCloser":!!g},u),role:v?"alert":void 0},m);return(0,l.h)("div",Object.assign({},j),(0,l.h)("div",{class:"kol-alert__container"},(0,l.h)(d,{label:p,type:h}),(0,l.h)("div",{class:"kol-alert__container-content"},p?(0,l.h)(s.K,{class:"kol-alert__heading",level:y},p):null,"msg"===b&&(0,l.h)("div",{class:"kol-alert__content"},t)),g&&(0,l.h)(a.a,{class:"kol-alert__close-button close","data-testid":"alert-close-button",_ariaDescription:(null==p?void 0:p.trim())||"",_hideLabel:!0,_icons:{left:{icon:"codicon codicon-close"}},_label:(0,i.t)("kol-close-alert"),_on:{onClick:f},_tooltipAlign:"left"})),"card"===b&&(0,l.h)("div",{class:"kol-alert__content"},t))}},5117:(e,t,n)=>{n.d(t,{K:()=>a});var o=n(4600),l=n(9060),r=n(6970),i=n(3364);const a=e=>{var{alert:t,msg:n,hideError:a,id:s,class:c}=e,d=(0,o._)(e,["alert","msg","hideError","id","class"]);return(0,r.h)(i.K,Object.assign({id:`${s}-error`,alert:t,type:"error",class:(0,l.c)({error:!0,"visually-hidden":!0===a},c)},n,d,{"aria-hidden":"true"}),(null==n?void 0:n.description)||void 0)}},4916:(e,t,n)=>{n.d(t,{K:()=>d});var o=n(4600),l=n(6970),r=n(9060);const i=1;function a(e){return function(e){return e>=i&&e<=6}(e)?`h${e}`:"strong"}const s=(e,t)=>{var{class:n,level:s=i,variant:c}=e,d=(0,o._)(e,["class","level","variant"]);const u=a(s),h=c||u;return(0,l.h)(u,Object.assign({class:(0,r.c)("kol-headline",`kol-headline--${h}`,n)},d),t)},c=(e,t)=>{var{class:n,level:s=i}=e,c=(0,o._)(e,["class","level"]);const d=function(e){return 1===e?"span":a(e)}(s+1);return(0,l.h)(d,Object.assign({class:(0,r.c)("kol-headline kol-headline--group kol-headline--secondary",n)},c),t)},d=(e,t)=>{var{secondaryHeadline:n,level:a=i,class:d,HeadingGroupProps:u={},SecondaryHeadlineProps:h={}}=e,b=(0,o._)(e,["secondaryHeadline","level","class","HeadingGroupProps","SecondaryHeadlineProps"]);const p=Object.assign({level:a},b);if(!n)return(0,l.h)(s,Object.assign({class:(0,r.c)(d,"kol-headline--single")},p),t);const{class:g}=u,v=(0,o._)(u,["class"]),_=Object.assign({class:(0,r.c)("kol-heading-group",g)},v);return(0,l.h)("hgroup",Object.assign({},_),(0,l.h)(s,Object.assign({class:(0,r.c)(d,"kol-headline--group","kol-headline--primary")},p),t),(0,l.h)(c,Object.assign({level:a},h),n))}},569:(e,t,n)=>{n.d(t,{K:()=>r});var o=n(6970),l=n(7767);const r=e=>{const{class:t,style:n,icons:r,label:i,onClick:a}=e;return(0,o.h)(l.d,{class:t,style:n,onClick:a,_icons:r,_label:i})}},2940:(e,t,n)=>{n.d(t,{K:()=>g,a:()=>p});var o=n(6970),l=n(8615),r=n(665),i=n(4600),a=n(7767),s=n(569),c=n(9060);const d=(e,t)=>{var{position:n="start",class:l}=e,r=(0,i._)(e,["position","class"]);const a=`inputAdornment-${n}`;return(0,o.h)("div",Object.assign({class:(0,c.c)(a,l)},r),t)};function u(e){return!!e&&(Array.isArray(e)?e.length>0:Boolean(e))}const h=(e,t)=>{const{class:n,startAdornment:l,endAdornment:r}=e,a=(0,i._)(e,["class","startAdornment","endAdornment"]);return u(l)||u(r)?(0,o.h)("div",Object.assign({class:(0,c.c)("input",n)},a),(0,o.h)(d,{position:"start"},l),t,(0,o.h)(d,{position:"end"},r)):(0,o.h)("div",Object.assign({class:(0,c.c)("input",n)},a),t)},b=e=>{const{label:t,icons:n,hideLabel:l,disabled:r,onClick:s}=e,c=(0,i._)(e,["label","icons","hideLabel","disabled","onClick"]);return(0,o.h)(a.a,Object.assign({tabindex:0,_label:t,_disabled:r,_icons:n,_hideLabel:l,_on:{onClick:s}},c))},p=e=>{const{componentName:t="button",label:n,icon:l,onClick:r}=e,a=(0,i._)(e,["componentName","label","icon","onClick"]),c="button"===t?b:s.K;return(0,o.h)(c,Object.assign({label:n||"",hideLabel:!0,icons:`codicon codicon-${l}`,onClick:r},a))},g=({state:e,endAdornment:t},n)=>{const{icons:i,smartButton:a,disabled:s}=function(e){let t,n;return"_icons"in e&&(t=e._icons),"_smartButton"in e&&(n=e._smartButton),{icons:t,smartButton:n,disabled:e._disabled}}(e);let c=null==i?void 0:i.left;(0,l.i)(c)&&(c={icon:c});let d=null==i?void 0:i.right;(0,l.i)(d)&&(d={icon:d});const u=[],b=[];return t&&(Array.isArray(t)?b.push(...t):b.push(t)),c&&u.push((0,o.h)(p,Object.assign({componentName:"icon"},(0,r.i)(c)?c:{}))),(0,r.i)(a)&&b.push((0,o.h)(p,Object.assign({componentName:"button"},a,{hideLabel:!0,disabled:s}))),d&&b.push((0,o.h)(p,Object.assign({componentName:"icon"},(0,r.i)(d)?d:{}))),(0,o.h)(h,{startAdornment:u,endAdornment:b},n)}},6809:(e,t,n)=>{n.d(t,{I:()=>s});var o=n(8019),l=n(8973),r=n(5800),i=n(608);const a=(e,t)=>{const n=e;"object"==typeof n&&null!==n&&((0,i.i)(n.right,1)&&(n.right={icon:n.right}),(0,i.i)(n.left,1)&&(n.left={icon:n.left}),t.set("_icons",n))};class s extends o.I{constructor(e,t,n){super(e,t,n),this.component=e}validateIcons(e){(0,r.o)(e,(()=>{try{e=(0,r.p)(e)}catch(e){}(0,r.w)(this.component,"_icons",(e=>"object"==typeof e&&null!==e&&((0,i.i)(e.left,1)||(0,l.i)(e.left)||(0,i.i)(e.right,1)||(0,l.i)(e.right))),new Set(["KoliBriHorizontalIcon"]),e,{hooks:{beforePatch:a},required:!0})}))}componentWillLoad(){super.componentWillLoad(),this.validateIcons(this.component._icons)}}},5278:(e,t,n)=>{n.d(t,{K:()=>j,a:()=>O,b:()=>g,g:()=>m});var o=n(4600),l=n(6970),r=n(9060),i=n(8615),a=n(3922),s=n(5687),c=n(7767),d=n(3584),u=n(5117),h=n(3641);const b=({hasExpertSlot:e,accessKey:t,shortKey:n,label:o})=>{if(e)return(0,l.h)("slot",{name:"expert"});if(!o)return null;if(!(0,i.i)(t)&&!(0,i.i)(n))return(0,l.h)("span",null,o);const r=(0,s.b)(t,n);return(0,l.h)(l.F,null,(0,l.h)(a.I,{badgeText:r,label:o})," ",(0,l.h)("span",{class:"access-key-hint","aria-hidden":"true"},r))},p=e=>{var{component:t="label",id:n,class:i,accessKey:a,shortKey:s,label:c,hideLabel:d,hasExpertSlot:u}=e,h=(0,o._)(e,["component","id","class","accessKey","shortKey","label","hideLabel","hasExpertSlot"]);const p=!u&&d;return(0,l.h)(t,Object.assign({},h,{class:(0,r.c)("input-label",i),id:p?void 0:`${n}-label`,hidden:p,htmlFor:n}),(0,l.h)("span",{class:"input-label-span"},(0,l.h)(b,{hasExpertSlot:u,accessKey:a,shortKey:s,label:c})))},g=e=>{var{id:t,class:n,hint:i}=e,a=(0,o._)(e,["id","class","hint"]);return i?(0,l.h)("span",Object.assign({class:(0,r.c)("hint",n),id:`${t}-hint`},a),i):null},v=e=>{var{currentLength:t,maxLength:n,class:i}=e,a=(0,o._)(e,["currentLength","maxLength","class"]);return(0,l.h)("span",Object.assign({class:(0,r.c)("counter",i)},a,{"aria-atomic":"true","aria-live":"polite","data-testid":"input-counter"}),t,n&&(0,l.h)(l.F,null,(0,l.h)("span",{"aria-label":(0,d.t)("kol-of"),role:"img"},"/"),n)," ",(0,l.h)("span",null,(0,d.t)("kol-characters")))},_=({id:e,align:t,badgeText:n,hideLabel:o,label:i,class:a})=>(0,l.h)(c.g,{"aria-hidden":"true",class:(0,r.c)("input-tooltip",a),_badgeText:n,_align:t,_id:o?`${e}-label`:void 0,_label:i});function f(e){return(null==e?void 0:e.type)&&{default:"msg-type-default",info:"msg-type-info",success:"msg-type-success",warning:"msg-type-warning",error:"msg-type-error"}[null==e?void 0:e.type]||""}const y=(e,t)=>{const{component:n="div",renderNoLabel:i,renderNoHint:a,anotherChildren:c,id:d,required:h,alert:b,disabled:y,class:m,msg:j,hideError:O,hideLabel:k,label:L,hint:K,accessKey:C,shortKey:P,tooltipAlign:x,counter:S,readOnly:A,touched:B,reverseLabelInput:w,formFieldLabelProps:E,formFieldHintProps:F,formFieldTooltipProps:H,formFieldMsgProps:$,formFieldCounterProps:T}=e,I=(0,o._)(e,["component","renderNoLabel","renderNoHint","anotherChildren","id","required","alert","disabled","class","msg","hideError","hideLabel","label","hint","accessKey","shortKey","tooltipAlign","counter","readOnly","touched","reverseLabelInput","formFieldLabelProps","formFieldHintProps","formFieldTooltipProps","formFieldMsgProps","formFieldCounterProps"]),N=!i,q=!a,D=(0,s.s)(L),z=function(e,t){return Boolean((null==e?void 0:e.description)&&(null==e?void 0:e.description.length)>0)&&(!0===t||"error"!==(null==e?void 0:e.type))}(j,B),G=(0,s.b)(C,P),M=!D&&k;let W={disabled:Boolean(y),required:Boolean(h),touched:Boolean(B),"hide-label":Boolean(k),"read-only":Boolean(A),"hidden-error":Boolean(O)};z&&(W=Object.assign(Object.assign({},W),{[(null==j?void 0:j.type)||"error"]:!0,[f(j)]:!0}));const U=[(0,l.h)(l.F,null,N&&(0,l.h)(p,Object.assign({},E||{},{id:d,hasExpertSlot:D,hideLabel:k,label:L,accessKey:C,shortKey:P})),q&&(0,l.h)(g,Object.assign({},F||{},{id:d,hint:K}))),(0,l.h)(l.F,null,t,M&&(0,l.h)(_,Object.assign({},H||{},{id:d,label:L,hideLabel:k,align:x,badgeText:G})))];return w&&U.reverse(),(0,l.h)(n,Object.assign({class:(0,r.c)("kol-input",W,m),role:"presentation"},I),U,z&&(0,l.h)(u.K,Object.assign({},$||{},{id:d,alert:b,msg:j,hideError:O})),S?(0,l.h)(v,Object.assign({},T||{},S)):null,c)};function m({ariaDescribedBy:e,hideLabel:t,label:n}){return{title:"",autoCapitalize:"off",autoCorrect:"off","aria-describedby":(null==e?void 0:e.length)?e.join(" "):void 0,"aria-label":t&&n?n:void 0}}const j=(e,t)=>{var{state:n}=e,r=(0,o._)(e,["state"]);return(0,l.h)(y,Object.assign({},function(e){const t={id:e._id,disabled:e._disabled,msg:(0,h.c)(e._msg),hint:e._hint,label:e._label,hideLabel:e._hideLabel,hideError:e._hideError,touched:e._touched,accessKey:e._accessKey,shortKey:e._shortKey};return"_required"in e&&(t.required=e._required),"_readOnly"in e&&(t.readOnly=e._readOnly),"_hasCounter"in e&&"_currentLength"in e&&(t.counter=e._hasCounter?{currentLength:e._currentLength}:void 0,t.counter&&"_maxLength"in e&&(t.counter.maxLength=e._maxLength)),t}(n),r),t)},O=e=>{var t,n;const o=Boolean("error"===(null===(t=e._msg)||void 0===t?void 0:t._type)&&e._msg._description&&(null===(n=e._msg._description)||void 0===n?void 0:n.length)>0)&&!0===e._touched,l="string"==typeof e._hint&&e._hint.length>0,r=[];return!0===o&&r.push(`${e._id}-error`),!0===l&&r.push(`${e._id}-hint`),{hasError:o,hasHint:l,ariaDescribedBy:r}}},8973:(e,t,n)=>{n.d(t,{i:()=>i,v:()=>a});var o=n(5800),l=n(608);const r=(e,t,n)=>{(0,l.b)(n)?e[t]=n:(0,l.i)(n,1)&&(e[t]={icon:n})},i=e=>"object"==typeof e&&null!==e&&(void 0===e.style||(0,l.a)(e.style))&&(void 0===e.label||(0,l.i)(e.label))&&(0,l.i)(e.icon,1),a=(e,t,n={})=>{(0,o.o)(t,(()=>{var a;try{t=(0,o.p)(t)}catch(e){}(0,o.w)(e,"_icons",(e=>{const t="object"==typeof e&&null!==e&&0===Object.keys(e).length;return null===e||t||(0,l.i)(e,1)||"object"==typeof e&&null!==e&&((0,l.i)(e.left,1)||i(e.left)||(0,l.i)(e.right,1)||i(e.right)||(0,l.i)(e.top,1)||i(e.top)||(0,l.i)(e.bottom,1)||i(e.bottom))}),new Set(["KoliBriIcon"]),t,Object.assign(Object.assign({},n),{defaultValue:{},hooks:{afterPatch:null===(a=n.hooks)||void 0===a?void 0:a.afterPatch,beforePatch:(e,t,o,i)=>{var a,s;"function"==typeof(null===(a=n.hooks)||void 0===a?void 0:a.beforePatch)&&(null===(s=n.hooks)||void 0===s||s.beforePatch(e,t,o,i)),(e=>{var t,n,o;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===(o=e.nextState)||void 0===o||o.set("_icons",(e=>{let t={};return(0,l.i)(e,1)?t={left:{icon:e}}:"object"==typeof e&&null!==e&&(r(t,"top",e.top),r(t,"right",e.right),r(t,"bottom",e.bottom),r(t,"left",e.left)),t})(t))}})(o)}}}))}))}},665:(e,t,n)=>{function o(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}n.d(t,{i:()=>o})},8615:(e,t,n)=>{n.d(t,{i:()=>v});const o="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;var l="object"==typeof self&&self&&self.Object===Object&&self;const r=(o||l||Function("return this")()).Symbol;var i=Object.prototype,a=i.hasOwnProperty,s=i.toString,c=r?r.toStringTag:void 0,d=Object.prototype.toString,u="[object Null]",h="[object Undefined]",b=r?r.toStringTag:void 0;const p=Array.isArray;var g="[object String]";function v(e){return"string"==typeof e||!p(e)&&function(e){return null!=e&&"object"==typeof e}(e)&&function(e){return null==e?void 0===e?h:u:b&&b in Object(e)?function(e){var t=a.call(e,c),n=e[c];try{e[c]=void 0;var o=!0}catch(e){}var l=s.call(e);return o&&(t?e[c]=n:delete e[c]),l}(e):function(e){return d.call(e)}(e)}(e)==g}},4600:(e,t,n)=>{function o(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var l=0;for(o=Object.getOwnPropertySymbols(e);l<o.length;l++)t.indexOf(o[l])<0&&Object.prototype.propertyIsEnumerable.call(e,o[l])&&(n[o[l]]=e[o[l]])}return n}n.d(t,{_:()=>o}),"function"==typeof SuppressedError&&SuppressedError}}]);
|