@public-ui/sample-react 2.0.2 → 2.0.4-rc.0
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/1090.js +1 -1
- package/dist/1181.js +1 -1
- package/dist/1218.js +1 -1
- package/dist/1338.js +1 -1
- package/dist/1517.js +1 -1
- package/dist/1596.js +1 -1
- package/dist/2163.js +1 -1
- package/dist/2415.js +1 -1
- package/dist/2594.js +1 -1
- package/dist/2611.js +1 -1
- package/dist/2643.js +1 -1
- package/dist/3099.js +2 -0
- package/dist/3145.js +1 -1
- package/dist/3345.js +1 -1
- package/dist/3388.js +1 -1
- package/dist/3466.js +1 -1
- package/dist/3580.js +1 -1
- package/dist/3600.js +2 -0
- package/dist/3619.js +1 -1
- package/dist/3776.js +1 -1
- package/dist/3845.js +2 -0
- package/dist/4150.js +1 -1
- package/dist/42.js +1 -1
- package/dist/4279.js +1 -1
- package/dist/4378.js +2 -0
- package/dist/4463.js +1 -1
- package/dist/4669.js +1 -1
- package/dist/4686.js +1 -1
- package/dist/5027.js +1 -1
- package/dist/521.js +1 -1
- package/dist/5324.js +1 -1
- package/dist/5373.js +1 -1
- package/dist/5518.js +1 -1
- package/dist/5615.js +1 -1
- package/dist/5853.js +1 -1
- package/dist/6010.js +1 -1
- package/dist/6308.js +1 -1
- package/dist/7170.js +1 -1
- package/dist/755.js +1 -1
- package/dist/7654.js +1 -1
- package/dist/8037.js +1 -1
- package/dist/817.js +1 -1
- package/dist/8612.js +1 -1
- package/dist/8734.js +1 -1
- package/dist/881.js +1 -1
- package/dist/8869.js +1 -1
- package/dist/892.js +1 -1
- package/dist/8948.js +1 -1
- package/dist/8951.js +1 -1
- package/dist/9227.js +2 -0
- package/dist/9317.js +1 -1
- package/dist/9330.js +1 -1
- package/dist/9700.js +2 -0
- package/dist/9727.js +1 -1
- package/dist/9797.js +1 -1
- package/dist/9865.js +1 -1
- package/dist/9886.js +1 -1
- package/dist/9912.js +2 -0
- package/dist/9984.js +1 -1
- package/dist/main.css +1 -1
- package/dist/main.js +3094 -37761
- package/dist/main.js.LICENSE.txt +2 -2
- package/package.json +13 -14
- package/src/App.tsx +16 -16
- package/src/components/SampleDescription.tsx +1 -1
- package/src/components/alert/basic.tsx +2 -4
- package/src/components/alert/html.tsx +1 -2
- package/src/components/button/access-key.tsx +1 -1
- package/src/components/button/width.tsx +2 -2
- package/src/components/card/selection.tsx +4 -4
- package/src/components/input-date/partials/cases.tsx +2 -2
- package/src/components/link-button/basic.tsx +1 -1
- package/src/components/nav/basic.tsx +2 -55
- package/src/components/nav/horizontal.tsx +2 -51
- package/src/components/nav/links.ts +78 -0
- package/src/components/split-button/basic.tsx +5 -5
- package/src/components/table/badge-size.tsx +3 -2
- package/src/components/table/column-alignment.tsx +84 -0
- package/src/components/table/horizontal-scrollbar.tsx +57 -0
- package/src/components/table/pagination-position.tsx +34 -0
- package/src/components/table/render-cell.tsx +78 -22
- package/src/components/table/routes.ts +8 -4
- package/src/components/table/{sort-date.tsx → sort-data.tsx} +1 -1
- package/src/react.main.tsx +2 -3
- package/src/scenarios/appointment-form/DistrictForm.tsx +11 -11
- package/src/shares/theme.ts +12 -38
- package/dist/1399.js +0 -2
- package/dist/3035.js +0 -2
- package/dist/4114.js +0 -2
- package/dist/4563.js +0 -2
- package/dist/5440.js +0 -2
- package/dist/5496.js +0 -2
- package/dist/5767.js +0 -2
- package/dist/7432.js +0 -2
- package/dist/7432.js.LICENSE.txt +0 -3
- package/dist/9962.js +0 -2
- package/dist/9962.js.LICENSE.txt +0 -3
- /package/dist/{1399.js.LICENSE.txt → 3099.js.LICENSE.txt} +0 -0
- /package/dist/{3035.js.LICENSE.txt → 3600.js.LICENSE.txt} +0 -0
- /package/dist/{4114.js.LICENSE.txt → 3845.js.LICENSE.txt} +0 -0
- /package/dist/{4563.js.LICENSE.txt → 4378.js.LICENSE.txt} +0 -0
- /package/dist/{5440.js.LICENSE.txt → 9227.js.LICENSE.txt} +0 -0
- /package/dist/{5496.js.LICENSE.txt → 9700.js.LICENSE.txt} +0 -0
- /package/dist/{5767.js.LICENSE.txt → 9912.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
|
|
3
|
+
import { KolTable } from '@public-ui/react';
|
|
4
|
+
import { KoliBriTableHeaders, KoliBriTablePaginationProps } from '@public-ui/components';
|
|
5
|
+
import { Data, DATA } from './test-data';
|
|
6
|
+
import { DATE_FORMATTER } from './formatter';
|
|
7
|
+
import { SampleDescription } from '../SampleDescription';
|
|
8
|
+
const HEADERS: KoliBriTableHeaders = {
|
|
9
|
+
horizontal: [
|
|
10
|
+
[
|
|
11
|
+
{ label: 'Order', key: 'order' },
|
|
12
|
+
{ label: 'Date', key: 'date', render: (_el, _cell, tupel) => DATE_FORMATTER.format((tupel as unknown as Data).date) },
|
|
13
|
+
],
|
|
14
|
+
],
|
|
15
|
+
};
|
|
16
|
+
const PAGINATION: KoliBriTablePaginationProps = { _page: 2 };
|
|
17
|
+
|
|
18
|
+
export const PaginationPosition: FC = () => (
|
|
19
|
+
<div className="grid gap-14">
|
|
20
|
+
<SampleDescription>Tables with different pagination positions.</SampleDescription>
|
|
21
|
+
<section>
|
|
22
|
+
<h2>Table with pagination at the bottom.</h2>
|
|
23
|
+
<KolTable _label="Tabellenbeschreibung" _data={DATA} _headers={HEADERS} _pagination={PAGINATION} _paginationPosition="bottom"></KolTable>
|
|
24
|
+
</section>
|
|
25
|
+
<section>
|
|
26
|
+
<h2>Table with pagination at the top.</h2>
|
|
27
|
+
<KolTable _label="Tabellenbeschreibung" _data={DATA} _headers={HEADERS} _pagination={PAGINATION} _paginationPosition="top"></KolTable>
|
|
28
|
+
</section>
|
|
29
|
+
<section>
|
|
30
|
+
<h2>Table with pagination at both top and bottom.</h2>
|
|
31
|
+
<KolTable _label="Tabellenbeschreibung" _data={DATA} _headers={HEADERS} _pagination={PAGINATION} _paginationPosition="both"></KolTable>
|
|
32
|
+
</section>
|
|
33
|
+
</div>
|
|
34
|
+
);
|
|
@@ -4,41 +4,97 @@ import { KolButton, KolInputText, KolTable } from '@public-ui/react';
|
|
|
4
4
|
|
|
5
5
|
import { getRoot } from '../../shares/react-roots';
|
|
6
6
|
import { KoliBriTableHeaders } from '@public-ui/components';
|
|
7
|
-
import { DATA, Data } from './test-data';
|
|
8
7
|
import { DATE_FORMATTER } from './formatter';
|
|
9
8
|
import { SampleDescription } from '../SampleDescription';
|
|
10
9
|
|
|
10
|
+
type Data = {
|
|
11
|
+
order: number;
|
|
12
|
+
date: Date;
|
|
13
|
+
shipped: boolean;
|
|
14
|
+
};
|
|
15
|
+
const DATA: Data[] = [
|
|
16
|
+
{
|
|
17
|
+
order: 0,
|
|
18
|
+
shipped: false,
|
|
19
|
+
date: new Date('1981-05-26T21:33:43.612Z'),
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
order: 1,
|
|
23
|
+
shipped: true,
|
|
24
|
+
date: new Date('1971-04-25T19:44:17.014Z'),
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
order: 2,
|
|
28
|
+
shipped: false,
|
|
29
|
+
date: new Date('1986-07-10T11:39:29.539Z'),
|
|
30
|
+
},
|
|
31
|
+
];
|
|
32
|
+
|
|
11
33
|
const HEADERS: KoliBriTableHeaders = {
|
|
12
34
|
horizontal: [
|
|
13
35
|
[
|
|
14
|
-
{ label: '#', key: 'order', textAlign: 'center' },
|
|
15
36
|
{
|
|
16
|
-
label: '
|
|
37
|
+
label: '#',
|
|
38
|
+
key: 'order',
|
|
39
|
+
textAlign: 'center',
|
|
40
|
+
width: '10em',
|
|
41
|
+
|
|
42
|
+
/* Example 1: Use render return value to format data */
|
|
43
|
+
render: (_el, cell) => `Index: ${cell.label}`,
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
label: 'Status',
|
|
47
|
+
key: 'shipped',
|
|
48
|
+
textAlign: 'center',
|
|
49
|
+
width: '10em',
|
|
50
|
+
|
|
51
|
+
/* Example 2: Simple render function using textContent */
|
|
52
|
+
render: (el, cell) => {
|
|
53
|
+
if (cell.label) {
|
|
54
|
+
el.textContent = `Order has been dispatched 🚚`;
|
|
55
|
+
} else {
|
|
56
|
+
el.textContent = `Order pending 📦`;
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
label: 'Date (string)',
|
|
17
62
|
key: 'date',
|
|
63
|
+
width: '20em',
|
|
18
64
|
textAlign: 'center',
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
65
|
+
|
|
66
|
+
/* Example 3: Render function using innerHTML. ⚠️Make sure to sanitize data to avoid XSS. */
|
|
67
|
+
render: (el, cell) => {
|
|
68
|
+
el.innerHTML = `<strong>${DATE_FORMATTER.format(cell.label as unknown as Date)}</strong>`;
|
|
22
69
|
},
|
|
23
|
-
sort: (data: Data[]) =>
|
|
24
|
-
data.sort((data0, data1) => {
|
|
25
|
-
if (data0.date < data1.date) return -1;
|
|
26
|
-
else if (data1.date < data0.date) return 1;
|
|
27
|
-
else return 0;
|
|
28
|
-
}),
|
|
70
|
+
sort: (data: Data[]) => data.sort((data0, data1) => data0.date.getTime() - data1.date.getTime()),
|
|
29
71
|
},
|
|
30
72
|
{
|
|
31
|
-
label: '
|
|
73
|
+
label: 'Action (react)',
|
|
32
74
|
key: 'order',
|
|
75
|
+
width: '20em',
|
|
76
|
+
|
|
77
|
+
/* Example 4: Render function using React */
|
|
33
78
|
render: (el) => {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
79
|
+
const renderElement = document.createElement('div');
|
|
80
|
+
renderElement.setAttribute('role', 'presentation');
|
|
81
|
+
el.innerHTML = '';
|
|
82
|
+
el.appendChild(renderElement);
|
|
83
|
+
|
|
84
|
+
/* https://react.dev/reference/react-dom/client/createRoot */
|
|
85
|
+
getRoot(renderElement).render(
|
|
86
|
+
<div
|
|
87
|
+
style={{
|
|
88
|
+
display: `grid`,
|
|
89
|
+
gridAutoFlow: `column`,
|
|
90
|
+
alignItems: `end`,
|
|
91
|
+
gap: `1rem`,
|
|
92
|
+
maxWidth: `400px`,
|
|
93
|
+
}}
|
|
94
|
+
>
|
|
95
|
+
<KolInputText _label="Input" />
|
|
96
|
+
<KolButton _label={'Save'} />
|
|
97
|
+
</div>,
|
|
42
98
|
);
|
|
43
99
|
},
|
|
44
100
|
},
|
|
@@ -51,6 +107,6 @@ export const TableRenderCell: FC = () => (
|
|
|
51
107
|
<SampleDescription>
|
|
52
108
|
<p>This sample simulates the usage of React render functions for the table column contents.</p>
|
|
53
109
|
</SampleDescription>
|
|
54
|
-
<KolTable _label="Sort
|
|
110
|
+
<KolTable _label="Sort by date column" _data={DATA} _headers={HEADERS} className="block min-w-75em" />
|
|
55
111
|
</>
|
|
56
112
|
);
|
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
import { Routes } from '../../shares/types';
|
|
2
2
|
|
|
3
3
|
import { TableBadgeSize } from './badge-size';
|
|
4
|
-
|
|
4
|
+
import { TableColumnAlignment } from './column-alignment';
|
|
5
5
|
import { TableRenderCell } from './render-cell';
|
|
6
|
-
|
|
7
|
-
import { TableSortTable } from './sort-date';
|
|
6
|
+
import { TableSortData } from './sort-data';
|
|
8
7
|
import { TableWithPagination } from './with-pagination';
|
|
8
|
+
import { PaginationPosition } from './pagination-position';
|
|
9
|
+
import { TableHorizontalScrollbar } from './horizontal-scrollbar';
|
|
9
10
|
|
|
10
11
|
export const TABLE_ROUTES: Routes = {
|
|
11
12
|
table: {
|
|
12
13
|
'badge-size': TableBadgeSize,
|
|
14
|
+
'column-alignment': TableColumnAlignment,
|
|
15
|
+
'horizontal-scrollbar': TableHorizontalScrollbar,
|
|
13
16
|
'render-cell': TableRenderCell,
|
|
14
|
-
'sort-data':
|
|
17
|
+
'sort-data': TableSortData,
|
|
15
18
|
'with-pagination': TableWithPagination,
|
|
19
|
+
'pagination-position': PaginationPosition,
|
|
16
20
|
},
|
|
17
21
|
};
|
|
@@ -30,4 +30,4 @@ const HEADERS: KoliBriTableHeaders = {
|
|
|
30
30
|
],
|
|
31
31
|
};
|
|
32
32
|
|
|
33
|
-
export const
|
|
33
|
+
export const TableSortData: FC = () => <KolTable _label="Sort a date column" _data={DATA} _headers={HEADERS} className="block" />;
|
package/src/react.main.tsx
CHANGED
|
@@ -5,8 +5,7 @@ import { HashRouter as Router } from 'react-router-dom';
|
|
|
5
5
|
import { defineCustomElements } from '@public-ui/components/dist/loader';
|
|
6
6
|
import type { Generic } from 'adopted-style-sheets';
|
|
7
7
|
import { register } from '@public-ui/components';
|
|
8
|
-
import {
|
|
9
|
-
import { TH } from '@public-oss/kolibri-themes';
|
|
8
|
+
import { BMF, DEFAULT, ECL_EC, ECL_EU, ITZBund } from '@public-ui/themes';
|
|
10
9
|
import { App } from './App';
|
|
11
10
|
|
|
12
11
|
type Theme = Generic.Theming.RegisterPatch<string, string, string>;
|
|
@@ -23,7 +22,7 @@ void (async () => {
|
|
|
23
22
|
} else {
|
|
24
23
|
/* Regular mode: Register all known themes. */
|
|
25
24
|
try {
|
|
26
|
-
await register([
|
|
25
|
+
await register([BMF, DEFAULT, ECL_EC, ECL_EU, ITZBund], defineCustomElements, {
|
|
27
26
|
theme: {
|
|
28
27
|
detect: 'auto',
|
|
29
28
|
},
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { KolButton, KolForm, KolHeading, KolSelect } from '@public-ui/react';
|
|
3
3
|
import { Field, FieldProps, useFormikContext } from 'formik';
|
|
4
4
|
import { FormValues } from './AppointmentForm';
|
|
5
|
-
import {
|
|
5
|
+
import { ErrorListPropType } from '@public-ui/components';
|
|
6
6
|
|
|
7
7
|
const LOCATION_OPTIONS = [
|
|
8
8
|
{
|
|
@@ -29,23 +29,23 @@ const LOCATION_OPTIONS = [
|
|
|
29
29
|
|
|
30
30
|
export function DistrictForm() {
|
|
31
31
|
const form = useFormikContext<FormValues>();
|
|
32
|
-
const
|
|
32
|
+
const errorList = createErrorList(form.errors);
|
|
33
|
+
|
|
34
|
+
function createErrorList(formikErrors: Record<string, string>): ErrorListPropType[] {
|
|
35
|
+
return Object.keys(formikErrors).map((fieldName) => ({
|
|
36
|
+
message: formikErrors[fieldName],
|
|
37
|
+
selector: `#field-${fieldName}`,
|
|
38
|
+
}));
|
|
39
|
+
}
|
|
33
40
|
|
|
34
41
|
return (
|
|
35
42
|
<div className="p-2">
|
|
36
43
|
<KolHeading _level={2} _label="Wählen Sie einen Stadtteil aus"></KolHeading>
|
|
37
|
-
|
|
38
|
-
{sectionSubmitted && Object.keys(form.errors).length ? (
|
|
39
|
-
<div className="mt-2">
|
|
40
|
-
<ErrorList errors={form.errors} />
|
|
41
|
-
</div>
|
|
42
|
-
) : null}
|
|
43
|
-
|
|
44
44
|
<KolForm
|
|
45
|
+
_errorList={errorList}
|
|
45
46
|
_on={{
|
|
46
47
|
onSubmit: () => {
|
|
47
48
|
void form.submitForm();
|
|
48
|
-
setSectionSubmitted(true);
|
|
49
49
|
},
|
|
50
50
|
}}
|
|
51
51
|
>
|
package/src/shares/theme.ts
CHANGED
|
@@ -1,21 +1,15 @@
|
|
|
1
1
|
import { SelectOption } from '@public-ui/components';
|
|
2
2
|
|
|
3
|
-
export type Theme = 'bmf' | '
|
|
3
|
+
export type Theme = 'bmf' | 'default' | 'ecl-ec' | 'ecl-eu' | 'itzbund' | 'unstyled';
|
|
4
|
+
|
|
5
|
+
const drafts: Theme[] = ['ecl-ec', 'ecl-eu', 'itzbund'];
|
|
6
|
+
|
|
7
|
+
export const isDraftTheme = (theme: Theme) => drafts.includes(theme);
|
|
4
8
|
|
|
5
9
|
export const isTheme = (value: unknown) => {
|
|
6
10
|
return (
|
|
7
11
|
typeof value === 'string' &&
|
|
8
|
-
(value === '
|
|
9
|
-
value === 'bmf' ||
|
|
10
|
-
value === 'bzst-v1' ||
|
|
11
|
-
value === 'default' ||
|
|
12
|
-
value === 'ecl-ec' ||
|
|
13
|
-
value === 'ecl-eu' ||
|
|
14
|
-
value === 'itzbund' ||
|
|
15
|
-
value === 'mapz' ||
|
|
16
|
-
value === 'th' ||
|
|
17
|
-
value === 'zoll-v2' ||
|
|
18
|
-
value === 'zoll-v3')
|
|
12
|
+
(value === 'bmf' || value === 'default' || value === 'ecl-ec' || value === 'ecl-eu' || value === 'itzbund' || value === 'unstyled')
|
|
19
13
|
);
|
|
20
14
|
};
|
|
21
15
|
|
|
@@ -26,47 +20,27 @@ export type Store = {
|
|
|
26
20
|
|
|
27
21
|
export const THEME_OPTIONS: SelectOption<Theme>[] = [
|
|
28
22
|
{
|
|
29
|
-
label: 'Unstyled',
|
|
23
|
+
label: 'Unstyled (Uncolored)',
|
|
30
24
|
value: 'unstyled',
|
|
31
25
|
},
|
|
32
26
|
{
|
|
33
|
-
label: 'Bundesministerium der Finanzen',
|
|
27
|
+
label: 'Bundesministerium der Finanzen (Tested)',
|
|
34
28
|
value: 'bmf',
|
|
35
29
|
},
|
|
36
30
|
{
|
|
37
|
-
label: '
|
|
38
|
-
value: 'bzst-v1',
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
label: 'Default',
|
|
31
|
+
label: 'Default (Tested)',
|
|
42
32
|
value: 'default',
|
|
43
33
|
},
|
|
44
34
|
{
|
|
45
|
-
label: 'European Commission (
|
|
35
|
+
label: 'European Commission (Draft)',
|
|
46
36
|
value: 'ecl-ec',
|
|
47
37
|
},
|
|
48
38
|
{
|
|
49
|
-
label: 'European Union (
|
|
39
|
+
label: 'European Union (Draft)',
|
|
50
40
|
value: 'ecl-eu',
|
|
51
41
|
},
|
|
52
42
|
{
|
|
53
|
-
label: 'Informationstechnikzentrum Bund',
|
|
43
|
+
label: 'Informationstechnikzentrum Bund (Draft)',
|
|
54
44
|
value: 'itzbund',
|
|
55
45
|
},
|
|
56
|
-
{
|
|
57
|
-
label: '.',
|
|
58
|
-
value: 'mapz',
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
label: 'Freistaat Thüringen',
|
|
62
|
-
value: 'th',
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
label: '..',
|
|
66
|
-
value: 'zoll-v2',
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
label: '...',
|
|
70
|
-
value: 'zoll-v3',
|
|
71
|
-
},
|
|
72
46
|
];
|
package/dist/1399.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 1399.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunk_public_ui_sample_react=self.webpackChunk_public_ui_sample_react||[]).push([[1399],{1399:(t,e,l)=>{l.r(e),l.d(e,{initialize:()=>a});var i=l(2143),r=l(5440);function n(t,e){try{Object.defineProperty((0,i.g)(),t,{get:function(){return e}})}catch(e){i.L.debug(`KoliBri property ${t} is already bind.`)}}const o=(t,e)=>i.L.debug(`${t} ${e?"":"not "}activated`),a=()=>{if((0,i.i)(),(0,i.h)()){(0,i.r)(),n("a11yColorContrast",r.l),n("querySelector",r.k),n("querySelectorAll",r.n),n("querySelectorColors",r.q),n("utils",(function(){return r.j})),n("parseJson",r.p),n("stringifyJson",r.t);const t=(0,i.a)().body,e=(0,i.a)().createElement("svg");if(e.setAttribute("aria-label","KoliBri-DevTools"),e.setAttribute("xmlns","http://www.w3.org/2000/svg"),e.setAttribute("role","toolbar"),e.setAttribute("style","position: fixed;color: black;font-size: 200%;bottom: 0.25rem;right: 0.25rem;"),e.innerHTML='<svg\n xmlns="http://www.w3.org/2000/svg"\n width="50"\n height="50"\n viewBox="0 0 600 600"\n>\n <path d="M353 322L213 304V434L353 322Z" fill="#047" />\n <path d="M209 564V304L149 434L209 564Z" fill="#047" />\n <path d="M357 316L417 250L361 210L275 244L357 316Z" fill="#047" />\n <path d="M353 318L35 36L213 300L353 318Z" fill="#047" />\n <path d="M329 218L237 92L250 222L272 241L329 218Z" fill="#047" />\n <path d="M391 286L565 272L421 252L391 286Z" fill="#047" />\n</svg>',(0,i.a)().body.appendChild(e),o("Development mode",(0,i.h)()),o("Experimental mode",(0,i.d)()),o("Color contrast analysis",(0,i.j)()),(0,i.j)()){const e=setTimeout((()=>{clearTimeout(e),setInterval((()=>{r.j.queryHtmlElementColors((0,i.a)().createElement("div"),(0,r.l)(t),!1,!1)}),1e4)}),2500)}}}}}]);
|
package/dist/3035.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 3035.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunk_public_ui_sample_react=self.webpackChunk_public_ui_sample_react||[]).push([[3035],{83:(t,e,o)=>{o.d(e,{I:()=>i});var n=o(6216);const i=({accessKey:t,label:e})=>{let[o,...i]=e.split(t);return 0===i.length&&(t=t.toUpperCase(),[o,...i]=e.split(t)),0===i.length&&(t=t.toLowerCase(),[o,...i]=e.split(t)),(0,n.h)(n.F,null,o,i.length?(0,n.h)(n.F,null,(0,n.h)("u",null,t),i.join(t)):null)}},3672:(t,e,o)=>{o.d(e,{A:()=>a});var n=o(5440),i=o(4289);const s=(0,o(2143).d)();class a{constructor(t,e,o){var n,a;if(this.setFormAssociatedValue=t=>{var e;const o=null===(e=this.formAssociated)||void 0===e?void 0:e.getAttribute("name");null!==o&&""!==o||(0,i.d)(` The form field (${this.name}) must have a name attribute to be form-associated. Please define the _name attribute.`);const n=this.tryToStringifyValue(t);this.syncValue(t,n,this.formAssociated),this.syncValue(t,n,this.syncToOwnInput)},this.component=t,this.host=this.findHostWithShadowRoot(o),this.name=e,s){switch(null===(n=this.host)||void 0===n||n.querySelectorAll("input,select,textarea").forEach((t=>{var e;null===(e=this.host)||void 0===e||e.removeChild(t)})),this.name){case"button":this.formAssociated=document.createElement("button");break;case"select":this.formAssociated=document.createElement("select"),this.formAssociated.setAttribute("multiple","");break;case"textarea":this.formAssociated=document.createElement("textarea");break;default:this.formAssociated=document.createElement("input"),this.formAssociated.setAttribute("type","hidden")}this.formAssociated.setAttribute("aria-hidden","true"),this.formAssociated.setAttribute("data-form-associated",""),this.formAssociated.setAttribute("hidden",""),null===(a=this.host)||void 0===a||a.appendChild(this.formAssociated)}}findHostWithShadowRoot(t){for(;null===(null==t?void 0:t.shadowRoot)&&t!==document.body;)(t=null==t?void 0:t.parentNode).host&&(t=t.host);return t}setAttribute(t,e,o){if(s)try{if("boolean"!=typeof(o="object"==typeof o&&null!==o?JSON.stringify(o):o)&&"number"!=typeof o&&"string"!=typeof o)throw new Error("Invalid value type: "+typeof o);null==e||e.setAttribute(t,`${o}`)}catch(o){null==e||e.removeAttribute(t)}}tryToStringifyValue(t){try{return"object"==typeof t&&null!==t?JSON.stringify(t).toString():null==t?null:t.toString()}catch(t){return(0,i.g)(`The form field raw value is not able to stringify! ${t}`),""}}syncValue(t,e,o){o&&("select"===this.name?(o.querySelectorAll("option").forEach((t=>{o.removeChild(t)})),Array.isArray(t)&&t.forEach((t=>{const e=this.tryToStringifyValue(t);if("string"==typeof e){const t=document.createElement("option");t.setAttribute("value",e),t.setAttribute("selected",""),o.appendChild(t)}}))):"string"==typeof e?(o.setAttribute("value",e),o.value=e):(o.removeAttribute("value"),o.value=""))}validateName(t){((t,e,o)=>{(0,n.d)(t,"_name",e,o)})(this.component,t,{hooks:{afterPatch:()=>{this.setAttribute("name",this.formAssociated,this.component.state._name)}}}),void 0===t&&(0,i.d)("Ein Name am Eingabefeldern oder Schalter ist nicht zwingend erforderlich, kann aber für die Autocomplete-Funktion und für das statische Versenden des Eingabefeldes relevant sein.")}validateSyncValueBySelector(t){if(s&&"string"==typeof t){const e=document.querySelector(t);e&&(this.syncToOwnInput=e)}}componentWillLoad(){this.validateName(this.component._name),this.validateSyncValueBySelector(this.component._syncValueBySelector)}}},4725:(t,e,o)=>{o.d(e,{I:()=>u,g:()=>h});var n=o(5440),i=o(6281),s=o(4956),a=o(4289),r=o(4014),l=o(6430),c=o(3672);const h=t=>{const e="string"==typeof t._error&&t._error.length>0&&!0===t._touched,o="string"==typeof t._hint&&t._hint.length>0,n=[];return!0===e&&n.push(`${t._id}-error`),!0===o&&n.push(`${t._id}-hint`),{hasError:e,hasHint:o,ariaDescribedBy:n}};class d extends c.A{constructor(t,e,o){super(t,e,o),this.component=t}validateAlert(t){(0,n.a)(this.component,"_alert",t)}validateTouched(t){((t,e)=>{(0,n.a)(t,"_touched",e)})(this.component,t)}componentWillLoad(){super.componentWillLoad(),this.validateAlert(this.component._alert),this.validateTouched(this.component._touched)}}class u extends d{constructor(t,e,o){super(t,e,o),this.valueChangeListeners=[],this.onFacade={onBlur:this.onBlur.bind(this),onChange:this.onChange.bind(this),onClick:this.onClick.bind(this),onFocus:this.onFocus.bind(this)},this.component=t}validateAccessKey(t){(0,n.d)(this.component,"_accessKey",t)}validateAdjustHeight(t){((t,e)=>{(0,n.a)(t,"_adjustHeight",e)})(this.component,t)}validateDisabled(t){(0,n.a)(this.component,"_disabled",t),!0===t&&(0,a.e)()}validateError(t){(0,n.d)(this.component,"_error",t)}validateHideError(t){((t,e,o)=>{(0,n.a)(t,"_hideError",e,o)})(this.component,t,{hooks:{afterPatch:()=>{this.component.state._hideError&&(0,a.a)("Property hide-error for inputs: Only use when the error message is shown outside of the input component.")}}})}validateHideLabel(t){(0,i.v)(this.component,t,{hooks:{afterPatch:()=>{this.component.state._hideLabel&&(0,a.a)("Property hide-label for inputs: Only use for exceptions like search inputs that are clearly identifiable by their context.")}}})}validateHint(t){(0,n.d)(this.component,"_hint",t)}validateId(t){(0,n.d)(this.component,"_id",t,{hooks:{afterPatch:()=>{this.setAttribute("id",this.formAssociated,this.component.state._id)}},minLength:1}),""!==t&&void 0!==t||(0,a.d)("Eine eindeutige ID an den Eingabefeldern ist nicht zwingend erforderlich, könnte aber für die E2E-Tests relevant sein.")}validateLabel(t){(0,s.a)(this.component,t)}validateOn(t){"object"==typeof t&&(0,n.s)(this.component,"_on",t)}validateSmartButton(t){(0,n.o)(t,(()=>{try{t=(0,n.p)(t)}catch(t){}(0,n.s)(this.component,"_smartButton",t)}))}validateTabIndex(t){(0,l.v)(this.component,t)}componentWillLoad(){super.componentWillLoad(),this.validateAccessKey(this.component._accessKey),this.validateAdjustHeight(this.component._adjustHeight),this.validateError(this.component._error),this.validateDisabled(this.component._disabled),this.validateHideError(this.component._hideError),this.validateHideLabel(this.component._hideLabel),this.validateHint(this.component._hint),this.validateId(this.component._id),this.validateLabel(this.component._label),this.validateSmartButton(this.component._smartButton),this.validateOn(this.component._on),this.validateTabIndex(this.component._tabIndex)}onBlur(t){var e;this.component._alert=!0,this.component._touched=!0,(0,r.s)(t),(0,r.t)("blur",this.host),"function"==typeof(null===(e=this.component._on)||void 0===e?void 0:e.onBlur)&&this.component._on.onBlur(t)}onChange(t){var e;const o=t.target.value;(0,r.t)("change",this.host,o),this.setFormAssociatedValue(o),"function"==typeof(null===(e=this.component._on)||void 0===e?void 0:e.onChange)&&this.component._on.onChange(t,o),this.valueChangeListeners.forEach((t=>t(o)))}onClick(t){var e;(0,r.s)(t),(0,r.t)("click",this.host),"function"==typeof(null===(e=this.component._on)||void 0===e?void 0:e.onClick)&&this.component._on.onClick(t)}onFocus(t){var e;this.component._alert=!0,(0,r.s)(t),(0,r.t)("focus",this.host),"function"==typeof(null===(e=this.component._on)||void 0===e?void 0:e.onFocus)&&this.component._on.onFocus(t)}addValueChangeListener(t){this.valueChangeListeners.push(t)}}},647:(t,e,o)=>{o.d(e,{I:()=>l});var n=o(2508),i=o(5440),s=o(8670),a=o(4725);const r=(t,e)=>{const o=t;"object"==typeof o&&null!==o&&((0,s.i)(o.right,1)&&(o.right={icon:o.right}),(0,s.i)(o.left,1)&&(o.left={icon:o.left}),e.set("_icons",o))};class l extends a.I{constructor(t,e,o){super(t,e,o),this.component=t}validateIcon(t){this.validateIcons(t)}validateIcons(t){(0,i.o)(t,(()=>{try{t=(0,i.p)(t)}catch(t){}(0,i.w)(this.component,"_icons",(t=>"object"==typeof t&&null!==t&&((0,s.i)(t.left,1)||(0,n.i)(t.left)||(0,s.i)(t.right,1)||(0,n.i)(t.right))),new Set(["KoliBriHorizontalIcon"]),t,{hooks:{beforePatch:r},required:!0})}))}componentWillLoad(){super.componentWillLoad(),this.validateIcons(this.component._icons||this.component._icon)}}},4014:(t,e,o)=>{function n(t){t.stopImmediatePropagation(),t.stopPropagation()}function i(t,e,o){e&&function(t,e,o){const n=t.dispatchEvent(function(t,e){return new CustomEvent(`kol-${t}`,{bubbles:!0,cancelable:!0,composed:!0,detail:e})}(e,o))}(e,t,o)}o.d(e,{s:()=>n,t:()=>i})},6281:(t,e,o)=>{o.d(e,{v:()=>i});var n=o(5440);const i=(t,e,o={})=>{(0,n.a)(t,"_hideLabel",e,o)}},2508:(t,e,o)=>{o.d(e,{i:()=>a,v:()=>r});var n=o(5440),i=o(8670);const s=(t,e,o)=>{(0,i.c)(o)?t[e]=o:(0,i.i)(o,1)&&(t[e]={icon:o})},a=t=>"object"==typeof t&&null!==t&&(void 0===t.style||(0,i.b)(t.style))&&(0,i.i)(t.icon,1),r=(t,e)=>{(0,n.o)(e,(()=>{try{e=(0,n.p)(e)}catch(t){}(0,n.w)(t,"_icons",(t=>null===t||(0,i.i)(t,1)||"object"==typeof t&&null!==t&&((0,i.i)(t.left,1)||a(t.left)||(0,i.i)(t.right,1)||a(t.right)||(0,i.i)(t.top,1)||a(t.top)||(0,i.i)(t.bottom,1)||a(t.bottom))),new Set(["KoliBriIcon"]),e,{hooks:{beforePatch:(e,o)=>{null===e&&o.set("_icons",{}),(t=>{var e,o,n;if(null===(e=t.nextState)||void 0===e?void 0:e.has("_icons")){const e=null===(o=t.nextState)||void 0===o?void 0:o.get("_icons");null===(n=t.nextState)||void 0===n||n.set("_icons",(t=>{let e={};return(0,i.i)(t,1)?e={left:{icon:t}}:"object"==typeof t&&null!==t&&(s(e,"top",t.top),s(e,"right",t.right),s(e,"bottom",t.bottom),s(e,"left",t.left)),e})(e))}})(t)}},required:!0})}))}},4956:(t,e,o)=>{o.d(e,{a:()=>d,c:()=>l,h:()=>r,v:()=>h});var n=o(4289),i=o(5440);const s=/[a-zA-Z0-9äöüÄÖÜß]/g,a=/^\d+$/;function r(t,e=1){return function(t){var e;return"string"==typeof t&&(null===(e=t.match(s))||void 0===e?void 0:e.length)||0}(t)>=e}function l(t){return a.test(t)}const c=new Set(["string"]),h=(t,e,o={})=>{(0,i.w)(t,"_label",(t=>"string"==typeof t),c,e,function(t){var e;return{hooks:{afterPatch:(e,o,i,s)=>{var a,c;"function"==typeof(null===(a=t.hooks)||void 0===a?void 0:a.afterPatch)&&(null===(c=t.hooks)||void 0===c||c.afterPatch(e,o,i,s)),"string"==typeof e&&!1===r(e,3)&&!1===l(e)&&(0,n.a)(`The heading or label ("${e}") is not accessible. A label should consist of at least three readable characters.`),"string"==typeof e&&e.length>80&&(0,n.u)("A heading or label should not be longer than 80 characters.")},beforePatch:null===(e=t.hooks)||void 0===e?void 0:e.beforePatch}}}(o))},d=h},6430:(t,e,o)=>{o.d(e,{v:()=>a});var n=o(4289),i=o(5440);const s={hooks:{afterPatch:t=>{-1!==t&&0!==t&&(0,n.a)("Don’t Use Tabindex Greater than 0: https://adrianroselli.com/2014/11/dont-use-tabindex-greater-than-0.html")}}},a=(t,e)=>{(0,i.e)(t,"_tabIndex",e,s)}}}]);
|
package/dist/4114.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 4114.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunk_public_ui_sample_react=self.webpackChunk_public_ui_sample_react||[]).push([[4114],{4114:(e,t,a)=>{switch(location.pathname){case"/dev/toaster.html":a.e(4756).then(a.bind(a,4756));break;case"/dev/reprod-accordion-does-not-toggle-with-open.html":a.e(2079).then(a.bind(a,2079));break;case"/dev/details-synced-open-state.html":a.e(3034).then(a.bind(a,3034))}}}]);
|