@telesign/boreal-web-components 0.1.0-alpha.4 → 0.1.0-alpha.5
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/components-build/bds-avatar.js +1 -1
- package/components-build/bds-badge.js +1 -1
- package/components-build/bds-banner.js +1 -1
- package/components-build/bds-button-group.d.ts +11 -0
- package/components-build/bds-button-group.js +1 -0
- package/components-build/bds-button.js +1 -1
- package/components-build/bds-checkbox-card.d.ts +11 -0
- package/components-build/bds-checkbox-card.js +1 -0
- package/components-build/bds-checkbox.js +1 -1
- package/components-build/bds-dialog.js +1 -1
- package/components-build/bds-divider.js +1 -1
- package/components-build/bds-flag.js +1 -1
- package/components-build/bds-grid-item.js +1 -1
- package/components-build/bds-grid.js +1 -1
- package/components-build/bds-list-menu-item.js +1 -1
- package/components-build/bds-list-menu.js +1 -1
- package/components-build/bds-popover.js +1 -1
- package/components-build/bds-radio-button.d.ts +11 -0
- package/components-build/bds-radio-button.js +1 -0
- package/components-build/bds-radio-card.d.ts +11 -0
- package/components-build/bds-radio-card.js +1 -0
- package/components-build/bds-radio-group.d.ts +11 -0
- package/components-build/bds-radio-group.js +1 -0
- package/components-build/bds-radio.d.ts +11 -0
- package/components-build/bds-radio.js +1 -0
- package/components-build/bds-spinner.js +1 -1
- package/components-build/bds-status.js +1 -1
- package/components-build/bds-tag.js +1 -1
- package/components-build/bds-text-field.js +1 -1
- package/components-build/bds-toggle.js +1 -1
- package/components-build/bds-tooltip.js +1 -1
- package/components-build/bds-typography.js +1 -1
- package/components-build/index.js +1 -1
- package/components-build/p-BSlaf0ff.js +1 -0
- package/components-build/p-CPvuMm5C.js +1 -0
- package/components-build/p-Cbibqaz0.js +1 -0
- package/components-build/p-ClR-wgiT.js +1 -0
- package/components-build/p-DfaYciGa.js +1 -0
- package/components-build/p-Dh8DSJs_.js +1 -0
- package/components-build/p-N_tqtRV2.js +1 -0
- package/components-build/p-bAMuJ4Jx.js +1 -0
- package/components-build/p-c2z3tneT.js +1 -0
- package/components-build/p-dz9-Q2N8.js +1 -0
- package/{dist/boreal-web-components/p-CaHOghy5.js → components-build/p-fUK0GCeC.js} +1 -1
- package/components-build/p-iq2UuV7c.js +1 -0
- package/components-build/p-nxYzL9uu.js +1 -0
- package/custom-elements.json +2603 -931
- package/dist/boreal-web-components/boreal-web-components.esm.js +1 -1
- package/dist/boreal-web-components/{p-7a4efddd.system.entry.js → p-024d90b0.system.entry.js} +1 -1
- package/dist/boreal-web-components/p-06DrzEMB.system.js +1 -0
- package/dist/boreal-web-components/p-11e4c0ec.system.entry.js +1 -0
- package/dist/boreal-web-components/p-147d6652.system.entry.js +1 -0
- package/dist/boreal-web-components/p-148d510f.entry.js +1 -0
- package/dist/boreal-web-components/{p-2158a7cd.entry.js → p-19f9352d.entry.js} +1 -1
- package/dist/boreal-web-components/{p-41b48701.system.entry.js → p-277f142e.system.entry.js} +1 -1
- package/dist/boreal-web-components/{p-251b3002.entry.js → p-2adf2cd5.entry.js} +1 -1
- package/dist/boreal-web-components/p-2be4aa3a.system.entry.js +1 -0
- package/dist/boreal-web-components/p-340896b2.entry.js +1 -0
- package/dist/boreal-web-components/{p-251d35df.system.entry.js → p-365e8e5c.system.entry.js} +1 -1
- package/dist/boreal-web-components/p-3d4ce8eb.system.entry.js +1 -0
- package/dist/boreal-web-components/p-44a8fde5.entry.js +1 -0
- package/dist/boreal-web-components/{p-52600375.system.entry.js → p-48ebbfbe.system.entry.js} +1 -1
- package/dist/boreal-web-components/{p-ab5ffa15.system.entry.js → p-4dc01078.system.entry.js} +1 -1
- package/dist/boreal-web-components/p-5681b294.system.entry.js +1 -0
- package/dist/boreal-web-components/p-5ed75075.entry.js +1 -0
- package/dist/boreal-web-components/p-635f676b.system.entry.js +1 -0
- package/dist/boreal-web-components/{p-7db870b7.entry.js → p-6629be14.entry.js} +1 -1
- package/dist/boreal-web-components/p-68b83680.system.entry.js +1 -0
- package/dist/boreal-web-components/p-6a60d134.system.entry.js +1 -0
- package/dist/boreal-web-components/{p-66360e63.entry.js → p-71ed1e1d.entry.js} +1 -1
- package/dist/boreal-web-components/{p-b12d4788.system.entry.js → p-732e98f1.system.entry.js} +1 -1
- package/dist/boreal-web-components/{p-80822731.system.entry.js → p-77658a5b.system.entry.js} +1 -1
- package/dist/boreal-web-components/p-7aff4c78.entry.js +1 -0
- package/dist/boreal-web-components/p-7bb88855.entry.js +1 -0
- package/dist/boreal-web-components/p-7d3a8f61.entry.js +1 -0
- package/dist/boreal-web-components/p-7e672cce.entry.js +1 -0
- package/dist/boreal-web-components/{p-1d1bb9d2.entry.js → p-7ebc67c9.entry.js} +1 -1
- package/dist/boreal-web-components/p-81401e2a.system.entry.js +1 -0
- package/dist/boreal-web-components/p-8289e506.entry.js +1 -0
- package/dist/boreal-web-components/p-82d15372.entry.js +1 -0
- package/dist/boreal-web-components/p-851c06f2.entry.js +1 -0
- package/dist/boreal-web-components/p-8a3716ec.entry.js +1 -0
- package/dist/boreal-web-components/p-8f4f8af0.system.entry.js +1 -0
- package/dist/boreal-web-components/{p-871c9a9f.system.entry.js → p-93066db4.system.entry.js} +1 -1
- package/dist/boreal-web-components/p-C-g3hhl_.system.js +1 -0
- package/dist/boreal-web-components/p-C0P3gzq5.system.js +1 -0
- package/dist/boreal-web-components/p-C4HM8wQe.js +1 -0
- package/dist/boreal-web-components/p-CPvuMm5C.js +1 -0
- package/dist/boreal-web-components/p-CRMH6mfq.system.js +1 -0
- package/dist/boreal-web-components/p-CU_dRLdk.system.js +1 -0
- package/dist/boreal-web-components/p-CW4-dkCF.system.js +1 -0
- package/dist/boreal-web-components/{p-BuxZeJbu.system.js → p-DSU8tkVw.system.js} +1 -1
- package/dist/boreal-web-components/p-DYlZcFrB.system.js +1 -0
- package/dist/boreal-web-components/p-DfaYciGa.js +1 -0
- package/dist/boreal-web-components/p-DlVzZK7o.js +1 -0
- package/dist/boreal-web-components/p-DlYG-OVB.js +1 -0
- package/dist/boreal-web-components/p-DnIhjwCH.system.js +1 -0
- package/dist/boreal-web-components/p-DpnBDSUm.system.js +1 -0
- package/dist/boreal-web-components/p-Dwo1hcd9.js +1 -0
- package/{components-build/p-CaHOghy5.js → dist/boreal-web-components/p-U9yfbs7i.js} +1 -1
- package/dist/boreal-web-components/p-a73659ac.system.entry.js +1 -0
- package/dist/boreal-web-components/p-b2ad9535.system.entry.js +1 -0
- package/dist/boreal-web-components/{p-731b88cc.entry.js → p-d4c30d2b.entry.js} +1 -1
- package/dist/boreal-web-components/p-db0c10b9.system.entry.js +1 -0
- package/dist/boreal-web-components/{p-695d0830.entry.js → p-dc7d429c.entry.js} +1 -1
- package/dist/boreal-web-components/p-dca16a3d.entry.js +1 -0
- package/dist/boreal-web-components/p-de846c43.system.entry.js +1 -0
- package/dist/boreal-web-components/p-df087e23.system.entry.js +1 -0
- package/dist/boreal-web-components/p-dfb4854e.entry.js +1 -0
- package/dist/boreal-web-components/p-dz9-Q2N8.js +1 -0
- package/dist/boreal-web-components/p-e09b4d14.system.entry.js +1 -0
- package/dist/boreal-web-components/{p-edca16b6.system.entry.js → p-e0a41cab.system.entry.js} +1 -1
- package/dist/boreal-web-components/{p-127a4134.entry.js → p-e55f2a8b.entry.js} +1 -1
- package/dist/boreal-web-components/p-e7af1e1a.entry.js +1 -0
- package/dist/boreal-web-components/{p-e0bf8a6e.entry.js → p-efe159aa.entry.js} +1 -1
- package/dist/boreal-web-components/{p-44ceff4e.system.entry.js → p-f65e9d0c.system.entry.js} +1 -1
- package/dist/boreal-web-components/p-f792aa74.entry.js +1 -0
- package/dist/boreal-web-components/{p-fc24d963.entry.js → p-fb9a0e94.entry.js} +1 -1
- package/dist/boreal-web-components/p-iq2UuV7c.js +1 -0
- package/dist/boreal-web-components/p-vzZJGcYF.system.js +1 -1
- package/dist/boreal-web-components/p-wREMI3WA.js +1 -0
- package/dist/cjs/Keys-rKl2za5q.js +18 -0
- package/dist/cjs/Logger-DnziItRH.js +51 -0
- package/dist/cjs/{attributes-wIHueigW.js → attributes-CgRFplrN.js} +3 -0
- package/dist/cjs/bds-avatar.cjs.entry.js +2 -2
- package/dist/cjs/bds-badge.cjs.entry.js +1 -1
- package/dist/cjs/bds-banner.cjs.entry.js +2 -2
- package/dist/cjs/bds-button-group.cjs.entry.js +95 -0
- package/dist/cjs/bds-button.cjs.entry.js +7 -13
- package/dist/cjs/bds-checkbox-card.cjs.entry.js +121 -0
- package/dist/cjs/bds-checkbox.cjs.entry.js +13 -6
- package/dist/cjs/bds-dialog.cjs.entry.js +3 -3
- package/dist/cjs/bds-divider.cjs.entry.js +2 -2
- package/dist/cjs/bds-flag.cjs.entry.js +1 -1
- package/dist/cjs/bds-grid-item.cjs.entry.js +1 -1
- package/dist/cjs/bds-grid.cjs.entry.js +1 -1
- package/dist/cjs/bds-list-menu-item.cjs.entry.js +47 -22
- package/dist/cjs/bds-list-menu.cjs.entry.js +90 -21
- package/dist/cjs/bds-popover.cjs.entry.js +5 -4
- package/dist/cjs/bds-radio-button.cjs.entry.js +60 -0
- package/dist/cjs/bds-radio-card.cjs.entry.js +76 -0
- package/dist/cjs/bds-radio-group.cjs.entry.js +285 -0
- package/dist/cjs/bds-radio.cjs.entry.js +60 -0
- package/dist/cjs/bds-spinner.cjs.entry.js +1 -1
- package/dist/cjs/bds-status.cjs.entry.js +1 -1
- package/dist/cjs/bds-tag.cjs.entry.js +1 -1
- package/dist/cjs/bds-text-field.cjs.entry.js +8 -7
- package/dist/cjs/bds-toggle.cjs.entry.js +6 -5
- package/dist/cjs/bds-tooltip_2.cjs.entry.js +9 -8
- package/dist/cjs/boreal-web-components.cjs.js +1 -1
- package/dist/cjs/coreColors-CQGojc0l.js +10 -0
- package/dist/cjs/{enum-DLblRCkQ.js → enum-DeTWfR0D.js} +3 -3
- package/dist/cjs/form-associated.mixin-BCR6bj29.js +33 -0
- package/dist/cjs/{getOffset-m4hBgyVP.js → getOffset-k4ezB-eT.js} +6 -53
- package/dist/cjs/{form-associated.mixin-DXwvF_vW.js → internals-D8x7GMfR.js} +0 -31
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/menu-BxKaEajh.js +8 -0
- package/dist/cjs/orientation-DQAIleEJ.js +8 -0
- package/dist/collection/collection-manifest.json +7 -1
- package/dist/collection/components/actions/bds-button/bds-button.css +19 -19
- package/dist/collection/components/actions/bds-button/bds-button.js +7 -7
- package/dist/collection/components/actions/bds-button/types/enum.js +3 -3
- package/dist/collection/components/actions/bds-button-group/bds-button-group.css +77 -0
- package/dist/collection/components/actions/bds-button-group/bds-button-group.js +245 -0
- package/dist/collection/components/actions/bds-list-menu/bds-list-menu/bds-list-menu.css +27 -1
- package/dist/collection/components/actions/bds-list-menu/bds-list-menu/bds-list-menu.js +148 -49
- package/dist/collection/components/actions/bds-list-menu/bds-list-menu/types/enum.js +4 -0
- package/dist/collection/components/actions/bds-list-menu/bds-list-menu/types/types.js +1 -0
- package/dist/collection/components/actions/bds-list-menu/bds-list-menu-item/bds-list-menu-item.css +25 -9
- package/dist/collection/components/actions/bds-list-menu/bds-list-menu-item/bds-list-menu-item.js +53 -8
- package/dist/collection/components/actions/bds-toggle/bds-toggle.js +1 -1
- package/dist/collection/components/feedback/bds-badge/bds-badge.js +1 -1
- package/dist/collection/components/feedback/bds-banner/bds-banner.js +1 -1
- package/dist/collection/components/feedback/bds-spinner/bds-spinner.js +1 -1
- package/dist/collection/components/feedback/bds-status/bds-status.js +1 -1
- package/dist/collection/components/feedback/bds-tag/bds-tag.js +1 -1
- package/dist/collection/components/forms/bds-checkbox/bds-checkbox.css +9 -8
- package/dist/collection/components/forms/bds-checkbox/bds-checkbox.js +7 -1
- package/dist/collection/components/forms/bds-checkbox-card/bds-checkbox-card.css +127 -0
- package/dist/collection/components/forms/bds-checkbox-card/bds-checkbox-card.js +397 -0
- package/dist/collection/components/forms/bds-checkbox-card/types/ICheckboxCard.js +1 -0
- package/dist/collection/components/forms/bds-flag/bds-flag.js +1 -1
- package/dist/collection/components/forms/bds-radio/bds-radio.css +121 -0
- package/dist/collection/components/forms/bds-radio/bds-radio.js +238 -0
- package/dist/collection/components/forms/bds-radio/types/IRadio.js +1 -0
- package/dist/collection/components/forms/bds-radio-button/bds-radio-button.css +109 -0
- package/dist/collection/components/forms/bds-radio-button/bds-radio-button.js +238 -0
- package/dist/collection/components/forms/bds-radio-button/types/IRadioButton.js +1 -0
- package/dist/collection/components/forms/bds-radio-card/bds-radio-card.css +156 -0
- package/dist/collection/components/forms/bds-radio-card/bds-radio-card.js +307 -0
- package/dist/collection/components/forms/bds-radio-card/types/IRadioCard.js +1 -0
- package/dist/collection/components/forms/bds-radio-group/bds-radio-group.css +55 -0
- package/dist/collection/components/forms/bds-radio-group/bds-radio-group.js +620 -0
- package/dist/collection/components/forms/bds-radio-group/types/IRadioGroup.js +1 -0
- package/dist/collection/components/forms/bds-radio-group/types/enum.js +5 -0
- package/dist/collection/components/forms/bds-radio-group/types/types.js +1 -0
- package/dist/collection/components/forms/bds-text-field/bds-text-field.js +1 -1
- package/dist/collection/components/helpers/{bds-divider.css → bds-divider/bds-divider.css} +12 -4
- package/dist/collection/components/helpers/{bds-divider.js → bds-divider/bds-divider.js} +3 -3
- package/dist/collection/components/helpers/bds-divider/types/IDivider.js +1 -0
- package/dist/collection/components/helpers/bds-divider/types/types.js +1 -0
- package/dist/collection/components/images-icons/bds-avatar/bds-avatar.js +1 -1
- package/dist/collection/components/layouts/bds-grid/grid/bds-grid.js +1 -1
- package/dist/collection/components/layouts/bds-grid/grid-item/bds-grid-item.js +1 -1
- package/dist/collection/components/overlays/bds-dialog/bds-dialog.js +2 -2
- package/dist/collection/components/overlays/bds-popover/bds-popover.js +1 -1
- package/dist/collection/components/overlays/bds-tooltip/bds-tooltip.js +3 -3
- package/dist/collection/components/titles-text/bds-typography/bds-typography.css +5 -0
- package/dist/collection/components/titles-text/bds-typography/bds-typography.js +1 -1
- package/dist/collection/mixins/anchored.mixin.js +2 -2
- package/dist/collection/mixins/links.mixin.js +1 -2
- package/dist/collection/mixins/menu-behavior.mixin.js +11 -5
- package/dist/collection/types/index.js +2 -0
- package/dist/collection/types/orientation.js +4 -0
- package/dist/collection/utils/constants/common/Keys.js +10 -24
- package/dist/collection/utils/menu/menu-item.utils.js +9 -8
- package/dist/collection/utils/testing/helpers.js +10 -0
- package/dist/esm/Keys-DlYG-OVB.js +16 -0
- package/dist/esm/Logger-iq2UuV7c.js +49 -0
- package/dist/esm/{attributes-CaHOghy5.js → attributes-U9yfbs7i.js} +3 -0
- package/dist/esm/bds-avatar.entry.js +2 -2
- package/dist/esm/bds-badge.entry.js +1 -1
- package/dist/esm/bds-banner.entry.js +2 -2
- package/dist/esm/bds-button-group.entry.js +93 -0
- package/dist/esm/bds-button.entry.js +5 -11
- package/dist/esm/bds-checkbox-card.entry.js +119 -0
- package/dist/esm/bds-checkbox.entry.js +11 -4
- package/dist/esm/bds-dialog.entry.js +3 -3
- package/dist/esm/bds-divider.entry.js +2 -2
- package/dist/esm/bds-flag.entry.js +1 -1
- package/dist/esm/bds-grid-item.entry.js +1 -1
- package/dist/esm/bds-grid.entry.js +1 -1
- package/dist/esm/bds-list-menu-item.entry.js +47 -22
- package/dist/esm/bds-list-menu.entry.js +90 -21
- package/dist/esm/bds-popover.entry.js +5 -4
- package/dist/esm/bds-radio-button.entry.js +58 -0
- package/dist/esm/bds-radio-card.entry.js +74 -0
- package/dist/esm/bds-radio-group.entry.js +283 -0
- package/dist/esm/bds-radio.entry.js +58 -0
- package/dist/esm/bds-spinner.entry.js +1 -1
- package/dist/esm/bds-status.entry.js +1 -1
- package/dist/esm/bds-tag.entry.js +1 -1
- package/dist/esm/bds-text-field.entry.js +3 -2
- package/dist/esm/bds-toggle.entry.js +4 -3
- package/dist/esm/bds-tooltip_2.entry.js +9 -8
- package/dist/esm/boreal-web-components.js +1 -1
- package/dist/esm/coreColors-Dwo1hcd9.js +8 -0
- package/dist/esm/{enum-C8mRvnTA.js → enum-DlVzZK7o.js} +4 -4
- package/dist/esm/form-associated.mixin-C4HM8wQe.js +31 -0
- package/dist/esm/{getOffset-DKPjeBHi.js → getOffset-BYS3c13B.js} +4 -51
- package/dist/esm/{form-associated.mixin-CvK2d92c.js → internals-DfaYciGa.js} +1 -31
- package/dist/esm/loader.js +1 -1
- package/dist/esm/menu-dz9-Q2N8.js +6 -0
- package/dist/esm/orientation-CPvuMm5C.js +6 -0
- package/dist/esm-es5/Keys-DlYG-OVB.js +1 -0
- package/dist/esm-es5/Logger-iq2UuV7c.js +1 -0
- package/dist/esm-es5/{attributes-CaHOghy5.js → attributes-U9yfbs7i.js} +1 -1
- package/dist/esm-es5/bds-avatar.entry.js +1 -1
- package/dist/esm-es5/bds-badge.entry.js +1 -1
- package/dist/esm-es5/bds-banner.entry.js +1 -1
- package/dist/esm-es5/bds-button-group.entry.js +1 -0
- package/dist/esm-es5/bds-button.entry.js +1 -1
- package/dist/esm-es5/bds-checkbox-card.entry.js +1 -0
- package/dist/esm-es5/bds-checkbox.entry.js +1 -1
- package/dist/esm-es5/bds-dialog.entry.js +1 -1
- package/dist/esm-es5/bds-divider.entry.js +1 -1
- package/dist/esm-es5/bds-flag.entry.js +1 -1
- package/dist/esm-es5/bds-grid-item.entry.js +1 -1
- package/dist/esm-es5/bds-grid.entry.js +1 -1
- package/dist/esm-es5/bds-list-menu-item.entry.js +1 -1
- package/dist/esm-es5/bds-list-menu.entry.js +1 -1
- package/dist/esm-es5/bds-popover.entry.js +1 -1
- package/dist/esm-es5/bds-radio-button.entry.js +1 -0
- package/dist/esm-es5/bds-radio-card.entry.js +1 -0
- package/dist/esm-es5/bds-radio-group.entry.js +1 -0
- package/dist/esm-es5/bds-radio.entry.js +1 -0
- package/dist/esm-es5/bds-spinner.entry.js +1 -1
- package/dist/esm-es5/bds-status.entry.js +1 -1
- package/dist/esm-es5/bds-tag.entry.js +1 -1
- package/dist/esm-es5/bds-text-field.entry.js +1 -1
- package/dist/esm-es5/bds-toggle.entry.js +1 -1
- package/dist/esm-es5/bds-tooltip_2.entry.js +1 -1
- package/dist/esm-es5/boreal-web-components.js +1 -1
- package/dist/esm-es5/coreColors-Dwo1hcd9.js +1 -0
- package/dist/esm-es5/enum-DlVzZK7o.js +1 -0
- package/dist/esm-es5/form-associated.mixin-C4HM8wQe.js +1 -0
- package/dist/esm-es5/getOffset-BYS3c13B.js +1 -0
- package/dist/esm-es5/internals-DfaYciGa.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/menu-dz9-Q2N8.js +1 -0
- package/dist/esm-es5/orientation-CPvuMm5C.js +1 -0
- package/dist/types/components/actions/bds-button/bds-button.d.ts +4 -4
- package/dist/types/components/actions/bds-button/types/enum.d.ts +3 -3
- package/dist/types/components/actions/bds-button-group/bds-button-group.d.ts +36 -0
- package/dist/types/components/actions/bds-button-group/types/IButtonGroup.d.ts +11 -0
- package/dist/types/components/actions/bds-list-menu/bds-list-menu/bds-list-menu.d.ts +19 -15
- package/dist/types/components/actions/bds-list-menu/bds-list-menu/types/IListMenu.d.ts +14 -0
- package/dist/types/components/actions/bds-list-menu/bds-list-menu/types/enum.d.ts +5 -0
- package/dist/types/components/actions/bds-list-menu/bds-list-menu/types/types.d.ts +3 -0
- package/dist/types/components/actions/bds-list-menu/bds-list-menu-item/bds-list-menu-item.d.ts +8 -2
- package/dist/types/components/actions/bds-list-menu/bds-list-menu-item/types/IListMenuItem.d.ts +1 -0
- package/dist/types/components/forms/bds-checkbox/bds-checkbox.d.ts +2 -0
- package/dist/types/components/forms/bds-checkbox-card/bds-checkbox-card.d.ts +70 -0
- package/dist/types/components/forms/bds-checkbox-card/types/ICheckboxCard.d.ts +8 -0
- package/dist/types/components/forms/bds-radio/bds-radio.d.ts +36 -0
- package/dist/types/components/forms/bds-radio/types/IRadio.d.ts +13 -0
- package/dist/types/components/forms/bds-radio-button/bds-radio-button.d.ts +36 -0
- package/dist/types/components/forms/bds-radio-button/types/IRadioButton.d.ts +13 -0
- package/dist/types/components/forms/bds-radio-card/bds-radio-card.d.ts +57 -0
- package/dist/types/components/forms/bds-radio-card/types/IRadioCard.d.ts +14 -0
- package/dist/types/components/forms/bds-radio-group/bds-radio-group.d.ts +82 -0
- package/dist/types/components/forms/bds-radio-group/types/IRadioGroup.d.ts +19 -0
- package/dist/types/components/forms/bds-radio-group/types/enum.d.ts +6 -0
- package/dist/types/components/forms/bds-radio-group/types/types.d.ts +3 -0
- package/dist/types/components.d.ts +941 -63
- package/dist/types/mixins/menu-behavior.mixin.d.ts +5 -1
- package/dist/types/types/index.d.ts +2 -0
- package/dist/types/types/orientation.d.ts +6 -0
- package/dist/types/utils/constants/common/Keys.d.ts +13 -16
- package/dist/types/utils/menu/menu-item.utils.d.ts +2 -2
- package/dist/types/utils/testing/helpers.d.ts +8 -0
- package/package.json +1 -1
- package/components-build/p-B8n1ru5i.js +0 -1
- package/components-build/p-CGdxFth9.js +0 -1
- package/components-build/p-CrAt6pGl.js +0 -1
- package/components-build/p-DCwT43Kz.js +0 -1
- package/components-build/p-DIY3CDNL.js +0 -1
- package/dist/boreal-web-components/p-0028481c.entry.js +0 -1
- package/dist/boreal-web-components/p-1466de58.system.entry.js +0 -1
- package/dist/boreal-web-components/p-2b8bd1dd.entry.js +0 -1
- package/dist/boreal-web-components/p-32c23246.system.entry.js +0 -1
- package/dist/boreal-web-components/p-3fbcc233.entry.js +0 -1
- package/dist/boreal-web-components/p-401f1aee.system.entry.js +0 -1
- package/dist/boreal-web-components/p-41cac1b8.system.entry.js +0 -1
- package/dist/boreal-web-components/p-627b19a5.system.entry.js +0 -1
- package/dist/boreal-web-components/p-649737e5.entry.js +0 -1
- package/dist/boreal-web-components/p-64cb5825.entry.js +0 -1
- package/dist/boreal-web-components/p-6a99f4c6.system.entry.js +0 -1
- package/dist/boreal-web-components/p-74c13bed.system.entry.js +0 -1
- package/dist/boreal-web-components/p-7f7ac40f.entry.js +0 -1
- package/dist/boreal-web-components/p-82d49661.entry.js +0 -1
- package/dist/boreal-web-components/p-83ca193e.entry.js +0 -1
- package/dist/boreal-web-components/p-BQ_zoZa2.js +0 -1
- package/dist/boreal-web-components/p-C8mRvnTA.js +0 -1
- package/dist/boreal-web-components/p-CdKFZYxk.system.js +0 -1
- package/dist/boreal-web-components/p-CtknSula.system.js +0 -1
- package/dist/boreal-web-components/p-CvK2d92c.js +0 -1
- package/dist/boreal-web-components/p-CzYQb3pP.js +0 -1
- package/dist/boreal-web-components/p-DZcx75cy.system.js +0 -1
- package/dist/boreal-web-components/p-Dme-NuTD.system.js +0 -1
- package/dist/boreal-web-components/p-ba2b625a.system.entry.js +0 -1
- package/dist/boreal-web-components/p-bf2ef10b.entry.js +0 -1
- package/dist/boreal-web-components/p-c7aee9f4.system.entry.js +0 -1
- package/dist/cjs/Keys-DbIXSJF2.js +0 -22
- package/dist/esm/Keys-CzYQb3pP.js +0 -20
- package/dist/esm-es5/Keys-CzYQb3pP.js +0 -1
- package/dist/esm-es5/enum-C8mRvnTA.js +0 -1
- package/dist/esm-es5/form-associated.mixin-CvK2d92c.js +0 -1
- package/dist/esm-es5/getOffset-DKPjeBHi.js +0 -1
- /package/dist/collection/components/{helpers/types/IDivider.js → actions/bds-button-group/types/IButtonGroup.js} +0 -0
- /package/dist/collection/components/{helpers/types/types.js → actions/bds-list-menu/bds-list-menu/types/IListMenu.js} +0 -0
- /package/dist/collection/components/helpers/{types → bds-divider/types}/enum.js +0 -0
- /package/dist/types/components/helpers/{bds-divider.d.ts → bds-divider/bds-divider.d.ts} +0 -0
- /package/dist/types/components/helpers/{types → bds-divider/types}/IDivider.d.ts +0 -0
- /package/dist/types/components/helpers/{types → bds-divider/types}/enum.d.ts +0 -0
- /package/dist/types/components/helpers/{types → bds-divider/types}/types.d.ts +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
var __extends=this&&this.__extends||function(){var e=function(o,t){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,o){e.__proto__=o}||function(e,o){for(var t in o)if(Object.prototype.hasOwnProperty.call(o,t))e[t]=o[t]};return e(o,t)};return function(o,t){if(typeof t!=="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");e(o,t);function r(){this.constructor=o}o.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}();import{M as Mixin,r as registerInstance,h,a as Host,g as getElement}from"./index-BqJlOB6b.js";import{a as anchoredMixin,g as getOffset}from"./getOffset-DKPjeBHi.js";import{B as BUTTON_SIZES}from"./enum-C8mRvnTA.js";import"./floating.mixin-DCXSEEVH.js";import"./Keys-CzYQb3pP.js";var OFFSET=11;var bdsPopoverCss=function(){return'@charset "UTF-8";:root{--popover-arrow-size:var(--boreal-spacing-s);--popover-width:320px}.popover{position:fixed;margin:0;overflow:visible;border-radius:var(--boreal-radius-xs2);font-size:var(--boreal-typography-font-size-xs);line-height:var(--boreal-typography-line-height-xs);font-family:var(--boreal-typography-font-family-primary);font-weight:var(--boreal-typography-font-weight-regular);background:var(--boreal-ui-inverse);-webkit-filter:drop-shadow(0px 2px 8px rgba(0, 0, 0, 0.15));filter:drop-shadow(0px 2px 8px rgba(0, 0, 0, 0.15));-webkit-box-shadow:none;box-shadow:none;-webkit-box-sizing:border-box;box-sizing:border-box;border:transparent;cursor:auto}.popover-content{position:relative;padding:var(--boreal-spacing-s)}.popover[popover]:not(:popover-open){display:none}.popover-header{border-bottom:var(--boreal-stroke-default-light) solid 1px;padding:var(--boreal-spacing-m) var(--boreal-spacing-xs) var(--boreal-spacing-m) var(--boreal-spacing-s);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between}.popover-header__content{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.popover-header__title{font-size:var(--boreal-typography-font-size-sm);font-weight:var(--boreal-typography-font-weight-semibold);line-height:var(--boreal-typography-line-height-sm)}.popover-header__icon{font-size:var(--boreal-typography-font-size-md);margin-right:var(--boreal-spacing-3xs)}.popover-header__close{margin-left:var(--boreal-spacing-s)}.popover-header__close .bds-button{margin:0;padding:0;width:var(--boreal-spacing-ml);height:var(--boreal-spacing-ml)}.popover-header__close .bds-button__content{width:var(--boreal-spacing-ml);height:var(--boreal-spacing-ml)}.popover-header__close em{font-size:var(--boreal-typography-font-size-xs)}.popover-footer{border-top:var(--boreal-stroke-default-light) solid 1px;padding:var(--boreal-spacing-s) var(--boreal-spacing-xs) var(--boreal-spacing-s) var(--boreal-spacing-s);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between}.popover .popover-arrow{position:absolute;width:var(--popover-arrow-size);height:var(--popover-arrow-size);pointer-events:none}.popover .popover-arrow::before{content:"";position:absolute;width:var(--popover-arrow-size);height:var(--popover-arrow-size);background:var(--boreal-ui-inverse);-webkit-transform:rotate(45deg);transform:rotate(45deg);inset:0}.popover[data-placement^=top] .popover-arrow{bottom:calc(var(--popover-arrow-size) / -2)}.popover[data-placement^=top] .popover-arrow::before{bottom:0}.popover[data-placement^=bottom] .popover-arrow{top:calc(var(--popover-arrow-size) / -2)}.popover[data-placement^=bottom] .popover-arrow::before{bottom:0}.popover[data-placement^=left] .popover-arrow{right:calc(var(--popover-arrow-size) / -2)}.popover[data-placement^=left] .popover-arrow::before{left:0}.popover[data-placement^=right] .popover-arrow{left:calc(var(--popover-arrow-size) / -2)}.popover[data-placement^=right] .popover-arrow::before{left:0}'};var BdsPopover=function(e){__extends(o,e);function o(o){var t=e.call(this)||this;registerInstance(t,o);t.floatingOptions={};t.disabled=false;t.width=320;t.header=false;t.footer=false;t.closable=false;t.isVisible=false;return t}Object.defineProperty(o.prototype,"options",{get:function(){var e,o,t;return{placement:(e=this.floatingOptions.placement)!==null&&e!==void 0?e:"bottom",offset:getOffset((o=this.floatingOptions)===null||o===void 0?void 0:o.hideArrow,(t=this.floatingOptions)===null||t===void 0?void 0:t.offset,OFFSET),arrow:this.floatingOptions.hideArrow?undefined:this.arrowElement,strategy:"fixed",shift:true,flip:true}},enumerable:false,configurable:true});Object.defineProperty(o.prototype,"popoverWidth",{get:function(){if(this.width==="full")return"100%";if(this.width==="auto")return"auto";return"".concat(this.width,"px")},enumerable:false,configurable:true});Object.defineProperty(o.prototype,"hooks",{get:function(){var e=this;return{onPositionUpdate:function(o){return e.handlePosition(o)},onBeforeShow:function(){return!e.disabled},onAfterShow:function(){return e.attachClickOutside()},onAfterHide:function(){return e.detachClickOutside()},onBeforeLoad:function(){return e.attachTrigger()},subscribeToTrigger:function(o){return e.subscribe(o)}}},enumerable:false,configurable:true});o.prototype.attachClickOutside=function(){var e=this;var o;if(((o=this.floatingOptions)===null||o===void 0?void 0:o.closeOnClickOutside)===false)return;this.boundClickOutside=function(o){return e.handleClickOutside(o)};document.addEventListener("mousedown",this.boundClickOutside)};o.prototype.detachClickOutside=function(){var e;if(((e=this.floatingOptions)===null||e===void 0?void 0:e.closeOnClickOutside)===false)return;if(this.boundClickOutside!==null){document.removeEventListener("mousedown",this.boundClickOutside);this.boundClickOutside=function(){}}};o.prototype.setArrowPosition=function(e){var o,t;if(((o=e.middlewareData)===null||o===void 0?void 0:o.arrow)&&!this.disabled&&((t=this.arrowElement)===null||t===void 0?void 0:t.isConnected)){var r=this.floatingOptions.placement;var a=e.middlewareData.arrow;var n=r==="top-start"||r==="bottom-start";var i=a.x||undefined;if(n)i=a.x?20:undefined;var s=e.middlewareData.arrow.y;Object.assign(this.arrowElement.style,{left:i!=null?"".concat(i,"px"):"",top:s!=null?"".concat(s,"px"):""})}};o.prototype.handleClickOutside=function(e){var o,t,r;var a=e.target;var n=((o=this.listenTarget)===null||o===void 0?void 0:o.contains(a))||((t=this.trigger)===null||t===void 0?void 0:t.contains(a))||((r=this.triggerSlot)===null||r===void 0?void 0:r.contains(a));var i=this.floatingContent.contains(a)||this.floatingContent===a;if(!n&&!i){this.hide()}};o.prototype.handleContentClick=function(e){e.stopPropagation();this.handleFloatingClick()};o.prototype.handleFloatingClick=function(){if(this.floatingOptions.closeOnClick)this.hide()};o.prototype.handlePosition=function(e){var o=this;var t;this.floatingContent.setAttribute("data-placement",e.placement);this.setArrowPosition(e);if(this.width==="full"&&this.triggerSlot!==null&&this.triggerSlot!==undefined){var r=(t=this.triggerSlot.parentElement)!==null&&t!==void 0?t:this.triggerSlot;var a=r.getBoundingClientRect().width;var n=this.floatingContent.getBoundingClientRect().width;if(Math.round(n)!==Math.round(a)){this.floatingContent.style.width="".concat(a,"px")}void this.updatePosition(this.triggerSlot,this.floatingContent,this.options,(function(e){o.floatingContent.setAttribute("data-placement",e.placement);o.setArrowPosition(e)}))}else if(this.width==="auto"){this.floatingContent.style.width=""}};o.prototype.attachTrigger=function(){if(this.trigger!==null&&this.trigger!==undefined)return};o.prototype.subscribe=function(e){var o=this;if(e===undefined)return;this.trigger=e;e.setAttribute("part","popover-trigger");e.setAttribute("ariaDescribedBy","popover-content");e.setAttribute("aria-haspopup","true");e.setAttribute("aria-expanded","false");var t=e.closest("bds-button, bds-input, bds-select");if(t!==null&&t!==undefined){var r=t.querySelector("button, input");var a=r!==null&&r!==void 0?r:t;this.listenTarget=a;this.listenTarget.addEventListener("click",(function(e){return o.handleShow(e)}));this.listenTarget.addEventListener("keydown",(function(e){return o.handleKeydown(e,(function(){return o.showElement()}),(function(){return o.hideElement()}))}))}else{this.trigger.addEventListener("click",(function(e){return o.handleShow(e)}));this.trigger.addEventListener("keydown",(function(e){return o.handleKeydown(e,(function(){return o.showElement()}),(function(){return o.hideElement()}))}))}};o.prototype.handleShow=function(e){e.stopPropagation();this.toggle()};Object.defineProperty(o.prototype,"canShowArrow",{get:function(){return!this.floatingOptions.hideArrow||false},enumerable:false,configurable:true});Object.defineProperty(o.prototype,"getPlacement",{get:function(){return this.floatingOptions.placement||"bottom"},enumerable:false,configurable:true});Object.defineProperty(o.prototype,"hasHeaderSlot",{get:function(){return this.el.querySelector('[slot="header"]')!==null},enumerable:false,configurable:true});Object.defineProperty(o.prototype,"hasFooterSlot",{get:function(){return this.el.querySelector('[slot="footer"]')!==null},enumerable:false,configurable:true});o.prototype.disconnectedCallback=function(){var e=this;this.listenTarget.removeEventListener("click",(function(o){return e.handleShow(o)}));this.trigger.removeEventListener("click",(function(o){return e.handleShow(o)}))};o.prototype.render=function(){var e=this;return h(Host,{key:"d9bdf356fc8aa99312073be3589cf50f4bd1afbe",class:"popover",style:{width:this.popoverWidth},popover:"manual",role:"tooltip","data-placement":this.getPlacement,"data-hidearrow":this.canShowArrow,"aria-hidden":this.isVisible?"false":"true",onClick:function(o){return e.handleContentClick(o)},ref:function(o){return e.floatingContent=o}},this.header&&h("div",{key:"a9172eb13620a218c1a37bd52eddaa6f9b53739c",class:"popover-header"},h("div",{key:"3b8774f0f8f461ce164220d53c48139e95a1b8f5",class:"popover-header__content"},h("span",{key:"86cc8cedf2c7970834a61c8374fc23d67417c2dd",class:"popover-header__icon"},h("slot",{key:"1e356d9b87672942ef4d19f33f5de9c707d02cb2",name:"header-icon"})),h("span",{key:"c014a7a269a4cc79841d4350e7e8efc4fc39cb06",class:"popover-header__title"},h("slot",{key:"39ce847785bbad57635834c7957146b89245438e",name:"header-title"}))),this.closable&&h("bds-button",{key:"a54358b74d8d29f5afeaa9f6fe1f07343f6784c6",class:"popover-header__close",size:BUTTON_SIZES.SMALL,onBdsClick:function(){return e.hide()}},h("em",{key:"efdca5b8e1f0560a15e063e832f1aeb9c754a820",slot:"icon",class:"bds-icon-close"}))),this.canShowArrow&&h("div",{key:"16870352c06b06de9b67e542e9e1753c7e3bff66",class:"popover-arrow",part:"arrow",ref:function(o){return e.arrowElement=o}}),h("div",{key:"b5dddeeedcc5ba9d107af57a25d9ca350a0621a8",class:"popover-content",tabIndex:-1,part:"popover-content"},h("slot",{key:"4bfc174186ab356747175464922c0d6b09d6b608"})),this.footer&&h("div",{key:"8476df1ee6751d6cba4cc52efad6675ea74bdc18",class:"popover-footer",onClick:function(e){return e.stopPropagation()}},h("slot",{key:"de60d356d96ae56c8e0a1349f6bafa87700998c6",name:"footer-helper"}),h("slot",{key:"21e59115a077f31b7b05aeea29cd23394642dd4d",name:"footer-button"})))};Object.defineProperty(o.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return o}(Mixin(anchoredMixin));BdsPopover.style=bdsPopoverCss();export{BdsPopover as bds_popover};
|
|
1
|
+
var __extends=this&&this.__extends||function(){var e=function(o,t){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,o){e.__proto__=o}||function(e,o){for(var t in o)if(Object.prototype.hasOwnProperty.call(o,t))e[t]=o[t]};return e(o,t)};return function(o,t){if(typeof t!=="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");e(o,t);function r(){this.constructor=o}o.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}();import{M as Mixin,r as registerInstance,h,a as Host,g as getElement}from"./index-BqJlOB6b.js";import{a as anchoredMixin,g as getOffset}from"./getOffset-BYS3c13B.js";import{B as BUTTON_SIZES}from"./enum-DlVzZK7o.js";import"./Logger-iq2UuV7c.js";import"./floating.mixin-DCXSEEVH.js";import"./Keys-DlYG-OVB.js";var OFFSET=11;var bdsPopoverCss=function(){return'@charset "UTF-8";:root{--popover-arrow-size:var(--boreal-spacing-s);--popover-width:320px}.popover{position:fixed;margin:0;overflow:visible;border-radius:var(--boreal-radius-xs2);font-size:var(--boreal-typography-font-size-xs);line-height:var(--boreal-typography-line-height-xs);font-family:var(--boreal-typography-font-family-primary);font-weight:var(--boreal-typography-font-weight-regular);background:var(--boreal-ui-inverse);-webkit-filter:drop-shadow(0px 2px 8px rgba(0, 0, 0, 0.15));filter:drop-shadow(0px 2px 8px rgba(0, 0, 0, 0.15));-webkit-box-shadow:none;box-shadow:none;-webkit-box-sizing:border-box;box-sizing:border-box;border:transparent;cursor:auto}.popover-content{position:relative;padding:var(--boreal-spacing-s)}.popover[popover]:not(:popover-open){display:none}.popover-header{border-bottom:var(--boreal-stroke-default-light) solid 1px;padding:var(--boreal-spacing-m) var(--boreal-spacing-xs) var(--boreal-spacing-m) var(--boreal-spacing-s);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between}.popover-header__content{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.popover-header__title{font-size:var(--boreal-typography-font-size-sm);font-weight:var(--boreal-typography-font-weight-semibold);line-height:var(--boreal-typography-line-height-sm)}.popover-header__icon{font-size:var(--boreal-typography-font-size-md);margin-right:var(--boreal-spacing-3xs)}.popover-header__close{margin-left:var(--boreal-spacing-s)}.popover-header__close .bds-button{margin:0;padding:0;width:var(--boreal-spacing-ml);height:var(--boreal-spacing-ml)}.popover-header__close .bds-button__content{width:var(--boreal-spacing-ml);height:var(--boreal-spacing-ml)}.popover-header__close em{font-size:var(--boreal-typography-font-size-xs)}.popover-footer{border-top:var(--boreal-stroke-default-light) solid 1px;padding:var(--boreal-spacing-s) var(--boreal-spacing-xs) var(--boreal-spacing-s) var(--boreal-spacing-s);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between}.popover .popover-arrow{position:absolute;width:var(--popover-arrow-size);height:var(--popover-arrow-size);pointer-events:none}.popover .popover-arrow::before{content:"";position:absolute;width:var(--popover-arrow-size);height:var(--popover-arrow-size);background:var(--boreal-ui-inverse);-webkit-transform:rotate(45deg);transform:rotate(45deg);inset:0}.popover[data-placement^=top] .popover-arrow{bottom:calc(var(--popover-arrow-size) / -2)}.popover[data-placement^=top] .popover-arrow::before{bottom:0}.popover[data-placement^=bottom] .popover-arrow{top:calc(var(--popover-arrow-size) / -2)}.popover[data-placement^=bottom] .popover-arrow::before{bottom:0}.popover[data-placement^=left] .popover-arrow{right:calc(var(--popover-arrow-size) / -2)}.popover[data-placement^=left] .popover-arrow::before{left:0}.popover[data-placement^=right] .popover-arrow{left:calc(var(--popover-arrow-size) / -2)}.popover[data-placement^=right] .popover-arrow::before{left:0}'};var BdsPopover=function(e){__extends(o,e);function o(o){var t=e.call(this)||this;registerInstance(t,o);t.floatingOptions={};t.disabled=false;t.width=320;t.header=false;t.footer=false;t.closable=false;t.isVisible=false;return t}Object.defineProperty(o.prototype,"options",{get:function(){var e,o,t;return{placement:(e=this.floatingOptions.placement)!==null&&e!==void 0?e:"bottom",offset:getOffset((o=this.floatingOptions)===null||o===void 0?void 0:o.hideArrow,(t=this.floatingOptions)===null||t===void 0?void 0:t.offset,OFFSET),arrow:this.floatingOptions.hideArrow?undefined:this.arrowElement,strategy:"fixed",shift:true,flip:true}},enumerable:false,configurable:true});Object.defineProperty(o.prototype,"popoverWidth",{get:function(){if(this.width==="full")return"100%";if(this.width==="auto")return"auto";return"".concat(this.width,"px")},enumerable:false,configurable:true});Object.defineProperty(o.prototype,"hooks",{get:function(){var e=this;return{onPositionUpdate:function(o){return e.handlePosition(o)},onBeforeShow:function(){return!e.disabled},onAfterShow:function(){return e.attachClickOutside()},onAfterHide:function(){return e.detachClickOutside()},onBeforeLoad:function(){return e.attachTrigger()},subscribeToTrigger:function(o){return e.subscribe(o)}}},enumerable:false,configurable:true});o.prototype.attachClickOutside=function(){var e=this;var o;if(((o=this.floatingOptions)===null||o===void 0?void 0:o.closeOnClickOutside)===false)return;this.boundClickOutside=function(o){return e.handleClickOutside(o)};document.addEventListener("mousedown",this.boundClickOutside)};o.prototype.detachClickOutside=function(){var e;if(((e=this.floatingOptions)===null||e===void 0?void 0:e.closeOnClickOutside)===false)return;if(this.boundClickOutside!==null){document.removeEventListener("mousedown",this.boundClickOutside);this.boundClickOutside=function(){}}};o.prototype.setArrowPosition=function(e){var o,t;if(((o=e.middlewareData)===null||o===void 0?void 0:o.arrow)&&!this.disabled&&((t=this.arrowElement)===null||t===void 0?void 0:t.isConnected)){var r=this.floatingOptions.placement;var a=e.middlewareData.arrow;var n=r==="top-start"||r==="bottom-start";var i=a.x||undefined;if(n)i=a.x?20:undefined;var s=e.middlewareData.arrow.y;Object.assign(this.arrowElement.style,{left:i!=null?"".concat(i,"px"):"",top:s!=null?"".concat(s,"px"):""})}};o.prototype.handleClickOutside=function(e){var o,t,r;var a=e.target;var n=((o=this.listenTarget)===null||o===void 0?void 0:o.contains(a))||((t=this.trigger)===null||t===void 0?void 0:t.contains(a))||((r=this.triggerSlot)===null||r===void 0?void 0:r.contains(a));var i=this.floatingContent.contains(a)||this.floatingContent===a;if(!n&&!i){this.hide()}};o.prototype.handleContentClick=function(e){e.stopPropagation();this.handleFloatingClick()};o.prototype.handleFloatingClick=function(){if(this.floatingOptions.closeOnClick)this.hide()};o.prototype.handlePosition=function(e){var o=this;var t;this.floatingContent.setAttribute("data-placement",e.placement);this.setArrowPosition(e);if(this.width==="full"&&this.triggerSlot!==null&&this.triggerSlot!==undefined){var r=(t=this.triggerSlot.parentElement)!==null&&t!==void 0?t:this.triggerSlot;var a=r.getBoundingClientRect().width;var n=this.floatingContent.getBoundingClientRect().width;if(Math.round(n)!==Math.round(a)){this.floatingContent.style.width="".concat(a,"px")}void this.updatePosition(this.triggerSlot,this.floatingContent,this.options,(function(e){o.floatingContent.setAttribute("data-placement",e.placement);o.setArrowPosition(e)}))}else if(this.width==="auto"){this.floatingContent.style.width=""}};o.prototype.attachTrigger=function(){if(this.trigger!==null&&this.trigger!==undefined)return};o.prototype.subscribe=function(e){var o=this;if(e===undefined)return;this.trigger=e;e.setAttribute("part","popover-trigger");e.setAttribute("ariaDescribedBy","popover-content");e.setAttribute("aria-haspopup","true");e.setAttribute("aria-expanded","false");var t=e.closest("bds-button, bds-input, bds-select");if(t!==null&&t!==undefined){var r=t.querySelector("button, input");var a=r!==null&&r!==void 0?r:t;this.listenTarget=a;this.listenTarget.addEventListener("click",(function(e){return o.handleShow(e)}));this.listenTarget.addEventListener("keydown",(function(e){return o.handleKeydown(e,(function(){return o.showElement()}),(function(){return o.hideElement()}))}))}else{this.trigger.addEventListener("click",(function(e){return o.handleShow(e)}));this.trigger.addEventListener("keydown",(function(e){return o.handleKeydown(e,(function(){return o.showElement()}),(function(){return o.hideElement()}))}))}};o.prototype.handleShow=function(e){e.stopPropagation();this.toggle()};Object.defineProperty(o.prototype,"canShowArrow",{get:function(){return!this.floatingOptions.hideArrow||false},enumerable:false,configurable:true});Object.defineProperty(o.prototype,"getPlacement",{get:function(){return this.floatingOptions.placement||"bottom"},enumerable:false,configurable:true});Object.defineProperty(o.prototype,"hasHeaderSlot",{get:function(){return this.el.querySelector('[slot="header"]')!==null},enumerable:false,configurable:true});Object.defineProperty(o.prototype,"hasFooterSlot",{get:function(){return this.el.querySelector('[slot="footer"]')!==null},enumerable:false,configurable:true});o.prototype.disconnectedCallback=function(){var e=this;this.listenTarget.removeEventListener("click",(function(o){return e.handleShow(o)}));this.trigger.removeEventListener("click",(function(o){return e.handleShow(o)}))};o.prototype.render=function(){var e=this;return h(Host,{key:"953571ebcd84e1e6910f3fce9aa59ff1b00c1be7",class:"popover",style:{width:this.popoverWidth},popover:"manual",role:"tooltip","data-placement":this.getPlacement,"data-hidearrow":this.canShowArrow,"aria-hidden":this.isVisible?"false":"true",onClick:function(o){return e.handleContentClick(o)},ref:function(o){return e.floatingContent=o}},this.header&&h("div",{key:"435cde7702b5db7ddc5f055ab379ef264a8cac16",class:"popover-header"},h("div",{key:"a3ac8f2b6610090d5947dc299a9ce62d85265e86",class:"popover-header__content"},h("span",{key:"ed1cbb198c54ffba2c7ce22085cb43648d6b7f3d",class:"popover-header__icon"},h("slot",{key:"b3049ec3dc2ad99037a662553103facad38af4f9",name:"header-icon"})),h("span",{key:"591ccd19d65f3a485062be8e5e4acf57a3ff4539",class:"popover-header__title"},h("slot",{key:"9b65d0180f3728906302426f6436034e80f1c783",name:"header-title"}))),this.closable&&h("bds-button",{key:"5e13390200231b50e4a9c38fb22c623bf28d105f",class:"popover-header__close",size:BUTTON_SIZES.SMALL,onBdsClick:function(){return e.hide()}},h("em",{key:"20ea602f48d1f27ee0b10c929a4a2194304a35b2",slot:"icon",class:"bds-icon-close"}))),this.canShowArrow&&h("div",{key:"551089a9b038a27277398dac47b8e72b2f3d9286",class:"popover-arrow",part:"arrow",ref:function(o){return e.arrowElement=o}}),h("div",{key:"17a6a939f83dd930aafc416b48da124faa27a4e0",class:"popover-content",tabIndex:-1,part:"popover-content"},h("slot",{key:"ab7cfa10649128cc387a54cf052429425696269a"})),this.footer&&h("div",{key:"7cf9fa351928fd823a49541764cdd67bd2d57def",class:"popover-footer",onClick:function(e){return e.stopPropagation()}},h("slot",{key:"b6a20d06d0964f6dea85afdd40a46a6fb737bbac",name:"footer-helper"}),h("slot",{key:"379b2b43a1e937775149e686686da9e4554dd962",name:"footer-button"})))};Object.defineProperty(o.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return o}(Mixin(anchoredMixin));BdsPopover.style=bdsPopoverCss();export{BdsPopover as bds_popover};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as registerInstance,c as createEvent,h,a as Host,g as getElement}from"./index-BqJlOB6b.js";var bdsRadioButtonCss=function(){return'@charset "UTF-8";.bds-radio-button__info{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center}.bds-radio-button{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;gap:var(--boreal-spacing-2xs);padding:var(--boreal-spacing-2xs) var(--boreal-spacing-s);border:1px solid transparent;border-radius:var(--boreal-radius-s);background-color:var(--boreal-ui-default-base);color:var(--boreal-text-default);cursor:pointer;outline:none;-webkit-transition:background-color 0.3s ease, border-color 0.3s ease, -webkit-box-shadow 0.3s ease;transition:background-color 0.3s ease, border-color 0.3s ease, -webkit-box-shadow 0.3s ease;transition:background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;transition:background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, -webkit-box-shadow 0.3s ease}.bds-radio-button input[type=radio]{position:absolute;opacity:0;width:0;height:0;margin:0;pointer-events:none}.bds-radio-button:hover:not(.bds-radio-button--disabled):not(.bds-radio-button--checked):not(.bds-radio-button--error){background-color:var(--boreal-ui-default-lighter);-webkit-box-shadow:0 1px 2px 0 rgba(19, 19, 22, 0.15);box-shadow:0 1px 2px 0 rgba(19, 19, 22, 0.15)}.bds-radio-button:focus-visible,.bds-radio-button:focus{z-index:1;background-color:var(--boreal-ui-default-lighter);-webkit-box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus);box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus);outline:none}.bds-radio-button:active:not(.bds-radio-button--disabled):not(.bds-radio-button--checked):not(.bds-radio-button--error){z-index:1;background-color:var(--boreal-ui-default-lighter);-webkit-box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus), 0 1px 2px 0 rgba(19, 19, 22, 0.15) inset;box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus), 0 1px 2px 0 rgba(19, 19, 22, 0.15) inset}.bds-radio-button--checked{background-color:var(--boreal-ui-inverse);border-color:var(--boreal-stroke-primary-base);color:var(--boreal-text-primary-base)}.bds-radio-button--checked:hover,.bds-radio-button--checked:focus-visible,.bds-radio-button--checked:focus,.bds-radio-button--checked:active{background-color:var(--boreal-ui-primary-lighter)}.bds-radio-button--error{background-color:var(--boreal-ui-inverse);color:var(--boreal-text-danger-base)}.bds-radio-button--error:hover,.bds-radio-button--error:focus-visible,.bds-radio-button--error:focus,.bds-radio-button--error:active{background-color:var(--boreal-ui-danger-lighter)}.bds-radio-button--error.bds-radio-button--checked{border-color:var(--boreal-stroke-danger-base)}.bds-radio-button--disabled{cursor:not-allowed;pointer-events:none;background-color:var(--boreal-ui-inverse);color:var(--boreal-text-disabled)}.bds-radio-button--disabled.bds-radio-button--checked{border-color:var(--boreal-stroke-primary-light);color:var(--boreal-text-primary-light)}.bds-radio-button__label{font-family:var(--boreal-typography-font-family-primary);font-size:var(--boreal-typography-font-size-sm);font-weight:var(--boreal-typography-font-weight-semibold);line-height:var(--boreal-typography-line-height-sm)}.bds-radio-button__icon{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.bds-radio-button__icon:empty{display:none}.bds-radio-button__info-icon{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;font-size:var(--boreal-typography-font-size-sm);line-height:1;color:var(--boreal-icon-default-ink)}'};var BdsRadioButton=function(){function e(e){var o=this;registerInstance(this,e);this.bdsChange=createEvent(this,"bdsChange");this.checked=false;this.disabled=false;this.error=false;this.value="on";this.name="";this.label="";this.info="";this.handleClick=function(){return o.select()};this.handleKeyDown=function(e){if(e.key===" "){e.preventDefault();o.select()}}}e.prototype.componentDidLoad=function(){this.el.setAttribute("role","radio");this.el.setAttribute("aria-checked",String(this.checked));this.el.setAttribute("tabindex","-1")};e.prototype.select=function(){if(this.disabled||this.checked)return;this.checked=true;this.el.setAttribute("aria-checked","true");this.bdsChange.emit({checked:true,value:this.value})};Object.defineProperty(e.prototype,"classMap",{get:function(){return{"bds-radio-button":true,"bds-radio-button--checked":this.checked,"bds-radio-button--error":this.error,"bds-radio-button--disabled":this.disabled}},enumerable:false,configurable:true});e.prototype.render=function(){var e=this;return h(Host,{key:"63fe01baf9bf2318441f3a742ba857a540f4d7d0",class:this.classMap,onClick:this.handleClick,onKeyDown:this.handleKeyDown},h("input",{key:"19fd44e41ef583131da77206f9e0c987132a5cc4",type:"radio",name:this.name,value:this.value,checked:this.checked,disabled:this.disabled,"aria-hidden":"true",tabIndex:-1,onFocus:function(){return e.el.focus()}}),h("span",{key:"cfbe81b25b71aeda4786b6073c9b16bcc819bf7b",class:"bds-radio-button__icon"},h("slot",{key:"ffa28a8602ea92c990b3e365d6cd421975f896fc",name:"icon"})),h("span",{key:"c0a6512f836a00718ee71d5542b714900357ac82",class:"bds-radio-button__label"},this.label||h("slot",{key:"29c89fa661270a7cc5ee69eb5c7cbc594af05d40"})),this.info&&h("span",{key:"74c3d43733ac679427e1b4fdbfcb4e72dae335a8",class:"bds-radio-button__info"},h("span",{key:"567d225444acc5384df916a16a35867592327895",class:"bds-radio-button__info-icon bds-icon-info-circle","aria-hidden":"true"}),h("bds-tooltip",{key:"8120fe06d5a0f85d03205abc54f3e8112946ad4f"},this.info)))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();BdsRadioButton.style=bdsRadioButtonCss();export{BdsRadioButton as bds_radio_button};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as registerInstance,c as createEvent,h,a as Host,g as getElement}from"./index-BqJlOB6b.js";var bdsRadioCardCss=function(){return'@charset "UTF-8";.bds-radio-card--transition{-webkit-transition:background-color 0.3s ease, border-color 0.3s ease, -webkit-box-shadow 0.3s ease;transition:background-color 0.3s ease, border-color 0.3s ease, -webkit-box-shadow 0.3s ease;transition:background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;transition:background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, -webkit-box-shadow 0.3s ease}.bds-radio-card{position:relative;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;cursor:pointer;font-family:var(--boreal-typography-font-family-primary);background-color:var(--boreal-ui-inverse);padding:var(--boreal-spacing-xs) var(--boreal-spacing-s) var(--boreal-spacing-s);border-radius:var(--boreal-radius-xs);border:var(--boreal-spacing-4xs) solid var(--boreal-stroke-default-light)}.bds-radio-card:hover{background-color:var(--boreal-ui-default-lighter);-webkit-box-shadow:0 1px 2px 0 rgba(19, 19, 22, 0.15);box-shadow:0 1px 2px 0 rgba(19, 19, 22, 0.15)}.bds-radio-card:focus-within,.bds-radio-card:focus{background-color:var(--boreal-ui-default-lighter);-webkit-box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus);box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus)}.bds-radio-card:focus-visible{outline:none}.bds-radio-card input[type=radio]{position:absolute;opacity:0;width:0;height:0;margin:0;pointer-events:none}.bds-radio-card__container{display:-ms-inline-flexbox;display:inline-flex;gap:var(--boreal-spacing-xs);-ms-flex-align:start;align-items:flex-start}.bds-radio-card__button{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-ms-flex-negative:0;flex-shrink:0;width:var(--bds-radio-button-size, 18px);height:var(--bds-radio-button-size, 18px);margin-top:var(--boreal-spacing-2xs);border-radius:var(--boreal-radius-full);border:var(--boreal-spacing-4xs) solid var(--boreal-stroke-default-light);background-color:var(--boreal-ui-inverse);-webkit-transition:background-color 0.3s ease, border-color 0.3s ease, -webkit-box-shadow 0.3s ease;transition:background-color 0.3s ease, border-color 0.3s ease, -webkit-box-shadow 0.3s ease;transition:background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;transition:background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, -webkit-box-shadow 0.3s ease}.bds-radio-card__dot{width:var(--bds-radio-dot-size, 10px);height:var(--bds-radio-dot-size, 10px);border-radius:var(--boreal-radius-full);background-color:transparent;-webkit-transition:background-color 0.3s ease, border-color 0.3s ease, -webkit-box-shadow 0.3s ease;transition:background-color 0.3s ease, border-color 0.3s ease, -webkit-box-shadow 0.3s ease;transition:background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;transition:background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, -webkit-box-shadow 0.3s ease}.bds-radio-card__header{display:-ms-inline-flexbox;display:inline-flex;gap:var(--boreal-spacing-3xs);color:var(--boreal-text-default)}.bds-radio-card__title{font-weight:var(--boreal-typography-font-weight-semibold);font-size:var(--boreal-typography-font-size-md);line-height:var(--boreal-typography-line-height-md)}.bds-radio-card__info-icon{font-size:var(--boreal-typography-font-size-xs);color:var(--boreal-icon-default-light)}.bds-radio-card__icon:empty{display:none}.bds-radio-card:has(.bds-radio-card__description:empty) .bds-radio-card__container{-ms-flex-align:center;align-items:center}.bds-radio-card:has(.bds-radio-card__description:empty) .bds-radio-card__content{height:var(--boreal-spacing-l)}.bds-radio-card:has(.bds-radio-card__description:empty) .bds-radio-card__button{margin-top:0}.bds-radio-card--checked{border-color:var(--boreal-stroke-primary-base)}.bds-radio-card--checked:hover,.bds-radio-card--checked:focus,.bds-radio-card--checked:focus-within,.bds-radio-card--checked:active{background-color:var(--boreal-ui-primary-lighter)}.bds-radio-card--checked .bds-radio-card__button{border-color:var(--boreal-stroke-primary-base)}.bds-radio-card--checked .bds-radio-card__dot{background-color:var(--boreal-ui-primary-base)}.bds-radio-card--checked .bds-radio-card__header,.bds-radio-card--checked .bds-radio-card__description{color:var(--boreal-text-primary-base)}.bds-radio-card--disabled{pointer-events:none}.bds-radio-card--disabled .bds-radio-card__header,.bds-radio-card--disabled .bds-radio-card__description{color:var(--boreal-text-disabled)}.bds-radio-card--disabled:not(.bds-radio-card--checked) .bds-radio-card__button{background-color:var(--boreal-ui-disabled)}.bds-radio-card--disabled.bds-radio-card--checked,.bds-radio-card--disabled.bds-radio-card--checked .bds-radio-card__button{border-color:var(--boreal-ui-primary-light)}.bds-radio-card--disabled.bds-radio-card--checked .bds-radio-card__dot{background-color:var(--boreal-ui-primary-light)}.bds-radio-card--disabled.bds-radio-card--checked .bds-radio-card__header,.bds-radio-card--disabled.bds-radio-card--checked .bds-radio-card__description{color:var(--boreal-ui-primary-light)}.bds-radio-card--error{border-color:var(--boreal-stroke-danger-base)}.bds-radio-card--error:hover,.bds-radio-card--error:focus,.bds-radio-card--error:focus-within,.bds-radio-card--error:active{background-color:var(--boreal-ui-danger-lighter)}.bds-radio-card--error .bds-radio-card__header,.bds-radio-card--error .bds-radio-card__description{color:var(--boreal-text-danger-base)}.bds-radio-card--error .bds-radio-card__button{border-color:var(--boreal-stroke-danger-base)}.bds-radio-card--error.bds-radio-card--checked .bds-radio-card__dot{background-color:var(--boreal-ui-danger-base)}'};var BdsRadioCard=function(){function a(a){var r=this;registerInstance(this,a);this.bdsChange=createEvent(this,"bdsChange");this.value="on";this.info="";this.name="";this.label="";this.checked=false;this.disabled=false;this.error=false;this.handleClick=function(){return r.select()};this.handleKeyDown=function(a){if(a.key===" "){a.preventDefault();r.select()}}}a.prototype.select=function(){if(this.disabled||this.checked)return;this.checked=true;this.bdsChange.emit({checked:true,value:this.value})};a.prototype.componentDidLoad=function(){var a=this;requestAnimationFrame((function(){a.el.classList.add("bds-radio-card--transition")}))};Object.defineProperty(a.prototype,"isError",{get:function(){return this.error&&!this.disabled},enumerable:false,configurable:true});Object.defineProperty(a.prototype,"hostClasses",{get:function(){return{"bds-radio-card":true,"bds-radio-card--disabled":this.disabled,"bds-radio-card--checked":this.checked,"bds-radio-card--error":this.isError}},enumerable:false,configurable:true});a.prototype.render=function(){var a=this;return h(Host,{key:"4cdff470403b54e66ad92434ab229406d8e8ef2b",class:this.hostClasses,role:"radio","aria-checked":"".concat(this.checked),"aria-disabled":this.disabled?"true":"false","aria-invalid":this.isError?"true":"false",tabIndex:this.disabled?-1:0,onClick:this.handleClick,onKeyDown:this.handleKeyDown},h("div",{key:"2019eb2a3aa666c3115dfe0c9fd1fed2a18e02de",class:"bds-radio-card__container"},h("input",{key:"d3e47807abff5bfe0ae1d61e8cdda12d047449e5",class:"bds-radio-card__input",type:"radio",name:this.name,value:this.value,checked:this.checked,disabled:this.disabled,tabIndex:-1,onFocus:function(){return a.el.focus()}}),h("span",{key:"091b3ad34ffc7335c07e899645ebb944e0629fe6",class:"bds-radio-card__button"},h("span",{key:"1e717309877f85d8c8d3d635714664c997ab4097",class:"bds-radio-card__dot"})),h("div",{key:"dfc0604e2acbb5db112e410029d057f66e23d71f",class:"bds-radio-card__content"},h("div",{key:"8206a03a6095600fafbc70e1ce43ed85b4204441",class:"bds-radio-card__header"},h("div",{key:"a93dc203f940d4b03622f4896f2799d6379e3e01",class:"bds-radio-card__icon"},h("slot",{key:"a410dff923959aef7695fa4e72b2cb8d4a551ba1",name:"icon"})),h("div",{key:"fb598d2bc0e231171454974041998eea8ee9c1b3",class:"bds-radio-card__title"},this.label||h("slot",{key:"98d45578384b5132140c4ff1db0964f4f19a6faa"}))),h("bds-typography",{key:"ff6f0f7b6d293f73b1d2beb3d1f6998889dbb868",variant:"helper"},h("slot",{key:"73529f1e31f946f0da04334cbf65ff439b74c0d4",name:"description"})))),this.info&&h("span",{key:"7bf6f3803b50675cc9dec6256a938dfb45bbdee1",class:"bds-radio-card__info-icon","aria-label":this.info},h("em",{key:"f472d256e753650c94739c0fb2218e5cf62f0543",class:"bds-icon-info-circle"},h("bds-tooltip",{key:"3e2fe945dbe4a7b9cac470c9e497725937eaabd0"},this.info))))};Object.defineProperty(a.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return a}();BdsRadioCard.style=bdsRadioCardCss();export{BdsRadioCard as bds_radio_card};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var __extends=this&&this.__extends||function(){var t=function(i,r){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var r in i)if(Object.prototype.hasOwnProperty.call(i,r))t[r]=i[r]};return t(i,r)};return function(i,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(i,r);function e(){this.constructor=i}i.prototype=r===null?Object.create(r):(e.prototype=r.prototype,new e)}}();var __awaiter=this&&this.__awaiter||function(t,i,r,e){function n(t){return t instanceof r?t:new r((function(i){i(t)}))}return new(r||(r=Promise))((function(r,o){function a(t){try{u(e.next(t))}catch(t){o(t)}}function s(t){try{u(e["throw"](t))}catch(t){o(t)}}function u(t){t.done?r(t.value):n(t.value).then(a,s)}u((e=e.apply(t,i||[])).next())}))};var __generator=this&&this.__generator||function(t,i){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},e,n,o,a=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return a.next=s(0),a["throw"]=s(1),a["return"]=s(2),typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(t){return function(i){return u([t,i])}}function u(s){if(e)throw new TypeError("Generator is already executing.");while(a&&(a=0,s[0]&&(r=0)),r)try{if(e=1,n&&(o=s[0]&2?n["return"]:s[0]?n["throw"]||((o=n["return"])&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;if(n=0,o)s=[s[0]&2,o.value];switch(s[0]){case 0:case 1:o=s;break;case 4:r.label++;return{value:s[1],done:false};case 5:r.label++;n=s[1];s=[0];continue;case 7:s=r.ops.pop();r.trys.pop();continue;default:if(!(o=r.trys,o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){r.label=s[1];break}if(s[0]===6&&r.label<o[1]){r.label=o[1];o=s;break}if(o&&r.label<o[2]){r.label=o[2];r.ops.push(s);break}if(o[2])r.ops.pop();r.trys.pop();continue}s=i.call(t,r)}catch(t){s=[6,t];n=0}finally{e=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};import{M as Mixin,r as registerInstance,c as createEvent,h,a as Host,g as getElement}from"./index-BqJlOB6b.js";import{f as formAssociatedMixin}from"./form-associated.mixin-C4HM8wQe.js";import{O as ORIENTATIONS}from"./orientation-CPvuMm5C.js";import{c as createId}from"./BaseAttributes-DhSchGPI.js";import{v as validatePropValue}from"./validateProps-kGnB15Lz.js";import{K as KEYBOARD}from"./Keys-DlYG-OVB.js";var RADIO_GROUP_TYPES={RADIO:"radio"};var bdsRadioGroupCss=function(){return'@charset "UTF-8";.bds-radio-group{--bds-divider-gap:var(--boreal-spacing-3xs);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--boreal-spacing-2xs)}.bds-radio-group__options{display:grid;grid-template-columns:1fr;gap:var(--boreal-spacing-xs)}.bds-radio-group[orientation=horizontal] .bds-radio-group__options{grid-template-columns:repeat(var(--layout-count, 1), auto);-ms-flex-pack:start;justify-content:start}.bds-radio-group[type=radiobutton] .bds-radio-group__options{display:-ms-inline-flexbox;display:inline-flex;gap:0;padding:var(--boreal-spacing-3xs);border:1px solid var(--boreal-stroke-default-light);background-color:var(--boreal-ui-inverse);border-radius:var(--boreal-radius-xs);overflow:hidden}.bds-radio-group[type=radiobutton][orientation=vertical] .bds-radio-group__options{-ms-flex-direction:column;flex-direction:column}.bds-radio-group[type=radiobutton].bds-radio-group--error .bds-radio-group__options{border-color:var(--boreal-stroke-danger-base)}.bds-radio-group[type=radiobutton].bds-radio-group--error bds-radio-button.bds-radio-button--error{color:var(--boreal-stroke-danger-base)}.bds-radio-group[type=radiobutton].bds-radio-group--error bds-divider[data-injected]{--bds-divider-color:var(--boreal-stroke-danger-base)}'};var LEAF_TAGS=["BDS-RADIO","BDS-RADIO-BUTTON","BDS-RADIO-CARD"];var BdsRadioGroup=function(t){__extends(i,t);function i(i){var r=t.call(this)||this;registerInstance(r,i);r.bdsChange=createEvent(r,"bdsChange");r.valueChange=createEvent(r,"valueChange");if(i.$hostElement$["s-ei"]){r.internals=i.$hostElement$["s-ei"]}else{r.internals=i.$hostElement$.attachInternals();i.$hostElement$["s-ei"]=r.internals}r._id=createId("bds-radio-group");r.isDisabled=false;r.isInvalid=false;r.disabled=false;r.error=false;r.errorMessage="";r.helperText="";r.info="";r.label="";r.orientation=ORIENTATIONS.VERTICAL;r.required=false;r.type=RADIO_GROUP_TYPES.RADIO;r.value="";r.handleKeyDown=function(t){var i=t.target;if(!LEAF_TAGS.includes(i.tagName))return;switch(t.key){case KEYBOARD.ArrowDown:case KEYBOARD.ArrowRight:r.navigateTo(i,true);t.preventDefault();break;case KEYBOARD.ArrowUp:case KEYBOARD.ArrowLeft:r.navigateTo(i,false);t.preventDefault();break}};r.handleSlotChange=function(){r.updateLayoutCount()};r._buttonCount=0;return r}i.prototype.checkPropValues=function(){validatePropValue(Object.values(ORIENTATIONS),ORIENTATIONS.VERTICAL,this.el,"orientation")};i.prototype.onDisabledChange=function(t){this.isDisabled=t;this.radioElements.forEach((function(i){return i.disabled=t}))};i.prototype.onErrorChange=function(t){this.radioElements.forEach((function(i){return i.error=t}))};i.prototype.onValueChange=function(t){this.radioElements.forEach((function(i){i.checked=i.value===t;i.setAttribute("aria-checked",String(i.value===t))}));var i=this.radioElements.find((function(t){return t.checked}));this.updateTabIndexes(i!==null&&i!==void 0?i:null)};i.prototype.componentWillLoad=function(){var t;this.checkPropValues();this.isDisabled=this.disabled;if(this.value===""){var i=Array.from(this.el.querySelectorAll("bds-radio[checked], bds-radio-button[checked], bds-radio-card[checked]")).at(-1);if(i!==undefined){this.value=(t=i.getAttribute("value"))!==null&&t!==void 0?t:""}}};i.prototype.componentDidLoad=function(){var t,i;var r=this.radioElements.filter((function(t){return t.checked}));if(r.length>1){r.slice(0,-1).forEach((function(t){return t.checked=false}))}this.onValueChange(this.value);if(this.error)this.radioElements.forEach((function(t){return t.error=true}));this.updateLayoutCount();this.updateTabIndexes((i=(t=this.radioElements.find((function(t){return t.checked})))!==null&&t!==void 0?t:this.radioElements.find((function(t){return!t.disabled})))!==null&&i!==void 0?i:null);this.updateFormValidity()};i.prototype.formAssociatedCallback=function(){this.syncFormValue()};i.prototype.formResetCallback=function(){var t=this;this.value="";this.isInvalid=false;this.radioElements.forEach((function(i){i.checked=false;i.setAttribute("aria-checked","false");if(!t.error)i.error=false}));this.internals.setFormValue(null);this.updateFormValidity();var i=this.radioElements.find((function(t){return!t.disabled}));this.updateTabIndexes(i!==null&&i!==void 0?i:null)};i.prototype.formStateRestoreCallback=function(t,i){var r=typeof t==="string"?t:"";this.value=r;this.internals.setFormValue(r!==""?r:null)};i.prototype.formDisabledCallback=function(t){this.isDisabled=t;this.radioElements.forEach((function(i){return i.disabled=t}))};i.prototype.handleRadioChange=function(t){var i=t.target;if(!LEAF_TAGS.includes(i.tagName))return;this.radioElements.filter((function(t){return t!==i})).forEach((function(t){t.checked=false;t.setAttribute("aria-checked","false")}));this.value=t.detail.value;this.internals.setFormValue(this.value);this.updateTabIndexes(i);this.updateFormValidity();this.bdsChange.emit({value:this.value});this.valueChange.emit(this.value)};i.prototype.handleInvalid=function(t){if(this.errorMessage!==""){t.preventDefault();this.isInvalid=true;this.radioElements.forEach((function(t){return t.error=true}))}};i.prototype.checkValidity=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.internals.checkValidity()]}))}))};i.prototype.reportValidity=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.internals.reportValidity()]}))}))};i.prototype.navigateTo=function(t,i){var r=this.radioElements.filter((function(t){return!t.disabled}));if(r.length===0)return;var e=r.indexOf(t);var n=(r.length+e+(i?1:-1))%r.length;var o=r[n];o.checked=true;o.setAttribute("aria-checked","true");this.radioElements.filter((function(t){return t!==o})).forEach((function(t){t.checked=false;t.setAttribute("aria-checked","false")}));this.value=o.value;this.internals.setFormValue(this.value);this.updateTabIndexes(o);this.updateFormValidity();this.bdsChange.emit({value:this.value});this.valueChange.emit(this.value);o.focus()};i.prototype.insertDividers=function(){this.el.querySelectorAll("bds-divider[data-injected]").forEach((function(t){return t.remove()}));if(this.type!=="radiobutton")return;var t=this.orientation===ORIENTATIONS.HORIZONTAL?ORIENTATIONS.VERTICAL:ORIENTATIONS.HORIZONTAL;var i=this.radioElements.filter((function(t){return t.tagName==="BDS-RADIO-BUTTON"}));i.forEach((function(i,r){var e;if(r===0)return;var n=document.createElement("bds-divider");n.setAttribute("orientation",t);n.setAttribute("data-injected","");(e=i.parentNode)===null||e===void 0?void 0:e.insertBefore(n,i)}))};Object.defineProperty(i.prototype,"radioElements",{get:function(){return Array.from(this.el.querySelectorAll("bds-radio, bds-radio-button, bds-radio-card"))},enumerable:false,configurable:true});i.prototype.syncFormValue=function(){this.internals.setFormValue(this.value!==""?this.value:null);this.updateFormValidity()};i.prototype.updateFormValidity=function(){if(this.required&&this.value===""){var t=this.radioElements.find((function(t){return!t.disabled}));this.internals.setValidity({valueMissing:true},this.errorMessage!==""?this.errorMessage:"Please select an option.",t)}else{this.internals.setValidity({});if(this.isInvalid){this.isInvalid=false;if(!this.error)this.radioElements.forEach((function(t){return t.error=false}))}}};i.prototype.updateLayoutCount=function(){var t=this.radioElements.length;this.el.style.setProperty("--layout-count","".concat(t));if(t!==this._buttonCount){this._buttonCount=t;this.insertDividers()}};i.prototype.updateTabIndexes=function(t){this.radioElements.forEach((function(t){return t.setAttribute("tabindex","-1")}));if(t!==null)t.setAttribute("tabindex","0")};Object.defineProperty(i.prototype,"isError",{get:function(){var t=this.error&&!this.disabled;return t||this.isInvalid},enumerable:false,configurable:true});Object.defineProperty(i.prototype,"classMap",{get:function(){return{"bds-radio-group":true,"bds-radio-group--disabled":this.isDisabled,"bds-radio-group--error":this.isError,"bds-radio-group--required":this.required}},enumerable:false,configurable:true});i.prototype.render=function(){var t="".concat(this._id,"-label");var i="".concat(this._id,"-helper");var r=this.isError;var e=this.isDisabled?"disabled":r?"error":"default";var n=r&&this.errorMessage!==""?this.errorMessage:this.helperText;return h(Host,{key:"ab755f253ab7096e8ed0efa7196cedd96cdc7ca8",class:this.classMap,role:"radiogroup","aria-labelledby":this.label!==""?t:undefined,"aria-describedby":n!==""?i:undefined,"aria-invalid":r?"true":undefined,"aria-required":this.required?"true":undefined,onKeyDown:this.handleKeyDown},this.label&&h("bds-typography",{key:"85bc7d114efabd92930c6c934c19e4ba887a3663",id:t,variant:"label",state:e,required:this.required,tooltipText:this.info!==""?this.info:undefined},this.label),h("div",{key:"3f1670875353369c608c9cf064ccb1b7beede19a",class:"bds-radio-group__options"},h("slot",{key:"b0d52880c82dec9557c10bcf7ef8930299bdf7a6",onSlotchange:this.handleSlotChange})),n&&h("bds-typography",{key:"f0a17de329944c3fe63cf7cb586ec85016693208",id:i,variant:"helper",state:e},n))};Object.defineProperty(i,"formAssociated",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(i.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(i,"watchers",{get:function(){return{orientation:[{checkPropValues:0}],disabled:[{onDisabledChange:0}],error:[{onErrorChange:0}],value:[{onValueChange:0}]}},enumerable:false,configurable:true});return i}(Mixin(formAssociatedMixin));BdsRadioGroup.style=bdsRadioGroupCss();export{BdsRadioGroup as bds_radio_group};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as registerInstance,c as createEvent,h,a as Host,g as getElement}from"./index-BqJlOB6b.js";var bdsRadioCss=function(){return'@charset "UTF-8";.bds-radio__content,.bds-radio__icon{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.bds-radio__info{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center}.bds-radio{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;gap:var(--boreal-spacing-2xs);cursor:pointer;outline:none}.bds-radio input[type=radio]{position:absolute;opacity:0;width:0;height:0;margin:0;pointer-events:none}.bds-radio__content{gap:var(--boreal-spacing-3xs)}.bds-radio__icon{-ms-flex-negative:0;flex-shrink:0;line-height:1}.bds-radio__label{font-family:var(--boreal-typography-font-family-primary);font-size:var(--boreal-typography-font-size-sm);font-weight:var(--boreal-typography-font-weight-regular);line-height:var(--boreal-typography-line-height-sm);color:var(--boreal-text-default)}.bds-radio__button{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-ms-flex-negative:0;flex-shrink:0;width:18px;height:18px;border-radius:var(--boreal-radius-full);border:1px solid var(--boreal-stroke-default-light);background-color:var(--boreal-ui-inverse);-webkit-transition:background-color 0.3s ease, border-color 0.3s ease, -webkit-box-shadow 0.3s ease;transition:background-color 0.3s ease, border-color 0.3s ease, -webkit-box-shadow 0.3s ease;transition:background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;transition:background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, -webkit-box-shadow 0.3s ease}.bds-radio__dot{width:10px;height:10px;border-radius:var(--boreal-radius-full);background-color:transparent;-webkit-transition:background-color 0.3s ease, border-color 0.3s ease, -webkit-box-shadow 0.3s ease;transition:background-color 0.3s ease, border-color 0.3s ease, -webkit-box-shadow 0.3s ease;transition:background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;transition:background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, -webkit-box-shadow 0.3s ease}.bds-radio__info-icon{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;font-size:var(--boreal-typography-font-size-sm);line-height:1;color:var(--boreal-icon-default-ink)}.bds-radio:hover:not(.bds-radio--disabled):not(.bds-radio--checked) .bds-radio__button{border-color:var(--boreal-stroke-default-light);-webkit-box-shadow:0 1px 2px 0 rgba(19, 19, 22, 0.15);box-shadow:0 1px 2px 0 rgba(19, 19, 22, 0.15)}.bds-radio:hover:not(.bds-radio--disabled):not(.bds-radio--checked) .bds-radio__dot{background-color:var(--boreal-ui-base-light)}.bds-radio:is(:focus-visible,:focus) .bds-radio__button{-webkit-box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus);box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus)}.bds-radio:active:not(.bds-radio--disabled):not(.bds-radio--checked) .bds-radio__button{-webkit-box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus), 0 1px 2px 0 rgba(19, 19, 22, 0.15) inset;box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus), 0 1px 2px 0 rgba(19, 19, 22, 0.15) inset}.bds-radio--checked .bds-radio__button{border-color:var(--boreal-stroke-primary-base)}.bds-radio--checked .bds-radio__dot{background-color:var(--boreal-ui-primary-base)}.bds-radio--error .bds-radio__button{border-color:var(--boreal-stroke-danger-base)}.bds-radio--disabled{cursor:not-allowed;pointer-events:none}.bds-radio--disabled .bds-radio__button{border-color:var(--boreal-stroke-default-light);background-color:var(--boreal-ui-disabled)}.bds-radio--disabled .bds-radio__label{color:var(--boreal-text-disabled)}.bds-radio--disabled.bds-radio--checked .bds-radio__button{border-color:var(--boreal-ui-primary-light)}.bds-radio--disabled.bds-radio--checked .bds-radio__dot{background-color:var(--boreal-ui-primary-light)}'};var BdsRadio=function(){function e(e){var a=this;registerInstance(this,e);this.bdsChange=createEvent(this,"bdsChange");this.checked=false;this.disabled=false;this.value="on";this.name="";this.label="";this.error=false;this.info="";this.handleClick=function(){return a.select()};this.handleKeyDown=function(e){if(e.key===" "){e.preventDefault();a.select()}}}e.prototype.componentDidLoad=function(){this.el.setAttribute("role","radio");this.el.setAttribute("aria-checked",String(this.checked));this.el.setAttribute("tabindex","-1")};e.prototype.select=function(){if(this.disabled||this.checked)return;this.checked=true;this.el.setAttribute("aria-checked","true");this.bdsChange.emit({checked:true,value:this.value})};Object.defineProperty(e.prototype,"classMap",{get:function(){return{"bds-radio":true,"bds-radio--checked":this.checked,"bds-radio--error":this.error,"bds-radio--disabled":this.disabled}},enumerable:false,configurable:true});e.prototype.render=function(){var e=this;return h(Host,{key:"1d68465b5124471bda9fb1e4f3dc022d4f22be6d",class:this.classMap,onClick:this.handleClick,onKeyDown:this.handleKeyDown},h("input",{key:"8c820cf327a9978f6f098794e26a4ec0394e99c3",type:"radio",name:this.name,value:this.value,checked:this.checked,disabled:this.disabled,"aria-hidden":"true",tabIndex:-1,onFocus:function(){return e.el.focus()}}),h("span",{key:"6de9fcb7657842b81b4bf803e3e60b6891fef27e",class:"bds-radio__button"},h("span",{key:"660c57e990abc4f6f1288f93c198e9bb60be6c29",class:"bds-radio__dot"})),h("span",{key:"ec3879d0edb42cdbc7b4257d563d9c298fd3b89d",class:"bds-radio__content"},h("span",{key:"430b04fd6f836cf2881fecf9df56bee70486da85",class:"bds-radio__icon"},h("slot",{key:"30dcf8837cd50a9e48a6c061576f7b9d53eeabd9",name:"icon"})),h("span",{key:"dbb139d87c4689a64e2860b365d7c261c56b638b",class:"bds-radio__label"},this.label||h("slot",{key:"a7d985fa9773a8f285c36f3deaeb7112adf20f95"})),this.info&&h("span",{key:"36958330fd1ed9fa6f64bcf757c9be113fae5daf",class:"bds-radio__info"},h("span",{key:"ea5a415943c9f67f027a4b241d024ea61321a8a1",class:"bds-radio__info-icon bds-icon-info-circle","aria-hidden":"true"}),h("bds-tooltip",{key:"875105c226c6d1fb90d62fe275ed544f043a1c19"},this.info))))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();BdsRadio.style=bdsRadioCss();export{BdsRadio as bds_radio};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as registerInstance,h,a as Host,g as getElement}from"./index-BqJlOB6b.js";import{v as validatePropValue}from"./validateProps-kGnB15Lz.js";var SPINNER_SIZES={SMALL:"sm",MEDIUM:"md",LARGE:"lg"};var bdsSpinnerCss=function(){return'@charset "UTF-8";bds-spinner{display:inline-block;position:relative;width:1em;height:1em}bds-spinner::before,bds-spinner::after{content:"";position:absolute;border-color:transparent transparent var(--boreal-primary-base) transparent;border-radius:50%;border-width:3px;border-style:solid;top:0;left:0;width:100%;height:100%;-webkit-box-sizing:border-box;box-sizing:border-box}bds-spinner::before{opacity:0.2;border-style:dashed;-webkit-animation:spin 0.8s linear infinite;animation:spin 0.8s linear infinite}bds-spinner::after{-webkit-animation:draw-arc 0.8s linear infinite;animation:draw-arc 0.8s linear infinite}.bds-spinner--small{width:var(--boreal-layout-m);height:var(--boreal-layout-m)}.bds-spinner--medium{width:var(--boreal-layout-ml);height:var(--boreal-layout-ml)}.bds-spinner--large{width:var(--boreal-layout-xl);height:var(--boreal-layout-xl)}.bds-spinner__sr-only{position:absolute;width:1px;height:1px;padding:0;margin:0;overflow:hidden;clip:rect(0, 0, 0, 0);-webkit-clip-path:inset(50%);clip-path:inset(50%);white-space:nowrap;border:0}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes draw-arc{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}60%{-webkit-transform:rotate(330deg);transform:rotate(330deg)}65%{-webkit-transform:rotate(335deg);transform:rotate(335deg)}90%{-webkit-transform:rotate(350deg);transform:rotate(350deg)}95%{-webkit-transform:rotate(355deg);transform:rotate(355deg)}98%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes draw-arc{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}60%{-webkit-transform:rotate(330deg);transform:rotate(330deg)}65%{-webkit-transform:rotate(335deg);transform:rotate(335deg)}90%{-webkit-transform:rotate(350deg);transform:rotate(350deg)}95%{-webkit-transform:rotate(355deg);transform:rotate(355deg)}98%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}'};var BdsSpinner=function(){function e(e){registerInstance(this,e);this.size=SPINNER_SIZES.SMALL;this.label="Loading"}e.prototype.checkPropValues=function(){validatePropValue(Object.values(SPINNER_SIZES),SPINNER_SIZES.SMALL,this.el,"size")};e.prototype.componentWillLoad=function(){this.checkPropValues()};Object.defineProperty(e.prototype,"getClassMap",{get:function(){return{"bds-spinner":true,"bds-spinner--small":this.size===SPINNER_SIZES.SMALL,"bds-spinner--medium":this.size===SPINNER_SIZES.MEDIUM,"bds-spinner--large":this.size===SPINNER_SIZES.LARGE}},enumerable:false,configurable:true});e.prototype.render=function(){return h(Host,{key:"
|
|
1
|
+
import{r as registerInstance,h,a as Host,g as getElement}from"./index-BqJlOB6b.js";import{v as validatePropValue}from"./validateProps-kGnB15Lz.js";var SPINNER_SIZES={SMALL:"sm",MEDIUM:"md",LARGE:"lg"};var bdsSpinnerCss=function(){return'@charset "UTF-8";bds-spinner{display:inline-block;position:relative;width:1em;height:1em}bds-spinner::before,bds-spinner::after{content:"";position:absolute;border-color:transparent transparent var(--boreal-primary-base) transparent;border-radius:50%;border-width:3px;border-style:solid;top:0;left:0;width:100%;height:100%;-webkit-box-sizing:border-box;box-sizing:border-box}bds-spinner::before{opacity:0.2;border-style:dashed;-webkit-animation:spin 0.8s linear infinite;animation:spin 0.8s linear infinite}bds-spinner::after{-webkit-animation:draw-arc 0.8s linear infinite;animation:draw-arc 0.8s linear infinite}.bds-spinner--small{width:var(--boreal-layout-m);height:var(--boreal-layout-m)}.bds-spinner--medium{width:var(--boreal-layout-ml);height:var(--boreal-layout-ml)}.bds-spinner--large{width:var(--boreal-layout-xl);height:var(--boreal-layout-xl)}.bds-spinner__sr-only{position:absolute;width:1px;height:1px;padding:0;margin:0;overflow:hidden;clip:rect(0, 0, 0, 0);-webkit-clip-path:inset(50%);clip-path:inset(50%);white-space:nowrap;border:0}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes draw-arc{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}60%{-webkit-transform:rotate(330deg);transform:rotate(330deg)}65%{-webkit-transform:rotate(335deg);transform:rotate(335deg)}90%{-webkit-transform:rotate(350deg);transform:rotate(350deg)}95%{-webkit-transform:rotate(355deg);transform:rotate(355deg)}98%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes draw-arc{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}60%{-webkit-transform:rotate(330deg);transform:rotate(330deg)}65%{-webkit-transform:rotate(335deg);transform:rotate(335deg)}90%{-webkit-transform:rotate(350deg);transform:rotate(350deg)}95%{-webkit-transform:rotate(355deg);transform:rotate(355deg)}98%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}'};var BdsSpinner=function(){function e(e){registerInstance(this,e);this.size=SPINNER_SIZES.SMALL;this.label="Loading"}e.prototype.checkPropValues=function(){validatePropValue(Object.values(SPINNER_SIZES),SPINNER_SIZES.SMALL,this.el,"size")};e.prototype.componentWillLoad=function(){this.checkPropValues()};Object.defineProperty(e.prototype,"getClassMap",{get:function(){return{"bds-spinner":true,"bds-spinner--small":this.size===SPINNER_SIZES.SMALL,"bds-spinner--medium":this.size===SPINNER_SIZES.MEDIUM,"bds-spinner--large":this.size===SPINNER_SIZES.LARGE}},enumerable:false,configurable:true});e.prototype.render=function(){return h(Host,{key:"7e7846adadb6224abfcaaf2478768b72ec712659",class:this.getClassMap,role:"status","aria-label":this.label,"aria-live":"polite","aria-busy":"true"},h("span",{key:"1c6aad446ed35a3adcb4e4f28fd4a3e7b9b7cb3a",class:"bds-spinner__sr-only"},this.label))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{size:[{checkPropValues:0}]}},enumerable:false,configurable:true});return e}();BdsSpinner.style=bdsSpinnerCss();export{BdsSpinner as bds_spinner};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as registerInstance,h,a as Host,g as getElement}from"./index-BqJlOB6b.js";import{P as PROCESS_STATUS}from"./states-Bfazyxqi.js";import{v as validatePropValue}from"./validateProps-kGnB15Lz.js";var INDICATOR_TYPES={NONE:"none",DOT:"dot",ICON:"icon"};var bdsStatusCss=function(){return'@charset "UTF-8";.bds-status{color:var(--boreal-text-default-ink);text-align:center;font-family:var(--boreal-typography-font-family-primary);font-size:var(--boreal-typography-font-size-xs);font-style:normal;font-weight:var(--boreal-typography-font-weight-semibold);line-height:var(--boreal-typography-line-height-xs);display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;gap:var(--boreal-spacing-3xs);padding:var(--boreal-spacing-3xs) var(--boreal-spacing-xs);min-height:var(--boreal-spacing-ml);border-radius:var(--boreal-radius-xs)}.bds-status>[slot=icon]{display:none}.bds-status--icon>[slot=icon]{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:var(--boreal-layout-s);height:var(--boreal-layout-s)}.bds-status__dot{background-color:var(--boreal-icon-default-light);width:var(--boreal-spacing-xs);height:var(--boreal-spacing-xs);border-radius:var(--boreal-radius-full)}.bds-status--neutral{color:var(--boreal-text-default-ink);background-color:var(--boreal-ui-default-lighter)}.bds-status--neutral>.bds-status__dot{background-color:var(--boreal-icon-default-lighter)}.bds-status--neutral>[slot=icon]{color:var(--boreal-icon-default-lighter)}.bds-status--neutral>.bds-status__dot{background-color:var(--boreal-icon-default-light)}.bds-status--pending{color:var(--boreal-text-warning-dark);background-color:var(--boreal-ui-warning-lighter)}.bds-status--pending>.bds-status__dot{background-color:var(--boreal-icon-warning-base)}.bds-status--pending>[slot=icon]{color:var(--boreal-icon-warning-base)}.bds-status--in-progress{color:var(--boreal-text-information-dark);background-color:var(--boreal-ui-info-lighter)}.bds-status--in-progress>.bds-status__dot{background-color:var(--boreal-icon-info-base)}.bds-status--in-progress>[slot=icon]{color:var(--boreal-icon-info-base)}.bds-status--complete{color:var(--boreal-text-success-dark);background-color:var(--boreal-ui-success-lighter)}.bds-status--complete>.bds-status__dot{background-color:var(--boreal-icon-success-base)}.bds-status--complete>[slot=icon]{color:var(--boreal-icon-success-base)}.bds-status--cancel{color:var(--boreal-text-danger-dark);background-color:var(--boreal-ui-danger-lighter)}.bds-status--cancel>.bds-status__dot{background-color:var(--boreal-icon-danger-base)}.bds-status--cancel>[slot=icon]{color:var(--boreal-icon-danger-base)}'};var BdsStatus=function(){function a(a){registerInstance(this,a);this.state=PROCESS_STATUS.NEUTRAL;this.indicator=INDICATOR_TYPES.NONE}a.prototype.checkPropValues=function(){validatePropValue(Object.values(PROCESS_STATUS),PROCESS_STATUS.NEUTRAL,this.el,"state");validatePropValue(Object.values(INDICATOR_TYPES),INDICATOR_TYPES.NONE,this.el,"indicator")};a.prototype.componentWillLoad=function(){this.checkPropValues()};Object.defineProperty(a.prototype,"classMap",{get:function(){var a;return a={"bds-status":true},a["bds-status--".concat(this.state)]=true,a["bds-status--".concat(this.indicator)]=true,a},enumerable:false,configurable:true});a.prototype.render=function(){return h(Host,{key:"
|
|
1
|
+
import{r as registerInstance,h,a as Host,g as getElement}from"./index-BqJlOB6b.js";import{P as PROCESS_STATUS}from"./states-Bfazyxqi.js";import{v as validatePropValue}from"./validateProps-kGnB15Lz.js";var INDICATOR_TYPES={NONE:"none",DOT:"dot",ICON:"icon"};var bdsStatusCss=function(){return'@charset "UTF-8";.bds-status{color:var(--boreal-text-default-ink);text-align:center;font-family:var(--boreal-typography-font-family-primary);font-size:var(--boreal-typography-font-size-xs);font-style:normal;font-weight:var(--boreal-typography-font-weight-semibold);line-height:var(--boreal-typography-line-height-xs);display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;gap:var(--boreal-spacing-3xs);padding:var(--boreal-spacing-3xs) var(--boreal-spacing-xs);min-height:var(--boreal-spacing-ml);border-radius:var(--boreal-radius-xs)}.bds-status>[slot=icon]{display:none}.bds-status--icon>[slot=icon]{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:var(--boreal-layout-s);height:var(--boreal-layout-s)}.bds-status__dot{background-color:var(--boreal-icon-default-light);width:var(--boreal-spacing-xs);height:var(--boreal-spacing-xs);border-radius:var(--boreal-radius-full)}.bds-status--neutral{color:var(--boreal-text-default-ink);background-color:var(--boreal-ui-default-lighter)}.bds-status--neutral>.bds-status__dot{background-color:var(--boreal-icon-default-lighter)}.bds-status--neutral>[slot=icon]{color:var(--boreal-icon-default-lighter)}.bds-status--neutral>.bds-status__dot{background-color:var(--boreal-icon-default-light)}.bds-status--pending{color:var(--boreal-text-warning-dark);background-color:var(--boreal-ui-warning-lighter)}.bds-status--pending>.bds-status__dot{background-color:var(--boreal-icon-warning-base)}.bds-status--pending>[slot=icon]{color:var(--boreal-icon-warning-base)}.bds-status--in-progress{color:var(--boreal-text-information-dark);background-color:var(--boreal-ui-info-lighter)}.bds-status--in-progress>.bds-status__dot{background-color:var(--boreal-icon-info-base)}.bds-status--in-progress>[slot=icon]{color:var(--boreal-icon-info-base)}.bds-status--complete{color:var(--boreal-text-success-dark);background-color:var(--boreal-ui-success-lighter)}.bds-status--complete>.bds-status__dot{background-color:var(--boreal-icon-success-base)}.bds-status--complete>[slot=icon]{color:var(--boreal-icon-success-base)}.bds-status--cancel{color:var(--boreal-text-danger-dark);background-color:var(--boreal-ui-danger-lighter)}.bds-status--cancel>.bds-status__dot{background-color:var(--boreal-icon-danger-base)}.bds-status--cancel>[slot=icon]{color:var(--boreal-icon-danger-base)}'};var BdsStatus=function(){function a(a){registerInstance(this,a);this.state=PROCESS_STATUS.NEUTRAL;this.indicator=INDICATOR_TYPES.NONE}a.prototype.checkPropValues=function(){validatePropValue(Object.values(PROCESS_STATUS),PROCESS_STATUS.NEUTRAL,this.el,"state");validatePropValue(Object.values(INDICATOR_TYPES),INDICATOR_TYPES.NONE,this.el,"indicator")};a.prototype.componentWillLoad=function(){this.checkPropValues()};Object.defineProperty(a.prototype,"classMap",{get:function(){var a;return a={"bds-status":true},a["bds-status--".concat(this.state)]=true,a["bds-status--".concat(this.indicator)]=true,a},enumerable:false,configurable:true});a.prototype.render=function(){return h(Host,{key:"9a952b22de8565fcca464d045f71ea86c92c8632",class:this.classMap,role:"status"},this.indicator===INDICATOR_TYPES.DOT?h("div",{class:"bds-status__dot","aria-hidden":"true"}):"",h("slot",{key:"47e03b139fcb4da8b15fe115518856c54d02a320",name:"icon"}),h("slot",{key:"e512e975c2df8fa3e3380f27808eec96be5ad455"}))};Object.defineProperty(a.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(a,"watchers",{get:function(){return{state:[{checkPropValues:0}],indicator:[{checkPropValues:0}]}},enumerable:false,configurable:true});return a}();BdsStatus.style=bdsStatusCss();export{BdsStatus as bds_status};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as registerInstance,c as createEvent,h,F as Fragment,a as Host,g as getElement}from"./index-BqJlOB6b.js";import{c as createId}from"./BaseAttributes-DhSchGPI.js";import{v as validatePropValue}from"./validateProps-kGnB15Lz.js";var TAG_COLORS={GRAY:"gray",CYAN:"cyan",TEAL:"teal",LIME:"lime",ORANGE:"orange",COBALT:"cobalt",ROSE:"rose",PURPLE:"purple"};var bdsTagCss=function(){return'@charset "UTF-8";.bds-tag{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;vertical-align:middle;gap:var(--boreal-spacing-3xs);padding:var(--boreal-spacing-3xs) var(--boreal-spacing-3xs) var(--boreal-spacing-3xs) var(--boreal-spacing-2xs);border-radius:var(--boreal-radius-m);cursor:default;max-width:100%;min-width:0;font-family:var(--boreal-typography-font-family-primary);font-size:var(--boreal-typography-font-size-xs);font-weight:var(--boreal-typography-font-weight-semibold);line-height:var(--boreal-typography-line-height-xs)}.bds-tag:hover:not(.bds-tag--selected):not(.bds-tag--disabled){-webkit-box-shadow:0 1px 2px 0 rgba(19, 19, 22, 0.15);box-shadow:0 1px 2px 0 rgba(19, 19, 22, 0.15)}.bds-tag:focus:not(.bds-tag--selected){outline:none;-webkit-box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus);box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus)}.bds-tag--selected{outline:none;-webkit-box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus), 0 1px 2px 0 rgba(19, 19, 22, 0.15) inset;box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus), 0 1px 2px 0 rgba(19, 19, 22, 0.15) inset}.bds-tag__icon{font-size:var(--boreal-typography-font-size-md);max-height:var(--boreal-spacing-m)}.bds-tag__icon:empty{display:none}.bds-tag__text{margin-right:var(--boreal-spacing-2xs);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.bds-tag__close-button{display:-ms-flexbox;display:flex;padding:var(--boreal-spacing-3xs);width:var(--boreal-spacing-s);height:var(--boreal-spacing-s);-webkit-box-sizing:content-box;box-sizing:content-box;border-radius:var(--boreal-radius-full);border:0px solid transparent;background-color:transparent;opacity:0.5;cursor:pointer}.bds-tag__close-button:hover{-webkit-box-shadow:0 1px 2px 0 rgba(19, 19, 22, 0.15);box-shadow:0 1px 2px 0 rgba(19, 19, 22, 0.15);background-color:var(--boreal-ui-inverse);opacity:0.5}.bds-tag__close-button:focus{background-color:var(--boreal-ui-inverse);opacity:0.5;outline:none;-webkit-box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus), 0 1px 2px 0 rgba(19, 19, 22, 0.15) inset;box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus), 0 1px 2px 0 rgba(19, 19, 22, 0.15) inset}.bds-tag__close-button:active{background-color:var(--boreal-ui-inverse);opacity:0.5;-webkit-box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus), 0 1px 2px 0 rgba(19, 19, 22, 0.15) inset, 0 1px 2px 0 rgba(19, 19, 22, 0.15) inset;box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus), 0 1px 2px 0 rgba(19, 19, 22, 0.15) inset, 0 1px 2px 0 rgba(19, 19, 22, 0.15) inset}.bds-tag--disabled{cursor:not-allowed}.bds-tag--disabled .bds-tag__close-button{pointer-events:none}.bds-tag--gray{background-color:var(--boreal-extended-onyx-light);color:var(--boreal-extended-onyx-dark)}.bds-tag--gray .bds-tag__close-button{color:var(--boreal-extended-onyx-dark)}.bds-tag--gray.bds-tag--disabled{color:var(--boreal-extended-onyx-base);background-color:var(--boreal-extended-onyx-lighter)}.bds-tag--gray.bds-tag--disabled .bds-tag__close-button{color:var(--boreal-extended-onyx-base)}.bds-tag--purple{background-color:var(--boreal-extended-purple-light);color:var(--boreal-extended-purple-dark)}.bds-tag--purple .bds-tag__close-button{color:var(--boreal-extended-purple-dark)}.bds-tag--purple.bds-tag--disabled{color:var(--boreal-extended-purple-light);background-color:var(--boreal-extended-purple-lighter)}.bds-tag--purple.bds-tag--disabled .bds-tag__close-button{color:var(--boreal-extended-purple-light)}.bds-tag--rose{background-color:var(--boreal-extended-rose-light);color:var(--boreal-extended-rose-dark)}.bds-tag--rose .bds-tag__close-button{color:var(--boreal-extended-rose-dark)}.bds-tag--rose.bds-tag--disabled{color:var(--boreal-extended-rose-light);background-color:var(--boreal-extended-rose-lighter)}.bds-tag--rose.bds-tag--disabled .bds-tag__close-button{color:var(--boreal-extended-rose-light)}.bds-tag--lime{background-color:var(--boreal-extended-lime-light);color:var(--boreal-extended-lime-dark)}.bds-tag--lime .bds-tag__close-button{color:var(--boreal-extended-lime-dark)}.bds-tag--lime.bds-tag--disabled{color:var(--boreal-extended-lime-light);background-color:var(--boreal-extended-lime-lighter)}.bds-tag--lime.bds-tag--disabled .bds-tag__close-button{color:var(--boreal-extended-lime-light)}.bds-tag--cobalt{background-color:var(--boreal-extended-cobalt-light);color:var(--boreal-extended-cobalt-dark)}.bds-tag--cobalt .bds-tag__close-button{color:var(--boreal-extended-cobalt-dark)}.bds-tag--cobalt.bds-tag--disabled{color:var(--boreal-extended-cobalt-light);background-color:var(--boreal-extended-cobalt-lighter)}.bds-tag--cobalt.bds-tag--disabled .bds-tag__close-button{color:var(--boreal-extended-cobalt-light)}.bds-tag--orange{background-color:var(--boreal-extended-orange-light);color:var(--boreal-extended-orange-dark)}.bds-tag--orange .bds-tag__close-button{color:var(--boreal-extended-orange-dark)}.bds-tag--orange.bds-tag--disabled{color:var(--boreal-extended-orange-light);background-color:var(--boreal-extended-orange-lighter)}.bds-tag--orange.bds-tag--disabled .bds-tag__close-button{color:var(--boreal-extended-orange-light)}.bds-tag--teal{background-color:var(--boreal-extended-teal-light);color:var(--boreal-extended-teal-dark)}.bds-tag--teal .bds-tag__close-button{color:var(--boreal-extended-teal-dark)}.bds-tag--teal.bds-tag--disabled{color:var(--boreal-extended-teal-light);background-color:var(--boreal-extended-teal-lighter)}.bds-tag--teal.bds-tag--disabled .bds-tag__close-button{color:var(--boreal-extended-teal-light)}.bds-tag--cyan{background-color:var(--boreal-extended-cyan-light);color:var(--boreal-extended-cyan-dark)}.bds-tag--cyan .bds-tag__close-button{color:var(--boreal-extended-cyan-dark)}.bds-tag--cyan.bds-tag--disabled{color:var(--boreal-extended-cyan-light);background-color:var(--boreal-extended-cyan-lighter)}.bds-tag--cyan.bds-tag--disabled .bds-tag__close-button{color:var(--boreal-extended-cyan-light)}'};var BdsTag=function(){function e(e){var a=this;registerInstance(this,e);this.bdsClose=createEvent(this,"bdsClose");this.bdsSelect=createEvent(this,"bdsSelect");this._id=createId("bds-tag");this.internalSelected=false;this.multiselect=false;this.selected=false;this.closeButtonLabel="Close tag";this.color=TAG_COLORS.GRAY;this.readonly=false;this.disabled=false;this.handleClose=function(e){if(a.disabled)return;if(e!==undefined){e.preventDefault();e.stopPropagation()}a.bdsClose.emit({id:a._id,selected:a.internalSelected,el:a.el})};this.handleKeyDown=function(e){if(a.disabled)return;var r=[" ","Enter"];var t=["Delete","Backspace"];if(!a.readonly&&t.includes(e.key)){a.handleClose(e);return}if(r.includes(e.key)&&e.target===a.el){e.preventDefault();a.handleSelection()}};this.handleSelection=function(){if(a.disabled)return;if(a.multiselect){a.internalSelected=!a.internalSelected;a.bdsSelect.emit({id:a._id,selected:a.internalSelected,el:a.el})}}}e.prototype.componentWillLoad=function(){this.syncSelectedFromProp(this.selected);this.checkPropValues();this.validateMultiselectRole()};e.prototype.checkPropValues=function(){validatePropValue(Object.values(TAG_COLORS),TAG_COLORS.GRAY,this.el,"color")};e.prototype.syncSelectedFromProp=function(e){this.internalSelected=e};e.prototype.validateMultiselectRole=function(){if(!this.multiselect)return;var e='[role="listbox"], [role="group"], bds-tag-group';var a=this.el;if(a.closest(e)===null){console.warn('[BorealDS Tag] Missing required ARIA parent. Expected role="listbox", role="group", or <bds-tag-group> when multiselect=true.')}};e.prototype.getClasses=function(){var e;return e={"bds-tag":true},e["bds-tag--".concat(this.color)]=true,e["bds-tag--disabled"]=this.disabled,e["bds-tag--selected"]=this.internalSelected,e};e.prototype.renderTag=function(){return h(Fragment,null,h("span",{"aria-hidden":"true",class:"bds-tag__icon"},h("slot",{name:"icon"})),h("span",{class:"bds-tag__text"},h("slot",null)))};e.prototype.renderCloseIcon=function(){var e=this;return h("button",{class:"bds-tag__close-button","aria-label":this.closeButtonLabel,onClick:function(a){return e.handleClose(a)},disabled:this.disabled,type:"button"},h("em",{class:"bds-icon-close","aria-hidden":"true"}))};e.prototype.render=function(){var e=this;var a=this.getClasses();var r=!this.readonly;var t=this.multiselect;return h(Host,{key:"
|
|
1
|
+
import{r as registerInstance,c as createEvent,h,F as Fragment,a as Host,g as getElement}from"./index-BqJlOB6b.js";import{c as createId}from"./BaseAttributes-DhSchGPI.js";import{v as validatePropValue}from"./validateProps-kGnB15Lz.js";var TAG_COLORS={GRAY:"gray",CYAN:"cyan",TEAL:"teal",LIME:"lime",ORANGE:"orange",COBALT:"cobalt",ROSE:"rose",PURPLE:"purple"};var bdsTagCss=function(){return'@charset "UTF-8";.bds-tag{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;vertical-align:middle;gap:var(--boreal-spacing-3xs);padding:var(--boreal-spacing-3xs) var(--boreal-spacing-3xs) var(--boreal-spacing-3xs) var(--boreal-spacing-2xs);border-radius:var(--boreal-radius-m);cursor:default;max-width:100%;min-width:0;font-family:var(--boreal-typography-font-family-primary);font-size:var(--boreal-typography-font-size-xs);font-weight:var(--boreal-typography-font-weight-semibold);line-height:var(--boreal-typography-line-height-xs)}.bds-tag:hover:not(.bds-tag--selected):not(.bds-tag--disabled){-webkit-box-shadow:0 1px 2px 0 rgba(19, 19, 22, 0.15);box-shadow:0 1px 2px 0 rgba(19, 19, 22, 0.15)}.bds-tag:focus:not(.bds-tag--selected){outline:none;-webkit-box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus);box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus)}.bds-tag--selected{outline:none;-webkit-box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus), 0 1px 2px 0 rgba(19, 19, 22, 0.15) inset;box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus), 0 1px 2px 0 rgba(19, 19, 22, 0.15) inset}.bds-tag__icon{font-size:var(--boreal-typography-font-size-md);max-height:var(--boreal-spacing-m)}.bds-tag__icon:empty{display:none}.bds-tag__text{margin-right:var(--boreal-spacing-2xs);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.bds-tag__close-button{display:-ms-flexbox;display:flex;padding:var(--boreal-spacing-3xs);width:var(--boreal-spacing-s);height:var(--boreal-spacing-s);-webkit-box-sizing:content-box;box-sizing:content-box;border-radius:var(--boreal-radius-full);border:0px solid transparent;background-color:transparent;opacity:0.5;cursor:pointer}.bds-tag__close-button:hover{-webkit-box-shadow:0 1px 2px 0 rgba(19, 19, 22, 0.15);box-shadow:0 1px 2px 0 rgba(19, 19, 22, 0.15);background-color:var(--boreal-ui-inverse);opacity:0.5}.bds-tag__close-button:focus{background-color:var(--boreal-ui-inverse);opacity:0.5;outline:none;-webkit-box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus), 0 1px 2px 0 rgba(19, 19, 22, 0.15) inset;box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus), 0 1px 2px 0 rgba(19, 19, 22, 0.15) inset}.bds-tag__close-button:active{background-color:var(--boreal-ui-inverse);opacity:0.5;-webkit-box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus), 0 1px 2px 0 rgba(19, 19, 22, 0.15) inset, 0 1px 2px 0 rgba(19, 19, 22, 0.15) inset;box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus), 0 1px 2px 0 rgba(19, 19, 22, 0.15) inset, 0 1px 2px 0 rgba(19, 19, 22, 0.15) inset}.bds-tag--disabled{cursor:not-allowed}.bds-tag--disabled .bds-tag__close-button{pointer-events:none}.bds-tag--gray{background-color:var(--boreal-extended-onyx-light);color:var(--boreal-extended-onyx-dark)}.bds-tag--gray .bds-tag__close-button{color:var(--boreal-extended-onyx-dark)}.bds-tag--gray.bds-tag--disabled{color:var(--boreal-extended-onyx-base);background-color:var(--boreal-extended-onyx-lighter)}.bds-tag--gray.bds-tag--disabled .bds-tag__close-button{color:var(--boreal-extended-onyx-base)}.bds-tag--purple{background-color:var(--boreal-extended-purple-light);color:var(--boreal-extended-purple-dark)}.bds-tag--purple .bds-tag__close-button{color:var(--boreal-extended-purple-dark)}.bds-tag--purple.bds-tag--disabled{color:var(--boreal-extended-purple-light);background-color:var(--boreal-extended-purple-lighter)}.bds-tag--purple.bds-tag--disabled .bds-tag__close-button{color:var(--boreal-extended-purple-light)}.bds-tag--rose{background-color:var(--boreal-extended-rose-light);color:var(--boreal-extended-rose-dark)}.bds-tag--rose .bds-tag__close-button{color:var(--boreal-extended-rose-dark)}.bds-tag--rose.bds-tag--disabled{color:var(--boreal-extended-rose-light);background-color:var(--boreal-extended-rose-lighter)}.bds-tag--rose.bds-tag--disabled .bds-tag__close-button{color:var(--boreal-extended-rose-light)}.bds-tag--lime{background-color:var(--boreal-extended-lime-light);color:var(--boreal-extended-lime-dark)}.bds-tag--lime .bds-tag__close-button{color:var(--boreal-extended-lime-dark)}.bds-tag--lime.bds-tag--disabled{color:var(--boreal-extended-lime-light);background-color:var(--boreal-extended-lime-lighter)}.bds-tag--lime.bds-tag--disabled .bds-tag__close-button{color:var(--boreal-extended-lime-light)}.bds-tag--cobalt{background-color:var(--boreal-extended-cobalt-light);color:var(--boreal-extended-cobalt-dark)}.bds-tag--cobalt .bds-tag__close-button{color:var(--boreal-extended-cobalt-dark)}.bds-tag--cobalt.bds-tag--disabled{color:var(--boreal-extended-cobalt-light);background-color:var(--boreal-extended-cobalt-lighter)}.bds-tag--cobalt.bds-tag--disabled .bds-tag__close-button{color:var(--boreal-extended-cobalt-light)}.bds-tag--orange{background-color:var(--boreal-extended-orange-light);color:var(--boreal-extended-orange-dark)}.bds-tag--orange .bds-tag__close-button{color:var(--boreal-extended-orange-dark)}.bds-tag--orange.bds-tag--disabled{color:var(--boreal-extended-orange-light);background-color:var(--boreal-extended-orange-lighter)}.bds-tag--orange.bds-tag--disabled .bds-tag__close-button{color:var(--boreal-extended-orange-light)}.bds-tag--teal{background-color:var(--boreal-extended-teal-light);color:var(--boreal-extended-teal-dark)}.bds-tag--teal .bds-tag__close-button{color:var(--boreal-extended-teal-dark)}.bds-tag--teal.bds-tag--disabled{color:var(--boreal-extended-teal-light);background-color:var(--boreal-extended-teal-lighter)}.bds-tag--teal.bds-tag--disabled .bds-tag__close-button{color:var(--boreal-extended-teal-light)}.bds-tag--cyan{background-color:var(--boreal-extended-cyan-light);color:var(--boreal-extended-cyan-dark)}.bds-tag--cyan .bds-tag__close-button{color:var(--boreal-extended-cyan-dark)}.bds-tag--cyan.bds-tag--disabled{color:var(--boreal-extended-cyan-light);background-color:var(--boreal-extended-cyan-lighter)}.bds-tag--cyan.bds-tag--disabled .bds-tag__close-button{color:var(--boreal-extended-cyan-light)}'};var BdsTag=function(){function e(e){var a=this;registerInstance(this,e);this.bdsClose=createEvent(this,"bdsClose");this.bdsSelect=createEvent(this,"bdsSelect");this._id=createId("bds-tag");this.internalSelected=false;this.multiselect=false;this.selected=false;this.closeButtonLabel="Close tag";this.color=TAG_COLORS.GRAY;this.readonly=false;this.disabled=false;this.handleClose=function(e){if(a.disabled)return;if(e!==undefined){e.preventDefault();e.stopPropagation()}a.bdsClose.emit({id:a._id,selected:a.internalSelected,el:a.el})};this.handleKeyDown=function(e){if(a.disabled)return;var r=[" ","Enter"];var t=["Delete","Backspace"];if(!a.readonly&&t.includes(e.key)){a.handleClose(e);return}if(r.includes(e.key)&&e.target===a.el){e.preventDefault();a.handleSelection()}};this.handleSelection=function(){if(a.disabled)return;if(a.multiselect){a.internalSelected=!a.internalSelected;a.bdsSelect.emit({id:a._id,selected:a.internalSelected,el:a.el})}}}e.prototype.componentWillLoad=function(){this.syncSelectedFromProp(this.selected);this.checkPropValues();this.validateMultiselectRole()};e.prototype.checkPropValues=function(){validatePropValue(Object.values(TAG_COLORS),TAG_COLORS.GRAY,this.el,"color")};e.prototype.syncSelectedFromProp=function(e){this.internalSelected=e};e.prototype.validateMultiselectRole=function(){if(!this.multiselect)return;var e='[role="listbox"], [role="group"], bds-tag-group';var a=this.el;if(a.closest(e)===null){console.warn('[BorealDS Tag] Missing required ARIA parent. Expected role="listbox", role="group", or <bds-tag-group> when multiselect=true.')}};e.prototype.getClasses=function(){var e;return e={"bds-tag":true},e["bds-tag--".concat(this.color)]=true,e["bds-tag--disabled"]=this.disabled,e["bds-tag--selected"]=this.internalSelected,e};e.prototype.renderTag=function(){return h(Fragment,null,h("span",{"aria-hidden":"true",class:"bds-tag__icon"},h("slot",{name:"icon"})),h("span",{class:"bds-tag__text"},h("slot",null)))};e.prototype.renderCloseIcon=function(){var e=this;return h("button",{class:"bds-tag__close-button","aria-label":this.closeButtonLabel,onClick:function(a){return e.handleClose(a)},disabled:this.disabled,type:"button"},h("em",{class:"bds-icon-close","aria-hidden":"true"}))};e.prototype.render=function(){var e=this;var a=this.getClasses();var r=!this.readonly;var t=this.multiselect;return h(Host,{key:"bd62a05fccbfa4aed3b7f72b9edf800c3ab05362",class:a,role:t?"option":undefined,tabIndex:t&&!this.disabled?0:-1,"aria-disabled":this.disabled?"true":undefined,"aria-selected":t?"".concat(this.internalSelected):undefined,onKeyDown:!this.disabled?function(a){return e.handleKeyDown(a)}:undefined,onClick:!this.disabled?this.handleSelection:undefined,id:this._id},this.renderTag(),r&&this.renderCloseIcon())};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{color:[{checkPropValues:0}],selected:[{syncSelectedFromProp:0}]}},enumerable:false,configurable:true});return e}();BdsTag.style=bdsTagCss();export{BdsTag as bds_tag};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __extends=this&&this.__extends||function(){var e=function(t,i){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i))e[i]=t[i]};return e(t,i)};return function(t,i){if(typeof i!=="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");e(t,i);function a(){this.constructor=t}t.prototype=i===null?Object.create(i):(a.prototype=i.prototype,new a)}}();var __awaiter=this&&this.__awaiter||function(e,t,i,a){function s(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,r){function n(e){try{l(a.next(e))}catch(e){r(e)}}function o(e){try{l(a["throw"](e))}catch(e){r(e)}}function l(e){e.done?i(e.value):s(e.value).then(n,o)}l((a=a.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},a,s,r,n=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return n.next=o(0),n["throw"]=o(1),n["return"]=o(2),typeof Symbol==="function"&&(n[Symbol.iterator]=function(){return this}),n;function o(e){return function(t){return l([e,t])}}function l(o){if(a)throw new TypeError("Generator is already executing.");while(n&&(n=0,o[0]&&(i=0)),i)try{if(a=1,s&&(r=o[0]&2?s["return"]:o[0]?s["throw"]||((r=s["return"])&&r.call(s),0):s.next)&&!(r=r.call(s,o[1])).done)return r;if(s=0,r)o=[o[0]&2,r.value];switch(o[0]){case 0:case 1:r=o;break;case 4:i.label++;return{value:o[1],done:false};case 5:i.label++;s=o[1];o=[0];continue;case 7:o=i.ops.pop();i.trys.pop();continue;default:if(!(r=i.trys,r=r.length>0&&r[r.length-1])&&(o[0]===6||o[0]===2)){i=0;continue}if(o[0]===3&&(!r||o[1]>r[0]&&o[1]<r[3])){i.label=o[1];break}if(o[0]===6&&i.label<r[1]){i.label=r[1];r=o;break}if(r&&i.label<r[2]){i.label=r[2];i.ops.push(o);break}if(r[2])i.ops.pop();i.trys.pop();continue}o=t.call(e,i)}catch(e){o=[6,e];s=0}finally{a=r=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,i){if(i||arguments.length===2)for(var a=0,s=t.length,r;a<s;a++){if(r||!(a in t)){if(!r)r=Array.prototype.slice.call(t,0,a);r[a]=t[a]}}return e.concat(r||Array.prototype.slice.call(t))};import{M as Mixin,r as registerInstance,c as createEvent,h,a as Host,g as getElement}from"./index-BqJlOB6b.js";import{f as formAssociatedMixin,s as setFormValue,r as runValidators}from"./form-associated.mixin-CvK2d92c.js";import{c as createId}from"./BaseAttributes-DhSchGPI.js";import{v as validatePropValue}from"./validateProps-kGnB15Lz.js";var ARIA_LABELS={Clear:"Clear",ShowPassword:"Show password",HidePassword:"Hide password"};var ICONS={Close:"bds-icon-close",SightOn:"bds-icon-sight-on",SightOff:"bds-icon-sight-off"};var TEXT_FIELD_TYPES={TEXT:"text",PASSWORD:"password"};var TEXT_FIELD_VARIANTS={OUTLINE:"outline",PLAIN:"plain"};var TEXT_FIELD_VALIDATION_TIMING={BLUR:"blur",CHANGE:"change",INPUT:"input",SUBMIT:"submit"};var bdsTextFieldCss=function(){return'@charset "UTF-8";.bds-text-field__container,.bds-text-field__sublabel,.bds-text-field__actions,.bds-text-field__action,.bds-text-field__footer{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.bds-text-field [slot=prefix],.bds-text-field__sublabel{font-size:var(--boreal-typography-font-size-xs);font-weight:var(--boreal-typography-font-weight-semibold);line-height:var(--boreal-typography-line-height-xs)}.bds-text-field{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--boreal-spacing-2xs);width:var(--bds-text-field-width, 100%);font-family:var(--boreal-typography-font-family-primary);color:var(--boreal-text-default)}.bds-text-field__container{padding:var(--boreal-spacing-1xs);padding-left:0;height:var(--boreal-layout-l);border:1px solid var(--boreal-stroke-default-light);border-radius:var(--boreal-radius-xs);background-color:var(--boreal-ui-inverse);-webkit-transition:background-color 0.3s ease, border-color 0.3s ease, -webkit-box-shadow 0.3s ease;transition:background-color 0.3s ease, border-color 0.3s ease, -webkit-box-shadow 0.3s ease;transition:background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;transition:background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, -webkit-box-shadow 0.3s ease;overflow:hidden}.bds-text-field__sublabel{gap:var(--boreal-spacing-3xs);padding-left:var(--boreal-spacing-xs);white-space:nowrap}.bds-text-field__sublabel em[class^=bds-icon-],.bds-text-field__sublabel em[class*=" bds-icon-"]{width:var(--boreal-icons-m);height:var(--boreal-icons-m);font-size:var(--boreal-typography-font-size-md);line-height:1;-ms-flex-negative:0;flex-shrink:0;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.bds-text-field [slot=prefix]{padding-left:var(--boreal-spacing-xs);overflow:hidden;white-space:nowrap;-ms-flex-negative:0;flex-shrink:0}.bds-text-field__control{min-width:0;width:100%;border:none;outline:none;background:transparent;padding:0;padding-left:var(--boreal-spacing-xs);font-size:var(--boreal-typography-font-size-sm);font-weight:var(--boreal-typography-font-weight-regular);line-height:var(--boreal-typography-line-height-sm)}.bds-text-field__control::-webkit-input-placeholder{color:var(--boreal-text-default-light)}.bds-text-field__control::-moz-placeholder{color:var(--boreal-text-default-light)}.bds-text-field__control:-ms-input-placeholder{color:var(--boreal-text-default-light)}.bds-text-field__control::-ms-input-placeholder{color:var(--boreal-text-default-light)}.bds-text-field__control::placeholder{color:var(--boreal-text-default-light)}.bds-text-field__control:disabled{cursor:not-allowed}.bds-text-field__actions{padding-left:var(--boreal-spacing-xs);gap:var(--boreal-spacing-3xs)}.bds-text-field__action{-ms-flex-pack:center;justify-content:center;background:none;border:none;padding:var(--boreal-spacing-3xs);cursor:pointer;color:var(--boreal-icon-default-light);line-height:1;-webkit-transition:color 0.3s ease, opacity 0.3s ease;transition:color 0.3s ease, opacity 0.3s ease}.bds-text-field__action--clear em[class^=bds-icon-],.bds-text-field__action--clear em[class*=" bds-icon-"]{width:var(--boreal-icons-s);height:var(--boreal-icons-s);font-size:var(--boreal-typography-font-size-xs);line-height:1;-ms-flex-negative:0;flex-shrink:0;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.bds-text-field__action--password em[class^=bds-icon-],.bds-text-field__action--password em[class*=" bds-icon-"]{width:var(--boreal-icons-l);height:var(--boreal-icons-l);font-size:var(--boreal-typography-font-size-lg);line-height:1;-ms-flex-negative:0;flex-shrink:0;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.bds-text-field__action:hover{color:var(--boreal-icon-default-dark)}.bds-text-field__action:focus-visible{-webkit-box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus);box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus)}.bds-text-field__footer{-ms-flex-pack:justify;justify-content:space-between}.bds-text-field__char-count{-ms-flex-negative:0;flex-shrink:0;font-size:var(--boreal-typography-font-size-xs);font-weight:var(--boreal-typography-font-weight-regular);line-height:var(--boreal-typography-line-height-xs);color:var(--boreal-text-default-light)}.bds-text-field--focused .bds-text-field__container{border-color:var(--boreal-stroke-focus);-webkit-box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus);box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus)}.bds-text-field--error .bds-text-field__container{border-color:var(--boreal-stroke-danger-base)}.bds-text-field--disabled{cursor:not-allowed}.bds-text-field--disabled .bds-text-field__container{background-color:var(--boreal-ui-default-lighter);border-color:var(--boreal-stroke-default-light)}.bds-text-field--disabled .bds-text-field__sublabel{color:var(--boreal-text-disabled)}.bds-text-field--disabled .bds-text-field__sublabel em[class^=bds-icon-],.bds-text-field--disabled .bds-text-field__sublabel em[class*=" bds-icon-"]{color:var(--boreal-icon-disabled)}.bds-text-field--disabled .bds-text-field__control{color:var(--boreal-icon-disabled)}.bds-text-field--readonly .bds-text-field__container{background-color:transparent;border:none}.bds-text-field--readonly .bds-text-field__control::-webkit-input-placeholder{color:var(--boreal-text-default-darker)}.bds-text-field--readonly .bds-text-field__control::-moz-placeholder{color:var(--boreal-text-default-darker)}.bds-text-field--readonly .bds-text-field__control:-ms-input-placeholder{color:var(--boreal-text-default-darker)}.bds-text-field--readonly .bds-text-field__control::-ms-input-placeholder{color:var(--boreal-text-default-darker)}.bds-text-field--readonly .bds-text-field__control::placeholder{color:var(--boreal-text-default-darker)}.bds-text-field--plain .bds-text-field__container{border-color:transparent}.bds-text-field--plain.bds-text-field--focused .bds-text-field__container{border-color:var(--boreal-stroke-focus)}.bds-text-field--clear-on-hover .bds-text-field__action--clear{opacity:0;pointer-events:none}.bds-text-field--clear-on-hover:hover .bds-text-field__action--clear{opacity:1;pointer-events:auto}'};var BdsTextField=function(e){__extends(t,e);function t(t){var i=e.call(this)||this;registerInstance(i,t);i.valueChange=createEvent(i,"valueChange");i.bdsInput=createEvent(i,"bdsInput");i.bdsChange=createEvent(i,"bdsChange");i.bdsFocus=createEvent(i,"bdsFocus");i.bdsBlur=createEvent(i,"bdsBlur");i.bdsClear=createEvent(i,"bdsClear");i.bdsValidationChange=createEvent(i,"bdsValidationChange");if(t.$hostElement$["s-ei"]){i.internals=t.$hostElement$["s-ei"]}else{i.internals=t.$hostElement$.attachInternals();t.$hostElement$["s-ei"]=i.internals}i.name="";i.disabled=false;i.required=false;i.isDisabled=false;i.value="";i.error=false;i.errorMessage="";i.customValidators=[];i.validationTiming=TEXT_FIELD_VALIDATION_TIMING.BLUR;i.type=TEXT_FIELD_TYPES.TEXT;i.variant=TEXT_FIELD_VARIANTS.OUTLINE;i.placeholder="";i.readOnly=false;i.autocomplete="off";i.pattern="";i.minLength=0;i.maxLength=0;i.label="";i.sublabel="";i.icon="";i.helperText="";i.info="";i.clearable=false;i.clearOnHover=false;i.charCount=0;i.counter=false;i.customWidth="";i.focused=false;i.showPassword=false;i.touched=false;i.dirty=false;i.currentCharCount=0;i.validationError=false;i.validationMessage="";i._valueAtFocus="";i._id=createId("bds-text-field");i.invalidHandler=function(e){e.preventDefault();i.validationError=true;i.validationMessage=i.internals.validationMessage;i.bdsValidationChange.emit({valid:false,validity:i.internals.validity,value:i.value,touched:i.touched,dirty:i.dirty})};return i}t.prototype.checkValidity=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,this.internals.checkValidity()]}))}))};t.prototype.reportValidity=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,this.internals.reportValidity()]}))}))};t.prototype.onDisabledChange=function(e){this.isDisabled=e};t.prototype.checkPropValues=function(){validatePropValue(Object.values(TEXT_FIELD_TYPES),TEXT_FIELD_TYPES.TEXT,this.el,"type");validatePropValue(Object.values(TEXT_FIELD_VARIANTS),TEXT_FIELD_VARIANTS.OUTLINE,this.el,"variant");validatePropValue(Object.values(TEXT_FIELD_VALIDATION_TIMING),TEXT_FIELD_VALIDATION_TIMING.BLUR,this.el,"validationTiming")};t.prototype.componentWillLoad=function(){this.checkPropValues();this.isDisabled=this.disabled;this.currentCharCount=this.value.length};t.prototype.componentDidLoad=function(){this.el.addEventListener("invalid",this.invalidHandler)};t.prototype.disconnectedCallback=function(){this.el.removeEventListener("invalid",this.invalidHandler)};t.prototype.onCustomValidatorsChange=function(){this.updateValidity()};t.prototype.onValueChange=function(e){setFormValue(this.internals,e);this.currentCharCount=e.length;this.updateValidity();this.valueChange.emit(e)};t.prototype.formAssociatedCallback=function(){setFormValue(this.internals,this.value);this.updateValidity()};t.prototype.formResetCallback=function(){this.value="";this.touched=false;this.dirty=false;this.currentCharCount=0;this.validationError=false;this.validationMessage="";setFormValue(this.internals,null);this.updateValidity()};t.prototype.formStateRestoreCallback=function(e,t){this.value=typeof e==="string"?e:"";setFormValue(this.internals,this.value);this.updateValidity()};t.prototype.updateValidity=function(e){if(e===void 0){e=false}var t=runValidators(this.internals,__spreadArray(__spreadArray([],this.validators,true),this.customValidators,true),this.el);if(e){this.validationError=!t;this.validationMessage=t?"":this.internals.validationMessage;this.bdsValidationChange.emit({valid:t,validity:this.internals.validity,value:this.value,touched:this.touched,dirty:this.dirty})}};t.prototype.handleInput=function(e){this.value=e.target.value;this.dirty=true;this.bdsInput.emit({value:this.value,event:e});if(this.validationTiming===TEXT_FIELD_VALIDATION_TIMING.INPUT){this.updateValidity(true)}};t.prototype.handleChange=function(e){this.bdsChange.emit({value:this.value,event:e});if(this.validationTiming===TEXT_FIELD_VALIDATION_TIMING.CHANGE){this.updateValidity(true)}};t.prototype.handleFocus=function(e){this.focused=true;this._valueAtFocus=this.value;this.bdsFocus.emit({event:e})};t.prototype.handleBlur=function(e){this.focused=false;this.touched=true;this.bdsBlur.emit({event:e});if(this.validationTiming===TEXT_FIELD_VALIDATION_TIMING.BLUR){this.updateValidity(true)}else if(this.validationTiming===TEXT_FIELD_VALIDATION_TIMING.CHANGE&&this.value!==this._valueAtFocus){this.updateValidity(true)}};t.prototype.handleShowPassword=function(){this.showPassword=!this.showPassword};t.prototype.handleClear=function(){var e;this.value="";this.dirty=true;this.validationError=false;this.validationMessage="";this.bdsClear.emit();(e=this.el.querySelector("input"))===null||e===void 0?void 0:e.focus()};t.prototype.handleMouseDown=function(e){if(this.readOnly){e.preventDefault()}};Object.defineProperty(t.prototype,"validators",{get:function(){var e=this;return[{key:"valueMissing",isValid:function(){return!e.required||e.value!==""},message:"This field is required. Please fill it out."},{key:"tooShort",isValid:function(){return e.minLength===0||e.value.length>=e.minLength},message:"Please enter at least ".concat(this.minLength," characters.")},{key:"patternMismatch",isValid:function(){if(e.pattern===""||e.value==="")return true;try{return new RegExp(e.pattern).test(e.value)}catch(e){return true}},message:"Please match the requested format."}]},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"effectiveMaxLength",{get:function(){if(this.maxLength!==0)return this.maxLength;if(this.counter&&this.charCount>0)return this.charCount;return undefined},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"classMap",{get:function(){return{"bds-text-field":true,"bds-text-field--error":this.error||this.validationError,"bds-text-field--disabled":this.isDisabled,"bds-text-field--focused":this.focused,"bds-text-field--readonly":this.readOnly,"bds-text-field--plain":this.variant===TEXT_FIELD_VARIANTS.PLAIN,"bds-text-field--clear-on-hover":this.clearOnHover}},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"hostStyle",{get:function(){return this.customWidth!==""?{"--bds-text-field-width":this.customWidth}:undefined},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"iconClear",{get:function(){return this.clearable||this.clearOnHover?ICONS.Close:""},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"showPasswordIcon",{get:function(){return this.showPassword?ICONS.SightOn:ICONS.SightOff},enumerable:false,configurable:true});t.prototype.render=function(){var e=this;var t="".concat(this._id,"-label");var i="".concat(this._id,"-helper");var a=(this.clearable||this.clearOnHover)&&this.value!==""&&!this.isDisabled&&!this.readOnly;var s=this.error||this.validationError;var r=this.error&&this.errorMessage!==""?this.errorMessage:this.validationError&&this.validationMessage!==""?this.validationMessage:this.helperText;var n=r!==""||this.counter&&this.charCount>0;var o=this.isDisabled?"disabled":s?"error":"default";return h(Host,{key:"96b7e057fa7f25e8f7d13b7de0fd17f12de602bb",class:this.classMap,style:this.hostStyle,tabIndex:-1,onFocus:function(){var t;return!e.readOnly&&((t=e.el.querySelector("input"))===null||t===void 0?void 0:t.focus())}},this.label!==""&&h("bds-typography",{key:"e827b43ea347037ff2d404229aaefdd258d2ad22",id:t,variant:"label",htmlFor:this._id,required:this.required,tooltipText:this.info!==""?this.info:undefined,state:o},this.label),h("div",{key:"f579762db25f65031917874dbb4c2347b5d9f027",class:"bds-text-field__container"},(this.icon!==""||this.sublabel!=="")&&h("span",{key:"191d2ccec9baf8b739163eea112dce9a1073f4bd",class:"bds-text-field__sublabel"},this.icon!==""&&h("em",{key:"1cc1b1b7ece610b2a18ba872c4b7035d2239731b",class:this.icon}),this.sublabel),h("slot",{key:"ba7b08573b6ae35c10649125991a2bbed15f31f3",name:"prefix"}),h("input",{key:"6391338c4f636382cf19f888dc810baaf6820c80",id:this._id,class:"bds-text-field__control","aria-labelledby":this.label!==""?t:undefined,"aria-describedby":n&&r!==""?i:undefined,"aria-invalid":this.error||this.validationError?"true":undefined,"aria-required":this.required?"true":undefined,type:this.type===TEXT_FIELD_TYPES.PASSWORD&&this.showPassword?TEXT_FIELD_TYPES.TEXT:this.type,value:this.value,disabled:this.isDisabled,readOnly:this.readOnly,tabIndex:this.readOnly?-1:undefined,placeholder:this.placeholder,autocomplete:this.autocomplete,pattern:this.pattern!==""?this.pattern:undefined,minLength:this.minLength!==0?this.minLength:undefined,maxLength:this.effectiveMaxLength,onMouseDown:function(t){return e.handleMouseDown(t)},onInput:function(t){return e.handleInput(t)},onChange:function(t){return e.handleChange(t)},onFocus:function(t){return e.handleFocus(t)},onBlur:function(t){return e.handleBlur(t)}}),(a||this.type===TEXT_FIELD_TYPES.PASSWORD)&&h("div",{key:"e5dc4cab3d536ef09eaeae96ca68a7d4b4e15d92",class:"bds-text-field__actions"},a&&h("button",{key:"b18d06de000c3ea465be221dcbb77ab49bb3949f",class:"bds-text-field__action bds-text-field__action--clear",type:"button","aria-label":ARIA_LABELS.Clear,onClick:function(){return e.handleClear()}},h("em",{key:"0aa5d75c5214b7832a2a2e80a1cd2c42af5bea9a",class:this.iconClear})),this.type===TEXT_FIELD_TYPES.PASSWORD&&h("button",{key:"fd97135cca8d32178461bf7109c9b6a7eec543e9",class:"bds-text-field__action bds-text-field__action--password",type:"button","aria-label":this.showPassword?ARIA_LABELS.HidePassword:ARIA_LABELS.ShowPassword,onClick:function(){return e.handleShowPassword()}},h("em",{key:"0de72e7756ad62bbe4fb5f925526071720f358db",class:this.showPasswordIcon})))),n&&h("div",{key:"9d1c0e8920511650ab6711f2f813c01491d52414",class:"bds-text-field__footer"},r!==""&&h("bds-typography",{key:"f27235a7a38f34b9a9f7bae762c3c6be12acd8b0",id:i,variant:"helper",state:o},r),this.counter&&this.charCount>0&&h("span",{key:"3aa43ea8bd6a35963f0983ec8814e0ce19ee71ce",class:"bds-text-field__char-count"},this.currentCharCount,"/",this.charCount)))};Object.defineProperty(t,"formAssociated",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{disabled:[{onDisabledChange:0}],type:[{checkPropValues:0}],variant:[{checkPropValues:0}],validationTiming:[{checkPropValues:0}],customValidators:[{onCustomValidatorsChange:0}],value:[{onValueChange:0}]}},enumerable:false,configurable:true});return t}(Mixin(formAssociatedMixin));BdsTextField.style=bdsTextFieldCss();export{BdsTextField as bds_text_field};
|
|
1
|
+
var __extends=this&&this.__extends||function(){var e=function(t,i){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i))e[i]=t[i]};return e(t,i)};return function(t,i){if(typeof i!=="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");e(t,i);function a(){this.constructor=t}t.prototype=i===null?Object.create(i):(a.prototype=i.prototype,new a)}}();var __awaiter=this&&this.__awaiter||function(e,t,i,a){function s(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,r){function n(e){try{l(a.next(e))}catch(e){r(e)}}function o(e){try{l(a["throw"](e))}catch(e){r(e)}}function l(e){e.done?i(e.value):s(e.value).then(n,o)}l((a=a.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},a,s,r,n=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return n.next=o(0),n["throw"]=o(1),n["return"]=o(2),typeof Symbol==="function"&&(n[Symbol.iterator]=function(){return this}),n;function o(e){return function(t){return l([e,t])}}function l(o){if(a)throw new TypeError("Generator is already executing.");while(n&&(n=0,o[0]&&(i=0)),i)try{if(a=1,s&&(r=o[0]&2?s["return"]:o[0]?s["throw"]||((r=s["return"])&&r.call(s),0):s.next)&&!(r=r.call(s,o[1])).done)return r;if(s=0,r)o=[o[0]&2,r.value];switch(o[0]){case 0:case 1:r=o;break;case 4:i.label++;return{value:o[1],done:false};case 5:i.label++;s=o[1];o=[0];continue;case 7:o=i.ops.pop();i.trys.pop();continue;default:if(!(r=i.trys,r=r.length>0&&r[r.length-1])&&(o[0]===6||o[0]===2)){i=0;continue}if(o[0]===3&&(!r||o[1]>r[0]&&o[1]<r[3])){i.label=o[1];break}if(o[0]===6&&i.label<r[1]){i.label=r[1];r=o;break}if(r&&i.label<r[2]){i.label=r[2];i.ops.push(o);break}if(r[2])i.ops.pop();i.trys.pop();continue}o=t.call(e,i)}catch(e){o=[6,e];s=0}finally{a=r=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,i){if(i||arguments.length===2)for(var a=0,s=t.length,r;a<s;a++){if(r||!(a in t)){if(!r)r=Array.prototype.slice.call(t,0,a);r[a]=t[a]}}return e.concat(r||Array.prototype.slice.call(t))};import{M as Mixin,r as registerInstance,c as createEvent,h,a as Host,g as getElement}from"./index-BqJlOB6b.js";import{f as formAssociatedMixin}from"./form-associated.mixin-C4HM8wQe.js";import{s as setFormValue,r as runValidators}from"./internals-DfaYciGa.js";import{c as createId}from"./BaseAttributes-DhSchGPI.js";import{v as validatePropValue}from"./validateProps-kGnB15Lz.js";var ARIA_LABELS={Clear:"Clear",ShowPassword:"Show password",HidePassword:"Hide password"};var ICONS={Close:"bds-icon-close",SightOn:"bds-icon-sight-on",SightOff:"bds-icon-sight-off"};var TEXT_FIELD_TYPES={TEXT:"text",PASSWORD:"password"};var TEXT_FIELD_VARIANTS={OUTLINE:"outline",PLAIN:"plain"};var TEXT_FIELD_VALIDATION_TIMING={BLUR:"blur",CHANGE:"change",INPUT:"input",SUBMIT:"submit"};var bdsTextFieldCss=function(){return'@charset "UTF-8";.bds-text-field__container,.bds-text-field__sublabel,.bds-text-field__actions,.bds-text-field__action,.bds-text-field__footer{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.bds-text-field [slot=prefix],.bds-text-field__sublabel{font-size:var(--boreal-typography-font-size-xs);font-weight:var(--boreal-typography-font-weight-semibold);line-height:var(--boreal-typography-line-height-xs)}.bds-text-field{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--boreal-spacing-2xs);width:var(--bds-text-field-width, 100%);font-family:var(--boreal-typography-font-family-primary);color:var(--boreal-text-default)}.bds-text-field__container{padding:var(--boreal-spacing-1xs);padding-left:0;height:var(--boreal-layout-l);border:1px solid var(--boreal-stroke-default-light);border-radius:var(--boreal-radius-xs);background-color:var(--boreal-ui-inverse);-webkit-transition:background-color 0.3s ease, border-color 0.3s ease, -webkit-box-shadow 0.3s ease;transition:background-color 0.3s ease, border-color 0.3s ease, -webkit-box-shadow 0.3s ease;transition:background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;transition:background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, -webkit-box-shadow 0.3s ease;overflow:hidden}.bds-text-field__sublabel{gap:var(--boreal-spacing-3xs);padding-left:var(--boreal-spacing-xs);white-space:nowrap}.bds-text-field__sublabel em[class^=bds-icon-],.bds-text-field__sublabel em[class*=" bds-icon-"]{width:var(--boreal-icons-m);height:var(--boreal-icons-m);font-size:var(--boreal-typography-font-size-md);line-height:1;-ms-flex-negative:0;flex-shrink:0;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.bds-text-field [slot=prefix]{padding-left:var(--boreal-spacing-xs);overflow:hidden;white-space:nowrap;-ms-flex-negative:0;flex-shrink:0}.bds-text-field__control{min-width:0;width:100%;border:none;outline:none;background:transparent;padding:0;padding-left:var(--boreal-spacing-xs);font-size:var(--boreal-typography-font-size-sm);font-weight:var(--boreal-typography-font-weight-regular);line-height:var(--boreal-typography-line-height-sm)}.bds-text-field__control::-webkit-input-placeholder{color:var(--boreal-text-default-light)}.bds-text-field__control::-moz-placeholder{color:var(--boreal-text-default-light)}.bds-text-field__control:-ms-input-placeholder{color:var(--boreal-text-default-light)}.bds-text-field__control::-ms-input-placeholder{color:var(--boreal-text-default-light)}.bds-text-field__control::placeholder{color:var(--boreal-text-default-light)}.bds-text-field__control:disabled{cursor:not-allowed}.bds-text-field__actions{padding-left:var(--boreal-spacing-xs);gap:var(--boreal-spacing-3xs)}.bds-text-field__action{-ms-flex-pack:center;justify-content:center;background:none;border:none;padding:var(--boreal-spacing-3xs);cursor:pointer;color:var(--boreal-icon-default-light);line-height:1;-webkit-transition:color 0.3s ease, opacity 0.3s ease;transition:color 0.3s ease, opacity 0.3s ease}.bds-text-field__action--clear em[class^=bds-icon-],.bds-text-field__action--clear em[class*=" bds-icon-"]{width:var(--boreal-icons-s);height:var(--boreal-icons-s);font-size:var(--boreal-typography-font-size-xs);line-height:1;-ms-flex-negative:0;flex-shrink:0;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.bds-text-field__action--password em[class^=bds-icon-],.bds-text-field__action--password em[class*=" bds-icon-"]{width:var(--boreal-icons-l);height:var(--boreal-icons-l);font-size:var(--boreal-typography-font-size-lg);line-height:1;-ms-flex-negative:0;flex-shrink:0;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.bds-text-field__action:hover{color:var(--boreal-icon-default-dark)}.bds-text-field__action:focus-visible{-webkit-box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus);box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus)}.bds-text-field__footer{-ms-flex-pack:justify;justify-content:space-between}.bds-text-field__char-count{-ms-flex-negative:0;flex-shrink:0;font-size:var(--boreal-typography-font-size-xs);font-weight:var(--boreal-typography-font-weight-regular);line-height:var(--boreal-typography-line-height-xs);color:var(--boreal-text-default-light)}.bds-text-field--focused .bds-text-field__container{border-color:var(--boreal-stroke-focus);-webkit-box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus);box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus)}.bds-text-field--error .bds-text-field__container{border-color:var(--boreal-stroke-danger-base)}.bds-text-field--disabled{cursor:not-allowed}.bds-text-field--disabled .bds-text-field__container{background-color:var(--boreal-ui-default-lighter);border-color:var(--boreal-stroke-default-light)}.bds-text-field--disabled .bds-text-field__sublabel{color:var(--boreal-text-disabled)}.bds-text-field--disabled .bds-text-field__sublabel em[class^=bds-icon-],.bds-text-field--disabled .bds-text-field__sublabel em[class*=" bds-icon-"]{color:var(--boreal-icon-disabled)}.bds-text-field--disabled .bds-text-field__control{color:var(--boreal-icon-disabled)}.bds-text-field--readonly .bds-text-field__container{background-color:transparent;border:none}.bds-text-field--readonly .bds-text-field__control::-webkit-input-placeholder{color:var(--boreal-text-default-darker)}.bds-text-field--readonly .bds-text-field__control::-moz-placeholder{color:var(--boreal-text-default-darker)}.bds-text-field--readonly .bds-text-field__control:-ms-input-placeholder{color:var(--boreal-text-default-darker)}.bds-text-field--readonly .bds-text-field__control::-ms-input-placeholder{color:var(--boreal-text-default-darker)}.bds-text-field--readonly .bds-text-field__control::placeholder{color:var(--boreal-text-default-darker)}.bds-text-field--plain .bds-text-field__container{border-color:transparent}.bds-text-field--plain.bds-text-field--focused .bds-text-field__container{border-color:var(--boreal-stroke-focus)}.bds-text-field--clear-on-hover .bds-text-field__action--clear{opacity:0;pointer-events:none}.bds-text-field--clear-on-hover:hover .bds-text-field__action--clear{opacity:1;pointer-events:auto}'};var BdsTextField=function(e){__extends(t,e);function t(t){var i=e.call(this)||this;registerInstance(i,t);i.valueChange=createEvent(i,"valueChange");i.bdsInput=createEvent(i,"bdsInput");i.bdsChange=createEvent(i,"bdsChange");i.bdsFocus=createEvent(i,"bdsFocus");i.bdsBlur=createEvent(i,"bdsBlur");i.bdsClear=createEvent(i,"bdsClear");i.bdsValidationChange=createEvent(i,"bdsValidationChange");if(t.$hostElement$["s-ei"]){i.internals=t.$hostElement$["s-ei"]}else{i.internals=t.$hostElement$.attachInternals();t.$hostElement$["s-ei"]=i.internals}i.name="";i.disabled=false;i.required=false;i.isDisabled=false;i.value="";i.error=false;i.errorMessage="";i.customValidators=[];i.validationTiming=TEXT_FIELD_VALIDATION_TIMING.BLUR;i.type=TEXT_FIELD_TYPES.TEXT;i.variant=TEXT_FIELD_VARIANTS.OUTLINE;i.placeholder="";i.readOnly=false;i.autocomplete="off";i.pattern="";i.minLength=0;i.maxLength=0;i.label="";i.sublabel="";i.icon="";i.helperText="";i.info="";i.clearable=false;i.clearOnHover=false;i.charCount=0;i.counter=false;i.customWidth="";i.focused=false;i.showPassword=false;i.touched=false;i.dirty=false;i.currentCharCount=0;i.validationError=false;i.validationMessage="";i._valueAtFocus="";i._id=createId("bds-text-field");i.invalidHandler=function(e){e.preventDefault();i.validationError=true;i.validationMessage=i.internals.validationMessage;i.bdsValidationChange.emit({valid:false,validity:i.internals.validity,value:i.value,touched:i.touched,dirty:i.dirty})};return i}t.prototype.checkValidity=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,this.internals.checkValidity()]}))}))};t.prototype.reportValidity=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,this.internals.reportValidity()]}))}))};t.prototype.onDisabledChange=function(e){this.isDisabled=e};t.prototype.checkPropValues=function(){validatePropValue(Object.values(TEXT_FIELD_TYPES),TEXT_FIELD_TYPES.TEXT,this.el,"type");validatePropValue(Object.values(TEXT_FIELD_VARIANTS),TEXT_FIELD_VARIANTS.OUTLINE,this.el,"variant");validatePropValue(Object.values(TEXT_FIELD_VALIDATION_TIMING),TEXT_FIELD_VALIDATION_TIMING.BLUR,this.el,"validationTiming")};t.prototype.componentWillLoad=function(){this.checkPropValues();this.isDisabled=this.disabled;this.currentCharCount=this.value.length};t.prototype.componentDidLoad=function(){this.el.addEventListener("invalid",this.invalidHandler)};t.prototype.disconnectedCallback=function(){this.el.removeEventListener("invalid",this.invalidHandler)};t.prototype.onCustomValidatorsChange=function(){this.updateValidity()};t.prototype.onValueChange=function(e){setFormValue(this.internals,e);this.currentCharCount=e.length;this.updateValidity();this.valueChange.emit(e)};t.prototype.formAssociatedCallback=function(){setFormValue(this.internals,this.value);this.updateValidity()};t.prototype.formResetCallback=function(){this.value="";this.touched=false;this.dirty=false;this.currentCharCount=0;this.validationError=false;this.validationMessage="";setFormValue(this.internals,null);this.updateValidity()};t.prototype.formStateRestoreCallback=function(e,t){this.value=typeof e==="string"?e:"";setFormValue(this.internals,this.value);this.updateValidity()};t.prototype.updateValidity=function(e){if(e===void 0){e=false}var t=runValidators(this.internals,__spreadArray(__spreadArray([],this.validators,true),this.customValidators,true),this.el);if(e){this.validationError=!t;this.validationMessage=t?"":this.internals.validationMessage;this.bdsValidationChange.emit({valid:t,validity:this.internals.validity,value:this.value,touched:this.touched,dirty:this.dirty})}};t.prototype.handleInput=function(e){this.value=e.target.value;this.dirty=true;this.bdsInput.emit({value:this.value,event:e});if(this.validationTiming===TEXT_FIELD_VALIDATION_TIMING.INPUT){this.updateValidity(true)}};t.prototype.handleChange=function(e){this.bdsChange.emit({value:this.value,event:e});if(this.validationTiming===TEXT_FIELD_VALIDATION_TIMING.CHANGE){this.updateValidity(true)}};t.prototype.handleFocus=function(e){this.focused=true;this._valueAtFocus=this.value;this.bdsFocus.emit({event:e})};t.prototype.handleBlur=function(e){this.focused=false;this.touched=true;this.bdsBlur.emit({event:e});if(this.validationTiming===TEXT_FIELD_VALIDATION_TIMING.BLUR){this.updateValidity(true)}else if(this.validationTiming===TEXT_FIELD_VALIDATION_TIMING.CHANGE&&this.value!==this._valueAtFocus){this.updateValidity(true)}};t.prototype.handleShowPassword=function(){this.showPassword=!this.showPassword};t.prototype.handleClear=function(){var e;this.value="";this.dirty=true;this.validationError=false;this.validationMessage="";this.bdsClear.emit();(e=this.el.querySelector("input"))===null||e===void 0?void 0:e.focus()};t.prototype.handleMouseDown=function(e){if(this.readOnly){e.preventDefault()}};Object.defineProperty(t.prototype,"validators",{get:function(){var e=this;return[{key:"valueMissing",isValid:function(){return!e.required||e.value!==""},message:"This field is required. Please fill it out."},{key:"tooShort",isValid:function(){return e.minLength===0||e.value.length>=e.minLength},message:"Please enter at least ".concat(this.minLength," characters.")},{key:"patternMismatch",isValid:function(){if(e.pattern===""||e.value==="")return true;try{return new RegExp(e.pattern).test(e.value)}catch(e){return true}},message:"Please match the requested format."}]},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"effectiveMaxLength",{get:function(){if(this.maxLength!==0)return this.maxLength;if(this.counter&&this.charCount>0)return this.charCount;return undefined},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"classMap",{get:function(){return{"bds-text-field":true,"bds-text-field--error":this.error||this.validationError,"bds-text-field--disabled":this.isDisabled,"bds-text-field--focused":this.focused,"bds-text-field--readonly":this.readOnly,"bds-text-field--plain":this.variant===TEXT_FIELD_VARIANTS.PLAIN,"bds-text-field--clear-on-hover":this.clearOnHover}},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"hostStyle",{get:function(){return this.customWidth!==""?{"--bds-text-field-width":this.customWidth}:undefined},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"iconClear",{get:function(){return this.clearable||this.clearOnHover?ICONS.Close:""},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"showPasswordIcon",{get:function(){return this.showPassword?ICONS.SightOn:ICONS.SightOff},enumerable:false,configurable:true});t.prototype.render=function(){var e=this;var t="".concat(this._id,"-label");var i="".concat(this._id,"-helper");var a=(this.clearable||this.clearOnHover)&&this.value!==""&&!this.isDisabled&&!this.readOnly;var s=this.error||this.validationError;var r=this.error&&this.errorMessage!==""?this.errorMessage:this.validationError&&this.validationMessage!==""?this.validationMessage:this.helperText;var n=r!==""||this.counter&&this.charCount>0;var o=this.isDisabled?"disabled":s?"error":"default";return h(Host,{key:"5f52a0a9553efa1ec140b9edc4d3d332b9b306bc",class:this.classMap,style:this.hostStyle,tabIndex:-1,onFocus:function(){var t;return!e.readOnly&&((t=e.el.querySelector("input"))===null||t===void 0?void 0:t.focus())}},this.label!==""&&h("bds-typography",{key:"eea2b4211cb13cc24baa650239ceca1168933eb5",id:t,variant:"label",htmlFor:this._id,required:this.required,tooltipText:this.info!==""?this.info:undefined,state:o},this.label),h("div",{key:"17d9e4b5f7e0d64a7e6e73200073db9e2d89b601",class:"bds-text-field__container"},(this.icon!==""||this.sublabel!=="")&&h("span",{key:"5557471fd0b5b49a1bb856ea4c1b901ca96039e6",class:"bds-text-field__sublabel"},this.icon!==""&&h("em",{key:"e213979d268b2fce51a0a090b82dff0552515a8c",class:this.icon}),this.sublabel),h("slot",{key:"828b889037a40e562bf45a4b502988542b815701",name:"prefix"}),h("input",{key:"b842de768f53b095b65fc60da7a0cfabfbcc87d1",id:this._id,class:"bds-text-field__control","aria-labelledby":this.label!==""?t:undefined,"aria-describedby":n&&r!==""?i:undefined,"aria-invalid":this.error||this.validationError?"true":undefined,"aria-required":this.required?"true":undefined,type:this.type===TEXT_FIELD_TYPES.PASSWORD&&this.showPassword?TEXT_FIELD_TYPES.TEXT:this.type,value:this.value,disabled:this.isDisabled,readOnly:this.readOnly,tabIndex:this.readOnly?-1:undefined,placeholder:this.placeholder,autocomplete:this.autocomplete,pattern:this.pattern!==""?this.pattern:undefined,minLength:this.minLength!==0?this.minLength:undefined,maxLength:this.effectiveMaxLength,onMouseDown:function(t){return e.handleMouseDown(t)},onInput:function(t){return e.handleInput(t)},onChange:function(t){return e.handleChange(t)},onFocus:function(t){return e.handleFocus(t)},onBlur:function(t){return e.handleBlur(t)}}),(a||this.type===TEXT_FIELD_TYPES.PASSWORD)&&h("div",{key:"19ffb36c88f72645969fed69eb8368647ea8071c",class:"bds-text-field__actions"},a&&h("button",{key:"1adbe2d791fa48cbc6d0b9d71bda40f01f77efe4",class:"bds-text-field__action bds-text-field__action--clear",type:"button","aria-label":ARIA_LABELS.Clear,onClick:function(){return e.handleClear()}},h("em",{key:"72e94a903896a8f0d04569ffb4b692c5fe37c621",class:this.iconClear})),this.type===TEXT_FIELD_TYPES.PASSWORD&&h("button",{key:"795a85ad395254a8dbac151eb225aeb0d0d9266a",class:"bds-text-field__action bds-text-field__action--password",type:"button","aria-label":this.showPassword?ARIA_LABELS.HidePassword:ARIA_LABELS.ShowPassword,onClick:function(){return e.handleShowPassword()}},h("em",{key:"e84632218e25422ce5ba64ad6efc40a94310a0c5",class:this.showPasswordIcon})))),n&&h("div",{key:"ef98f783b7cd1ccf37d04a209d1bcf4b87ca048a",class:"bds-text-field__footer"},r!==""&&h("bds-typography",{key:"c560b15810400be0710368c089294a6ee51746b1",id:i,variant:"helper",state:o},r),this.counter&&this.charCount>0&&h("span",{key:"e4f7d33f2e3bf588f30ccb7165a9b385d8f5a8e3",class:"bds-text-field__char-count"},this.currentCharCount,"/",this.charCount)))};Object.defineProperty(t,"formAssociated",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{disabled:[{onDisabledChange:0}],type:[{checkPropValues:0}],variant:[{checkPropValues:0}],validationTiming:[{checkPropValues:0}],customValidators:[{onCustomValidatorsChange:0}],value:[{onValueChange:0}]}},enumerable:false,configurable:true});return t}(Mixin(formAssociatedMixin));BdsTextField.style=bdsTextFieldCss();export{BdsTextField as bds_text_field};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __extends=this&&this.__extends||function(){var e=function(t,s){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)if(Object.prototype.hasOwnProperty.call(t,s))e[s]=t[s]};return e(t,s)};return function(t,s){if(typeof s!=="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");e(t,s);function i(){this.constructor=t}t.prototype=s===null?Object.create(s):(i.prototype=s.prototype,new i)}}();var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,s=1,i=arguments.length;s<i;s++){t=arguments[s];for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r))e[r]=t[r]}return e};return __assign.apply(this,arguments)};import{M as Mixin,r as registerInstance,c as createEvent,h,a as Host,g as getElement}from"./index-BqJlOB6b.js";import{f as formAssociatedMixin
|
|
1
|
+
var __extends=this&&this.__extends||function(){var e=function(t,s){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)if(Object.prototype.hasOwnProperty.call(t,s))e[s]=t[s]};return e(t,s)};return function(t,s){if(typeof s!=="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");e(t,s);function i(){this.constructor=t}t.prototype=s===null?Object.create(s):(i.prototype=s.prototype,new i)}}();var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,s=1,i=arguments.length;s<i;s++){t=arguments[s];for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r))e[r]=t[r]}return e};return __assign.apply(this,arguments)};import{M as Mixin,r as registerInstance,c as createEvent,h,a as Host,g as getElement}from"./index-BqJlOB6b.js";import{f as formAssociatedMixin}from"./form-associated.mixin-C4HM8wQe.js";import{a as inheritAriaAttributes}from"./attributes-U9yfbs7i.js";import{s as setFormValue}from"./internals-DfaYciGa.js";import{c as createId}from"./BaseAttributes-DhSchGPI.js";var TOGGLE_PLACEMENT={LEFT:"left",RIGHT:"right"};var bdsToggleCss=function(){return'@charset "UTF-8";.bds-toggle{font-family:var(--boreal-typography-font-family-primary);display:inline-block}.bds-toggle__container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:var(--boreal-spacing-2xs);outline:none;width:-webkit-max-content;width:-moz-max-content;width:max-content}.bds-toggle__container:focus{outline:none}.bds-toggle__container--inverse{-ms-flex-direction:row-reverse;flex-direction:row-reverse}.bds-toggle:active,.bds-toggle:focus-visible{outline:none}.bds-toggle:active .bds-toggle__input:not([disabled])+.bds-toggle__slider,.bds-toggle:focus-visible .bds-toggle__input:not([disabled])+.bds-toggle__slider{-webkit-box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus);box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus)}.bds-toggle .bds-toggle__input:active:not([disabled])+.bds-toggle__slider,.bds-toggle .bds-toggle__input:focus-visible:not([disabled])+.bds-toggle__slider{-webkit-box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus);box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus)}.bds-toggle:hover:not(:active):not([checked]):not([disabled]) .bds-toggle__slider,.bds-toggle:hover:not(:active):focus-within:not([checked]) .bds-toggle__slider{-webkit-box-shadow:0 1px 2px 0 var(--boreal-stroke-default-light);box-shadow:0 1px 2px 0 var(--boreal-stroke-default-light)}.bds-toggle__switch{position:relative;display:inline-block;width:var(--boreal-spacing-3xl);height:var(--boreal-spacing-l)}.bds-toggle__input{opacity:0;width:0;height:0}.bds-toggle__input:not(:checked)+.bds-toggle__slider{border:1px solid var(--boreal-stroke-default-light)}.bds-toggle__input:checked+.bds-toggle__slider{background-color:var(--boreal-ui-primary-base)}.bds-toggle__input:checked+.bds-toggle__slider::before{-webkit-transform:translateX(var(--boreal-spacing-l));-ms-transform:translateX(var(--boreal-spacing-l));transform:translateX(var(--boreal-spacing-l))}.bds-toggle__input:disabled+.bds-toggle__slider{background-color:var(--boreal-ui-disabled);cursor:default}.bds-toggle__input:disabled+.bds-toggle__slider::before{background-color:var(--boreal-icon-default-light)}.bds-toggle__input:disabled:checked+.bds-toggle__slider{background-color:var(--boreal-ui-primary-light)}.bds-toggle__input:disabled:checked+.bds-toggle__slider::before{background-color:var(--boreal-icon-inverse)}.bds-toggle__slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:var(--boreal-ui-base-light);-webkit-transition:all 0.4s, border-color 0s;transition:all 0.4s, border-color 0s}.bds-toggle__slider::before{position:absolute;content:"";height:var(--boreal-typography-font-size-md);width:var(--boreal-typography-font-size-md);left:var(--boreal-spacing-2xs);background-color:var(--boreal-text-inverse);bottom:0;top:0;margin:auto;-webkit-transition:0.3s;transition:0.3s}.bds-toggle__slider--round{border-radius:var(--boreal-radius-m)}.bds-toggle__slider--round::before{border-radius:var(--boreal-radius-full)}.bds-toggle__label{font-size:var(--boreal-typography-font-size-sm);color:var(--boreal-text-default)}.bds-toggle__helper-text{display:-ms-flexbox;display:flex;position:relative;color:var(--boreal-text-default-light);font-size:var(--boreal-typography-font-size-xs);margin-top:var(--boreal-spacing-2xs)}'};var BdsToggle=function(e){__extends(t,e);function t(t){var s=e.call(this)||this;registerInstance(s,t);s.valueChange=createEvent(s,"valueChange");s.bdsChange=createEvent(s,"bdsChange");if(t.$hostElement$["s-ei"]){s.internals=t.$hostElement$["s-ei"]}else{s.internals=t.$hostElement$.attachInternals();t.$hostElement$["s-ei"]=s.internals}s.inheritedAttributes={};s.disabled=false;s.required=false;s.info="";s.error=false;s.errorMessage="";s.checked=false;s.placement=TOGGLE_PLACEMENT.LEFT;s.label="";s.helperText="";s.value="on";s._id=createId("bds-toggle");s.isDisabled=false;s.validationError=false;s.validationMessage="";s.isChecked=false;s.handleClick=function(){return s.toggle()};s.handleKeyDown=function(e){if(e.key===" "||e.key==="Enter"){e.preventDefault();s.toggle()}};s.handleInvalid=function(e){e.preventDefault();s.validate()};return s}t.prototype.componentWillLoad=function(){this.isChecked=this.checked||false;this.isDisabled=this.disabled||false;this.inheritedAttributes=__assign({},inheritAriaAttributes(this.el));this.syncFormValue()};t.prototype.onCheckedChange=function(e){this.isChecked=e;this.syncFormValue()};t.prototype.onDisabledChange=function(e){this.isDisabled=e};t.prototype.formAssociatedCallback=function(){this.syncFormValue()};t.prototype.formDisabledCallback=function(e){this.isDisabled=e};t.prototype.formResetCallback=function(){this.isChecked=false;this.internals.setValidity({});setFormValue(this.internals,null)};t.prototype.formStateRestoreCallback=function(e,t){this.isChecked=e===this.value;this.internals.setValidity({});this.syncFormValue()};t.prototype.syncFormValue=function(){setFormValue(this.internals,this.isChecked?this.value:null)};t.prototype.validate=function(){if(!this.isDisabled&&this.required&&!this.isChecked){var e=this.el.querySelector("input");this.validationError=true;this.validationMessage="This field is required";this.internals.setValidity({valueMissing:true},this.validationMessage,e!==null&&e!==void 0?e:this.el)}else{this.validationError=false;this.validationMessage="";this.internals.setValidity({})}};t.prototype.toggle=function(){if(this.isDisabled)return;this.isChecked=!this.isChecked;this.syncFormValue();this.validate();this.valueChange.emit(this.isChecked);this.bdsChange.emit({checked:this.isChecked,value:this.value})};Object.defineProperty(t.prototype,"containerClasses",{get:function(){var e;return e={},e["bds-toggle__container"]=true,e["bds-toggle__container--inverse"]=this.placement===TOGGLE_PLACEMENT.RIGHT,e["bds-toggle__container--checked"]=this.isChecked,e["bds-toggle__container--disabled"]=this.isDisabled,e},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"canShowLabel",{get:function(){return this.label!==undefined&&this.label.trim()!==""&&this.label!==undefined&&this.label!==null},enumerable:false,configurable:true});t.prototype.render=function(){var e="bds-toggle";var t=this.error||this.validationError;var s=this.isDisabled?"disabled":t?"error":"default";var i=this.error&&this.errorMessage!==""?this.errorMessage:this.validationError&&this.validationMessage!==""?this.validationMessage:this.helperText;return h(Host,__assign(__assign({key:"b5d27825358eaadb5cbca86e48488350e6099d8f"},this.inheritedAttributes),{onClick:this.handleClick,onKeyDown:this.handleKeyDown,class:e}),h("div",{key:"9b7bb4c4551beb61ed72c9ee4a4d7ee14e746c4e",part:"container",class:this.containerClasses},this.canShowLabel&&h("bds-typography",{key:"a95e1b66d8452b983002348b9456aa0c3674b202",variant:"label",class:"".concat(e,"__label"),htmlFor:this._id,required:this.required,tooltipText:this.info},this.label),h("label",{key:"954125135521cd6e65c2e6c3dfa41216e6f52dd3",class:"".concat(e,"__switch"),htmlFor:this._id,onClick:function(e){return e.preventDefault()}},h("input",{key:"c3e0ee266aba0bd6e8ca7fb2d3efaeb412161806",class:"".concat(e,"__input"),"aria-invalid":this.error||this.validationError?"true":undefined,"aria-label":this.label||null,id:this._id,type:"checkbox",name:this.name,required:this.required,disabled:this.isDisabled,checked:this.isChecked,onInvalid:this.handleInvalid}),h("span",{key:"68912685234edb7c6ec972231c7f951531862f7c",class:"".concat(e,"__slider ").concat(e,"__slider--round")}))),i!==""&&h("bds-typography",{key:"3e5645d234edc1f3efe7805260def2c74bc7cd44",class:"".concat(e,"__helper-text"),variant:"helper",state:s,onClick:function(e){return e.stopPropagation()}},i))};Object.defineProperty(t,"formAssociated",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{checked:[{onCheckedChange:0}],disabled:[{onDisabledChange:0}]}},enumerable:false,configurable:true});return t}(Mixin(formAssociatedMixin));BdsToggle.style=bdsToggleCss();export{BdsToggle as bds_toggle};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __extends=this&&this.__extends||function(){var t=function(e,r){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r))t[r]=e[r]};return t(e,r)};return function(e,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function a(){this.constructor=e}e.prototype=r===null?Object.create(r):(a.prototype=r.prototype,new a)}}();var __assign=this&&this.__assign||function(){__assign=Object.assign||function(t){for(var e,r=1,a=arguments.length;r<a;r++){e=arguments[r];for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o))t[o]=e[o]}return t};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(t,e,r,a){function o(t){return t instanceof r?t:new r((function(e){e(t)}))}return new(r||(r=Promise))((function(r,i){function n(t){try{l(a.next(t))}catch(t){i(t)}}function s(t){try{l(a["throw"](t))}catch(t){i(t)}}function l(t){t.done?r(t.value):o(t.value).then(n,s)}l((a=a.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},a,o,i,n=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return n.next=s(0),n["throw"]=s(1),n["return"]=s(2),typeof Symbol==="function"&&(n[Symbol.iterator]=function(){return this}),n;function s(t){return function(e){return l([t,e])}}function l(s){if(a)throw new TypeError("Generator is already executing.");while(n&&(n=0,s[0]&&(r=0)),r)try{if(a=1,o&&(i=s[0]&2?o["return"]:s[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,s[1])).done)return i;if(o=0,i)s=[s[0]&2,i.value];switch(s[0]){case 0:case 1:i=s;break;case 4:r.label++;return{value:s[1],done:false};case 5:r.label++;o=s[1];s=[0];continue;case 7:s=r.ops.pop();r.trys.pop();continue;default:if(!(i=r.trys,i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){r.label=s[1];break}if(s[0]===6&&r.label<i[1]){r.label=i[1];i=s;break}if(i&&r.label<i[2]){r.label=i[2];r.ops.push(s);break}if(i[2])r.ops.pop();r.trys.pop();continue}s=e.call(t,r)}catch(t){s=[6,t];o=0}finally{a=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};import{M as Mixin,r as registerInstance,h,a as Host,g as getElement}from"./index-BqJlOB6b.js";import{a as anchoredMixin,g as getOffset}from"./getOffset-DKPjeBHi.js";import{C as COMPONENT_STATES}from"./states-Bfazyxqi.js";import{a as inheritAriaAttributes}from"./attributes-CaHOghy5.js";import"./floating.mixin-DCXSEEVH.js";import"./Keys-CzYQb3pP.js";var ALIGNMENT={START:"start"};var SIZES={XS:"xs",S:"sm",M:"md",L:"lg",XL:"xl"};var OFFSET=4;var bdsTooltipCss=function(){return'@charset "UTF-8";:root{--tooltip-arrow-size:var(--boreal-spacing-s);--tooltip-width:320px}.tooltip-content{position:fixed;margin:0;overflow:visible;border-radius:var(--boreal-radius-xs2);background:var(--boreal-ui-black);color:var(--boreal-text-inverse);padding:var(--boreal-spacing-2xs) var(--boreal-spacing-s);font-size:var(--boreal-typography-font-size-xs);line-height:var(--boreal-typography-line-height-xs);font-family:var(--boreal-typography-font-family-primary);border:var(--boreal-spacing-2xs) solid var(--boreal-ui-black);font-weight:var(--boreal-typography-font-weight-regular)}.tooltip-content--multiline{white-space:normal;max-width:var(--tooltip-width, 320px);word-break:break-word;text-align:center}.tooltip-arrow{position:absolute;width:var(--tooltip-arrow-size);height:var(--tooltip-arrow-size);pointer-events:none;z-index:-1}.tooltip-arrow::before{content:"";position:absolute;width:var(--tooltip-arrow-size);height:var(--tooltip-arrow-size);background:var(--boreal-ui-black);-webkit-transform:rotate(45deg);transform:rotate(45deg);-webkit-transform-origin:center;transform-origin:center;inset:0}.tooltip-content[data-placement^=top] .tooltip-arrow{bottom:calc(var(--tooltip-arrow-size) / -2)}.tooltip-content[data-placement^=bottom] .tooltip-arrow{top:calc(var(--tooltip-arrow-size) / -2)}.tooltip-content[data-placement^=left] .tooltip-arrow{right:calc(var(--tooltip-arrow-size) / -2)}.tooltip-content[data-placement^=right] .tooltip-arrow{left:calc(var(--tooltip-arrow-size) / -2)}'};var BdsTooltip=function(t){__extends(e,t);function e(e){var r=t.call(this)||this;registerInstance(r,e);r.multiline=false;r.disabled=false;r.floatingOptions={};r.isVisible=false;return r}Object.defineProperty(e.prototype,"options",{get:function(){var t,e;return{placement:(t=this.floatingOptions.placement)!==null&&t!==void 0?t:"bottom",offset:getOffset((e=this.floatingOptions)===null||e===void 0?void 0:e.hideArrow,this.floatingOptions.offset,OFFSET),arrow:this.floatingOptions.hideArrow?undefined:this.arrowElement,strategy:"fixed"}},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"hooks",{get:function(){var t=this;return{onPositionUpdate:function(e){return t.handlePosition(e)},onBeforeShow:function(){return t.validateShow()},onBeforeHide:function(e){return t.validateHide(e)},subscribeToTrigger:function(e){return t.subscribe(e)}}},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"canShowArrow",{get:function(){return!this.floatingOptions.hideArrow||false},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"getPlacement",{get:function(){return this.floatingOptions.placement||"bottom"},enumerable:false,configurable:true});e.prototype.validateShow=function(){return!this.disabled};e.prototype.validateHide=function(t){if(this.floatingOptions.stayOnHover&&t!==undefined&&t.isConnected){var e=this.floatingContent.contains(t)||this.floatingContent===t;if(e)return false}return true};e.prototype.handlePosition=function(t){this.floatingContent.setAttribute("data-placement",t.placement);this.setArrowPosition(t)};e.prototype.setArrowPosition=function(t){var e,r;if(((e=t.middlewareData)===null||e===void 0?void 0:e.arrow)&&!this.disabled&&((r=this.arrowElement)===null||r===void 0?void 0:r.isConnected)){var a=t.middlewareData.arrow,o=a.x,i=a.y;Object.assign(this.arrowElement.style,{left:o!=null?"".concat(o,"px"):"",top:i!=null?"".concat(i,"px"):""})}};Object.defineProperty(e.prototype,"hasMultiline",{get:function(){return this.multiline!==undefined&&this.multiline},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"tooltipStyles",{get:function(){return{"tooltip-content":true,"tooltip-content--multiline":this.hasMultiline}},enumerable:false,configurable:true});e.prototype.subscribe=function(t){var e=this;if(t===undefined)return;t.setAttribute("part","tooltip-trigger");t.setAttribute("ariaDescribedBy","tooltip-content");t.addEventListener("mouseenter",(function(){return e.show()}));t.addEventListener("mouseleave",(function(t){return e.hide(t.target)}))};e.prototype.render=function(){var t=this;var e=this.tooltipStyles;return h(Host,{key:"7ba6db9103d172c519e4f9bd3e8743ba506057f1",class:"tooltip"},h("div",{key:"bea4019c3c4d0d1ac605e3c7d5e35564c8173c9e",id:"tooltip-content",part:"tooltip-content",class:e,popover:"manual",role:"tooltip","aria-hidden":this.isVisible?"false":"true","data-placement":this.getPlacement,"data-multiline":this.multiline,"data-hidearrow":this.canShowArrow,ref:function(e){return t.floatingContent=e}},this.canShowArrow&&h("div",{key:"f598c2b54709269fcb1d3335d86400cc3ab4a177",class:"tooltip-arrow",part:"arrow",ref:function(e){return t.arrowElement=e}}),h("slot",{key:"2a18a5c6839c21ec3c0a9f82b6117bded3c08b26"})))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}(Mixin(anchoredMixin));BdsTooltip.style=bdsTooltipCss();var VARIANT_TYPOGRAPHY={DISPLAY:"display",LINK:"link"};var TAG_ELEMENT={P:"p",A:"a"};var FILENAME="download";var VARIANT_CONFIG={link:{states:[COMPONENT_STATES.DISABLED],size:[SIZES.S,SIZES.M]},label:{states:[COMPONENT_STATES.DISABLED],required:true,canUseTooltip:true},heading:{canUseTooltip:true},subheading:{canUseTooltip:true},helper:{states:[COMPONENT_STATES.ERROR]},display:{size:[SIZES.XS,SIZES.S,SIZES.M,SIZES.L,SIZES.XL]}};var getAttributesByTag=function(t,e){var r={a:{href:t.state!==COMPONENT_STATES.DISABLED?t.sanitizedHref:null,target:t.target,download:t.downloadable?t.filename:null,rel:t.target==="_blank"?"noopener noreferrer":undefined},label:{htmlFor:t.htmlFor}};return r[e]||{}};var bdsTypographyCss=function(){return'@charset "UTF-8";bds-typography.bds-typography--disabled-cursor{cursor:not-allowed}.bds-typography{display:-ms-flexbox;display:flex;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:var(--boreal-typography-font-family-primary);font-weight:var(--boreal-typography-font-weight-regular)}.bds-typography__required-indicator{color:var(--boreal-icon-danger-base);font-weight:var(--boreal-typography-font-weight-regular)}.bds-typography__info-icon{color:var(--boreal-icon-default-light)}.bds-typography--heading,.bds-typography--subheading{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:var(--boreal-spacing-3xs)}.bds-typography--label{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;gap:var(--boreal-spacing-3xs)}.bds-typography--display{display:block}.bds-typography--caption,.bds-typography--helper,.bds-typography--link{display:inline-block}.bds-typography--caption{font-size:var(--boreal-typography-font-size-xs);font-weight:var(--boreal-typography-font-weight-regular);line-height:var(--boreal-typography-line-height-md);color:var(--boreal-text-default-light)}.bds-typography--helper{font-size:var(--boreal-typography-font-size-xs);font-weight:var(--boreal-typography-font-weight-regular);line-height:var(--boreal-typography-line-height-sm);color:var(--boreal-text-default-light)}.bds-typography--link{font-size:var(--boreal-typography-font-size-sm);font-weight:var(--boreal-typography-font-weight-regular);line-height:var(--boreal-typography-line-height-md);color:var(--boreal-text-primary-base);text-decoration:none}.bds-typography--link:hover{text-decoration:underline}.bds-typography--link:visited{color:var(--boreal-text-primary-base)}.bds-typography--link:active{color:var(--boreal-text-primary-dark)}.bds-typography--link.bds-typography--size-sm{font-size:var(--boreal-typography-font-size-xs)}.bds-typography--link.bds-typography--size-md{font-size:var(--boreal-typography-font-size-sm)}.bds-typography--code{font-family:var(--boreal-typography-font-family-secondary);font-size:var(--boreal-typography-font-size-xs);font-weight:var(--boreal-typography-font-weight-regular);color:var(--boreal-text-default);line-height:var(--boreal-typography-line-height-md);overflow-wrap:break-word;background-color:var(--boreal-bg-neutral);padding:var(--boreal-spacing-3xs) var(--boreal-spacing-xs);border-radius:var(--boreal-radius-xs);display:inline;box-decoration-break:clone;-webkit-box-decoration-break:clone}.bds-typography--label{font-size:var(--boreal-typography-font-size-xs);font-weight:var(--boreal-typography-font-weight-semibold);line-height:var(--boreal-typography-line-height-md);color:var(--boreal-text-default-darker)}.bds-typography--display{font-weight:var(--boreal-typography-font-weight-regular);color:var(--boreal-text-default)}.bds-typography--display.bds-typography--size-sm{font-size:var(--boreal-typography-font-size-xl);line-height:var(--boreal-typography-line-height-xl)}.bds-typography--display.bds-typography--size-md{font-size:var(--boreal-typography-font-size-2xl);line-height:var(--boreal-typography-line-height-2xl)}.bds-typography--display.bds-typography--size-lg{font-size:var(--boreal-typography-font-size-3xl);line-height:var(--boreal-typography-line-height-3xl);font-weight:var(--boreal-typography-font-weight-light)}.bds-typography--display.bds-typography--size-xl{font-size:var(--boreal-typography-font-size-4xl);line-height:var(--boreal-typography-line-height-4xl);font-weight:var(--boreal-typography-font-weight-light)}.bds-typography--heading{font-size:var(--boreal-typography-font-size-lg);line-height:var(--boreal-typography-line-height-lg);font-weight:var(--boreal-typography-font-weight-regular);color:var(--boreal-text-default)}.bds-typography h1.bds-typography--heading{font-weight:var(--boreal-typography-font-weight-regular);font-size:var(--boreal-typography-font-size-4xl);line-height:var(--boreal-typography-line-height-4xl)}.bds-typography h2.bds-typography--heading{font-weight:var(--boreal-typography-font-weight-regular);font-size:var(--boreal-typography-font-size-3xl);line-height:var(--boreal-typography-line-height-3xl)}.bds-typography h3.bds-typography--heading{font-weight:var(--boreal-typography-font-weight-regular);font-size:var(--boreal-typography-font-size-2xl);line-height:var(--boreal-typography-line-height-2xl)}.bds-typography h4.bds-typography--heading{font-weight:var(--boreal-typography-font-weight-regular);font-size:var(--boreal-typography-font-size-xl);line-height:var(--boreal-typography-line-height-xl)}.bds-typography h5.bds-typography--heading{font-weight:var(--boreal-typography-font-weight-regular);font-size:var(--boreal-typography-font-size-lg);line-height:var(--boreal-typography-line-height-lg)}.bds-typography h6.bds-typography--heading{font-size:var(--boreal-typography-font-size-md);font-weight:var(--boreal-typography-font-weight-semibold);line-height:var(--boreal-typography-line-height-md)}.bds-typography--subheading{font-size:var(--boreal-typography-font-size-md);line-height:var(--boreal-typography-line-height-md);font-weight:var(--boreal-typography-font-weight-semibold)}.bds-typography--align-start{text-align:start}.bds-typography--align-center{text-align:center}.bds-typography--align-end{text-align:end}.bds-typography--align-inherit{text-align:inherit}.bds-typography--error{color:var(--boreal-text-danger-base)}.bds-typography--disabled{color:var(--boreal-text-disabled);pointer-events:none;cursor:not-allowed}.bds-typography--disabled .bds-typography__required-indicator{color:var(--boreal-text-danger-light)}.bds-typography--ellipsis{display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}.bds-typography--ellipsis-multiline{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;white-space:normal;width:100%}'};var BdsTypography=function(){function t(t){registerInstance(this,t);this.inheritedAttributes={};this.variant=VARIANT_TYPOGRAPHY.DISPLAY;this.size=SIZES.M;this.state=COMPONENT_STATES.DEFAULT;this.customClass="";this.element=TAG_ELEMENT.P;this.align=ALIGNMENT.START;this.ellipsis=false;this.maxLines=1;this.tooltipText="";this.required=false;this.htmlFor=undefined;this.href=null;this.target=null;this.downloadable=false;this.filename=FILENAME;this.sanitizedHref=""}t.prototype.updateSanitizedHref=function(){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(e){switch(e.label){case 0:if(!(this.getTagName==="a"&&this.href!==null))return[3,2];return[4,import("./index-noyWJ11s.js").then((function(t){return t.i}))];case 1:t=e.sent().sanitizeUrl;this.sanitizedHref=t(this.href);return[3,3];case 2:this.sanitizedHref="";e.label=3;case 3:return[2]}}))}))};t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:if(!(this.getTagName===TAG_ELEMENT.A&&this.href!==null))return[3,2];return[4,this.updateSanitizedHref()];case 1:t.sent();t.label=2;case 2:this.inheritedAttributes=__assign({},inheritAriaAttributes(this.el));return[2]}}))}))};Object.defineProperty(t.prototype,"getTagName",{get:function(){if(this.variant===VARIANT_TYPOGRAPHY.LINK)return TAG_ELEMENT.A;return this.element.toLowerCase()},enumerable:false,configurable:true});t.prototype.getVariantConfig=function(){var t;return(t=VARIANT_CONFIG[this.variant])!==null&&t!==void 0?t:{}};t.prototype.getAccessibilityTags=function(){var t=this.getVariantConfig().required,e=t===void 0?false:t;var r=["a","label"].includes(this.getTagName);return{"aria-required":this.required&&e,"aria-disabled":this.state===COMPONENT_STATES.DISABLED&&r}};t.prototype.getVariantStateStyles=function(){var t;var e=this.getVariantConfig();return t={},t["bds-typography--".concat(this.variant)]=true,t["bds-typography--align-".concat(this.align)]=true,t["bds-typography--".concat(this.state)]=!!((e===null||e===void 0?void 0:e.states)&&(e===null||e===void 0?void 0:e.states.includes(this.state))),t["bds-typography--size-".concat(this.size)]=!!((e===null||e===void 0?void 0:e.size)&&(e===null||e===void 0?void 0:e.size.includes(this.size))),t["bds-typography--required"]=!!((e===null||e===void 0?void 0:e.required)&&this.required),t["bds-typography--ellipsis"]=this.ellipsis&&this.maxLines<=1,t["bds-typography--ellipsis-multiline"]=this.ellipsis&&this.maxLines>1,t[this.customClass]=this.customClass!=="",t};t.prototype.render=function(){var t=this.getTagName;var e=__assign(__assign(__assign({},getAttributesByTag(this,t)),this.inheritedAttributes),this.getAccessibilityTags());var r=this.getVariantStateStyles();var a=this.getVariantConfig(),o=a.canUseTooltip,i=o===void 0?null:o,n=a.required,s=n===void 0?null:n;var l=this.state===COMPONENT_STATES.DISABLED;return h(Host,{key:"a9b61038ed68ce72e8a96845ac3c082a6b635053",class:"bds-typography ".concat(l?"bds-typography--disabled-cursor":"")},h(t,__assign({key:"3966152c29dd0af270676ab7af0aaf811b48624a",class:r,style:{webkitLineClamp:this.maxLines}},e),h("slot",{key:"fe090f9278feac140d0d4b979912b332da5d6ec8"}),this.required&&s&&h("em",{key:"ccfd67dda34d927778ccf59a40cae185952f2495",class:"bds-typography__required-indicator","aria-hidden":"true"},"*"),this.tooltipText&&i&&h("span",{key:"720ef78bd2e638e0d0be56918483fe227a011f5e"},h("em",{key:"5e064aaed2633b33677e12774dead52ee0871f4a",class:"bds-typography__info-icon bds-icon-info-circle","aria-label":this.tooltipText},h("bds-tooltip",{key:"9ec65063f105cec050f01348a64e7b9f5fa8e968"},this.tooltipText)))))};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{href:[{updateSanitizedHref:0}]}},enumerable:false,configurable:true});return t}();BdsTypography.style=bdsTypographyCss();export{BdsTooltip as bds_tooltip,BdsTypography as bds_typography};
|
|
1
|
+
var __extends=this&&this.__extends||function(){var t=function(e,r){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r))t[r]=e[r]};return t(e,r)};return function(e,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function a(){this.constructor=e}e.prototype=r===null?Object.create(r):(a.prototype=r.prototype,new a)}}();var __assign=this&&this.__assign||function(){__assign=Object.assign||function(t){for(var e,r=1,a=arguments.length;r<a;r++){e=arguments[r];for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o))t[o]=e[o]}return t};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(t,e,r,a){function o(t){return t instanceof r?t:new r((function(e){e(t)}))}return new(r||(r=Promise))((function(r,i){function n(t){try{l(a.next(t))}catch(t){i(t)}}function s(t){try{l(a["throw"](t))}catch(t){i(t)}}function l(t){t.done?r(t.value):o(t.value).then(n,s)}l((a=a.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},a,o,i,n=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return n.next=s(0),n["throw"]=s(1),n["return"]=s(2),typeof Symbol==="function"&&(n[Symbol.iterator]=function(){return this}),n;function s(t){return function(e){return l([t,e])}}function l(s){if(a)throw new TypeError("Generator is already executing.");while(n&&(n=0,s[0]&&(r=0)),r)try{if(a=1,o&&(i=s[0]&2?o["return"]:s[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,s[1])).done)return i;if(o=0,i)s=[s[0]&2,i.value];switch(s[0]){case 0:case 1:i=s;break;case 4:r.label++;return{value:s[1],done:false};case 5:r.label++;o=s[1];s=[0];continue;case 7:s=r.ops.pop();r.trys.pop();continue;default:if(!(i=r.trys,i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){r.label=s[1];break}if(s[0]===6&&r.label<i[1]){r.label=i[1];i=s;break}if(i&&r.label<i[2]){r.label=i[2];r.ops.push(s);break}if(i[2])r.ops.pop();r.trys.pop();continue}s=e.call(t,r)}catch(t){s=[6,t];o=0}finally{a=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};import{M as Mixin,r as registerInstance,h,a as Host,g as getElement}from"./index-BqJlOB6b.js";import{a as anchoredMixin,g as getOffset}from"./getOffset-BYS3c13B.js";import{C as COMPONENT_STATES}from"./states-Bfazyxqi.js";import{a as inheritAriaAttributes}from"./attributes-U9yfbs7i.js";import"./Logger-iq2UuV7c.js";import"./floating.mixin-DCXSEEVH.js";import"./Keys-DlYG-OVB.js";var ALIGNMENT={START:"start"};var SIZES={XS:"xs",S:"sm",M:"md",L:"lg",XL:"xl"};var OFFSET=4;var bdsTooltipCss=function(){return'@charset "UTF-8";:root{--tooltip-arrow-size:var(--boreal-spacing-s);--tooltip-width:320px}.tooltip-content{position:fixed;margin:0;overflow:visible;border-radius:var(--boreal-radius-xs2);background:var(--boreal-ui-black);color:var(--boreal-text-inverse);padding:var(--boreal-spacing-2xs) var(--boreal-spacing-s);font-size:var(--boreal-typography-font-size-xs);line-height:var(--boreal-typography-line-height-xs);font-family:var(--boreal-typography-font-family-primary);border:var(--boreal-spacing-2xs) solid var(--boreal-ui-black);font-weight:var(--boreal-typography-font-weight-regular)}.tooltip-content--multiline{white-space:normal;max-width:var(--tooltip-width, 320px);word-break:break-word;text-align:center}.tooltip-arrow{position:absolute;width:var(--tooltip-arrow-size);height:var(--tooltip-arrow-size);pointer-events:none;z-index:-1}.tooltip-arrow::before{content:"";position:absolute;width:var(--tooltip-arrow-size);height:var(--tooltip-arrow-size);background:var(--boreal-ui-black);-webkit-transform:rotate(45deg);transform:rotate(45deg);-webkit-transform-origin:center;transform-origin:center;inset:0}.tooltip-content[data-placement^=top] .tooltip-arrow{bottom:calc(var(--tooltip-arrow-size) / -2)}.tooltip-content[data-placement^=bottom] .tooltip-arrow{top:calc(var(--tooltip-arrow-size) / -2)}.tooltip-content[data-placement^=left] .tooltip-arrow{right:calc(var(--tooltip-arrow-size) / -2)}.tooltip-content[data-placement^=right] .tooltip-arrow{left:calc(var(--tooltip-arrow-size) / -2)}'};var BdsTooltip=function(t){__extends(e,t);function e(e){var r=t.call(this)||this;registerInstance(r,e);r.multiline=false;r.disabled=false;r.floatingOptions={};r.isVisible=false;return r}Object.defineProperty(e.prototype,"options",{get:function(){var t,e;return{placement:(t=this.floatingOptions.placement)!==null&&t!==void 0?t:"top",offset:getOffset((e=this.floatingOptions)===null||e===void 0?void 0:e.hideArrow,this.floatingOptions.offset,OFFSET),arrow:this.floatingOptions.hideArrow?undefined:this.arrowElement,strategy:"fixed"}},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"hooks",{get:function(){var t=this;return{onPositionUpdate:function(e){return t.handlePosition(e)},onBeforeShow:function(){return t.validateShow()},onBeforeHide:function(e){return t.validateHide(e)},subscribeToTrigger:function(e){return t.subscribe(e)}}},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"canShowArrow",{get:function(){return!this.floatingOptions.hideArrow||false},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"getPlacement",{get:function(){return this.floatingOptions.placement||"top"},enumerable:false,configurable:true});e.prototype.validateShow=function(){return!this.disabled};e.prototype.validateHide=function(t){if(this.floatingOptions.stayOnHover&&t!==undefined&&t.isConnected){var e=this.floatingContent.contains(t)||this.floatingContent===t;if(e)return false}return true};e.prototype.handlePosition=function(t){this.floatingContent.setAttribute("data-placement",t.placement);this.setArrowPosition(t)};e.prototype.setArrowPosition=function(t){var e,r;if(((e=t.middlewareData)===null||e===void 0?void 0:e.arrow)&&!this.disabled&&((r=this.arrowElement)===null||r===void 0?void 0:r.isConnected)){var a=t.middlewareData.arrow,o=a.x,i=a.y;Object.assign(this.arrowElement.style,{left:o!=null?"".concat(o,"px"):"",top:i!=null?"".concat(i,"px"):""})}};Object.defineProperty(e.prototype,"hasMultiline",{get:function(){return this.multiline!==undefined&&this.multiline},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"tooltipStyles",{get:function(){return{"tooltip-content":true,"tooltip-content--multiline":this.hasMultiline}},enumerable:false,configurable:true});e.prototype.subscribe=function(t){var e=this;if(t===undefined)return;t.setAttribute("part","tooltip-trigger");t.setAttribute("ariaDescribedBy","tooltip-content");t.addEventListener("mouseenter",(function(){return e.show()}));t.addEventListener("mouseleave",(function(t){return e.hide(t.target)}))};e.prototype.render=function(){var t=this;var e=this.tooltipStyles;return h(Host,{key:"add483ba4072484f1f6d18271ecb74c46a449f41",class:"tooltip"},h("div",{key:"ede2a5f6230a4baacb36c24dd57be73fda63e438",id:"tooltip-content",part:"tooltip-content",class:e,popover:"manual",role:"tooltip","aria-hidden":this.isVisible?"false":"true","data-placement":this.getPlacement,"data-multiline":this.multiline,"data-hidearrow":this.canShowArrow,ref:function(e){return t.floatingContent=e}},this.canShowArrow&&h("div",{key:"c8580171bc2c01eaca84aa1a029dce6f429359f8",class:"tooltip-arrow",part:"arrow",ref:function(e){return t.arrowElement=e}}),h("slot",{key:"10ead9bb5007414959d4aeacd8c0c1c52223f70d"})))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}(Mixin(anchoredMixin));BdsTooltip.style=bdsTooltipCss();var VARIANT_TYPOGRAPHY={DISPLAY:"display",LINK:"link"};var TAG_ELEMENT={P:"p",A:"a"};var FILENAME="download";var VARIANT_CONFIG={link:{states:[COMPONENT_STATES.DISABLED],size:[SIZES.S,SIZES.M]},label:{states:[COMPONENT_STATES.DISABLED],required:true,canUseTooltip:true},heading:{canUseTooltip:true},subheading:{canUseTooltip:true},helper:{states:[COMPONENT_STATES.ERROR]},display:{size:[SIZES.XS,SIZES.S,SIZES.M,SIZES.L,SIZES.XL]}};var getAttributesByTag=function(t,e){var r={a:{href:t.state!==COMPONENT_STATES.DISABLED?t.sanitizedHref:null,target:t.target,download:t.downloadable?t.filename:null,rel:t.target==="_blank"?"noopener noreferrer":undefined},label:{htmlFor:t.htmlFor}};return r[e]||{}};var bdsTypographyCss=function(){return'@charset "UTF-8";.bds-typography__info{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center}bds-typography.bds-typography--disabled-cursor{cursor:not-allowed}.bds-typography{display:-ms-flexbox;display:flex;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:var(--boreal-typography-font-family-primary);font-weight:var(--boreal-typography-font-weight-regular)}.bds-typography__required-indicator{color:var(--boreal-icon-danger-base);font-weight:var(--boreal-typography-font-weight-regular)}.bds-typography__info-icon{color:var(--boreal-icon-default-light)}.bds-typography--heading,.bds-typography--subheading{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:var(--boreal-spacing-3xs)}.bds-typography--label{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;gap:var(--boreal-spacing-3xs)}.bds-typography--display{display:block}.bds-typography--caption,.bds-typography--helper,.bds-typography--link{display:inline-block}.bds-typography--caption{font-size:var(--boreal-typography-font-size-xs);font-weight:var(--boreal-typography-font-weight-regular);line-height:var(--boreal-typography-line-height-md);color:var(--boreal-text-default-light)}.bds-typography--helper{font-size:var(--boreal-typography-font-size-xs);font-weight:var(--boreal-typography-font-weight-regular);line-height:var(--boreal-typography-line-height-sm);color:var(--boreal-text-default-light)}.bds-typography--link{font-size:var(--boreal-typography-font-size-sm);font-weight:var(--boreal-typography-font-weight-regular);line-height:var(--boreal-typography-line-height-md);color:var(--boreal-text-primary-base);text-decoration:none}.bds-typography--link:hover{text-decoration:underline}.bds-typography--link:visited{color:var(--boreal-text-primary-base)}.bds-typography--link:active{color:var(--boreal-text-primary-dark)}.bds-typography--link.bds-typography--size-sm{font-size:var(--boreal-typography-font-size-xs)}.bds-typography--link.bds-typography--size-md{font-size:var(--boreal-typography-font-size-sm)}.bds-typography--code{font-family:var(--boreal-typography-font-family-secondary);font-size:var(--boreal-typography-font-size-xs);font-weight:var(--boreal-typography-font-weight-regular);color:var(--boreal-text-default);line-height:var(--boreal-typography-line-height-md);overflow-wrap:break-word;background-color:var(--boreal-bg-neutral);padding:var(--boreal-spacing-3xs) var(--boreal-spacing-xs);border-radius:var(--boreal-radius-xs);display:inline;box-decoration-break:clone;-webkit-box-decoration-break:clone}.bds-typography--label{font-size:var(--boreal-typography-font-size-xs);font-weight:var(--boreal-typography-font-weight-semibold);line-height:var(--boreal-typography-line-height-md);color:var(--boreal-text-default-darker)}.bds-typography--display{font-weight:var(--boreal-typography-font-weight-regular);color:var(--boreal-text-default)}.bds-typography--display.bds-typography--size-sm{font-size:var(--boreal-typography-font-size-xl);line-height:var(--boreal-typography-line-height-xl)}.bds-typography--display.bds-typography--size-md{font-size:var(--boreal-typography-font-size-2xl);line-height:var(--boreal-typography-line-height-2xl)}.bds-typography--display.bds-typography--size-lg{font-size:var(--boreal-typography-font-size-3xl);line-height:var(--boreal-typography-line-height-3xl);font-weight:var(--boreal-typography-font-weight-light)}.bds-typography--display.bds-typography--size-xl{font-size:var(--boreal-typography-font-size-4xl);line-height:var(--boreal-typography-line-height-4xl);font-weight:var(--boreal-typography-font-weight-light)}.bds-typography--heading{font-size:var(--boreal-typography-font-size-lg);line-height:var(--boreal-typography-line-height-lg);font-weight:var(--boreal-typography-font-weight-regular);color:var(--boreal-text-default)}.bds-typography h1.bds-typography--heading{font-weight:var(--boreal-typography-font-weight-regular);font-size:var(--boreal-typography-font-size-4xl);line-height:var(--boreal-typography-line-height-4xl)}.bds-typography h2.bds-typography--heading{font-weight:var(--boreal-typography-font-weight-regular);font-size:var(--boreal-typography-font-size-3xl);line-height:var(--boreal-typography-line-height-3xl)}.bds-typography h3.bds-typography--heading{font-weight:var(--boreal-typography-font-weight-regular);font-size:var(--boreal-typography-font-size-2xl);line-height:var(--boreal-typography-line-height-2xl)}.bds-typography h4.bds-typography--heading{font-weight:var(--boreal-typography-font-weight-regular);font-size:var(--boreal-typography-font-size-xl);line-height:var(--boreal-typography-line-height-xl)}.bds-typography h5.bds-typography--heading{font-weight:var(--boreal-typography-font-weight-regular);font-size:var(--boreal-typography-font-size-lg);line-height:var(--boreal-typography-line-height-lg)}.bds-typography h6.bds-typography--heading{font-size:var(--boreal-typography-font-size-md);font-weight:var(--boreal-typography-font-weight-semibold);line-height:var(--boreal-typography-line-height-md)}.bds-typography--subheading{font-size:var(--boreal-typography-font-size-md);line-height:var(--boreal-typography-line-height-md);font-weight:var(--boreal-typography-font-weight-semibold)}.bds-typography--align-start{text-align:start}.bds-typography--align-center{text-align:center}.bds-typography--align-end{text-align:end}.bds-typography--align-inherit{text-align:inherit}.bds-typography--error{color:var(--boreal-text-danger-base)}.bds-typography--disabled{color:var(--boreal-text-disabled);pointer-events:none;cursor:not-allowed}.bds-typography--disabled .bds-typography__required-indicator{color:var(--boreal-text-danger-light)}.bds-typography--ellipsis{display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}.bds-typography--ellipsis-multiline{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;white-space:normal;width:100%}'};var BdsTypography=function(){function t(t){registerInstance(this,t);this.inheritedAttributes={};this.variant=VARIANT_TYPOGRAPHY.DISPLAY;this.size=SIZES.M;this.state=COMPONENT_STATES.DEFAULT;this.customClass="";this.element=TAG_ELEMENT.P;this.align=ALIGNMENT.START;this.ellipsis=false;this.maxLines=1;this.tooltipText="";this.required=false;this.htmlFor=undefined;this.href=null;this.target=null;this.downloadable=false;this.filename=FILENAME;this.sanitizedHref=""}t.prototype.updateSanitizedHref=function(){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(e){switch(e.label){case 0:if(!(this.getTagName==="a"&&this.href!==null))return[3,2];return[4,import("./index-noyWJ11s.js").then((function(t){return t.i}))];case 1:t=e.sent().sanitizeUrl;this.sanitizedHref=t(this.href);return[3,3];case 2:this.sanitizedHref="";e.label=3;case 3:return[2]}}))}))};t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:if(!(this.getTagName===TAG_ELEMENT.A&&this.href!==null))return[3,2];return[4,this.updateSanitizedHref()];case 1:t.sent();t.label=2;case 2:this.inheritedAttributes=__assign({},inheritAriaAttributes(this.el));return[2]}}))}))};Object.defineProperty(t.prototype,"getTagName",{get:function(){if(this.variant===VARIANT_TYPOGRAPHY.LINK)return TAG_ELEMENT.A;return this.element.toLowerCase()},enumerable:false,configurable:true});t.prototype.getVariantConfig=function(){var t;return(t=VARIANT_CONFIG[this.variant])!==null&&t!==void 0?t:{}};t.prototype.getAccessibilityTags=function(){var t=this.getVariantConfig().required,e=t===void 0?false:t;var r=["a","label"].includes(this.getTagName);return{"aria-required":this.required&&e,"aria-disabled":this.state===COMPONENT_STATES.DISABLED&&r}};t.prototype.getVariantStateStyles=function(){var t;var e=this.getVariantConfig();return t={},t["bds-typography--".concat(this.variant)]=true,t["bds-typography--align-".concat(this.align)]=true,t["bds-typography--".concat(this.state)]=!!((e===null||e===void 0?void 0:e.states)&&(e===null||e===void 0?void 0:e.states.includes(this.state))),t["bds-typography--size-".concat(this.size)]=!!((e===null||e===void 0?void 0:e.size)&&(e===null||e===void 0?void 0:e.size.includes(this.size))),t["bds-typography--required"]=!!((e===null||e===void 0?void 0:e.required)&&this.required),t["bds-typography--ellipsis"]=this.ellipsis&&this.maxLines<=1,t["bds-typography--ellipsis-multiline"]=this.ellipsis&&this.maxLines>1,t[this.customClass]=this.customClass!=="",t};t.prototype.render=function(){var t=this.getTagName;var e=__assign(__assign(__assign({},getAttributesByTag(this,t)),this.inheritedAttributes),this.getAccessibilityTags());var r=this.getVariantStateStyles();var a=this.getVariantConfig(),o=a.canUseTooltip,i=o===void 0?null:o,n=a.required,s=n===void 0?null:n;var l=this.state===COMPONENT_STATES.DISABLED;return h(Host,{key:"d29b535edeb7ede877c979ea812eb6c273affc0d",class:"bds-typography ".concat(l?"bds-typography--disabled-cursor":"")},h(t,__assign({key:"3a36a1c47026a20d9c95e4c2d38e92caaa89b072",class:r,style:{webkitLineClamp:this.maxLines}},e),h("slot",{key:"8a0ccd7824ac358e937dd6e2fb1c3eb592e27721"}),this.required&&s&&h("em",{key:"5ce4cc221efcf9d5a71bbc39dbc449a3a29c16a6",class:"bds-typography__required-indicator","aria-hidden":"true"},"*"),this.tooltipText&&i&&h("span",{key:"33dcca730b5a484aac8f6ddda383f7adb7dcee95",class:"bds-typography__info"},h("span",{key:"ff08b5e744d9584cff3b69f5eaa74238ad364e19",class:"bds-typography__info-icon bds-icon-info-circle","aria-label":this.tooltipText}),h("bds-tooltip",{key:"a88a158668a40ee3ff00ddeb4da496115e22558d"},this.tooltipText))))};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{href:[{updateSanitizedHref:0}]}},enumerable:false,configurable:true});return t}();BdsTypography.style=bdsTypographyCss();export{BdsTooltip as bds_tooltip,BdsTypography as bds_typography};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,a,t
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,a,o,t){function l(e){return e instanceof o?e:new o((function(a){a(e)}))}return new(o||(o=Promise))((function(o,r){function n(e){try{s(t.next(e))}catch(e){r(e)}}function i(e){try{s(t["throw"](e))}catch(e){r(e)}}function s(e){e.done?o(e.value):l(e.value).then(n,i)}s((t=t.apply(e,a||[])).next())}))};var __generator=this&&this.__generator||function(e,a){var o={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},t,l,r,n=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return n.next=i(0),n["throw"]=i(1),n["return"]=i(2),typeof Symbol==="function"&&(n[Symbol.iterator]=function(){return this}),n;function i(e){return function(a){return s([e,a])}}function s(i){if(t)throw new TypeError("Generator is already executing.");while(n&&(n=0,i[0]&&(o=0)),o)try{if(t=1,l&&(r=i[0]&2?l["return"]:i[0]?l["throw"]||((r=l["return"])&&r.call(l),0):l.next)&&!(r=r.call(l,i[1])).done)return r;if(l=0,r)i=[i[0]&2,r.value];switch(i[0]){case 0:case 1:r=i;break;case 4:o.label++;return{value:i[1],done:false};case 5:o.label++;l=i[1];i=[0];continue;case 7:i=o.ops.pop();o.trys.pop();continue;default:if(!(r=o.trys,r=r.length>0&&r[r.length-1])&&(i[0]===6||i[0]===2)){o=0;continue}if(i[0]===3&&(!r||i[1]>r[0]&&i[1]<r[3])){o.label=i[1];break}if(i[0]===6&&o.label<r[1]){o.label=r[1];r=i;break}if(r&&o.label<r[2]){o.label=r[2];o.ops.push(i);break}if(r[2])o.ops.pop();o.trys.pop();continue}i=a.call(e,o)}catch(e){i=[6,e];l=0}finally{t=r=0}if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:true}}};import{p as promiseResolve,H,b as bootstrapLazy}from"./index-BqJlOB6b.js";export{s as setNonce}from"./index-BqJlOB6b.js";import{g as globalScripts}from"./app-globals-DQuL1Twl.js";var patchBrowser=function(){{patchCloneNodeFix(H.prototype)}var e=import.meta.url;var a={};if(e!==""){a.resourcesUrl=new URL(".",e).href}return promiseResolve(a)};var patchCloneNodeFix=function(e){var a=e.cloneNode;e.cloneNode=function(e){if(this.nodeName==="TEMPLATE"){return a.call(this,e)}var o=a.call(this,false);var t=this.childNodes;if(e){for(var l=0;l<t.length;l++){if(t[l].nodeType!==2){o.appendChild(t[l].cloneNode(true))}}}return o}};patchBrowser().then((function(e){return __awaiter(void 0,void 0,void 0,(function(){return __generator(this,(function(a){switch(a.label){case 0:return[4,globalScripts()];case 1:a.sent();return[2,bootstrapLazy([["bds-list-menu-item",[[772,"bds-list-menu-item",{variant:[513],name:[1],disabled:[516],selected:[1540],value:[513],checkable:[516],activeItem:[516,"active-item"],href:[1],newTab:[4,"new-tab"],download:[1],currentState:[32]},null,{variant:[{checkPropsVariant:0}]}]]],["bds-radio-group",[[836,"bds-radio-group",{disabled:[516],error:[516],errorMessage:[1,"error-message"],helperText:[1,"helper-text"],info:[1],label:[1],name:[513],orientation:[513],required:[516],type:[513],value:[1025],isDisabled:[32],isInvalid:[32],checkValidity:[64],reportValidity:[64]},[[0,"bdsChange","handleRadioChange"],[0,"invalid","handleInvalid"]],{orientation:[{checkPropValues:0}],disabled:[{onDisabledChange:0}],error:[{onErrorChange:0}],value:[{onValueChange:0}]}]]],["bds-radio-card",[[260,"bds-radio-card",{value:[513],info:[1],name:[1],label:[1],checked:[1540],disabled:[516],error:[516]}]]],["bds-text-field",[[836,"bds-text-field",{name:[513],disabled:[516],required:[516],value:[1537],error:[516],errorMessage:[1,"error-message"],customValidators:[16],validationTiming:[1,"validation-timing"],type:[513],variant:[513],placeholder:[1],readOnly:[4,"readonly"],autocomplete:[1],pattern:[1],minLength:[2,"min-length"],maxLength:[2,"max-length"],label:[1],sublabel:[1],icon:[1],helperText:[1,"helper-text"],info:[1],clearable:[4],clearOnHover:[4,"clear-on-hover"],charCount:[2,"char-count"],counter:[4],customWidth:[1,"custom-width"],isDisabled:[32],focused:[32],showPassword:[32],touched:[32],dirty:[32],currentCharCount:[32],validationError:[32],validationMessage:[32],checkValidity:[64],reportValidity:[64]},null,{disabled:[{onDisabledChange:0}],type:[{checkPropValues:0}],variant:[{checkPropValues:0}],validationTiming:[{checkPropValues:0}],customValidators:[{onCustomValidatorsChange:0}],value:[{onValueChange:0}]}]]],["bds-toggle",[[576,"bds-toggle",{name:[513],disabled:[516],required:[516],info:[1],error:[516],errorMessage:[513,"error-message"],checked:[516],placement:[513],label:[513],helperText:[513,"helper-text"],value:[1],isDisabled:[32],validationError:[32],validationMessage:[32],isChecked:[32]},null,{checked:[{onCheckedChange:0}],disabled:[{onDisabledChange:0}]}]]],["bds-checkbox-card",[[836,"bds-checkbox-card",{name:[513],disabled:[516],required:[516],value:[513],label:[1],checked:[1540],indeterminate:[1540],error:[516],isDisabled:[32],isIndeterminate:[32],isChecked:[32]},null,{disabled:[{onDisabledChange:0}],indeterminate:[{onIndeterminateChange:0}],checked:[{onCheckedChange:0}]}]]],["bds-dialog",[[772,"bds-dialog",{active:[1540],preventClose:[4,"prevent-close"],height:[1],width:[1],layout:[1],contentPadding:[1,"content-padding"],backdropClose:[4,"backdrop-close"],escapeClose:[4,"escape-close"],size:[1],variant:[1],titleDialog:[1,"title-dialog"],maximizable:[4],closable:[4],open:[64],close:[64]},null,{active:[{handleIsOpenChange:0}]}]]],["bds-list-menu",[[260,"bds-list-menu",{selectionMode:[1,"selection-mode"],menuRole:[1,"menu-role"],selectControls:[4,"select-controls"],selectedValues:[32],getSelectedValues:[64],setSelectedValues:[64]},[[0,"bdsSelectItem","handleItemClick"]],{selectionMode:[{checkProps:0}],menuRole:[{checkProps:0}]}]]],["bds-popover",[[772,"bds-popover",{floatingOptions:[16],disabled:[4],width:[8],header:[4],footer:[4],closable:[4],isVisible:[32]}]]],["bds-radio",[[260,"bds-radio",{checked:[1540],disabled:[516],value:[1],name:[513],label:[1],error:[516],info:[1]}]]],["bds-radio-button",[[260,"bds-radio-button",{checked:[1540],disabled:[516],error:[516],value:[1],name:[513],label:[1],info:[1]}]]],["bds-avatar",[[0,"bds-avatar",{username:[1],variant:[1],background:[1],initialsColor:[1,"initials-color"]}]]],["bds-badge",[[260,"bds-badge",{variant:[1],disabled:[4]},null,{variant:[{checkPropValues:0}]}]]],["bds-banner",[[260,"bds-banner",{variant:[1],closable:[4],closeButtonLabel:[1,"close-button-label"],isClosing:[32],isOpen:[32],open:[64],close:[64]}]]],["bds-button-group",[[260,"bds-button-group",{size:[1],orientation:[1],label:[1],color:[1],variant:[1]},null,{size:[{validateProps:0},{propagatePropsToButtons:0}],orientation:[{validateProps:0}],color:[{validateProps:0},{propagatePropsToButtons:0}],variant:[{validateProps:0},{propagatePropsToButtons:0}]}]]],["bds-flag",[[0,"bds-flag",{alignFlag:[1,"align-flag"],callSign:[4,"call-sign"],country:[1],customFlags:[16],identifier:[1],label:[4],shape:[1],shortName:[4,"short-name"]},null,{alignFlag:[{checkPropValues:0}],identifier:[{checkPropValues:0}],shape:[{checkPropValues:0}]}]]],["bds-grid",[[260,"bds-grid",{layout:[1],rowGap:[1,"row-gap"]},null,{layout:[{checkPropValues:0}]}]]],["bds-grid-item",[[260,"bds-grid-item",{colSpan:[520,"col-span"],colSpanSm:[520,"col-span-sm"],colSpanMd:[520,"col-span-md"],colSpanLg:[520,"col-span-lg"],colSpanXl:[520,"col-span-xl"],colSpan2xl:[520,"col-span-2xl"],rowSpan:[520,"row-span"],offset:[514]},null,{colSpan:[{checkPropValues:0}],colSpanSm:[{checkPropValues:0}],colSpanMd:[{checkPropValues:0}],colSpanLg:[{checkPropValues:0}],colSpanXl:[{checkPropValues:0}],colSpan2xl:[{checkPropValues:0}],rowSpan:[{checkPropValues:0}],offset:[{checkPropValues:0}]}]]],["bds-spinner",[[0,"bds-spinner",{size:[1],label:[1]},null,{size:[{checkPropValues:0}]}]]],["bds-status",[[260,"bds-status",{state:[1],indicator:[1]},null,{state:[{checkPropValues:0}],indicator:[{checkPropValues:0}]}]]],["bds-tag",[[260,"bds-tag",{multiselect:[4],selected:[4],closeButtonLabel:[1,"close-button-label"],color:[1],readonly:[4],disabled:[4],internalSelected:[32]},null,{color:[{checkPropValues:0}],selected:[{syncSelectedFromProp:0}]}]]],["bds-divider",[[0,"bds-divider",{orientation:[513]},null,{orientation:[{checkPropValues:0}]}]]],["bds-checkbox",[[836,"bds-checkbox",{name:[513],disabled:[516],required:[516],checked:[1540],indeterminate:[1540],error:[516],value:[1],label:[1],isDisabled:[32]},null,{checked:[{onCheckedChange:0}],disabled:[{onDisabledChange:0}]}]]],["bds-button",[[324,"bds-button",{label:[1],disabled:[4],name:[1],type:[1],color:[1],variant:[1],size:[1],loading:[4],disclosure:[4],currentState:[32]},null,{type:[{checkPropValues:0}],color:[{checkPropValues:0}],variant:[{checkPropValues:0}],size:[{checkPropValues:0}]}]]],["bds-tooltip_2",[[260,"bds-typography",{variant:[513],size:[513],state:[513],customClass:[1,"custom-class"],element:[1],align:[1],ellipsis:[4],maxLines:[2,"max-lines"],tooltipText:[1,"tooltip-text"],required:[516],htmlFor:[1,"html-for"],href:[1],target:[1],downloadable:[4],filename:[1],sanitizedHref:[32]},null,{href:[{updateSanitizedHref:0}]}],[772,"bds-tooltip",{multiline:[4],disabled:[4],floatingOptions:[16],isVisible:[32]}]]]],e)]}}))}))}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var CORE_COLORS={DEFAULT:"default",PRIMARY:"primary",SUCCESS:"success",ERROR:"error"};export{CORE_COLORS as C};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var BUTTON_VARIANTS={DEFAULT:"default",OUTLINE:"outline",PLAIN:"plain"};var BUTTON_SIZES={SMALL:"sm",MEDIUM:"md",LARGE:"lg"};var BUTTON_TYPES={BUTTON:"button",SUBMIT:"submit",RESET:"reset"};export{BUTTON_SIZES as B,BUTTON_VARIANTS as a,BUTTON_TYPES as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var __extends=this&&this.__extends||function(){var n=function(t,r){n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r))n[r]=t[r]};return n(t,r)};return function(t,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");n(t,r);function i(){this.constructor=t}t.prototype=r===null?Object.create(r):(i.prototype=r.prototype,new i)}}();var formAssociatedMixin=function(n){var t=function(n){__extends(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}t.prototype.formDisabledCallback=function(n){this.isDisabled=n};return t}(n);return t};export{formAssociatedMixin as f};
|