@public-ui/sample-react 2.0.12-rc.0 → 2.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/dist/1051.js +1 -1
  2. package/dist/1278.js +1 -1
  3. package/dist/1499.js +1 -1
  4. package/dist/1502.js +1 -1
  5. package/dist/1517.js +1 -1
  6. package/dist/1699.js +1 -1
  7. package/dist/1848.js +1 -1
  8. package/dist/1940.js +1 -1
  9. package/dist/2015.js +1 -1
  10. package/dist/2156.js +1 -1
  11. package/dist/2182.js +1 -1
  12. package/dist/2439.js +1 -1
  13. package/dist/2619.js +1 -1
  14. package/dist/2624.js +1 -1
  15. package/dist/2671.js +1 -1
  16. package/dist/2926.js +1 -1
  17. package/dist/3028.js +1 -1
  18. package/dist/3316.js +2 -0
  19. package/dist/351.js +1 -1
  20. package/dist/3625.js +1 -1
  21. package/dist/4619.js +1 -1
  22. package/dist/4937.js +1 -1
  23. package/dist/5172.js +1 -1
  24. package/dist/528.js +1 -1
  25. package/dist/5342.js +1 -1
  26. package/dist/5431.js +1 -1
  27. package/dist/5784.js +1 -1
  28. package/dist/5896.js +1 -1
  29. package/dist/6114.js +1 -1
  30. package/dist/6329.js +1 -1
  31. package/dist/6357.js +1 -1
  32. package/dist/6511.js +1 -1
  33. package/dist/7086.js +1 -1
  34. package/dist/710.js +1 -1
  35. package/dist/7160.js +1 -1
  36. package/dist/7240.js +1 -1
  37. package/dist/7435.js +1 -1
  38. package/dist/7628.js +1 -1
  39. package/dist/7732.js +1 -1
  40. package/dist/7748.js +1 -1
  41. package/dist/7950.js +1 -1
  42. package/dist/7986.js +1 -1
  43. package/dist/8240.js +1 -1
  44. package/dist/8247.js +1 -1
  45. package/dist/8256.js +1 -1
  46. package/dist/8494.js +1 -1
  47. package/dist/8507.js +1 -1
  48. package/dist/9035.js +1 -1
  49. package/dist/9094.js +1 -1
  50. package/dist/9179.js +1 -1
  51. package/dist/9183.js +1 -1
  52. package/dist/9237.js +1 -1
  53. package/dist/9246.js +1 -1
  54. package/dist/9456.js +1 -1
  55. package/dist/9483.js +1 -1
  56. package/dist/9485.js +1 -1
  57. package/dist/9528.js +1 -1
  58. package/dist/9622.js +1 -1
  59. package/dist/97.js +1 -1
  60. package/dist/9758.js +1 -1
  61. package/dist/9829.js +1 -1
  62. package/dist/9918.js +1 -1
  63. package/dist/main.js +1 -1
  64. package/package.json +9 -9
  65. package/src/components/accordion/list.tsx +17 -7
  66. package/src/components/table/complex-headers.tsx +90 -0
  67. package/src/components/table/routes.ts +6 -2
  68. package/src/components/table/sort-data.tsx +29 -2
  69. package/src/components/table/with-footer.tsx +75 -0
  70. package/src/components/tabs/basic.tsx +2 -2
  71. package/dist/8231.js +0 -2
  72. /package/dist/{8231.js.LICENSE.txt → 3316.js.LICENSE.txt} +0 -0
package/package.json CHANGED
@@ -1,20 +1,20 @@
1
1
  {
2
2
  "name": "@public-ui/sample-react",
3
- "version": "2.0.12-rc.0",
3
+ "version": "2.0.13",
4
4
  "description": "This app contains samples for the KoliBri/Public UI",
5
5
  "license": "EUPL-1.2",
6
6
  "dependencies": {
7
7
  "@leanup/stack": "1.3.49",
8
8
  "@leanup/stack-react": "1.3.49",
9
9
  "@leanup/stack-webpack": "1.3.49",
10
- "@public-ui/components": "2.0.12-rc.0",
11
- "@public-ui/react": "2.0.12-rc.0",
12
- "@public-ui/themes": "2.0.12-rc.0",
10
+ "@public-ui/components": "2.0.13",
11
+ "@public-ui/react": "2.0.13",
12
+ "@public-ui/themes": "2.0.13",
13
13
  "@types/node": "ts5.4",
14
- "@types/react": "18.2.73",
15
- "@types/react-dom": "18.2.22",
16
- "@unocss/preset-uno": "0.58.7",
17
- "@unocss/webpack": "0.58.7",
14
+ "@types/react": "18.2.77",
15
+ "@types/react-dom": "18.2.25",
16
+ "@unocss/preset-uno": "0.58.9",
17
+ "@unocss/webpack": "0.58.9",
18
18
  "ajv": "8.12.0",
19
19
  "chromedriver": "122.0.6",
20
20
  "cpy-cli": "5.0.0",
@@ -29,7 +29,7 @@
29
29
  "react-router-dom": "6.22.3",
30
30
  "rimraf": "5.0.5",
31
31
  "ts-prune": "0.10.3",
32
- "typescript": "5.4.3",
32
+ "typescript": "5.4.5",
33
33
  "world_countries_lists": "2.9.0",
34
34
  "yup": "1.4.0"
35
35
  },
@@ -17,6 +17,18 @@ const LIST = [
17
17
  heading: 'Überschrift Accordion Tab 3',
18
18
  content: 'Inhalt Accordion Tab 3',
19
19
  },
20
+ {
21
+ heading: 'Überschrift Accordion Tab 4',
22
+ content: 'Inhalt Accordion Tab 4',
23
+ },
24
+ {
25
+ heading: 'Überschrift Accordion Tab 5',
26
+ content: 'Inhalt Accordion Tab 5',
27
+ },
28
+ {
29
+ heading: 'Überschrift Accordion Tab 6',
30
+ content: 'Inhalt Accordion Tab 6',
31
+ },
20
32
  ];
21
33
 
22
34
  export const AccordionList: FC = () => (
@@ -24,12 +36,10 @@ export const AccordionList: FC = () => (
24
36
  <SampleDescription>
25
37
  <p>Beim klicken mit der Maus auf die einzelnen Überschriften, soll der Inhalt darunter aufgeklappt und beim erneuten klicken wieder zugeklappt werden.</p>
26
38
  </SampleDescription>
27
- <div className="grid gap-4">
28
- {LIST.map(({ heading, content }, index) => (
29
- <KolAccordion _label={heading} _level={1} _open={index === 1} key={index}>
30
- <p>{content}</p>
31
- </KolAccordion>
32
- ))}
33
- </div>
39
+ {LIST.map(({ heading, content }, index) => (
40
+ <KolAccordion _label={heading} _level={1} _open={index === 1} key={index}>
41
+ <p>{content}</p>
42
+ </KolAccordion>
43
+ ))}
34
44
  </>
35
45
  );
@@ -0,0 +1,90 @@
1
+ import type { FC } from 'react';
2
+ import React from 'react';
3
+ import { KolTable } from '@public-ui/react';
4
+ import { SampleDescription } from '../SampleDescription';
5
+
6
+ export const TableComplexHeaders: FC = () => (
7
+ <>
8
+ <SampleDescription>Table using vertical and horizontal headers, applying colspan and rowspan.</SampleDescription>
9
+
10
+ <KolTable
11
+ _label="Business hours"
12
+ _data={[
13
+ {
14
+ asp: 'Center',
15
+ monday: '08:00',
16
+ tuesday: '08:00',
17
+ wednesday: '10:00',
18
+ thursday: '11:00',
19
+ friday: '08:00',
20
+ },
21
+ {
22
+ asp: 'Tiergarten',
23
+ monday: '08:00',
24
+ tuesday: '08:00',
25
+ wednesday: '10:00',
26
+ thursday: '11:00',
27
+ friday: '08:00',
28
+ },
29
+ {
30
+ asp: 'Maxvorstadt',
31
+ monday: '08:00',
32
+ tuesday: '08:00',
33
+ wednesday: '10:00',
34
+ thursday: '11:00',
35
+ friday: '08:00',
36
+ },
37
+ ]}
38
+ _headers={{
39
+ vertical: [[{ label: 'Berlin', rowSpan: 2 }, { label: 'München' }]],
40
+ horizontal: [
41
+ [
42
+ {
43
+ label: '',
44
+ colSpan: 7,
45
+ },
46
+ {
47
+ label: 'Weekend',
48
+ colSpan: 2,
49
+ },
50
+ ],
51
+ [
52
+ { label: '' },
53
+ {
54
+ label: 'District',
55
+ key: 'asp',
56
+ },
57
+ {
58
+ label: 'Monday',
59
+ key: 'monday',
60
+ },
61
+ {
62
+ label: 'Tuesday',
63
+ key: 'tuesday',
64
+ },
65
+ {
66
+ label: 'Wednesday',
67
+ key: 'wednesday',
68
+ },
69
+ {
70
+ label: 'Thursday',
71
+ key: 'thursday',
72
+ },
73
+ {
74
+ label: 'Friday',
75
+ key: 'friday',
76
+ },
77
+ {
78
+ label: 'Saturday',
79
+ key: 'saturday',
80
+ },
81
+ {
82
+ label: 'Sunday',
83
+ key: 'sunday',
84
+ },
85
+ ],
86
+ ],
87
+ }}
88
+ />
89
+ </>
90
+ );
@@ -1,20 +1,24 @@
1
1
  import { Routes } from '../../shares/types';
2
+ import { PaginationPosition } from './pagination-position';
2
3
  import { TableBadgeSize } from './badge-size';
3
4
  import { TableColumnAlignment } from './column-alignment';
5
+ import { TableComplexHeaders } from './complex-headers';
4
6
  import { TableHorizontalScrollbar } from './horizontal-scrollbar';
5
- import { PaginationPosition } from './pagination-position';
6
7
  import { TableRenderCell } from './render-cell';
7
8
  import { TableSortData } from './sort-data';
9
+ import { TableWithFooter } from './with-footer';
8
10
  import { TableWithPagination } from './with-pagination';
9
11
 
10
12
  export const TABLE_ROUTES: Routes = {
11
13
  table: {
12
14
  'badge-size': TableBadgeSize,
13
15
  'column-alignment': TableColumnAlignment,
16
+ 'complex-headers': TableComplexHeaders,
14
17
  'horizontal-scrollbar': TableHorizontalScrollbar,
18
+ 'pagination-position': PaginationPosition,
15
19
  'render-cell': TableRenderCell,
16
20
  'sort-data': TableSortData,
21
+ 'with-footer': TableWithFooter,
17
22
  'with-pagination': TableWithPagination,
18
- 'pagination-position': PaginationPosition,
19
23
  },
20
24
  };
@@ -13,7 +13,7 @@ const DATE_FORMATTER = Intl.DateTimeFormat('de-DE', {
13
13
  year: 'numeric',
14
14
  });
15
15
 
16
- const HEADERS: KoliBriTableHeaders = {
16
+ const HEADERS_HORIZONTAL: KoliBriTableHeaders = {
17
17
  horizontal: [
18
18
  [
19
19
  { label: 'order', key: 'order', textAlign: 'center' },
@@ -33,6 +33,26 @@ const HEADERS: KoliBriTableHeaders = {
33
33
  ],
34
34
  };
35
35
 
36
+ const HEADERS_VERTICAL: KoliBriTableHeaders = {
37
+ vertical: [
38
+ [
39
+ { label: 'order', key: 'order', textAlign: 'center' },
40
+ {
41
+ label: 'date',
42
+ key: 'date',
43
+ textAlign: 'center',
44
+ render: (_el, _cell, tupel) => DATE_FORMATTER.format((tupel as Data).date),
45
+ sort: (data: Data[]) =>
46
+ data.sort((data0, data1) => {
47
+ if (data0.date < data1.date) return -1;
48
+ else if (data1.date < data0.date) return 1;
49
+ else return 0;
50
+ }),
51
+ },
52
+ ],
53
+ ],
54
+ };
55
+
36
56
  export const TableSortData: FC = () => (
37
57
  <>
38
58
  <SampleDescription>
@@ -41,6 +61,13 @@ export const TableSortData: FC = () => (
41
61
  jüngsten Datum.
42
62
  </p>
43
63
  </SampleDescription>
44
- <KolTable _label="Sort a date column" _data={DATA} _headers={HEADERS} className="block" />
64
+
65
+ <h2>Vertical</h2>
66
+
67
+ <KolTable _label="Sort a date column" _data={DATA.slice(0, 10)} _headers={HEADERS_VERTICAL} className="block" />
68
+
69
+ <h2>Horizontal</h2>
70
+
71
+ <KolTable _label="Sort a date column" _data={DATA} _headers={HEADERS_HORIZONTAL} className="block" />
45
72
  </>
46
73
  );
@@ -0,0 +1,75 @@
1
+ import type { FC } from 'react';
2
+ import React from 'react';
3
+ import { KolTable } from '@public-ui/react';
4
+ import { SampleDescription } from '../SampleDescription';
5
+
6
+ export const TableWithFooter: FC = () => (
7
+ <>
8
+ <SampleDescription>Table with footer data</SampleDescription>
9
+
10
+ <KolTable
11
+ _label="Business hours"
12
+ _headers={{
13
+ horizontal: [
14
+ [
15
+ {
16
+ label: 'District',
17
+ key: 'asp',
18
+ },
19
+ {
20
+ label: 'Monday',
21
+ key: 'monday',
22
+ },
23
+ {
24
+ label: 'Tuesday',
25
+ key: 'tuesday',
26
+ },
27
+ {
28
+ label: 'Wednesday',
29
+ key: 'wednesday',
30
+ },
31
+ {
32
+ label: 'Thursday',
33
+ key: 'thursday',
34
+ },
35
+ {
36
+ label: 'Friday',
37
+ key: 'friday',
38
+ },
39
+ ],
40
+ ],
41
+ }}
42
+ _data={[
43
+ {
44
+ asp: 'Center',
45
+ monday: '08:00',
46
+ tuesday: '08:00',
47
+ wednesday: '10:00',
48
+ thursday: '11:00',
49
+ friday: '08:00',
50
+ },
51
+ {
52
+ asp: 'Tiergarten',
53
+ monday: '08:00',
54
+ tuesday: '08:00',
55
+ wednesday: '10:00',
56
+ thursday: '11:00',
57
+ friday: '08:00',
58
+ },
59
+ {
60
+ asp: 'Maxvorstadt',
61
+ monday: '08:00',
62
+ tuesday: '08:00',
63
+ wednesday: '10:00',
64
+ thursday: '11:00',
65
+ friday: '08:00',
66
+ },
67
+ ]}
68
+ _dataFoot={[
69
+ {
70
+ tuesday: "Lunch break from 11 to 14 o'clock",
71
+ },
72
+ ]}
73
+ />
74
+ </>
75
+ );
@@ -11,12 +11,12 @@ const tabs = [
11
11
  },
12
12
  {
13
13
  _icons: 'codicon codicon-calendar',
14
- _label: 'Zweites Tab',
14
+ _label: 'Zweiter Tab',
15
15
  },
16
16
  {
17
17
  _disabled: true,
18
18
  _icons: 'codicon codicon-briefcase',
19
- _label: 'Deaktiviertes Tab',
19
+ _label: 'Deaktivierter Tab',
20
20
  },
21
21
  {
22
22
  _icons: 'codicon codicon-telescope',
package/dist/8231.js DELETED
@@ -1,2 +0,0 @@
1
- /*! For license information please see 8231.js.LICENSE.txt */
2
- "use strict";(self.webpackChunk_public_ui_sample_react=self.webpackChunk_public_ui_sample_react||[]).push([[8231],{9578:(t,e,o)=>{o.d(e,{I:()=>i});var n=o(6212);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)}},2439:(t,e,o)=>{o.d(e,{A:()=>i});var n=o(1024);class i{constructor(t,e,o){var i,s,a,r;if(this.experimentalMode=(0,n.Z)(),this.setFormAssociatedValue=t=>{var e;const o=null===(e=this.formAssociated)||void 0===e?void 0:e.getAttribute("name");null!==o&&""!==o||(0,n.R)(` The form field (${this.type}) must have a name attribute to be form-associated. Please define the _name attribute.`);const i=this.tryToStringifyValue(t);this.syncValue(t,i,this.formAssociated),this.syncValue(t,i,this.syncToOwnInput)},this.component=t,this.host=this.findHostWithShadowRoot(o),this.type=e,this.experimentalMode&&("KOL-BUTTON"===(r=null===(i=this.host)||void 0===i?void 0:i.tagName)||"KOL-INPUT-CHECKBOX"===r||"KOL-INPUT-COLOR"===r||"KOL-INPUT-DATE"===r||"KOL-INPUT-EMAIL"===r||"KOL-INPUT-FILE"===r||"KOL-INPUT-NUMBER"===r||"KOL-INPUT-PASSWORD"===r||"KOL-INPUT-RADIO"===r||"KOL-INPUT-RANGE"===r||"KOL-INPUT-TEXT"===r||"KOL-SELECT"===r||"KOL-TEXTAREA"===r)){switch(null===(s=this.host)||void 0===s||s.querySelectorAll("input,select,textarea").forEach((t=>{var e;null===(e=this.host)||void 0===e||e.removeChild(t)})),this.type){case"button":case"color":case"date":case"email":case"file":case"number":case"password":case"radio":case"range":case"text":this.formAssociated=document.createElement("input"),this.formAssociated.setAttribute("type",this.type);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(this.experimentalMode)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,n.$)(`The form field raw value is not able to stringify! ${t}`),""}}syncValue(t,e,o){if(o)switch(this.type){case"file":o.files=t;break;case"select":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)}}));break;default:"string"==typeof e?(o.setAttribute("value",e),o.value=e):(o.removeAttribute("value"),o.value="")}}validateName(t){(0,n.a0)(this.component,t,{hooks:{afterPatch:()=>{this.setAttribute("name",this.formAssociated,this.component.state._name)}}}),void 0===t&&(0,n.R)("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(this.experimentalMode&&"string"==typeof t){const e=document.querySelector(t);e&&(this.syncToOwnInput=e)}}componentWillLoad(){this.validateName(this.component._name),this.validateSyncValueBySelector(this.component._syncValueBySelector)}}},9502:(t,e,o)=>{o.d(e,{I:()=>l,g:()=>a});var n=o(1024),i=o(6251),s=o(2439);const a=t=>{var e,o;const n=Boolean("error"===(null===(e=t._msg)||void 0===e?void 0:e._type)&&t._msg._description&&(null===(o=t._msg._description)||void 0===o?void 0:o.length)>0)&&!0===t._touched,i="string"==typeof t._hint&&t._hint.length>0,s=[];return!0===n&&s.push(`${t._id}-error`),!0===i&&s.push(`${t._id}-hint`),{hasError:n,hasHint:i,ariaDescribedBy:s}};class r extends s.A{constructor(t,e,o){super(t,e,o),this.component=t}validateAlert(t){(0,n.z)(this.component,"_alert",t)}validateTouched(t){(0,n.J)(this.component,t)}componentWillLoad(){super.componentWillLoad(),this.validateAlert(this.component._alert),this.validateTouched(this.component._touched)}}class l extends r{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),onInput:this.onInput.bind(this)},this.component=t}validateAccessKey(t){(0,n.A)(this.component,"_accessKey",t)}validateAdjustHeight(t){(0,n.M)(this.component,t)}validateDisabled(t){(0,n.z)(this.component,"_disabled",t),!0===t&&(0,n.N)()}validateError(t){const e=t?{_description:t,_type:"error"}:void 0;this.validateMsg(e)}validateHideError(t){(0,n.O)(this.component,t,{hooks:{afterPatch:()=>{this.component.state._hideError&&(0,n.Q)("Property hide-error for inputs: Only use when the error message is shown outside of the input component.")}}})}validateHideLabel(t){(0,n.P)(this.component,t,{hooks:{afterPatch:()=>{this.component.state._hideLabel&&(0,n.Q)("Property hide-label for inputs: Only use for exceptions like search inputs that are clearly identifiable by their context.")}}})}validateHint(t){(0,n.A)(this.component,"_hint",t)}validateId(t){(0,n.A)(this.component,"_id",t,{hooks:{afterPatch:()=>{this.setAttribute("id",this.formAssociated,this.component.state._id)}},minLength:1}),""!==t&&void 0!==t||(0,n.R)("Eine eindeutige ID an den Eingabefeldern ist nicht zwingend erforderlich, könnte aber für die E2E-Tests relevant sein.")}validateLabel(t){(0,n.S)(this.component,t,{required:!0})}validateMsg(t){(0,n.T)(this.component,t)}validateOn(t){"object"==typeof t&&(0,n.k)(this.component,"_on",t)}validateSmartButton(t){(0,n.q)(t,(()=>{try{t=(0,n.r)(t)}catch(t){}(0,n.k)(this.component,"_smartButton",t)}))}validateTabIndex(t){(0,n.U)(this.component,t)}componentWillLoad(){super.componentWillLoad(),this.validateAccessKey(this.component._accessKey),this.validateAdjustHeight(this.component._adjustHeight),this.validateError(this.component._error),this.validateMsg(this.component._msg),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,i.s)(t),(0,i.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,i.t)("change",this.host,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)))}onInput(t,e=!0){var o;const n=t.target.value;(0,i.s)(t),(0,i.t)("input",this.host),e&&this.setFormAssociatedValue(n),"function"==typeof(null===(o=this.component._on)||void 0===o?void 0:o.onInput)&&this.component._on.onInput(t)}onClick(t){var e;(0,i.s)(t),(0,i.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,i.s)(t),(0,i.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)}}},6880:(t,e,o)=>{o.d(e,{I:()=>s});var n=o(1024),i=o(6182);class s extends i.I{constructor(t,e,o){super(t,e,o),this.component=t}validateAutoComplete(t){(0,n.w)(this.component,"_autoComplete",(t=>"string"==typeof t&&("on"===t||"off"===t)),new Set(["on | off"]),t)}validateHasCounter(t){(0,n.aa)(this.component,t)}validateMaxLength(t){(0,n.a5)(this.component,"_maxLength",t,{min:0})}validatePattern(t){(0,n.A)(this.component,"_pattern",t)}validatePlaceholder(t){(0,n.A)(this.component,"_placeholder",t)}validateReadOnly(t){(0,n.z)(this.component,"_readOnly",t)}validateRequired(t){(0,n.z)(this.component,"_required",t)}validateValue(t){(0,n.A)(this.component,"_value",t),this.setFormAssociatedValue(this.component.state._value)}componentWillLoad(){super.componentWillLoad(),this.validateAutoComplete(this.component._autoComplete),this.validateHasCounter(this.component._hasCounter),this.validateMaxLength(this.component._maxLength),this.validatePattern(this.component._pattern),this.validatePlaceholder(this.component._placeholder),this.validateReadOnly(this.component._readOnly),this.validateRequired(this.component._required),this.validateValue(this.component._value)}onBlur(t){this.component.state=Object.assign(Object.assign({},this.component.state),{_placeholder:this.placeholderCache}),this.placeholderCache=void 0,super.onBlur(t)}onFocus(t){this.placeholderCache=this.component.state._placeholder,this.component.state=Object.assign(Object.assign({},this.component.state),{_placeholder:void 0}),super.onFocus(t)}}},4242:(t,e,o)=>{o.d(e,{a:()=>s,p:()=>a});var n=o(1024);const i=t=>{for((0,n.Z)()&&((0,n.R)("↓ Search form element start."),console.log(t));t instanceof HTMLElement&&"FORM"!==t.tagName&&"KOL-FORM"!==t.tagName;){try{t=t.parentElement instanceof HTMLElement?t.parentElement:t.parentNode instanceof ShadowRoot?t.parentNode.host:null}catch(t){}(0,n.Z)()&&(console.log(t),(0,n.R)("↑ Search form element finished."))}return t},s=(t={})=>{var e,o;const s=i(t.form);if(s instanceof HTMLElement){const t=new Event("reset",{bubbles:!0,cancelable:!0});if("FORM"===s.tagName)(0,n.a7)(t,s),s.dispatchEvent(t);else if("KOL-FORM"===s.tagName){(0,n.a7)(t,n.K.querySelector("form",s));const i=s;"function"==typeof(null===(e=i._on)||void 0===e?void 0:e.onReset)&&(null===(o=i._on)||void 0===o||o.onReset(t))}}},a=(t={})=>{var e,o;const s=i(t.form);if(s instanceof HTMLElement){const t=new SubmitEvent("submit",{bubbles:!0,cancelable:!0,submitter:s});if("FORM"===s.tagName)(0,n.a7)(t,s),s.dispatchEvent(t),(0,n.Z)()&&!1===s.noValidate&&(0,n.R)("If you have not focusable or hidden form fields in your form, you should enable noValidate for your form.",{force:!0}),"function"==typeof s.requestSubmit&&s.requestSubmit();else if("KOL-FORM"===s.tagName){(0,n.a7)(t,n.K.querySelector("form",s));const i=s;"function"==typeof(null===(e=i._on)||void 0===e?void 0:e.onSubmit)&&(null===(o=i._on)||void 0===o||o.onSubmit(t))}}}},6182:(t,e,o)=>{o.d(e,{I:()=>a});var n=o(1024),i=o(9502);const s=(t,e)=>{const o=t;"object"==typeof o&&null!==o&&((0,n.F)(o.right,1)&&(o.right={icon:o.right}),(0,n.F)(o.left,1)&&(o.left={icon:o.left}),e.set("_icons",o))};class a extends i.I{constructor(t,e,o){super(t,e,o),this.component=t}validateIcon(t){this.validateIcons(t)}validateIcons(t){(0,n.q)(t,(()=>{try{t=(0,n.r)(t)}catch(t){}(0,n.w)(this.component,"_icons",(t=>"object"==typeof t&&null!==t&&((0,n.F)(t.left,1)||(0,n.a3)(t.left)||(0,n.F)(t.right,1)||(0,n.a3)(t.right))),new Set(["KoliBriHorizontalIcon"]),t,{hooks:{beforePatch:s},required:!0})}))}componentWillLoad(){super.componentWillLoad(),this.validateIcons(this.component._icons||this.component._icon)}}},9744:(t,e,o)=>{o.d(e,{i:()=>s,n:()=>r,r:()=>a});var n=o(1024);const i=()=>{let t=(0,n.d)().KoliBri;return void 0===t&&(t={},Object.defineProperty((0,n.d)(),"KoliBri",{value:t,writable:!1})),t},s=()=>{(()=>{const t=(0,n.g)().querySelector('meta[name="kolibri"]');if(t&&t.hasAttribute("content")){const e=t.getAttribute("content");"string"==typeof e&&((0,n.s)(e.includes("dev-mode=true")),(0,n.b)(e.includes("experimental-mode=true")),(0,n.c)(e.includes("color-contrast-analysis=true")))}})(),n.L.debug("\n,--. ,--. ,--. ,--. ,-----. ,--.\n| .' / ,---. | | `--' | |) /_ ,--.--. `--'\n| . ' | .-. | | | ,--. | .-. \\ | .--' ,--.\n| |\\ \\ | '-' | | | | | | '--' / | | | |\n`--' `--´ `---´ `--' `--' `------´ `--' `--'\n🚹 The accessible HTML-Standard | 👉 https://public-ui.github.io | 2.0.8\n\t",{forceLog:!0})},a=()=>{!0!==i().adviceShown&&(Object.defineProperty(i(),"adviceShown",{get:function(){return!0}}),n.L.debug("\nYou are using the KoliBri component library. If you have any suggestions for improvement or find a problem, please contact us:\n\nTicket: https://github.com/public-ui/kolibri/issues/new/choose (for privacy reasons, please use email)\nEmail: kolibri@itzbund.de\n"))};let r=()=>Math.floor(16777215*Math.random()).toString(16);"test"===n.p&&(r=()=>"nonce")},6251:(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)}function s(t){t.preventDefault(),n(t)}o.d(e,{p:()=>s,s:()=>n,t:()=>i})}}]);