@public-ui/sample-react 3.0.0-rc.3 → 3.0.0-rc.4
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/1068.js +1 -1
- package/dist/1219.js +1 -1
- package/dist/136.js +1 -1
- package/dist/1416.js +1 -1
- package/dist/1676.js +1 -1
- package/dist/1718.js +1 -1
- package/dist/1744.js +1 -1
- package/dist/1791.js +1 -1
- package/dist/2078.js +1 -1
- package/dist/2115.js +1 -1
- package/dist/2195.js +1 -1
- package/dist/3021.js +1 -1
- package/dist/3027.js +1 -1
- package/dist/3186.js +1 -1
- package/dist/364.js +1 -1
- package/dist/3758.js +1 -1
- package/dist/3836.js +1 -1
- package/dist/3872.js +1 -1
- package/dist/3879.js +1 -1
- package/dist/3949.js +1 -1
- package/dist/4211.js +1 -1
- package/dist/4350.js +1 -1
- package/dist/4390.js +1 -1
- package/dist/4566.js +1 -1
- package/dist/4662.js +1 -1
- package/dist/4928.js +1 -1
- package/dist/{1714.js → 4989.js} +2 -2
- package/dist/5000.js +1 -1
- package/dist/5151.js +1 -1
- package/dist/5171.js +1 -1
- package/dist/5876.js +1 -1
- package/dist/597.js +1 -1
- package/dist/6368.js +2 -0
- package/dist/6451.js +1 -1
- package/dist/6480.js +1 -1
- package/dist/6577.js +1 -1
- package/dist/6983.js +1 -1
- package/dist/7084.js +1 -1
- package/dist/7225.js +1 -1
- package/dist/7267.js +1 -1
- package/dist/7958.js +1 -1
- package/dist/7997.js +1 -1
- package/dist/8069.js +1 -1
- package/dist/8177.js +1 -1
- package/dist/8212.js +1 -1
- package/dist/8243.js +1 -1
- package/dist/8283.js +1 -1
- package/dist/8478.js +1 -1
- package/dist/851.js +1 -1
- package/dist/8573.js +1 -1
- package/dist/8728.js +1 -1
- package/dist/8808.js +1 -1
- package/dist/8999.js +1 -1
- package/dist/9068.js +1 -1
- package/dist/9130.js +1 -1
- package/dist/9162.js +1 -1
- package/dist/9219.js +1 -1
- package/dist/9244.js +2 -0
- package/dist/9296.js +2 -0
- package/dist/9423.js +1 -1
- package/dist/9430.js +1 -1
- package/dist/9929.js +1 -1
- package/dist/993.js +1 -1
- package/dist/index.html +0 -8
- package/dist/main.js +1 -1
- package/package.json +7 -5
- package/public/index.html +0 -8
- package/src/components/SampleColumns.tsx +10 -0
- package/src/components/combobox/partials/variants.tsx +3 -2
- package/src/components/form/error-list.tsx +39 -11
- package/src/components/handout/basic.tsx +1 -1
- package/src/components/input-checkbox/partials/variants.tsx +5 -4
- package/src/components/input-color/partials/variants.tsx +3 -2
- package/src/components/input-date/partials/variants.tsx +3 -2
- package/src/components/input-date/show-hide-msg.tsx +1 -1
- package/src/components/input-email/partials/variants.tsx +3 -2
- package/src/components/input-file/partials/variants.tsx +3 -2
- package/src/components/input-number/partials/variants.tsx +3 -2
- package/src/components/input-password/partials/variants.tsx +3 -2
- package/src/components/input-radio/partials/variants.tsx +3 -2
- package/src/components/input-range/partials/variants.tsx +3 -2
- package/src/components/input-text/{hide-errors.tsx → hide-msg.tsx} +5 -5
- package/src/components/input-text/partials/variants.tsx +3 -2
- package/src/components/input-text/routes.ts +2 -2
- package/src/components/modal/basic.tsx +28 -12
- package/src/components/select/partials/variants.tsx +3 -2
- package/src/components/single-select/partials/variants.tsx +3 -2
- package/src/components/table/column-alignment.tsx +4 -0
- package/src/components/table/complex-headers.tsx +1 -0
- package/src/components/table/interactive-child-elements.tsx +2 -0
- package/src/components/table/multi-sort.tsx +2 -0
- package/src/components/table/pagination-position.tsx +3 -0
- package/src/components/table/render-cell.tsx +1 -1
- package/src/components/table/sort-data.tsx +2 -2
- package/src/components/table/stateful-with-selection.tsx +1 -0
- package/src/components/table/stateful-with-single-selection.tsx +1 -0
- package/src/components/table/stateless-with-selection.tsx +1 -0
- package/src/components/table/stateless-with-single-selection.tsx +1 -0
- package/src/components/table/stateless.tsx +1 -0
- package/src/components/table/with-footer.tsx +1 -0
- package/src/components/table/with-pagination.tsx +1 -1
- package/src/components/textarea/partials/variants.tsx +3 -2
- package/src/react.main.tsx +2 -1
- package/src/scenarios/input-group-with-error.tsx +4 -4
- package/dist/1055.js +0 -2
- package/dist/1657.js +0 -2
- package/dist/5792.js +0 -2
- package/dist/6018.js +0 -2
- package/dist/6018.js.LICENSE.txt +0 -3
- package/dist/6203.js +0 -2
- package/dist/6203.js.LICENSE.txt +0 -3
- package/dist/assets/fontawesome-free/LICENSE.txt +0 -165
- package/dist/assets/fontawesome-free/css/all.css +0 -7831
- package/dist/assets/fontawesome-free/css/all.min.css +0 -6
- package/dist/assets/fontawesome-free/css/brands.css +0 -1432
- package/dist/assets/fontawesome-free/css/brands.min.css +0 -6
- package/dist/assets/fontawesome-free/css/fontawesome.css +0 -6338
- package/dist/assets/fontawesome-free/css/fontawesome.min.css +0 -6
- package/dist/assets/fontawesome-free/css/regular.css +0 -19
- package/dist/assets/fontawesome-free/css/regular.min.css +0 -6
- package/dist/assets/fontawesome-free/css/solid.css +0 -19
- package/dist/assets/fontawesome-free/css/solid.min.css +0 -6
- package/dist/assets/fontawesome-free/css/svg-with-js.css +0 -634
- package/dist/assets/fontawesome-free/css/svg-with-js.min.css +0 -6
- package/dist/assets/fontawesome-free/css/v4-font-face.css +0 -26
- package/dist/assets/fontawesome-free/css/v4-font-face.min.css +0 -6
- package/dist/assets/fontawesome-free/css/v4-shims.css +0 -2146
- package/dist/assets/fontawesome-free/css/v4-shims.min.css +0 -6
- package/dist/assets/fontawesome-free/css/v5-font-face.css +0 -22
- package/dist/assets/fontawesome-free/css/v5-font-face.min.css +0 -6
- 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 +0 -18939
- package/dist/assets/icofont/fonts/icofont.eot +0 -0
- package/dist/assets/icofont/fonts/icofont.svg +0 -2105
- 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 +0 -10757
- package/dist/assets/icofont/icofont.min.css +0 -7
- package/dist/assets/kreon/Kreon-VariableFont_wght.ttf +0 -0
- package/dist/assets/kreon/OFL.txt +0 -93
- package/dist/assets/kreon/README.txt +0 -67
- 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 +0 -41
- package/dist/assets/material-icons/LICENSE +0 -202
- package/dist/assets/material-icons/README.md +0 -129
- package/dist/assets/material-icons/_data/versions.json +0 -2124
- package/dist/assets/material-icons/css/_codepoints.scss +0 -2279
- package/dist/assets/material-icons/css/_mixins.scss +0 -13
- package/dist/assets/material-icons/css/_variables.scss +0 -6
- package/dist/assets/material-icons/css/material-icons.css +0 -9208
- package/dist/assets/material-icons/css/material-icons.min.css +0 -1
- package/dist/assets/material-icons/css/material-icons.scss +0 -39
- package/dist/assets/material-icons/iconfont/_mixins.scss +0 -55
- package/dist/assets/material-icons/iconfont/_variables.scss +0 -3
- package/dist/assets/material-icons/iconfont/filled.css +0 -24
- package/dist/assets/material-icons/iconfont/filled.scss +0 -4
- 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 +0 -124
- package/dist/assets/material-icons/iconfont/material-icons.scss +0 -5
- 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 +0 -24
- package/dist/assets/material-icons/iconfont/outlined.scss +0 -4
- package/dist/assets/material-icons/iconfont/round.css +0 -24
- package/dist/assets/material-icons/iconfont/round.scss +0 -4
- package/dist/assets/material-icons/iconfont/sharp.css +0 -24
- package/dist/assets/material-icons/iconfont/sharp.scss +0 -4
- package/dist/assets/material-icons/iconfont/two-tone.css +0 -24
- package/dist/assets/material-icons/iconfont/two-tone.scss +0 -4
- package/dist/assets/material-icons/index.d.ts +0 -2128
- package/dist/assets/material-icons/package.json +0 -52
- package/dist/assets/material-symbols/LICENSE +0 -202
- package/dist/assets/material-symbols/README.md +0 -114
- package/dist/assets/material-symbols/_core.scss +0 -46
- package/dist/assets/material-symbols/index.css +0 -74
- package/dist/assets/material-symbols/index.d.ts +0 -2809
- package/dist/assets/material-symbols/index.scss +0 -3
- 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 +0 -24
- package/dist/assets/material-symbols/outlined.scss +0 -3
- package/dist/assets/material-symbols/package.json +0 -41
- package/dist/assets/material-symbols/rounded.css +0 -24
- package/dist/assets/material-symbols/rounded.scss +0 -3
- package/dist/assets/material-symbols/sharp.css +0 -24
- package/dist/assets/material-symbols/sharp.scss +0 -3
- 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 +0 -93
- package/dist/assets/noto-sans/noto-sans.css +0 -11
- package/dist/assets/roboto/LICENSE.txt +0 -202
- 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 +0 -27
- 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 +0 -16056
- package/dist/assets/tabler-icons/tabler-icons.html +0 -36226
- package/dist/assets/tabler-icons/tabler-icons.min.css +0 -4
- package/dist/assets/tabler-icons/tabler-icons.png +0 -0
- package/dist/assets/tabler-icons/tabler-icons.scss +0 -8058
- package/public/assets/fontawesome-free/LICENSE.txt +0 -165
- package/public/assets/fontawesome-free/css/all.css +0 -7831
- package/public/assets/fontawesome-free/css/all.min.css +0 -6
- package/public/assets/fontawesome-free/css/brands.css +0 -1432
- package/public/assets/fontawesome-free/css/brands.min.css +0 -6
- package/public/assets/fontawesome-free/css/fontawesome.css +0 -6338
- package/public/assets/fontawesome-free/css/fontawesome.min.css +0 -6
- package/public/assets/fontawesome-free/css/regular.css +0 -19
- package/public/assets/fontawesome-free/css/regular.min.css +0 -6
- package/public/assets/fontawesome-free/css/solid.css +0 -19
- package/public/assets/fontawesome-free/css/solid.min.css +0 -6
- package/public/assets/fontawesome-free/css/svg-with-js.css +0 -634
- package/public/assets/fontawesome-free/css/svg-with-js.min.css +0 -6
- package/public/assets/fontawesome-free/css/v4-font-face.css +0 -26
- package/public/assets/fontawesome-free/css/v4-font-face.min.css +0 -6
- package/public/assets/fontawesome-free/css/v4-shims.css +0 -2146
- package/public/assets/fontawesome-free/css/v4-shims.min.css +0 -6
- package/public/assets/fontawesome-free/css/v5-font-face.css +0 -22
- package/public/assets/fontawesome-free/css/v5-font-face.min.css +0 -6
- 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 +0 -18939
- package/public/assets/icofont/fonts/icofont.eot +0 -0
- package/public/assets/icofont/fonts/icofont.svg +0 -2105
- 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 +0 -10757
- package/public/assets/icofont/icofont.min.css +0 -7
- package/public/assets/kreon/Kreon-VariableFont_wght.ttf +0 -0
- package/public/assets/kreon/OFL.txt +0 -93
- package/public/assets/kreon/README.txt +0 -67
- 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 +0 -41
- package/public/assets/material-icons/LICENSE +0 -202
- package/public/assets/material-icons/README.md +0 -129
- package/public/assets/material-icons/_data/versions.json +0 -2124
- package/public/assets/material-icons/css/_codepoints.scss +0 -2279
- package/public/assets/material-icons/css/_mixins.scss +0 -13
- package/public/assets/material-icons/css/_variables.scss +0 -6
- package/public/assets/material-icons/css/material-icons.css +0 -9208
- package/public/assets/material-icons/css/material-icons.min.css +0 -1
- package/public/assets/material-icons/css/material-icons.scss +0 -39
- package/public/assets/material-icons/iconfont/_mixins.scss +0 -55
- package/public/assets/material-icons/iconfont/_variables.scss +0 -3
- package/public/assets/material-icons/iconfont/filled.css +0 -24
- package/public/assets/material-icons/iconfont/filled.scss +0 -4
- 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 +0 -124
- package/public/assets/material-icons/iconfont/material-icons.scss +0 -5
- 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 +0 -24
- package/public/assets/material-icons/iconfont/outlined.scss +0 -4
- package/public/assets/material-icons/iconfont/round.css +0 -24
- package/public/assets/material-icons/iconfont/round.scss +0 -4
- package/public/assets/material-icons/iconfont/sharp.css +0 -24
- package/public/assets/material-icons/iconfont/sharp.scss +0 -4
- package/public/assets/material-icons/iconfont/two-tone.css +0 -24
- package/public/assets/material-icons/iconfont/two-tone.scss +0 -4
- package/public/assets/material-icons/index.d.ts +0 -2128
- package/public/assets/material-icons/package.json +0 -52
- package/public/assets/material-symbols/LICENSE +0 -202
- package/public/assets/material-symbols/README.md +0 -114
- package/public/assets/material-symbols/_core.scss +0 -46
- package/public/assets/material-symbols/index.css +0 -74
- package/public/assets/material-symbols/index.d.ts +0 -2809
- package/public/assets/material-symbols/index.scss +0 -3
- 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 +0 -24
- package/public/assets/material-symbols/outlined.scss +0 -3
- package/public/assets/material-symbols/package.json +0 -41
- package/public/assets/material-symbols/rounded.css +0 -24
- package/public/assets/material-symbols/rounded.scss +0 -3
- package/public/assets/material-symbols/sharp.css +0 -24
- package/public/assets/material-symbols/sharp.scss +0 -3
- 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 +0 -93
- package/public/assets/noto-sans/noto-sans.css +0 -11
- package/public/assets/roboto/LICENSE.txt +0 -202
- 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 +0 -27
- 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 +0 -16056
- package/public/assets/tabler-icons/tabler-icons.html +0 -36226
- package/public/assets/tabler-icons/tabler-icons.min.css +0 -4
- package/public/assets/tabler-icons/tabler-icons.png +0 -0
- package/public/assets/tabler-icons/tabler-icons.scss +0 -8058
- /package/dist/{1055.js.LICENSE.txt → 4989.js.LICENSE.txt} +0 -0
- /package/dist/{1657.js.LICENSE.txt → 6368.js.LICENSE.txt} +0 -0
- /package/dist/{1714.js.LICENSE.txt → 9244.js.LICENSE.txt} +0 -0
- /package/dist/{5792.js.LICENSE.txt → 9296.js.LICENSE.txt} +0 -0
package/dist/8808.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see 8808.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunk_public_ui_sample_react=self.webpackChunk_public_ui_sample_react||[]).push([[8808],{9246:(t,e,n)=>{n.d(e,{a:()=>a,v:()=>s});var i=n(5800);const a=(t,e,n)=>{(0,i.w)(t,e,(t=>"string"==typeof t&&o.includes(t)),new Set(o),n,{defaultValue:"top"})},o=["left","right","top","bottom"],s=(t,e)=>{a(t,"_align",e)}},608:(t,e,n)=>{n.d(e,{S:()=>s,a:()=>o,b:()=>i,i:()=>a});const i=t=>"object"==typeof t&&null!==t,a=(t,e=0)=>"string"==typeof t&&t.length>=e,o=t=>{if("object"!=typeof t||null===t)return a(t,1);for(const e in t)if(!1===a(e,1))return!1;return!0},s=new Event("StateChange")},2774:(t,e,n)=>{n.d(e,{v:()=>a});var i=n(5800);const a=(t,e)=>{(0,i.i)(t,"_customClass",e,{defaultValue:void 0})}},4879:(t,e,n)=>{n.d(e,{i:()=>l,n:()=>h,r:()=>r});var i=n(5630),a=n(5687),o=n(1732);const s=()=>{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 | ${i.E.kolibriVersion}\n\t`,{forceLog:!0})},r=()=>{!0!==s().adviceShown&&(Object.defineProperty(s(),"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 h=()=>Math.floor(16777215*Math.random()).toString(16);"test"===a.p&&(h=()=>"nonce")},3584:(t,e,n)=>{n.d(e,{t:()=>o});var i=n(8461),a=n(5687);let o=(t,e)=>{var n;return(null!==(n=(0,i.g)())&&void 0!==n?n:(0,i.i)("de")).translate(t,e)};"test"===a.p&&(o=t=>t)},8808:(t,e,n)=>{n.r(e),n.d(e,{kol_pagination:()=>y});var i=n(5630),a=n(3584),o=n(4879),s=n(1820),l=n(7767),r=n(8231),h=n(608),c=n(2774),d=n(5800),p=n(1074),u=n(356);const g={left:"codicon codicon-debug-reverse-continue"},_={left:"codicon codicon-chevron-left"},b={right:"codicon codicon-chevron-right"},f={right:"codicon codicon-debug-continue"},m=function(){const t=navigator.language||"de-DE";return t.includes("-")?t:`${t}-${t.toUpperCase()}`}(),v=new Intl.NumberFormat(m,{style:"decimal",minimumFractionDigits:0,maximumFractionDigits:0}),y=class{constructor(t){(0,i.r)(this,t),this.nonce=(0,o.n)(),this.calcCount=(t,e=1)=>Math.ceil(t/e),this.getCount=()=>this.calcCount(this.state._max,this.state._pageSize),this.onClick=(t,e)=>{"function"==typeof this.state._on.onClick&&this.state._on.onClick(t,e),this.host&&(0,r.d)(this.host,r.K.click,e),this.onChangePage(t,e)},this.onChangePage=(t,e)=>{const n=setTimeout((()=>{clearTimeout(n),"function"==typeof this.state._on.onChangePage&&this.state._on.onChangePage(t,e),this.host&&(0,r.d)(this.host,r.K.changePage,e)}))},this.onChangePageSize=(t,e)=>{if("number"==typeof(e=parseInt(e[0]))&&e>0&&this._pageSize!==e){this._pageSize=e;const n=setTimeout((()=>{clearTimeout(n),"function"==typeof this.state._on.onChangePageSize&&this.state._on.onChangePageSize(t,this._pageSize),this.host&&(0,r.d)(this.host,r.K.changePageSize,this._pageSize)}))}},this.onGoToFirst={onClick:t=>{this.onClick(t,1)}},this.onGoToEnd={onClick:t=>{this.onClick(t,this.getCount())}},this.onGoBackward={onClick:t=>{this.onClick(t,this.state._page-1)}},this.onGoForward={onClick:t=>{this.onClick(t,this.state._page+1)}},this.beforePageSize=(t,e)=>{let n=e.has("_pageSize")?e.get("_pageSize"):this.state._pageSize;const i=e.has("_pageSizeOptions")?e.get("_pageSizeOptions"):this.state._pageSizeOptions;if(Array.isArray(i)&&i.length>0){const t=i.find((t=>t.value===n));n=void 0===t?i[0].value:t.value,e.set("_pageSize",n)}const a=e.has("_page")?e.get("_page"):this.state._page,o=e.has("_max")?e.get("_max"):this.state._max;this.syncPage(e,a,e.get("_pageSize"),o)},this.syncPage=(t,e,n,i)=>{if(i>0){const a=this.calcCount(i,n);a>0&&(e>a?(t.set("_page",a),this.onChangePage(h.S,a)):e<1&&(t.set("_page",1),this.onChangePage(h.S,1)))}},this.beforePageSizeOptions=(t,e)=>{const n=[];if(Array.isArray(t))for(const e of t)"number"==typeof e&&n.push({label:(0,a.t)("kol-page-per-site",{placeholders:{entries:`${e}`}}),value:e});e.set("_pageSizeOptions",n),this.beforePageSize(n,e)},this._boundaryCount=1,this._customClass=void 0,this._label=void 0,this._hasButtons=!0,this._page=void 0,this._pageSize=1,this._pageSizeOptions=[],this._on=void 0,this._siblingCount=1,this._tooltipAlign="top",this._max=void 0,this.state={_boundaryCount:1,_label:(0,a.t)("kol-pagination"),_hasButtons:{first:!0,last:!0,next:!0,previous:!0},_on:{onClick:()=>null},_page:0,_pageSize:1,_pageSizeOptions:[],_siblingCount:1,_max:0}}render(){var t;let e=!1;const n=this.getCount(),s=Array.from(Array(n).keys()).map((t=>t+1)).map((t=>t<=this.state._boundaryCount||t>n-this.state._boundaryCount||t>=this.state._page-this.state._siblingCount&&t<=this.state._page+this.state._siblingCount?(e=!0,this.state._page===t?this.getSelectedPageButton(t):this.getUnselectedPageButton(t)):!0===e?(e=!1,(0,i.h)("li",{key:(0,o.n)()},(0,i.h)("span",{class:"kol-pagination__separator","aria-hidden":"true"}))):null));return(0,i.h)(i.H,{class:"kol-pagination"},(0,i.h)("nav",{"aria-label":this.state._label},(0,i.h)("ul",{class:"kol-pagination__navigation-list"},this.state._hasButtons.first&&(0,i.h)("li",null,(0,i.h)(l.a,{class:"kol-pagination__button kol-pagination__button--first",exportparts:"icon",_customClass:this.state._customClass,_disabled:this.state._page<=1,_icons:g,_hideLabel:!0,_label:(0,a.t)("kol-page-first"),_on:this.onGoToFirst,_tooltipAlign:this.state._tooltipAlign})),this.state._hasButtons.previous&&(0,i.h)("li",null,(0,i.h)(l.a,{class:"kol-pagination__button kol-pagination__button--previous",exportparts:"icon",_customClass:this.state._customClass,_disabled:this.state._page<=1,_icons:_,_hideLabel:!0,_label:(0,a.t)("kol-page-back"),_on:this.onGoBackward,_tooltipAlign:this.state._tooltipAlign})),s,this.state._hasButtons.next&&(0,i.h)("li",null,(0,i.h)(l.a,{class:"kol-pagination__button kol-pagination__button--next",exportparts:"icon",_customClass:this.state._customClass,_disabled:n<=this.state._page,_icons:b,_hideLabel:!0,_label:(0,a.t)("kol-page-next"),_on:this.onGoForward,_tooltipAlign:this.state._tooltipAlign})),this.state._hasButtons.last&&(0,i.h)("li",null,(0,i.h)(l.a,{class:"kol-pagination__button kol-pagination__button--last",exportparts:"icon",_customClass:this.state._customClass,_disabled:n<=this.state._page,_icons:f,_hideLabel:!0,_label:(0,a.t)("kol-page-last"),_on:this.onGoToEnd,_tooltipAlign:this.state._tooltipAlign})))),(null===(t=this.state._pageSizeOptions)||void 0===t?void 0:t.length)>0&&(0,i.h)(l.j,{_hideLabel:!0,_id:`pagination-size-${this.nonce}`,_label:(0,a.t)("kol-entries-per-site"),_options:this.state._pageSizeOptions,_on:{onChange:this.onChangePageSize},_value:[this.state._pageSize]}))}getUnselectedPageButton(t){return(0,i.h)("li",{key:(0,o.n)()},(0,i.h)(l.a,{exportparts:"icon",_customClass:this.state._customClass,_label:"",_on:{onClick:e=>{this.onClick(e,t)}}},(0,i.h)("span",{slot:"expert"},(0,i.h)("span",{class:"visually-hidden"},(0,a.t)("kol-page"))," ",v.format(t))))}getSelectedPageButton(t){return(0,i.h)("li",{key:(0,o.n)()},(0,i.h)(l.a,{class:"kol-pagination__button kol-pagination__button--selected",_customClass:this.state._customClass,_disabled:!0,_label:""},(0,i.h)("span",{slot:"expert"},(0,i.h)("span",{class:"visually-hidden"},(0,a.t)("kol-page"))," ",v.format(t))))}validateBoundaryCount(t){(0,d.k)(this,"_boundaryCount",Math.max(0,null!=t?t:1))}validateCustomClass(t){(0,c.v)(this,t)}validateLabel(t,e,n=!1){n||(0,s.r)(this.state._label),(0,p.v)(this,t),(0,s.a)(this.state._label)}validateHasButtons(t){(0,d.w)(this,"_hasButtons",(t=>"boolean"==typeof t||"string"==typeof t||"object"==typeof t&&null!==t),new Set(["Boolean","PaginationHasButton"]),t,{hooks:{beforePatch:(t,e)=>{if("boolean"==typeof t)e.set("_hasButtons",{first:t,last:t,next:t,previous:t});else{if("string"==typeof t)try{t=(0,d.p)(t)}catch(t){e.delete("_hasButtons")}"object"==typeof t&&null!==t&&e.set("_hasButtons",Object.assign(Object.assign({},this.state._hasButtons),{first:"boolean"==typeof t.first?!0===t.first:this.state._hasButtons.first,last:"boolean"==typeof t.last?!0===t.last:this.state._hasButtons.last,next:"boolean"==typeof t.next?!0===t.next:this.state._hasButtons.next,previous:"boolean"==typeof t.previous?!0===t.previous:this.state._hasButtons.previous}))}}}})}validateOn(t){"object"==typeof t&&null!==t&&(this.state=Object.assign(Object.assign({},this.state),{_on:t}))}validatePage(t){(0,d.k)(this,"_page",t,{hooks:{beforePatch:(t,e)=>{const n=e.has("_pageSize")?e.get("_pageSize"):this.state._pageSize,i=e.has("_max")?e.get("_max"):this.state._max;this.syncPage(e,t,n,i)}}})}validatePageSize(t){(0,d.k)(this,"_pageSize",t,{hooks:{beforePatch:this.beforePageSize}})}validatePageSizeOptions(t){(0,d.g)(this,"_pageSizeOptions",(t=>"number"==typeof t),t,void 0,{hooks:{beforePatch:this.beforePageSizeOptions}})}validateSiblingCount(t){(0,d.k)(this,"_siblingCount",Math.max(0,null!=t?t:1))}validateMax(t){((t,e,n)=>{(0,d.k)(t,"_max",e,n)})(this,t,{hooks:{beforePatch:(t,e)=>{const n=e.has("_page")?e.get("_page"):this.state._page,i=e.has("_pageSize")?e.get("_pageSize"):this.state._pageSize;this.syncPage(e,n,i,t)}}})}validateTooltipAlign(t){(0,u.v)(this,t)}componentWillLoad(){this.validateBoundaryCount(this._boundaryCount),this.validateCustomClass(this._customClass),this.validateHasButtons(this._hasButtons),this.validateLabel(this._label,void 0,!0),this.validateOn(this._on),this.validatePage(this._page),this.validatePageSize(this._pageSize),this.validatePageSizeOptions(this._pageSizeOptions),this.validateSiblingCount(this._siblingCount),this.validateTooltipAlign(this._tooltipAlign),this.validateMax(this._max),this.validatePage(this._page)}disconnectedCallback(){(0,s.r)(this.state._label)}get host(){return(0,i.g)(this)}static get watchers(){return{_boundaryCount:["validateBoundaryCount"],_customClass:["validateCustomClass"],_label:["validateLabel"],_hasButtons:["validateHasButtons"],_on:["validateOn"],_page:["validatePage"],_pageSize:["validatePageSize"],_pageSizeOptions:["validatePageSizeOptions"],_siblingCount:["validateSiblingCount"],_max:["validateMax"],_tooltipAlign:["validateTooltipAlign"]}}};y.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%; /* 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}\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 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.5s;\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 /* TODO. Once #7126 is completed, move :host block into .kol-pagination */\n :host {\n align-items: center;\n display: grid;\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n gap: calc(16rem / var(--kolibri-root-font-size, 16));\n grid-template-columns: 1fr auto;\n }\n .kol-pagination__navigation-list {\n align-items: center;\n display: inline-flex;\n flex-wrap: wrap;\n gap: 0.5em;\n list-style: none;\n margin: 0;\n padding: 0;\n }\n .kol-pagination__separator:before {\n content: \"•••\";\n }\n}"}},1074:(t,e,n)=>{n.d(e,{a:()=>d,b:()=>l,c:()=>r,h:()=>a,v:()=>c});var i=n(5800);const a=[0,1,2,3,4,5,6],o=/[a-zA-Z0-9äöüÄÖÜß]/g,s=/^\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 s.test(t)}const h=new Set(["string"]),c=(t,e,n={})=>{(0,i.w)(t,"_label",(t=>"string"==typeof t),h,e,function(t){var e;return Object.assign(Object.assign({},t),{hooks:{afterPatch:(e,n,a,o)=>{var s,h;"function"==typeof(null===(s=t.hooks)||void 0===s?void 0:s.afterPatch)&&(null===(h=t.hooks)||void 0===h||h.afterPatch(e,n,a,o)),"string"==typeof e&&!1===l(e,3)&&!1===r(e)&&(0,i.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,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}})}(n))},d=c},5687:(t,e,n)=>{n.d(e,{b:()=>s,h:()=>a,p:()=>i,s:()=>o});let i="development";try{i="production"}catch(t){i="production"}const a=(t,e,n)=>{if(t&&e&&"string"==typeof n){const i=t.querySelector(`[slot="${n}"]`);i&&e.appendChild(i)}},o=t=>""===t,s=(t,e)=>t||e||""},356:(t,e,n)=>{n.d(e,{v:()=>a});var i=n(9246);const a=(t,e)=>{(0,i.a)(t,"_tooltipAlign",e)}},1820:(t,e,n)=>{n.d(e,{a:()=>o,r:()=>s});var i=n(1732);const a=new Set;function o(t){a.has(t)?i.L.error(`There already is a nav element with the label "${t}"`,{forceLog:!0}):a.add(t)}function s(t){a.delete(t)}}}]);
|
|
2
|
+
"use strict";(self.webpackChunk_public_ui_sample_react=self.webpackChunk_public_ui_sample_react||[]).push([[8808],{9246:(t,e,n)=>{n.d(e,{a:()=>a,v:()=>s});var i=n(5800);const a=(t,e,n)=>{(0,i.w)(t,e,(t=>"string"==typeof t&&o.includes(t)),new Set(o),n,{defaultValue:"top"})},o=["left","right","top","bottom"],s=(t,e)=>{a(t,"_align",e)}},608:(t,e,n)=>{n.d(e,{S:()=>s,a:()=>o,b:()=>i,i:()=>a});const i=t=>"object"==typeof t&&null!==t,a=(t,e=0)=>"string"==typeof t&&t.length>=e,o=t=>{if("object"!=typeof t||null===t)return a(t,1);for(const e in t)if(!1===a(e,1))return!1;return!0},s=new Event("StateChange")},2774:(t,e,n)=>{n.d(e,{v:()=>a});var i=n(5800);const a=(t,e)=>{(0,i.i)(t,"_customClass",e,{defaultValue:void 0})}},7336:(t,e,n)=>{n.d(e,{i:()=>l,n:()=>h,r:()=>r});var i=n(6783),a=n(5687),o=n(1732);const s=()=>{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 | ${i.E.kolibriVersion}\n\t`,{forceLog:!0})},r=()=>{!0!==s().adviceShown&&(Object.defineProperty(s(),"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 h=()=>Math.floor(16777215*Math.random()).toString(16);"test"===a.p&&(h=()=>"nonce")},3584:(t,e,n)=>{n.d(e,{t:()=>o});var i=n(8461),a=n(5687);let o=(t,e)=>{var n;return(null!==(n=(0,i.g)())&&void 0!==n?n:(0,i.i)("de")).translate(t,e)};"test"===a.p&&(o=t=>t)},8808:(t,e,n)=>{n.r(e),n.d(e,{kol_pagination:()=>y});var i=n(6783),a=n(3584),o=n(7336),s=n(1820),l=n(7662),r=n(8231),h=n(608),c=n(2774),d=n(5800),p=n(1074),u=n(356);const g={left:"codicon codicon-debug-reverse-continue"},_={left:"codicon codicon-chevron-left"},b={right:"codicon codicon-chevron-right"},f={right:"codicon codicon-debug-continue"},m=function(){const t=navigator.language||"de-DE";return t.includes("-")?t:`${t}-${t.toUpperCase()}`}(),v=new Intl.NumberFormat(m,{style:"decimal",minimumFractionDigits:0,maximumFractionDigits:0}),y=class{constructor(t){(0,i.r)(this,t),this.nonce=(0,o.n)(),this.calcCount=(t,e=1)=>Math.ceil(t/e),this.getCount=()=>this.calcCount(this.state._max,this.state._pageSize),this.onClick=(t,e)=>{"function"==typeof this.state._on.onClick&&this.state._on.onClick(t,e),this.host&&(0,r.d)(this.host,r.K.click,e),this.onChangePage(t,e)},this.onChangePage=(t,e)=>{const n=setTimeout((()=>{clearTimeout(n),"function"==typeof this.state._on.onChangePage&&this.state._on.onChangePage(t,e),this.host&&(0,r.d)(this.host,r.K.changePage,e)}))},this.onChangePageSize=(t,e)=>{if("number"==typeof(e=parseInt(e[0]))&&e>0&&this._pageSize!==e){this._pageSize=e;const n=setTimeout((()=>{clearTimeout(n),"function"==typeof this.state._on.onChangePageSize&&this.state._on.onChangePageSize(t,this._pageSize),this.host&&(0,r.d)(this.host,r.K.changePageSize,this._pageSize)}))}},this.onGoToFirst={onClick:t=>{this.onClick(t,1)}},this.onGoToEnd={onClick:t=>{this.onClick(t,this.getCount())}},this.onGoBackward={onClick:t=>{this.onClick(t,this.state._page-1)}},this.onGoForward={onClick:t=>{this.onClick(t,this.state._page+1)}},this.beforePageSize=(t,e)=>{let n=e.has("_pageSize")?e.get("_pageSize"):this.state._pageSize;const i=e.has("_pageSizeOptions")?e.get("_pageSizeOptions"):this.state._pageSizeOptions;if(Array.isArray(i)&&i.length>0){const t=i.find((t=>t.value===n));n=void 0===t?i[0].value:t.value,e.set("_pageSize",n)}const a=e.has("_page")?e.get("_page"):this.state._page,o=e.has("_max")?e.get("_max"):this.state._max;this.syncPage(e,a,e.get("_pageSize"),o)},this.syncPage=(t,e,n,i)=>{if(i>0){const a=this.calcCount(i,n);a>0&&(e>a?(t.set("_page",a),this.onChangePage(h.S,a)):e<1&&(t.set("_page",1),this.onChangePage(h.S,1)))}},this.beforePageSizeOptions=(t,e)=>{const n=[];if(Array.isArray(t))for(const e of t)"number"==typeof e&&n.push({label:(0,a.t)("kol-page-per-site",{placeholders:{entries:`${e}`}}),value:e});e.set("_pageSizeOptions",n),this.beforePageSize(n,e)},this._boundaryCount=1,this._customClass=void 0,this._label=void 0,this._hasButtons=!0,this._page=void 0,this._pageSize=1,this._pageSizeOptions=[],this._on=void 0,this._siblingCount=1,this._tooltipAlign="top",this._max=void 0,this.state={_boundaryCount:1,_label:(0,a.t)("kol-pagination"),_hasButtons:{first:!0,last:!0,next:!0,previous:!0},_on:{onClick:()=>null},_page:0,_pageSize:1,_pageSizeOptions:[],_siblingCount:1,_max:0}}render(){var t;let e=!1;const n=this.getCount(),s=Array.from(Array(n).keys()).map((t=>t+1)).map((t=>t<=this.state._boundaryCount||t>n-this.state._boundaryCount||t>=this.state._page-this.state._siblingCount&&t<=this.state._page+this.state._siblingCount?(e=!0,this.state._page===t?this.getSelectedPageButton(t):this.getUnselectedPageButton(t)):!0===e?(e=!1,(0,i.h)("li",{key:(0,o.n)()},(0,i.h)("span",{class:"kol-pagination__separator","aria-hidden":"true"}))):null));return(0,i.h)(i.H,{class:"kol-pagination"},(0,i.h)("nav",{"aria-label":this.state._label},(0,i.h)("ul",{class:"kol-pagination__navigation-list"},this.state._hasButtons.first&&(0,i.h)("li",null,(0,i.h)(l.a,{class:"kol-pagination__button kol-pagination__button--first",exportparts:"icon",_customClass:this.state._customClass,_disabled:this.state._page<=1,_icons:g,_hideLabel:!0,_label:(0,a.t)("kol-page-first"),_on:this.onGoToFirst,_tooltipAlign:this.state._tooltipAlign})),this.state._hasButtons.previous&&(0,i.h)("li",null,(0,i.h)(l.a,{class:"kol-pagination__button kol-pagination__button--previous",exportparts:"icon",_customClass:this.state._customClass,_disabled:this.state._page<=1,_icons:_,_hideLabel:!0,_label:(0,a.t)("kol-page-back"),_on:this.onGoBackward,_tooltipAlign:this.state._tooltipAlign})),s,this.state._hasButtons.next&&(0,i.h)("li",null,(0,i.h)(l.a,{class:"kol-pagination__button kol-pagination__button--next",exportparts:"icon",_customClass:this.state._customClass,_disabled:n<=this.state._page,_icons:b,_hideLabel:!0,_label:(0,a.t)("kol-page-next"),_on:this.onGoForward,_tooltipAlign:this.state._tooltipAlign})),this.state._hasButtons.last&&(0,i.h)("li",null,(0,i.h)(l.a,{class:"kol-pagination__button kol-pagination__button--last",exportparts:"icon",_customClass:this.state._customClass,_disabled:n<=this.state._page,_icons:f,_hideLabel:!0,_label:(0,a.t)("kol-page-last"),_on:this.onGoToEnd,_tooltipAlign:this.state._tooltipAlign})))),(null===(t=this.state._pageSizeOptions)||void 0===t?void 0:t.length)>0&&(0,i.h)(l.j,{_hideLabel:!0,_id:`pagination-size-${this.nonce}`,_label:(0,a.t)("kol-entries-per-site"),_options:this.state._pageSizeOptions,_on:{onChange:this.onChangePageSize},_value:[this.state._pageSize]}))}getUnselectedPageButton(t){return(0,i.h)("li",{key:(0,o.n)()},(0,i.h)(l.a,{exportparts:"icon",_customClass:this.state._customClass,_label:"",_on:{onClick:e=>{this.onClick(e,t)}}},(0,i.h)("span",{slot:"expert"},(0,i.h)("span",{class:"visually-hidden"},(0,a.t)("kol-page"))," ",v.format(t))))}getSelectedPageButton(t){return(0,i.h)("li",{key:(0,o.n)()},(0,i.h)(l.a,{class:"kol-pagination__button kol-pagination__button--selected",_customClass:this.state._customClass,_disabled:!0,_label:""},(0,i.h)("span",{slot:"expert"},(0,i.h)("span",{class:"visually-hidden"},(0,a.t)("kol-page"))," ",v.format(t))))}validateBoundaryCount(t){(0,d.k)(this,"_boundaryCount",Math.max(0,null!=t?t:1))}validateCustomClass(t){(0,c.v)(this,t)}validateLabel(t,e,n=!1){n||(0,s.r)(this.state._label),(0,p.v)(this,t),(0,s.a)(this.state._label)}validateHasButtons(t){(0,d.w)(this,"_hasButtons",(t=>"boolean"==typeof t||"string"==typeof t||"object"==typeof t&&null!==t),new Set(["Boolean","PaginationHasButton"]),t,{hooks:{beforePatch:(t,e)=>{if("boolean"==typeof t)e.set("_hasButtons",{first:t,last:t,next:t,previous:t});else{if("string"==typeof t)try{t=(0,d.p)(t)}catch(t){e.delete("_hasButtons")}"object"==typeof t&&null!==t&&e.set("_hasButtons",Object.assign(Object.assign({},this.state._hasButtons),{first:"boolean"==typeof t.first?!0===t.first:this.state._hasButtons.first,last:"boolean"==typeof t.last?!0===t.last:this.state._hasButtons.last,next:"boolean"==typeof t.next?!0===t.next:this.state._hasButtons.next,previous:"boolean"==typeof t.previous?!0===t.previous:this.state._hasButtons.previous}))}}}})}validateOn(t){"object"==typeof t&&null!==t&&(this.state=Object.assign(Object.assign({},this.state),{_on:t}))}validatePage(t){(0,d.k)(this,"_page",t,{hooks:{beforePatch:(t,e)=>{const n=e.has("_pageSize")?e.get("_pageSize"):this.state._pageSize,i=e.has("_max")?e.get("_max"):this.state._max;this.syncPage(e,t,n,i)}}})}validatePageSize(t){(0,d.k)(this,"_pageSize",t,{hooks:{beforePatch:this.beforePageSize}})}validatePageSizeOptions(t){(0,d.g)(this,"_pageSizeOptions",(t=>"number"==typeof t),t,void 0,{hooks:{beforePatch:this.beforePageSizeOptions}})}validateSiblingCount(t){(0,d.k)(this,"_siblingCount",Math.max(0,null!=t?t:1))}validateMax(t){((t,e,n)=>{(0,d.k)(t,"_max",e,n)})(this,t,{hooks:{beforePatch:(t,e)=>{const n=e.has("_page")?e.get("_page"):this.state._page,i=e.has("_pageSize")?e.get("_pageSize"):this.state._pageSize;this.syncPage(e,n,i,t)}}})}validateTooltipAlign(t){(0,u.v)(this,t)}componentWillLoad(){this.validateBoundaryCount(this._boundaryCount),this.validateCustomClass(this._customClass),this.validateHasButtons(this._hasButtons),this.validateLabel(this._label,void 0,!0),this.validateOn(this._on),this.validatePage(this._page),this.validatePageSize(this._pageSize),this.validatePageSizeOptions(this._pageSizeOptions),this.validateSiblingCount(this._siblingCount),this.validateTooltipAlign(this._tooltipAlign),this.validateMax(this._max),this.validatePage(this._page)}disconnectedCallback(){(0,s.r)(this.state._label)}get host(){return(0,i.g)(this)}static get watchers(){return{_boundaryCount:["validateBoundaryCount"],_customClass:["validateCustomClass"],_label:["validateLabel"],_hasButtons:["validateHasButtons"],_on:["validateOn"],_page:["validatePage"],_pageSize:["validatePageSize"],_pageSizeOptions:["validatePageSizeOptions"],_siblingCount:["validateSiblingCount"],_max:["validateMax"],_tooltipAlign:["validateTooltipAlign"]}}};y.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%; /* 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}\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 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.5s;\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 /* TODO. Once #7126 is completed, move :host block into .kol-pagination */\n :host {\n align-items: center;\n display: grid;\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n gap: calc(16rem / var(--kolibri-root-font-size, 16));\n grid-template-columns: 1fr auto;\n }\n .kol-pagination__navigation-list {\n align-items: center;\n display: inline-flex;\n flex-wrap: wrap;\n gap: 0.5em;\n list-style: none;\n margin: 0;\n padding: 0;\n }\n .kol-pagination__separator:before {\n content: \"•••\";\n }\n}"}},1074:(t,e,n)=>{n.d(e,{a:()=>d,b:()=>l,c:()=>r,h:()=>a,v:()=>c});var i=n(5800);const a=[0,1,2,3,4,5,6],o=/[a-zA-Z0-9äöüÄÖÜß]/g,s=/^\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 s.test(t)}const h=new Set(["string"]),c=(t,e,n={})=>{(0,i.w)(t,"_label",(t=>"string"==typeof t),h,e,function(t){var e;return Object.assign(Object.assign({},t),{hooks:{afterPatch:(e,n,a,o)=>{var s,h;"function"==typeof(null===(s=t.hooks)||void 0===s?void 0:s.afterPatch)&&(null===(h=t.hooks)||void 0===h||h.afterPatch(e,n,a,o)),"string"==typeof e&&!1===l(e,3)&&!1===r(e)&&(0,i.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,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}})}(n))},d=c},5687:(t,e,n)=>{n.d(e,{b:()=>s,h:()=>a,p:()=>i,s:()=>o});let i="development";try{i="production"}catch(t){i="production"}const a=(t,e,n)=>{if(t&&e&&"string"==typeof n){const i=t.querySelector(`[slot="${n}"]`);i&&e.appendChild(i)}},o=t=>""===t,s=(t,e)=>t||e||""},356:(t,e,n)=>{n.d(e,{v:()=>a});var i=n(9246);const a=(t,e)=>{(0,i.a)(t,"_tooltipAlign",e)}},1820:(t,e,n)=>{n.d(e,{a:()=>o,r:()=>s});var i=n(1732);const a=new Set;function o(t){a.has(t)?i.L.error(`There already is a nav element with the label "${t}"`,{forceLog:!0}):a.add(t)}function s(t){a.delete(t)}}}]);
|
package/dist/8999.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see 8999.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunk_public_ui_sample_react=self.webpackChunk_public_ui_sample_react||[]).push([[8999],{8999:(e,t,l)=>{l.r(t),l.d(t,{kol_tree_wc:()=>a});var n=l(
|
|
2
|
+
"use strict";(self.webpackChunk_public_ui_sample_react=self.webpackChunk_public_ui_sample_react||[]).push([[8999],{8999:(e,t,l)=>{l.r(t),l.d(t,{kol_tree_wc:()=>a});var n=l(6783),i=l(7662),r=l(1074),s=(e,t,l)=>new Promise(((n,i)=>{var r=e=>{try{a(l.next(e))}catch(e){i(e)}},s=e=>{try{a(l.throw(e))}catch(e){i(e)}},a=e=>e.done?n(e.value):Promise.resolve(e.value).then(r,s);a((l=l.apply(e,t)).next())}));const a=class{constructor(e){(0,n.r)(this,e),this.state={_label:""},this._label=void 0}validateLabel(e){(0,r.v)(this,e)}render(){return(0,n.h)(n.H,{key:"7ed304596f8d9f4ab353c881aa3e7a058d23b1cc",onSlotchange:this.handleSlotchange.bind(this)},(0,n.h)("nav",{key:"53d283e8c52792eb96d540a364cd13f6e504a433",class:"kol-tree","aria-label":this.state._label},(0,n.h)("ul",{key:"c2ce2459919900ee430507a5599ff09d54638376",class:"kol-tree__treeview-navigation",role:"tree","aria-label":this.state._label},(0,n.h)("slot",{key:"cba291c46b0bbfe699b154b0333932a1829ff03e"}))))}static isTreeItem(e){return(null==e?void 0:e.tagName)===i.r.toUpperCase()}componentWillLoad(){this.validateLabel(this._label),this.handleTreeChange(),this.observeChildListMutations()}disconnectedCallback(){var e;null===(e=this.observer)||void 0===e||e.disconnect()}observeChildListMutations(){this.observer=new MutationObserver(this.handleTreeChange.bind(this)),this.observeTopLevelItems()}handleSlotchange(){this.observeTopLevelItems(),this.handleTreeChange()}observeTopLevelItems(){var e;null===(e=this.getTopLevelTreeItems())||void 0===e||e.forEach((e=>{var t;null===(t=this.observer)||void 0===t||t.observe(e,{childList:!0,subtree:!0})}))}getTopLevelTreeItems(){var e,t,l;return null===(l=null===(t=null===(e=this.host.querySelector("slot"))||void 0===e?void 0:e.assignedNodes)||void 0===t?void 0:t.call(e))||void 0===l?void 0:l.filter(a.isTreeItem)}handleTreeChange(){this.treeItemElements=this.getTreeItemElements(),this.ensureActiveItemVisibility()}getTreeItemElements(){var e;return null===(e=this.getTopLevelTreeItems())||void 0===e?void 0:e.reduce(((e,t)=>{const l=t.querySelectorAll(i.r);return[...e,t,...l]}),[])}getOpenTreeItemElements(){return s(this,null,(function*(){if(!this.treeItemElements)return;const e=t=>s(this,null,(function*(){return!a.isTreeItem(t.parentElement)||(yield t.parentElement.isOpen())&&(yield e(t.parentElement))}));return(yield Promise.all(this.treeItemElements.map((t=>s(this,null,(function*(){return{value:t,include:yield e(t)}})))))).filter((e=>e.include)).map((e=>e.value))}))}handleKeyDown(e){return s(this,null,(function*(){var t,l,n,r,s,a,o,c,d;const u=yield this.getOpenTreeItemElements(),v=null===(t=document.activeElement)||void 0===t?void 0:t.closest(i.r);if(!u||!v)return;const h=null==u?void 0:u.findIndex((e=>e===v));switch(e.key){case"ArrowDown":yield null===(l=u[h+1])||void 0===l?void 0:l.focusLink(),e.preventDefault();break;case"ArrowUp":yield null===(n=u[h-1])||void 0===n?void 0:n.focusLink(),e.preventDefault();break;case"Right":case"ArrowRight":e.preventDefault(),(yield v.isOpen())?yield null===(r=u[h+1])||void 0===r?void 0:r.focusLink():yield v.expand();break;case"Left":case"ArrowLeft":if(e.preventDefault(),yield v.isOpen())yield v.collapse();else{const e=u.findIndex((e=>e===v.parentElement));-1!==e&&(yield null===(s=u[e])||void 0===s?void 0:s.focusLink())}break;case"Home":yield null===(a=u[0])||void 0===a?void 0:a.focusLink(),e.preventDefault();break;case"End":yield null===(o=u[u.length-1])||void 0===o?void 0:o.focusLink(),e.preventDefault();break;case null===(c=e.key.match(/[a-zA-Z0-9]/))||void 0===c?void 0:c.input:{const t=e.key.toLowerCase(),l=u.indexOf(v)+1,n=u.concat(u),i=n.slice(l,l+u.length).findIndex((e=>{var l;return null===(l=e.getAttribute("_label"))||void 0===l?void 0:l.trim().toLowerCase().startsWith(t)}));-1!==i&&(yield n[l+i].focusLink(),e.preventDefault());break}case"*":{const e=null===(d=v.parentElement)||void 0===d?void 0:d.querySelectorAll(i.r);null==e||e.forEach((e=>{e.expand()}));break}}}))}handleFocusOut(e){return s(this,null,(function*(){e.relatedTarget&&!e.relatedTarget.closest(i.q)&&(yield this.ensureActiveItemVisibility())}))}ensureActiveItemVisibility(){return s(this,null,(function*(){const e=t=>{a.isTreeItem(t.parentElement)&&(t.parentElement.expand(),e(t.parentElement))},t=(()=>{var e,t,l,n;const r=null!==(n=null===(l=null===(t=null===(e=this.host.querySelector("slot"))||void 0===e?void 0:e.assignedNodes)||void 0===t?void 0:t.call(e))||void 0===l?void 0:l.filter(a.isTreeItem))&&void 0!==n?n:[];for(const e of r){if(e._active)return e;const t=e.querySelector(`${i.r}[_active="true"]`);if(t&&t._active)return t}})();t&&e(t)}))}get host(){return(0,n.g)(this)}static get watchers(){return{_label:["validateLabel"]}}}},1074:(e,t,l)=>{l.d(t,{a:()=>u,b:()=>a,c:()=>o,h:()=>i,v:()=>d});var n=l(5800);const i=[0,1,2,3,4,5,6],r=/[a-zA-Z0-9äöüÄÖÜß]/g,s=/^\d+$/;function a(e,t=1){return function(e){var t;return"string"==typeof e&&(null===(t=e.match(r))||void 0===t?void 0:t.length)||0}(e)>=t}function o(e){return s.test(e)}const c=new Set(["string"]),d=(e,t,l={})=>{(0,n.w)(e,"_label",(e=>"string"==typeof e),c,t,function(e){var t;return Object.assign(Object.assign({},e),{hooks:{afterPatch:(t,l,i,r)=>{var s,c;"function"==typeof(null===(s=e.hooks)||void 0===s?void 0:s.afterPatch)&&(null===(c=e.hooks)||void 0===c||c.afterPatch(t,l,i,r)),"string"==typeof t&&!1===a(t,3)&&!1===o(t)&&(0,n.a)(`The heading or label ("${t}") is not accessible. A label should consist of at least three readable characters.`),"string"==typeof t&&t.length>80&&(0,n.u)("A heading or label should not be longer than 80 characters.")},beforePatch:null===(t=e.hooks)||void 0===t?void 0:t.beforePatch}})}(l))},u=d}}]);
|
package/dist/9068.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see 9068.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunk_public_ui_sample_react=self.webpackChunk_public_ui_sample_react||[]).push([[9068],{2909:(e,t,n)=>{n.d(t,{a:()=>s,p:()=>r});var i=n(7767),o=n(5800),a=n(1732);const l=e=>{for((0,a.a)()&&((0,o.j)("↓ Search form element start."),a.L.debug(e));e instanceof HTMLElement&&"FORM"!==e.tagName&&e.tagName!==i.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,o.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,o.q)(e,a),a.dispatchEvent(e);else if(a.tagName===i.h.toUpperCase()){(0,o.q)(e,o.K.querySelector("form",a));const i=a;"function"==typeof(null===(t=i._on)||void 0===t?void 0:t.onReset)&&(null===(n=i._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,o.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,o.q)(e,t),t.dispatchEvent(e))}));else if(t.tagName===i.h.toUpperCase()){(0,o.q)(e,o.K.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))}))}}}},1295:(e,t,n)=>{n.d(t,{I:()=>h,a:()=>u,b:()=>s,f:()=>c,v:()=>r});var i=n(6548),o=n(5800),a=n(1074);const l=e=>{if("object"==typeof e&&null!==e){if("string"==typeof e.label&&e.label.length>0)return e.disabled=!0===e.disabled,e.label=`${e.label}`.trim(),!1===(0,a.b)(e.label,3)&&!1===(0,a.c)(e.label)&&(0,o.a)(`A differing Aria-Label (${e.label}) is not accessible. A differing Aria-Label should consist of at least three readable characters.`),!Array.isArray(e.options)||void 0===e.options.find((e=>!1===l(e)));if("number"==typeof e.label)return!0}return!1},s=(e,t,n={})=>{(0,o.g)(e,"_options",(e=>"object"==typeof e&&null!==e&&"string"==typeof e.label&&e.label.length>0),t,void 0,n)},r=(e,t,n={})=>{(0,o.g)(e,"_options",l,t,void 0,n)},d=["horizontal","vertical"],c=(e,t,n="")=>{t.forEach(((t,i)=>{const o=`${n}-${i}`;"object"==typeof t&&null!==t&&"string"==typeof t.label&&t.label.length>0&&(Array.isArray(t.options)?c(e,t.options,o):e.set(o,t))}))};class h extends i.I{constructor(e,t,n){super(e,t,n),this.component=e}validateRequired(e){((e,t)=>{(0,o.b)(e,"_required",t)})(this.component,e)}componentWillLoad(){super.componentWillLoad(),this.validateRequired(this.component._required)}}class u extends h{constructor(e,t,n){super(e,t,n),this.keyOptionMap=new Map,this.getOptionByKey=e=>this.keyOptionMap.get(e),this.afterPatchOptions=(e,t,n,i)=>{"_value"===i&&this.setFormAssociatedValue(e)},this.beforePatchOptions=(e,t)=>{const n=t.has("_options")?t.get("_options"):this.component.state._options;Array.isArray(n)&&n.length>0&&(this.keyOptionMap.clear(),c(this.keyOptionMap,n))},this.component=e}validateOrientation(e){(0,o.w)(this.component,"_orientation",(e=>"string"==typeof e&&d.includes(e)),new Set([`Orientation {${d.join(", ")}`]),e,{defaultValue:"vertical"})}validateOptions(e){s(this.component,e,{hooks:{afterPatch:this.afterPatchOptions,beforePatch:this.beforePatchOptions}})}validateValue(e){e=(0,o.m)(e),e=Array.isArray(e)?e[0]:e,(0,o.s)(this.component,"_value",e,{afterPatch:this.afterPatchOptions,beforePatch:this.beforePatchOptions})}componentWillLoad(){super.componentWillLoad(),this.validateOrientation(this.component._orientation),this.validateOptions(this.component._options),this.validateValue(this.component._value)}}},9068:(e,t,n)=>{n.r(t),n.d(t,{kol_select:()=>w});var i=n(5630),o=n(9060),a=n(4879),l=n(6100),s=n(1295),r=n(9444),d=n(5800),c=n(2909),h=n(1559),u=n(4600),p=n(3532),b=n(9339),m=(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 f extends l.I{constructor(e,t,n){super(e,t,n),this.keyOptionMap=new Map,this.getOptionByKey=e=>this.keyOptionMap.get(e),this.isValueInOptions=(e,t)=>void 0!==t.find((t=>"string"==typeof t.value?t.value===e:!!Array.isArray(t.options)&&this.isValueInOptions(e,t.options))),this.filterValuesInOptions=(e,t)=>e.filter((e=>void 0!==this.isValueInOptions(e,t))),this.afterPatchOptions=(e,t,n,i)=>{"_value"===i&&this.setFormAssociatedValue(e)},this.beforePatchOptions=(e,t)=>{const n=t.has("_options")?t.get("_options"):this.component.state._options;if(Array.isArray(n)&&n.length>0){this.keyOptionMap.clear(),(0,s.f)(this.keyOptionMap,n);const e=t.has("_value")?t.get("_value"):this.component.state._value,i=this.filterValuesInOptions(Array.isArray(e)&&e.length>0?e:[],n);!1===this.component._multiple&&0===i.length?t.set("_value",[n[0].value]):Array.isArray(e)&&i.length<e.length&&t.set("_value",i)}},this.component=e}validateOptions(e){(0,s.v)(this.component,e,{hooks:{afterPatch:this.afterPatchOptions,beforePatch:this.beforePatchOptions}})}validateMultiple(e){(0,d.b)(this.component,"_multiple",e,{hooks:{afterPatch:this.afterPatchOptions,beforePatch:this.beforePatchOptions}})}validateRequired(e){(0,d.b)(this.component,"_required",e)}validateRows(e){(0,r.v)(this.component,e)}validateValue(e){(0,d.g)(this.component,"_value",(()=>!0),e,void 0,{hooks:{afterPatch:this.afterPatchOptions,beforePatch:this.beforePatchOptions}})}componentWillLoad(){super.componentWillLoad(),this.validateOptions(this.component._options),this.validateMultiple(this.component._multiple),this.validateRequired(this.component._required),this.validateRows(this.component._rows),this.validateValue(this.component._value)}}const v=e=>{var{baseClassName:t="kol-select",class:n,index:a,selectedValue:l,selected:s,value:r,label:d,disabled:c}=e,h=(0,u._)(e,["baseClassName","class","index","selectedValue","selected","value","label","disabled"]);l?Array.isArray(l)||(l=[l]):l=[];const p=s||l.includes(r);return(0,i.h)("option",Object.assign({class:(0,o.c)(`${t}__option`,{[`${t}__option--selected`]:p,[`${t}__option--disabled`]:c},n),selected:p,disabled:c,value:a||r},h),d)},_=({baseClassName:e,preKey:t,options:n,disabled:a,value:l,OptionProps:s={},OptionGroupProps:r={}})=>(null==n?void 0:n.length)?(0,i.h)(i.F,null,n.map(((d,c)=>{const h=[t,`-${c}`].join("");if("options"in d){if(!n.length)return null;const{label:t}=d,c=(0,u._)(d,["label"]);return(0,i.h)("optgroup",Object.assign({class:(0,o.c)(`${e}__optgroup`,{[`${e}__optgroup--disabled`]:a}),key:h},r,{label:null==t?void 0:t.toString(),disabled:a}),(0,i.h)(_,Object.assign({baseClassName:e,OptionGroupProps:r,OptionProps:s,value:l,preKey:h},c)))}return"value"in d?(0,i.h)(v,Object.assign({key:h,baseClassName:e},s,{index:h,selectedValue:l},d)):null}))):null,y=_,g=e=>{const{class:t,msg:n,touched:a,disabled:l,required:s,options:r,value:d,OptionProps:c,OptionGroupProps:h,ariaDescribedBy:m,hideLabel:f,label:v}=e,_=(0,u._)(e,["class","msg","touched","disabled","required","options","value","OptionProps","OptionGroupProps","ariaDescribedBy","hideLabel","label"]),g=(0,b.c)(n,a),k={"kol-select--disabled":Boolean(l),"kol-select--required":Boolean(s),"kol-select--touched":Boolean(a),[`kol-select--${(null==n?void 0:n.type)||"error"}`]:g},w=Object.assign(Object.assign({class:(0,o.c)("kol-select",k,t),required:s,disabled:l},(0,p.d)({ariaDescribedBy:m,hideLabel:f,label:v})),_);return(0,i.h)("select",Object.assign({},w),(0,i.h)(y,{baseClassName:"kol-select",options:r,value:d,OptionGroupProps:h,OptionProps:c}))},k=e=>{var{state:t}=e,n=(0,u._)(e,["state"]);return(0,i.h)(g,Object.assign({},function(e){const{ariaDescribedBy:t}=(0,p.g)(e);return{id:e._id,hideLabel:e._hideLabel,label:e._label,value:e._value,options:e._options,accessKey:e._accessKey,disabled:e._disabled,name:e._name,ariaDescribedBy:t,size:e._rows,multiple:e._multiple,required:e._required,touched:e._touched,msg:(0,b.a)(e._msg)}}(t),n))},w=class{getValue(){return m(this,null,(function*(){return this.state._value}))}kolFocus(){return m(this,null,(function*(){var e;null===(e=this.selectRef)||void 0===e||e.focus()}))}getFormFieldProps(){return{state:this.state,class:(0,o.c)("kol-form-field-select",{"kol-form-field--has-value":this.state._hasValue}),tooltipAlign:this._tooltipAlign,onClick:()=>{var e;return null===(e=this.selectRef)||void 0===e?void 0:e.focus()},alert:this.showAsAlert()}}getSelectProps(){return Object.assign(Object.assign({ref:this.catchRef,state:this.state},this.controller.onFacade),{onInput:this.onInput.bind(this),onChange:this.onChange.bind(this),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)(p.K,Object.assign({key:"22e085eb00690ae0f4689534f2a5642fb82b9f01"},this.getFormFieldProps()),(0,i.h)(h.K,{key:"bd11e43aeda3abf320d1cb6b85958b5c7b9c1c34",state:this.state},(0,i.h)("form",{key:"1cd5b0e7b6ae50157c98e06d542e7eb84e47d15e",onSubmit:e=>{e.preventDefault(),(0,c.p)({form:this.host,ref:this.selectRef})}},(0,i.h)("input",{key:"2abb84f53cdb0a591b9b137c5237d7facde9d8b8",type:"submit",hidden:!0}),(0,i.h)(k,Object.assign({key:"03b6cbd8e015e8a20529a2fa3dba07d4f9f7fe83"},this.getSelectProps())))))}constructor(e){(0,i.r)(this,e),this.catchRef=e=>{this.selectRef=e},this._accessKey=void 0,this._disabled=!1,this._hideError=!1,this._hideLabel=!1,this._hint="",this._icons=void 0,this._id=void 0,this._label=void 0,this._msg=void 0,this._multiple=!1,this._name=void 0,this._on=void 0,this._options=void 0,this._required=!1,this._shortKey=void 0,this._rows=void 0,this._syncValueBySelector=void 0,this._tabIndex=void 0,this._tooltipAlign="top",this._touched=!1,this._value=void 0,this.state={_hasValue:!1,_hideError:!1,_id:`id-${(0,a.n)()}`,_label:"",_multiple:!1,_options:[],_value:[]},this.inputHasFocus=!1,this.controller=new f(this,"select",this.host)}showAsAlert(){return Boolean(this.state._touched)&&!this.inputHasFocus}validateAccessKey(e){this.controller.validateAccessKey(e)}validateDisabled(e){this.controller.validateDisabled(e)}validateHideError(e){this.controller.validateHideError(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)}validateMsg(e){this.controller.validateMsg(e)}validateMultiple(e){this.controller.validateMultiple(e)}validateName(e){this.controller.validateName(e)}validateOn(e){this.controller.validateOn(e)}validateOptions(e){this.controller.validateOptions(e)}validateRequired(e){this.controller.validateRequired(e)}validateRows(e){this.controller.validateRows(e)}validateShortKey(e){this.controller.validateShortKey(e)}validateSyncValueBySelector(e){this.controller.validateSyncValueBySelector(e)}validateTabIndex(e){this.controller.validateTabIndex(e)}validateTouched(e){this.controller.validateTouched(e)}validateValue(e){this.controller.validateValue(e)}componentWillLoad(){this._touched=!0===this._touched,this.controller.componentWillLoad(),this.state._hasValue=!!this.state._value,this.controller.addValueChangeListener((e=>this.state._hasValue=!!e))}onInput(e){var t;this._value=Array.from((null===(t=this.selectRef)||void 0===t?void 0:t.options)||[]).filter((e=>!0===e.selected)).map((e=>{var t;return null===(t=this.controller.getOptionByKey(e.value))||void 0===t?void 0:t.value})),this.controller.onFacade.onInput(e,!0,this._value)}onChange(e){this.controller.onFacade.onChange(e,this._value)}get host(){return(0,i.g)(this)}static get watchers(){return{_accessKey:["validateAccessKey"],_disabled:["validateDisabled"],_hideError:["validateHideError"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_msg:["validateMsg"],_multiple:["validateMultiple"],_name:["validateName"],_on:["validateOn"],_options:["validateOptions"],_required:["validateRequired"],_rows:["validateRows"],_shortKey:["validateShortKey"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_touched:["validateTouched"],_value:["validateValue"]}}};w.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%; /* 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}\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.5s;\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 cursor: pointer;\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__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-select {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n cursor: pointer;\n width: 100%;\n /* needed hack for vertical alignment */\n }\n .kol-select:not([multiple], [size]) {\n height: 2.75em;\n }\n .kol-select:focus {\n outline: none;\n }\n .kol-select__option:checked::before {\n content: "✓ ";\n }\n .kol-select[multiple] option {\n padding: calc((var(--a11y-min-size) - (16rem / var(--kolibri-root-font-size, 16))) / 2) 0.5em;\n }\n}'}},9444:(e,t,n)=>{n.d(t,{v:()=>o});var i=n(5800);const o=(e,t)=>{(0,i.k)(e,"_rows",t,{min:1})}}}]);
|
|
2
|
+
"use strict";(self.webpackChunk_public_ui_sample_react=self.webpackChunk_public_ui_sample_react||[]).push([[9068],{375:(e,t,n)=>{n.d(t,{K:()=>a});var o=n(6783),i=n(7662);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})}},9574:(e,t,n)=>{n.d(t,{a:()=>s,p:()=>r});var o=n(7662),i=n(5800),a=n(1732);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.q)(e,a),a.dispatchEvent(e);else if(a.tagName===o.h.toUpperCase()){(0,i.q)(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.q)(e,t),t.dispatchEvent(e))}));else if(t.tagName===o.h.toUpperCase()){(0,i.q)(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))}))}}}},7358:(e,t,n)=>{n.d(t,{I:()=>h,a:()=>u,b:()=>s,f:()=>d,v:()=>r});var o=n(8625),i=n(5800),a=n(1074);const l=e=>{if("object"==typeof e&&null!==e){if("string"==typeof e.label&&e.label.length>0)return e.disabled=!0===e.disabled,e.label=`${e.label}`.trim(),!1===(0,a.b)(e.label,3)&&!1===(0,a.c)(e.label)&&(0,i.a)(`A differing Aria-Label (${e.label}) is not accessible. A differing Aria-Label should consist of at least three readable characters.`),!Array.isArray(e.options)||void 0===e.options.find((e=>!1===l(e)));if("number"==typeof e.label)return!0}return!1},s=(e,t,n={})=>{(0,i.g)(e,"_options",(e=>"object"==typeof e&&null!==e&&"string"==typeof e.label&&e.label.length>0),t,void 0,n)},r=(e,t,n={})=>{(0,i.g)(e,"_options",l,t,void 0,n)},c=["horizontal","vertical"],d=(e,t,n="")=>{t.forEach(((t,o)=>{const i=`${n}-${o}`;"object"==typeof t&&null!==t&&"string"==typeof t.label&&t.label.length>0&&(Array.isArray(t.options)?d(e,t.options,i):e.set(i,t))}))};class h extends o.I{constructor(e,t,n){super(e,t,n),this.component=e}validateRequired(e){((e,t)=>{(0,i.b)(e,"_required",t)})(this.component,e)}componentWillLoad(){super.componentWillLoad(),this.validateRequired(this.component._required)}}class u extends h{constructor(e,t,n){super(e,t,n),this.keyOptionMap=new Map,this.getOptionByKey=e=>this.keyOptionMap.get(e),this.afterPatchOptions=(e,t,n,o)=>{"_value"===o&&this.setFormAssociatedValue(e)},this.beforePatchOptions=(e,t)=>{const n=t.has("_options")?t.get("_options"):this.component.state._options;Array.isArray(n)&&n.length>0&&(this.keyOptionMap.clear(),d(this.keyOptionMap,n))},this.component=e}validateOrientation(e){(0,i.w)(this.component,"_orientation",(e=>"string"==typeof e&&c.includes(e)),new Set([`Orientation {${c.join(", ")}`]),e,{defaultValue:"vertical"})}validateOptions(e){s(this.component,e,{hooks:{afterPatch:this.afterPatchOptions,beforePatch:this.beforePatchOptions}})}validateValue(e){e=(0,i.m)(e),e=Array.isArray(e)?e[0]:e,(0,i.s)(this.component,"_value",e,{afterPatch:this.afterPatchOptions,beforePatch:this.beforePatchOptions})}componentWillLoad(){super.componentWillLoad(),this.validateOrientation(this.component._orientation),this.validateOptions(this.component._options),this.validateValue(this.component._value)}}},5363:(e,t,n)=>{n.d(t,{I:()=>w,K:()=>k,a:()=>y});var o=n(6783),i=n(2587),a=n(665),l=n(4600),s=n(7662),r=n(375),c=n(9060),d=n(5650),h=n(8625),u=n(8973),p=n(5800),b=n(608);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,c.c)(s,r,i)},a),t)};function f(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,c.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:b}=e,_=(0,l._)(e,["class","startAdornment","endAdornment","disabled","msg","touched","containerProps","startAdornmentProps","endAdornmentProps"]),g=(0,d.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,c.c)("kol-input-container",y,n)},_);return f(i)||f(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({},b,{position:"end"}),a)):(0,o.h)("div",Object.assign({},k),(0,o.h)(v,Object.assign({},u),t))},g=e=>{const{label:t,icons:n,hideLabel:i,disabled:a,onClick:r}=e,c=(0,l._)(e,["label","icons","hideLabel","disabled","onClick"]);return(0,o.h)(s.a,Object.assign({tabindex:0,_label:t,_disabled:a,_icons:n,_hideLabel:i,_on:{onClick:r}},c))},y=e=>{const{componentName:t="button",label:n,icon:i,onClick:a}=e,s=(0,l._)(e,["componentName","label","icon","onClick"]),c="button"===t?g:r.K;return(0,o.h)(c,Object.assign({label:n||"",hideLabel:!0,icons:`codicon codicon-${i}`,onClick:a},s))},k=({state:e,endAdornment:t},n)=>{const{icons:l,smartButton:s,disabled:r,msg:c,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,d.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 b=[],m=[];return t&&(Array.isArray(t)?m.push(...t):m.push(t)),u&&b.push((0,o.h)(y,Object.assign({componentName:"icon"},(0,a.i)(u)?u:{}))),(0,a.i)(s)&&m.push((0,o.h)(y,Object.assign({componentName:"button"},s,{hideLabel:!0,disabled:r}))),p&&m.push((0,o.h)(y,Object.assign({componentName:"icon"},(0,a.i)(p)?p:{}))),(0,o.h)(_,{disabled:r,msg:c,touched:h,startAdornment:b,endAdornment:m},n)},O=(e,t)=>{const n=e;"object"==typeof n&&null!==n&&((0,b.i)(n.right,1)&&(n.right={icon:n.right}),(0,b.i)(n.left,1)&&(n.left={icon:n.left}),t.set("_icons",n))};class w extends h.I{constructor(e,t,n){super(e,t,n),this.component=e}validateIcons(e){(0,p.o)(e,(()=>{try{e=(0,p.p)(e)}catch(e){}(0,p.w)(this.component,"_icons",(e=>"object"==typeof e&&null!==e&&((0,b.i)(e.left,1)||(0,u.i)(e.left)||(0,b.i)(e.right,1)||(0,u.i)(e.right))),new Set(["KoliBriHorizontalIcon"]),e,{hooks:{beforePatch:O},required:!0})}))}componentWillLoad(){super.componentWillLoad(),this.validateIcons(this.component._icons)}}},8973:(e,t,n)=>{n.d(t,{i:()=>l,v:()=>s});var o=n(5800),i=n(608);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)}}}))}))}},665:(e,t,n)=>{function o(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}n.d(t,{i:()=>o})},9068:(e,t,n)=>{n.r(t),n.d(t,{kol_select:()=>k});var o=n(6783),i=n(9060),a=n(7336),l=n(5363),s=n(7358),r=n(9444),c=n(5800),d=n(9574),h=n(4600),u=n(8625),p=n(5650),b=(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 m extends l.I{constructor(e,t,n){super(e,t,n),this.keyOptionMap=new Map,this.getOptionByKey=e=>this.keyOptionMap.get(e),this.isValueInOptions=(e,t)=>void 0!==t.find((t=>"string"==typeof t.value?t.value===e:!!Array.isArray(t.options)&&this.isValueInOptions(e,t.options))),this.filterValuesInOptions=(e,t)=>e.filter((e=>void 0!==this.isValueInOptions(e,t))),this.afterPatchOptions=(e,t,n,o)=>{"_value"===o&&this.setFormAssociatedValue(e)},this.beforePatchOptions=(e,t)=>{const n=t.has("_options")?t.get("_options"):this.component.state._options;if(Array.isArray(n)&&n.length>0){this.keyOptionMap.clear(),(0,s.f)(this.keyOptionMap,n);const e=t.has("_value")?t.get("_value"):this.component.state._value,o=this.filterValuesInOptions(Array.isArray(e)&&e.length>0?e:[],n);!1===this.component._multiple&&0===o.length?t.set("_value",[n[0].value]):Array.isArray(e)&&o.length<e.length&&t.set("_value",o)}},this.component=e}validateOptions(e){(0,s.v)(this.component,e,{hooks:{afterPatch:this.afterPatchOptions,beforePatch:this.beforePatchOptions}})}validateMultiple(e){(0,c.b)(this.component,"_multiple",e,{hooks:{afterPatch:this.afterPatchOptions,beforePatch:this.beforePatchOptions}})}validateRequired(e){(0,c.b)(this.component,"_required",e)}validateRows(e){(0,r.v)(this.component,e)}validateValue(e){(0,c.g)(this.component,"_value",(()=>!0),e,void 0,{hooks:{afterPatch:this.afterPatchOptions,beforePatch:this.beforePatchOptions}})}componentWillLoad(){super.componentWillLoad(),this.validateOptions(this.component._options),this.validateMultiple(this.component._multiple),this.validateRequired(this.component._required),this.validateRows(this.component._rows),this.validateValue(this.component._value)}}const f=e=>{var{baseClassName:t="kol-select",class:n,index:a,selectedValue:l,selected:s,value:r,label:c,disabled:d}=e,u=(0,h._)(e,["baseClassName","class","index","selectedValue","selected","value","label","disabled"]);l?Array.isArray(l)||(l=[l]):l=[];const p=s||l.includes(r);return(0,o.h)("option",Object.assign({class:(0,i.c)(`${t}__option`,{[`${t}__option--selected`]:p,[`${t}__option--disabled`]:d},n),selected:p,disabled:d,value:a||r},u),c)},v=({baseClassName:e,preKey:t,options:n,disabled:a,value:l,OptionProps:s={},OptionGroupProps:r={}})=>(null==n?void 0:n.length)?(0,o.h)(o.F,null,n.map(((c,d)=>{const u=[t,`-${d}`].join("");if("options"in c){if(!n.length)return null;const{label:t}=c,d=(0,h._)(c,["label"]);return(0,o.h)("optgroup",Object.assign({class:(0,i.c)(`${e}__optgroup`,{[`${e}__optgroup--disabled`]:a}),key:u},r,{label:null==t?void 0:t.toString(),disabled:a}),(0,o.h)(v,Object.assign({baseClassName:e,OptionGroupProps:r,OptionProps:s,value:l,preKey:u},d)))}return"value"in c?(0,o.h)(f,Object.assign({key:u,baseClassName:e},s,{index:u,selectedValue:l},c)):null}))):null,_=v,g=e=>{const{class:t,msg:n,touched:a,disabled:l,required:s,options:r,value:c,OptionProps:d,OptionGroupProps:b,ariaDescribedBy:m,hideLabel:f,label:v}=e,g=(0,h._)(e,["class","msg","touched","disabled","required","options","value","OptionProps","OptionGroupProps","ariaDescribedBy","hideLabel","label"]),y=(0,p.c)(n,a),k={"kol-select--disabled":Boolean(l),"kol-select--required":Boolean(s),"kol-select--touched":Boolean(a),[`kol-select--${(null==n?void 0:n.type)||"error"}`]:y},O=Object.assign(Object.assign({class:(0,i.c)("kol-select",k,t),required:s,disabled:l},(0,u.d)({ariaDescribedBy:m,hideLabel:f,label:v})),g);return(0,o.h)("select",Object.assign({},O),(0,o.h)(_,{baseClassName:"kol-select",options:r,value:c,OptionGroupProps:b,OptionProps:d}))},y=e=>{var{state:t}=e,n=(0,h._)(e,["state"]);return(0,o.h)(g,Object.assign({},function(e){const{ariaDescribedBy:t}=(0,u.g)(e);return{id:e._id,hideLabel:e._hideLabel,label:e._label,value:e._value,options:e._options,accessKey:e._accessKey,disabled:e._disabled,name:e._name,ariaDescribedBy:t,size:e._rows,multiple:e._multiple,required:e._required,touched:e._touched,msg:(0,p.a)(e._msg)}}(t),n))},k=class{getValue(){return b(this,null,(function*(){return this.state._value}))}kolFocus(){return b(this,null,(function*(){var e;null===(e=this.selectRef)||void 0===e||e.focus()}))}getFormFieldProps(){return{state:this.state,class:(0,i.c)("kol-form-field-select",{"kol-form-field--has-value":this.state._hasValue}),tooltipAlign:this._tooltipAlign,onClick:()=>{var e;return null===(e=this.selectRef)||void 0===e?void 0:e.focus()},alert:this.showAsAlert()}}getSelectProps(){return Object.assign(Object.assign({ref:this.catchRef,state:this.state},this.controller.onFacade),{onInput:this.onInput.bind(this),onChange:this.onChange.bind(this),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)(u.K,Object.assign({key:"ee17395a6e4c6739788a55963b94371d694c5170"},this.getFormFieldProps()),(0,o.h)(l.K,{key:"b39687b04e0e072ca8558a7ae50e010cf90a654c",state:this.state},(0,o.h)("form",{key:"23f28fee6175c9f1cc19236dd7c24aa38e7a1515",onSubmit:e=>{e.preventDefault(),(0,d.p)({form:this.host,ref:this.selectRef})}},(0,o.h)("input",{key:"38cce424bf172f0c235bf68878b6d2ac9c704ba9",type:"submit",hidden:!0}),(0,o.h)(y,Object.assign({key:"958a3dd3848c598ecc38d2f4b3be72b75750d1d6"},this.getSelectProps())))))}constructor(e){(0,o.r)(this,e),this.catchRef=e=>{this.selectRef=e},this._accessKey=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._multiple=!1,this._name=void 0,this._on=void 0,this._options=void 0,this._required=!1,this._shortKey=void 0,this._rows=void 0,this._syncValueBySelector=void 0,this._tabIndex=void 0,this._tooltipAlign="top",this._touched=!1,this._value=void 0,this.state={_hasValue:!1,_hideMsg:!1,_id:`id-${(0,a.n)()}`,_label:"",_multiple:!1,_options:[],_value:[]},this.inputHasFocus=!1,this.controller=new m(this,"select",this.host)}showAsAlert(){return Boolean(this.state._touched)&&!this.inputHasFocus}validateAccessKey(e){this.controller.validateAccessKey(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)}validateMsg(e){this.controller.validateMsg(e)}validateMultiple(e){this.controller.validateMultiple(e)}validateName(e){this.controller.validateName(e)}validateOn(e){this.controller.validateOn(e)}validateOptions(e){this.controller.validateOptions(e)}validateRequired(e){this.controller.validateRequired(e)}validateRows(e){this.controller.validateRows(e)}validateShortKey(e){this.controller.validateShortKey(e)}validateSyncValueBySelector(e){this.controller.validateSyncValueBySelector(e)}validateTabIndex(e){this.controller.validateTabIndex(e)}validateTouched(e){this.controller.validateTouched(e)}validateValue(e){this.controller.validateValue(e)}componentWillLoad(){this._touched=!0===this._touched,this.controller.componentWillLoad(),this.state._hasValue=!!this.state._value,this.controller.addValueChangeListener((e=>this.state._hasValue=!!e))}onInput(e){var t;this._value=Array.from((null===(t=this.selectRef)||void 0===t?void 0:t.options)||[]).filter((e=>!0===e.selected)).map((e=>{var t;return null===(t=this.controller.getOptionByKey(e.value))||void 0===t?void 0:t.value})),this.controller.onFacade.onInput(e,!0,this._value)}onChange(e){this.controller.onFacade.onChange(e,this._value)}get host(){return(0,o.g)(this)}static get watchers(){return{_accessKey:["validateAccessKey"],_disabled:["validateDisabled"],_hideMsg:["validateHideMsg"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_msg:["validateMsg"],_multiple:["validateMultiple"],_name:["validateName"],_on:["validateOn"],_options:["validateOptions"],_required:["validateRequired"],_rows:["validateRows"],_shortKey:["validateShortKey"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_touched:["validateTouched"],_value:["validateValue"]}}};k.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%; /* 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}\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.5s;\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 cursor: pointer;\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-select {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n cursor: pointer;\n width: 100%;\n /* needed hack for vertical alignment */\n }\n .kol-select:not([multiple], [size]) {\n height: 2.75em;\n }\n .kol-select:focus {\n outline: none;\n }\n .kol-select__option:checked::before {\n content: "✓ ";\n }\n .kol-select[multiple] option {\n padding: calc((var(--a11y-min-size) - (16rem / var(--kolibri-root-font-size, 16))) / 2) 0.5em;\n }\n}'}},9444:(e,t,n)=>{n.d(t,{v:()=>i});var o=n(5800);const i=(e,t)=>{(0,o.k)(e,"_rows",t,{min:1})}}}]);
|
package/dist/9130.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see 9130.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunk_public_ui_sample_react=self.webpackChunk_public_ui_sample_react||[]).push([[9130],{8101:(e,t,i)=>{i.d(t,{K:()=>h});var s=i(4600),o=i(5630),l=i(9060),a=i(3584),n=i(7767),r=i(3849);const c=({ariaLabel:e,icon:t})=>(0,o.h)(n.d,{class:"kol-alert__heading-icon",_label:e,_icons:t}),d=({type:e,label:t})=>{switch(e){case"error":return(0,o.h)(c,{ariaLabel:(0,a.t)("kol-error"),icon:"codicon codicon-error",label:t});case"info":return(0,o.h)(c,{ariaLabel:(0,a.t)("kol-info"),icon:"codicon codicon-info",label:t});case"warning":return(0,o.h)(c,{ariaLabel:(0,a.t)("kol-warning"),icon:"codicon codicon-warning",label:t});case"success":return(0,o.h)(c,{ariaLabel:(0,a.t)("kol-success"),icon:"codicon codicon-pass",label:t});default:return(0,o.h)(c,{ariaLabel:(0,a.t)("kol-message"),icon:"codicon codicon-comment",label:t})}},h=(e,t)=>{var i,c;const{class:h={},type:_="default",variant:u="msg",label:p,hasCloser:b,alert:v,onAlertTimeout:g,onCloserClick:f,level:y}=e,m=(0,s._)(e,["class","type","variant","label","hasCloser","alert","onAlertTimeout","onCloserClick","level"]);v&&((null===(i=navigator.userActivation)||void 0===i?void 0:i.hasBeenActive)&&(null===(c=null===navigator||void 0===navigator?void 0:navigator.vibrate)||void 0===c||c.call(navigator,[100,75,100,75,100])),setTimeout((()=>{null==g||g()}),1e4));const k=Object.assign({class:(0,l.c)("kol-alert",`kol-alert--${_}`,`kol-alert--${u}`,{"kol-alert--hasCloser":!!b},h),role:v?"alert":void 0},m);return(0,o.h)("div",Object.assign({},k),(0,o.h)("div",{class:"kol-alert__container"},(0,o.h)(d,{label:p,type:_}),(0,o.h)("div",{class:"kol-alert__container-content"},p?(0,o.h)(r.K,{class:"kol-alert__heading",level:y},p):null,"msg"===u&&(0,o.h)("div",{class:"kol-alert__content"},t)),b&&(0,o.h)(n.a,{class:"kol-alert__close-button close","data-testid":"alert-close-button",_ariaDescription:(null==p?void 0:p.trim())||"",_hideLabel:!0,_icons:{left:{icon:"codicon codicon-close"}},_label:(0,a.t)("kol-close-alert"),_on:{onClick:f},_tooltipAlign:"left"})),"card"===u&&(0,o.h)("div",{class:"kol-alert__content"},t))}},5924:(e,t,i)=>{i.d(t,{K:()=>n});var s=i(4600),o=i(9060),l=i(5630),a=i(8101);const n=e=>{var{alert:t,msg:i,hideError:n,id:r,class:c}=e,d=(0,s._)(e,["alert","msg","hideError","id","class"]);return(0,l.h)(a.K,Object.assign({id:`${r}-msg`,alert:t,type:"error",class:(0,o.c)("kol-form-field__msg",{"visually-hidden":!0===n},c)},i,d,{"aria-hidden":"true"}),(null==i?void 0:i.description)||void 0)}},3849:(e,t,i)=>{i.d(t,{K:()=>d});var s=i(4600),o=i(5630),l=i(9060);const a=1;function n(e){return function(e){return e>=a&&e<=6}(e)?`h${e}`:"strong"}const r=(e,t)=>{var{class:i,level:r=a,variant:c}=e,d=(0,s._)(e,["class","level","variant"]);const h=n(r),_=c||h;return(0,o.h)(h,Object.assign({class:(0,l.c)("kol-headline",`kol-headline--${_}`,i)},d),t)},c=(e,t)=>{var{class:i,level:r=a}=e,c=(0,s._)(e,["class","level"]);const d=function(e){return 1===e?"span":n(e)}(r+1);return(0,o.h)(d,Object.assign({class:(0,l.c)("kol-headline kol-headline--group kol-headline--secondary",i)},c),t)},d=(e,t)=>{var{secondaryHeadline:i,level:n=a,class:d,HeadingGroupProps:h={},SecondaryHeadlineProps:_={}}=e,u=(0,s._)(e,["secondaryHeadline","level","class","HeadingGroupProps","SecondaryHeadlineProps"]);const p=Object.assign({level:n},u);if(!i)return(0,o.h)(r,Object.assign({class:(0,l.c)(d,"kol-headline--single")},p),t);const{class:b}=h,v=(0,s._)(h,["class"]),g=Object.assign({class:(0,l.c)("kol-heading-group",b)},v);return(0,o.h)("hgroup",Object.assign({},g),(0,o.h)(r,Object.assign({class:(0,l.c)(d,"kol-headline--group","kol-headline--primary")},p),t),(0,o.h)(c,Object.assign({level:n},_),i))}},9060:(e,t,i)=>{function s(e){var t,i,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e)){var l=e.length;for(t=0;t<l;t++)e[t]&&(i=s(e[t]))&&(o&&(o+=" "),o+=i)}else for(i in e)e[i]&&(o&&(o+=" "),o+=i);return o}function o(){for(var e,t,i=0,o="",l=arguments.length;i<l;i++)(e=arguments[i])&&(t=s(e))&&(o&&(o+=" "),o+=t);return o}i.d(t,{c:()=>o})},608:(e,t,i)=>{i.d(t,{S:()=>a,a:()=>l,b:()=>s,i:()=>o});const s=e=>"object"==typeof e&&null!==e,o=(e,t=0)=>"string"==typeof e&&e.length>=t,l=e=>{if("object"!=typeof e||null===e)return o(e,1);for(const t in e)if(!1===o(t,1))return!1;return!0},a=new Event("StateChange")},3584:(e,t,i)=>{i.d(t,{t:()=>l});var s=i(8461),o=i(5687);let l=(e,t)=>{var i;return(null!==(i=(0,s.g)())&&void 0!==i?i:(0,s.i)("de")).translate(e,t)};"test"===o.p&&(l=e=>e)},9130:(e,t,i)=>{i.r(t),i.d(t,{kol_input:()=>d});var s=i(5630),o=i(9060),l=i(3584),a=i(7767),n=i(5687),r=i(5924),c=i(9339);const d=class{constructor(e){(0,s.r)(this,e),this.slotName="input",this.catchInputSlot=e=>{(0,n.h)(this.host,e,this.slotName)},this._accessKey=void 0,this._alert=!0,this._currentLength=void 0,this._disabled=!1,this._hasCounter=!1,this._hideError=!1,this._hideLabel=!1,this._hint="",this._icons=void 0,this._id=void 0,this._label=void 0,this._maxLength=void 0,this._msg=void 0,this._readOnly=!1,this._renderNoLabel=!1,this._required=!1,this._shortKey=void 0,this._slotName=void 0,this._suggestions=void 0,this._smartButton=void 0,this._tooltipAlign="top",this._touched=!1}componentWillRender(){this.slotName=this._slotName?this._slotName:"input"}getIconStyles(e){return e&&"object"==typeof e&&e.style?e.style:{}}render(){var e,t,i,d,h,_,u,p,b,v,g,f;const y="object"==typeof this._msg&&null!==this._msg&&"string"==typeof(null===(e=this._msg)||void 0===e?void 0:e._description)&&(null===(t=this._msg)||void 0===t?void 0:t._description.length)>0&&(!0===this._touched||"error"!==(null===(i=this._msg)||void 0===i?void 0:i._type)),m=(0,n.s)(this._label),k="string"==typeof this._hint&&this._hint.length>0,j=!m&&this._hideLabel;return(0,s.h)(s.H,{key:"47d48cb3391d5125ad056746e169e802b03fe19e",class:(0,o.c)("kol-input",this.getModifierClassNameByMsgType(y),{disabled:!0===this._disabled,[(null===(d=this._msg)||void 0===d?void 0:d._type)||"error"]:!0===y,"read-only":!0===this._readOnly,required:!0===this._required,touched:!0===this._touched,"hidden-error":!0===this._hideError})},(0,s.h)("label",{key:"360ba9fd8926df14b3656f727a54af744760a96b",class:"input-label",id:j?void 0:`${this._id}-label`,hidden:j,htmlFor:this._id},(0,s.h)("span",{key:"199a8b0f85f362e84c55bf9f341e280ffc3d4a7c",class:"input-label-span"},(0,s.h)("slot",{key:"00ea0a09585e0ed5dcfddeff0f373f5b26714af7",name:"label"}))),k&&(0,s.h)("span",{key:"6c8e4a79e294519ec03a68d9c9b6b374eead09da",class:"hint",id:`${this._id}-hint`},this._hint),(0,s.h)("div",{key:"95def369e9fbc92359cb323aa1dc8928c059f0a9",class:{input:!0,"icon-left":"object"==typeof(null===(h=this._icons)||void 0===h?void 0:h.left),"icon-right":"object"==typeof(null===(_=this._icons)||void 0===_?void 0:_.right)}},(null===(u=this._icons)||void 0===u?void 0:u.left)&&(0,s.h)(a.d,{key:"4a20a8a6bec113062795cf4683fa060c296c15d3",_label:"",_icons:(null===(p=this._icons)||void 0===p?void 0:p.left).icon,style:this.getIconStyles(null===(b=this._icons)||void 0===b?void 0:b.left)}),(0,s.h)("div",{key:"a6cdca63bd77ea17fcfe4b79702c44737ec41666",ref:this.catchInputSlot,id:this.slotName,class:"input-slot"}),"object"==typeof this._smartButton&&null!==this._smartButton&&(0,s.h)(a.a,{key:"96030cc3f13a0fb94a8ff727960fdbac9a086867",_customClass:this._smartButton._customClass,_disabled:this._smartButton._disabled,_icons:this._smartButton._icons,_hideLabel:!0,_id:this._smartButton._id,_label:this._smartButton._label,_on:this._smartButton._on,_tooltipAlign:this._smartButton._tooltipAlign,_variant:this._smartButton._variant}),(null===(v=this._icons)||void 0===v?void 0:v.right)&&(0,s.h)(a.d,{key:"611697e04653bd185102e256ac8196c810f29ba2",_label:"",_icons:(null===(g=this._icons)||void 0===g?void 0:g.right).icon,style:this.getIconStyles(null===(f=this._icons)||void 0===f?void 0:f.right)})),j&&(0,s.h)(a.g,{key:"611163b1225ad2e4e604835a9de0d689d4c9784b","aria-hidden":"true",class:"input-tooltip",_badgeText:this._accessKey||this._shortKey,_align:this._tooltipAlign,_id:this._hideLabel?`${this._id}-label`:void 0,_label:this._label}),y&&(0,s.h)(r.K,{key:"edfc09226329f6081b3cd18a0704f81dca4e5eb0",alert:this._alert,hideError:this._hideError,msg:(0,c.a)(this._msg),id:this._id}),Array.isArray(this._suggestions)&&this._suggestions.length>0&&(0,s.h)("datalist",{key:"65c4f35c52bd46d9b6c789d7dd6e331d8611f63a",id:`${this._id}-list`},this._suggestions.map((e=>(0,s.h)("option",{value:e})))),this._hasCounter&&(0,s.h)("span",{key:"2b535d700016345e60d09137b3458e2f92a0022a",class:"counter","aria-atomic":"true","aria-live":"polite","data-testid":"input-counter"},this._currentLength,this._maxLength&&(0,s.h)(s.F,null,(0,s.h)("span",{key:"0c16f20c7ab46a7cd1a858de19ea401bbcd9a8da","aria-label":(0,l.t)("kol-of"),role:"img"},"/"),this._maxLength)," ",(0,s.h)("span",{key:"612a81784c2e4d56ea800e3521dd9cfcf620ca7a"},(0,l.t)("kol-characters"))))}getModifierClassNameByMsgType(e){var t,i;if(e&&(null===(t=this._msg)||void 0===t?void 0:t._type))return{default:"msg-type-default",info:"msg-type-info",success:"msg-type-success",warning:"msg-type-warning",error:"msg-type-error"}[null===(i=this._msg)||void 0===i?void 0:i._type]}get host(){return(0,s.g)(this)}}},9339:(e,t,i)=>{i.d(t,{a:()=>a,c:()=>n,v:()=>l});var s=i(5800),o=i(608);const l=(e,t)=>{(0,s.o)(t,(()=>{try{t=(0,s.p)(t)}catch(e){}(0,s.w)(e,"_msg",(e=>(0,o.b)(e)&&"string"==typeof(null==e?void 0:e._description)),new Set(["MsgPropType"]),t,{defaultValue:{_description:"",_type:"error"}})}))};function a(e){var t;if(e&&!function(e){return!e||"error"===e._type&&!e._description}(e))return t=e,Object.entries(t).reduce(((e,[t,i])=>{const s=t.startsWith("_")?t.slice(1):t;return Object.assign(Object.assign({},e),{[s]:i})}),{})}function n(e,t){return Boolean((null==e?void 0:e.description)&&(null==e?void 0:e.description.length)>0)&&(!0===t||"error"!==(null==e?void 0:e.type))}},5687:(e,t,i)=>{i.d(t,{b:()=>a,h:()=>o,p:()=>s,s:()=>l});let s="development";try{s="production"}catch(e){s="production"}const o=(e,t,i)=>{if(e&&t&&"string"==typeof i){const s=e.querySelector(`[slot="${i}"]`);s&&t.appendChild(s)}},l=e=>""===e,a=(e,t)=>e||t||""},4600:(e,t,i)=>{function s(e,t){var i={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(i[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(s=Object.getOwnPropertySymbols(e);o<s.length;o++)t.indexOf(s[o])<0&&Object.prototype.propertyIsEnumerable.call(e,s[o])&&(i[s[o]]=e[s[o]])}return i}i.d(t,{_:()=>s}),"function"==typeof SuppressedError&&SuppressedError}}]);
|
|
2
|
+
"use strict";(self.webpackChunk_public_ui_sample_react=self.webpackChunk_public_ui_sample_react||[]).push([[9130],{5626:(e,t,i)=>{i.d(t,{K:()=>h});var s=i(4600),o=i(6783),l=i(9060),a=i(3584),n=i(7662),r=i(3334);const c=({ariaLabel:e,icon:t})=>(0,o.h)(n.d,{class:"kol-alert__heading-icon",_label:e,_icons:t}),d=({type:e,label:t})=>{switch(e){case"error":return(0,o.h)(c,{ariaLabel:(0,a.t)("kol-error"),icon:"codicon codicon-error",label:t});case"info":return(0,o.h)(c,{ariaLabel:(0,a.t)("kol-info"),icon:"codicon codicon-info",label:t});case"warning":return(0,o.h)(c,{ariaLabel:(0,a.t)("kol-warning"),icon:"codicon codicon-warning",label:t});case"success":return(0,o.h)(c,{ariaLabel:(0,a.t)("kol-success"),icon:"codicon codicon-pass",label:t});default:return(0,o.h)(c,{ariaLabel:(0,a.t)("kol-message"),icon:"codicon codicon-comment",label:t})}},h=(e,t)=>{var i,c;const{class:h={},type:_="default",variant:u="msg",label:b,hasCloser:g,alert:p,onAlertTimeout:f,onCloserClick:v,level:y}=e,m=(0,s._)(e,["class","type","variant","label","hasCloser","alert","onAlertTimeout","onCloserClick","level"]);p&&((null===(i=navigator.userActivation)||void 0===i?void 0:i.hasBeenActive)&&(null===(c=null===navigator||void 0===navigator?void 0:navigator.vibrate)||void 0===c||c.call(navigator,[100,75,100,75,100])),setTimeout((()=>{null==f||f()}),1e4));const k=Object.assign({class:(0,l.c)("kol-alert",`kol-alert--${_}`,`kol-alert--${u}`,{"kol-alert--hasCloser":!!g},h),role:p?"alert":void 0},m);return(0,o.h)("div",Object.assign({},k),(0,o.h)("div",{class:"kol-alert__container"},(0,o.h)(d,{label:b,type:_}),(0,o.h)("div",{class:"kol-alert__container-content"},b?(0,o.h)(r.K,{class:"kol-alert__heading",level:y},b):null,"msg"===u&&(0,o.h)("div",{class:"kol-alert__content"},t)),g&&(0,o.h)(n.a,{class:"kol-alert__close-button close","data-testid":"alert-close-button",_ariaDescription:(null==b?void 0:b.trim())||"",_hideLabel:!0,_icons:{left:{icon:"codicon codicon-close"}},_label:(0,a.t)("kol-close-alert"),_on:{onClick:v},_tooltipAlign:"left"})),"card"===u&&(0,o.h)("div",{class:"kol-alert__content"},t))}},5650:(e,t,i)=>{i.d(t,{K:()=>_,a:()=>d,c:()=>h,v:()=>c});var s=i(5800),o=i(608),l=i(4600),a=i(9060),n=i(6783),r=i(5626);const c=(e,t)=>{(0,s.o)(t,(()=>{try{t=(0,s.p)(t)}catch(e){}(0,s.w)(e,"_msg",(e=>(0,o.b)(e)&&"string"==typeof(null==e?void 0:e._description)),new Set(["MsgPropType"]),t,{defaultValue:{_description:"",_type:"error"}})}))};function d(e){var t;if(e&&!function(e){return!e||"error"===e._type&&!e._description}(e))return t=e,Object.entries(t).reduce(((e,[t,i])=>{const s=t.startsWith("_")?t.slice(1):t;return Object.assign(Object.assign({},e),{[s]:i})}),{})}function h(e,t){return Boolean((null==e?void 0:e.description)&&(null==e?void 0:e.description.length)>0)&&(!0===t||"error"!==(null==e?void 0:e.type))}const _=e=>{var{alert:t,msg:i,hideMsg:s,id:o,class:c}=e,d=(0,l._)(e,["alert","msg","hideMsg","id","class"]);return(0,n.h)(r.K,Object.assign({id:`${o}-msg`,alert:t,type:"error",class:(0,a.c)("kol-form-field__msg",{"visually-hidden":!0===s},c)},i,d,{"aria-hidden":"true"}),(null==i?void 0:i.description)||void 0)}},3334:(e,t,i)=>{i.d(t,{K:()=>d});var s=i(4600),o=i(6783),l=i(9060);const a=1;function n(e){return function(e){return e>=a&&e<=6}(e)?`h${e}`:"strong"}const r=(e,t)=>{var{class:i,level:r=a,variant:c}=e,d=(0,s._)(e,["class","level","variant"]);const h=n(r),_=c||h;return(0,o.h)(h,Object.assign({class:(0,l.c)("kol-headline",`kol-headline--${_}`,i)},d),t)},c=(e,t)=>{var{class:i,level:r=a}=e,c=(0,s._)(e,["class","level"]);const d=function(e){return 1===e?"span":n(e)}(r+1);return(0,o.h)(d,Object.assign({class:(0,l.c)("kol-headline kol-headline--group kol-headline--secondary",i)},c),t)},d=(e,t)=>{var{secondaryHeadline:i,level:n=a,class:d,HeadingGroupProps:h={},SecondaryHeadlineProps:_={}}=e,u=(0,s._)(e,["secondaryHeadline","level","class","HeadingGroupProps","SecondaryHeadlineProps"]);const b=Object.assign({level:n},u);if(!i)return(0,o.h)(r,Object.assign({class:(0,l.c)(d,"kol-headline--single")},b),t);const{class:g}=h,p=(0,s._)(h,["class"]),f=Object.assign({class:(0,l.c)("kol-heading-group",g)},p);return(0,o.h)("hgroup",Object.assign({},f),(0,o.h)(r,Object.assign({class:(0,l.c)(d,"kol-headline--group","kol-headline--primary")},b),t),(0,o.h)(c,Object.assign({level:n},_),i))}},9060:(e,t,i)=>{function s(e){var t,i,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e)){var l=e.length;for(t=0;t<l;t++)e[t]&&(i=s(e[t]))&&(o&&(o+=" "),o+=i)}else for(i in e)e[i]&&(o&&(o+=" "),o+=i);return o}function o(){for(var e,t,i=0,o="",l=arguments.length;i<l;i++)(e=arguments[i])&&(t=s(e))&&(o&&(o+=" "),o+=t);return o}i.d(t,{c:()=>o})},608:(e,t,i)=>{i.d(t,{S:()=>a,a:()=>l,b:()=>s,i:()=>o});const s=e=>"object"==typeof e&&null!==e,o=(e,t=0)=>"string"==typeof e&&e.length>=t,l=e=>{if("object"!=typeof e||null===e)return o(e,1);for(const t in e)if(!1===o(t,1))return!1;return!0},a=new Event("StateChange")},3584:(e,t,i)=>{i.d(t,{t:()=>l});var s=i(8461),o=i(5687);let l=(e,t)=>{var i;return(null!==(i=(0,s.g)())&&void 0!==i?i:(0,s.i)("de")).translate(e,t)};"test"===o.p&&(l=e=>e)},9130:(e,t,i)=>{i.r(t),i.d(t,{kol_input:()=>c});var s=i(6783),o=i(9060),l=i(3584),a=i(7662),n=i(5687),r=i(5650);const c=class{constructor(e){(0,s.r)(this,e),this.slotName="input",this.catchInputSlot=e=>{(0,n.h)(this.host,e,this.slotName)},this._accessKey=void 0,this._alert=!0,this._currentLength=void 0,this._disabled=!1,this._hasCounter=!1,this._hideMsg=!1,this._hideLabel=!1,this._hint="",this._icons=void 0,this._id=void 0,this._label=void 0,this._maxLength=void 0,this._msg=void 0,this._readOnly=!1,this._renderNoLabel=!1,this._required=!1,this._shortKey=void 0,this._slotName=void 0,this._suggestions=void 0,this._smartButton=void 0,this._tooltipAlign="top",this._touched=!1}componentWillRender(){this.slotName=this._slotName?this._slotName:"input"}getIconStyles(e){return e&&"object"==typeof e&&e.style?e.style:{}}render(){var e,t,i,c,d,h,_,u,b,g,p,f;const v="object"==typeof this._msg&&null!==this._msg&&"string"==typeof(null===(e=this._msg)||void 0===e?void 0:e._description)&&(null===(t=this._msg)||void 0===t?void 0:t._description.length)>0&&(!0===this._touched||"error"!==(null===(i=this._msg)||void 0===i?void 0:i._type)),y=(0,n.s)(this._label),m="string"==typeof this._hint&&this._hint.length>0,k=!y&&this._hideLabel;return(0,s.h)(s.H,{key:"cfd9957fb1257b093d42a0066c080d282f33fe9e",class:(0,o.c)("kol-input",this.getModifierClassNameByMsgType(v),{disabled:!0===this._disabled,[(null===(c=this._msg)||void 0===c?void 0:c._type)||"error"]:!0===v,"read-only":!0===this._readOnly,required:!0===this._required,touched:!0===this._touched,"hidden-msg":!0===this._hideMsg})},(0,s.h)("label",{key:"102823f929a7cad84ee12ddacd7bb6f9782537b8",class:"input-label",id:k?void 0:`${this._id}-label`,hidden:k,htmlFor:this._id},(0,s.h)("span",{key:"b2ac9d0717998fee3300addc9ab39e7dbab48eef",class:"input-label-span"},(0,s.h)("slot",{key:"8b56ca6a6fea3cbb75c73a7bef18593a5e8e9cb9",name:"label"}))),m&&(0,s.h)("span",{key:"5452317626e66003189a15f34b09a8e19bb33f59",class:"hint",id:`${this._id}-hint`},this._hint),(0,s.h)("div",{key:"abd919e1a330a7d8ac02c2ea9e28e7c98988a57f",class:{input:!0,"icon-left":"object"==typeof(null===(d=this._icons)||void 0===d?void 0:d.left),"icon-right":"object"==typeof(null===(h=this._icons)||void 0===h?void 0:h.right)}},(null===(_=this._icons)||void 0===_?void 0:_.left)&&(0,s.h)(a.d,{key:"0ebc2e86f6234e1f3266b6fcec60996a1b21b578",_label:"",_icons:(null===(u=this._icons)||void 0===u?void 0:u.left).icon,style:this.getIconStyles(null===(b=this._icons)||void 0===b?void 0:b.left)}),(0,s.h)("div",{key:"40fca3a7748e5de1000aef706672f2fc63407cb1",ref:this.catchInputSlot,id:this.slotName,class:"input-slot"}),"object"==typeof this._smartButton&&null!==this._smartButton&&(0,s.h)(a.a,{key:"321f1feb6f4187365fd536a0b5c0d305f98613c7",_customClass:this._smartButton._customClass,_disabled:this._smartButton._disabled,_icons:this._smartButton._icons,_hideLabel:!0,_id:this._smartButton._id,_label:this._smartButton._label,_on:this._smartButton._on,_tooltipAlign:this._smartButton._tooltipAlign,_variant:this._smartButton._variant}),(null===(g=this._icons)||void 0===g?void 0:g.right)&&(0,s.h)(a.d,{key:"3f335bb610f0c3359c75b467aaf8d9419428f237",_label:"",_icons:(null===(p=this._icons)||void 0===p?void 0:p.right).icon,style:this.getIconStyles(null===(f=this._icons)||void 0===f?void 0:f.right)})),k&&(0,s.h)(a.g,{key:"8ccbab744fe667c4b689cf4b0649371d7dd6de58","aria-hidden":"true",class:"input-tooltip",_badgeText:this._accessKey||this._shortKey,_align:this._tooltipAlign,_id:this._hideLabel?`${this._id}-label`:void 0,_label:this._label}),v&&(0,s.h)(r.K,{key:"4351c438daf4927a556809fc9cb8af6f54425256",alert:this._alert,hideMsg:this._hideMsg,msg:(0,r.a)(this._msg),id:this._id}),Array.isArray(this._suggestions)&&this._suggestions.length>0&&(0,s.h)("datalist",{key:"2669a99b02803c5c26a00e9e8f88cef20784ea5e",id:`${this._id}-list`},this._suggestions.map((e=>(0,s.h)("option",{value:e})))),this._hasCounter&&(0,s.h)("span",{key:"078089228f083c2815c39a3db63c35ee82673bd9",class:"counter","aria-atomic":"true","aria-live":"polite","data-testid":"input-counter"},this._currentLength,this._maxLength&&(0,s.h)(s.F,null,(0,s.h)("span",{key:"bcd923ae79e3eeb81c4df0aa0fef564b1352b3c6","aria-label":(0,l.t)("kol-of"),role:"img"},"/"),this._maxLength)," ",(0,s.h)("span",{key:"14c8efa8d7c1f8c4266e1c91b955fcadf803835c"},(0,l.t)("kol-characters"))))}getModifierClassNameByMsgType(e){var t,i;if(e&&(null===(t=this._msg)||void 0===t?void 0:t._type))return{default:"msg-type-default",info:"msg-type-info",success:"msg-type-success",warning:"msg-type-warning",error:"msg-type-error"}[null===(i=this._msg)||void 0===i?void 0:i._type]}get host(){return(0,s.g)(this)}}},5687:(e,t,i)=>{i.d(t,{b:()=>a,h:()=>o,p:()=>s,s:()=>l});let s="development";try{s="production"}catch(e){s="production"}const o=(e,t,i)=>{if(e&&t&&"string"==typeof i){const s=e.querySelector(`[slot="${i}"]`);s&&t.appendChild(s)}},l=e=>""===e,a=(e,t)=>e||t||""},4600:(e,t,i)=>{function s(e,t){var i={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(i[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(s=Object.getOwnPropertySymbols(e);o<s.length;o++)t.indexOf(s[o])<0&&Object.prototype.propertyIsEnumerable.call(e,s[o])&&(i[s[o]]=e[s[o]])}return i}i.d(t,{_:()=>s}),"function"==typeof SuppressedError&&SuppressedError}}]);
|
package/dist/9162.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see 9162.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunk_public_ui_sample_react=self.webpackChunk_public_ui_sample_react||[]).push([[9162],{1166:(e,t,n)=>{n.d(t,{v:()=>i});var a=n(5800);const i=(e,t,n)=>{(0,a.b)(e,"_hasCounter",t,n)}},9162:(e,t,n)=>{n.r(t),n.d(t,{kol_textarea:()=>k});var a=n(5630),i=n(9060),o=n(4879),l=n(6100),s=n(1166),r=n(5800),d=n(9444),h=n(1799),c=n(1559),u=n(4600),v=n(3532),p=n(9339),m=(e,t,n)=>new Promise(((a,i)=>{var o=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?a(e.value):Promise.resolve(e.value).then(o,l);s((n=n.apply(e,t)).next())}));const _=["vertical","none"],f=e=>{const{class:t,msg:n,touched:o,readonly:l,disabled:s,required:r,ariaDescribedBy:d,hideLabel:h,label:c}=e,m=(0,u._)(e,["class","msg","touched","readonly","disabled","required","ariaDescribedBy","hideLabel","label"]),_=(0,p.c)(n,o),f={"kol-textarea--disabled":Boolean(s),"kol-textarea--required":Boolean(r),"kol-textarea--touched":Boolean(o),"kol-textarea--readonly":Boolean(l),[`kol-textarea--${(null==n?void 0:n.type)||"error"}`]:_},b=Object.assign(Object.assign({class:(0,i.c)("kol-textarea",f,t),required:r,disabled:s,readonly:l},(0,v.d)({ariaDescribedBy:d,hideLabel:h,label:c})),m);return(0,a.h)("textarea",Object.assign({},b))},b=e=>{var{state:t}=e,n=(0,u._)(e,["state"]);return(0,a.h)(f,Object.assign({},function(e){const{ariaDescribedBy:t}=(0,v.g)(e);return{id:e._id,hideLabel:e._hideLabel,label:e._label,value:e._value,accessKey:e._accessKey,disabled:e._disabled,name:e._name,ariaDescribedBy:t,rows:e._rows,readonly:e._readOnly,required:e._required,placeholder:e._placeholder,maxLength:e._maxLength,touched:e._touched,msg:(0,p.a)(e._msg)}}(t),n))};class y extends l.I{constructor(e,t,n){super(e,t,n),this.afterSyncCharCounter=()=>{"string"==typeof this.component._value&&this.component._value.length>0&&(this.component.state._currentLength=this.component._value.length)},this.component=e}validateHasCounter(e){(0,s.v)(this.component,e,{hooks:{afterPatch:this.afterSyncCharCounter}})}validateMaxLength(e){(0,r.k)(this.component,"_maxLength",e,{hooks:{afterPatch:this.afterSyncCharCounter},min:0})}validatePlaceholder(e){(0,r.i)(this.component,"_placeholder",e)}validateReadOnly(e){(0,r.b)(this.component,"_readOnly",e)}validateResize(e){(0,r.w)(this.component,"_resize",(e=>"string"==typeof e&&_.includes(e)),new Set(`String {${_.join(", ")}`),e,{defaultValue:"vertical"})}validateRequired(e){(0,r.b)(this.component,"_required",e)}validateRows(e){(0,d.v)(this.component,e)}validateSpellCheck(e){(0,h.v)(this.component,e)}validateValue(e){(0,r.i)(this.component,"_value",e,{hooks:{afterPatch:this.afterSyncCharCounter}}),this.setFormAssociatedValue(this.component._value)}componentWillLoad(){super.componentWillLoad(),this.validateHasCounter(this.component._hasCounter),this.validateMaxLength(this.component._maxLength),this.validatePlaceholder(this.component._placeholder),this.validateReadOnly(this.component._readOnly),this.validateResize(this.component._resize),this.validateRequired(this.component._required),this.validateRows(this.component._rows),this.validateSpellCheck(this.component._spellCheck),this.validateValue(this.component._value)}}const g=e=>{e.style.overflow="hidden";const t=e.rows,n=e.clientHeight/t;e.rows=1;const a=Math.round(e.scrollHeight/n);return e.rows=t,a},k=class{getValue(){return m(this,null,(function*(){var e;return null===(e=this.textareaRef)||void 0===e?void 0:e.value}))}kolFocus(){return m(this,null,(function*(){var e;null===(e=this.textareaRef)||void 0===e||e.focus()}))}getFormFieldProps(){return{state:this.state,class:(0,i.c)("kol-form-field-textarea",{"kol-form-field--has-value":this.state._hasValue,"kol-form-field--has-counter":!!this.state._hasCounter}),tooltipAlign:this._tooltipAlign,onClick:()=>{var e;return null===(e=this.textareaRef)||void 0===e?void 0:e.focus()},alert:this.showAsAlert()}}getTextAreaProps(){return Object.assign(Object.assign({ref:this.catchRef,state:this.state,style:{resize:this.state._resize}},this.controller.onFacade),{onInput:this.onInput,onFocus:e=>{this.controller.onFacade.onFocus(e),this.inputHasFocus=!0},onBlur:e=>{this.controller.onFacade.onBlur(e),this.inputHasFocus=!1}})}render(){return(0,a.h)(v.K,Object.assign({key:"47de879477c9440c0845a8dae2594d3456bd3eb2"},this.getFormFieldProps()),(0,a.h)(c.K,{key:"366ef8c117cef16adeb8106521d316040f351357",state:this.state},(0,a.h)(b,Object.assign({key:"55a0e5b8566b0577f5e33f8e5575938737da711c"},this.getTextAreaProps()))))}constructor(e){(0,a.r)(this,e),this.catchRef=e=>{this.textareaRef=e},this.onInput=e=>{if(this.textareaRef instanceof HTMLTextAreaElement){const t=this.textareaRef.value;(0,r.s)(this,"_currentLength",t.length),this._value=t,this.state._adjustHeight&&(this._rows=g(this.textareaRef)),this.controller.onFacade.onInput(e)}},this._accessKey=void 0,this._adjustHeight=!1,this._disabled=!1,this._hasCounter=!1,this._hideError=!1,this._hideLabel=!1,this._hint="",this._icons=void 0,this._id=void 0,this._label=void 0,this._maxLength=void 0,this._msg=void 0,this._name=void 0,this._on=void 0,this._placeholder=void 0,this._readOnly=!1,this._resize="vertical",this._required=!1,this._rows=void 0,this._shortKey=void 0,this._spellCheck=void 0,this._syncValueBySelector=void 0,this._tabIndex=void 0,this._tooltipAlign="top",this._touched=!1,this._value=void 0,this.state={_adjustHeight:!1,_currentLength:0,_hasValue:!1,_hideError:!1,_id:`id-${(0,o.n)()}`,_label:"",_resize:"vertical"},this.inputHasFocus=!1,this.controller=new y(this,"textarea",this.host)}showAsAlert(){return Boolean(this.state._touched)&&!this.inputHasFocus}validateAccessKey(e){this.controller.validateAccessKey(e)}validateAdjustHeight(e){this.controller.validateAdjustHeight(e)}validateDisabled(e){this.controller.validateDisabled(e)}validateHasCounter(e){this.controller.validateHasCounter(e)}validateHideError(e){this.controller.validateHideError(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)}validateMaxLength(e){this.controller.validateMaxLength(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)}validateResize(e){this.controller.validateResize(e)}validateRequired(e){this.controller.validateRequired(e)}validateRows(e){this.controller.validateRows(e)}validateShortKey(e){this.controller.validateShortKey(e)}validateSpellCheck(e){this.controller.validateSpellCheck(e)}validateSyncValueBySelector(e){this.controller.validateSyncValueBySelector(e)}validateTabIndex(e){this.controller.validateTabIndex(e)}validateTouched(e){this.controller.validateTouched(e)}validateValue(e){this.controller.validateValue(e)}componentDidLoad(){setTimeout((()=>{var e;!0===this._adjustHeight&&this.textareaRef?this._rows=(null===(e=this.state)||void 0===e?void 0:e._rows)&&this.state._rows>g(this.textareaRef)?this.state._rows:g(this.textareaRef):this._rows||(this._rows=1)}),0)}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,a.g)(this)}static get watchers(){return{_accessKey:["validateAccessKey"],_adjustHeight:["validateAdjustHeight"],_disabled:["validateDisabled"],_hasCounter:["validateHasCounter"],_hideError:["validateHideError"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_maxLength:["validateMaxLength"],_msg:["validateMsg"],_name:["validateName"],_on:["validateOn"],_placeholder:["validatePlaceholder"],_readOnly:["validateReadOnly"],_resize:["validateResize"],_required:["validateRequired"],_rows:["validateRows"],_shortKey:["validateShortKey"],_spellCheck:["validateSpellCheck"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_touched:["validateTouched"],_value:["validateValue"]}}};k.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%; /* 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}\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.5s;\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 :host {\n display: block;\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 cursor: pointer;\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__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-textarea {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n width: 100%;\n }\n .kol-textarea:focus {\n outline: none;\n }\n}"}},9444:(e,t,n)=>{n.d(t,{v:()=>i});var a=n(5800);const i=(e,t)=>{(0,a.k)(e,"_rows",t,{min:1})}},1799:(e,t,n)=>{n.d(t,{v:()=>i});var a=n(5800);const i=(e,t)=>{(0,a.b)(e,"_spellCheck",t,{defaultValue:void 0})}}}]);
|
|
2
|
+
"use strict";(self.webpackChunk_public_ui_sample_react=self.webpackChunk_public_ui_sample_react||[]).push([[9162],{375:(e,t,n)=>{n.d(t,{K:()=>a});var i=n(6783),o=n(7662);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})}},5363:(e,t,n)=>{n.d(t,{I:()=>x,K:()=>k,a:()=>y});var i=n(6783),o=n(2587),a=n(665),l=n(4600),s=n(7662),r=n(375),d=n(9060),c=n(5650),h=n(8625),u=n(8973),p=n(5800),v=n(608);const m=(e,t)=>{var{position:n="start",class:o}=e,a=(0,l._)(e,["position","class"]);const s="kol-input-container__adornment",r=`${s}--${n}`;return(0,i.h)("div",Object.assign({class:(0,d.c)(s,r,o)},a),t)};function b(e){return!!e&&(Array.isArray(e)?e.length>0:Boolean(e))}const _=(e,t)=>{var{class:n}=e,o=(0,l._)(e,["class"]);return(0,i.h)("div",Object.assign({class:(0,d.c)("kol-input-container__container",n)},o),t)},f=(e,t)=>{const{class:n,startAdornment:o,endAdornment:a,disabled:s,msg:r,touched:h,containerProps:u,startAdornmentProps:p,endAdornmentProps:v}=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(o)||b(a)?(0,i.h)("div",Object.assign({},k),(0,i.h)(m,Object.assign({},p,{position:"start"}),o),(0,i.h)(_,Object.assign({},u),t),(0,i.h)(m,Object.assign({},v,{position:"end"}),a)):(0,i.h)("div",Object.assign({},k),(0,i.h)(_,Object.assign({},u),t))},g=e=>{const{label:t,icons:n,hideLabel:o,disabled:a,onClick:r}=e,d=(0,l._)(e,["label","icons","hideLabel","disabled","onClick"]);return(0,i.h)(s.a,Object.assign({tabindex:0,_label:t,_disabled:a,_icons:n,_hideLabel:o,_on:{onClick:r}},d))},y=e=>{const{componentName:t="button",label:n,icon:o,onClick:a}=e,s=(0,l._)(e,["componentName","label","icon","onClick"]),d="button"===t?g:r.K;return(0,i.h)(d,Object.assign({label:n||"",hideLabel:!0,icons:`codicon codicon-${o}`,onClick:a},s))},k=({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,o.i)(u)&&(u={icon:u});let p=null==l?void 0:l.right;(0,o.i)(p)&&(p={icon:p});const v=[],m=[];return t&&(Array.isArray(t)?m.push(...t):m.push(t)),u&&v.push((0,i.h)(y,Object.assign({componentName:"icon"},(0,a.i)(u)?u:{}))),(0,a.i)(s)&&m.push((0,i.h)(y,Object.assign({componentName:"button"},s,{hideLabel:!0,disabled:r}))),p&&m.push((0,i.h)(y,Object.assign({componentName:"icon"},(0,a.i)(p)?p:{}))),(0,i.h)(f,{disabled:r,msg:d,touched:h,startAdornment:v,endAdornment:m},n)},w=(e,t)=>{const n=e;"object"==typeof n&&null!==n&&((0,v.i)(n.right,1)&&(n.right={icon:n.right}),(0,v.i)(n.left,1)&&(n.left={icon:n.left}),t.set("_icons",n))};class x extends h.I{constructor(e,t,n){super(e,t,n),this.component=e}validateIcons(e){(0,p.o)(e,(()=>{try{e=(0,p.p)(e)}catch(e){}(0,p.w)(this.component,"_icons",(e=>"object"==typeof e&&null!==e&&((0,v.i)(e.left,1)||(0,u.i)(e.left)||(0,v.i)(e.right,1)||(0,u.i)(e.right))),new Set(["KoliBriHorizontalIcon"]),e,{hooks:{beforePatch:w},required:!0})}))}componentWillLoad(){super.componentWillLoad(),this.validateIcons(this.component._icons)}}},1166:(e,t,n)=>{n.d(t,{v:()=>o});var i=n(5800);const o=(e,t,n)=>{(0,i.b)(e,"_hasCounter",t,n)}},8973:(e,t,n)=>{n.d(t,{i:()=>l,v:()=>s});var i=n(5800),o=n(608);const a=(e,t,n)=>{(0,o.b)(n)?e[t]=n:(0,o.i)(n,1)&&(e[t]={icon:n})},l=e=>"object"==typeof e&&null!==e&&(void 0===e.style||(0,o.a)(e.style))&&(void 0===e.label||(0,o.i)(e.label))&&(0,o.i)(e.icon,1),s=(e,t,n={})=>{(0,i.o)(t,(()=>{var s;try{t=(0,i.p)(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,o.i)(e,1)||"object"==typeof e&&null!==e&&((0,o.i)(e.left,1)||l(e.left)||(0,o.i)(e.right,1)||l(e.right)||(0,o.i)(e.top,1)||l(e.top)||(0,o.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,i,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,i,l)),(e=>{var t,n,i;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===(i=e.nextState)||void 0===i||i.set("_icons",(e=>{let t={};return(0,o.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))}})(i)}}}))}))}},665:(e,t,n)=>{function i(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}n.d(t,{i:()=>i})},9162:(e,t,n)=>{n.r(t),n.d(t,{kol_textarea:()=>y});var i=n(6783),o=n(9060),a=n(7336),l=n(5363),s=n(1166),r=n(5800),d=n(9444),c=n(1799),h=n(4600),u=n(8625),p=n(5650),v=(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())}));const m=["vertical","none"],b=e=>{const{class:t,msg:n,touched:a,readonly:l,disabled:s,required:r,ariaDescribedBy:d,hideLabel:c,label:v}=e,m=(0,h._)(e,["class","msg","touched","readonly","disabled","required","ariaDescribedBy","hideLabel","label"]),b=(0,p.c)(n,a),_={"kol-textarea--disabled":Boolean(s),"kol-textarea--required":Boolean(r),"kol-textarea--touched":Boolean(a),"kol-textarea--readonly":Boolean(l),[`kol-textarea--${(null==n?void 0:n.type)||"error"}`]:b},f=Object.assign(Object.assign({class:(0,o.c)("kol-textarea",_,t),required:r,disabled:s,readonly:l},(0,u.d)({ariaDescribedBy:d,hideLabel:c,label:v})),m);return(0,i.h)("textarea",Object.assign({},f))},_=e=>{var{state:t}=e,n=(0,h._)(e,["state"]);return(0,i.h)(b,Object.assign({},function(e){const{ariaDescribedBy:t}=(0,u.g)(e);return{id:e._id,hideLabel:e._hideLabel,label:e._label,value:e._value,accessKey:e._accessKey,disabled:e._disabled,name:e._name,ariaDescribedBy:t,rows:e._rows,readonly:e._readOnly,required:e._required,placeholder:e._placeholder,maxLength:e._maxLength,touched:e._touched,msg:(0,p.a)(e._msg)}}(t),n))};class f extends l.I{constructor(e,t,n){super(e,t,n),this.afterSyncCharCounter=()=>{"string"==typeof this.component._value&&this.component._value.length>0&&(this.component.state._currentLength=this.component._value.length)},this.component=e}validateHasCounter(e){(0,s.v)(this.component,e,{hooks:{afterPatch:this.afterSyncCharCounter}})}validateMaxLength(e){(0,r.k)(this.component,"_maxLength",e,{hooks:{afterPatch:this.afterSyncCharCounter},min:0})}validatePlaceholder(e){(0,r.i)(this.component,"_placeholder",e)}validateReadOnly(e){(0,r.b)(this.component,"_readOnly",e)}validateResize(e){(0,r.w)(this.component,"_resize",(e=>"string"==typeof e&&m.includes(e)),new Set(`String {${m.join(", ")}`),e,{defaultValue:"vertical"})}validateRequired(e){(0,r.b)(this.component,"_required",e)}validateRows(e){(0,d.v)(this.component,e)}validateSpellCheck(e){(0,c.v)(this.component,e)}validateValue(e){(0,r.i)(this.component,"_value",e,{hooks:{afterPatch:this.afterSyncCharCounter}}),this.setFormAssociatedValue(this.component._value)}componentWillLoad(){super.componentWillLoad(),this.validateHasCounter(this.component._hasCounter),this.validateMaxLength(this.component._maxLength),this.validatePlaceholder(this.component._placeholder),this.validateReadOnly(this.component._readOnly),this.validateResize(this.component._resize),this.validateRequired(this.component._required),this.validateRows(this.component._rows),this.validateSpellCheck(this.component._spellCheck),this.validateValue(this.component._value)}}const g=e=>{e.style.overflow="hidden";const t=e.rows,n=e.clientHeight/t;e.rows=1;const i=Math.round(e.scrollHeight/n);return e.rows=t,i},y=class{getValue(){return v(this,null,(function*(){var e;return null===(e=this.textareaRef)||void 0===e?void 0:e.value}))}kolFocus(){return v(this,null,(function*(){var e;null===(e=this.textareaRef)||void 0===e||e.focus()}))}getFormFieldProps(){return{state:this.state,class:(0,o.c)("kol-form-field-textarea",{"kol-form-field--has-value":this.state._hasValue,"kol-form-field--has-counter":!!this.state._hasCounter}),tooltipAlign:this._tooltipAlign,onClick:()=>{var e;return null===(e=this.textareaRef)||void 0===e?void 0:e.focus()},alert:this.showAsAlert()}}getTextAreaProps(){return Object.assign(Object.assign({ref:this.catchRef,state:this.state,style:{resize:this.state._resize}},this.controller.onFacade),{onInput:this.onInput,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)(u.K,Object.assign({key:"872d9e86581bcaa2f890bc1922f51e150e719dcc"},this.getFormFieldProps()),(0,i.h)(l.K,{key:"d606938ceeb96ddd460e0da945a41de58201ed8a",state:this.state},(0,i.h)(_,Object.assign({key:"e1fff4989bfb2c73e5b33ee6c81be446de2b1994"},this.getTextAreaProps()))))}constructor(e){(0,i.r)(this,e),this.catchRef=e=>{this.textareaRef=e},this.onInput=e=>{if(this.textareaRef instanceof HTMLTextAreaElement){const t=this.textareaRef.value;(0,r.s)(this,"_currentLength",t.length),this._value=t,this.state._adjustHeight&&(this._rows=g(this.textareaRef)),this.controller.onFacade.onInput(e)}},this._accessKey=void 0,this._adjustHeight=!1,this._disabled=!1,this._hasCounter=!1,this._hideMsg=!1,this._hideLabel=!1,this._hint="",this._icons=void 0,this._id=void 0,this._label=void 0,this._maxLength=void 0,this._msg=void 0,this._name=void 0,this._on=void 0,this._placeholder=void 0,this._readOnly=!1,this._resize="vertical",this._required=!1,this._rows=void 0,this._shortKey=void 0,this._spellCheck=void 0,this._syncValueBySelector=void 0,this._tabIndex=void 0,this._tooltipAlign="top",this._touched=!1,this._value=void 0,this.state={_adjustHeight:!1,_currentLength:0,_hasValue:!1,_hideMsg:!1,_id:`id-${(0,a.n)()}`,_label:"",_resize:"vertical"},this.inputHasFocus=!1,this.controller=new f(this,"textarea",this.host)}showAsAlert(){return Boolean(this.state._touched)&&!this.inputHasFocus}validateAccessKey(e){this.controller.validateAccessKey(e)}validateAdjustHeight(e){this.controller.validateAdjustHeight(e)}validateDisabled(e){this.controller.validateDisabled(e)}validateHasCounter(e){this.controller.validateHasCounter(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)}validateMaxLength(e){this.controller.validateMaxLength(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)}validateResize(e){this.controller.validateResize(e)}validateRequired(e){this.controller.validateRequired(e)}validateRows(e){this.controller.validateRows(e)}validateShortKey(e){this.controller.validateShortKey(e)}validateSpellCheck(e){this.controller.validateSpellCheck(e)}validateSyncValueBySelector(e){this.controller.validateSyncValueBySelector(e)}validateTabIndex(e){this.controller.validateTabIndex(e)}validateTouched(e){this.controller.validateTouched(e)}validateValue(e){this.controller.validateValue(e)}componentDidLoad(){setTimeout((()=>{var e;!0===this._adjustHeight&&this.textareaRef?this._rows=(null===(e=this.state)||void 0===e?void 0:e._rows)&&this.state._rows>g(this.textareaRef)?this.state._rows:g(this.textareaRef):this._rows||(this._rows=1)}),0)}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,i.g)(this)}static get watchers(){return{_accessKey:["validateAccessKey"],_adjustHeight:["validateAdjustHeight"],_disabled:["validateDisabled"],_hasCounter:["validateHasCounter"],_hideMsg:["validateHideMsg"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_maxLength:["validateMaxLength"],_msg:["validateMsg"],_name:["validateName"],_on:["validateOn"],_placeholder:["validatePlaceholder"],_readOnly:["validateReadOnly"],_resize:["validateResize"],_required:["validateRequired"],_rows:["validateRows"],_shortKey:["validateShortKey"],_spellCheck:["validateSpellCheck"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_touched:["validateTouched"],_value:["validateValue"]}}};y.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%; /* 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}\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.5s;\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 :host {\n display: block;\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 cursor: pointer;\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-textarea {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n width: 100%;\n }\n .kol-textarea:focus {\n outline: none;\n }\n}"}},9444:(e,t,n)=>{n.d(t,{v:()=>o});var i=n(5800);const o=(e,t)=>{(0,i.k)(e,"_rows",t,{min:1})}},1799:(e,t,n)=>{n.d(t,{v:()=>o});var i=n(5800);const o=(e,t)=>{(0,i.b)(e,"_spellCheck",t,{defaultValue:void 0})}}}]);
|
package/dist/9219.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see 9219.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunk_public_ui_sample_react=self.webpackChunk_public_ui_sample_react||[]).push([[9219],{9219:(n,e,t)=>{t.r(e),t.d(e,{kol_abbr:()=>a});var o=t(
|
|
2
|
+
"use strict";(self.webpackChunk_public_ui_sample_react=self.webpackChunk_public_ui_sample_react||[]).push([[9219],{9219:(n,e,t)=>{t.r(e),t.d(e,{kol_abbr:()=>a});var o=t(6783),i=t(1074);const a=class{constructor(n){(0,o.r)(this,n),this._label=void 0,this.state={_label:""}}render(){return(0,o.h)(o.H,{key:"8267aa3e74d7eaa360974c5d574061ef207f2b79",class:"kol-abbr"},(0,o.h)("abbr",{key:"cc15d83f035241891e2c44fe7401501dae83c15e"},(0,o.h)("slot",{key:"2a655a6e8c1dbae8377bd8175cd83189b0b00483"})),this.state._label?` (${this.state._label})`:"")}validateLabel(n){(0,i.v)(this,n,{required:!0})}componentWillLoad(){this.validateLabel(this._label)}static get watchers(){return{_label:["validateLabel"]}}};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%; /* 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}\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 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.5s;\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-abbr {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n}"}},1074:(n,e,t)=>{t.d(e,{a:()=>h,b:()=>r,c:()=>s,h:()=>i,v:()=>c});var o=t(5800);const i=[0,1,2,3,4,5,6],a=/[a-zA-Z0-9äöüÄÖÜß]/g,l=/^\d+$/;function r(n,e=1){return function(n){var e;return"string"==typeof n&&(null===(e=n.match(a))||void 0===e?void 0:e.length)||0}(n)>=e}function s(n){return l.test(n)}const d=new Set(["string"]),c=(n,e,t={})=>{(0,o.w)(n,"_label",(n=>"string"==typeof n),d,e,function(n){var e;return Object.assign(Object.assign({},n),{hooks:{afterPatch:(e,t,i,a)=>{var l,d;"function"==typeof(null===(l=n.hooks)||void 0===l?void 0:l.afterPatch)&&(null===(d=n.hooks)||void 0===d||d.afterPatch(e,t,i,a)),"string"==typeof e&&!1===r(e,3)&&!1===s(e)&&(0,o.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,o.u)("A heading or label should not be longer than 80 characters.")},beforePatch:null===(e=n.hooks)||void 0===e?void 0:e.beforePatch}})}(t))},h=c}}]);
|
package/dist/9244.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 9244.js.LICENSE.txt */
|
|
2
|
+
"use strict";(self.webpackChunk_public_ui_sample_react=self.webpackChunk_public_ui_sample_react||[]).push([[9244],{375:(e,t,n)=>{n.d(t,{K:()=>a});var o=n(6783),i=n(7662);const a=e=>{const{class:t,style:n,icons:a,label:s,onClick:l}=e;return(0,o.h)(i.d,{class:t,style:n,onClick:l,_icons:a,_label:s})}},3163:(e,t,n)=>{n.d(t,{K:()=>c});var o=n(4600),i=n(6783),a=n(9060),s=n(8625),l=n(5650);const c=e=>{const{class:t,msg:n,required:c,disabled:r,touched:d,readonly:u,ariaDescribedBy:h,hideLabel:p,label:m,suggestions:b,value:_}=e,g=(0,o._)(e,["class","msg","required","disabled","touched","readonly","ariaDescribedBy","hideLabel","label","suggestions","value"]),v=(0,l.c)(n,d),f={"kol-input--disabled":Boolean(r),"kol-input--required":Boolean(c),"kol-input--touched":Boolean(d),"kol-input--readonly":Boolean(u),[`kol-input--${(null==n?void 0:n.type)||"error"}`]:v},y=Object.assign(Object.assign({class:(0,a.c)("kol-input",f,t),required:c,disabled:r,readonly:u,type:"text",list:b?`${g.id}-list`:void 0},(0,s.d)({ariaDescribedBy:h,hideLabel:p,label:m})),g);return(0,i.h)(i.F,null,(0,i.h)("input",Object.assign({},y,{value:_})),b)}},7146:(e,t,n)=>{n.d(t,{K:()=>r,a:()=>c});var o=n(4600),i=n(6783),a=n(8625),s=n(3163),l=n(5650);const c=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)(s.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,l.a)(e._msg)),"_suggestions"in e&&!t&&Array.isArray(e._suggestions)&&e._suggestions.length>0&&(o.suggestions=(0,i.h)(c,{id:e._id,suggestions:e._suggestions})),o}(t,n),r))}},9574:(e,t,n)=>{n.d(t,{a:()=>l,p:()=>c});var o=n(7662),i=n(5800),a=n(1732);const s=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},l=(e={})=>{var t,n;const a=s(e.form);if(a instanceof HTMLElement){const e=new Event("reset",{bubbles:!0,cancelable:!0});if("FORM"===a.tagName)(0,i.q)(e,a),a.dispatchEvent(e);else if(a.tagName===o.h.toUpperCase()){(0,i.q)(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))}}},c=(e={})=>{const t=s(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.q)(e,t),t.dispatchEvent(e))}));else if(t.tagName===o.h.toUpperCase()){(0,i.q)(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))}))}}}},970:(e,t,n)=>{n.d(t,{I:()=>l});var o=n(5800),i=n(5363),a=n(1166);const s=["default","visibility-toggle"];class l extends i.I{constructor(e,t,n){super(e,t,n),this.afterSyncCharCounter=()=>{"string"==typeof this.component._value&&this.component._value.length>0&&(this.component.state._currentLength=this.component._value.length)},this.component=e}validateAutoComplete(e){(0,o.w)(this.component,"_autoComplete",(e=>"string"==typeof e&&("on"===e||"off"===e)),new Set(["on | off"]),e)}validateHasCounter(e){(0,a.v)(this.component,e,{hooks:{afterPatch:this.afterSyncCharCounter}})}validateVariant(e){((e,t)=>{(0,o.w)(e,"_variant",(e=>"string"==typeof e&&s.includes(e)),new Set(s),t)})(this.component,e)}validateMaxLength(e){(0,o.k)(this.component,"_maxLength",e,{hooks:{afterPatch:this.afterSyncCharCounter},min:0})}validatePattern(e){(0,o.i)(this.component,"_pattern",e)}validatePlaceholder(e){(0,o.i)(this.component,"_placeholder",e)}validateReadOnly(e){(0,o.b)(this.component,"_readOnly",e)}validateRequired(e){(0,o.b)(this.component,"_required",e)}validateValue(e){(0,o.i)(this.component,"_value",e,{hooks:{afterPatch:this.afterSyncCharCounter}}),this.setFormAssociatedValue(this.component.state._value)}componentWillLoad(){super.componentWillLoad(),this.validateAutoComplete(this.component._autoComplete),this.validateHasCounter(this.component._hasCounter),this.validateMaxLength(this.component._maxLength),this.validatePattern(this.component._pattern),this.validatePlaceholder(this.component._placeholder),this.validateReadOnly(this.component._readOnly),this.validateRequired(this.component._required),this.validateValue(this.component._value),this.validateVariant(this.component._variant)}}},5363:(e,t,n)=>{n.d(t,{I:()=>j,K:()=>k,a:()=>y});var o=n(6783),i=n(2587),a=n(665),s=n(4600),l=n(7662),c=n(375),r=n(9060),d=n(5650),u=n(8625),h=n(8973),p=n(5800),m=n(608);const b=(e,t)=>{var{position:n="start",class:i}=e,a=(0,s._)(e,["position","class"]);const l="kol-input-container__adornment",c=`${l}--${n}`;return(0,o.h)("div",Object.assign({class:(0,r.c)(l,c,i)},a),t)};function _(e){return!!e&&(Array.isArray(e)?e.length>0:Boolean(e))}const g=(e,t)=>{var{class:n}=e,i=(0,s._)(e,["class"]);return(0,o.h)("div",Object.assign({class:(0,r.c)("kol-input-container__container",n)},i),t)},v=(e,t)=>{const{class:n,startAdornment:i,endAdornment:a,disabled:l,msg:c,touched:u,containerProps:h,startAdornmentProps:p,endAdornmentProps:m}=e,v=(0,s._)(e,["class","startAdornment","endAdornment","disabled","msg","touched","containerProps","startAdornmentProps","endAdornmentProps"]),f=(0,d.c)(c,u),y={"kol-input-container--disabled":l,[`kol-input-container--${(null==c?void 0:c.type)||"error"}`]:f},k=Object.assign({class:(0,r.c)("kol-input-container",y,n)},v);return _(i)||_(a)?(0,o.h)("div",Object.assign({},k),(0,o.h)(b,Object.assign({},p,{position:"start"}),i),(0,o.h)(g,Object.assign({},h),t),(0,o.h)(b,Object.assign({},m,{position:"end"}),a)):(0,o.h)("div",Object.assign({},k),(0,o.h)(g,Object.assign({},h),t))},f=e=>{const{label:t,icons:n,hideLabel:i,disabled:a,onClick:c}=e,r=(0,s._)(e,["label","icons","hideLabel","disabled","onClick"]);return(0,o.h)(l.a,Object.assign({tabindex:0,_label:t,_disabled:a,_icons:n,_hideLabel:i,_on:{onClick:c}},r))},y=e=>{const{componentName:t="button",label:n,icon:i,onClick:a}=e,l=(0,s._)(e,["componentName","label","icon","onClick"]),r="button"===t?f:c.K;return(0,o.h)(r,Object.assign({label:n||"",hideLabel:!0,icons:`codicon codicon-${i}`,onClick:a},l))},k=({state:e,endAdornment:t},n)=>{const{icons:s,smartButton:l,disabled:c,msg:r,touched:u}=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,d.a)(e._msg),touched:e._touched}}(e);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 t&&(Array.isArray(t)?b.push(...t):b.push(t)),h&&m.push((0,o.h)(y,Object.assign({componentName:"icon"},(0,a.i)(h)?h:{}))),(0,a.i)(l)&&b.push((0,o.h)(y,Object.assign({componentName:"button"},l,{hideLabel:!0,disabled:c}))),p&&b.push((0,o.h)(y,Object.assign({componentName:"icon"},(0,a.i)(p)?p:{}))),(0,o.h)(v,{disabled:c,msg:r,touched:u,startAdornment:m,endAdornment:b},n)},C=(e,t)=>{const n=e;"object"==typeof n&&null!==n&&((0,m.i)(n.right,1)&&(n.right={icon:n.right}),(0,m.i)(n.left,1)&&(n.left={icon:n.left}),t.set("_icons",n))};class j extends u.I{constructor(e,t,n){super(e,t,n),this.component=e}validateIcons(e){(0,p.o)(e,(()=>{try{e=(0,p.p)(e)}catch(e){}(0,p.w)(this.component,"_icons",(e=>"object"==typeof e&&null!==e&&((0,m.i)(e.left,1)||(0,h.i)(e.left)||(0,m.i)(e.right,1)||(0,h.i)(e.right))),new Set(["KoliBriHorizontalIcon"]),e,{hooks:{beforePatch:C},required:!0})}))}componentWillLoad(){super.componentWillLoad(),this.validateIcons(this.component._icons)}}},1166:(e,t,n)=>{n.d(t,{v:()=>i});var o=n(5800);const i=(e,t,n)=>{(0,o.b)(e,"_hasCounter",t,n)}},8973:(e,t,n)=>{n.d(t,{i:()=>s,v:()=>l});var o=n(5800),i=n(608);const a=(e,t,n)=>{(0,i.b)(n)?e[t]=n:(0,i.i)(n,1)&&(e[t]={icon:n})},s=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),l=(e,t,n={})=>{(0,o.o)(t,(()=>{var l;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)||s(e.left)||(0,i.i)(e.right,1)||s(e.right)||(0,i.i)(e.top,1)||s(e.top)||(0,i.i)(e.bottom,1)||s(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,o,s)=>{var l,c;"function"==typeof(null===(l=n.hooks)||void 0===l?void 0:l.beforePatch)&&(null===(c=n.hooks)||void 0===c||c.beforePatch(e,t,o,s)),(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)}}}))}))}},665:(e,t,n)=>{function o(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}n.d(t,{i:()=>o})}}]);
|
package/dist/9296.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 9296.js.LICENSE.txt */
|
|
2
|
+
"use strict";(self.webpackChunk_public_ui_sample_react=self.webpackChunk_public_ui_sample_react||[]).push([[9296],{5626:(e,t,o)=>{o.d(t,{K:()=>h});var n=o(4600),i=o(6783),s=o(9060),a=o(3584),l=o(7662),r=o(3334);const c=({ariaLabel:e,icon:t})=>(0,i.h)(l.d,{class:"kol-alert__heading-icon",_label:e,_icons:t}),d=({type:e,label:t})=>{switch(e){case"error":return(0,i.h)(c,{ariaLabel:(0,a.t)("kol-error"),icon:"codicon codicon-error",label:t});case"info":return(0,i.h)(c,{ariaLabel:(0,a.t)("kol-info"),icon:"codicon codicon-info",label:t});case"warning":return(0,i.h)(c,{ariaLabel:(0,a.t)("kol-warning"),icon:"codicon codicon-warning",label:t});case"success":return(0,i.h)(c,{ariaLabel:(0,a.t)("kol-success"),icon:"codicon codicon-pass",label:t});default:return(0,i.h)(c,{ariaLabel:(0,a.t)("kol-message"),icon:"codicon codicon-comment",label:t})}},h=(e,t)=>{var o,c;const{class:h={},type:u="default",variant:p="msg",label:b,hasCloser:f,alert:m,onAlertTimeout:v,onCloserClick:g,level:y}=e,_=(0,n._)(e,["class","type","variant","label","hasCloser","alert","onAlertTimeout","onCloserClick","level"]);m&&((null===(o=navigator.userActivation)||void 0===o?void 0:o.hasBeenActive)&&(null===(c=null===navigator||void 0===navigator?void 0:navigator.vibrate)||void 0===c||c.call(navigator,[100,75,100,75,100])),setTimeout((()=>{null==v||v()}),1e4));const O=Object.assign({class:(0,s.c)("kol-alert",`kol-alert--${u}`,`kol-alert--${p}`,{"kol-alert--hasCloser":!!f},h),role:m?"alert":void 0},_);return(0,i.h)("div",Object.assign({},O),(0,i.h)("div",{class:"kol-alert__container"},(0,i.h)(d,{label:b,type:u}),(0,i.h)("div",{class:"kol-alert__container-content"},b?(0,i.h)(r.K,{class:"kol-alert__heading",level:y},b):null,"msg"===p&&(0,i.h)("div",{class:"kol-alert__content"},t)),f&&(0,i.h)(l.a,{class:"kol-alert__close-button close","data-testid":"alert-close-button",_ariaDescription:(null==b?void 0:b.trim())||"",_hideLabel:!0,_icons:{left:{icon:"codicon codicon-close"}},_label:(0,a.t)("kol-close-alert"),_on:{onClick:g},_tooltipAlign:"left"})),"card"===p&&(0,i.h)("div",{class:"kol-alert__content"},t))}},5650:(e,t,o)=>{o.d(t,{K:()=>u,a:()=>d,c:()=>h,v:()=>c});var n=o(5800),i=o(608),s=o(4600),a=o(9060),l=o(6783),r=o(5626);const c=(e,t)=>{(0,n.o)(t,(()=>{try{t=(0,n.p)(t)}catch(e){}(0,n.w)(e,"_msg",(e=>(0,i.b)(e)&&"string"==typeof(null==e?void 0:e._description)),new Set(["MsgPropType"]),t,{defaultValue:{_description:"",_type:"error"}})}))};function d(e){var t;if(e&&!function(e){return!e||"error"===e._type&&!e._description}(e))return t=e,Object.entries(t).reduce(((e,[t,o])=>{const n=t.startsWith("_")?t.slice(1):t;return Object.assign(Object.assign({},e),{[n]:o})}),{})}function h(e,t){return Boolean((null==e?void 0:e.description)&&(null==e?void 0:e.description.length)>0)&&(!0===t||"error"!==(null==e?void 0:e.type))}const u=e=>{var{alert:t,msg:o,hideMsg:n,id:i,class:c}=e,d=(0,s._)(e,["alert","msg","hideMsg","id","class"]);return(0,l.h)(r.K,Object.assign({id:`${i}-msg`,alert:t,type:"error",class:(0,a.c)("kol-form-field__msg",{"visually-hidden":!0===n},c)},o,d,{"aria-hidden":"true"}),(null==o?void 0:o.description)||void 0)}},3334:(e,t,o)=>{o.d(t,{K:()=>d});var n=o(4600),i=o(6783),s=o(9060);const a=1;function l(e){return function(e){return e>=a&&e<=6}(e)?`h${e}`:"strong"}const r=(e,t)=>{var{class:o,level:r=a,variant:c}=e,d=(0,n._)(e,["class","level","variant"]);const h=l(r),u=c||h;return(0,i.h)(h,Object.assign({class:(0,s.c)("kol-headline",`kol-headline--${u}`,o)},d),t)},c=(e,t)=>{var{class:o,level:r=a}=e,c=(0,n._)(e,["class","level"]);const d=function(e){return 1===e?"span":l(e)}(r+1);return(0,i.h)(d,Object.assign({class:(0,s.c)("kol-headline kol-headline--group kol-headline--secondary",o)},c),t)},d=(e,t)=>{var{secondaryHeadline:o,level:l=a,class:d,HeadingGroupProps:h={},SecondaryHeadlineProps:u={}}=e,p=(0,n._)(e,["secondaryHeadline","level","class","HeadingGroupProps","SecondaryHeadlineProps"]);const b=Object.assign({level:l},p);if(!o)return(0,i.h)(r,Object.assign({class:(0,s.c)(d,"kol-headline--single")},b),t);const{class:f}=h,m=(0,n._)(h,["class"]),v=Object.assign({class:(0,s.c)("kol-heading-group",f)},m);return(0,i.h)("hgroup",Object.assign({},v),(0,i.h)(r,Object.assign({class:(0,s.c)(d,"kol-headline--group","kol-headline--primary")},b),t),(0,i.h)(c,Object.assign({level:l},u),o))}},2587:(e,t,o)=>{o.d(t,{I:()=>g,i:()=>v});var n=o(6783);const i="object"==typeof o.g&&o.g&&o.g.Object===Object&&o.g;var s="object"==typeof self&&self&&self.Object===Object&&self;const a=(i||s||Function("return this")()).Symbol;var l=Object.prototype,r=l.hasOwnProperty,c=l.toString,d=a?a.toStringTag:void 0,h=Object.prototype.toString,u="[object Null]",p="[object Undefined]",b=a?a.toStringTag:void 0;const f=Array.isArray;var m="[object String]";function v(e){return"string"==typeof e||!f(e)&&function(e){return null!=e&&"object"==typeof e}(e)&&function(e){return null==e?void 0===e?p:u:b&&b in Object(e)?function(e){var t=r.call(e,d),o=e[d];try{e[d]=void 0;var n=!0}catch(e){}var i=c.call(e);return n&&(t?e[d]=o:delete e[d]),i}(e):function(e){return h.call(e)}(e)}(e)==m}const g=({badgeText:e,label:t})=>{const o=e;let[i,...s]=t.split(o);return 0===s.length&&(e=o.toUpperCase(),[i,...s]=t.split(o)),0===s.length&&(e=o.toLowerCase(),[i,...s]=t.split(o)),(0,n.h)(n.F,null,i,s.length?(0,n.h)(n.F,null,(0,n.h)("u",null,e),s.join(o)):null)}},9543:(e,t,o)=>{o.d(t,{a:()=>r,b:()=>l,c:()=>a,v:()=>i});var n=o(5800);const i=(e,t)=>{(0,n.i)(e,"_accessKey",t)},s={hooks:{afterPatch:e=>{-1!==e&&0!==e&&(0,n.a)("Don't Use Tabindex Greater than 0: https://adrianroselli.com/2014/11/dont-use-tabindex-greater-than-0.html")}}},a=(e,t)=>{(0,n.k)(e,"_tabIndex",t,s)},l=(e,t)=>{(0,n.i)(e,"_shortKey",t)},r=(e,t)=>{if(e&&t)throw new Error("AccessKey and ShortKey are used. Only one is allowed.")}},9246:(e,t,o)=>{o.d(t,{a:()=>i,v:()=>a});var n=o(5800);const i=(e,t,o)=>{(0,n.w)(e,t,(e=>"string"==typeof e&&s.includes(e)),new Set(s),o,{defaultValue:"top"})},s=["left","right","top","bottom"],a=(e,t)=>{i(e,"_align",t)}},6970:(e,t,o)=>{o.d(t,{A:()=>s});var n=o(1732),i=o(5800);class s{constructor(e,t,o){var s,a,l,r;if(this.experimentalMode=(0,n.a)(),this.setFormAssociatedValue=e=>{var t;const o=null===(t=this.formAssociated)||void 0===t?void 0:t.getAttribute("name");null!==o&&""!==o||(0,i.j)(` The form field (${this.type}) must have a name attribute to be form-associated. Please define the _name attribute.`);const n=this.tryToStringifyValue(e);this.syncValue(e,n,this.formAssociated),this.syncValue(e,n,this.syncToOwnInput)},this.component=e,this.host=this.findHostWithShadowRoot(o),this.type=t,this.experimentalMode&&("KOL-BUTTON"===(r=null===(s=this.host)||void 0===s?void 0:s.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)&&e._name){switch(null===(a=this.host)||void 0===a||a.querySelectorAll("input,select,textarea").forEach((e=>{var t;null===(t=this.host)||void 0===t||t.removeChild(e)})),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(e){for(;null===(null==e?void 0:e.shadowRoot)&&e!==document.body;)(e=null==e?void 0:e.parentNode).host&&(e=e.host);return e}setAttribute(e,t,o){if(this.experimentalMode)try{if("boolean"!=typeof(o="object"==typeof o&&null!==o?JSON.stringify(o):o)&&"number"!=typeof o&&"string"!=typeof o)throw new Error("Invalid value type: "+typeof o);null==t||t.setAttribute(e,`${o}`)}catch(o){null==t||t.removeAttribute(e)}}tryToStringifyValue(e){try{return"object"==typeof e&&null!==e?JSON.stringify(e).toString():null==e?null:e.toString()}catch(e){return(0,i.l)(`The form field raw value is not able to stringify! ${e}`),""}}syncValue(e,t,o){if(o)switch(this.type){case"file":o.files=e;break;case"select":o.querySelectorAll("option").forEach((e=>{o.removeChild(e)})),Array.isArray(e)&&e.forEach((e=>{const t=this.tryToStringifyValue(e);if("string"==typeof t){const e=document.createElement("option");e.setAttribute("value",t),e.setAttribute("selected",""),o.appendChild(e)}}));break;case"radio":"string"==typeof t&&(o.setAttribute("value",t),o.setAttribute("checked",""),o.value=t);break;default:"string"==typeof t?(o.setAttribute("value",t),o.value=t):(o.removeAttribute("value"),o.value="")}}validateName(e){((e,t,o)=>{(0,i.i)(e,"_name",t,o)})(this.component,e,{hooks:{afterPatch:()=>{this.setAttribute("name",this.formAssociated,this.component.state._name)}}}),void 0===e&&(0,i.j)("A name on input fields or switches is not strictly required, but it might be relevant for the autocomplete function and for the static submission of the input field.")}validateSyncValueBySelector(e){if(this.experimentalMode&&"string"==typeof e){const t=document.querySelector(e);t&&(this.syncToOwnInput=t)}}componentWillLoad(){this.validateName(this.component._name),this.validateSyncValueBySelector(this.component._syncValueBySelector)}}},9060:(e,t,o)=>{function n(e){var t,o,i="";if("string"==typeof e||"number"==typeof e)i+=e;else if("object"==typeof e)if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(o=n(e[t]))&&(i&&(i+=" "),i+=o)}else for(o in e)e[o]&&(i&&(i+=" "),i+=o);return i}function i(){for(var e,t,o=0,i="",s=arguments.length;o<s;o++)(e=arguments[o])&&(t=n(e))&&(i&&(i+=" "),i+=t);return i}o.d(t,{c:()=>i})},608:(e,t,o)=>{o.d(t,{S:()=>a,a:()=>s,b:()=>n,i:()=>i});const n=e=>"object"==typeof e&&null!==e,i=(e,t=0)=>"string"==typeof e&&e.length>=t,s=e=>{if("object"!=typeof e||null===e)return i(e,1);for(const t in e)if(!1===i(t,1))return!1;return!0},a=new Event("StateChange")},7336:(e,t,o)=>{o.d(t,{i:()=>l,n:()=>c,r:()=>r});var n=o(6783),i=o(5687),s=o(1732);const a=()=>{let e=(0,s.d)().KoliBri;return void 0===e&&(e={},Object.defineProperty((0,s.d)(),"KoliBri",{value:e,writable:!1})),e},l=()=>{(()=>{const e=(0,s.g)().querySelector('meta[name="kolibri"]');if(e&&e.hasAttribute("content")){const t=e.getAttribute("content");"string"==typeof t&&((0,s.s)(t.includes("dev-mode=true")),(0,s.b)(t.includes("experimental-mode=true")),(0,s.c)(t.includes("color-contrast-analysis=true")))}})(),s.L.debug(`\n,--. ,--. ,--. ,--. ,-----. ,--.\n| .' / ,---. | | \`--' | |) /_ ,--.--. \`--'\n| . ' | .-. | | | ,--. | .-. \\ | .--' ,--.\n| |\\ \\ | '-' | | | | | | '--' / | | | |\n\`--' \`--´ \`---´ \`--' \`--' \`------´ \`--' \`--'\n🚹 The accessible HTML-Standard | 👉 https://public-ui.github.io | ${n.E.kolibriVersion}\n\t`,{forceLog:!0})},r=()=>{!0!==a().adviceShown&&(Object.defineProperty(a(),"adviceShown",{get:function(){return!0}}),s.L.debug("\nYou are using the KoliBri component library. If you have any suggestions for improvement or find a problem, please contact us:\n\nTicket: https://github.com/public-ui/kolibri/issues/new/choose (for privacy reasons, please use email)\nEmail: kolibri@itzbund.de\n"))};let c=()=>Math.floor(16777215*Math.random()).toString(16);"test"===i.p&&(c=()=>"nonce")},8625:(e,t,o)=>{o.d(t,{I:()=>T,K:()=>C,a:()=>k,b:()=>y,c:()=>_,d:()=>K,g:()=>P});var n=o(8231),i=o(6970),s=o(5800),a=o(9543),l=o(356),r=o(6985),c=o(5650),d=o(1074),h=o(4600),u=o(6783),p=o(9060),b=o(3584),f=o(7662),m=o(2587),v=o(5687);const g=({hasExpertSlot:e,accessKey:t,shortKey:o,label:n,showBadge:i=!0})=>{if(e)return(0,u.h)("slot",{name:"expert"});if(!n)return null;const s=(0,m.i)(t)||(0,m.i)(o);if(!i||!s)return(0,u.h)("span",null,n);const a=(0,v.b)(t,o);return(0,u.h)(u.F,null,(0,u.h)(m.I,{badgeText:a,label:n})," ",(0,u.h)("span",{class:"access-key-hint","aria-hidden":"true"},a))},y=e=>{var{component:t="label",id:o,baseClassName:n="kol-form-field",class:i,accessKey:s,shortKey:a,label:l,hideLabel:r,hasExpertSlot:c,showBadge:d}=e,b=(0,h._)(e,["component","id","baseClassName","class","accessKey","shortKey","label","hideLabel","hasExpertSlot","showBadge"]);const f=!c&&r;return(0,u.h)(t,Object.assign({},b,{class:(0,p.c)(`${n}__label`,i),id:f?void 0:`${o}-label`,hidden:f,htmlFor:o}),(0,u.h)("span",{class:(0,p.c)(`${n}__label-text`)},(0,u.h)(g,{hasExpertSlot:c,accessKey:s,shortKey:a,label:l,showBadge:d})))},_=e=>{var{id:t,class:o,hint:n,baseClassName:i="kol-form-field"}=e,s=(0,h._)(e,["id","class","hint","baseClassName"]);return n?(0,u.h)("span",Object.assign({class:(0,p.c)(`${i}__hint`,o),id:`${t}-hint`},s),n):null},O=e=>{var{currentLength:t,maxLength:o,class:n}=e,i=(0,h._)(e,["currentLength","maxLength","class"]);return(0,u.h)("span",Object.assign({class:(0,p.c)("kol-form-field__counter",n)},i,{"aria-atomic":"true","aria-live":"polite","data-testid":"input-counter"}),t,o&&(0,u.h)(u.F,null,(0,u.h)("span",{"aria-label":(0,b.t)("kol-of"),role:"img"},"/"),o)," ",(0,u.h)("span",null,(0,b.t)("kol-characters")))},k=({id:e,align:t,badgeText:o,hideLabel:n,label:i,class:s})=>(0,u.h)(f.g,{"aria-hidden":"true",class:(0,p.c)("kol-form-field__tooltip",s),_badgeText:o,_align:t,_id:n?`${e}-label`:void 0,_label:i});function L(e){return(null==e?void 0:e.type)&&{default:"msg-type-default",info:"msg-type-info",success:"msg-type-success",warning:"msg-type-warning",error:"msg-type-error"}[null==e?void 0:e.type]||""}const A=(e,t)=>{var{class:o}=e,n=(0,h._)(e,["class"]);return(0,u.h)("div",Object.assign({class:(0,p.c)("kol-form-field__input",o)},n),t)},j=(e,t)=>{const{component:o="div",renderNoLabel:n,renderNoTooltip:i,renderNoHint:s,anotherChildren:a,id:l,required:r,alert:d,disabled:b,class:f,msg:m,hideMsg:g,hideLabel:j,label:K,hint:S,accessKey:T,shortKey:C,tooltipAlign:P,counter:w,readOnly:E,touched:x,formFieldLabelProps:I,formFieldHintProps:B,formFieldTooltipProps:N,formFieldMsgProps:M,formFieldCounterProps:F,formFieldInputProps:H}=e,$=(0,h._)(e,["component","renderNoLabel","renderNoTooltip","renderNoHint","anotherChildren","id","required","alert","disabled","class","msg","hideMsg","hideLabel","label","hint","accessKey","shortKey","tooltipAlign","counter","readOnly","touched","formFieldLabelProps","formFieldHintProps","formFieldTooltipProps","formFieldMsgProps","formFieldCounterProps","formFieldInputProps"]),q=!n,U=!s,V=!i,D=(0,v.s)(K),R=(0,c.c)(m,x),W=(0,v.b)(T,C),G=V&&!D&&j;let X={"kol-form-field--disabled":Boolean(b),"kol-form-field--required":Boolean(r),"kol-form-field--touched":Boolean(x),"kol-form-field--hide-label":Boolean(j),"kol-form-field--read-only":Boolean(E),"kol-form-field--hidden-msg":Boolean(g)};return R&&(X=Object.assign(Object.assign({},X),{[`kol-form-field--${(null==m?void 0:m.type)||"error"}`]:!0,[`kol-form-field--${L(m)}`]:!0})),(0,u.h)(o,Object.assign({class:(0,p.c)("kol-form-field",X,f),role:"presentation"},$),q&&(0,u.h)(y,Object.assign({},I||{},{id:l,hasExpertSlot:D,hideLabel:j,label:K,accessKey:T,shortKey:C})),(0,u.h)(A,Object.assign({},H),t,G&&(0,u.h)(k,Object.assign({},N||{},{id:l,label:K,hideLabel:j,align:P,badgeText:W}))),w?(0,u.h)(O,Object.assign({},F||{},w)):null,R&&(0,u.h)(c.K,Object.assign({},M||{},{id:l,alert:d,msg:m,hideMsg:g})),U&&(0,u.h)(_,Object.assign({},B||{},{id:l,hint:S})),a)};function K({ariaDescribedBy:e,hideLabel:t,label:o}){return{title:"",autoCapitalize:"off",autoCorrect:"off","aria-describedby":(null==e?void 0:e.length)?e.join(" "):void 0,"aria-label":t&&o?o:void 0}}class S extends i.A{constructor(e,t,o){super(e,t,o),this.component=e}validateTouched(e){((e,t)=>{(0,s.b)(e,"_touched",t)})(this.component,e)}componentWillLoad(){super.componentWillLoad(),this.validateTouched(this.component._touched)}}class T extends S{constructor(e,t,o){super(e,t,o),this.valueChangeListeners=[],this.onFacade={onBlur:this.onBlur.bind(this),onChange:this.onChange.bind(this),onClick:this.onClick.bind(this),onFocus:this.onFocus.bind(this),onInput:this.onInput.bind(this)},this.component=e}validateAccessKey(e){(0,a.v)(this.component,e),(0,a.a)(e,this.component._shortKey)}validateAdjustHeight(e){((e,t)=>{(0,s.b)(e,"_adjustHeight",t)})(this.component,e)}validateDisabled(e){(0,s.b)(this.component,"_disabled",e),!0===e&&(0,s.c)()}validateTooltipAlign(e){(0,l.v)(this.component,e)}validateHideMsg(e){((e,t,o)=>{(0,s.b)(e,"_hideMsg",t,o)})(this.component,e,{hooks:{afterPatch:()=>{this.component.state._hideMsg&&(0,s.a)("Property _hideMsg for inputs: Only use when the error message is shown outside of the input component.")}}})}validateHideLabel(e){(0,r.v)(this.component,e,{hooks:{afterPatch:()=>{this.component.state._hideLabel&&(0,s.a)("Property hide-label for inputs: Only use for exceptions like search inputs that are clearly identifiable by their context.")}}})}validateHint(e){(0,s.i)(this.component,"_hint",e)}validateId(e){(0,s.i)(this.component,"_id",e,{minLength:1}),""!==e&&void 0!==e||(0,s.j)("A unique ID on the input fields is not strictly required, but it might be relevant for E2E tests.")}validateLabel(e){(0,d.a)(this.component,e,{required:!0})}validateMsg(e){(0,c.v)(this.component,e)}validateOn(e){"object"==typeof e&&(0,s.s)(this.component,"_on",e)}validateShortKey(e){(0,a.b)(this.component,e),(0,a.a)(this.component._accessKey,e)}validateSmartButton(e){(0,s.o)(e,(()=>{try{e=(0,s.p)(e)}catch(e){}(0,s.s)(this.component,"_smartButton",e)}))}validateTabIndex(e){(0,a.c)(this.component,e)}componentWillLoad(){super.componentWillLoad(),this.validateAccessKey(this.component._accessKey),this.validateAdjustHeight(this.component._adjustHeight),this.validateMsg(this.component._msg),this.validateDisabled(this.component._disabled),this.validateHideMsg(this.component._hideMsg),this.validateHideLabel(this.component._hideLabel),this.validateHint(this.component._hint),this.validateId(this.component._id),this.validateLabel(this.component._label),this.validateShortKey(this.component._shortKey),this.validateSmartButton(this.component._smartButton),this.validateOn(this.component._on),this.validateTabIndex(this.component._tabIndex),(0,a.a)(this.component._accessKey,this.component._shortKey)}emitEvent(e,t){this.host&&(0,n.d)(this.host,e,t)}onBlur(e){var t;this.component._touched=!0,this.emitEvent(n.K.blur),"function"==typeof(null===(t=this.component._on)||void 0===t?void 0:t.onBlur)&&this.component._on.onBlur(e)}onChange(e,t){var o;void 0===t&&(t=e.target.value),this.emitEvent(n.K.change,t),"function"==typeof(null===(o=this.component._on)||void 0===o?void 0:o.onChange)&&this.component._on.onChange(e,t),this.valueChangeListeners.forEach((e=>e(t)))}onInput(e,t=!0,o){var i;void 0===o&&(o=e.target.value),this.emitEvent(n.K.input,o),t&&this.setFormAssociatedValue(o),"function"==typeof(null===(i=this.component._on)||void 0===i?void 0:i.onInput)&&this.component._on.onInput(e,o)}onClick(e){var t;this.emitEvent(n.K.click),"function"==typeof(null===(t=this.component._on)||void 0===t?void 0:t.onClick)&&this.component._on.onClick(e)}onFocus(e){var t;this.emitEvent(n.K.focus),"function"==typeof(null===(t=this.component._on)||void 0===t?void 0:t.onFocus)&&this.component._on.onFocus(e)}addValueChangeListener(e){this.valueChangeListeners.push(e)}}const C=(e,t)=>{var{state:o}=e,n=(0,h._)(e,["state"]);return(0,u.h)(j,Object.assign({},function(e){const t={id:e._id,disabled:e._disabled,msg:(0,c.a)(e._msg),hint:e._hint,label:e._label,hideLabel:e._hideLabel,hideMsg:e._hideMsg,touched:e._touched,accessKey:e._accessKey,shortKey:e._shortKey};return"_required"in e&&(t.required=e._required),"_readOnly"in e&&(t.readOnly=e._readOnly),"_hasCounter"in e&&"_currentLength"in e&&(t.counter=e._hasCounter?{currentLength:e._currentLength}:void 0,t.counter&&"_maxLength"in e&&(t.counter.maxLength=e._maxLength)),t}(o),n),t)},P=e=>{var t,o,n;const i=Boolean((null===(t=null==e?void 0:e._msg)||void 0===t?void 0:t._description)&&(null===(o=e._msg._description)||void 0===o?void 0:o.length)>0),s="error"===(null===(n=e._msg)||void 0===n?void 0:n._type)&&i&&!0===e._touched,a="string"==typeof e._hint&&e._hint.length>0,l=[];return i&&l.push(`${e._id}-msg`),a&&l.push(`${e._id}-hint`),{hasError:s,hasHint:a,ariaDescribedBy:l}}},6985:(e,t,o)=>{o.d(t,{v:()=>i});var n=o(5800);const i=(e,t,o={})=>{(0,n.b)(e,"_hideLabel",t,o)}},3584:(e,t,o)=>{o.d(t,{t:()=>s});var n=o(8461),i=o(5687);let s=(e,t)=>{var o;return(null!==(o=(0,n.g)())&&void 0!==o?o:(0,n.i)("de")).translate(e,t)};"test"===i.p&&(s=e=>e)},1074:(e,t,o)=>{o.d(t,{a:()=>h,b:()=>l,c:()=>r,h:()=>i,v:()=>d});var n=o(5800);const i=[0,1,2,3,4,5,6],s=/[a-zA-Z0-9äöüÄÖÜß]/g,a=/^\d+$/;function l(e,t=1){return function(e){var t;return"string"==typeof e&&(null===(t=e.match(s))||void 0===t?void 0:t.length)||0}(e)>=t}function r(e){return a.test(e)}const c=new Set(["string"]),d=(e,t,o={})=>{(0,n.w)(e,"_label",(e=>"string"==typeof e),c,t,function(e){var t;return Object.assign(Object.assign({},e),{hooks:{afterPatch:(t,o,i,s)=>{var a,c;"function"==typeof(null===(a=e.hooks)||void 0===a?void 0:a.afterPatch)&&(null===(c=e.hooks)||void 0===c||c.afterPatch(t,o,i,s)),"string"==typeof t&&!1===l(t,3)&&!1===r(t)&&(0,n.a)(`The heading or label ("${t}") is not accessible. A label should consist of at least three readable characters.`),"string"==typeof t&&t.length>80&&(0,n.u)("A heading or label should not be longer than 80 characters.")},beforePatch:null===(t=e.hooks)||void 0===t?void 0:t.beforePatch}})}(o))},h=d},5687:(e,t,o)=>{o.d(t,{b:()=>a,h:()=>i,p:()=>n,s:()=>s});let n="development";try{n="production"}catch(e){n="production"}const i=(e,t,o)=>{if(e&&t&&"string"==typeof o){const n=e.querySelector(`[slot="${o}"]`);n&&t.appendChild(n)}},s=e=>""===e,a=(e,t)=>e||t||""},356:(e,t,o)=>{o.d(t,{v:()=>i});var n=o(9246);const i=(e,t)=>{(0,n.a)(e,"_tooltipAlign",t)}},4600:(e,t,o)=>{function n(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(o[n[i]]=e[n[i]])}return o}o.d(t,{_:()=>n}),"function"==typeof SuppressedError&&SuppressedError}}]);
|