@public-ui/sample-react 3.0.0-rc.8 → 3.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/dist/1006.js +1 -1
- package/dist/1752.js +1 -1
- package/dist/1932.js +1 -1
- package/dist/2069.js +1 -1
- package/dist/2212.js +1 -1
- package/dist/2231.js +1 -1
- package/dist/2321.js +1 -1
- package/dist/2596.js +1 -1
- package/dist/2827.js +1 -1
- package/dist/2894.js +1 -1
- package/dist/3099.js +1 -1
- package/dist/3151.js +1 -1
- package/dist/3203.js +1 -1
- package/dist/3540.js +1 -1
- package/dist/373.js +1 -1
- package/dist/3874.js +2 -0
- package/dist/3918.js +1 -1
- package/dist/3920.js +1 -1
- package/dist/4030.js +1 -1
- package/dist/4048.js +1 -1
- package/dist/4201.js +1 -1
- package/dist/4389.js +2 -0
- package/dist/4587.js +1 -1
- package/dist/4611.js +1 -1
- package/dist/4641.js +1 -1
- package/dist/4694.js +2 -0
- package/dist/4876.js +1 -1
- package/dist/5249.js +1 -1
- package/dist/5301.js +1 -1
- package/dist/5690.js +1 -1
- package/dist/5746.js +1 -1
- package/dist/6047.js +1 -1
- package/dist/6066.js +1 -1
- package/dist/6256.js +1 -1
- package/dist/6304.js +1 -1
- package/dist/6781.js +1 -1
- package/dist/6790.js +1 -1
- package/dist/6984.js +1 -1
- package/dist/7013.js +1 -1
- package/dist/7178.js +1 -1
- package/dist/7347.js +1 -1
- package/dist/7444.js +1 -1
- package/dist/7533.js +1 -1
- package/dist/7535.js +1 -1
- package/dist/775.js +1 -1
- package/dist/8065.js +2 -0
- package/dist/808.js +2 -0
- package/dist/8137.js +1 -1
- package/dist/8180.js +1 -1
- package/dist/8192.js +1 -1
- package/dist/8246.js +1 -2
- package/dist/833.js +1 -1
- package/dist/8378.js +1 -1
- package/dist/8605.js +1 -1
- package/dist/8625.js +1 -1
- package/dist/8948.js +2 -0
- package/dist/907.js +1 -1
- package/dist/9108.js +1 -1
- package/dist/9255.js +1 -1
- package/dist/9322.js +1 -1
- package/dist/9374.js +2 -0
- package/dist/9581.js +1 -1
- package/dist/9719.js +1 -1
- package/dist/9731.js +1 -1
- package/dist/9930.js +1 -1
- package/dist/9938.js +1 -1
- package/dist/assets/README.md +1 -0
- package/dist/assets/fontawesome-free/LICENSE.txt +165 -0
- package/dist/assets/fontawesome-free/css/all.css +7831 -0
- package/dist/assets/fontawesome-free/css/all.min.css +6 -0
- package/dist/assets/fontawesome-free/css/brands.css +1432 -0
- package/dist/assets/fontawesome-free/css/brands.min.css +6 -0
- package/dist/assets/fontawesome-free/css/fontawesome.css +6338 -0
- package/dist/assets/fontawesome-free/css/fontawesome.min.css +6 -0
- package/dist/assets/fontawesome-free/css/regular.css +19 -0
- package/dist/assets/fontawesome-free/css/regular.min.css +6 -0
- package/dist/assets/fontawesome-free/css/solid.css +19 -0
- package/dist/assets/fontawesome-free/css/solid.min.css +6 -0
- package/dist/assets/fontawesome-free/css/svg-with-js.css +634 -0
- package/dist/assets/fontawesome-free/css/svg-with-js.min.css +6 -0
- package/dist/assets/fontawesome-free/css/v4-font-face.css +26 -0
- package/dist/assets/fontawesome-free/css/v4-font-face.min.css +6 -0
- package/dist/assets/fontawesome-free/css/v4-shims.css +2146 -0
- package/dist/assets/fontawesome-free/css/v4-shims.min.css +6 -0
- package/dist/assets/fontawesome-free/css/v5-font-face.css +22 -0
- package/dist/assets/fontawesome-free/css/v5-font-face.min.css +6 -0
- package/dist/assets/fontawesome-free/webfonts/fa-brands-400.ttf +0 -0
- package/dist/assets/fontawesome-free/webfonts/fa-brands-400.woff2 +0 -0
- package/dist/assets/fontawesome-free/webfonts/fa-regular-400.ttf +0 -0
- package/dist/assets/fontawesome-free/webfonts/fa-regular-400.woff2 +0 -0
- package/dist/assets/fontawesome-free/webfonts/fa-solid-900.ttf +0 -0
- package/dist/assets/fontawesome-free/webfonts/fa-solid-900.woff2 +0 -0
- package/dist/assets/fontawesome-free/webfonts/fa-v4compatibility.ttf +0 -0
- package/dist/assets/fontawesome-free/webfonts/fa-v4compatibility.woff2 +0 -0
- package/dist/assets/icofont/demo.html +18939 -0
- package/dist/assets/icofont/fonts/icofont.eot +0 -0
- package/dist/assets/icofont/fonts/icofont.svg +2105 -0
- package/dist/assets/icofont/fonts/icofont.ttf +0 -0
- package/dist/assets/icofont/fonts/icofont.woff +0 -0
- package/dist/assets/icofont/fonts/icofont.woff2 +0 -0
- package/dist/assets/icofont/icofont.css +10757 -0
- package/dist/assets/icofont/icofont.min.css +7 -0
- package/dist/assets/kreon/Kreon-VariableFont_wght.ttf +0 -0
- package/dist/assets/kreon/OFL.txt +93 -0
- package/dist/assets/kreon/README.txt +67 -0
- package/dist/assets/kreon/static/Kreon-Bold.ttf +0 -0
- package/dist/assets/kreon/static/Kreon-Light.ttf +0 -0
- package/dist/assets/kreon/static/Kreon-Medium.ttf +0 -0
- package/dist/assets/kreon/static/Kreon-Regular.ttf +0 -0
- package/dist/assets/kreon/static/Kreon-SemiBold.ttf +0 -0
- package/dist/assets/kreon/style.css +41 -0
- package/dist/assets/material-icons/LICENSE +202 -0
- package/dist/assets/material-icons/README.md +129 -0
- package/dist/assets/material-icons/_data/versions.json +2124 -0
- package/dist/assets/material-icons/css/_codepoints.scss +2279 -0
- package/dist/assets/material-icons/css/_mixins.scss +13 -0
- package/dist/assets/material-icons/css/_variables.scss +6 -0
- package/dist/assets/material-icons/css/material-icons.css +9208 -0
- package/dist/assets/material-icons/css/material-icons.min.css +1 -0
- package/dist/assets/material-icons/css/material-icons.scss +33 -0
- package/dist/assets/material-icons/iconfont/_mixins.scss +55 -0
- package/dist/assets/material-icons/iconfont/_variables.scss +3 -0
- package/dist/assets/material-icons/iconfont/filled.css +24 -0
- package/dist/assets/material-icons/iconfont/filled.scss +4 -0
- package/dist/assets/material-icons/iconfont/material-icons-outlined.woff +0 -0
- package/dist/assets/material-icons/iconfont/material-icons-outlined.woff2 +0 -0
- package/dist/assets/material-icons/iconfont/material-icons-round.woff +0 -0
- package/dist/assets/material-icons/iconfont/material-icons-round.woff2 +0 -0
- package/dist/assets/material-icons/iconfont/material-icons-sharp.woff +0 -0
- package/dist/assets/material-icons/iconfont/material-icons-sharp.woff2 +0 -0
- package/dist/assets/material-icons/iconfont/material-icons-two-tone.woff +0 -0
- package/dist/assets/material-icons/iconfont/material-icons-two-tone.woff2 +0 -0
- package/dist/assets/material-icons/iconfont/material-icons.css +124 -0
- package/dist/assets/material-icons/iconfont/material-icons.scss +5 -0
- package/dist/assets/material-icons/iconfont/material-icons.woff +0 -0
- package/dist/assets/material-icons/iconfont/material-icons.woff2 +0 -0
- package/dist/assets/material-icons/iconfont/outlined.css +24 -0
- package/dist/assets/material-icons/iconfont/outlined.scss +4 -0
- package/dist/assets/material-icons/iconfont/round.css +24 -0
- package/dist/assets/material-icons/iconfont/round.scss +4 -0
- package/dist/assets/material-icons/iconfont/sharp.css +24 -0
- package/dist/assets/material-icons/iconfont/sharp.scss +4 -0
- package/dist/assets/material-icons/iconfont/two-tone.css +24 -0
- package/dist/assets/material-icons/iconfont/two-tone.scss +4 -0
- package/dist/assets/material-icons/index.d.ts +2128 -0
- package/dist/assets/material-icons/package.json +52 -0
- package/dist/assets/material-symbols/LICENSE +202 -0
- package/dist/assets/material-symbols/README.md +114 -0
- package/dist/assets/material-symbols/_core.scss +46 -0
- package/dist/assets/material-symbols/index.css +74 -0
- package/dist/assets/material-symbols/index.d.ts +2809 -0
- package/dist/assets/material-symbols/index.scss +3 -0
- package/dist/assets/material-symbols/material-symbols-outlined.woff2 +0 -0
- package/dist/assets/material-symbols/material-symbols-rounded.woff2 +0 -0
- package/dist/assets/material-symbols/material-symbols-sharp.woff2 +0 -0
- package/dist/assets/material-symbols/outlined.css +24 -0
- package/dist/assets/material-symbols/outlined.scss +3 -0
- package/dist/assets/material-symbols/package.json +41 -0
- package/dist/assets/material-symbols/rounded.css +24 -0
- package/dist/assets/material-symbols/rounded.scss +3 -0
- package/dist/assets/material-symbols/sharp.css +24 -0
- package/dist/assets/material-symbols/sharp.scss +3 -0
- package/dist/assets/noto-sans/fonts/NotoSans-Black.ttf +0 -0
- package/dist/assets/noto-sans/fonts/NotoSans-BlackItalic.ttf +0 -0
- package/dist/assets/noto-sans/fonts/NotoSans-Bold.ttf +0 -0
- package/dist/assets/noto-sans/fonts/NotoSans-BoldItalic.ttf +0 -0
- package/dist/assets/noto-sans/fonts/NotoSans-ExtraBold.ttf +0 -0
- package/dist/assets/noto-sans/fonts/NotoSans-ExtraBoldItalic.ttf +0 -0
- package/dist/assets/noto-sans/fonts/NotoSans-ExtraLight.ttf +0 -0
- package/dist/assets/noto-sans/fonts/NotoSans-ExtraLightItalic.ttf +0 -0
- package/dist/assets/noto-sans/fonts/NotoSans-Italic.ttf +0 -0
- package/dist/assets/noto-sans/fonts/NotoSans-Light.ttf +0 -0
- package/dist/assets/noto-sans/fonts/NotoSans-LightItalic.ttf +0 -0
- package/dist/assets/noto-sans/fonts/NotoSans-Medium.ttf +0 -0
- package/dist/assets/noto-sans/fonts/NotoSans-MediumItalic.ttf +0 -0
- package/dist/assets/noto-sans/fonts/NotoSans-Regular.ttf +0 -0
- package/dist/assets/noto-sans/fonts/NotoSans-SemiBold.ttf +0 -0
- package/dist/assets/noto-sans/fonts/NotoSans-SemiBoldItalic.ttf +0 -0
- package/dist/assets/noto-sans/fonts/NotoSans-Thin.ttf +0 -0
- package/dist/assets/noto-sans/fonts/NotoSans-ThinItalic.ttf +0 -0
- package/dist/assets/noto-sans/fonts/OFL.txt +93 -0
- package/dist/assets/noto-sans/noto-sans.css +11 -0
- package/dist/assets/roboto/LICENSE.txt +202 -0
- package/dist/assets/roboto/Roboto-Black.ttf +0 -0
- package/dist/assets/roboto/Roboto-BlackItalic.ttf +0 -0
- package/dist/assets/roboto/Roboto-Bold.ttf +0 -0
- package/dist/assets/roboto/Roboto-BoldItalic.ttf +0 -0
- package/dist/assets/roboto/Roboto-Italic.ttf +0 -0
- package/dist/assets/roboto/Roboto-Light.ttf +0 -0
- package/dist/assets/roboto/Roboto-LightItalic.ttf +0 -0
- package/dist/assets/roboto/Roboto-Medium.ttf +0 -0
- package/dist/assets/roboto/Roboto-MediumItalic.ttf +0 -0
- package/dist/assets/roboto/Roboto-Regular.ttf +0 -0
- package/dist/assets/roboto/Roboto-Thin.ttf +0 -0
- package/dist/assets/roboto/Roboto-ThinItalic.ttf +0 -0
- package/dist/assets/roboto/roboto.css +27 -0
- package/dist/assets/tabler-icons/fonts/tabler-icons.eot +0 -0
- package/dist/assets/tabler-icons/fonts/tabler-icons.ttf +0 -0
- package/dist/assets/tabler-icons/fonts/tabler-icons.woff +0 -0
- package/dist/assets/tabler-icons/fonts/tabler-icons.woff2 +0 -0
- package/dist/assets/tabler-icons/tabler-icons.css +16056 -0
- package/dist/assets/tabler-icons/tabler-icons.html +36226 -0
- package/dist/assets/tabler-icons/tabler-icons.min.css +4 -0
- package/dist/assets/tabler-icons/tabler-icons.png +0 -0
- package/dist/assets/tabler-icons/tabler-icons.scss +8058 -0
- package/dist/index.html +10 -0
- package/dist/main.js +1 -1
- package/package.json +8 -10
- package/public/assets/README.md +1 -0
- package/public/assets/fontawesome-free/LICENSE.txt +165 -0
- package/public/assets/fontawesome-free/css/all.css +7831 -0
- package/public/assets/fontawesome-free/css/all.min.css +6 -0
- package/public/assets/fontawesome-free/css/brands.css +1432 -0
- package/public/assets/fontawesome-free/css/brands.min.css +6 -0
- package/public/assets/fontawesome-free/css/fontawesome.css +6338 -0
- package/public/assets/fontawesome-free/css/fontawesome.min.css +6 -0
- package/public/assets/fontawesome-free/css/regular.css +19 -0
- package/public/assets/fontawesome-free/css/regular.min.css +6 -0
- package/public/assets/fontawesome-free/css/solid.css +19 -0
- package/public/assets/fontawesome-free/css/solid.min.css +6 -0
- package/public/assets/fontawesome-free/css/svg-with-js.css +634 -0
- package/public/assets/fontawesome-free/css/svg-with-js.min.css +6 -0
- package/public/assets/fontawesome-free/css/v4-font-face.css +26 -0
- package/public/assets/fontawesome-free/css/v4-font-face.min.css +6 -0
- package/public/assets/fontawesome-free/css/v4-shims.css +2146 -0
- package/public/assets/fontawesome-free/css/v4-shims.min.css +6 -0
- package/public/assets/fontawesome-free/css/v5-font-face.css +22 -0
- package/public/assets/fontawesome-free/css/v5-font-face.min.css +6 -0
- package/public/assets/fontawesome-free/webfonts/fa-brands-400.ttf +0 -0
- package/public/assets/fontawesome-free/webfonts/fa-brands-400.woff2 +0 -0
- package/public/assets/fontawesome-free/webfonts/fa-regular-400.ttf +0 -0
- package/public/assets/fontawesome-free/webfonts/fa-regular-400.woff2 +0 -0
- package/public/assets/fontawesome-free/webfonts/fa-solid-900.ttf +0 -0
- package/public/assets/fontawesome-free/webfonts/fa-solid-900.woff2 +0 -0
- package/public/assets/fontawesome-free/webfonts/fa-v4compatibility.ttf +0 -0
- package/public/assets/fontawesome-free/webfonts/fa-v4compatibility.woff2 +0 -0
- package/public/assets/icofont/demo.html +18939 -0
- package/public/assets/icofont/fonts/icofont.eot +0 -0
- package/public/assets/icofont/fonts/icofont.svg +2105 -0
- package/public/assets/icofont/fonts/icofont.ttf +0 -0
- package/public/assets/icofont/fonts/icofont.woff +0 -0
- package/public/assets/icofont/fonts/icofont.woff2 +0 -0
- package/public/assets/icofont/icofont.css +10757 -0
- package/public/assets/icofont/icofont.min.css +7 -0
- package/public/assets/kreon/Kreon-VariableFont_wght.ttf +0 -0
- package/public/assets/kreon/OFL.txt +93 -0
- package/public/assets/kreon/README.txt +67 -0
- package/public/assets/kreon/static/Kreon-Bold.ttf +0 -0
- package/public/assets/kreon/static/Kreon-Light.ttf +0 -0
- package/public/assets/kreon/static/Kreon-Medium.ttf +0 -0
- package/public/assets/kreon/static/Kreon-Regular.ttf +0 -0
- package/public/assets/kreon/static/Kreon-SemiBold.ttf +0 -0
- package/public/assets/kreon/style.css +41 -0
- package/public/assets/material-icons/LICENSE +202 -0
- package/public/assets/material-icons/README.md +129 -0
- package/public/assets/material-icons/_data/versions.json +2124 -0
- package/public/assets/material-icons/css/_codepoints.scss +2279 -0
- package/public/assets/material-icons/css/_mixins.scss +13 -0
- package/public/assets/material-icons/css/_variables.scss +6 -0
- package/public/assets/material-icons/css/material-icons.css +9208 -0
- package/public/assets/material-icons/css/material-icons.min.css +1 -0
- package/public/assets/material-icons/css/material-icons.scss +33 -0
- package/public/assets/material-icons/iconfont/_mixins.scss +55 -0
- package/public/assets/material-icons/iconfont/_variables.scss +3 -0
- package/public/assets/material-icons/iconfont/filled.css +24 -0
- package/public/assets/material-icons/iconfont/filled.scss +4 -0
- package/public/assets/material-icons/iconfont/material-icons-outlined.woff +0 -0
- package/public/assets/material-icons/iconfont/material-icons-outlined.woff2 +0 -0
- package/public/assets/material-icons/iconfont/material-icons-round.woff +0 -0
- package/public/assets/material-icons/iconfont/material-icons-round.woff2 +0 -0
- package/public/assets/material-icons/iconfont/material-icons-sharp.woff +0 -0
- package/public/assets/material-icons/iconfont/material-icons-sharp.woff2 +0 -0
- package/public/assets/material-icons/iconfont/material-icons-two-tone.woff +0 -0
- package/public/assets/material-icons/iconfont/material-icons-two-tone.woff2 +0 -0
- package/public/assets/material-icons/iconfont/material-icons.css +124 -0
- package/public/assets/material-icons/iconfont/material-icons.scss +5 -0
- package/public/assets/material-icons/iconfont/material-icons.woff +0 -0
- package/public/assets/material-icons/iconfont/material-icons.woff2 +0 -0
- package/public/assets/material-icons/iconfont/outlined.css +24 -0
- package/public/assets/material-icons/iconfont/outlined.scss +4 -0
- package/public/assets/material-icons/iconfont/round.css +24 -0
- package/public/assets/material-icons/iconfont/round.scss +4 -0
- package/public/assets/material-icons/iconfont/sharp.css +24 -0
- package/public/assets/material-icons/iconfont/sharp.scss +4 -0
- package/public/assets/material-icons/iconfont/two-tone.css +24 -0
- package/public/assets/material-icons/iconfont/two-tone.scss +4 -0
- package/public/assets/material-icons/index.d.ts +2128 -0
- package/public/assets/material-icons/package.json +52 -0
- package/public/assets/material-symbols/LICENSE +202 -0
- package/public/assets/material-symbols/README.md +114 -0
- package/public/assets/material-symbols/_core.scss +46 -0
- package/public/assets/material-symbols/index.css +74 -0
- package/public/assets/material-symbols/index.d.ts +2809 -0
- package/public/assets/material-symbols/index.scss +3 -0
- package/public/assets/material-symbols/material-symbols-outlined.woff2 +0 -0
- package/public/assets/material-symbols/material-symbols-rounded.woff2 +0 -0
- package/public/assets/material-symbols/material-symbols-sharp.woff2 +0 -0
- package/public/assets/material-symbols/outlined.css +24 -0
- package/public/assets/material-symbols/outlined.scss +3 -0
- package/public/assets/material-symbols/package.json +41 -0
- package/public/assets/material-symbols/rounded.css +24 -0
- package/public/assets/material-symbols/rounded.scss +3 -0
- package/public/assets/material-symbols/sharp.css +24 -0
- package/public/assets/material-symbols/sharp.scss +3 -0
- package/public/assets/noto-sans/fonts/NotoSans-Black.ttf +0 -0
- package/public/assets/noto-sans/fonts/NotoSans-BlackItalic.ttf +0 -0
- package/public/assets/noto-sans/fonts/NotoSans-Bold.ttf +0 -0
- package/public/assets/noto-sans/fonts/NotoSans-BoldItalic.ttf +0 -0
- package/public/assets/noto-sans/fonts/NotoSans-ExtraBold.ttf +0 -0
- package/public/assets/noto-sans/fonts/NotoSans-ExtraBoldItalic.ttf +0 -0
- package/public/assets/noto-sans/fonts/NotoSans-ExtraLight.ttf +0 -0
- package/public/assets/noto-sans/fonts/NotoSans-ExtraLightItalic.ttf +0 -0
- package/public/assets/noto-sans/fonts/NotoSans-Italic.ttf +0 -0
- package/public/assets/noto-sans/fonts/NotoSans-Light.ttf +0 -0
- package/public/assets/noto-sans/fonts/NotoSans-LightItalic.ttf +0 -0
- package/public/assets/noto-sans/fonts/NotoSans-Medium.ttf +0 -0
- package/public/assets/noto-sans/fonts/NotoSans-MediumItalic.ttf +0 -0
- package/public/assets/noto-sans/fonts/NotoSans-Regular.ttf +0 -0
- package/public/assets/noto-sans/fonts/NotoSans-SemiBold.ttf +0 -0
- package/public/assets/noto-sans/fonts/NotoSans-SemiBoldItalic.ttf +0 -0
- package/public/assets/noto-sans/fonts/NotoSans-Thin.ttf +0 -0
- package/public/assets/noto-sans/fonts/NotoSans-ThinItalic.ttf +0 -0
- package/public/assets/noto-sans/fonts/OFL.txt +93 -0
- package/public/assets/noto-sans/noto-sans.css +11 -0
- package/public/assets/roboto/LICENSE.txt +202 -0
- package/public/assets/roboto/Roboto-Black.ttf +0 -0
- package/public/assets/roboto/Roboto-BlackItalic.ttf +0 -0
- package/public/assets/roboto/Roboto-Bold.ttf +0 -0
- package/public/assets/roboto/Roboto-BoldItalic.ttf +0 -0
- package/public/assets/roboto/Roboto-Italic.ttf +0 -0
- package/public/assets/roboto/Roboto-Light.ttf +0 -0
- package/public/assets/roboto/Roboto-LightItalic.ttf +0 -0
- package/public/assets/roboto/Roboto-Medium.ttf +0 -0
- package/public/assets/roboto/Roboto-MediumItalic.ttf +0 -0
- package/public/assets/roboto/Roboto-Regular.ttf +0 -0
- package/public/assets/roboto/Roboto-Thin.ttf +0 -0
- package/public/assets/roboto/Roboto-ThinItalic.ttf +0 -0
- package/public/assets/roboto/roboto.css +27 -0
- package/public/assets/tabler-icons/fonts/tabler-icons.eot +0 -0
- package/public/assets/tabler-icons/fonts/tabler-icons.ttf +0 -0
- package/public/assets/tabler-icons/fonts/tabler-icons.woff +0 -0
- package/public/assets/tabler-icons/fonts/tabler-icons.woff2 +0 -0
- package/public/assets/tabler-icons/tabler-icons.css +16056 -0
- package/public/assets/tabler-icons/tabler-icons.html +36226 -0
- package/public/assets/tabler-icons/tabler-icons.min.css +4 -0
- package/public/assets/tabler-icons/tabler-icons.png +0 -0
- package/public/assets/tabler-icons/tabler-icons.scss +8058 -0
- package/public/index.html +10 -0
- package/src/components/button/partials/cases.tsx +2 -2
- package/src/components/input-text/smart-button.tsx +40 -24
- package/src/components/select/partials/cases.tsx +2 -1
- package/src/components/single-select/partials/cases.tsx +1 -0
- package/src/react.main.tsx +1 -0
- package/src/scenarios/inputs-get-value.tsx +9 -4
- package/src/scenarios/performance-test.tsx +27 -0
- package/src/scenarios/routes.ts +7 -3
- package/src/scenarios/same-height-of-all-interactive-elements.tsx +62 -0
- package/dist/3022.js +0 -2
- package/dist/4776.js +0 -2
- package/dist/5359.js +0 -2
- package/dist/740.js +0 -2
- package/dist/8786.js +0 -2
- package/dist/8840.js +0 -2
- package/dist/9907.js +0 -2
- package/dist/9907.js.LICENSE.txt +0 -3
- /package/dist/{3022.js.LICENSE.txt → 3874.js.LICENSE.txt} +0 -0
- /package/dist/{4776.js.LICENSE.txt → 4389.js.LICENSE.txt} +0 -0
- /package/dist/{5359.js.LICENSE.txt → 4694.js.LICENSE.txt} +0 -0
- /package/dist/{740.js.LICENSE.txt → 8065.js.LICENSE.txt} +0 -0
- /package/dist/{8246.js.LICENSE.txt → 808.js.LICENSE.txt} +0 -0
- /package/dist/{8786.js.LICENSE.txt → 8948.js.LICENSE.txt} +0 -0
- /package/dist/{8840.js.LICENSE.txt → 9374.js.LICENSE.txt} +0 -0
package/dist/6781.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see 6781.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunk_public_ui_sample_react=self.webpackChunk_public_ui_sample_react||[]).push([[6781],{114:(t,n,e)=>{e.d(n,{I:()=>w,K:()=>y,a:()=>f});var o=e(7386),i=e(7622),a=e(1476),s=e(1111),l=e(7763),r=e(4451),c=e(8045),d=e(6171),u=e(9688),h=e(3892),p=e(7125);const m=(t,n)=>{var{position:e="start",class:i}=t,a=(0,s._)(t,["position","class"]);const l="kol-input-container__adornment",r=`${l}--${e}`;return(0,o.h)("div",Object.assign({class:(0,c.c)(l,r,i)},a),n)};function b(t){return!!t&&(Array.isArray(t)?t.length>0:Boolean(t))}const _=(t,n)=>{var{class:e}=t,i=(0,s._)(t,["class"]);return(0,o.h)("div",Object.assign({class:(0,c.c)("kol-input-container__container",e)},i),n)},g=(t,n)=>{const{class:e,startAdornment:i,endAdornment:a,disabled:l,msg:r,touched:u,containerProps:h,startAdornmentProps:p,endAdornmentProps:g}=t,v=(0,s._)(t,["class","startAdornment","endAdornment","disabled","msg","touched","containerProps","startAdornmentProps","endAdornmentProps"]),f=(0,d.c)(r,u),y={"kol-input-container--disabled":l,[`kol-input-container--${(null==r?void 0:r.type)||"error"}`]:f},k=Object.assign({class:(0,c.c)("kol-input-container",y,e)},v);return b(i)||b(a)?(0,o.h)("div",Object.assign({},k),(0,o.h)(m,Object.assign({},p,{position:"start"}),i),(0,o.h)(_,Object.assign({},h),n),(0,o.h)(m,Object.assign({},g,{position:"end"}),a)):(0,o.h)("div",Object.assign({},k),(0,o.h)(_,Object.assign({},h),n))},v=t=>{const{label:n,icons:e,hideLabel:i,disabled:a,onClick:r}=t,c=(0,s._)(t,["label","icons","hideLabel","disabled","onClick"]);return(0,o.h)(l.a,Object.assign({_label:n,_disabled:a,_icons:e,_hideLabel:i,_on:{onClick:r}},c))},f=t=>{const{componentName:n="button",label:e,icon:i,onClick:a}=t,l=(0,s._)(t,["componentName","label","icon","onClick"]),c="button"===n?v:r.K;return(0,o.h)(c,Object.assign({label:e||"",hideLabel:!0,icons:`codicon codicon-${i}`,onClick:a},l))},y=({state:t,endAdornment:n},e)=>{const{icons:s,smartButton:l,disabled:r,msg:c,touched:u}=function(t){let n,e;return"_icons"in t&&(n=t._icons),"_smartButton"in t&&(e=t._smartButton),{icons:n,smartButton:e,disabled:t._disabled,msg:(0,d.a)(t._msg),touched:t._touched}}(t);let h=null==s?void 0:s.left;(0,i.i)(h)&&(h={icon:h});let p=null==s?void 0:s.right;(0,i.i)(p)&&(p={icon:p});const m=[],b=[];return n&&(Array.isArray(n)?b.push(...n):b.push(n)),h&&m.push((0,o.h)(f,Object.assign({componentName:"icon",class:"kol-input-container__icon"},(0,a.i)(h)?h:{}))),(0,a.i)(l)&&b.push((0,o.h)(f,Object.assign({componentName:"button",class:"kol-input-container__smart-button"},l,{hideLabel:!0,disabled:r}))),p&&b.push((0,o.h)(f,Object.assign({componentName:"icon",class:"kol-input-container__icon"},(0,a.i)(p)?p:{}))),(0,o.h)(g,{disabled:r,msg:c,touched:u,startAdornment:m,endAdornment:b},e)},k=(t,n)=>{const e=t;"object"==typeof e&&null!==e&&((0,p.i)(e.right,1)&&(e.right={icon:e.right}),(0,p.i)(e.left,1)&&(e.left={icon:e.left}),n.set("_icons",e))};class w extends d.I{constructor(t,n,e){super(t,n,e),this.component=t}validateIcons(t){(0,h.o)(t,(()=>{try{t=(0,h.p)(t)}catch(t){}(0,h.w)(this.component,"_icons",(t=>"object"==typeof t&&null!==t&&((0,p.i)(t.left,1)||(0,u.i)(t.left)||(0,p.i)(t.right,1)||(0,u.i)(t.right))),new Set(["KoliBriHorizontalIcon"]),t,{hooks:{beforePatch:k},required:!0})}))}componentWillLoad(){super.componentWillLoad(),this.validateIcons(this.component._icons)}}},131:(t,n,e)=>{e.d(n,{K:()=>l});var o=e(1111),i=e(7386),a=e(8045),s=e(6171);const l=t=>{const{class:n,msg:e,required:l,disabled:r,touched:c,readonly:d,ariaDescribedBy:u,hideLabel:h,label:p,suggestions:m,value:b}=t,_=(0,o._)(t,["class","msg","required","disabled","touched","readonly","ariaDescribedBy","hideLabel","label","suggestions","value"]),g=(0,s.c)(e,c),v={"kol-input--disabled":Boolean(r),"kol-input--required":Boolean(l),"kol-input--touched":Boolean(c),"kol-input--readonly":Boolean(d),[`kol-input--${(null==e?void 0:e.type)||"error"}`]:g},f=Object.assign(Object.assign({class:(0,a.c)("kol-input",v,n),required:l,disabled:r,readonly:d,type:"text",list:m?`${_.id}-list`:void 0},(0,s.f)({ariaDescribedBy:u,hideLabel:h,label:p})),_);return(0,i.h)(i.F,null,(0,i.h)("input",Object.assign({},f,{value:b})),m)}},1476:(t,n,e)=>{function o(t){var n=typeof t;return null!=t&&("object"==n||"function"==n)}e.d(n,{i:()=>o})},2878:(t,n,e)=>{e.d(n,{v:()=>i});var o=e(3892);const i=(t,n)=>{(0,o.g)(t,"_suggestions",(t=>"string"==typeof t||"number"==typeof t),n,void 0,{hooks:{afterPatch:t=>{Array.isArray(t)&&t.length&&(0,o.a)("Property suggestions: Options have accessibility issues in how browsers implemented them and should not be used for now.")}}})}},4451:(t,n,e)=>{e.d(n,{K:()=>a});var o=e(7386),i=e(7763);const a=t=>{const{class:n,style:e,icons:a,label:s,onClick:l}=t;return(0,o.h)(i.d,{class:n,style:e,onClick:l,_icons:a,_label:s})}},4640:(t,n,e)=>{e.d(n,{K:()=>r,a:()=>l});var o=e(1111),i=e(7386),a=e(6171),s=e(131);const l=t=>{var{id:n,suggestions:e}=t,a=(0,o._)(t,["id","suggestions"]);return e?(0,i.h)("datalist",Object.assign({id:`${n}-list`},a),e.map((t=>(0,i.h)("option",{value:t})))):null},r=t=>{var{state:n,customSuggestions:e}=t,r=(0,o._)(t,["state","customSuggestions"]);return(0,i.h)(s.K,Object.assign({},function(t,n){const{ariaDescribedBy:e}=(0,a.g)(t),o={id:t._id,hideLabel:t._hideLabel,label:t._label,accessKey:t._accessKey,disabled:t._disabled,name:t._name,ariaDescribedBy:e};return"_type"in t&&(o.type=t._type),"_value"in t&&(o.value=t._value),"_required"in t&&(o.required=t._required),"_maxLength"in t&&(o.maxlength=t._maxLength),"_placeholder"in t&&(o.placeholder=t._placeholder),"_autoComplete"in t&&(o.autoComplete=t._autoComplete),"_spellCheck"in t&&(o.spellcheck=t._spellCheck),"_pattern"in t&&(o.pattern=t._pattern),"_readOnly"in t&&(o.readonly=t._readOnly),"_min"in t&&(o.min=t._min),"_max"in t&&(o.max=t._max),"_step"in t&&(o.step=t._step),"_multiple"in t&&(o.multiple=t._multiple),"_checked"in t&&(o.checked=t._checked),"_indeterminate"in t&&(o.indeterminate=t._indeterminate),"_touched"in t&&(o.touched=t._touched),"_msg"in t&&(o.msg=(0,a.a)(t._msg)),"_suggestions"in t&&!n&&Array.isArray(t._suggestions)&&t._suggestions.length>0&&(o.suggestions=(0,i.h)(l,{id:t._id,suggestions:t._suggestions})),o}(n,e),r))}},6781:(t,n,e)=>{e.r(n),e.d(n,{kol_input_color:()=>m});var o=e(7386),i=e(1111),a=e(4208),s=e(114),l=e(2878),r=e(3892),c=e(4640),d=e(6171),u=(t,n,e)=>new Promise(((o,i)=>{var a=t=>{try{l(e.next(t))}catch(t){i(t)}},s=t=>{try{l(e.throw(t))}catch(t){i(t)}},l=t=>t.done?o(t.value):Promise.resolve(t.value).then(a,s);l((e=e.apply(t,n)).next())}));const h=["on","off"];class p extends s.I{constructor(t,n,e){super(t,n,e),this.component=t}validateAutoComplete(t){(0,r.w)(this.component,"_autoComplete",(t=>"string"==typeof t&&h.includes(t)),new Set(h),t)}validateSuggestions(t){(0,l.v)(this.component,t)}validateValue(t){(0,r.i)(this.component,"_value",t),this.setFormAssociatedValue(this.component.state._value)}componentWillLoad(){super.componentWillLoad(),this.validateAutoComplete(this.component._autoComplete),this.validateSuggestions(this.component._suggestions),this.validateValue(this.component._value)}}const m=class{getValue(){return u(this,null,(function*(){var t;return null===(t=this.refInputText)||void 0===t?void 0:t.value}))}kolFocus(){return u(this,null,(function*(){var t;null===(t=this.refInputText)||void 0===t||t.focus()}))}get hasSuggestions(){return Array.isArray(this.state._suggestions)&&this.state._suggestions.length>0}getFormFieldProps(){return{state:this.state,class:"kol-input-color",tooltipAlign:this._tooltipAlign,onClick:()=>{var t;return null===(t=this.refInputText)||void 0===t?void 0:t.focus()},alert:this.showAsAlert()}}getInputColorProps(){return Object.assign(Object.assign({},this.getGenericInputProps()),{ref:this.catchColorRef,type:"color",name:this.state._name?`${this.state._name}-color`:void 0,list:this.hasSuggestions?`${this.state._id}-list`:void 0,id:void 0,"aria-hidden":"true",tabIndex:-1,onInput:this.onColorInput})}getInputTextProps(){return Object.assign(Object.assign({},this.getGenericInputProps()),{ref:this.catchRef,type:"text",name:this.state._name?`${this.state._name}-text`:void 0,list:this.hasSuggestions?`${this.state._id}-list`:void 0,onInput:this.onTextInput})}getGenericInputProps(){const t=this.state,n=(0,i._)(t,["_suggestions"]);return Object.assign(Object.assign({state:Object.assign(Object.assign({},n),{_suggestions:[]})},this.controller.onFacade),{onBlur:this.onBlur,onFocus:this.onFocus})}render(){return(0,o.h)(d.K,Object.assign({key:"812d98db5ffb942aa0d3a9699fc3339b8447bdc6"},this.getFormFieldProps()),(0,o.h)(s.K,{key:"98ef2352406c9fd7452c47636cd5d86488d6c334",state:this.state,class:"kol-input-color__inputs-wrapper"},(0,o.h)("div",{key:"cdecef9a66e2e25f7983058e85cebef3a2e48fa1",class:"kol-input-color__inputs-wrapper"},(0,o.h)(c.K,Object.assign({key:"011c332e653bce93aa813e3108c186472df7ce64",class:"kol-input-color__input kol-input-color__input--color"},this.getInputColorProps())),(0,o.h)(c.K,Object.assign({key:"6465998ba4a70c042a09ce628299582567e0f89a",class:"kol-input-color__input kol-input-color__input--text"},this.getInputTextProps())))))}constructor(t){(0,o.r)(this,t),this.catchRef=t=>{this.refInputText=t},this.catchColorRef=t=>{this.refInputColor=t},this.onBlur=t=>{this.controller.onFacade.onBlur(t),this.inputHasFocus=!1},this.onFocus=t=>{this.controller.onFacade.onFocus(t),this.inputHasFocus=!0},this.onColorInput=t=>{const n=t.target.value;this.state._value=n,this.refInputText&&(this.refInputText.value=n),this.controller.onFacade.onInput(t)},this.onTextInput=t=>{let n=t.target.value;n.startsWith("#")||(n=`#${n}`),this._value=n,this.refInputColor&&(this.refInputColor.value=n),this.controller.onFacade.onInput(t)},this._accessKey=void 0,this._autoComplete=void 0,this._disabled=!1,this._hideMsg=!1,this._hideLabel=!1,this._hint="",this._icons=void 0,this._id=void 0,this._label=void 0,this._msg=void 0,this._name=void 0,this._on=void 0,this._shortKey=void 0,this._smartButton=void 0,this._suggestions=void 0,this._syncValueBySelector=void 0,this._tooltipAlign="top",this._touched=!1,this._value=void 0,this.state={_autoComplete:"off",_hideMsg:!1,_id:`id-${(0,a.n)()}`,_label:"",_suggestions:[]},this.inputHasFocus=!1,this.controller=new p(this,"color",this.host)}showAsAlert(){return Boolean(this.state._touched)&&!this.inputHasFocus}validateAccessKey(t){this.controller.validateAccessKey(t)}validateAutoComplete(t){this.controller.validateAutoComplete(t)}validateDisabled(t){this.controller.validateDisabled(t)}validateHideMsg(t){this.controller.validateHideMsg(t)}validateHideLabel(t){this.controller.validateHideLabel(t)}validateHint(t){this.controller.validateHint(t)}validateIcons(t){this.controller.validateIcons(t)}validateId(t){this.controller.validateId(t)}validateLabel(t){this.controller.validateLabel(t)}validateMsg(t){this.controller.validateMsg(t)}validateName(t){this.controller.validateName(t)}validateOn(t){this.controller.validateOn(t)}validateShortKey(t){this.controller.validateShortKey(t)}validateSmartButton(t){this.controller.validateSmartButton(t)}validateSuggestions(t){this.controller.validateSuggestions(t)}validateSyncValueBySelector(t){this.controller.validateSyncValueBySelector(t)}validateTouched(t){this.controller.validateTouched(t)}validateValue(t){this.controller.validateValue(t)}componentDidLoad(){!this._value&&this.refInputColor&&(this._value=this.refInputColor.value)}componentWillLoad(){this._touched=!0===this._touched,this.controller.componentWillLoad()}static get delegatesFocus(){return!0}get host(){return(0,o.g)(this)}static get watchers(){return{_accessKey:["validateAccessKey"],_autoComplete:["validateAutoComplete"],_disabled:["validateDisabled"],_hideMsg:["validateHideMsg"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_msg:["validateMsg"],_name:["validateName"],_on:["validateOn"],_shortKey:["validateShortKey"],_smartButton:["validateSmartButton"],_suggestions:["validateSuggestions"],_syncValueBySelector:["validateSyncValueBySelector"],_touched:["validateTouched"],_value:["validateValue"]}}};m.style={default:"/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]) {\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n }\n}\n/**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n.visually-hidden {\n clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: calc(1rem / var(--kolibri-root-font-size, 16));\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: calc(1rem / var(--kolibri-root-font-size, 16));\n}\n\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n border: none;\n margin: 0;\n padding: 0;\n width: 100%;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n background-color: lightgray;\n color: black;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: grid;\n place-items: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n :host {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n animation-duration: 0.25s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n box-sizing: border-box;\n display: none;\n position: fixed;\n visibility: hidden;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n max-width: 90vw;\n max-height: 90vh;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width);\n }\n .kol-tooltip__arrow {\n background-color: #fff;\n color: #000;\n height: calc(10rem / var(--kolibri-root-font-size, 16));\n position: absolute;\n transform: rotate(45deg);\n width: calc(10rem / var(--kolibri-root-font-size, 16));\n z-index: 999;\n }\n .kol-tooltip__content {\n background-color: #fff;\n color: #000;\n position: relative;\n z-index: 1000;\n }\n @keyframes fadeInOpacity {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n .kol-alert {\n display: grid;\n }\n .kol-alert__container {\n place-items: center;\n display: flex;\n }\n .kol-alert__container-content {\n flex-grow: 1;\n }\n .kol-alert__close-button {\n /* Visible with forced colors */\n outline: transparent solid calc(1rem / var(--kolibri-root-font-size, 16));\n }\n}\n@layer kol-component {\n .kol-form-field {\n display: grid;\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n .kol-form-field:not(.kol-form-field--disabled) .kol-form-field__label {\n cursor: pointer;\n }\n .kol-form-field--disabled .kol-form-field__label {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__label-text::after {\n content: \"*\";\n }\n .kol-form-field--disabled .kol-form-field__hint {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__tooltip .span-label::after {\n content: \"*\";\n }\n}\n@layer kol-component {\n .kol-input-container {\n align-items: center;\n background-color: white;\n display: grid;\n grid-template-columns: 1fr;\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n width: 100%;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start) {\n grid-template-columns: auto 1fr;\n }\n .kol-input-container:has(> .kol-input-container__adornment--end) {\n grid-template-columns: 1fr auto;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start):has(> .kol-input-container__adornment--end) {\n grid-template-columns: auto 1fr auto;\n }\n .kol-input-container__container {\n position: relative;\n }\n .kol-input-container__adornment {\n display: flex;\n align-items: center;\n }\n .kol-input-container__adornment .kol-icon {\n display: grid;\n height: var(--a11y-min-size);\n place-items: center;\n }\n}\n@layer kol-component {\n .kol-input {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n min-width: var(--a11y-min-size);\n width: 100%;\n }\n .kol-input:focus {\n outline: none;\n }\n}\n.kol-input-color__input--color {\n flex-grow: 1;\n}\n.kol-input-color__input--text {\n width: calc(112rem / var(--kolibri-root-font-size, 16));\n}\n.kol-input-color__inputs-wrapper {\n align-items: center;\n display: flex;\n flex-direction: row;\n gap: calc(6rem / var(--kolibri-root-font-size, 16)) !important;\n}\n\n.kol-input {\n cursor: pointer;\n}\n.kol-input:disabled {\n cursor: not-allowed;\n}"}},9688:(t,n,e)=>{e.d(n,{i:()=>s,v:()=>l});var o=e(3892),i=e(7125);const a=(t,n,e)=>{(0,i.b)(e)?t[n]=e:(0,i.i)(e,1)&&(t[n]={icon:e})},s=t=>"object"==typeof t&&null!==t&&(void 0===t.style||(0,i.a)(t.style))&&(void 0===t.label||(0,i.i)(t.label))&&(0,i.i)(t.icon,1),l=(t,n,e={})=>{(0,o.o)(n,(()=>{var l;try{n=(0,o.p)(n)}catch(t){}(0,o.w)(t,"_icons",(t=>{const n="object"==typeof t&&null!==t&&0===Object.keys(t).length;return null===t||n||(0,i.i)(t,1)||"object"==typeof t&&null!==t&&((0,i.i)(t.left,1)||s(t.left)||(0,i.i)(t.right,1)||s(t.right)||(0,i.i)(t.top,1)||s(t.top)||(0,i.i)(t.bottom,1)||s(t.bottom))}),new Set(["KoliBriIcon"]),n,Object.assign(Object.assign({},e),{defaultValue:{},hooks:{afterPatch:null===(l=e.hooks)||void 0===l?void 0:l.afterPatch,beforePatch:(t,n,o,s)=>{var l,r;"function"==typeof(null===(l=e.hooks)||void 0===l?void 0:l.beforePatch)&&(null===(r=e.hooks)||void 0===r||r.beforePatch(t,n,o,s)),(t=>{var n,e,o;if(null===(n=t.nextState)||void 0===n?void 0:n.has("_icons")){const n=null===(e=t.nextState)||void 0===e?void 0:e.get("_icons");null===(o=t.nextState)||void 0===o||o.set("_icons",(t=>{let n={};return(0,i.i)(t,1)?n={left:{icon:t}}:"object"==typeof t&&null!==t&&(a(n,"top",t.top),a(n,"right",t.right),a(n,"bottom",t.bottom),a(n,"left",t.left)),n})(n))}})(o)}}}))}))}}}]);
|
|
2
|
+
"use strict";(self.webpackChunk_public_ui_sample_react=self.webpackChunk_public_ui_sample_react||[]).push([[6781],{182:(t,n,e)=>{e.d(n,{I:()=>y,K:()=>v,a:()=>f});var o=e(6733),i=e(257),a=e(1111),s=e(8045),l=e(9867),r=e(1698),c=e(3885),d=e(376),u=e(1476),h=e(8057);const p=(t,n)=>{var{position:e="start",class:i}=t,l=(0,a._)(t,["position","class"]);const r="kol-input-container__adornment",c=`${r}--${e}`;return(0,o.h)("div",Object.assign({class:(0,s.c)(r,c,i)},l),n)};function m(t){return!!t&&(Array.isArray(t)?t.length>0:Boolean(t))}const b=(t,n)=>{var{class:e}=t,i=(0,a._)(t,["class"]);return(0,o.h)("div",Object.assign({class:(0,s.c)("kol-input-container__container",e)},i),n)},g=(t,n)=>{const{class:e,startAdornment:i,endAdornment:r,disabled:c,msg:d,touched:u,containerProps:h,startAdornmentProps:g,endAdornmentProps:_}=t,v=(0,a._)(t,["class","startAdornment","endAdornment","disabled","msg","touched","containerProps","startAdornmentProps","endAdornmentProps"]),f=(0,l.c)(d,u),y={"kol-input-container--disabled":c,[`kol-input-container--${(null==d?void 0:d.type)||"error"}`]:f},k=Object.assign({class:(0,s.c)("kol-input-container",y,e)},v);return m(i)||m(r)?(0,o.h)("div",Object.assign({},k),(0,o.h)(p,Object.assign({},g,{position:"start"}),i),(0,o.h)(b,Object.assign({},h),n),(0,o.h)(p,Object.assign({},_,{position:"end"}),r)):(0,o.h)("div",Object.assign({},k),(0,o.h)(b,Object.assign({},h),n))},_=t=>{const{label:n,icons:e,hideLabel:i,disabled:s,onClick:l}=t,c=(0,a._)(t,["label","icons","hideLabel","disabled","onClick"]);return(0,o.h)(r.a,Object.assign({_label:n,_disabled:s,_icons:e,_hideLabel:i,_on:{onClick:l}},c))},v=t=>{const{componentName:n="button",label:e,icon:i,onClick:s}=t,l=(0,a._)(t,["componentName","label","icon","onClick"]),r="button"===n?_:c.K;return(0,o.h)(r,Object.assign({label:e||"",hideLabel:!0,icons:`codicon codicon-${i}`,onClick:s},l))},f=({state:t,endAdornment:n},e)=>{const{icons:i,smartButton:a,disabled:s,msg:r,touched:c}=function(t){let n,e;return"_icons"in t&&(n=t._icons),"_smartButton"in t&&(e=t._smartButton),{icons:n,smartButton:e,disabled:t._disabled,msg:(0,l.a)(t._msg),touched:t._touched}}(t);let h=null==i?void 0:i.left;(0,d.i)(h)&&(h={icon:h});let p=null==i?void 0:i.right;(0,d.i)(p)&&(p={icon:p});const m=[],b=[];return n&&(Array.isArray(n)?b.push(...n):b.push(n)),h&&m.push((0,o.h)(v,Object.assign({componentName:"icon",class:"kol-input-container__icon"},(0,u.i)(h)?h:{}))),(0,u.i)(a)&&b.push((0,o.h)(v,Object.assign({componentName:"button",class:"kol-input-container__smart-button"},a,{hideLabel:!0,disabled:s}))),p&&b.push((0,o.h)(v,Object.assign({componentName:"icon",class:"kol-input-container__icon"},(0,u.i)(p)?p:{}))),(0,o.h)(g,{disabled:s,msg:r,touched:c,startAdornment:m,endAdornment:b},e)};class y extends l.I{constructor(t,n,e){super(t,n,e),this.numberStringRegex=/^\d+(\.\d+)?$/,this.parseToNumber=t=>"number"==typeof t?isNaN(t)?null:t:this.isNumberString(t)?parseFloat(t):null,this.validateNumber=(t,n)=>(0,i.w)(this.component,t,(t=>null==t||"number"==typeof t||"string"==typeof t&&this.numberStringRegex.test(t)),new Set(["number","NumberString"]),n,{hooks:{beforePatch:(n,e)=>{(null==e?void 0:e.has(t))&&(null==e||e.set(t,this.parseToNumber(n)))}}}),this.component=t}validateIcons(t){(0,h.v)(this.component,t)}isNumberString(t){return"string"==typeof t&&this.numberStringRegex.test(t)}componentWillLoad(){super.componentWillLoad(),this.validateIcons(this.component._icons)}}},1476:(t,n,e)=>{function o(t){var n=typeof t;return null!=t&&("object"==n||"function"==n)}e.d(n,{i:()=>o})},3885:(t,n,e)=>{e.d(n,{K:()=>a});var o=e(6733),i=e(1698);const a=t=>{const{class:n,style:e,icons:a,label:s,onClick:l}=t;return(0,o.h)(i.d,{class:n,style:e,onClick:l,_icons:a,_label:s})}},6781:(t,n,e)=>{e.r(n),e.d(n,{kol_input_color:()=>m});var o=e(6733),i=e(1111),a=e(2190),s=e(9867),l=e(7162),r=e(182),c=e(257),d=e(7368),u=(e(3694),e(1042),e(8296),e(1698),e(4269),e(3710),e(5561),e(5154),e(753),e(3472),e(8045),e(9709),e(9272),e(6660),e(3185),e(2425),e(376),e(5538),e(8176),e(3885),e(1476),e(8057),(t,n,e)=>new Promise(((o,i)=>{var a=t=>{try{l(e.next(t))}catch(t){i(t)}},s=t=>{try{l(e.throw(t))}catch(t){i(t)}},l=t=>t.done?o(t.value):Promise.resolve(t.value).then(a,s);l((e=e.apply(t,n)).next())})));const h=["on","off"];class p extends r.I{constructor(t,n,e){super(t,n,e),this.component=t}validateAutoComplete(t){(0,c.w)(this.component,"_autoComplete",(t=>"string"==typeof t&&h.includes(t)),new Set(h),t)}validateSuggestions(t){(0,d.v)(this.component,t)}validateValue(t){(0,c.A)(this.component,"_value",t),this.setFormAssociatedValue(this.component.state._value)}componentWillLoad(){super.componentWillLoad(),this.validateAutoComplete(this.component._autoComplete),this.validateSuggestions(this.component._suggestions),this.validateValue(this.component._value)}}const m=class{getValue(){return u(this,null,(function*(){var t;return null===(t=this.refInputText)||void 0===t?void 0:t.value}))}kolFocus(){return u(this,null,(function*(){var t;null===(t=this.refInputText)||void 0===t||t.focus()}))}get hasSuggestions(){return Array.isArray(this.state._suggestions)&&this.state._suggestions.length>0}getFormFieldProps(){return{state:this.state,class:"kol-input-color",tooltipAlign:this._tooltipAlign,onClick:()=>{var t;return null===(t=this.refInputText)||void 0===t?void 0:t.focus()},alert:this.showAsAlert()}}getInputColorProps(){return Object.assign(Object.assign({},this.getGenericInputProps()),{ref:this.catchColorRef,type:"color",name:this.state._name?`${this.state._name}-color`:void 0,list:this.hasSuggestions?`${this.state._id}-list`:void 0,id:void 0,"aria-hidden":"true",tabIndex:-1,onInput:this.onColorInput})}getInputTextProps(){return Object.assign(Object.assign({},this.getGenericInputProps()),{ref:this.catchRef,type:"text",name:this.state._name?`${this.state._name}-text`:void 0,list:this.hasSuggestions?`${this.state._id}-list`:void 0,onInput:this.onTextInput})}getGenericInputProps(){const t=this.state,n=(0,i._)(t,["_suggestions"]);return Object.assign(Object.assign({state:Object.assign(Object.assign({},n),{_suggestions:[]})},this.controller.onFacade),{onBlur:this.onBlur,onFocus:this.onFocus})}render(){return(0,o.h)(s.F,Object.assign({key:"4618fa8ab667bdc8d8418ddb9a5612298c70a52f"},this.getFormFieldProps()),(0,o.h)(r.a,{key:"fe5ab536ae149d533ca24d048722def43b9414c8",state:this.state,class:"kol-input-color__inputs-wrapper"},(0,o.h)("div",{key:"5152e937fb33845d08374862d90487b507132edf",class:"kol-input-color__inputs-wrapper"},(0,o.h)(l.I,Object.assign({key:"4f256a72a9b3f45c4153a63a6c865ff5e5d50bfb",class:"kol-input-color__input kol-input-color__input--color"},this.getInputColorProps())),(0,o.h)(l.I,Object.assign({key:"bb9edc748af69658ba7082624c75ff0c05527415",class:"kol-input-color__input kol-input-color__input--text"},this.getInputTextProps())))))}constructor(t){(0,o.r)(this,t),this.catchRef=t=>{this.refInputText=t},this.catchColorRef=t=>{this.refInputColor=t},this.onBlur=t=>{this.controller.onFacade.onBlur(t),this.inputHasFocus=!1},this.onFocus=t=>{this.controller.onFacade.onFocus(t),this.inputHasFocus=!0},this.onColorInput=t=>{const n=t.target.value;this.state._value=n,this.refInputText&&(this.refInputText.value=n),this.controller.onFacade.onInput(t)},this.onTextInput=t=>{let n=t.target.value;n.startsWith("#")||(n=`#${n}`),this._value=n,this.refInputColor&&(this.refInputColor.value=n),this.controller.onFacade.onInput(t)},this._accessKey=void 0,this._autoComplete=void 0,this._disabled=!1,this._hideMsg=!1,this._hideLabel=!1,this._hint="",this._icons=void 0,this._id=void 0,this._label=void 0,this._msg=void 0,this._name=void 0,this._on=void 0,this._shortKey=void 0,this._smartButton=void 0,this._suggestions=void 0,this._syncValueBySelector=void 0,this._tooltipAlign="top",this._touched=!1,this._value=void 0,this.state={_autoComplete:"off",_hideMsg:!1,_id:`id-${(0,a.n)()}`,_label:"",_suggestions:[]},this.inputHasFocus=!1,this.controller=new p(this,"color",this.host)}showAsAlert(){return Boolean(this.state._touched)&&!this.inputHasFocus}validateAccessKey(t){this.controller.validateAccessKey(t)}validateAutoComplete(t){this.controller.validateAutoComplete(t)}validateDisabled(t){this.controller.validateDisabled(t)}validateHideMsg(t){this.controller.validateHideMsg(t)}validateHideLabel(t){this.controller.validateHideLabel(t)}validateHint(t){this.controller.validateHint(t)}validateIcons(t){this.controller.validateIcons(t)}validateId(t){this.controller.validateId(t)}validateLabel(t){this.controller.validateLabel(t)}validateMsg(t){this.controller.validateMsg(t)}validateName(t){this.controller.validateName(t)}validateOn(t){this.controller.validateOn(t)}validateShortKey(t){this.controller.validateShortKey(t)}validateSmartButton(t){this.controller.validateSmartButton(t)}validateSuggestions(t){this.controller.validateSuggestions(t)}validateSyncValueBySelector(t){this.controller.validateSyncValueBySelector(t)}validateTouched(t){this.controller.validateTouched(t)}validateValue(t){this.controller.validateValue(t)}componentDidLoad(){!this._value&&this.refInputColor&&(this._value=this.refInputColor.value)}componentWillLoad(){this._touched=!0===this._touched,this.controller.componentWillLoad()}static get delegatesFocus(){return!0}get host(){return(0,o.g)(this)}static get watchers(){return{_accessKey:["validateAccessKey"],_autoComplete:["validateAutoComplete"],_disabled:["validateDisabled"],_hideMsg:["validateHideMsg"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_msg:["validateMsg"],_name:["validateName"],_on:["validateOn"],_shortKey:["validateShortKey"],_smartButton:["validateSmartButton"],_suggestions:["validateSuggestions"],_syncValueBySelector:["validateSyncValueBySelector"],_touched:["validateTouched"],_value:["validateValue"]}}};m.style={default:"/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]) {\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n }\n}\n/**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n.visually-hidden {\n clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: calc(1rem / var(--kolibri-root-font-size, 16));\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: calc(1rem / var(--kolibri-root-font-size, 16));\n}\n\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n border: none;\n margin: 0;\n padding: 0;\n width: 100%;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n background-color: lightgray;\n color: black;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: grid;\n place-items: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n :host {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n animation-duration: 0.25s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n box-sizing: border-box;\n display: none;\n position: fixed;\n visibility: hidden;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n max-width: 90vw;\n max-height: 90vh;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width);\n }\n .kol-tooltip__arrow {\n background-color: #fff;\n color: #000;\n height: calc(10rem / var(--kolibri-root-font-size, 16));\n position: absolute;\n transform: rotate(45deg);\n width: calc(10rem / var(--kolibri-root-font-size, 16));\n z-index: 999;\n }\n .kol-tooltip__content {\n background-color: #fff;\n color: #000;\n position: relative;\n z-index: 1000;\n }\n @keyframes fadeInOpacity {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n .kol-alert {\n display: grid;\n }\n .kol-alert__container {\n place-items: center;\n display: flex;\n }\n .kol-alert__container-content {\n flex-grow: 1;\n }\n .kol-alert__closer {\n /* Visible with forced colors */\n outline: transparent solid calc(1rem / var(--kolibri-root-font-size, 16));\n }\n}\n@layer kol-component {\n .kol-form-field {\n display: grid;\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n .kol-form-field:not(.kol-form-field--disabled) .kol-form-field__label {\n cursor: pointer;\n }\n .kol-form-field--disabled .kol-form-field__label {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__label-text::after {\n content: \"*\";\n }\n .kol-form-field--disabled .kol-form-field__hint {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__tooltip .span-label::after {\n content: \"*\";\n }\n}\n@layer kol-component {\n .kol-input-container {\n align-items: center;\n background-color: white;\n display: grid;\n grid-template-columns: 1fr;\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n width: 100%;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start) {\n grid-template-columns: auto 1fr;\n }\n .kol-input-container:has(> .kol-input-container__adornment--end) {\n grid-template-columns: 1fr auto;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start):has(> .kol-input-container__adornment--end) {\n grid-template-columns: auto 1fr auto;\n }\n .kol-input-container__container {\n position: relative;\n }\n .kol-input-container__adornment {\n display: flex;\n align-items: center;\n }\n .kol-input-container__adornment .kol-icon {\n display: grid;\n height: var(--a11y-min-size);\n place-items: center;\n }\n}\n@layer kol-component {\n .kol-input {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n min-width: var(--a11y-min-size);\n width: 100%;\n }\n .kol-input:focus {\n outline: none;\n }\n}\n.kol-input-color__input--color {\n flex-grow: 1;\n}\n.kol-input-color__input--text {\n width: calc(112rem / var(--kolibri-root-font-size, 16));\n}\n.kol-input-color__inputs-wrapper {\n align-items: center;\n display: flex;\n flex-direction: row;\n gap: calc(6rem / var(--kolibri-root-font-size, 16)) !important;\n}\n\n.kol-input {\n cursor: pointer;\n}\n.kol-input:disabled {\n cursor: not-allowed;\n}"}},7162:(t,n,e)=>{e.d(n,{I:()=>r,S:()=>l});var o=e(1111),i=e(6733),a=e(8176),s=(e(257),e(9867));const l=t=>{var{id:n,suggestions:e}=t,a=(0,o._)(t,["id","suggestions"]);return e?(0,i.h)("datalist",Object.assign({id:`${n}-list`},a),e.map((t=>(0,i.h)("option",{value:t})))):null},r=t=>{var{state:n,customSuggestions:e}=t,r=(0,o._)(t,["state","customSuggestions"]);return(0,i.h)(a.I,Object.assign({},function(t,n){const{ariaDescribedBy:e}=(0,s.g)(t),o={id:t._id,hideLabel:t._hideLabel,label:t._label,accessKey:t._accessKey,disabled:t._disabled,name:t._name,ariaDescribedBy:e};return"_type"in t&&(o.type=t._type),"_value"in t&&(o.value=t._value),"_required"in t&&(o.required=t._required),"_maxLength"in t&&(o.maxlength=t._maxLength),"_placeholder"in t&&(o.placeholder=t._placeholder),"_autoComplete"in t&&(o.autoComplete=t._autoComplete),"_spellCheck"in t&&(o.spellcheck=t._spellCheck),"_pattern"in t&&(o.pattern=t._pattern),"_readOnly"in t&&(o.readonly=t._readOnly),"_min"in t&&(o.min=t._min),"_max"in t&&(o.max=t._max),"_step"in t&&(o.step=t._step),"_multiple"in t&&(o.multiple=t._multiple),"_checked"in t&&(o.checked=t._checked),"_indeterminate"in t&&(o.indeterminate=t._indeterminate),"_touched"in t&&(o.touched=t._touched),"_msg"in t&&(o.msg=(0,s.a)(t._msg)),"_suggestions"in t&&!n&&Array.isArray(t._suggestions)&&t._suggestions.length>0&&(o.suggestions=(0,i.h)(l,{id:t._id,suggestions:t._suggestions})),o}(n,e),r))}},7368:(t,n,e)=>{e.d(n,{v:()=>i});var o=e(257);const i=(t,n)=>{(0,o.y)(t,"_suggestions",(t=>"string"==typeof t||"number"==typeof t),n,void 0,{hooks:{afterPatch:t=>{Array.isArray(t)&&t.length&&(0,o.b)("Property suggestions: Options have accessibility issues in how browsers implemented them and should not be used for now.")}}})}},8057:(t,n,e)=>{e.d(n,{v:()=>s});var o=e(257);const i=(t,n,e)=>{(0,o.v)(e)?t[n]=e:(0,o.q)(e,1)&&(t[n]={icon:e})},a=t=>"object"==typeof t&&null!==t&&(void 0===t.style||(0,o.t)(t.style))&&(void 0===t.label||(0,o.q)(t.label))&&(0,o.q)(t.icon,1),s=(t,n,e={})=>{(0,o.o)(n,(()=>{var s;try{n=(0,o.j)(n)}catch(t){}(0,o.w)(t,"_icons",(t=>{const n="object"==typeof t&&null!==t&&0===Object.keys(t).length;return null===t||n||(0,o.q)(t,1)||"object"==typeof t&&null!==t&&((0,o.q)(t.left,1)||a(t.left)||(0,o.q)(t.right,1)||a(t.right)||(0,o.q)(t.top,1)||a(t.top)||(0,o.q)(t.bottom,1)||a(t.bottom))}),new Set(["KoliBriIcon"]),n,Object.assign(Object.assign({},e),{defaultValue:{},hooks:{afterPatch:null===(s=e.hooks)||void 0===s?void 0:s.afterPatch,beforePatch:(t,n,a,s)=>{var l,r;"function"==typeof(null===(l=e.hooks)||void 0===l?void 0:l.beforePatch)&&(null===(r=e.hooks)||void 0===r||r.beforePatch(t,n,a,s)),(t=>{var n,e,a;if(null===(n=t.nextState)||void 0===n?void 0:n.has("_icons")){const n=null===(e=t.nextState)||void 0===e?void 0:e.get("_icons");null===(a=t.nextState)||void 0===a||a.set("_icons",(t=>{let n={};return(0,o.q)(t,1)?n={left:{icon:t}}:"object"==typeof t&&null!==t&&(i(n,"top",t.top),i(n,"right",t.right),i(n,"bottom",t.bottom),i(n,"left",t.left)),n})(n))}})(a)}}}))}))}},8176:(t,n,e)=>{e.d(n,{I:()=>l});var o=e(1111),i=e(6733),a=e(8045),s=(e(257),e(9867));const l=t=>{const{class:n,msg:e,required:l,disabled:r,touched:c,readonly:d,ariaDescribedBy:u,hideLabel:h,label:p,suggestions:m,value:b}=t,g=(0,o._)(t,["class","msg","required","disabled","touched","readonly","ariaDescribedBy","hideLabel","label","suggestions","value"]),_=(0,s.c)(e,c),v={"kol-input--disabled":Boolean(r),"kol-input--required":Boolean(l),"kol-input--touched":Boolean(c),"kol-input--readonly":Boolean(d),[`kol-input--${(null==e?void 0:e.type)||"error"}`]:_},f=Object.assign(Object.assign({class:(0,a.c)("kol-input",v,n),required:l,disabled:r,readonly:d,type:"text",list:m?`${g.id}-list`:void 0},(0,s.e)({ariaDescribedBy:u,hideLabel:h,label:p})),g);return(0,i.h)(i.F,null,(0,i.h)("input",Object.assign({},f,{value:b})),m)}}}]);
|
package/dist/6790.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see 6790.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunk_public_ui_sample_react=self.webpackChunk_public_ui_sample_react||[]).push([[6790],{6790:(n,e,t)=>{t.r(e),t.d(e,{kol_avatar:()=>a});var i=t(
|
|
2
|
+
"use strict";(self.webpackChunk_public_ui_sample_react=self.webpackChunk_public_ui_sample_react||[]).push([[6790],{6790:(n,e,t)=>{t.r(e),t.d(e,{kol_avatar:()=>a});var i=t(6733),o=t(1698);const a=class{constructor(n){(0,i.r)(this,n),this._src=void 0,this._label=void 0}render(){return(0,i.h)(o.c,{key:"c4547a5724ed8d947c20de5128227bc71c14d401",_src:this._src,_label:this._label})}};a.style={default:"/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]) {\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n }\n}\n/**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n.visually-hidden {\n clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: calc(1rem / var(--kolibri-root-font-size, 16));\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: calc(1rem / var(--kolibri-root-font-size, 16));\n}\n\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n border: none;\n margin: 0;\n padding: 0;\n width: 100%;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n background-color: lightgray;\n color: black;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: grid;\n place-items: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n .kol-avatar {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n border-radius: 50%;\n overflow: hidden;\n /* Visible with forced colors */\n outline: transparent solid calc(1rem / var(--kolibri-root-font-size, 16));\n /*theme?*/\n width: calc(100rem / var(--kolibri-root-font-size, 16));\n height: calc(100rem / var(--kolibri-root-font-size, 16));\n }\n .kol-avatar__image {\n width: 100%;\n height: 100%;\n }\n .kol-avatar__initials {\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n /*theme?*/\n background-color: #d3d3d3;\n font-size: calc(40rem / var(--kolibri-root-font-size, 16));\n }\n}"}}}]);
|
package/dist/6984.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see 6984.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunk_public_ui_sample_react=self.webpackChunk_public_ui_sample_react||[]).push([[6984],{96:(t,n,e)=>{e.d(n,{C:()=>c,a:()=>r,b:()=>h,c:()=>l,d:()=>p,e:()=>a,v:()=>s});var i=e(3892),o=e(7125);const a=(t,n)=>{(0,i.w)(t,"_on",(t=>"object"==typeof t&&null!==t),new Set(["TableCallbacksPropType {Events.onSort, Events.onSelectionChange}"]),n)},l=(t,n)=>{(0,i.w)(t,"_on",(t=>"object"==typeof t&&null!==t),new Set(["TableStatefulCallbacksPropType {Events.onSelectionChange}"]),n)},s=(t,n,e)=>{(0,i.q)(n,(()=>{(0,i.o)(n,(()=>{void 0===n&&(n=[]);try{n=(0,i.p)(n)}catch(t){}Array.isArray(n)&&n.every((t=>"object"==typeof t&&null!==t))&&(0,i.s)(t,"_data",n,e)}))}))},r=(t,n,e)=>{(0,i.q)(n,(()=>{(0,i.o)(n,(()=>{void 0===n&&(n=[]);try{n=(0,i.p)(n)}catch(t){}Array.isArray(n)&&n.every((t=>"object"==typeof t&&null!==t))&&(0,i.s)(t,"_dataFoot",n,e)}))}))},h=(t,n)=>{var e;(e="string"==typeof n?(()=>{try{return(0,i.p)(n)}catch(t){return}})():n)&&(0,o.b)(e)&&"function"==typeof e.label&&(!e.selectedKeys||Array.isArray(e.selectedKeys))&&(0,i.s)(t,"_selection",n)};var c,d;(d=c||(c={})).onBlur="onBlur",d.onChange="onChange",d.onChangePage="onChangePage",d.onClick="onClick",d.onClose="onClose",d.onDblClick="onDblClick",d.onFocus="onFocus",d.onInput="onInput",d.onKeyDown="onKeyDown",d.onKeyPress="onKeyPress",d.onKeyUp="onKeyUp",d.onMouseDown="onMouseDown",d.onMouseMove="onMouseMove",d.onMouseOut="onMouseOut",d.onMouseOver="onMouseOver",d.onMouseUp="onMouseUp",d.onReset="onReset",d.onSelect="onSelect",d.onSelectionChange="onSelectionChange",d.onChangePageSize="onChangePageSize",d.onSort="onSort",d.onSubmit="onSubmit",d.onToggle="onToggle";const p=(t,n)=>{(0,i.w)(t,"_tableSettings",(t=>"object"==typeof t&&null!==t),new Set(["TableSettings"]),n)}},3638:(t,n,e)=>{e.d(n,{a:()=>d,b:()=>s,c:()=>r,h:()=>o,v:()=>c});var i=e(3892);const o=[0,1,2,3,4,5,6],a=/[a-zA-Z0-9äöüÄÖÜß]/g,l=/^\d+$/;function s(t,n=1){return function(t){var n;return"string"==typeof t&&(null===(n=t.match(a))||void 0===n?void 0:n.length)||0}(t)>=n}function r(t){return l.test(t)}const h=new Set(["string"]),c=(t,n,e={})=>{(0,i.w)(t,"_label",(t=>"string"==typeof t),h,n,function(t){var n;return Object.assign(Object.assign({},t),{hooks:{afterPatch:(n,e,o,a)=>{var l,h;"function"==typeof(null===(l=t.hooks)||void 0===l?void 0:l.afterPatch)&&(null===(h=t.hooks)||void 0===h||h.afterPatch(n,e,o,a)),"string"==typeof n&&!1===s(n,3)&&!1===r(n)&&(0,i.a)(`The heading or label ("${n}") is not accessible. A label should consist of at least three readable characters.`),"string"==typeof n&&n.length>80&&(0,i.u)("A heading or label should not be longer than 80 characters.")},beforePatch:null===(n=t.hooks)||void 0===n?void 0:n.beforePatch}})}(e))},d=c},3648:(t,n,e)=>{e.d(n,{b:()=>a,p:()=>i,s:()=>o});let i="development";try{i="production"}catch(t){i="production"}const o=t=>""===t,a=(t,n)=>t||n||""},5452:(t,n,e)=>{e.d(n,{t:()=>a});var i=e(4269),o=e(3648);let a=(t,n)=>{var e;return(null!==(e=(0,i.g)())&&void 0!==e?e:(0,i.i)("de")).translate(t,n)};"test"===o.p&&(a=t=>t)},6984:(t,n,e)=>{e.r(n),e.d(n,{kol_table_stateful:()=>g});var i=e(7386),o=e(7763),a=e(5452),l=e(3694),s=e(96),r=e(3892),h=e(3638);const c=["top","bottom","both"],d=[10,20,50,100],p=t=>!0===t||""===t||"object"==typeof t&&null!==t,g=class{constructor(t){(0,i.r)(this,t),this.catchRef=t=>{this.tableWcRef=t},this.sortData=[],this.showPagination=!1,this.pageStartSlice=0,this.pageEndSlice=10,this.disableSort=!1,this.handlePagination={onClick:(t,n)=>{var e;"function"==typeof(null===(e=this.state._pagination._on)||void 0===e?void 0:e.onClick)&&this.state._pagination._on.onClick(t,n),(0,r.s)(this,"_pagination",Object.assign(Object.assign({},this.state._pagination),{_page:n}))},onChangePage:(t,n)=>{var e;"function"==typeof(null===(e=this.state._pagination._on)||void 0===e?void 0:e.onChangePage)&&this.state._pagination._on.onChangePage(t,n),(0,r.s)(this,"_pagination",Object.assign(Object.assign({},this.state._pagination),{_page:n}))},onChangePageSize:(t,n)=>{var e;"function"==typeof(null===(e=this.state._pagination._on)||void 0===e?void 0:e.onChangePageSize)&&this.state._pagination._on.onChangePageSize(t,n),(0,r.s)(this,"_pagination",Object.assign(Object.assign({},this.state._pagination),{_pageSize:n})),(0,r.s)(this,"_pageSize",n)}},this.onSelectionChange=t=>{t.stopPropagation()},this.updateSortedData=()=>{if(this.disableSort)return void(0,r.s)(this,"_sortedData",this.state._data);let t=this.state._data;this.sortData.length>0&&(t=this.state._data.sort(((t,n)=>{for(let e=0;e<this.sortData.length;e++){const i=this.sortData[e],o=i.compareFn(t,n);if(0!==o)return"ASC"===i.direction?o:-o}return 0}))),(0,r.s)(this,"_sortedData",t)},this._allowMultiSort=void 0,this._data=void 0,this._dataFoot=void 0,this._headers=void 0,this._label=void 0,this._minWidth=void 0,this._pagination=void 0,this._paginationPosition="bottom",this._selection=void 0,this._on=void 0,this._tableSettings=void 0,this.state={_allowMultiSort:!1,_data:[],_dataFoot:[],_headers:{horizontal:[],vertical:[]},_label:"",_minWidth:"auto",_pagination:{_page:1,_pageSize:10,_max:0},_sortedData:[],_paginationPosition:"bottom"}}validateAllowMultiSort(t){(0,r.w)(this,"_allowMultiSort",(()=>!0),new Set(["boolean"]),t,{defaultValue:!1})}validateData(t){(0,s.v)(this,t,{afterPatch:()=>{setTimeout(this.updateSortedData)}})}validateDataFoot(t){(0,s.a)(this,t,{afterPatch:()=>{setTimeout(this.updateSortedData)}})}validatePaginationPosition(t){((t,n)=>{(0,r.w)(t,"_paginationPosition",(t=>"string"==typeof t&&c.includes(t)),new Set([`PaginationPositionPropType {${c.join(", ")}`]),n,{defaultValue:"bottom"})})(this,t)}changeCellSort(t){var n;if("function"==typeof t.compareFn){this.state._allowMultiSort||t.key==(null===(n=this.sortData[0])||void 0===n?void 0:n.key)||(this.sortData=[]);const e=this.sortData.findIndex((n=>n.key===t.key));if(e>=0){const t=this.sortData[e];switch(t.direction){case"ASC":t.direction="DESC";break;case"DESC":this.sortData.splice(e,1);break;default:t.direction="ASC"}}else t.key&&this.sortData.push({label:t.label,key:t.key,compareFn:t.compareFn,direction:"ASC"});this.updateSortedData()}}validateHeaders(t){(0,r.q)(t,(()=>{(0,r.o)(t,(()=>{try{t=(0,r.p)(t)}catch(t){}(0,r.w)(this,"_headers",(t=>"object"==typeof t&&null!==t),new Set(["KoliBriTableHeaders"]),t,{hooks:{beforePatch:t=>{var n,e,i,o;const a=t=>{let n=!1;t.forEach((t=>{const e=t.key;if(!e)return;const i=t.sortDirection;"ASC"!==i&&"DESC"!==i||"function"==typeof t.compareFn&&((this.state._allowMultiSort||0===this.sortData.length)&&this.sortData.push({label:t.label,key:e,compareFn:t.compareFn,direction:i}),n=!0)})),n&&setTimeout((()=>this.updateSortedData()))},l=t;null===(n=l.horizontal)||void 0===n||n.forEach(a),null===(e=l.vertical)||void 0===e||e.forEach(a),l.horizontal&&l.vertical&&(null===(i=l.horizontal)||void 0===i?void 0:i.length)>0&&(null===(o=l.vertical)||void 0===o?void 0:o.length)>0&&(this.disableSort=!0,(0,r.j)("Table: You can not sort the table data, if horizontal and vertical headers are defined at the same time. (https://github.com/public-ui/kolibri/issues/2372)"))}}})}))}))}validateLabel(t){(0,h.v)(this,t,{required:!0})}validateMinWidth(t){(0,r.i)(this,"_minWidth",t,{defaultValue:void 0})}validateSelection(t){(0,s.b)(this,t)}validateOn(t){(0,s.c)(this,t)}validateTableSettings(t){(0,s.d)(this,t)}validatePagination(t){try{t=(0,r.p)(t)}catch(t){}this.showPagination=p(t),(0,r.w)(this,"_pagination",p,new Set(["boolean","KoliBriTablePagination"]),t,{defaultValue:{_page:1,_pageSize:10,_max:0}})}componentDidLoad(){var t;null===(t=this.tableWcRef)||void 0===t||t.addEventListener(l.K.selectionChange,this.onSelectionChange)}disconnectedCallback(){var t;null===(t=this.tableWcRef)||void 0===t||t.removeEventListener(l.K.selectionChange,this.onSelectionChange)}componentWillLoad(){this.validateAllowMultiSort(this._allowMultiSort),this.validateData(this._data),this.validateDataFoot(this._dataFoot),this.validateHeaders(this._headers),this.validateLabel(this._label),this.validateMinWidth(this._minWidth),this.validateOn(this._on),this.validatePagination(this._pagination),this.validatePaginationPosition(this._paginationPosition),this.validateSelection(this._selection),this.validateTableSettings(this._tableSettings)}selectDisplayedData(t,n,e){return"number"==typeof n&&n>0&&"number"==typeof e&&e>0?(this.pageStartSlice=n*(e-1),this.pageEndSlice=n*e>t.length?t.length:n*e,t.slice(this.pageStartSlice,this.pageEndSlice)):(this.pageStartSlice=0,this.pageEndSlice=t.length,t)}renderPagination(t){const n=(0,a.t)("kol-table-pagination-label",{placeholders:{label:`${this.state._label} (${(0,a.t)(`kol-pagination-position-${t}`)})`}});return(0,i.h)("div",{class:`kol-table-stateful__pagination kol-table-stateful__pagination--${this.state._paginationPosition}`},(0,i.h)("span",null,(0,a.t)("kol-table-visible-range",{placeholders:{start:this.pageEndSlice>0?(this.pageStartSlice+1).toString():"0",end:this.pageEndSlice.toString(),total:this.state._pagination&&this.state._pagination._max>0?this.state._pagination._max.toString():Array.isArray(this.state._data)?this.state._data.length.toString():"0"}})),(0,i.h)("div",{class:"kol-table-stateful__pagination-wrapper"},(0,i.h)(o.o,{class:"test",_boundaryCount:this.state._pagination._boundaryCount,_customClass:this.state._pagination._customClass,_on:this.handlePagination,_page:this.state._pagination._page,_pageSize:this.state._pagination._pageSize,_pageSizeOptions:this.state._pagination._pageSizeOptions||d,_siblingCount:this.state._pagination._siblingCount,_tooltipAlign:"bottom",_max:this.state._pagination._max||this.state._pagination._max||this.state._data.length,_label:n})))}getHeaderCellSortState(t){if(!this.disableSort&&"function"==typeof t.compareFn){if(t.key){const n=this.sortData.find((n=>n.key===t.key));if(null==n?void 0:n.direction)return n.direction}return"NOS"}}handleSort({key:t}){const n=[...(this.state._headers.horizontal||[]).flat(),...(this.state._headers.vertical||[]).flat()].find((n=>n.key===t));n&&this.changeCellSort(n)}getSelectedData(t){var n;const e=this.state._selection;if(e){const i=null!==(n=e.keyPropertyName)&&void 0!==n?n:"id",o=this.state._sortedData.filter((n=>t.includes(n[i])));if(!1===(null==e?void 0:e.multiple))return o[0];if(i)return o}return null}handleSelectionChange(t,n){var e;const i=this.state._selection;i&&(this.state=Object.assign(Object.assign({},this.state),{_selection:Object.assign(Object.assign({},i),{selectedKeys:"object"==typeof n?n:[n]})}));const o=this.getSelectedData(n);"function"==typeof(null===(e=this.state._on)||void 0===e?void 0:e[s.C.onSelectionChange])&&this.state._on[s.C.onSelectionChange](t,o),this.host&&(0,l.d)(this.host,l.K.selectionChange,o)}getSelection(){return t=this,n=function*(){var t;const n=(null===(t=this.state._selection)||void 0===t?void 0:t.selectedKeys)||[];return this.getSelectedData(n)},new Promise(((e,i)=>{var o=t=>{try{l(n.next(t))}catch(t){i(t)}},a=t=>{try{l(n.throw(t))}catch(t){i(t)}},l=t=>t.done?e(t.value):Promise.resolve(t.value).then(o,a);l((n=n.apply(t,null)).next())}));var t,n}render(){var t,n,e,a;const l=this.selectDisplayedData(this.state._sortedData,this.showPagination?null!==(n=null===(t=this.state._pagination)||void 0===t?void 0:t._pageSize)&&void 0!==n?n:10:this.state._sortedData.length,this.state._pagination._page||1),s="top"===this._paginationPosition||"both"===this._paginationPosition?this.renderPagination("top"):null,r="bottom"===this._paginationPosition||"both"===this._paginationPosition?this.renderPagination("bottom"):null,h={horizontal:null===(e=this.state._headers.horizontal)||void 0===e?void 0:e.map((t=>t.map((t=>Object.assign(Object.assign({},t),{sortDirection:this.getHeaderCellSortState(t)}))))),vertical:null===(a=this.state._headers.vertical)||void 0===a?void 0:a.map((t=>t.map((t=>Object.assign(Object.assign({},t),{sortDirection:this.getHeaderCellSortState(t)})))))};return(0,i.h)(i.H,{key:"28ef6723c730e6f9a52694c65b984b27b97bbe43",class:"kol-table-stateful"},this.pageEndSlice>0&&this.showPagination&&s,(0,i.h)(o.p,{key:"78fcf96661bd3e57bc41fbc3523096e7de513eeb",ref:this.catchRef,_data:l,_headerCells:h,_label:this.state._label,_dataFoot:this.state._dataFoot,_minWidth:this.state._minWidth,_on:{onSort:(t,n)=>{this.handleSort(n)},onSelectionChange:(t,n)=>{this.handleSelectionChange(t,n)}},_selection:this.state._selection,_tableSettings:this.state._tableSettings}),this.pageEndSlice>0&&this.showPagination&&r)}get host(){return(0,i.g)(this)}static get watchers(){return{_allowMultiSort:["validateAllowMultiSort"],_data:["validateData"],_dataFoot:["validateDataFoot"],_paginationPosition:["validatePaginationPosition"],_headers:["validateHeaders"],_label:["validateLabel"],_minWidth:["validateMinWidth"],_selection:["validateSelection"],_on:["validateOn"],_tableSettings:["validateTableSettings"],_pagination:["validatePagination"]}}};g.style={default:"@charset \"UTF-8\";\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]) {\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n }\n}\n/**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n.visually-hidden {\n clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: calc(1rem / var(--kolibri-root-font-size, 16));\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: calc(1rem / var(--kolibri-root-font-size, 16));\n}\n\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n border: none;\n margin: 0;\n padding: 0;\n width: 100%;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n background-color: lightgray;\n color: black;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: grid;\n place-items: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n :host {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n animation-duration: 0.25s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n box-sizing: border-box;\n display: none;\n position: fixed;\n visibility: hidden;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n max-width: 90vw;\n max-height: 90vh;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width);\n }\n .kol-tooltip__arrow {\n background-color: #fff;\n color: #000;\n height: calc(10rem / var(--kolibri-root-font-size, 16));\n position: absolute;\n transform: rotate(45deg);\n width: calc(10rem / var(--kolibri-root-font-size, 16));\n z-index: 999;\n }\n .kol-tooltip__content {\n background-color: #fff;\n color: #000;\n position: relative;\n z-index: 1000;\n }\n @keyframes fadeInOpacity {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n .kol-alert {\n display: grid;\n }\n .kol-alert__container {\n place-items: center;\n display: flex;\n }\n .kol-alert__container-content {\n flex-grow: 1;\n }\n .kol-alert__close-button {\n /* Visible with forced colors */\n outline: transparent solid calc(1rem / var(--kolibri-root-font-size, 16));\n }\n}\n@layer kol-component {\n :host {\n display: inline-block;\n }\n .kol-button {\n font-style: calc(16rem / var(--kolibri-root-font-size, 16));\n display: inline-flex;\n place-items: center;\n text-align: center;\n text-decoration-line: none;\n }\n .kol-button::before {\n /* Render zero-width character as first element to set the baseline correctly. */\n content: \"\";\n }\n .kol-button__text {\n margin: auto;\n width: 100%;\n }\n}\n@layer kol-component {\n .kol-popover-button__button {\n display: inline-block;\n }\n .kol-popover-button__popover {\n border: 1px solid #000;\n margin: 0;\n padding: 0;\n }\n}\n@layer kol-component {\n .kol-table-settings {\n background: #fff;\n position: absolute;\n right: 0;\n top: 0;\n z-index: 1;\n }\n .kol-table-settings__columns-container {\n margin-top: calc(16rem / var(--kolibri-root-font-size, 16));\n max-height: calc(200rem / var(--kolibri-root-font-size, 16));\n overflow: auto;\n }\n .kol-table-settings__columns {\n align-items: center;\n display: grid;\n gap: calc(8rem / var(--kolibri-root-font-size, 16));\n grid-auto-rows: min-content;\n grid-template-columns: min-content 1fr calc(100rem / var(--kolibri-root-font-size, 16)) auto auto;\n overflow: hidden;\n }\n .kol-table-settings__column {\n display: contents;\n }\n}\n@layer kol-component {\n .kol-table {\n display: block;\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n max-width: 100%;\n position: relative;\n }\n .kol-table__scroll-container {\n overflow-x: auto;\n overflow-y: hidden;\n }\n .kol-table__table {\n width: 100%;\n }\n .kol-table__caption {\n text-align: start;\n min-height: var(--a11y-min-size);\n padding-right: var(--a11y-min-size);\n }\n .kol-table__focus-element {\n font-size: 0;\n }\n .kol-table__focus-element:focus {\n outline: 0 !important;\n /* @see https://remysharp.com/til/css/focus-ring-default-styles */\n outline: 5px auto Highlight;\n outline: 5px auto -webkit-focus-ring-color;\n outline-offset: 2px;\n }\n .kol-table__sort-button .kol-button {\n color: inherit;\n }\n .kol-table__body {\n text-align: left;\n }\n .kol-table__body .kol-button__text {\n justify-items: start;\n }\n .kol-table__cell--align-left {\n text-align: left;\n }\n .kol-table__cell--align-left .kol-button__text {\n justify-items: start;\n }\n .kol-table__cell--align-center {\n text-align: center;\n }\n .kol-table__cell--align-center .kol-button__text {\n justify-items: center;\n }\n .kol-table__cell--align-right {\n text-align: right;\n }\n .kol-table__cell--align-right .kol-button__text {\n justify-items: end;\n }\n .kol-table__cell--selection {\n width: var(--a11y-min-size);\n height: var(--a11y-min-size);\n white-space: nowrap;\n }\n .kol-table__spacer {\n display: none;\n }\n .kol-table__selection-label {\n align-items: center;\n cursor: pointer;\n display: flex;\n height: var(--a11y-min-size);\n justify-content: center;\n position: relative;\n width: var(--a11y-min-size);\n }\n .kol-table__selection-label--disabled {\n cursor: not-allowed;\n }\n .kol-table__selection-icon {\n display: block;\n inset: auto;\n position: absolute;\n z-index: 1;\n }\n .kol-table__selection-input {\n appearance: none;\n border-style: solid;\n cursor: pointer;\n margin: 0;\n }\n .kol-table__selection-input:disabled {\n cursor: not-allowed;\n }\n .kol-table__selection-input:before {\n content: \"\";\n }\n .kol-table__selection-input--checkbox {\n position: relative;\n display: flex;\n height: calc(var(--a11y-min-size) / 2);\n width: calc(var(--a11y-min-size) / 2);\n align-items: center;\n justify-content: center;\n background-color: rgb(255, 255, 255);\n border-width: 2px;\n line-height: 1.5;\n transition: all 0.5s ease 0s;\n }\n .kol-table__selection-input--radio {\n display: flex;\n border-width: 2px;\n border-radius: 100%;\n height: 1.5em;\n min-height: 1.5em;\n min-width: 1.5em;\n padding: 0;\n width: 1.5em;\n }\n .kol-table__selection-input--radio:before {\n border-radius: 100%;\n margin: auto;\n height: 0.75em;\n width: 0.75em;\n }\n .kol-table__selection-input--radio:checked:before {\n background-color: #000;\n }\n @media (forced-colors: active) {\n .kol-table__selection-input--radio:checked:before {\n /* Give it a visible background in forced colors mode */\n background-color: selectedItem !important;\n }\n }\n}\n@layer kol-component {\n :host {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n .kol-table-stateful__pagination, .kol-table-stateful__pagination-wrapper {\n display: grid;\n place-items: center;\n }\n @media (min-width: 1024px) {\n .kol-table-stateful__pagination, .kol-table-stateful__pagination-wrapper {\n grid-auto-flow: column;\n }\n }\n .kol-pagination {\n display: flex;\n flex-wrap: wrap;\n }\n @media (min-width: 1024px) {\n .kol-pagination {\n display: flex;\n }\n }\n @media (max-width: 1024px) {\n .kol-pagination {\n flex-direction: column;\n }\n }\n}"}},7125:(t,n,e)=>{e.d(n,{S:()=>l,a:()=>a,b:()=>i,i:()=>o});const i=t=>"object"==typeof t&&null!==t,o=(t,n=0)=>"string"==typeof t&&t.length>=n,a=t=>{if("object"!=typeof t||null===t)return o(t,1);for(const n in t)if(!1===o(n,1))return!1;return!0},l=new Event("StateChange")}}]);
|
|
2
|
+
"use strict";(self.webpackChunk_public_ui_sample_react=self.webpackChunk_public_ui_sample_react||[]).push([[6984],{792:(t,n,e)=>{e.d(n,{a:()=>s,b:()=>r,c:()=>a,d:()=>h,e:()=>o,v:()=>l});var i=e(257);const o=(t,n)=>{(0,i.w)(t,"_on",(t=>"object"==typeof t&&null!==t),new Set(["TableCallbacksPropType {Events.onSort, Events.onSelectionChange}"]),n)},a=(t,n)=>{(0,i.w)(t,"_on",(t=>"object"==typeof t&&null!==t),new Set(["TableStatefulCallbacksPropType {Events.onSelectionChange}"]),n)},l=(t,n,e)=>{(0,i.M)(n,(()=>{(0,i.o)(n,(()=>{void 0===n&&(n=[]);try{n=(0,i.j)(n)}catch(t){}Array.isArray(n)&&n.every((t=>"object"==typeof t&&null!==t))&&(0,i.k)(t,"_data",n,e)}))}))},s=(t,n,e)=>{(0,i.M)(n,(()=>{(0,i.o)(n,(()=>{void 0===n&&(n=[]);try{n=(0,i.j)(n)}catch(t){}Array.isArray(n)&&n.every((t=>"object"==typeof t&&null!==t))&&(0,i.k)(t,"_dataFoot",n,e)}))}))},r=(t,n)=>{var e;(e="string"==typeof n?(()=>{try{return(0,i.j)(n)}catch(t){return}})():n)&&(0,i.v)(e)&&"function"==typeof e.label&&(!e.selectedKeys||Array.isArray(e.selectedKeys))&&(0,i.k)(t,"_selection",n)},h=(t,n)=>{(0,i.w)(t,"_tableSettings",(t=>"object"==typeof t&&null!==t),new Set(["TableSettings"]),n)}},3472:(t,n,e)=>{e.d(n,{a:()=>d,b:()=>s,c:()=>r,h:()=>o,v:()=>c});var i=e(257);const o=[0,1,2,3,4,5,6],a=/[a-zA-Z0-9äöüÄÖÜß]/g,l=/^\d+$/;function s(t,n=1){return function(t){var n;return"string"==typeof t&&(null===(n=t.match(a))||void 0===n?void 0:n.length)||0}(t)>=n}function r(t){return l.test(t)}const h=new Set(["string"]),c=(t,n,e={})=>{(0,i.w)(t,"_label",(t=>"string"==typeof t),h,n,function(t){var n;return Object.assign(Object.assign({},t),{hooks:{afterPatch:(n,e,o,a)=>{var l,h;"function"==typeof(null===(l=t.hooks)||void 0===l?void 0:l.afterPatch)&&(null===(h=t.hooks)||void 0===h||h.afterPatch(n,e,o,a)),"string"==typeof n&&!1===s(n,3)&&!1===r(n)&&(0,i.b)(`The heading or label ("${n}") is not accessible. A label should consist of at least three readable characters.`),"string"==typeof n&&n.length>80&&(0,i.u)("A heading or label should not be longer than 80 characters.")},beforePatch:null===(n=t.hooks)||void 0===n?void 0:n.beforePatch}})}(e))},d=c},3571:(t,n,e)=>{var i,o,a,l;e.d(n,{C:()=>i,K:()=>a}),(o=i||(i={})).onBlur="onBlur",o.onChange="onChange",o.onChangePage="onChangePage",o.onClick="onClick",o.onClose="onClose",o.onDblClick="onDblClick",o.onFocus="onFocus",o.onInput="onInput",o.onKeyDown="onKeyDown",o.onKeyPress="onKeyPress",o.onKeyUp="onKeyUp",o.onMouseDown="onMouseDown",o.onMouseMove="onMouseMove",o.onMouseOut="onMouseOut",o.onMouseOver="onMouseOver",o.onMouseUp="onMouseUp",o.onReset="onReset",o.onSelect="onSelect",o.onSelectionChange="onSelectionChange",o.onChangePageSize="onChangePageSize",o.onSort="onSort",o.onSubmit="onSubmit",o.onToggle="onToggle",(l=a||(a={})).ArrowDown="ArrowDown",l.ArrowLeft="ArrowLeft",l.ArrowRight="ArrowRight",l.ArrowUp="ArrowUp",l.Enter="Enter",l.Space=" "},6984:(t,n,e)=>{e.r(n),e.d(n,{kol_table_stateful:()=>u});var i=e(6733),o=e(1698),a=e(9272),l=e(257),s=e(3571),r=e(3694),h=e(792),c=e(3472);e(4269);const d=["top","bottom","both"],p=[10,20,50,100],g=t=>!0===t||""===t||"object"==typeof t&&null!==t,u=class{constructor(t){(0,i.r)(this,t),this.catchRef=t=>{this.tableWcRef=t},this.sortData=[],this.showPagination=!1,this.pageStartSlice=0,this.pageEndSlice=10,this.disableSort=!1,this.handlePagination={onClick:(t,n)=>{var e;"function"==typeof(null===(e=this.state._pagination._on)||void 0===e?void 0:e.onClick)&&this.state._pagination._on.onClick(t,n),(0,l.k)(this,"_pagination",Object.assign(Object.assign({},this.state._pagination),{_page:n}))},onChangePage:(t,n)=>{var e;"function"==typeof(null===(e=this.state._pagination._on)||void 0===e?void 0:e.onChangePage)&&this.state._pagination._on.onChangePage(t,n),(0,l.k)(this,"_pagination",Object.assign(Object.assign({},this.state._pagination),{_page:n}))},onChangePageSize:(t,n)=>{var e;"function"==typeof(null===(e=this.state._pagination._on)||void 0===e?void 0:e.onChangePageSize)&&this.state._pagination._on.onChangePageSize(t,n),(0,l.k)(this,"_pagination",Object.assign(Object.assign({},this.state._pagination),{_pageSize:n})),(0,l.k)(this,"_pageSize",n)}},this.onSelectionChange=t=>{t.stopPropagation()},this.updateSortedData=()=>{if(this.disableSort)return void(0,l.k)(this,"_sortedData",this.state._data);const t=[...this.state._data];this.sortData.length>0&&t.sort(((t,n)=>{for(let e=0;e<this.sortData.length;e++){const i=this.sortData[e],o=i.compareFn(t,n);if(0!==o)return"ASC"===i.direction?o:-o}return 0})),(0,l.k)(this,"_sortedData",t)},this._allowMultiSort=void 0,this._data=void 0,this._dataFoot=void 0,this._headers=void 0,this._label=void 0,this._minWidth=void 0,this._pagination=void 0,this._paginationPosition="bottom",this._selection=void 0,this._on=void 0,this._tableSettings=void 0,this.state={_allowMultiSort:!1,_data:[],_dataFoot:[],_headers:{horizontal:[],vertical:[]},_label:"",_minWidth:"auto",_pagination:{_page:1,_pageSize:10,_max:0},_sortedData:[],_paginationPosition:"bottom"}}validateAllowMultiSort(t){(0,l.w)(this,"_allowMultiSort",(()=>!0),new Set(["boolean"]),t,{defaultValue:!1})}validateData(t){(0,h.v)(this,t,{afterPatch:()=>{setTimeout(this.updateSortedData)}})}validateDataFoot(t){(0,h.a)(this,t,{afterPatch:()=>{setTimeout(this.updateSortedData)}})}validatePaginationPosition(t){((t,n)=>{(0,l.w)(t,"_paginationPosition",(t=>"string"==typeof t&&d.includes(t)),new Set([`PaginationPositionPropType {${d.join(", ")}`]),n,{defaultValue:"bottom"})})(this,t)}changeCellSort(t){var n;if("function"==typeof t.compareFn){this.state._allowMultiSort||t.key==(null===(n=this.sortData[0])||void 0===n?void 0:n.key)||(this.sortData=[]);const e=this.sortData.findIndex((n=>n.key===t.key));if(e>=0){const t=this.sortData[e];switch(t.direction){case"ASC":t.direction="DESC";break;case"DESC":this.sortData.splice(e,1);break;default:t.direction="ASC"}}else t.key&&this.sortData.push({label:t.label,key:t.key,compareFn:t.compareFn,direction:"ASC"});this.updateSortedData()}}validateHeaders(t){(0,l.M)(t,(()=>{(0,l.o)(t,(()=>{try{t=(0,l.j)(t)}catch(t){}(0,l.w)(this,"_headers",(t=>"object"==typeof t&&null!==t),new Set(["KoliBriTableHeaders"]),t,{hooks:{beforePatch:t=>{var n,e,i,o;const a=t=>{let n=!1;t.forEach((t=>{const e=t.key;if(!e)return;const i=t.sortDirection;"ASC"!==i&&"DESC"!==i||"function"==typeof t.compareFn&&((this.state._allowMultiSort||0===this.sortData.length)&&this.sortData.push({label:t.label,key:e,compareFn:t.compareFn,direction:i}),n=!0)})),n&&setTimeout((()=>this.updateSortedData()))},s=t;null===(n=s.horizontal)||void 0===n||n.forEach(a),null===(e=s.vertical)||void 0===e||e.forEach(a),s.horizontal&&s.vertical&&(null===(i=s.horizontal)||void 0===i?void 0:i.length)>0&&(null===(o=s.vertical)||void 0===o?void 0:o.length)>0&&(this.disableSort=!0,(0,l.D)("Table: You can not sort the table data, if horizontal and vertical headers are defined at the same time. (https://github.com/public-ui/kolibri/issues/2372)"))}}})}))}))}validateLabel(t){(0,c.v)(this,t,{required:!0})}validateMinWidth(t){(0,l.A)(this,"_minWidth",t,{defaultValue:void 0})}validateSelection(t){(0,h.b)(this,t)}validateOn(t){(0,h.c)(this,t)}validateTableSettings(t){(0,h.d)(this,t)}validatePagination(t){try{t=(0,l.j)(t)}catch(t){}this.showPagination=g(t),(0,l.w)(this,"_pagination",g,new Set(["boolean","KoliBriTablePagination"]),t,{defaultValue:{_page:1,_pageSize:10,_max:0}})}componentDidLoad(){var t;null===(t=this.tableWcRef)||void 0===t||t.addEventListener(r.K.selectionChange,this.onSelectionChange)}disconnectedCallback(){var t;null===(t=this.tableWcRef)||void 0===t||t.removeEventListener(r.K.selectionChange,this.onSelectionChange)}componentWillLoad(){this.validateAllowMultiSort(this._allowMultiSort),this.validateData(this._data),this.validateDataFoot(this._dataFoot),this.validateHeaders(this._headers),this.validateLabel(this._label),this.validateMinWidth(this._minWidth),this.validateOn(this._on),this.validatePagination(this._pagination),this.validatePaginationPosition(this._paginationPosition),this.validateSelection(this._selection),this.validateTableSettings(this._tableSettings)}selectDisplayedData(t,n,e){return"number"==typeof n&&n>0&&"number"==typeof e&&e>0?(this.pageStartSlice=n*(e-1),this.pageEndSlice=n*e>t.length?t.length:n*e,t.slice(this.pageStartSlice,this.pageEndSlice)):(this.pageStartSlice=0,this.pageEndSlice=t.length,t)}renderPagination(t){const n=(0,a.t)("kol-table-pagination-label",{placeholders:{label:`${this.state._label} (${(0,a.t)(`kol-pagination-position-${t}`)})`}});return(0,i.h)("div",{class:`kol-table-stateful__pagination kol-table-stateful__pagination--${this.state._paginationPosition}`},(0,i.h)("span",null,(0,a.t)("kol-table-visible-range",{placeholders:{start:this.pageEndSlice>0?(this.pageStartSlice+1).toString():"0",end:this.pageEndSlice.toString(),total:this.state._pagination&&this.state._pagination._max>0?this.state._pagination._max.toString():Array.isArray(this.state._data)?this.state._data.length.toString():"0"}})),(0,i.h)("div",{class:"kol-table-stateful__pagination-wrapper"},(0,i.h)(o.l,{class:"test",_boundaryCount:this.state._pagination._boundaryCount,_customClass:this.state._pagination._customClass,_on:this.handlePagination,_page:this.state._pagination._page,_pageSize:this.state._pagination._pageSize,_pageSizeOptions:this.state._pagination._pageSizeOptions||p,_siblingCount:this.state._pagination._siblingCount,_tooltipAlign:"bottom",_max:this.state._pagination._max||this.state._pagination._max||this.state._data.length,_label:n})))}getHeaderCellSortState(t){if(!this.disableSort&&"function"==typeof t.compareFn){if(t.key){const n=this.sortData.find((n=>n.key===t.key));if(null==n?void 0:n.direction)return n.direction}return"NOS"}}handleSort({key:t}){const n=[...(this.state._headers.horizontal||[]).flat(),...(this.state._headers.vertical||[]).flat()].find((n=>n.key===t));n&&this.changeCellSort(n)}getSelectedData(t){var n;const e=this.state._selection;if(e){const i=null!==(n=e.keyPropertyName)&&void 0!==n?n:"id",o=this.state._sortedData.filter((n=>t.includes(n[i])));if(!1===(null==e?void 0:e.multiple))return o[0];if(i)return o}return null}handleSelectionChange(t,n){var e;const i=this.state._selection;i&&(this.state=Object.assign(Object.assign({},this.state),{_selection:Object.assign(Object.assign({},i),{selectedKeys:"object"==typeof n?n:[n]})}));const o=this.getSelectedData(n);"function"==typeof(null===(e=this.state._on)||void 0===e?void 0:e[s.C.onSelectionChange])&&this.state._on[s.C.onSelectionChange](t,o),this.host&&(0,r.d)(this.host,r.K.selectionChange,o)}getSelection(){return t=this,n=function*(){var t;const n=(null===(t=this.state._selection)||void 0===t?void 0:t.selectedKeys)||[];return this.getSelectedData(n)},new Promise(((e,i)=>{var o=t=>{try{l(n.next(t))}catch(t){i(t)}},a=t=>{try{l(n.throw(t))}catch(t){i(t)}},l=t=>t.done?e(t.value):Promise.resolve(t.value).then(o,a);l((n=n.apply(t,null)).next())}));var t,n}render(){var t,n,e,a,l,s;const r=this.selectDisplayedData(this.state._sortedData,this.showPagination?null!==(n=null===(t=this.state._pagination)||void 0===t?void 0:t._pageSize)&&void 0!==n?n:10:this.state._sortedData.length,this.state._pagination._page||1),h="top"===this._paginationPosition||"both"===this._paginationPosition?this.renderPagination("top"):null,c="bottom"===this._paginationPosition||"both"===this._paginationPosition?this.renderPagination("bottom"):null,d={horizontal:null!==(a=null===(e=this.state._headers.horizontal)||void 0===e?void 0:e.map((t=>t.map((t=>Object.assign(Object.assign({},t),{sortDirection:this.getHeaderCellSortState(t)}))))))&&void 0!==a?a:[],vertical:null!==(s=null===(l=this.state._headers.vertical)||void 0===l?void 0:l.map((t=>t.map((t=>Object.assign(Object.assign({},t),{sortDirection:this.getHeaderCellSortState(t)}))))))&&void 0!==s?s:[]};return(0,i.h)(i.H,{key:"28ef6723c730e6f9a52694c65b984b27b97bbe43",class:"kol-table-stateful"},this.pageEndSlice>0&&this.showPagination&&h,(0,i.h)(o.m,{key:"78fcf96661bd3e57bc41fbc3523096e7de513eeb",ref:this.catchRef,_data:r,_headerCells:d,_label:this.state._label,_dataFoot:this.state._dataFoot,_minWidth:this.state._minWidth,_on:{onSort:(t,n)=>{this.handleSort(n)},onSelectionChange:(t,n)=>{this.handleSelectionChange(t,n)}},_selection:this.state._selection,_tableSettings:this.state._tableSettings}),this.pageEndSlice>0&&this.showPagination&&c)}get host(){return(0,i.g)(this)}static get watchers(){return{_allowMultiSort:["validateAllowMultiSort"],_data:["validateData"],_dataFoot:["validateDataFoot"],_paginationPosition:["validatePaginationPosition"],_headers:["validateHeaders"],_label:["validateLabel"],_minWidth:["validateMinWidth"],_selection:["validateSelection"],_on:["validateOn"],_tableSettings:["validateTableSettings"],_pagination:["validatePagination"]}}};u.style={default:"@charset \"UTF-8\";\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]) {\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n }\n}\n/**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n.visually-hidden {\n clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: calc(1rem / var(--kolibri-root-font-size, 16));\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: calc(1rem / var(--kolibri-root-font-size, 16));\n}\n\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n border: none;\n margin: 0;\n padding: 0;\n width: 100%;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n background-color: lightgray;\n color: black;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: grid;\n place-items: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n :host {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n animation-duration: 0.25s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n box-sizing: border-box;\n display: none;\n position: fixed;\n visibility: hidden;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n max-width: 90vw;\n max-height: 90vh;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width);\n }\n .kol-tooltip__arrow {\n background-color: #fff;\n color: #000;\n height: calc(10rem / var(--kolibri-root-font-size, 16));\n position: absolute;\n transform: rotate(45deg);\n width: calc(10rem / var(--kolibri-root-font-size, 16));\n z-index: 999;\n }\n .kol-tooltip__content {\n background-color: #fff;\n color: #000;\n position: relative;\n z-index: 1000;\n }\n @keyframes fadeInOpacity {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n .kol-alert {\n display: grid;\n }\n .kol-alert__container {\n place-items: center;\n display: flex;\n }\n .kol-alert__container-content {\n flex-grow: 1;\n }\n .kol-alert__closer {\n /* Visible with forced colors */\n outline: transparent solid calc(1rem / var(--kolibri-root-font-size, 16));\n }\n}\n@layer kol-component {\n :host {\n display: inline-block;\n }\n .kol-button {\n font-style: calc(16rem / var(--kolibri-root-font-size, 16));\n display: inline-flex;\n place-items: center;\n text-align: center;\n text-decoration-line: none;\n }\n .kol-button::before {\n /* Render zero-width character as first element to set the baseline correctly. */\n content: \"\";\n }\n .kol-button__text {\n margin: auto;\n width: 100%;\n }\n}\n@layer kol-component {\n .kol-popover-button__button {\n display: inline-block;\n }\n .kol-popover-button__popover {\n border: 1px solid #000;\n margin: 0;\n padding: 0;\n }\n}\n@layer kol-component {\n .kol-table-settings {\n background: #fff;\n position: absolute;\n right: 0;\n top: 0;\n z-index: 1;\n }\n .kol-table-settings__columns-container {\n margin-top: calc(16rem / var(--kolibri-root-font-size, 16));\n max-height: calc(200rem / var(--kolibri-root-font-size, 16));\n overflow: auto;\n }\n .kol-table-settings__columns {\n align-items: center;\n display: grid;\n gap: calc(8rem / var(--kolibri-root-font-size, 16));\n grid-auto-rows: min-content;\n grid-template-columns: min-content 1fr calc(100rem / var(--kolibri-root-font-size, 16)) auto auto;\n overflow: hidden;\n }\n .kol-table-settings__column {\n display: contents;\n }\n}\n@layer kol-component {\n .kol-table {\n display: block;\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n max-width: 100%;\n position: relative;\n }\n .kol-table__scroll-container {\n overflow-x: auto;\n overflow-y: hidden;\n }\n .kol-table__table {\n width: 100%;\n }\n .kol-table__caption {\n text-align: start;\n min-height: var(--a11y-min-size);\n padding-right: var(--a11y-min-size);\n }\n .kol-table__focus-element {\n font-size: 0;\n }\n .kol-table__focus-element:focus {\n outline: 0 !important;\n /* @see https://remysharp.com/til/css/focus-ring-default-styles */\n outline: 5px auto Highlight;\n outline: 5px auto -webkit-focus-ring-color;\n outline-offset: 2px;\n }\n .kol-table__sort-button .kol-button {\n color: inherit;\n }\n .kol-table__body {\n text-align: left;\n }\n .kol-table__body .kol-button__text {\n justify-items: start;\n }\n .kol-table__cell--align-left {\n text-align: left;\n }\n .kol-table__cell--align-left .kol-button__text {\n justify-items: start;\n }\n .kol-table__cell--align-center {\n text-align: center;\n }\n .kol-table__cell--align-center .kol-button__text {\n justify-items: center;\n }\n .kol-table__cell--align-right {\n text-align: right;\n }\n .kol-table__cell--align-right .kol-button__text {\n justify-items: end;\n }\n .kol-table__cell--selection {\n width: var(--a11y-min-size);\n height: var(--a11y-min-size);\n white-space: nowrap;\n }\n .kol-table__spacer {\n display: none;\n }\n .kol-table__selection-label {\n align-items: center;\n cursor: pointer;\n display: flex;\n height: var(--a11y-min-size);\n justify-content: center;\n position: relative;\n width: var(--a11y-min-size);\n }\n .kol-table__selection-label--disabled {\n cursor: not-allowed;\n }\n .kol-table__selection-icon {\n display: block;\n inset: auto;\n position: absolute;\n z-index: 1;\n }\n .kol-table__selection-input {\n appearance: none;\n border-style: solid;\n cursor: pointer;\n margin: 0;\n }\n .kol-table__selection-input:disabled {\n cursor: not-allowed;\n }\n .kol-table__selection-input:before {\n content: \"\";\n }\n .kol-table__selection-input--checkbox {\n position: relative;\n display: flex;\n height: calc(var(--a11y-min-size) / 2);\n width: calc(var(--a11y-min-size) / 2);\n align-items: center;\n justify-content: center;\n background-color: rgb(255, 255, 255);\n border-width: 2px;\n line-height: 1.5;\n transition: all 0.5s ease 0s;\n }\n .kol-table__selection-input--radio {\n display: flex;\n border-width: 2px;\n border-radius: 100%;\n height: 1.5em;\n min-height: 1.5em;\n min-width: 1.5em;\n padding: 0;\n width: 1.5em;\n }\n .kol-table__selection-input--radio:before {\n border-radius: 100%;\n margin: auto;\n height: 0.75em;\n width: 0.75em;\n }\n .kol-table__selection-input--radio:checked:before {\n background-color: #000;\n }\n @media (forced-colors: active) {\n .kol-table__selection-input--radio:checked:before {\n /* Give it a visible background in forced colors mode */\n background-color: selectedItem !important;\n }\n }\n}\n@layer kol-component {\n :host {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n .kol-table-stateful__pagination, .kol-table-stateful__pagination-wrapper {\n display: grid;\n place-items: center;\n }\n @media (min-width: 1024px) {\n .kol-table-stateful__pagination, .kol-table-stateful__pagination-wrapper {\n grid-auto-flow: column;\n }\n }\n .kol-pagination {\n display: flex;\n flex-wrap: wrap;\n }\n @media (min-width: 1024px) {\n .kol-pagination {\n display: flex;\n }\n }\n @media (max-width: 1024px) {\n .kol-pagination {\n flex-direction: column;\n }\n }\n}"}},9272:(t,n,e)=>{e.d(n,{t:()=>a});var i=e(4269),o=e(257);let a=(t,n)=>{var e;return(null!==(e=(0,i.g)())&&void 0!==e?e:(0,i.i)("de")).translate(t,n)};"test"===o.p&&(a=t=>t)}}]);
|
package/dist/7013.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see 7013.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunk_public_ui_sample_react=self.webpackChunk_public_ui_sample_react||[]).push([[7013],{114:(e,t,n)=>{n.d(t,{I:()=>w,K:()=>y,a:()=>g});var o=n(7386),i=n(7622),a=n(1476),l=n(1111),s=n(7763),r=n(4451),d=n(8045),c=n(6171),h=n(9688),u=n(3892),p=n(7125);const m=(e,t)=>{var{position:n="start",class:i}=e,a=(0,l._)(e,["position","class"]);const s="kol-input-container__adornment",r=`${s}--${n}`;return(0,o.h)("div",Object.assign({class:(0,d.c)(s,r,i)},a),t)};function b(e){return!!e&&(Array.isArray(e)?e.length>0:Boolean(e))}const v=(e,t)=>{var{class:n}=e,i=(0,l._)(e,["class"]);return(0,o.h)("div",Object.assign({class:(0,d.c)("kol-input-container__container",n)},i),t)},_=(e,t)=>{const{class:n,startAdornment:i,endAdornment:a,disabled:s,msg:r,touched:h,containerProps:u,startAdornmentProps:p,endAdornmentProps:_}=e,f=(0,l._)(e,["class","startAdornment","endAdornment","disabled","msg","touched","containerProps","startAdornmentProps","endAdornmentProps"]),g=(0,c.c)(r,h),y={"kol-input-container--disabled":s,[`kol-input-container--${(null==r?void 0:r.type)||"error"}`]:g},k=Object.assign({class:(0,d.c)("kol-input-container",y,n)},f);return b(i)||b(a)?(0,o.h)("div",Object.assign({},k),(0,o.h)(m,Object.assign({},p,{position:"start"}),i),(0,o.h)(v,Object.assign({},u),t),(0,o.h)(m,Object.assign({},_,{position:"end"}),a)):(0,o.h)("div",Object.assign({},k),(0,o.h)(v,Object.assign({},u),t))},f=e=>{const{label:t,icons:n,hideLabel:i,disabled:a,onClick:r}=e,d=(0,l._)(e,["label","icons","hideLabel","disabled","onClick"]);return(0,o.h)(s.a,Object.assign({_label:t,_disabled:a,_icons:n,_hideLabel:i,_on:{onClick:r}},d))},g=e=>{const{componentName:t="button",label:n,icon:i,onClick:a}=e,s=(0,l._)(e,["componentName","label","icon","onClick"]),d="button"===t?f:r.K;return(0,o.h)(d,Object.assign({label:n||"",hideLabel:!0,icons:`codicon codicon-${i}`,onClick:a},s))},y=({state:e,endAdornment:t},n)=>{const{icons:l,smartButton:s,disabled:r,msg:d,touched:h}=function(e){let t,n;return"_icons"in e&&(t=e._icons),"_smartButton"in e&&(n=e._smartButton),{icons:t,smartButton:n,disabled:e._disabled,msg:(0,c.a)(e._msg),touched:e._touched}}(e);let u=null==l?void 0:l.left;(0,i.i)(u)&&(u={icon:u});let p=null==l?void 0:l.right;(0,i.i)(p)&&(p={icon:p});const m=[],b=[];return t&&(Array.isArray(t)?b.push(...t):b.push(t)),u&&m.push((0,o.h)(g,Object.assign({componentName:"icon",class:"kol-input-container__icon"},(0,a.i)(u)?u:{}))),(0,a.i)(s)&&b.push((0,o.h)(g,Object.assign({componentName:"button",class:"kol-input-container__smart-button"},s,{hideLabel:!0,disabled:r}))),p&&b.push((0,o.h)(g,Object.assign({componentName:"icon",class:"kol-input-container__icon"},(0,a.i)(p)?p:{}))),(0,o.h)(_,{disabled:r,msg:d,touched:h,startAdornment:m,endAdornment:b},n)},k=(e,t)=>{const n=e;"object"==typeof n&&null!==n&&((0,p.i)(n.right,1)&&(n.right={icon:n.right}),(0,p.i)(n.left,1)&&(n.left={icon:n.left}),t.set("_icons",n))};class w extends c.I{constructor(e,t,n){super(e,t,n),this.component=e}validateIcons(e){(0,u.o)(e,(()=>{try{e=(0,u.p)(e)}catch(e){}(0,u.w)(this.component,"_icons",(e=>"object"==typeof e&&null!==e&&((0,p.i)(e.left,1)||(0,h.i)(e.left)||(0,p.i)(e.right,1)||(0,h.i)(e.right))),new Set(["KoliBriHorizontalIcon"]),e,{hooks:{beforePatch:k},required:!0})}))}componentWillLoad(){super.componentWillLoad(),this.validateIcons(this.component._icons)}}},131:(e,t,n)=>{n.d(t,{K:()=>s});var o=n(1111),i=n(7386),a=n(8045),l=n(6171);const s=e=>{const{class:t,msg:n,required:s,disabled:r,touched:d,readonly:c,ariaDescribedBy:h,hideLabel:u,label:p,suggestions:m,value:b}=e,v=(0,o._)(e,["class","msg","required","disabled","touched","readonly","ariaDescribedBy","hideLabel","label","suggestions","value"]),_=(0,l.c)(n,d),f={"kol-input--disabled":Boolean(r),"kol-input--required":Boolean(s),"kol-input--touched":Boolean(d),"kol-input--readonly":Boolean(c),[`kol-input--${(null==n?void 0:n.type)||"error"}`]:_},g=Object.assign(Object.assign({class:(0,a.c)("kol-input",f,t),required:s,disabled:r,readonly:c,type:"text",list:m?`${v.id}-list`:void 0},(0,l.f)({ariaDescribedBy:h,hideLabel:u,label:p})),v);return(0,i.h)(i.F,null,(0,i.h)("input",Object.assign({},g,{value:b})),m)}},1476:(e,t,n)=>{function o(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}n.d(t,{i:()=>o})},2878:(e,t,n)=>{n.d(t,{v:()=>i});var o=n(3892);const i=(e,t)=>{(0,o.g)(e,"_suggestions",(e=>"string"==typeof e||"number"==typeof e),t,void 0,{hooks:{afterPatch:e=>{Array.isArray(e)&&e.length&&(0,o.a)("Property suggestions: Options have accessibility issues in how browsers implemented them and should not be used for now.")}}})}},4451:(e,t,n)=>{n.d(t,{K:()=>a});var o=n(7386),i=n(7763);const a=e=>{const{class:t,style:n,icons:a,label:l,onClick:s}=e;return(0,o.h)(i.d,{class:t,style:n,onClick:s,_icons:a,_label:l})}},4640:(e,t,n)=>{n.d(t,{K:()=>r,a:()=>s});var o=n(1111),i=n(7386),a=n(6171),l=n(131);const s=e=>{var{id:t,suggestions:n}=e,a=(0,o._)(e,["id","suggestions"]);return n?(0,i.h)("datalist",Object.assign({id:`${t}-list`},a),n.map((e=>(0,i.h)("option",{value:e})))):null},r=e=>{var{state:t,customSuggestions:n}=e,r=(0,o._)(e,["state","customSuggestions"]);return(0,i.h)(l.K,Object.assign({},function(e,t){const{ariaDescribedBy:n}=(0,a.g)(e),o={id:e._id,hideLabel:e._hideLabel,label:e._label,accessKey:e._accessKey,disabled:e._disabled,name:e._name,ariaDescribedBy:n};return"_type"in e&&(o.type=e._type),"_value"in e&&(o.value=e._value),"_required"in e&&(o.required=e._required),"_maxLength"in e&&(o.maxlength=e._maxLength),"_placeholder"in e&&(o.placeholder=e._placeholder),"_autoComplete"in e&&(o.autoComplete=e._autoComplete),"_spellCheck"in e&&(o.spellcheck=e._spellCheck),"_pattern"in e&&(o.pattern=e._pattern),"_readOnly"in e&&(o.readonly=e._readOnly),"_min"in e&&(o.min=e._min),"_max"in e&&(o.max=e._max),"_step"in e&&(o.step=e._step),"_multiple"in e&&(o.multiple=e._multiple),"_checked"in e&&(o.checked=e._checked),"_indeterminate"in e&&(o.indeterminate=e._indeterminate),"_touched"in e&&(o.touched=e._touched),"_msg"in e&&(o.msg=(0,a.a)(e._msg)),"_suggestions"in e&&!t&&Array.isArray(e._suggestions)&&e._suggestions.length>0&&(o.suggestions=(0,i.h)(s,{id:e._id,suggestions:e._suggestions})),o}(t,n),r))}},7013:(e,t,n)=>{n.r(t),n.d(t,{kol_input_number:()=>m});var o=n(7386),i=n(8045),a=n(4208),l=n(9293),s=n(114),r=n(3892),d=n(2878),c=n(4640),h=n(6171),u=(e,t,n)=>new Promise(((o,i)=>{var a=e=>{try{s(n.next(e))}catch(e){i(e)}},l=e=>{try{s(n.throw(e))}catch(e){i(e)}},s=e=>e.done?o(e.value):Promise.resolve(e.value).then(a,l);s((n=n.apply(e,t)).next())}));class p extends s.I{constructor(e,t,n){super(e,t,n),this.numberOrIsoDateRegex=/^\d+$|(^\d{4}-([0]\d|1[0-2])-([0-2]\d|3[01])([T ][0-2]\d:[0-5]\d:[0-5]\d(?:\.\d+)?([+-][0-2]\d:[0-5]\d|Z)?)?$)|(^[0-2]\d:[0-5]\d(:[0-5]\d)?$)/,this.parseToString=e=>"string"==typeof e?e:"number"==typeof e?`${e}`:"object"==typeof e&&e instanceof Date?e.toISOString():"",this.validateIso8601=(e,t,n)=>{const o=parseFloat(t),i=o==t;return(0,r.w)(this.component,e,(e=>void 0===e||""===e||i&&"number"==typeof o||this.numberOrIsoDateRegex.test(e)),new Set(["number","Date","string{ISO-8601}"]),this.parseToString(t),{hooks:{afterPatch:e=>{"string"==typeof e&&n&&n(e)}}})},this.component=e}validateAutoComplete(e){(0,r.w)(this.component,"_autoComplete",(e=>"string"==typeof e&&("on"===e||"off"===e)),new Set(["on | off"]),e)}validateSuggestions(e){(0,d.v)(this.component,e)}onChange(e){super.onChange(e),!!e.target.value!=!!this.component._value&&(this.component._value=parseFloat(e.target.value))}validateMax(e){this.validateIso8601("_max",e)}validateMin(e){this.validateIso8601("_min",e)}validatePlaceholder(e){(0,r.i)(this.component,"_placeholder",e)}validateReadOnly(e){(0,r.b)(this.component,"_readOnly",e)}validateRequired(e){(0,r.b)(this.component,"_required",e)}validateStep(e){(0,r.k)(this.component,"_step",e)}validateValue(e){this.validateValueEx(e)}validateValueEx(e,t){this.validateIso8601("_value",e,t),this.setFormAssociatedValue(this.component.state._value)}componentWillLoad(){super.componentWillLoad(),this.validateAutoComplete(this.component._autoComplete),this.validateMax(this.component._max),this.validateMin(this.component._min),this.validateSuggestions(this.component._suggestions),this.validatePlaceholder(this.component._placeholder),this.validateReadOnly(this.component._readOnly),this.validateRequired(this.component._required),this.validateStep(this.component._step),this.validateValue(this.component._value)}}const m=class{getValue(){return u(this,null,(function*(){var e;return null===(e=this.inputRef)||void 0===e?void 0:e.value}))}kolFocus(){return u(this,null,(function*(){var e;null===(e=this.inputRef)||void 0===e||e.focus()}))}getFormFieldProps(){return{state:this.state,class:(0,i.c)("kol-input-number","number",{"has-value":this.state._hasValue}),tooltipAlign:this._tooltipAlign,onClick:()=>{var e;return null===(e=this.inputRef)||void 0===e?void 0:e.focus()},alert:this.showAsAlert()}}getInputProps(){return Object.assign(Object.assign({ref:this.catchRef,state:this.state,type:"number"},this.controller.onFacade),{onInput:this.onInput,onKeyDown:this.onKeyDown,onFocus:e=>{this.controller.onFacade.onFocus(e),this.inputHasFocus=!0},onBlur:e=>{this.controller.onFacade.onBlur(e),this.inputHasFocus=!1}})}render(){return(0,o.h)(h.K,Object.assign({key:"56dad7cc43b19c34fe38c7cdd5a8e5d36902a924"},this.getFormFieldProps()),(0,o.h)(s.K,{key:"fbcc6e3fd5d51d64cf022bfa5bd8f84712c69354",state:this.state},(0,o.h)(c.K,Object.assign({key:"099d76ef245d59934481bbeddadaa5a38e11ea3d"},this.getInputProps()))))}constructor(e){(0,o.r)(this,e),this.catchRef=e=>{this.inputRef=e},this.onInput=e=>{var t;this._value=Number(null===(t=this.inputRef)||void 0===t?void 0:t.value),this.controller.onFacade.onInput(e)},this.onKeyDown=e=>{"Enter"!==e.code&&"NumpadEnter"!==e.code||(0,l.p)({form:this.host,ref:this.inputRef})},this._accessKey=void 0,this._autoComplete=void 0,this._disabled=!1,this._hideMsg=!1,this._hideLabel=!1,this._hint="",this._icons=void 0,this._id=void 0,this._label=void 0,this._max=void 0,this._min=void 0,this._msg=void 0,this._name=void 0,this._on=void 0,this._placeholder=void 0,this._readOnly=!1,this._required=!1,this._shortKey=void 0,this._smartButton=void 0,this._suggestions=void 0,this._step=void 0,this._syncValueBySelector=void 0,this._tooltipAlign="top",this._touched=!1,this._value=void 0,this.state={_autoComplete:"off",_hasValue:!1,_hideMsg:!1,_id:`id-${(0,a.n)()}`,_label:"",_suggestions:[]},this.inputHasFocus=!1,this.controller=new p(this,"number",this.host)}showAsAlert(){return Boolean(this.state._touched)&&!this.inputHasFocus}validateAccessKey(e){this.controller.validateAccessKey(e)}validateAutoComplete(e){this.controller.validateAutoComplete(e)}validateDisabled(e){this.controller.validateDisabled(e)}validateHideMsg(e){this.controller.validateHideMsg(e)}validateHideLabel(e){this.controller.validateHideLabel(e)}validateHint(e){this.controller.validateHint(e)}validateIcons(e){this.controller.validateIcons(e)}validateId(e){this.controller.validateId(e)}validateLabel(e){this.controller.validateLabel(e)}validateMax(e){this.controller.validateMax(e)}validateMin(e){this.controller.validateMin(e)}validateMsg(e){this.controller.validateMsg(e)}validateName(e){this.controller.validateName(e)}validateOn(e){this.controller.validateOn(e)}validatePlaceholder(e){this.controller.validatePlaceholder(e)}validateReadOnly(e){this.controller.validateReadOnly(e)}validateRequired(e){this.controller.validateRequired(e)}validateShortKey(e){this.controller.validateShortKey(e)}validateSmartButton(e){this.controller.validateSmartButton(e)}validateSuggestions(e){this.controller.validateSuggestions(e)}validateStep(e){this.controller.validateStep(e)}validateSyncValueBySelector(e){this.controller.validateSyncValueBySelector(e)}validateTouched(e){this.controller.validateTouched(e)}validateValue(e){this.controller.validateValueEx(e)}componentWillLoad(){this._touched=!0===this._touched,this.controller.componentWillLoad(),this.state._hasValue=!!this.state._value,this.controller.addValueChangeListener((e=>this.state._hasValue=!!e))}static get delegatesFocus(){return!0}get host(){return(0,o.g)(this)}static get watchers(){return{_accessKey:["validateAccessKey"],_autoComplete:["validateAutoComplete"],_disabled:["validateDisabled"],_hideMsg:["validateHideMsg"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_max:["validateMax"],_min:["validateMin"],_msg:["validateMsg"],_name:["validateName"],_on:["validateOn"],_placeholder:["validatePlaceholder"],_readOnly:["validateReadOnly"],_required:["validateRequired"],_shortKey:["validateShortKey"],_smartButton:["validateSmartButton"],_suggestions:["validateSuggestions"],_step:["validateStep"],_syncValueBySelector:["validateSyncValueBySelector"],_touched:["validateTouched"],_value:["validateValue"]}}};m.style={default:"/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]) {\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n }\n}\n/**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n.visually-hidden {\n clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: calc(1rem / var(--kolibri-root-font-size, 16));\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: calc(1rem / var(--kolibri-root-font-size, 16));\n}\n\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n border: none;\n margin: 0;\n padding: 0;\n width: 100%;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n background-color: lightgray;\n color: black;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: grid;\n place-items: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n :host {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n animation-duration: 0.25s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n box-sizing: border-box;\n display: none;\n position: fixed;\n visibility: hidden;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n max-width: 90vw;\n max-height: 90vh;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width);\n }\n .kol-tooltip__arrow {\n background-color: #fff;\n color: #000;\n height: calc(10rem / var(--kolibri-root-font-size, 16));\n position: absolute;\n transform: rotate(45deg);\n width: calc(10rem / var(--kolibri-root-font-size, 16));\n z-index: 999;\n }\n .kol-tooltip__content {\n background-color: #fff;\n color: #000;\n position: relative;\n z-index: 1000;\n }\n @keyframes fadeInOpacity {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n .kol-alert {\n display: grid;\n }\n .kol-alert__container {\n place-items: center;\n display: flex;\n }\n .kol-alert__container-content {\n flex-grow: 1;\n }\n .kol-alert__close-button {\n /* Visible with forced colors */\n outline: transparent solid calc(1rem / var(--kolibri-root-font-size, 16));\n }\n}\n@layer kol-component {\n .kol-form-field {\n display: grid;\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n .kol-form-field:not(.kol-form-field--disabled) .kol-form-field__label {\n cursor: pointer;\n }\n .kol-form-field--disabled .kol-form-field__label {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__label-text::after {\n content: \"*\";\n }\n .kol-form-field--disabled .kol-form-field__hint {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__tooltip .span-label::after {\n content: \"*\";\n }\n}\n@layer kol-component {\n .kol-input-container {\n align-items: center;\n background-color: white;\n display: grid;\n grid-template-columns: 1fr;\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n width: 100%;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start) {\n grid-template-columns: auto 1fr;\n }\n .kol-input-container:has(> .kol-input-container__adornment--end) {\n grid-template-columns: 1fr auto;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start):has(> .kol-input-container__adornment--end) {\n grid-template-columns: auto 1fr auto;\n }\n .kol-input-container__container {\n position: relative;\n }\n .kol-input-container__adornment {\n display: flex;\n align-items: center;\n }\n .kol-input-container__adornment .kol-icon {\n display: grid;\n height: var(--a11y-min-size);\n place-items: center;\n }\n}\n@layer kol-component {\n .kol-input {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n min-width: var(--a11y-min-size);\n width: 100%;\n }\n .kol-input:focus {\n outline: none;\n }\n}"}},9293:(e,t,n)=>{n.d(t,{a:()=>s,p:()=>r});var o=n(7763),i=n(3892),a=n(3051);const l=e=>{for((0,a.a)()&&((0,i.j)("↓ Search form element start."),a.L.debug(e));e instanceof HTMLElement&&"FORM"!==e.tagName&&e.tagName!==o.h.toUpperCase();){try{e=e.parentElement instanceof HTMLElement?e.parentElement:e.parentNode instanceof ShadowRoot?e.parentNode.host:null}catch(e){}(0,a.a)()&&(a.L.debug(e),(0,i.j)("↑ Search form element finished."))}return e},s=(e={})=>{var t,n;const a=l(e.form);if(a instanceof HTMLElement){const e=new Event("reset",{bubbles:!0,cancelable:!0});if("FORM"===a.tagName)(0,i.n)(e,a),a.dispatchEvent(e);else if(a.tagName===o.h.toUpperCase()){(0,i.n)(e,i.K.querySelector("form",a));const o=a;"function"==typeof(null===(t=o._on)||void 0===t?void 0:t.onReset)&&(null===(n=o._on)||void 0===n||n.onReset(e))}}},r=(e={})=>{const t=l(e.form);if(t instanceof HTMLElement){const e=new SubmitEvent("submit",{bubbles:!0,cancelable:!0,submitter:t});if("FORM"===t.tagName)(0,a.a)()&&!1===t.noValidate&&(0,i.j)("If you have not focusable or hidden form fields in your form, you should enable noValidate for your form.",{force:!0}),setTimeout((()=>{"function"==typeof t.requestSubmit?t.requestSubmit():((0,i.n)(e,t),t.dispatchEvent(e))}));else if(t.tagName===o.h.toUpperCase()){(0,i.n)(e,i.K.querySelector("form",t));const n=t;setTimeout((()=>{var t,o;"function"==typeof(null===(t=n._on)||void 0===t?void 0:t.onSubmit)&&(null===(o=n._on)||void 0===o||o.onSubmit(e))}))}}}},9688:(e,t,n)=>{n.d(t,{i:()=>l,v:()=>s});var o=n(3892),i=n(7125);const a=(e,t,n)=>{(0,i.b)(n)?e[t]=n:(0,i.i)(n,1)&&(e[t]={icon:n})},l=e=>"object"==typeof e&&null!==e&&(void 0===e.style||(0,i.a)(e.style))&&(void 0===e.label||(0,i.i)(e.label))&&(0,i.i)(e.icon,1),s=(e,t,n={})=>{(0,o.o)(t,(()=>{var s;try{t=(0,o.p)(t)}catch(e){}(0,o.w)(e,"_icons",(e=>{const t="object"==typeof e&&null!==e&&0===Object.keys(e).length;return null===e||t||(0,i.i)(e,1)||"object"==typeof e&&null!==e&&((0,i.i)(e.left,1)||l(e.left)||(0,i.i)(e.right,1)||l(e.right)||(0,i.i)(e.top,1)||l(e.top)||(0,i.i)(e.bottom,1)||l(e.bottom))}),new Set(["KoliBriIcon"]),t,Object.assign(Object.assign({},n),{defaultValue:{},hooks:{afterPatch:null===(s=n.hooks)||void 0===s?void 0:s.afterPatch,beforePatch:(e,t,o,l)=>{var s,r;"function"==typeof(null===(s=n.hooks)||void 0===s?void 0:s.beforePatch)&&(null===(r=n.hooks)||void 0===r||r.beforePatch(e,t,o,l)),(e=>{var t,n,o;if(null===(t=e.nextState)||void 0===t?void 0:t.has("_icons")){const t=null===(n=e.nextState)||void 0===n?void 0:n.get("_icons");null===(o=e.nextState)||void 0===o||o.set("_icons",(e=>{let t={};return(0,i.i)(e,1)?t={left:{icon:e}}:"object"==typeof e&&null!==e&&(a(t,"top",e.top),a(t,"right",e.right),a(t,"bottom",e.bottom),a(t,"left",e.left)),t})(t))}})(o)}}}))}))}}}]);
|
|
2
|
+
"use strict";(self.webpackChunk_public_ui_sample_react=self.webpackChunk_public_ui_sample_react||[]).push([[7013],{182:(e,t,n)=>{n.d(t,{I:()=>y,K:()=>f,a:()=>g});var i=n(6733),o=n(257),a=n(1111),l=n(8045),s=n(9867),r=n(1698),d=n(3885),c=n(376),u=n(1476),h=n(8057);const m=(e,t)=>{var{position:n="start",class:o}=e,s=(0,a._)(e,["position","class"]);const r="kol-input-container__adornment",d=`${r}--${n}`;return(0,i.h)("div",Object.assign({class:(0,l.c)(r,d,o)},s),t)};function p(e){return!!e&&(Array.isArray(e)?e.length>0:Boolean(e))}const b=(e,t)=>{var{class:n}=e,o=(0,a._)(e,["class"]);return(0,i.h)("div",Object.assign({class:(0,l.c)("kol-input-container__container",n)},o),t)},v=(e,t)=>{const{class:n,startAdornment:o,endAdornment:r,disabled:d,msg:c,touched:u,containerProps:h,startAdornmentProps:v,endAdornmentProps:_}=e,f=(0,a._)(e,["class","startAdornment","endAdornment","disabled","msg","touched","containerProps","startAdornmentProps","endAdornmentProps"]),g=(0,s.c)(c,u),y={"kol-input-container--disabled":d,[`kol-input-container--${(null==c?void 0:c.type)||"error"}`]:g},k=Object.assign({class:(0,l.c)("kol-input-container",y,n)},f);return p(o)||p(r)?(0,i.h)("div",Object.assign({},k),(0,i.h)(m,Object.assign({},v,{position:"start"}),o),(0,i.h)(b,Object.assign({},h),t),(0,i.h)(m,Object.assign({},_,{position:"end"}),r)):(0,i.h)("div",Object.assign({},k),(0,i.h)(b,Object.assign({},h),t))},_=e=>{const{label:t,icons:n,hideLabel:o,disabled:l,onClick:s}=e,d=(0,a._)(e,["label","icons","hideLabel","disabled","onClick"]);return(0,i.h)(r.a,Object.assign({_label:t,_disabled:l,_icons:n,_hideLabel:o,_on:{onClick:s}},d))},f=e=>{const{componentName:t="button",label:n,icon:o,onClick:l}=e,s=(0,a._)(e,["componentName","label","icon","onClick"]),r="button"===t?_:d.K;return(0,i.h)(r,Object.assign({label:n||"",hideLabel:!0,icons:`codicon codicon-${o}`,onClick:l},s))},g=({state:e,endAdornment:t},n)=>{const{icons:o,smartButton:a,disabled:l,msg:r,touched:d}=function(e){let t,n;return"_icons"in e&&(t=e._icons),"_smartButton"in e&&(n=e._smartButton),{icons:t,smartButton:n,disabled:e._disabled,msg:(0,s.a)(e._msg),touched:e._touched}}(e);let h=null==o?void 0:o.left;(0,c.i)(h)&&(h={icon:h});let m=null==o?void 0:o.right;(0,c.i)(m)&&(m={icon:m});const p=[],b=[];return t&&(Array.isArray(t)?b.push(...t):b.push(t)),h&&p.push((0,i.h)(f,Object.assign({componentName:"icon",class:"kol-input-container__icon"},(0,u.i)(h)?h:{}))),(0,u.i)(a)&&b.push((0,i.h)(f,Object.assign({componentName:"button",class:"kol-input-container__smart-button"},a,{hideLabel:!0,disabled:l}))),m&&b.push((0,i.h)(f,Object.assign({componentName:"icon",class:"kol-input-container__icon"},(0,u.i)(m)?m:{}))),(0,i.h)(v,{disabled:l,msg:r,touched:d,startAdornment:p,endAdornment:b},n)};class y extends s.I{constructor(e,t,n){super(e,t,n),this.numberStringRegex=/^\d+(\.\d+)?$/,this.parseToNumber=e=>"number"==typeof e?isNaN(e)?null:e:this.isNumberString(e)?parseFloat(e):null,this.validateNumber=(e,t)=>(0,o.w)(this.component,e,(e=>null==e||"number"==typeof e||"string"==typeof e&&this.numberStringRegex.test(e)),new Set(["number","NumberString"]),t,{hooks:{beforePatch:(t,n)=>{(null==n?void 0:n.has(e))&&(null==n||n.set(e,this.parseToNumber(t)))}}}),this.component=e}validateIcons(e){(0,h.v)(this.component,e)}isNumberString(e){return"string"==typeof e&&this.numberStringRegex.test(e)}componentWillLoad(){super.componentWillLoad(),this.validateIcons(this.component._icons)}}},1476:(e,t,n)=>{function i(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}n.d(t,{i:()=>i})},3885:(e,t,n)=>{n.d(t,{K:()=>a});var i=n(6733),o=n(1698);const a=e=>{const{class:t,style:n,icons:a,label:l,onClick:s}=e;return(0,i.h)(o.d,{class:t,style:n,onClick:s,_icons:a,_label:l})}},5151:(e,t,n)=>{n.d(t,{a:()=>l,p:()=>s});var i=n(257),o=n(1698);const a=e=>{for((0,i.F)()&&((0,i.D)("↓ Search form element start."),i.L.debug(e));e instanceof HTMLElement&&"FORM"!==e.tagName&&e.tagName!==o.g.toUpperCase();){try{e=e.parentElement instanceof HTMLElement?e.parentElement:e.parentNode instanceof ShadowRoot?e.parentNode.host:null}catch(e){}(0,i.F)()&&(i.L.debug(e),(0,i.D)("↑ Search form element finished."))}return e},l=(e={})=>{var t,n;const l=a(e.form);if(l instanceof HTMLElement){const e=new Event("reset",{bubbles:!0,cancelable:!0});if("FORM"===l.tagName)(0,i.I)(e,l),l.dispatchEvent(e);else if(l.tagName===o.g.toUpperCase()){(0,i.I)(e,i.a.querySelector("form",l));const o=l;"function"==typeof(null===(t=o._on)||void 0===t?void 0:t.onReset)&&(null===(n=o._on)||void 0===n||n.onReset(e))}}},s=(e={})=>{const t=a(e.form);if(t instanceof HTMLElement){const e=new SubmitEvent("submit",{bubbles:!0,cancelable:!0,submitter:t});if("FORM"===t.tagName)(0,i.F)()&&!1===t.noValidate&&(0,i.D)("If you have not focusable or hidden form fields in your form, you should enable noValidate for your form.",{force:!0}),setTimeout((()=>{"function"==typeof t.requestSubmit?t.requestSubmit():((0,i.I)(e,t),t.dispatchEvent(e))}));else if(t.tagName===o.g.toUpperCase()){(0,i.I)(e,i.a.querySelector("form",t));const n=t;setTimeout((()=>{var t,i;"function"==typeof(null===(t=n._on)||void 0===t?void 0:t.onSubmit)&&(null===(i=n._on)||void 0===i||i.onSubmit(e))}))}}}},7013:(e,t,n)=>{n.r(t),n.d(t,{kol_input_number:()=>p});var i=n(6733),o=n(8045),a=n(2190),l=n(5151),s=n(9867),r=n(7162),d=n(182),c=n(257),u=n(7368),h=(n(1698),n(3694),n(1042),n(8296),n(4269),n(3710),n(5561),n(5154),n(753),n(3472),n(1111),n(9709),n(9272),n(6660),n(3185),n(2425),n(376),n(5538),n(8176),n(3885),n(1476),n(8057),(e,t,n)=>new Promise(((i,o)=>{var a=e=>{try{s(n.next(e))}catch(e){o(e)}},l=e=>{try{s(n.throw(e))}catch(e){o(e)}},s=e=>e.done?i(e.value):Promise.resolve(e.value).then(a,l);s((n=n.apply(e,t)).next())})));class m extends d.I{constructor(e,t,n){super(e,t,n),this.component=e}validateAutoComplete(e){(0,c.w)(this.component,"_autoComplete",(e=>"string"==typeof e&&("on"===e||"off"===e)),new Set(["on | off"]),e)}validateSuggestions(e){(0,u.v)(this.component,e)}validateMax(e){this.validateNumber("_max",e)}validateMin(e){this.validateNumber("_min",e)}validatePlaceholder(e){(0,c.A)(this.component,"_placeholder",e)}validateReadOnly(e){(0,c.h)(this.component,"_readOnly",e)}validateRequired(e){(0,c.h)(this.component,"_required",e)}validateStep(e){this.validateNumber("_step",e)}validateValue(e){this.validateNumber("_value",e),this.setFormAssociatedValue(this.component.state._value)}componentWillLoad(){super.componentWillLoad(),this.validateAutoComplete(this.component._autoComplete),this.validateMax(this.component._max),this.validateMin(this.component._min),this.validateSuggestions(this.component._suggestions),this.validatePlaceholder(this.component._placeholder),this.validateReadOnly(this.component._readOnly),this.validateRequired(this.component._required),this.validateStep(this.component._step),this.validateValue(this.component._value)}}const p=class{getValue(){return h(this,null,(function*(){return this.remapValue(this.state._value)}))}kolFocus(){return h(this,null,(function*(){var e;null===(e=this.inputRef)||void 0===e||e.focus()}))}setInitialValueType(e){this.controller.isNumberString(e)?this._initialValueType="NumberString":"number"!=typeof e||isNaN(e)?this._initialValueType="null":this._initialValueType="number"}remapValue(e){return null==e?null:"NumberString"===this._initialValueType?String(e):e}getFormFieldProps(){return{state:this.state,class:(0,o.c)("kol-input-number","number",{"has-value":this.state._hasValue}),tooltipAlign:this._tooltipAlign,onClick:()=>{var e;return null===(e=this.inputRef)||void 0===e?void 0:e.focus()},alert:this.showAsAlert()}}getInputProps(){return Object.assign(Object.assign({ref:this.catchRef,state:this.state,type:"number"},this.controller.onFacade),{onInput:this.onInput,onChange:this.onChange,onKeyDown:this.onKeyDown,onFocus:e=>{this.controller.onFacade.onFocus(e),this.inputHasFocus=!0},onBlur:e=>{this.controller.onFacade.onBlur(e),this.inputHasFocus=!1}})}render(){return(0,i.h)(s.F,Object.assign({key:"feca61b5264bf7d6c2ff99750c740c40cd2718be"},this.getFormFieldProps()),(0,i.h)(d.a,{key:"e5c1c8c4b34e514eb48169fd3c698d9623621a26",state:this.state},(0,i.h)(r.I,Object.assign({key:"3bd9aa36a2b5cf83821f9f372c501b2424f8c8d8"},this.getInputProps()))))}constructor(e){(0,i.r)(this,e),this.catchRef=e=>{this.inputRef=e},this.onInput=e=>{var t;const n=null===(t=this.inputRef)||void 0===t?void 0:t.value;this._value=this.remapValue(""===n?null:Number(n)),this.controller.onFacade.onInput(e,!0,this._value)},this.onChange=e=>{var t;const n=null===(t=this.inputRef)||void 0===t?void 0:t.value,i=this.remapValue(""===n?null:Number(n));this.controller.onFacade.onChange(e,i)},this.onKeyDown=e=>{"Enter"!==e.code&&"NumpadEnter"!==e.code||(0,l.p)({form:this.host,ref:this.inputRef})},this._accessKey=void 0,this._autoComplete=void 0,this._disabled=!1,this._hideMsg=!1,this._hideLabel=!1,this._hint="",this._icons=void 0,this._id=void 0,this._label=void 0,this._max=void 0,this._min=void 0,this._msg=void 0,this._name=void 0,this._on=void 0,this._placeholder=void 0,this._readOnly=!1,this._required=!1,this._shortKey=void 0,this._smartButton=void 0,this._suggestions=void 0,this._step=void 0,this._syncValueBySelector=void 0,this._tooltipAlign="top",this._touched=!1,this._value=void 0,this.state={_autoComplete:"off",_hasValue:!1,_hideMsg:!1,_id:`id-${(0,a.n)()}`,_label:"",_suggestions:[]},this._initialValueType="null",this.inputHasFocus=!1,this.controller=new m(this,"number",this.host)}showAsAlert(){return Boolean(this.state._touched)&&!this.inputHasFocus}validateAccessKey(e){this.controller.validateAccessKey(e)}validateAutoComplete(e){this.controller.validateAutoComplete(e)}validateDisabled(e){this.controller.validateDisabled(e)}validateHideMsg(e){this.controller.validateHideMsg(e)}validateHideLabel(e){this.controller.validateHideLabel(e)}validateHint(e){this.controller.validateHint(e)}validateIcons(e){this.controller.validateIcons(e)}validateId(e){this.controller.validateId(e)}validateLabel(e){this.controller.validateLabel(e)}validateMax(e){this.controller.validateMax(e)}validateMin(e){this.controller.validateMin(e)}validateMsg(e){this.controller.validateMsg(e)}validateName(e){this.controller.validateName(e)}validateOn(e){this.controller.validateOn(e)}validatePlaceholder(e){this.controller.validatePlaceholder(e)}validateReadOnly(e){this.controller.validateReadOnly(e)}validateRequired(e){this.controller.validateRequired(e)}validateShortKey(e){this.controller.validateShortKey(e)}validateSmartButton(e){this.controller.validateSmartButton(e)}validateSuggestions(e){this.controller.validateSuggestions(e)}validateStep(e){this.controller.validateStep(e)}validateSyncValueBySelector(e){this.controller.validateSyncValueBySelector(e)}validateTouched(e){this.controller.validateTouched(e)}validateValue(e){this.controller.validateValue(e),null!=e&&this.setInitialValueType(e)}componentWillLoad(){void 0!==this._value&&this.setInitialValueType(this._value),this._touched=!0===this._touched,this.controller.componentWillLoad(),this.state._hasValue=!!this.state._value,this.controller.addValueChangeListener((e=>this.state._hasValue=!!e))}static get delegatesFocus(){return!0}get host(){return(0,i.g)(this)}static get watchers(){return{_accessKey:["validateAccessKey"],_autoComplete:["validateAutoComplete"],_disabled:["validateDisabled"],_hideMsg:["validateHideMsg"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_max:["validateMax"],_min:["validateMin"],_msg:["validateMsg"],_name:["validateName"],_on:["validateOn"],_placeholder:["validatePlaceholder"],_readOnly:["validateReadOnly"],_required:["validateRequired"],_shortKey:["validateShortKey"],_smartButton:["validateSmartButton"],_suggestions:["validateSuggestions"],_step:["validateStep"],_syncValueBySelector:["validateSyncValueBySelector"],_touched:["validateTouched"],_value:["validateValue"]}}};p.style={default:"/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]) {\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n }\n}\n/**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n.visually-hidden {\n clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: calc(1rem / var(--kolibri-root-font-size, 16));\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: calc(1rem / var(--kolibri-root-font-size, 16));\n}\n\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n border: none;\n margin: 0;\n padding: 0;\n width: 100%;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n background-color: lightgray;\n color: black;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: grid;\n place-items: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n :host {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n animation-duration: 0.25s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n box-sizing: border-box;\n display: none;\n position: fixed;\n visibility: hidden;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n max-width: 90vw;\n max-height: 90vh;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width);\n }\n .kol-tooltip__arrow {\n background-color: #fff;\n color: #000;\n height: calc(10rem / var(--kolibri-root-font-size, 16));\n position: absolute;\n transform: rotate(45deg);\n width: calc(10rem / var(--kolibri-root-font-size, 16));\n z-index: 999;\n }\n .kol-tooltip__content {\n background-color: #fff;\n color: #000;\n position: relative;\n z-index: 1000;\n }\n @keyframes fadeInOpacity {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n .kol-alert {\n display: grid;\n }\n .kol-alert__container {\n place-items: center;\n display: flex;\n }\n .kol-alert__container-content {\n flex-grow: 1;\n }\n .kol-alert__closer {\n /* Visible with forced colors */\n outline: transparent solid calc(1rem / var(--kolibri-root-font-size, 16));\n }\n}\n@layer kol-component {\n .kol-form-field {\n display: grid;\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n .kol-form-field:not(.kol-form-field--disabled) .kol-form-field__label {\n cursor: pointer;\n }\n .kol-form-field--disabled .kol-form-field__label {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__label-text::after {\n content: \"*\";\n }\n .kol-form-field--disabled .kol-form-field__hint {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__tooltip .span-label::after {\n content: \"*\";\n }\n}\n@layer kol-component {\n .kol-input-container {\n align-items: center;\n background-color: white;\n display: grid;\n grid-template-columns: 1fr;\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n width: 100%;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start) {\n grid-template-columns: auto 1fr;\n }\n .kol-input-container:has(> .kol-input-container__adornment--end) {\n grid-template-columns: 1fr auto;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start):has(> .kol-input-container__adornment--end) {\n grid-template-columns: auto 1fr auto;\n }\n .kol-input-container__container {\n position: relative;\n }\n .kol-input-container__adornment {\n display: flex;\n align-items: center;\n }\n .kol-input-container__adornment .kol-icon {\n display: grid;\n height: var(--a11y-min-size);\n place-items: center;\n }\n}\n@layer kol-component {\n .kol-input {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n min-width: var(--a11y-min-size);\n width: 100%;\n }\n .kol-input:focus {\n outline: none;\n }\n}"}},7162:(e,t,n)=>{n.d(t,{I:()=>r,S:()=>s});var i=n(1111),o=n(6733),a=n(8176),l=(n(257),n(9867));const s=e=>{var{id:t,suggestions:n}=e,a=(0,i._)(e,["id","suggestions"]);return n?(0,o.h)("datalist",Object.assign({id:`${t}-list`},a),n.map((e=>(0,o.h)("option",{value:e})))):null},r=e=>{var{state:t,customSuggestions:n}=e,r=(0,i._)(e,["state","customSuggestions"]);return(0,o.h)(a.I,Object.assign({},function(e,t){const{ariaDescribedBy:n}=(0,l.g)(e),i={id:e._id,hideLabel:e._hideLabel,label:e._label,accessKey:e._accessKey,disabled:e._disabled,name:e._name,ariaDescribedBy:n};return"_type"in e&&(i.type=e._type),"_value"in e&&(i.value=e._value),"_required"in e&&(i.required=e._required),"_maxLength"in e&&(i.maxlength=e._maxLength),"_placeholder"in e&&(i.placeholder=e._placeholder),"_autoComplete"in e&&(i.autoComplete=e._autoComplete),"_spellCheck"in e&&(i.spellcheck=e._spellCheck),"_pattern"in e&&(i.pattern=e._pattern),"_readOnly"in e&&(i.readonly=e._readOnly),"_min"in e&&(i.min=e._min),"_max"in e&&(i.max=e._max),"_step"in e&&(i.step=e._step),"_multiple"in e&&(i.multiple=e._multiple),"_checked"in e&&(i.checked=e._checked),"_indeterminate"in e&&(i.indeterminate=e._indeterminate),"_touched"in e&&(i.touched=e._touched),"_msg"in e&&(i.msg=(0,l.a)(e._msg)),"_suggestions"in e&&!t&&Array.isArray(e._suggestions)&&e._suggestions.length>0&&(i.suggestions=(0,o.h)(s,{id:e._id,suggestions:e._suggestions})),i}(t,n),r))}},7368:(e,t,n)=>{n.d(t,{v:()=>o});var i=n(257);const o=(e,t)=>{(0,i.y)(e,"_suggestions",(e=>"string"==typeof e||"number"==typeof e),t,void 0,{hooks:{afterPatch:e=>{Array.isArray(e)&&e.length&&(0,i.b)("Property suggestions: Options have accessibility issues in how browsers implemented them and should not be used for now.")}}})}},8057:(e,t,n)=>{n.d(t,{v:()=>l});var i=n(257);const o=(e,t,n)=>{(0,i.v)(n)?e[t]=n:(0,i.q)(n,1)&&(e[t]={icon:n})},a=e=>"object"==typeof e&&null!==e&&(void 0===e.style||(0,i.t)(e.style))&&(void 0===e.label||(0,i.q)(e.label))&&(0,i.q)(e.icon,1),l=(e,t,n={})=>{(0,i.o)(t,(()=>{var l;try{t=(0,i.j)(t)}catch(e){}(0,i.w)(e,"_icons",(e=>{const t="object"==typeof e&&null!==e&&0===Object.keys(e).length;return null===e||t||(0,i.q)(e,1)||"object"==typeof e&&null!==e&&((0,i.q)(e.left,1)||a(e.left)||(0,i.q)(e.right,1)||a(e.right)||(0,i.q)(e.top,1)||a(e.top)||(0,i.q)(e.bottom,1)||a(e.bottom))}),new Set(["KoliBriIcon"]),t,Object.assign(Object.assign({},n),{defaultValue:{},hooks:{afterPatch:null===(l=n.hooks)||void 0===l?void 0:l.afterPatch,beforePatch:(e,t,a,l)=>{var s,r;"function"==typeof(null===(s=n.hooks)||void 0===s?void 0:s.beforePatch)&&(null===(r=n.hooks)||void 0===r||r.beforePatch(e,t,a,l)),(e=>{var t,n,a;if(null===(t=e.nextState)||void 0===t?void 0:t.has("_icons")){const t=null===(n=e.nextState)||void 0===n?void 0:n.get("_icons");null===(a=e.nextState)||void 0===a||a.set("_icons",(e=>{let t={};return(0,i.q)(e,1)?t={left:{icon:e}}:"object"==typeof e&&null!==e&&(o(t,"top",e.top),o(t,"right",e.right),o(t,"bottom",e.bottom),o(t,"left",e.left)),t})(t))}})(a)}}}))}))}},8176:(e,t,n)=>{n.d(t,{I:()=>s});var i=n(1111),o=n(6733),a=n(8045),l=(n(257),n(9867));const s=e=>{const{class:t,msg:n,required:s,disabled:r,touched:d,readonly:c,ariaDescribedBy:u,hideLabel:h,label:m,suggestions:p,value:b}=e,v=(0,i._)(e,["class","msg","required","disabled","touched","readonly","ariaDescribedBy","hideLabel","label","suggestions","value"]),_=(0,l.c)(n,d),f={"kol-input--disabled":Boolean(r),"kol-input--required":Boolean(s),"kol-input--touched":Boolean(d),"kol-input--readonly":Boolean(c),[`kol-input--${(null==n?void 0:n.type)||"error"}`]:_},g=Object.assign(Object.assign({class:(0,a.c)("kol-input",f,t),required:s,disabled:r,readonly:c,type:"text",list:p?`${v.id}-list`:void 0},(0,l.e)({ariaDescribedBy:u,hideLabel:h,label:m})),v);return(0,o.h)(o.F,null,(0,o.h)("input",Object.assign({},g,{value:b})),p)}}}]);
|
package/dist/7178.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see 7178.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunk_public_ui_sample_react=self.webpackChunk_public_ui_sample_react||[]).push([[7178],{1250:(t,e,i)=>{i.d(e,{v:()=>s});var a=i(5477);const s=(t,e)=>{(0,a.a)(t,"_tooltipAlign",e)}},1742:(t,e,i)=>{i.d(e,{v:()=>s});var a=i(3892);const s=(t,e)=>{(0,a.b)(t,"_disabled",e,{hooks:{afterPatch:t=>{!0===t&&(0,a.c)()}}})}},3098:(t,e,i)=>{i.d(e,{A:()=>o});var a=i(3051),s=i(3892);class o{constructor(t,e,i){var o,n,l,r;if(this.experimentalMode=(0,a.a)(),this.setFormAssociatedValue=t=>{var e;const i=null===(e=this.formAssociated)||void 0===e?void 0:e.getAttribute("name");null!==i&&""!==i||(0,s.j)(` The form field (${this.type}) must have a name attribute to be form-associated. Please define the _name attribute.`);const a=this.tryToStringifyValue(t);this.syncValue(t,a,this.formAssociated),this.syncValue(t,a,this.syncToOwnInput)},this.component=t,this.host=this.findHostWithShadowRoot(i),this.type=e,this.experimentalMode&&("KOL-BUTTON"===(r=null===(o=this.host)||void 0===o?void 0:o.tagName)||"KOL-COMBOBOX"===r||"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-SINGLE-SELECT"===r||"KOL-TEXTAREA"===r)&&t._name){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.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===(l=this.host)||void 0===l||l.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,i){if(this.experimentalMode)try{if("boolean"!=typeof(i="object"==typeof i&&null!==i?JSON.stringify(i):i)&&"number"!=typeof i&&"string"!=typeof i)throw new Error("Invalid value type: "+typeof i);null==e||e.setAttribute(t,`${i}`)}catch(i){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,s.l)(`The form field raw value is not able to stringify! ${t}`),""}}syncValue(t,e,i){if(i)switch(this.type){case"file":i.files=t;break;case"select":i.querySelectorAll("option").forEach((t=>{i.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",""),i.appendChild(t)}}));break;case"radio":"string"==typeof e&&(i.setAttribute("value",e),i.setAttribute("checked",""),i.value=e);break;default:"string"==typeof e?(i.setAttribute("value",e),i.value=e):(i.removeAttribute("value"),i.value="")}}validateName(t){((t,e,i)=>{(0,s.i)(t,"_name",e,i)})(this.component,t,{hooks:{afterPatch:()=>{this.setAttribute("name",this.formAssociated,this.component.state._name)}}}),void 0===t&&(0,s.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)}}},3638:(t,e,i)=>{i.d(e,{a:()=>h,b:()=>l,c:()=>r,h:()=>s,v:()=>c});var a=i(3892);const s=[0,1,2,3,4,5,6],o=/[a-zA-Z0-9äöüÄÖÜß]/g,n=/^\d+$/;function l(t,e=1){return function(t){var e;return"string"==typeof t&&(null===(e=t.match(o))||void 0===e?void 0:e.length)||0}(t)>=e}function r(t){return n.test(t)}const d=new Set(["string"]),c=(t,e,i={})=>{(0,a.w)(t,"_label",(t=>"string"==typeof t),d,e,function(t){var e;return Object.assign(Object.assign({},t),{hooks:{afterPatch:(e,i,s,o)=>{var n,d;"function"==typeof(null===(n=t.hooks)||void 0===n?void 0:n.afterPatch)&&(null===(d=t.hooks)||void 0===d||d.afterPatch(e,i,s,o)),"string"==typeof e&&!1===l(e,3)&&!1===r(e)&&(0,a.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,a.u)("A heading or label should not be longer than 80 characters.")},beforePatch:null===(e=t.hooks)||void 0===e?void 0:e.beforePatch}})}(i))},h=c},4208:(t,e,i)=>{i.d(e,{i:()=>l,n:()=>d,r:()=>r});var a=i(7386),s=i(3648),o=i(3051);const n=()=>{let t=(0,o.d)().KoliBri;return void 0===t&&(t={},Object.defineProperty((0,o.d)(),"KoliBri",{value:t,writable:!1})),t},l=()=>{(()=>{const t=(0,o.g)().querySelector('meta[name="kolibri"]');if(t&&t.hasAttribute("content")){const e=t.getAttribute("content");"string"==typeof e&&((0,o.s)(e.includes("dev-mode=true")),(0,o.b)(e.includes("experimental-mode=true")),(0,o.c)(e.includes("color-contrast-analysis=true")))}})(),o.L.debug(`\n,--. ,--. ,--. ,--. ,-----. ,--.\n| .' / ,---. | | \`--' | |) /_ ,--.--. \`--'\n| . ' | .-. | | | ,--. | .-. \\ | .--' ,--.\n| |\\ \\ | '-' | | | | | | '--' / | | | |\n\`--' \`--´ \`---´ \`--' \`--' \`------´ \`--' \`--'\n🚹 The accessible HTML-Standard | 👉 https://public-ui.github.io | ${a.E.kolibriVersion}\n\t`,{forceLog:!0})},r=()=>{!0!==n().adviceShown&&(Object.defineProperty(n(),"adviceShown",{get:function(){return!0}}),o.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 d=()=>Math.floor(16777215*Math.random()).toString(16);"test"===s.p&&(d=()=>"nonce")},5477:(t,e,i)=>{i.d(e,{a:()=>s,v:()=>n});var a=i(3892);const s=(t,e,i)=>{(0,a.w)(t,e,(t=>"string"==typeof t&&o.includes(t)),new Set(o),i,{defaultValue:"top"})},o=["left","right","top","bottom"],n=(t,e)=>{s(t,"_align",e)}},5847:(t,e,i)=>{i.d(e,{a:()=>r,b:()=>l,c:()=>n,v:()=>s});var a=i(3892);const s=(t,e)=>{(0,a.i)(t,"_accessKey",e)},o={hooks:{afterPatch:t=>{-1!==t&&0!==t&&(0,a.a)("Don't Use Tabindex Greater than 0: https://adrianroselli.com/2014/11/dont-use-tabindex-greater-than-0.html")}}},n=(t,e)=>{(0,a.k)(t,"_tabIndex",e,o)},l=(t,e)=>{(0,a.i)(t,"_shortKey",e)},r=(t,e)=>{if(t&&e)throw new Error("AccessKey and ShortKey are used. Only one is allowed.")}},6184:(t,e,i)=>{i.d(e,{v:()=>s});var a=i(3892);const s=(t,e)=>{(0,a.i)(t,"_customClass",e,{defaultValue:void 0})}},6812:(t,e,i)=>{i.d(e,{a:()=>l,b:()=>o,c:()=>d,v:()=>n});var a=i(3892);const s=["button","link","tab","treeitem"],o=(t,e)=>{(0,a.w)(t,"_role",(t=>"string"==typeof t&&s.includes(t)),new Set([`KoliBriAlternativeButtonLinkRole {${s.join(", ")}`]),e)},n=(t,e)=>{(0,a.i)(t,"_ariaDescription",e)},l=(t,e)=>{(0,a.b)(t,"_ariaExpanded",e)},r=["primary","secondary","normal","tertiary","danger","ghost","custom"],d=(t,e)=>{(0,a.w)(t,"_variant",(t=>"string"==typeof t&&r.includes(t)),new Set([`KoliBriButtonVariant {${r.join(", ")}`]),e,{defaultValue:"normal"})}},7125:(t,e,i)=>{i.d(e,{S:()=>n,a:()=>o,b:()=>a,i:()=>s});const a=t=>"object"==typeof t&&null!==t,s=(t,e=0)=>"string"==typeof t&&t.length>=e,o=t=>{if("object"!=typeof t||null===t)return s(t,1);for(const e in t)if(!1===s(e,1))return!1;return!0},n=new Event("StateChange")},7178:(t,e,i)=>{i.r(e),i.d(e,{kol_button_wc:()=>S});var a=i(7386),s=i(3694),o=i(4208),n=i(9293),l=i(3098),r=i(7763),d=i(5847),c=i(8045),h=i(3892),u=i(8786),v=i(6812),b=i(3648),f=i(6184),p=i(1742),_=i(7809),y=i(9688),m=i(3638),g=i(1250);const A=["button","reset","submit"],S=class{kolFocus(){return t=this,e=function*(){var t;null===(t=this.buttonRef)||void 0===t||t.focus()},new Promise(((i,a)=>{var s=t=>{try{n(e.next(t))}catch(t){a(t)}},o=t=>{try{n(e.throw(t))}catch(t){a(t)}},n=t=>t.done?i(t.value):Promise.resolve(t.value).then(s,o);n((e=e.apply(t,null)).next())}));var t,e}render(){var t,e;const i=(0,b.s)(this.state._label),s=Boolean(null===(e=null===(t=this.state._ariaDescription)||void 0===t?void 0:t.trim())||void 0===e?void 0:e.length),o=this.state._accessKey||this.state._shortKey;return(0,a.h)(a.H,{key:"b87a69b493328d33c7de2a3d0b928494cba9f7cf"},(0,a.h)("button",{key:"b06eba81f2b3be3d03c9d3469475f03d668fd03d",ref:this.catchRef,accessKey:this.state._accessKey||void 0,"aria-controls":this.state._ariaControls,"aria-describedby":s?this.internalDescriptionById:void 0,"aria-expanded":(0,h.v)(this.state._ariaExpanded),"aria-label":this.state._hideLabel&&"string"==typeof this.state._label?this.state._label:void 0,"aria-selected":(0,h.x)(this.state._ariaSelected),class:(0,c.c)("kol-button",{"kol-button--disabled":!0===this.state._disabled,[`kol-button--${this.state._variant}`]:"custom"!==this.state._variant,"kol-button--hide-label":!0===this.state._hideLabel,[this.state._customClass]:"custom"===this.state._variant&&"string"==typeof this.state._customClass&&this.state._customClass.length>0}),disabled:this.state._disabled,id:this.state._id,name:this.state._name,onClick:this.onClick,onMouseDown:this.onMouseDown,role:this.state._role,tabIndex:this.state._tabIndex,type:this.state._type},(0,a.h)(u.K,{key:"6a1fa974599782667b0e1b9d888f67d9e0cc74ac",class:"kol-button__text",badgeText:o,icons:this.state._icons,hideLabel:this.state._hideLabel,label:i?"":this.state._label},(0,a.h)("slot",{key:"1f07a5048f510b5a912d1d3af30bce9ad8e4b835",name:"expert",slot:"expert"}))),(0,a.h)(r.g,{key:"31dab73a3a12f9a8b47ce9e1f44858a5fba3c1cd","aria-hidden":"true",hidden:i||!this.state._hideLabel,class:"kol-button__tooltip",_badgeText:o,_align:this.state._tooltipAlign,_label:"string"==typeof this.state._label?this.state._label:""}),s&&(0,a.h)("span",{key:"2466203cc457e420290a13831b895eae9d209740",class:"visually-hidden",id:this.internalDescriptionById},this.state._ariaDescription))}constructor(t){(0,a.r)(this,t),this.internalDescriptionById=(0,o.n)(),this.catchRef=t=>{this.buttonRef=t},this.onClick=t=>{var e,i;"submit"===this.state._type?(0,n.p)({form:this.host,ref:this.buttonRef}):"reset"===this.state._type?(0,n.a)({form:this.host,ref:this.buttonRef}):(this.controller.setFormAssociatedValue(this.state._value),"function"==typeof(null===(e=this.state._on)||void 0===e?void 0:e.onClick)&&((0,h.n)(t,this.buttonRef),null===(i=this.state._on)||void 0===i||i.onClick(t,this.state._value))),this.host&&(0,s.d)(this.host,s.K.click,this.state._value)},this.onMouseDown=t=>{var e,i,a;null===(a=null===(i=null===(e=this.state)||void 0===e?void 0:e._on)||void 0===i?void 0:i.onMouseDown)||void 0===a||a.call(i,t),this.host&&(0,s.d)(this.host,s.K.mousedown)},this._accessKey=void 0,this._ariaControls=void 0,this._ariaDescription=void 0,this._ariaExpanded=void 0,this._ariaSelected=void 0,this._customClass=void 0,this._disabled=!1,this._hideLabel=!1,this._icons=void 0,this._id=void 0,this._label=void 0,this._name=void 0,this._on=void 0,this._role=void 0,this._shortKey=void 0,this._syncValueBySelector=void 0,this._tabIndex=void 0,this._tooltipAlign="top",this._type="button",this._value=void 0,this._variant="normal",this.state={_icons:{},_label:"",_on:{},_type:"button",_variant:"normal"},this.controller=new l.A(this,"button",this.host)}validateAccessKey(t){(0,d.v)(this,t),(0,d.a)(t,this._shortKey)}validateAriaControls(t){((t,e)=>{(0,h.i)(t,"_ariaControls",e)})(this,t)}validateAriaDescription(t){(0,v.v)(this,t)}validateAriaExpanded(t){(0,v.a)(this,t)}validateAriaSelected(t){((t,e)=>{(0,h.b)(t,"_ariaSelected",e)})(this,t)}validateCustomClass(t){(0,f.v)(this,t)}validateDisabled(t){(0,p.v)(this,t)}validateHideLabel(t){(0,_.v)(this,t)}validateIcons(t){(0,y.v)(this,t)}validateId(t){(0,h.i)(this,"_id",t)}validateLabel(t){(0,m.a)(this,t,{required:!0})}validateName(t){this.controller.validateName(t)}validateOn(t){((t,e)=>{(0,h.w)(t,"_on",(t=>"object"==typeof t&&null!==t),new Set(["ButtonCallbacksPropType {Events.onClick, Events.onMouseDown}"]),e)})(this,t)}validateRole(t){(0,v.b)(this,t)}validateShortKey(t){(0,d.b)(this,t),(0,d.a)(this._accessKey,t)}validateSyncValueBySelector(t){this.controller.validateSyncValueBySelector(t)}validateTabIndex(t){(0,d.c)(this,t)}validateTooltipAlign(t){(0,g.v)(this,t)}validateType(t){((t,e)=>{(0,h.w)(t,"_type",(t=>"string"==typeof t&&A.includes(t)),new Set([`KoliBriButtonType {${A.join(", ")}`]),e)})(this,t)}validateValue(t){(0,h.s)(this,"_value",t),this.controller.setFormAssociatedValue(this.state._value)}validateVariant(t){(0,v.c)(this,t)}componentWillLoad(){this.validateAccessKey(this._accessKey),this.validateAriaControls(this._ariaControls),this.validateAriaDescription(this._ariaDescription),this.validateAriaExpanded(this._ariaExpanded),this.validateAriaSelected(this._ariaSelected),this.validateCustomClass(this._customClass),this.validateDisabled(this._disabled),this.validateHideLabel(this._hideLabel),this.validateIcons(this._icons),this.validateId(this._id),this.validateLabel(this._label),this.validateName(this._name),this.validateOn(this._on),this.validateRole(this._role),this.validateShortKey(this._shortKey),this.validateSyncValueBySelector(this._syncValueBySelector),this.validateTabIndex(this._tabIndex),this.validateTooltipAlign(this._tooltipAlign),this.validateType(this._type),this.validateValue(this._value),this.validateVariant(this._variant),(0,d.a)(this._accessKey,this._shortKey)}get host(){return(0,a.g)(this)}static get watchers(){return{_accessKey:["validateAccessKey"],_ariaControls:["validateAriaControls"],_ariaDescription:["validateAriaDescription"],_ariaExpanded:["validateAriaExpanded"],_ariaSelected:["validateAriaSelected"],_customClass:["validateCustomClass"],_disabled:["validateDisabled"],_hideLabel:["validateHideLabel"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_name:["validateName"],_on:["validateOn"],_role:["validateRole"],_shortKey:["validateShortKey"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_tooltipAlign:["validateTooltipAlign"],_type:["validateType"],_value:["validateValue"],_variant:["validateVariant"]}}}},7809:(t,e,i)=>{i.d(e,{v:()=>s});var a=i(3892);const s=(t,e,i={})=>{(0,a.b)(t,"_hideLabel",e,i)}},9293:(t,e,i)=>{i.d(e,{a:()=>l,p:()=>r});var a=i(7763),s=i(3892),o=i(3051);const n=t=>{for((0,o.a)()&&((0,s.j)("↓ Search form element start."),o.L.debug(t));t instanceof HTMLElement&&"FORM"!==t.tagName&&t.tagName!==a.h.toUpperCase();){try{t=t.parentElement instanceof HTMLElement?t.parentElement:t.parentNode instanceof ShadowRoot?t.parentNode.host:null}catch(t){}(0,o.a)()&&(o.L.debug(t),(0,s.j)("↑ Search form element finished."))}return t},l=(t={})=>{var e,i;const o=n(t.form);if(o instanceof HTMLElement){const t=new Event("reset",{bubbles:!0,cancelable:!0});if("FORM"===o.tagName)(0,s.n)(t,o),o.dispatchEvent(t);else if(o.tagName===a.h.toUpperCase()){(0,s.n)(t,s.K.querySelector("form",o));const a=o;"function"==typeof(null===(e=a._on)||void 0===e?void 0:e.onReset)&&(null===(i=a._on)||void 0===i||i.onReset(t))}}},r=(t={})=>{const e=n(t.form);if(e instanceof HTMLElement){const t=new SubmitEvent("submit",{bubbles:!0,cancelable:!0,submitter:e});if("FORM"===e.tagName)(0,o.a)()&&!1===e.noValidate&&(0,s.j)("If you have not focusable or hidden form fields in your form, you should enable noValidate for your form.",{force:!0}),setTimeout((()=>{"function"==typeof e.requestSubmit?e.requestSubmit():((0,s.n)(t,e),e.dispatchEvent(t))}));else if(e.tagName===a.h.toUpperCase()){(0,s.n)(t,s.K.querySelector("form",e));const i=e;setTimeout((()=>{var e,a;"function"==typeof(null===(e=i._on)||void 0===e?void 0:e.onSubmit)&&(null===(a=i._on)||void 0===a||a.onSubmit(t))}))}}}},9688:(t,e,i)=>{i.d(e,{i:()=>n,v:()=>l});var a=i(3892),s=i(7125);const o=(t,e,i)=>{(0,s.b)(i)?t[e]=i:(0,s.i)(i,1)&&(t[e]={icon:i})},n=t=>"object"==typeof t&&null!==t&&(void 0===t.style||(0,s.a)(t.style))&&(void 0===t.label||(0,s.i)(t.label))&&(0,s.i)(t.icon,1),l=(t,e,i={})=>{(0,a.o)(e,(()=>{var l;try{e=(0,a.p)(e)}catch(t){}(0,a.w)(t,"_icons",(t=>{const e="object"==typeof t&&null!==t&&0===Object.keys(t).length;return null===t||e||(0,s.i)(t,1)||"object"==typeof t&&null!==t&&((0,s.i)(t.left,1)||n(t.left)||(0,s.i)(t.right,1)||n(t.right)||(0,s.i)(t.top,1)||n(t.top)||(0,s.i)(t.bottom,1)||n(t.bottom))}),new Set(["KoliBriIcon"]),e,Object.assign(Object.assign({},i),{defaultValue:{},hooks:{afterPatch:null===(l=i.hooks)||void 0===l?void 0:l.afterPatch,beforePatch:(t,e,a,n)=>{var l,r;"function"==typeof(null===(l=i.hooks)||void 0===l?void 0:l.beforePatch)&&(null===(r=i.hooks)||void 0===r||r.beforePatch(t,e,a,n)),(t=>{var e,i,a;if(null===(e=t.nextState)||void 0===e?void 0:e.has("_icons")){const e=null===(i=t.nextState)||void 0===i?void 0:i.get("_icons");null===(a=t.nextState)||void 0===a||a.set("_icons",(t=>{let e={};return(0,s.i)(t,1)?e={left:{icon:t}}:"object"==typeof t&&null!==t&&(o(e,"top",t.top),o(e,"right",t.right),o(e,"bottom",t.bottom),o(e,"left",t.left)),e})(e))}})(a)}}}))}))}}}]);
|
|
2
|
+
"use strict";(self.webpackChunk_public_ui_sample_react=self.webpackChunk_public_ui_sample_react||[]).push([[7178],{376:(t,e,a)=>{a.d(e,{K:()=>n,i:()=>l});var i=a(5538),s=a(6733),o="[object String]";function l(t){return"string"==typeof t||!(0,i.i)(t)&&(0,i.a)(t)&&(0,i.b)(t)==o}const n=({badgeText:t,label:e})=>{const a=t;let[i,...o]=e.split(a);return 0===o.length&&(t=a.toUpperCase(),[i,...o]=e.split(a)),0===o.length&&(t=a.toLowerCase(),[i,...o]=e.split(a)),(0,s.h)(s.F,null,i,o.length?(0,s.h)(s.F,null,(0,s.h)("u",null,t),o.join(a)):null)}},753:(t,e,a)=>{a.d(e,{v:()=>s});var i=a(257);const s=(t,e,a={})=>{(0,i.h)(t,"_hideLabel",e,a)}},1042:(t,e,a)=>{a.d(e,{A:()=>o});var i=a(257),s=a(8296);class o{constructor(t,e,a){var o,l,n,r,c;if(this.experimentalMode=(0,i.F)(),this.setFormAssociatedValue=t=>{var e;const a=null===(e=this.formAssociated)||void 0===e?void 0:e.getAttribute("name");null!==a&&""!==a||(0,i.D)(` The form field (${this.type}) must have a name attribute to be form-associated. Please define the _name attribute.`);const s=this.tryToStringifyValue(t);this.syncValue(t,s,this.formAssociated),this.syncValue(t,s,this.syncToOwnInput)},this.component=t,this.host=this.findHostWithShadowRoot(a),this.type=e,(null===(o=(0,s.g)())||void 0===o?void 0:o.reflectInputValues)&&("KOL-BUTTON"===(c=null===(l=this.host)||void 0===l?void 0:l.tagName)||"KOL-COMBOBOX"===c||"KOL-INPUT-CHECKBOX"===c||"KOL-INPUT-COLOR"===c||"KOL-INPUT-DATE"===c||"KOL-INPUT-EMAIL"===c||"KOL-INPUT-FILE"===c||"KOL-INPUT-NUMBER"===c||"KOL-INPUT-PASSWORD"===c||"KOL-INPUT-RADIO"===c||"KOL-INPUT-RANGE"===c||"KOL-INPUT-TEXT"===c||"KOL-SELECT"===c||"KOL-SINGLE-SELECT"===c||"KOL-TEXTAREA"===c)&&t._name){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.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,a){if(this.experimentalMode)try{if("boolean"!=typeof(a="object"==typeof a&&null!==a?JSON.stringify(a):a)&&"number"!=typeof a&&"string"!=typeof a)throw new Error("Invalid value type: "+typeof a);null==e||e.setAttribute(t,`${a}`)}catch(a){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,a){if(a)switch(this.type){case"file":a.files=t;break;case"select":a.querySelectorAll("option").forEach((t=>{a.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",""),a.appendChild(t)}}));break;case"radio":"string"==typeof e&&(a.setAttribute("value",e),a.setAttribute("checked",""),a.value=e);break;default:"string"==typeof e?(a.setAttribute("value",e),a.value=e):(a.removeAttribute("value"),a.value="")}}validateName(t){((t,e,a)=>{(0,i.A)(t,"_name",e,a)})(this.component,t,{hooks:{afterPatch:()=>{this.setAttribute("name",this.formAssociated,this.component.state._name)}}}),void 0===t&&(0,i.D)("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)}}},1476:(t,e,a)=>{function i(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}a.d(e,{i:()=>i})},2061:(t,e,a)=>{a.d(e,{v:()=>s});var i=a(257);const s=(t,e)=>{(0,i.h)(t,"_disabled",e,{hooks:{afterPatch:t=>{!0===t&&(0,i.i)()}}})}},2190:(t,e,a)=>{a.d(e,{i:()=>l,n:()=>r,r:()=>n});var i=a(257),s=a(6733);const o=()=>{let t=(0,i.e)().KoliBri;return void 0===t&&(t={},Object.defineProperty((0,i.e)(),"KoliBri",{value:t,writable:!1})),t},l=()=>{(()=>{const t=(0,i.g)().querySelector('meta[name="kolibri"]');if(t&&t.hasAttribute("content")){const e=t.getAttribute("content");"string"==typeof e&&((0,i.s)(e.includes("dev-mode=true")),(0,i.c)(e.includes("experimental-mode=true")),(0,i.d)(e.includes("color-contrast-analysis=true")))}})(),i.L.debug(`\n,--. ,--. ,--. ,--. ,-----. ,--.\n| .' / ,---. | | \`--' | |) /_ ,--.--. \`--'\n| . ' | .-. | | | ,--. | .-. \\ | .--' ,--.\n| |\\ \\ | '-' | | | | | | '--' / | | | |\n\`--' \`--´ \`---´ \`--' \`--' \`------´ \`--' \`--'\n🚹 The accessible HTML-Standard | 👉 https://public-ui.github.io | ${s.E.kolibriVersion}\n\t`,{forceLog:!0})},n=()=>{!0!==o().adviceShown&&(Object.defineProperty(o(),"adviceShown",{get:function(){return!0}}),i.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"===i.p&&(r=()=>"nonce")},3472:(t,e,a)=>{a.d(e,{a:()=>h,b:()=>n,c:()=>r,h:()=>s,v:()=>d});var i=a(257);const s=[0,1,2,3,4,5,6],o=/[a-zA-Z0-9äöüÄÖÜß]/g,l=/^\d+$/;function n(t,e=1){return function(t){var e;return"string"==typeof t&&(null===(e=t.match(o))||void 0===e?void 0:e.length)||0}(t)>=e}function r(t){return l.test(t)}const c=new Set(["string"]),d=(t,e,a={})=>{(0,i.w)(t,"_label",(t=>"string"==typeof t),c,e,function(t){var e;return Object.assign(Object.assign({},t),{hooks:{afterPatch:(e,a,s,o)=>{var l,c;"function"==typeof(null===(l=t.hooks)||void 0===l?void 0:l.afterPatch)&&(null===(c=t.hooks)||void 0===c||c.afterPatch(e,a,s,o)),"string"==typeof e&&!1===n(e,3)&&!1===r(e)&&(0,i.b)(`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,i.u)("A heading or label should not be longer than 80 characters.")},beforePatch:null===(e=t.hooks)||void 0===e?void 0:e.beforePatch}})}(a))},h=d},3710:(t,e,a)=>{a.d(e,{a:()=>r,b:()=>n,c:()=>l,v:()=>s});var i=a(257);const s=(t,e)=>{(0,i.A)(t,"_accessKey",e)},o={hooks:{afterPatch:t=>{-1!==t&&0!==t&&(0,i.b)("Don't Use Tabindex Greater than 0: https://adrianroselli.com/2014/11/dont-use-tabindex-greater-than-0.html")}}},l=(t,e)=>{(0,i.E)(t,"_tabIndex",e,o)},n=(t,e)=>{(0,i.A)(t,"_shortKey",e)},r=(t,e)=>{if(t&&e)throw new Error("AccessKey and ShortKey are used. Only one is allowed.")}},3885:(t,e,a)=>{a.d(e,{K:()=>o});var i=a(6733),s=a(1698);const o=t=>{const{class:e,style:a,icons:o,label:l,onClick:n}=t;return(0,i.h)(s.d,{class:e,style:a,onClick:n,_icons:o,_label:l})}},5151:(t,e,a)=>{a.d(e,{a:()=>l,p:()=>n});var i=a(257),s=a(1698);const o=t=>{for((0,i.F)()&&((0,i.D)("↓ Search form element start."),i.L.debug(t));t instanceof HTMLElement&&"FORM"!==t.tagName&&t.tagName!==s.g.toUpperCase();){try{t=t.parentElement instanceof HTMLElement?t.parentElement:t.parentNode instanceof ShadowRoot?t.parentNode.host:null}catch(t){}(0,i.F)()&&(i.L.debug(t),(0,i.D)("↑ Search form element finished."))}return t},l=(t={})=>{var e,a;const l=o(t.form);if(l instanceof HTMLElement){const t=new Event("reset",{bubbles:!0,cancelable:!0});if("FORM"===l.tagName)(0,i.I)(t,l),l.dispatchEvent(t);else if(l.tagName===s.g.toUpperCase()){(0,i.I)(t,i.a.querySelector("form",l));const s=l;"function"==typeof(null===(e=s._on)||void 0===e?void 0:e.onReset)&&(null===(a=s._on)||void 0===a||a.onReset(t))}}},n=(t={})=>{const e=o(t.form);if(e instanceof HTMLElement){const t=new SubmitEvent("submit",{bubbles:!0,cancelable:!0,submitter:e});if("FORM"===e.tagName)(0,i.F)()&&!1===e.noValidate&&(0,i.D)("If you have not focusable or hidden form fields in your form, you should enable noValidate for your form.",{force:!0}),setTimeout((()=>{"function"==typeof e.requestSubmit?e.requestSubmit():((0,i.I)(t,e),e.dispatchEvent(t))}));else if(e.tagName===s.g.toUpperCase()){(0,i.I)(t,i.a.querySelector("form",e));const a=e;setTimeout((()=>{var e,i;"function"==typeof(null===(e=a._on)||void 0===e?void 0:e.onSubmit)&&(null===(i=a._on)||void 0===i||i.onSubmit(t))}))}}}},5154:(t,e,a)=>{a.d(e,{a:()=>s,v:()=>l});var i=a(257);const s=(t,e,a)=>{(0,i.w)(t,e,(t=>"string"==typeof t&&o.includes(t)),new Set(o),a,{defaultValue:"top"})},o=["left","right","top","bottom"],l=(t,e)=>{s(t,"_align",e)}},5538:(t,e,a)=>{a.d(e,{S:()=>l,a:()=>p,b:()=>f,f:()=>i,i:()=>_,r:()=>o});const i="object"==typeof a.g&&a.g&&a.g.Object===Object&&a.g;var s="object"==typeof self&&self&&self.Object===Object&&self;const o=i||s||Function("return this")(),l=o.Symbol;var n=Object.prototype,r=n.hasOwnProperty,c=n.toString,d=l?l.toStringTag:void 0,h=Object.prototype.toString,u="[object Null]",b="[object Undefined]",v=l?l.toStringTag:void 0;function f(t){return null==t?void 0===t?b:u:v&&v in Object(t)?function(t){var e=r.call(t,d),a=t[d];try{t[d]=void 0;var i=!0}catch(t){}var s=c.call(t);return i&&(e?t[d]=a:delete t[d]),s}(t):function(t){return h.call(t)}(t)}function p(t){return null!=t&&"object"==typeof t}const _=Array.isArray},5561:(t,e,a)=>{a.d(e,{v:()=>s});var i=a(5154);a(257);const s=(t,e)=>{(0,i.a)(t,"_tooltipAlign",e)}},7178:(t,e,a)=>{a.r(e),a.d(e,{kol_button_wc:()=>A});var i=a(6733),s=a(257),o=a(3694),l=a(2190),n=a(5151),r=a(1042),c=a(1698),d=a(3710),h=a(8045),u=(a(9272),a(6660),a(8386)),b=a(8768),v=a(7881),f=a(2061),p=a(753),_=a(8057),y=a(3472),m=a(5561);a(8296),a(4269),a(3185),a(1111),a(3885),a(6363),a(376),a(5538),a(1476),a(5154);const g=["button","reset","submit"],A=class{kolFocus(){return t=this,e=function*(){var t;null===(t=this.buttonRef)||void 0===t||t.focus()},new Promise(((a,i)=>{var s=t=>{try{l(e.next(t))}catch(t){i(t)}},o=t=>{try{l(e.throw(t))}catch(t){i(t)}},l=t=>t.done?a(t.value):Promise.resolve(t.value).then(s,o);l((e=e.apply(t,null)).next())}));var t,e}render(){var t,e;const a=(0,s.l)(this.state._label),o=Boolean(null===(e=null===(t=this.state._ariaDescription)||void 0===t?void 0:t.trim())||void 0===e?void 0:e.length),l=this.state._accessKey||this.state._shortKey;return(0,i.h)(i.H,{key:"d94296c447c53cca42b7528040a6e133f984e5ee"},(0,i.h)("button",{key:"06b70077d51672e90774f8342e383007252bafd4",ref:this.catchRef,accessKey:this.state._accessKey||void 0,"aria-controls":this.state._ariaControls,"aria-describedby":o?this.internalDescriptionById:void 0,"aria-expanded":(0,s.O)(this.state._ariaExpanded),"aria-haspopup":this._ariaHasPopup,"aria-label":this.state._hideLabel&&"string"==typeof this.state._label?this.state._label:void 0,"aria-selected":(0,s.P)(this.state._ariaSelected),class:(0,h.c)("kol-button",{"kol-button--disabled":!0===this.state._disabled,[`kol-button--${this.state._variant}`]:"custom"!==this.state._variant,"kol-button--hide-label":!0===this.state._hideLabel,[this.state._customClass]:"custom"===this.state._variant&&"string"==typeof this.state._customClass&&this.state._customClass.length>0}),disabled:this.state._disabled,id:this.state._id,name:this.state._name,onClick:this.onClick,onMouseDown:this.onMouseDown,role:this.state._role,tabIndex:this.state._tabIndex,type:this.state._type},(0,i.h)(u.K,{key:"730ec14988b2731caafdf350485e3da7164eb9a2",class:"kol-button__text",badgeText:l,icons:this.state._icons,hideLabel:this.state._hideLabel,label:a?"":this.state._label},(0,i.h)("slot",{key:"d4340b53b690ec8cbc8b0a7cafcbe614352432a0",name:"expert",slot:"expert"}))),(0,i.h)(c.f,{key:"b18fdaa2da5d12cab05f514ef719f7a08a2da0c8","aria-hidden":"true",hidden:a||!this.state._hideLabel,class:"kol-button__tooltip",_badgeText:l,_align:this.state._tooltipAlign,_label:"string"==typeof this.state._label?this.state._label:""}),o&&(0,i.h)("span",{key:"8ff3b675471a480a6a5cdb940cb79739af92e13d",class:"visually-hidden",id:this.internalDescriptionById},this.state._ariaDescription))}constructor(t){(0,i.r)(this,t),this.internalDescriptionById=(0,l.n)(),this.catchRef=t=>{this.buttonRef=t},this.onClick=t=>{var e,a;"submit"===this.state._type?(0,n.p)({form:this.host,ref:this.buttonRef}):"reset"===this.state._type?(0,n.a)({form:this.host,ref:this.buttonRef}):(this.controller.setFormAssociatedValue(this.state._value),"function"==typeof(null===(e=this.state._on)||void 0===e?void 0:e.onClick)&&((0,s.I)(t,this.buttonRef),null===(a=this.state._on)||void 0===a||a.onClick(t,this.state._value))),this.host&&(0,o.d)(this.host,o.K.click,this.state._value)},this.onMouseDown=t=>{var e,a,i;null===(i=null===(a=null===(e=this.state)||void 0===e?void 0:e._on)||void 0===a?void 0:a.onMouseDown)||void 0===i||i.call(a,t),this.host&&(0,o.d)(this.host,o.K.mousedown)},this._accessKey=void 0,this._ariaControls=void 0,this._ariaDescription=void 0,this._ariaExpanded=void 0,this._ariaHasPopup=void 0,this._ariaSelected=void 0,this._customClass=void 0,this._disabled=!1,this._hideLabel=!1,this._icons=void 0,this._id=void 0,this._label=void 0,this._name=void 0,this._on=void 0,this._role=void 0,this._shortKey=void 0,this._syncValueBySelector=void 0,this._tabIndex=void 0,this._tooltipAlign="top",this._type="button",this._value=void 0,this._variant="normal",this.state={_icons:{},_label:"",_on:{},_type:"button",_variant:"normal"},this.controller=new r.A(this,"button",this.host)}validateAccessKey(t){(0,d.v)(this,t),(0,d.a)(t,this._shortKey)}validateAriaControls(t){((t,e)=>{(0,s.A)(t,"_ariaControls",e)})(this,t)}validateAriaDescription(t){(0,b.v)(this,t)}validateAriaExpanded(t){(0,b.a)(this,t)}validateAriaSelected(t){((t,e)=>{(0,s.h)(t,"_ariaSelected",e)})(this,t)}validateCustomClass(t){(0,v.v)(this,t)}validateDisabled(t){(0,f.v)(this,t)}validateHideLabel(t){(0,p.v)(this,t)}validateIcons(t){(0,_.v)(this,t)}validateId(t){(0,s.A)(this,"_id",t)}validateLabel(t){(0,y.a)(this,t,{required:!0})}validateName(t){this.controller.validateName(t)}validateOn(t){((t,e)=>{(0,s.w)(t,"_on",(t=>"object"==typeof t&&null!==t),new Set(["ButtonCallbacksPropType {Events.onClick, Events.onMouseDown}"]),e)})(this,t)}validateRole(t){(0,b.b)(this,t)}validateShortKey(t){(0,d.b)(this,t),(0,d.a)(this._accessKey,t)}validateSyncValueBySelector(t){this.controller.validateSyncValueBySelector(t)}validateTabIndex(t){(0,d.c)(this,t)}validateTooltipAlign(t){(0,m.v)(this,t)}validateType(t){((t,e)=>{(0,s.w)(t,"_type",(t=>"string"==typeof t&&g.includes(t)),new Set([`KoliBriButtonType {${g.join(", ")}`]),e)})(this,t)}validateValue(t){(0,s.k)(this,"_value",t),this.controller.setFormAssociatedValue(this.state._value)}validateVariant(t){(0,b.c)(this,t)}componentWillLoad(){this.validateAccessKey(this._accessKey),this.validateAriaControls(this._ariaControls),this.validateAriaDescription(this._ariaDescription),this.validateAriaExpanded(this._ariaExpanded),this.validateAriaSelected(this._ariaSelected),this.validateCustomClass(this._customClass),this.validateDisabled(this._disabled),this.validateHideLabel(this._hideLabel),this.validateIcons(this._icons),this.validateId(this._id),this.validateLabel(this._label),this.validateName(this._name),this.validateOn(this._on),this.validateRole(this._role),this.validateShortKey(this._shortKey),this.validateSyncValueBySelector(this._syncValueBySelector),this.validateTabIndex(this._tabIndex),this.validateTooltipAlign(this._tooltipAlign),this.validateType(this._type),this.validateValue(this._value),this.validateVariant(this._variant),(0,d.a)(this._accessKey,this._shortKey)}get host(){return(0,i.g)(this)}static get watchers(){return{_accessKey:["validateAccessKey"],_ariaControls:["validateAriaControls"],_ariaDescription:["validateAriaDescription"],_ariaExpanded:["validateAriaExpanded"],_ariaSelected:["validateAriaSelected"],_customClass:["validateCustomClass"],_disabled:["validateDisabled"],_hideLabel:["validateHideLabel"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_name:["validateName"],_on:["validateOn"],_role:["validateRole"],_shortKey:["validateShortKey"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_tooltipAlign:["validateTooltipAlign"],_type:["validateType"],_value:["validateValue"],_variant:["validateVariant"]}}}},7881:(t,e,a)=>{a.d(e,{v:()=>s});var i=a(257);const s=(t,e)=>{(0,i.A)(t,"_customClass",e,{defaultValue:void 0})}},8057:(t,e,a)=>{a.d(e,{v:()=>l});var i=a(257);const s=(t,e,a)=>{(0,i.v)(a)?t[e]=a:(0,i.q)(a,1)&&(t[e]={icon:a})},o=t=>"object"==typeof t&&null!==t&&(void 0===t.style||(0,i.t)(t.style))&&(void 0===t.label||(0,i.q)(t.label))&&(0,i.q)(t.icon,1),l=(t,e,a={})=>{(0,i.o)(e,(()=>{var l;try{e=(0,i.j)(e)}catch(t){}(0,i.w)(t,"_icons",(t=>{const e="object"==typeof t&&null!==t&&0===Object.keys(t).length;return null===t||e||(0,i.q)(t,1)||"object"==typeof t&&null!==t&&((0,i.q)(t.left,1)||o(t.left)||(0,i.q)(t.right,1)||o(t.right)||(0,i.q)(t.top,1)||o(t.top)||(0,i.q)(t.bottom,1)||o(t.bottom))}),new Set(["KoliBriIcon"]),e,Object.assign(Object.assign({},a),{defaultValue:{},hooks:{afterPatch:null===(l=a.hooks)||void 0===l?void 0:l.afterPatch,beforePatch:(t,e,o,l)=>{var n,r;"function"==typeof(null===(n=a.hooks)||void 0===n?void 0:n.beforePatch)&&(null===(r=a.hooks)||void 0===r||r.beforePatch(t,e,o,l)),(t=>{var e,a,o;if(null===(e=t.nextState)||void 0===e?void 0:e.has("_icons")){const e=null===(a=t.nextState)||void 0===a?void 0:a.get("_icons");null===(o=t.nextState)||void 0===o||o.set("_icons",(t=>{let e={};return(0,i.q)(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))}})(o)}}}))}))}},8386:(t,e,a)=>{a.d(e,{K:()=>v});var i=a(1111),s=a(6733),o=a(8045),l=a(3885),n=a(257),r=a(6363),c=a(376),d=a(1476);const h=t=>{const{class:e,style:a,label:i,icon:n}=t;return(0,s.h)(l.K,{class:(0,o.c)("icon",e),style:a,label:i||"",icons:n})},u=({label:t,hideLabel:e,allowMarkdown:a,badgeText:i})=>{if(e||!(0,c.i)(t))return null;const l="kol-span__label";return a?(0,s.h)("span",{class:(0,o.c)(l,"md"),innerHTML:(0,r.m)(t)}):i?(0,s.h)("span",{class:(0,o.c)(l)},(0,s.h)(c.K,{label:t,badgeText:i})):(0,s.h)("span",{class:(0,o.c)(l)},t)},b=({hideLabel:t,label:e,badgeText:a,allowMarkdown:i},o)=>{const l=!(0,n.l)(e);return(0,s.h)(s.F,null,l&&(0,s.h)(u,{label:e,hideLabel:t,badgeText:a,allowMarkdown:i}),(0,s.h)("span",{"aria-hidden":l?"true":void 0,class:"kol-span__label",hidden:l},o),(0,c.i)(a)&&a.length>0&&(0,s.h)("span",{class:"badge-text-hint","aria-hidden":"true"},a))},v=(t,e)=>{const{class:a,label:l,hideLabel:n=!1,badgeText:r,allowMarkdown:u,icons:v}=t,f=(0,i._)(t,["class","label","hideLabel","badgeText","allowMarkdown","icons"]);let p=null,_=null,y=null,m=null;return(0,d.i)(v)?(p=v.top,_=v.left,y=v.right,m=v.bottom):(0,c.i)(v)&&(_={icon:v}),(0,s.h)("span",Object.assign({class:(0,o.c)("kol-span",{"kol-span--hide-label":n},a)},f),(0,d.i)(p)&&(0,s.h)(h,Object.assign({class:"top"},p)),(0,s.h)("span",{class:"kol-span__container"},(0,d.i)(_)&&(0,s.h)(h,Object.assign({class:"left"},_)),(0,s.h)(b,{label:l,hideLabel:n,allowMarkdown:u,badgeText:r},e),(0,d.i)(y)&&(0,s.h)(h,Object.assign({class:"right"},y))),(0,d.i)(m)&&(0,s.h)(h,Object.assign({class:"bottom"},m)))}},8768:(t,e,a)=>{a.d(e,{a:()=>n,b:()=>o,c:()=>c,v:()=>l});var i=a(257);const s=["button","link","tab","treeitem"],o=(t,e)=>{(0,i.w)(t,"_role",(t=>"string"==typeof t&&s.includes(t)),new Set([`KoliBriAlternativeButtonLinkRole {${s.join(", ")}`]),e)},l=(t,e)=>{(0,i.A)(t,"_ariaDescription",e)},n=(t,e)=>{(0,i.h)(t,"_ariaExpanded",e)},r=["primary","secondary","normal","tertiary","danger","ghost","custom"],c=(t,e)=>{(0,i.w)(t,"_variant",(t=>"string"==typeof t&&r.includes(t)),new Set([`KoliBriButtonVariant {${r.join(", ")}`]),e,{defaultValue:"normal"})}}}]);
|
package/dist/7347.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see 7347.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunk_public_ui_sample_react=self.webpackChunk_public_ui_sample_react||[]).push([[7347],{7347:(n,e,t)=>{t.r(e),t.d(e,{kol_tree_item:()=>a});var i=t(
|
|
2
|
+
"use strict";(self.webpackChunk_public_ui_sample_react=self.webpackChunk_public_ui_sample_react||[]).push([[7347],{7347:(n,e,t)=>{t.r(e),t.d(e,{kol_tree_item:()=>a});var i=t(6733),o=t(1698),l=(n,e,t)=>new Promise(((i,o)=>{var l=n=>{try{r(t.next(n))}catch(n){o(n)}},a=n=>{try{r(t.throw(n))}catch(n){o(n)}},r=n=>n.done?i(n.value):Promise.resolve(n.value).then(l,a);r((t=t.apply(n,e)).next())}));const a=class{constructor(n){(0,i.r)(this,n),this._active=void 0,this._label=void 0,this._open=void 0,this._href=void 0}focusLink(){return l(this,null,(function*(){this.element&&(yield this.element.focusLink())}))}expand(){return l(this,null,(function*(){this.element&&(yield this.element.expand())}))}collapse(){return l(this,null,(function*(){this.element&&(yield this.element.collapse())}))}isOpen(){return l(this,null,(function*(){var n,e;return null!==(e=yield null===(n=this.element)||void 0===n?void 0:n.isOpen())&&void 0!==e&&e}))}render(){return(0,i.h)(o.p,{key:"058ffb876889218e812b8d16395cf3d4735e9786",_active:this._active,_label:this._label,_open:this._open,_href:this._href,ref:n=>this.element=n},(0,i.h)("slot",{key:"a084e5ba793a60fd5696756cd16d92e50f6c9c9f"}))}};a.style={default:"/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]) {\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n }\n}\n/**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n.visually-hidden {\n clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: calc(1rem / var(--kolibri-root-font-size, 16));\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: calc(1rem / var(--kolibri-root-font-size, 16));\n}\n\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n border: none;\n margin: 0;\n padding: 0;\n width: 100%;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n background-color: lightgray;\n color: black;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: grid;\n place-items: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n}\n@layer kol-component {\n .kol-tree-item {\n --indentation: var(--tree-item-indentation, calc(10rem / var(--kolibri-root-font-size, 16)));\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tree-item__link .kol-link {\n align-items: center;\n display: inline-flex;\n min-height: var(--a11y-min-size);\n padding-left: max(var(--indentation) * var(--level) + (8rem / var(--kolibri-root-font-size, 16)), 8rem / var(--kolibri-root-font-size, 16));\n padding-right: calc(6rem / var(--kolibri-root-font-size, 16));\n text-decoration: none;\n }\n .kol-tree-item__link--first-level .kol-link {\n padding-left: calc(6rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tree-item__link-inner {\n display: flex;\n align-items: center;\n }\n .kol-tree-item__children {\n margin: 0;\n padding: 0;\n list-style: none;\n }\n .kol-tree-item .kol-span {\n place-items: unset;\n }\n .kol-tree-item__toggle-button, .kol-tree-item__toggle-button-placeholder {\n width: var(--a11y-min-size);\n height: var(--a11y-min-size);\n display: inline-flex;\n justify-content: center;\n align-items: center;\n }\n .kol-tree-item__text {\n text-decoration: underline;\n }\n}"}}}]);
|