@public-ui/sample-react 2.2.10 → 2.2.11-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. package/dist/1266.js +1 -1
  2. package/dist/1601.js +1 -1
  3. package/dist/1786.js +1 -1
  4. package/dist/1797.js +1 -1
  5. package/dist/1832.js +1 -1
  6. package/dist/2441.js +1 -1
  7. package/dist/2462.js +1 -1
  8. package/dist/2605.js +1 -1
  9. package/dist/2728.js +1 -1
  10. package/dist/2960.js +1 -1
  11. package/dist/3440.js +1 -1
  12. package/dist/3460.js +1 -1
  13. package/dist/3492.js +1 -1
  14. package/dist/3503.js +1 -1
  15. package/dist/3845.js +1 -1
  16. package/dist/3882.js +1 -1
  17. package/dist/3965.js +1 -1
  18. package/dist/4181.js +1 -1
  19. package/dist/4294.js +1 -1
  20. package/dist/4604.js +1 -1
  21. package/dist/4714.js +1 -1
  22. package/dist/4737.js +1 -1
  23. package/dist/4804.js +1 -1
  24. package/dist/4972.js +1 -1
  25. package/dist/5076.js +1 -1
  26. package/dist/5204.js +1 -1
  27. package/dist/5399.js +1 -1
  28. package/dist/5431.js +1 -1
  29. package/dist/5514.js +1 -1
  30. package/dist/5522.js +1 -1
  31. package/dist/5677.js +1 -1
  32. package/dist/5781.js +1 -1
  33. package/dist/5813.js +1 -1
  34. package/dist/5829.js +1 -1
  35. package/dist/6199.js +1 -1
  36. package/dist/6320.js +1 -1
  37. package/dist/6473.js +1 -1
  38. package/dist/6567.js +1 -1
  39. package/dist/6649.js +1 -1
  40. package/dist/6705.js +1 -1
  41. package/dist/6717.js +1 -1
  42. package/dist/6731.js +1 -1
  43. package/dist/685.js +2 -0
  44. package/dist/691.js +2 -0
  45. package/dist/6974.js +1 -1
  46. package/dist/7157.js +1 -1
  47. package/dist/7162.js +1 -1
  48. package/dist/7163.js +1 -1
  49. package/dist/7183.js +1 -1
  50. package/dist/7310.js +1 -1
  51. package/dist/7391.js +1 -1
  52. package/dist/7461.js +1 -1
  53. package/dist/7560.js +1 -1
  54. package/dist/7582.js +1 -1
  55. package/dist/7609.js +1 -1
  56. package/dist/8100.js +1 -1
  57. package/dist/8116.js +1 -1
  58. package/dist/8126.js +1 -1
  59. package/dist/8191.js +1 -1
  60. package/dist/8210.js +1 -1
  61. package/dist/8286.js +1 -1
  62. package/dist/8471.js +1 -1
  63. package/dist/85.js +1 -1
  64. package/dist/8799.js +1 -1
  65. package/dist/8902.js +1 -1
  66. package/dist/8956.js +1 -1
  67. package/dist/92.js +1 -1
  68. package/dist/9558.js +1 -1
  69. package/dist/9768.js +1 -1
  70. package/dist/9818.js +1 -1
  71. package/dist/989.js +1 -1
  72. package/dist/9980.js +1 -1
  73. package/dist/main.css +2 -2
  74. package/dist/main.js +1 -1
  75. package/package.json +17 -10
  76. package/src/components/SampleDescription.tsx +27 -15
  77. package/src/components/Sidebar.tsx +29 -10
  78. package/src/components/badge/basic.tsx +1 -1
  79. package/src/components/badge/button.tsx +1 -1
  80. package/src/components/button/baselined.tsx +1 -1
  81. package/src/components/drawer/basic.tsx +14 -10
  82. package/src/components/handout/basic.tsx +5 -3
  83. package/src/components/link-button/aria-description.tsx +1 -1
  84. package/src/components/link-button/basic.tsx +8 -10
  85. package/src/components/tree/basic.tsx +1 -1
  86. package/src/react.main.tsx +2 -2
  87. package/src/scenarios/change-tabindex.tsx +23 -21
  88. package/src/shares/constants.ts +2 -2
  89. package/src/shares/store.ts +0 -19
  90. package/src/style.scss +16 -5
  91. package/unocss.config.ts +67 -68
  92. package/webpack.config.js +13 -2
  93. package/dist/2323.js +0 -2
  94. package/dist/2778.js +0 -2
  95. /package/dist/{2323.js.LICENSE.txt → 685.js.LICENSE.txt} +0 -0
  96. /package/dist/{2778.js.LICENSE.txt → 691.js.LICENSE.txt} +0 -0
package/unocss.config.ts CHANGED
@@ -13,131 +13,130 @@ function convertDynamicClassValueToRem(value: string) {
13
13
  return pxValueToRem(Number.parseFloat(value) * 16 / 4);
14
14
  }
15
15
 
16
- // ts-prune-ignore-next
17
16
  export default defineConfig({
18
17
  rules: [
19
- [/^p-(\d+)$/, ([, d]) => ({
20
- padding: convertDynamicClassValueToRem(d)
18
+ [/^p-(\d+)$/, ([, d]) => ({
19
+ padding: convertDynamicClassValueToRem(d)
21
20
  })],
22
21
 
23
- [/^px-(\d+)$/, ([, d]) => ({
22
+ [/^px-(\d+)$/, ([, d]) => ({
24
23
  'padding-left': convertDynamicClassValueToRem(d),
25
- 'padding-right': convertDynamicClassValueToRem(d)
24
+ 'padding-right': convertDynamicClassValueToRem(d)
26
25
  })],
27
- [/^py-(\d+)$/, ([, d]) => ({
26
+ [/^py-(\d+)$/, ([, d]) => ({
28
27
  'padding-top': convertDynamicClassValueToRem(d),
29
- 'padding-bottom': convertDynamicClassValueToRem(d)
28
+ 'padding-bottom': convertDynamicClassValueToRem(d)
30
29
  })],
31
30
 
32
- [/^ps-(\d+)$/, ([, d]) => ({
33
- 'padding-inline-start': convertDynamicClassValueToRem(d)
31
+ [/^ps-(\d+)$/, ([, d]) => ({
32
+ 'padding-inline-start': convertDynamicClassValueToRem(d)
34
33
  })],
35
- [/^pe-(\d+)$/, ([, d]) => ({
36
- 'padding-inline-end': convertDynamicClassValueToRem(d)
34
+ [/^pe-(\d+)$/, ([, d]) => ({
35
+ 'padding-inline-end': convertDynamicClassValueToRem(d)
37
36
  })],
38
37
 
39
- [/^pt-(\d+)$/, ([, d]) => ({
40
- 'padding-top': convertDynamicClassValueToRem(d)
38
+ [/^pt-(\d+)$/, ([, d]) => ({
39
+ 'padding-top': convertDynamicClassValueToRem(d)
41
40
  })],
42
- [/^pl-(\d+)$/, ([, d]) => ({
43
- 'padding-left': convertDynamicClassValueToRem(d)
41
+ [/^pl-(\d+)$/, ([, d]) => ({
42
+ 'padding-left': convertDynamicClassValueToRem(d)
44
43
  })],
45
- [/^pr-(\d+)$/, ([, d]) => ({
46
- 'padding-right': convertDynamicClassValueToRem(d)
44
+ [/^pr-(\d+)$/, ([, d]) => ({
45
+ 'padding-right': convertDynamicClassValueToRem(d)
47
46
  })],
48
- [/^pb-(\d+)$/, ([, d]) => ({
49
- 'padding-bottom': convertDynamicClassValueToRem(d)
47
+ [/^pb-(\d+)$/, ([, d]) => ({
48
+ 'padding-bottom': convertDynamicClassValueToRem(d)
50
49
  })],
51
50
 
52
- [/^p-t-(\d+)$/, ([, d]) => ({
53
- 'padding-top': convertDynamicClassValueToRem(d)
51
+ [/^p-t-(\d+)$/, ([, d]) => ({
52
+ 'padding-top': convertDynamicClassValueToRem(d)
54
53
  })],
55
- [/^p-l-(\d+)$/, ([, d]) => ({
56
- 'padding-left': convertDynamicClassValueToRem(d)
54
+ [/^p-l-(\d+)$/, ([, d]) => ({
55
+ 'padding-left': convertDynamicClassValueToRem(d)
57
56
  })],
58
- [/^p-r-(\d+)$/, ([, d]) => ({
59
- 'padding-right': convertDynamicClassValueToRem(d)
57
+ [/^p-r-(\d+)$/, ([, d]) => ({
58
+ 'padding-right': convertDynamicClassValueToRem(d)
60
59
  })],
61
- [/^p-b-(\d+)$/, ([, d]) => ({
62
- 'padding-bottom': convertDynamicClassValueToRem(d)
60
+ [/^p-b-(\d+)$/, ([, d]) => ({
61
+ 'padding-bottom': convertDynamicClassValueToRem(d)
63
62
  })],
64
63
 
65
- [/^m-(\d+)$/, ([, d]) => ({
66
- margin: convertDynamicClassValueToRem(d)
64
+ [/^m-(\d+)$/, ([, d]) => ({
65
+ margin: convertDynamicClassValueToRem(d)
67
66
  })],
68
67
 
69
- [/^mx-(\d+)$/, ([, d]) => ({
68
+ [/^mx-(\d+)$/, ([, d]) => ({
70
69
  'margin-left': convertDynamicClassValueToRem(d),
71
- 'margin-right': convertDynamicClassValueToRem(d)
70
+ 'margin-right': convertDynamicClassValueToRem(d)
72
71
  })],
73
- [/^my-(\d+)$/, ([, d]) => ({
72
+ [/^my-(\d+)$/, ([, d]) => ({
74
73
  'margin-top': convertDynamicClassValueToRem(d),
75
- 'margin-bottom': convertDynamicClassValueToRem(d)
74
+ 'margin-bottom': convertDynamicClassValueToRem(d)
76
75
  })],
77
76
 
78
- [/^ms-(\d+)$/, ([, d]) => ({
79
- 'margin-inline-start': convertDynamicClassValueToRem(d)
77
+ [/^ms-(\d+)$/, ([, d]) => ({
78
+ 'margin-inline-start': convertDynamicClassValueToRem(d)
80
79
  })],
81
- [/^me-(\d+)$/, ([, d]) => ({
82
- 'margin-inline-end': convertDynamicClassValueToRem(d)
80
+ [/^me-(\d+)$/, ([, d]) => ({
81
+ 'margin-inline-end': convertDynamicClassValueToRem(d)
83
82
  })],
84
83
 
85
- [/^mt$/, ([, d]) => ({
86
- 'margin-top': pxValueToRem(16)
84
+ [/^mt$/, ([, d]) => ({
85
+ 'margin-top': pxValueToRem(16)
87
86
  })],
88
- [/^ml$/, ([, d]) => ({
89
- 'margin-left': pxValueToRem(16)
87
+ [/^ml$/, ([, d]) => ({
88
+ 'margin-left': pxValueToRem(16)
90
89
  })],
91
- [/^mr$/, ([, d]) => ({
92
- 'margin-right': pxValueToRem(16)
90
+ [/^mr$/, ([, d]) => ({
91
+ 'margin-right': pxValueToRem(16)
93
92
  })],
94
- [/^mb$/, ([, d]) => ({
95
- 'margin-bottom': pxValueToRem(16)
93
+ [/^mb$/, ([, d]) => ({
94
+ 'margin-bottom': pxValueToRem(16)
96
95
  })],
97
96
 
98
- [/^mt-(\d+)$/, ([, d]) => ({
99
- 'margin-top': convertDynamicClassValueToRem(d)
97
+ [/^mt-(\d+)$/, ([, d]) => ({
98
+ 'margin-top': convertDynamicClassValueToRem(d)
100
99
  })],
101
- [/^ml-(\d+)$/, ([, d]) => ({
102
- 'margin-left': convertDynamicClassValueToRem(d)
100
+ [/^ml-(\d+)$/, ([, d]) => ({
101
+ 'margin-left': convertDynamicClassValueToRem(d)
103
102
  })],
104
- [/^mr-(\d+)$/, ([, d]) => ({
105
- 'margin-right': convertDynamicClassValueToRem(d)
103
+ [/^mr-(\d+)$/, ([, d]) => ({
104
+ 'margin-right': convertDynamicClassValueToRem(d)
106
105
  })],
107
- [/^mb-(\d+)$/, ([, d]) => ({
108
- 'margin-bottom': convertDynamicClassValueToRem(d)
106
+ [/^mb-(\d+)$/, ([, d]) => ({
107
+ 'margin-bottom': convertDynamicClassValueToRem(d)
109
108
  })],
110
109
 
111
- [/^m-t-(\d+)$/, ([, d]) => ({
112
- 'margin-top': convertDynamicClassValueToRem(d)
110
+ [/^m-t-(\d+)$/, ([, d]) => ({
111
+ 'margin-top': convertDynamicClassValueToRem(d)
113
112
  })],
114
- [/^m-l-(\d+)$/, ([, d]) => ({
115
- 'margin-left': convertDynamicClassValueToRem(d)
113
+ [/^m-l-(\d+)$/, ([, d]) => ({
114
+ 'margin-left': convertDynamicClassValueToRem(d)
116
115
  })],
117
- [/^m-r-(\d+)$/, ([, d]) => ({
118
- 'margin-right': convertDynamicClassValueToRem(d)
116
+ [/^m-r-(\d+)$/, ([, d]) => ({
117
+ 'margin-right': convertDynamicClassValueToRem(d)
119
118
  })],
120
- [/^m-b-(\d+)$/, ([, d]) => ({
121
- 'margin-bottom': convertDynamicClassValueToRem(d)
119
+ [/^m-b-(\d+)$/, ([, d]) => ({
120
+ 'margin-bottom': convertDynamicClassValueToRem(d)
122
121
  })],
123
122
 
124
- [/^mb-sm$/, ([, d]) => ({
125
- 'margin-bottom': pxValueToRem(14)
123
+ [/^mb-sm$/, ([, d]) => ({
124
+ 'margin-bottom': pxValueToRem(14)
126
125
  })],
127
126
 
128
127
  [/^gap-(\d+)$/, ([, d]) => ({ gap: convertDynamicClassValueToRem(d) })],
129
128
  [/^gap-x-(\d+)$/, ([, d]) => ({ 'column-gap': convertDynamicClassValueToRem(d) })],
130
129
  [/^gap-y-(\d+)$/, ([, d]) => ({ 'row-gap': convertDynamicClassValueToRem(d) })],
131
-
132
- [/^w-(\d+)rem$/, ([, d]) => ({
133
- width: pxValueToRem(Number.parseInt(d) * 16)
130
+
131
+ [/^w-(\d+)rem$/, ([, d]) => ({
132
+ width: pxValueToRem(Number.parseInt(d) * 16)
134
133
  })],
135
134
 
136
- [/^w-sm$/, () => ({
135
+ [/^w-sm$/, () => ({
137
136
  width: pxValueToRem(24 * 16) // 24rem
138
137
  })],
139
138
  ],
140
- extendTheme: (theme: any) => {
139
+ extendTheme: (theme: any) => {
141
140
  return {
142
141
  ...theme,
143
142
  fontSize: {
package/webpack.config.js CHANGED
@@ -1,9 +1,20 @@
1
1
  const webpack = require('webpack');
2
2
 
3
+ /**
4
+ * @returns {null|string}
5
+ */
6
+ function getGitCommitHash() {
7
+ try {
8
+ return require('child_process').execSync('git rev-parse --short HEAD 2>/dev/null').toString().trim();
9
+ } catch (e) {
10
+ return null;
11
+ }
12
+ }
13
+
3
14
  module.exports = (...args) => {
4
15
  const config = require('@leanup/stack-react/webpack.config')(...args);
5
16
  const UnoCSS = require('@unocss/webpack').default;
6
- const commitHash = require('child_process').execSync('git rev-parse --short HEAD').toString().trim();
17
+
7
18
  config.plugins.push(UnoCSS());
8
19
  config.plugins.push(
9
20
  new webpack.EnvironmentPlugin({
@@ -13,7 +24,7 @@ module.exports = (...args) => {
13
24
  ENABLE_TAG_NAME_TRANSFORMER: '',
14
25
  ENABLE_THEME_PATCHING: '',
15
26
  BUILD_DATE: new Date().toISOString(),
16
- COMMIT_HASH: commitHash,
27
+ COMMIT_HASH: getGitCommitHash(),
17
28
  }),
18
29
  );
19
30
  delete config.devServer.proxy;
package/dist/2323.js DELETED
@@ -1,2 +0,0 @@
1
- /*! For license information please see 2323.js.LICENSE.txt */
2
- "use strict";(self.webpackChunk_public_ui_sample_react=self.webpackChunk_public_ui_sample_react||[]).push([[2323],{2323:(e,t,i)=>{i.r(t),i.d(t,{initialize:()=>a});var o=i(4219),n=i(5838),r=i(2741);function l(e,t){try{Object.defineProperty((()=>{let e=(0,n.d)().KoliBri;return void 0===e&&(e={},Object.defineProperty((0,n.d)(),"KoliBri",{value:e,writable:!1})),e})(),e,{get:function(){return t}})}catch(t){n.L.debug(`KoliBri property ${e} is already bind.`)}}const s=(e,t)=>n.L.debug(`${e} ${t?"":"not "}activated`),a=()=>{if((0,o.i)(),(0,n.e)()){(0,o.r)(),l("a11yColorContrast",r.y),l("querySelector",r.t),l("querySelectorAll",r.z),l("querySelectorColors",r.A),l("utils",(function(){return r.B})),l("parseJson",r.p),l("stringifyJson",r.C);const e=(0,n.g)().body,t=(0,n.g)().createElement("svg");if(t.setAttribute("aria-label","KoliBri-DevTools"),t.setAttribute("xmlns","http://www.w3.org/2000/svg"),t.setAttribute("role","toolbar"),t.setAttribute("style","position: fixed;color: black;font-size: 200%;bottom: 0.25rem;right: 0.25rem;"),t.innerHTML='<svg\n xmlns="http://www.w3.org/2000/svg"\n width="50"\n height="50"\n viewBox="0 0 600 600"\n>\n <path d="M353 322L213 304V434L353 322Z" fill="#047" />\n <path d="M209 564V304L149 434L209 564Z" fill="#047" />\n <path d="M357 316L417 250L361 210L275 244L357 316Z" fill="#047" />\n <path d="M353 318L35 36L213 300L353 318Z" fill="#047" />\n <path d="M329 218L237 92L250 222L272 241L329 218Z" fill="#047" />\n <path d="M391 286L565 272L421 252L391 286Z" fill="#047" />\n</svg>',(0,n.g)().body.appendChild(t),s("Development mode",(0,n.e)()),s("Experimental mode",(0,n.a)()),s("Color contrast analysis",(0,n.f)()),(0,n.f)()){const t=setTimeout((()=>{clearTimeout(t),setInterval((()=>{r.B.queryHtmlElementColors((0,n.g)().createElement("div"),(0,r.y)(e),!1,!1)}),1e4)}),2500)}}}},4219:(e,t,i)=>{i.d(t,{i:()=>s,n:()=>c,r:()=>a});var o=i(254),n=i(7177),r=i(5838);const l=()=>{let e=(0,r.d)().KoliBri;return void 0===e&&(e={},Object.defineProperty((0,r.d)(),"KoliBri",{value:e,writable:!1})),e},s=()=>{(()=>{const e=(0,r.g)().querySelector('meta[name="kolibri"]');if(e&&e.hasAttribute("content")){const t=e.getAttribute("content");"string"==typeof t&&((0,r.s)(t.includes("dev-mode=true")),(0,r.b)(t.includes("experimental-mode=true")),(0,r.c)(t.includes("color-contrast-analysis=true")))}})(),r.L.debug(`\n,--. ,--. ,--. ,--. ,-----. ,--.\n| .' / ,---. | | \`--' | |) /_ ,--.--. \`--'\n| . ' | .-. | | | ,--. | .-. \\ | .--' ,--.\n| |\\ \\ | '-' | | | | | | '--' / | | | |\n\`--' \`--´ \`---´ \`--' \`--' \`------´ \`--' \`--'\n🚹 The accessible HTML-Standard | 👉 https://public-ui.github.io | ${o.E.kolibriVersion}\n\t`,{forceLog:!0})},a=()=>{!0!==l().adviceShown&&(Object.defineProperty(l(),"adviceShown",{get:function(){return!0}}),r.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 c=()=>Math.floor(16777215*Math.random()).toString(16);"test"===n.p&&(c=()=>"nonce")},7177:(e,t,i)=>{i.d(t,{b:()=>l,h:()=>n,p:()=>o,s:()=>r});let o="development";try{o="production"}catch(e){o="production"}const n=(e,t,i)=>{if(e&&t&&"string"==typeof i){const o=e.querySelector(`[slot="${i}"]`);o&&t.appendChild(o)}},r=e=>""===e,l=(e,t)=>e||t||""}}]);
package/dist/2778.js DELETED
@@ -1,2 +0,0 @@
1
- /*! For license information please see 2778.js.LICENSE.txt */
2
- "use strict";(self.webpackChunk_public_ui_sample_react=self.webpackChunk_public_ui_sample_react||[]).push([[2778],{3420:(t,e,o)=>{o.d(e,{I:()=>p,g:()=>d});var n=o(8445),i=o(8715),s=o(2741),a=o(6692),r=o(7350),l=o(9027),c=o(7257),h=o(4323);const d=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 u extends i.A{constructor(t,e,o){super(t,e,o),this.component=t}validateAlert(t){(0,s.b)(this.component,"_alert",t)}validateTouched(t){((t,e)=>{(0,s.b)(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),onInput:this.onInput.bind(this)},this.component=t}validateAccessKey(t){(0,a.v)(this.component,t),(0,a.a)(t,this.component._shortKey)}validateAdjustHeight(t){((t,e)=>{(0,s.b)(t,"_adjustHeight",e)})(this.component,t)}validateDisabled(t){(0,s.b)(this.component,"_disabled",t),!0===t&&(0,s.c)()}validateTooltipAlign(t){(0,h.v)(this.component,t)}validateError(t){"string"==typeof t&&t.length>0?this.validateMsg({_description:t,_type:"error"}):this.validateMsg(void 0)}validateHideError(t){((t,e,o)=>{(0,s.b)(t,"_hideError",e,o)})(this.component,t,{hooks:{afterPatch:()=>{this.component.state._hideError&&(0,s.a)("Property hide-error for inputs: Only use when the error message is shown outside of the input component.")}}})}validateHideLabel(t){(0,r.v)(this.component,t,{hooks:{afterPatch:()=>{this.component.state._hideLabel&&(0,s.a)("Property hide-label for inputs: Only use for exceptions like search inputs that are clearly identifiable by their context.")}}})}validateHint(t){(0,s.i)(this.component,"_hint",t)}validateId(t){(0,s.i)(this.component,"_id",t,{minLength:1}),""!==t&&void 0!==t||(0,s.j)("A unique ID on the input fields is not strictly required, but it might be relevant for E2E tests.")}validateLabel(t){(0,l.a)(this.component,t,{required:!0})}validateMsg(t){((t,e)=>{(0,s.o)(e,(()=>{try{e=(0,s.p)(e)}catch(t){}(0,s.w)(t,"_msg",(t=>(0,c.a)(t)&&"string"==typeof(null==t?void 0:t._description)),new Set(["MsgPropType"]),e,{defaultValue:{_description:"",_type:"error"}})}))})(this.component,t)}validateOn(t){"object"==typeof t&&(0,s.s)(this.component,"_on",t)}validateShortKey(t){(0,a.b)(this.component,t),(0,a.a)(this.component._accessKey,t)}validateSmartButton(t){(0,s.o)(t,(()=>{try{t=(0,s.p)(t)}catch(t){}(0,s.s)(this.component,"_smartButton",t)}))}validateTabIndex(t){(0,a.c)(this.component,t)}componentWillLoad(){super.componentWillLoad(),this.validateAccessKey(this.component._accessKey),this.validateAdjustHeight(this.component._adjustHeight),this.validateError(this.component._error),this.component._msg&&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.validateShortKey(this.component._shortKey),this.validateSmartButton(this.component._smartButton),this.validateOn(this.component._on),this.validateTabIndex(this.component._tabIndex),(0,a.a)(this.component._accessKey,this.component._shortKey)}onBlur(t){var e;this.component._touched=!0,(0,n.s)(t),(0,n.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,e){var o;e=null!=e?e:t.target.value,(0,n.t)("change",this.host,e),"function"==typeof(null===(o=this.component._on)||void 0===o?void 0:o.onChange)&&this.component._on.onChange(t,e),this.valueChangeListeners.forEach((t=>t(e)))}onInput(t,e=!0,o){var i;o=null!=o?o:t.target.value,(0,n.s)(t),(0,n.t)("input",this.host,o),e&&this.setFormAssociatedValue(o),"function"==typeof(null===(i=this.component._on)||void 0===i?void 0:i.onInput)&&this.component._on.onInput(t,o)}onClick(t){var e;(0,n.s)(t),(0,n.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;(0,n.s)(t),(0,n.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)}}},4219:(t,e,o)=>{o.d(e,{i:()=>r,n:()=>c,r:()=>l});var n=o(254),i=o(7177),s=o(5838);const a=()=>{let t=(0,s.d)().KoliBri;return void 0===t&&(t={},Object.defineProperty((0,s.d)(),"KoliBri",{value:t,writable:!1})),t},r=()=>{(()=>{const t=(0,s.g)().querySelector('meta[name="kolibri"]');if(t&&t.hasAttribute("content")){const e=t.getAttribute("content");"string"==typeof e&&((0,s.s)(e.includes("dev-mode=true")),(0,s.b)(e.includes("experimental-mode=true")),(0,s.c)(e.includes("color-contrast-analysis=true")))}})(),s.L.debug(`\n,--. ,--. ,--. ,--. ,-----. ,--.\n| .' / ,---. | | \`--' | |) /_ ,--.--. \`--'\n| . ' | .-. | | | ,--. | .-. \\ | .--' ,--.\n| |\\ \\ | '-' | | | | | | '--' / | | | |\n\`--' \`--´ \`---´ \`--' \`--' \`------´ \`--' \`--'\n🚹 The accessible HTML-Standard | 👉 https://public-ui.github.io | ${n.E.kolibriVersion}\n\t`,{forceLog:!0})},l=()=>{!0!==a().adviceShown&&(Object.defineProperty(a(),"adviceShown",{get:function(){return!0}}),s.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 c=()=>Math.floor(16777215*Math.random()).toString(16);"test"===i.p&&(c=()=>"nonce")},4323:(t,e,o)=>{o.d(e,{v:()=>i});var n=o(9357);const i=(t,e)=>{(0,n.v)(t,"_tooltipAlign",e)}},6692:(t,e,o)=>{o.d(e,{a:()=>l,b:()=>r,c:()=>a,v:()=>i});var n=o(2741);const i=(t,e)=>{(0,n.i)(t,"_accessKey",e)},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,n.k)(t,"_tabIndex",e,s)},r=(t,e)=>{(0,n.i)(t,"_shortKey",e)},l=(t,e)=>{if(t&&e)throw new Error("AccessKey and ShortKey are used. Only one is allowed.")}},7177:(t,e,o)=>{o.d(e,{b:()=>a,h:()=>i,p:()=>n,s:()=>s});let n="development";try{n="production"}catch(t){n="production"}const i=(t,e,o)=>{if(t&&e&&"string"==typeof o){const n=t.querySelector(`[slot="${o}"]`);n&&e.appendChild(n)}},s=t=>""===t,a=(t,e)=>t||e||""},7185:(t,e,o)=>{o.d(e,{I:()=>i});var n=o(254);const i=({badgeText:t,label:e})=>{const o=t;let[i,...s]=e.split(o);return 0===s.length&&(t=o.toUpperCase(),[i,...s]=e.split(o)),0===s.length&&(t=o.toLowerCase(),[i,...s]=e.split(o)),(0,n.h)(n.F,null,i,s.length?(0,n.h)(n.F,null,(0,n.h)("u",null,t),s.join(o)):null)}},7257:(t,e,o)=>{o.d(e,{S:()=>a,a:()=>n,b:()=>s,i:()=>i});const n=t=>"object"==typeof t&&null!==t,i=(t,e=0)=>"string"==typeof t&&t.length>=e,s=t=>{if("object"!=typeof t||null===t)return i(t,1);for(const e in t)if(!1===i(e,1))return!1;return!0},a=new Event("StateChange")},7350:(t,e,o)=>{o.d(e,{v:()=>i});var n=o(2741);const i=(t,e,o={})=>{(0,n.b)(t,"_hideLabel",e,o)}},8445:(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})},8715:(t,e,o)=>{o.d(e,{A:()=>s});var n=o(5838),i=o(2741);class s{constructor(t,e,o){var s,a,r,l;if(this.experimentalMode=(0,n.a)(),this.setFormAssociatedValue=t=>{var e;const o=null===(e=this.formAssociated)||void 0===e?void 0:e.getAttribute("name");null!==o&&""!==o||(0,i.j)(` The form field (${this.type}) 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.type=e,this.experimentalMode&&("KOL-BUTTON"===(l=null===(s=this.host)||void 0===s?void 0:s.tagName)||"KOL-COMBOBOX"===l||"KOL-INPUT-CHECKBOX"===l||"KOL-INPUT-COLOR"===l||"KOL-INPUT-DATE"===l||"KOL-INPUT-EMAIL"===l||"KOL-INPUT-FILE"===l||"KOL-INPUT-NUMBER"===l||"KOL-INPUT-PASSWORD"===l||"KOL-INPUT-RADIO"===l||"KOL-INPUT-RANGE"===l||"KOL-INPUT-TEXT"===l||"KOL-SELECT"===l||"KOL-SINGLE-SELECT"===l||"KOL-TEXTAREA"===l)&&t._name){switch(null===(a=this.host)||void 0===a||a.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("data-form-associated",""),this.formAssociated.setAttribute("hidden",""),null===(r=this.host)||void 0===r||r.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,i.l)(`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;case"radio":"string"==typeof e&&(o.setAttribute("value",e),o.setAttribute("checked",""),o.value=e);break;default:"string"==typeof e?(o.setAttribute("value",e),o.value=e):(o.removeAttribute("value"),o.value="")}}validateName(t){((t,e,o)=>{(0,i.i)(t,"_name",e,o)})(this.component,t,{hooks:{afterPatch:()=>{this.setAttribute("name",this.formAssociated,this.component.state._name)}}}),void 0===t&&(0,i.j)("A name on input fields or switches is not strictly required, but it might be relevant for the autocomplete function and for the static submission of the input field.")}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)}}},9027:(t,e,o)=>{o.d(e,{a:()=>d,b:()=>r,c:()=>l,h:()=>i,v:()=>h});var n=o(2741);const i=[0,1,2,3,4,5,6],s=/[a-zA-Z0-9äöüÄÖÜß]/g,a=/^\d+$/;function r(t,e=1){return function(t){var e;return"string"==typeof t&&(null===(e=t.match(s))||void 0===e?void 0:e.length)||0}(t)>=e}function l(t){return a.test(t)}const c=new Set(["string"]),h=(t,e,o={})=>{(0,n.w)(t,"_label",(t=>"string"==typeof t),c,e,function(t){var e;return Object.assign(Object.assign({},t),{hooks:{afterPatch:(e,o,i,s)=>{var a,c;"function"==typeof(null===(a=t.hooks)||void 0===a?void 0:a.afterPatch)&&(null===(c=t.hooks)||void 0===c||c.afterPatch(e,o,i,s)),"string"==typeof e&&!1===r(e,3)&&!1===l(e)&&(0,n.a)(`The heading or label ("${e}") is not accessible. A label should consist of at least three readable characters.`),"string"==typeof e&&e.length>80&&(0,n.u)("A heading or label should not be longer than 80 characters.")},beforePatch:null===(e=t.hooks)||void 0===e?void 0:e.beforePatch}})}(o))},d=h},9357:(t,e,o)=>{o.d(e,{a:()=>a,v:()=>i});var n=o(2741);const i=(t,e,o)=>{(0,n.w)(t,e,(t=>"string"==typeof t&&s.includes(t)),new Set(s),o,{defaultValue:"top"})},s=["left","right","top","bottom"],a=(t,e)=>{i(t,"_align",e)}}}]);