@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
|
@@ -14,23 +14,31 @@
|
|
|
14
14
|
* This file contains mixins and functions for common interactions styles such as focus rings and transitions.
|
|
15
15
|
* These are used across multiple components to ensure consistency in interaction feedback.
|
|
16
16
|
*/
|
|
17
|
+
bds-divider {
|
|
18
|
+
/**
|
|
19
|
+
* @prop --bds-divider-color: Custom color for the divider. Default is $boreal-ui-default-lighter.
|
|
20
|
+
* @prop --bds-divider-gap: Custom gap between dividers. Default is $boreal-spacing-3xs.
|
|
21
|
+
*/
|
|
22
|
+
}
|
|
17
23
|
bds-divider[orientation=vertical] {
|
|
18
|
-
display:
|
|
19
|
-
|
|
24
|
+
display: flex;
|
|
25
|
+
align-self: stretch;
|
|
26
|
+
margin-inline: var(--bds-divider-gap, 0px);
|
|
20
27
|
}
|
|
21
28
|
bds-divider[orientation=horizontal] {
|
|
22
29
|
display: block;
|
|
23
30
|
width: 100%;
|
|
31
|
+
margin-block: var(--bds-divider-gap, 0px);
|
|
24
32
|
}
|
|
25
33
|
|
|
26
34
|
.bds-divider {
|
|
27
|
-
background-color: var(--boreal-ui-default-lighter);
|
|
35
|
+
background-color: var(--bds-divider-color, var(--boreal-ui-default-lighter));
|
|
28
36
|
}
|
|
29
37
|
.bds-divider--horizontal {
|
|
30
38
|
width: 100%;
|
|
31
39
|
height: var(--boreal-spacing-4xs);
|
|
32
40
|
}
|
|
33
41
|
.bds-divider--vertical {
|
|
42
|
+
flex: 1;
|
|
34
43
|
width: var(--boreal-spacing-4xs);
|
|
35
|
-
height: 100%;
|
|
36
44
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
2
|
import { DIVIDER_ORIENTATIONS } from "./types/enum";
|
|
3
|
-
import { validatePropValue } from "
|
|
3
|
+
import { validatePropValue } from "../../../utils/index";
|
|
4
4
|
/**
|
|
5
5
|
* Divider component for creating visual separators between content sections.
|
|
6
6
|
*
|
|
@@ -34,7 +34,7 @@ export class BdsDivider {
|
|
|
34
34
|
this.checkPropValues();
|
|
35
35
|
}
|
|
36
36
|
render() {
|
|
37
|
-
return h("div", { key: '
|
|
37
|
+
return h("div", { key: 'd89008b1a2cddddb925ee1e6e7c4cb7110ab6bd1', part: "divider", class: this.orientationClass, role: "separator", "aria-orientation": this.orientation });
|
|
38
38
|
}
|
|
39
39
|
static get is() { return "bds-divider"; }
|
|
40
40
|
static get originalStyleUrls() {
|
|
@@ -59,7 +59,7 @@ export class BdsDivider {
|
|
|
59
59
|
"IDivider": {
|
|
60
60
|
"location": "import",
|
|
61
61
|
"path": "./types/IDivider",
|
|
62
|
-
"id": "src/components/helpers/types/IDivider.ts::IDivider",
|
|
62
|
+
"id": "src/components/helpers/bds-divider/types/IDivider.ts::IDivider",
|
|
63
63
|
"referenceLocation": "IDivider"
|
|
64
64
|
}
|
|
65
65
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -87,7 +87,7 @@ export class BdsAvatar {
|
|
|
87
87
|
const avatarAriaLabel = this.normalizedUsername.length > 0 ? `User name: ${this.normalizedUsername}` : 'User name';
|
|
88
88
|
const showIcon = this.variant === AVATAR_VARIANT.FULL || this.variant === AVATAR_VARIANT.ICON;
|
|
89
89
|
const showName = this.normalizedUsername && (this.variant === AVATAR_VARIANT.FULL || this.variant === AVATAR_VARIANT.NAME);
|
|
90
|
-
return (h(Host, { key: '
|
|
90
|
+
return (h(Host, { key: '26a86e31e803b5c77f09fda1d9f228e3641f0a53', class: "bds-avatar", role: "img", "aria-label": avatarAriaLabel, ...this.inheritedAttributes }, h("div", { key: '906e9708ac61caa1cbf21a9e8019aadaea010970', class: "bds-avatar__container" }, showIcon && (h("div", { key: 'b2962d2a61a5a6561f5cf7f817c3ca270ba42671', class: "bds-avatar__circle", style: this.getAvatarStyles() }, h("span", { key: '44b5aa4c4ea78479b83b2f39121ae767d0304182', class: "bds-avatar__initials" }, initials))), showName && h("span", { key: 'e3b5af88572994fbecfb0bff46d4f6b417c74d16', class: "bds-avatar__name" }, this.normalizedUsername))));
|
|
91
91
|
}
|
|
92
92
|
static get is() { return "bds-avatar"; }
|
|
93
93
|
static get originalStyleUrls() {
|
|
@@ -20,7 +20,7 @@ export class BdsGrid {
|
|
|
20
20
|
this.checkPropValues();
|
|
21
21
|
}
|
|
22
22
|
render() {
|
|
23
|
-
return (h(Host, { key: '
|
|
23
|
+
return (h(Host, { key: '52672cc265a59d6556eb4ae677c650b19696dbdc', class: { 'bds-grid--fixed': this.layout === GRID_LAYOUT.FIXED }, style: { ...(this.rowGap && { 'row-gap': this.rowGap }) } }, h("slot", { key: '6c0f0b89777a754a91d273838940cd8721b79d5c' })));
|
|
24
24
|
}
|
|
25
25
|
static get is() { return "bds-grid"; }
|
|
26
26
|
static get originalStyleUrls() {
|
|
@@ -48,7 +48,7 @@ export class BdsGridItem {
|
|
|
48
48
|
return styles;
|
|
49
49
|
}
|
|
50
50
|
render() {
|
|
51
|
-
return (h(Host, { key: '
|
|
51
|
+
return (h(Host, { key: 'e16ec21f8fcabbf3091ed3469a120aaff37f4274', style: this.getHostStyles() }, h("slot", { key: 'b1fa7e071660a4f4f50d9fd31ee9646069678d10' })));
|
|
52
52
|
}
|
|
53
53
|
static get is() { return "bds-grid-item"; }
|
|
54
54
|
static get originalStyleUrls() {
|
|
@@ -201,10 +201,10 @@ export class BdsDialog extends Mixin(backdropMixin) {
|
|
|
201
201
|
}
|
|
202
202
|
render() {
|
|
203
203
|
const inheritedAriaAttr = this.inheritedAttributes;
|
|
204
|
-
return (h("dialog", { key: '
|
|
204
|
+
return (h("dialog", { key: '58ef2571b3c6d4fcc4ac85f8536bbb9168651e02', onClick: e => this.handleBackdropClick(e), onKeyDown: e => this.handleKeydown(e), onTransitionEnd: this.onDialogTransitionEnd, ref: el => {
|
|
205
205
|
if (el !== undefined)
|
|
206
206
|
this.dialogElement = el;
|
|
207
|
-
}, style: { ...this.getFixedSize() }, ...(this.titleDialog.length > 0 && { 'aria-labelledby': 'bds-dialog-title' }), ...inheritedAriaAttr }, h("div", { key: '
|
|
207
|
+
}, style: { ...this.getFixedSize() }, ...(this.titleDialog.length > 0 && { 'aria-labelledby': 'bds-dialog-title' }), ...inheritedAriaAttr }, h("div", { key: 'fa95d799c99e48ac7b02602d62d79e9919d7b711', class: this.getStyles() }, this.layout !== DIALOG_LAYOUT.HEADERLESS && (h("div", { key: '7460a77b2caf914ddf871804ce6c37fbb186b9ef', class: "bds-dialog__header" }, this.getHeaderLeftElement(), this.getHeaderRightElement())), h("div", { key: '1537a32b06b9e5ca0329d360a15f407ac8bb6d4f', class: `bds-dialog__body ${this.contentPadding === 'none' ? 'bds-dialog--no-padding' : ''}` }, h("slot", { key: 'e45a2fd2507303ab1af63983ff1cb5a3db1b955b' })), this.layout !== DIALOG_LAYOUT.FOOTERLESS && (h("div", { key: 'c258f33a42fff5e88b2846c788bac219fa90fe63', class: "bds-dialog__footer" }, h("slot", { key: 'b64483b7004e01f2ecaa11fc4b144277a20d0204', name: "footer" }))))));
|
|
208
208
|
}
|
|
209
209
|
static get is() { return "bds-dialog"; }
|
|
210
210
|
static get originalStyleUrls() {
|
|
@@ -285,7 +285,7 @@ export class BdsPopover extends Mixin(anchoredMixin) {
|
|
|
285
285
|
this.trigger.removeEventListener('click', (evt) => this.handleShow(evt));
|
|
286
286
|
}
|
|
287
287
|
render() {
|
|
288
|
-
return (h(Host, { key: '
|
|
288
|
+
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: (e) => this.handleContentClick(e), ref: el => (this.floatingContent = el) }, 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: () => this.hide() }, h("em", { key: '20ea602f48d1f27ee0b10c929a4a2194304a35b2', slot: "icon", class: "bds-icon-close" }))))), this.canShowArrow && (h("div", { key: '551089a9b038a27277398dac47b8e72b2f3d9286', class: "popover-arrow", part: "arrow", ref: el => (this.arrowElement = el) })), 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: (e) => e.stopPropagation() }, h("slot", { key: 'b6a20d06d0964f6dea85afdd40a46a6fb737bbac', name: "footer-helper" }), h("slot", { key: '379b2b43a1e937775149e686686da9e4554dd962', name: "footer-button" })))));
|
|
289
289
|
}
|
|
290
290
|
static get is() { return "bds-popover"; }
|
|
291
291
|
static get originalStyleUrls() {
|
|
@@ -56,7 +56,7 @@ export class BdsTooltip extends Mixin(anchoredMixin) {
|
|
|
56
56
|
*/
|
|
57
57
|
get options() {
|
|
58
58
|
return {
|
|
59
|
-
placement: this.floatingOptions.placement ?? '
|
|
59
|
+
placement: this.floatingOptions.placement ?? 'top',
|
|
60
60
|
offset: getOffset(this.floatingOptions?.hideArrow, this.floatingOptions.offset, OFFSET),
|
|
61
61
|
arrow: this.floatingOptions.hideArrow ? undefined : this.arrowElement,
|
|
62
62
|
strategy: 'fixed',
|
|
@@ -84,7 +84,7 @@ export class BdsTooltip extends Mixin(anchoredMixin) {
|
|
|
84
84
|
return !this.floatingOptions.hideArrow || false;
|
|
85
85
|
}
|
|
86
86
|
get getPlacement() {
|
|
87
|
-
return this.floatingOptions.placement || '
|
|
87
|
+
return this.floatingOptions.placement || 'top';
|
|
88
88
|
}
|
|
89
89
|
/**
|
|
90
90
|
* Guard called by `onBeforeShow` to determine whether the tooltip is allowed to show.
|
|
@@ -157,7 +157,7 @@ export class BdsTooltip extends Mixin(anchoredMixin) {
|
|
|
157
157
|
}
|
|
158
158
|
render() {
|
|
159
159
|
const classes = this.tooltipStyles;
|
|
160
|
-
return (h(Host, { key: '
|
|
160
|
+
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' }))));
|
|
161
161
|
}
|
|
162
162
|
static get is() { return "bds-tooltip"; }
|
|
163
163
|
static get originalStyleUrls() {
|
|
@@ -10,6 +10,11 @@
|
|
|
10
10
|
/**
|
|
11
11
|
* TODO: Refactor to use styleguidelines this work as first draft
|
|
12
12
|
**/
|
|
13
|
+
.bds-typography__info {
|
|
14
|
+
display: inline-flex;
|
|
15
|
+
align-items: center;
|
|
16
|
+
}
|
|
17
|
+
|
|
13
18
|
/**
|
|
14
19
|
* This file contains mixins and functions for common interactions styles such as focus rings and transitions.
|
|
15
20
|
* These are used across multiple components to ensure consistency in interaction feedback.
|
|
@@ -148,7 +148,7 @@ export class BdsTypography {
|
|
|
148
148
|
const classes = this.getVariantStateStyles();
|
|
149
149
|
const { canUseTooltip = null, required = null } = this.getVariantConfig();
|
|
150
150
|
const isDisabledState = this.state === COMPONENT_STATES.DISABLED;
|
|
151
|
-
return (h(Host, { key: '
|
|
151
|
+
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))))));
|
|
152
152
|
}
|
|
153
153
|
static get is() { return "bds-typography"; }
|
|
154
154
|
static get originalStyleUrls() {
|
|
@@ -170,9 +170,9 @@ export const anchoredMixin = (Base) => {
|
|
|
170
170
|
* @param hideFn - Bound hide function
|
|
171
171
|
*/
|
|
172
172
|
handleKeydown(e, showFn, hideFn) {
|
|
173
|
-
if (e.key === KEYBOARD.Enter
|
|
173
|
+
if (e.key === KEYBOARD.Enter || e.key === KEYBOARD.Space)
|
|
174
174
|
showFn();
|
|
175
|
-
if (e.key === KEYBOARD.Escape
|
|
175
|
+
if (e.key === KEYBOARD.Escape)
|
|
176
176
|
hideFn();
|
|
177
177
|
}
|
|
178
178
|
/**
|
|
@@ -92,8 +92,7 @@ export const WithLinks = (Base) => {
|
|
|
92
92
|
handleLinkKeyDown(event) {
|
|
93
93
|
if (!this.isLink)
|
|
94
94
|
return;
|
|
95
|
-
if (this.el.tagName.toLowerCase() !== 'a' &&
|
|
96
|
-
(event.key === KEYBOARD.Enter.key || event.key === KEYBOARD.Space.key)) {
|
|
95
|
+
if (this.el.tagName.toLowerCase() !== 'a' && (event.key === KEYBOARD.Enter || event.key === KEYBOARD.Space)) {
|
|
97
96
|
event.preventDefault();
|
|
98
97
|
this.handleLinkClick(new MouseEvent('click', { bubbles: true, cancelable: true }));
|
|
99
98
|
}
|
|
@@ -10,7 +10,6 @@ import { handleMenuKeyNavigation, resolveMenuItemRole, resolveAriaSelected, reso
|
|
|
10
10
|
* - Computation of aria-selected and tabIndex attributes for accessibility.
|
|
11
11
|
* - A method to handle keyboard navigation (Arrow keys, Enter, Space) within the menu context.
|
|
12
12
|
*
|
|
13
|
-
*
|
|
14
13
|
* @typeParam B - The base constructor type.
|
|
15
14
|
* @param {B} Base - The base component class to be extended.
|
|
16
15
|
* @returns {MenuBehaviorMixin} - A class with injected menu behaviors.
|
|
@@ -57,12 +56,19 @@ export const MenuItemBehavior = (Base) => {
|
|
|
57
56
|
this.selected = false;
|
|
58
57
|
this.activeItem = false;
|
|
59
58
|
}
|
|
59
|
+
/**
|
|
60
|
+
* Finds the closest parent element with a role of 'menu' or 'listbox'.
|
|
61
|
+
* @returns {HTMLElement | null} - The parent menu or listbox element, or null if not found.
|
|
62
|
+
*/
|
|
63
|
+
get parent() {
|
|
64
|
+
return this.el.closest('[role="menu"], [role="listbox"]');
|
|
65
|
+
}
|
|
60
66
|
/**
|
|
61
67
|
* Detects the ARIA role of the nearest parent menu or listbox.
|
|
62
68
|
* @returns {MenuRole | null} - 'menu', 'listbox', or null if not found.
|
|
63
69
|
*/
|
|
64
70
|
get parentRole() {
|
|
65
|
-
const parent = this.
|
|
71
|
+
const parent = this.parent;
|
|
66
72
|
return parent !== null ? parent.getAttribute('role') : null;
|
|
67
73
|
}
|
|
68
74
|
/**
|
|
@@ -85,7 +91,7 @@ export const MenuItemBehavior = (Base) => {
|
|
|
85
91
|
* @returns {number} 0 for focusable menu items, -1 otherwise.
|
|
86
92
|
*/
|
|
87
93
|
get itemTabIndex() {
|
|
88
|
-
return resolveTabIndex(this.menuItemRole, this.disabled, this.
|
|
94
|
+
return resolveTabIndex(this.menuItemRole, this.disabled, this.activeItem);
|
|
89
95
|
}
|
|
90
96
|
/**
|
|
91
97
|
* Processes keyboard events for arrow navigation and activation.
|
|
@@ -97,11 +103,11 @@ export const MenuItemBehavior = (Base) => {
|
|
|
97
103
|
*/
|
|
98
104
|
handleKeyDownLogic(e, onActivate) {
|
|
99
105
|
preventNavigationKeys(e);
|
|
100
|
-
if (e.key === KEYBOARD.Enter
|
|
106
|
+
if (e.key === KEYBOARD.Enter || e.key === KEYBOARD.Space) {
|
|
101
107
|
onActivate();
|
|
102
108
|
return;
|
|
103
109
|
}
|
|
104
|
-
const parent = this.
|
|
110
|
+
const parent = this.parent;
|
|
105
111
|
if (parent === null)
|
|
106
112
|
return;
|
|
107
113
|
const items = Array.from(parent.querySelectorAll(`${this.el.tagName.toLocaleLowerCase()}:not([disabled]):not([variant="label"])`));
|
|
@@ -1,28 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* Can use this page to find the keycodes: https://keycode.info/
|
|
2
|
+
* Centralised keyboard key values used across components.
|
|
3
|
+
* Use these constants instead of raw string literals to prevent typos and keep key references consistent.
|
|
4
|
+
* Each value matches the `KeyboardEvent.key` string as defined by the W3C UI Events specification.
|
|
6
5
|
*/
|
|
7
6
|
export const KEYBOARD = {
|
|
8
|
-
Enter:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
},
|
|
16
|
-
Space: {
|
|
17
|
-
key: ' ',
|
|
18
|
-
code: 32,
|
|
19
|
-
},
|
|
20
|
-
ArrowUp: {
|
|
21
|
-
key: 'ArrowUp',
|
|
22
|
-
code: 38,
|
|
23
|
-
},
|
|
24
|
-
ArrowDown: {
|
|
25
|
-
key: 'ArrowDown',
|
|
26
|
-
code: 40,
|
|
27
|
-
},
|
|
7
|
+
Enter: 'Enter',
|
|
8
|
+
Escape: 'Escape',
|
|
9
|
+
Space: ' ',
|
|
10
|
+
ArrowUp: 'ArrowUp',
|
|
11
|
+
ArrowDown: 'ArrowDown',
|
|
12
|
+
ArrowLeft: 'ArrowLeft',
|
|
13
|
+
ArrowRight: 'ArrowRight',
|
|
28
14
|
};
|
|
@@ -25,20 +25,18 @@ export function resolveAriaSelected(role, selected) {
|
|
|
25
25
|
* Resolves the tabIndex attribute for keyboard navigation.
|
|
26
26
|
* @param {MenuItemRole} role - The role of the item.
|
|
27
27
|
* @param {boolean} disabled - Whether the item is currently disabled.
|
|
28
|
-
* @param {boolean} selected - Whether the item is currently selected.
|
|
29
28
|
* @param {boolean} active - Whether the item is currently active.
|
|
30
29
|
* @returns {number} - Returns 0 for focusable menu items, or -1 for disabled/options.
|
|
31
30
|
* @example
|
|
32
31
|
* const index = resolveTabIndex('menuitem', false); // returns 0
|
|
33
32
|
* const indexDisabled = resolveTabIndex('menuitem', true); // returns -1
|
|
34
33
|
*/
|
|
35
|
-
export function resolveTabIndex(role, disabled,
|
|
34
|
+
export function resolveTabIndex(role, disabled, active) {
|
|
36
35
|
if (disabled)
|
|
37
36
|
return -1;
|
|
38
|
-
if (role === 'option')
|
|
39
|
-
return selected || active ? 0 : -1;
|
|
40
|
-
if (role === 'menuitem')
|
|
37
|
+
if (role === 'option' || role === 'menuitem') {
|
|
41
38
|
return active ? 0 : -1;
|
|
39
|
+
}
|
|
42
40
|
return -1;
|
|
43
41
|
}
|
|
44
42
|
/**
|
|
@@ -46,6 +44,7 @@ export function resolveTabIndex(role, disabled, selected, active) {
|
|
|
46
44
|
* @param {KeyboardEvent} event - The keyboard event object from the listener.
|
|
47
45
|
* @param {HTMLElement[]} items - An array of focusable HTML elements within the menu.
|
|
48
46
|
* @param {number} currentIndex - The index of the currently focused item.
|
|
47
|
+
* @param {boolean} selected - The current selection state of the item (used for activation logic).
|
|
49
48
|
* @returns {void}
|
|
50
49
|
* @example
|
|
51
50
|
* handleMenuKeyNavigation(event, menuItems, 2);
|
|
@@ -55,16 +54,18 @@ export function handleMenuKeyNavigation(event, items, currentIndex) {
|
|
|
55
54
|
return;
|
|
56
55
|
let nextIndex = -1;
|
|
57
56
|
switch (event.key) {
|
|
58
|
-
case KEYBOARD.ArrowDown
|
|
57
|
+
case KEYBOARD.ArrowDown:
|
|
59
58
|
nextIndex = (currentIndex + 1) % items.length;
|
|
60
59
|
break;
|
|
61
|
-
case KEYBOARD.ArrowUp
|
|
60
|
+
case KEYBOARD.ArrowUp:
|
|
62
61
|
nextIndex = (currentIndex - 1 + items.length) % items.length;
|
|
63
62
|
break;
|
|
64
63
|
default:
|
|
65
64
|
return;
|
|
66
65
|
}
|
|
66
|
+
items.forEach(item => item.removeAttribute('active-item'));
|
|
67
67
|
items[nextIndex].focus();
|
|
68
|
+
items[nextIndex].setAttribute('active-item', '');
|
|
68
69
|
}
|
|
69
70
|
/** Prevents default browser behavior for specific navigation keys.
|
|
70
71
|
* @param {KeyboardEvent} e - The keyboard event to evaluate.
|
|
@@ -74,7 +75,7 @@ export function handleMenuKeyNavigation(event, items, currentIndex) {
|
|
|
74
75
|
* preventNavigationKeys(event);
|
|
75
76
|
*/
|
|
76
77
|
export function preventNavigationKeys(e) {
|
|
77
|
-
const navigationKeys = [KEYBOARD.ArrowDown
|
|
78
|
+
const navigationKeys = [KEYBOARD.ArrowDown, KEYBOARD.ArrowUp, KEYBOARD.Enter, KEYBOARD.Space];
|
|
78
79
|
if (navigationKeys.includes(e.key)) {
|
|
79
80
|
e.preventDefault();
|
|
80
81
|
}
|
|
@@ -14,3 +14,13 @@ export function assertExists(condition, message) {
|
|
|
14
14
|
throw new Error(message);
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
* Dispatches a `keydown` event on the given element.
|
|
19
|
+
*
|
|
20
|
+
* @param el The target element.
|
|
21
|
+
* @param key The `KeyboardEvent.key` value to dispatch.
|
|
22
|
+
* @param init Optional overrides merged on top of the defaults (`bubbles: true`, `cancelable: true`).
|
|
23
|
+
*/
|
|
24
|
+
export function dispatchKey(el, key, init = {}) {
|
|
25
|
+
el.dispatchEvent(new KeyboardEvent('keydown', { bubbles: true, cancelable: true, ...init, key }));
|
|
26
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Centralised keyboard key values used across components.
|
|
3
|
+
* Use these constants instead of raw string literals to prevent typos and keep key references consistent.
|
|
4
|
+
* Each value matches the `KeyboardEvent.key` string as defined by the W3C UI Events specification.
|
|
5
|
+
*/
|
|
6
|
+
const KEYBOARD = {
|
|
7
|
+
Enter: 'Enter',
|
|
8
|
+
Escape: 'Escape',
|
|
9
|
+
Space: ' ',
|
|
10
|
+
ArrowUp: 'ArrowUp',
|
|
11
|
+
ArrowDown: 'ArrowDown',
|
|
12
|
+
ArrowLeft: 'ArrowLeft',
|
|
13
|
+
ArrowRight: 'ArrowRight',
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export { KEYBOARD as K };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Default implementation of the logger service.
|
|
3
|
+
* This class is responsible for logging errors, warnings and messages to the DevTools console.
|
|
4
|
+
*/
|
|
5
|
+
class Logger {
|
|
6
|
+
/**
|
|
7
|
+
* Throw a normalized error with the component name and the message.
|
|
8
|
+
* @param component Is the name of the component that is throwing the error.
|
|
9
|
+
* @param message Is the message of the error.
|
|
10
|
+
* @throws Error with the component name and the message.
|
|
11
|
+
* @example
|
|
12
|
+
* const logger = new Logger();
|
|
13
|
+
* logger.error('MyComponent', 'This is an error');
|
|
14
|
+
* // Throws an error with the message "[MyComponent]: This is an error"
|
|
15
|
+
*/
|
|
16
|
+
error(component, message) {
|
|
17
|
+
throw new Error(`[${component}]: ${message}`);
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Log a warning with the component name and the message.
|
|
21
|
+
* @param component Is the name of the component that is throwing the warning.
|
|
22
|
+
* @param message Is the message of the warning.
|
|
23
|
+
* @example
|
|
24
|
+
* const logger = new Logger();
|
|
25
|
+
* logger.warn('MyComponent', 'This is a warning');
|
|
26
|
+
* // Logs a warning with the message "[MyComponent]: This is a warning"
|
|
27
|
+
*/
|
|
28
|
+
warn(component, message) {
|
|
29
|
+
console.warn(`[${component}]: ${message}`);
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Log a message with the component name and the message.
|
|
33
|
+
* @param component Is the name of the component that is logging the message.
|
|
34
|
+
* @param message Is the message of the message.
|
|
35
|
+
* @example
|
|
36
|
+
* const logger = new Logger();
|
|
37
|
+
* logger.log('MyComponent', 'This is a message');
|
|
38
|
+
* // Logs a message with the message "[MyComponent]: This is a message"
|
|
39
|
+
* @example
|
|
40
|
+
* const logger = new Logger();
|
|
41
|
+
* logger.log('MyComponent', 'This is a message');
|
|
42
|
+
* // Logs a message with the message "[MyComponent]: This is a message"
|
|
43
|
+
*/
|
|
44
|
+
log(component, message) {
|
|
45
|
+
console.log(`[${component}]: ${message}`);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export { Logger as L };
|
|
@@ -73,6 +73,9 @@ const ariaAttributes = [
|
|
|
73
73
|
];
|
|
74
74
|
const inheritAriaAttributes = (el, ignoreList) => {
|
|
75
75
|
let attributesToInherit = ariaAttributes;
|
|
76
|
+
if (ignoreList && ignoreList.length > 0) {
|
|
77
|
+
attributesToInherit = attributesToInherit.filter(attr => !ignoreList.includes(attr));
|
|
78
|
+
}
|
|
76
79
|
return inheritAttributes(el, attributesToInherit);
|
|
77
80
|
};
|
|
78
81
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h, a as Host, g as getElement } from './index-BqJlOB6b.js';
|
|
2
|
-
import { a as inheritAriaAttributes } from './attributes-
|
|
2
|
+
import { a as inheritAriaAttributes } from './attributes-U9yfbs7i.js';
|
|
3
3
|
import { v as validatePropValue } from './validateProps-kGnB15Lz.js';
|
|
4
4
|
|
|
5
5
|
const AVATAR_VARIANT = {
|
|
@@ -78,7 +78,7 @@ const BdsAvatar = class {
|
|
|
78
78
|
const avatarAriaLabel = this.normalizedUsername.length > 0 ? `User name: ${this.normalizedUsername}` : 'User name';
|
|
79
79
|
const showIcon = this.variant === AVATAR_VARIANT.FULL || this.variant === AVATAR_VARIANT.ICON;
|
|
80
80
|
const showName = this.normalizedUsername && (this.variant === AVATAR_VARIANT.FULL || this.variant === AVATAR_VARIANT.NAME);
|
|
81
|
-
return (h(Host, { key: '
|
|
81
|
+
return (h(Host, { key: '26a86e31e803b5c77f09fda1d9f228e3641f0a53', class: "bds-avatar", role: "img", "aria-label": avatarAriaLabel, ...this.inheritedAttributes }, h("div", { key: '906e9708ac61caa1cbf21a9e8019aadaea010970', class: "bds-avatar__container" }, showIcon && (h("div", { key: 'b2962d2a61a5a6561f5cf7f817c3ca270ba42671', class: "bds-avatar__circle", style: this.getAvatarStyles() }, h("span", { key: '44b5aa4c4ea78479b83b2f39121ae767d0304182', class: "bds-avatar__initials" }, initials))), showName && h("span", { key: 'e3b5af88572994fbecfb0bff46d4f6b417c74d16', class: "bds-avatar__name" }, this.normalizedUsername))));
|
|
82
82
|
}
|
|
83
83
|
get el() { return getElement(this); }
|
|
84
84
|
};
|
|
@@ -34,7 +34,7 @@ const BdsBadge = class {
|
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
36
|
render() {
|
|
37
|
-
return (h(Host, { key: '
|
|
37
|
+
return (h(Host, { key: 'f686ff59037a77660bc82262b9374193dface206', class: this.badgeClasses, role: "status", "aria-live": "polite", "aria-label": `status ${this.variant}`, "aria-disabled": this.disabled ? 'true' : null }, h("slot", { key: '5089ac4144f7fdd1023ee3561010859b6b96ef3b', name: "icon" }), h("slot", { key: '44addf6e20aa27f1ed3df4ab728b5a0a37cc2f20' })));
|
|
38
38
|
}
|
|
39
39
|
get el() { return getElement(this); }
|
|
40
40
|
static get watchers() { return {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, F as Fragment, a as Host, g as getElement } from './index-BqJlOB6b.js';
|
|
2
2
|
import { S as STATUS_VARIANT } from './states-Bfazyxqi.js';
|
|
3
|
-
import { i as inheritAttributes, a as inheritAriaAttributes } from './attributes-
|
|
3
|
+
import { i as inheritAttributes, a as inheritAriaAttributes } from './attributes-U9yfbs7i.js';
|
|
4
4
|
|
|
5
5
|
const bdsBannerCss = () => `@charset "UTF-8";.bds-banner{position:relative;display:-ms-flexbox;display:flex;border:var(--boreal-spacing-4xs) solid var(--boreal-stroke-info-base);border-radius:var(--boreal-radius-xs);border-left:0;font-family:var(--boreal-typography-font-family-primary);height:100%;-webkit-transition:opacity 0.3s ease-out;transition:opacity 0.3s ease-out}.bds-banner__vertical-line{width:var(--boreal-spacing-2xs);border-top-left-radius:var(--boreal-radius-xs);border-bottom-left-radius:var(--boreal-radius-xs);background-color:var(--boreal-stroke-info-base)}.bds-banner__container{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;width:100%;gap:var(--boreal-spacing-xs);padding:var(--boreal-spacing-s)}.bds-banner__content{width:100%}.bds-banner__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-banner__body{padding-top:var(--boreal-spacing-2xs);font-size:var(--boreal-typography-font-size-sm);line-height:var(--boreal-typography-line-height-sm)}.bds-banner__actions{padding-top:var(--boreal-spacing-s);min-height:0px}.bds-banner__actions:empty{display:none}.bds-banner__status-icon{font-size:var(--boreal-typography-font-size-md);line-height:var(--boreal-typography-line-height-md);margin-top:var(--boreal-spacing-3xs)}.bds-banner__close-icon{background:none;border:none;-ms-flex-item-align:start;align-self:start;font-size:var(--boreal-typography-font-size-md);line-height:var(--boreal-typography-line-height-md);color:var(--boreal-neutral-base);cursor:pointer}.bds-banner--info{border-color:var(--boreal-stroke-info-base);background-color:var(--boreal-ui-info-lighter)}.bds-banner--info .bds-banner__vertical-line{background-color:var(--boreal-stroke-info-base)}.bds-banner--info .bds-banner__status-icon{color:var(--boreal-stroke-info-base)}.bds-banner--success{border-color:var(--boreal-stroke-success-base);background-color:var(--boreal-ui-success-lighter)}.bds-banner--success .bds-banner__vertical-line{background-color:var(--boreal-stroke-success-base)}.bds-banner--success .bds-banner__status-icon{color:var(--boreal-stroke-success-base)}.bds-banner--warning{border-color:var(--boreal-stroke-warning);background-color:var(--boreal-ui-warning-lighter)}.bds-banner--warning .bds-banner__vertical-line{background-color:var(--boreal-stroke-warning)}.bds-banner--warning .bds-banner__status-icon{color:var(--boreal-stroke-warning)}.bds-banner--danger{border-color:var(--boreal-stroke-danger-base);background-color:var(--boreal-ui-danger-lighter)}.bds-banner--danger .bds-banner__vertical-line{background-color:var(--boreal-stroke-danger-base)}.bds-banner--danger .bds-banner__status-icon{color:var(--boreal-stroke-danger-base)}.bds-banner--closing{opacity:0}.bds-banner--hidden{display:none}`;
|
|
6
6
|
|
|
@@ -107,7 +107,7 @@ const BdsBanner = class {
|
|
|
107
107
|
const closeIcon = this.renderCloseIcon();
|
|
108
108
|
const classes = this.getStyles();
|
|
109
109
|
const iconName = this.getIconName();
|
|
110
|
-
return (h(Host, { key: '
|
|
110
|
+
return (h(Host, { key: 'e5ece2606d360add80831cb5cff99c07bb6fe9a6', class: classes, ...this.getAttributes(), onTransitionEnd: this.handleAnimationEnd, onKeyDown: (e) => this.handleEscapeKeyClose(e) }, this.isOpen && (h(Fragment, { key: '1f25dabb048e75db7f9b155ed660ee3c07b878e7' }, h("div", { key: '363d11782e11ab9e34c30981653da02d62753611', class: "bds-banner__vertical-line" }), h("div", { key: '256f0e83e848d7e50b851524364314ac8a15f195', class: "bds-banner__container" }, h("div", { key: '3f16aa2ab24f0621e754276032dea90ba7a2fcae', class: "bds-banner__status-icon", role: "status", "aria-live": "polite", "aria-label": `status ${this.variant}` }, h("em", { key: '1ee1cd86ac8e6fe63d77ab815f3467623e3701bf', "aria-hidden": "true", class: iconName })), h("div", { key: 'b56334ec515aa5036143a21e17ccbab0284edd52', id: "bds-banner__content", class: "bds-banner__content" }, h("div", { key: '454a4dd729fa18675c9db2a8101732688b15d4d7', class: "bds-banner__title" }, h("slot", { key: '06d51ebe3e862210035d98b2ecde35ba9872309f', name: "title" })), h("div", { key: '773524e70efc9e2412c3ca71913cc1f4da80a493', class: "bds-banner__body" }, h("slot", { key: '483f4358227e080db9ee884e6462743042a17bfe' })), h("div", { key: '6180025c2b07adc050d716269f76783f3f8164d2', class: "bds-banner__actions" }, h("slot", { key: '4e45498d447a003859421f98d884f289fc18e084', name: "actions" }))), this.closable && closeIcon)))));
|
|
111
111
|
}
|
|
112
112
|
get el() { return getElement(this); }
|
|
113
113
|
};
|