@telesign/boreal-web-components 0.1.0-alpha.3 → 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.d.ts +11 -0
- package/components-build/bds-avatar.js +1 -0
- package/components-build/bds-badge.d.ts +11 -0
- package/components-build/bds-badge.js +1 -0
- 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.d.ts +11 -0
- package/components-build/bds-divider.js +1 -0
- package/components-build/bds-flag.js +1 -1
- package/components-build/bds-grid-item.d.ts +11 -0
- package/components-build/bds-grid-item.js +1 -0
- package/components-build/bds-grid.d.ts +11 -0
- package/components-build/bds-grid.js +1 -0
- package/components-build/bds-list-menu-item.d.ts +11 -0
- package/components-build/bds-list-menu-item.js +1 -0
- package/components-build/bds-list-menu.d.ts +11 -0
- package/components-build/bds-list-menu.js +1 -0
- 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.d.ts +11 -0
- package/components-build/bds-status.js +1 -0
- package/components-build/bds-tag.d.ts +11 -0
- package/components-build/bds-tag.js +1 -0
- package/components-build/bds-text-field.js +1 -1
- package/components-build/bds-toggle.d.ts +11 -0
- package/components-build/bds-toggle.js +1 -0
- 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-Bfazyxqi.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-DhSchGPI.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/components-build/{p-CaHOghy5.js → p-fUK0GCeC.js} +1 -1
- package/components-build/p-iq2UuV7c.js +1 -0
- package/components-build/p-kGnB15Lz.js +1 -0
- package/components-build/p-nxYzL9uu.js +1 -0
- package/custom-elements.json +4611 -891
- package/dist/boreal-web-components/boreal-web-components.esm.js +1 -1
- package/dist/boreal-web-components/boreal-web-components.js +1 -1
- package/dist/boreal-web-components/css/boreal.css +1066 -1074
- package/dist/boreal-web-components/css/global.css +403 -407
- package/dist/boreal-web-components/css/theme-connect.css +163 -164
- package/dist/boreal-web-components/css/theme-engage.css +163 -164
- package/dist/boreal-web-components/css/theme-protect.css +163 -164
- package/dist/boreal-web-components/css/theme-proximus.css +164 -165
- package/dist/boreal-web-components/p-024d90b0.system.entry.js +1 -0
- 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-19f9352d.entry.js +1 -0
- package/dist/boreal-web-components/p-277f142e.system.entry.js +1 -0
- package/dist/boreal-web-components/{p-8c57e06a.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-365e8e5c.system.entry.js +1 -0
- 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-efe57901.system.entry.js → p-48ebbfbe.system.entry.js} +1 -1
- package/dist/boreal-web-components/{p-5fa53a80.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-6629be14.entry.js +1 -0
- 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-71ed1e1d.entry.js +1 -0
- package/dist/boreal-web-components/p-732e98f1.system.entry.js +1 -0
- package/dist/boreal-web-components/p-77658a5b.system.entry.js +1 -0
- 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-7ebc67c9.entry.js +1 -0
- 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-93066db4.system.entry.js +1 -0
- package/dist/boreal-web-components/p-Bfazyxqi.js +1 -0
- package/dist/boreal-web-components/{p-D4EFsvs1.js → p-BqJlOB6b.js} +2 -2
- package/dist/boreal-web-components/p-BsZkk4oK.system.js +1 -0
- 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-CXz1RLGi.system.js +1 -0
- package/dist/boreal-web-components/p-DCKg5Cg_.system.js +2 -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-DhSchGPI.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/dist/boreal-web-components/p-RhSdMyWk.system.js +1 -0
- package/dist/boreal-web-components/{p-CaHOghy5.js → 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-d4c30d2b.entry.js +1 -0
- package/dist/boreal-web-components/p-db0c10b9.system.entry.js +1 -0
- package/dist/boreal-web-components/p-dc7d429c.entry.js +1 -0
- 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-e0a41cab.system.entry.js +1 -0
- package/dist/boreal-web-components/p-e55f2a8b.entry.js +1 -0
- package/dist/boreal-web-components/p-e7af1e1a.entry.js +1 -0
- package/dist/boreal-web-components/p-efe159aa.entry.js +1 -0
- package/dist/boreal-web-components/p-f65e9d0c.system.entry.js +1 -0
- package/dist/boreal-web-components/p-f792aa74.entry.js +1 -0
- package/dist/boreal-web-components/p-fb9a0e94.entry.js +1 -0
- package/dist/boreal-web-components/p-iq2UuV7c.js +1 -0
- package/dist/boreal-web-components/p-kGnB15Lz.js +1 -0
- package/dist/boreal-web-components/p-vzZJGcYF.system.js +1 -0
- package/dist/boreal-web-components/p-wREMI3WA.js +1 -0
- package/dist/boreal-web-components/scss/maps/_primitives.scss +404 -408
- package/dist/boreal-web-components/scss/maps/_theme-connect.scss +164 -165
- package/dist/boreal-web-components/scss/maps/_theme-engage.scss +164 -165
- package/dist/boreal-web-components/scss/maps/_theme-protect.scss +164 -165
- package/dist/boreal-web-components/scss/maps/_theme-proximus.scss +165 -166
- package/dist/boreal-web-components/scss/variables/_primitives.scss +404 -408
- package/dist/boreal-web-components/scss/variables/_theme-connect.scss +164 -165
- package/dist/boreal-web-components/scss/variables/_theme-engage.scss +164 -165
- package/dist/boreal-web-components/scss/variables/_theme-protect.scss +164 -165
- package/dist/boreal-web-components/scss/variables/_theme-proximus.scss +165 -166
- package/dist/cjs/BaseAttributes-DBBhKt7O.js +14 -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 +89 -0
- package/dist/cjs/bds-badge.cjs.entry.js +50 -0
- package/dist/cjs/bds-banner.cjs.entry.js +13 -6
- package/dist/cjs/bds-button-group.cjs.entry.js +95 -0
- package/dist/cjs/bds-button.cjs.entry.js +11 -17
- 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 +8 -7
- package/dist/cjs/bds-divider.cjs.entry.js +46 -0
- package/dist/cjs/bds-flag.cjs.entry.js +3 -3
- package/dist/cjs/bds-grid-item.cjs.entry.js +93 -0
- package/dist/cjs/bds-grid.cjs.entry.js +37 -0
- package/dist/cjs/bds-list-menu-item.cjs.entry.js +493 -0
- package/dist/cjs/bds-list-menu.cjs.entry.js +199 -0
- package/dist/cjs/bds-popover.cjs.entry.js +19 -9
- 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 +4 -4
- package/dist/cjs/bds-status.cjs.entry.js +59 -0
- package/dist/cjs/bds-tag.cjs.entry.js +140 -0
- package/dist/cjs/bds-text-field.cjs.entry.js +8 -17
- package/dist/cjs/bds-toggle.cjs.entry.js +187 -0
- package/dist/cjs/bds-tooltip_2.cjs.entry.js +321 -0
- package/dist/cjs/boreal-web-components.cjs.js +2 -2
- 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/{anchored.mixin-CnIwkaUi.js → getOffset-k4ezB-eT.js} +45 -76
- package/dist/cjs/{index-BcSjvXJk.js → index-CwYIVC9N.js} +64 -0
- package/dist/cjs/{internals-X77qKxsK.js → internals-D8x7GMfR.js} +0 -31
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/menu-BxKaEajh.js +8 -0
- package/dist/cjs/orientation-DQAIleEJ.js +8 -0
- package/dist/cjs/{states-iIYiazaM.js → states-BweP5Vpu.js} +8 -0
- package/dist/cjs/validateProps-CJe9X5x8.js +42 -0
- package/dist/collection/collection-manifest.json +16 -0
- package/dist/collection/components/actions/bds-button/bds-button.css +19 -19
- package/dist/collection/components/actions/bds-button/bds-button.js +8 -8
- 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-button-group/types/IButtonGroup.js +1 -0
- package/dist/collection/components/actions/bds-list-menu/bds-list-menu/bds-list-menu.css +51 -0
- package/dist/collection/components/actions/bds-list-menu/bds-list-menu/bds-list-menu.js +400 -0
- package/dist/collection/components/actions/bds-list-menu/bds-list-menu/types/IListMenu.js +1 -0
- 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 +87 -0
- package/dist/collection/components/actions/bds-list-menu/bds-list-menu-item/bds-list-menu-item.js +482 -0
- package/dist/collection/components/actions/bds-list-menu/bds-list-menu-item/types/IListMenuItem.js +1 -0
- package/dist/collection/components/actions/bds-list-menu/bds-list-menu-item/types/enum.js +4 -0
- package/dist/collection/components/actions/bds-list-menu/bds-list-menu-item/types/types.js +1 -0
- package/dist/collection/components/actions/bds-toggle/bds-toggle.css +120 -0
- package/dist/collection/components/actions/bds-toggle/bds-toggle.js +544 -0
- package/dist/collection/components/actions/bds-toggle/types/IEventChange.js +1 -0
- package/dist/collection/components/actions/bds-toggle/types/IToggle.js +1 -0
- package/dist/collection/components/actions/bds-toggle/types/enum.js +4 -0
- package/dist/collection/components/actions/bds-toggle/types/index.js +4 -0
- package/dist/collection/components/actions/bds-toggle/types/types.js +1 -0
- package/dist/collection/components/feedback/bds-badge/bds-badge.css +76 -0
- package/dist/collection/components/feedback/bds-badge/bds-badge.js +120 -0
- package/dist/collection/components/feedback/bds-badge/types/IBadge.js +1 -0
- package/dist/collection/components/feedback/bds-badge/types/enum.js +5 -0
- package/dist/collection/components/feedback/bds-banner/bds-banner.css +1 -2
- package/dist/collection/components/feedback/bds-banner/bds-banner.js +30 -6
- package/dist/collection/components/feedback/bds-spinner/bds-spinner.css +7 -8
- package/dist/collection/components/feedback/bds-spinner/bds-spinner.js +1 -1
- package/dist/collection/components/feedback/bds-status/bds-status.css +101 -0
- package/dist/collection/components/feedback/bds-status/bds-status.js +122 -0
- package/dist/collection/components/feedback/bds-status/types/IStatus.js +1 -0
- package/dist/collection/components/feedback/bds-status/types/enum.js +5 -0
- package/dist/collection/components/feedback/bds-status/types/types.js +1 -0
- package/dist/collection/components/feedback/bds-tag/bds-tag.css +202 -0
- package/dist/collection/components/feedback/bds-tag/bds-tag.js +375 -0
- package/dist/collection/components/feedback/bds-tag/types/ITag.js +1 -0
- package/dist/collection/components/feedback/bds-tag/types/enum.js +10 -0
- package/dist/collection/components/feedback/bds-tag/types/index.js +3 -0
- package/dist/collection/components/feedback/bds-tag/types/types.js +1 -0
- 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/bds-divider.css +44 -0
- package/dist/collection/components/helpers/bds-divider/bds-divider.js +88 -0
- package/dist/collection/components/helpers/bds-divider/types/IDivider.js +1 -0
- package/dist/collection/components/helpers/bds-divider/types/enum.js +4 -0
- package/dist/collection/components/helpers/bds-divider/types/types.js +1 -0
- package/dist/collection/components/images-icons/bds-avatar/bds-avatar.css +52 -0
- package/dist/collection/components/images-icons/bds-avatar/bds-avatar.js +219 -0
- package/dist/collection/components/images-icons/bds-avatar/types/IAvatar.js +1 -0
- package/dist/collection/components/images-icons/bds-avatar/types/enum.js +5 -0
- package/dist/collection/components/images-icons/bds-avatar/types/index.js +3 -0
- package/dist/collection/components/images-icons/bds-avatar/types/types.js +1 -0
- package/dist/collection/components/layouts/bds-grid/grid/bds-grid.css +57 -0
- package/dist/collection/components/layouts/bds-grid/grid/bds-grid.js +100 -0
- package/dist/collection/components/layouts/bds-grid/grid/types/IGrid.js +1 -0
- package/dist/collection/components/layouts/bds-grid/grid/types/enum.js +4 -0
- package/dist/collection/components/layouts/bds-grid/grid/types/index.js +3 -0
- package/dist/collection/components/layouts/bds-grid/grid/types/types.js +1 -0
- package/dist/collection/components/layouts/bds-grid/grid-item/bds-grid-item.css +70 -0
- package/dist/collection/components/layouts/bds-grid/grid-item/bds-grid-item.js +306 -0
- package/dist/collection/components/layouts/bds-grid/grid-item/types/IGridItem.js +1 -0
- package/dist/collection/components/layouts/bds-grid/grid-item/types/enum.js +10 -0
- package/dist/collection/components/layouts/bds-grid/grid-item/types/index.js +3 -0
- package/dist/collection/components/layouts/bds-grid/grid-item/types/types.js +1 -0
- package/dist/collection/components/overlays/bds-dialog/bds-dialog.js +4 -3
- package/dist/collection/components/overlays/bds-popover/bds-popover.css +16 -2
- package/dist/collection/components/overlays/bds-popover/bds-popover.js +12 -4
- package/dist/collection/components/overlays/bds-popover/constants/Offset.js +1 -0
- package/dist/collection/components/overlays/bds-tooltip/bds-tooltip.css +2 -13
- package/dist/collection/components/overlays/bds-tooltip/bds-tooltip.js +6 -4
- package/dist/collection/components/overlays/bds-tooltip/constants/Offset.js +1 -0
- package/dist/collection/components/titles-text/bds-typography/bds-typography.css +9 -0
- package/dist/collection/components/titles-text/bds-typography/bds-typography.js +20 -19
- package/dist/collection/components/titles-text/bds-typography/utils/bds-typography-utils.js +2 -2
- package/dist/collection/css/boreal.css +1066 -1074
- package/dist/collection/css/global.css +403 -407
- package/dist/collection/css/theme-connect.css +163 -164
- package/dist/collection/css/theme-engage.css +163 -164
- package/dist/collection/css/theme-protect.css +163 -164
- package/dist/collection/css/theme-proximus.css +164 -165
- package/dist/collection/mixins/anchored.mixin.js +16 -3
- package/dist/collection/mixins/index.js +2 -0
- package/dist/collection/mixins/links.mixin.js +152 -0
- package/dist/collection/mixins/menu-behavior.mixin.js +119 -0
- package/dist/collection/scss/maps/_primitives.scss +404 -408
- package/dist/collection/scss/maps/_theme-connect.scss +164 -165
- package/dist/collection/scss/maps/_theme-engage.scss +164 -165
- package/dist/collection/scss/maps/_theme-protect.scss +164 -165
- package/dist/collection/scss/maps/_theme-proximus.scss +165 -166
- package/dist/collection/scss/variables/_primitives.scss +404 -408
- package/dist/collection/scss/variables/_theme-connect.scss +164 -165
- package/dist/collection/scss/variables/_theme-engage.scss +164 -165
- package/dist/collection/scss/variables/_theme-protect.scss +164 -165
- package/dist/collection/scss/variables/_theme-proximus.scss +165 -166
- package/dist/collection/services/floating/positioning.service.js +1 -1
- package/dist/collection/types/IFormProps.js +1 -0
- package/dist/collection/types/index.js +5 -0
- package/dist/collection/types/links.js +1 -0
- package/dist/collection/types/menu.js +8 -0
- package/dist/collection/types/orientation.js +4 -0
- package/dist/collection/types/position.js +6 -2
- package/dist/collection/utils/constants/common/Keys.js +10 -12
- package/dist/collection/utils/helpers/overlays/getOffset.js +13 -0
- package/dist/collection/utils/helpers/validateProps.js +21 -0
- package/dist/collection/utils/index.js +2 -1
- package/dist/collection/utils/menu/index.js +1 -0
- package/dist/collection/utils/menu/menu-item.utils.js +82 -0
- package/dist/collection/utils/{__test__ → testing}/helpers.js +10 -0
- package/dist/collection/utils/{__test__ → testing}/index.js +0 -2
- package/dist/collection/utils/testing/mocks/console.js +30 -0
- package/dist/collection/utils/testing/mocks/index.js +4 -0
- package/dist/css/boreal.css +1066 -1074
- package/dist/css/global.css +403 -407
- package/dist/css/theme-connect.css +163 -164
- package/dist/css/theme-engage.css +163 -164
- package/dist/css/theme-protect.css +163 -164
- package/dist/css/theme-proximus.css +164 -165
- package/dist/esm/BaseAttributes-DhSchGPI.js +12 -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 +87 -0
- package/dist/esm/bds-badge.entry.js +48 -0
- package/dist/esm/bds-banner.entry.js +13 -6
- package/dist/esm/bds-button-group.entry.js +93 -0
- package/dist/esm/bds-button.entry.js +9 -15
- package/dist/esm/bds-checkbox-card.entry.js +119 -0
- package/dist/esm/bds-checkbox.entry.js +12 -5
- package/dist/esm/bds-dialog.entry.js +8 -7
- package/dist/esm/bds-divider.entry.js +44 -0
- package/dist/esm/bds-flag.entry.js +3 -3
- package/dist/esm/bds-grid-item.entry.js +91 -0
- package/dist/esm/bds-grid.entry.js +35 -0
- package/dist/esm/bds-list-menu-item.entry.js +491 -0
- package/dist/esm/bds-list-menu.entry.js +197 -0
- package/dist/esm/bds-popover.entry.js +18 -8
- 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 +4 -4
- package/dist/esm/bds-status.entry.js +57 -0
- package/dist/esm/bds-tag.entry.js +138 -0
- package/dist/esm/bds-text-field.entry.js +6 -15
- package/dist/esm/bds-toggle.entry.js +185 -0
- package/dist/esm/bds-tooltip_2.entry.js +318 -0
- package/dist/esm/boreal-web-components.js +3 -3
- 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/{anchored.mixin-Y3MkGc2X.js → getOffset-BYS3c13B.js} +43 -75
- package/dist/esm/{index-D4EFsvs1.js → index-BqJlOB6b.js} +64 -0
- package/dist/esm/{internals-Dy7QKP9e.js → internals-DfaYciGa.js} +1 -31
- package/dist/esm/loader.js +3 -3
- package/dist/esm/menu-dz9-Q2N8.js +6 -0
- package/dist/esm/orientation-CPvuMm5C.js +6 -0
- package/dist/esm/{states-BhTPNsBb.js → states-Bfazyxqi.js} +8 -1
- package/dist/esm/validateProps-kGnB15Lz.js +39 -0
- package/dist/esm-es5/BaseAttributes-DhSchGPI.js +1 -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 -0
- package/dist/esm-es5/bds-badge.entry.js +1 -0
- 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 -0
- package/dist/esm-es5/bds-flag.entry.js +1 -1
- package/dist/esm-es5/bds-grid-item.entry.js +1 -0
- package/dist/esm-es5/bds-grid.entry.js +1 -0
- package/dist/esm-es5/bds-list-menu-item.entry.js +1 -0
- package/dist/esm-es5/bds-list-menu.entry.js +1 -0
- 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 -0
- package/dist/esm-es5/bds-tag.entry.js +1 -0
- package/dist/esm-es5/bds-text-field.entry.js +1 -1
- package/dist/esm-es5/bds-toggle.entry.js +1 -0
- package/dist/esm-es5/bds-tooltip_2.entry.js +1 -0
- 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/index-BqJlOB6b.js +2 -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/esm-es5/states-Bfazyxqi.js +1 -0
- package/dist/esm-es5/validateProps-kGnB15Lz.js +1 -0
- package/dist/scss/maps/_primitives.scss +404 -408
- package/dist/scss/maps/_theme-connect.scss +164 -165
- package/dist/scss/maps/_theme-engage.scss +164 -165
- package/dist/scss/maps/_theme-protect.scss +164 -165
- package/dist/scss/maps/_theme-proximus.scss +165 -166
- package/dist/scss/variables/_primitives.scss +404 -408
- package/dist/scss/variables/_theme-connect.scss +164 -165
- package/dist/scss/variables/_theme-engage.scss +164 -165
- package/dist/scss/variables/_theme-protect.scss +164 -165
- package/dist/scss/variables/_theme-proximus.scss +165 -166
- 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 +74 -0
- 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 +122 -0
- package/dist/types/components/actions/bds-list-menu/bds-list-menu-item/types/IListMenuItem.d.ts +13 -0
- package/dist/types/components/actions/bds-list-menu/bds-list-menu-item/types/enum.d.ts +5 -0
- package/dist/types/components/actions/bds-list-menu/bds-list-menu-item/types/types.d.ts +3 -0
- package/dist/types/components/actions/bds-toggle/bds-toggle.d.ts +91 -0
- package/dist/types/components/actions/bds-toggle/types/IEventChange.d.ts +5 -0
- package/dist/types/components/actions/bds-toggle/types/IToggle.d.ts +12 -0
- package/dist/types/components/actions/bds-toggle/types/enum.d.ts +5 -0
- package/dist/types/components/actions/bds-toggle/types/index.d.ts +5 -0
- package/dist/types/components/actions/bds-toggle/types/types.d.ts +3 -0
- package/dist/types/components/feedback/bds-badge/bds-badge.d.ts +31 -0
- package/dist/types/components/feedback/bds-badge/types/IBadge.d.ts +6 -0
- package/dist/types/components/feedback/bds-badge/types/enum.d.ts +9 -0
- package/dist/types/components/feedback/bds-banner/bds-banner.d.ts +8 -4
- package/dist/types/components/feedback/bds-status/bds-status.d.ts +26 -0
- package/dist/types/components/feedback/bds-status/types/IStatus.d.ts +7 -0
- package/dist/types/components/feedback/bds-status/types/enum.d.ts +6 -0
- package/dist/types/components/feedback/bds-status/types/types.d.ts +3 -0
- package/dist/types/components/feedback/bds-tag/bds-tag.d.ts +71 -0
- package/dist/types/components/feedback/bds-tag/types/ITag.d.ts +13 -0
- package/dist/types/components/feedback/bds-tag/types/enum.d.ts +11 -0
- package/dist/types/components/feedback/bds-tag/types/index.d.ts +4 -0
- package/dist/types/components/feedback/bds-tag/types/types.d.ts +8 -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-flag/bds-flag.d.ts +3 -4
- 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/helpers/bds-divider/bds-divider.d.ts +26 -0
- package/dist/types/components/helpers/bds-divider/types/IDivider.d.ts +5 -0
- package/dist/types/components/helpers/bds-divider/types/enum.d.ts +5 -0
- package/dist/types/components/helpers/bds-divider/types/types.d.ts +3 -0
- package/dist/types/components/images-icons/bds-avatar/bds-avatar.d.ts +51 -0
- package/dist/types/components/images-icons/bds-avatar/types/IAvatar.d.ts +9 -0
- package/dist/types/components/images-icons/bds-avatar/types/enum.d.ts +6 -0
- package/dist/types/components/images-icons/bds-avatar/types/index.d.ts +4 -0
- package/dist/types/components/images-icons/bds-avatar/types/types.d.ts +3 -0
- package/dist/types/components/layouts/bds-grid/grid/bds-grid.d.ts +19 -0
- package/dist/types/components/layouts/bds-grid/grid/types/IGrid.d.ts +6 -0
- package/dist/types/components/layouts/bds-grid/grid/types/enum.d.ts +5 -0
- package/dist/types/components/layouts/bds-grid/grid/types/index.d.ts +4 -0
- package/dist/types/components/layouts/bds-grid/grid/types/types.d.ts +3 -0
- package/dist/types/components/layouts/bds-grid/grid-item/bds-grid-item.d.ts +31 -0
- package/dist/types/components/layouts/bds-grid/grid-item/types/IGridItem.d.ts +12 -0
- package/dist/types/components/layouts/bds-grid/grid-item/types/enum.d.ts +11 -0
- package/dist/types/components/layouts/bds-grid/grid-item/types/index.d.ts +4 -0
- package/dist/types/components/layouts/bds-grid/grid-item/types/types.d.ts +3 -0
- package/dist/types/components/overlays/bds-dialog/bds-dialog.d.ts +2 -2
- package/dist/types/components/overlays/bds-popover/bds-popover.d.ts +1 -0
- package/dist/types/components/overlays/bds-popover/constants/Offset.d.ts +2 -0
- package/dist/types/components/overlays/bds-tooltip/bds-tooltip.d.ts +1 -0
- package/dist/types/components/overlays/bds-tooltip/constants/Offset.d.ts +2 -0
- package/dist/types/components/titles-text/bds-typography/bds-typography.d.ts +9 -9
- package/dist/types/components/titles-text/bds-typography/types/ITypography.d.ts +2 -2
- package/dist/types/components/titles-text/bds-typography/utils/bds-typography-utils.d.ts +1 -1
- package/dist/types/components.d.ts +2542 -450
- package/dist/types/mixins/anchored.mixin.d.ts +5 -0
- package/dist/types/mixins/index.d.ts +2 -0
- package/dist/types/mixins/links.mixin.d.ts +85 -0
- package/dist/types/mixins/menu-behavior.mixin.d.ts +95 -0
- package/dist/types/types/IFormProps.d.ts +25 -0
- package/dist/types/types/index.d.ts +5 -0
- package/dist/types/types/links.d.ts +14 -0
- package/dist/types/types/menu.d.ts +16 -0
- package/dist/types/types/orientation.d.ts +6 -0
- package/dist/types/types/position.d.ts +6 -2
- package/dist/types/utils/constants/common/Keys.d.ts +12 -14
- package/dist/types/utils/helpers/overlays/getOffset.d.ts +9 -0
- package/dist/types/utils/helpers/validateProps.d.ts +11 -0
- package/dist/types/utils/index.d.ts +2 -1
- package/dist/types/utils/menu/index.d.ts +2 -0
- package/dist/types/utils/menu/menu-item.utils.d.ts +50 -0
- package/dist/types/utils/{__test__ → testing}/helpers.d.ts +8 -0
- package/dist/types/utils/{__test__ → testing}/index.d.ts +0 -2
- package/dist/types/utils/{__test__/backdrop-mock.d.ts → testing/mocks/backdrop.d.ts} +1 -1
- package/dist/types/utils/testing/mocks/console.d.ts +17 -0
- package/dist/types/utils/{__test__/mocks/ElementInternals.d.ts → testing/mocks/elementInternals.d.ts} +1 -1
- package/dist/types/utils/testing/mocks/index.d.ts +5 -0
- package/dist/types/utils/{__test__/popover-mock.d.ts → testing/mocks/popover.d.ts} +1 -1
- package/package.json +1 -1
- package/components-build/p-B6R9EVXK.js +0 -1
- package/components-build/p-BSpJ_e9f.js +0 -1
- package/components-build/p-BYEAJCas.js +0 -1
- package/components-build/p-BhTPNsBb.js +0 -1
- package/components-build/p-CYojP4vI.js +0 -1
- package/components-build/p-D5omSME4.js +0 -1
- package/components-build/p-vfAIdwy0.js +0 -1
- package/dist/boreal-web-components/p-07a933df.entry.js +0 -1
- package/dist/boreal-web-components/p-1bb2b33f.entry.js +0 -1
- package/dist/boreal-web-components/p-1fccea3f.system.entry.js +0 -1
- package/dist/boreal-web-components/p-20af732b.system.entry.js +0 -1
- package/dist/boreal-web-components/p-22378341.system.entry.js +0 -1
- package/dist/boreal-web-components/p-39c26e58.entry.js +0 -1
- package/dist/boreal-web-components/p-6210d025.entry.js +0 -1
- package/dist/boreal-web-components/p-6de2b44c.system.entry.js +0 -1
- package/dist/boreal-web-components/p-91b9e94e.entry.js +0 -1
- package/dist/boreal-web-components/p-9e06910d.system.entry.js +0 -1
- package/dist/boreal-web-components/p-BIJhHSAt.system.js +0 -1
- package/dist/boreal-web-components/p-BKRyWlfr.js +0 -1
- package/dist/boreal-web-components/p-BhTPNsBb.js +0 -1
- package/dist/boreal-web-components/p-BkDQsB4R.system.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-DoDeP7KR.system.js +0 -1
- package/dist/boreal-web-components/p-Dtp4O0H2.system.js +0 -1
- package/dist/boreal-web-components/p-Dy7QKP9e.js +0 -1
- package/dist/boreal-web-components/p-GjKJvOVG.system.js +0 -2
- package/dist/boreal-web-components/p-ac64d4a5.system.entry.js +0 -1
- package/dist/boreal-web-components/p-b61fe06c.entry.js +0 -1
- package/dist/boreal-web-components/p-cdc87437.entry.js +0 -1
- package/dist/boreal-web-components/p-d8ec8557.system.entry.js +0 -1
- package/dist/boreal-web-components/p-ea889727.entry.js +0 -1
- package/dist/boreal-web-components/p-fa327346.system.entry.js +0 -1
- package/dist/boreal-web-components/p-fc2cb919.entry.js +0 -1
- package/dist/boreal-web-components/p-sDZFaZMN.system.js +0 -1
- package/dist/boreal-web-components/p-vfAIdwy0.js +0 -1
- package/dist/cjs/bds-tooltip.cjs.entry.js +0 -152
- package/dist/cjs/bds-typography.cjs.entry.js +0 -168
- package/dist/cjs/validateProps-BNOBk1Xs.js +0 -20
- package/dist/collection/utils/__test__/mocks/index.js +0 -1
- package/dist/esm/bds-tooltip.entry.js +0 -150
- package/dist/esm/bds-typography.entry.js +0 -166
- package/dist/esm/validateProps-vfAIdwy0.js +0 -18
- package/dist/esm-es5/anchored.mixin-Y3MkGc2X.js +0 -1
- package/dist/esm-es5/bds-tooltip.entry.js +0 -1
- package/dist/esm-es5/bds-typography.entry.js +0 -1
- package/dist/esm-es5/enum-C8mRvnTA.js +0 -1
- package/dist/esm-es5/index-D4EFsvs1.js +0 -2
- package/dist/esm-es5/internals-Dy7QKP9e.js +0 -1
- package/dist/esm-es5/states-BhTPNsBb.js +0 -1
- package/dist/esm-es5/validateProps-vfAIdwy0.js +0 -1
- package/dist/types/utils/__test__/mocks/index.d.ts +0 -2
- /package/dist/collection/utils/{__test__ → testing}/constants.js +0 -0
- /package/dist/collection/utils/{__test__ → testing}/fixtures.js +0 -0
- /package/dist/collection/utils/{__test__/backdrop-mock.js → testing/mocks/backdrop.js} +0 -0
- /package/dist/collection/utils/{__test__/mocks/ElementInternals.js → testing/mocks/elementInternals.js} +0 -0
- /package/dist/collection/utils/{__test__/popover-mock.js → testing/mocks/popover.js} +0 -0
- /package/dist/types/utils/{__test__ → testing}/constants.d.ts +0 -0
- /package/dist/types/utils/{__test__ → testing}/fixtures.d.ts +0 -0
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
import { M as Mixin, r as registerInstance, c as createEvent, h, a as Host, g as getElement } from './index-BqJlOB6b.js';
|
|
2
|
+
import { f as formAssociatedMixin } from './form-associated.mixin-C4HM8wQe.js';
|
|
3
|
+
import { a as inheritAriaAttributes } from './attributes-U9yfbs7i.js';
|
|
4
|
+
import { s as setFormValue } from './internals-DfaYciGa.js';
|
|
5
|
+
import { c as createId } from './BaseAttributes-DhSchGPI.js';
|
|
6
|
+
|
|
7
|
+
const TOGGLE_PLACEMENT = {
|
|
8
|
+
LEFT: 'left',
|
|
9
|
+
RIGHT: 'right',
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
const bdsToggleCss = () => `@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)}`;
|
|
13
|
+
|
|
14
|
+
const BdsToggle = class extends Mixin(formAssociatedMixin) {
|
|
15
|
+
constructor(hostRef) {
|
|
16
|
+
super();
|
|
17
|
+
registerInstance(this, hostRef);
|
|
18
|
+
this.valueChange = createEvent(this, "valueChange");
|
|
19
|
+
this.bdsChange = createEvent(this, "bdsChange");
|
|
20
|
+
if (hostRef.$hostElement$["s-ei"]) {
|
|
21
|
+
this.internals = hostRef.$hostElement$["s-ei"];
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
this.internals = hostRef.$hostElement$.attachInternals();
|
|
25
|
+
hostRef.$hostElement$["s-ei"] = this.internals;
|
|
26
|
+
}
|
|
27
|
+
this.inheritedAttributes = {};
|
|
28
|
+
/** Disables the control. Defaults to `false`. */
|
|
29
|
+
this.disabled = false;
|
|
30
|
+
/** Marks the control as required for form submission. Defaults to `false`. */
|
|
31
|
+
this.required = false;
|
|
32
|
+
/** Tooltip content attached to the label. Rendered via `bds-typography` `tooltipText` prop. */
|
|
33
|
+
this.info = '';
|
|
34
|
+
/** When `true`, applies the error visual state. */
|
|
35
|
+
this.error = false;
|
|
36
|
+
/** Message shown below the input when `error` is `true`. Replaces `helperText`. */
|
|
37
|
+
this.errorMessage = '';
|
|
38
|
+
// ---------------------------------------------------------------------------
|
|
39
|
+
// Props
|
|
40
|
+
// ---------------------------------------------------------------------------
|
|
41
|
+
/** Whether the toggle is on. Defaults to `false`. */
|
|
42
|
+
this.checked = false;
|
|
43
|
+
/**
|
|
44
|
+
* Position of the label relative to the switch.
|
|
45
|
+
* Accepts `TOGGLE_PLACEMENT` values. Defaults to `TOGGLE_PLACEMENT.LEFT`.
|
|
46
|
+
*/
|
|
47
|
+
this.placement = TOGGLE_PLACEMENT.LEFT;
|
|
48
|
+
/** Label displayed next to the toggle. Defaults to `""`. */
|
|
49
|
+
this.label = '';
|
|
50
|
+
/** Help text displayed below the toggle. Defaults to `""`. */
|
|
51
|
+
this.helperText = '';
|
|
52
|
+
/**
|
|
53
|
+
* Value submitted with the form data when checked.
|
|
54
|
+
* Behaves like the `value` attribute of a native `<input type="checkbox">`. Defaults to `"on"`.
|
|
55
|
+
*/
|
|
56
|
+
this.value = 'on';
|
|
57
|
+
this._id = createId('bds-toggle');
|
|
58
|
+
// ---------------------------------------------------------------------------
|
|
59
|
+
// State
|
|
60
|
+
// ---------------------------------------------------------------------------
|
|
61
|
+
/** Internal mirror of the `disabled` prop, kept in sync via `@Watch` and `formDisabledCallback`. */
|
|
62
|
+
this.isDisabled = false;
|
|
63
|
+
/** `true` when the last triggered validation run returned invalid. Drives the error visual state. */
|
|
64
|
+
this.validationError = false;
|
|
65
|
+
/** Error message from the last failed validator. Shown in the footer when `validationError` is `true`. */
|
|
66
|
+
this.validationMessage = '';
|
|
67
|
+
/** Local mirror of the `checked` prop, kept in sync via `@Watch` and `formStateRestoreCallback`. */
|
|
68
|
+
this.isChecked = false;
|
|
69
|
+
this.handleClick = () => this.toggle();
|
|
70
|
+
this.handleKeyDown = (e) => {
|
|
71
|
+
if (e.key === ' ' || e.key === 'Enter') {
|
|
72
|
+
e.preventDefault();
|
|
73
|
+
this.toggle();
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
this.handleInvalid = (e) => {
|
|
77
|
+
e.preventDefault();
|
|
78
|
+
this.validate();
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
// ---------------------------------------------------------------------------
|
|
82
|
+
// Lifecycle
|
|
83
|
+
// ---------------------------------------------------------------------------
|
|
84
|
+
componentWillLoad() {
|
|
85
|
+
this.isChecked = this.checked || false;
|
|
86
|
+
this.isDisabled = this.disabled || false;
|
|
87
|
+
this.inheritedAttributes = { ...inheritAriaAttributes(this.el) };
|
|
88
|
+
this.syncFormValue();
|
|
89
|
+
}
|
|
90
|
+
// ---------------------------------------------------------------------------
|
|
91
|
+
// Watchers
|
|
92
|
+
// ---------------------------------------------------------------------------
|
|
93
|
+
onCheckedChange(newValue) {
|
|
94
|
+
this.isChecked = newValue;
|
|
95
|
+
this.syncFormValue();
|
|
96
|
+
}
|
|
97
|
+
onDisabledChange(next) {
|
|
98
|
+
this.isDisabled = next;
|
|
99
|
+
}
|
|
100
|
+
// ---------------------------------------------------------------------------
|
|
101
|
+
// Form-associated callbacks
|
|
102
|
+
// ---------------------------------------------------------------------------
|
|
103
|
+
formAssociatedCallback() {
|
|
104
|
+
this.syncFormValue();
|
|
105
|
+
}
|
|
106
|
+
formDisabledCallback(disabled) {
|
|
107
|
+
this.isDisabled = disabled;
|
|
108
|
+
}
|
|
109
|
+
formResetCallback() {
|
|
110
|
+
this.isChecked = false;
|
|
111
|
+
this.internals.setValidity({});
|
|
112
|
+
setFormValue(this.internals, null);
|
|
113
|
+
}
|
|
114
|
+
formStateRestoreCallback(state, _mode) {
|
|
115
|
+
this.isChecked = state === this.value;
|
|
116
|
+
this.internals.setValidity({});
|
|
117
|
+
this.syncFormValue();
|
|
118
|
+
}
|
|
119
|
+
// ---------------------------------------------------------------------------
|
|
120
|
+
// Private helpers
|
|
121
|
+
// ---------------------------------------------------------------------------
|
|
122
|
+
syncFormValue() {
|
|
123
|
+
setFormValue(this.internals, this.isChecked ? this.value : null);
|
|
124
|
+
}
|
|
125
|
+
validate() {
|
|
126
|
+
if (!this.isDisabled && this.required && !this.isChecked) {
|
|
127
|
+
const input = this.el.querySelector('input');
|
|
128
|
+
this.validationError = true;
|
|
129
|
+
this.validationMessage = 'This field is required';
|
|
130
|
+
this.internals.setValidity({ valueMissing: true }, this.validationMessage, input ?? this.el);
|
|
131
|
+
}
|
|
132
|
+
else {
|
|
133
|
+
this.validationError = false;
|
|
134
|
+
this.validationMessage = '';
|
|
135
|
+
this.internals.setValidity({});
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
toggle() {
|
|
139
|
+
if (this.isDisabled)
|
|
140
|
+
return;
|
|
141
|
+
this.isChecked = !this.isChecked;
|
|
142
|
+
this.syncFormValue();
|
|
143
|
+
this.validate();
|
|
144
|
+
this.valueChange.emit(this.isChecked);
|
|
145
|
+
this.bdsChange.emit({ checked: this.isChecked, value: this.value });
|
|
146
|
+
}
|
|
147
|
+
get containerClasses() {
|
|
148
|
+
return {
|
|
149
|
+
[`bds-toggle__container`]: true,
|
|
150
|
+
[`bds-toggle__container--inverse`]: this.placement === TOGGLE_PLACEMENT.RIGHT,
|
|
151
|
+
[`bds-toggle__container--checked`]: this.isChecked,
|
|
152
|
+
[`bds-toggle__container--disabled`]: this.isDisabled,
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
get canShowLabel() {
|
|
156
|
+
return this.label !== undefined && this.label.trim() !== '' && this.label !== undefined && this.label !== null;
|
|
157
|
+
}
|
|
158
|
+
// ---------------------------------------------------------------------------
|
|
159
|
+
// Render
|
|
160
|
+
// ---------------------------------------------------------------------------
|
|
161
|
+
render() {
|
|
162
|
+
const blockClass = 'bds-toggle';
|
|
163
|
+
const effectiveError = this.error || this.validationError;
|
|
164
|
+
const typographyState = this.isDisabled ? 'disabled' : effectiveError ? 'error' : 'default';
|
|
165
|
+
const helperContent = this.error && this.errorMessage !== ''
|
|
166
|
+
? this.errorMessage
|
|
167
|
+
: this.validationError && this.validationMessage !== ''
|
|
168
|
+
? this.validationMessage
|
|
169
|
+
: this.helperText;
|
|
170
|
+
return (h(Host, { key: 'b5d27825358eaadb5cbca86e48488350e6099d8f', ...this.inheritedAttributes, onClick: this.handleClick, onKeyDown: this.handleKeyDown, class: blockClass }, h("div", { key: '9b7bb4c4551beb61ed72c9ee4a4d7ee14e746c4e', part: "container", class: this.containerClasses }, this.canShowLabel && (h("bds-typography", { key: 'a95e1b66d8452b983002348b9456aa0c3674b202', variant: "label", class: `${blockClass}__label`, htmlFor: this._id, required: this.required, tooltipText: this.info }, this.label)), h("label", { key: '954125135521cd6e65c2e6c3dfa41216e6f52dd3', class: `${blockClass}__switch`, htmlFor: this._id, onClick: e => e.preventDefault() }, h("input", { key: 'c3e0ee266aba0bd6e8ca7fb2d3efaeb412161806', class: `${blockClass}__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: `${blockClass}__slider ${blockClass}__slider--round` }))), helperContent !== '' && (h("bds-typography", { key: '3e5645d234edc1f3efe7805260def2c74bc7cd44', class: `${blockClass}__helper-text`, variant: "helper", state: typographyState, onClick: e => e.stopPropagation() }, helperContent))));
|
|
171
|
+
}
|
|
172
|
+
static get formAssociated() { return true; }
|
|
173
|
+
get el() { return getElement(this); }
|
|
174
|
+
static get watchers() { return {
|
|
175
|
+
"checked": [{
|
|
176
|
+
"onCheckedChange": 0
|
|
177
|
+
}],
|
|
178
|
+
"disabled": [{
|
|
179
|
+
"onDisabledChange": 0
|
|
180
|
+
}]
|
|
181
|
+
}; }
|
|
182
|
+
};
|
|
183
|
+
BdsToggle.style = bdsToggleCss();
|
|
184
|
+
|
|
185
|
+
export { BdsToggle as bds_toggle };
|
|
@@ -0,0 +1,318 @@
|
|
|
1
|
+
import { M as Mixin, r as registerInstance, h, a as Host, g as getElement } from './index-BqJlOB6b.js';
|
|
2
|
+
import { a as anchoredMixin, g as getOffset } from './getOffset-BYS3c13B.js';
|
|
3
|
+
import { C as COMPONENT_STATES } from './states-Bfazyxqi.js';
|
|
4
|
+
import { a as inheritAriaAttributes } from './attributes-U9yfbs7i.js';
|
|
5
|
+
import './Logger-iq2UuV7c.js';
|
|
6
|
+
import './floating.mixin-DCXSEEVH.js';
|
|
7
|
+
import './Keys-DlYG-OVB.js';
|
|
8
|
+
|
|
9
|
+
const ALIGNMENT = {
|
|
10
|
+
START: 'start'};
|
|
11
|
+
|
|
12
|
+
const SIZES = {
|
|
13
|
+
XS: 'xs',
|
|
14
|
+
S: 'sm',
|
|
15
|
+
M: 'md',
|
|
16
|
+
L: 'lg',
|
|
17
|
+
XL: 'xl',
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const OFFSET = 4;
|
|
21
|
+
|
|
22
|
+
const bdsTooltipCss = () => `@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)}`;
|
|
23
|
+
|
|
24
|
+
const BdsTooltip = class extends Mixin(anchoredMixin) {
|
|
25
|
+
constructor(hostRef) {
|
|
26
|
+
super();
|
|
27
|
+
registerInstance(this, hostRef);
|
|
28
|
+
/**
|
|
29
|
+
* If true, allows multiline content in the tooltip.
|
|
30
|
+
* @default false
|
|
31
|
+
*/
|
|
32
|
+
this.multiline = false;
|
|
33
|
+
/**
|
|
34
|
+
* If true, disables the tooltip.
|
|
35
|
+
* @default false
|
|
36
|
+
*/
|
|
37
|
+
this.disabled = false;
|
|
38
|
+
/**
|
|
39
|
+
* Override default options for the floating mixin.
|
|
40
|
+
* This can be overridden by passing a different object to the `floatingOptions` prop.
|
|
41
|
+
*/
|
|
42
|
+
this.floatingOptions = {};
|
|
43
|
+
this.isVisible = false;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Returns the resolved options for the floating mixin, merging `floatingOptions`
|
|
47
|
+
* prop values with their defaults.
|
|
48
|
+
*
|
|
49
|
+
* @returns {FloatingMixinOptions} Resolved configuration used by the anchored mixin
|
|
50
|
+
* to position the tooltip.
|
|
51
|
+
* @override anchoredMixin.options
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* // floatingOptions = { placement: 'top', hideArrow: true }
|
|
55
|
+
* this.options
|
|
56
|
+
* return { placement: 'top', offset: 8, arrow: undefined, strategy: 'fixed' }
|
|
57
|
+
*/
|
|
58
|
+
get options() {
|
|
59
|
+
return {
|
|
60
|
+
placement: this.floatingOptions.placement ?? 'top',
|
|
61
|
+
offset: getOffset(this.floatingOptions?.hideArrow, this.floatingOptions.offset, OFFSET),
|
|
62
|
+
arrow: this.floatingOptions.hideArrow ? undefined : this.arrowElement,
|
|
63
|
+
strategy: 'fixed',
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Returns the lifecycle hooks consumed by the anchored mixin to control
|
|
68
|
+
* tooltip visibility and positioning.
|
|
69
|
+
* @override anchoredMixin.hooks
|
|
70
|
+
*
|
|
71
|
+
* @returns {AnchoredHooks} Object containing the three hook callbacks:
|
|
72
|
+
* - `onPositionUpdate` — called after each positioning calculation.
|
|
73
|
+
* - `onBeforeShow` — called before the tooltip becomes visible; returning false cancels the show.
|
|
74
|
+
* - `onBeforeHide` — called before the tooltip is hidden; returning false cancels the hide.
|
|
75
|
+
*/
|
|
76
|
+
get hooks() {
|
|
77
|
+
return {
|
|
78
|
+
onPositionUpdate: result => this.handlePosition(result),
|
|
79
|
+
onBeforeShow: () => this.validateShow(),
|
|
80
|
+
onBeforeHide: (el) => this.validateHide(el),
|
|
81
|
+
subscribeToTrigger: (el) => this.subscribe(el),
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
get canShowArrow() {
|
|
85
|
+
return !this.floatingOptions.hideArrow || false;
|
|
86
|
+
}
|
|
87
|
+
get getPlacement() {
|
|
88
|
+
return this.floatingOptions.placement || 'top';
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Guard called by `onBeforeShow` to determine whether the tooltip is allowed to show.
|
|
92
|
+
*
|
|
93
|
+
* @returns {boolean} `true` if the tooltip is not disabled and may be shown; `false` otherwise.
|
|
94
|
+
*/
|
|
95
|
+
validateShow() {
|
|
96
|
+
return !this.disabled;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Guard called by `onBeforeHide` to determine whether the tooltip is allowed to hide.
|
|
100
|
+
* When `stayOnHover` is enabled, hides are cancelled if the pointer is moving
|
|
101
|
+
* into the floating content element itself.
|
|
102
|
+
*
|
|
103
|
+
* @param target - The element the pointer is moving toward (relatedTarget of the mouseleave event).
|
|
104
|
+
* @returns {boolean} `true` if the tooltip should hide; `false` if the hide should be cancelled.
|
|
105
|
+
*/
|
|
106
|
+
validateHide(target) {
|
|
107
|
+
if (this.floatingOptions.stayOnHover && target !== undefined && target.isConnected) {
|
|
108
|
+
const goingToFloating = this.floatingContent.contains(target) || this.floatingContent === target;
|
|
109
|
+
if (goingToFloating)
|
|
110
|
+
return false;
|
|
111
|
+
}
|
|
112
|
+
return true;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Callback for `onPositionUpdate`. Applies the resolved placement as a
|
|
116
|
+
* `data-placement` attribute on the floating content element and delegates
|
|
117
|
+
* arrow positioning to `setArrowPosition`.
|
|
118
|
+
*
|
|
119
|
+
* @param result - The positioning result produced by the floating middleware.
|
|
120
|
+
*/
|
|
121
|
+
handlePosition(result) {
|
|
122
|
+
this.floatingContent.setAttribute('data-placement', result.placement);
|
|
123
|
+
this.setArrowPosition(result);
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Applies the arrow element's `x` and `y` coordinates calculated by the
|
|
127
|
+
* floating middleware. Skips the update when the arrow element is not
|
|
128
|
+
* connected to the DOM or when middleware data is absent.
|
|
129
|
+
*
|
|
130
|
+
* @param result - The positioning result that may contain `middlewareData.arrow`
|
|
131
|
+
* with the computed `x` and `y` offsets for the arrow element.
|
|
132
|
+
*/
|
|
133
|
+
setArrowPosition(result) {
|
|
134
|
+
if (result.middlewareData?.arrow && !this.disabled && this.arrowElement?.isConnected) {
|
|
135
|
+
const { x: arrowX, y: arrowY } = result.middlewareData.arrow;
|
|
136
|
+
Object.assign(this.arrowElement.style, {
|
|
137
|
+
left: arrowX != null ? `${arrowX}px` : '',
|
|
138
|
+
top: arrowY != null ? `${arrowY}px` : '',
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
get hasMultiline() {
|
|
143
|
+
return this.multiline !== undefined && this.multiline;
|
|
144
|
+
}
|
|
145
|
+
get tooltipStyles() {
|
|
146
|
+
return {
|
|
147
|
+
'tooltip-content': true,
|
|
148
|
+
'tooltip-content--multiline': this.hasMultiline,
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
subscribe(trigger) {
|
|
152
|
+
if (trigger === undefined)
|
|
153
|
+
return;
|
|
154
|
+
trigger.setAttribute('part', 'tooltip-trigger');
|
|
155
|
+
trigger.setAttribute('ariaDescribedBy', 'tooltip-content');
|
|
156
|
+
trigger.addEventListener('mouseenter', () => this.show());
|
|
157
|
+
trigger.addEventListener('mouseleave', (e) => this.hide(e.target));
|
|
158
|
+
}
|
|
159
|
+
render() {
|
|
160
|
+
const classes = this.tooltipStyles;
|
|
161
|
+
return (h(Host, { key: 'add483ba4072484f1f6d18271ecb74c46a449f41', class: "tooltip" }, h("div", { key: 'ede2a5f6230a4baacb36c24dd57be73fda63e438', id: "tooltip-content", part: "tooltip-content", class: classes, popover: "manual", role: "tooltip", "aria-hidden": this.isVisible ? 'false' : 'true', "data-placement": this.getPlacement, "data-multiline": this.multiline, "data-hidearrow": this.canShowArrow, ref: el => (this.floatingContent = el) }, this.canShowArrow && (h("div", { key: 'c8580171bc2c01eaca84aa1a029dce6f429359f8', class: "tooltip-arrow", part: "arrow", ref: el => (this.arrowElement = el) })), h("slot", { key: '10ead9bb5007414959d4aeacd8c0c1c52223f70d' }))));
|
|
162
|
+
}
|
|
163
|
+
get el() { return getElement(this); }
|
|
164
|
+
};
|
|
165
|
+
BdsTooltip.style = bdsTooltipCss();
|
|
166
|
+
|
|
167
|
+
const VARIANT_TYPOGRAPHY = {
|
|
168
|
+
DISPLAY: 'display',
|
|
169
|
+
LINK: 'link'};
|
|
170
|
+
const TAG_ELEMENT = {
|
|
171
|
+
P: 'p',
|
|
172
|
+
A: 'a'};
|
|
173
|
+
|
|
174
|
+
/*
|
|
175
|
+
* LINK consts
|
|
176
|
+
*/
|
|
177
|
+
const FILENAME = 'download';
|
|
178
|
+
/*
|
|
179
|
+
* Variant map to apply size, state, etc, styles based on variant type
|
|
180
|
+
*/
|
|
181
|
+
const VARIANT_CONFIG = {
|
|
182
|
+
link: {
|
|
183
|
+
states: [COMPONENT_STATES.DISABLED /* STATES.VISITED, STATES.HOVER, STATES.ACTIVE, STATES.FOCUS */],
|
|
184
|
+
size: [SIZES.S, SIZES.M],
|
|
185
|
+
},
|
|
186
|
+
label: {
|
|
187
|
+
states: [COMPONENT_STATES.DISABLED],
|
|
188
|
+
required: true,
|
|
189
|
+
canUseTooltip: true,
|
|
190
|
+
},
|
|
191
|
+
heading: { canUseTooltip: true },
|
|
192
|
+
subheading: { canUseTooltip: true },
|
|
193
|
+
helper: { states: [COMPONENT_STATES.ERROR] },
|
|
194
|
+
display: { size: [SIZES.XS, SIZES.S, SIZES.M, SIZES.L, SIZES.XL] },
|
|
195
|
+
};
|
|
196
|
+
/*
|
|
197
|
+
* ATTRIBUTE MAP
|
|
198
|
+
*/
|
|
199
|
+
const getAttributesByTag = (comp, tagName) => {
|
|
200
|
+
const ATTR_MAP = {
|
|
201
|
+
a: {
|
|
202
|
+
href: comp.state !== COMPONENT_STATES.DISABLED ? comp.sanitizedHref : null,
|
|
203
|
+
target: comp.target,
|
|
204
|
+
download: comp.downloadable ? comp.filename : null,
|
|
205
|
+
rel: comp.target === '_blank' ? 'noopener noreferrer' : undefined,
|
|
206
|
+
},
|
|
207
|
+
label: {
|
|
208
|
+
htmlFor: comp.htmlFor,
|
|
209
|
+
},
|
|
210
|
+
};
|
|
211
|
+
return ATTR_MAP[tagName] || {};
|
|
212
|
+
};
|
|
213
|
+
|
|
214
|
+
const bdsTypographyCss = () => `@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%}`;
|
|
215
|
+
|
|
216
|
+
const BdsTypography = class {
|
|
217
|
+
constructor(hostRef) {
|
|
218
|
+
registerInstance(this, hostRef);
|
|
219
|
+
this.inheritedAttributes = {};
|
|
220
|
+
/** Typography visual variant. */
|
|
221
|
+
this.variant = VARIANT_TYPOGRAPHY.DISPLAY;
|
|
222
|
+
/** Typography size token. */
|
|
223
|
+
this.size = SIZES.M;
|
|
224
|
+
/** Visual state (if supported by variant). */
|
|
225
|
+
this.state = COMPONENT_STATES.DEFAULT;
|
|
226
|
+
/** Additional custom CSS class. */
|
|
227
|
+
this.customClass = '';
|
|
228
|
+
/** HTML tag used for rendering. */
|
|
229
|
+
this.element = TAG_ELEMENT.P;
|
|
230
|
+
/** Text alignment. */
|
|
231
|
+
this.align = ALIGNMENT.START;
|
|
232
|
+
/** Enables text ellipsis. */
|
|
233
|
+
this.ellipsis = false;
|
|
234
|
+
/** Max lines when ellipsis is enabled. */
|
|
235
|
+
this.maxLines = 1;
|
|
236
|
+
/** Tooltip text (variant must support it). */
|
|
237
|
+
this.tooltipText = '';
|
|
238
|
+
/** Marks the field as required. */
|
|
239
|
+
this.required = false;
|
|
240
|
+
/** For attribute when rendered as a label. */
|
|
241
|
+
this.htmlFor = undefined;
|
|
242
|
+
/** Link href when rendered as anchor. */
|
|
243
|
+
this.href = null;
|
|
244
|
+
/** Anchor target. */
|
|
245
|
+
this.target = null;
|
|
246
|
+
/** Enables download behavior for anchor. */
|
|
247
|
+
this.downloadable = false;
|
|
248
|
+
/** Suggested download filename. */
|
|
249
|
+
this.filename = FILENAME;
|
|
250
|
+
/** Sanitized href for security. */
|
|
251
|
+
this.sanitizedHref = '';
|
|
252
|
+
}
|
|
253
|
+
async updateSanitizedHref() {
|
|
254
|
+
if (this.getTagName === 'a' && this.href !== null) {
|
|
255
|
+
const { sanitizeUrl } = await import('./index-noyWJ11s.js').then(function (n) { return n.i; });
|
|
256
|
+
this.sanitizedHref = sanitizeUrl(this.href);
|
|
257
|
+
}
|
|
258
|
+
else
|
|
259
|
+
this.sanitizedHref = '';
|
|
260
|
+
}
|
|
261
|
+
async componentWillLoad() {
|
|
262
|
+
if (this.getTagName === TAG_ELEMENT.A && this.href !== null)
|
|
263
|
+
await this.updateSanitizedHref();
|
|
264
|
+
this.inheritedAttributes = {
|
|
265
|
+
...inheritAriaAttributes(this.el),
|
|
266
|
+
};
|
|
267
|
+
}
|
|
268
|
+
get getTagName() {
|
|
269
|
+
if (this.variant === VARIANT_TYPOGRAPHY.LINK)
|
|
270
|
+
return TAG_ELEMENT.A;
|
|
271
|
+
return this.element.toLowerCase();
|
|
272
|
+
}
|
|
273
|
+
getVariantConfig() {
|
|
274
|
+
return VARIANT_CONFIG[this.variant] ?? {};
|
|
275
|
+
}
|
|
276
|
+
getAccessibilityTags() {
|
|
277
|
+
const { required = false } = this.getVariantConfig();
|
|
278
|
+
const isInteractiveTag = ['a', 'label'].includes(this.getTagName);
|
|
279
|
+
return {
|
|
280
|
+
'aria-required': this.required && required,
|
|
281
|
+
'aria-disabled': this.state === COMPONENT_STATES.DISABLED && isInteractiveTag,
|
|
282
|
+
};
|
|
283
|
+
}
|
|
284
|
+
getVariantStateStyles() {
|
|
285
|
+
const config = this.getVariantConfig();
|
|
286
|
+
return {
|
|
287
|
+
[`bds-typography--${this.variant}`]: true,
|
|
288
|
+
[`bds-typography--align-${this.align}`]: true,
|
|
289
|
+
[`bds-typography--${this.state}`]: !!(config?.states && config?.states.includes(this.state)),
|
|
290
|
+
[`bds-typography--size-${this.size}`]: !!(config?.size && config?.size.includes(this.size)),
|
|
291
|
+
'bds-typography--required': !!(config?.required && this.required),
|
|
292
|
+
'bds-typography--ellipsis': this.ellipsis && this.maxLines <= 1,
|
|
293
|
+
'bds-typography--ellipsis-multiline': this.ellipsis && this.maxLines > 1,
|
|
294
|
+
[this.customClass]: this.customClass !== '',
|
|
295
|
+
};
|
|
296
|
+
}
|
|
297
|
+
render() {
|
|
298
|
+
const TagName = this.getTagName;
|
|
299
|
+
const attributes = {
|
|
300
|
+
...getAttributesByTag(this, TagName),
|
|
301
|
+
...this.inheritedAttributes,
|
|
302
|
+
...this.getAccessibilityTags(),
|
|
303
|
+
};
|
|
304
|
+
const classes = this.getVariantStateStyles();
|
|
305
|
+
const { canUseTooltip = null, required = null } = this.getVariantConfig();
|
|
306
|
+
const isDisabledState = this.state === COMPONENT_STATES.DISABLED;
|
|
307
|
+
return (h(Host, { key: 'd29b535edeb7ede877c979ea812eb6c273affc0d', class: `bds-typography ${isDisabledState ? 'bds-typography--disabled-cursor' : ''}` }, h(TagName, { key: '3a36a1c47026a20d9c95e4c2d38e92caaa89b072', class: classes, style: { webkitLineClamp: this.maxLines }, ...attributes }, h("slot", { key: '8a0ccd7824ac358e937dd6e2fb1c3eb592e27721' }), this.required && required && (h("em", { key: '5ce4cc221efcf9d5a71bbc39dbc449a3a29c16a6', class: "bds-typography__required-indicator", "aria-hidden": "true" }, "*")), this.tooltipText && canUseTooltip && (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))))));
|
|
308
|
+
}
|
|
309
|
+
get el() { return getElement(this); }
|
|
310
|
+
static get watchers() { return {
|
|
311
|
+
"href": [{
|
|
312
|
+
"updateSanitizedHref": 0
|
|
313
|
+
}]
|
|
314
|
+
}; }
|
|
315
|
+
};
|
|
316
|
+
BdsTypography.style = bdsTypographyCss();
|
|
317
|
+
|
|
318
|
+
export { BdsTooltip as bds_tooltip, BdsTypography as bds_typography };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { p as promiseResolve, H, b as bootstrapLazy } from './index-
|
|
2
|
-
export { s as setNonce } from './index-
|
|
1
|
+
import { p as promiseResolve, H, b as bootstrapLazy } from './index-BqJlOB6b.js';
|
|
2
|
+
export { s as setNonce } from './index-BqJlOB6b.js';
|
|
3
3
|
import { g as globalScripts } from './app-globals-DQuL1Twl.js';
|
|
4
4
|
|
|
5
5
|
/*
|
|
@@ -38,5 +38,5 @@ var patchCloneNodeFix = (HTMLElementPrototype) => {
|
|
|
38
38
|
|
|
39
39
|
patchBrowser().then(async (options) => {
|
|
40
40
|
await globalScripts();
|
|
41
|
-
return bootstrapLazy([["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-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-popover",[[772,"bds-popover",{"floatingOptions":[16],"disabled":[4],"width":[8],"header":[4],"footer":[4],"closable":[4],"isVisible":[32]}]]],["bds-
|
|
41
|
+
return 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]}]]]], options);
|
|
42
42
|
});
|
|
@@ -4,9 +4,9 @@ const BUTTON_VARIANTS = {
|
|
|
4
4
|
PLAIN: 'plain',
|
|
5
5
|
};
|
|
6
6
|
const BUTTON_SIZES = {
|
|
7
|
-
SMALL: '
|
|
8
|
-
MEDIUM: '
|
|
9
|
-
LARGE: '
|
|
7
|
+
SMALL: 'sm',
|
|
8
|
+
MEDIUM: 'md',
|
|
9
|
+
LARGE: 'lg',
|
|
10
10
|
};
|
|
11
11
|
const BUTTON_TYPES = {
|
|
12
12
|
BUTTON: 'button',
|
|
@@ -14,4 +14,4 @@ const BUTTON_TYPES = {
|
|
|
14
14
|
RESET: 'reset',
|
|
15
15
|
};
|
|
16
16
|
|
|
17
|
-
export { BUTTON_SIZES as B,
|
|
17
|
+
export { BUTTON_SIZES as B, BUTTON_VARIANTS as a, BUTTON_TYPES as b };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared base mixin for Form-Associated Custom Elements in Boreal DS.
|
|
3
|
+
*
|
|
4
|
+
* Provides `formDisabledCallback` — the only behavior that is identical across
|
|
5
|
+
* all FACE components. It writes to the component's `isDisabled` state, which
|
|
6
|
+
* each component must declare as `@State() private isDisabled: boolean = false`.
|
|
7
|
+
*
|
|
8
|
+
* Each component must declare directly on its class body:
|
|
9
|
+
* - `@AttachInternals() internals!: ElementInternals`
|
|
10
|
+
* - `@Prop({ reflect: true }) readonly name!: string`
|
|
11
|
+
* - `@Prop({ reflect: true }) readonly disabled: boolean = false`
|
|
12
|
+
* - `@Prop({ reflect: true }) readonly required: boolean = false`
|
|
13
|
+
* - `@State() private isDisabled: boolean = false`
|
|
14
|
+
* - `@Watch('disabled') onDisabledChange(next: boolean) { this.isDisabled = next; }`
|
|
15
|
+
*
|
|
16
|
+
* Stencil's compiler requires `@Prop` and `@State` decorators to be statically
|
|
17
|
+
* visible on the component class — they cannot be inherited from a mixin.
|
|
18
|
+
*
|
|
19
|
+
* Components must also implement `IFormControl<T>` for value registration,
|
|
20
|
+
* reset, state restoration, and 2-way binding event emission.
|
|
21
|
+
*/
|
|
22
|
+
const formAssociatedMixin = (Base) => {
|
|
23
|
+
class FormAssociated extends Base {
|
|
24
|
+
formDisabledCallback(disabled) {
|
|
25
|
+
this.isDisabled = disabled;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return FormAssociated;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export { formAssociatedMixin as f };
|