@public-ui/components 4.6.0-rc.0 → 4.6.0-rc.1
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/assets/kolicons/kolicons.eot +0 -0
- package/assets/kolicons/kolicons.ttf +0 -0
- package/assets/kolicons/kolicons.woff +0 -0
- package/assets/kolicons/kolicons.woff2 +0 -0
- package/assets/kolicons/style.css +6 -6
- package/custom-elements.json +4 -42
- package/dist/cjs/{Heading-CSxHzc97.js → Heading-DpKpW9_U.js} +1 -1
- package/dist/cjs/{api-CgWeKMMq.js → api-DSnFV5pX.js} +16 -16
- package/dist/cjs/{app-globals-pY-Cyxgv.js → app-globals-DWk29tH4.js} +2 -2
- package/dist/cjs/{base-qwdvh9pf.js → base-B1L6tTOu.js} +4 -4
- package/dist/cjs/{base-YsLg9vB1.js → base-Cdk10fDz.js} +4 -4
- package/dist/cjs/{base-Bza2102z.js → base-DB-5MCfF.js} +6 -7
- package/dist/cjs/{base-CYqcl2o4.js → base-uTtcb6OV.js} +17 -17
- package/dist/cjs/{base-web-component-CkEUtzNr.js → base-web-component-BdHm5Oq9.js} +5 -5
- package/dist/cjs/{base-web-component-Cp4fQ2Mh.js → base-web-component-CyF5QpIH.js} +6 -6
- package/dist/cjs/{behavior-DV-LMyJJ.js → behavior-BnUihLzw.js} +4 -4
- package/dist/cjs/{behavior-BqwUv55g.js → behavior-C3w_8ifK.js} +2 -2
- package/dist/cjs/{behavior-DvLNQY2U.js → behavior-D5F_9gEC.js} +1 -1
- package/dist/cjs/{bem-registry-CyxrH26c.js → bem-registry-ZJZujhCi.js} +0 -15
- package/dist/cjs/{block-bem-BI7yfoFU.js → block-bem-CMvCkLkl.js} +1 -1
- package/dist/cjs/{component-DtmmNGjm.js → component-B2l8N5t_.js} +4 -4
- package/dist/cjs/{component-COEAaB_B.js → component-BE_gS80r.js} +2 -2
- package/dist/cjs/{component-B9y7UnKg.js → component-BXz1XtoE.js} +7 -7
- package/dist/cjs/{component-DXBzTkOY.js → component-BwrQID5A.js} +3 -3
- package/dist/cjs/{component-D_9ZydZA.js → component-C46QQbMS.js} +10 -8
- package/dist/cjs/{component-q87oQHev.js → component-CWEYNtAH.js} +3 -3
- package/dist/cjs/{component-CRDSSR7G.js → component-CrW05zUq.js} +2 -2
- package/dist/cjs/{component-BM0H6uUo.js → component-DfChjUi8.js} +7 -7
- package/dist/cjs/{component-CeT2UQLF.js → component-DsWMXDya.js} +3 -3
- package/dist/cjs/{component-Br2jlQXL.js → component-N-3XFtFS.js} +6 -6
- package/dist/cjs/{component-CKMtvWhe.js → component-_p4OHWcc.js} +6 -6
- package/dist/cjs/{component-D5PYQ9Ku.js → component-eYoUHQ64.js} +2 -2
- package/dist/cjs/{dev.utils-DOgQN_zk.js → dev.utils-Bxq7b-n1.js} +1 -1
- package/dist/cjs/{devtools-CG9Ov5FS.js → devtools-BLvPSoCH.js} +2 -2
- package/dist/cjs/{field-control-BT1ZyKNR.js → field-control-D9t3USqP.js} +7 -7
- package/dist/cjs/{group-0C7hEZpp.js → group-CFBPF3hG.js} +5 -5
- package/dist/cjs/{index-14cLFAPd.js → index-CNhjOFBg.js} +2 -32
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/{input-DOHuLJaE.js → input-C3F73RZW.js} +4 -4
- package/dist/cjs/{input-container-Ddovz1-b.js → input-container-B5-_NcRy.js} +6 -6
- package/dist/cjs/{item--tny4oQM.js → item-CfCrfeQL.js} +3 -3
- package/dist/cjs/{item-CWoQfEPo.js → item-DvddzW3M.js} +3 -3
- package/dist/cjs/{item-aV2WKcK3.js → item-dlea1NHr.js} +13 -13
- package/dist/cjs/{item-ZLQ1Yy47.js → item-nAB1wPvv.js} +7 -8
- package/dist/cjs/kol-abbr.cjs.entry.js +5 -5
- package/dist/cjs/kol-accordion.cjs.entry.js +10 -10
- package/dist/cjs/kol-alert.cjs.entry.js +15 -16
- package/dist/cjs/kol-avatar.cjs.entry.js +3 -3
- package/dist/cjs/kol-badge.cjs.entry.js +15 -16
- package/dist/cjs/kol-breadcrumb.cjs.entry.js +13 -13
- package/dist/cjs/kol-button-link.cjs.entry.js +15 -16
- package/dist/cjs/kol-button.cjs.entry.js +15 -16
- package/dist/cjs/kol-card.cjs.entry.js +16 -17
- package/dist/cjs/kol-combobox.cjs.entry.js +26 -27
- package/dist/cjs/kol-details.cjs.entry.js +10 -10
- package/dist/cjs/kol-dialog.cjs.entry.js +18 -19
- package/dist/cjs/kol-drawer.cjs.entry.js +17 -18
- package/dist/cjs/kol-form.cjs.entry.js +15 -16
- package/dist/cjs/kol-heading.cjs.entry.js +5 -5
- package/dist/cjs/kol-icon.cjs.entry.js +5 -5
- package/dist/cjs/kol-image.cjs.entry.js +3 -3
- package/dist/cjs/kol-input-checkbox.cjs.entry.js +29 -30
- package/dist/cjs/kol-input-color.cjs.entry.js +25 -26
- package/dist/cjs/kol-input-date.cjs.entry.js +25 -26
- package/dist/cjs/kol-input-email.cjs.entry.js +31 -32
- package/dist/cjs/kol-input-file.cjs.entry.js +24 -25
- package/dist/cjs/kol-input-number.cjs.entry.js +25 -26
- package/dist/cjs/kol-input-password.cjs.entry.js +26 -27
- package/dist/cjs/kol-input-radio.cjs.entry.js +24 -25
- package/dist/cjs/kol-input-range.cjs.entry.js +25 -26
- package/dist/cjs/kol-input-text.cjs.entry.js +26 -27
- package/dist/cjs/kol-kolibri.cjs.entry.js +5 -5
- package/dist/cjs/kol-link-button.cjs.entry.js +14 -14
- package/dist/cjs/kol-link.cjs.entry.js +14 -14
- package/dist/cjs/kol-meter.cjs.entry.js +5 -5
- package/dist/cjs/kol-modal.cjs.entry.js +18 -19
- package/dist/cjs/kol-nav.cjs.entry.js +18 -19
- package/dist/cjs/kol-pagination.cjs.entry.js +26 -28
- package/dist/cjs/kol-popover-button.cjs.entry.js +16 -17
- package/dist/cjs/kol-progress.cjs.entry.js +5 -5
- package/dist/cjs/kol-quote.cjs.entry.js +3 -3
- package/dist/cjs/kol-select.cjs.entry.js +23 -24
- package/dist/cjs/kol-single-select.cjs.entry.js +26 -27
- package/dist/cjs/kol-skip-nav.cjs.entry.js +13 -13
- package/dist/cjs/kol-spin.cjs.entry.js +6 -6
- package/dist/cjs/kol-split-button.cjs.entry.js +18 -19
- package/dist/cjs/kol-table-stateful.cjs.entry.js +31 -32
- package/dist/cjs/kol-table-stateless.cjs.entry.js +24 -25
- package/dist/cjs/kol-tabs.cjs.entry.js +14 -15
- package/dist/cjs/kol-textarea.cjs.entry.js +24 -25
- package/dist/cjs/kol-toast-container.cjs.entry.js +14 -15
- package/dist/cjs/kol-toolbar.cjs.entry.js +16 -17
- package/dist/cjs/kol-tooltip-wc.cjs.entry.js +7 -7
- package/dist/cjs/kol-tree-item.cjs.entry.js +12 -12
- package/dist/cjs/kol-tree.cjs.entry.js +3 -3
- package/dist/cjs/kol-version.cjs.entry.js +12 -13
- package/dist/cjs/kolibri.cjs.js +3 -3
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/{resolve-props-DhLgYN4l.js → resolve-props-BUSerQcI.js} +2 -2
- package/dist/cjs/{resolve-props-BpLJmK75.js → resolve-props-ClWlRbhz.js} +3 -4
- package/dist/cjs/{scroll-lock-C7PeigI_.js → scroll-lock-CSW_wA0P.js} +2 -2
- package/dist/cjs/{suggestions-CZjGY0Eu.js → suggestions-CIGYxDps.js} +2 -2
- package/dist/cjs/test-component.cjs.entry.js +1 -1
- package/dist/cjs/{toggle-handler-rQkcX4QY.js → toggle-handler-Cy5RcTS_.js} +4 -4
- package/dist/collection/collection-manifest.json +0 -7
- package/dist/collection/components/abbr/component.js +1 -1
- package/dist/collection/components/accordion/component.js +1 -1
- package/dist/collection/components/accordion/style.css +2 -2
- package/dist/collection/components/alert/component.js +1 -1
- package/dist/collection/components/alert/style.css +2 -2
- package/dist/collection/components/avatar/component.js +1 -1
- package/dist/collection/components/badge/component.js +1 -1
- package/dist/collection/components/badge/style.css +2 -2
- package/dist/collection/components/breadcrumb/component.js +1 -1
- package/dist/collection/components/breadcrumb/style.css +2 -2
- package/dist/collection/components/button/component.js +1 -1
- package/dist/collection/components/button/style.css +2 -2
- package/dist/collection/components/button-link/component.js +1 -1
- package/dist/collection/components/button-link/style.css +2 -2
- package/dist/collection/components/card/component.js +1 -1
- package/dist/collection/components/card/style.css +2 -2
- package/dist/collection/components/combobox/component.js +3 -3
- package/dist/collection/components/combobox/style.css +2 -2
- package/dist/collection/components/details/component.js +1 -1
- package/dist/collection/components/details/style.css +2 -2
- package/dist/collection/components/dialog/component.js +1 -1
- package/dist/collection/components/dialog/style.css +2 -2
- package/dist/collection/components/drawer/component.js +1 -1
- package/dist/collection/components/drawer/style.css +2 -2
- package/dist/collection/components/form/component.js +1 -1
- package/dist/collection/components/form/style.css +2 -2
- package/dist/collection/components/heading/component.js +1 -1
- package/dist/collection/components/icon/component.js +1 -1
- package/dist/collection/components/icon/style.css +2 -2
- package/dist/collection/components/image/component.js +1 -1
- package/dist/collection/components/input-checkbox/component.js +3 -3
- package/dist/collection/components/input-checkbox/style.css +2 -2
- package/dist/collection/components/input-color/component.js +2 -2
- package/dist/collection/components/input-color/style.css +2 -2
- package/dist/collection/components/input-date/component.js +2 -2
- package/dist/collection/components/input-date/style.css +2 -2
- package/dist/collection/components/input-email/component.js +1 -1
- package/dist/collection/components/input-email/style.css +2 -2
- package/dist/collection/components/input-file/component.js +2 -2
- package/dist/collection/components/input-file/style.css +2 -2
- package/dist/collection/components/input-number/component.js +2 -2
- package/dist/collection/components/input-number/style.css +2 -2
- package/dist/collection/components/input-password/component.js +1 -1
- package/dist/collection/components/input-password/style.css +2 -2
- package/dist/collection/components/input-radio/component.js +1 -1
- package/dist/collection/components/input-radio/style.css +2 -2
- package/dist/collection/components/input-range/component.js +2 -2
- package/dist/collection/components/input-range/style.css +2 -2
- package/dist/collection/components/input-text/component.js +1 -1
- package/dist/collection/components/input-text/style.css +2 -2
- package/dist/collection/components/kolibri/component.js +1 -1
- package/dist/collection/components/link/component.js +1 -1
- package/dist/collection/components/link/style.css +2 -2
- package/dist/collection/components/link-button/component.js +1 -1
- package/dist/collection/components/link-button/style.css +2 -2
- package/dist/collection/components/meter/component.js +1 -1
- package/dist/collection/components/modal/component.js +1 -1
- package/dist/collection/components/modal/style.css +2 -2
- package/dist/collection/components/nav/component.js +1 -1
- package/dist/collection/components/nav/style.css +2 -2
- package/dist/collection/components/pagination/component.js +7 -9
- package/dist/collection/components/pagination/style.css +2 -2
- package/dist/collection/components/popover-button/component.js +1 -1
- package/dist/collection/components/popover-button/style.css +2 -2
- package/dist/collection/components/progress/component.js +1 -1
- package/dist/collection/components/quote/component.js +1 -1
- package/dist/collection/components/select/component.js +1 -1
- package/dist/collection/components/select/style.css +2 -2
- package/dist/collection/components/single-select/component.js +3 -3
- package/dist/collection/components/single-select/style.css +2 -2
- package/dist/collection/components/skip-nav/component.js +1 -1
- package/dist/collection/components/skip-nav/style.css +2 -2
- package/dist/collection/components/spin/component.js +1 -1
- package/dist/collection/components/split-button/component.js +1 -1
- package/dist/collection/components/split-button/style.css +2 -2
- package/dist/collection/components/table-stateful/component.js +2 -2
- package/dist/collection/components/table-stateful/style.css +2 -2
- package/dist/collection/components/table-stateless/component.js +1 -1
- package/dist/collection/components/table-stateless/style.css +2 -2
- package/dist/collection/components/tabs/component.js +1 -1
- package/dist/collection/components/tabs/style.css +2 -2
- package/dist/collection/components/textarea/component.js +2 -2
- package/dist/collection/components/textarea/style.css +2 -2
- package/dist/collection/components/toaster/shadow.js +1 -1
- package/dist/collection/components/toaster/style.css +2 -2
- package/dist/collection/components/toolbar/component.js +1 -1
- package/dist/collection/components/toolbar/style.css +2 -2
- package/dist/collection/components/tooltip/component.js +1 -1
- package/dist/collection/components/tree/component.js +1 -1
- package/dist/collection/components/tree-item/component.js +1 -1
- package/dist/collection/components/tree-item/style.css +2 -2
- package/dist/collection/components/version/component.js +1 -1
- package/dist/collection/components/version/style.css +2 -2
- package/dist/collection/internal/functional-components/pagination/api.js +2 -2
- package/dist/collection/internal/functional-components/pagination/item.js +3 -3
- package/dist/collection/schema/bem-registry.js +0 -15
- package/dist/components/base-web-component2.js +1 -1
- package/dist/components/base-web-component4.js +1 -1
- package/dist/components/base.js +1 -1
- package/dist/components/base2.js +1 -1
- package/dist/components/base4.js +1 -1
- package/dist/components/behavior.js +1 -1
- package/dist/components/behavior2.js +1 -1
- package/dist/components/behavior3.js +1 -1
- package/dist/components/behavior4.js +1 -1
- package/dist/components/bem-registry.js +1 -1
- package/dist/components/component10.js +1 -1
- package/dist/components/component11.js +1 -1
- package/dist/components/component2.js +1 -1
- package/dist/components/component3.js +1 -1
- package/dist/components/component4.js +1 -1
- package/dist/components/component6.js +1 -1
- package/dist/components/component7.js +1 -1
- package/dist/components/component8.js +1 -1
- package/dist/components/component9.js +1 -1
- package/dist/components/contrast.js +1 -1
- package/dist/components/field-control.js +1 -1
- package/dist/components/input-container.js +1 -1
- package/dist/components/item2.js +1 -1
- package/dist/components/item4.js +1 -1
- package/dist/components/kol-abbr.js +1 -1
- package/dist/components/kol-accordion.js +1 -1
- package/dist/components/kol-alert.js +1 -1
- package/dist/components/kol-avatar.js +1 -1
- package/dist/components/kol-badge.js +1 -1
- package/dist/components/kol-breadcrumb.js +1 -1
- package/dist/components/kol-button-link.js +1 -1
- package/dist/components/kol-button.js +1 -1
- package/dist/components/kol-card.js +1 -1
- package/dist/components/kol-combobox.js +1 -1
- package/dist/components/kol-details.js +1 -1
- package/dist/components/kol-dialog.js +1 -1
- package/dist/components/kol-drawer.js +1 -1
- package/dist/components/kol-form.js +1 -1
- package/dist/components/kol-heading.js +1 -1
- package/dist/components/kol-icon.js +1 -1
- package/dist/components/kol-image.js +1 -1
- package/dist/components/kol-input-checkbox.js +1 -1
- package/dist/components/kol-input-color.js +1 -1
- package/dist/components/kol-input-date.js +1 -1
- package/dist/components/kol-input-email.js +1 -1
- package/dist/components/kol-input-file.js +1 -1
- package/dist/components/kol-input-number.js +1 -1
- package/dist/components/kol-input-password.js +1 -1
- package/dist/components/kol-input-radio.js +1 -1
- package/dist/components/kol-input-range.js +1 -1
- package/dist/components/kol-input-text.js +1 -1
- package/dist/components/kol-kolibri.js +1 -1
- package/dist/components/kol-link-button.js +1 -1
- package/dist/components/kol-link.js +1 -1
- package/dist/components/kol-meter.js +1 -1
- package/dist/components/kol-modal.js +1 -1
- package/dist/components/kol-nav.js +1 -1
- package/dist/components/kol-pagination.js +1 -1
- package/dist/components/kol-popover-button.js +1 -1
- package/dist/components/kol-progress.js +1 -1
- package/dist/components/kol-quote.js +1 -1
- package/dist/components/kol-select.js +1 -1
- package/dist/components/kol-single-select.js +1 -1
- package/dist/components/kol-skip-nav.js +1 -1
- package/dist/components/kol-spin.js +1 -1
- package/dist/components/kol-split-button.js +1 -1
- package/dist/components/kol-table-stateful.js +1 -1
- package/dist/components/kol-table-stateless.js +1 -1
- package/dist/components/kol-tabs.js +1 -1
- package/dist/components/kol-textarea.js +1 -1
- package/dist/components/kol-toast-container.js +1 -1
- package/dist/components/kol-toolbar.js +1 -1
- package/dist/components/kol-tooltip-wc.js +1 -1
- package/dist/components/kol-tree-item.js +1 -1
- package/dist/components/kol-tree.js +1 -1
- package/dist/components/kol-version.js +1 -1
- package/dist/components/label-hints.js +1 -1
- package/dist/components/label-lang-segment.js +1 -1
- package/dist/components/label-with-expert-slot.js +1 -1
- package/dist/components/level.js +1 -1
- package/dist/components/props-from-config.js +1 -1
- package/dist/components/resolve-props.js +1 -1
- package/dist/components/rows.js +1 -1
- package/dist/components/unit.js +1 -1
- package/dist/components/validators.js +1 -1
- package/dist/esm/{Heading-Bj2Ma7Tr.js → Heading-wrhAEuG3.js} +1 -1
- package/dist/esm/{api-DhMNvXtN.js → api-7B_iI89k.js} +14 -14
- package/dist/esm/{app-globals-Dpmwwlv-.js → app-globals-tRqgHq3P.js} +2 -2
- package/dist/esm/{base-IzdO60L1.js → base-BDYPTFjC.js} +4 -4
- package/dist/esm/{base-CJ5WCVaj.js → base-BVztEKgJ.js} +17 -17
- package/dist/esm/{base-DV_Pzm7z.js → base-C32RNC8q.js} +5 -6
- package/dist/esm/{base-Ba-xzpOT.js → base-D_-9Lzkd.js} +4 -4
- package/dist/esm/{base-web-component-BB3dHStd.js → base-web-component-BUu68byc.js} +6 -6
- package/dist/esm/{base-web-component-ug9DZUOx.js → base-web-component-DdY5aIHN.js} +5 -5
- package/dist/esm/{behavior-BMXrK4gj.js → behavior-DN-22cB1.js} +2 -2
- package/dist/esm/{behavior-BgmZcrK6.js → behavior-DsTiTiJC.js} +2 -2
- package/dist/esm/{behavior-B4IW5_Qt.js → behavior-fGxZN96S.js} +1 -1
- package/dist/esm/{bem-registry-CWN7_O1L.js → bem-registry-Crcs_65u.js} +0 -15
- package/dist/esm/{block-bem-BpQSY04L.js → block-bem-DehcAQZQ.js} +1 -1
- package/dist/esm/{component-BiYFPpjn.js → component-0IO2wu9i.js} +7 -7
- package/dist/esm/{component-DdIOGRgB.js → component-4xXBb7K-.js} +4 -4
- package/dist/esm/{component-scm3PBuq.js → component-BJ4gGOph.js} +2 -2
- package/dist/esm/{component-BvvE8aim.js → component-CPq3i3I_.js} +2 -2
- package/dist/esm/{component-ChtW1HQv.js → component-CTOYF3q6.js} +3 -3
- package/dist/esm/{component-BKfXEtN0.js → component-ChuoBFI-.js} +3 -3
- package/dist/esm/{component-Dt6efHXY.js → component-Cxdi6on4.js} +9 -8
- package/dist/esm/{component-Drxdk3mb.js → component-DHNcVTi0.js} +6 -6
- package/dist/esm/{component-gj7TBL0i.js → component-DWywPG_a.js} +6 -6
- package/dist/esm/{component-Ua7-J4C-.js → component-EK9BJR6z.js} +7 -7
- package/dist/esm/{component-C0zMsvYl.js → component-NEw1tN3M.js} +3 -3
- package/dist/esm/{component-C5QCCLLa.js → component-et0GdBuf.js} +2 -2
- package/dist/esm/{dev.utils-CwXr_J8N.js → dev.utils-Bg7nZBMk.js} +1 -1
- package/dist/esm/{devtools-QEDvmhav.js → devtools-nUT3JVTV.js} +2 -2
- package/dist/esm/{field-control-BOsAM8BW.js → field-control-D2tOd14v.js} +7 -7
- package/dist/esm/{group-D4WbZY27.js → group-CxWsx0aJ.js} +5 -5
- package/dist/esm/{index-D_P2XoAc.js → index-B_bJG8-2.js} +3 -32
- package/dist/esm/index.js +1 -1
- package/dist/esm/{input-C0kj1MmP.js → input-Ia9Z3AP7.js} +4 -4
- package/dist/esm/{input-container-B4TgBfDz.js → input-container-Y_8n5Sen.js} +6 -6
- package/dist/esm/{item-WrCdQw7F.js → item-BKVeXzUO.js} +13 -13
- package/dist/esm/{item-DRC1CmzC.js → item-BZtI88zF.js} +3 -3
- package/dist/esm/{item-e4SzwxHe.js → item-BjriQHQl.js} +3 -3
- package/dist/esm/{item-BMniY_My.js → item-BuqBMSYI.js} +6 -7
- package/dist/esm/kol-abbr.entry.js +5 -5
- package/dist/esm/kol-accordion.entry.js +10 -10
- package/dist/esm/kol-alert.entry.js +15 -16
- package/dist/esm/kol-avatar.entry.js +3 -3
- package/dist/esm/kol-badge.entry.js +15 -16
- package/dist/esm/kol-breadcrumb.entry.js +13 -13
- package/dist/esm/kol-button-link.entry.js +15 -16
- package/dist/esm/kol-button.entry.js +15 -16
- package/dist/esm/kol-card.entry.js +16 -17
- package/dist/esm/kol-combobox.entry.js +26 -27
- package/dist/esm/kol-details.entry.js +10 -10
- package/dist/esm/kol-dialog.entry.js +18 -19
- package/dist/esm/kol-drawer.entry.js +17 -18
- package/dist/esm/kol-form.entry.js +15 -16
- package/dist/esm/kol-heading.entry.js +5 -5
- package/dist/esm/kol-icon.entry.js +5 -5
- package/dist/esm/kol-image.entry.js +3 -3
- package/dist/esm/kol-input-checkbox.entry.js +29 -30
- package/dist/esm/kol-input-color.entry.js +25 -26
- package/dist/esm/kol-input-date.entry.js +25 -26
- package/dist/esm/kol-input-email.entry.js +31 -32
- package/dist/esm/kol-input-file.entry.js +24 -25
- package/dist/esm/kol-input-number.entry.js +25 -26
- package/dist/esm/kol-input-password.entry.js +26 -27
- package/dist/esm/kol-input-radio.entry.js +24 -25
- package/dist/esm/kol-input-range.entry.js +25 -26
- package/dist/esm/kol-input-text.entry.js +26 -27
- package/dist/esm/kol-kolibri.entry.js +5 -5
- package/dist/esm/kol-link-button.entry.js +14 -14
- package/dist/esm/kol-link.entry.js +14 -14
- package/dist/esm/kol-meter.entry.js +5 -5
- package/dist/esm/kol-modal.entry.js +18 -19
- package/dist/esm/kol-nav.entry.js +18 -19
- package/dist/esm/kol-pagination.entry.js +26 -28
- package/dist/esm/kol-popover-button.entry.js +16 -17
- package/dist/esm/kol-progress.entry.js +5 -5
- package/dist/esm/kol-quote.entry.js +3 -3
- package/dist/esm/kol-select.entry.js +23 -24
- package/dist/esm/kol-single-select.entry.js +26 -27
- package/dist/esm/kol-skip-nav.entry.js +13 -13
- package/dist/esm/kol-spin.entry.js +6 -6
- package/dist/esm/kol-split-button.entry.js +18 -19
- package/dist/esm/kol-table-stateful.entry.js +31 -32
- package/dist/esm/kol-table-stateless.entry.js +24 -25
- package/dist/esm/kol-tabs.entry.js +14 -15
- package/dist/esm/kol-textarea.entry.js +24 -25
- package/dist/esm/kol-toast-container.entry.js +14 -15
- package/dist/esm/kol-toolbar.entry.js +16 -17
- package/dist/esm/kol-tooltip-wc.entry.js +7 -7
- package/dist/esm/kol-tree-item.entry.js +12 -12
- package/dist/esm/kol-tree.entry.js +3 -3
- package/dist/esm/kol-version.entry.js +12 -13
- package/dist/esm/kolibri.js +4 -4
- package/dist/esm/loader.js +4 -4
- package/dist/esm/{resolve-props-CqTztQhV.js → resolve-props-BkF1VBBB.js} +2 -2
- package/dist/esm/{resolve-props-B-67viId.js → resolve-props-CHPFh7Tn.js} +2 -3
- package/dist/esm/{scroll-lock-CKnC0y0o.js → scroll-lock-D7Zo0QLt.js} +2 -2
- package/dist/esm/{suggestions-Be1_H9fA.js → suggestions-GEr-cvbz.js} +2 -2
- package/dist/esm/test-component.entry.js +1 -1
- package/dist/esm/{toggle-handler-Cjc991vd.js → toggle-handler-Bqoo8tCo.js} +4 -4
- package/dist/kolibri/Heading-wrhAEuG3.js +4 -0
- package/dist/kolibri/api-7B_iI89k.js +4 -0
- package/dist/kolibri/app-globals-tRqgHq3P.js +4 -0
- package/dist/kolibri/{base-IzdO60L1.js → base-BDYPTFjC.js} +1 -1
- package/dist/kolibri/base-BVztEKgJ.js +4 -0
- package/dist/kolibri/base-C32RNC8q.js +4 -0
- package/dist/kolibri/{base-Ba-xzpOT.js → base-D_-9Lzkd.js} +1 -1
- package/dist/kolibri/{base-web-component-BB3dHStd.js → base-web-component-BUu68byc.js} +1 -1
- package/dist/kolibri/{base-web-component-ug9DZUOx.js → base-web-component-DdY5aIHN.js} +1 -1
- package/dist/kolibri/behavior-DN-22cB1.js +4 -0
- package/dist/kolibri/{behavior-BgmZcrK6.js → behavior-DsTiTiJC.js} +1 -1
- package/dist/kolibri/{behavior-B4IW5_Qt.js → behavior-fGxZN96S.js} +1 -1
- package/dist/kolibri/bem-registry-Crcs_65u.js +4 -0
- package/dist/kolibri/block-bem-DehcAQZQ.js +4 -0
- package/dist/kolibri/component-0IO2wu9i.js +4 -0
- package/dist/kolibri/{component-DdIOGRgB.js → component-4xXBb7K-.js} +1 -1
- package/dist/kolibri/component-BJ4gGOph.js +4 -0
- package/dist/kolibri/component-CPq3i3I_.js +4 -0
- package/dist/kolibri/component-CTOYF3q6.js +4 -0
- package/dist/kolibri/{component-BKfXEtN0.js → component-ChuoBFI-.js} +1 -1
- package/dist/kolibri/component-Cxdi6on4.js +4 -0
- package/dist/kolibri/{component-Drxdk3mb.js → component-DHNcVTi0.js} +1 -1
- package/dist/kolibri/component-DWywPG_a.js +4 -0
- package/dist/kolibri/component-EK9BJR6z.js +4 -0
- package/dist/kolibri/{component-C0zMsvYl.js → component-NEw1tN3M.js} +1 -1
- package/dist/kolibri/{component-C5QCCLLa.js → component-et0GdBuf.js} +1 -1
- package/dist/kolibri/{dev.utils-CwXr_J8N.js → dev.utils-Bg7nZBMk.js} +1 -1
- package/dist/kolibri/{devtools-QEDvmhav.js → devtools-nUT3JVTV.js} +1 -1
- package/dist/kolibri/field-control-D2tOd14v.js +4 -0
- package/dist/kolibri/{group-D4WbZY27.js → group-CxWsx0aJ.js} +1 -1
- package/dist/kolibri/{index-D_P2XoAc.js → index-B_bJG8-2.js} +2 -2
- package/dist/kolibri/index.esm.js +1 -1
- package/dist/kolibri/input-Ia9Z3AP7.js +4 -0
- package/dist/kolibri/{input-container-B4TgBfDz.js → input-container-Y_8n5Sen.js} +1 -1
- package/dist/kolibri/item-BKVeXzUO.js +4 -0
- package/dist/kolibri/item-BZtI88zF.js +4 -0
- package/dist/kolibri/item-BjriQHQl.js +4 -0
- package/dist/kolibri/item-BuqBMSYI.js +4 -0
- package/dist/kolibri/kol-abbr.entry.js +1 -1
- package/dist/kolibri/kol-accordion.entry.js +1 -1
- package/dist/kolibri/kol-alert.entry.js +1 -1
- package/dist/kolibri/kol-avatar.entry.js +1 -1
- package/dist/kolibri/kol-badge.entry.js +1 -1
- package/dist/kolibri/kol-breadcrumb.entry.js +1 -1
- package/dist/kolibri/kol-button-link.entry.js +1 -1
- package/dist/kolibri/kol-button.entry.js +1 -1
- package/dist/kolibri/kol-card.entry.js +1 -1
- package/dist/kolibri/kol-combobox.entry.js +1 -1
- package/dist/kolibri/kol-details.entry.js +1 -1
- package/dist/kolibri/kol-dialog.entry.js +1 -1
- package/dist/kolibri/kol-drawer.entry.js +1 -1
- package/dist/kolibri/kol-form.entry.js +1 -1
- package/dist/kolibri/kol-heading.entry.js +1 -1
- package/dist/kolibri/kol-icon.entry.js +1 -1
- package/dist/kolibri/kol-image.entry.js +1 -1
- package/dist/kolibri/kol-input-checkbox.entry.js +1 -1
- package/dist/kolibri/kol-input-color.entry.js +1 -1
- package/dist/kolibri/kol-input-date.entry.js +1 -1
- package/dist/kolibri/kol-input-email.entry.js +1 -1
- package/dist/kolibri/kol-input-file.entry.js +1 -1
- package/dist/kolibri/kol-input-number.entry.js +1 -1
- package/dist/kolibri/kol-input-password.entry.js +1 -1
- package/dist/kolibri/kol-input-radio.entry.js +1 -1
- package/dist/kolibri/kol-input-range.entry.js +1 -1
- package/dist/kolibri/kol-input-text.entry.js +1 -1
- package/dist/kolibri/kol-kolibri.entry.js +1 -1
- package/dist/kolibri/kol-link-button.entry.js +1 -1
- package/dist/kolibri/kol-link.entry.js +1 -1
- package/dist/kolibri/kol-meter.entry.js +1 -1
- package/dist/kolibri/kol-modal.entry.js +1 -1
- package/dist/kolibri/kol-nav.entry.js +1 -1
- package/dist/kolibri/kol-pagination.entry.js +1 -1
- package/dist/kolibri/kol-popover-button.entry.js +1 -1
- package/dist/kolibri/kol-progress.entry.js +1 -1
- package/dist/kolibri/kol-quote.entry.js +1 -1
- package/dist/kolibri/kol-select.entry.js +1 -1
- package/dist/kolibri/kol-single-select.entry.js +1 -1
- package/dist/kolibri/kol-skip-nav.entry.js +1 -1
- package/dist/kolibri/kol-spin.entry.js +1 -1
- package/dist/kolibri/kol-split-button.entry.js +1 -1
- package/dist/kolibri/kol-table-stateful.entry.js +1 -1
- package/dist/kolibri/kol-table-stateless.entry.js +1 -1
- package/dist/kolibri/kol-tabs.entry.js +1 -1
- package/dist/kolibri/kol-textarea.entry.js +1 -1
- package/dist/kolibri/kol-toast-container.entry.js +1 -1
- package/dist/kolibri/kol-toolbar.entry.js +1 -1
- package/dist/kolibri/kol-tooltip-wc.entry.js +1 -1
- package/dist/kolibri/kol-tree-item.entry.js +1 -1
- package/dist/kolibri/kol-tree.entry.js +1 -1
- package/dist/kolibri/kol-version.entry.js +1 -1
- package/dist/kolibri/kolibri.esm.js +1 -1
- package/dist/kolibri/resolve-props-BkF1VBBB.js +4 -0
- package/dist/kolibri/resolve-props-CHPFh7Tn.js +4 -0
- package/dist/kolibri/{scroll-lock-CKnC0y0o.js → scroll-lock-D7Zo0QLt.js} +1 -1
- package/dist/kolibri/suggestions-GEr-cvbz.js +4 -0
- package/dist/kolibri/test-component.entry.js +1 -1
- package/dist/kolibri/toggle-handler-Bqoo8tCo.js +4 -0
- package/dist/types/components/pagination/component.d.ts +1 -1
- package/dist/types/components.d.ts +3 -97
- package/dist/types/internal/functional-components/pagination/api.d.ts +2 -2
- package/dist/types/internal/functional-components/pagination/item.d.ts +1 -1
- package/dist/types/schema/bem-registry.d.ts +0 -25
- package/dist/types/schema/components/pagination.d.ts +2 -2
- package/doc/pagination.md +13 -13
- package/doc/table-stateful.md +1 -1
- package/package.json +3 -3
- package/vscode-custom-data.json +0 -13
- package/dist/cjs/component-r497oHWq.js +0 -14
- package/dist/cjs/kol-click-button.cjs.entry.js +0 -55
- package/dist/cjs/kol-skeleton.cjs.entry.js +0 -107
- package/dist/cjs/name-D4qpL1m-.js +0 -10
- package/dist/collection/components/click-button/component.js +0 -105
- package/dist/collection/components/skeleton/component.js +0 -215
- package/dist/collection/internal/functional-components/click-button/api.js +0 -7
- package/dist/collection/internal/functional-components/click-button/component.js +0 -9
- package/dist/collection/internal/functional-components/skeleton/api.js +0 -7
- package/dist/collection/internal/functional-components/skeleton/component.js +0 -20
- package/dist/components/component12.js +0 -4
- package/dist/components/kol-click-button.d.ts +0 -11
- package/dist/components/kol-click-button.js +0 -4
- package/dist/components/kol-skeleton.d.ts +0 -11
- package/dist/components/kol-skeleton.js +0 -4
- package/dist/components/name.js +0 -4
- package/dist/esm/component-Db9HadXA.js +0 -12
- package/dist/esm/kol-click-button.entry.js +0 -53
- package/dist/esm/kol-skeleton.entry.js +0 -105
- package/dist/esm/name-B2Yf3EpX.js +0 -8
- package/dist/kolibri/Heading-Bj2Ma7Tr.js +0 -4
- package/dist/kolibri/api-DhMNvXtN.js +0 -4
- package/dist/kolibri/app-globals-Dpmwwlv-.js +0 -4
- package/dist/kolibri/base-CJ5WCVaj.js +0 -4
- package/dist/kolibri/base-DV_Pzm7z.js +0 -4
- package/dist/kolibri/behavior-BMXrK4gj.js +0 -4
- package/dist/kolibri/bem-registry-CWN7_O1L.js +0 -4
- package/dist/kolibri/block-bem-BpQSY04L.js +0 -4
- package/dist/kolibri/component-BiYFPpjn.js +0 -4
- package/dist/kolibri/component-BvvE8aim.js +0 -4
- package/dist/kolibri/component-ChtW1HQv.js +0 -4
- package/dist/kolibri/component-Db9HadXA.js +0 -4
- package/dist/kolibri/component-Dt6efHXY.js +0 -4
- package/dist/kolibri/component-Ua7-J4C-.js +0 -4
- package/dist/kolibri/component-gj7TBL0i.js +0 -4
- package/dist/kolibri/component-scm3PBuq.js +0 -4
- package/dist/kolibri/field-control-BOsAM8BW.js +0 -4
- package/dist/kolibri/input-C0kj1MmP.js +0 -4
- package/dist/kolibri/item-BMniY_My.js +0 -4
- package/dist/kolibri/item-DRC1CmzC.js +0 -4
- package/dist/kolibri/item-WrCdQw7F.js +0 -4
- package/dist/kolibri/item-e4SzwxHe.js +0 -4
- package/dist/kolibri/kol-click-button.entry.js +0 -4
- package/dist/kolibri/kol-skeleton.entry.js +0 -4
- package/dist/kolibri/name-B2Yf3EpX.js +0 -4
- package/dist/kolibri/resolve-props-B-67viId.js +0 -4
- package/dist/kolibri/resolve-props-CqTztQhV.js +0 -4
- package/dist/kolibri/suggestions-Be1_H9fA.js +0 -4
- package/dist/kolibri/toggle-handler-Cjc991vd.js +0 -4
- package/dist/types/components/click-button/component.d.ts +0 -15
- package/dist/types/components/skeleton/component.d.ts +0 -26
- package/dist/types/internal/functional-components/click-button/api.d.ts +0 -15
- package/dist/types/internal/functional-components/click-button/component.d.ts +0 -4
- package/dist/types/internal/functional-components/skeleton/api.d.ts +0 -29
- package/dist/types/internal/functional-components/skeleton/component.d.ts +0 -4
- package/doc/skeleton.md +0 -54
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
import{h as o,proxyCustomElement as e,Host as t,transformTag as i}from"@stencil/core/internal/client";import{B as n}from"./base-web-component.js";import{b as l,s as r}from"./bem-registry.js";import{c as a,e as s,a as c,d}from"./props-from-config.js";import{t as k}from"./i18n.js";import{B as f}from"./component.js";import{A as h}from"./component2.js";import{L as m,l as b,b as p}from"./component6.js";import{n as u,c as g}from"./dev.utils.js";import{h as _}from"./href.js";import{l as y}from"./label-with-expert-slot.js";import{d as x,K as v}from"./events.js";function w(o){if("object"!=typeof o||null===o)return!1;const{message:e,selector:t}=o;return"string"==typeof e&&("string"==typeof t||"function"==typeof t)}const T=a("errorList",[],(o=>s(o)),(o=>o.every(w))),z=c(),L=a("requiredText",!0,(function(o){if("boolean"==typeof o||"string"==typeof o)return o;throw Error("Invalid requiredText: expected boolean or string, got "+typeof o)})),I={optional:[T,z,L]},j=l.forBlock("kol-form"),q=j("alert"),B=j("link"),E=({alertHeadingId:e,closerAriaDescriptionId:t,errorLinkItems:i})=>o(h,{alert:!1,class:q,closerAriaDescriptionId:t,handleCloserClick:()=>{},hasCloser:!1,headingId:e,label:k("kol-error-list-message"),level:0,refCloserButton:()=>{},refCloserTooltip:()=>{},type:"error",variant:"card"},o("nav",{"aria-label":k("kol-error-list")},o("ul",null,i.map(((e,t)=>o("li",{key:t},o("span",{class:B},o(m,Object.assign({},e.fcProps))))))))),C=l.forBlock("kol-form"),A=C("form"),G=C("mandatory-fields-hint"),R=({alertHeadingId:e,closerAriaDescriptionId:t,errorLinkItems:i,handleReset:n,handleSubmit:l,requiredText:r})=>{const a=!0===r?k("kol-form-description"):"string"==typeof r&&r.length>0?r:"";return o(f,{block:"kol-form"},i.length>0&&o(E,{alertHeadingId:e,closerAriaDescriptionId:t,errorLinkItems:i}),o("form",{class:A,method:"post",onSubmit:l,onReset:n,noValidate:!0},a.length>0&&o("p",{class:G},a),o("slot",null)))},D={behavior:"smooth",block:"nearest"},H=e(class extends n{constructor(o){super(!1),!1!==o&&this.__registerHost(),this.__attachShadow(),this.errorLinkItems=[],this.alertHeadingId=g("alert-heading"),this.closerAriaDescriptionId=u(),this.propsConfig=I,this._errorList=void 0,this._on=void 0,this._requiredText=!0,this.handleSubmit=o=>{o.preventDefault();const e=this.getRenderProp("on").onSubmit;"function"==typeof e&&e(o),this.host&&x(this.host,v.submit)},this.handleReset=o=>{o.preventDefault();const e=this.getRenderProp("on").onReset;"function"==typeof e&&e(o),this.host&&x(this.host,v.reset)},this.focusErrorTarget=(o,e)=>{const t=document.querySelector(o);t&&"function"==typeof t.focus&&t.focus(null!=e?e:D)}}watchErrorList(o){T.apply(o,(o=>{this.setRenderProp("errorList",o),this.errorLinkItems=o.map((o=>((o,e)=>{const t=d(b);let i;return t.tabIndex=void 0,_.apply("",(o=>t.href=o)),y.apply(o.message,(o=>t.label=o)),p.apply({onClick:"string"==typeof o.selector?()=>e(o.selector+"",o.options):o.selector},(o=>t.on=o)),t.ariaCurrent="",t.ariaDescriptionId=u(),t.expertSlot=""===o.message,t.handleAnchorClick=o=>{var e;const n=null===(e=t.on)||void 0===e?void 0:e.onClick;"function"==typeof n&&(r(o,i),n(o,t.href))},t.refAnchor=o=>{i=o},t.refTooltip=()=>{},{fcProps:t,focus:o=>null==i?void 0:i.focus(o)}})(o,this.focusErrorTarget)))}))}watchOn(o){z.apply(o,(o=>this.setRenderProp("on",o)))}watchRequiredText(o){L.apply(o,(o=>this.setRenderProp("requiredText",o)))}focusErrorList(o){return setTimeout((()=>{var e;null===(e=this.errorLinkItems[0])||void 0===e||e.focus(null!=o?o:D)}),250),Promise.resolve()}componentWillLoad(){this.watchErrorList(this._errorList),this.watchOn(this._on),this.watchRequiredText(this._requiredText)}render(){return o(t,{key:"d4478bd5df83cfb01ecaad8f270436080489e754"},o(R,{key:"57af9453a74aeffd9d1e0bce73dda1d23db26370",alertHeadingId:this.alertHeadingId,closerAriaDescriptionId:this.closerAriaDescriptionId,errorList:this.getRenderProp("errorList"),errorLinkItems:this.errorLinkItems,handleReset:this.handleReset,handleSubmit:this.handleSubmit,on:this.getRenderProp("on"),requiredText:this.getRenderProp("requiredText")}))}get host(){return this}static get watchers(){return{_errorList:[{watchErrorList:0}],_on:[{watchOn:0}],_requiredText:[{watchRequiredText:0}]}}static get style(){return{default:'@charset "UTF-8"; @layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component, kol-forced-colors, kol-theme-forced-colors; @layer kol-a11y { :host { --a11y-min-size: max(calc(44 * 1rem / var(--kolibri-root-font-size, 16)), 44px); --kol-a11y-font-color: black; --kol-a11y-background-color: white; color: var(--kol-a11y-font-color); background-color: var(--kol-a11y-background-color); --kol-a11y-font-family: Verdana; font-family: var(--kol-a11y-font-family); letter-spacing: inherit; word-spacing: inherit; text-align: left; } * { hyphens: auto; word-break: break-word; } button, .kol-input .input { min-width: var(--a11y-min-size); min-height: var(--a11y-min-size); } a, button, h1, h2, h3, h4, h5, h6, input, option, select, textarea { color: inherit; font-family: inherit; font-size: inherit; letter-spacing: inherit; word-spacing: inherit; } .visually-hidden { position: fixed !important; top: 0; left: 0; width: 1px; height: 1px; margin: 0 !important; padding: 0 !important; overflow: hidden; white-space: nowrap; border: 0; clip-path: inset(50%); } } @layer kol-forced-colors { @media (forced-colors: active) { .kol-button__text { color: ButtonText; background-color: ButtonFace; border: 2px solid ButtonBorder; } .kol-button--disabled .kol-button__text { color: GrayText; border-color: GrayText; } .kol-link__interactive-element[aria-disabled=true], .kol-accordion__heading[aria-disabled=true], .kol-details__heading[aria-disabled=true] { color: GrayText; } .kol-link__interactive-element[aria-disabled=true] .kol-icon, .kol-link__interactive-element[aria-disabled=true] .kol-span__label, .kol-accordion__heading[aria-disabled=true] .kol-icon, .kol-accordion__heading[aria-disabled=true] .kol-span__label, .kol-details__heading[aria-disabled=true] .kol-icon, .kol-details__heading[aria-disabled=true] .kol-span__label { color: GrayText; } input:disabled, select:disabled, textarea:disabled { color: GrayText; border-color: GrayText; } .kol-card, .kol-dialog, .kol-modal { color: CanvasText; background-color: Canvas; border: 1px solid ButtonBorder; } .kol-pagination__button--selected .kol-button { opacity: 1; } .kol-pagination__button--selected .kol-button__text { color: SelectedItemText; background-color: SelectedItem; } .kol-button__interactive-element:focus-visible, .kol-link__interactive-element:focus-visible { outline: 2px solid Highlight; outline-offset: 2px; } } } @layer kol-global { :is(a, button) { background-color: transparent; width: 100%; margin: 0; padding: 0; border: none; } [hidden] { display: none !important; } .badge-text-hint { color: black; background-color: white; } } @layer kol-global { :host { max-width: 100%; font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16)); } * { box-sizing: border-box; } .kol-span { display: flex; flex-flow: column; align-items: center; justify-content: center; } .kol-span__container { display: flex; align-items: center; } a, button { cursor: pointer; } button:disabled { color: unset; } .disabled label, .disabled:focus-within label, [aria-disabled=true], [aria-disabled=true]:focus, [disabled]:where(:not(fieldset)), [disabled]:where(:not(fieldset)):focus { outline: none; cursor: not-allowed; } [aria-disabled=true]:focus .kol-span, [disabled]:focus .kol-span { outline: none !important; } .hastooltip { z-index: 900 !important; } } @layer kol-component { :host { display: block; } } @font-face { font-family: "kolicons"; src: url("kolicons.eot?t=1794028903670"); src: url("kolicons.eot?t=1794028903670#iefix") format("embedded-opentype"), url("kolicons.woff2?t=1794028903670") format("woff2"), url("kolicons.woff?t=1794028903670") format("woff"), url("kolicons.ttf?t=1794028903670") format("truetype"), url("kolicons.svg?t=1794028903670#kolicons") format("svg"); } @layer kol-component { [class^=kolicon-], [class*=" kolicon-"] { font-family: "kolicons"; font-style: normal; font-weight: 400; line-height: 1em; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } .kolicon-alert-error::before { content: "\\ea01"; } .kolicon-alert-info::before { content: "\\ea02"; } .kolicon-alert-success::before { content: "\\ea03"; } .kolicon-alert-warning::before { content: "\\ea04"; } .kolicon-check::before { content: "\\ea05"; } .kolicon-chevron-double-left::before { content: "\\ea06"; } .kolicon-chevron-double-right::before { content: "\\ea07"; } .kolicon-chevron-down::before { content: "\\ea08"; } .kolicon-chevron-left::before { content: "\\ea09"; } .kolicon-chevron-right::before { content: "\\ea0a"; } .kolicon-chevron-up::before { content: "\\ea0b"; } .kolicon-cogwheel::before { content: "\\ea0c"; } .kolicon-cross::before { content: "\\ea0d"; } .kolicon-eye-closed::before { content: "\\ea0e"; } .kolicon-eye::before { content: "\\ea0f"; } .kolicon-house::before { content: "\\ea10"; } .kolicon-kolibri::before { content: "\\ea11"; } .kolicon-link-external::before { content: "\\ea12"; } .kolicon-link::before { content: "\\ea13"; } .kolicon-minus::before { content: "\\ea14"; } .kolicon-pin-pinned::before { content: "\\ea15"; } .kolicon-pin-unpinned::before { content: "\\ea16"; } .kolicon-plus::before { content: "\\ea17"; } .kolicon-settings::before { content: "\\ea18"; } .kolicon-sort-asc::before { content: "\\ea19"; } .kolicon-sort-desc::before { content: "\\ea1a"; } .kolicon-sort-neutral::before { content: "\\ea1b"; } .kolicon-up::before { content: "\\ea1c"; } .kolicon-version::before { content: "\\ea1d"; } } @layer kol-component { .kol-icon { color: inherit; display: inline-block; font-size: inherit; font-weight: inherit; line-height: inherit; } .kol-tooltip { display: contents; } .kol-tooltip__floating { opacity: 0; display: none; position: fixed; top: 0; left: 0; width: var(--kol-tooltip-width, max-content); min-width: calc(8 * 1rem / var(--kolibri-root-font-size, 16)); max-width: 90vw; max-height: 90vh; animation-direction: normal; animation-duration: var(--kolibri-tooltip-animation-duration, 250ms); animation-fill-mode: forwards; animation-iteration-count: 1; animation-timing-function: ease-in; } .kol-tooltip__floating.hide { animation-name: hideTooltip; } .kol-tooltip__floating.show { animation-name: showTooltip; } .kol-tooltip__arrow { transform: rotate(45deg); color: black; background-color: white; position: absolute; z-index: 999; width: calc(10 * 1rem / var(--kolibri-root-font-size, 16)); height: calc(10 * 1rem / var(--kolibri-root-font-size, 16)); } .kol-tooltip__content { color: black; background-color: white; position: relative; z-index: 1000; } @keyframes hideTooltip { 0% { opacity: 1; } 100% { opacity: 0; display: none; } } @keyframes showTooltip { 0% { opacity: 0; } 100% { opacity: 1; } } } @layer kol-component { .kol-icon { color: inherit; display: inline-block; font-size: inherit; font-weight: inherit; line-height: inherit; } :host { display: inline-block; } .kol-link { display: inline-flex; max-width: fit-content; } .kol-link--standalone { min-width: var(--a11y-min-size); min-height: var(--a11y-min-size); align-items: stretch; } .kol-link--standalone .kol-link__interactive-element { align-items: stretch; } .kol-link--standalone .kol-link__text { display: inline-flex; flex: 1 1 100%; place-items: center; } .kol-link__interactive-element { display: inline-flex; flex: 1; align-items: baseline; place-items: center; text-align: left; text-decoration-line: none; } .kol-link__interactive-element:focus:not([aria-disabled], [disabled]) .kol-span__label, .kol-link__interactive-element:hover:not([aria-disabled], [disabled]) .kol-span__label { text-decoration-thickness: 0.2em; } .kol-link .kol-span__label { text-decoration-line: underline; } .kol-link__icon { display: inline-flex; } .kol-alert .kol-icon { color: inherit; display: inline-block; font-size: inherit; font-weight: inherit; line-height: inherit; } .kol-alert :host { display: inline-block; } .kol-alert .kol-button { display: flex; height: 100%; min-height: var(--a11y-min-size); text-decoration-line: none; } .kol-alert .kol-button__interactive-element { display: flex; flex: 1; text-align: left; text-decoration-line: none; } .kol-alert .kol-button__interactive-element::before { content: ""; } .kol-alert .kol-button__text { flex: 1 0 100%; } .kol-alert .kol-button { } .kol-alert .kol-button__tooltip { height: 0; } .kol-alert .kol-button--external-link > .kolicon-link-external::before { content: none; } .kol-alert .kol-button--external-link .kol-button__interactive-element > .kolicon-link-external::before { content: none; } .kol-alert { display: grid; grid-template-areas: "icon heading close" "icon content close"; grid-template-columns: min-content 1fr min-content; grid-template-rows: min-content min-content; } .kol-alert__icon { grid-area: icon; } .kol-alert__heading { grid-area: heading; } .kol-alert__closer { outline: transparent solid calc(1 * 1rem / var(--kolibri-root-font-size, 16)); grid-area: close; } .kol-alert__content { grid-area: content; } }'}}},[545,"kol-form",{_errorList:[16],_on:[16],_requiredText:[8,"_required-text"],errorLinkItems:[32],focusErrorList:[64]},void 0,{_errorList:[{watchErrorList:0}],_on:[{watchOn:0}],_requiredText:[{watchRequiredText:0}]}]),S=H,O=function(){"undefined"!=typeof customElements&&["kol-form"].forEach((o=>{"kol-form"===o&&(customElements.get(i(o))||customElements.define(i(o),H))}))};export{S as KolForm,O as defineCustomElement}
|
|
4
|
+
import{h as o,proxyCustomElement as e,Host as t,transformTag as i}from"@stencil/core/internal/client";import{B as n}from"./base-web-component.js";import{b as l,s as r}from"./bem-registry.js";import{c as a,e as s,a as c,d}from"./props-from-config.js";import{t as k}from"./i18n.js";import{B as f}from"./component.js";import{A as h}from"./component2.js";import{L as m,l as b,b as p}from"./component6.js";import{n as u,c as g}from"./dev.utils.js";import{h as _}from"./href.js";import{l as y}from"./label-with-expert-slot.js";import{d as x,K as v}from"./events.js";function w(o){if("object"!=typeof o||null===o)return!1;const{message:e,selector:t}=o;return"string"==typeof e&&("string"==typeof t||"function"==typeof t)}const T=a("errorList",[],(o=>s(o)),(o=>o.every(w))),z=c(),L=a("requiredText",!0,(function(o){if("boolean"==typeof o||"string"==typeof o)return o;throw Error("Invalid requiredText: expected boolean or string, got "+typeof o)})),I={optional:[T,z,L]},j=l.forBlock("kol-form"),q=j("alert"),B=j("link"),E=({alertHeadingId:e,closerAriaDescriptionId:t,errorLinkItems:i})=>o(h,{alert:!1,class:q,closerAriaDescriptionId:t,handleCloserClick:()=>{},hasCloser:!1,headingId:e,label:k("kol-error-list-message"),level:0,refCloserButton:()=>{},refCloserTooltip:()=>{},type:"error",variant:"card"},o("nav",{"aria-label":k("kol-error-list")},o("ul",null,i.map(((e,t)=>o("li",{key:t},o("span",{class:B},o(m,Object.assign({},e.fcProps))))))))),C=l.forBlock("kol-form"),A=C("form"),G=C("mandatory-fields-hint"),R=({alertHeadingId:e,closerAriaDescriptionId:t,errorLinkItems:i,handleReset:n,handleSubmit:l,requiredText:r})=>{const a=!0===r?k("kol-form-description"):"string"==typeof r&&r.length>0?r:"";return o(f,{block:"kol-form"},i.length>0&&o(E,{alertHeadingId:e,closerAriaDescriptionId:t,errorLinkItems:i}),o("form",{class:A,method:"post",onSubmit:l,onReset:n,noValidate:!0},a.length>0&&o("p",{class:G},a),o("slot",null)))},D={behavior:"smooth",block:"nearest"},H=e(class extends n{constructor(o){super(!1),!1!==o&&this.__registerHost(),this.__attachShadow(),this.errorLinkItems=[],this.alertHeadingId=g("alert-heading"),this.closerAriaDescriptionId=u(),this.propsConfig=I,this._errorList=void 0,this._on=void 0,this._requiredText=!0,this.handleSubmit=o=>{o.preventDefault();const e=this.getRenderProp("on").onSubmit;"function"==typeof e&&e(o),this.host&&x(this.host,v.submit)},this.handleReset=o=>{o.preventDefault();const e=this.getRenderProp("on").onReset;"function"==typeof e&&e(o),this.host&&x(this.host,v.reset)},this.focusErrorTarget=(o,e)=>{const t=document.querySelector(o);t&&"function"==typeof t.focus&&t.focus(null!=e?e:D)}}watchErrorList(o){T.apply(o,(o=>{this.setRenderProp("errorList",o),this.errorLinkItems=o.map((o=>((o,e)=>{const t=d(b);let i;return t.tabIndex=void 0,_.apply("",(o=>t.href=o)),y.apply(o.message,(o=>t.label=o)),p.apply({onClick:"string"==typeof o.selector?()=>e(o.selector+"",o.options):o.selector},(o=>t.on=o)),t.ariaCurrent="",t.ariaDescriptionId=u(),t.expertSlot=""===o.message,t.handleAnchorClick=o=>{var e;const n=null===(e=t.on)||void 0===e?void 0:e.onClick;"function"==typeof n&&(r(o,i),n(o,t.href))},t.refAnchor=o=>{i=o},t.refTooltip=()=>{},{fcProps:t,focus:o=>null==i?void 0:i.focus(o)}})(o,this.focusErrorTarget)))}))}watchOn(o){z.apply(o,(o=>this.setRenderProp("on",o)))}watchRequiredText(o){L.apply(o,(o=>this.setRenderProp("requiredText",o)))}focusErrorList(o){return setTimeout((()=>{var e;null===(e=this.errorLinkItems[0])||void 0===e||e.focus(null!=o?o:D)}),250),Promise.resolve()}componentWillLoad(){this.watchErrorList(this._errorList),this.watchOn(this._on),this.watchRequiredText(this._requiredText)}render(){return o(t,{key:"94f5bb67c8748b2aee2e7140451c7084367fe8b6"},o(R,{key:"54b5158764974680f8551db3174f91feb95468d4",alertHeadingId:this.alertHeadingId,closerAriaDescriptionId:this.closerAriaDescriptionId,errorList:this.getRenderProp("errorList"),errorLinkItems:this.errorLinkItems,handleReset:this.handleReset,handleSubmit:this.handleSubmit,on:this.getRenderProp("on"),requiredText:this.getRenderProp("requiredText")}))}get host(){return this}static get watchers(){return{_errorList:[{watchErrorList:0}],_on:[{watchOn:0}],_requiredText:[{watchRequiredText:0}]}}static get style(){return{default:'@charset "UTF-8"; @layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component, kol-forced-colors, kol-theme-forced-colors; @layer kol-a11y { :host { --a11y-min-size: max(calc(44 * 1rem / var(--kolibri-root-font-size, 16)), 44px); --kol-a11y-font-color: black; --kol-a11y-background-color: white; color: var(--kol-a11y-font-color); background-color: var(--kol-a11y-background-color); --kol-a11y-font-family: Verdana; font-family: var(--kol-a11y-font-family); letter-spacing: inherit; word-spacing: inherit; text-align: left; } * { hyphens: auto; word-break: break-word; } button, .kol-input .input { min-width: var(--a11y-min-size); min-height: var(--a11y-min-size); } a, button, h1, h2, h3, h4, h5, h6, input, option, select, textarea { color: inherit; font-family: inherit; font-size: inherit; letter-spacing: inherit; word-spacing: inherit; } .visually-hidden { position: fixed !important; top: 0; left: 0; width: 1px; height: 1px; margin: 0 !important; padding: 0 !important; overflow: hidden; white-space: nowrap; border: 0; clip-path: inset(50%); } } @layer kol-forced-colors { @media (forced-colors: active) { .kol-button__text { color: ButtonText; background-color: ButtonFace; border: 2px solid ButtonBorder; } .kol-button--disabled .kol-button__text { color: GrayText; border-color: GrayText; } .kol-link__interactive-element[aria-disabled=true], .kol-accordion__heading[aria-disabled=true], .kol-details__heading[aria-disabled=true] { color: GrayText; } .kol-link__interactive-element[aria-disabled=true] .kol-icon, .kol-link__interactive-element[aria-disabled=true] .kol-span__label, .kol-accordion__heading[aria-disabled=true] .kol-icon, .kol-accordion__heading[aria-disabled=true] .kol-span__label, .kol-details__heading[aria-disabled=true] .kol-icon, .kol-details__heading[aria-disabled=true] .kol-span__label { color: GrayText; } input:disabled, select:disabled, textarea:disabled { color: GrayText; border-color: GrayText; } .kol-card, .kol-dialog, .kol-modal { color: CanvasText; background-color: Canvas; border: 1px solid ButtonBorder; } .kol-pagination__button--selected .kol-button { opacity: 1; } .kol-pagination__button--selected .kol-button__text { color: SelectedItemText; background-color: SelectedItem; } .kol-button__interactive-element:focus-visible, .kol-link__interactive-element:focus-visible { outline: 2px solid Highlight; outline-offset: 2px; } } } @layer kol-global { :is(a, button) { background-color: transparent; width: 100%; margin: 0; padding: 0; border: none; } [hidden] { display: none !important; } .badge-text-hint { color: black; background-color: white; } } @layer kol-global { :host { max-width: 100%; font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16)); } * { box-sizing: border-box; } .kol-span { display: flex; flex-flow: column; align-items: center; justify-content: center; } .kol-span__container { display: flex; align-items: center; } a, button { cursor: pointer; } button:disabled { color: unset; } .disabled label, .disabled:focus-within label, [aria-disabled=true], [aria-disabled=true]:focus, [disabled]:where(:not(fieldset)), [disabled]:where(:not(fieldset)):focus { outline: none; cursor: not-allowed; } [aria-disabled=true]:focus .kol-span, [disabled]:focus .kol-span { outline: none !important; } .hastooltip { z-index: 900 !important; } } @layer kol-component { :host { display: block; } } @font-face { font-family: "kolicons"; src: url("kolicons.eot?t=1794493099910"); src: url("kolicons.eot?t=1794493099910#iefix") format("embedded-opentype"), url("kolicons.woff2?t=1794493099910") format("woff2"), url("kolicons.woff?t=1794493099910") format("woff"), url("kolicons.ttf?t=1794493099910") format("truetype"), url("kolicons.svg?t=1794493099910#kolicons") format("svg"); } @layer kol-component { [class^=kolicon-], [class*=" kolicon-"] { font-family: "kolicons"; font-style: normal; font-weight: 400; line-height: 1em; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } .kolicon-alert-error::before { content: "\\ea01"; } .kolicon-alert-info::before { content: "\\ea02"; } .kolicon-alert-success::before { content: "\\ea03"; } .kolicon-alert-warning::before { content: "\\ea04"; } .kolicon-check::before { content: "\\ea05"; } .kolicon-chevron-double-left::before { content: "\\ea06"; } .kolicon-chevron-double-right::before { content: "\\ea07"; } .kolicon-chevron-down::before { content: "\\ea08"; } .kolicon-chevron-left::before { content: "\\ea09"; } .kolicon-chevron-right::before { content: "\\ea0a"; } .kolicon-chevron-up::before { content: "\\ea0b"; } .kolicon-cogwheel::before { content: "\\ea0c"; } .kolicon-cross::before { content: "\\ea0d"; } .kolicon-eye-closed::before { content: "\\ea0e"; } .kolicon-eye::before { content: "\\ea0f"; } .kolicon-house::before { content: "\\ea10"; } .kolicon-kolibri::before { content: "\\ea11"; } .kolicon-link-external::before { content: "\\ea12"; } .kolicon-link::before { content: "\\ea13"; } .kolicon-minus::before { content: "\\ea14"; } .kolicon-pin-pinned::before { content: "\\ea15"; } .kolicon-pin-unpinned::before { content: "\\ea16"; } .kolicon-plus::before { content: "\\ea17"; } .kolicon-settings::before { content: "\\ea18"; } .kolicon-sort-asc::before { content: "\\ea19"; } .kolicon-sort-desc::before { content: "\\ea1a"; } .kolicon-sort-neutral::before { content: "\\ea1b"; } .kolicon-up::before { content: "\\ea1c"; } .kolicon-version::before { content: "\\ea1d"; } } @layer kol-component { .kol-icon { color: inherit; display: inline-block; font-size: inherit; font-weight: inherit; line-height: inherit; } .kol-tooltip { display: contents; } .kol-tooltip__floating { opacity: 0; display: none; position: fixed; top: 0; left: 0; width: var(--kol-tooltip-width, max-content); min-width: calc(8 * 1rem / var(--kolibri-root-font-size, 16)); max-width: 90vw; max-height: 90vh; animation-direction: normal; animation-duration: var(--kolibri-tooltip-animation-duration, 250ms); animation-fill-mode: forwards; animation-iteration-count: 1; animation-timing-function: ease-in; } .kol-tooltip__floating.hide { animation-name: hideTooltip; } .kol-tooltip__floating.show { animation-name: showTooltip; } .kol-tooltip__arrow { transform: rotate(45deg); color: black; background-color: white; position: absolute; z-index: 999; width: calc(10 * 1rem / var(--kolibri-root-font-size, 16)); height: calc(10 * 1rem / var(--kolibri-root-font-size, 16)); } .kol-tooltip__content { color: black; background-color: white; position: relative; z-index: 1000; } @keyframes hideTooltip { 0% { opacity: 1; } 100% { opacity: 0; display: none; } } @keyframes showTooltip { 0% { opacity: 0; } 100% { opacity: 1; } } } @layer kol-component { .kol-icon { color: inherit; display: inline-block; font-size: inherit; font-weight: inherit; line-height: inherit; } :host { display: inline-block; } .kol-link { display: inline-flex; max-width: fit-content; } .kol-link--standalone { min-width: var(--a11y-min-size); min-height: var(--a11y-min-size); align-items: stretch; } .kol-link--standalone .kol-link__interactive-element { align-items: stretch; } .kol-link--standalone .kol-link__text { display: inline-flex; flex: 1 1 100%; place-items: center; } .kol-link__interactive-element { display: inline-flex; flex: 1; align-items: baseline; place-items: center; text-align: left; text-decoration-line: none; } .kol-link__interactive-element:focus:not([aria-disabled], [disabled]) .kol-span__label, .kol-link__interactive-element:hover:not([aria-disabled], [disabled]) .kol-span__label { text-decoration-thickness: 0.2em; } .kol-link .kol-span__label { text-decoration-line: underline; } .kol-link__icon { display: inline-flex; } .kol-alert .kol-icon { color: inherit; display: inline-block; font-size: inherit; font-weight: inherit; line-height: inherit; } .kol-alert :host { display: inline-block; } .kol-alert .kol-button { display: flex; height: 100%; min-height: var(--a11y-min-size); text-decoration-line: none; } .kol-alert .kol-button__interactive-element { display: flex; flex: 1; text-align: left; text-decoration-line: none; } .kol-alert .kol-button__interactive-element::before { content: ""; } .kol-alert .kol-button__text { flex: 1 0 100%; } .kol-alert .kol-button { } .kol-alert .kol-button__tooltip { height: 0; } .kol-alert .kol-button--external-link > .kolicon-link-external::before { content: none; } .kol-alert .kol-button--external-link .kol-button__interactive-element > .kolicon-link-external::before { content: none; } .kol-alert { display: grid; grid-template-areas: "icon heading close" "icon content close"; grid-template-columns: min-content 1fr min-content; grid-template-rows: min-content min-content; } .kol-alert__icon { grid-area: icon; } .kol-alert__heading { grid-area: heading; } .kol-alert__closer { outline: transparent solid calc(1 * 1rem / var(--kolibri-root-font-size, 16)); grid-area: close; } .kol-alert__content { grid-area: content; } }'}}},[545,"kol-form",{_errorList:[16],_on:[16],_requiredText:[8,"_required-text"],errorLinkItems:[32],focusErrorList:[64]},void 0,{_errorList:[{watchErrorList:0}],_on:[{watchOn:0}],_requiredText:[{watchRequiredText:0}]}]),S=H,O=function(){"undefined"!=typeof customElements&&["kol-form"].forEach((o=>{"kol-form"===o&&(customElements.get(i(o))||customElements.define(i(o),H))}))};export{S as KolForm,O as defineCustomElement}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
import{h as e,proxyCustomElement as o,Host as l,transformTag as t}from"@stencil/core/internal/client";import{B as a}from"./base-web-component.js";import{b as i}from"./bem-registry.js";import{l as r}from"./level.js";import{c as n,b as s,r as d}from"./props-from-config.js";import{l as c}from"./label-with-expert-slot.js";import{c as b}from"./clsx.js";import{r as h}from"./component7.js";const p=n("secondaryHeadline","",s),u={optional:[r,p],required:[c]},k=i.forBlock("kol-heading"),m=i.forBlock("kol-headline"),f=o=>{const{label:l,level:t,secondaryHeadline:a}=d(u,o),i=function(e){return e>=1&&e<=6?"h"+e:"strong"}(t);return a?e("hgroup",{class:k({group:!0})},e(i,{class:m({[i]:!0,group:!0,primary:!0})},h(l),e("slot",{name:"expert",slot:"expert"})),e("p",{class:m({group:!0,secondary:!0})},a)):e(i,{class:b(k(),m({[i]:!0,single:!0}))},h(l),e("slot",{name:"expert",slot:"expert"}))},y=o(class extends a{constructor(e){super(!1),!1!==e&&this.__registerHost(),this.__attachShadow(),this.propsConfig=u,this._level=0,this._secondaryHeadline=void 0}watchLabel(e){c.apply(e,(e=>this.setRenderProp("label",e)),this.isRequired("label"))}watchLevel(e){r.apply(e,(e=>this.setRenderProp("level",e)))}watchSecondaryHeadline(e){p.apply(e,(e=>this.setRenderProp("secondaryHeadline",e)))}componentWillLoad(){c.apply(this._label,(e=>this.setRenderProp("label",e)),this.isRequired("label")),r.apply(this._level,(e=>this.setRenderProp("level",e))),p.apply(this._secondaryHeadline,(e=>this.setRenderProp("secondaryHeadline",e)))}render(){return e(l,{key:"
|
|
4
|
+
import{h as e,proxyCustomElement as o,Host as l,transformTag as t}from"@stencil/core/internal/client";import{B as a}from"./base-web-component.js";import{b as i}from"./bem-registry.js";import{l as r}from"./level.js";import{c as n,b as s,r as d}from"./props-from-config.js";import{l as c}from"./label-with-expert-slot.js";import{c as b}from"./clsx.js";import{r as h}from"./component7.js";const p=n("secondaryHeadline","",s),u={optional:[r,p],required:[c]},k=i.forBlock("kol-heading"),m=i.forBlock("kol-headline"),f=o=>{const{label:l,level:t,secondaryHeadline:a}=d(u,o),i=function(e){return e>=1&&e<=6?"h"+e:"strong"}(t);return a?e("hgroup",{class:k({group:!0})},e(i,{class:m({[i]:!0,group:!0,primary:!0})},h(l),e("slot",{name:"expert",slot:"expert"})),e("p",{class:m({group:!0,secondary:!0})},a)):e(i,{class:b(k(),m({[i]:!0,single:!0}))},h(l),e("slot",{name:"expert",slot:"expert"}))},y=o(class extends a{constructor(e){super(!1),!1!==e&&this.__registerHost(),this.__attachShadow(),this.propsConfig=u,this._level=0,this._secondaryHeadline=void 0}watchLabel(e){c.apply(e,(e=>this.setRenderProp("label",e)),this.isRequired("label"))}watchLevel(e){r.apply(e,(e=>this.setRenderProp("level",e)))}watchSecondaryHeadline(e){p.apply(e,(e=>this.setRenderProp("secondaryHeadline",e)))}componentWillLoad(){c.apply(this._label,(e=>this.setRenderProp("label",e)),this.isRequired("label")),r.apply(this._level,(e=>this.setRenderProp("level",e))),p.apply(this._secondaryHeadline,(e=>this.setRenderProp("secondaryHeadline",e)))}render(){return e(l,{key:"b6f8fd70f4454c702a370d05f24ecb2fc63fcde9"},e(f,{key:"edcd4e446e999773121e8c6b2dc8d35bc9d3d6da",label:this.getRenderProp("label"),level:this.getRenderProp("level"),secondaryHeadline:this.getRenderProp("secondaryHeadline")}))}static get watchers(){return{_label:[{watchLabel:0}],_level:[{watchLevel:0}],_secondaryHeadline:[{watchSecondaryHeadline:0}]}}static get style(){return{default:'@charset "UTF-8"; @layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component, kol-forced-colors, kol-theme-forced-colors; @layer kol-a11y { :host { --a11y-min-size: max(calc(44 * 1rem / var(--kolibri-root-font-size, 16)), 44px); --kol-a11y-font-color: black; --kol-a11y-background-color: white; color: var(--kol-a11y-font-color); background-color: var(--kol-a11y-background-color); --kol-a11y-font-family: Verdana; font-family: var(--kol-a11y-font-family); letter-spacing: inherit; word-spacing: inherit; text-align: left; } * { hyphens: auto; word-break: break-word; } button, .kol-input .input { min-width: var(--a11y-min-size); min-height: var(--a11y-min-size); } a, button, h1, h2, h3, h4, h5, h6, input, option, select, textarea { color: inherit; font-family: inherit; font-size: inherit; letter-spacing: inherit; word-spacing: inherit; } .visually-hidden { position: fixed !important; top: 0; left: 0; width: 1px; height: 1px; margin: 0 !important; padding: 0 !important; overflow: hidden; white-space: nowrap; border: 0; clip-path: inset(50%); } } @layer kol-forced-colors { @media (forced-colors: active) { .kol-button__text { color: ButtonText; background-color: ButtonFace; border: 2px solid ButtonBorder; } .kol-button--disabled .kol-button__text { color: GrayText; border-color: GrayText; } .kol-link__interactive-element[aria-disabled=true], .kol-accordion__heading[aria-disabled=true], .kol-details__heading[aria-disabled=true] { color: GrayText; } .kol-link__interactive-element[aria-disabled=true] .kol-icon, .kol-link__interactive-element[aria-disabled=true] .kol-span__label, .kol-accordion__heading[aria-disabled=true] .kol-icon, .kol-accordion__heading[aria-disabled=true] .kol-span__label, .kol-details__heading[aria-disabled=true] .kol-icon, .kol-details__heading[aria-disabled=true] .kol-span__label { color: GrayText; } input:disabled, select:disabled, textarea:disabled { color: GrayText; border-color: GrayText; } .kol-card, .kol-dialog, .kol-modal { color: CanvasText; background-color: Canvas; border: 1px solid ButtonBorder; } .kol-pagination__button--selected .kol-button { opacity: 1; } .kol-pagination__button--selected .kol-button__text { color: SelectedItemText; background-color: SelectedItem; } .kol-button__interactive-element:focus-visible, .kol-link__interactive-element:focus-visible { outline: 2px solid Highlight; outline-offset: 2px; } } } @layer kol-global { :is(a, button) { background-color: transparent; width: 100%; margin: 0; padding: 0; border: none; } [hidden] { display: none !important; } .badge-text-hint { color: black; background-color: white; } } @layer kol-global { :host { max-width: 100%; font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16)); } * { box-sizing: border-box; } .kol-span { display: flex; flex-flow: column; align-items: center; justify-content: center; } .kol-span__container { display: flex; align-items: center; } a, button { cursor: pointer; } button:disabled { color: unset; } .disabled label, .disabled:focus-within label, [aria-disabled=true], [aria-disabled=true]:focus, [disabled]:where(:not(fieldset)), [disabled]:where(:not(fieldset)):focus { outline: none; cursor: not-allowed; } [aria-disabled=true]:focus .kol-span, [disabled]:focus .kol-span { outline: none !important; } .hastooltip { z-index: 900 !important; } } @layer kol-component { .kol-headline--secondary { margin: 0; } }'}}},[545,"kol-heading",{_label:[1],_level:[2],_secondaryHeadline:[1,"_secondary-headline"]},void 0,{_label:[{watchLabel:0}],_level:[{watchLevel:0}],_secondaryHeadline:[{watchSecondaryHeadline:0}]}]),g=y,_=function(){"undefined"!=typeof customElements&&["kol-heading"].forEach((e=>{"kol-heading"===e&&(customElements.get(t(e))||customElements.define(t(e),y))}))};export{g as KolHeading,_ as defineCustomElement}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
import{proxyCustomElement as o,h as e,Host as n,transformTag as t}from"@stencil/core/internal/client";import{B as c}from"./base-web-component.js";import"./bem-registry.js";import{c as i,b as l}from"./props-from-config.js";import{l as r}from"./label.js";import{I as
|
|
4
|
+
import{proxyCustomElement as o,h as e,Host as n,transformTag as t}from"@stencil/core/internal/client";import{B as c}from"./base-web-component.js";import"./bem-registry.js";import{c as i,b as l}from"./props-from-config.js";import{l as r}from"./label.js";import{I as a}from"./component5.js";const s=i("icons","kolicon-logo",l),f={required:[s,r]},b=o(class extends c{constructor(o){super(!1),!1!==o&&this.__registerHost(),this.__attachShadow(),this.propsConfig=f}watchIcons(o){s.apply(o,(o=>this.setRenderProp("icons",o)))}watchLabel(o){r.apply(o,(o=>this.setRenderProp("label",o)),this.isRequired("label"))}componentWillLoad(){s.apply(this._icons,(o=>this.setRenderProp("icons",o))),r.apply(this._label,(o=>this.setRenderProp("label",o)),this.isRequired("label"))}render(){return e(n,{key:"4700a20d14cf2f5d4ec6cbfa9a64a6f27d2a27cc"},e(a,{key:"389f5fb1c66a2ed56589ae16b021a6f77fef2645",icons:this.getRenderProp("icons"),label:this.getRenderProp("label")}))}static get watchers(){return{_icons:[{watchIcons:0}],_label:[{watchLabel:0}]}}static get style(){return{default:'@font-face{font-family:"kolicons";src:url("kolicons.eot?t=1794493099910");src:url("kolicons.eot?t=1794493099910#iefix") format("embedded-opentype"), url("kolicons.woff2?t=1794493099910") format("woff2"), url("kolicons.woff?t=1794493099910") format("woff"), url("kolicons.ttf?t=1794493099910") format("truetype"), url("kolicons.svg?t=1794493099910#kolicons") format("svg");}@layer kol-component{[class^=kolicon-],[class*=" kolicon-"]{font-family:"kolicons";font-style:normal;font-weight:400;line-height:1em;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.kolicon-alert-error::before{content:"\\ea01"}.kolicon-alert-info::before{content:"\\ea02"}.kolicon-alert-success::before{content:"\\ea03"}.kolicon-alert-warning::before{content:"\\ea04"}.kolicon-check::before{content:"\\ea05"}.kolicon-chevron-double-left::before{content:"\\ea06"}.kolicon-chevron-double-right::before{content:"\\ea07"}.kolicon-chevron-down::before{content:"\\ea08"}.kolicon-chevron-left::before{content:"\\ea09"}.kolicon-chevron-right::before{content:"\\ea0a"}.kolicon-chevron-up::before{content:"\\ea0b"}.kolicon-cogwheel::before{content:"\\ea0c"}.kolicon-cross::before{content:"\\ea0d"}.kolicon-eye-closed::before{content:"\\ea0e"}.kolicon-eye::before{content:"\\ea0f"}.kolicon-house::before{content:"\\ea10"}.kolicon-kolibri::before{content:"\\ea11"}.kolicon-link-external::before{content:"\\ea12"}.kolicon-link::before{content:"\\ea13"}.kolicon-minus::before{content:"\\ea14"}.kolicon-pin-pinned::before{content:"\\ea15"}.kolicon-pin-unpinned::before{content:"\\ea16"}.kolicon-plus::before{content:"\\ea17"}.kolicon-settings::before{content:"\\ea18"}.kolicon-sort-asc::before{content:"\\ea19"}.kolicon-sort-desc::before{content:"\\ea1a"}.kolicon-sort-neutral::before{content:"\\ea1b"}.kolicon-up::before{content:"\\ea1c"}.kolicon-version::before{content:"\\ea1d"}}@layer kol-component{.kol-icon{color:inherit;display:inline-block;font-size:inherit;font-weight:inherit;line-height:inherit}}'}}},[545,"kol-icon",{_icons:[1],_label:[1]},void 0,{_icons:[{watchIcons:0}],_label:[{watchLabel:0}]}]),k=b,h=function(){"undefined"!=typeof customElements&&["kol-icon"].forEach((o=>{"kol-icon"===o&&(customElements.get(t(o))||customElements.define(t(o),b))}))};export{k as KolIcon,h as defineCustomElement}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
import{h as t,proxyCustomElement as o,Host as e,transformTag as i}from"@stencil/core/internal/client";import{B as a}from"./base-web-component.js";import{b as l}from"./bem-registry.js";import{c as r,b as s,a as n,l as c}from"./props-from-config.js";import{s as d}from"./src.js";import{d as h,K as b}from"./events.js";const k=r("alt","",s,(t=>"string"==typeof t)),u=n(),m=r("sizes","",s),p=r("srcset","",s),g={optional:[u,c,m,p],required:[k,d]},_=l.forBlock("kol-image")(),f=o=>{const{alt:e,loading:i,sizes:a,src:l,srcset:r,handleError:s,handleLoad:n}=o;return t("img",{class:_,alt:e,loading:i,sizes:a||void 0,src:l,srcset:r||void 0,onError:t=>s(t),onLoad:t=>n(t)})},y=o(class extends a{constructor(t){super(!1),!1!==t&&this.__registerHost(),this.__attachShadow(),this.propsConfig=g,this._loading=void 0,this._sizes=void 0,this._srcset=void 0,this._on=void 0,this.handleError=t=>{var o,e;null===(e=(o=this.getRenderProp("on")).onError)||void 0===e||e.call(o,t),this.host&&h(this.host,b.error,t)},this.handleLoad=t=>{var o,e;null===(e=(o=this.getRenderProp("on")).onLoad)||void 0===e||e.call(o,t),this.host&&h(this.host,b.load,t)}}watchAlt(t){k.apply(t,(t=>this.setRenderProp("alt",t)))}watchLoading(t){c.apply(t,(t=>this.setRenderProp("loading",t)))}watchSizes(t){m.apply(t,(t=>this.setRenderProp("sizes",t)))}watchSrc(t){d.apply(t,(t=>this.setRenderProp("src",t)))}watchSrcset(t){p.apply(t,(t=>this.setRenderProp("srcset",t)))}watchOn(t){u.apply(t,(t=>this.setRenderProp("on",t)))}componentWillLoad(){k.apply(this._alt,(t=>this.setRenderProp("alt",t))),c.apply(this._loading,(t=>this.setRenderProp("loading",t))),u.apply(this._on,(t=>this.setRenderProp("on",t))),m.apply(this._sizes,(t=>this.setRenderProp("sizes",t))),d.apply(this._src,(t=>this.setRenderProp("src",t))),p.apply(this._srcset,(t=>this.setRenderProp("srcset",t)))}render(){return t(e,{key:"
|
|
4
|
+
import{h as t,proxyCustomElement as o,Host as e,transformTag as i}from"@stencil/core/internal/client";import{B as a}from"./base-web-component.js";import{b as l}from"./bem-registry.js";import{c as r,b as s,a as n,l as c}from"./props-from-config.js";import{s as d}from"./src.js";import{d as h,K as b}from"./events.js";const k=r("alt","",s,(t=>"string"==typeof t)),u=n(),m=r("sizes","",s),p=r("srcset","",s),g={optional:[u,c,m,p],required:[k,d]},_=l.forBlock("kol-image")(),f=o=>{const{alt:e,loading:i,sizes:a,src:l,srcset:r,handleError:s,handleLoad:n}=o;return t("img",{class:_,alt:e,loading:i,sizes:a||void 0,src:l,srcset:r||void 0,onError:t=>s(t),onLoad:t=>n(t)})},y=o(class extends a{constructor(t){super(!1),!1!==t&&this.__registerHost(),this.__attachShadow(),this.propsConfig=g,this._loading=void 0,this._sizes=void 0,this._srcset=void 0,this._on=void 0,this.handleError=t=>{var o,e;null===(e=(o=this.getRenderProp("on")).onError)||void 0===e||e.call(o,t),this.host&&h(this.host,b.error,t)},this.handleLoad=t=>{var o,e;null===(e=(o=this.getRenderProp("on")).onLoad)||void 0===e||e.call(o,t),this.host&&h(this.host,b.load,t)}}watchAlt(t){k.apply(t,(t=>this.setRenderProp("alt",t)))}watchLoading(t){c.apply(t,(t=>this.setRenderProp("loading",t)))}watchSizes(t){m.apply(t,(t=>this.setRenderProp("sizes",t)))}watchSrc(t){d.apply(t,(t=>this.setRenderProp("src",t)))}watchSrcset(t){p.apply(t,(t=>this.setRenderProp("srcset",t)))}watchOn(t){u.apply(t,(t=>this.setRenderProp("on",t)))}componentWillLoad(){k.apply(this._alt,(t=>this.setRenderProp("alt",t))),c.apply(this._loading,(t=>this.setRenderProp("loading",t))),u.apply(this._on,(t=>this.setRenderProp("on",t))),m.apply(this._sizes,(t=>this.setRenderProp("sizes",t))),d.apply(this._src,(t=>this.setRenderProp("src",t))),p.apply(this._srcset,(t=>this.setRenderProp("srcset",t)))}render(){return t(e,{key:"563b5a2b60852c8af364bdccfae0468112252a65"},t(f,{key:"3bd292143916c6a63b37dea1fd60c0b00833ead4",alt:this.getRenderProp("alt"),loading:this.getRenderProp("loading"),sizes:this.getRenderProp("sizes"),src:this.getRenderProp("src"),srcset:this.getRenderProp("srcset"),handleError:this.handleError,handleLoad:this.handleLoad}))}get host(){return this}static get watchers(){return{_alt:[{watchAlt:0}],_loading:[{watchLoading:0}],_sizes:[{watchSizes:0}],_src:[{watchSrc:0}],_srcset:[{watchSrcset:0}],_on:[{watchOn:0}]}}static get style(){return{default:'@charset "UTF-8"; @layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component, kol-forced-colors, kol-theme-forced-colors; @layer kol-a11y { :host { --a11y-min-size: max(calc(44 * 1rem / var(--kolibri-root-font-size, 16)), 44px); --kol-a11y-font-color: black; --kol-a11y-background-color: white; color: var(--kol-a11y-font-color); background-color: var(--kol-a11y-background-color); --kol-a11y-font-family: Verdana; font-family: var(--kol-a11y-font-family); letter-spacing: inherit; word-spacing: inherit; text-align: left; } * { hyphens: auto; word-break: break-word; } button, .kol-input .input { min-width: var(--a11y-min-size); min-height: var(--a11y-min-size); } a, button, h1, h2, h3, h4, h5, h6, input, option, select, textarea { color: inherit; font-family: inherit; font-size: inherit; letter-spacing: inherit; word-spacing: inherit; } .visually-hidden { position: fixed !important; top: 0; left: 0; width: 1px; height: 1px; margin: 0 !important; padding: 0 !important; overflow: hidden; white-space: nowrap; border: 0; clip-path: inset(50%); } } @layer kol-forced-colors { @media (forced-colors: active) { .kol-button__text { color: ButtonText; background-color: ButtonFace; border: 2px solid ButtonBorder; } .kol-button--disabled .kol-button__text { color: GrayText; border-color: GrayText; } .kol-link__interactive-element[aria-disabled=true], .kol-accordion__heading[aria-disabled=true], .kol-details__heading[aria-disabled=true] { color: GrayText; } .kol-link__interactive-element[aria-disabled=true] .kol-icon, .kol-link__interactive-element[aria-disabled=true] .kol-span__label, .kol-accordion__heading[aria-disabled=true] .kol-icon, .kol-accordion__heading[aria-disabled=true] .kol-span__label, .kol-details__heading[aria-disabled=true] .kol-icon, .kol-details__heading[aria-disabled=true] .kol-span__label { color: GrayText; } input:disabled, select:disabled, textarea:disabled { color: GrayText; border-color: GrayText; } .kol-card, .kol-dialog, .kol-modal { color: CanvasText; background-color: Canvas; border: 1px solid ButtonBorder; } .kol-pagination__button--selected .kol-button { opacity: 1; } .kol-pagination__button--selected .kol-button__text { color: SelectedItemText; background-color: SelectedItem; } .kol-button__interactive-element:focus-visible, .kol-link__interactive-element:focus-visible { outline: 2px solid Highlight; outline-offset: 2px; } } } @layer kol-global { :is(a, button) { background-color: transparent; width: 100%; margin: 0; padding: 0; border: none; } [hidden] { display: none !important; } .badge-text-hint { color: black; background-color: white; } } @layer kol-global { :host { max-width: 100%; font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16)); } * { box-sizing: border-box; } .kol-span { display: flex; flex-flow: column; align-items: center; justify-content: center; } .kol-span__container { display: flex; align-items: center; } a, button { cursor: pointer; } button:disabled { color: unset; } .disabled label, .disabled:focus-within label, [aria-disabled=true], [aria-disabled=true]:focus, [disabled]:where(:not(fieldset)), [disabled]:where(:not(fieldset)):focus { outline: none; cursor: not-allowed; } [aria-disabled=true]:focus .kol-span, [disabled]:focus .kol-span { outline: none !important; } .hastooltip { z-index: 900 !important; } } @layer kol-component { .kol-image { display: inline-block; max-width: 100%; max-height: 100%; } }'}}},[545,"kol-image",{_alt:[1],_loading:[1],_sizes:[1],_src:[1],_srcset:[1],_on:[16]},void 0,{_alt:[{watchAlt:0}],_loading:[{watchLoading:0}],_sizes:[{watchSizes:0}],_src:[{watchSrc:0}],_srcset:[{watchSrcset:0}],_on:[{watchOn:0}]}]),w=y,x=function(){"undefined"!=typeof customElements&&["kol-image"].forEach((t=>{"kol-image"===t&&(customElements.get(i(t))||customElements.define(i(t),y))}))};export{w as KolImage,x as defineCustomElement}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
import{h as e,proxyCustomElement as t,Host as o,transformTag as i}from"@stencil/core/internal/client";import{a as l,_ as n}from"./tslib.es6.js";import{v as a}from"./access-and-short-key.js";import{c as r}from"./clsx.js";import{i as c,g as s,f as h,B as d,F as k}from"./base-web-component2.js";import{b}from"./bem-registry.js";import{B as f}from"./component.js";import{I as u}from"./component5.js";import{I as m}from"./input.js";import{F as p}from"./field-control.js";import{a as _,d as g}from"./component3.js";import{c as y,n as w,b as v}from"./props-from-config.js";import{r as x}from"./required.js";import{c as z}from"./dev.utils.js";import{c as j,d as A,a as K}from"./element-interaction.js";import{s as T}from"./controller.js";const q=["button","default","switch"],I=y("value",!0,(e=>e)),L=y("checked",!1,w),B=["checked","indeterminate","unchecked"],V=y("icons",{checked:"kolicon-check",indeterminate:"kolicon-minus",unchecked:"kolicon-cross"},(e=>{if("object"==typeof e&&null!==e&&B.some((t=>(e=>"string"==typeof e&&e.length>0)(e[t]))))return e;throw Error("Expected an object with at least one icon class of checked, indeterminate or unchecked")})),P=y("indeterminate",!1,w),D=["left","right"],S=y("labelAlign","right",(e=>{const t=v(e);if(D.includes(t))return t;throw Error("Invalid label alignment: "+t)})),H=y("variant","default",(e=>{const t=v(e);if(q.includes(t))return t;throw Error("Invalid checkbox variant: "+t)})),M=b.forBlock("kol-checkbox"),O=t=>{var{class:o,variant:i="default",icon:n,inputProps:a}=t,h=l(t,["class","variant","icon","inputProps"]);const{class:d}=a,k=l(a,["class"]);return e(f,Object.assign({component:"label",block:"kol-checkbox",modifiers:Object.assign({"variant-button":"button"===i,"variant-default":"default"===i,"variant-switch":"switch"===i,checked:!!a.checked,indeterminate:!!a.indeterminate,disabled:!!a.disabled,required:!!a.required,touched:!!a.touched},c(a.msg,a.touched)?{[s(a.msg)]:!0}:{}),class:o},h),e(u,{label:"",icons:n,class:M("icon")}),e(m,Object.assign({class:r(M("input"),d)},k,{type:"checkbox"})))},E={required:[...h.required],optional:[...h.optional,_,I,L,V,P,S,x,g,H]},C=t(class extends d{constructor(e){super(!1),!1!==e&&this.__registerHost(),this.__attachShadow(),this.id=z("input-checkbox"),this.infoPopoverOpen=!1,this.inputHasFocus=!1,this.ctaRef=j(),this.propsConfig=E,this._accessKey=void 0,this._checked=!1,this._hideMsg=!1,this._disabled=!1,this._hideLabel=!1,this._hint="",this._icons=void 0,this._infoPopover=void 0,this._indeterminate=void 0,this._labelAlign="right",this._msg=void 0,this._name=void 0,this._on=void 0,this._required=!1,this._ariaDetails=void 0,this._shortKey=void 0,this._syncValueBySelector=void 0,this._tooltipAlign="top",this._touched=!1,this._value=!0,this._variant="default",this.handleCheckboxInput=e=>{this._checked=!this._checked,this._indeterminate=!1,this.handleInput(e,this.getModelValue())},this.handleCheckboxChange=e=>{this.handleChange(e,this.getModelValue())},this.handleCheckboxKeyDown=e=>{this.handleKeyDown(e),T(e,{form:this.host,ref:this.ctaRef.el})},this.handleCheckboxBlur=e=>{this._disabled||this.handleBlur(e)},this.handleLabelMouseDown=e=>{this.inputHasFocus&&e.preventDefault()},this.handleCheckboxMouseDown=e=>{!this.inputHasFocus||e.target instanceof HTMLInputElement||e.preventDefault()},this.initFormAssociation("checkbox",this._name)}watchAccessKey(e){_.apply(e,(e=>this.setRenderProp("accessKey",e))),a(e,this._shortKey)}watchChecked(e){L.apply(e,(e=>this.setRenderProp("checked",e))),this.syncFormAssociatedValue()}watchHideMsg(e){this.applyHideMsg(e)}watchDisabled(e){this.applyDisabled(e)}watchHideLabel(e){this.applyHideLabel(e)}watchHint(e){this.applyHint(e)}watchIcons(e){V.apply(e,(e=>this.setRenderProp("icons",Object.assign(Object.assign({},this.getRenderProp("icons")),e))))}watchInfoPopover(e){this.applyInfoPopover(e)}watchIndeterminate(e){P.apply(e,(e=>this.setRenderProp("indeterminate",e)))}watchLabel(e){this.applyLabel(e)}watchLabelAlign(e){S.apply(e,(e=>this.setRenderProp("labelAlign",e)))}watchMsg(e){this.applyMsg(e)}watchName(e){this.applyName(e)}watchOn(e){this.applyOn(e)}watchRequired(e){x.apply(e,(e=>this.setRenderProp("required",e)))}watchAriaDetails(e){this.applyAriaDetails(e)}watchShortKey(e){g.apply(e,(e=>this.setRenderProp("shortKey",e))),a(this._accessKey,e)}watchSyncValueBySelector(e){this.applySyncValueBySelector(e)}watchTooltipAlign(e){this.applyTooltipAlign(e)}watchTouched(e){this.applyTouched(e)}watchValue(e){null==e?this.setRenderProp("value",e):I.apply(e,(e=>this.setRenderProp("value",e))),this.syncFormAssociatedValue()}watchVariant(e){H.apply(e,(e=>this.setRenderProp("variant",e)))}getValue(){return Promise.resolve(this.getModelValue())}focus(e){return Promise.resolve()}async click(){return Promise.resolve()}componentWillLoad(){this._touched=!0===this._touched,this.watchAriaDetails(this._ariaDetails),this.watchName(this._name),this.watchSyncValueBySelector(this._syncValueBySelector),this.watchTouched(this._touched),this.watchAccessKey(this._accessKey),this.watchMsg(this._msg),this.watchDisabled(this._disabled),this.watchHideMsg(this._hideMsg),this.watchHideLabel(this._hideLabel),this.watchHint(this._hint),this.watchInfoPopover(this._infoPopover),this.watchLabel(this._label),this.watchShortKey(this._shortKey),this.watchOn(this._on),this.watchTooltipAlign(this._tooltipAlign),this.watchRequired(this._required),this.watchChecked(this._checked),this.watchIcons(this._icons),this.watchIndeterminate(this._indeterminate),this.watchValue(this._value),this.watchVariant(this._variant),this.watchLabelAlign(this._labelAlign)}componentDidRender(){this.syncFormField()}disconnectedCallback(){this.destroyFormField()}getModelValue(){return this._checked?this.getRenderProp("value"):null}syncFormAssociatedValue(){this.formAssociation.setFormAssociatedValue(this.getModelValue())}getIcon(){const e=this.getRenderProp("icons");return this.getRenderProp("indeterminate")?e.indeterminate:this.getRenderProp("checked")?e.checked:e.unchecked}getInputProps(){const e=this.getRenderProp("shortKey"),{ariaDescribedBy:t,hasError:o}=this.getAria();return Object.assign(Object.assign({id:this.id,hideLabel:this.getRenderProp("hideLabel"),label:this.getRenderProp("label"),value:this.getRenderProp("value"),accessKey:this.getRenderProp("accessKey")||void 0,disabled:this.getRenderProp("disabled"),name:null==this._name?void 0:this.getRenderProp("name"),ariaDescribedBy:t,required:this.getRenderProp("required"),checked:this.getRenderProp("checked"),indeterminate:this.getRenderProp("indeterminate"),touched:this.getRenderProp("touched"),msg:this.getRenderProp("msg")},e?{"aria-keyshortcuts":e}:{}),{class:r({"visually-hidden":"button"===this.getRenderProp("variant")}),ref:this.ctaRef,onBlur:this.handleCheckboxBlur,onChange:this.handleCheckboxChange,onFocus:this.handleFocus,onInput:this.handleCheckboxInput,onKeyDown:this.handleCheckboxKeyDown,"aria-invalid":o?"true":void 0})}render(){const t=this.getRenderProp("checked"),i=this.getRenderProp("indeterminate"),l=this.getRenderProp("variant"),n=this.getRenderProp("accessKey")||void 0,a=this.getRenderProp("shortKey")||void 0,c=this.getRenderProp("required");return e(o,{key:"c93d21ffe8ac36a28ef76566671a7161ccf7d49c"},e(k,Object.assign({key:"af071b8da7159eb2f229c90d6170f1bfbb6d18ec"},this.getFormFieldProps({class:r("kol-input-checkbox",{"kol-input-checkbox--checked":t,"kol-input-checkbox--indeterminate":i,["kol-input-checkbox--variant-"+l]:!0,["kol-input-checkbox--label-align-"+this.getRenderProp("labelAlign")]:!0}),accessKey:n,shortKey:a,required:c,renderNoLabel:!0,renderNoTooltip:!0})),e(p,Object.assign({key:"496dd8e376ae664f8fc88b78457a678dab717e0b",class:r("kol-input-checkbox__field-control",{"kol-input-checkbox__field-control--checked":t,"kol-input-checkbox__field-control--indeterminate":i,["kol-input-checkbox__field-control--variant-"+l]:!0}),id:this.id,label:this.getRenderProp("label"),hint:this.getRenderProp("hint"),hideLabel:this.getRenderProp("hideLabel"),labelAlign:this.getRenderProp("labelAlign"),infoPopover:this.getInfoPopover(),accessKey:n,shortKey:a,tooltipAlign:this.getRenderProp("tooltipAlign"),disabled:this.getRenderProp("disabled"),msg:this.getRenderProp("msg"),touched:this.getRenderProp("touched"),required:c,renderNoHint:!0,labelProps:{onMouseDown:this.handleLabelMouseDown}},this.getLabelTooltipRefs()),e(O,{key:"8d687db1ef2b5991130f3e4f31dc6a0ccec1cec1",variant:l,icon:this.getIcon(),onMouseDown:this.handleCheckboxMouseDown,inputProps:this.getInputProps()}))))}get host(){return this}static get watchers(){return{_accessKey:[{watchAccessKey:0}],_checked:[{watchChecked:0}],_hideMsg:[{watchHideMsg:0}],_disabled:[{watchDisabled:0}],_hideLabel:[{watchHideLabel:0}],_hint:[{watchHint:0}],_icons:[{watchIcons:0}],_infoPopover:[{watchInfoPopover:0}],_indeterminate:[{watchIndeterminate:0}],_label:[{watchLabel:0}],_labelAlign:[{watchLabelAlign:0}],_msg:[{watchMsg:0}],_name:[{watchName:0}],_on:[{watchOn:0}],_required:[{watchRequired:0}],_ariaDetails:[{watchAriaDetails:0}],_shortKey:[{watchShortKey:0}],_syncValueBySelector:[{watchSyncValueBySelector:0}],_tooltipAlign:[{watchTooltipAlign:0}],_touched:[{watchTouched:0}],_value:[{watchValue:0}],_variant:[{watchVariant:0}]}}static get style(){return{default:'@charset "UTF-8"; @layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component, kol-forced-colors, kol-theme-forced-colors; @layer kol-a11y { :host { --a11y-min-size: max(calc(44 * 1rem / var(--kolibri-root-font-size, 16)), 44px); --kol-a11y-font-color: black; --kol-a11y-background-color: white; color: var(--kol-a11y-font-color); background-color: var(--kol-a11y-background-color); --kol-a11y-font-family: Verdana; font-family: var(--kol-a11y-font-family); letter-spacing: inherit; word-spacing: inherit; text-align: left; } * { hyphens: auto; word-break: break-word; } button, .kol-input .input { min-width: var(--a11y-min-size); min-height: var(--a11y-min-size); } a, button, h1, h2, h3, h4, h5, h6, input, option, select, textarea { color: inherit; font-family: inherit; font-size: inherit; letter-spacing: inherit; word-spacing: inherit; } .visually-hidden { position: fixed !important; top: 0; left: 0; width: 1px; height: 1px; margin: 0 !important; padding: 0 !important; overflow: hidden; white-space: nowrap; border: 0; clip-path: inset(50%); } } @layer kol-forced-colors { @media (forced-colors: active) { .kol-button__text { color: ButtonText; background-color: ButtonFace; border: 2px solid ButtonBorder; } .kol-button--disabled .kol-button__text { color: GrayText; border-color: GrayText; } .kol-link__interactive-element[aria-disabled=true], .kol-accordion__heading[aria-disabled=true], .kol-details__heading[aria-disabled=true] { color: GrayText; } .kol-link__interactive-element[aria-disabled=true] .kol-icon, .kol-link__interactive-element[aria-disabled=true] .kol-span__label, .kol-accordion__heading[aria-disabled=true] .kol-icon, .kol-accordion__heading[aria-disabled=true] .kol-span__label, .kol-details__heading[aria-disabled=true] .kol-icon, .kol-details__heading[aria-disabled=true] .kol-span__label { color: GrayText; } input:disabled, select:disabled, textarea:disabled { color: GrayText; border-color: GrayText; } .kol-card, .kol-dialog, .kol-modal { color: CanvasText; background-color: Canvas; border: 1px solid ButtonBorder; } .kol-pagination__button--selected .kol-button { opacity: 1; } .kol-pagination__button--selected .kol-button__text { color: SelectedItemText; background-color: SelectedItem; } .kol-button__interactive-element:focus-visible, .kol-link__interactive-element:focus-visible { outline: 2px solid Highlight; outline-offset: 2px; } } } @layer kol-global { :is(a, button) { background-color: transparent; width: 100%; margin: 0; padding: 0; border: none; } [hidden] { display: none !important; } .badge-text-hint { color: black; background-color: white; } } @layer kol-global { :host { max-width: 100%; font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16)); } * { box-sizing: border-box; } .kol-span { display: flex; flex-flow: column; align-items: center; justify-content: center; } .kol-span__container { display: flex; align-items: center; } a, button { cursor: pointer; } button:disabled { color: unset; } .disabled label, .disabled:focus-within label, [aria-disabled=true], [aria-disabled=true]:focus, [disabled]:where(:not(fieldset)), [disabled]:where(:not(fieldset)):focus { outline: none; cursor: not-allowed; } [aria-disabled=true]:focus .kol-span, [disabled]:focus .kol-span { outline: none !important; } .hastooltip { z-index: 900 !important; } } @layer kol-component { :host { display: block; } } @font-face { font-family: "kolicons"; src: url("kolicons.eot?t=1794028903670"); src: url("kolicons.eot?t=1794028903670#iefix") format("embedded-opentype"), url("kolicons.woff2?t=1794028903670") format("woff2"), url("kolicons.woff?t=1794028903670") format("woff"), url("kolicons.ttf?t=1794028903670") format("truetype"), url("kolicons.svg?t=1794028903670#kolicons") format("svg"); } @layer kol-component { [class^=kolicon-], [class*=" kolicon-"] { font-family: "kolicons"; font-style: normal; font-weight: 400; line-height: 1em; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } .kolicon-alert-error::before { content: "\\ea01"; } .kolicon-alert-info::before { content: "\\ea02"; } .kolicon-alert-success::before { content: "\\ea03"; } .kolicon-alert-warning::before { content: "\\ea04"; } .kolicon-check::before { content: "\\ea05"; } .kolicon-chevron-double-left::before { content: "\\ea06"; } .kolicon-chevron-double-right::before { content: "\\ea07"; } .kolicon-chevron-down::before { content: "\\ea08"; } .kolicon-chevron-left::before { content: "\\ea09"; } .kolicon-chevron-right::before { content: "\\ea0a"; } .kolicon-chevron-up::before { content: "\\ea0b"; } .kolicon-cogwheel::before { content: "\\ea0c"; } .kolicon-cross::before { content: "\\ea0d"; } .kolicon-eye-closed::before { content: "\\ea0e"; } .kolicon-eye::before { content: "\\ea0f"; } .kolicon-house::before { content: "\\ea10"; } .kolicon-kolibri::before { content: "\\ea11"; } .kolicon-link-external::before { content: "\\ea12"; } .kolicon-link::before { content: "\\ea13"; } .kolicon-minus::before { content: "\\ea14"; } .kolicon-pin-pinned::before { content: "\\ea15"; } .kolicon-pin-unpinned::before { content: "\\ea16"; } .kolicon-plus::before { content: "\\ea17"; } .kolicon-settings::before { content: "\\ea18"; } .kolicon-sort-asc::before { content: "\\ea19"; } .kolicon-sort-desc::before { content: "\\ea1a"; } .kolicon-sort-neutral::before { content: "\\ea1b"; } .kolicon-up::before { content: "\\ea1c"; } .kolicon-version::before { content: "\\ea1d"; } } @layer kol-component { .kol-icon { color: inherit; display: inline-block; font-size: inherit; font-weight: inherit; line-height: inherit; } .kol-tooltip { display: contents; } .kol-tooltip__floating { opacity: 0; display: none; position: fixed; top: 0; left: 0; width: var(--kol-tooltip-width, max-content); min-width: calc(8 * 1rem / var(--kolibri-root-font-size, 16)); max-width: 90vw; max-height: 90vh; animation-direction: normal; animation-duration: var(--kolibri-tooltip-animation-duration, 250ms); animation-fill-mode: forwards; animation-iteration-count: 1; animation-timing-function: ease-in; } .kol-tooltip__floating.hide { animation-name: hideTooltip; } .kol-tooltip__floating.show { animation-name: showTooltip; } .kol-tooltip__arrow { transform: rotate(45deg); color: black; background-color: white; position: absolute; z-index: 999; width: calc(10 * 1rem / var(--kolibri-root-font-size, 16)); height: calc(10 * 1rem / var(--kolibri-root-font-size, 16)); } .kol-tooltip__content { color: black; background-color: white; position: relative; z-index: 1000; } @keyframes hideTooltip { 0% { opacity: 1; } 100% { opacity: 0; display: none; } } @keyframes showTooltip { 0% { opacity: 0; } 100% { opacity: 1; } } } @layer kol-component { .kol-alert .kol-icon { color: inherit; display: inline-block; font-size: inherit; font-weight: inherit; line-height: inherit; } .kol-alert :host { display: inline-block; } .kol-alert .kol-button { display: flex; height: 100%; min-height: var(--a11y-min-size); text-decoration-line: none; } .kol-alert .kol-button__interactive-element { display: flex; flex: 1; text-align: left; text-decoration-line: none; } .kol-alert .kol-button__interactive-element::before { content: ""; } .kol-alert .kol-button__text { flex: 1 0 100%; } .kol-alert .kol-button { } .kol-alert .kol-button__tooltip { height: 0; } .kol-alert .kol-button--external-link > .kolicon-link-external::before { content: none; } .kol-alert .kol-button--external-link .kol-button__interactive-element > .kolicon-link-external::before { content: none; } .kol-alert { display: grid; grid-template-areas: "icon heading close" "icon content close"; grid-template-columns: min-content 1fr min-content; grid-template-rows: min-content min-content; } .kol-alert__icon { grid-area: icon; } .kol-alert__heading { grid-area: heading; } .kol-alert__closer { outline: transparent solid calc(1 * 1rem / var(--kolibri-root-font-size, 16)); grid-area: close; } .kol-alert__content { grid-area: content; } .kol-form-field .kol-popover-button { display: inline; } .kol-form-field .kol-popover-button__popover { margin: 0; padding: 0; border: 0; } .kol-form-field .kol-popover-button--open .kol-button__tooltip { display: none; } .kol-form-field .kol-popover-button--inline { display: inline-block; } .kol-form-field .kol-popover-button--inline .kol-button, .kol-form-field .kol-popover-button--inline .kol-button .kol-button__interactive-element { min-width: 0; min-height: 1em; } .kol-form-field .kol-popover { opacity: 0; transition: 0.2s ease-out opacity; } .kol-form-field .kol-popover-button--open .kol-popover-button__popover { opacity: 1; } .kol-form-field { display: grid; } .kol-form-field:not(.kol-form-field--disabled) .kol-form-field__label { cursor: pointer; } .kol-form-field__label { display: flex; } .kol-form-field__label-text { flex-flow: row; align-items: flex-start; justify-content: flex-start; } .kol-form-field--required .kol-form-field__label-text:has(.kol-span__slot[hidden]) .kol-span__label::after, .kol-form-field--required:not(:has(.kol-form-field__label--legend)) .kol-form-field__input .kol-tooltip__content .kol-span__label::after { content: "*"/""; } .kol-field-control { display: grid; min-height: var(--a11y-min-size); align-items: center; justify-content: left; grid-template-areas: "input label"; grid-template-columns: auto 1fr; grid-template-rows: auto; } .kol-field-control:has(.kol-field-control__hint) { grid-template-areas: "input label" "hint hint"; grid-template-columns: auto 1fr; grid-template-rows: auto auto; } .kol-field-control--label-align-left:not(.kol-field-control--hide-label) { grid-template-areas: "label input"; grid-template-columns: 1fr auto; grid-template-rows: auto; } .kol-field-control--label-align-left:not(.kol-field-control--hide-label):has(.kol-field-control__hint) { grid-template-areas: "label input" "hint hint"; grid-template-columns: 1fr auto; grid-template-rows: auto auto; } .kol-field-control__input { display: flex; min-height: var(--a11y-min-size); align-items: center; grid-area: input; } .kol-field-control__label { display: flex; min-height: var(--a11y-min-size); flex-grow: 1; align-items: center; cursor: pointer; grid-area: label; } .kol-field-control__label--visually-hidden { display: none; height: 0; margin: 0; padding: 0; visibility: hidden; } .kol-field-control__label-text { flex-flow: row; align-items: flex-start; justify-content: flex-start; } .kol-field-control__hint { grid-area: hint; } .kol-field-control--disabled .kol-field-control__label { cursor: not-allowed; } .kol-field-control--required .kol-field-control__label-text:has(.kol-span__slot[hidden])::after, .kol-field-control--required .kol-tooltip__content .kol-span__label::after { content: "*"/""; } .kol-icon { color: inherit; display: inline-block; font-size: inherit; font-weight: inherit; line-height: inherit; } .kol-form-field { display: grid; } .kol-form-field__label-text { display: ruby; } .kol-checkbox { display: flex; position: relative; align-items: center; cursor: pointer; } .kol-checkbox--disabled { cursor: not-allowed; } .kol-checkbox .kol-input { background-color: white; border-style: solid; margin: 0; border-width: 2px; appearance: none; cursor: inherit; } .kol-checkbox .kol-input:before { content: ""; } .kol-checkbox--variant-default { position: relative; min-width: var(--a11y-min-size); min-height: var(--a11y-min-size); justify-content: center; } .kol-checkbox--variant-default .kol-icon { display: none; position: absolute; inset: auto; z-index: 1; pointer-events: none; } .kol-checkbox--variant-default .kol-input { width: calc(22 * 1rem / var(--kolibri-root-font-size, 16)); height: calc(22 * 1rem / var(--kolibri-root-font-size, 16)); } .kol-checkbox--variant-default.kol-checkbox--checked .kol-icon, .kol-checkbox--variant-default.kol-checkbox--indeterminate .kol-icon { display: block; } .kol-checkbox--variant-switch { position: relative; } .kol-checkbox--variant-switch .kol-input { display: inline-block; position: relative; width: 3.2em; min-width: 3.2em; height: 1.7em; } .kol-checkbox--variant-switch .kol-input::before { background-color: black; position: absolute; top: calc(0.25em - 2 * 1rem / var(--kolibri-root-font-size, 16)); left: calc(0.25em - 2 * 1rem / var(--kolibri-root-font-size, 16)); width: 1.2em; height: 1.2em; transition: 0.5s; } .kol-checkbox--variant-switch .kol-input:checked::before { transform: translateX(1.5em); } .kol-checkbox--variant-switch .kol-input:indeterminate::before { transform: translateX(0.75em); } .kol-checkbox--variant-switch .kol-icon { transform: translate(0, -50%); color: black; display: flex; position: absolute; top: 50%; left: calc(4 * 1rem / var(--kolibri-root-font-size, 16)); z-index: 1; width: 1.2em; height: 1.2em; align-items: center; justify-content: center; transition: 0.5s; } .kol-checkbox--variant-switch.kol-checkbox--checked .kol-icon { transform: translate(1.5em, -50%); } .kol-checkbox--variant-switch.kol-checkbox--indeterminate .kol-icon { transform: translate(0.75em, -50%); } .kol-checkbox--variant-button { min-width: var(--a11y-min-size); } .kol-checkbox--variant-button .kol-icon { display: flex; min-width: var(--a11y-min-size); min-height: var(--a11y-min-size); align-items: center; justify-content: center; } }'}}},[545,"kol-input-checkbox",{_accessKey:[1,"_access-key"],_checked:[1540],_hideMsg:[4,"_hide-msg"],_disabled:[4],_hideLabel:[4,"_hide-label"],_hint:[1],_icons:[1],_infoPopover:[16],_indeterminate:[1540],_label:[1],_labelAlign:[1,"_label-align"],_msg:[1],_name:[1],_on:[16],_required:[4],_ariaDetails:[1,"_aria-details"],_shortKey:[1,"_short-key"],_syncValueBySelector:[1,"_sync-value-by-selector"],_tooltipAlign:[1,"_tooltip-align"],_touched:[1540],_value:[8],_variant:[1],id:[32],infoPopoverOpen:[32],inputHasFocus:[32],getValue:[64],focus:[64],click:[64]},void 0,{_accessKey:[{watchAccessKey:0}],_checked:[{watchChecked:0}],_hideMsg:[{watchHideMsg:0}],_disabled:[{watchDisabled:0}],_hideLabel:[{watchHideLabel:0}],_hint:[{watchHint:0}],_icons:[{watchIcons:0}],_infoPopover:[{watchInfoPopover:0}],_indeterminate:[{watchIndeterminate:0}],_label:[{watchLabel:0}],_labelAlign:[{watchLabelAlign:0}],_msg:[{watchMsg:0}],_name:[{watchName:0}],_on:[{watchOn:0}],_required:[{watchRequired:0}],_ariaDetails:[{watchAriaDetails:0}],_shortKey:[{watchShortKey:0}],_syncValueBySelector:[{watchSyncValueBySelector:0}],_tooltipAlign:[{watchTooltipAlign:0}],_touched:[{watchTouched:0}],_value:[{watchValue:0}],_variant:[{watchVariant:0}]}]);n([A("ctaRef")],C.prototype,"focus",null),n([K("ctaRef")],C.prototype,"click",null);const F=C,G=function(){"undefined"!=typeof customElements&&["kol-input-checkbox"].forEach((e=>{"kol-input-checkbox"===e&&(customElements.get(i(e))||customElements.define(i(e),C))}))};export{F as KolInputCheckbox,G as defineCustomElement}
|
|
4
|
+
import{h as e,proxyCustomElement as t,Host as o,transformTag as i}from"@stencil/core/internal/client";import{a as l,_ as n}from"./tslib.es6.js";import{v as a}from"./access-and-short-key.js";import{c as r}from"./clsx.js";import{i as c,g as s,f as h,B as d,F as k}from"./base-web-component2.js";import{b}from"./bem-registry.js";import{B as f}from"./component.js";import{I as u}from"./component5.js";import{I as m}from"./input.js";import{F as p}from"./field-control.js";import{a as _,d as g}from"./component3.js";import{c as y,n as w,b as v}from"./props-from-config.js";import{r as x}from"./required.js";import{c as z}from"./dev.utils.js";import{c as j,d as A,a as K}from"./element-interaction.js";import{s as T}from"./controller.js";const q=["button","default","switch"],I=y("value",!0,(e=>e)),L=y("checked",!1,w),B=["checked","indeterminate","unchecked"],V=y("icons",{checked:"kolicon-check",indeterminate:"kolicon-minus",unchecked:"kolicon-cross"},(e=>{if("object"==typeof e&&null!==e&&B.some((t=>(e=>"string"==typeof e&&e.length>0)(e[t]))))return e;throw Error("Expected an object with at least one icon class of checked, indeterminate or unchecked")})),P=y("indeterminate",!1,w),D=["left","right"],S=y("labelAlign","right",(e=>{const t=v(e);if(D.includes(t))return t;throw Error("Invalid label alignment: "+t)})),H=y("variant","default",(e=>{const t=v(e);if(q.includes(t))return t;throw Error("Invalid checkbox variant: "+t)})),M=b.forBlock("kol-checkbox"),O=t=>{var{class:o,variant:i="default",icon:n,inputProps:a}=t,h=l(t,["class","variant","icon","inputProps"]);const{class:d}=a,k=l(a,["class"]);return e(f,Object.assign({component:"label",block:"kol-checkbox",modifiers:Object.assign({"variant-button":"button"===i,"variant-default":"default"===i,"variant-switch":"switch"===i,checked:!!a.checked,indeterminate:!!a.indeterminate,disabled:!!a.disabled,required:!!a.required,touched:!!a.touched},c(a.msg,a.touched)?{[s(a.msg)]:!0}:{}),class:o},h),e(u,{label:"",icons:n,class:M("icon")}),e(m,Object.assign({class:r(M("input"),d)},k,{type:"checkbox"})))},E={required:[...h.required],optional:[...h.optional,_,I,L,V,P,S,x,g,H]},C=t(class extends d{constructor(e){super(!1),!1!==e&&this.__registerHost(),this.__attachShadow(),this.id=z("input-checkbox"),this.infoPopoverOpen=!1,this.inputHasFocus=!1,this.ctaRef=j(),this.propsConfig=E,this._accessKey=void 0,this._checked=!1,this._hideMsg=!1,this._disabled=!1,this._hideLabel=!1,this._hint="",this._icons=void 0,this._infoPopover=void 0,this._indeterminate=void 0,this._labelAlign="right",this._msg=void 0,this._name=void 0,this._on=void 0,this._required=!1,this._ariaDetails=void 0,this._shortKey=void 0,this._syncValueBySelector=void 0,this._tooltipAlign="top",this._touched=!1,this._value=!0,this._variant="default",this.handleCheckboxInput=e=>{this._checked=!this._checked,this._indeterminate=!1,this.handleInput(e,this.getModelValue())},this.handleCheckboxChange=e=>{this.handleChange(e,this.getModelValue())},this.handleCheckboxKeyDown=e=>{this.handleKeyDown(e),T(e,{form:this.host,ref:this.ctaRef.el})},this.handleCheckboxBlur=e=>{this._disabled||this.handleBlur(e)},this.handleLabelMouseDown=e=>{this.inputHasFocus&&e.preventDefault()},this.handleCheckboxMouseDown=e=>{!this.inputHasFocus||e.target instanceof HTMLInputElement||e.preventDefault()},this.initFormAssociation("checkbox",this._name)}watchAccessKey(e){_.apply(e,(e=>this.setRenderProp("accessKey",e))),a(e,this._shortKey)}watchChecked(e){L.apply(e,(e=>this.setRenderProp("checked",e))),this.syncFormAssociatedValue()}watchHideMsg(e){this.applyHideMsg(e)}watchDisabled(e){this.applyDisabled(e)}watchHideLabel(e){this.applyHideLabel(e)}watchHint(e){this.applyHint(e)}watchIcons(e){V.apply(e,(e=>this.setRenderProp("icons",Object.assign(Object.assign({},this.getRenderProp("icons")),e))))}watchInfoPopover(e){this.applyInfoPopover(e)}watchIndeterminate(e){P.apply(e,(e=>this.setRenderProp("indeterminate",e)))}watchLabel(e){this.applyLabel(e)}watchLabelAlign(e){S.apply(e,(e=>this.setRenderProp("labelAlign",e)))}watchMsg(e){this.applyMsg(e)}watchName(e){this.applyName(e)}watchOn(e){this.applyOn(e)}watchRequired(e){x.apply(e,(e=>this.setRenderProp("required",e)))}watchAriaDetails(e){this.applyAriaDetails(e)}watchShortKey(e){g.apply(e,(e=>this.setRenderProp("shortKey",e))),a(this._accessKey,e)}watchSyncValueBySelector(e){this.applySyncValueBySelector(e)}watchTooltipAlign(e){this.applyTooltipAlign(e)}watchTouched(e){this.applyTouched(e)}watchValue(e){null==e?this.setRenderProp("value",e):I.apply(e,(e=>this.setRenderProp("value",e))),this.syncFormAssociatedValue()}watchVariant(e){H.apply(e,(e=>this.setRenderProp("variant",e)))}getValue(){return Promise.resolve(this.getModelValue())}focus(e){return Promise.resolve()}async click(){return Promise.resolve()}componentWillLoad(){this._touched=!0===this._touched,this.watchAriaDetails(this._ariaDetails),this.watchName(this._name),this.watchSyncValueBySelector(this._syncValueBySelector),this.watchTouched(this._touched),this.watchAccessKey(this._accessKey),this.watchMsg(this._msg),this.watchDisabled(this._disabled),this.watchHideMsg(this._hideMsg),this.watchHideLabel(this._hideLabel),this.watchHint(this._hint),this.watchInfoPopover(this._infoPopover),this.watchLabel(this._label),this.watchShortKey(this._shortKey),this.watchOn(this._on),this.watchTooltipAlign(this._tooltipAlign),this.watchRequired(this._required),this.watchChecked(this._checked),this.watchIcons(this._icons),this.watchIndeterminate(this._indeterminate),this.watchValue(this._value),this.watchVariant(this._variant),this.watchLabelAlign(this._labelAlign)}componentDidRender(){this.syncFormField()}disconnectedCallback(){this.destroyFormField()}getModelValue(){return this._checked?this.getRenderProp("value"):null}syncFormAssociatedValue(){this.formAssociation.setFormAssociatedValue(this.getModelValue())}getIcon(){const e=this.getRenderProp("icons");return this.getRenderProp("indeterminate")?e.indeterminate:this.getRenderProp("checked")?e.checked:e.unchecked}getInputProps(){const e=this.getRenderProp("shortKey"),{ariaDescribedBy:t,hasError:o}=this.getAria();return Object.assign(Object.assign({id:this.id,hideLabel:this.getRenderProp("hideLabel"),label:this.getRenderProp("label"),value:this.getRenderProp("value"),accessKey:this.getRenderProp("accessKey")||void 0,disabled:this.getRenderProp("disabled"),name:null==this._name?void 0:this.getRenderProp("name"),ariaDescribedBy:t,required:this.getRenderProp("required"),checked:this.getRenderProp("checked"),indeterminate:this.getRenderProp("indeterminate"),touched:this.getRenderProp("touched"),msg:this.getRenderProp("msg")},e?{"aria-keyshortcuts":e}:{}),{class:r({"visually-hidden":"button"===this.getRenderProp("variant")}),ref:this.ctaRef,onBlur:this.handleCheckboxBlur,onChange:this.handleCheckboxChange,onFocus:this.handleFocus,onInput:this.handleCheckboxInput,onKeyDown:this.handleCheckboxKeyDown,"aria-invalid":o?"true":void 0})}render(){const t=this.getRenderProp("checked"),i=this.getRenderProp("indeterminate"),l=this.getRenderProp("variant"),n=this.getRenderProp("accessKey")||void 0,a=this.getRenderProp("shortKey")||void 0,c=this.getRenderProp("required");return e(o,{key:"018a5fe5406540b4e779f2b2a7cf12fd9e522fcb"},e(k,Object.assign({key:"dac4b30724f6310b7e252f049dabfd4cf8b36b52"},this.getFormFieldProps({class:r("kol-input-checkbox",{"kol-input-checkbox--checked":t,"kol-input-checkbox--indeterminate":i,["kol-input-checkbox--variant-"+l]:!0,["kol-input-checkbox--label-align-"+this.getRenderProp("labelAlign")]:!0}),accessKey:n,shortKey:a,required:c,renderNoLabel:!0,renderNoTooltip:!0})),e(p,Object.assign({key:"f9a6a0877f82f4c846ac10363a2beb727fd95419",class:r("kol-input-checkbox__field-control",{"kol-input-checkbox__field-control--checked":t,"kol-input-checkbox__field-control--indeterminate":i,["kol-input-checkbox__field-control--variant-"+l]:!0}),id:this.id,label:this.getRenderProp("label"),hint:this.getRenderProp("hint"),hideLabel:this.getRenderProp("hideLabel"),labelAlign:this.getRenderProp("labelAlign"),infoPopover:this.getInfoPopover(),accessKey:n,shortKey:a,tooltipAlign:this.getRenderProp("tooltipAlign"),disabled:this.getRenderProp("disabled"),msg:this.getRenderProp("msg"),touched:this.getRenderProp("touched"),required:c,renderNoHint:!0,labelProps:{onMouseDown:this.handleLabelMouseDown}},this.getLabelTooltipRefs()),e(O,{key:"8f16bf7bc53bfb44981d38d845acdfff9a4fd05d",variant:l,icon:this.getIcon(),onMouseDown:this.handleCheckboxMouseDown,inputProps:this.getInputProps()}))))}get host(){return this}static get watchers(){return{_accessKey:[{watchAccessKey:0}],_checked:[{watchChecked:0}],_hideMsg:[{watchHideMsg:0}],_disabled:[{watchDisabled:0}],_hideLabel:[{watchHideLabel:0}],_hint:[{watchHint:0}],_icons:[{watchIcons:0}],_infoPopover:[{watchInfoPopover:0}],_indeterminate:[{watchIndeterminate:0}],_label:[{watchLabel:0}],_labelAlign:[{watchLabelAlign:0}],_msg:[{watchMsg:0}],_name:[{watchName:0}],_on:[{watchOn:0}],_required:[{watchRequired:0}],_ariaDetails:[{watchAriaDetails:0}],_shortKey:[{watchShortKey:0}],_syncValueBySelector:[{watchSyncValueBySelector:0}],_tooltipAlign:[{watchTooltipAlign:0}],_touched:[{watchTouched:0}],_value:[{watchValue:0}],_variant:[{watchVariant:0}]}}static get style(){return{default:'@charset "UTF-8"; @layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component, kol-forced-colors, kol-theme-forced-colors; @layer kol-a11y { :host { --a11y-min-size: max(calc(44 * 1rem / var(--kolibri-root-font-size, 16)), 44px); --kol-a11y-font-color: black; --kol-a11y-background-color: white; color: var(--kol-a11y-font-color); background-color: var(--kol-a11y-background-color); --kol-a11y-font-family: Verdana; font-family: var(--kol-a11y-font-family); letter-spacing: inherit; word-spacing: inherit; text-align: left; } * { hyphens: auto; word-break: break-word; } button, .kol-input .input { min-width: var(--a11y-min-size); min-height: var(--a11y-min-size); } a, button, h1, h2, h3, h4, h5, h6, input, option, select, textarea { color: inherit; font-family: inherit; font-size: inherit; letter-spacing: inherit; word-spacing: inherit; } .visually-hidden { position: fixed !important; top: 0; left: 0; width: 1px; height: 1px; margin: 0 !important; padding: 0 !important; overflow: hidden; white-space: nowrap; border: 0; clip-path: inset(50%); } } @layer kol-forced-colors { @media (forced-colors: active) { .kol-button__text { color: ButtonText; background-color: ButtonFace; border: 2px solid ButtonBorder; } .kol-button--disabled .kol-button__text { color: GrayText; border-color: GrayText; } .kol-link__interactive-element[aria-disabled=true], .kol-accordion__heading[aria-disabled=true], .kol-details__heading[aria-disabled=true] { color: GrayText; } .kol-link__interactive-element[aria-disabled=true] .kol-icon, .kol-link__interactive-element[aria-disabled=true] .kol-span__label, .kol-accordion__heading[aria-disabled=true] .kol-icon, .kol-accordion__heading[aria-disabled=true] .kol-span__label, .kol-details__heading[aria-disabled=true] .kol-icon, .kol-details__heading[aria-disabled=true] .kol-span__label { color: GrayText; } input:disabled, select:disabled, textarea:disabled { color: GrayText; border-color: GrayText; } .kol-card, .kol-dialog, .kol-modal { color: CanvasText; background-color: Canvas; border: 1px solid ButtonBorder; } .kol-pagination__button--selected .kol-button { opacity: 1; } .kol-pagination__button--selected .kol-button__text { color: SelectedItemText; background-color: SelectedItem; } .kol-button__interactive-element:focus-visible, .kol-link__interactive-element:focus-visible { outline: 2px solid Highlight; outline-offset: 2px; } } } @layer kol-global { :is(a, button) { background-color: transparent; width: 100%; margin: 0; padding: 0; border: none; } [hidden] { display: none !important; } .badge-text-hint { color: black; background-color: white; } } @layer kol-global { :host { max-width: 100%; font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16)); } * { box-sizing: border-box; } .kol-span { display: flex; flex-flow: column; align-items: center; justify-content: center; } .kol-span__container { display: flex; align-items: center; } a, button { cursor: pointer; } button:disabled { color: unset; } .disabled label, .disabled:focus-within label, [aria-disabled=true], [aria-disabled=true]:focus, [disabled]:where(:not(fieldset)), [disabled]:where(:not(fieldset)):focus { outline: none; cursor: not-allowed; } [aria-disabled=true]:focus .kol-span, [disabled]:focus .kol-span { outline: none !important; } .hastooltip { z-index: 900 !important; } } @layer kol-component { :host { display: block; } } @font-face { font-family: "kolicons"; src: url("kolicons.eot?t=1794493099910"); src: url("kolicons.eot?t=1794493099910#iefix") format("embedded-opentype"), url("kolicons.woff2?t=1794493099910") format("woff2"), url("kolicons.woff?t=1794493099910") format("woff"), url("kolicons.ttf?t=1794493099910") format("truetype"), url("kolicons.svg?t=1794493099910#kolicons") format("svg"); } @layer kol-component { [class^=kolicon-], [class*=" kolicon-"] { font-family: "kolicons"; font-style: normal; font-weight: 400; line-height: 1em; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } .kolicon-alert-error::before { content: "\\ea01"; } .kolicon-alert-info::before { content: "\\ea02"; } .kolicon-alert-success::before { content: "\\ea03"; } .kolicon-alert-warning::before { content: "\\ea04"; } .kolicon-check::before { content: "\\ea05"; } .kolicon-chevron-double-left::before { content: "\\ea06"; } .kolicon-chevron-double-right::before { content: "\\ea07"; } .kolicon-chevron-down::before { content: "\\ea08"; } .kolicon-chevron-left::before { content: "\\ea09"; } .kolicon-chevron-right::before { content: "\\ea0a"; } .kolicon-chevron-up::before { content: "\\ea0b"; } .kolicon-cogwheel::before { content: "\\ea0c"; } .kolicon-cross::before { content: "\\ea0d"; } .kolicon-eye-closed::before { content: "\\ea0e"; } .kolicon-eye::before { content: "\\ea0f"; } .kolicon-house::before { content: "\\ea10"; } .kolicon-kolibri::before { content: "\\ea11"; } .kolicon-link-external::before { content: "\\ea12"; } .kolicon-link::before { content: "\\ea13"; } .kolicon-minus::before { content: "\\ea14"; } .kolicon-pin-pinned::before { content: "\\ea15"; } .kolicon-pin-unpinned::before { content: "\\ea16"; } .kolicon-plus::before { content: "\\ea17"; } .kolicon-settings::before { content: "\\ea18"; } .kolicon-sort-asc::before { content: "\\ea19"; } .kolicon-sort-desc::before { content: "\\ea1a"; } .kolicon-sort-neutral::before { content: "\\ea1b"; } .kolicon-up::before { content: "\\ea1c"; } .kolicon-version::before { content: "\\ea1d"; } } @layer kol-component { .kol-icon { color: inherit; display: inline-block; font-size: inherit; font-weight: inherit; line-height: inherit; } .kol-tooltip { display: contents; } .kol-tooltip__floating { opacity: 0; display: none; position: fixed; top: 0; left: 0; width: var(--kol-tooltip-width, max-content); min-width: calc(8 * 1rem / var(--kolibri-root-font-size, 16)); max-width: 90vw; max-height: 90vh; animation-direction: normal; animation-duration: var(--kolibri-tooltip-animation-duration, 250ms); animation-fill-mode: forwards; animation-iteration-count: 1; animation-timing-function: ease-in; } .kol-tooltip__floating.hide { animation-name: hideTooltip; } .kol-tooltip__floating.show { animation-name: showTooltip; } .kol-tooltip__arrow { transform: rotate(45deg); color: black; background-color: white; position: absolute; z-index: 999; width: calc(10 * 1rem / var(--kolibri-root-font-size, 16)); height: calc(10 * 1rem / var(--kolibri-root-font-size, 16)); } .kol-tooltip__content { color: black; background-color: white; position: relative; z-index: 1000; } @keyframes hideTooltip { 0% { opacity: 1; } 100% { opacity: 0; display: none; } } @keyframes showTooltip { 0% { opacity: 0; } 100% { opacity: 1; } } } @layer kol-component { .kol-alert .kol-icon { color: inherit; display: inline-block; font-size: inherit; font-weight: inherit; line-height: inherit; } .kol-alert :host { display: inline-block; } .kol-alert .kol-button { display: flex; height: 100%; min-height: var(--a11y-min-size); text-decoration-line: none; } .kol-alert .kol-button__interactive-element { display: flex; flex: 1; text-align: left; text-decoration-line: none; } .kol-alert .kol-button__interactive-element::before { content: ""; } .kol-alert .kol-button__text { flex: 1 0 100%; } .kol-alert .kol-button { } .kol-alert .kol-button__tooltip { height: 0; } .kol-alert .kol-button--external-link > .kolicon-link-external::before { content: none; } .kol-alert .kol-button--external-link .kol-button__interactive-element > .kolicon-link-external::before { content: none; } .kol-alert { display: grid; grid-template-areas: "icon heading close" "icon content close"; grid-template-columns: min-content 1fr min-content; grid-template-rows: min-content min-content; } .kol-alert__icon { grid-area: icon; } .kol-alert__heading { grid-area: heading; } .kol-alert__closer { outline: transparent solid calc(1 * 1rem / var(--kolibri-root-font-size, 16)); grid-area: close; } .kol-alert__content { grid-area: content; } .kol-form-field .kol-popover-button { display: inline; } .kol-form-field .kol-popover-button__popover { margin: 0; padding: 0; border: 0; } .kol-form-field .kol-popover-button--open .kol-button__tooltip { display: none; } .kol-form-field .kol-popover-button--inline { display: inline-block; } .kol-form-field .kol-popover-button--inline .kol-button, .kol-form-field .kol-popover-button--inline .kol-button .kol-button__interactive-element { min-width: 0; min-height: 1em; } .kol-form-field .kol-popover { opacity: 0; transition: 0.2s ease-out opacity; } .kol-form-field .kol-popover-button--open .kol-popover-button__popover { opacity: 1; } .kol-form-field { display: grid; } .kol-form-field:not(.kol-form-field--disabled) .kol-form-field__label { cursor: pointer; } .kol-form-field__label { display: flex; } .kol-form-field__label-text { flex-flow: row; align-items: flex-start; justify-content: flex-start; } .kol-form-field--required .kol-form-field__label-text:has(.kol-span__slot[hidden]) .kol-span__label::after, .kol-form-field--required:not(:has(.kol-form-field__label--legend)) .kol-form-field__input .kol-tooltip__content .kol-span__label::after { content: "*"/""; } .kol-field-control { display: grid; min-height: var(--a11y-min-size); align-items: center; justify-content: left; grid-template-areas: "input label"; grid-template-columns: auto 1fr; grid-template-rows: auto; } .kol-field-control:has(.kol-field-control__hint) { grid-template-areas: "input label" "hint hint"; grid-template-columns: auto 1fr; grid-template-rows: auto auto; } .kol-field-control--label-align-left:not(.kol-field-control--hide-label) { grid-template-areas: "label input"; grid-template-columns: 1fr auto; grid-template-rows: auto; } .kol-field-control--label-align-left:not(.kol-field-control--hide-label):has(.kol-field-control__hint) { grid-template-areas: "label input" "hint hint"; grid-template-columns: 1fr auto; grid-template-rows: auto auto; } .kol-field-control__input { display: flex; min-height: var(--a11y-min-size); align-items: center; grid-area: input; } .kol-field-control__label { display: flex; min-height: var(--a11y-min-size); flex-grow: 1; align-items: center; cursor: pointer; grid-area: label; } .kol-field-control__label--visually-hidden { display: none; height: 0; margin: 0; padding: 0; visibility: hidden; } .kol-field-control__label-text { flex-flow: row; align-items: flex-start; justify-content: flex-start; } .kol-field-control__hint { grid-area: hint; } .kol-field-control--disabled .kol-field-control__label { cursor: not-allowed; } .kol-field-control--required .kol-field-control__label-text:has(.kol-span__slot[hidden])::after, .kol-field-control--required .kol-tooltip__content .kol-span__label::after { content: "*"/""; } .kol-icon { color: inherit; display: inline-block; font-size: inherit; font-weight: inherit; line-height: inherit; } .kol-form-field { display: grid; } .kol-form-field__label-text { display: ruby; } .kol-checkbox { display: flex; position: relative; align-items: center; cursor: pointer; } .kol-checkbox--disabled { cursor: not-allowed; } .kol-checkbox .kol-input { background-color: white; border-style: solid; margin: 0; border-width: 2px; appearance: none; cursor: inherit; } .kol-checkbox .kol-input:before { content: ""; } .kol-checkbox--variant-default { position: relative; min-width: var(--a11y-min-size); min-height: var(--a11y-min-size); justify-content: center; } .kol-checkbox--variant-default .kol-icon { display: none; position: absolute; inset: auto; z-index: 1; pointer-events: none; } .kol-checkbox--variant-default .kol-input { width: calc(22 * 1rem / var(--kolibri-root-font-size, 16)); height: calc(22 * 1rem / var(--kolibri-root-font-size, 16)); } .kol-checkbox--variant-default.kol-checkbox--checked .kol-icon, .kol-checkbox--variant-default.kol-checkbox--indeterminate .kol-icon { display: block; } .kol-checkbox--variant-switch { position: relative; } .kol-checkbox--variant-switch .kol-input { display: inline-block; position: relative; width: 3.2em; min-width: 3.2em; height: 1.7em; } .kol-checkbox--variant-switch .kol-input::before { background-color: black; position: absolute; top: calc(0.25em - 2 * 1rem / var(--kolibri-root-font-size, 16)); left: calc(0.25em - 2 * 1rem / var(--kolibri-root-font-size, 16)); width: 1.2em; height: 1.2em; transition: 0.5s; } .kol-checkbox--variant-switch .kol-input:checked::before { transform: translateX(1.5em); } .kol-checkbox--variant-switch .kol-input:indeterminate::before { transform: translateX(0.75em); } .kol-checkbox--variant-switch .kol-icon { transform: translate(0, -50%); color: black; display: flex; position: absolute; top: 50%; left: calc(4 * 1rem / var(--kolibri-root-font-size, 16)); z-index: 1; width: 1.2em; height: 1.2em; align-items: center; justify-content: center; transition: 0.5s; } .kol-checkbox--variant-switch.kol-checkbox--checked .kol-icon { transform: translate(1.5em, -50%); } .kol-checkbox--variant-switch.kol-checkbox--indeterminate .kol-icon { transform: translate(0.75em, -50%); } .kol-checkbox--variant-button { min-width: var(--a11y-min-size); } .kol-checkbox--variant-button .kol-icon { display: flex; min-width: var(--a11y-min-size); min-height: var(--a11y-min-size); align-items: center; justify-content: center; } }'}}},[545,"kol-input-checkbox",{_accessKey:[1,"_access-key"],_checked:[1540],_hideMsg:[4,"_hide-msg"],_disabled:[4],_hideLabel:[4,"_hide-label"],_hint:[1],_icons:[1],_infoPopover:[16],_indeterminate:[1540],_label:[1],_labelAlign:[1,"_label-align"],_msg:[1],_name:[1],_on:[16],_required:[4],_ariaDetails:[1,"_aria-details"],_shortKey:[1,"_short-key"],_syncValueBySelector:[1,"_sync-value-by-selector"],_tooltipAlign:[1,"_tooltip-align"],_touched:[1540],_value:[8],_variant:[1],id:[32],infoPopoverOpen:[32],inputHasFocus:[32],getValue:[64],focus:[64],click:[64]},void 0,{_accessKey:[{watchAccessKey:0}],_checked:[{watchChecked:0}],_hideMsg:[{watchHideMsg:0}],_disabled:[{watchDisabled:0}],_hideLabel:[{watchHideLabel:0}],_hint:[{watchHint:0}],_icons:[{watchIcons:0}],_infoPopover:[{watchInfoPopover:0}],_indeterminate:[{watchIndeterminate:0}],_label:[{watchLabel:0}],_labelAlign:[{watchLabelAlign:0}],_msg:[{watchMsg:0}],_name:[{watchName:0}],_on:[{watchOn:0}],_required:[{watchRequired:0}],_ariaDetails:[{watchAriaDetails:0}],_shortKey:[{watchShortKey:0}],_syncValueBySelector:[{watchSyncValueBySelector:0}],_tooltipAlign:[{watchTooltipAlign:0}],_touched:[{watchTouched:0}],_value:[{watchValue:0}],_variant:[{watchVariant:0}]}]);n([A("ctaRef")],C.prototype,"focus",null),n([K("ctaRef")],C.prototype,"click",null);const F=C,G=function(){"undefined"!=typeof customElements&&["kol-input-checkbox"].forEach((e=>{"kol-input-checkbox"===e&&(customElements.get(i(e))||customElements.define(i(e),C))}))};export{F as KolInputCheckbox,G as defineCustomElement}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
import{proxyCustomElement as t,h as o,Host as e,transformTag as i}from"@stencil/core/internal/client";import{_ as n}from"./tslib.es6.js";import{v as a}from"./access-and-short-key.js";import{h as l,g as r,I as s}from"./input-container.js";import{f as c,B as h,F as d}from"./base-web-component2.js";import{I as k}from"./input.js";import{a as u,S as p}from"./suggestions2.js";import"./bem-registry.js";import{a as m,d as f,v as b}from"./component3.js";import"./props-from-config.js";import{s as _}from"./smart-button.js";import{s as g}from"./suggestions.js";import{s as y}from"./value-string.js";import{c as w}from"./dev.utils.js";import{c as v,d as x,a as B}from"./element-interaction.js";const z={required:[...c.required],optional:[...c.optional,m,u,l,f,_,y,g,b]},j=t(class extends h{constructor(t){super(!1),!1!==t&&this.__registerHost(),this.__attachShadow(),this.id=w("input-color"),this.infoPopoverOpen=!1,this.inputHasFocus=!1,this.ctaRef=v(),this.propsConfig=z,this._accessKey=void 0,this._ariaDetails=void 0,this._autoComplete="off",this._disabled=!1,this._hideMsg=!1,this._hideLabel=!1,this._hint="",this._icons=void 0,this._infoPopover=void 0,this._msg=void 0,this._name=void 0,this._on=void 0,this._shortKey=void 0,this._smartButton=void 0,this._suggestions=void 0,this._syncValueBySelector=void 0,this._tooltipAlign="top",this._touched=!1,this._value=void 0,this._variant=void 0,this.handleColorInput=t=>{const o=t.target.value;this.setRenderProp("value",o),this.ctaRef.el&&(this.ctaRef.el.value=o),this.handleInput(t)},this.initFormAssociation("color",this._name)}watchAccessKey(t){m.apply(t,(t=>this.setRenderProp("accessKey",t))),a(t,this._shortKey)}watchAriaDetails(t){this.applyAriaDetails(t)}watchAutoComplete(t){u.apply(t,(t=>this.setRenderProp("autoComplete",t)))}watchDisabled(t){this.applyDisabled(t)}watchHideMsg(t){this.applyHideMsg(t)}watchHideLabel(t){this.applyHideLabel(t)}watchHint(t){this.applyHint(t)}watchIcons(t){l.apply(t,(t=>this.setRenderProp("icons",t)))}watchInfoPopover(t){this.applyInfoPopover(t)}watchLabel(t){this.applyLabel(t)}watchMsg(t){this.applyMsg(t)}watchName(t){this.applyName(t)}watchOn(t){this.applyOn(t)}watchShortKey(t){f.apply(t,(t=>this.setRenderProp("shortKey",t))),a(this._accessKey,t)}watchSmartButton(t){null==t?this.unsetRenderProp("smartButton"):_.apply(t,(t=>this.setRenderProp("smartButton",t)))}watchSuggestions(t){g.apply(t,(t=>this.setRenderProp("suggestions",t)))}watchSyncValueBySelector(t){this.applySyncValueBySelector(t)}watchTooltipAlign(t){this.applyTooltipAlign(t)}watchTouched(t){this.applyTouched(t)}watchValue(t){y.apply(t,(t=>this.setRenderProp("value",t))),this.formAssociation.setFormAssociatedValue(this.getRenderProp("value"))}watchVariant(t){b.apply(t,(t=>this.setRenderProp("variant",t)))}getValue(){var t;return Promise.resolve(null===(t=this.ctaRef.el)||void 0===t?void 0:t.value)}focus(t){return Promise.resolve()}async click(){return Promise.resolve()}componentWillLoad(){this.unsetRenderProp("smartButton"),this._touched=!0===this._touched,this.watchAriaDetails(this._ariaDetails),this.watchName(this._name),this.watchSyncValueBySelector(this._syncValueBySelector),this.watchTouched(this._touched),this.watchAccessKey(this._accessKey),this.watchMsg(this._msg),this.watchDisabled(this._disabled),this.watchHideMsg(this._hideMsg),this.watchHideLabel(this._hideLabel),this.watchHint(this._hint),this.watchInfoPopover(this._infoPopover),this.watchLabel(this._label),this.watchShortKey(this._shortKey),this.watchSmartButton(this._smartButton),this.watchOn(this._on),this.watchTooltipAlign(this._tooltipAlign),this.watchVariant(this._variant),this.watchIcons(this._icons),this.watchAutoComplete(this._autoComplete),this.watchSuggestions(this._suggestions),this.watchValue(this._value)}componentDidRender(){this.syncFormField()}disconnectedCallback(){this.destroyFormField()}getInputProps(){const t=this.id,e=this.getRenderProp("name"),i=this.getRenderProp("accessKey"),n=this.getRenderProp("shortKey"),a=this.getRenderProp("suggestions"),{ariaDescribedBy:l,hasError:r}=this.getAria();return Object.assign(Object.assign(Object.assign(Object.assign({id:t,hideLabel:this.getRenderProp("hideLabel"),label:this.getRenderProp("label"),disabled:this.getRenderProp("disabled"),name:e?e+"-color":void 0},i?{accessKey:i}:{}),{value:this.getRenderProp("value"),autoComplete:this.getRenderProp("autoComplete"),touched:this.getRenderProp("touched"),msg:this.getRenderProp("msg")}),n?{"aria-keyshortcuts":n}:{}),{suggestions:a.length>0?o(p,{id:t,suggestions:a}):void 0,class:"kol-input-color__input kol-input-color__input--color",onBlur:this.handleBlur,onChange:this.handleChange,onClick:this.handleClick,onFocus:this.handleFocus,onInput:this.handleColorInput,onKeyDown:this.handleKeyDown,ref:this.ctaRef,type:"color",ariaDescribedBy:l,"aria-invalid":r?"true":void 0})}render(){const t=this.getRenderProp("disabled"),{startAdornment:i,endAdornment:n}=r({icons:this.getRenderProp("icons"),smartButton:this.getSmartButtonFcProps(this.getRenderProp("smartButton"),t)});return o(e,{key:"4fa70c36d961b96d171cea0966d93f3de2145938"},o(d,Object.assign({key:"a620829443e84a4a0af7ad52cd04f5b95c2a7f1e"},this.getFormFieldProps({class:"kol-input-color",accessKey:this.getRenderProp("accessKey")||void 0,shortKey:this.getRenderProp("shortKey")||void 0,variant:this.getRenderProp("variant")})),o(s,{key:"bd71482c60ff9e90a963caa90f554fc235e8c0ea",disabled:t,msg:this.getRenderProp("msg"),touched:this.getRenderProp("touched"),startAdornment:i,endAdornment:n},o(k,Object.assign({key:"ec01723f99ba5b561437ef7ed0f6cc37745b2795"},this.getInputProps())))))}get host(){return this}static get watchers(){return{_accessKey:[{watchAccessKey:0}],_ariaDetails:[{watchAriaDetails:0}],_autoComplete:[{watchAutoComplete:0}],_disabled:[{watchDisabled:0}],_hideMsg:[{watchHideMsg:0}],_hideLabel:[{watchHideLabel:0}],_hint:[{watchHint:0}],_icons:[{watchIcons:0}],_infoPopover:[{watchInfoPopover:0}],_label:[{watchLabel:0}],_msg:[{watchMsg:0}],_name:[{watchName:0}],_on:[{watchOn:0}],_shortKey:[{watchShortKey:0}],_smartButton:[{watchSmartButton:0}],_suggestions:[{watchSuggestions:0}],_syncValueBySelector:[{watchSyncValueBySelector:0}],_tooltipAlign:[{watchTooltipAlign:0}],_touched:[{watchTouched:0}],_value:[{watchValue:0}],_variant:[{watchVariant:0}]}}static get style(){return{default:'@charset "UTF-8"; @layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component, kol-forced-colors, kol-theme-forced-colors; @layer kol-a11y { :host { --a11y-min-size: max(calc(44 * 1rem / var(--kolibri-root-font-size, 16)), 44px); --kol-a11y-font-color: black; --kol-a11y-background-color: white; color: var(--kol-a11y-font-color); background-color: var(--kol-a11y-background-color); --kol-a11y-font-family: Verdana; font-family: var(--kol-a11y-font-family); letter-spacing: inherit; word-spacing: inherit; text-align: left; } * { hyphens: auto; word-break: break-word; } button, .kol-input .input { min-width: var(--a11y-min-size); min-height: var(--a11y-min-size); } a, button, h1, h2, h3, h4, h5, h6, input, option, select, textarea { color: inherit; font-family: inherit; font-size: inherit; letter-spacing: inherit; word-spacing: inherit; } .visually-hidden { position: fixed !important; top: 0; left: 0; width: 1px; height: 1px; margin: 0 !important; padding: 0 !important; overflow: hidden; white-space: nowrap; border: 0; clip-path: inset(50%); } } @layer kol-forced-colors { @media (forced-colors: active) { .kol-button__text { color: ButtonText; background-color: ButtonFace; border: 2px solid ButtonBorder; } .kol-button--disabled .kol-button__text { color: GrayText; border-color: GrayText; } .kol-link__interactive-element[aria-disabled=true], .kol-accordion__heading[aria-disabled=true], .kol-details__heading[aria-disabled=true] { color: GrayText; } .kol-link__interactive-element[aria-disabled=true] .kol-icon, .kol-link__interactive-element[aria-disabled=true] .kol-span__label, .kol-accordion__heading[aria-disabled=true] .kol-icon, .kol-accordion__heading[aria-disabled=true] .kol-span__label, .kol-details__heading[aria-disabled=true] .kol-icon, .kol-details__heading[aria-disabled=true] .kol-span__label { color: GrayText; } input:disabled, select:disabled, textarea:disabled { color: GrayText; border-color: GrayText; } .kol-card, .kol-dialog, .kol-modal { color: CanvasText; background-color: Canvas; border: 1px solid ButtonBorder; } .kol-pagination__button--selected .kol-button { opacity: 1; } .kol-pagination__button--selected .kol-button__text { color: SelectedItemText; background-color: SelectedItem; } .kol-button__interactive-element:focus-visible, .kol-link__interactive-element:focus-visible { outline: 2px solid Highlight; outline-offset: 2px; } } } @layer kol-global { :is(a, button) { background-color: transparent; width: 100%; margin: 0; padding: 0; border: none; } [hidden] { display: none !important; } .badge-text-hint { color: black; background-color: white; } } @layer kol-global { :host { max-width: 100%; font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16)); } * { box-sizing: border-box; } .kol-span { display: flex; flex-flow: column; align-items: center; justify-content: center; } .kol-span__container { display: flex; align-items: center; } a, button { cursor: pointer; } button:disabled { color: unset; } .disabled label, .disabled:focus-within label, [aria-disabled=true], [aria-disabled=true]:focus, [disabled]:where(:not(fieldset)), [disabled]:where(:not(fieldset)):focus { outline: none; cursor: not-allowed; } [aria-disabled=true]:focus .kol-span, [disabled]:focus .kol-span { outline: none !important; } .hastooltip { z-index: 900 !important; } } @layer kol-component { :host { display: block; } } @font-face { font-family: "kolicons"; src: url("kolicons.eot?t=1794028903670"); src: url("kolicons.eot?t=1794028903670#iefix") format("embedded-opentype"), url("kolicons.woff2?t=1794028903670") format("woff2"), url("kolicons.woff?t=1794028903670") format("woff"), url("kolicons.ttf?t=1794028903670") format("truetype"), url("kolicons.svg?t=1794028903670#kolicons") format("svg"); } @layer kol-component { [class^=kolicon-], [class*=" kolicon-"] { font-family: "kolicons"; font-style: normal; font-weight: 400; line-height: 1em; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } .kolicon-alert-error::before { content: "\\ea01"; } .kolicon-alert-info::before { content: "\\ea02"; } .kolicon-alert-success::before { content: "\\ea03"; } .kolicon-alert-warning::before { content: "\\ea04"; } .kolicon-check::before { content: "\\ea05"; } .kolicon-chevron-double-left::before { content: "\\ea06"; } .kolicon-chevron-double-right::before { content: "\\ea07"; } .kolicon-chevron-down::before { content: "\\ea08"; } .kolicon-chevron-left::before { content: "\\ea09"; } .kolicon-chevron-right::before { content: "\\ea0a"; } .kolicon-chevron-up::before { content: "\\ea0b"; } .kolicon-cogwheel::before { content: "\\ea0c"; } .kolicon-cross::before { content: "\\ea0d"; } .kolicon-eye-closed::before { content: "\\ea0e"; } .kolicon-eye::before { content: "\\ea0f"; } .kolicon-house::before { content: "\\ea10"; } .kolicon-kolibri::before { content: "\\ea11"; } .kolicon-link-external::before { content: "\\ea12"; } .kolicon-link::before { content: "\\ea13"; } .kolicon-minus::before { content: "\\ea14"; } .kolicon-pin-pinned::before { content: "\\ea15"; } .kolicon-pin-unpinned::before { content: "\\ea16"; } .kolicon-plus::before { content: "\\ea17"; } .kolicon-settings::before { content: "\\ea18"; } .kolicon-sort-asc::before { content: "\\ea19"; } .kolicon-sort-desc::before { content: "\\ea1a"; } .kolicon-sort-neutral::before { content: "\\ea1b"; } .kolicon-up::before { content: "\\ea1c"; } .kolicon-version::before { content: "\\ea1d"; } } @layer kol-component { .kol-icon { color: inherit; display: inline-block; font-size: inherit; font-weight: inherit; line-height: inherit; } .kol-tooltip { display: contents; } .kol-tooltip__floating { opacity: 0; display: none; position: fixed; top: 0; left: 0; width: var(--kol-tooltip-width, max-content); min-width: calc(8 * 1rem / var(--kolibri-root-font-size, 16)); max-width: 90vw; max-height: 90vh; animation-direction: normal; animation-duration: var(--kolibri-tooltip-animation-duration, 250ms); animation-fill-mode: forwards; animation-iteration-count: 1; animation-timing-function: ease-in; } .kol-tooltip__floating.hide { animation-name: hideTooltip; } .kol-tooltip__floating.show { animation-name: showTooltip; } .kol-tooltip__arrow { transform: rotate(45deg); color: black; background-color: white; position: absolute; z-index: 999; width: calc(10 * 1rem / var(--kolibri-root-font-size, 16)); height: calc(10 * 1rem / var(--kolibri-root-font-size, 16)); } .kol-tooltip__content { color: black; background-color: white; position: relative; z-index: 1000; } @keyframes hideTooltip { 0% { opacity: 1; } 100% { opacity: 0; display: none; } } @keyframes showTooltip { 0% { opacity: 0; } 100% { opacity: 1; } } } @layer kol-component { .kol-button { background-color: transparent; display: inline-block; width: 100%; min-width: var(--a11y-min-size); min-height: var(--a11y-min-size); margin: 0; padding: 0; text-align: center; } .kol-button__interactive-element { border-style: none; display: block; border-width: medium; font-weight: inherit; font-style: inherit; text-align: inherit; } .kol-button { } .kol-button__tooltip { height: 0; } .kol-alert .kol-icon { color: inherit; display: inline-block; font-size: inherit; font-weight: inherit; line-height: inherit; } .kol-alert :host { display: inline-block; } .kol-alert .kol-button { display: flex; height: 100%; min-height: var(--a11y-min-size); text-decoration-line: none; } .kol-alert .kol-button__interactive-element { display: flex; flex: 1; text-align: left; text-decoration-line: none; } .kol-alert .kol-button__interactive-element::before { content: ""; } .kol-alert .kol-button__text { flex: 1 0 100%; } .kol-alert .kol-button { } .kol-alert .kol-button__tooltip { height: 0; } .kol-alert .kol-button--external-link > .kolicon-link-external::before { content: none; } .kol-alert .kol-button--external-link .kol-button__interactive-element > .kolicon-link-external::before { content: none; } .kol-alert { display: grid; grid-template-areas: "icon heading close" "icon content close"; grid-template-columns: min-content 1fr min-content; grid-template-rows: min-content min-content; } .kol-alert__icon { grid-area: icon; } .kol-alert__heading { grid-area: heading; } .kol-alert__closer { outline: transparent solid calc(1 * 1rem / var(--kolibri-root-font-size, 16)); grid-area: close; } .kol-alert__content { grid-area: content; } .kol-form-field .kol-popover-button { display: inline; } .kol-form-field .kol-popover-button__popover { margin: 0; padding: 0; border: 0; } .kol-form-field .kol-popover-button--open .kol-button__tooltip { display: none; } .kol-form-field .kol-popover-button--inline { display: inline-block; } .kol-form-field .kol-popover-button--inline .kol-button, .kol-form-field .kol-popover-button--inline .kol-button .kol-button__interactive-element { min-width: 0; min-height: 1em; } .kol-form-field .kol-popover { opacity: 0; transition: 0.2s ease-out opacity; } .kol-form-field .kol-popover-button--open .kol-popover-button__popover { opacity: 1; } .kol-form-field { display: grid; } .kol-form-field:not(.kol-form-field--disabled) .kol-form-field__label { cursor: pointer; } .kol-form-field__label { display: flex; } .kol-form-field__label-text { flex-flow: row; align-items: flex-start; justify-content: flex-start; } .kol-form-field--required .kol-form-field__label-text:has(.kol-span__slot[hidden]) .kol-span__label::after, .kol-form-field--required:not(:has(.kol-form-field__label--legend)) .kol-form-field__input .kol-tooltip__content .kol-span__label::after { content: "*"/""; } .kol-input-container { background-color: transparent; display: grid; position: relative; width: 100%; min-width: var(--a11y-min-size); min-height: var(--a11y-min-size); align-items: center; grid-template-columns: 1fr; } .kol-input-container:has(> .kol-input-container__adornment--start) { grid-template-columns: auto 1fr auto; } .kol-input-container__container { position: relative; z-index: 1; } .kol-input-container__adornment { display: flex; align-items: center; } .kol-input-container__adornment .kol-icon { display: grid; place-items: center; } .kol-input { background-color: transparent; width: 100%; min-width: var(--a11y-min-size); } .kol-input { cursor: pointer; } .kol-input:disabled { cursor: not-allowed; } }'}}},[545,"kol-input-color",{_accessKey:[1,"_access-key"],_ariaDetails:[1,"_aria-details"],_autoComplete:[1,"_auto-complete"],_disabled:[4],_hideMsg:[4,"_hide-msg"],_hideLabel:[4,"_hide-label"],_hint:[1],_icons:[1],_infoPopover:[16],_label:[1],_msg:[1],_name:[1],_on:[16],_shortKey:[1,"_short-key"],_smartButton:[1,"_smart-button"],_suggestions:[1],_syncValueBySelector:[1,"_sync-value-by-selector"],_tooltipAlign:[1,"_tooltip-align"],_touched:[1540],_value:[1],_variant:[1],id:[32],infoPopoverOpen:[32],inputHasFocus:[32],getValue:[64],focus:[64],click:[64]},void 0,{_accessKey:[{watchAccessKey:0}],_ariaDetails:[{watchAriaDetails:0}],_autoComplete:[{watchAutoComplete:0}],_disabled:[{watchDisabled:0}],_hideMsg:[{watchHideMsg:0}],_hideLabel:[{watchHideLabel:0}],_hint:[{watchHint:0}],_icons:[{watchIcons:0}],_infoPopover:[{watchInfoPopover:0}],_label:[{watchLabel:0}],_msg:[{watchMsg:0}],_name:[{watchName:0}],_on:[{watchOn:0}],_shortKey:[{watchShortKey:0}],_smartButton:[{watchSmartButton:0}],_suggestions:[{watchSuggestions:0}],_syncValueBySelector:[{watchSyncValueBySelector:0}],_tooltipAlign:[{watchTooltipAlign:0}],_touched:[{watchTouched:0}],_value:[{watchValue:0}],_variant:[{watchVariant:0}]}]);n([x("ctaRef")],j.prototype,"focus",null),n([B("ctaRef")],j.prototype,"click",null);const K=j,S=function(){"undefined"!=typeof customElements&&["kol-input-color"].forEach((t=>{"kol-input-color"===t&&(customElements.get(i(t))||customElements.define(i(t),j))}))};export{K as KolInputColor,S as defineCustomElement}
|
|
4
|
+
import{proxyCustomElement as t,h as o,Host as e,transformTag as i}from"@stencil/core/internal/client";import{_ as n}from"./tslib.es6.js";import{v as a}from"./access-and-short-key.js";import{h as l,g as r,I as s}from"./input-container.js";import{f as c,B as h,F as d}from"./base-web-component2.js";import{I as k}from"./input.js";import{a as u,S as p}from"./suggestions2.js";import"./bem-registry.js";import{a as m,d as f,v as b}from"./component3.js";import"./props-from-config.js";import{s as _}from"./smart-button.js";import{s as g}from"./suggestions.js";import{s as y}from"./value-string.js";import{c as w}from"./dev.utils.js";import{c as v,d as x,a as B}from"./element-interaction.js";const z={required:[...c.required],optional:[...c.optional,m,u,l,f,_,y,g,b]},j=t(class extends h{constructor(t){super(!1),!1!==t&&this.__registerHost(),this.__attachShadow(),this.id=w("input-color"),this.infoPopoverOpen=!1,this.inputHasFocus=!1,this.ctaRef=v(),this.propsConfig=z,this._accessKey=void 0,this._ariaDetails=void 0,this._autoComplete="off",this._disabled=!1,this._hideMsg=!1,this._hideLabel=!1,this._hint="",this._icons=void 0,this._infoPopover=void 0,this._msg=void 0,this._name=void 0,this._on=void 0,this._shortKey=void 0,this._smartButton=void 0,this._suggestions=void 0,this._syncValueBySelector=void 0,this._tooltipAlign="top",this._touched=!1,this._value=void 0,this._variant=void 0,this.handleColorInput=t=>{const o=t.target.value;this.setRenderProp("value",o),this.ctaRef.el&&(this.ctaRef.el.value=o),this.handleInput(t)},this.initFormAssociation("color",this._name)}watchAccessKey(t){m.apply(t,(t=>this.setRenderProp("accessKey",t))),a(t,this._shortKey)}watchAriaDetails(t){this.applyAriaDetails(t)}watchAutoComplete(t){u.apply(t,(t=>this.setRenderProp("autoComplete",t)))}watchDisabled(t){this.applyDisabled(t)}watchHideMsg(t){this.applyHideMsg(t)}watchHideLabel(t){this.applyHideLabel(t)}watchHint(t){this.applyHint(t)}watchIcons(t){l.apply(t,(t=>this.setRenderProp("icons",t)))}watchInfoPopover(t){this.applyInfoPopover(t)}watchLabel(t){this.applyLabel(t)}watchMsg(t){this.applyMsg(t)}watchName(t){this.applyName(t)}watchOn(t){this.applyOn(t)}watchShortKey(t){f.apply(t,(t=>this.setRenderProp("shortKey",t))),a(this._accessKey,t)}watchSmartButton(t){null==t?this.unsetRenderProp("smartButton"):_.apply(t,(t=>this.setRenderProp("smartButton",t)))}watchSuggestions(t){g.apply(t,(t=>this.setRenderProp("suggestions",t)))}watchSyncValueBySelector(t){this.applySyncValueBySelector(t)}watchTooltipAlign(t){this.applyTooltipAlign(t)}watchTouched(t){this.applyTouched(t)}watchValue(t){y.apply(t,(t=>this.setRenderProp("value",t))),this.formAssociation.setFormAssociatedValue(this.getRenderProp("value"))}watchVariant(t){b.apply(t,(t=>this.setRenderProp("variant",t)))}getValue(){var t;return Promise.resolve(null===(t=this.ctaRef.el)||void 0===t?void 0:t.value)}focus(t){return Promise.resolve()}async click(){return Promise.resolve()}componentWillLoad(){this.unsetRenderProp("smartButton"),this._touched=!0===this._touched,this.watchAriaDetails(this._ariaDetails),this.watchName(this._name),this.watchSyncValueBySelector(this._syncValueBySelector),this.watchTouched(this._touched),this.watchAccessKey(this._accessKey),this.watchMsg(this._msg),this.watchDisabled(this._disabled),this.watchHideMsg(this._hideMsg),this.watchHideLabel(this._hideLabel),this.watchHint(this._hint),this.watchInfoPopover(this._infoPopover),this.watchLabel(this._label),this.watchShortKey(this._shortKey),this.watchSmartButton(this._smartButton),this.watchOn(this._on),this.watchTooltipAlign(this._tooltipAlign),this.watchVariant(this._variant),this.watchIcons(this._icons),this.watchAutoComplete(this._autoComplete),this.watchSuggestions(this._suggestions),this.watchValue(this._value)}componentDidRender(){this.syncFormField()}disconnectedCallback(){this.destroyFormField()}getInputProps(){const t=this.id,e=this.getRenderProp("name"),i=this.getRenderProp("accessKey"),n=this.getRenderProp("shortKey"),a=this.getRenderProp("suggestions"),{ariaDescribedBy:l,hasError:r}=this.getAria();return Object.assign(Object.assign(Object.assign(Object.assign({id:t,hideLabel:this.getRenderProp("hideLabel"),label:this.getRenderProp("label"),disabled:this.getRenderProp("disabled"),name:e?e+"-color":void 0},i?{accessKey:i}:{}),{value:this.getRenderProp("value"),autoComplete:this.getRenderProp("autoComplete"),touched:this.getRenderProp("touched"),msg:this.getRenderProp("msg")}),n?{"aria-keyshortcuts":n}:{}),{suggestions:a.length>0?o(p,{id:t,suggestions:a}):void 0,class:"kol-input-color__input kol-input-color__input--color",onBlur:this.handleBlur,onChange:this.handleChange,onClick:this.handleClick,onFocus:this.handleFocus,onInput:this.handleColorInput,onKeyDown:this.handleKeyDown,ref:this.ctaRef,type:"color",ariaDescribedBy:l,"aria-invalid":r?"true":void 0})}render(){const t=this.getRenderProp("disabled"),{startAdornment:i,endAdornment:n}=r({icons:this.getRenderProp("icons"),smartButton:this.getSmartButtonFcProps(this.getRenderProp("smartButton"),t)});return o(e,{key:"1de493d1d4d0ab6f698561946edaee37594ea5f0"},o(d,Object.assign({key:"425c4128ccb67ea0f60fa31fe0d544ea30256867"},this.getFormFieldProps({class:"kol-input-color",accessKey:this.getRenderProp("accessKey")||void 0,shortKey:this.getRenderProp("shortKey")||void 0,variant:this.getRenderProp("variant")})),o(s,{key:"4b1a16ec9a47de19ae04d2603dd8ccf6b34634d7",disabled:t,msg:this.getRenderProp("msg"),touched:this.getRenderProp("touched"),startAdornment:i,endAdornment:n},o(k,Object.assign({key:"1c0ebfcbf1506156c3d34042f8e5ed60c95dc997"},this.getInputProps())))))}get host(){return this}static get watchers(){return{_accessKey:[{watchAccessKey:0}],_ariaDetails:[{watchAriaDetails:0}],_autoComplete:[{watchAutoComplete:0}],_disabled:[{watchDisabled:0}],_hideMsg:[{watchHideMsg:0}],_hideLabel:[{watchHideLabel:0}],_hint:[{watchHint:0}],_icons:[{watchIcons:0}],_infoPopover:[{watchInfoPopover:0}],_label:[{watchLabel:0}],_msg:[{watchMsg:0}],_name:[{watchName:0}],_on:[{watchOn:0}],_shortKey:[{watchShortKey:0}],_smartButton:[{watchSmartButton:0}],_suggestions:[{watchSuggestions:0}],_syncValueBySelector:[{watchSyncValueBySelector:0}],_tooltipAlign:[{watchTooltipAlign:0}],_touched:[{watchTouched:0}],_value:[{watchValue:0}],_variant:[{watchVariant:0}]}}static get style(){return{default:'@charset "UTF-8"; @layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component, kol-forced-colors, kol-theme-forced-colors; @layer kol-a11y { :host { --a11y-min-size: max(calc(44 * 1rem / var(--kolibri-root-font-size, 16)), 44px); --kol-a11y-font-color: black; --kol-a11y-background-color: white; color: var(--kol-a11y-font-color); background-color: var(--kol-a11y-background-color); --kol-a11y-font-family: Verdana; font-family: var(--kol-a11y-font-family); letter-spacing: inherit; word-spacing: inherit; text-align: left; } * { hyphens: auto; word-break: break-word; } button, .kol-input .input { min-width: var(--a11y-min-size); min-height: var(--a11y-min-size); } a, button, h1, h2, h3, h4, h5, h6, input, option, select, textarea { color: inherit; font-family: inherit; font-size: inherit; letter-spacing: inherit; word-spacing: inherit; } .visually-hidden { position: fixed !important; top: 0; left: 0; width: 1px; height: 1px; margin: 0 !important; padding: 0 !important; overflow: hidden; white-space: nowrap; border: 0; clip-path: inset(50%); } } @layer kol-forced-colors { @media (forced-colors: active) { .kol-button__text { color: ButtonText; background-color: ButtonFace; border: 2px solid ButtonBorder; } .kol-button--disabled .kol-button__text { color: GrayText; border-color: GrayText; } .kol-link__interactive-element[aria-disabled=true], .kol-accordion__heading[aria-disabled=true], .kol-details__heading[aria-disabled=true] { color: GrayText; } .kol-link__interactive-element[aria-disabled=true] .kol-icon, .kol-link__interactive-element[aria-disabled=true] .kol-span__label, .kol-accordion__heading[aria-disabled=true] .kol-icon, .kol-accordion__heading[aria-disabled=true] .kol-span__label, .kol-details__heading[aria-disabled=true] .kol-icon, .kol-details__heading[aria-disabled=true] .kol-span__label { color: GrayText; } input:disabled, select:disabled, textarea:disabled { color: GrayText; border-color: GrayText; } .kol-card, .kol-dialog, .kol-modal { color: CanvasText; background-color: Canvas; border: 1px solid ButtonBorder; } .kol-pagination__button--selected .kol-button { opacity: 1; } .kol-pagination__button--selected .kol-button__text { color: SelectedItemText; background-color: SelectedItem; } .kol-button__interactive-element:focus-visible, .kol-link__interactive-element:focus-visible { outline: 2px solid Highlight; outline-offset: 2px; } } } @layer kol-global { :is(a, button) { background-color: transparent; width: 100%; margin: 0; padding: 0; border: none; } [hidden] { display: none !important; } .badge-text-hint { color: black; background-color: white; } } @layer kol-global { :host { max-width: 100%; font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16)); } * { box-sizing: border-box; } .kol-span { display: flex; flex-flow: column; align-items: center; justify-content: center; } .kol-span__container { display: flex; align-items: center; } a, button { cursor: pointer; } button:disabled { color: unset; } .disabled label, .disabled:focus-within label, [aria-disabled=true], [aria-disabled=true]:focus, [disabled]:where(:not(fieldset)), [disabled]:where(:not(fieldset)):focus { outline: none; cursor: not-allowed; } [aria-disabled=true]:focus .kol-span, [disabled]:focus .kol-span { outline: none !important; } .hastooltip { z-index: 900 !important; } } @layer kol-component { :host { display: block; } } @font-face { font-family: "kolicons"; src: url("kolicons.eot?t=1794493099910"); src: url("kolicons.eot?t=1794493099910#iefix") format("embedded-opentype"), url("kolicons.woff2?t=1794493099910") format("woff2"), url("kolicons.woff?t=1794493099910") format("woff"), url("kolicons.ttf?t=1794493099910") format("truetype"), url("kolicons.svg?t=1794493099910#kolicons") format("svg"); } @layer kol-component { [class^=kolicon-], [class*=" kolicon-"] { font-family: "kolicons"; font-style: normal; font-weight: 400; line-height: 1em; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } .kolicon-alert-error::before { content: "\\ea01"; } .kolicon-alert-info::before { content: "\\ea02"; } .kolicon-alert-success::before { content: "\\ea03"; } .kolicon-alert-warning::before { content: "\\ea04"; } .kolicon-check::before { content: "\\ea05"; } .kolicon-chevron-double-left::before { content: "\\ea06"; } .kolicon-chevron-double-right::before { content: "\\ea07"; } .kolicon-chevron-down::before { content: "\\ea08"; } .kolicon-chevron-left::before { content: "\\ea09"; } .kolicon-chevron-right::before { content: "\\ea0a"; } .kolicon-chevron-up::before { content: "\\ea0b"; } .kolicon-cogwheel::before { content: "\\ea0c"; } .kolicon-cross::before { content: "\\ea0d"; } .kolicon-eye-closed::before { content: "\\ea0e"; } .kolicon-eye::before { content: "\\ea0f"; } .kolicon-house::before { content: "\\ea10"; } .kolicon-kolibri::before { content: "\\ea11"; } .kolicon-link-external::before { content: "\\ea12"; } .kolicon-link::before { content: "\\ea13"; } .kolicon-minus::before { content: "\\ea14"; } .kolicon-pin-pinned::before { content: "\\ea15"; } .kolicon-pin-unpinned::before { content: "\\ea16"; } .kolicon-plus::before { content: "\\ea17"; } .kolicon-settings::before { content: "\\ea18"; } .kolicon-sort-asc::before { content: "\\ea19"; } .kolicon-sort-desc::before { content: "\\ea1a"; } .kolicon-sort-neutral::before { content: "\\ea1b"; } .kolicon-up::before { content: "\\ea1c"; } .kolicon-version::before { content: "\\ea1d"; } } @layer kol-component { .kol-icon { color: inherit; display: inline-block; font-size: inherit; font-weight: inherit; line-height: inherit; } .kol-tooltip { display: contents; } .kol-tooltip__floating { opacity: 0; display: none; position: fixed; top: 0; left: 0; width: var(--kol-tooltip-width, max-content); min-width: calc(8 * 1rem / var(--kolibri-root-font-size, 16)); max-width: 90vw; max-height: 90vh; animation-direction: normal; animation-duration: var(--kolibri-tooltip-animation-duration, 250ms); animation-fill-mode: forwards; animation-iteration-count: 1; animation-timing-function: ease-in; } .kol-tooltip__floating.hide { animation-name: hideTooltip; } .kol-tooltip__floating.show { animation-name: showTooltip; } .kol-tooltip__arrow { transform: rotate(45deg); color: black; background-color: white; position: absolute; z-index: 999; width: calc(10 * 1rem / var(--kolibri-root-font-size, 16)); height: calc(10 * 1rem / var(--kolibri-root-font-size, 16)); } .kol-tooltip__content { color: black; background-color: white; position: relative; z-index: 1000; } @keyframes hideTooltip { 0% { opacity: 1; } 100% { opacity: 0; display: none; } } @keyframes showTooltip { 0% { opacity: 0; } 100% { opacity: 1; } } } @layer kol-component { .kol-button { background-color: transparent; display: inline-block; width: 100%; min-width: var(--a11y-min-size); min-height: var(--a11y-min-size); margin: 0; padding: 0; text-align: center; } .kol-button__interactive-element { border-style: none; display: block; border-width: medium; font-weight: inherit; font-style: inherit; text-align: inherit; } .kol-button { } .kol-button__tooltip { height: 0; } .kol-alert .kol-icon { color: inherit; display: inline-block; font-size: inherit; font-weight: inherit; line-height: inherit; } .kol-alert :host { display: inline-block; } .kol-alert .kol-button { display: flex; height: 100%; min-height: var(--a11y-min-size); text-decoration-line: none; } .kol-alert .kol-button__interactive-element { display: flex; flex: 1; text-align: left; text-decoration-line: none; } .kol-alert .kol-button__interactive-element::before { content: ""; } .kol-alert .kol-button__text { flex: 1 0 100%; } .kol-alert .kol-button { } .kol-alert .kol-button__tooltip { height: 0; } .kol-alert .kol-button--external-link > .kolicon-link-external::before { content: none; } .kol-alert .kol-button--external-link .kol-button__interactive-element > .kolicon-link-external::before { content: none; } .kol-alert { display: grid; grid-template-areas: "icon heading close" "icon content close"; grid-template-columns: min-content 1fr min-content; grid-template-rows: min-content min-content; } .kol-alert__icon { grid-area: icon; } .kol-alert__heading { grid-area: heading; } .kol-alert__closer { outline: transparent solid calc(1 * 1rem / var(--kolibri-root-font-size, 16)); grid-area: close; } .kol-alert__content { grid-area: content; } .kol-form-field .kol-popover-button { display: inline; } .kol-form-field .kol-popover-button__popover { margin: 0; padding: 0; border: 0; } .kol-form-field .kol-popover-button--open .kol-button__tooltip { display: none; } .kol-form-field .kol-popover-button--inline { display: inline-block; } .kol-form-field .kol-popover-button--inline .kol-button, .kol-form-field .kol-popover-button--inline .kol-button .kol-button__interactive-element { min-width: 0; min-height: 1em; } .kol-form-field .kol-popover { opacity: 0; transition: 0.2s ease-out opacity; } .kol-form-field .kol-popover-button--open .kol-popover-button__popover { opacity: 1; } .kol-form-field { display: grid; } .kol-form-field:not(.kol-form-field--disabled) .kol-form-field__label { cursor: pointer; } .kol-form-field__label { display: flex; } .kol-form-field__label-text { flex-flow: row; align-items: flex-start; justify-content: flex-start; } .kol-form-field--required .kol-form-field__label-text:has(.kol-span__slot[hidden]) .kol-span__label::after, .kol-form-field--required:not(:has(.kol-form-field__label--legend)) .kol-form-field__input .kol-tooltip__content .kol-span__label::after { content: "*"/""; } .kol-input-container { background-color: transparent; display: grid; position: relative; width: 100%; min-width: var(--a11y-min-size); min-height: var(--a11y-min-size); align-items: center; grid-template-columns: 1fr; } .kol-input-container:has(> .kol-input-container__adornment--start) { grid-template-columns: auto 1fr auto; } .kol-input-container__container { position: relative; z-index: 1; } .kol-input-container__adornment { display: flex; align-items: center; } .kol-input-container__adornment .kol-icon { display: grid; place-items: center; } .kol-input { background-color: transparent; width: 100%; min-width: var(--a11y-min-size); } .kol-input { cursor: pointer; } .kol-input:disabled { cursor: not-allowed; } }'}}},[545,"kol-input-color",{_accessKey:[1,"_access-key"],_ariaDetails:[1,"_aria-details"],_autoComplete:[1,"_auto-complete"],_disabled:[4],_hideMsg:[4,"_hide-msg"],_hideLabel:[4,"_hide-label"],_hint:[1],_icons:[1],_infoPopover:[16],_label:[1],_msg:[1],_name:[1],_on:[16],_shortKey:[1,"_short-key"],_smartButton:[1,"_smart-button"],_suggestions:[1],_syncValueBySelector:[1,"_sync-value-by-selector"],_tooltipAlign:[1,"_tooltip-align"],_touched:[1540],_value:[1],_variant:[1],id:[32],infoPopoverOpen:[32],inputHasFocus:[32],getValue:[64],focus:[64],click:[64]},void 0,{_accessKey:[{watchAccessKey:0}],_ariaDetails:[{watchAriaDetails:0}],_autoComplete:[{watchAutoComplete:0}],_disabled:[{watchDisabled:0}],_hideMsg:[{watchHideMsg:0}],_hideLabel:[{watchHideLabel:0}],_hint:[{watchHint:0}],_icons:[{watchIcons:0}],_infoPopover:[{watchInfoPopover:0}],_label:[{watchLabel:0}],_msg:[{watchMsg:0}],_name:[{watchName:0}],_on:[{watchOn:0}],_shortKey:[{watchShortKey:0}],_smartButton:[{watchSmartButton:0}],_suggestions:[{watchSuggestions:0}],_syncValueBySelector:[{watchSyncValueBySelector:0}],_tooltipAlign:[{watchTooltipAlign:0}],_touched:[{watchTouched:0}],_value:[{watchValue:0}],_variant:[{watchVariant:0}]}]);n([x("ctaRef")],j.prototype,"focus",null),n([B("ctaRef")],j.prototype,"click",null);const K=j,S=function(){"undefined"!=typeof customElements&&["kol-input-color"].forEach((t=>{"kol-input-color"===t&&(customElements.get(i(t))||customElements.define(i(t),j))}))};export{K as KolInputColor,S as defineCustomElement}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
import{proxyCustomElement as t,forceUpdate as e,h as o,Host as i,transformTag as n}from"@stencil/core/internal/client";import{_ as a}from"./tslib.es6.js";import{e as l}from"./bem-registry.js";import{v as s}from"./access-and-short-key.js";import{h as r,g as c,I as h}from"./input-container.js";import{f as d,B as u,F as m}from"./base-web-component2.js";import{I as p}from"./input.js";import{a as k,S as f}from"./suggestions2.js";import{a as b,d as _,v as y}from"./component3.js";import{f as g,c as w,b as v,i as x}from"./props-from-config.js";import{r as j}from"./read-only.js";import{r as B}from"./required.js";import{s as S}from"./smart-button.js";import{s as z}from"./step.js";import{s as T}from"./suggestions.js";import{c as D}from"./clsx.js";import{c as K}from"./dev.utils.js";import{c as O,d as A,a as M}from"./element-interaction.js";import{s as V}from"./controller.js";const q=["date","datetime-local","month","time","week"],C=/^\d{4}-([0]\d|1[0-2])-([0-2]\d|3[01])/,I=/^\d{4}-([0]\d|1[0-2])-([0-2]\d|3[01])[T ][0-2]\d:[0-5]\d(:[0-5]\d(?:\.\d+)?)?/,L=/^\d{4}-([0]\d|1[0-2])/,P=/^[0-2]\d:[0-5]\d(:[0-5]\d(?:\.\d+)?)?/,H=/^\d{4}-W(?:[0-4]\d|5[0-3])$/;function $(t,{type:e,step:o}){return function(t,e,o){if("string"==typeof t||null===t)return t;if(t instanceof Date){const i=t.getFullYear(),n=(t.getMonth()+1+"").padStart(2,"0"),a=(t.getDate()+"").padStart(2,"0"),l=(t.getHours()+"").padStart(2,"0"),s=(t.getMinutes()+"").padStart(2,"0"),r=(t.getSeconds()+"").padStart(2,"0"),c=[i,n,a].join("-"),h=[l,s,r].join(":");switch(e){case"date":return c;case"datetime-local":return`${c}T${h}`;case"month":return`${i}-${n}`;case"time":return void 0===o||o+""=="60"?`${l}:${s}`:h;case"week":return`${i}-W${function(t){const e=new Date(t),o=(e.getDay()+6)%7;e.setDate(e.getDate()-o+3);const i=e.valueOf();return e.setMonth(0,1),4!==e.getDay()&&e.setMonth(0,1+(4-e.getDay()+7)%7),(""+(1+Math.ceil((i-e.valueOf())/6048e5))).padStart(2,"0")}(t)}`}}}(t,e,o)}function R(t,{type:e}){return null==t||""===t||function(t,e){switch(e){case"date":return C.test(t);case"datetime-local":return I.test(t);case"month":return L.test(t);case"time":return P.test(t);case"week":return H.test(t);default:return!1}}(t,e)}const G=g("max",void 0,$,R),N=g("min",void 0,$,R),E=w("type","date",(function(t){const e=v(t);if(x(e,q))return e;throw Error("Invalid input date type: "+e)})),F=g("value",void 0,$,R);function W(t){return t instanceof Date?"Date":"string"==typeof t?"String":null}function U(t,e){return""===t?null:"Date"!==e?t:function(t){const e=J.exec(t);return e?new Date(Number(e[1]),Number(e[2])-1,Number(e[3])):new Date(t)}(t)}const J=/^(\d{4})-(\d{2})-(\d{2})$/,Q={required:[...d.required],optional:[...d.optional,b,k,r,G,N,E,F,j,B,_,S,z,T,y]},X=t(class extends u{constructor(t){super(!1),!1!==t&&this.__registerHost(),this.__attachShadow(),this.id=K("input-date"),this.infoPopoverOpen=!1,this.inputHasFocus=!1,this.ctaRef=O(),this.valueType=null,this.hasValue=!1,this.propsConfig=Q,this._accessKey=void 0,this._ariaDetails=void 0,this._autoComplete="off",this._disabled=!1,this._hideMsg=!1,this._hideLabel=!1,this._hint="",this._icons=void 0,this._infoPopover=void 0,this._max=void 0,this._min=void 0,this._msg=void 0,this._name=void 0,this._on=void 0,this._readOnly=!1,this._required=!1,this._shortKey=void 0,this._smartButton=void 0,this._suggestions=void 0,this._syncValueBySelector=void 0,this._step=void 0,this._tooltipAlign="top",this._touched=!1,this._type="date",this._value=void 0,this._variant=void 0,this.handleDateInput=t=>{const e=this.readValue(t);this._value=e,this.handleInput(t,e)},this.handleDateChange=t=>{const e=this.readValue(t);this.handleChange(t,e),this.hasValue=!!e},this.handleDateBlur=t=>{this.handleBlur(t);const e=t.target.value;!!e!=!!this._value&&(this._value=e)},this.handleDateKeyDown=t=>{this.handleKeyDown(t),V(t,{form:this.host,ref:this.ctaRef.el}),this.getRenderProp("readOnly")&&"Space"===t.code&&t.preventDefault()},this.initFormAssociation("date",this._name)}watchAccessKey(t){b.apply(t,(t=>this.setRenderProp("accessKey",t))),s(t,this._shortKey)}watchAriaDetails(t){this.applyAriaDetails(t)}watchAutoComplete(t){k.apply(t,(t=>this.setRenderProp("autoComplete",t)))}watchDisabled(t){this.applyDisabled(t)}watchHideMsg(t){this.applyHideMsg(t)}watchHideLabel(t){this.applyHideLabel(t)}watchHint(t){this.applyHint(t)}watchIcons(t){r.apply(t,(t=>this.setRenderProp("icons",t)))}watchInfoPopover(t){this.applyInfoPopover(t)}watchLabel(t){this.applyLabel(t)}watchMax(t){G.apply(t,(t=>this.setRenderProp("max",t)),this.dateDeps)}watchMin(t){N.apply(t,(t=>this.setRenderProp("min",t)),this.dateDeps)}watchMsg(t){this.applyMsg(t)}watchName(t){this.applyName(t)}watchOn(t){this.applyOn(t)}watchReadOnly(t){j.apply(t,(t=>this.setRenderProp("readOnly",t)))}watchRequired(t){B.apply(t,(t=>this.setRenderProp("required",t)))}watchShortKey(t){_.apply(t,(t=>this.setRenderProp("shortKey",t))),s(this._accessKey,t)}watchSmartButton(t){null==t?this.unsetRenderProp("smartButton"):S.apply(t,(t=>this.setRenderProp("smartButton",t)))}watchSuggestions(t){T.apply(t,(t=>this.setRenderProp("suggestions",t)))}watchSyncValueBySelector(t){this.applySyncValueBySelector(t)}watchStep(t){z.apply(t,(t=>this.setRenderProp("step",t)))}watchTooltipAlign(t){this.applyTooltipAlign(t)}watchTouched(t){this.applyTouched(t)}watchType(t){E.apply(t,(t=>this.setRenderProp("type",t)))}watchValue(t){var e;t instanceof Date&&l("Date type will be removed in v3. Use `Iso8601` instead."),F.apply(t,(t=>this.setRenderProp("value",t)),this.dateDeps),this.formAssociation.setFormAssociatedValue(null!==(e=this.getRenderProp("value"))&&void 0!==e?e:null),null!=t&&(this.valueType=W(t))}watchVariant(t){y.apply(t,(t=>this.setRenderProp("variant",t)))}getValue(){return Promise.resolve(this.ctaRef.el&&U(this.ctaRef.el.value,this.valueType))}focus(t){return Promise.resolve()}async click(){return Promise.resolve()}reset(){return this.setRenderProp("value",void 0),this.hasValue=!1,e(this),this.formAssociation.setFormAssociatedValue(""),this.ctaRef.el&&(this.ctaRef.el.value=""),Promise.resolve()}componentWillLoad(){this.unsetRenderProp("smartButton"),void 0!==this._value&&(this.valueType=W(this._value)),this._touched=!0===this._touched,this.watchAriaDetails(this._ariaDetails),this.watchName(this._name),this.watchSyncValueBySelector(this._syncValueBySelector),this.watchTouched(this._touched),this.watchAccessKey(this._accessKey),this.watchMsg(this._msg),this.watchDisabled(this._disabled),this.watchHideMsg(this._hideMsg),this.watchHideLabel(this._hideLabel),this.watchHint(this._hint),this.watchInfoPopover(this._infoPopover),this.watchLabel(this._label),this.watchShortKey(this._shortKey),this.watchSmartButton(this._smartButton),this.watchOn(this._on),this.watchTooltipAlign(this._tooltipAlign),this.watchVariant(this._variant),this.watchIcons(this._icons),this.watchAutoComplete(this._autoComplete),this.watchMax(this._max),this.watchMin(this._min),this.watchSuggestions(this._suggestions),this.watchReadOnly(this._readOnly),this.watchRequired(this._required),this.watchStep(this._step),this.watchType(this._type),this.watchValue(this._value),this.hasValue=!!this.getRenderProp("value")}componentDidRender(){this.syncFormField()}disconnectedCallback(){this.destroyFormField()}get dateDeps(){return{type:this._type,step:this._step}}readValue(t){return U(t.target.value,this.valueType)}getInputProps(){var t,e,i,n;const a=this.id,l=this.getRenderProp("accessKey"),s=this.getRenderProp("shortKey"),r=this.getRenderProp("suggestions"),{ariaDescribedBy:c,hasError:h}=this.getAria();return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({id:a,hideLabel:this.getRenderProp("hideLabel"),label:this.getRenderProp("label"),disabled:this.getRenderProp("disabled"),name:this.getRenderProp("name")||void 0},l?{accessKey:l}:{}),{type:this.getRenderProp("type"),value:null!==(t=this.getRenderProp("value"))&&void 0!==t?t:null===this._value?null:void 0,required:this.getRenderProp("required"),autoComplete:this.getRenderProp("autoComplete"),readonly:this.getRenderProp("readOnly"),min:null!==(e=this.getRenderProp("min"))&&void 0!==e?e:null===this._min?null:void 0,max:null!==(i=this.getRenderProp("max"))&&void 0!==i?i:null===this._max?null:void 0,step:null!==(n=this.getRenderProp("step"))&&void 0!==n?n:null,touched:this.getRenderProp("touched"),msg:this.getRenderProp("msg")}),s?{"aria-keyshortcuts":s}:{}),r.length>0?{suggestions:o(f,{id:a,suggestions:r})}:{}),{ref:this.ctaRef,onBlur:this.handleDateBlur,onChange:this.handleDateChange,onClick:this.handleClick,onFocus:this.handleFocus,onInput:this.handleDateInput,onKeyDown:this.handleDateKeyDown,ariaDescribedBy:c,"aria-invalid":h?"true":void 0})}render(){const t=this.getRenderProp("disabled"),{startAdornment:e,endAdornment:n}=c({icons:this.getRenderProp("icons"),smartButton:this.getSmartButtonFcProps(this.getRenderProp("smartButton"),t)});return o(i,{key:"847c2a53fbcd7bef3eb2f0bccf8e7ecaea07f3bc"},o(m,Object.assign({key:"7da626ddf32eb01119e36e12321107c3a628547a"},this.getFormFieldProps({class:D("kol-input-date",this.getRenderProp("type"),{"has-value":this.hasValue}),accessKey:this.getRenderProp("accessKey")||void 0,shortKey:this.getRenderProp("shortKey")||void 0,variant:this.getRenderProp("variant"),required:this.getRenderProp("required"),readOnly:this.getRenderProp("readOnly")})),o(h,{key:"2664fbd7dfa4dd6cb9255d49c1a396ed7eed8e4e",disabled:t,msg:this.getRenderProp("msg"),touched:this.getRenderProp("touched"),startAdornment:e,endAdornment:n},o(p,Object.assign({key:"97287d9be6c689e1193a1b206fa69266e59500b4"},this.getInputProps())))))}get host(){return this}static get watchers(){return{_accessKey:[{watchAccessKey:0}],_ariaDetails:[{watchAriaDetails:0}],_autoComplete:[{watchAutoComplete:0}],_disabled:[{watchDisabled:0}],_hideMsg:[{watchHideMsg:0}],_hideLabel:[{watchHideLabel:0}],_hint:[{watchHint:0}],_icons:[{watchIcons:0}],_infoPopover:[{watchInfoPopover:0}],_label:[{watchLabel:0}],_max:[{watchMax:0}],_min:[{watchMin:0}],_msg:[{watchMsg:0}],_name:[{watchName:0}],_on:[{watchOn:0}],_readOnly:[{watchReadOnly:0}],_required:[{watchRequired:0}],_shortKey:[{watchShortKey:0}],_smartButton:[{watchSmartButton:0}],_suggestions:[{watchSuggestions:0}],_syncValueBySelector:[{watchSyncValueBySelector:0}],_step:[{watchStep:0}],_tooltipAlign:[{watchTooltipAlign:0}],_touched:[{watchTouched:0}],_type:[{watchType:0}],_value:[{watchValue:0}],_variant:[{watchVariant:0}]}}static get style(){return{default:'@charset "UTF-8"; @layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component, kol-forced-colors, kol-theme-forced-colors; @layer kol-a11y { :host { --a11y-min-size: max(calc(44 * 1rem / var(--kolibri-root-font-size, 16)), 44px); --kol-a11y-font-color: black; --kol-a11y-background-color: white; color: var(--kol-a11y-font-color); background-color: var(--kol-a11y-background-color); --kol-a11y-font-family: Verdana; font-family: var(--kol-a11y-font-family); letter-spacing: inherit; word-spacing: inherit; text-align: left; } * { hyphens: auto; word-break: break-word; } button, .kol-input .input { min-width: var(--a11y-min-size); min-height: var(--a11y-min-size); } a, button, h1, h2, h3, h4, h5, h6, input, option, select, textarea { color: inherit; font-family: inherit; font-size: inherit; letter-spacing: inherit; word-spacing: inherit; } .visually-hidden { position: fixed !important; top: 0; left: 0; width: 1px; height: 1px; margin: 0 !important; padding: 0 !important; overflow: hidden; white-space: nowrap; border: 0; clip-path: inset(50%); } } @layer kol-forced-colors { @media (forced-colors: active) { .kol-button__text { color: ButtonText; background-color: ButtonFace; border: 2px solid ButtonBorder; } .kol-button--disabled .kol-button__text { color: GrayText; border-color: GrayText; } .kol-link__interactive-element[aria-disabled=true], .kol-accordion__heading[aria-disabled=true], .kol-details__heading[aria-disabled=true] { color: GrayText; } .kol-link__interactive-element[aria-disabled=true] .kol-icon, .kol-link__interactive-element[aria-disabled=true] .kol-span__label, .kol-accordion__heading[aria-disabled=true] .kol-icon, .kol-accordion__heading[aria-disabled=true] .kol-span__label, .kol-details__heading[aria-disabled=true] .kol-icon, .kol-details__heading[aria-disabled=true] .kol-span__label { color: GrayText; } input:disabled, select:disabled, textarea:disabled { color: GrayText; border-color: GrayText; } .kol-card, .kol-dialog, .kol-modal { color: CanvasText; background-color: Canvas; border: 1px solid ButtonBorder; } .kol-pagination__button--selected .kol-button { opacity: 1; } .kol-pagination__button--selected .kol-button__text { color: SelectedItemText; background-color: SelectedItem; } .kol-button__interactive-element:focus-visible, .kol-link__interactive-element:focus-visible { outline: 2px solid Highlight; outline-offset: 2px; } } } @layer kol-global { :is(a, button) { background-color: transparent; width: 100%; margin: 0; padding: 0; border: none; } [hidden] { display: none !important; } .badge-text-hint { color: black; background-color: white; } } @layer kol-global { :host { max-width: 100%; font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16)); } * { box-sizing: border-box; } .kol-span { display: flex; flex-flow: column; align-items: center; justify-content: center; } .kol-span__container { display: flex; align-items: center; } a, button { cursor: pointer; } button:disabled { color: unset; } .disabled label, .disabled:focus-within label, [aria-disabled=true], [aria-disabled=true]:focus, [disabled]:where(:not(fieldset)), [disabled]:where(:not(fieldset)):focus { outline: none; cursor: not-allowed; } [aria-disabled=true]:focus .kol-span, [disabled]:focus .kol-span { outline: none !important; } .hastooltip { z-index: 900 !important; } } @layer kol-component { :host { display: block; } } @font-face { font-family: "kolicons"; src: url("kolicons.eot?t=1794028903670"); src: url("kolicons.eot?t=1794028903670#iefix") format("embedded-opentype"), url("kolicons.woff2?t=1794028903670") format("woff2"), url("kolicons.woff?t=1794028903670") format("woff"), url("kolicons.ttf?t=1794028903670") format("truetype"), url("kolicons.svg?t=1794028903670#kolicons") format("svg"); } @layer kol-component { [class^=kolicon-], [class*=" kolicon-"] { font-family: "kolicons"; font-style: normal; font-weight: 400; line-height: 1em; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } .kolicon-alert-error::before { content: "\\ea01"; } .kolicon-alert-info::before { content: "\\ea02"; } .kolicon-alert-success::before { content: "\\ea03"; } .kolicon-alert-warning::before { content: "\\ea04"; } .kolicon-check::before { content: "\\ea05"; } .kolicon-chevron-double-left::before { content: "\\ea06"; } .kolicon-chevron-double-right::before { content: "\\ea07"; } .kolicon-chevron-down::before { content: "\\ea08"; } .kolicon-chevron-left::before { content: "\\ea09"; } .kolicon-chevron-right::before { content: "\\ea0a"; } .kolicon-chevron-up::before { content: "\\ea0b"; } .kolicon-cogwheel::before { content: "\\ea0c"; } .kolicon-cross::before { content: "\\ea0d"; } .kolicon-eye-closed::before { content: "\\ea0e"; } .kolicon-eye::before { content: "\\ea0f"; } .kolicon-house::before { content: "\\ea10"; } .kolicon-kolibri::before { content: "\\ea11"; } .kolicon-link-external::before { content: "\\ea12"; } .kolicon-link::before { content: "\\ea13"; } .kolicon-minus::before { content: "\\ea14"; } .kolicon-pin-pinned::before { content: "\\ea15"; } .kolicon-pin-unpinned::before { content: "\\ea16"; } .kolicon-plus::before { content: "\\ea17"; } .kolicon-settings::before { content: "\\ea18"; } .kolicon-sort-asc::before { content: "\\ea19"; } .kolicon-sort-desc::before { content: "\\ea1a"; } .kolicon-sort-neutral::before { content: "\\ea1b"; } .kolicon-up::before { content: "\\ea1c"; } .kolicon-version::before { content: "\\ea1d"; } } @layer kol-component { .kol-icon { color: inherit; display: inline-block; font-size: inherit; font-weight: inherit; line-height: inherit; } .kol-tooltip { display: contents; } .kol-tooltip__floating { opacity: 0; display: none; position: fixed; top: 0; left: 0; width: var(--kol-tooltip-width, max-content); min-width: calc(8 * 1rem / var(--kolibri-root-font-size, 16)); max-width: 90vw; max-height: 90vh; animation-direction: normal; animation-duration: var(--kolibri-tooltip-animation-duration, 250ms); animation-fill-mode: forwards; animation-iteration-count: 1; animation-timing-function: ease-in; } .kol-tooltip__floating.hide { animation-name: hideTooltip; } .kol-tooltip__floating.show { animation-name: showTooltip; } .kol-tooltip__arrow { transform: rotate(45deg); color: black; background-color: white; position: absolute; z-index: 999; width: calc(10 * 1rem / var(--kolibri-root-font-size, 16)); height: calc(10 * 1rem / var(--kolibri-root-font-size, 16)); } .kol-tooltip__content { color: black; background-color: white; position: relative; z-index: 1000; } @keyframes hideTooltip { 0% { opacity: 1; } 100% { opacity: 0; display: none; } } @keyframes showTooltip { 0% { opacity: 0; } 100% { opacity: 1; } } } @layer kol-component { .kol-button { background-color: transparent; display: inline-block; width: 100%; min-width: var(--a11y-min-size); min-height: var(--a11y-min-size); margin: 0; padding: 0; text-align: center; } .kol-button__interactive-element { border-style: none; display: block; border-width: medium; font-weight: inherit; font-style: inherit; text-align: inherit; } .kol-button { } .kol-button__tooltip { height: 0; } .kol-alert .kol-icon { color: inherit; display: inline-block; font-size: inherit; font-weight: inherit; line-height: inherit; } .kol-alert :host { display: inline-block; } .kol-alert .kol-button { display: flex; height: 100%; min-height: var(--a11y-min-size); text-decoration-line: none; } .kol-alert .kol-button__interactive-element { display: flex; flex: 1; text-align: left; text-decoration-line: none; } .kol-alert .kol-button__interactive-element::before { content: ""; } .kol-alert .kol-button__text { flex: 1 0 100%; } .kol-alert .kol-button { } .kol-alert .kol-button__tooltip { height: 0; } .kol-alert .kol-button--external-link > .kolicon-link-external::before { content: none; } .kol-alert .kol-button--external-link .kol-button__interactive-element > .kolicon-link-external::before { content: none; } .kol-alert { display: grid; grid-template-areas: "icon heading close" "icon content close"; grid-template-columns: min-content 1fr min-content; grid-template-rows: min-content min-content; } .kol-alert__icon { grid-area: icon; } .kol-alert__heading { grid-area: heading; } .kol-alert__closer { outline: transparent solid calc(1 * 1rem / var(--kolibri-root-font-size, 16)); grid-area: close; } .kol-alert__content { grid-area: content; } .kol-form-field .kol-popover-button { display: inline; } .kol-form-field .kol-popover-button__popover { margin: 0; padding: 0; border: 0; } .kol-form-field .kol-popover-button--open .kol-button__tooltip { display: none; } .kol-form-field .kol-popover-button--inline { display: inline-block; } .kol-form-field .kol-popover-button--inline .kol-button, .kol-form-field .kol-popover-button--inline .kol-button .kol-button__interactive-element { min-width: 0; min-height: 1em; } .kol-form-field .kol-popover { opacity: 0; transition: 0.2s ease-out opacity; } .kol-form-field .kol-popover-button--open .kol-popover-button__popover { opacity: 1; } .kol-form-field { display: grid; } .kol-form-field:not(.kol-form-field--disabled) .kol-form-field__label { cursor: pointer; } .kol-form-field__label { display: flex; } .kol-form-field__label-text { flex-flow: row; align-items: flex-start; justify-content: flex-start; } .kol-form-field--required .kol-form-field__label-text:has(.kol-span__slot[hidden]) .kol-span__label::after, .kol-form-field--required:not(:has(.kol-form-field__label--legend)) .kol-form-field__input .kol-tooltip__content .kol-span__label::after { content: "*"/""; } .kol-input-container { background-color: transparent; display: grid; position: relative; width: 100%; min-width: var(--a11y-min-size); min-height: var(--a11y-min-size); align-items: center; grid-template-columns: 1fr; } .kol-input-container:has(> .kol-input-container__adornment--start) { grid-template-columns: auto 1fr auto; } .kol-input-container__container { position: relative; z-index: 1; } .kol-input-container__adornment { display: flex; align-items: center; } .kol-input-container__adornment .kol-icon { display: grid; place-items: center; } .kol-input { background-color: transparent; width: 100%; min-width: var(--a11y-min-size); } .kol-input { cursor: text; } .kol-input::-webkit-calendar-picker-indicator { cursor: pointer; } }'}}},[545,"kol-input-date",{_accessKey:[1,"_access-key"],_ariaDetails:[1,"_aria-details"],_autoComplete:[1,"_auto-complete"],_disabled:[4],_hideMsg:[4,"_hide-msg"],_hideLabel:[4,"_hide-label"],_hint:[1],_icons:[1],_infoPopover:[16],_label:[1],_max:[1],_min:[1],_msg:[1],_name:[1],_on:[16],_readOnly:[4,"_read-only"],_required:[4],_shortKey:[1,"_short-key"],_smartButton:[1,"_smart-button"],_suggestions:[1],_syncValueBySelector:[1,"_sync-value-by-selector"],_step:[8],_tooltipAlign:[1,"_tooltip-align"],_touched:[1540],_type:[1],_value:[1537],_variant:[1],id:[32],infoPopoverOpen:[32],inputHasFocus:[32],getValue:[64],focus:[64],click:[64],reset:[64]},void 0,{_accessKey:[{watchAccessKey:0}],_ariaDetails:[{watchAriaDetails:0}],_autoComplete:[{watchAutoComplete:0}],_disabled:[{watchDisabled:0}],_hideMsg:[{watchHideMsg:0}],_hideLabel:[{watchHideLabel:0}],_hint:[{watchHint:0}],_icons:[{watchIcons:0}],_infoPopover:[{watchInfoPopover:0}],_label:[{watchLabel:0}],_max:[{watchMax:0}],_min:[{watchMin:0}],_msg:[{watchMsg:0}],_name:[{watchName:0}],_on:[{watchOn:0}],_readOnly:[{watchReadOnly:0}],_required:[{watchRequired:0}],_shortKey:[{watchShortKey:0}],_smartButton:[{watchSmartButton:0}],_suggestions:[{watchSuggestions:0}],_syncValueBySelector:[{watchSyncValueBySelector:0}],_step:[{watchStep:0}],_tooltipAlign:[{watchTooltipAlign:0}],_touched:[{watchTouched:0}],_type:[{watchType:0}],_value:[{watchValue:0}],_variant:[{watchVariant:0}]}]);a([A("ctaRef")],X.prototype,"focus",null),a([M("ctaRef")],X.prototype,"click",null);const Y=X,Z=function(){"undefined"!=typeof customElements&&["kol-input-date"].forEach((t=>{"kol-input-date"===t&&(customElements.get(n(t))||customElements.define(n(t),X))}))};export{Y as KolInputDate,Z as defineCustomElement}
|
|
4
|
+
import{proxyCustomElement as t,forceUpdate as e,h as o,Host as i,transformTag as n}from"@stencil/core/internal/client";import{_ as a}from"./tslib.es6.js";import{e as l}from"./bem-registry.js";import{v as s}from"./access-and-short-key.js";import{h as r,g as c,I as h}from"./input-container.js";import{f as d,B as u,F as m}from"./base-web-component2.js";import{I as p}from"./input.js";import{a as k,S as f}from"./suggestions2.js";import{a as b,d as _,v as y}from"./component3.js";import{f as g,c as w,b as v,i as x}from"./props-from-config.js";import{r as j}from"./read-only.js";import{r as B}from"./required.js";import{s as S}from"./smart-button.js";import{s as z}from"./step.js";import{s as T}from"./suggestions.js";import{c as D}from"./clsx.js";import{c as K}from"./dev.utils.js";import{c as O,d as A,a as M}from"./element-interaction.js";import{s as V}from"./controller.js";const q=["date","datetime-local","month","time","week"],C=/^\d{4}-([0]\d|1[0-2])-([0-2]\d|3[01])/,I=/^\d{4}-([0]\d|1[0-2])-([0-2]\d|3[01])[T ][0-2]\d:[0-5]\d(:[0-5]\d(?:\.\d+)?)?/,L=/^\d{4}-([0]\d|1[0-2])/,P=/^[0-2]\d:[0-5]\d(:[0-5]\d(?:\.\d+)?)?/,H=/^\d{4}-W(?:[0-4]\d|5[0-3])$/;function $(t,{type:e,step:o}){return function(t,e,o){if("string"==typeof t||null===t)return t;if(t instanceof Date){const i=t.getFullYear(),n=(t.getMonth()+1+"").padStart(2,"0"),a=(t.getDate()+"").padStart(2,"0"),l=(t.getHours()+"").padStart(2,"0"),s=(t.getMinutes()+"").padStart(2,"0"),r=(t.getSeconds()+"").padStart(2,"0"),c=[i,n,a].join("-"),h=[l,s,r].join(":");switch(e){case"date":return c;case"datetime-local":return`${c}T${h}`;case"month":return`${i}-${n}`;case"time":return void 0===o||o+""=="60"?`${l}:${s}`:h;case"week":return`${i}-W${function(t){const e=new Date(t),o=(e.getDay()+6)%7;e.setDate(e.getDate()-o+3);const i=e.valueOf();return e.setMonth(0,1),4!==e.getDay()&&e.setMonth(0,1+(4-e.getDay()+7)%7),(""+(1+Math.ceil((i-e.valueOf())/6048e5))).padStart(2,"0")}(t)}`}}}(t,e,o)}function R(t,{type:e}){return null==t||""===t||function(t,e){switch(e){case"date":return C.test(t);case"datetime-local":return I.test(t);case"month":return L.test(t);case"time":return P.test(t);case"week":return H.test(t);default:return!1}}(t,e)}const G=g("max",void 0,$,R),N=g("min",void 0,$,R),E=w("type","date",(function(t){const e=v(t);if(x(e,q))return e;throw Error("Invalid input date type: "+e)})),F=g("value",void 0,$,R);function W(t){return t instanceof Date?"Date":"string"==typeof t?"String":null}function U(t,e){return""===t?null:"Date"!==e?t:function(t){const e=J.exec(t);return e?new Date(Number(e[1]),Number(e[2])-1,Number(e[3])):new Date(t)}(t)}const J=/^(\d{4})-(\d{2})-(\d{2})$/,Q={required:[...d.required],optional:[...d.optional,b,k,r,G,N,E,F,j,B,_,S,z,T,y]},X=t(class extends u{constructor(t){super(!1),!1!==t&&this.__registerHost(),this.__attachShadow(),this.id=K("input-date"),this.infoPopoverOpen=!1,this.inputHasFocus=!1,this.ctaRef=O(),this.valueType=null,this.hasValue=!1,this.propsConfig=Q,this._accessKey=void 0,this._ariaDetails=void 0,this._autoComplete="off",this._disabled=!1,this._hideMsg=!1,this._hideLabel=!1,this._hint="",this._icons=void 0,this._infoPopover=void 0,this._max=void 0,this._min=void 0,this._msg=void 0,this._name=void 0,this._on=void 0,this._readOnly=!1,this._required=!1,this._shortKey=void 0,this._smartButton=void 0,this._suggestions=void 0,this._syncValueBySelector=void 0,this._step=void 0,this._tooltipAlign="top",this._touched=!1,this._type="date",this._value=void 0,this._variant=void 0,this.handleDateInput=t=>{const e=this.readValue(t);this._value=e,this.handleInput(t,e)},this.handleDateChange=t=>{const e=this.readValue(t);this.handleChange(t,e),this.hasValue=!!e},this.handleDateBlur=t=>{this.handleBlur(t);const e=t.target.value;!!e!=!!this._value&&(this._value=e)},this.handleDateKeyDown=t=>{this.handleKeyDown(t),V(t,{form:this.host,ref:this.ctaRef.el}),this.getRenderProp("readOnly")&&"Space"===t.code&&t.preventDefault()},this.initFormAssociation("date",this._name)}watchAccessKey(t){b.apply(t,(t=>this.setRenderProp("accessKey",t))),s(t,this._shortKey)}watchAriaDetails(t){this.applyAriaDetails(t)}watchAutoComplete(t){k.apply(t,(t=>this.setRenderProp("autoComplete",t)))}watchDisabled(t){this.applyDisabled(t)}watchHideMsg(t){this.applyHideMsg(t)}watchHideLabel(t){this.applyHideLabel(t)}watchHint(t){this.applyHint(t)}watchIcons(t){r.apply(t,(t=>this.setRenderProp("icons",t)))}watchInfoPopover(t){this.applyInfoPopover(t)}watchLabel(t){this.applyLabel(t)}watchMax(t){G.apply(t,(t=>this.setRenderProp("max",t)),this.dateDeps)}watchMin(t){N.apply(t,(t=>this.setRenderProp("min",t)),this.dateDeps)}watchMsg(t){this.applyMsg(t)}watchName(t){this.applyName(t)}watchOn(t){this.applyOn(t)}watchReadOnly(t){j.apply(t,(t=>this.setRenderProp("readOnly",t)))}watchRequired(t){B.apply(t,(t=>this.setRenderProp("required",t)))}watchShortKey(t){_.apply(t,(t=>this.setRenderProp("shortKey",t))),s(this._accessKey,t)}watchSmartButton(t){null==t?this.unsetRenderProp("smartButton"):S.apply(t,(t=>this.setRenderProp("smartButton",t)))}watchSuggestions(t){T.apply(t,(t=>this.setRenderProp("suggestions",t)))}watchSyncValueBySelector(t){this.applySyncValueBySelector(t)}watchStep(t){z.apply(t,(t=>this.setRenderProp("step",t)))}watchTooltipAlign(t){this.applyTooltipAlign(t)}watchTouched(t){this.applyTouched(t)}watchType(t){E.apply(t,(t=>this.setRenderProp("type",t)))}watchValue(t){var e;t instanceof Date&&l("Date type will be removed in v3. Use `Iso8601` instead."),F.apply(t,(t=>this.setRenderProp("value",t)),this.dateDeps),this.formAssociation.setFormAssociatedValue(null!==(e=this.getRenderProp("value"))&&void 0!==e?e:null),null!=t&&(this.valueType=W(t))}watchVariant(t){y.apply(t,(t=>this.setRenderProp("variant",t)))}getValue(){return Promise.resolve(this.ctaRef.el&&U(this.ctaRef.el.value,this.valueType))}focus(t){return Promise.resolve()}async click(){return Promise.resolve()}reset(){return this.setRenderProp("value",void 0),this.hasValue=!1,e(this),this.formAssociation.setFormAssociatedValue(""),this.ctaRef.el&&(this.ctaRef.el.value=""),Promise.resolve()}componentWillLoad(){this.unsetRenderProp("smartButton"),void 0!==this._value&&(this.valueType=W(this._value)),this._touched=!0===this._touched,this.watchAriaDetails(this._ariaDetails),this.watchName(this._name),this.watchSyncValueBySelector(this._syncValueBySelector),this.watchTouched(this._touched),this.watchAccessKey(this._accessKey),this.watchMsg(this._msg),this.watchDisabled(this._disabled),this.watchHideMsg(this._hideMsg),this.watchHideLabel(this._hideLabel),this.watchHint(this._hint),this.watchInfoPopover(this._infoPopover),this.watchLabel(this._label),this.watchShortKey(this._shortKey),this.watchSmartButton(this._smartButton),this.watchOn(this._on),this.watchTooltipAlign(this._tooltipAlign),this.watchVariant(this._variant),this.watchIcons(this._icons),this.watchAutoComplete(this._autoComplete),this.watchMax(this._max),this.watchMin(this._min),this.watchSuggestions(this._suggestions),this.watchReadOnly(this._readOnly),this.watchRequired(this._required),this.watchStep(this._step),this.watchType(this._type),this.watchValue(this._value),this.hasValue=!!this.getRenderProp("value")}componentDidRender(){this.syncFormField()}disconnectedCallback(){this.destroyFormField()}get dateDeps(){return{type:this._type,step:this._step}}readValue(t){return U(t.target.value,this.valueType)}getInputProps(){var t,e,i,n;const a=this.id,l=this.getRenderProp("accessKey"),s=this.getRenderProp("shortKey"),r=this.getRenderProp("suggestions"),{ariaDescribedBy:c,hasError:h}=this.getAria();return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({id:a,hideLabel:this.getRenderProp("hideLabel"),label:this.getRenderProp("label"),disabled:this.getRenderProp("disabled"),name:this.getRenderProp("name")||void 0},l?{accessKey:l}:{}),{type:this.getRenderProp("type"),value:null!==(t=this.getRenderProp("value"))&&void 0!==t?t:null===this._value?null:void 0,required:this.getRenderProp("required"),autoComplete:this.getRenderProp("autoComplete"),readonly:this.getRenderProp("readOnly"),min:null!==(e=this.getRenderProp("min"))&&void 0!==e?e:null===this._min?null:void 0,max:null!==(i=this.getRenderProp("max"))&&void 0!==i?i:null===this._max?null:void 0,step:null!==(n=this.getRenderProp("step"))&&void 0!==n?n:null,touched:this.getRenderProp("touched"),msg:this.getRenderProp("msg")}),s?{"aria-keyshortcuts":s}:{}),r.length>0?{suggestions:o(f,{id:a,suggestions:r})}:{}),{ref:this.ctaRef,onBlur:this.handleDateBlur,onChange:this.handleDateChange,onClick:this.handleClick,onFocus:this.handleFocus,onInput:this.handleDateInput,onKeyDown:this.handleDateKeyDown,ariaDescribedBy:c,"aria-invalid":h?"true":void 0})}render(){const t=this.getRenderProp("disabled"),{startAdornment:e,endAdornment:n}=c({icons:this.getRenderProp("icons"),smartButton:this.getSmartButtonFcProps(this.getRenderProp("smartButton"),t)});return o(i,{key:"7e184d9cd4515cb8754ac761fa69a5614d088fa2"},o(m,Object.assign({key:"4182ce8f226dcc7acb8401af6fea3a34bc59795b"},this.getFormFieldProps({class:D("kol-input-date",this.getRenderProp("type"),{"has-value":this.hasValue}),accessKey:this.getRenderProp("accessKey")||void 0,shortKey:this.getRenderProp("shortKey")||void 0,variant:this.getRenderProp("variant"),required:this.getRenderProp("required"),readOnly:this.getRenderProp("readOnly")})),o(h,{key:"01aba8904b261dd6afb6c6dc9ed36899741ca20e",disabled:t,msg:this.getRenderProp("msg"),touched:this.getRenderProp("touched"),startAdornment:e,endAdornment:n},o(p,Object.assign({key:"3be495abebfe3f3467945c7f31647a4c0951bd76"},this.getInputProps())))))}get host(){return this}static get watchers(){return{_accessKey:[{watchAccessKey:0}],_ariaDetails:[{watchAriaDetails:0}],_autoComplete:[{watchAutoComplete:0}],_disabled:[{watchDisabled:0}],_hideMsg:[{watchHideMsg:0}],_hideLabel:[{watchHideLabel:0}],_hint:[{watchHint:0}],_icons:[{watchIcons:0}],_infoPopover:[{watchInfoPopover:0}],_label:[{watchLabel:0}],_max:[{watchMax:0}],_min:[{watchMin:0}],_msg:[{watchMsg:0}],_name:[{watchName:0}],_on:[{watchOn:0}],_readOnly:[{watchReadOnly:0}],_required:[{watchRequired:0}],_shortKey:[{watchShortKey:0}],_smartButton:[{watchSmartButton:0}],_suggestions:[{watchSuggestions:0}],_syncValueBySelector:[{watchSyncValueBySelector:0}],_step:[{watchStep:0}],_tooltipAlign:[{watchTooltipAlign:0}],_touched:[{watchTouched:0}],_type:[{watchType:0}],_value:[{watchValue:0}],_variant:[{watchVariant:0}]}}static get style(){return{default:'@charset "UTF-8"; @layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component, kol-forced-colors, kol-theme-forced-colors; @layer kol-a11y { :host { --a11y-min-size: max(calc(44 * 1rem / var(--kolibri-root-font-size, 16)), 44px); --kol-a11y-font-color: black; --kol-a11y-background-color: white; color: var(--kol-a11y-font-color); background-color: var(--kol-a11y-background-color); --kol-a11y-font-family: Verdana; font-family: var(--kol-a11y-font-family); letter-spacing: inherit; word-spacing: inherit; text-align: left; } * { hyphens: auto; word-break: break-word; } button, .kol-input .input { min-width: var(--a11y-min-size); min-height: var(--a11y-min-size); } a, button, h1, h2, h3, h4, h5, h6, input, option, select, textarea { color: inherit; font-family: inherit; font-size: inherit; letter-spacing: inherit; word-spacing: inherit; } .visually-hidden { position: fixed !important; top: 0; left: 0; width: 1px; height: 1px; margin: 0 !important; padding: 0 !important; overflow: hidden; white-space: nowrap; border: 0; clip-path: inset(50%); } } @layer kol-forced-colors { @media (forced-colors: active) { .kol-button__text { color: ButtonText; background-color: ButtonFace; border: 2px solid ButtonBorder; } .kol-button--disabled .kol-button__text { color: GrayText; border-color: GrayText; } .kol-link__interactive-element[aria-disabled=true], .kol-accordion__heading[aria-disabled=true], .kol-details__heading[aria-disabled=true] { color: GrayText; } .kol-link__interactive-element[aria-disabled=true] .kol-icon, .kol-link__interactive-element[aria-disabled=true] .kol-span__label, .kol-accordion__heading[aria-disabled=true] .kol-icon, .kol-accordion__heading[aria-disabled=true] .kol-span__label, .kol-details__heading[aria-disabled=true] .kol-icon, .kol-details__heading[aria-disabled=true] .kol-span__label { color: GrayText; } input:disabled, select:disabled, textarea:disabled { color: GrayText; border-color: GrayText; } .kol-card, .kol-dialog, .kol-modal { color: CanvasText; background-color: Canvas; border: 1px solid ButtonBorder; } .kol-pagination__button--selected .kol-button { opacity: 1; } .kol-pagination__button--selected .kol-button__text { color: SelectedItemText; background-color: SelectedItem; } .kol-button__interactive-element:focus-visible, .kol-link__interactive-element:focus-visible { outline: 2px solid Highlight; outline-offset: 2px; } } } @layer kol-global { :is(a, button) { background-color: transparent; width: 100%; margin: 0; padding: 0; border: none; } [hidden] { display: none !important; } .badge-text-hint { color: black; background-color: white; } } @layer kol-global { :host { max-width: 100%; font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16)); } * { box-sizing: border-box; } .kol-span { display: flex; flex-flow: column; align-items: center; justify-content: center; } .kol-span__container { display: flex; align-items: center; } a, button { cursor: pointer; } button:disabled { color: unset; } .disabled label, .disabled:focus-within label, [aria-disabled=true], [aria-disabled=true]:focus, [disabled]:where(:not(fieldset)), [disabled]:where(:not(fieldset)):focus { outline: none; cursor: not-allowed; } [aria-disabled=true]:focus .kol-span, [disabled]:focus .kol-span { outline: none !important; } .hastooltip { z-index: 900 !important; } } @layer kol-component { :host { display: block; } } @font-face { font-family: "kolicons"; src: url("kolicons.eot?t=1794493099910"); src: url("kolicons.eot?t=1794493099910#iefix") format("embedded-opentype"), url("kolicons.woff2?t=1794493099910") format("woff2"), url("kolicons.woff?t=1794493099910") format("woff"), url("kolicons.ttf?t=1794493099910") format("truetype"), url("kolicons.svg?t=1794493099910#kolicons") format("svg"); } @layer kol-component { [class^=kolicon-], [class*=" kolicon-"] { font-family: "kolicons"; font-style: normal; font-weight: 400; line-height: 1em; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } .kolicon-alert-error::before { content: "\\ea01"; } .kolicon-alert-info::before { content: "\\ea02"; } .kolicon-alert-success::before { content: "\\ea03"; } .kolicon-alert-warning::before { content: "\\ea04"; } .kolicon-check::before { content: "\\ea05"; } .kolicon-chevron-double-left::before { content: "\\ea06"; } .kolicon-chevron-double-right::before { content: "\\ea07"; } .kolicon-chevron-down::before { content: "\\ea08"; } .kolicon-chevron-left::before { content: "\\ea09"; } .kolicon-chevron-right::before { content: "\\ea0a"; } .kolicon-chevron-up::before { content: "\\ea0b"; } .kolicon-cogwheel::before { content: "\\ea0c"; } .kolicon-cross::before { content: "\\ea0d"; } .kolicon-eye-closed::before { content: "\\ea0e"; } .kolicon-eye::before { content: "\\ea0f"; } .kolicon-house::before { content: "\\ea10"; } .kolicon-kolibri::before { content: "\\ea11"; } .kolicon-link-external::before { content: "\\ea12"; } .kolicon-link::before { content: "\\ea13"; } .kolicon-minus::before { content: "\\ea14"; } .kolicon-pin-pinned::before { content: "\\ea15"; } .kolicon-pin-unpinned::before { content: "\\ea16"; } .kolicon-plus::before { content: "\\ea17"; } .kolicon-settings::before { content: "\\ea18"; } .kolicon-sort-asc::before { content: "\\ea19"; } .kolicon-sort-desc::before { content: "\\ea1a"; } .kolicon-sort-neutral::before { content: "\\ea1b"; } .kolicon-up::before { content: "\\ea1c"; } .kolicon-version::before { content: "\\ea1d"; } } @layer kol-component { .kol-icon { color: inherit; display: inline-block; font-size: inherit; font-weight: inherit; line-height: inherit; } .kol-tooltip { display: contents; } .kol-tooltip__floating { opacity: 0; display: none; position: fixed; top: 0; left: 0; width: var(--kol-tooltip-width, max-content); min-width: calc(8 * 1rem / var(--kolibri-root-font-size, 16)); max-width: 90vw; max-height: 90vh; animation-direction: normal; animation-duration: var(--kolibri-tooltip-animation-duration, 250ms); animation-fill-mode: forwards; animation-iteration-count: 1; animation-timing-function: ease-in; } .kol-tooltip__floating.hide { animation-name: hideTooltip; } .kol-tooltip__floating.show { animation-name: showTooltip; } .kol-tooltip__arrow { transform: rotate(45deg); color: black; background-color: white; position: absolute; z-index: 999; width: calc(10 * 1rem / var(--kolibri-root-font-size, 16)); height: calc(10 * 1rem / var(--kolibri-root-font-size, 16)); } .kol-tooltip__content { color: black; background-color: white; position: relative; z-index: 1000; } @keyframes hideTooltip { 0% { opacity: 1; } 100% { opacity: 0; display: none; } } @keyframes showTooltip { 0% { opacity: 0; } 100% { opacity: 1; } } } @layer kol-component { .kol-button { background-color: transparent; display: inline-block; width: 100%; min-width: var(--a11y-min-size); min-height: var(--a11y-min-size); margin: 0; padding: 0; text-align: center; } .kol-button__interactive-element { border-style: none; display: block; border-width: medium; font-weight: inherit; font-style: inherit; text-align: inherit; } .kol-button { } .kol-button__tooltip { height: 0; } .kol-alert .kol-icon { color: inherit; display: inline-block; font-size: inherit; font-weight: inherit; line-height: inherit; } .kol-alert :host { display: inline-block; } .kol-alert .kol-button { display: flex; height: 100%; min-height: var(--a11y-min-size); text-decoration-line: none; } .kol-alert .kol-button__interactive-element { display: flex; flex: 1; text-align: left; text-decoration-line: none; } .kol-alert .kol-button__interactive-element::before { content: ""; } .kol-alert .kol-button__text { flex: 1 0 100%; } .kol-alert .kol-button { } .kol-alert .kol-button__tooltip { height: 0; } .kol-alert .kol-button--external-link > .kolicon-link-external::before { content: none; } .kol-alert .kol-button--external-link .kol-button__interactive-element > .kolicon-link-external::before { content: none; } .kol-alert { display: grid; grid-template-areas: "icon heading close" "icon content close"; grid-template-columns: min-content 1fr min-content; grid-template-rows: min-content min-content; } .kol-alert__icon { grid-area: icon; } .kol-alert__heading { grid-area: heading; } .kol-alert__closer { outline: transparent solid calc(1 * 1rem / var(--kolibri-root-font-size, 16)); grid-area: close; } .kol-alert__content { grid-area: content; } .kol-form-field .kol-popover-button { display: inline; } .kol-form-field .kol-popover-button__popover { margin: 0; padding: 0; border: 0; } .kol-form-field .kol-popover-button--open .kol-button__tooltip { display: none; } .kol-form-field .kol-popover-button--inline { display: inline-block; } .kol-form-field .kol-popover-button--inline .kol-button, .kol-form-field .kol-popover-button--inline .kol-button .kol-button__interactive-element { min-width: 0; min-height: 1em; } .kol-form-field .kol-popover { opacity: 0; transition: 0.2s ease-out opacity; } .kol-form-field .kol-popover-button--open .kol-popover-button__popover { opacity: 1; } .kol-form-field { display: grid; } .kol-form-field:not(.kol-form-field--disabled) .kol-form-field__label { cursor: pointer; } .kol-form-field__label { display: flex; } .kol-form-field__label-text { flex-flow: row; align-items: flex-start; justify-content: flex-start; } .kol-form-field--required .kol-form-field__label-text:has(.kol-span__slot[hidden]) .kol-span__label::after, .kol-form-field--required:not(:has(.kol-form-field__label--legend)) .kol-form-field__input .kol-tooltip__content .kol-span__label::after { content: "*"/""; } .kol-input-container { background-color: transparent; display: grid; position: relative; width: 100%; min-width: var(--a11y-min-size); min-height: var(--a11y-min-size); align-items: center; grid-template-columns: 1fr; } .kol-input-container:has(> .kol-input-container__adornment--start) { grid-template-columns: auto 1fr auto; } .kol-input-container__container { position: relative; z-index: 1; } .kol-input-container__adornment { display: flex; align-items: center; } .kol-input-container__adornment .kol-icon { display: grid; place-items: center; } .kol-input { background-color: transparent; width: 100%; min-width: var(--a11y-min-size); } .kol-input { cursor: text; } .kol-input::-webkit-calendar-picker-indicator { cursor: pointer; } }'}}},[545,"kol-input-date",{_accessKey:[1,"_access-key"],_ariaDetails:[1,"_aria-details"],_autoComplete:[1,"_auto-complete"],_disabled:[4],_hideMsg:[4,"_hide-msg"],_hideLabel:[4,"_hide-label"],_hint:[1],_icons:[1],_infoPopover:[16],_label:[1],_max:[1],_min:[1],_msg:[1],_name:[1],_on:[16],_readOnly:[4,"_read-only"],_required:[4],_shortKey:[1,"_short-key"],_smartButton:[1,"_smart-button"],_suggestions:[1],_syncValueBySelector:[1,"_sync-value-by-selector"],_step:[8],_tooltipAlign:[1,"_tooltip-align"],_touched:[1540],_type:[1],_value:[1537],_variant:[1],id:[32],infoPopoverOpen:[32],inputHasFocus:[32],getValue:[64],focus:[64],click:[64],reset:[64]},void 0,{_accessKey:[{watchAccessKey:0}],_ariaDetails:[{watchAriaDetails:0}],_autoComplete:[{watchAutoComplete:0}],_disabled:[{watchDisabled:0}],_hideMsg:[{watchHideMsg:0}],_hideLabel:[{watchHideLabel:0}],_hint:[{watchHint:0}],_icons:[{watchIcons:0}],_infoPopover:[{watchInfoPopover:0}],_label:[{watchLabel:0}],_max:[{watchMax:0}],_min:[{watchMin:0}],_msg:[{watchMsg:0}],_name:[{watchName:0}],_on:[{watchOn:0}],_readOnly:[{watchReadOnly:0}],_required:[{watchRequired:0}],_shortKey:[{watchShortKey:0}],_smartButton:[{watchSmartButton:0}],_suggestions:[{watchSuggestions:0}],_syncValueBySelector:[{watchSyncValueBySelector:0}],_step:[{watchStep:0}],_tooltipAlign:[{watchTooltipAlign:0}],_touched:[{watchTouched:0}],_type:[{watchType:0}],_value:[{watchValue:0}],_variant:[{watchVariant:0}]}]);a([A("ctaRef")],X.prototype,"focus",null),a([M("ctaRef")],X.prototype,"click",null);const Y=X,Z=function(){"undefined"!=typeof customElements&&["kol-input-date"].forEach((t=>{"kol-input-date"===t&&(customElements.get(n(t))||customElements.define(n(t),X))}))};export{Y as KolInputDate,Z as defineCustomElement}
|