@public-ui/sample-react 2.0.0-rc.8 → 2.0.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/README.md +18 -0
- package/dist/1130.js +2 -0
- package/dist/1474.js +1 -1
- package/dist/183.js +1 -1
- package/dist/2337.js +1 -1
- package/dist/2412.js +1 -1
- package/dist/{5327.js → 2738.js} +2 -2
- package/dist/3303.js +1 -1
- package/dist/3325.js +1 -1
- package/dist/3429.js +1 -1
- package/dist/3459.js +1 -1
- package/dist/3932.js +1 -1
- package/dist/4022.js +1 -1
- package/dist/4164.js +1 -1
- package/dist/4195.js +1 -1
- package/dist/4291.js +1 -1
- package/dist/4323.js +1 -1
- package/dist/4355.js +1 -1
- package/dist/4564.js +1 -1
- package/dist/4891.js +1 -1
- package/dist/{7648.js → 4916.js} +2 -2
- package/dist/5139.js +2 -0
- package/dist/5183.js +1 -1
- package/dist/5369.js +1 -1
- package/dist/5390.js +1 -1
- package/dist/540.js +1 -1
- package/dist/5717.js +1 -1
- package/dist/{6487.js → 5860.js} +2 -2
- package/dist/5862.js +1 -1
- package/dist/5866.js +1 -1
- package/dist/5869.js +2 -0
- package/dist/6012.js +1 -1
- package/dist/6068.js +1 -1
- package/dist/6210.js +1 -1
- package/dist/6320.js +1 -1
- package/dist/6558.js +1 -1
- package/dist/6813.js +1 -1
- package/dist/6908.js +1 -1
- package/dist/7029.js +1 -1
- package/dist/7255.js +1 -1
- package/dist/{9598.js → 7380.js} +2 -2
- package/dist/7447.js +1 -1
- package/dist/7535.js +1 -1
- package/dist/7715.js +1 -1
- package/dist/7722.js +1 -1
- package/dist/7734.js +2 -0
- package/dist/7801.js +1 -1
- package/dist/7858.js +1 -1
- package/dist/7955.js +1 -1
- package/dist/7995.js +1 -1
- package/dist/8061.js +1 -1
- package/dist/8065.js +1 -1
- package/dist/8073.js +1 -1
- package/dist/8111.js +1 -1
- package/dist/8255.js +1 -1
- package/dist/8291.js +1 -1
- package/dist/8316.js +2 -0
- package/dist/8709.js +1 -1
- package/dist/8761.js +1 -1
- package/dist/9734.js +1 -1
- package/dist/9747.js +1 -1
- package/dist/9792.js +1 -1
- package/dist/9895.js +1 -1
- package/dist/9963.js +1 -1
- package/dist/9972.js +1 -1
- package/dist/main.css +2 -2
- package/dist/main.js +531 -3278
- package/dist/main.js.LICENSE.txt +2 -2
- package/package.json +14 -14
- package/src/App.tsx +3 -1
- package/src/components/FocusInput.tsx +9 -8
- package/src/components/avatar/basic.tsx +3 -1
- package/src/components/badge/basic.tsx +5 -5
- package/src/components/badge/button.tsx +5 -5
- package/src/components/button-link/basic.tsx +3 -0
- package/src/components/button-link/image.tsx +1 -1
- package/src/components/card/flex.tsx +1 -1
- package/src/components/card/selection.tsx +3 -3
- package/src/components/handout/basic.tsx +22 -8
- package/src/components/heading/badged.tsx +18 -6
- package/src/components/image/basic.tsx +1 -1
- package/src/components/input-checkbox/partials/cases.tsx +2 -0
- package/src/components/input-radio/partials/cases.tsx +0 -1
- package/src/components/link/basic.tsx +1 -3
- package/src/components/link/image.tsx +2 -2
- package/src/components/table/formatter.ts +5 -0
- package/src/components/table/render-cell.tsx +16 -8
- package/src/components/table/test-data.ts +340 -0
- package/src/components/table/with-pagination.tsx +4 -3
- package/src/components/tabs/basic.tsx +21 -6
- package/src/components/toast/basic.tsx +68 -34
- package/src/hooks/useSetCurrentLocation.ts +7 -0
- package/src/react.main.tsx +2 -2
- package/src/scenarios/appointment-form/ErrorList.tsx +1 -1
- package/src/scenarios/complex-form/component.tsx +29 -29
- package/src/scenarios/custom-tooltip-width.tsx +6 -0
- package/src/scenarios/inputs-get-value.tsx +160 -0
- package/src/scenarios/routes.ts +4 -0
- package/src/shares/routes.ts +0 -2
- package/src/shares/theme.ts +4 -4
- package/src/style.scss +2 -5
- package/dist/4556.js +0 -2
- package/dist/5414.js +0 -2
- package/dist/6077.js +0 -2
- package/dist/6655.js +0 -2
- package/dist/7929.js +0 -2
- package/src/components/popover/basic.tsx +0 -36
- package/src/components/popover/routes.ts +0 -8
- /package/dist/{4556.js.LICENSE.txt → 1130.js.LICENSE.txt} +0 -0
- /package/dist/{5327.js.LICENSE.txt → 2738.js.LICENSE.txt} +0 -0
- /package/dist/{5414.js.LICENSE.txt → 4916.js.LICENSE.txt} +0 -0
- /package/dist/{6077.js.LICENSE.txt → 5139.js.LICENSE.txt} +0 -0
- /package/dist/{6487.js.LICENSE.txt → 5860.js.LICENSE.txt} +0 -0
- /package/dist/{6655.js.LICENSE.txt → 5869.js.LICENSE.txt} +0 -0
- /package/dist/{7648.js.LICENSE.txt → 7380.js.LICENSE.txt} +0 -0
- /package/dist/{7929.js.LICENSE.txt → 7734.js.LICENSE.txt} +0 -0
- /package/dist/{9598.js.LICENSE.txt → 8316.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import React, { createContext, FC, useContext, useEffect, useMemo, useRef, useState } from 'react';
|
|
2
|
+
import { HTMLStencilElement } from '@stencil/core/internal';
|
|
3
|
+
import {
|
|
4
|
+
KolButton,
|
|
5
|
+
KolInputCheckbox,
|
|
6
|
+
KolInputColor,
|
|
7
|
+
KolInputDate,
|
|
8
|
+
KolInputEmail,
|
|
9
|
+
KolInputFile,
|
|
10
|
+
KolInputNumber,
|
|
11
|
+
KolInputPassword,
|
|
12
|
+
KolInputRadio,
|
|
13
|
+
KolInputRange,
|
|
14
|
+
KolInputText,
|
|
15
|
+
KolSelect,
|
|
16
|
+
KolTextarea,
|
|
17
|
+
KolButtonLink,
|
|
18
|
+
} from '@public-ui/react';
|
|
19
|
+
import { SampleDescription } from '../components/SampleDescription';
|
|
20
|
+
|
|
21
|
+
const EventTargetContext = createContext<EventTarget | undefined>(undefined);
|
|
22
|
+
|
|
23
|
+
type Props = {
|
|
24
|
+
InputComponent: React.ComponentType<any>;
|
|
25
|
+
inputProps: { [key: string]: any };
|
|
26
|
+
formatter?: (value: any) => string;
|
|
27
|
+
};
|
|
28
|
+
const Scenario = (props: Props) => {
|
|
29
|
+
const ref = useRef<HTMLStencilElement & { getValue: () => Promise<any> }>();
|
|
30
|
+
const [value, setValue] = useState<unknown>(undefined);
|
|
31
|
+
const formatter = props.formatter || JSON.stringify;
|
|
32
|
+
const eventTarget = useContext(EventTargetContext);
|
|
33
|
+
|
|
34
|
+
const handleButtonClick = async () => {
|
|
35
|
+
setValue(await ref.current?.getValue());
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
useEffect(() => {
|
|
39
|
+
const handleRunAll = () => {
|
|
40
|
+
void handleButtonClick();
|
|
41
|
+
};
|
|
42
|
+
eventTarget?.addEventListener('runAll', handleRunAll);
|
|
43
|
+
|
|
44
|
+
return () => {
|
|
45
|
+
eventTarget?.removeEventListener('runAll', handleRunAll);
|
|
46
|
+
};
|
|
47
|
+
}, [eventTarget]);
|
|
48
|
+
|
|
49
|
+
return (
|
|
50
|
+
<div className="grid grid-cols-3 items-end gap-4">
|
|
51
|
+
<props.InputComponent ref={ref} {...props.inputProps} />
|
|
52
|
+
<KolButton
|
|
53
|
+
_label="getValue()"
|
|
54
|
+
_on={{
|
|
55
|
+
onClick: () => {
|
|
56
|
+
void handleButtonClick();
|
|
57
|
+
},
|
|
58
|
+
}}
|
|
59
|
+
></KolButton>
|
|
60
|
+
<pre>{formatter(value)}</pre>
|
|
61
|
+
</div>
|
|
62
|
+
);
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
export const InputsGetValue: FC = () => {
|
|
66
|
+
const eventTarget = useMemo(() => new EventTarget(), []);
|
|
67
|
+
|
|
68
|
+
return (
|
|
69
|
+
<>
|
|
70
|
+
<EventTargetContext.Provider value={eventTarget}>
|
|
71
|
+
<SampleDescription>
|
|
72
|
+
<p>
|
|
73
|
+
This sample show how the input components <code>getValue()</code> method works. It's called when clicking the &quout;getValue()&quout; button
|
|
74
|
+
and prints the current value right next to itself.
|
|
75
|
+
</p>
|
|
76
|
+
</SampleDescription>
|
|
77
|
+
|
|
78
|
+
<div className="grid gap-4">
|
|
79
|
+
<Scenario InputComponent={KolInputText} inputProps={{ _label: 'InputText' }} />
|
|
80
|
+
<Scenario InputComponent={KolInputCheckbox} inputProps={{ _label: 'KolInputCheckbox' }} />
|
|
81
|
+
<Scenario InputComponent={KolInputColor} inputProps={{ _label: 'KolInputColor' }} />
|
|
82
|
+
<Scenario InputComponent={KolInputDate} inputProps={{ _label: 'KolInputDate' }} />
|
|
83
|
+
<Scenario InputComponent={KolInputEmail} inputProps={{ _label: 'KolInputEmail' }} />
|
|
84
|
+
<Scenario
|
|
85
|
+
InputComponent={KolInputFile}
|
|
86
|
+
inputProps={{ _label: 'KolInputFile' }}
|
|
87
|
+
formatter={(value) =>
|
|
88
|
+
value instanceof FileList
|
|
89
|
+
? `FileList{${Array.from(value)
|
|
90
|
+
.map((file: File) => file.name)
|
|
91
|
+
.join(', ')}}`
|
|
92
|
+
: JSON.stringify(value)
|
|
93
|
+
}
|
|
94
|
+
/>
|
|
95
|
+
<Scenario InputComponent={KolInputNumber} inputProps={{ _label: 'KolInputNumber' }} />
|
|
96
|
+
<Scenario InputComponent={KolInputPassword} inputProps={{ _label: 'KolInputPassword' }} />
|
|
97
|
+
<Scenario InputComponent={KolInputRange} inputProps={{ _label: 'KolInputRange' }} />
|
|
98
|
+
<Scenario
|
|
99
|
+
InputComponent={KolInputRadio}
|
|
100
|
+
inputProps={{
|
|
101
|
+
_label: 'KolInputRadio',
|
|
102
|
+
_orientation: 'horizontal',
|
|
103
|
+
_options: [
|
|
104
|
+
{ label: 'New York', value: 'New York' },
|
|
105
|
+
{ label: 'Rio de Janeiro', value: 'Rio de Janeiro' },
|
|
106
|
+
{ label: 'Rosenheim', value: 'Rosenheim' },
|
|
107
|
+
],
|
|
108
|
+
_value: 'New York',
|
|
109
|
+
}}
|
|
110
|
+
/>
|
|
111
|
+
<Scenario
|
|
112
|
+
InputComponent={KolSelect}
|
|
113
|
+
inputProps={{
|
|
114
|
+
_label: 'KolSelect',
|
|
115
|
+
_options: [
|
|
116
|
+
{ label: 'New York', value: 'New York' },
|
|
117
|
+
{ label: 'Rio de Janeiro', value: 'Rio de Janeiro' },
|
|
118
|
+
{ label: 'Rosenheim', value: 'Rosenheim' },
|
|
119
|
+
],
|
|
120
|
+
}}
|
|
121
|
+
/>
|
|
122
|
+
<Scenario
|
|
123
|
+
InputComponent={KolTextarea}
|
|
124
|
+
inputProps={{
|
|
125
|
+
_label: 'KolTextarea',
|
|
126
|
+
}}
|
|
127
|
+
/>
|
|
128
|
+
<Scenario
|
|
129
|
+
InputComponent={KolButton}
|
|
130
|
+
inputProps={{
|
|
131
|
+
_label: 'KolButton',
|
|
132
|
+
_variant: 'ghost',
|
|
133
|
+
_value: 'KolButton value',
|
|
134
|
+
}}
|
|
135
|
+
/>
|
|
136
|
+
<Scenario
|
|
137
|
+
InputComponent={KolButtonLink}
|
|
138
|
+
inputProps={{
|
|
139
|
+
_label: 'KolButtonLink',
|
|
140
|
+
_value: 'KolButtonLink value',
|
|
141
|
+
}}
|
|
142
|
+
/>
|
|
143
|
+
|
|
144
|
+
<div className="grid grid-cols-3 gap-4">
|
|
145
|
+
<div></div>
|
|
146
|
+
<KolButton
|
|
147
|
+
_label="Run all"
|
|
148
|
+
_variant="primary"
|
|
149
|
+
_on={{
|
|
150
|
+
onClick: () => {
|
|
151
|
+
eventTarget.dispatchEvent(new Event('runAll'));
|
|
152
|
+
},
|
|
153
|
+
}}
|
|
154
|
+
></KolButton>
|
|
155
|
+
</div>
|
|
156
|
+
</div>
|
|
157
|
+
</EventTargetContext.Provider>
|
|
158
|
+
</>
|
|
159
|
+
);
|
|
160
|
+
};
|
package/src/scenarios/routes.ts
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import { Routes } from '../shares/types';
|
|
2
2
|
import { TerminComponent } from './complex-form/component';
|
|
3
3
|
import { AppointmentForm } from './appointment-form/AppointmentForm';
|
|
4
|
+
import { InputsGetValue } from './inputs-get-value';
|
|
5
|
+
import { CustomTooltipWidth } from './custom-tooltip-width';
|
|
4
6
|
|
|
5
7
|
export const SCENARIO_ROUTES: Routes = {
|
|
6
8
|
scenarios: {
|
|
7
9
|
'complex-form': TerminComponent,
|
|
8
10
|
'appointment-form': AppointmentForm,
|
|
11
|
+
'inputs-get-value': InputsGetValue,
|
|
12
|
+
'custom-tooltip-width': CustomTooltipWidth,
|
|
9
13
|
},
|
|
10
14
|
};
|
package/src/shares/routes.ts
CHANGED
|
@@ -33,7 +33,6 @@ import { LOGO_ROUTES } from '../components/logo/routes';
|
|
|
33
33
|
import { MODAL_ROUTES } from '../components/modal/routes';
|
|
34
34
|
import { NAV_ROUTES } from '../components/nav/routes';
|
|
35
35
|
import { PAGINATION_ROUTES } from '../components/pagination/routes';
|
|
36
|
-
import { POPOVER_ROUTES } from '../components/popover/routes';
|
|
37
36
|
import { PROGRESS_ROUTES } from '../components/progress/routes';
|
|
38
37
|
import { QUOTE_ROUTES } from '../components/quote/routes';
|
|
39
38
|
import { SELECT_ROUTES } from '../components/select/routes';
|
|
@@ -84,7 +83,6 @@ export const ROUTES: Routes = {
|
|
|
84
83
|
...MODAL_ROUTES,
|
|
85
84
|
...NAV_ROUTES,
|
|
86
85
|
...PAGINATION_ROUTES,
|
|
87
|
-
...POPOVER_ROUTES,
|
|
88
86
|
...PROGRESS_ROUTES,
|
|
89
87
|
...QUOTE_ROUTES,
|
|
90
88
|
...SELECT_ROUTES,
|
package/src/shares/theme.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { SelectOption } from '@public-ui/components';
|
|
2
2
|
|
|
3
|
-
export type Theme = 'bmf' | 'bzst' | 'default' | 'ecl-ec' | 'ecl-eu' | 'itzbund' | 'mapz' | 'th' | 'unstyled' | 'zoll-v2' | 'zoll-v3';
|
|
3
|
+
export type Theme = 'bmf' | 'bzst-v1' | 'default' | 'ecl-ec' | 'ecl-eu' | 'itzbund' | 'mapz' | 'th' | 'unstyled' | 'zoll-v2' | 'zoll-v3';
|
|
4
4
|
|
|
5
5
|
export const isTheme = (value: unknown) => {
|
|
6
6
|
return (
|
|
7
7
|
typeof value === 'string' &&
|
|
8
8
|
(value === 'unstyled' ||
|
|
9
9
|
value === 'bmf' ||
|
|
10
|
-
value === 'bzst' ||
|
|
10
|
+
value === 'bzst-v1' ||
|
|
11
11
|
value === 'default' ||
|
|
12
12
|
value === 'ecl-ec' ||
|
|
13
13
|
value === 'ecl-eu' ||
|
|
@@ -34,8 +34,8 @@ export const THEME_OPTIONS: SelectOption<Theme>[] = [
|
|
|
34
34
|
value: 'bmf',
|
|
35
35
|
},
|
|
36
36
|
{
|
|
37
|
-
label: '
|
|
38
|
-
value: 'bzst',
|
|
37
|
+
label: 'Bundeszentralamt für Steuern (v1)',
|
|
38
|
+
value: 'bzst-v1',
|
|
39
39
|
},
|
|
40
40
|
{
|
|
41
41
|
label: 'Default',
|
package/src/style.scss
CHANGED
package/dist/4556.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 4556.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunk_public_ui_sample_react=self.webpackChunk_public_ui_sample_react||[]).push([[4556],{4556:(e,t,a)=>{switch(location.pathname){case"/dev/toaster.html":a.e(6487).then(a.bind(a,6487));break;case"/dev/reprod-accordion-does-not-toggle-with-open.html":a.e(9598).then(a.bind(a,9598));break;case"/dev/details-synced-open-state.html":a.e(5327).then(a.bind(a,5327))}}}]);
|
package/dist/5414.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 5414.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunk_public_ui_sample_react=self.webpackChunk_public_ui_sample_react||[]).push([[5414],{8764:(e,t,r)=>{r.d(t,{a:()=>s,b:()=>b,c:()=>p,d:()=>c,e:()=>f,f:()=>u,g:()=>a,u:()=>h});var n=r(1492);const o=new Set,s=(e,t)=>{(!1===o.has(e)||(null==t?void 0:t.force))&&(o.add(e),n.L.debug([e].concat((null==t?void 0:t.details)||[]),{classifier:"✋ a11y",overwriteStyle:"; background-color: #09f"}))},i=new Set,c=(e,t)=>{(!1===i.has(e)||(null==t?void 0:t.force))&&(i.add(e),n.L.debug([e].concat((null==t?void 0:t.details)||[]),{classifier:"💻 dev",overwriteStyle:"; background-color: #f09"}))},a=(e,t)=>{(!1===i.has(e)||(null==t?void 0:t.force))&&(i.add(e),n.L.warn([e].concat((null==t?void 0:t.details)||[]),{classifier:"💻 dev",overwriteStyle:"; background-color: #f09"}))},l=new Set,u=(e,t=!1,r)=>{(!1===l.has(e)||(null==r?void 0:r.force))&&(l.add(e),e+=!0===t?" ✅":"",n.L.debug([e].concat((null==r?void 0:r.details)||[]),{classifier:"🌟 feature",overwriteStyle:"; background-color: #309"}))};c("Wir freuen uns über jedes Feedback, Kommentare, Screenshots oder Demo-Links von einer auf KoliBri-basierenden Anwendung (kolibri@itzbund.de). Vielen Dank!");const d=new Set,h=(e,t)=>{(!1===d.has(e)||(null==t?void 0:t.force))&&(d.add(e),n.L.debug([e].concat((null==t?void 0:t.details)||[]),{classifier:"📑 ui/ux",overwriteStyle:"; background-color: #060;"}))},f=()=>{s('"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')},b=e=>{"string"==typeof e&&""!==e||s("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")},p=(e,t=8)=>{t>7&&h(`[${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`)}},5414:(e,t,r)=>{r.d(t,{K:()=>Ee,a:()=>se,b:()=>G,c:()=>ae,d:()=>ie,e:()=>ce,f:()=>te,g:()=>ee,h:()=>Ae,i:()=>ve,j:()=>ge,k:()=>me,l:()=>Ne,m:()=>he,n:()=>ke,o:()=>X,p:()=>pe,q:()=>ye,r:()=>a,s:()=>re,t:()=>_e,u:()=>fe,w:()=>oe});var n=r(8764),o=r(1492);const s=(e,t)=>{t.forEach((t=>{!1===e.has(t)&&e.add(t)}))},i=(e,t=document)=>{if(t instanceof Document||t instanceof HTMLElement||t instanceof ShadowRoot){const r=new Set;s(r,t.querySelectorAll(e));const n=t.querySelectorAll('[class*="hydrated"]');for(let t=0;t<n.length;t++){const o=n[t].shadowRoot;s(r,i(e,"object"==typeof o&&null!==o?o:n[t]))}return Array.from(r)}throw new Error("The parameter document for the method querySelectorAll is not type of Document, HTMLElement or ShadowRoot.")},c=(e,t=document)=>{if(t instanceof Document||t instanceof HTMLElement||t instanceof ShadowRoot){let r=t.querySelector(e);if(null===r){const n=t.querySelectorAll('[class*="hydrated"]');for(let t=0;t<n.length;t++){const o=n[t].shadowRoot;if(r=c(e,"object"==typeof o&&null!==o?o:n[t]),null!==r)break}}return r}throw new Error("The parameter document for the method querySelector is not type of Document, HTMLElement or ShadowRoot.")};var a=u,l=u;function u(e){var t=d(e);return 3==t.length?t.concat(255):(t[3]=Math.round(t[3]),t)}function d(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 n=f(t[0]),o=f(t[1]),s=f(t[2]),i=3==r?255:f(t[3]);if(isNaN(n)||isNaN(o)||isNaN(s)||isNaN(i))return;return[n,o,s,i]}}(e)||function(e){var t=e.replace(/^#/,""),r=t.length;if(6==r||8==r){var n=f(t.slice(0,2)),o=f(t.slice(2,4)),s=f(t.slice(4,6)),i=6==r?255:f(t.slice(6,8));if(isNaN(n)||isNaN(o)||isNaN(s)||isNaN(i))return;return[n,o,s,i]}}(e)||function(e){if("rgb("==e.substr(0,4)){var t=(e=e.match(/^rgb\(([^)]+)\)/)[1]).split(/ *, */).map(Number),r=b(t[0],!0),n=b(t[1],!0),o=b(t[2],!0);if(-1!=r&&-1!=n&&-1!=o)return[r,n,o,255]}}(e)||function(e){if("rgba("==e.substr(0,5)){var t=(e=e.match(/^rgba\(([^)]+)\)/)[1]).split(/ *, */).map(Number),r=b(t[0],!0),n=b(t[1],!0),o=b(t[2],!0),s=b(255*t[3]);if(-1!=r&&-1!=n&&-1!=o&&-1!=s)return[r,n,o,s]}}(e)||[0,0,0,255]:function(e){if("[object Object]"===Object.prototype.toString.call(e)&&Object.getPrototypeOf(e)===Object.getPrototypeOf({})){var t=b(null!=e.r?e.r:null!=e.red?e.red:0,!0),r=b(null!=e.g?e.g:null!=e.green?e.green:0,!0),n=b(null!=e.b?e.b:null!=e.blue?e.blue:0,!0),o=b(null!=e.a?e.a:null!=e.alpha?e.alpha:255,!0);if(-1!=t&&-1!=r&&-1!=n&&-1!=o)return[t,r,n,o]}}(e)||function(e){if(Array.isArray(e)&&(3==e.length||4==e.length)){var t=b(e[0],!0),r=b(e[1],!0),n=b(e[2],!0),o=b(null!=e[3]?e[3]:255,!0);if(-1!=t&&-1!=r&&-1!=n&&-1!=o)return[t,r,n,o]}}(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 h(e){var t=e.toString(16);return 1==t.length?"0"+t:t}function f(e){return 1==e.length?parseInt(e+e,16):parseInt(e,16)}function b(e,t){return"number"!=typeof e||!0===t&&Math.floor(e)!==e?-1:e>=0&&e<=255?e:-1}function p(e){return"function"==typeof e}function v(e){const t=e((e=>{Error.call(e),e.stack=(new Error).stack}));return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}a.arr=l,a.obj=function(e){var t=d(e);return{r:t[0],g:t[1],b:t[2],a:3==t.length?255:Math.round(t[3])}},a.css=function(e){var t=d(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)+")"},a.hex=function(e){3==(s=d(e)).length&&s.push(255);var t=255==s[3],r=h(s[0]),n=h(s[1]),o=h(s[2]),s=h(Math.round(s[3])),i=function(e,t,r,n){var o=["ff","00","11","22","33","44","55","66","77","88","99","aa","bb","cc","dd","ee"];return-1!=o.indexOf(e)&&-1!=o.indexOf(t)&&-1!=o.indexOf(r)&&-1!=o.indexOf(n)}(r,n,o,s);return t?i?"#"+r.charAt(0)+n.charAt(0)+o.charAt(0):"#"+r+n+o:i?"#"+r.charAt(0)+n.charAt(0)+o.charAt(0)+s.charAt(0):"#"+r+n+o+s},a.num=function(e){var t=d(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 g=v((e=>function(t){e(this),this.message=t?`${t.length} errors occurred during unsubscription:\n${t.map(((e,t)=>`${t+1}) ${e.toString()}`)).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=t}));function m(e,t){if(e){const r=e.indexOf(t);0<=r&&e.splice(r,1)}}class y{constructor(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let e;if(!this.closed){this.closed=!0;const{_parentage:t}=this;if(t)if(this._parentage=null,Array.isArray(t))for(const e of t)e.remove(this);else t.remove(this);const{initialTeardown:r}=this;if(p(r))try{r()}catch(t){e=t instanceof g?t.errors:[t]}const{_finalizers:n}=this;if(n){this._finalizers=null;for(const t of n)try{x(t)}catch(t){e=null!=e?e:[],t instanceof g?e=[...e,...t.errors]:e.push(t)}}if(e)throw new g(e)}}add(e){var t;if(e&&e!==this)if(this.closed)x(e);else{if(e instanceof y){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=null!==(t=this._finalizers)&&void 0!==t?t:[]).push(e)}}_hasParent(e){const{_parentage:t}=this;return t===e||Array.isArray(t)&&t.includes(e)}_addParent(e){const{_parentage:t}=this;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e}_removeParent(e){const{_parentage:t}=this;t===e?this._parentage=null:Array.isArray(t)&&m(t,e)}remove(e){const{_finalizers:t}=this;t&&m(t,e),e instanceof y&&e._removeParent(this)}}y.EMPTY=(()=>{const e=new y;return e.closed=!0,e})();const w=y.EMPTY;function S(e){return e instanceof y||e&&"closed"in e&&p(e.remove)&&p(e.add)&&p(e.unsubscribe)}function x(e){p(e)?e():e.unsubscribe()}const k={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},_={setTimeout(e,t,...r){const{delegate:n}=_;return(null==n?void 0:n.setTimeout)?n.setTimeout(e,t,...r):setTimeout(e,t,...r)},clearTimeout(e){const{delegate:t}=_;return((null==t?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0};function N(){}const A=E("C",void 0,void 0);function E(e,t,r){return{kind:e,value:t,error:r}}function O(e){e()}class L extends y{constructor(e){super(),this.isStopped=!1,e?(this.destination=e,S(e)&&e.add(this)):this.destination=z}static create(e,t,r){return new T(e,t,r)}next(e){this.isStopped?D(function(e){return E("N",e,void 0)}(e),this):this._next(e)}error(e){this.isStopped?D(E("E",void 0,e),this):(this.isStopped=!0,this._error(e))}complete(){this.isStopped?D(A,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(e){this.destination.next(e)}_error(e){try{this.destination.error(e)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}}const C=Function.prototype.bind;function M(e,t){return C.call(e,t)}class P{constructor(e){this.partialObserver=e}next(e){const{partialObserver:t}=this;if(t.next)try{t.next(e)}catch(e){j(e)}}error(e){const{partialObserver:t}=this;if(t.error)try{t.error(e)}catch(e){j(e)}else j(e)}complete(){const{partialObserver:e}=this;if(e.complete)try{e.complete()}catch(e){j(e)}}}class T extends L{constructor(e,t,r){let n;if(super(),p(e)||!e)n={next:null!=e?e:void 0,error:null!=t?t:void 0,complete:null!=r?r:void 0};else{let t;this&&k.useDeprecatedNextContext?(t=Object.create(e),t.unsubscribe=()=>this.unsubscribe(),n={next:e.next&&M(e.next,t),error:e.error&&M(e.error,t),complete:e.complete&&M(e.complete,t)}):n=e}this.destination=new P(n)}}function j(e){var t;t=e,_.setTimeout((()=>{const{onUnhandledError:e}=k;if(!e)throw t;e(t)}))}function D(e,t){const{onStoppedNotification:r}=k;r&&_.setTimeout((()=>r(e,t)))}const z={closed:!0,next:N,error:function(e){throw e},complete:N},H="function"==typeof Symbol&&Symbol.observable||"@@observable";function $(e){return e}class q{constructor(e){e&&(this._subscribe=e)}lift(e){const t=new q;return t.source=this,t.operator=e,t}subscribe(e,t,r){const n=(o=e)&&o instanceof L||function(e){return e&&p(e.next)&&p(e.error)&&p(e.complete)}(o)&&S(o)?e:new T(e,t,r);var o;return O((()=>{const{operator:e,source:t}=this;n.add(e?e.call(n,t):t?this._subscribe(n):this._trySubscribe(n))})),n}_trySubscribe(e){try{return this._subscribe(e)}catch(t){e.error(t)}}forEach(e,t){return new(t=I(t))(((t,r)=>{const n=new T({next:t=>{try{e(t)}catch(e){r(e),n.unsubscribe()}},error:r,complete:t});this.subscribe(n)}))}_subscribe(e){var t;return null===(t=this.source)||void 0===t?void 0:t.subscribe(e)}[H](){return this}pipe(...e){return(0===(t=e).length?$:1===t.length?t[0]:function(e){return t.reduce(((e,t)=>t(e)),e)})(this);var t}toPromise(e){return new(e=I(e))(((e,t)=>{let r;this.subscribe((e=>r=e),(e=>t(e)),(()=>e(r)))}))}}function I(e){var t;return null!==(t=null!=e?e:k.Promise)&&void 0!==t?t:Promise}q.create=e=>new q(e);const R=v((e=>function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}));class J extends q{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(e){const t=new W(this,this);return t.operator=e,t}_throwIfClosed(){if(this.closed)throw new R}next(e){O((()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(const t of this.currentObservers)t.next(e)}}))}error(e){O((()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=e;const{observers:t}=this;for(;t.length;)t.shift().error(e)}}))}complete(){O((()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;const{observers:e}=this;for(;e.length;)e.shift().complete()}}))}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var e;return(null===(e=this.observers)||void 0===e?void 0:e.length)>0}_trySubscribe(e){return this._throwIfClosed(),super._trySubscribe(e)}_subscribe(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)}_innerSubscribe(e){const{hasError:t,isStopped:r,observers:n}=this;return t||r?w:(this.currentObservers=null,n.push(e),new y((()=>{this.currentObservers=null,m(n,e)})))}_checkFinalizedStatuses(e){const{hasError:t,thrownError:r,isStopped:n}=this;t?e.error(r):n&&e.complete()}asObservable(){const e=new q;return e.source=this,e}}J.create=(e,t)=>new W(e,t);class W extends J{constructor(e,t){super(),this.destination=e,this.source=t}next(e){var t,r;null===(r=null===(t=this.destination)||void 0===t?void 0:t.next)||void 0===r||r.call(t,e)}error(e){var t,r;null===(r=null===(t=this.destination)||void 0===t?void 0:t.error)||void 0===r||r.call(t,e)}complete(){var e,t;null===(t=null===(e=this.destination)||void 0===e?void 0:e.complete)||void 0===t||t.call(e)}_subscribe(e){var t,r;return null!==(r=null===(t=this.source)||void 0===t?void 0:t.subscribe(e))&&void 0!==r?r:w}}var F=.2126,U=.7152,B=.0722,K=1/12.92;function Y(e){return Math.pow((e+.055)/1.055,2.4)}function Z(e){var t=e[0]/255,r=e[1]/255,n=e[2]/255,o=t<=.03928?t*K:Y(t),s=r<=.03928?r*K:Y(r),i=n<=.03928?n*K:Y(n);return o*F+s*U+i*B}function V(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 G(e,t){return function(e,t){return function(e,t){return(Math.max(e,t)+.05)/(Math.min(e,t)+.05)}(Z(e),Z(t))}(V(e),V(t))}const Q=/\[object Object\]/,X=(e,t)=>{"string"==typeof e&&Q.test(e)||t()},ee=(e,t)=>{"string"==typeof e&&""===e||t()},te=(e,t)=>{(0,o.d)()&&(o.L.debug([e,t]),o.L.debug("↑ We propagate the (submit) event to this target.")),Object.defineProperty(e,"target",{value:t,writable:!1})},re=(e,t,r,n={})=>{var o,s;void 0===e.nextHooks&&(e.nextHooks=new Map),void 0===e.nextState&&(e.nextState=new Map),e.nextState.get(t)!==r&&(e.nextHooks.get(t)instanceof Map==0&&e.nextHooks.set(t,new Map),"function"==typeof n.afterPatch&&(null===(o=e.nextHooks.get(t))||void 0===o||o.set("afterPatch",n.afterPatch)),"function"==typeof n.beforePatch&&(null===(s=e.nextHooks.get(t))||void 0===s||s.set("beforePatch",n.beforePatch)),e.nextState.set(t,r),(e=>{var t,r,n;null===(t=e.nextHooks)||void 0===t||t.forEach(((t,r)=>{var n;const o=t.get("beforePatch");"function"==typeof o&&o(null===(n=e.nextState)||void 0===n?void 0:n.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===(n=e.nextHooks)||void 0===n||n.forEach(((t,r)=>{const n=t.get("afterPatch");"function"==typeof n&&n(e.state[r],e.state,e,r)}))),delete e.nextHooks})(e))},ne=(e,t,r,o)=>{(0,n.d)(`[${e.constructor.name}] Der Property-Wert (${r}) für '${t}' ist nicht valide. Folgende Werte sind erlaubt: ${Array.from(o).join(", ")}`)};function oe(e,t,r,n,o,s={}){r(o)?re(e,t,o,s.hooks):null!=o||s.required?(s.required||n.add(null),ne(e,t,o,n)):re(e,t,s.defaultValue,s.hooks)}const se=(e,t,r,n)=>{oe(e,t,(e=>"boolean"==typeof e),new Set(["Boolean {true, false}"]),r,n)},ie=(e,t,r,n={})=>{const o="number"==typeof n.minLength?null==n?void 0:n.minLength:0;oe(e,t,(e=>"string"==typeof e&&e.length>=o&&(void 0===(null==n?void 0:n.maxLength)||e.length<=n.maxLength)),new Set(["String"]),r,n)},ce=(e,t,r,n)=>{oe(e,t,(e=>"number"==typeof e&&(void 0===(null==n?void 0:n.min)||"number"==typeof(null==n?void 0:n.min)&&e>=n.min)&&(void 0===(null==n?void 0:n.max)||"number"==typeof(null==n?void 0:n.max)&&e<=n.max)),new Set(["Number"]),r,n)},ae=(e,t,r,n,s=(e=>e==e),i={})=>{ee(n,(()=>{X(n,(()=>{void 0===n&&(n=[]);try{try{n=pe(n)}catch(e){}if(Array.isArray(n)){const c=n.find((e=>!r(e)));void 0===c&&s(n)?re(e,t,n,i.hooks):X(c,(()=>{throw o.L.debug(c),new Error("↑ Das Schema für das Property (_options) ist nicht valide. Der Wert wird nicht geändert.")}))}else X(n,(()=>{throw o.L.debug(n),new Error("↑ Das Schema für das Property (_options) ist nicht valide. Der Wert wird nicht geändert.")}))}catch(e){o.L.debug(e)}}))}))},le=/^(true|false)$/,ue=/^-?(0|[1-9]\d*)$/,de=/^-?(0.|[1-9]\d*.)\d*[1-9]$/,he=e=>{const t=typeof e,r=`${e}`;if("string"==typeof e)if(le.test(e))e="true"===e;else if(ue.test(e))e=parseInt(e);else if(de.test(e))e=parseFloat(e);else if(be.test(e))try{e=pe(e)}catch(e){}return t!==typeof e&&(0,n.d)(`You have used a stringified property value (${r} to ${JSON.stringify(e)}) which type switched from ${t} to ${typeof e}!`),e},fe=e=>{try{return JSON.stringify(e).replace(/"/g,"'")}catch(t){throw o.L.warn(["stringifyJson",e]),o.L.error("↑ Das JSON konnte nicht in einen String umgewandelt werden. Es wird ein stringifizierbares JSON erwartet."),new Error}},be=/^[{[]/,pe=e=>{if("string"==typeof e)try{return JSON.parse(e)}catch(t){if(be.test(e))try{return JSON.parse(e.replace(/'/g,'"'))}catch(t){o.L.warn(["parseJson",e]),o.L.error("↑ Der JSON-String konnte nicht geparsed werden. Achten Sie darauf, dass einfache Anführungszeichen im Text maskiert werden (‘).")}}throw new Error},ve=e=>"boolean"==typeof e?!0===e?"true":"false":void 0,ge=e=>"string"==typeof e?e:ve(e),me=(e,t)=>c(e,t||(0,o.b)()),ye=(e,t)=>i(e,t||(0,o.b)());let we=null;const Se=()=>(we=we||{backgroundColor:"#00000000",color:"#00000000",domNode:(0,o.b)().body,level:"Fail",score:1},we),xe=/(\d+, ){3}0\)/,ke=(e,t=Se())=>{const r=getComputedStyle(e),n=xe.test(r.backgroundColor)?t.backgroundColor:a.hex(r.backgroundColor),s=xe.test(r.color)?t.color:a.hex(r.color),i=G(n,s),c={backgroundColor:n,color:s,domNode:e,level:(l=i,l>=7?"AAA":l>=4.5?"AA":l>=3?"AA Large":"Fail"),score:i};var l;return i<4.5&&o.L.error(["Color-Contrast-Error",{backgroundColor:c.backgroundColor,color:c.color,level:c.level,score:c.score},c.domNode]),c},_e=(e,t=Se())=>{t.domNode instanceof HTMLElement&&(t=ke(t.domNode,t));const r=t.domNode.querySelector(e);if(null===r){const r=t.domNode.querySelectorAll('[class="hydrated"]');for(let n=0;n<r.length&&(t.domNode=r[n],null===(t=_e(e,t)).domNode);n++);return t}return ke(r,t)};class Ne{static queryHtmlElementColors(e,t,r=!1,n=!0){let s=null;if(!0===r||!1===Ne.executionLock)if(!1===r&&(Ne.cache.clear(),Ne.cache.set(t.domNode,t),Ne.executionLock=!0,!0===n&&o.L.debug("[KoliBriUtils] Color contrast analysis started...")),e===t.domNode)s=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 n=t.domNode;if("function"==typeof n.assignedNodes){const e=n.assignedNodes();for(let t=0;t<e.length;t++)e[t]instanceof HTMLElement&&r.add(e[t])}const o=t.domNode.children;for(let e=0;e<o.length;e++)r.add(o[e]);const i=Array.from(r);for(let r=0;r<i.length;r++){let n=Ne.cache.get(i[r]);void 0===n&&(n=ke(i[r],t)),Ne.cache.set(i[r],n);const o=Ne.queryHtmlElementColors(e,n,!0,!1);if(null!==o){s=o;break}}}else o.L.debug("[KoliBriUtils] Call aborted because a color contrast analysis is currently being executed.");return!1===r&&(!0===n&&o.L.debug(`[KoliBriUtils] Color contrast analysis finished (${Ne.cache.size} DOM elements are analysed).`),Ne.executionLock=!1,Ne.cache.clear()),s}}Ne.executionLock=!1,Ne.cache=new Map;const Ae=new J;class Ee{}Ee.patchTheme=o.p,Ee.patchThemeTag=o.a,Ee.querySelector=me,Ee.querySelectorAll=ye,Ee.stringifyJson=fe}}]);
|
package/dist/6077.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 6077.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunk_public_ui_sample_react=self.webpackChunk_public_ui_sample_react||[]).push([[6077],{2397:(t,e,n)=>{n.d(e,{a:()=>r,v:()=>l});var o=n(5414);const i=["left","right","top","bottom"],r=(t,e)=>{l(t,"_align",e)},l=(t,e,n)=>{(0,o.w)(t,e,(t=>"string"==typeof t&&i.includes(t)),new Set(i),n,{defaultValue:"top"})}},4604:(t,e,n)=>{n.d(e,{a:()=>W,b:()=>ht,c:()=>yt,f:()=>_,o:()=>V,s:()=>B});var o=Object.defineProperty,i=Object.defineProperties,r=Object.getOwnPropertyDescriptors,l=Object.getOwnPropertySymbols,c=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable,f=(t,e,n)=>e in t?o(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,a=(t,e)=>{for(var n in e||(e={}))c.call(e,n)&&f(t,n,e[n]);if(l)for(var n of l(e))s.call(e,n)&&f(t,n,e[n]);return t},u=(t,e)=>i(t,r(e)),d=(t,e)=>{var n={};for(var o in t)c.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(null!=t&&l)for(var o of l(t))e.indexOf(o)<0&&s.call(t,o)&&(n[o]=t[o]);return n},p=(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,h=Math.max,y=Math.round,g=Math.floor,x=t=>({x:t,y:t}),v={left:"right",right:"left",bottom:"top",top:"bottom"},b={start:"end",end:"start"};function w(t,e,n){return h(t,m(e,n))}function R(t,e){return"function"==typeof t?t(e):t}function E(t){return t.split("-")[0]}function T(t){return t.split("-")[1]}function L(t){return"x"===t?"y":"x"}function A(t){return"y"===t?"height":"width"}function O(t){return["top","bottom"].includes(E(t))?"y":"x"}function P(t){return L(O(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=>v[t]))}function D(t){return"number"!=typeof t?function(t){return a({top:0,right:0,bottom:0,left:0},t)}(t):{top:t,right:t,bottom:t,left:t}}function C(t){return u(a({},t),{top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height})}function F(t,e,n){let{reference:o,floating:i}=t;const r=O(e),l=P(e),c=A(l),s=E(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(T(e)){case"start":p[l]-=d*(n&&f?-1:1);break;case"end":p[l]+=d*(n&&f?-1:1)}return p}function H(t,e){return p(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:d="viewport",elementContext:p="floating",altBoundary:m=!1,padding:h=0}=R(e,t),y=D(h),g=c[m?"floating"===p?"reference":"floating":p],x=C(yield r.getClippingRect({element:null==(n=yield null==r.isElement?void 0:r.isElement(g))||n?g:g.contextElement||(yield null==r.getDocumentElement?void 0:r.getDocumentElement(c.floating)),boundary:f,rootBoundary:d,strategy:s})),v="floating"===p?u(a({},l.floating),{x:o,y:i}):l.reference,b=yield null==r.getOffsetParent?void 0:r.getOffsetParent(c.floating),w=(yield null==r.isElement?void 0:r.isElement(b))&&(yield null==r.getScale?void 0:r.getScale(b))||{x:1,y:1},E=C(r.convertOffsetParentRelativeRectToViewportRelativeRect?yield r.convertOffsetParentRelativeRectToViewportRelativeRect({rect:v,offsetParent:b,strategy:s}):v);return{top:(x.top-E.top+y.top)/w.y,bottom:(E.bottom-x.bottom+y.bottom)/w.y,left:(x.left-E.left+y.left)/w.x,right:(E.right-x.right+y.right)/w.x}}))}const W=t=>({name:"arrow",options:t,fn(e){return p(this,null,(function*(){const{x:n,y:o,placement:i,rects:r,platform:l,elements:c,middlewareData:s}=e,{element:f,padding:a=0}=R(t,e)||{};if(null==f)return{};const u=D(a),d={x:n,y:o},p=P(i),h=A(p),y=yield l.getDimensions(f),g="y"===p,x=g?"top":"left",v=g?"bottom":"right",b=g?"clientHeight":"clientWidth",E=r.reference[h]+r.reference[p]-d[p]-r.floating[h],L=d[p]-r.reference[p],O=yield null==l.getOffsetParent?void 0:l.getOffsetParent(f);let S=O?O[b]:0;S&&(yield null==l.isElement?void 0:l.isElement(O))||(S=c.floating[b]||r.floating[h]);const k=E/2-L/2,C=S/2-y[h]/2-1,F=m(u[x],C),H=m(u[v],C),W=F,_=S-y[h]-H,V=S/2-y[h]/2+k,B=w(W,V,_),M=!s.arrow&&null!=T(i)&&V!=B&&r.reference[h]/2-(V<W?F:H)-y[h]/2<0,j=M?V<W?W-V:_-V:0;return{[p]:d[p]-j,data:{[p]:B,centerOffset:V-B+j},reset:M}}))}}),_=function(t){return void 0===t&&(t={}),{name:"flip",options:t,fn(e){return p(this,null,(function*(){var n;const{placement:o,middlewareData:i,rects:r,initialPlacement:l,platform:c,elements:s}=e,f=R(t,e),{mainAxis:a=!0,crossAxis:u=!0,fallbackPlacements:p,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:y=!0}=f,g=d(f,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]),x=E(o),v=E(l)===l,b=yield null==c.isRTL?void 0:c.isRTL(s.floating),w=p||(v||!y?[k(l)]:function(t){const e=k(t);return[S(t),e,S(e)]}(l));p||"none"===h||w.push(...function(t,e,n,o){const i=T(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[]}}(E(t),"start"===n,o);return i&&(r=r.map((t=>t+"-"+i)),e&&(r=r.concat(r.map(S)))),r}(l,y,h,b));const L=[l,...w],O=yield H(e,g),D=[];let C=(null==(n=i.flip)?void 0:n.overflows)||[];if(a&&D.push(O[x]),u){const t=function(t,e,n){void 0===n&&(n=!1);const o=T(t),i=P(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)]}(o,r,b);D.push(O[t[0]],O[t[1]])}if(C=[...C,{placement:o,overflows:D}],!D.every((t=>t<=0))){var F,W;const t=((null==(F=i.flip)?void 0:F.index)||0)+1,e=L[t];if(e)return{data:{index:t,overflows:C},reset:{placement:e}};let n=null==(W=C.filter((t=>t.overflows[0]<=0)).sort(((t,e)=>t.overflows[1]-e.overflows[1]))[0])?void 0:W.placement;if(!n)switch(m){case"bestFit":{var _;const t=null==(_=C.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:_[0];t&&(n=t);break}case"initialPlacement":n=l}if(o!==n)return{reset:{placement:n}}}return{}}))}}},V=function(t){return void 0===t&&(t=0),{name:"offset",options:t,fn(e){return p(this,null,(function*(){const{x:n,y:o}=e,i=yield function(t,e){return p(this,null,(function*(){const{placement:n,platform:o,elements:i}=t,r=yield null==o.isRTL?void 0:o.isRTL(i.floating),l=E(n),c=T(n),s="y"===O(n),f=["left","top"].includes(l)?-1:1,u=r&&s?-1:1,d=R(e,t);let{mainAxis:p,crossAxis:m,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:a({mainAxis:0,crossAxis:0,alignmentAxis:null},d);return c&&"number"==typeof h&&(m="end"===c?-1*h:h),s?{x:m*u,y:p*f}:{x:p*f,y:m*u}}))}(e,t);return{x:n+i.x,y:o+i.y,data:i}}))}}},B=function(t){return void 0===t&&(t={}),{name:"shift",options:t,fn(e){return p(this,null,(function*(){const{x:n,y:o,placement:i}=e,r=R(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=d(r,["mainAxis","crossAxis","limiter"]),p={x:n,y:o},m=yield H(e,f),h=O(E(i)),y=L(h);let g=p[y],x=p[h];if(l){const t="y"===y?"bottom":"right";g=w(g+m["y"===y?"top":"left"],g,g-m[t])}if(c){const t="y"===h?"bottom":"right";x=w(x+m["y"===h?"top":"left"],x,x-m[t])}const v=s.fn(u(a({},e),{[y]:g,[h]:x}));return u(a({},v),{data:{x:v.x-n,y:v.y-o}})}))}}};function M(t){return N(t)?(t.nodeName||"").toLowerCase():"#document"}function j(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function z(t){var e;return null==(e=(N(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function N(t){return t instanceof Node||t instanceof j(t).Node}function I(t){return t instanceof Element||t instanceof j(t).Element}function q(t){return t instanceof HTMLElement||t instanceof j(t).HTMLElement}function X(t){return"undefined"!=typeof ShadowRoot&&(t instanceof ShadowRoot||t instanceof j(t).ShadowRoot)}function Y(t){const{overflow:e,overflowX:n,overflowY:o,display:i}=Q(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!["inline","contents"].includes(i)}function $(t){return["table","td","th"].includes(M(t))}function G(t){const e=J(),n=Q(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 J(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function K(t){return["html","body","#document"].includes(M(t))}function Q(t){return j(t).getComputedStyle(t)}function U(t){return I(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Z(t){if("html"===M(t))return t;const e=t.assignedSlot||t.parentNode||X(t)&&t.host||z(t);return X(e)?e.host:e}function tt(t){const e=Z(t);return K(e)?t.ownerDocument?t.ownerDocument.body:t.body:q(e)&&Y(e)?e:tt(e)}function et(t,e,n){var o;void 0===e&&(e=[]),void 0===n&&(n=!0);const i=tt(t),r=i===(null==(o=t.ownerDocument)?void 0:o.body),l=j(i);return r?e.concat(l,l.visualViewport||[],Y(i)?i:[],l.frameElement&&n?et(l.frameElement):[]):e.concat(i,et(i))}function nt(t){const e=Q(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const i=q(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 I(t)?t:t.contextElement}function it(t){const e=ot(t);if(!q(e))return x(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=x(0);function lt(t){const e=j(t);return J()&&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=x(1);e&&(o?I(o)&&(l=it(o)):l=it(t));const c=function(t,e,n){return void 0===e&&(e=!1),!(!n||e&&n!==j(t))&&e}(r,n,o)?lt(r):x(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=j(r),e=o&&I(o)?j(o):o;let n=t.frameElement;for(;n&&o&&e!==t;){const t=it(n),e=n.getBoundingClientRect(),o=Q(n),i=e.left+(n.clientLeft+parseFloat(o.paddingLeft))*t.x,r=e.top+(n.clientTop+parseFloat(o.paddingTop))*t.y;s*=t.x,f*=t.y,a*=t.x,u*=t.y,s+=i,f+=r,n=j(n).frameElement}}return C({width:a,height:u,x:s,y:f})}function st(t){return ct(z(t)).left+U(t).scrollLeft}function ft(t,e,n){let o;if("viewport"===e)o=function(t,e){const n=j(t),o=z(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=J();(!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=z(t),n=U(t),o=t.ownerDocument.body,i=h(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),r=h(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let l=-n.scrollLeft+st(t);const c=-n.scrollTop;return"rtl"===Q(o).direction&&(l+=h(e.clientWidth,o.clientWidth)-i),{width:i,height:r,x:l,y:c}}(z(t));else if(I(e))o=function(t,e){const n=ct(t,!0,"fixed"===e),o=n.top+t.clientTop,i=n.left+t.clientLeft,r=q(t)?it(t):x(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=u(a({},e),{x:e.x-n.x,y:e.y-n.y})}return C(o)}function at(t,e){const n=Z(t);return!(n===e||!I(n)||K(n))&&("fixed"===Q(n).position||at(n,e))}function ut(t,e,n){const o=q(e),i=z(e),r="fixed"===n,l=ct(t,!0,r,e);let c={scrollLeft:0,scrollTop:0};const s=x(0);if(o||!o&&!r)if(("body"!==M(e)||Y(i))&&(c=U(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));return{x:l.left+c.scrollLeft-s.x,y:l.top+c.scrollTop-s.y,width:l.width,height:l.height}}function dt(t,e){return q(t)&&"fixed"!==Q(t).position?e?e(t):t.offsetParent:null}function pt(t,e){const n=j(t);if(!q(t))return n;let o=dt(t,e);for(;o&&$(o)&&"static"===Q(o).position;)o=dt(o,e);return o&&("html"===M(o)||"body"===M(o)&&"static"===Q(o).position&&!G(o))?n:o||function(t){let e=Z(t);for(;q(e)&&!K(e);){if(G(e))return e;e=Z(e)}return null}(t)||n}const mt={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{rect:e,offsetParent:n,strategy:o}=t;const i=q(n),r=z(n);if(n===r)return e;let l={scrollLeft:0,scrollTop:0},c=x(1);const s=x(0);if((i||!i&&"fixed"!==o)&&(("body"!==M(n)||Y(r))&&(l=U(n)),q(n))){const t=ct(n);c=it(n),s.x=t.x+n.clientLeft,s.y=t.y+n.clientTop}return{width:e.width*c.x,height:e.height*c.y,x:e.x*c.x-l.scrollLeft*c.x+s.x,y:e.y*c.y-l.scrollTop*c.y+s.y}},getDocumentElement:z,getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t;const r=[..."clippingAncestors"===n?function(t,e){const n=e.get(t);if(n)return n;let o=et(t,[],!1).filter((t=>I(t)&&"body"!==M(t))),i=null;const r="fixed"===Q(t).position;let l=r?Z(t):t;for(;I(l)&&!K(l);){const e=Q(l),n=G(l);n||"fixed"!==e.position||(i=null),(r?!n&&!i:!n&&"static"===e.position&&i&&["absolute","fixed"].includes(i.position)||Y(l)&&!n&&at(t,l))?o=o.filter((t=>t!==l)):i=e,l=Z(l)}return e.set(t,o),o}(e,this._c):[].concat(n),o],l=r[0],c=r.reduce(((t,n)=>{const o=ft(e,n,i);return t.top=h(o.top,t.top),t.right=m(o.right,t.right),t.bottom=m(o.bottom,t.bottom),t.left=h(o.left,t.left),t}),ft(e,l,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}},getOffsetParent:pt,getElementRects:function(t){return p(this,null,(function*(){let{reference:e,floating:n,strategy:o}=t;const i=this.getOffsetParent||pt,r=this.getDimensions;return{reference:ut(e,yield i(n),o),floating:a({x:0,y:0},yield r(n))}}))},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){return nt(t)},getScale:it,isElement:I,isRTL:function(t){return"rtl"===Q(t).direction}};function ht(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),d=i||r?[...f?et(f):[],...et(e)]:[];d.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=z(t);function r(){clearTimeout(n),o&&o.disconnect(),o=null}return function l(c,s){void 0===c&&(c=!1),void 0===s&&(s=1),r();const{left:f,top:d,width:p,height:y}=t.getBoundingClientRect();if(c||e(),!p||!y)return;const x={rootMargin:-g(d)+"px "+-g(i.clientWidth-(f+p))+"px "+-g(i.clientHeight-(d+y))+"px "+-g(f)+"px",threshold:h(0,m(1,s))||1};let v=!0;function b(t){const e=t[0].intersectionRatio;if(e!==s){if(!v)return l();e?l(!1,e):n=setTimeout((()=>{l(!1,1e-7)}),100)}v=!1}try{o=new IntersectionObserver(b,u(a({},x),{root:i.ownerDocument}))}catch(t){o=new IntersectionObserver(b,x)}o.observe(t)}(!0),r}(f,n):null;let y,x=-1,v=null;l&&(v=new ResizeObserver((t=>{let[o]=t;o&&o.target===f&&v&&(v.unobserve(e),cancelAnimationFrame(x),x=requestAnimationFrame((()=>{v&&v.observe(e)}))),n()})),f&&!s&&v.observe(f),v.observe(e));let b=s?ct(t):null;return s&&function e(){const o=ct(t);!b||o.x===b.x&&o.y===b.y&&o.width===b.width&&o.height===b.height||n(),b=o,y=requestAnimationFrame(e)}(),n(),()=>{d.forEach((t=>{i&&t.removeEventListener("scroll",n),r&&t.removeEventListener("resize",n)})),p&&p(),v&&v.disconnect(),v=null,s&&cancelAnimationFrame(y)}}const yt=(t,e,n)=>{const o=new Map,i=a({platform:mt},n),r=u(a({},i.platform),{_c:o});return((t,e,n)=>p(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:d,y:p}=F(f,o,s),m=o,h={},y=0;for(let n=0;n<c.length;n++){const{name:r,fn:g}=c[n],{x,y:v,data:b,reset:w}=yield g({x:d,y:p,initialPlacement:o,placement:m,strategy:i,middlewareData:h,rects:f,platform:l,elements:{reference:t,floating:e}});d=null!=x?x:d,p=null!=v?v:p,h=u(a({},h),{[r]:a(a({},h[r]),b)}),w&&y<=50&&(y++,"object"==typeof w&&(w.placement&&(m=w.placement),w.rects&&(f=!0===w.rects?yield l.getElementRects({reference:t,floating:e,strategy:i}):w.rects),({x:d,y:p}=F(f,m,s))),n=-1)}return{x:d,y:p,placement:m,strategy:i,middlewareData:h}})))(t,e,u(a({},i),{platform:r}))}}}]);
|
package/dist/6655.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 6655.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunk_public_ui_sample_react=self.webpackChunk_public_ui_sample_react||[]).push([[6655],{6655:(t,e,n)=>{n.r(e),n.d(e,{kol_popover:()=>h});var i=n(1167),o=n(4604),s=n(2397),a=n(7921),r=n(1492),l=n(2180);const h=class{constructor(t){(0,i.r)(this,t),this.alignPopover=t=>{setTimeout((()=>{var e;if("test"!==l.p&&this.triggerElement&&this.popoverElement){const n=this.triggerElement,i=this.popoverElement,s=this.arrowElement,a=[(0,o.o)(null!==(e=null==s?void 0:s.offsetHeight)&&void 0!==e?e:10),(0,o.f)(),(0,o.s)()];s&&a.push((0,o.a)({element:s})),(0,o.c)(n,i,{placement:this.state._align,middleware:a}).then((({x:e,y:n,middlewareData:i,placement:o})=>{this.setPosition(e,n,i,o,t)}))}}))},this.showPopover=()=>{this.addListenersToBody(),this.alignPopover((()=>{this.state=Object.assign(Object.assign({},this.state),{_visible:!0})}))},this.hidePopoverByEscape=t=>{"Escape"===t.key&&this.hidePopover()},this.hidePopoverByClickOutside=t=>{this.host&&!this.host.contains(t.target)&&this.hidePopover()},this.catchHostAndTriggerElement=t=>{t&&(this.host=t,this.triggerElement=t.previousElementSibling)},this.catchPopoverElement=t=>{this.popoverElement=t},this.catchArrowElement=t=>{this.arrowElement=t},this._align="top",this._show=!1,this.state={_align:"top",_show:!1,_visible:!1}}setPosition(t,e,n,i,o){if(this.popoverElement){const s={left:this.popoverElement.style.left,top:this.popoverElement.style.top};if(Object.assign(this.popoverElement.style,{left:`${t}px`,top:`${e}px`}),this.arrowElement&&n.arrow)switch(i){case"top":this.arrowElement.style.inset=`100% auto auto ${n.arrow.x||0}px`,this.arrowElement.style.translate="0 -50%";break;case"right":this.arrowElement.style.inset=`${n.arrow.y||0}px 100% auto auto`,this.arrowElement.style.translate="50% 0";break;case"bottom":this.arrowElement.style.inset=`auto auto 100% ${n.arrow.x||0}px`,this.arrowElement.style.translate="0 50%";break;case"left":this.arrowElement.style.inset=`${n.arrow.y||0}px auto auto 100%`,this.arrowElement.style.translate="-50% 0"}s.left!==this.popoverElement.style.left||s.top!==this.popoverElement.style.top?this.alignPopover(o):"function"==typeof o&&o()}}hidePopover(){var t;this.state=Object.assign(Object.assign({},this.state),{_visible:!1}),this._show=!1,null===(t=this.triggerElement)||void 0===t||t.focus(),this.removeListenersToBody()}addListenersToBody(){var t;const e=(0,r.b)().body;e.addEventListener("keyup",this.hidePopoverByEscape),e.addEventListener("click",this.hidePopoverByClickOutside),null===(t=document.scrollingElement)||void 0===t||t.addEventListener("scroll",this.showPopover,{passive:!0})}removeListenersToBody(){var t;const e=(0,r.b)().body;e.removeEventListener("keyup",this.hidePopoverByEscape),e.removeEventListener("click",this.hidePopoverByClickOutside),null===(t=document.scrollingElement)||void 0===t||t.removeEventListener("scroll",this.showPopover)}render(){return(0,i.h)(i.H,{ref:this.catchHostAndTriggerElement},(0,i.h)("div",{class:{popover:!0,hidden:!this.state._show,show:this.state._visible},ref:this.catchPopoverElement},(0,i.h)("div",{class:`arrow ${this.state._align}`,ref:this.catchArrowElement}),(0,i.h)("slot",null)))}validateAlign(t){(0,s.a)(this,t)}validateShow(t){(0,a.v)(this,t),t&&this.showPopover()}componentWillLoad(){this.validateAlign(this._align),this.validateShow(this._show)}static get watchers(){return{_align:["validateAlign"],_show:["validateShow"]}}};h.style="@layer kol-global {\n\t/*\n\t * This file contains all rules for accessibility.\n\t */\n\t:host {\n\t\t/*\n\t\t * Minimum size of interactive elements.\n\t\t */\n\t\t--a11y-min-size: 44px;\n\t\tfont-size: inherit;\n\t}\n\n\t* {\n\t\t/*\n\t\t * Verdana is an accessible font that can be used without requiring additional loading time.\n\t\t */\n\t\tfont-family: Verdana;\n\t\t/*\n\t\t * This rule enables the word dividing for all texts. That is important for high zoom levels.\n\t\t */\n\t\thyphens: auto;\n\t\t/*\n\t\t * Letter spacing is required for all texts.\n\t\t */\n\t\tletter-spacing: inherit;\n\t\t/*\n\t\t * This rule enables the word dividing for all texts. That is important for high zoom levels.\n\t\t */\n\t\tword-break: break-word;\n\t\t/*\n\t\t * Word spacing is required for all texts.\n\t\t */\n\t\tword-spacing: inherit;\n\t}\n\n\t/*\n\t * All interactive elements should have a minimum size of 44px.\n\t */\n\t/* input:not([type='checkbox'], [type='radio'], [type='range']), */\n\t/* option, */\n\t/* select, */\n\t/* textarea, */\n\t[role='button'],\n\tbutton:not([role='link']),\n\tkol-input .input {\n\t\tmin-height: var(--a11y-min-size);\n\t\tmin-width: var(--a11y-min-size);\n\t}\n\n\t/*\n\t * Some interactive elements should not inherit the font-family and font-size.\n\t */\n\ta,\n\tbutton,\n\th1,\n\th2,\n\th3,\n\th4,\n\th5,\n\th6,\n\tinput,\n\toption,\n\tselect,\n\ttextarea {\n\t\t/*\n\t\t * All elements should inherit the font family from his parent element.\n\t\t */\n\t\tfont-family: inherit;\n\t\t/*\n\t\t * All elements should inherit the font size from his parent element.\n\t\t */\n\t\tfont-size: inherit;\n\t}\n}\n\n@layer kol-global {\n\t/*\n\t * Dieses CSS stellt sicher, dass der Standard-Style\n\t * von A und Button resettet werden.\n\t */\n\t:is(a, button) {\n\t\tbackground-color: transparent;\n\t\tborder: none;\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t\twidth: 100%; /* 100% needed for custom width from outside */\n\t}\n}\n\n@layer kol-global {\n\t:host {\n\t\t/*\n\t\t * The max-width is needed to prevent the table from overflowing the\n\t\t * parent node, if the table is wider than the parent node.\n\t\t */\n\t\tmax-width: 100%;\n\t}\n\n\t* {\n\t\t/*\n\t\t * We prefer to box-sizing: border-box for all elements.\n\t\t */\n\t\tbox-sizing: border-box;\n\t}\n\n\t/* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n\tkol-span-wc {\n\t\tdisplay: grid;\n\t\tplace-items: center;\n\t}\n\n\t/* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n\tkol-span-wc > span {\n\t\tdisplay: flex;\n\t\tplace-items: center;\n\t}\n\n\ta,\n\tbutton {\n\t\tcursor: pointer;\n\t}\n\n\t/* font-family is NOT inherited all HTML elements. */\n\tbutton,\n\tinput,\n\toption,\n\tselect,\n\ttextarea {\n\t\tfont-family: inherit;\n\t}\n\n\t/* This is the text label. */\n\t.icon-only > kol-span-wc > span > span {\n\t\tdisplay: none;\n\t}\n}\n\n@layer kol-component {\n\tkol-popover {\n\t\theight: 0;\n\t\tposition: absolute;\n\t}\n\n\tkol-popover .popover {\n\t\tbackground-color: #fff;\n\t\tmin-height: max-content;\n\t\tmin-width: max-content;\n\t\topacity: 0;\n\t\tposition: absolute;\n\t}\n\n\tkol-popover .hidden {\n\t\tdisplay: none;\n\t}\n\n\tkol-popover .show {\n\t\tanimation: 0.3s ease-in forwards fadeInOpacity;\n\t}\n\n\tkol-popover .disappear {\n\t\tanimation: 0.3s ease-in backwards fadeInOpacity;\n\t}\n\n\tkol-popover .arrow {\n\t\tbackground-color: inherit;\n\t\theight: var(--font-size);\n\t\tposition: absolute;\n\t\trotate: 0.125turn;\n\t\twidth: var(--font-size);\n\t\tz-index: -1;\n\t}\n\n\t@keyframes fadeInOpacity {\n\t\t0% {\n\t\t\topacity: 0;\n\t\t}\n\t\t100% {\n\t\t\topacity: 1;\n\t\t}\n\t}\n}\n"},7921:(t,e,n)=>{n.d(e,{v:()=>o});var i=n(5414);const o=(t,e,n)=>{(0,i.a)(t,"_show",e,n)}}}]);
|
package/dist/7929.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 7929.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunk_public_ui_sample_react=self.webpackChunk_public_ui_sample_react||[]).push([[7929],{1765:(t,e,o)=>{o.d(e,{I:()=>i});var n=o(1167);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)}},4469:(t,e,o)=>{o.d(e,{A:()=>a});var n=o(5414),i=o(8764);const s=(0,o(1492).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)}}},362:(t,e,o)=>{o.d(e,{I:()=>p,g:()=>h,v:()=>d});var n=o(5414),i=o(9112),s=o(7277),a=o(8764),l=o(9865),r=o(7950),c=o(4469);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}},d=(t,e,o)=>{(0,n.a)(t,"_hideError",e,o)};class u 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 p extends u{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)}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,r.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.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,l.s)(t),(0,l.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,l.s)(t),(0,l.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,l.s)(t),(0,l.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,l.s)(t),(0,l.t)("focus",this.host),"function"==typeof(null===(e=this.component._on)||void 0===e?void 0:e.onFocus)&&this.component._on.onFocus(t)}setValue(t,e){var o;this.setFormAssociatedValue(e),"function"==typeof(null===(o=this.component._on)||void 0===o?void 0:o.onChange)&&this.component._on.onChange(t,e)}addValueChangeListener(t){this.valueChangeListeners.push(t)}}},9136:(t,e,o)=>{o.d(e,{I:()=>r});var n=o(9087),i=o(5414),s=o(2180),a=o(362);const l=(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 r 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:l},required:!0})}))}componentWillLoad(){super.componentWillLoad(),this.validateIcons(this.component._icons||this.component._icon)}}},9865:(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})},9112:(t,e,o)=>{o.d(e,{v:()=>i});var n=o(5414);const i=(t,e,o={})=>{(0,n.a)(t,"_hideLabel",e,o)}},9087:(t,e,o)=>{o.d(e,{i:()=>a,v:()=>l});var n=o(5414),i=o(2180);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),l=(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})}))}},7277:(t,e,o)=>{o.d(e,{a:()=>d,c:()=>r,h:()=>l,v:()=>h});var n=o(8764),i=o(5414);const s=/[a-zA-Z0-9äöüÄÖÜß]/g,a=/^\d+$/;function l(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 r(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===l(e,3)&&!1===r(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},7950:(t,e,o)=>{o.d(e,{v:()=>a});var n=o(8764),i=o(5414);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)}}}]);
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { KolButton, KolInputPassword, KolInputText, KolPopover } from '@public-ui/react';
|
|
3
|
-
|
|
4
|
-
import { FC } from 'react';
|
|
5
|
-
|
|
6
|
-
export const PopoverBasic: FC = () => {
|
|
7
|
-
const [top, setTop] = React.useState(false);
|
|
8
|
-
const [right, setRight] = React.useState(false);
|
|
9
|
-
const [bottom, setBottom] = React.useState(false);
|
|
10
|
-
const [left, setLeft] = React.useState(false);
|
|
11
|
-
const [login, setLogin] = React.useState(false);
|
|
12
|
-
|
|
13
|
-
return (
|
|
14
|
-
<div className="grid gap-4 max-w-[400px] mx-auto pt-8">
|
|
15
|
-
<KolButton _label="Oben" _icons="codicon codicon-arrow-up" _variant="primary" _on={{ onClick: () => setTop(!top) }}></KolButton>
|
|
16
|
-
<KolPopover _show={top}>Ich bin oberhalb</KolPopover>
|
|
17
|
-
<KolButton _label="Rechts" _icons="codicon codicon-arrow-right" _variant="danger" _on={{ onClick: () => setRight(!right) }}></KolButton>
|
|
18
|
-
<KolPopover _align="right" _show={right}>
|
|
19
|
-
Ich bin rechts
|
|
20
|
-
</KolPopover>
|
|
21
|
-
<KolButton _label="Unten" _icons="codicon codicon-arrow-down" _variant="secondary" _on={{ onClick: () => setBottom(!bottom) }}></KolButton>
|
|
22
|
-
<KolPopover _align="bottom" _show={bottom}>
|
|
23
|
-
Ich bin unterhalb
|
|
24
|
-
</KolPopover>
|
|
25
|
-
<KolButton _label="Links" _icons="codicon codicon-arrow-left" _variant="normal" _on={{ onClick: () => setLeft(!left) }}></KolButton>
|
|
26
|
-
<KolPopover _align="left" _show={left}>
|
|
27
|
-
Ich bin links
|
|
28
|
-
</KolPopover>
|
|
29
|
-
<KolButton _label="PR starten" _icons="codicon codicon-git-pull-request" _variant="normal" _on={{ onClick: () => setLogin(!login) }}></KolButton>
|
|
30
|
-
<KolPopover _show={login}>
|
|
31
|
-
<KolInputText _label={`Benutzername`} />
|
|
32
|
-
<KolInputPassword _label={`Passwort`} />
|
|
33
|
-
</KolPopover>
|
|
34
|
-
</div>
|
|
35
|
-
);
|
|
36
|
-
};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|