@public-ui/components 4.6.0-rc.2 → 4.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 -4
- package/dist/cjs/{Heading-CmnijhLd.js → Heading-CnnBHLhu.js} +7 -7
- package/dist/cjs/{api-Bg7hdIrJ.js → api-C-uDDxcA.js} +29 -30
- package/dist/cjs/{app-globals-BwYPSMbG.js → app-globals-BfpVa0Lg.js} +2 -2
- package/dist/cjs/{aria-labelledby-BRMgWRVp.js → aria-labelledby-By2dgbCn.js} +0 -13
- package/dist/cjs/{base-JFyPasp9.js → base-BIbzHEVE.js} +50 -52
- package/dist/cjs/{base-ob1X79UM.js → base-BZ3x1Yaj.js} +10 -10
- package/dist/cjs/{base-CQB0r-ZQ.js → base-Cc2tyQoy.js} +10 -10
- package/dist/cjs/{base-BVhV5HmV.js → base-CeaAJa72.js} +10 -10
- package/dist/cjs/{base-web-component-DXCN-Sp3.js → base-web-component-B_zszxEg.js} +1 -1
- package/dist/cjs/{base-web-component-DBcJrpRb.js → base-web-component-CpqYvVDi.js} +14 -15
- package/dist/cjs/{base-web-component-dI9FmFIm.js → base-web-component-Dk-So1FD.js} +12 -14
- package/dist/cjs/{behavior-B5wr2A8R.js → behavior--ZjzmIB4.js} +5 -12
- package/dist/cjs/{behavior-DujaVCwV.js → behavior-CYg7XOXd.js} +4 -4
- package/dist/cjs/{behavior-CUmF8rJf.js → behavior-cEIf2evT.js} +4 -4
- package/dist/cjs/{bem-registry-B6QoNC9E.js → bem-registry-CtnO3zCW.js} +61 -0
- package/dist/cjs/{bootstrap-HU5YhM_w.js → bootstrap-DOzWgRGX.js} +1 -1
- package/dist/cjs/{color-C3xsA3Uk.js → color-BJ776mPh.js} +2 -2
- package/dist/cjs/{component-DprHBKdZ.js → component-5ABjFE_U.js} +6 -7
- package/dist/cjs/{component-BexD3069.js → component-BSx0ZVSD.js} +10 -12
- package/dist/cjs/component-BTfaB8W5.js +19 -0
- package/dist/cjs/{component-Cbbx7Z6c.js → component-BacsMsF-.js} +4 -4
- package/dist/cjs/component-C_9WksgV.js +53 -0
- package/dist/cjs/{component-Cqp00Tb9.js → component-D65WOH6c.js} +8 -10
- package/dist/cjs/{component-Doln6Ltn.js → component-DE4OHvyu.js} +7 -8
- package/dist/cjs/{component-DGVc4bOy.js → component-DVf7tz1e.js} +6 -5
- package/dist/cjs/{component-Bza8hlo-.js → component-Ddp-Luc6.js} +11 -12
- package/dist/cjs/{component-DFhuXUqv.js → component-DuknrIKz.js} +14 -16
- package/dist/cjs/{component-BilLJFfC.js → component-DwuAKOV_.js} +4 -4
- package/dist/cjs/{contrast-6Nku3lih.js → contrast-DrGTr5zd.js} +1 -1
- package/dist/cjs/{dev.utils-Bx4sgPsr.js → dev.utils-EwVibOKw.js} +1 -1
- package/dist/cjs/{devtools-BXBKJice.js → devtools-CEqUJI9f.js} +2 -2
- package/dist/cjs/{disabled-CilmJ-p-.js → disabled-DBnI2OR4.js} +1 -1
- package/dist/cjs/{field-control-B95uzQnW.js → field-control-Jhzreo_j.js} +12 -12
- package/dist/cjs/{group-DGS7K6Ja.js → group-DDmENjNB.js} +7 -8
- package/dist/cjs/{has-closer-iSIrv52u.js → has-closer-DIk_toj-.js} +1 -1
- package/dist/cjs/{href-xojo1zy_.js → href-_UE7179j.js} +1 -1
- package/dist/cjs/{i18n-D7UmRsV8.js → i18n-4lKONPdP.js} +1 -1
- package/dist/cjs/{i18n-DgHI4-xa.js → i18n-CuXZ7SEi.js} +2 -1
- package/dist/cjs/{id-DP-w6i4q.js → id-JbinnWCW.js} +1 -1
- package/dist/cjs/{index-Ccvyz7Rq.js → index-P8gY4ccL.js} +1 -1
- package/dist/cjs/index.cjs.js +3 -3
- package/dist/cjs/input-BYfPasa5.js +19 -0
- package/dist/cjs/{input-container-CWb_kRbs.js → input-container-BQlNjdk3.js} +8 -10
- package/dist/cjs/{item-vDMQvV0t.js → item-C6gnuMjx.js} +4 -4
- package/dist/cjs/{item-wr5KfPYM.js → item-CvvVUcQZ.js} +11 -11
- package/dist/cjs/{item-C4Boh5Cz.js → item-DSSJt2YS.js} +4 -4
- package/dist/cjs/{item-DgNTEUz3.js → item-Dgikq96R.js} +20 -21
- package/dist/cjs/kol-abbr.cjs.entry.js +8 -12
- package/dist/cjs/kol-accordion.cjs.entry.js +15 -17
- package/dist/cjs/kol-alert.cjs.entry.js +27 -30
- package/dist/cjs/kol-avatar.cjs.entry.js +14 -15
- package/dist/cjs/kol-badge.cjs.entry.js +23 -26
- package/dist/cjs/kol-breadcrumb.cjs.entry.js +26 -30
- package/dist/cjs/kol-button-link.cjs.entry.js +22 -25
- package/dist/cjs/kol-button.cjs.entry.js +22 -25
- package/dist/cjs/kol-card.cjs.entry.js +27 -30
- package/dist/cjs/kol-combobox.cjs.entry.js +38 -41
- package/dist/cjs/kol-details.cjs.entry.js +15 -17
- package/dist/cjs/kol-dialog.cjs.entry.js +30 -33
- package/dist/cjs/kol-drawer.cjs.entry.js +30 -33
- package/dist/cjs/kol-form.cjs.entry.js +24 -27
- package/dist/cjs/kol-heading.cjs.entry.js +13 -15
- package/dist/cjs/kol-icon.cjs.entry.js +8 -9
- package/dist/cjs/kol-image.cjs.entry.js +7 -9
- package/dist/cjs/kol-input-checkbox.cjs.entry.js +53 -55
- package/dist/cjs/kol-input-color.cjs.entry.js +42 -44
- package/dist/cjs/kol-input-date.cjs.entry.js +44 -47
- package/dist/cjs/kol-input-email.cjs.entry.js +45 -47
- package/dist/cjs/kol-input-file.cjs.entry.js +39 -41
- package/dist/cjs/kol-input-number.cjs.entry.js +46 -48
- package/dist/cjs/kol-input-password.cjs.entry.js +43 -45
- package/dist/cjs/kol-input-radio.cjs.entry.js +38 -41
- package/dist/cjs/kol-input-range.cjs.entry.js +37 -40
- package/dist/cjs/kol-input-text.cjs.entry.js +45 -47
- package/dist/cjs/kol-kolibri.cjs.entry.js +8 -12
- package/dist/cjs/kol-link-button.cjs.entry.js +23 -26
- package/dist/cjs/kol-link.cjs.entry.js +23 -26
- package/dist/cjs/kol-meter.cjs.entry.js +14 -15
- package/dist/cjs/kol-modal.cjs.entry.js +30 -33
- package/dist/cjs/kol-nav.cjs.entry.js +35 -38
- package/dist/cjs/kol-pagination.cjs.entry.js +42 -45
- package/dist/cjs/kol-popover-button.cjs.entry.js +23 -26
- package/dist/cjs/kol-progress.cjs.entry.js +13 -14
- package/dist/cjs/kol-quote.cjs.entry.js +9 -10
- package/dist/cjs/kol-select.cjs.entry.js +36 -39
- package/dist/cjs/kol-single-select.cjs.entry.js +38 -41
- package/dist/cjs/kol-skip-nav.cjs.entry.js +26 -30
- package/dist/cjs/kol-spin.cjs.entry.js +11 -15
- package/dist/cjs/kol-split-button.cjs.entry.js +28 -31
- package/dist/cjs/kol-table-stateful.cjs.entry.js +55 -57
- package/dist/cjs/kol-table-stateless.cjs.entry.js +40 -44
- package/dist/cjs/kol-tabs.cjs.entry.js +23 -26
- package/dist/cjs/kol-textarea.cjs.entry.js +41 -44
- package/dist/cjs/kol-toast-container.cjs.entry.js +20 -23
- package/dist/cjs/kol-toolbar.cjs.entry.js +29 -32
- package/dist/cjs/kol-tooltip-wc.cjs.entry.js +11 -12
- package/dist/cjs/kol-tree-item.cjs.entry.js +27 -28
- package/dist/cjs/kol-tree.cjs.entry.js +24 -14
- package/dist/cjs/kol-version.cjs.entry.js +21 -24
- package/dist/cjs/kolibri.cjs.js +3 -3
- package/dist/cjs/{label-D6c6jfqK.js → label-BAULqhwq.js} +3 -3
- package/dist/cjs/{label-hints-q3XenWLW.js → label-hints-BHw-UcMt.js} +1 -1
- package/dist/cjs/{label-lang-segment-k4OY9qRY.js → label-lang-segment-D_UYFhgr.js} +2 -2
- package/dist/cjs/{label-with-expert-slot-CJoz7BLw.js → label-with-expert-slot-XZTOiRp-.js} +3 -3
- package/dist/cjs/{level-B6vFMm9s.js → level-CaJUuMiH.js} +1 -1
- package/dist/cjs/{link-target-0qSVsAb2.js → link-target-EZq24qVX.js} +1 -1
- package/dist/cjs/{links-Ur1e9DOK.js → links-CNPivOpm.js} +1 -1
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/{multiple-CCxtzqez.js → multiple-D4ktp4Q2.js} +1 -1
- package/dist/cjs/{number-value-DzAHCwlP.js → number-value-BzIR1UvL.js} +1 -1
- package/dist/cjs/{open-Gxr_K7HK.js → open-BYh5VAA1.js} +1 -1
- package/dist/cjs/{options-BT0m0gRT.js → options-DkF38kx_.js} +1 -1
- package/dist/cjs/{orientation-CeHU4dT8.js → orientation-D4yopkvP.js} +1 -1
- package/dist/cjs/{placeholder-22xUUFff.js → placeholder-CZOGOuLS.js} +1 -1
- package/dist/cjs/{props-from-config-D1qhXS9j.js → props-from-config-CiU21EHb.js} +86 -5
- package/dist/cjs/{read-only-iHApMQEg.js → read-only-PNG5jHgh.js} +1 -1
- package/dist/cjs/{required-BYdSI25I.js → required-mj54_vO_.js} +1 -1
- package/dist/cjs/{resolve-props-pZBj0tIz.js → resolve-props-CH6OL2es.js} +7 -7
- package/dist/cjs/{resolve-props-B_ytLWBO.js → resolve-props-DOnocHFi.js} +6 -6
- package/dist/cjs/{rows-C9vBSQK1.js → rows-YaAnXjAm.js} +1 -1
- package/dist/cjs/{scroll-lock-DguXX-Em.js → scroll-lock-D3pgiG8q.js} +8 -7
- package/dist/cjs/{smart-button-DRMmUyQ5.js → smart-button-BU7mWP5H.js} +1 -1
- package/dist/cjs/{spell-check-CxgvHcGA.js → spell-check-CZWiLkQE.js} +1 -1
- package/dist/cjs/{src-Bmd7gQCS.js → src-rB2yGTSn.js} +1 -1
- package/dist/cjs/{step-CCqgsPCX.js → step-Bo6ILIqa.js} +1 -1
- package/dist/cjs/{suggestions-CoUp7HmN.js → suggestions-BO4EvOXc.js} +1 -1
- package/dist/cjs/{suggestions-C6Q3kj5J.js → suggestions-Ca575hi-.js} +3 -3
- package/dist/cjs/test-component.cjs.entry.js +1 -1
- package/dist/cjs/{toggle-handler-BaOOa9I5.js → toggle-handler-ByJYSOdb.js} +11 -13
- package/dist/cjs/{unique-nav-labels-CgxOyb6V.js → unique-nav-labels-_EHPpYUR.js} +1 -1
- package/dist/cjs/{unit-_oDj-vIB.js → unit-Bl0Lyk08.js} +1 -1
- package/dist/cjs/{validators-CpCJvM4r.js → validators-rLs6tEWo.js} +1 -1
- package/dist/cjs/{value-string-CKppMGVM.js → value-string-BKsvZy1q.js} +1 -1
- package/dist/cjs/{width-e7f3wHF3.js → width-DegQFxQB.js} +1 -1
- package/dist/collection/components/abbr/style.css +21 -0
- package/dist/collection/components/accordion/style.css +23 -2
- package/dist/collection/components/alert/component.js +6 -5
- package/dist/collection/components/alert/style.css +23 -2
- package/dist/collection/components/avatar/style.css +21 -0
- package/dist/collection/components/badge/style.css +23 -2
- package/dist/collection/components/breadcrumb/style.css +23 -2
- package/dist/collection/components/button/style.css +23 -2
- package/dist/collection/components/button-link/style.css +23 -2
- package/dist/collection/components/card/style.css +26 -2
- package/dist/collection/components/combobox/style.css +23 -2
- package/dist/collection/components/details/style.css +23 -2
- package/dist/collection/components/dialog/base.js +2 -2
- package/dist/collection/components/dialog/style.css +26 -2
- package/dist/collection/components/drawer/style.css +26 -2
- package/dist/collection/components/form/style.css +23 -2
- package/dist/collection/components/heading/style.css +21 -0
- package/dist/collection/components/icon/style.css +2 -2
- package/dist/collection/components/image/style.css +21 -0
- package/dist/collection/components/input-checkbox/component.js +13 -11
- package/dist/collection/components/input-checkbox/style.css +23 -2
- package/dist/collection/components/input-color/component.js +6 -4
- package/dist/collection/components/input-color/style.css +23 -2
- package/dist/collection/components/input-date/component.js +9 -7
- package/dist/collection/components/input-date/style.css +23 -2
- package/dist/collection/components/input-email/component.js +4 -1
- package/dist/collection/components/input-email/style.css +23 -2
- package/dist/collection/components/input-file/component.js +6 -3
- package/dist/collection/components/input-file/style.css +23 -2
- package/dist/collection/components/input-number/component.js +6 -4
- package/dist/collection/components/input-number/style.css +23 -2
- package/dist/collection/components/input-password/component.js +5 -2
- package/dist/collection/components/input-password/style.css +23 -2
- package/dist/collection/components/input-radio/style.css +23 -2
- package/dist/collection/components/input-range/style.css +23 -2
- package/dist/collection/components/input-text/component.js +4 -2
- package/dist/collection/components/input-text/style.css +23 -2
- package/dist/collection/components/kolibri/style.css +21 -0
- package/dist/collection/components/link/style.css +23 -2
- package/dist/collection/components/link-button/style.css +23 -2
- package/dist/collection/components/meter/style.css +21 -0
- package/dist/collection/components/modal/style.css +26 -2
- package/dist/collection/components/nav/style.css +23 -2
- package/dist/collection/components/pagination/component.js +5 -5
- package/dist/collection/components/pagination/style.css +23 -2
- package/dist/collection/components/popover-button/style.css +23 -2
- package/dist/collection/components/progress/style.css +21 -0
- package/dist/collection/components/quote/style.css +21 -0
- package/dist/collection/components/select/style.css +23 -2
- package/dist/collection/components/single-select/style.css +23 -2
- package/dist/collection/components/skip-nav/style.css +23 -2
- package/dist/collection/components/spin/style.css +21 -0
- package/dist/collection/components/split-button/style.css +23 -2
- package/dist/collection/components/table-stateful/component.js +7 -6
- package/dist/collection/components/table-stateful/style.css +26 -2
- package/dist/collection/components/table-stateless/component.js +3 -5
- package/dist/collection/components/table-stateless/style.css +26 -2
- package/dist/collection/components/tabs/style.css +23 -2
- package/dist/collection/components/textarea/style.css +23 -2
- package/dist/collection/components/toaster/style.css +23 -2
- package/dist/collection/components/toolbar/style.css +23 -2
- package/dist/collection/components/tree/component.js +15 -4
- package/dist/collection/components/tree/style.css +21 -0
- package/dist/collection/components/tree-item/component.js +5 -2
- package/dist/collection/components/tree-item/style.css +23 -2
- package/dist/collection/components/version/style.css +23 -2
- package/dist/collection/core/i18n.js +2 -1
- package/dist/collection/internal/functional-components/alert/component.js +2 -1
- package/dist/collection/internal/functional-components/avatar/component.js +2 -2
- package/dist/collection/internal/functional-components/badge/component.js +2 -1
- package/dist/collection/internal/functional-components/bem-root-node/component.js +16 -6
- package/dist/collection/internal/functional-components/breadcrumb/component.js +2 -2
- package/dist/collection/internal/functional-components/card/component.js +3 -1
- package/dist/collection/internal/functional-components/collapsible/component.js +3 -2
- package/dist/collection/internal/functional-components/dialog/component.js +6 -3
- package/dist/collection/internal/functional-components/dialog/item.js +2 -2
- package/dist/collection/internal/functional-components/drawer/component.js +1 -1
- package/dist/collection/internal/functional-components/form-association/api.js +2 -2
- package/dist/collection/internal/functional-components/form-association/behavior.js +1 -5
- package/dist/collection/internal/functional-components/form-field/base-web-component.js +0 -1
- package/dist/collection/internal/functional-components/heading/component.js +3 -4
- package/dist/collection/internal/functional-components/icon/component.js +2 -2
- package/dist/collection/internal/functional-components/image/component.js +2 -4
- package/dist/collection/internal/functional-components/link/component.js +1 -1
- package/dist/collection/internal/functional-components/meter/component.js +2 -1
- package/dist/collection/internal/functional-components/pagination/item.js +6 -6
- package/dist/collection/internal/functional-components/progress/component.js +2 -1
- package/dist/collection/internal/functional-components/quote/component.js +2 -2
- package/dist/collection/internal/functional-components/skip-nav/component.js +2 -2
- package/dist/collection/internal/functional-components/span/component.js +3 -2
- package/dist/collection/internal/functional-components/table-stateless/settings.js +12 -4
- package/dist/collection/internal/functional-components/tree/component.js +2 -2
- package/dist/collection/internal/functional-components/tree-item/component.js +2 -2
- package/dist/collection/schema/bem-registry.js +61 -0
- package/dist/collection/schema/props/aria-details.js +1 -22
- package/dist/collection/schema/props/aria-labelledby.js +3 -12
- package/dist/collection/utils/aria-labelledby.js +0 -12
- package/dist/components/Heading.js +1 -1
- package/dist/components/aria-labelledby.js +1 -1
- package/dist/components/base-web-component2.js +1 -1
- package/dist/components/base-web-component3.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/base3.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/component.js +1 -1
- package/dist/components/component10.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/component5.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/group.js +1 -1
- package/dist/components/i18n2.js +1 -1
- package/dist/components/input-container.js +1 -1
- package/dist/components/input.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/links.js +1 -1
- package/dist/components/number-value.js +1 -1
- package/dist/components/props-from-config.js +1 -1
- package/dist/components/resolve-props.js +1 -1
- package/dist/components/resolve-props2.js +1 -1
- package/dist/components/rows.js +1 -1
- package/dist/components/scroll-lock.js +1 -1
- package/dist/components/step.js +1 -1
- package/dist/components/toggle-handler.js +1 -1
- package/dist/components/unit.js +1 -1
- package/dist/components/validators.js +1 -1
- package/dist/esm/{Heading-C_CwXDMp.js → Heading-BubZbykM.js} +2 -2
- package/dist/esm/{api-DGiFM9p0.js → api-D0RNr-zh.js} +21 -22
- package/dist/esm/{app-globals-sZHZyXjD.js → app-globals-DYRte_jr.js} +2 -2
- package/dist/esm/{aria-labelledby-CLehu03h.js → aria-labelledby-DqJY_4G-.js} +1 -13
- package/dist/esm/{base-DTKJ1Z06.js → base-BP5SdLvQ.js} +39 -41
- package/dist/esm/{base-B4sGK9cX.js → base-BbGt9eYx.js} +10 -10
- package/dist/esm/{base-CWrvN3Gt.js → base-CLsKm3-e.js} +10 -10
- package/dist/esm/{base-P1TaQ7Ba.js → base-Cz00snD6.js} +10 -10
- package/dist/esm/{base-web-component-CC_gpyDb.js → base-web-component-CYPdDdRn.js} +1 -1
- package/dist/esm/{base-web-component-CKgIOZqi.js → base-web-component-CdSFFCst.js} +8 -10
- package/dist/esm/{base-web-component-Bq_B9edx.js → base-web-component-DP9_OPgV.js} +13 -14
- package/dist/esm/{behavior-Bb7JYoUn.js → behavior-B6y5Gofe.js} +4 -4
- package/dist/esm/{behavior-CFG1f4KQ.js → behavior-BJR8CKBx.js} +4 -4
- package/dist/esm/{behavior-CkPQGfgo.js → behavior-DlH8byIw.js} +6 -12
- package/dist/esm/{bem-registry-DQUGxdIS.js → bem-registry-SKACeCny.js} +61 -0
- package/dist/esm/{bootstrap-tgQ2nQQI.js → bootstrap-Bp7i4RJQ.js} +1 -1
- package/dist/esm/{color-D1gM-F2l.js → color-BbljGuAW.js} +2 -2
- package/dist/esm/component-6_YiKr2Z.js +48 -0
- package/dist/esm/{component-W1KZI4h4.js → component-B8UMedaK.js} +4 -4
- package/dist/esm/{component-5Uu-ahLC.js → component-CMHB3reH.js} +6 -5
- package/dist/esm/{component-B16Fbp3W.js → component-CNgECeRi.js} +9 -11
- package/dist/esm/{component-Bc2pdOk1.js → component-CSsUaL_h.js} +6 -8
- package/dist/esm/{component-DAQzDMY8.js → component-CiJGQTU0.js} +13 -15
- package/dist/esm/{component-C79oAu7a.js → component-DEwcJKDA.js} +4 -4
- package/dist/esm/{component-CldKbBUh.js → component-NOe28NXD.js} +5 -6
- package/dist/esm/{component-BI8jDgBz.js → component-ZdHnXLLI.js} +10 -11
- package/dist/esm/component-bIIx1x7q.js +17 -0
- package/dist/esm/{component-oUQcgxDj.js → component-hiabKVP3.js} +6 -7
- package/dist/esm/{contrast-BNoQruBh.js → contrast-DtK0a6X2.js} +1 -1
- package/dist/esm/{dev.utils-DDWOHUcg.js → dev.utils-B0t4rcBV.js} +1 -1
- package/dist/esm/{devtools-B0kEE_za.js → devtools-DuJRc6wJ.js} +2 -2
- package/dist/esm/{disabled-BZXlWAgK.js → disabled-B2o4Ctgy.js} +1 -1
- package/dist/esm/{field-control-DsQHa0v9.js → field-control-C9dIXnES.js} +7 -7
- package/dist/esm/{group-DUVsgWxS.js → group-DydT1Z92.js} +5 -6
- package/dist/esm/{has-closer-DUB0QcS9.js → has-closer-BrG00xL7.js} +1 -1
- package/dist/esm/{href-CxokGOJ2.js → href-CfNF4pHX.js} +1 -1
- package/dist/esm/{i18n-ePBcLlCr.js → i18n-BLkzMf6D.js} +1 -1
- package/dist/esm/{i18n-4J6U3ZDc.js → i18n-BRgvVqCf.js} +2 -1
- package/dist/esm/{id-BI0ZuK17.js → id-Bh4FF8c0.js} +1 -1
- package/dist/esm/{index-Dulj0jro.js → index-Bbr6Os1b.js} +1 -1
- package/dist/esm/index.js +4 -4
- package/dist/esm/{input-C0Li7DsE.js → input-C1YsxnDL.js} +4 -5
- package/dist/esm/{input-container-DmtMTcjB.js → input-container-zXl_6y52.js} +6 -8
- package/dist/esm/{item-CnJMuEyl.js → item-DXDEHrEg.js} +4 -4
- package/dist/esm/{item-DHZGDrAn.js → item-Dms_59sU.js} +11 -11
- package/dist/esm/{item-8RKFpmbd.js → item-hsQoejqZ.js} +4 -4
- package/dist/esm/{item-CxVe5INa.js → item-zXunNZh5.js} +17 -18
- package/dist/esm/kol-abbr.entry.js +7 -11
- package/dist/esm/kol-accordion.entry.js +15 -17
- package/dist/esm/kol-alert.entry.js +27 -30
- package/dist/esm/kol-avatar.entry.js +14 -15
- package/dist/esm/kol-badge.entry.js +23 -26
- package/dist/esm/kol-breadcrumb.entry.js +26 -30
- package/dist/esm/kol-button-link.entry.js +22 -25
- package/dist/esm/kol-button.entry.js +22 -25
- package/dist/esm/kol-card.entry.js +27 -30
- package/dist/esm/kol-combobox.entry.js +37 -40
- package/dist/esm/kol-details.entry.js +15 -17
- package/dist/esm/kol-dialog.entry.js +30 -33
- package/dist/esm/kol-drawer.entry.js +30 -33
- package/dist/esm/kol-form.entry.js +23 -26
- package/dist/esm/kol-heading.entry.js +13 -15
- package/dist/esm/kol-icon.entry.js +8 -9
- package/dist/esm/kol-image.entry.js +7 -9
- package/dist/esm/kol-input-checkbox.entry.js +48 -50
- package/dist/esm/kol-input-color.entry.js +42 -44
- package/dist/esm/kol-input-date.entry.js +44 -47
- package/dist/esm/kol-input-email.entry.js +45 -47
- package/dist/esm/kol-input-file.entry.js +39 -41
- package/dist/esm/kol-input-number.entry.js +46 -48
- package/dist/esm/kol-input-password.entry.js +43 -45
- package/dist/esm/kol-input-radio.entry.js +35 -38
- package/dist/esm/kol-input-range.entry.js +37 -40
- package/dist/esm/kol-input-text.entry.js +45 -47
- package/dist/esm/kol-kolibri.entry.js +7 -11
- package/dist/esm/kol-link-button.entry.js +23 -26
- package/dist/esm/kol-link.entry.js +23 -26
- package/dist/esm/kol-meter.entry.js +14 -15
- package/dist/esm/kol-modal.entry.js +30 -33
- package/dist/esm/kol-nav.entry.js +30 -33
- package/dist/esm/kol-pagination.entry.js +42 -45
- package/dist/esm/kol-popover-button.entry.js +23 -26
- package/dist/esm/kol-progress.entry.js +13 -14
- package/dist/esm/kol-quote.entry.js +9 -10
- package/dist/esm/kol-select.entry.js +36 -39
- package/dist/esm/kol-single-select.entry.js +37 -40
- package/dist/esm/kol-skip-nav.entry.js +26 -30
- package/dist/esm/kol-spin.entry.js +11 -15
- package/dist/esm/kol-split-button.entry.js +26 -29
- package/dist/esm/kol-table-stateful.entry.js +55 -57
- package/dist/esm/kol-table-stateless.entry.js +40 -44
- package/dist/esm/kol-tabs.entry.js +22 -25
- package/dist/esm/kol-textarea.entry.js +39 -42
- package/dist/esm/kol-toast-container.entry.js +19 -22
- package/dist/esm/kol-toolbar.entry.js +27 -30
- package/dist/esm/kol-tooltip-wc.entry.js +11 -12
- package/dist/esm/kol-tree-item.entry.js +27 -28
- package/dist/esm/kol-tree.entry.js +24 -14
- package/dist/esm/kol-version.entry.js +20 -23
- package/dist/esm/kolibri.js +4 -4
- package/dist/esm/{label-B-Dr7VaP.js → label-BQVd3bkc.js} +3 -3
- package/dist/esm/{label-hints-CLMiVvfk.js → label-hints-CZGo9ZD5.js} +1 -1
- package/dist/esm/{label-lang-segment-iVD9hoM3.js → label-lang-segment-C5LYGOHt.js} +2 -2
- package/dist/esm/label-with-expert-slot-D1tpX9DI.js +12 -0
- package/dist/esm/{level-DsQ_pcyD.js → level-BVXGgbSM.js} +1 -1
- package/dist/esm/{link-target-D7lYILOV.js → link-target-BWPSEd9a.js} +1 -1
- package/dist/esm/{links-IkK4zoXw.js → links-BbsnNXfa.js} +1 -1
- package/dist/esm/loader.js +4 -4
- package/dist/esm/{multiple--ay1C1n3.js → multiple-S3Ol1G6Z.js} +1 -1
- package/dist/esm/{number-value-Dl9-2O4r.js → number-value-DmOl1z7z.js} +1 -1
- package/dist/esm/{open-CNHJhHsy.js → open-DPP79Urq.js} +1 -1
- package/dist/esm/{options-DwO32GBF.js → options-aA3M-QV2.js} +1 -1
- package/dist/esm/{orientation-ChJ0S24M.js → orientation-DlsgaY1v.js} +1 -1
- package/dist/esm/{placeholder-UxmBJ4Vl.js → placeholder-DlHbiVjz.js} +1 -1
- package/dist/esm/{props-from-config-ytxYrJUY.js → props-from-config-BOUcpF7e.js} +84 -6
- package/dist/esm/{read-only-DytZ5HZJ.js → read-only-DSBWEPED.js} +1 -1
- package/dist/esm/{required-BriHhuO4.js → required-xw5BBPvV.js} +1 -1
- package/dist/esm/{resolve-props-02J6OCRf.js → resolve-props-CL8wxjtP.js} +7 -7
- package/dist/esm/{resolve-props-Bj6IaybL.js → resolve-props-DAVb5BM3.js} +6 -6
- package/dist/esm/{rows-I1jrTjzU.js → rows-DRV8YlQv.js} +1 -1
- package/dist/esm/{scroll-lock-B6hVv8A8.js → scroll-lock-BxAe0gL5.js} +9 -7
- package/dist/esm/{smart-button-DM5g48-g.js → smart-button-CQps8AlL.js} +1 -1
- package/dist/esm/{spell-check-BWCnJG5v.js → spell-check-hy6xFhmT.js} +1 -1
- package/dist/esm/{src-ziOwSglN.js → src-AwoM1pRe.js} +1 -1
- package/dist/esm/{step-BcyhvRtu.js → step-CopA0_m7.js} +1 -1
- package/dist/esm/{suggestions-DaB3FVaz.js → suggestions-BsiiaAxK.js} +3 -3
- package/dist/esm/{suggestions-LO267l8F.js → suggestions-CY8BJMOa.js} +1 -1
- package/dist/esm/test-component.entry.js +1 -1
- package/dist/esm/{toggle-handler-3qaN2kmt.js → toggle-handler-ZMs2rBXc.js} +10 -12
- package/dist/esm/{unique-nav-labels-CxFUYSVY.js → unique-nav-labels-BV-M3fPR.js} +1 -1
- package/dist/esm/{unit-1ix-K9SD.js → unit-hmMwqE9a.js} +1 -1
- package/dist/esm/{validators-CTjxOidB.js → validators-BgDmq-Qt.js} +1 -1
- package/dist/esm/{value-string-CxDz7dhD.js → value-string-Dy8zJxlP.js} +1 -1
- package/dist/esm/{width-C1_yZHyL.js → width-BHn7XHj_.js} +1 -1
- package/dist/kolibri/Heading-BubZbykM.js +4 -0
- package/dist/kolibri/api-D0RNr-zh.js +4 -0
- package/dist/kolibri/app-globals-DYRte_jr.js +4 -0
- package/dist/kolibri/aria-labelledby-DqJY_4G-.js +4 -0
- package/dist/kolibri/base-BP5SdLvQ.js +4 -0
- package/dist/kolibri/base-BbGt9eYx.js +4 -0
- package/dist/kolibri/base-CLsKm3-e.js +4 -0
- package/dist/kolibri/base-Cz00snD6.js +4 -0
- package/dist/kolibri/{base-web-component-CC_gpyDb.js → base-web-component-CYPdDdRn.js} +1 -1
- package/dist/kolibri/base-web-component-CdSFFCst.js +4 -0
- package/dist/kolibri/base-web-component-DP9_OPgV.js +4 -0
- package/dist/kolibri/{behavior-Bb7JYoUn.js → behavior-B6y5Gofe.js} +1 -1
- package/dist/kolibri/{behavior-CFG1f4KQ.js → behavior-BJR8CKBx.js} +1 -1
- package/dist/kolibri/behavior-DlH8byIw.js +4 -0
- package/dist/kolibri/bem-registry-SKACeCny.js +4 -0
- package/dist/kolibri/{bootstrap-tgQ2nQQI.js → bootstrap-Bp7i4RJQ.js} +1 -1
- package/dist/kolibri/{color-D1gM-F2l.js → color-BbljGuAW.js} +1 -1
- package/dist/kolibri/component-6_YiKr2Z.js +4 -0
- package/dist/kolibri/{component-W1KZI4h4.js → component-B8UMedaK.js} +1 -1
- package/dist/kolibri/component-CMHB3reH.js +4 -0
- package/dist/kolibri/component-CNgECeRi.js +4 -0
- package/dist/kolibri/{component-Bc2pdOk1.js → component-CSsUaL_h.js} +1 -1
- package/dist/kolibri/component-CiJGQTU0.js +4 -0
- package/dist/kolibri/component-DEwcJKDA.js +4 -0
- package/dist/kolibri/component-NOe28NXD.js +4 -0
- package/dist/kolibri/component-ZdHnXLLI.js +4 -0
- package/dist/kolibri/component-bIIx1x7q.js +4 -0
- package/dist/kolibri/component-hiabKVP3.js +4 -0
- package/dist/kolibri/contrast-DtK0a6X2.js +4 -0
- package/dist/kolibri/{dev.utils-DDWOHUcg.js → dev.utils-B0t4rcBV.js} +1 -1
- package/dist/kolibri/{devtools-B0kEE_za.js → devtools-DuJRc6wJ.js} +1 -1
- package/dist/kolibri/disabled-B2o4Ctgy.js +4 -0
- package/dist/kolibri/field-control-C9dIXnES.js +4 -0
- package/dist/kolibri/group-DydT1Z92.js +4 -0
- package/dist/kolibri/has-closer-BrG00xL7.js +4 -0
- package/dist/kolibri/href-CfNF4pHX.js +4 -0
- package/dist/kolibri/{i18n-ePBcLlCr.js → i18n-BLkzMf6D.js} +1 -1
- package/dist/kolibri/{i18n-4J6U3ZDc.js → i18n-BRgvVqCf.js} +1 -1
- package/dist/kolibri/id-Bh4FF8c0.js +4 -0
- package/dist/kolibri/index-Bbr6Os1b.js +6 -0
- package/dist/kolibri/index.esm.js +1 -1
- package/dist/kolibri/input-C1YsxnDL.js +4 -0
- package/dist/kolibri/{input-container-DmtMTcjB.js → input-container-zXl_6y52.js} +1 -1
- package/dist/kolibri/item-DXDEHrEg.js +4 -0
- package/dist/kolibri/item-Dms_59sU.js +4 -0
- package/dist/kolibri/item-hsQoejqZ.js +4 -0
- package/dist/kolibri/item-zXunNZh5.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/label-BQVd3bkc.js +4 -0
- package/dist/kolibri/label-hints-CZGo9ZD5.js +4 -0
- package/dist/kolibri/label-lang-segment-C5LYGOHt.js +4 -0
- package/dist/kolibri/label-with-expert-slot-D1tpX9DI.js +4 -0
- package/dist/kolibri/level-BVXGgbSM.js +4 -0
- package/dist/kolibri/link-target-BWPSEd9a.js +4 -0
- package/dist/kolibri/{links-IkK4zoXw.js → links-BbsnNXfa.js} +1 -1
- package/dist/kolibri/multiple-S3Ol1G6Z.js +4 -0
- package/dist/kolibri/number-value-DmOl1z7z.js +4 -0
- package/dist/kolibri/open-DPP79Urq.js +4 -0
- package/dist/kolibri/{options-DwO32GBF.js → options-aA3M-QV2.js} +1 -1
- package/dist/kolibri/orientation-DlsgaY1v.js +4 -0
- package/dist/kolibri/placeholder-DlHbiVjz.js +4 -0
- package/dist/kolibri/props-from-config-BOUcpF7e.js +4 -0
- package/dist/kolibri/read-only-DSBWEPED.js +4 -0
- package/dist/kolibri/required-xw5BBPvV.js +4 -0
- package/dist/kolibri/resolve-props-CL8wxjtP.js +4 -0
- package/dist/kolibri/resolve-props-DAVb5BM3.js +4 -0
- package/dist/kolibri/rows-DRV8YlQv.js +4 -0
- package/dist/kolibri/scroll-lock-BxAe0gL5.js +4 -0
- package/dist/kolibri/{smart-button-DM5g48-g.js → smart-button-CQps8AlL.js} +1 -1
- package/dist/kolibri/spell-check-hy6xFhmT.js +4 -0
- package/dist/kolibri/src-AwoM1pRe.js +4 -0
- package/dist/kolibri/step-CopA0_m7.js +4 -0
- package/dist/kolibri/{suggestions-DaB3FVaz.js → suggestions-BsiiaAxK.js} +1 -1
- package/dist/kolibri/{suggestions-LO267l8F.js → suggestions-CY8BJMOa.js} +1 -1
- package/dist/kolibri/test-component.entry.js +1 -1
- package/dist/kolibri/toggle-handler-ZMs2rBXc.js +4 -0
- package/dist/kolibri/unique-nav-labels-BV-M3fPR.js +4 -0
- package/dist/kolibri/unit-hmMwqE9a.js +4 -0
- package/dist/kolibri/validators-BgDmq-Qt.js +4 -0
- package/dist/kolibri/value-string-Dy8zJxlP.js +4 -0
- package/dist/kolibri/{width-C1_yZHyL.js → width-BHn7XHj_.js} +1 -1
- package/dist/types/components/alert/component.d.ts +1 -0
- package/dist/types/components/input-date/component.d.ts +1 -1
- package/dist/types/components/table-stateful/component.d.ts +0 -1
- package/dist/types/components/table-stateless/component.d.ts +0 -1
- package/dist/types/components/tree/component.d.ts +1 -0
- package/dist/types/components.d.ts +6 -6
- package/dist/types/internal/functional-components/bem-root-node/component.d.ts +8 -4
- package/dist/types/internal/functional-components/button/item.d.ts +1 -1
- package/dist/types/internal/functional-components/dialog/component.d.ts +7 -3
- package/dist/types/internal/functional-components/form-association/api.d.ts +1 -1
- package/dist/types/internal/functional-components/form-association/behavior.d.ts +0 -1
- package/dist/types/internal/functional-components/pagination/item.d.ts +4 -2
- package/dist/types/schema/bem-registry.d.ts +89 -0
- package/dist/types/schema/props/aria-details.d.ts +0 -2
- package/dist/types/schema/props/aria-labelledby.d.ts +1 -2
- package/dist/types/utils/aria-labelledby.d.ts +0 -6
- package/doc/pagination.md +13 -13
- package/doc/table-stateful.md +16 -16
- package/doc/table-stateless.md +14 -14
- package/package.json +10 -5
- package/vscode-custom-data.json +3 -3
- package/dist/cjs/block-bem-ByCgFI2B.js +0 -18
- package/dist/cjs/clsx-Bm_HQUnh.js +0 -54
- package/dist/cjs/component-1J4G5HmZ.js +0 -53
- package/dist/cjs/component-CjXcCX2V.js +0 -20
- package/dist/cjs/component-DkV9oPCL.js +0 -18
- package/dist/cjs/input-BKXEykG_.js +0 -20
- package/dist/components/block-bem.js +0 -4
- package/dist/components/clsx.js +0 -4
- package/dist/components/component11.js +0 -4
- package/dist/esm/block-bem-BGIVcYJu.js +0 -16
- package/dist/esm/clsx-COFh-Vc8.js +0 -52
- package/dist/esm/component-B05zRrM0.js +0 -16
- package/dist/esm/component-Clz6b6ho.js +0 -18
- package/dist/esm/component-Ct11K0Gv.js +0 -48
- package/dist/esm/label-with-expert-slot-BbZ9nx0l.js +0 -12
- package/dist/kolibri/Heading-C_CwXDMp.js +0 -4
- package/dist/kolibri/api-DGiFM9p0.js +0 -4
- package/dist/kolibri/app-globals-sZHZyXjD.js +0 -4
- package/dist/kolibri/aria-labelledby-CLehu03h.js +0 -4
- package/dist/kolibri/base-B4sGK9cX.js +0 -4
- package/dist/kolibri/base-CWrvN3Gt.js +0 -4
- package/dist/kolibri/base-DTKJ1Z06.js +0 -4
- package/dist/kolibri/base-P1TaQ7Ba.js +0 -4
- package/dist/kolibri/base-web-component-Bq_B9edx.js +0 -4
- package/dist/kolibri/base-web-component-CKgIOZqi.js +0 -4
- package/dist/kolibri/behavior-CkPQGfgo.js +0 -4
- package/dist/kolibri/bem-registry-DQUGxdIS.js +0 -4
- package/dist/kolibri/block-bem-BGIVcYJu.js +0 -4
- package/dist/kolibri/clsx-COFh-Vc8.js +0 -4
- package/dist/kolibri/component-5Uu-ahLC.js +0 -4
- package/dist/kolibri/component-B05zRrM0.js +0 -4
- package/dist/kolibri/component-B16Fbp3W.js +0 -4
- package/dist/kolibri/component-BI8jDgBz.js +0 -4
- package/dist/kolibri/component-C79oAu7a.js +0 -4
- package/dist/kolibri/component-CldKbBUh.js +0 -4
- package/dist/kolibri/component-Clz6b6ho.js +0 -4
- package/dist/kolibri/component-Ct11K0Gv.js +0 -4
- package/dist/kolibri/component-DAQzDMY8.js +0 -4
- package/dist/kolibri/component-oUQcgxDj.js +0 -4
- package/dist/kolibri/contrast-BNoQruBh.js +0 -4
- package/dist/kolibri/disabled-BZXlWAgK.js +0 -4
- package/dist/kolibri/field-control-DsQHa0v9.js +0 -4
- package/dist/kolibri/group-DUVsgWxS.js +0 -4
- package/dist/kolibri/has-closer-DUB0QcS9.js +0 -4
- package/dist/kolibri/href-CxokGOJ2.js +0 -4
- package/dist/kolibri/id-BI0ZuK17.js +0 -4
- package/dist/kolibri/index-Dulj0jro.js +0 -6
- package/dist/kolibri/input-C0Li7DsE.js +0 -4
- package/dist/kolibri/item-8RKFpmbd.js +0 -4
- package/dist/kolibri/item-CnJMuEyl.js +0 -4
- package/dist/kolibri/item-CxVe5INa.js +0 -4
- package/dist/kolibri/item-DHZGDrAn.js +0 -4
- package/dist/kolibri/label-B-Dr7VaP.js +0 -4
- package/dist/kolibri/label-hints-CLMiVvfk.js +0 -4
- package/dist/kolibri/label-lang-segment-iVD9hoM3.js +0 -4
- package/dist/kolibri/label-with-expert-slot-BbZ9nx0l.js +0 -4
- package/dist/kolibri/level-DsQ_pcyD.js +0 -4
- package/dist/kolibri/link-target-D7lYILOV.js +0 -4
- package/dist/kolibri/multiple--ay1C1n3.js +0 -4
- package/dist/kolibri/number-value-Dl9-2O4r.js +0 -4
- package/dist/kolibri/open-CNHJhHsy.js +0 -4
- package/dist/kolibri/orientation-ChJ0S24M.js +0 -4
- package/dist/kolibri/placeholder-UxmBJ4Vl.js +0 -4
- package/dist/kolibri/props-from-config-ytxYrJUY.js +0 -4
- package/dist/kolibri/read-only-DytZ5HZJ.js +0 -4
- package/dist/kolibri/required-BriHhuO4.js +0 -4
- package/dist/kolibri/resolve-props-02J6OCRf.js +0 -4
- package/dist/kolibri/resolve-props-Bj6IaybL.js +0 -4
- package/dist/kolibri/rows-I1jrTjzU.js +0 -4
- package/dist/kolibri/scroll-lock-B6hVv8A8.js +0 -4
- package/dist/kolibri/spell-check-BWCnJG5v.js +0 -4
- package/dist/kolibri/src-ziOwSglN.js +0 -4
- package/dist/kolibri/step-BcyhvRtu.js +0 -4
- package/dist/kolibri/toggle-handler-3qaN2kmt.js +0 -4
- package/dist/kolibri/unique-nav-labels-CxFUYSVY.js +0 -4
- package/dist/kolibri/unit-1ix-K9SD.js +0 -4
- package/dist/kolibri/validators-CTjxOidB.js +0 -4
- package/dist/kolibri/value-string-CxDz7dhD.js +0 -4
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
import { h } from './index-
|
|
5
|
-
import { b as bem } from './bem-registry-
|
|
6
|
-
import {
|
|
4
|
+
import { h } from './index-Bbr6Os1b.js';
|
|
5
|
+
import { b as bem } from './bem-registry-SKACeCny.js';
|
|
6
|
+
import { e as clsx, B as BemRootNodeFC } from './props-from-config-BOUcpF7e.js';
|
|
7
7
|
|
|
8
8
|
const dialogBem = bem.forBlock('kol-dialog');
|
|
9
9
|
const modalBem = bem.forBlock('kol-modal');
|
|
10
|
-
const dialogBlockClass = (variant) => clsx(dialogBem(), modalBem(), dialogBem(variant), modalBem(variant));
|
|
11
10
|
const DialogFC = (props, children) => {
|
|
12
|
-
const {
|
|
13
|
-
|
|
11
|
+
const { class: hostClass, elementClass, handleCancel, handleClose, label, labelledBy, modal, refDialog, variant, width } = props;
|
|
12
|
+
if (variant !== undefined) {
|
|
13
|
+
return (h(BemRootNodeFC, { component: "dialog", "aria-label": labelledBy ? undefined : label, "aria-labelledby": labelledBy, "aria-modal": modal ? 'true' : 'false', block: "kol-dialog", class: clsx(modalBem(), dialogBem(variant), modalBem(variant), hostClass), onCancel: handleCancel, onClose: handleClose, ref: refDialog, style: width ? { width } : undefined }, children));
|
|
14
|
+
}
|
|
15
|
+
return (h("dialog", { "aria-label": labelledBy ? undefined : label, "aria-labelledby": labelledBy, "aria-modal": modal ? 'true' : 'false', class: clsx(elementClass, hostClass), onCancel: handleCancel, onClose: handleClose, ref: refDialog, style: width ? { width } : undefined }, children));
|
|
14
16
|
};
|
|
15
17
|
|
|
16
18
|
const SCROLL_LOCK_OWNERS = new Set();
|
|
@@ -62,4 +64,4 @@ function unlockScroll(owner) {
|
|
|
62
64
|
}
|
|
63
65
|
}
|
|
64
66
|
|
|
65
|
-
export { DialogFC as D,
|
|
67
|
+
export { DialogFC as D, lockScroll as l, unlockScroll as u };
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
4
|
import { p as parseJson } from './common-BdSzSIXg.js';
|
|
5
|
-
import { c as createPropDefinition } from './props-from-config-
|
|
5
|
+
import { c as createPropDefinition } from './props-from-config-BOUcpF7e.js';
|
|
6
6
|
|
|
7
7
|
function normalizeSmartButton(value) {
|
|
8
8
|
const parsed = typeof value === 'string' ? parseJson(value) : value;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
import { c as createPropDefinition, n as normalizeBoolean } from './props-from-config-
|
|
4
|
+
import { c as createPropDefinition, n as normalizeBoolean } from './props-from-config-BOUcpF7e.js';
|
|
5
5
|
|
|
6
6
|
const spellCheckProp = createPropDefinition('spellCheck', undefined, normalizeBoolean);
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
import { c as createPropDefinition, b as normalizeString } from './props-from-config-
|
|
4
|
+
import { c as createPropDefinition, b as normalizeString } from './props-from-config-BOUcpF7e.js';
|
|
5
5
|
|
|
6
6
|
const srcProp = createPropDefinition('src', '', normalizeString);
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
import { c as createPropDefinition,
|
|
4
|
+
import { c as createPropDefinition, C as normalizeInputNumber } from './props-from-config-BOUcpF7e.js';
|
|
5
5
|
|
|
6
6
|
const stepProp = createPropDefinition('step', undefined, normalizeInputNumber);
|
|
7
7
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
import { c as createPropDefinition, b as normalizeString } from './props-from-config-
|
|
4
|
+
import { c as createPropDefinition, b as normalizeString } from './props-from-config-BOUcpF7e.js';
|
|
5
5
|
import { a as __rest } from './tslib.es6-QNbPBOk5.js';
|
|
6
|
-
import { h } from './index-
|
|
7
|
-
import { a as createRelatedUniqueId } from './dev.utils-
|
|
6
|
+
import { h } from './index-Bbr6Os1b.js';
|
|
7
|
+
import { a as createRelatedUniqueId } from './dev.utils-B0t4rcBV.js';
|
|
8
8
|
|
|
9
9
|
const autoCompleteProp = createPropDefinition('autoComplete', 'off', normalizeString, (value) => value.length > 0);
|
|
10
10
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
4
|
import { n as a11yHint, p as parseJson } from './common-BdSzSIXg.js';
|
|
5
|
-
import { c as createPropDefinition } from './props-from-config-
|
|
5
|
+
import { c as createPropDefinition } from './props-from-config-BOUcpF7e.js';
|
|
6
6
|
|
|
7
7
|
function normalizeSuggestions(value) {
|
|
8
8
|
const parsed = typeof value === 'string' ? parseJson(value) : value;
|
|
@@ -2,17 +2,15 @@
|
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
4
|
import './common-BdSzSIXg.js';
|
|
5
|
-
import { l as levelProp } from './level-
|
|
6
|
-
import { a as createCallbacksPropDefinition } from './props-from-config-
|
|
7
|
-
import { d as disabledProp } from './disabled-
|
|
8
|
-
import { l as labelLangSegmentsProp } from './label-lang-segment-
|
|
9
|
-
import { o as openProp } from './open-
|
|
10
|
-
import { h } from './index-
|
|
11
|
-
import { K as KolHeadingFc } from './Heading-
|
|
12
|
-
import { c as clsx } from './clsx-COFh-Vc8.js';
|
|
5
|
+
import { l as levelProp } from './level-BVXGgbSM.js';
|
|
6
|
+
import { a as createCallbacksPropDefinition, g as getBlockBem, e as clsx, B as BemRootNodeFC } from './props-from-config-BOUcpF7e.js';
|
|
7
|
+
import { d as disabledProp } from './disabled-B2o4Ctgy.js';
|
|
8
|
+
import { l as labelLangSegmentsProp } from './label-lang-segment-C5LYGOHt.js';
|
|
9
|
+
import { o as openProp } from './open-DPP79Urq.js';
|
|
10
|
+
import { h } from './index-Bbr6Os1b.js';
|
|
11
|
+
import { K as KolHeadingFc } from './Heading-BubZbykM.js';
|
|
13
12
|
import { p as preventFocus } from './element-interaction-sGYdEpmv.js';
|
|
14
|
-
import {
|
|
15
|
-
import { S as SpanFC } from './component-oUQcgxDj.js';
|
|
13
|
+
import { S as SpanFC } from './component-hiabKVP3.js';
|
|
16
14
|
import { d as dispatchDomEvent, K as KolEvent } from './events-CRHxtwup.js';
|
|
17
15
|
|
|
18
16
|
const collapsibleCallbacksProp = createCallbacksPropDefinition();
|
|
@@ -24,10 +22,10 @@ const collapsiblePropsConfig = {
|
|
|
24
22
|
|
|
25
23
|
const CollapsibleFC = ({ block, contentClass, controlId, detailsOpen, disabled, expanded, handleToggle, headingId, icons, label, level, refHeadingButton, transitionMs }, children) => {
|
|
26
24
|
const blockBem = getBlockBem(block);
|
|
27
|
-
return (h("details",
|
|
25
|
+
return (h(BemRootNodeFC, { component: "details", block: block, modifiers: {
|
|
28
26
|
disabled: disabled === true,
|
|
29
27
|
open: expanded === true,
|
|
30
|
-
}
|
|
28
|
+
}, open: detailsOpen === true, style: { '--collapsible-transition-duration': `${transitionMs}ms` } }, h("summary", { "aria-controls": controlId, "aria-disabled": disabled === true ? 'true' : undefined, class: blockBem('heading'), id: headingId, onClick: handleToggle, onMouseDown: disabled === true ? preventFocus : undefined, ref: refHeadingButton, tabIndex: disabled === true ? -1 : undefined }, h(KolHeadingFc, { level: level !== null && level !== void 0 ? level : 0 }, h(SpanFC, { icons: icons, label: label }))), h("div", { class: blockBem('wrapper') }, h("div", { class: blockBem('wrapper-animation') }, h("div", { "aria-hidden": expanded === false ? 'true' : undefined, "aria-labelledby": headingId, class: clsx(blockBem('content'), contentClass), id: controlId, role: "region" }, children)))));
|
|
31
29
|
};
|
|
32
30
|
|
|
33
31
|
const DEFAULT_COLLAPSIBLE_TRANSITION_MS = 300;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
4
|
import { L as Log } from './common-BdSzSIXg.js';
|
|
5
|
-
import { t as trimLabel } from './props-from-config-
|
|
5
|
+
import { t as trimLabel } from './props-from-config-BOUcpF7e.js';
|
|
6
6
|
|
|
7
7
|
const UNIQUE_LABELS = new Set();
|
|
8
8
|
function addNavLabel(ariaLabel) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
import { c as createPropDefinition,
|
|
4
|
+
import { c as createPropDefinition, D as normalizeNumber, b as normalizeString } from './props-from-config-BOUcpF7e.js';
|
|
5
5
|
|
|
6
6
|
const maxProp = createPropDefinition('max', 100, normalizeNumber, (v) => v > 0);
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
import {
|
|
4
|
+
import { j as isValidLabelSegments, z as isValidLabelString } from './props-from-config-BOUcpF7e.js';
|
|
5
5
|
|
|
6
6
|
const SAFE_CLASS_NAME_RE = /^[a-zA-Z][a-zA-Z0-9_-]{0,60}$/;
|
|
7
7
|
const isSafeClassName = (value) => typeof value === 'string' && SAFE_CLASS_NAME_RE.test(value);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
import { c as createPropDefinition, b as normalizeString } from './props-from-config-
|
|
4
|
+
import { c as createPropDefinition, b as normalizeString } from './props-from-config-BOUcpF7e.js';
|
|
5
5
|
|
|
6
6
|
const stringValueProp = createPropDefinition('value', undefined, normalizeString);
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
import { c as createPropDefinition, b as normalizeString } from './props-from-config-
|
|
4
|
+
import { c as createPropDefinition, b as normalizeString } from './props-from-config-BOUcpF7e.js';
|
|
5
5
|
|
|
6
6
|
function normalizeDialogCallbacks(value) {
|
|
7
7
|
if (typeof value !== 'object' || value === null) {
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* KoliBri - The accessible HTML-Standard
|
|
3
|
+
*/
|
|
4
|
+
import{a as e}from"./tslib.es6-QNbPBOk5.js";import{h as s}from"./index-Bbr6Os1b.js";import{e as l}from"./props-from-config-BOUcpF7e.js";const r=1;function a(e){return function(e){return e>=r&&e<=6}(e)?`h${e}`:"strong"}const o=(o,n)=>{var{class:c,level:t=r}=o,i=e(o,["class","level"]);const d=a(t);return s(d,Object.assign({class:l("kol-headline",`kol-headline--${d}`,c)},i),n)},n=(r,a)=>{var{class:o}=r,n=e(r,["class"]);return s("p",Object.assign({class:l("kol-headline kol-headline--group kol-headline--secondary",o)},n),a)},c=(a,c)=>{var{secondaryHeadline:t,level:i=r,class:d,HeadingGroupProps:p={},SecondaryHeadlineProps:u={}}=a,b=e(a,["secondaryHeadline","level","class","HeadingGroupProps","SecondaryHeadlineProps"]);const g=Object.assign({level:i},b);if(!t)return s(o,Object.assign({class:l(d,"kol-headline--single")},g),c);const{class:h}=p,j=e(p,["class"]),O=Object.assign({class:l("kol-heading-group",h)},j);return s("hgroup",Object.assign({},O),s(o,Object.assign({class:l(d,"kol-headline--group","kol-headline--primary")},g),c),s(n,Object.assign({},u),t))};export{c as K,a as g}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* KoliBri - The accessible HTML-Standard
|
|
3
|
+
*/
|
|
4
|
+
import{a as e}from"./tslib.es6-QNbPBOk5.js";import{p as i,j as t,D as o}from"./common-BdSzSIXg.js";import{S as s,b as l,s as r}from"./component-hiabKVP3.js";import{r as a}from"./aria-labelledby-DqJY_4G-.js";import{c as n,b as d,n as h,a as c,e as p,B as u,t as m}from"./props-from-config-BOUcpF7e.js";import{a as b,c as v,n as f}from"./dev.utils-B0t4rcBV.js";import{K as g,d as y}from"./events-CRHxtwup.js";import{d as j}from"./disabled-B2o4Ctgy.js";import{j as B,h as _,e as L}from"./component-DEwcJKDA.js";import{l as O}from"./label-with-expert-slot-D1tpX9DI.js";import{n as D}from"./component-CNgECeRi.js";import{B as C}from"./base-web-component-CYPdDdRn.js";import{c as K}from"./item-hsQoejqZ.js";import{F as N}from"./behavior-DlH8byIw.js";import{c as T}from"./item-Dms_59sU.js";import{T as F}from"./behavior-B6y5Gofe.js";import{h as w}from"./index-Bbr6Os1b.js";import{t as x}from"./i18n-BLkzMf6D.js";import{b as P}from"./bem-registry-SKACeCny.js";import{T as A}from"./component-B8UMedaK.js";import{P as k}from"./component-CSsUaL_h.js";import{A as I}from"./component-ZdHnXLLI.js";function H(e,i){return Boolean(e)&&!0===i}function M(e){var i;return"string"==typeof e?"error":null!==(i=null==e?void 0:e._type)&&void 0!==i?i:"error"}const S=n("ariaDetails","",d),q=n("hideMsg",!1,h),E=n("hint","",d),z=n("infoPopover",void 0,(function(e){if("object"==typeof e&&null!==e)return e;throw new Error("Invalid info popover: "+typeof e)})),$=c(),R=n("msg",void 0,(function(e){if("string"==typeof e)try{return i(e)}catch(i){return e}return e}),(function(e){return void 0===e||("string"==typeof e?e.length>0:t(e)&&o(e._description,1))})),U=n("touched",!1,h),V=i=>{var{id:t,class:o,hint:s,baseClassName:l="kol-form-field"}=i,r=e(i,["id","class","hint","baseClassName"]);return s?w("span",Object.assign({class:p(`${l}__hint`,o),id:b(t||"","hint")},r),s):null},X=i=>{var{component:t="label",id:o,baseClassName:r="kol-form-field",class:a,accessKey:n,shortKey:d,label:h,hideLabel:c,hasExpertSlot:u,omitId:m,showBadge:v=!0,readOnly:f,infoPopover:g}=i,y=e(i,["component","id","baseClassName","class","accessKey","shortKey","label","hideLabel","hasExpertSlot","omitId","showBadge","readOnly","infoPopover"]);const j=!u&&c,B=!1===v?void 0:l(n,d);return w(t,Object.assign({},y,{class:p(`${r}__label`,a),id:j||m?void 0:b(o,"label"),hidden:j,htmlFor:"legend"===t?void 0:o}),w(s,{class:`${r}__label-text`,label:u?"":null!=h?h:"",badgeText:B},w("slot",{name:"expert"})),!u&&f&&w("span",{class:`${r}__label__read-only`,"aria-hidden":"true"},"(",x("kol-readonly"),")"),!u&&g&&w("span",null,w(k,Object.assign({},g.popoverButton),w("div",{class:"kol-popover-button__popover--styled"},g.content))))},G=t=>{var o,s,{alert:l,hideMsg:r,msg:a,id:n,class:d}=t,h=e(t,["alert","hideMsg","msg","id","class"]);const c=function(e){if("string"==typeof e)try{return i(e)}catch(i){return{_description:e,_type:"error"}}return e&&"object"==typeof e&&!("_type"in e)?Object.assign(Object.assign({},e),{_type:"error"}):e}(a);return w(I,Object.assign({alert:!r&&(null!==(o=null==c?void 0:c._alert)&&void 0!==o?o:!0===l),class:p("kol-form-field__msg",r&&"visually-hidden",d),closerAriaDescriptionId:f(),handleCloserClick:()=>{},hasCloser:!1,headingId:v("alert-heading"),id:b(n,"msg"),label:"",level:0,refCloserButton:()=>{},refCloserTooltip:()=>{},type:null!==(s=null==c?void 0:c._type)&&void 0!==s?s:"error",variant:"msg"},h),(null==c?void 0:c._description)||void 0)},J=P.forBlock("kol-form-field"),Q=({hideLabel:e,label:i,renderNoTooltip:t})=>!t&&!r(i)&&!0===e,Y=e=>{const i=M(e);return{[i]:!0,[`msg-type-${i}`]:!0}},Z=(i,t)=>{const{renderNoLabel:o,renderNoTooltip:s,renderNoHint:a,id:n,required:d,alert:h,disabled:c,class:m,msg:v,hideMsg:f,hideLabel:g,label:y,infoPopover:j,hint:_,accessKey:L,shortKey:O,counter:D,readOnly:C,touched:K,maxLength:N,ariaDescribedBy:T,showBadge:F,tooltipAlign:P,variant:k,component:I="div",orientation:M,refInput:S,refTooltip:q}=i,E=e(i,["renderNoLabel","renderNoTooltip","renderNoHint","id","required","alert","disabled","class","msg","hideMsg","hideLabel","label","infoPopover","hint","accessKey","shortKey","counter","readOnly","touched","maxLength","ariaDescribedBy","showBadge","tooltipAlign","variant","component","orientation","refInput","refTooltip"]),z=r(y),$=H(v,K),R=l(L,O),U=Q({hideLabel:g,label:y,renderNoTooltip:s}),Z="fieldset"===I;return w(u,Object.assign({component:I,block:"kol-form-field",modifiers:Object.assign({disabled:Boolean(c),required:Boolean(d),touched:Boolean(K),"hide-label":Boolean(g),"read-only":Boolean(C),"hidden-msg":Boolean(f)},$?Y(v):{}),class:p(k&&B(k,"form-field"),m),disabled:!(!Z||!c)||void 0,"aria-describedby":T},E),!o&&w(X,{component:Z?"legend":"label",class:Z?"kol-form-field__label--legend":void 0,id:n,hasExpertSlot:z,hideLabel:g,label:y,accessKey:L,shortKey:O,readOnly:C,showBadge:F,infoPopover:j}),w("div",{class:J("input",{"orientation-horizontal":"horizontal"===M,"orientation-vertical":"vertical"===M}),ref:S},t,U&&w("div",{class:J("tooltip")},w(A,{badgeText:R||"",label:y,align:P,id:b(n,"label"),refFloating:q}))),D&&!("soft"===D.maxLengthBehavior&&"number"!=typeof D.maxLength)&&w("div",{class:J("counter")},w("span",{"aria-hidden":"true",class:J("counter"),ref:D.visualRef}),w("span",{"aria-live":"polite",class:"visually-hidden",id:b(n,"counter"),ref:D.ariaRef})),$&&w(G,{id:n,alert:h,hideMsg:f,msg:v}),!a&&w(V,{id:n,hint:_}),"number"==typeof N&&!D&&w("span",{id:b(n,"character-limit-hint"),class:"visually-hidden"},x("kol-character-limit-hint",{placeholders:{limit:String(N)}})))};class W extends C{constructor(){super(...arguments),this.tooltipBehavior=new F(C.stateLess),this.smartButton=K((()=>this.host)),this.infoPopover=T({getFlagHost:()=>this.host,getOpen:()=>!0===this.infoPopoverOpen,setOpen:e=>{this.infoPopoverOpen=e}}),this.focusEventSent=!1,this.handleChange=(e,i)=>{var t,o;e.stopPropagation(),void 0===i&&(i=e.target.value),this.emit(g.change,i),null===(o=null===(t=this._on)||void 0===t?void 0:t.onChange)||void 0===o||o.call(t,e,i)},this.handleInput=(e,i)=>{var t,o;e.stopPropagation(),void 0===i&&(i=e.target.value),this.emit(g.input,i),this.formAssociation.setFormAssociatedValue(i),null===(o=null===(t=this._on)||void 0===t?void 0:t.onInput)||void 0===o||o.call(t,e,i)},this.handleClick=e=>{var i,t;this.emit(g.click),null===(t=null===(i=this._on)||void 0===i?void 0:i.onClick)||void 0===t||t.call(i,e)},this.handleFocus=e=>{var i,t;this.focusEventSent||(this.emit(g.focus),null===(t=null===(i=this._on)||void 0===i?void 0:i.onFocus)||void 0===t||t.call(i,e),this.focusEventSent=!0),this.shared.setState("inputHasFocus",!0)},this.handleBlur=e=>{this.handleFocusLeave(e),this.shared.setState("inputHasFocus",!1)},this.handleKeyDown=e=>{var i,t;this.emit(g.keydown),null===(t=null===(i=this._on)||void 0===i?void 0:i.onKeyDown)||void 0===t||t.call(i,e)},this.setInputRef=e=>{this.tooltipAnchor=e,e&&this.isTooltipShown()&&(this.tooltipBehavior.initContext(e),this.tooltipBehavior.syncListeners(void 0,e,!0))},this.setTooltipRef=e=>{this.tooltipBehavior.setTooltipElementRef(e)}}get shared(){return this}initFormAssociation(e,i){this.formAssociation=new N(C.stateLess,{host:this.host,type:e,name:i})}syncFormField(){this.smartButton.syncListeners(),this.infoPopover.syncListeners(),this.syncAriaDetails()}destroyFormField(){this.tooltipBehavior.destroy(),this.smartButton.destroy(),this.infoPopover.destroy()}connectedCallback(){this.syncFormField(),this.tooltipAnchor&&this.isTooltipShown()&&(this.tooltipBehavior.initContext(this.tooltipAnchor),this.tooltipBehavior.syncListeners(void 0,this.tooltipAnchor,!0))}getInfoPopover(){const i=this.shared.getRenderProp("infoPopover");if(!i)return;const{_content:t}=i,o=e(i,["_content"]);return{popoverButton:this.infoPopover.getFcProps(Object.assign(Object.assign({_variant:"ghost"},o),{_hideLabel:!0,_inline:!0})),content:t}}getSmartButtonFcProps(e,i){if("object"==typeof e&&null!==e)return this.smartButton.getFcProps(Object.assign({_hideLabel:!0,_disabled:i},e),{class:"kol-input-container__smart-button"})}applyAriaDetails(e){S.apply(e,(e=>this.shared.setRenderProp("ariaDetails",e))),this.syncAriaDetails()}syncAriaDetails(){var e,i,t,o;const s=null===(i=null===(e=this.host)||void 0===e?void 0:e.shadowRoot)||void 0===i?void 0:i.querySelector("input, select, textarea");if(!s||!("ariaDetailsElements"in s))return;const l=a(this.host,this.shared.getRenderProp("ariaDetails")),r=this.pushedDetailsElements;(s!==this.ariaDetailsTarget||(null!==(t=null==r?void 0:r.length)&&void 0!==t?t:0)!==l.length||null!==(o=null==r?void 0:r.some(((e,i)=>e!==l[i])))&&void 0!==o&&o)&&(this.ariaDetailsTarget=s,this.pushedDetailsElements=l,s.ariaDetailsElements=l.length?l:null)}applyDisabled(e){j.apply(e,(e=>this.shared.setRenderProp("disabled",e)))}applyHideLabel(e){_.apply(e,(e=>this.shared.setRenderProp("hideLabel",e)))}applyHideMsg(e){q.apply(e,(e=>this.shared.setRenderProp("hideMsg",e)))}applyHint(e){E.apply(e,(e=>this.shared.setRenderProp("hint",e)))}applyInfoPopover(e){z.apply(e,(e=>this.shared.setRenderProp("infoPopover",e)))}applyLabel(e){O.apply(e,(e=>this.shared.setRenderProp("label",e)),this.isRequired("label"))}applyMsg(e){R.apply(e,(e=>this.shared.setRenderProp("msg",e)))}applyName(e){D.apply(e,(e=>this.shared.setRenderProp("name",e))),this.formAssociation.watchName(e)}applyOn(e){$.apply(e,(e=>this.shared.setRenderProp("on",e)))}applySyncValueBySelector(e){this.formAssociation.watchSyncValueBySelector(e)}applyTooltipAlign(e){L.apply(null!=e?e:"top",(e=>this.shared.setRenderProp("tooltipAlign",e)))}applyTouched(e){U.apply(e,(e=>this.shared.setRenderProp("touched",e)))}get eventHost(){var e,i;return null!==(i=null===(e=this.formAssociation)||void 0===e?void 0:e.host)&&void 0!==i?i:this.host}emit(e,i){this.eventHost&&y(this.eventHost,e,i)}handleFocusLeave(e){var i,t;if(this._disabled)return;const o=this.eventHost,s=(null==o?void 0:o.shadowRoot)||o,l=(null==s?void 0:s.contains(e.relatedTarget))||o===e.relatedTarget;this.focusEventSent&&!l&&(this._touched=!0,this.emit(g.blur),null===(t=null===(i=this._on)||void 0===i?void 0:i.onBlur)||void 0===t||t.call(i,e),this.focusEventSent=!1)}getAria(){const e=this.shared;return(({id:e,msg:i,hint:t,touched:o})=>{const s="string"==typeof i?i:null==i?void 0:i._description,l=Boolean(s&&s.length>0),r="error"===M(i)&&l&&!0===o,a="string"==typeof t&&t.length>0,n=[];return l&&!0===o&&n.push(b(e,"msg")),a&&n.push(b(e,"hint")),{hasError:r,hasHint:a,ariaDescribedBy:n}})({id:e.getState("id"),msg:e.getRenderProp("msg"),hint:e.getRenderProp("hint"),touched:e.getRenderProp("touched")})}showAsAlert(){return Boolean(this.shared.getRenderProp("touched"))&&!this.shared.getState("inputHasFocus")}isTooltipShown(){const e=this.shared;return Q({hideLabel:e.getRenderProp("hideLabel"),label:m(e.getRenderProp("label"))})}getLabelTooltipRefs(){return{refInput:this.setInputRef,refTooltip:this.setTooltipRef}}getFormFieldProps({class:e,accessKey:i,shortKey:t,variant:o,counter:s,maxLength:r,readOnly:a,renderNoLabel:n,renderNoTooltip:d,required:h}){const c=this.shared,p=c.getState("id"),u=c.getRenderProp("label"),m=c.getRenderProp("tooltipAlign");return this.isTooltipShown()?(this.tooltipBehavior.watchAlign(m),this.tooltipBehavior.watchBadgeText(l(i,t)||""),this.tooltipBehavior.watchId(b(p,"label")),this.tooltipBehavior.watchLabel(u)):this.tooltipBehavior.destroy(),{id:p,disabled:c.getRenderProp("disabled"),msg:c.getRenderProp("msg"),hint:c.getRenderProp("hint"),label:u,hideLabel:c.getRenderProp("hideLabel"),hideMsg:c.getRenderProp("hideMsg"),touched:c.getRenderProp("touched"),showBadge:Boolean(i)||Boolean(t),required:h,readOnly:a,accessKey:i,shortKey:t,maxLength:r,counter:s,variant:o,class:e,tooltipAlign:m,alert:this.showAsAlert(),infoPopover:this.getInfoPopover(),renderNoLabel:n,renderNoTooltip:d,refInput:d?void 0:this.setInputRef,refTooltip:this.setTooltipRef}}}function ee({ariaDescribedBy:e,hideLabel:i,label:t}){return{title:"",autoCapitalize:"off",autoCorrect:"off","aria-describedby":(null==e?void 0:e.length)?e.join(" "):void 0,"aria-label":i&&t?m(t):void 0}}const ie={required:[O],optional:[S,j,_,q,E,z,$,R,D,L,U]};export{W as B,Z as F,V as a,X as b,ee as c,ie as f,M as g,H as i}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* KoliBri - The accessible HTML-Standard
|
|
3
|
+
*/
|
|
4
|
+
import{L as o,d as t,w as s}from"./common-BdSzSIXg.js";import{a as r}from"./index-Bbr6Os1b.js";const a=(()=>{r((o=>{try{o.shadowRoot instanceof ShadowRoot&&t(o,s(o))}catch(o){}return"default"})),import("./devtools-DuJRc6wJ.js").then((o=>{"object"==typeof o&&null!==o&&"function"==typeof o.initialize&&o.initialize()})).catch((t=>{o.error(t)}))})||(()=>{});export{a as g}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* KoliBri - The accessible HTML-Standard
|
|
3
|
+
*/
|
|
4
|
+
const o=(o,n)=>{const e=(null!=n?n:"").trim().split(/\s+/).filter(Boolean);if(!e.length)return[];const t=null==o?void 0:o.getRootNode();return e.map((o=>"undefined"!=typeof Document&&t instanceof Document?t.getElementById(o):"undefined"!=typeof ShadowRoot&&t instanceof ShadowRoot?t.querySelector(`#${(o=>{var n;return(null===(n=globalThis.CSS)||void 0===n?void 0:n.escape)?globalThis.CSS.escape(o):o.replace(/[^a-zA-Z0-9_-]/g,"\\$&")})(o)}`):"undefined"!=typeof document?document.getElementById(o):null)).filter((o=>!!o))};export{o as r}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* KoliBri - The accessible HTML-Standard
|
|
3
|
+
*/
|
|
4
|
+
import{r as t}from"./aria-labelledby-DqJY_4G-.js";import{G as e,p as o,L as l}from"./common-BdSzSIXg.js";import{h as i,F as s,f as n}from"./index-Bbr6Os1b.js";import{B as a}from"./base-web-component-CYPdDdRn.js";import{c as r}from"./item-hsQoejqZ.js";import{c}from"./item-pool-BOxAYePG.js";import{c as d}from"./item-DXDEHrEg.js";import{c as h,f as u,n as b,a as p,r as v,t as f,B as m,v as y}from"./props-from-config-BOUcpF7e.js";import{l as g}from"./label-lang-segment-C5LYGOHt.js";import{v as k,j}from"./component-DEwcJKDA.js";import{c as C,d as S,e as w}from"./component-names-Dhbtt0mX.js";import{t as x}from"./i18n-BLkzMf6D.js";import{b as O}from"./bem-registry-SKACeCny.js";import{B as _}from"./component-CNgECeRi.js";import{I as $}from"./component-bIIx1x7q.js";import{L as D}from"./component-CiJGQTU0.js";import{r as L}from"./component-hiabKVP3.js";import{S as B}from"./component-NOe28NXD.js";import{T as F}from"./component-B8UMedaK.js";import{a as I}from"./tslib.es6-QNbPBOk5.js";import{n as E,c as A}from"./dev.utils-B0t4rcBV.js";import{d as T,K as z}from"./events-CRHxtwup.js";import{A as M}from"./component-ZdHnXLLI.js";import{l as H}from"./level-BVXGgbSM.js";import{c as K}from"./element-interaction-sGYdEpmv.js";import{u as N,l as P,D as G}from"./scroll-lock-BxAe0gL5.js";import{h as R}from"./tooltip-open-tracking-D3tCiiGP.js";import{d as X,w as Y}from"./width-BHn7XHj_.js";import{r as V,C as q}from"./component-6_YiKr2Z.js";import{T as U}from"./behavior-B6y5Gofe.js";import{C as W}from"./keyboard-DNd73LVa.js";const J=(o,l,i)=>{const s=t=>"string"==typeof t||void 0===t;return e(o,"_ariaLabelledby",s,new Set(["string"]),i),s(i)?t(l,i):[]},Q=t=>"number"==typeof t&&Number.isInteger(t)&&t>=0,Z=h("fixedCols",[0,0],(t=>u(t)),(t=>2===t.length&&t.every(Q))),tt=h("hasSettingsMenu",!1,b),et=p();function ot(t){const e="string"==typeof t?o(t):t;if(Array.isArray(e))return e;throw new Error("Invalid table data: expected an array of row objects.")}function lt(t){return t.every((t=>"object"==typeof t&&null!==t))}const it=h("data",[],ot,lt),st=h("dataFoot",[],ot,lt),nt=t=>Array.isArray(t)&&t.every((t=>Array.isArray(t))),at=h("headers",{horizontal:[],vertical:[]},(function(t){const e="string"==typeof t?o(t):t;if("object"!=typeof e||null===e)throw new Error("Invalid table headers: expected an object.");const{horizontal:l=[],vertical:i=[]}=e;if(!nt(l)||!nt(i))throw new Error("Invalid table headers: horizontal and vertical must be arrays of header rows.");return{horizontal:l,vertical:i}}),(function({horizontal:t,vertical:e}){return[...t,...e].every((t=>t.every((t=>void 0===t.width||"number"==typeof t.width))))})),rt=h("loading",!1,b),ct=h("selection",!1,(function(t){const e="string"==typeof t?o(t):t;if("object"==typeof e&&null!==e)return e;throw new Error("Invalid table selection: expected an object.")}),(function(t){return!1===t||"function"==typeof t.label&&(!t.selectedKeys||Array.isArray(t.selectedKeys))})),dt={required:[g,it],optional:[Z,tt,et,st,at,rt,ct,k]},ht=t=>t.flatMap((t=>t.filter((t=>"string"==typeof t.key||"function"==typeof t.render)))),ut=t=>{const e=ht(t.horizontal);if(e.length>0)return{cells:e,horizontal:!0};const o=ht(t.vertical);return{cells:o,horizontal:0===o.length}},bt=(t,e)=>{let o=0;return Array.isArray(t)&&t.forEach((t=>{var l;o+=null!==(l=t[e])&&void 0!==l?l:1})),o},pt=(t,e)=>{const o=Math.max(0,...t.map((t=>bt(t,"colSpan"))));return 0===o?e.length:o},vt=t=>{var e;return null!==(e=null==t?void 0:t.reduce(((t,e)=>"visible"in e&&!1===e.visible?t:t+(e.colSpan||1)),0))&&void 0!==e?e:0},ft=(t,e,o,l)=>{if(void 0!==l&&!e)return l<t[0]?"left":t[1]>0&&l>=o-t[1]?"right":void 0},mt=(t,e,o,l)=>{var i,s,n,a,r,c;const d=[];for(let a=0;a<e;a++)"left"===ft(o,l,e,a)&&(d[a]=(null!==(i=d[a-1])&&void 0!==i?i:0)+(null!==(n=null===(s=t[a-1])||void 0===s?void 0:s.width)&&void 0!==n?n:0));for(let i=e-1;i>=0;i--)"right"===ft(o,l,e,i)&&(d[i]=(null!==(a=d[i+1])&&void 0!==a?a:0)+(null!==(c=null===(r=t[i+1])||void 0===r?void 0:r.width)&&void 0!==c?c:0));return d},yt=(t,e,o,l)=>{const i=void 0===e?void 0:t[e];return o&&l?`calc( var(--kol-table-selection-col-width) + ${i}px)`:`${i}px`},gt=(t,e,o,l)=>{if(0===(e.horizontal?t.horizontal:t.vertical).length)return;const i=e.cells[o];return(null==i?void 0:i.type)===l?i:void 0},kt=({data:t,dataFoot:e,headers:o,isFoot:l,noEntriesLabel:i,primaryHeaders:s})=>{const n=pt(o.horizontal,t),a=s.cells;let r=((t,e,o)=>{const l=Math.max(0,...t.map((t=>bt(t,"rowSpan"))));return 0===l?e.length:l-o})(o.vertical,t,e.length),c=0;l&&(c=r,r+=e.length);const d=[],h=[],u=[];o.vertical.forEach(((t,e)=>{h[e]=0,u[e]=[]}));for(let i=c;i<r;i++){const r=[];o.vertical.forEach(((t,e)=>{let o=0;if(u[e].forEach((t=>o+=t)),o<=i){const l=t[i-o+h[e]];if("object"==typeof l){r.push(Object.assign(Object.assign({},l),{headerCell:!0,data:{}}));let t=1;if("number"==typeof l.rowSpan&&l.rowSpan>1&&(t=l.rowSpan),u[e].push(t),"number"==typeof l.colSpan&&l.colSpan>1)for(let o=1;o<l.colSpan;o++)u[e+o].push(t);h[e]++}}}));for(let o=0;o<n;o++)if(s.horizontal){const s=l?e[i-c]:t[i],n=a[o];"object"==typeof n&&null!==n&&"object"==typeof s&&null!==s&&r.push(Object.assign(Object.assign({},n),{colIndex:o,colSpan:void 0,rowSpan:void 0,data:s,label:s[n.key]}))}else{const e=a[i];"object"==typeof e&&null!==e&&"object"==typeof t[o]&&null!==t[o]&&r.push(Object.assign(Object.assign({},e),{colIndex:o,colSpan:void 0,rowSpan:void 0,data:t[o],label:t[o][e.key]}))}d.push(r)}if(0===t.length){let t=vt(o.horizontal[0]),e=0;o.vertical.length>0&&(t-=o.vertical.length,o.vertical[0].forEach((t=>{e+=t.rowSpan||1})));const l={colSpan:t,label:i,render:void 0,rowSpan:Math.max(e,1)};0===d.length?d.push([l]):d[0].push(l)}return d},jt=({horizontal:t,vertical:e})=>{const o=t.flatMap((t=>t.filter((t=>!1!==t.visible&&void 0!==t.width&&t.width>0)).map((t=>t.width)))),l=[...e.flatMap((t=>t.filter((t=>void 0!==t.width&&t.width>0)).map((t=>t.width)))),...o];return 0===l.length?"0px":1===l.length?`${l[0]}px`:`calc(${l.map((t=>`${t}px`)).join(" + ")})`},Ct=t=>void 0===t?[]:Array.isArray(t)?t:[t],St=t=>{var e;return null!==(e=t?t.keyPropertyName:void 0)&&void 0!==e?e:"id"},wt=t=>{const e=t?Ct(t.selectedKeys):[];return{disabledKeys:new Set((t?Ct(t.disabledKeys):[]).map(String)),keyPropertyName:St(t),selectedKeys:e,selectedKeysSet:new Set(e.map(String))}},xt=(t,e)=>t.filter((t=>!e.disabledKeys.has(String(t[e.keyPropertyName])))),Ot=O.forBlock("kol-table"),_t=Ot("body"),$t=Ot("cell-actions"),Dt=Ot("cell-states"),Lt=Ot("footer"),Bt=Ot("head"),Ft=Ot("head-row"),It=Ot("scroll-container"),Et=Ot("selection-icon"),At=Ot("selection-input-tooltip"),Tt=Ot("sort"),zt=Ot("sort-button"),Mt=Ot("sort-order"),Ht=Ot("table"),Kt=`${Ot("focus-element")} ${Ot("caption")}`,Nt="caption",Pt=(t,e)=>ft(t.fixedCols,t.stickyColsDisabled,t.maxCols,e),Gt=(t,e,o)=>({left:"left"===e?yt(t.fixedOffsets,o,!0,!1!==t.selection):void 0,right:"right"===e?yt(t.fixedOffsets,o,!1,!1!==t.selection):void 0}),Rt=(t,e,o)=>{var l,i;return null!==(i=t.primaryHeaders.horizontal&&(null===(l=e[0])||void 0===l?void 0:l.data)?t.rowKeys.get(e[0].data):void 0)&&void 0!==i?i:String(o)},Xt=t=>{const e=x("kol-sort");return"number"==typeof t&&t>0?`${e} – ${x("kol-table-sort-order").replace("{{order}}",`${t}`)}`:e},Yt=(t,e,o,l,s)=>{if(!1===e.visible)return"";const n=!1!==(null==e?void 0:e.sortable)&&"string"==typeof e.sortDirection;let a="none",r="kolicon-sort-neutral";if(n&&e.sortDirection)switch(e.sortDirection){case"ASC":r="kolicon-sort-asc",a="ascending";break;case"DESC":r="kolicon-sort-desc",a="descending";break;default:a="none"}const c=s?"row":"number"==typeof e.colSpan&&e.colSpan>1?"colgroup":"col",d="number"==typeof e.sortOrder&&e.sortOrder>0?e.sortOrder:void 0,h=void 0!==e.width?`${e.width}px`:void 0,u=Pt(t,l),{left:b,right:p}=Gt(t,u,l),v=e.textAlign,f=n?e.sortDirection:void 0;return i("th",{key:`${o}-${l}-${e.label}`,class:Ot("cell",{[a]:!0,"align-center":"center"===v,"align-justify":"justify"===v,"align-left":"left"===v,"align-right":"right"===v,header:!0,"sticky-left":"left"===u,"sticky-right":"right"===u}),scope:c,colSpan:e.colSpan,rowSpan:e.rowSpan,style:{width:h,left:b,right:p},"aria-sort":a,"data-sort":f?`sort-${f}`:void 0},f?i("span",{class:Tt},i(_,Object.assign({},t.getButtonFcProps(`sort-${s?"vertical":"horizontal"}-${o}-${l}`,{_icons:{right:r},_label:e.label,_ariaDescription:Xt(d),_on:{onClick:o=>{t.handleSort(o,{key:e.key,currentSortDirection:f})}}},{class:zt}))),d&&i("span",{"aria-hidden":"true",class:Mt},d)):e.label)},Vt=(t,e,o,l,s=!1)=>i("tr",{class:Ot("row",{body:!s,footer:s}),key:`row-${Rt(t,e,o)}`},((t,e,o)=>{var l;const{handleSelectionChange:s,selection:n,selectionModel:a}=t;if(!n)return"";const r=null===(l=e[0])||void 0===l?void 0:l.data;if(!r)return"";const c=r[a.keyPropertyName],d=n.multiple||void 0===n.multiple,h=String(c),u=a.selectedKeysSet.has(h),b=a.disabledKeys.has(h),p=n.label(r),v={name:"selection",checked:u,disabled:b,id:String(c),"aria-label":p};return i("td",{key:`tbody-${o}-selection`,class:Ot("cell",{selection:!0})},i("div",{class:Ot("selection",{checked:u})},d?i("label",{class:Ot("selection-label",{disabled:b})},i($,{class:Et,icons:"kolicon "+(u?"kolicon-check":""),label:""}),i("input",Object.assign({class:Ot("selection-input",{checkbox:!0})},v,{type:"checkbox",onInput:t=>{const e=u?a.selectedKeys.filter((t=>String(t)!==h)):[...a.selectedKeys,c];s(t,e)}}))):i("label",{class:Ot("selection-label")},i("input",Object.assign({class:Ot("selection-input",{radio:!0})},v,{type:"radio",onInput:t=>{s(t,[c])}}))),i("div",{class:At},i(F,{label:p,badgeText:"",id:`${c}-label`,refFloating:()=>{}}))))})(t,e,o),e.map(((e,s)=>((t,e,o,l,s)=>{if(!1===e.visible)return"";let n=`${o}-${l}-${e.label}`;if(e.data){const i=t.rowKeys.get(e.data);n=i?`${i}-${t.primaryHeaders.horizontal?l:o}`:n}if(e.headerCell)return Yt(t,e,o,l,s);const a="function"!=typeof e.render&&e.label===t.translateNoEntries,r=gt(t.headers,t.primaryHeaders,l,"action"),c=Boolean(r&&e.data),d=gt(t.headers,t.primaryHeaders,l,"state"),h=Boolean(d&&e.data),u=Pt(t,l),{left:b,right:p}=Gt(t,u,e.colIndex),v="function"==typeof e.render,f=e.textAlign;return i("td",{key:`cell-${n}-${t.settingsChangedCounter}`,class:Ot("cell",{actions:c,"align-center":"center"===f,"align-justify":"justify"===f,"align-left":"left"===f,"align-right":"right"===f,body:!0,states:h,"sticky-left":"left"===u,"sticky-right":"right"===u}),"aria-atomic":a?"false":void 0,"aria-live":a?"polite":void 0,"aria-relevant":a?"text":void 0,colSpan:e.colSpan,rowSpan:e.rowSpan,style:{textAlign:f,left:b,right:p},ref:v?o=>t.handleRenderCell(e,o):void 0},c&&r&&e.data?((t,e,o,l)=>i("div",{class:$t},e.actions(o).map(((e,o)=>{const s=`action-${l}-${o}`;return"button"===e.type?i("span",{key:s},i(_,Object.assign({},t.getButtonFcProps(s,e)))):"link"===e.type?i("span",{key:s},i(D,Object.assign({},t.getLinkFcProps(s,e)))):null}))))(t,r,e.data,n):h&&d&&e.data?((t,e,o)=>{const l=t.key;if(!l)return"";const s=e[l];return s?i("div",{class:Dt},s.map(((t,e)=>"badge"===t.type?i(C,Object.assign({key:`state-${o}-${e}`},t)):null))):""})(d,e.data,n):v?"":e.label)})(t,e,o,s,l)))),qt=(t,e,o)=>{const l=t.headers.vertical.length+vt(null==o?void 0:o[0])+(t.selection?1:0);return i("tr",{"aria-hidden":"true",class:Ot("spacer",{[e]:!0})},i("td",{class:Ot("spacer-line",{[e]:!0}),colSpan:l}))},Ut=t=>{const e=v(dt,t),{data:o,dataFoot:l,externalLabelElements:n,fixedCols:a,hasScrollbar:r,hasSettingsMenu:c,headers:d,label:h,loading:u,refScrollContainer:b,refTable:p,selection:y,stickyColsDisabled:g,variant:k}=e,C=x("kol-no-entries"),S=ut(d),w=pt(d.horizontal,o),O=Object.assign(Object.assign({},e),{fixedOffsets:mt(S.cells,w,a,g),maxCols:w,primaryHeaders:S,selectionModel:wt(y),translateNoEntries:C}),_=kt({data:o,dataFoot:l,headers:d,isFoot:!1,noEntriesLabel:C,primaryHeaders:S}),D=0===n.length;return i(m,{block:"kol-table",class:j(k,"table")},c&&t.renderSettings(d.horizontal),i("div",{ref:b,class:It,tabindex:r?D?"-1":"0":void 0},i("table",{ref:p,"aria-labelledby":D?Nt:void 0,class:Ht,style:{minWidth:jt(d)}},D&&i("caption",{class:Kt,id:Nt,ref:t=>{t&&(r?t.tabIndex=0:t.removeAttribute("tabindex"))}},L(h)),i("thead",{class:Bt},[d.horizontal.map(((t,e)=>i("tr",{class:Ft,key:`thead-${e}`},y&&(t=>{const{data:e,handleSelectionChange:o,selection:l,selectionModel:s}=t;if(!l)return i("td",{class:Ot("cell",{header:!0}),key:"thead-0"});if(!1===l.multiple)return i("th",{scope:"col",key:"thead-0-selection",class:Ot("cell",{header:!0,selection:!0})},i("span",{class:"visually-hidden"},x("kol-table-selection")));const n=s.selectedKeys.filter((t=>!s.disabledKeys.has(String(t)))).length,a=n===xt(e,s).length,r=0!==n&&!a;let c;return c=x(0===n?"kol-table-selection-all":a&&!r?"kol-table-selection-none":"kol-table-selection-indeterminate"),i("th",{scope:"col",key:"thead-0-selection",class:Ot("cell",{header:!0,selection:!0})},i("span",{class:"visually-hidden"},x("kol-table-selection")),i("div",{class:Ot("selection",{checked:a,indeterminate:r})},i("label",{class:Ot("selection-label")},i($,{class:Et,icons:"kolicon "+(r?"kolicon-minus":a?"kolicon-check":""),label:""}),i("input",{class:Ot("selection-input",{checkbox:!0}),name:"selection",checked:a&&!r,indeterminate:r,"aria-label":c,type:"checkbox",onInput:t=>{o(t,((t,e,o)=>{const l=e.selectedKeys.filter((t=>e.disabledKeys.has(String(t))));return o&&l.push(...xt(t,e).map((t=>null==t?void 0:t[e.keyPropertyName]))),l})(e,s,!a))}})),i("div",{class:At},i(F,{label:c,badgeText:"",refFloating:()=>{}}))))})(O),0===e&&(({headers:t})=>{const{horizontal:e,vertical:o}=t;if(0===e.length||0===o.length)return i(s,null);const l=o.reduce(((t,e)=>{var o,l;return t+(null!==(l=null===(o=null==e?void 0:e[0])||void 0===o?void 0:o.width)&&void 0!==l?l:0)}),0);return i("td",{"aria-hidden":"true",colSpan:o.length,rowSpan:e.length,style:l>0?{width:`${l}px`}:void 0})})(O),Array.isArray(t)&&t.map(((t,o)=>Yt(O,t,e,o,!1)))))),qt(O,"head",d.horizontal)]),i("tbody",{class:_t},i("div",{class:Ot("loader",{shown:u})},i(B,{label:x(u?"kol-table-data-loading":"kol-table-data-loaded").replace("{{caption}}",f(h)),show:u,variant:"cycle"})),_.map(((t,e)=>Vt(O,t,e,!0)))),(t=>{const{dataFoot:e,headers:o,primaryHeaders:l,translateNoEntries:s}=t;if(0===e.length)return null;const n=kt({data:e,dataFoot:e,headers:o,isFoot:!0,noEntriesLabel:s,primaryHeaders:l}),a=pt(o.horizontal,e),r=Object.assign(Object.assign({},t),{fixedOffsets:mt(l.cells,a,t.fixedCols,t.stickyColsDisabled),maxCols:a});return i("tfoot",{class:Lt},[qt(t,"foot",n),n.map(((t,e)=>Vt(r,t,e,!0,!0)))])})(O))))},Wt=({dialog:t,card:e},o)=>i(G,Object.assign({},t),e?i(q,Object.assign({},e),o):o),Jt=O.forBlock("kol-table")("settings"),Qt=O.forBlock("kol-table-settings"),Zt=Qt(),te=Qt("actions"),ee=Qt("column"),oe=Qt("column-label"),le=Qt("columns"),ie=Qt("content"),se=Qt("error-message"),ne=t=>Number.isFinite(t)&&void 0!==t&&t>0?t:void 0,ae=()=>{},re=(t,e)=>{const o=x("kol-table-settings"),l=x("kol-table-settings-cancel"),s=x("kol-table-settings-apply"),n=x("kol-table-settings-error-all-invisible");let d,h=!1,u=!1;const b=()=>{h=!0,e()},p=c((()=>r(t)),(t=>t.syncListeners()),(t=>t.destroy())),v=((t,e)=>{const o=K(),l=K(),i=new U(a.stateLess),s=E(),n=A("dialog-heading"),r={};let c,h=!0,u={};const b=t=>!d||T(d,t),p=()=>{var t,e;null===(e=null===(t=o.el)||void 0===t?void 0:t.close)||void 0===e||e.call(t)},v=t=>{var e;R(t),t.defaultPrevented||(null===(e=u.onCancel)||void 0===e||e.call(u,t),t.defaultPrevented||b(z.cancel)||t.preventDefault())},m=t=>{var e;t.target===o.el&&(N(r),null===(e=u.onClose)||void 0===e||e.call(u),b(z.close))},k=()=>{i.hideTooltip(),p(),b(z.close)};return{getFcProps:e=>{var a,r,d;let b="",p=0,j="blank",C="100%";g.apply(e.label,(t=>{b=t})),H.apply(null!==(a=e.level)&&void 0!==a?a:0,(t=>{p=t})),X.apply(e.on,(t=>{u=t})),y.apply(null!==(r=e.variant)&&void 0!==r?r:"blank",(t=>{j=t})),Y.apply(null!==(d=e.width)&&void 0!==d?d:"100%",(t=>{C=t}));const S="card"===j;return S&&!c&&(c=V(t()),i.componentWillLoad({label:c.label,align:c.tooltipAlign})),{dialog:{handleCancel:v,handleClose:m,label:f(b),labelledBy:S?n:void 0,modal:h,refDialog:o,variant:j,width:C},card:S&&c?{ariaDescriptionId:s,closeButtonProps:c,handleClose:k,hasCloser:!0,headingId:n,label:b,level:p,refCloseButton:l,refTooltip:i.setTooltipElementRef}:void 0}},show:t=>{var l,i;const s=o.el;(null==s?void 0:s.open)||(h!==t&&(h=t,e()),t?(null===(l=null==s?void 0:s.showModal)||void 0===l||l.call(s),s&&P(r)):null===(i=null==s?void 0:s.show)||void 0===i||i.call(s))},close:p,syncListeners:()=>{l.el&&i.syncListeners(void 0,l.el,!0)},destroy:()=>{p(),N(r),i.destroy()}}})(t,b),m=A("alert-heading"),k=E();let j,C=[],O=[],$=null;const D=()=>{var t;return null!==(t=O[O.length-1])&&void 0!==t?t:[]},L=t=>{O=O.map(((e,o,l)=>o===l.length-1?t:e)),b()},B=(t,e)=>{const o=[...D()],l=o.findIndex((e=>e.key===t));if(-1===l)return;let i;if("up"===e){if(0===l)return;i=l-1}else{if(l===o.length-1)return;i=l+1}const[s]=o.splice(l,1);o.splice(i,0,s),L(o)},F=t=>{if(t.preventDefault(),!D().some((t=>!1!==t.visible)))return $=n,void b();if(d){$=null,C=O.map((t=>t.map((t=>Object.assign({},t))))),b();const t=O.map((t=>t.map((t=>{const e=t,{hidable:o,resizable:l,sortable:i,visible:s,width:n}=e,a=I(e,["hidable","resizable","sortable","visible","width"]),r=Object.assign({},a);return void 0!==s&&(r.visible=s),void 0!==o&&(r.hidable=o),void 0!==i&&(r.sortable=i),void 0!==l&&(r.resizable=l),null!=n&&(r.width=n),r}))));T(d,z.changeHeaderCells,t),v.close()}},G=t=>{t&&(d=t)};return{beginRender:()=>{p.beginRender(),u=h,h=!1},render:t=>{var e;u||t===j||(j=t,C=(e=t).map((t=>[...t])),O=e.map((t=>t.map((t=>Object.assign({},t))))));const n=D();return i("div",{class:Jt,ref:G},i("div",{class:Zt},i(_,Object.assign({},p.get("toggle").getFcProps({_icons:"kolicon-settings",_label:o,_hideLabel:!0,_on:{onClick:()=>v.show(!0)}})))),i(Wt,Object.assign({},v.getFcProps({label:o,variant:"card",width:"fit-content"})),i("div",{class:ie},$&&i("div",{class:se},i(M,{alert:!1,closerAriaDescriptionId:k,handleCloserClick:ae,hasCloser:!1,headingId:m,label:$,level:0,refCloserButton:ae,refCloserTooltip:ae,type:"error",variant:"msg"})),i("form",{onSubmit:F},i("div",{class:le},n.map(((t,e)=>((t,e,o)=>i("div",{key:t.key,class:ee},i(w,{_checked:!1!==t.visible,_label:x(t.hidable?"kol-table-settings-column-hidable":"kol-table-settings-column-not-hidable",{placeholders:{column:t.label}}),_value:!0,_hideLabel:!0,_disabled:!1===t.hidable,_on:{onInput:(e,o)=>{var l;return((t,e)=>{const o=D().map((o=>o.key===t&&!1!==o.hidable?Object.assign(Object.assign({},o),{visible:Boolean(e)}):o));L(o)})(null!==(l=t.key)&&void 0!==l?l:"",o)}}}),i("span",{class:oe},t.label),i(S,{_hideLabel:!0,_value:ne(t.width),_label:x("kol-table-settings-column-width",{placeholders:{column:t.label}}),_min:1,_disabled:!1===t.resizable,_on:{onInput:(e,o)=>{var l;return((t,e)=>{const o=ne(Number(e)),l=D().map((e=>e.key===t&&!1!==e.resizable?Object.assign(Object.assign({},e),{width:o}):e));L(l)})(null!==(l=t.key)&&void 0!==l?l:"",o)}}}),i(_,Object.assign({},p.get(`move-up-${t.key}`).getFcProps({_icons:"kolicon-chevron-up",_label:x(!1===t.sortable||0===e?"kol-table-settings-not-move":"kol-table-settings-move-up",{placeholders:{column:t.label}}),_hideLabel:!0,_variant:"ghost",_on:{onClick:()=>{var e;return B(null!==(e=t.key)&&void 0!==e?e:"","up")}},_disabled:!1===t.sortable||0===e}))),i(_,Object.assign({},p.get(`move-down-${t.key}`).getFcProps({_icons:"kolicon-chevron-down",_label:x(!1===t.sortable||e===o.length-1?"kol-table-settings-not-move":"kol-table-settings-move-down",{placeholders:{column:t.label}}),_hideLabel:!0,_variant:"ghost",_on:{onClick:()=>{var e;return B(null!==(e=t.key)&&void 0!==e?e:"","down")}},_disabled:!1===t.sortable||e===o.length-1})))))(t,e,n)))),i("div",{class:te},i(_,Object.assign({},p.get("cancel").getFcProps({_label:l,_variant:"secondary",_on:{onClick:()=>(O=C.map((t=>[...t])),$=null,b(),void v.close())}}))),i(_,Object.assign({},p.get("apply").getFcProps({_label:s,_variant:"primary",_type:"submit"}))))))))},sync:()=>{p.endRender(),v.syncListeners()},destroy:()=>{p.destroy(),v.destroy()}}};class ce extends a{constructor(){super(...arguments),this.hasExternalTableLabelRefs=!1,this.cellRenderTimeouts=new Map,this.buttonItems=c((()=>r((()=>this.host))),(t=>t.syncListeners()),(t=>t.destroy())),this.settings=re((()=>this.host),(()=>n(this))),this.linkItems=c((()=>d((()=>n(this)))),(t=>t.syncListeners()),(t=>t.destroy())),this.propsConfig=dt,this.handleResize=()=>{this.updateScrollbarState(),clearTimeout(this.resizeDebounceTimeout),this.resizeDebounceTimeout=setTimeout((()=>{this.updateStickyColsDisabled()}),150)},this.handleSelectionChange=(t,e)=>{this.emitSelectionChange(t,e)},this.handleSort=(t,e)=>{this.emitSort(t,e)},this.handleRenderCell=(t,e)=>{e&&(clearTimeout(this.cellRenderTimeouts.get(e)),this.cellRenderTimeouts.set(e,setTimeout((()=>{if(this.cellRenderTimeouts.delete(e),"function"==typeof t.render){const o=t.render(e,t,t.data,this.getRenderProp("data"));"string"==typeof o&&(e.textContent=o)}}))))},this.refScrollContainer=t=>{this.scrollContainerElement=t},this.refTable=t=>{this.tableElement=t,this.syncTableLabel(this.getState("externalLabelElements"))},this.getButtonFcProps=(t,e,o)=>this.buttonItems.get(t).getFcProps(e,o),this.renderSettings=t=>this.settings.render(t),this.getLinkFcProps=(t,e)=>this.linkItems.get(t).getFcProps(e)}observeScrollContainer(){this.scrollContainerElement&&ResizeObserver&&(this.resizeObserver=new ResizeObserver(this.handleResize),this.resizeObserver.observe(this.scrollContainerElement)),this.updateStickyColsDisabled()}teardownTable(){var t;null===(t=this.resizeObserver)||void 0===t||t.disconnect(),clearTimeout(this.resizeDebounceTimeout),this.cellRenderTimeouts.forEach((t=>clearTimeout(t))),this.cellRenderTimeouts.clear(),this.buttonItems.destroy(),this.linkItems.destroy(),this.settings.destroy()}syncTableItems(){this.buttonItems.endRender(),this.linkItems.endRender(),this.settings.sync()}applyData(t){it.apply(t,(t=>{this.setRenderProp("data",t),this.setState("rowKeys",((t,e)=>new Map(t.map((t=>{var o;return[t,null!==(o=e.get(t))&&void 0!==o?o:E()]}))))(t,this.getState("rowKeys")))}))}applyDataFoot(t){st.apply(t,(t=>this.setRenderProp("dataFoot",t)))}applyFixedCols(t){Z.apply(t,(t=>this.setRenderProp("fixedCols",t))),this.updateStickyColsDisabled()}applyHasSettingsMenu(t){tt.apply(t,(t=>this.setRenderProp("hasSettingsMenu",t)))}applyHeaders(t){at.apply(t,(t=>this.setRenderProp("headers",(t=>0===t.horizontal.length?t:Object.assign(Object.assign({},t),{horizontal:t.horizontal.map((t=>t.map((t=>Object.assign(Object.assign({},t),{visible:"boolean"!=typeof t.visible||t.visible,hidable:"boolean"!=typeof t.hidable||t.hidable})))))}))(t))))}applyLabel(t){g.apply(t,(t=>this.setRenderProp("label",t)),this.isRequired("label"))}applyLoading(t){rt.apply(t,(t=>this.setRenderProp("loading",t)))}applyOn(t){et.apply(t,(t=>this.setRenderProp("on",t)))}applySelection(t){ct.apply(t,(t=>this.setRenderProp("selection",t))),this.updateStickyColsDisabled()}applyVariant(t){k.apply(t,(t=>this.setRenderProp("variant",t)))}syncTableLabel(t){this.tableElement&&"ariaLabelledByElements"in this.tableElement&&((null==t?void 0:t.length)?(this.tableElement.ariaLabelledByElements=t,this.hasExternalTableLabelRefs=!0,l.debug([this.tableElement,t,this.tableElement.ariaLabelledByElements])):this.hasExternalTableLabelRefs&&(this.hasExternalTableLabelRefs=!1,this.tableElement.ariaLabelledByElements=null,this.tableElement.setAttribute("aria-labelledby",Nt)))}moveCheckboxFocus(t){var e,o,l;if("ArrowUp"!==t.key&&"ArrowDown"!==t.key)return;const i=Array.from(null!==(o=null===(e=this.scrollContainerElement)||void 0===e?void 0:e.querySelectorAll(".kol-table__selection-input--checkbox"))&&void 0!==o?o:[]),s=null===(l=this.scrollContainerElement)||void 0===l?void 0:l.querySelector(":focus");let n=i.indexOf(s);n>-1&&(t.preventDefault(),n=(n+("ArrowDown"===t.key?1:i.length-1))%i.length,i[n].focus())}applyChangedHeaderCells(t){const e=Object.assign(Object.assign({},this.getRenderProp("headers")),{horizontal:t.detail});this.setRenderProp("headers",e),this.setState("settingsChangedCounter",this.getState("settingsChangedCounter")+1);const o=this.getRenderProp("on")[W.onChangeHeaderCells];"function"==typeof o&&o(t,e)}updateScrollbarState(){if(this.scrollContainerElement){const{clientHeight:t,clientWidth:e,scrollHeight:o,scrollWidth:l}=this.scrollContainerElement;this.setState("hasScrollbar",l>e||o>t&&["auto","scroll"].includes(getComputedStyle(this.scrollContainerElement).overflowY))}}calculateFixedColsWidth(){var t,e,o,l,i,s;const[n,a]=this.getRenderProp("fixedCols"),r=this.getRenderProp("headers"),c=ut(r).cells,d=pt(r.horizontal,this.getRenderProp("data"));let h=0;for(let o=0;o<n&&o<c.length;o++)h+=null!==(e=null===(t=c[o])||void 0===t?void 0:t.width)&&void 0!==e?e:0;for(let t=d-a;t<d&&t<c.length;t++)h+=null!==(l=null===(o=c[t])||void 0===o?void 0:o.width)&&void 0!==l?l:0;if(this.getRenderProp("selection")){const t=null===(i=this.scrollContainerElement)||void 0===i?void 0:i.querySelector(".kol-table__cell--selection");h+=null!==(s=null==t?void 0:t.offsetWidth)&&void 0!==s?s:0}return h}updateStickyColsDisabled(){if(!this.scrollContainerElement)return void this.setState("stickyColsDisabled",!1);const t=this.calculateFixedColsWidth();this.setState("stickyColsDisabled",t>0&&t>=this.scrollContainerElement.clientWidth)}emitSelectionChange(t,e){const o=this.getRenderProp("on")[W.onSelectionChange];"function"==typeof o&&o(t,e),this.host&&T(this.host,z.selectionChange,e)}emitSort(t,e){const o=this.getRenderProp("on")[W.onSort];"function"==typeof o&&e.key&&o(t,e),this.host&&T(this.host,z.sort,e)}renderTableStatelessFC(){return this.buttonItems.beginRender(),this.linkItems.beginRender(),this.settings.beginRender(),i(Ut,{data:this.getRenderProp("data"),dataFoot:this.getRenderProp("dataFoot"),externalLabelElements:this.getState("externalLabelElements"),fixedCols:this.getRenderProp("fixedCols"),getButtonFcProps:this.getButtonFcProps,getLinkFcProps:this.getLinkFcProps,renderSettings:this.renderSettings,handleRenderCell:this.handleRenderCell,handleSelectionChange:this.handleSelectionChange,handleSort:this.handleSort,hasScrollbar:this.getState("hasScrollbar"),hasSettingsMenu:this.getRenderProp("hasSettingsMenu"),headers:this.getRenderProp("headers"),label:this.getRenderProp("label"),loading:this.getRenderProp("loading"),on:this.getRenderProp("on"),refScrollContainer:this.refScrollContainer,refTable:this.refTable,rowKeys:this.getState("rowKeys"),selection:this.getRenderProp("selection"),settingsChangedCounter:this.getState("settingsChangedCounter"),stickyColsDisabled:this.getState("stickyColsDisabled"),variant:this.getRenderProp("variant")})}}export{ce as B,st as a,it as t,J as v}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* KoliBri - The accessible HTML-Standard
|
|
3
|
+
*/
|
|
4
|
+
import{h as s}from"./index-Bbr6Os1b.js";import{s as i,X as t}from"./common-BdSzSIXg.js";import{B as a}from"./base-web-component-CYPdDdRn.js";import{b as e,e as o,a as h,n as l,c as r,d as p,B as n}from"./component-CNgECeRi.js";import{F as d}from"./behavior-DlH8byIw.js";import{T as c}from"./behavior-B6y5Gofe.js";import{a as m,b as y,c as b,f as u,g as f,h as v,s as C,i as j,l as B,d as x,t as D,e as I,v as A}from"./component-DEwcJKDA.js";import{d as g}from"./disabled-B2o4Ctgy.js";import{i as K}from"./id-Bh4FF8c0.js";import"./props-from-config-BOUcpF7e.js";import{l as S}from"./label-with-expert-slot-D1tpX9DI.js";import{v as T}from"./access-and-short-key-ijzCZfHm.js";import{c as w}from"./element-interaction-sGYdEpmv.js";import{d as F,K as H}from"./events-CRHxtwup.js";import{p as E,a as P}from"./controller-CZcQ57AP.js";class L extends a{constructor(){super(...arguments),this.ctaRef=w(),this.propsConfig=e,this.tooltipBehavior=new c(this.stateAccess),this.handleClick=s=>{s.stopPropagation(),this.tooltipBehavior.hideTooltip();const t=this.getRenderProp("type");if("submit"===t)E({form:this.host});else if("reset"===t)P({form:this.host});else{this.formAssociation.setFormAssociatedValue(this.formValue);const t=this.getRenderProp("on").onClick;"function"==typeof t&&(i(s,this.ctaRef.el),t(s,this.formValue))}this.host&&F(this.host,H.click,this.formValue)},this.handleMouseDown=s=>{var i,t;null===(t=(i=this.getRenderProp("on")).onMouseDown)||void 0===t||t.call(i,s),this.host&&F(this.host,H.mousedown)},this.handleFocus=s=>{var i,t;null===(t=(i=this.getRenderProp("on")).onFocus)||void 0===t||t.call(i,s),this.host&&F(this.host,H.focus)},this.handleBlur=s=>{var i,t;null===(t=(i=this.getRenderProp("on")).onBlur)||void 0===t||t.call(i,s),this.host&&F(this.host,H.blur)}}initFormAssociation(){this.formAssociation=new d(a.stateLess,{host:this.host,type:"button"})}unsetButtonTabIndex(){this.unsetRenderProp("tabIndex")}initTooltipBehavior(){this.tooltipBehavior.componentWillLoad({label:this.getRenderProp("label"),align:this.getRenderProp("tooltipAlign")})}syncTooltipListeners(){this.ctaRef.el&&this.tooltipBehavior.syncListeners(void 0,this.ctaRef.el,!0)}destroyTooltipBehavior(){this.tooltipBehavior.destroy()}applyAccessKey(s,i){m.apply(s,(s=>this.setRenderProp("accessKey",s))),T(s,i)}applyAriaControls(s){y.apply(s,(s=>this.setRenderProp("ariaControls",s)))}applyAriaDescription(s){b.apply(s,(s=>this.setRenderProp("ariaDescription",s)))}applyAriaExpanded(s){u.apply(s,(s=>this.setRenderProp("ariaExpanded",s)))}applyAriaHasPopup(s){o.apply(s,(s=>this.setRenderProp("ariaHasPopup",s)))}applyAriaSelected(s){h.apply(s,(s=>this.setRenderProp("ariaSelected",s)))}applyCustomClass(s){f.apply(s,(s=>this.setRenderProp("customClass",s)))}applyDisabled(s){g.apply(s,(s=>this.setRenderProp("disabled",s)))}applyHideLabel(s){v.apply(s,(s=>this.setRenderProp("hideLabel",s)))}applyIcons(s){C.apply(s,(s=>this.setRenderProp("icons",s)))}applyId(s){K.apply(s,(s=>this.setRenderProp("id",s)))}applyInline(s){j.apply(s,(s=>this.setRenderProp("inline",s)))}applyLabel(s){S.apply(s,(s=>{this.setRenderProp("label",s),this.tooltipBehavior.watchLabel(s)}),this.isRequired("label"))}applyName(s){l.apply(s,(s=>this.setRenderProp("name",s))),this.formAssociation.watchName(s)}applyOn(s){r.apply(s,(s=>this.setRenderProp("on",s)))}applyRole(s){B.apply(s,(s=>this.setRenderProp("role",s)))}applyShortKey(s,i){x.apply(s,(s=>this.setRenderProp("shortKey",s))),T(i,s)}applySyncValueBySelector(s){this.formAssociation.watchSyncValueBySelector(s)}applyTabIndex(s){"number"==typeof s?D.apply(s,(s=>this.setRenderProp("tabIndex",s))):this.unsetRenderProp("tabIndex")}applyTooltipAlign(s){I.apply(null!=s?s:"top",(s=>{this.setRenderProp("tooltipAlign",s),this.tooltipBehavior.watchAlign(s)}))}applyType(s){p.apply(s,(s=>this.setRenderProp("type",s)))}applyValue(s){this.formValue=s,this.formAssociation.setFormAssociatedValue(s)}applyVariant(s){var i;A.apply(null!==(i=null!=s?s:t("buttonVariantDefault",this.host))&&void 0!==i?i:"normal",(s=>this.setRenderProp("variant",s)))}getButtonFCProps(){return{accessKey:this.getRenderProp("accessKey"),ariaControls:this.getRenderProp("ariaControls"),ariaDescription:this.getRenderProp("ariaDescription"),ariaDescriptionId:this.getState("ariaDescriptionId"),ariaExpanded:this.getRenderProp("ariaExpanded"),ariaHasPopup:this.getRenderProp("ariaHasPopup"),ariaSelected:this.getRenderProp("ariaSelected"),customClass:this.getRenderProp("customClass"),disabled:this.getRenderProp("disabled"),handleBlur:this.handleBlur,handleClick:this.handleClick,handleFocus:this.handleFocus,handleMouseDown:this.handleMouseDown,hideLabel:this.getRenderProp("hideLabel"),icons:this.getRenderProp("icons"),id:this.getRenderProp("id"),inline:this.getRenderProp("inline"),label:this.getRenderProp("label"),name:this.getRenderProp("name"),on:this.getRenderProp("on"),refButton:this.ctaRef,refTooltip:this.tooltipBehavior.setTooltipElementRef,role:this.getRenderProp("role"),shortKey:this.getRenderProp("shortKey"),tabIndex:this.getRenderProp("tabIndex"),tooltipAlign:this.getRenderProp("tooltipAlign"),type:this.getRenderProp("type"),variant:this.getRenderProp("variant")}}renderButtonFC(){return s(n,Object.assign({},this.getButtonFCProps()))}}export{L as B}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* KoliBri - The accessible HTML-Standard
|
|
3
|
+
*/
|
|
4
|
+
import{h as i}from"./index-Bbr6Os1b.js";import{B as s}from"./base-web-component-CYPdDdRn.js";import{r as t,C as o}from"./component-6_YiKr2Z.js";import"./common-BdSzSIXg.js";import{l}from"./level-BVXGgbSM.js";import{d as h,w as a}from"./width-BHn7XHj_.js";import{v as e,t as r}from"./props-from-config-BOUcpF7e.js";import{l as n}from"./label-lang-segment-C5LYGOHt.js";import{u as d,l as p,D as m}from"./scroll-lock-BxAe0gL5.js";import{T as v}from"./behavior-B6y5Gofe.js";import{c}from"./element-interaction-sGYdEpmv.js";import{d as u,K as b}from"./events-CRHxtwup.js";import{h as f}from"./tooltip-open-tracking-D3tCiiGP.js";const g={required:[n],optional:[h,l,e,a]};class C extends s{constructor(){super(...arguments),this.dialogRef=c(),this.cardCloseButtonRef=c(),this.cardCloseTooltipBehavior=new v(this.stateAccess),this.propsConfig=g,this.handleCancel=i=>{var s,t;f(i),i.defaultPrevented||(null===(t=(s=this.getRenderProp("on")).onCancel)||void 0===t||t.call(s,i),i.defaultPrevented||this.host&&!u(this.host,b.cancel)&&i.preventDefault())},this.handleClose=i=>{var s,t,o,l;i.target===this.dialogRef.el&&(d(this),null===(t=(s=this.getRenderProp("on")).onClose)||void 0===t||t.call(s),null===(l=(o=this.getRenderProp("on")).onToggle)||void 0===l||l.call(o,!1),this.host&&(u(this.host,b.close),u(this.host,b.toggle)))},this.handleCardClose=()=>{this.cardCloseTooltipBehavior.hideTooltip(),this.closeDialog(),this.host&&u(this.host,b.close)}}initCardCloseButton(){this.cardCloseButtonProps=t(this.host),this.cardCloseTooltipBehavior.componentWillLoad({label:this.cardCloseButtonProps.label,align:this.cardCloseButtonProps.tooltipAlign})}syncCardCloseTooltipListeners(){this.cardCloseButtonRef.el&&this.cardCloseTooltipBehavior.syncListeners(void 0,this.cardCloseButtonRef.el,!0)}teardownDialog(){this.closeDialog(),d(this),this.cardCloseTooltipBehavior.destroy()}applyLabel(i){n.apply(i,(i=>this.setRenderProp("label",i)),this.isRequired("label"))}applyLevel(i){l.apply(i,(i=>this.setRenderProp("level",i)))}applyOn(i){h.apply(i,(i=>this.setRenderProp("on",i)))}applyVariant(i){e.apply(i,(i=>this.setRenderProp("variant",i)))}applyWidth(i){a.apply(i,(i=>this.setRenderProp("width",i)))}showDialog(i){var s,t,o,l;const h=this.dialogRef.el;(null==h?void 0:h.open)||(this.setState("modal",i),i?(null===(s=null==h?void 0:h.showModal)||void 0===s||s.call(h),h&&p(this)):null===(t=null==h?void 0:h.show)||void 0===t||t.call(h),null===(l=(o=this.getRenderProp("on")).onToggle)||void 0===l||l.call(o,!0),this.host&&u(this.host,b.toggle))}closeDialog(){var i,s;null===(s=null===(i=this.dialogRef.el)||void 0===i?void 0:i.close)||void 0===s||s.call(i)}buildCardProps(){return{ariaDescriptionId:this.getState("ariaDescriptionId"),closeButtonProps:this.cardCloseButtonProps,handleClose:this.handleCardClose,hasCloser:!0,headingId:this.getState("headingId"),label:this.getRenderProp("label"),level:this.getRenderProp("level"),refCloseButton:this.cardCloseButtonRef,refTooltip:this.cardCloseTooltipBehavior.setTooltipElementRef}}renderDialogFC(){const s=this.getRenderProp("variant"),t="card"===s;return i(m,{handleCancel:this.handleCancel,handleClose:this.handleClose,label:r(this.getRenderProp("label")),labelledBy:t?this.getState("headingId"):void 0,modal:this.getState("modal"),refDialog:this.dialogRef,variant:s,width:this.getRenderProp("width")},t?i(o,Object.assign({},this.buildCardProps()),this.renderSlot()):this.renderSlot())}}export{C as B}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* KoliBri - The accessible HTML-Standard
|
|
3
|
+
*/
|
|
4
|
+
import{h as i}from"./index-Bbr6Os1b.js";import{B as s}from"./base-web-component-CYPdDdRn.js";import{l as t,a,c as r,d as e,b as o,L as h}from"./component-CiJGQTU0.js";import{T as n}from"./behavior-B6y5Gofe.js";import{s as l}from"./common-BdSzSIXg.js";import{a as p,b as d,c,f as m,g as y,h as f,s as b,i as u,l as C,d as x,t as g,e as j,v}from"./component-DEwcJKDA.js";import{d as A}from"./disabled-B2o4Ctgy.js";import{h as D}from"./href-CfNF4pHX.js";import"./props-from-config-BOUcpF7e.js";import{l as w}from"./label-with-expert-slot-D1tpX9DI.js";import{l as I}from"./link-target-BWPSEd9a.js";import{c as L}from"./element-interaction-sGYdEpmv.js";import{d as B,K}from"./events-CRHxtwup.js";import{o as S}from"./ariaCurrentService-YoLNpD5S.js";class T extends s{constructor(){super(...arguments),this.ctaRef=L((()=>!0===this.getRenderProp("disabled"))),this.tooltipBehavior=new n(this.stateAccess),this.propsConfig=t,this.handleAnchorClick=i=>{if(this.tooltipBehavior.hideTooltip(),!0===this.getRenderProp("disabled"))return void i.preventDefault();const s=this.getRenderProp("href"),t=this.getRenderProp("on");"function"==typeof(null==t?void 0:t.onClick)&&(l(i,this.ctaRef.el),t.onClick(i,s)),this.host&&B(this.host,K.click,s)},this.setAnchorRef=i=>{this.ctaRef(i)}}unsetLinkTabIndex(){this.unsetRenderProp("tabIndex")}initLinkBehaviors(){this.unsubscribeOnLocationChange=S((i=>{const s=this.getRenderProp("href"),t=this.getRenderProp("ariaCurrentValue"),a=i===s?t:"";this.getState("ariaCurrent")!==a&&this.setState("ariaCurrent",a)})),this.tooltipBehavior.componentWillLoad({label:this.getTooltipLabel(),align:this.getRenderProp("tooltipAlign")})}syncTooltipListeners(){this.ctaRef.el&&this.tooltipBehavior.syncListeners(void 0,this.ctaRef.el,!0)}destroyLinkBehaviors(){this.unsubscribeOnLocationChange&&(this.unsubscribeOnLocationChange(),this.unsubscribeOnLocationChange=void 0),this.tooltipBehavior.destroy()}getTooltipLabel(){const i=this.getRenderProp("label");if("string"==typeof i&&i.length>0)return i;const s=this.getRenderProp("href");return"string"==typeof s?s:""}applyAccessKey(i){p.apply(i,(i=>this.setRenderProp("accessKey",i)))}applyAriaControls(i){d.apply(i,(i=>this.setRenderProp("ariaControls",i)))}applyAriaCurrentValue(i){a.apply(i,(i=>this.setRenderProp("ariaCurrentValue",i)))}applyAriaDescription(i){c.apply(i,(i=>this.setRenderProp("ariaDescription",i)))}applyAriaExpanded(i){m.apply(i,(i=>this.setRenderProp("ariaExpanded",i)))}applyAriaOwns(i){r.apply(i,(i=>this.setRenderProp("ariaOwns",i)))}applyCustomClass(i){y.apply(i,(i=>this.setRenderProp("customClass",i)))}applyDisabled(i){A.apply(i,(i=>this.setRenderProp("disabled",i)))}applyDownload(i){e.apply(i,(i=>this.setRenderProp("download",i)))}applyHideLabel(i){f.apply(i,(i=>this.setRenderProp("hideLabel",i)))}applyHref(i){D.apply(i,(i=>this.setRenderProp("href",i)),this.isRequired("href"))}applyIcons(i){b.apply(i,(i=>this.setRenderProp("icons",i)))}applyInline(i){u.apply(i,(i=>this.setRenderProp("inline",i)))}applyLabel(i){w.apply(i,(s=>{this.setRenderProp("label",s),this.setState("expertSlot",""===i),this.tooltipBehavior.watchLabel(this.getTooltipLabel())}),this.isRequired("label"))}applyOn(i){o.apply(i,(i=>this.setRenderProp("on",i)))}applyRole(i){C.apply(i,(i=>this.setRenderProp("role",i)))}applyShortKey(i){x.apply(i,(i=>this.setRenderProp("shortKey",i)))}applyTabIndex(i){"number"==typeof i?g.apply(i,(i=>this.setRenderProp("tabIndex",i))):this.unsetRenderProp("tabIndex")}applyTarget(i){I.apply(i,(i=>this.setRenderProp("target",i)))}applyTooltipAlign(i){j.apply(i,(i=>{this.setRenderProp("tooltipAlign",i),this.tooltipBehavior.watchAlign(i)}))}applyVariant(i){v.apply(i,(i=>this.setRenderProp("variant",i)))}renderLinkFC(){return i(h,{accessKey:this.getRenderProp("accessKey"),ariaControls:this.getRenderProp("ariaControls"),ariaCurrent:this.getState("ariaCurrent"),ariaCurrentValue:this.getRenderProp("ariaCurrentValue"),ariaDescription:this.getRenderProp("ariaDescription"),ariaDescriptionId:this.getState("ariaDescriptionId"),ariaExpanded:this.getRenderProp("ariaExpanded"),ariaOwns:this.getRenderProp("ariaOwns"),customClass:this.getRenderProp("customClass"),disabled:this.getRenderProp("disabled"),download:this.getRenderProp("download"),handleAnchorClick:this.handleAnchorClick,hideLabel:this.getRenderProp("hideLabel"),href:this.getRenderProp("href"),icons:this.getRenderProp("icons"),inline:this.getRenderProp("inline"),label:this.getRenderProp("label"),on:this.getRenderProp("on"),refAnchor:this.setAnchorRef,refTooltip:this.tooltipBehavior.setTooltipElementRef,role:this.getRenderProp("role"),shortKey:this.getRenderProp("shortKey"),tabIndex:this.getRenderProp("tabIndex"),target:this.getRenderProp("target"),tooltipAlign:this.getRenderProp("tooltipAlign"),variant:this.getRenderProp("variant"),expertSlot:this.getState("expertSlot")})}}export{T as B}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
import{d as t}from"./props-from-config-
|
|
4
|
+
import{d as t}from"./props-from-config-BOUcpF7e.js";function s(){throw new Error("This behavior does not use component state.")}class e{constructor(){this.rawProps={},this.renderProps={},this.requiredPropNames=new Set,this.renderPropsSeeded=!1,this.setState=(t,s)=>{this[t]=s},this.getState=t=>this[t],this.stateAccess={setState:this.setState,getState:this.getState}}seedRenderProps(){var s;this.renderPropsSeeded||(this.renderPropsSeeded=!0,this.renderProps=t(this.propsConfig),this.requiredPropNames=new Set((null!==(s=this.propsConfig.required)&&void 0!==s?s:[]).map((t=>t.propName))))}isRequired(t){return this.seedRenderProps(),this.requiredPropNames.has(t)}setRawProp(t,s){this.rawProps[t]=s}getRawProp(t){return this.rawProps[t]}setRenderProp(t,s){this.seedRenderProps(),this.renderProps[t]=s}unsetRenderProp(t){this.seedRenderProps(),this.renderProps[t]=void 0}getRenderProp(t){return this.seedRenderProps(),this.renderProps[t]}}e.stateLess=Object.freeze({setState:s,getState:s});export{e as B}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* KoliBri - The accessible HTML-Standard
|
|
3
|
+
*/
|
|
4
|
+
import{n as e,p as s}from"./common-BdSzSIXg.js";import{a as i,d as t,t as o,v as r}from"./component-DEwcJKDA.js";import{h as a,g as l,I as n}from"./input-container-zXl_6y52.js";import{o as d,p as h,c,g as p,e as u}from"./props-from-config-BOUcpF7e.js";import{m as b}from"./multiple-S3Ol1G6Z.js";import{r as v}from"./required-xw5BBPvV.js";import{r as m}from"./rows-DRV8YlQv.js";import{f as y,i as f,g as O,c as j,B,F as g}from"./api-D0RNr-zh.js";import{h as A,F as w}from"./index-Bbr6Os1b.js";import{v as K}from"./access-and-short-key-ijzCZfHm.js";import{f as P}from"./options-B0rBHetL.js";import{a as q}from"./tslib.es6-QNbPBOk5.js";const x=s=>{if("object"==typeof s&&null!==s){if("string"==typeof s.label&&s.label.length>0)return s.disabled=!0===s.disabled,s.label=`${s.label}`.trim(),!1===d(s.label,3)&&!1===h(s.label)&&e(`A differing Aria-Label (${s.label}) is inaccessible. A differing Aria-Label should consist of at least three readable characters.`),!Array.isArray(s.options)||void 0===s.options.find((e=>!1===x(e)));if("number"==typeof s.label)return!0}return!1},k=c("options",[],(function(e){const i="string"==typeof e?s(e):e;if(Array.isArray(i)&&i.every((e=>x(e))))return i;throw new Error("Invalid select options")})),D=c("value",[],(e=>Array.isArray(e)?e:[e])),L={required:[...y.required],optional:[...y.optional,i,a,b,k,v,m,D,t,o,r]},S=p("kol-select"),V=e=>{var{class:s,index:i,selectedValue:t,selected:o,value:r,label:a,disabled:l}=e,n=q(e,["class","index","selectedValue","selected","value","label","disabled"]);const d=void 0===t?[]:Array.isArray(t)?t:[t],h=o||d.includes(r);return A("option",Object.assign({class:u(S("option",{selected:Boolean(h),disabled:Boolean(l)}),s),selected:h,disabled:l,value:i},n),a)},E=({preKey:e,options:s,disabled:i,value:t,OptionProps:o={},OptionGroupProps:r={}})=>(null==s?void 0:s.length)?A(w,null,s.map(((s,a)=>{const l=[e,`-${a}`].join("");if("options"in s){const e=Boolean(i||s.disabled),{label:a}=s,n=q(s,["label"]);return A("optgroup",Object.assign({class:S("optgroup",{disabled:e}),key:l},r,{label:null==a?void 0:a.toString(),disabled:e}),A(E,Object.assign({OptionGroupProps:r,OptionProps:o,value:t,preKey:l},n,{disabled:e})))}return"value"in s?A(V,Object.assign({key:l},o,{index:l,selectedValue:t},s,{disabled:Boolean(i||s.disabled)})):null}))):null,I=e=>{const{class:s,msg:i,touched:t,disabled:o,required:r,options:a,value:l,OptionProps:n,OptionGroupProps:d,ariaDescribedBy:h,hideLabel:c,label:p}=e,b=q(e,["class","msg","touched","disabled","required","options","value","OptionProps","OptionGroupProps","ariaDescribedBy","hideLabel","label"]),v=Object.assign(Object.assign({class:u(S(Object.assign({disabled:Boolean(o),required:Boolean(r),touched:Boolean(t)},f(i,t)?{[O(i)]:!0}:{})),s),required:r,disabled:o},j({ariaDescribedBy:h,hideLabel:c,label:p})),b);return A("select",Object.assign({},v),A(E,{OptionGroupProps:d,OptionProps:n,disabled:o,options:a,value:l}))},$=(e,s,i)=>{const t=Array.isArray(e);if(s){if(void 0!==e&&!t)throw new Error(`↑ The schema for the property (_value) is not valid for multiple mode. Expected an array. The value will not be changed. (${i} = ${JSON.stringify(e)})`)}else if(t)throw new Error(`↑ The schema for the property (_value) is not valid for single mode. Expected a single value. The value will not be changed. (${i} = ${JSON.stringify(e)})`)},G=(e,s=!1)=>e.flatMap((e=>"options"in e&&Array.isArray(e.options)?G(e.options,Boolean(s||e.disabled)):[Object.assign(Object.assign({},e),{disabled:Boolean(s||e.disabled)})])),z=(e,s,i)=>{if(0===s.length)return e;const t=G(s),o=t.map((e=>e.value)),r=e.every((e=>o.includes(e)))?e:e.filter((e=>o.includes(e)));if(!1===i&&0===r.length){const e=t.find((e=>!0!==e.disabled));return e?[e.value]:r}return r};class F extends B{constructor(){super(...arguments),this.keyOptionMap=new Map,this.hasValue=!0,this.handleSelectInput=e=>{var s;const i=Array.from((null===(s=this.ctaRef.el)||void 0===s?void 0:s.options)||[]).filter((e=>e.selected)).map((e=>{var s;return null===(s=this.keyOptionMap.get(e.value))||void 0===s?void 0:s.value}));if(this._multiple)this._value=i,this.handleInput(e,i);else{const s=i.length>0?i[0]:void 0;this._value=s,this.handleInput(e,s)}},this.handleSelectChange=e=>{const s=this._value;this.handleChange(e,s),this.hasValue=!!s}}applyAccessKey(e){i.apply(e,(e=>this.setRenderProp("accessKey",e))),K(e,this.getShortKeyProp())}applyShortKey(e){t.apply(e,(e=>this.setRenderProp("shortKey",e))),K(this.getAccessKeyProp(),e)}applyIcons(e){a.apply(e,(e=>this.setRenderProp("icons",e)))}applyMultiple(e){$(this._value,!0===e,"current"),b.apply(e,(e=>{this.setRenderProp("multiple",e),this.setRenderProp("value",z(this.getRenderProp("value"),this.getRenderProp("options"),this._multiple))}))}applyOptions(e){k.apply(e,(e=>{this.setRenderProp("options",e),e.length>0&&(this.keyOptionMap.clear(),P(this.keyOptionMap,e),this.setRenderProp("value",z(this.getRenderProp("value"),e,this._multiple)))}))}applyRequired(e){v.apply(e,(e=>this.setRenderProp("required",e)))}applyRows(e){m.apply(e,(e=>this.setRenderProp("rows",e)))}applyTabIndex(e){o.apply(e,(e=>this.setRenderProp("tabIndex",e)))}applyValue(e){$(e,!0===this._multiple,"received");const s=e=>{const s=z(e,this.getRenderProp("options"),this._multiple);this.setRenderProp("value",s),this.formAssociation.setFormAssociatedValue(this.getModelValue())};null===e?s([null]):D.apply(e,s)}applyVariant(e){r.apply(e,(e=>this.setRenderProp("variant",e)))}getModelValue(){const e=this.getRenderProp("value");return this._multiple?e:Array.isArray(e)&&e.length>0?e[0]:e}getSelectProps(){const{ariaDescribedBy:e,hasError:s}=this.getAria(),i=this.getRenderProp("multiple"),t=this.getRenderProp("shortKey");return Object.assign(Object.assign({id:this.getState("id"),hideLabel:this.getRenderProp("hideLabel"),label:this.getRenderProp("label"),value:this.getRenderProp("value"),options:this.getRenderProp("options"),accessKey:this.getRenderProp("accessKey")||void 0,disabled:this.getRenderProp("disabled"),name:this.getRenderProp("name")||void 0,"aria-invalid":s?"true":void 0,ariaDescribedBy:e,size:i?this.getRenderProp("rows"):void 0,multiple:i,required:this.getRenderProp("required"),touched:this.getRenderProp("touched"),msg:this.getRenderProp("msg")},t?{"aria-keyshortcuts":t}:{}),{ref:this.ctaRef,onBlur:this.handleBlur,onChange:this.handleSelectChange,onClick:this.handleClick,onFocus:this.handleFocus,onInput:this.handleSelectInput,onKeyDown:this.handleKeyDown})}renderSelectField(){const e=this.getRenderProp("disabled"),{startAdornment:s,endAdornment:i}=l({icons:this.getRenderProp("icons")});return A(g,Object.assign({},this.getFormFieldProps({class:u("kol-form-field-select",{"kol-form-field--has-value":this.hasValue}),accessKey:this.getRenderProp("accessKey")||void 0,shortKey:this.getRenderProp("shortKey")||void 0,required:this.getRenderProp("required"),variant:this.getRenderProp("variant")}),{onClick:()=>{var e;return null===(e=this.ctaRef.el)||void 0===e?void 0:e.focus()}}),A(n,{disabled:e,msg:this.getRenderProp("msg"),touched:this.getRenderProp("touched"),startAdornment:s,endAdornment:i},A(I,Object.assign({},this.getSelectProps()))))}}export{F as B,L as s}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* KoliBri - The accessible HTML-Standard
|
|
3
|
+
*/
|
|
4
|
+
import"./common-BdSzSIXg.js";import{a as t,d as s,v as i}from"./component-DEwcJKDA.js";import{a as e,S as o}from"./suggestions-BsiiaAxK.js";import{h as a,g as r}from"./input-container-zXl_6y52.js";import{c as h,b as l,e as n}from"./props-from-config-BOUcpF7e.js";import{p as d}from"./placeholder-DlHbiVjz.js";import{r as p}from"./read-only-DSBWEPED.js";import{r as c}from"./required-xw5BBPvV.js";import{s as u}from"./smart-button-CQps8AlL.js";import{s as m}from"./value-string-Dy8zJxlP.js";import{f as v,B as y}from"./api-D0RNr-zh.js";import{h as j}from"./index-Bbr6Os1b.js";import{s as b}from"./controller-CZcQ57AP.js";import{v as f}from"./access-and-short-key-ijzCZfHm.js";import{c as g}from"./element-interaction-sGYdEpmv.js";import{B}from"./base-web-component-CYPdDdRn.js";import{C as O}from"./behavior-BJR8CKBx.js";const x=h("pattern",void 0,l),K={required:[...v.required],optional:[...v.optional,t,e,a,x,d,p,c,s,u,m,i]};class C extends y{constructor(){super(...arguments),this.ctaRef=g(),this.counter=new O(B.stateLess),this.needsImmediateCounterUpdate=!1,this.hasValue=!1,this.handleTextInput=t=>{this._value=t.target.value,this.handleInput(t)},this.handleTextChange=(t,s)=>{this.handleChange(t,s)},this.handleTextFocus=t=>{var s,i;this.handleFocus(t),this.counter.retriggerAria(null!==(i=null===(s=this._value)||void 0===s?void 0:s.length)&&void 0!==i?i:0)},this.handleTextKeyDown=t=>{var s,i;this.handleKeyDown(t),this.counter.handleKeyDown(t,null!==(i=null===(s=this.ctaRef.el)||void 0===s?void 0:s.value.length)&&void 0!==i?i:0),b(t,{form:this.host,ref:this.ctaRef.el})}}get textShared(){return this}initHasValue(){this.hasValue=Boolean(this.textShared.getRenderProp("value"))}didLoadTextInput(){var t,s;this.needsImmediateCounterUpdate=!1,(this.counter.hasCounter()||this.counter.hasSoftLimit())&&this.counter.updateImmediate(null!==(s=null===(t=this._value)||void 0===t?void 0:t.length)&&void 0!==s?s:0)}didUpdateTextInput(){var t,s;this.needsImmediateCounterUpdate&&(this.needsImmediateCounterUpdate=!1,(this.counter.hasCounter()||this.counter.hasSoftLimit())&&this.counter.updateImmediate(null!==(s=null===(t=this._value)||void 0===t?void 0:t.length)&&void 0!==s?s:0))}destroyTextInput(){this.destroyFormField(),this.counter.destroy()}applyAccessKey(s){t.apply(s,(t=>this.textShared.setRenderProp("accessKey",t))),f(s,this._shortKey)}applyAutoComplete(t){e.apply(t,(t=>this.textShared.setRenderProp("autoComplete",t)))}applyIcons(t){a.apply(t,(t=>this.textShared.setRenderProp("icons",t)))}applyPattern(t){x.apply(t,(t=>this.textShared.setRenderProp("pattern",t)))}applyPlaceholder(t){d.apply(t,(t=>this.textShared.setRenderProp("placeholder",t)))}applyReadOnly(t){p.apply(t,(t=>this.textShared.setRenderProp("readOnly",t)))}applyRequired(t){c.apply(t,(t=>this.textShared.setRenderProp("required",t)))}applyShortKey(t){s.apply(t,(t=>this.textShared.setRenderProp("shortKey",t))),f(this._accessKey,t)}applySmartButton(t){null==t?this.textShared.unsetRenderProp("smartButton"):u.apply(t,(t=>this.textShared.setRenderProp("smartButton",t)))}applyValue(t){var s;this.initValue(t),this.hasValue=Boolean(this.textShared.getRenderProp("value")),this.counter.update(null!==(s=null==t?void 0:t.length)&&void 0!==s?s:0)}initValue(t){m.apply(t,(t=>this.textShared.setRenderProp("value",t))),this.formAssociation.setFormAssociatedValue(this.textShared.getRenderProp("value"))}initMaxLength(t){this.counter.watchMaxLength(t)}applyVariant(t){i.apply(t,(t=>this.textShared.setRenderProp("variant",t)))}applyHasCounter(t){this.counter.watchHasCounter(t),this.needsImmediateCounterUpdate=!0}applyMaxLength(t){var s,i;this.counter.watchMaxLength(t),this.counter.updateImmediate(null!==(i=null===(s=this._value)||void 0===s?void 0:s.length)&&void 0!==i?i:0)}applyMaxLengthBehavior(t){this.counter.watchMaxLengthBehavior(t),this.needsImmediateCounterUpdate=!0}getTextFormFieldProps(t){const s=this.textShared;return this.getFormFieldProps({class:n(t,{"has-value":this.hasValue,"kol-form-field--has-counter":this.counter.hasSoftLimit()||this.counter.hasCounter()}),accessKey:s.getRenderProp("accessKey")||void 0,shortKey:s.getRenderProp("shortKey")||void 0,variant:s.getRenderProp("variant"),required:s.getRenderProp("required"),readOnly:s.getRenderProp("readOnly"),maxLength:this.counter.getRenderProp("maxLength"),counter:this.counter.getCounterProps()})}getTextInputAdornments(t){return r({icons:this.textShared.getRenderProp("icons"),smartButton:this.getSmartButtonFcProps(this.textShared.getRenderProp("smartButton"),this.textShared.getRenderProp("disabled")),endAdornment:t})}getTextInputProps({type:t,spellcheck:s,multiple:i,suggestions:e},a={}){const r=this.textShared,h=r.getState("id"),l=r.getRenderProp("accessKey"),n=r.getRenderProp("shortKey"),d=r.getRenderProp("placeholder"),p=r.getRenderProp("pattern"),c=this.counter.getMaxLengthAttribute(),u=this.counter.getCharacterLimitHintId(h),{ariaDescribedBy:m,hasError:v}=this.getAria();return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({id:h,hideLabel:r.getRenderProp("hideLabel"),label:r.getRenderProp("label"),disabled:r.getRenderProp("disabled"),name:r.getRenderProp("name")||void 0},l?{accessKey:l}:{}),void 0!==t?{type:t}:{}),{value:r.getRenderProp("value"),required:r.getRenderProp("required")}),void 0!==c?{maxlength:c}:{}),void 0!==d?{placeholder:d}:{}),{autoComplete:r.getRenderProp("autoComplete")}),void 0!==s?{spellcheck:s}:{}),void 0!==p?{pattern:p}:{}),{readonly:r.getRenderProp("readOnly")}),void 0!==i?{multiple:i}:{}),{touched:r.getRenderProp("touched"),msg:r.getRenderProp("msg")}),n?{"aria-keyshortcuts":n}:{}),e&&e.length>0?{suggestions:j(o,{id:h,suggestions:e})}:{}),{ref:this.ctaRef,onBlur:this.handleBlur,onChange:this.handleTextChange,onClick:this.handleClick,onFocus:this.handleTextFocus,onInput:this.handleTextInput,onKeyDown:this.handleTextKeyDown}),a),{ariaDescribedBy:u?[...m,u]:m,"aria-invalid":v?"true":void 0})}}export{C as B,K as t}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
import{y as t,q as e}from"./common-BdSzSIXg.js";import{t as n,a as i}from"./tooltip-open-tracking-D3tCiiGP.js";import{c as o}from"./component-W1KZI4h4.js";import{c as r,b as s,d as l}from"./props-from-config-ytxYrJUY.js";import{i as a}from"./id-BI0ZuK17.js";import{l as c}from"./label-lang-segment-iVD9hoM3.js";const u=o("align","top"),f=r("badgeText","",s),h=Math.min,d=Math.max,m=Math.round,p=Math.floor,y=t=>({x:t,y:t}),w={left:"right",right:"left",bottom:"top",top:"bottom"};function g(t,e,n){return d(t,h(e,n))}function x(t,e){return"function"==typeof t?t(e):t}function v(t){return t.split("-")[0]}function b(t){return t.split("-")[1]}function A(t){return"x"===t?"y":"x"}function S(t){return"y"===t?"height":"width"}function T(t){const e=t[0];return"t"===e||"b"===e?"y":"x"}function k(t){return A(T(t))}function R(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const O=["left","right"],F=["right","left"],E=["top","bottom"],z=["bottom","top"];function C(t){const e=v(t);return w[e]+t.slice(e.length)}function L(t){return"number"!=typeof t?function(t){var e,n,i,o;return{top:null!=(e=t.top)?e:0,right:null!=(n=t.right)?n:0,bottom:null!=(i=t.bottom)?i:0,left:null!=(o=t.left)?o:0}}(t):{top:t,right:t,bottom:t,left:t}}function j(t){const{x:e,y:n,width:i,height:o}=t;return{width:i,height:o,top:n,left:e,right:e+i,bottom:n+o,x:e,y:n}}function D(t,e,n){let{reference:i,floating:o}=t;const r=T(e),s=k(e),l=S(s),a=v(e),c="y"===r,u=i.x+i.width/2-o.width/2,f=i.y+i.height/2-o.height/2,h=i[l]/2-o[l]/2;let d;switch(a){case"top":d={x:u,y:i.y-o.height};break;case"bottom":d={x:u,y:i.y+i.height};break;case"right":d={x:i.x+i.width,y:f};break;case"left":d={x:i.x-o.width,y:f};break;default:d={x:i.x,y:i.y}}const m=b(e);return m&&(d[s]+=h*("end"===m?1:-1)*(n&&c?-1:1)),d}async function P(t,e){var n;void 0===e&&(e={});const{x:i,y:o,platform:r,rects:s,elements:l,strategy:a}=t,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:h=!1,padding:d=0}=x(e,t),m=L(d),p=l[h?"floating"===f?"reference":"floating":f],y=j(await r.getClippingRect({element:null==(n=await(null==r.isElement?void 0:r.isElement(p)))||n?p:p.contextElement||await(null==r.getDocumentElement?void 0:r.getDocumentElement(l.floating)),boundary:c,rootBoundary:u,strategy:a})),w="floating"===f?{x:i,y:o,width:s.floating.width,height:s.floating.height}:s.reference,g=await(null==r.getOffsetParent?void 0:r.getOffsetParent(l.floating)),v=await(null==r.isElement?void 0:r.isElement(g))&&await(null==r.getScale?void 0:r.getScale(g))||{x:1,y:1},b=j(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:w,offsetParent:g,strategy:a}):w);return{top:(y.top-b.top+m.top)/v.y,bottom:(b.bottom-y.bottom+m.bottom)/v.y,left:(y.left-b.left+m.left)/v.x,right:(b.right-y.right+m.right)/v.x}}const M=new Set(["left","top"]);function B(){return"undefined"!=typeof window}function $(t){return q(t)?(t.nodeName||"").toLowerCase():"#document"}function I(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function V(t){var e;return null==(e=(q(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function q(t){return!!B()&&(t instanceof Node||t instanceof I(t).Node)}function H(t){return!!B()&&(t instanceof Element||t instanceof I(t).Element)}function N(t){return!!B()&&(t instanceof HTMLElement||t instanceof I(t).HTMLElement)}function W(t){return!(!B()||"undefined"==typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof I(t).ShadowRoot)}function Y(t){const{overflow:e,overflowX:n,overflowY:i,display:o}=et(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+n)&&"inline"!==o&&"contents"!==o}function _(t){return/^(table|td|th)$/.test($(t))}function K(t){try{if(t.matches(":popover-open"))return!0}catch(t){}try{return t.matches(":modal")}catch(t){return!1}}const X=/transform|translate|scale|rotate|perspective|filter/,Z=/paint|layout|strict|content/,G=t=>!!t&&"none"!==t;let J;function U(t){const e=H(t)?et(t):t;return G(e.transform)||G(e.translate)||G(e.scale)||G(e.rotate)||G(e.perspective)||!Q()&&(G(e.backdropFilter)||G(e.filter))||X.test(e.willChange||"")||Z.test(e.contain||"")}function Q(){return null==J&&(J="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),J}function tt(t){return/^(html|body|#document)$/.test($(t))}function et(t){return I(t).getComputedStyle(t)}function nt(t){return H(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function it(t){if("html"===$(t))return t;const e=t.assignedSlot||t.parentNode||W(t)&&t.host||V(t);return W(e)?e.host:e}function ot(t){const e=it(t);return tt(e)?(t.ownerDocument||t).body:N(e)&&Y(e)?e:ot(e)}function rt(t,e,n){var i;void 0===e&&(e=[]),void 0===n&&(n=!0);const o=ot(t),r=o===(null==(i=t.ownerDocument)?void 0:i.body),s=I(o);if(r){const t=st(s);return e.concat(s,s.visualViewport||[],Y(o)?o:[],t&&n?rt(t):[])}return e.concat(o,rt(o,[],n))}function st(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function lt(t){const e=et(t);let n=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const o=N(t),r=o?t.offsetWidth:n,s=o?t.offsetHeight:i,l=m(n)!==r||m(i)!==s;return l&&(n=r,i=s),{width:n,height:i,$:l}}function at(t){return H(t)?t:t.contextElement}function ct(t){const e=at(t);if(!N(e))return y(1);const n=e.getBoundingClientRect(),{width:i,height:o,$:r}=lt(e);let s=(r?m(n.width):n.width)/i,l=(r?m(n.height):n.height)/o;return s&&Number.isFinite(s)||(s=1),l&&Number.isFinite(l)||(l=1),{x:s,y:l}}const ut=y(0);function ft(t){const e=I(t);return Q()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:ut}function ht(t,e,n,i){void 0===e&&(e=!1),void 0===n&&(n=!1);const o=t.getBoundingClientRect(),r=at(t);let s=y(1);e&&(i?H(i)&&(s=ct(i)):s=ct(t));const l=function(t,e,n){return void 0===e&&(e=!1),!!n&&e&&n===I(t)}(r,n,i)?ft(r):y(0);let a=(o.left+l.x)/s.x,c=(o.top+l.y)/s.y,u=o.width/s.x,f=o.height/s.y;if(r&&i){const t=I(r),e=H(i)?I(i):i;let n=t,o=st(n);for(;o&&e!==n;){const t=ct(o),e=o.getBoundingClientRect(),i=et(o),r=e.left+(o.clientLeft+parseFloat(i.paddingLeft))*t.x,s=e.top+(o.clientTop+parseFloat(i.paddingTop))*t.y;a*=t.x,c*=t.y,u*=t.x,f*=t.y,a+=r,c+=s,n=I(o),o=st(n)}}return j({width:u,height:f,x:a,y:c})}function dt(t,e){const n=nt(t).scrollLeft;return e?e.left+n:ht(V(t)).left+n}function mt(t,e){const n=t.getBoundingClientRect();return{x:n.left+e.scrollLeft-dt(t,n),y:n.top+e.scrollTop}}function pt(t,e,n){let i;if("viewport"===e||"layoutViewport"===e)i=function(t,e,n){void 0===n&&(n="viewport");const i="layoutViewport"===n,o=I(t),r=V(t),s=o.visualViewport;let l=r.clientWidth,a=r.clientHeight,c=0,u=0;if(s){const t=!Q()||"fixed"===e;i?t||(c=-s.offsetLeft,u=-s.offsetTop):(l=s.width,a=s.height,t&&(c=s.offsetLeft,u=s.offsetTop))}if(dt(r)<=0){const t=r.ownerDocument,e=t.body,n=getComputedStyle(e),i="CSS1Compat"===t.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-e.clientWidth-i),s="stable both-edges"===getComputedStyle(r).scrollbarGutter?o/2:o;s<=25&&(l-=s)}return{width:l,height:a,x:c,y:u}}(t,n,e);else if("document"===e)i=function(t){const e=nt(t),n=t.ownerDocument.body,i=d(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),o=d(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let r=-e.scrollLeft+dt(t);const s=-e.scrollTop;return"rtl"===et(n).direction&&(r+=d(t.clientWidth,n.clientWidth)-i),{width:i,height:o,x:r,y:s}}(V(t));else if(H(e))i=function(t,e){const n=ht(t,!0,"fixed"===e),i=n.top+t.clientTop,o=n.left+t.clientLeft,r=ct(t);return{width:t.clientWidth*r.x,height:t.clientHeight*r.y,x:o*r.x,y:i*r.y}}(e,n);else{const n=ft(t);i={x:e.x-n.x,y:e.y-n.y,width:e.width,height:e.height}}return j(i)}function yt(t,e,n){const i=N(e),o=V(e),r="fixed"===n,s=ht(t,!0,r,e);let l={scrollLeft:0,scrollTop:0};const a=y(0);if((i||!r)&&(("body"!==$(e)||Y(o))&&(l=nt(e)),i)){const t=ht(e,!0,r,e);a.x=t.x+e.clientLeft,a.y=t.y+e.clientTop}!i&&o&&(a.x=dt(o));const c=!o||i||r?y(0):mt(o,l);return{x:s.left+l.scrollLeft-a.x-c.x,y:s.top+l.scrollTop-a.y-c.y,width:s.width,height:s.height}}function wt(t){return"static"===et(t).position}function gt(t,e){if(!N(t)||"fixed"===et(t).position)return null;if(e)return e(t);let n=t.offsetParent;return V(t)===n&&(n=n.ownerDocument.body),n}function xt(t,e){const n=I(t);if(K(t))return n;if(!N(t)){let e=it(t);for(;e&&!tt(e);){if(H(e)&&!wt(e))return e;e=it(e)}return n}let i=gt(t,e);for(;i&&_(i)&&wt(i);)i=gt(i,e);return i&&tt(i)&&wt(i)&&!U(i)?n:i||function(t){let e=it(t);for(;N(e)&&!tt(e);){if(U(e))return e;if(K(e))return null;e=it(e)}return null}(t)||n}const vt={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:n,offsetParent:i,strategy:o}=t;const r="fixed"===o,s=V(i),l=!!e&&K(e.floating);if(i===s||l&&r)return n;let a={scrollLeft:0,scrollTop:0},c=y(1);const u=y(0),f=N(i);if((f||!r)&&(("body"!==$(i)||Y(s))&&(a=nt(i)),f)){const t=ht(i);c=ct(i),u.x=t.x+i.clientLeft,u.y=t.y+i.clientTop}const h=!s||f||r?y(0):mt(s,a);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-a.scrollLeft*c.x+u.x+h.x,y:n.y*c.y-a.scrollTop*c.y+u.y+h.y}},getDocumentElement:V,getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:i,strategy:o}=t;const r=[..."clippingAncestors"===n?K(e)?[]:function(t,e){const n=e.get(t);if(n)return n;let i=rt(t,[],!1).filter((t=>H(t)&&"body"!==$(t))),o=null;const r="fixed"===et(t).position;let s=r?it(t):t;for(;H(s)&&!tt(s);){const t=et(s),e=U(s),n=o?o.position:r?"fixed":"";e||"fixed"!==n&&("absolute"!==n||"static"!==t.position)?o=t:i=i.filter((t=>t!==s)),s=it(s)}return e.set(t,i),i}(e,this._c):[].concat(n),i],s=pt(e,r[0],o);let l=s.top,a=s.right,c=s.bottom,u=s.left;for(let t=1;t<r.length;t++){const n=pt(e,r[t],o);l=d(n.top,l),a=h(n.right,a),c=h(n.bottom,c),u=d(n.left,u)}return{width:a-u,height:c-l,x:u,y:l}},getOffsetParent:xt,getElementRects:async function(t){const e=this.getOffsetParent||xt,n=this.getDimensions,i=await n(t.floating);return{reference:yt(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}},getClientRects:function(t){return t.getClientRects?Array.from(t.getClientRects()):[]},getDimensions:function(t){const{width:e,height:n}=lt(t);return{width:e,height:n}},getScale:ct,isElement:H,isRTL:function(t){return"rtl"===et(t).direction}};function bt(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function At(t,e,n,i){void 0===i&&(i={});const{ancestorScroll:o=!0,ancestorResize:r=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:a=!1}=i,c=at(t),u=o||r?[...c?rt(c):[],...e?rt(e):[]]:[];u.forEach((t=>{o&&t.addEventListener("scroll",n),r&&t.addEventListener("resize",n)}));const f=c&&l?function(t,e,n){let i,o=null;const r=V(t);function s(){var t;clearTimeout(i),null==(t=o)||t.disconnect(),o=null}function l(n,a){void 0===n&&(n=!1),void 0===a&&(a=1),s();const c=t.getBoundingClientRect(),{left:u,top:f,width:m,height:y}=c;if(n||e(),!m||!y)return;const w={rootMargin:-p(f)+"px "+-p(r.clientWidth-(u+m))+"px "+-p(r.clientHeight-(f+y))+"px "+-p(u)+"px",threshold:d(0,h(1,a))||1};let g=!0;function x(e){const n=e[0].intersectionRatio;if(!bt(c,t.getBoundingClientRect()))return l();if(n!==a){if(!g)return l();n?l(!1,n):i=setTimeout((()=>{l(!1,1e-7)}),1e3)}g=!1}try{o=new IntersectionObserver(x,{...w,root:r.ownerDocument})}catch(t){o=new IntersectionObserver(x,w)}o.observe(t)}const a=I(t),c=()=>l(n);return a.addEventListener("resize",c),l(!0),()=>{a.removeEventListener("resize",c),s()}}(c,n,r):null;let m,y=-1,w=null;s&&(w=new ResizeObserver((t=>{let[i]=t;i&&i.target===c&&w&&e&&(w.unobserve(e),cancelAnimationFrame(y),y=requestAnimationFrame((()=>{var t;null==(t=w)||t.observe(e)}))),n()})),c&&!a&&w.observe(c),e&&w.observe(e));let g=a?ht(t):null;return a&&function e(){const i=ht(t);g&&!bt(g,i)&&n(),g=i,m=requestAnimationFrame(e)}(),n(),()=>{var t;u.forEach((t=>{o&&t.removeEventListener("scroll",n),r&&t.removeEventListener("resize",n)})),null==f||f(),null==(t=w)||t.disconnect(),w=null,a&&cancelAnimationFrame(m)}}const St=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:i,placement:o,platform:r}=e,{mainAxis:s=!0,crossAxis:l=!1,limiter:a={fn:t=>{let{x:e,y:n}=t;return{x:e,y:n}}},...c}=x(t,e),u={x:n,y:i},f=await r.detectOverflow(e,c),h=T(o),d=A(h);let m=u[d],p=u[h];const y=(t,e)=>g(e+f["y"===t?"top":"left"],e,e-f["y"===t?"bottom":"right"]);s&&(m=y(d,m)),l&&(p=y(h,p));const w=a.fn({...e,[d]:m,[h]:p});return{...w,data:{x:w.x-n,y:w.y-i,enabled:{[d]:s,[h]:l}}}}}},Tt=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var n,i;const{placement:o,middlewareData:r,rects:s,initialPlacement:l,platform:a,elements:c}=e,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:p=!0,...y}=x(t,e);if(null!=(n=r.arrow)&&n.alignmentOffset)return{};const w=v(o),g=T(l),A=v(l)===l,L=await(null==a.isRTL?void 0:a.isRTL(c.floating)),j=h||(A||!p?[C(l)]:function(t){const e=C(t);return[R(t),e,R(e)]}(l)),D="none"!==m;!h&&D&&j.push(...function(t,e,n,i){const o=b(t);let r=function(t,e,n){switch(t){case"top":case"bottom":return n?e?F:O:e?O:F;case"left":case"right":return e?E:z;default:return[]}}(v(t),"start"===n,i);return o&&(r=r.map((t=>t+"-"+o)),e&&(r=r.concat(r.map(R)))),r}(l,p,m,L));const P=[l,...j],M=await a.detectOverflow(e,y),B=[];let $=(null==(i=r.flip)?void 0:i.overflows)||[];if(u&&B.push(M[w]),f){const t=function(t,e,n){void 0===n&&(n=!1);const i=b(t),o=k(t),r=S(o);let s="x"===o?i===(n?"end":"start")?"right":"left":"start"===i?"bottom":"top";return e.reference[r]>e.floating[r]&&(s=C(s)),[s,C(s)]}(o,s,L);B.push(M[t[0]],M[t[1]])}if($=[...$,{placement:o,overflows:B}],!B.every((t=>t<=0))){var I,V;const t=((null==(I=r.flip)?void 0:I.index)||0)+1,e=P[t];if(e&&("alignment"!==f||g===T(e)||$.every((t=>T(t.placement)!==g||t.overflows[0]>0))))return{data:{index:t,overflows:$},reset:{placement:e}};let n=null==(V=$.filter((t=>t.overflows[0]<=0)).sort(((t,e)=>t.overflows[1]-e.overflows[1]))[0])?void 0:V.placement;if(!n)switch(d){case"bestFit":{var q;const t=null==(q=$.filter((t=>{if(D){const e=T(t.placement);return e===g||"y"===e}return!0})).map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,e)=>t+e),0)])).sort(((t,e)=>t[1]-e[1]))[0])?void 0:q[0];t&&(n=t);break}case"initialPlacement":n=l}if(o!==n)return{reset:{placement:n}}}return{}}}},kt=async({floatingElement:e,referenceElement:n,arrowElement:i,align:o="top"})=>{var r,s,l;if(!t()){const t=[(l=(null==i?void 0:i.offsetHeight)||10,void 0===l&&(l=0),{name:"offset",options:l,async fn(t){var e,n;const{x:i,y:o,placement:r,middlewareData:s}=t,a=await async function(t,e){const{placement:n,platform:i,elements:o}=t,r=await(null==i.isRTL?void 0:i.isRTL(o.floating)),s=v(n),l=b(n),a="y"===T(n),c=M.has(s)?-1:1,u=r&&a?-1:1,f=x(e,t);let{mainAxis:h,crossAxis:d,alignmentAxis:m}="number"==typeof f?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return l&&"number"==typeof m&&(d="end"===l?-1*m:m),a?{x:d*u,y:h*c}:{x:h*c,y:d*u}}(t,l);return r===(null==(e=s.offset)?void 0:e.placement)&&null!=(n=s.arrow)&&n.alignmentOffset?{}:{x:i+a.x,y:o+a.y,data:{...a,placement:r}}}}),Tt(),St()];i&&t.push((t=>({name:"arrow",options:t,async fn(e){const{x:n,y:i,placement:o,rects:r,platform:s,elements:l,middlewareData:a}=e,{element:c,padding:u=0}=x(t,e)||{};if(null==c)return{};const f=L(u),d={x:n,y:i},m=k(o),p=S(m),y=await s.getDimensions(c),w="y"===m,v=w?"top":"left",A=w?"bottom":"right",T=w?"clientHeight":"clientWidth",R=r.reference[p]+r.reference[m]-d[m]-r.floating[p],O=d[m]-r.reference[m],F=await(null==s.getOffsetParent?void 0:s.getOffsetParent(c));let E=F?F[T]:0;E&&await(null==s.isElement?void 0:s.isElement(F))||(E=l.floating[T]||r.floating[p]);const z=R/2-O/2,C=E/2-y[p]/2-1,j=h(f[v],C),D=h(f[A],C),P=E-y[p]-D,M=E/2-y[p]/2+z,B=g(j,M,P),$=!a.arrow&&null!=b(o)&&M!==B&&r.reference[p]/2-(M<j?j:D)-y[p]/2<0,I=$?M<j?M-j:M-P:0;return{[m]:d[m]+I,data:{[m]:B,centerOffset:M-B-I,...$&&{alignmentOffset:I}},reset:$}}}))({element:i}));const{x:a,y:c,middlewareData:u,placement:f}=await((t,e,n)=>{const i=new Map,o=null!=n?n:{},r={...vt,...o.platform,_c:i};return(async(t,e,n)=>{const{placement:i="bottom",strategy:o="absolute",middleware:r=[],platform:s}=n,l=s.detectOverflow?s:{...s,detectOverflow:P},a=await(null==s.isRTL?void 0:s.isRTL(e));let c=await s.getElementRects({reference:t,floating:e,strategy:o}),{x:u,y:f}=D(c,i,a),h=i,d=0;const m={};for(let n=0;n<r.length;n++){const p=r[n];if(!p)continue;const{name:y,fn:w}=p,{x:g,y:x,data:v,reset:b}=await w({x:u,y:f,initialPlacement:i,placement:h,strategy:o,middlewareData:m,rects:c,platform:l,elements:{reference:t,floating:e}});u=null!=g?g:u,f=null!=x?x:f,m[y]={...m[y],...v},b&&d<50&&(d++,"object"==typeof b&&(b.placement&&(h=b.placement),b.rects&&(c=!0===b.rects?await s.getElementRects({reference:t,floating:e,strategy:o}):b.rects),({x:u,y:f}=D(c,h,a))),n=-1)}return{x:u,y:f,placement:h,strategy:o,middlewareData:m}})(t,e,{...o,platform:r})})(n,e,{placement:o,middleware:t,strategy:"fixed"});Object.assign(e.style,{left:`${a}px`,top:`${c}px`,visibility:"visible"}),i&&((null===(r=u.arrow)||void 0===r?void 0:r.x)?Object.assign(i.style,{left:`${u.arrow.x}px`,top:"bottom"===f?-i.offsetHeight/2+"px":"",bottom:"top"===f?-i.offsetHeight/2+"px":""}):(null===(s=u.arrow)||void 0===s?void 0:s.y)&&Object.assign(i.style,{left:"right"===f?-i.offsetWidth/2+"px":"",right:"left"===f?-i.offsetWidth/2+"px":"",top:`${u.arrow.y}px`}))}},Rt=new Set;let Ot=null;class Ft{constructor(t,e){this.setState=t.setState,this.getState=t.getState,this.renderProps=l(e)}setRenderProp(t,e){this.renderProps[t]=e}getRenderProp(t){return this.renderProps[t]}}const Et={required:[c],optional:[u,f,a]};class zt extends Ft{constructor(t){super(t,Et),this.hasFocusIn=!1,this.hasMouseIn=!1,this.isHiddenForCurrentVisit=!1,this.setTooltipElementRef=t=>{this.tooltipElement=t,this.tooltipElement&&this.addListeners(this.tooltipElement)},this.hideTooltipByEscape=t=>{"Escape"===t.key&&(t.stopPropagation(),t.preventDefault(),this.hideTooltip())},this.handleMouseEnter=()=>{const t=this.isNewVisit();this.hasMouseIn=!0,t&&(this.isHiddenForCurrentVisit=!1),this.showOrHideTooltip()},this.handleMouseLeave=()=>{this.hasMouseIn=!1,this.resetHideFlag(),this.showOrHideTooltip()},this.handleFocusIn=()=>{const t=this.isNewVisit();this.hasFocusIn=!0,t&&(this.isHiddenForCurrentVisit=!1),this.showOrHideTooltip()},this.handleFocusOut=()=>{this.hasFocusIn=!1,this.resetHideFlag(),this.showOrHideTooltip()}}componentWillLoad(t){this.watchLabel(t.label),this.watchAlign(t.align),this.watchBadgeText(t.badgeText),this.watchId(t.id)}watchLabel(t){c.apply(t||void 0,(t=>{this.setRenderProp("label",t)}))}watchAlign(t){u.apply(t,(t=>{this.setRenderProp("align",t)}))}watchBadgeText(t){f.apply(t,(t=>{this.setRenderProp("badgeText",t)}))}watchId(t){a.apply(t,(t=>{this.setRenderProp("id",t)}))}initContext(t){this.previousSibling=t}syncListeners(t,e,n=!1){t&&this.removeListeners(t),e&&(n&&(this.previousSibling=e),this.removeListeners(e),this.addListeners(e))}handleEventListeners(t){this.syncListeners(this.previousSibling,t.previousElementSibling,!0)}hideTooltip(){this.isHiddenForCurrentVisit=!0,this.tooltipElement&&(function(t){if(Rt.delete(t)&&Ot===t){Ot=null;for(const t of Rt)Ot=t;Ot&&Ot.style.setProperty("z-index","1000")}}(this.tooltipElement),n(),this.tooltipElement.classList.remove("show"),this.tooltipElement.classList.add("hide"),this.tooltipElement.addEventListener("animationend",(()=>{var t;(null===(t=this.tooltipElement)||void 0===t?void 0:t.classList.contains("hide"))&&this.tooltipElement.style.removeProperty("display")}),{once:!0}),this.cleanupAutoPositioning&&(this.cleanupAutoPositioning(),this.cleanupAutoPositioning=void 0)),e().removeEventListener("keydown",this.hideTooltipByEscape)}destroy(){clearTimeout(this.overFocusTimeout),this.previousSibling&&(this.removeListeners(this.previousSibling),this.previousSibling=void 0),this.tooltipElement&&this.removeListeners(this.tooltipElement),this.cleanupAutoPositioning&&(this.cleanupAutoPositioning(),this.cleanupAutoPositioning=void 0),e().removeEventListener("keydown",this.hideTooltipByEscape)}isNewVisit(){return!this.hasMouseIn&&!this.hasFocusIn}resetHideFlag(){this.isNewVisit()&&(this.isHiddenForCurrentVisit=!1)}async alignTooltip(){this.tooltipElement&&this.previousSibling&&await kt({align:this.getRenderProp("align"),arrowElement:this.tooltipElement.querySelector(".kol-tooltip__arrow"),floatingElement:this.tooltipElement,referenceElement:this.previousSibling})}showTooltip(){var t;!this.isHiddenForCurrentVisit&&this.previousSibling&&this.tooltipElement&&(Ot!==(t=this.tooltipElement)&&(Ot&&Ot.style.setProperty("z-index","999"),Rt.delete(t),Rt.add(t),t.style.setProperty("z-index","1000"),Ot=t),i(),this.tooltipElement.classList.remove("hide"),this.tooltipElement.classList.add("show"),this.tooltipElement.style.setProperty("display","block"),e().addEventListener("keydown",this.hideTooltipByEscape),this.cleanupAutoPositioning=At(this.previousSibling,this.tooltipElement,(()=>{this.alignTooltip()})))}showOrHideTooltip(){clearTimeout(this.overFocusTimeout),this.overFocusTimeout=setTimeout((()=>{this.hasMouseIn||this.hasFocusIn?this.showTooltip():this.hideTooltip()}),300)}addListeners(t){t.addEventListener("mouseover",this.handleMouseEnter),t.addEventListener("mouseout",this.handleMouseLeave),t.addEventListener("focusin",this.handleFocusIn),t.addEventListener("focusout",this.handleFocusOut)}removeListeners(t){t.removeEventListener("mouseover",this.handleMouseEnter),t.removeEventListener("mouseout",this.handleMouseLeave),t.removeEventListener("focusin",this.handleFocusIn),t.removeEventListener("focusout",this.handleFocusOut)}}export{Ft as B,zt as T,u as a,kt as b,At as c}
|
|
4
|
+
import{y as t,q as e}from"./common-BdSzSIXg.js";import{t as n,a as i}from"./tooltip-open-tracking-D3tCiiGP.js";import{c as o}from"./component-B8UMedaK.js";import{c as r,b as s,d as l}from"./props-from-config-BOUcpF7e.js";import{i as a}from"./id-Bh4FF8c0.js";import{l as c}from"./label-lang-segment-C5LYGOHt.js";const u=o("align","top"),f=r("badgeText","",s),h=Math.min,d=Math.max,m=Math.round,p=Math.floor,y=t=>({x:t,y:t}),w={left:"right",right:"left",bottom:"top",top:"bottom"};function g(t,e,n){return d(t,h(e,n))}function x(t,e){return"function"==typeof t?t(e):t}function v(t){return t.split("-")[0]}function b(t){return t.split("-")[1]}function A(t){return"x"===t?"y":"x"}function S(t){return"y"===t?"height":"width"}function T(t){const e=t[0];return"t"===e||"b"===e?"y":"x"}function F(t){return A(T(t))}function O(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const k=["left","right"],R=["right","left"],C=["top","bottom"],E=["bottom","top"];function L(t){const e=v(t);return w[e]+t.slice(e.length)}function z(t){return"number"!=typeof t?function(t){var e,n,i,o;return{top:null!=(e=t.top)?e:0,right:null!=(n=t.right)?n:0,bottom:null!=(i=t.bottom)?i:0,left:null!=(o=t.left)?o:0}}(t):{top:t,right:t,bottom:t,left:t}}function j(t){const{x:e,y:n,width:i,height:o}=t;return{width:i,height:o,top:n,left:e,right:e+i,bottom:n+o,x:e,y:n}}function P(t,e,n){let{reference:i,floating:o}=t;const r=T(e),s=F(e),l=S(s),a=v(e),c="y"===r,u=i.x+i.width/2-o.width/2,f=i.y+i.height/2-o.height/2,h=i[l]/2-o[l]/2;let d;switch(a){case"top":d={x:u,y:i.y-o.height};break;case"bottom":d={x:u,y:i.y+i.height};break;case"right":d={x:i.x+i.width,y:f};break;case"left":d={x:i.x-o.width,y:f};break;default:d={x:i.x,y:i.y}}const m=b(e);return m&&(d[s]+=h*("end"===m?1:-1)*(n&&c?-1:1)),d}async function B(t,e){var n;void 0===e&&(e={});const{x:i,y:o,platform:r,rects:s,elements:l,strategy:a}=t,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:h=!1,padding:d=0}=x(e,t),m=z(d),p=l[h?"floating"===f?"reference":"floating":f],y=j(await r.getClippingRect({element:null==(n=await(null==r.isElement?void 0:r.isElement(p)))||n?p:p.contextElement||await(null==r.getDocumentElement?void 0:r.getDocumentElement(l.floating)),boundary:c,rootBoundary:u,strategy:a})),w="floating"===f?{x:i,y:o,width:s.floating.width,height:s.floating.height}:s.reference,g=await(null==r.getOffsetParent?void 0:r.getOffsetParent(l.floating)),v=await(null==r.isElement?void 0:r.isElement(g))&&await(null==r.getScale?void 0:r.getScale(g))||{x:1,y:1},b=j(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:w,offsetParent:g,strategy:a}):w);return{top:(y.top-b.top+m.top)/v.y,bottom:(b.bottom-y.bottom+m.bottom)/v.y,left:(y.left-b.left+m.left)/v.x,right:(b.right-y.right+m.right)/v.x}}const D=new Set(["left","top"]);function M(){return"undefined"!=typeof window}function $(t){return q(t)?(t.nodeName||"").toLowerCase():"#document"}function H(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function I(t){var e;return null==(e=(q(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function q(t){return!!M()&&(t instanceof Node||t instanceof H(t).Node)}function N(t){return!!M()&&(t instanceof Element||t instanceof H(t).Element)}function V(t){return!!M()&&(t instanceof HTMLElement||t instanceof H(t).HTMLElement)}function _(t){return!(!M()||"undefined"==typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof H(t).ShadowRoot)}function G(t){const{overflow:e,overflowX:n,overflowY:i,display:o}=et(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+n)&&"inline"!==o&&"contents"!==o}function U(t){return/^(table|td|th)$/.test($(t))}function W(t){try{if(t.matches(":popover-open"))return!0}catch(t){}try{return t.matches(":modal")}catch(t){return!1}}const X=/transform|translate|scale|rotate|perspective|filter/,Y=/paint|layout|strict|content/,K=t=>!!t&&"none"!==t;let J;function Q(t){const e=N(t)?et(t):t;return K(e.transform)||K(e.translate)||K(e.scale)||K(e.rotate)||K(e.perspective)||!Z()&&(K(e.backdropFilter)||K(e.filter))||X.test(e.willChange||"")||Y.test(e.contain||"")}function Z(){return null==J&&(J="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),J}function tt(t){return/^(html|body|#document)$/.test($(t))}function et(t){return H(t).getComputedStyle(t)}function nt(t){return N(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function it(t){if("html"===$(t))return t;const e=t.assignedSlot||t.parentNode||_(t)&&t.host||I(t);return _(e)?e.host:e}function ot(t){const e=it(t);return tt(e)?(t.ownerDocument||t).body:V(e)&&G(e)?e:ot(e)}function rt(t,e,n){var i;void 0===e&&(e=[]),void 0===n&&(n=!0);const o=ot(t),r=o===(null==(i=t.ownerDocument)?void 0:i.body),s=H(o);if(r){const t=st(s);return e.concat(s,s.visualViewport||[],G(o)?o:[],t&&n?rt(t):[])}return e.concat(o,rt(o,[],n))}function st(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function lt(t){const e=et(t);let n=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const o=V(t),r=o?t.offsetWidth:n,s=o?t.offsetHeight:i,l=m(n)!==r||m(i)!==s;return l&&(n=r,i=s),{width:n,height:i,$:l}}function at(t){return N(t)?t:t.contextElement}function ct(t){const e=at(t);if(!V(e))return y(1);const n=e.getBoundingClientRect(),{width:i,height:o,$:r}=lt(e);let s=(r?m(n.width):n.width)/i,l=(r?m(n.height):n.height)/o;return s&&Number.isFinite(s)||(s=1),l&&Number.isFinite(l)||(l=1),{x:s,y:l}}const ut=y(0);function ft(t){const e=H(t);return Z()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:ut}function ht(t,e,n,i){void 0===e&&(e=!1),void 0===n&&(n=!1);const o=t.getBoundingClientRect(),r=at(t);let s=y(1);e&&(i?N(i)&&(s=ct(i)):s=ct(t));const l=function(t,e,n){return void 0===e&&(e=!1),!!n&&e&&n===H(t)}(r,n,i)?ft(r):y(0);let a=(o.left+l.x)/s.x,c=(o.top+l.y)/s.y,u=o.width/s.x,f=o.height/s.y;if(r&&i){const t=H(r),e=N(i)?H(i):i;let n=t,o=st(n);for(;o&&e!==n;){const t=ct(o),e=o.getBoundingClientRect(),i=et(o),r=e.left+(o.clientLeft+parseFloat(i.paddingLeft))*t.x,s=e.top+(o.clientTop+parseFloat(i.paddingTop))*t.y;a*=t.x,c*=t.y,u*=t.x,f*=t.y,a+=r,c+=s,n=H(o),o=st(n)}}return j({width:u,height:f,x:a,y:c})}function dt(t,e){const n=nt(t).scrollLeft;return e?e.left+n:ht(I(t)).left+n}function mt(t,e){const n=t.getBoundingClientRect();return{x:n.left+e.scrollLeft-dt(t,n),y:n.top+e.scrollTop}}function pt(t,e,n){let i;if("viewport"===e||"layoutViewport"===e)i=function(t,e,n){void 0===n&&(n="viewport");const i="layoutViewport"===n,o=H(t),r=I(t),s=o.visualViewport;let l=r.clientWidth,a=r.clientHeight,c=0,u=0;if(s){const t=!Z()||"fixed"===e;i?t||(c=-s.offsetLeft,u=-s.offsetTop):(l=s.width,a=s.height,t&&(c=s.offsetLeft,u=s.offsetTop))}if(dt(r)<=0){const t=r.ownerDocument,e=t.body,n=getComputedStyle(e),i="CSS1Compat"===t.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-e.clientWidth-i),s="stable both-edges"===getComputedStyle(r).scrollbarGutter?o/2:o;s<=25&&(l-=s)}return{width:l,height:a,x:c,y:u}}(t,n,e);else if("document"===e)i=function(t){const e=nt(t),n=t.ownerDocument.body,i=d(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),o=d(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let r=-e.scrollLeft+dt(t);const s=-e.scrollTop;return"rtl"===et(n).direction&&(r+=d(t.clientWidth,n.clientWidth)-i),{width:i,height:o,x:r,y:s}}(I(t));else if(N(e))i=function(t,e){const n=ht(t,!0,"fixed"===e),i=n.top+t.clientTop,o=n.left+t.clientLeft,r=ct(t);return{width:t.clientWidth*r.x,height:t.clientHeight*r.y,x:o*r.x,y:i*r.y}}(e,n);else{const n=ft(t);i={x:e.x-n.x,y:e.y-n.y,width:e.width,height:e.height}}return j(i)}function yt(t,e,n){const i=V(e),o=I(e),r="fixed"===n,s=ht(t,!0,r,e);let l={scrollLeft:0,scrollTop:0};const a=y(0);if((i||!r)&&(("body"!==$(e)||G(o))&&(l=nt(e)),i)){const t=ht(e,!0,r,e);a.x=t.x+e.clientLeft,a.y=t.y+e.clientTop}!i&&o&&(a.x=dt(o));const c=!o||i||r?y(0):mt(o,l);return{x:s.left+l.scrollLeft-a.x-c.x,y:s.top+l.scrollTop-a.y-c.y,width:s.width,height:s.height}}function wt(t){return"static"===et(t).position}function gt(t,e){if(!V(t)||"fixed"===et(t).position)return null;if(e)return e(t);let n=t.offsetParent;return I(t)===n&&(n=n.ownerDocument.body),n}function xt(t,e){const n=H(t);if(W(t))return n;if(!V(t)){let e=it(t);for(;e&&!tt(e);){if(N(e)&&!wt(e))return e;e=it(e)}return n}let i=gt(t,e);for(;i&&U(i)&&wt(i);)i=gt(i,e);return i&&tt(i)&&wt(i)&&!Q(i)?n:i||function(t){let e=it(t);for(;V(e)&&!tt(e);){if(Q(e))return e;if(W(e))return null;e=it(e)}return null}(t)||n}const vt={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:n,offsetParent:i,strategy:o}=t;const r="fixed"===o,s=I(i),l=!!e&&W(e.floating);if(i===s||l&&r)return n;let a={scrollLeft:0,scrollTop:0},c=y(1);const u=y(0),f=V(i);if((f||!r)&&(("body"!==$(i)||G(s))&&(a=nt(i)),f)){const t=ht(i);c=ct(i),u.x=t.x+i.clientLeft,u.y=t.y+i.clientTop}const h=!s||f||r?y(0):mt(s,a);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-a.scrollLeft*c.x+u.x+h.x,y:n.y*c.y-a.scrollTop*c.y+u.y+h.y}},getDocumentElement:I,getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:i,strategy:o}=t;const r=[..."clippingAncestors"===n?W(e)?[]:function(t,e){const n=e.get(t);if(n)return n;let i=rt(t,[],!1).filter((t=>N(t)&&"body"!==$(t))),o=null;const r="fixed"===et(t).position;let s=r?it(t):t;for(;N(s)&&!tt(s);){const t=et(s),e=Q(s),n=o?o.position:r?"fixed":"";e||"fixed"!==n&&("absolute"!==n||"static"!==t.position)?o=t:i=i.filter((t=>t!==s)),s=it(s)}return e.set(t,i),i}(e,this._c):[].concat(n),i],s=pt(e,r[0],o);let l=s.top,a=s.right,c=s.bottom,u=s.left;for(let t=1;t<r.length;t++){const n=pt(e,r[t],o);l=d(n.top,l),a=h(n.right,a),c=h(n.bottom,c),u=d(n.left,u)}return{width:a-u,height:c-l,x:u,y:l}},getOffsetParent:xt,getElementRects:async function(t){const e=this.getOffsetParent||xt,n=this.getDimensions,i=await n(t.floating);return{reference:yt(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}},getClientRects:function(t){return t.getClientRects?Array.from(t.getClientRects()):[]},getDimensions:function(t){const{width:e,height:n}=lt(t);return{width:e,height:n}},getScale:ct,isElement:N,isRTL:function(t){return"rtl"===et(t).direction}};function bt(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function At(t,e,n,i){void 0===i&&(i={});const{ancestorScroll:o=!0,ancestorResize:r=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:a=!1}=i,c=at(t),u=o||r?[...c?rt(c):[],...e?rt(e):[]]:[];u.forEach((t=>{o&&t.addEventListener("scroll",n),r&&t.addEventListener("resize",n)}));const f=c&&l?function(t,e,n){let i,o=null;const r=I(t);function s(){var t;clearTimeout(i),null==(t=o)||t.disconnect(),o=null}function l(n,a){void 0===n&&(n=!1),void 0===a&&(a=1),s();const c=t.getBoundingClientRect(),{left:u,top:f,width:m,height:y}=c;if(n||e(),!m||!y)return;const w={rootMargin:-p(f)+"px "+-p(r.clientWidth-(u+m))+"px "+-p(r.clientHeight-(f+y))+"px "+-p(u)+"px",threshold:d(0,h(1,a))||1};let g=!0;function x(e){const n=e[0].intersectionRatio;if(!bt(c,t.getBoundingClientRect()))return l();if(n!==a){if(!g)return l();n?l(!1,n):i=setTimeout((()=>{l(!1,1e-7)}),1e3)}g=!1}try{o=new IntersectionObserver(x,{...w,root:r.ownerDocument})}catch(t){o=new IntersectionObserver(x,w)}o.observe(t)}const a=H(t),c=()=>l(n);return a.addEventListener("resize",c),l(!0),()=>{a.removeEventListener("resize",c),s()}}(c,n,r):null;let m,y=-1,w=null;s&&(w=new ResizeObserver((t=>{let[i]=t;i&&i.target===c&&w&&e&&(w.unobserve(e),cancelAnimationFrame(y),y=requestAnimationFrame((()=>{var t;null==(t=w)||t.observe(e)}))),n()})),c&&!a&&w.observe(c),e&&w.observe(e));let g=a?ht(t):null;return a&&function e(){const i=ht(t);g&&!bt(g,i)&&n(),g=i,m=requestAnimationFrame(e)}(),n(),()=>{var t;u.forEach((t=>{o&&t.removeEventListener("scroll",n),r&&t.removeEventListener("resize",n)})),null==f||f(),null==(t=w)||t.disconnect(),w=null,a&&cancelAnimationFrame(m)}}const St=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:i,placement:o,platform:r}=e,{mainAxis:s=!0,crossAxis:l=!1,limiter:a={fn:t=>{let{x:e,y:n}=t;return{x:e,y:n}}},...c}=x(t,e),u={x:n,y:i},f=await r.detectOverflow(e,c),h=T(o),d=A(h);let m=u[d],p=u[h];const y=(t,e)=>g(e+f["y"===t?"top":"left"],e,e-f["y"===t?"bottom":"right"]);s&&(m=y(d,m)),l&&(p=y(h,p));const w=a.fn({...e,[d]:m,[h]:p});return{...w,data:{x:w.x-n,y:w.y-i,enabled:{[d]:s,[h]:l}}}}}},Tt=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var n,i;const{placement:o,middlewareData:r,rects:s,initialPlacement:l,platform:a,elements:c}=e,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:p=!0,...y}=x(t,e);if(null!=(n=r.arrow)&&n.alignmentOffset)return{};const w=v(o),g=T(l),A=v(l)===l,z=await(null==a.isRTL?void 0:a.isRTL(c.floating)),j=h||(A||!p?[L(l)]:function(t){const e=L(t);return[O(t),e,O(e)]}(l)),P="none"!==m;!h&&P&&j.push(...function(t,e,n,i){const o=b(t);let r=function(t,e,n){switch(t){case"top":case"bottom":return n?e?R:k:e?k:R;case"left":case"right":return e?C:E;default:return[]}}(v(t),"start"===n,i);return o&&(r=r.map((t=>t+"-"+o)),e&&(r=r.concat(r.map(O)))),r}(l,p,m,z));const B=[l,...j],D=await a.detectOverflow(e,y),M=[];let $=(null==(i=r.flip)?void 0:i.overflows)||[];if(u&&M.push(D[w]),f){const t=function(t,e,n){void 0===n&&(n=!1);const i=b(t),o=F(t),r=S(o);let s="x"===o?i===(n?"end":"start")?"right":"left":"start"===i?"bottom":"top";return e.reference[r]>e.floating[r]&&(s=L(s)),[s,L(s)]}(o,s,z);M.push(D[t[0]],D[t[1]])}if($=[...$,{placement:o,overflows:M}],!M.every((t=>t<=0))){var H,I;const t=((null==(H=r.flip)?void 0:H.index)||0)+1,e=B[t];if(e&&("alignment"!==f||g===T(e)||$.every((t=>T(t.placement)!==g||t.overflows[0]>0))))return{data:{index:t,overflows:$},reset:{placement:e}};let n=null==(I=$.filter((t=>t.overflows[0]<=0)).sort(((t,e)=>t.overflows[1]-e.overflows[1]))[0])?void 0:I.placement;if(!n)switch(d){case"bestFit":{var q;const t=null==(q=$.filter((t=>{if(P){const e=T(t.placement);return e===g||"y"===e}return!0})).map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,e)=>t+e),0)])).sort(((t,e)=>t[1]-e[1]))[0])?void 0:q[0];t&&(n=t);break}case"initialPlacement":n=l}if(o!==n)return{reset:{placement:n}}}return{}}}},Ft=async({floatingElement:e,referenceElement:n,arrowElement:i,align:o="top"})=>{var r,s,l;if(!t()){const t=[(l=(null==i?void 0:i.offsetHeight)||10,void 0===l&&(l=0),{name:"offset",options:l,async fn(t){var e,n;const{x:i,y:o,placement:r,middlewareData:s}=t,a=await async function(t,e){const{placement:n,platform:i,elements:o}=t,r=await(null==i.isRTL?void 0:i.isRTL(o.floating)),s=v(n),l=b(n),a="y"===T(n),c=D.has(s)?-1:1,u=r&&a?-1:1,f=x(e,t);let{mainAxis:h,crossAxis:d,alignmentAxis:m}="number"==typeof f?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return l&&"number"==typeof m&&(d="end"===l?-1*m:m),a?{x:d*u,y:h*c}:{x:h*c,y:d*u}}(t,l);return r===(null==(e=s.offset)?void 0:e.placement)&&null!=(n=s.arrow)&&n.alignmentOffset?{}:{x:i+a.x,y:o+a.y,data:{...a,placement:r}}}}),Tt(),St()];i&&t.push((t=>({name:"arrow",options:t,async fn(e){const{x:n,y:i,placement:o,rects:r,platform:s,elements:l,middlewareData:a}=e,{element:c,padding:u=0}=x(t,e)||{};if(null==c)return{};const f=z(u),d={x:n,y:i},m=F(o),p=S(m),y=await s.getDimensions(c),w="y"===m,v=w?"top":"left",A=w?"bottom":"right",T=w?"clientHeight":"clientWidth",O=r.reference[p]+r.reference[m]-d[m]-r.floating[p],k=d[m]-r.reference[m],R=await(null==s.getOffsetParent?void 0:s.getOffsetParent(c));let C=R?R[T]:0;C&&await(null==s.isElement?void 0:s.isElement(R))||(C=l.floating[T]||r.floating[p]);const E=O/2-k/2,L=C/2-y[p]/2-1,j=h(f[v],L),P=h(f[A],L),B=C-y[p]-P,D=C/2-y[p]/2+E,M=g(j,D,B),$=!a.arrow&&null!=b(o)&&D!==M&&r.reference[p]/2-(D<j?j:P)-y[p]/2<0,H=$?D<j?D-j:D-B:0;return{[m]:d[m]+H,data:{[m]:M,centerOffset:D-M-H,...$&&{alignmentOffset:H}},reset:$}}}))({element:i}));const{x:a,y:c,middlewareData:u,placement:f}=await((t,e,n)=>{const i=new Map,o=null!=n?n:{},r={...vt,...o.platform,_c:i};return(async(t,e,n)=>{const{placement:i="bottom",strategy:o="absolute",middleware:r=[],platform:s}=n,l=s.detectOverflow?s:{...s,detectOverflow:B},a=await(null==s.isRTL?void 0:s.isRTL(e));let c=await s.getElementRects({reference:t,floating:e,strategy:o}),{x:u,y:f}=P(c,i,a),h=i,d=0;const m={};for(let n=0;n<r.length;n++){const p=r[n];if(!p)continue;const{name:y,fn:w}=p,{x:g,y:x,data:v,reset:b}=await w({x:u,y:f,initialPlacement:i,placement:h,strategy:o,middlewareData:m,rects:c,platform:l,elements:{reference:t,floating:e}});u=null!=g?g:u,f=null!=x?x:f,m[y]={...m[y],...v},b&&d<50&&(d++,"object"==typeof b&&(b.placement&&(h=b.placement),b.rects&&(c=!0===b.rects?await s.getElementRects({reference:t,floating:e,strategy:o}):b.rects),({x:u,y:f}=P(c,h,a))),n=-1)}return{x:u,y:f,placement:h,strategy:o,middlewareData:m}})(t,e,{...o,platform:r})})(n,e,{placement:o,middleware:t,strategy:"fixed"});Object.assign(e.style,{left:`${a}px`,top:`${c}px`,visibility:"visible"}),i&&((null===(r=u.arrow)||void 0===r?void 0:r.x)?Object.assign(i.style,{left:`${u.arrow.x}px`,top:"bottom"===f?-i.offsetHeight/2+"px":"",bottom:"top"===f?-i.offsetHeight/2+"px":""}):(null===(s=u.arrow)||void 0===s?void 0:s.y)&&Object.assign(i.style,{left:"right"===f?-i.offsetWidth/2+"px":"",right:"left"===f?-i.offsetWidth/2+"px":"",top:`${u.arrow.y}px`}))}},Ot=new Set;let kt=null;class Rt{constructor(t,e){this.setState=t.setState,this.getState=t.getState,this.renderProps=l(e)}setRenderProp(t,e){this.renderProps[t]=e}getRenderProp(t){return this.renderProps[t]}}const Ct={required:[c],optional:[u,f,a]};class Et extends Rt{constructor(t){super(t,Ct),this.hasFocusIn=!1,this.hasMouseIn=!1,this.isHiddenForCurrentVisit=!1,this.setTooltipElementRef=t=>{this.tooltipElement=t,this.tooltipElement&&this.addListeners(this.tooltipElement)},this.hideTooltipByEscape=t=>{"Escape"===t.key&&(t.stopPropagation(),t.preventDefault(),this.hideTooltip())},this.handleMouseEnter=()=>{const t=this.isNewVisit();this.hasMouseIn=!0,t&&(this.isHiddenForCurrentVisit=!1),this.showOrHideTooltip()},this.handleMouseLeave=()=>{this.hasMouseIn=!1,this.resetHideFlag(),this.showOrHideTooltip()},this.handleFocusIn=()=>{const t=this.isNewVisit();this.hasFocusIn=!0,t&&(this.isHiddenForCurrentVisit=!1),this.showOrHideTooltip()},this.handleFocusOut=()=>{this.hasFocusIn=!1,this.resetHideFlag(),this.showOrHideTooltip()}}componentWillLoad(t){this.watchLabel(t.label),this.watchAlign(t.align),this.watchBadgeText(t.badgeText),this.watchId(t.id)}watchLabel(t){c.apply(t||void 0,(t=>{this.setRenderProp("label",t)}))}watchAlign(t){u.apply(t,(t=>{this.setRenderProp("align",t)}))}watchBadgeText(t){f.apply(t,(t=>{this.setRenderProp("badgeText",t)}))}watchId(t){a.apply(t,(t=>{this.setRenderProp("id",t)}))}initContext(t){this.previousSibling=t}syncListeners(t,e,n=!1){t&&this.removeListeners(t),e&&(n&&(this.previousSibling=e),this.removeListeners(e),this.addListeners(e))}handleEventListeners(t){this.syncListeners(this.previousSibling,t.previousElementSibling,!0)}hideTooltip(){this.isHiddenForCurrentVisit=!0,this.tooltipElement&&(function(t){if(Ot.delete(t)&&kt===t){kt=null;for(const t of Ot)kt=t;kt&&kt.style.setProperty("z-index","1000")}}(this.tooltipElement),n(),this.tooltipElement.classList.remove("show"),this.tooltipElement.classList.add("hide"),this.tooltipElement.addEventListener("animationend",(()=>{var t;(null===(t=this.tooltipElement)||void 0===t?void 0:t.classList.contains("hide"))&&this.tooltipElement.style.removeProperty("display")}),{once:!0}),this.cleanupAutoPositioning&&(this.cleanupAutoPositioning(),this.cleanupAutoPositioning=void 0)),e().removeEventListener("keydown",this.hideTooltipByEscape)}destroy(){clearTimeout(this.overFocusTimeout),this.previousSibling&&(this.removeListeners(this.previousSibling),this.previousSibling=void 0),this.tooltipElement&&this.removeListeners(this.tooltipElement),this.cleanupAutoPositioning&&(this.cleanupAutoPositioning(),this.cleanupAutoPositioning=void 0),e().removeEventListener("keydown",this.hideTooltipByEscape)}isNewVisit(){return!this.hasMouseIn&&!this.hasFocusIn}resetHideFlag(){this.isNewVisit()&&(this.isHiddenForCurrentVisit=!1)}async alignTooltip(){this.tooltipElement&&this.previousSibling&&await Ft({align:this.getRenderProp("align"),arrowElement:this.tooltipElement.querySelector(".kol-tooltip__arrow"),floatingElement:this.tooltipElement,referenceElement:this.previousSibling})}showTooltip(){var t;!this.isHiddenForCurrentVisit&&this.previousSibling&&this.tooltipElement&&(kt!==(t=this.tooltipElement)&&(kt&&kt.style.setProperty("z-index","999"),Ot.delete(t),Ot.add(t),t.style.setProperty("z-index","1000"),kt=t),i(),this.tooltipElement.classList.remove("hide"),this.tooltipElement.classList.add("show"),this.tooltipElement.style.setProperty("display","block"),e().addEventListener("keydown",this.hideTooltipByEscape),this.cleanupAutoPositioning=At(this.previousSibling,this.tooltipElement,(()=>{this.alignTooltip()})))}showOrHideTooltip(){clearTimeout(this.overFocusTimeout),this.overFocusTimeout=setTimeout((()=>{this.hasMouseIn||this.hasFocusIn?this.showTooltip():this.hideTooltip()}),300)}addListeners(t){t.addEventListener("mouseover",this.handleMouseEnter),t.addEventListener("mouseout",this.handleMouseLeave),t.addEventListener("focusin",this.handleFocusIn),t.addEventListener("focusout",this.handleFocusOut)}removeListeners(t){t.removeEventListener("mouseover",this.handleMouseEnter),t.removeEventListener("mouseout",this.handleMouseLeave),t.removeEventListener("focusin",this.handleFocusIn),t.removeEventListener("focusout",this.handleFocusOut)}}export{Rt as B,Et as T,u as a,Ft as b,At as c}
|