@telesign/boreal-web-components 0.1.0-alpha.4 → 0.1.0-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components-build/bds-avatar.js +1 -1
- package/components-build/bds-badge.js +1 -1
- package/components-build/bds-banner.js +1 -1
- package/components-build/bds-button-group.d.ts +11 -0
- package/components-build/bds-button-group.js +1 -0
- package/components-build/bds-button.js +1 -1
- package/components-build/bds-checkbox-card.d.ts +11 -0
- package/components-build/bds-checkbox-card.js +1 -0
- package/components-build/bds-checkbox.js +1 -1
- package/components-build/bds-dialog.js +1 -1
- package/components-build/bds-divider.js +1 -1
- package/components-build/bds-flag.js +1 -1
- package/components-build/bds-grid-item.js +1 -1
- package/components-build/bds-grid.js +1 -1
- package/components-build/bds-list-menu-item.js +1 -1
- package/components-build/bds-list-menu.js +1 -1
- package/components-build/bds-popover.js +1 -1
- package/components-build/bds-radio-button.d.ts +11 -0
- package/components-build/bds-radio-button.js +1 -0
- package/components-build/bds-radio-card.d.ts +11 -0
- package/components-build/bds-radio-card.js +1 -0
- package/components-build/bds-radio-group.d.ts +11 -0
- package/components-build/bds-radio-group.js +1 -0
- package/components-build/bds-radio.d.ts +11 -0
- package/components-build/bds-radio.js +1 -0
- package/components-build/bds-spinner.js +1 -1
- package/components-build/bds-status.js +1 -1
- package/components-build/bds-tag.js +1 -1
- package/components-build/bds-text-field.js +1 -1
- package/components-build/bds-toggle.js +1 -1
- package/components-build/bds-tooltip.js +1 -1
- package/components-build/bds-typography.js +1 -1
- package/components-build/index.js +1 -1
- package/components-build/p-BSlaf0ff.js +1 -0
- package/components-build/p-CPvuMm5C.js +1 -0
- package/components-build/p-Cbibqaz0.js +1 -0
- package/components-build/p-ClR-wgiT.js +1 -0
- package/components-build/p-DfaYciGa.js +1 -0
- package/components-build/p-Dh8DSJs_.js +1 -0
- package/components-build/p-N_tqtRV2.js +1 -0
- package/components-build/p-bAMuJ4Jx.js +1 -0
- package/components-build/p-c2z3tneT.js +1 -0
- package/components-build/p-dz9-Q2N8.js +1 -0
- package/{dist/boreal-web-components/p-CaHOghy5.js → components-build/p-fUK0GCeC.js} +1 -1
- package/components-build/p-iq2UuV7c.js +1 -0
- package/components-build/p-nxYzL9uu.js +1 -0
- package/custom-elements.json +2603 -931
- package/dist/boreal-web-components/boreal-web-components.esm.js +1 -1
- package/dist/boreal-web-components/{p-7a4efddd.system.entry.js → p-024d90b0.system.entry.js} +1 -1
- package/dist/boreal-web-components/p-06DrzEMB.system.js +1 -0
- package/dist/boreal-web-components/p-11e4c0ec.system.entry.js +1 -0
- package/dist/boreal-web-components/p-147d6652.system.entry.js +1 -0
- package/dist/boreal-web-components/p-148d510f.entry.js +1 -0
- package/dist/boreal-web-components/{p-2158a7cd.entry.js → p-19f9352d.entry.js} +1 -1
- package/dist/boreal-web-components/{p-41b48701.system.entry.js → p-277f142e.system.entry.js} +1 -1
- package/dist/boreal-web-components/{p-251b3002.entry.js → p-2adf2cd5.entry.js} +1 -1
- package/dist/boreal-web-components/p-2be4aa3a.system.entry.js +1 -0
- package/dist/boreal-web-components/p-340896b2.entry.js +1 -0
- package/dist/boreal-web-components/{p-251d35df.system.entry.js → p-365e8e5c.system.entry.js} +1 -1
- package/dist/boreal-web-components/p-3d4ce8eb.system.entry.js +1 -0
- package/dist/boreal-web-components/p-44a8fde5.entry.js +1 -0
- package/dist/boreal-web-components/{p-52600375.system.entry.js → p-48ebbfbe.system.entry.js} +1 -1
- package/dist/boreal-web-components/{p-ab5ffa15.system.entry.js → p-4dc01078.system.entry.js} +1 -1
- package/dist/boreal-web-components/p-5681b294.system.entry.js +1 -0
- package/dist/boreal-web-components/p-5ed75075.entry.js +1 -0
- package/dist/boreal-web-components/p-635f676b.system.entry.js +1 -0
- package/dist/boreal-web-components/{p-7db870b7.entry.js → p-6629be14.entry.js} +1 -1
- package/dist/boreal-web-components/p-68b83680.system.entry.js +1 -0
- package/dist/boreal-web-components/p-6a60d134.system.entry.js +1 -0
- package/dist/boreal-web-components/{p-66360e63.entry.js → p-71ed1e1d.entry.js} +1 -1
- package/dist/boreal-web-components/{p-b12d4788.system.entry.js → p-732e98f1.system.entry.js} +1 -1
- package/dist/boreal-web-components/{p-80822731.system.entry.js → p-77658a5b.system.entry.js} +1 -1
- package/dist/boreal-web-components/p-7aff4c78.entry.js +1 -0
- package/dist/boreal-web-components/p-7bb88855.entry.js +1 -0
- package/dist/boreal-web-components/p-7d3a8f61.entry.js +1 -0
- package/dist/boreal-web-components/p-7e672cce.entry.js +1 -0
- package/dist/boreal-web-components/{p-1d1bb9d2.entry.js → p-7ebc67c9.entry.js} +1 -1
- package/dist/boreal-web-components/p-81401e2a.system.entry.js +1 -0
- package/dist/boreal-web-components/p-8289e506.entry.js +1 -0
- package/dist/boreal-web-components/p-82d15372.entry.js +1 -0
- package/dist/boreal-web-components/p-851c06f2.entry.js +1 -0
- package/dist/boreal-web-components/p-8a3716ec.entry.js +1 -0
- package/dist/boreal-web-components/p-8f4f8af0.system.entry.js +1 -0
- package/dist/boreal-web-components/{p-871c9a9f.system.entry.js → p-93066db4.system.entry.js} +1 -1
- package/dist/boreal-web-components/p-C-g3hhl_.system.js +1 -0
- package/dist/boreal-web-components/p-C0P3gzq5.system.js +1 -0
- package/dist/boreal-web-components/p-C4HM8wQe.js +1 -0
- package/dist/boreal-web-components/p-CPvuMm5C.js +1 -0
- package/dist/boreal-web-components/p-CRMH6mfq.system.js +1 -0
- package/dist/boreal-web-components/p-CU_dRLdk.system.js +1 -0
- package/dist/boreal-web-components/p-CW4-dkCF.system.js +1 -0
- package/dist/boreal-web-components/{p-BuxZeJbu.system.js → p-DSU8tkVw.system.js} +1 -1
- package/dist/boreal-web-components/p-DYlZcFrB.system.js +1 -0
- package/dist/boreal-web-components/p-DfaYciGa.js +1 -0
- package/dist/boreal-web-components/p-DlVzZK7o.js +1 -0
- package/dist/boreal-web-components/p-DlYG-OVB.js +1 -0
- package/dist/boreal-web-components/p-DnIhjwCH.system.js +1 -0
- package/dist/boreal-web-components/p-DpnBDSUm.system.js +1 -0
- package/dist/boreal-web-components/p-Dwo1hcd9.js +1 -0
- package/{components-build/p-CaHOghy5.js → dist/boreal-web-components/p-U9yfbs7i.js} +1 -1
- package/dist/boreal-web-components/p-a73659ac.system.entry.js +1 -0
- package/dist/boreal-web-components/p-b2ad9535.system.entry.js +1 -0
- package/dist/boreal-web-components/{p-731b88cc.entry.js → p-d4c30d2b.entry.js} +1 -1
- package/dist/boreal-web-components/p-db0c10b9.system.entry.js +1 -0
- package/dist/boreal-web-components/{p-695d0830.entry.js → p-dc7d429c.entry.js} +1 -1
- package/dist/boreal-web-components/p-dca16a3d.entry.js +1 -0
- package/dist/boreal-web-components/p-de846c43.system.entry.js +1 -0
- package/dist/boreal-web-components/p-df087e23.system.entry.js +1 -0
- package/dist/boreal-web-components/p-dfb4854e.entry.js +1 -0
- package/dist/boreal-web-components/p-dz9-Q2N8.js +1 -0
- package/dist/boreal-web-components/p-e09b4d14.system.entry.js +1 -0
- package/dist/boreal-web-components/{p-edca16b6.system.entry.js → p-e0a41cab.system.entry.js} +1 -1
- package/dist/boreal-web-components/{p-127a4134.entry.js → p-e55f2a8b.entry.js} +1 -1
- package/dist/boreal-web-components/p-e7af1e1a.entry.js +1 -0
- package/dist/boreal-web-components/{p-e0bf8a6e.entry.js → p-efe159aa.entry.js} +1 -1
- package/dist/boreal-web-components/{p-44ceff4e.system.entry.js → p-f65e9d0c.system.entry.js} +1 -1
- package/dist/boreal-web-components/p-f792aa74.entry.js +1 -0
- package/dist/boreal-web-components/{p-fc24d963.entry.js → p-fb9a0e94.entry.js} +1 -1
- package/dist/boreal-web-components/p-iq2UuV7c.js +1 -0
- package/dist/boreal-web-components/p-vzZJGcYF.system.js +1 -1
- package/dist/boreal-web-components/p-wREMI3WA.js +1 -0
- package/dist/cjs/Keys-rKl2za5q.js +18 -0
- package/dist/cjs/Logger-DnziItRH.js +51 -0
- package/dist/cjs/{attributes-wIHueigW.js → attributes-CgRFplrN.js} +3 -0
- package/dist/cjs/bds-avatar.cjs.entry.js +2 -2
- package/dist/cjs/bds-badge.cjs.entry.js +1 -1
- package/dist/cjs/bds-banner.cjs.entry.js +2 -2
- package/dist/cjs/bds-button-group.cjs.entry.js +95 -0
- package/dist/cjs/bds-button.cjs.entry.js +7 -13
- package/dist/cjs/bds-checkbox-card.cjs.entry.js +121 -0
- package/dist/cjs/bds-checkbox.cjs.entry.js +13 -6
- package/dist/cjs/bds-dialog.cjs.entry.js +3 -3
- package/dist/cjs/bds-divider.cjs.entry.js +2 -2
- package/dist/cjs/bds-flag.cjs.entry.js +1 -1
- package/dist/cjs/bds-grid-item.cjs.entry.js +1 -1
- package/dist/cjs/bds-grid.cjs.entry.js +1 -1
- package/dist/cjs/bds-list-menu-item.cjs.entry.js +47 -22
- package/dist/cjs/bds-list-menu.cjs.entry.js +90 -21
- package/dist/cjs/bds-popover.cjs.entry.js +5 -4
- package/dist/cjs/bds-radio-button.cjs.entry.js +60 -0
- package/dist/cjs/bds-radio-card.cjs.entry.js +76 -0
- package/dist/cjs/bds-radio-group.cjs.entry.js +285 -0
- package/dist/cjs/bds-radio.cjs.entry.js +60 -0
- package/dist/cjs/bds-spinner.cjs.entry.js +1 -1
- package/dist/cjs/bds-status.cjs.entry.js +1 -1
- package/dist/cjs/bds-tag.cjs.entry.js +1 -1
- package/dist/cjs/bds-text-field.cjs.entry.js +8 -7
- package/dist/cjs/bds-toggle.cjs.entry.js +6 -5
- package/dist/cjs/bds-tooltip_2.cjs.entry.js +9 -8
- package/dist/cjs/boreal-web-components.cjs.js +1 -1
- package/dist/cjs/coreColors-CQGojc0l.js +10 -0
- package/dist/cjs/{enum-DLblRCkQ.js → enum-DeTWfR0D.js} +3 -3
- package/dist/cjs/form-associated.mixin-BCR6bj29.js +33 -0
- package/dist/cjs/{getOffset-m4hBgyVP.js → getOffset-k4ezB-eT.js} +6 -53
- package/dist/cjs/{form-associated.mixin-DXwvF_vW.js → internals-D8x7GMfR.js} +0 -31
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/menu-BxKaEajh.js +8 -0
- package/dist/cjs/orientation-DQAIleEJ.js +8 -0
- package/dist/collection/collection-manifest.json +7 -1
- package/dist/collection/components/actions/bds-button/bds-button.css +19 -19
- package/dist/collection/components/actions/bds-button/bds-button.js +7 -7
- package/dist/collection/components/actions/bds-button/types/enum.js +3 -3
- package/dist/collection/components/actions/bds-button-group/bds-button-group.css +77 -0
- package/dist/collection/components/actions/bds-button-group/bds-button-group.js +245 -0
- package/dist/collection/components/actions/bds-list-menu/bds-list-menu/bds-list-menu.css +27 -1
- package/dist/collection/components/actions/bds-list-menu/bds-list-menu/bds-list-menu.js +148 -49
- package/dist/collection/components/actions/bds-list-menu/bds-list-menu/types/enum.js +4 -0
- package/dist/collection/components/actions/bds-list-menu/bds-list-menu/types/types.js +1 -0
- package/dist/collection/components/actions/bds-list-menu/bds-list-menu-item/bds-list-menu-item.css +25 -9
- package/dist/collection/components/actions/bds-list-menu/bds-list-menu-item/bds-list-menu-item.js +53 -8
- package/dist/collection/components/actions/bds-toggle/bds-toggle.js +1 -1
- package/dist/collection/components/feedback/bds-badge/bds-badge.js +1 -1
- package/dist/collection/components/feedback/bds-banner/bds-banner.js +1 -1
- package/dist/collection/components/feedback/bds-spinner/bds-spinner.js +1 -1
- package/dist/collection/components/feedback/bds-status/bds-status.js +1 -1
- package/dist/collection/components/feedback/bds-tag/bds-tag.js +1 -1
- package/dist/collection/components/forms/bds-checkbox/bds-checkbox.css +9 -8
- package/dist/collection/components/forms/bds-checkbox/bds-checkbox.js +7 -1
- package/dist/collection/components/forms/bds-checkbox-card/bds-checkbox-card.css +127 -0
- package/dist/collection/components/forms/bds-checkbox-card/bds-checkbox-card.js +397 -0
- package/dist/collection/components/forms/bds-checkbox-card/types/ICheckboxCard.js +1 -0
- package/dist/collection/components/forms/bds-flag/bds-flag.js +1 -1
- package/dist/collection/components/forms/bds-radio/bds-radio.css +121 -0
- package/dist/collection/components/forms/bds-radio/bds-radio.js +238 -0
- package/dist/collection/components/forms/bds-radio/types/IRadio.js +1 -0
- package/dist/collection/components/forms/bds-radio-button/bds-radio-button.css +109 -0
- package/dist/collection/components/forms/bds-radio-button/bds-radio-button.js +238 -0
- package/dist/collection/components/forms/bds-radio-button/types/IRadioButton.js +1 -0
- package/dist/collection/components/forms/bds-radio-card/bds-radio-card.css +156 -0
- package/dist/collection/components/forms/bds-radio-card/bds-radio-card.js +307 -0
- package/dist/collection/components/forms/bds-radio-card/types/IRadioCard.js +1 -0
- package/dist/collection/components/forms/bds-radio-group/bds-radio-group.css +55 -0
- package/dist/collection/components/forms/bds-radio-group/bds-radio-group.js +620 -0
- package/dist/collection/components/forms/bds-radio-group/types/IRadioGroup.js +1 -0
- package/dist/collection/components/forms/bds-radio-group/types/enum.js +5 -0
- package/dist/collection/components/forms/bds-radio-group/types/types.js +1 -0
- package/dist/collection/components/forms/bds-text-field/bds-text-field.js +1 -1
- package/dist/collection/components/helpers/{bds-divider.css → bds-divider/bds-divider.css} +12 -4
- package/dist/collection/components/helpers/{bds-divider.js → bds-divider/bds-divider.js} +3 -3
- package/dist/collection/components/helpers/bds-divider/types/IDivider.js +1 -0
- package/dist/collection/components/helpers/bds-divider/types/types.js +1 -0
- package/dist/collection/components/images-icons/bds-avatar/bds-avatar.js +1 -1
- package/dist/collection/components/layouts/bds-grid/grid/bds-grid.js +1 -1
- package/dist/collection/components/layouts/bds-grid/grid-item/bds-grid-item.js +1 -1
- package/dist/collection/components/overlays/bds-dialog/bds-dialog.js +2 -2
- package/dist/collection/components/overlays/bds-popover/bds-popover.js +1 -1
- package/dist/collection/components/overlays/bds-tooltip/bds-tooltip.js +3 -3
- package/dist/collection/components/titles-text/bds-typography/bds-typography.css +5 -0
- package/dist/collection/components/titles-text/bds-typography/bds-typography.js +1 -1
- package/dist/collection/mixins/anchored.mixin.js +2 -2
- package/dist/collection/mixins/links.mixin.js +1 -2
- package/dist/collection/mixins/menu-behavior.mixin.js +11 -5
- package/dist/collection/types/index.js +2 -0
- package/dist/collection/types/orientation.js +4 -0
- package/dist/collection/utils/constants/common/Keys.js +10 -24
- package/dist/collection/utils/menu/menu-item.utils.js +9 -8
- package/dist/collection/utils/testing/helpers.js +10 -0
- package/dist/esm/Keys-DlYG-OVB.js +16 -0
- package/dist/esm/Logger-iq2UuV7c.js +49 -0
- package/dist/esm/{attributes-CaHOghy5.js → attributes-U9yfbs7i.js} +3 -0
- package/dist/esm/bds-avatar.entry.js +2 -2
- package/dist/esm/bds-badge.entry.js +1 -1
- package/dist/esm/bds-banner.entry.js +2 -2
- package/dist/esm/bds-button-group.entry.js +93 -0
- package/dist/esm/bds-button.entry.js +5 -11
- package/dist/esm/bds-checkbox-card.entry.js +119 -0
- package/dist/esm/bds-checkbox.entry.js +11 -4
- package/dist/esm/bds-dialog.entry.js +3 -3
- package/dist/esm/bds-divider.entry.js +2 -2
- package/dist/esm/bds-flag.entry.js +1 -1
- package/dist/esm/bds-grid-item.entry.js +1 -1
- package/dist/esm/bds-grid.entry.js +1 -1
- package/dist/esm/bds-list-menu-item.entry.js +47 -22
- package/dist/esm/bds-list-menu.entry.js +90 -21
- package/dist/esm/bds-popover.entry.js +5 -4
- package/dist/esm/bds-radio-button.entry.js +58 -0
- package/dist/esm/bds-radio-card.entry.js +74 -0
- package/dist/esm/bds-radio-group.entry.js +283 -0
- package/dist/esm/bds-radio.entry.js +58 -0
- package/dist/esm/bds-spinner.entry.js +1 -1
- package/dist/esm/bds-status.entry.js +1 -1
- package/dist/esm/bds-tag.entry.js +1 -1
- package/dist/esm/bds-text-field.entry.js +3 -2
- package/dist/esm/bds-toggle.entry.js +4 -3
- package/dist/esm/bds-tooltip_2.entry.js +9 -8
- package/dist/esm/boreal-web-components.js +1 -1
- package/dist/esm/coreColors-Dwo1hcd9.js +8 -0
- package/dist/esm/{enum-C8mRvnTA.js → enum-DlVzZK7o.js} +4 -4
- package/dist/esm/form-associated.mixin-C4HM8wQe.js +31 -0
- package/dist/esm/{getOffset-DKPjeBHi.js → getOffset-BYS3c13B.js} +4 -51
- package/dist/esm/{form-associated.mixin-CvK2d92c.js → internals-DfaYciGa.js} +1 -31
- package/dist/esm/loader.js +1 -1
- package/dist/esm/menu-dz9-Q2N8.js +6 -0
- package/dist/esm/orientation-CPvuMm5C.js +6 -0
- package/dist/esm-es5/Keys-DlYG-OVB.js +1 -0
- package/dist/esm-es5/Logger-iq2UuV7c.js +1 -0
- package/dist/esm-es5/{attributes-CaHOghy5.js → attributes-U9yfbs7i.js} +1 -1
- package/dist/esm-es5/bds-avatar.entry.js +1 -1
- package/dist/esm-es5/bds-badge.entry.js +1 -1
- package/dist/esm-es5/bds-banner.entry.js +1 -1
- package/dist/esm-es5/bds-button-group.entry.js +1 -0
- package/dist/esm-es5/bds-button.entry.js +1 -1
- package/dist/esm-es5/bds-checkbox-card.entry.js +1 -0
- package/dist/esm-es5/bds-checkbox.entry.js +1 -1
- package/dist/esm-es5/bds-dialog.entry.js +1 -1
- package/dist/esm-es5/bds-divider.entry.js +1 -1
- package/dist/esm-es5/bds-flag.entry.js +1 -1
- package/dist/esm-es5/bds-grid-item.entry.js +1 -1
- package/dist/esm-es5/bds-grid.entry.js +1 -1
- package/dist/esm-es5/bds-list-menu-item.entry.js +1 -1
- package/dist/esm-es5/bds-list-menu.entry.js +1 -1
- package/dist/esm-es5/bds-popover.entry.js +1 -1
- package/dist/esm-es5/bds-radio-button.entry.js +1 -0
- package/dist/esm-es5/bds-radio-card.entry.js +1 -0
- package/dist/esm-es5/bds-radio-group.entry.js +1 -0
- package/dist/esm-es5/bds-radio.entry.js +1 -0
- package/dist/esm-es5/bds-spinner.entry.js +1 -1
- package/dist/esm-es5/bds-status.entry.js +1 -1
- package/dist/esm-es5/bds-tag.entry.js +1 -1
- package/dist/esm-es5/bds-text-field.entry.js +1 -1
- package/dist/esm-es5/bds-toggle.entry.js +1 -1
- package/dist/esm-es5/bds-tooltip_2.entry.js +1 -1
- package/dist/esm-es5/boreal-web-components.js +1 -1
- package/dist/esm-es5/coreColors-Dwo1hcd9.js +1 -0
- package/dist/esm-es5/enum-DlVzZK7o.js +1 -0
- package/dist/esm-es5/form-associated.mixin-C4HM8wQe.js +1 -0
- package/dist/esm-es5/getOffset-BYS3c13B.js +1 -0
- package/dist/esm-es5/internals-DfaYciGa.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/menu-dz9-Q2N8.js +1 -0
- package/dist/esm-es5/orientation-CPvuMm5C.js +1 -0
- package/dist/types/components/actions/bds-button/bds-button.d.ts +4 -4
- package/dist/types/components/actions/bds-button/types/enum.d.ts +3 -3
- package/dist/types/components/actions/bds-button-group/bds-button-group.d.ts +36 -0
- package/dist/types/components/actions/bds-button-group/types/IButtonGroup.d.ts +11 -0
- package/dist/types/components/actions/bds-list-menu/bds-list-menu/bds-list-menu.d.ts +19 -15
- package/dist/types/components/actions/bds-list-menu/bds-list-menu/types/IListMenu.d.ts +14 -0
- package/dist/types/components/actions/bds-list-menu/bds-list-menu/types/enum.d.ts +5 -0
- package/dist/types/components/actions/bds-list-menu/bds-list-menu/types/types.d.ts +3 -0
- package/dist/types/components/actions/bds-list-menu/bds-list-menu-item/bds-list-menu-item.d.ts +8 -2
- package/dist/types/components/actions/bds-list-menu/bds-list-menu-item/types/IListMenuItem.d.ts +1 -0
- package/dist/types/components/forms/bds-checkbox/bds-checkbox.d.ts +2 -0
- package/dist/types/components/forms/bds-checkbox-card/bds-checkbox-card.d.ts +70 -0
- package/dist/types/components/forms/bds-checkbox-card/types/ICheckboxCard.d.ts +8 -0
- package/dist/types/components/forms/bds-radio/bds-radio.d.ts +36 -0
- package/dist/types/components/forms/bds-radio/types/IRadio.d.ts +13 -0
- package/dist/types/components/forms/bds-radio-button/bds-radio-button.d.ts +36 -0
- package/dist/types/components/forms/bds-radio-button/types/IRadioButton.d.ts +13 -0
- package/dist/types/components/forms/bds-radio-card/bds-radio-card.d.ts +57 -0
- package/dist/types/components/forms/bds-radio-card/types/IRadioCard.d.ts +14 -0
- package/dist/types/components/forms/bds-radio-group/bds-radio-group.d.ts +82 -0
- package/dist/types/components/forms/bds-radio-group/types/IRadioGroup.d.ts +19 -0
- package/dist/types/components/forms/bds-radio-group/types/enum.d.ts +6 -0
- package/dist/types/components/forms/bds-radio-group/types/types.d.ts +3 -0
- package/dist/types/components.d.ts +941 -63
- package/dist/types/mixins/menu-behavior.mixin.d.ts +5 -1
- package/dist/types/types/index.d.ts +2 -0
- package/dist/types/types/orientation.d.ts +6 -0
- package/dist/types/utils/constants/common/Keys.d.ts +13 -16
- package/dist/types/utils/menu/menu-item.utils.d.ts +2 -2
- package/dist/types/utils/testing/helpers.d.ts +8 -0
- package/package.json +1 -1
- package/components-build/p-B8n1ru5i.js +0 -1
- package/components-build/p-CGdxFth9.js +0 -1
- package/components-build/p-CrAt6pGl.js +0 -1
- package/components-build/p-DCwT43Kz.js +0 -1
- package/components-build/p-DIY3CDNL.js +0 -1
- package/dist/boreal-web-components/p-0028481c.entry.js +0 -1
- package/dist/boreal-web-components/p-1466de58.system.entry.js +0 -1
- package/dist/boreal-web-components/p-2b8bd1dd.entry.js +0 -1
- package/dist/boreal-web-components/p-32c23246.system.entry.js +0 -1
- package/dist/boreal-web-components/p-3fbcc233.entry.js +0 -1
- package/dist/boreal-web-components/p-401f1aee.system.entry.js +0 -1
- package/dist/boreal-web-components/p-41cac1b8.system.entry.js +0 -1
- package/dist/boreal-web-components/p-627b19a5.system.entry.js +0 -1
- package/dist/boreal-web-components/p-649737e5.entry.js +0 -1
- package/dist/boreal-web-components/p-64cb5825.entry.js +0 -1
- package/dist/boreal-web-components/p-6a99f4c6.system.entry.js +0 -1
- package/dist/boreal-web-components/p-74c13bed.system.entry.js +0 -1
- package/dist/boreal-web-components/p-7f7ac40f.entry.js +0 -1
- package/dist/boreal-web-components/p-82d49661.entry.js +0 -1
- package/dist/boreal-web-components/p-83ca193e.entry.js +0 -1
- package/dist/boreal-web-components/p-BQ_zoZa2.js +0 -1
- package/dist/boreal-web-components/p-C8mRvnTA.js +0 -1
- package/dist/boreal-web-components/p-CdKFZYxk.system.js +0 -1
- package/dist/boreal-web-components/p-CtknSula.system.js +0 -1
- package/dist/boreal-web-components/p-CvK2d92c.js +0 -1
- package/dist/boreal-web-components/p-CzYQb3pP.js +0 -1
- package/dist/boreal-web-components/p-DZcx75cy.system.js +0 -1
- package/dist/boreal-web-components/p-Dme-NuTD.system.js +0 -1
- package/dist/boreal-web-components/p-ba2b625a.system.entry.js +0 -1
- package/dist/boreal-web-components/p-bf2ef10b.entry.js +0 -1
- package/dist/boreal-web-components/p-c7aee9f4.system.entry.js +0 -1
- package/dist/cjs/Keys-DbIXSJF2.js +0 -22
- package/dist/esm/Keys-CzYQb3pP.js +0 -20
- package/dist/esm-es5/Keys-CzYQb3pP.js +0 -1
- package/dist/esm-es5/enum-C8mRvnTA.js +0 -1
- package/dist/esm-es5/form-associated.mixin-CvK2d92c.js +0 -1
- package/dist/esm-es5/getOffset-DKPjeBHi.js +0 -1
- /package/dist/collection/components/{helpers/types/IDivider.js → actions/bds-button-group/types/IButtonGroup.js} +0 -0
- /package/dist/collection/components/{helpers/types/types.js → actions/bds-list-menu/bds-list-menu/types/IListMenu.js} +0 -0
- /package/dist/collection/components/helpers/{types → bds-divider/types}/enum.js +0 -0
- /package/dist/types/components/helpers/{bds-divider.d.ts → bds-divider/bds-divider.d.ts} +0 -0
- /package/dist/types/components/helpers/{types → bds-divider/types}/IDivider.d.ts +0 -0
- /package/dist/types/components/helpers/{types → bds-divider/types}/enum.d.ts +0 -0
- /package/dist/types/components/helpers/{types → bds-divider/types}/types.d.ts +0 -0
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-CwYIVC9N.js');
|
|
4
|
-
var formAssociated_mixin = require('./form-associated.mixin-
|
|
5
|
-
var
|
|
4
|
+
var formAssociated_mixin = require('./form-associated.mixin-BCR6bj29.js');
|
|
5
|
+
var internals = require('./internals-D8x7GMfR.js');
|
|
6
|
+
var attributes = require('./attributes-CgRFplrN.js');
|
|
6
7
|
|
|
7
|
-
const bdsCheckboxCss = () => `@charset "UTF-8";bds-checkbox{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;gap:8px;cursor:pointer;outline:none}bds-checkbox .bds-checkbox__label{font-family:var(--boreal-typography-font-family-primary)}bds-checkbox .bds-checkbox__box{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:
|
|
8
|
+
const bdsCheckboxCss = () => `@charset "UTF-8";bds-checkbox{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;gap:8px;cursor:pointer;outline:none}bds-checkbox .bds-checkbox__label{font-family:var(--boreal-typography-font-family-primary)}bds-checkbox .bds-checkbox__box{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:var(--boreal-layout-m);height:var(--boreal-layout-m);border:var(--boreal-spacing-4xs) solid var(--boreal-stroke-default-light);background:transparent;-webkit-transition:all 0.2s ease;transition:all 0.2s ease;border-radius:4px}bds-checkbox:hover .bds-checkbox__box{border-color:var(--boreal-stroke-default-light)}bds-checkbox:focus-visible .bds-checkbox__box{border-color:var(--boreal-stroke-focus);outline:2px solid var(--boreal-stroke-focus);outline-offset:1px}bds-checkbox:active .bds-checkbox__box{border-color:var(--boreal-stroke-default-light);background:var(--boreal-bg-neutral);outline:2px solid var(--boreal-stroke-primary-light)}bds-checkbox.bds-checkbox--checked .bds-checkbox__box{border-color:var(--boreal-ui-primary-base);background:var(--boreal-ui-primary-base);color:var(--boreal-ui-inverse)}bds-checkbox.bds-checkbox--checked:hover .bds-checkbox__box{border-color:var(--boreal-ui-primary-dark);background:var(--boreal-ui-primary-dark)}bds-checkbox.bds-checkbox--checked:focus-visible .bds-checkbox__box{border-color:var(--boreal-ui-primary-base);background:var(--boreal-ui-primary-base);outline:2px solid var(--boreal-stroke-focus)}bds-checkbox.bds-checkbox--checked:active .bds-checkbox__box{border-color:var(--boreal-ui-primary-dark);background:var(--boreal-ui-primary-dark)}bds-checkbox.bds-checkbox--error .bds-checkbox__box{border-color:var(--boreal-stroke-danger-base)}bds-checkbox.bds-checkbox--error.bds-checkbox--checked .bds-checkbox__box,bds-checkbox.bds-checkbox--error.bds-checkbox--indeterminate .bds-checkbox__box{color:var(--boreal-ui-inverse);border-color:var(--boreal-stroke-danger-base);background:var(--boreal-stroke-danger-base)}bds-checkbox.bds-checkbox--disabled{pointer-events:none}bds-checkbox.bds-checkbox--disabled .bds-checkbox__box{border-color:var(--boreal-stroke-default-light);background:var(--boreal-bg-neutral)}bds-checkbox.bds-checkbox--disabled .bds-checkbox__label{color:var(--boreal-text-disabled)}bds-checkbox.bds-checkbox--disabled.bds-checkbox--checked .bds-checkbox__box,bds-checkbox.bds-checkbox--disabled.bds-checkbox--indeterminate .bds-checkbox__box{border-color:var(--boreal-ui-primary-light);background:var(--boreal-ui-primary-light);color:#fff}`;
|
|
8
9
|
|
|
9
10
|
const BdsCheckbox = class extends index.Mixin(formAssociated_mixin.formAssociatedMixin) {
|
|
10
11
|
constructor(hostRef) {
|
|
@@ -77,7 +78,7 @@ const BdsCheckbox = class extends index.Mixin(formAssociated_mixin.formAssociate
|
|
|
77
78
|
formResetCallback() {
|
|
78
79
|
this.checked = false;
|
|
79
80
|
this.indeterminate = false;
|
|
80
|
-
|
|
81
|
+
internals.setFormValue(this.internals, null);
|
|
81
82
|
}
|
|
82
83
|
formStateRestoreCallback(state, _mode) {
|
|
83
84
|
this.checked = state === this.value;
|
|
@@ -90,7 +91,7 @@ const BdsCheckbox = class extends index.Mixin(formAssociated_mixin.formAssociate
|
|
|
90
91
|
// Private helpers
|
|
91
92
|
// ---------------------------------------------------------------------------
|
|
92
93
|
syncFormValue() {
|
|
93
|
-
|
|
94
|
+
internals.setFormValue(this.internals, this.checked ? this.value : null);
|
|
94
95
|
}
|
|
95
96
|
toggle() {
|
|
96
97
|
if (this.isDisabled)
|
|
@@ -108,6 +109,9 @@ const BdsCheckbox = class extends index.Mixin(formAssociated_mixin.formAssociate
|
|
|
108
109
|
return 'mixed';
|
|
109
110
|
return this.checked ? 'true' : 'false';
|
|
110
111
|
}
|
|
112
|
+
get hideFromScreenReaders() {
|
|
113
|
+
return this.el.closest('bds-checkbox-card') !== null || this.isDisabled;
|
|
114
|
+
}
|
|
111
115
|
renderCheckIcon() {
|
|
112
116
|
if (this.indeterminate) {
|
|
113
117
|
return (index.h("svg", { class: "bds-checkbox__icon", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, index.h("path", { d: "M4 8h8", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round" })));
|
|
@@ -117,6 +121,9 @@ const BdsCheckbox = class extends index.Mixin(formAssociated_mixin.formAssociate
|
|
|
117
121
|
}
|
|
118
122
|
return null;
|
|
119
123
|
}
|
|
124
|
+
get canShowLabel() {
|
|
125
|
+
return this.label !== undefined && this.label !== null;
|
|
126
|
+
}
|
|
120
127
|
// ---------------------------------------------------------------------------
|
|
121
128
|
// Render
|
|
122
129
|
// ---------------------------------------------------------------------------
|
|
@@ -128,7 +135,7 @@ const BdsCheckbox = class extends index.Mixin(formAssociated_mixin.formAssociate
|
|
|
128
135
|
'bds-checkbox--error': this.error,
|
|
129
136
|
'bds-checkbox--disabled': this.isDisabled,
|
|
130
137
|
};
|
|
131
|
-
return (index.h(index.Host, { key: '
|
|
138
|
+
return (index.h(index.Host, { key: 'd5346e9f5943d81df215268f2c9ad3253941c3c8', class: classes, ...this.inheritedAttributes, role: "checkbox", "aria-checked": this.getAriaChecked(), "aria-disabled": this.isDisabled ? 'true' : null, "aria-hidden": this.hideFromScreenReaders ? 'true' : null, tabindex: this.hideFromScreenReaders ? -1 : 0, onClick: this.handleClick, onKeyDown: this.handleKeyDown }, index.h("span", { key: '217759044655c827609956b4d574fce3ce90c996', class: "bds-checkbox__box" }, this.renderCheckIcon()), this.canShowLabel && (index.h("span", { key: '47b8120c25700fe6e07e8d626c0acb28ac9387d7', class: "bds-checkbox__label" }, this.label.trim() !== '' ? this.label : index.h("slot", null)))));
|
|
132
139
|
}
|
|
133
140
|
static get formAssociated() { return true; }
|
|
134
141
|
get el() { return index.getElement(this); }
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var index = require('./index-CwYIVC9N.js');
|
|
4
4
|
var floating_mixin = require('./floating.mixin-Bje4320w.js');
|
|
5
|
-
var attributes = require('./attributes-
|
|
5
|
+
var attributes = require('./attributes-CgRFplrN.js');
|
|
6
6
|
var validateProps = require('./validateProps-CJe9X5x8.js');
|
|
7
7
|
var states = require('./states-BweP5Vpu.js');
|
|
8
8
|
|
|
@@ -356,10 +356,10 @@ const BdsDialog = class extends index.Mixin(backdropMixin) {
|
|
|
356
356
|
}
|
|
357
357
|
render() {
|
|
358
358
|
const inheritedAriaAttr = this.inheritedAttributes;
|
|
359
|
-
return (index.h("dialog", { key: '
|
|
359
|
+
return (index.h("dialog", { key: '58ef2571b3c6d4fcc4ac85f8536bbb9168651e02', onClick: e => this.handleBackdropClick(e), onKeyDown: e => this.handleKeydown(e), onTransitionEnd: this.onDialogTransitionEnd, ref: el => {
|
|
360
360
|
if (el !== undefined)
|
|
361
361
|
this.dialogElement = el;
|
|
362
|
-
}, style: { ...this.getFixedSize() }, ...(this.titleDialog.length > 0 && { 'aria-labelledby': 'bds-dialog-title' }), ...inheritedAriaAttr }, index.h("div", { key: '
|
|
362
|
+
}, style: { ...this.getFixedSize() }, ...(this.titleDialog.length > 0 && { 'aria-labelledby': 'bds-dialog-title' }), ...inheritedAriaAttr }, index.h("div", { key: 'fa95d799c99e48ac7b02602d62d79e9919d7b711', class: this.getStyles() }, this.layout !== DIALOG_LAYOUT.HEADERLESS && (index.h("div", { key: '7460a77b2caf914ddf871804ce6c37fbb186b9ef', class: "bds-dialog__header" }, this.getHeaderLeftElement(), this.getHeaderRightElement())), index.h("div", { key: '1537a32b06b9e5ca0329d360a15f407ac8bb6d4f', class: `bds-dialog__body ${this.contentPadding === 'none' ? 'bds-dialog--no-padding' : ''}` }, index.h("slot", { key: 'e45a2fd2507303ab1af63983ff1cb5a3db1b955b' })), this.layout !== DIALOG_LAYOUT.FOOTERLESS && (index.h("div", { key: 'c258f33a42fff5e88b2846c788bac219fa90fe63', class: "bds-dialog__footer" }, index.h("slot", { key: 'b64483b7004e01f2ecaa11fc4b144277a20d0204', name: "footer" }))))));
|
|
363
363
|
}
|
|
364
364
|
get el() { return index.getElement(this); }
|
|
365
365
|
static get watchers() { return {
|
|
@@ -8,7 +8,7 @@ const DIVIDER_ORIENTATIONS = {
|
|
|
8
8
|
VERTICAL: 'vertical',
|
|
9
9
|
};
|
|
10
10
|
|
|
11
|
-
const bdsDividerCss = () => `@charset "UTF-8";bds-divider[orientation=vertical]{display:
|
|
11
|
+
const bdsDividerCss = () => `@charset "UTF-8";bds-divider{}bds-divider[orientation=vertical]{display:-ms-flexbox;display:flex;-ms-flex-item-align:stretch;align-self:stretch;margin-inline:var(--bds-divider-gap, 0px)}bds-divider[orientation=horizontal]{display:block;width:100%;margin-block:var(--bds-divider-gap, 0px)}.bds-divider{background-color:var(--bds-divider-color, var(--boreal-ui-default-lighter))}.bds-divider--horizontal{width:100%;height:var(--boreal-spacing-4xs)}.bds-divider--vertical{-ms-flex:1;flex:1;width:var(--boreal-spacing-4xs)}`;
|
|
12
12
|
|
|
13
13
|
const BdsDivider = class {
|
|
14
14
|
constructor(hostRef) {
|
|
@@ -32,7 +32,7 @@ const BdsDivider = class {
|
|
|
32
32
|
this.checkPropValues();
|
|
33
33
|
}
|
|
34
34
|
render() {
|
|
35
|
-
return index.h("div", { key: '
|
|
35
|
+
return index.h("div", { key: 'd89008b1a2cddddb925ee1e6e7c4cb7110ab6bd1', part: "divider", class: this.orientationClass, role: "separator", "aria-orientation": this.orientation });
|
|
36
36
|
}
|
|
37
37
|
get el() { return index.getElement(this); }
|
|
38
38
|
static get watchers() { return {
|
|
@@ -2931,7 +2931,7 @@ const BdsFlag = class {
|
|
|
2931
2931
|
const flagContentClass = this.flagContentClass;
|
|
2932
2932
|
const flagClass = this.flagClass;
|
|
2933
2933
|
const flagStyle = !this.isGlobal ? { backgroundImage: `url(${this.flagUrl(flag)})` } : {};
|
|
2934
|
-
return (index.h(index.Host, { key: '
|
|
2934
|
+
return (index.h(index.Host, { key: 'a8a3ef0fefd3e7b1d4c9fd40bf5ea82ce9000815', class: flagClass, "aria-label": countryName, role: "img" }, flag && index.h("span", { key: 'ea653c06af2a3c3341c95acd1750bdbbbd08f268', class: flagContentClass, style: flagStyle, "aria-hidden": "true" }), index.h("span", { key: '289fcc0f0d247f02b79493fd34aca190c985ed45', class: "bds-flag__country", "aria-hidden": "true" }, countryName)));
|
|
2935
2935
|
}
|
|
2936
2936
|
static get assetsDirs() { return ["./constants"]; }
|
|
2937
2937
|
get el() { return index.getElement(this); }
|
|
@@ -58,7 +58,7 @@ const BdsGridItem = class {
|
|
|
58
58
|
return styles;
|
|
59
59
|
}
|
|
60
60
|
render() {
|
|
61
|
-
return (index.h(index.Host, { key: '
|
|
61
|
+
return (index.h(index.Host, { key: 'e16ec21f8fcabbf3091ed3469a120aaff37f4274', style: this.getHostStyles() }, index.h("slot", { key: 'b1fa7e071660a4f4f50d9fd31ee9646069678d10' })));
|
|
62
62
|
}
|
|
63
63
|
get el() { return index.getElement(this); }
|
|
64
64
|
static get watchers() { return {
|
|
@@ -23,7 +23,7 @@ const BdsGrid = class {
|
|
|
23
23
|
this.checkPropValues();
|
|
24
24
|
}
|
|
25
25
|
render() {
|
|
26
|
-
return (index.h(index.Host, { key: '
|
|
26
|
+
return (index.h(index.Host, { key: '52672cc265a59d6556eb4ae677c650b19696dbdc', class: { 'bds-grid--fixed': this.layout === GRID_LAYOUT.FIXED }, style: { ...(this.rowGap && { 'row-gap': this.rowGap }) } }, index.h("slot", { key: '6c0f0b89777a754a91d273838940cd8721b79d5c' })));
|
|
27
27
|
}
|
|
28
28
|
get el() { return index.getElement(this); }
|
|
29
29
|
static get watchers() { return {
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
var index = require('./index-CwYIVC9N.js');
|
|
4
4
|
var states = require('./states-BweP5Vpu.js');
|
|
5
|
+
var menu = require('./menu-BxKaEajh.js');
|
|
5
6
|
var validateProps = require('./validateProps-CJe9X5x8.js');
|
|
6
|
-
var Keys = require('./Keys-
|
|
7
|
+
var Keys = require('./Keys-rKl2za5q.js');
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* Resolves the appropriate ARIA role for a menu item.
|
|
@@ -31,20 +32,18 @@ function resolveAriaSelected(role, selected) {
|
|
|
31
32
|
* Resolves the tabIndex attribute for keyboard navigation.
|
|
32
33
|
* @param {MenuItemRole} role - The role of the item.
|
|
33
34
|
* @param {boolean} disabled - Whether the item is currently disabled.
|
|
34
|
-
* @param {boolean} selected - Whether the item is currently selected.
|
|
35
35
|
* @param {boolean} active - Whether the item is currently active.
|
|
36
36
|
* @returns {number} - Returns 0 for focusable menu items, or -1 for disabled/options.
|
|
37
37
|
* @example
|
|
38
38
|
* const index = resolveTabIndex('menuitem', false); // returns 0
|
|
39
39
|
* const indexDisabled = resolveTabIndex('menuitem', true); // returns -1
|
|
40
40
|
*/
|
|
41
|
-
function resolveTabIndex(role, disabled,
|
|
41
|
+
function resolveTabIndex(role, disabled, active) {
|
|
42
42
|
if (disabled)
|
|
43
43
|
return -1;
|
|
44
|
-
if (role === 'option')
|
|
45
|
-
return selected || active ? 0 : -1;
|
|
46
|
-
if (role === 'menuitem')
|
|
44
|
+
if (role === 'option' || role === 'menuitem') {
|
|
47
45
|
return active ? 0 : -1;
|
|
46
|
+
}
|
|
48
47
|
return -1;
|
|
49
48
|
}
|
|
50
49
|
/**
|
|
@@ -52,6 +51,7 @@ function resolveTabIndex(role, disabled, selected, active) {
|
|
|
52
51
|
* @param {KeyboardEvent} event - The keyboard event object from the listener.
|
|
53
52
|
* @param {HTMLElement[]} items - An array of focusable HTML elements within the menu.
|
|
54
53
|
* @param {number} currentIndex - The index of the currently focused item.
|
|
54
|
+
* @param {boolean} selected - The current selection state of the item (used for activation logic).
|
|
55
55
|
* @returns {void}
|
|
56
56
|
* @example
|
|
57
57
|
* handleMenuKeyNavigation(event, menuItems, 2);
|
|
@@ -61,16 +61,18 @@ function handleMenuKeyNavigation(event, items, currentIndex) {
|
|
|
61
61
|
return;
|
|
62
62
|
let nextIndex = -1;
|
|
63
63
|
switch (event.key) {
|
|
64
|
-
case Keys.KEYBOARD.ArrowDown
|
|
64
|
+
case Keys.KEYBOARD.ArrowDown:
|
|
65
65
|
nextIndex = (currentIndex + 1) % items.length;
|
|
66
66
|
break;
|
|
67
|
-
case Keys.KEYBOARD.ArrowUp
|
|
67
|
+
case Keys.KEYBOARD.ArrowUp:
|
|
68
68
|
nextIndex = (currentIndex - 1 + items.length) % items.length;
|
|
69
69
|
break;
|
|
70
70
|
default:
|
|
71
71
|
return;
|
|
72
72
|
}
|
|
73
|
+
items.forEach(item => item.removeAttribute('active-item'));
|
|
73
74
|
items[nextIndex].focus();
|
|
75
|
+
items[nextIndex].setAttribute('active-item', '');
|
|
74
76
|
}
|
|
75
77
|
/** Prevents default browser behavior for specific navigation keys.
|
|
76
78
|
* @param {KeyboardEvent} e - The keyboard event to evaluate.
|
|
@@ -80,7 +82,7 @@ function handleMenuKeyNavigation(event, items, currentIndex) {
|
|
|
80
82
|
* preventNavigationKeys(event);
|
|
81
83
|
*/
|
|
82
84
|
function preventNavigationKeys(e) {
|
|
83
|
-
const navigationKeys = [Keys.KEYBOARD.ArrowDown
|
|
85
|
+
const navigationKeys = [Keys.KEYBOARD.ArrowDown, Keys.KEYBOARD.ArrowUp, Keys.KEYBOARD.Enter, Keys.KEYBOARD.Space];
|
|
84
86
|
if (navigationKeys.includes(e.key)) {
|
|
85
87
|
e.preventDefault();
|
|
86
88
|
}
|
|
@@ -97,7 +99,6 @@ function preventNavigationKeys(e) {
|
|
|
97
99
|
* - Computation of aria-selected and tabIndex attributes for accessibility.
|
|
98
100
|
* - A method to handle keyboard navigation (Arrow keys, Enter, Space) within the menu context.
|
|
99
101
|
*
|
|
100
|
-
*
|
|
101
102
|
* @typeParam B - The base constructor type.
|
|
102
103
|
* @param {B} Base - The base component class to be extended.
|
|
103
104
|
* @returns {MenuBehaviorMixin} - A class with injected menu behaviors.
|
|
@@ -144,12 +145,19 @@ const MenuItemBehavior = (Base) => {
|
|
|
144
145
|
this.selected = false;
|
|
145
146
|
this.activeItem = false;
|
|
146
147
|
}
|
|
148
|
+
/**
|
|
149
|
+
* Finds the closest parent element with a role of 'menu' or 'listbox'.
|
|
150
|
+
* @returns {HTMLElement | null} - The parent menu or listbox element, or null if not found.
|
|
151
|
+
*/
|
|
152
|
+
get parent() {
|
|
153
|
+
return this.el.closest('[role="menu"], [role="listbox"]');
|
|
154
|
+
}
|
|
147
155
|
/**
|
|
148
156
|
* Detects the ARIA role of the nearest parent menu or listbox.
|
|
149
157
|
* @returns {MenuRole | null} - 'menu', 'listbox', or null if not found.
|
|
150
158
|
*/
|
|
151
159
|
get parentRole() {
|
|
152
|
-
const parent = this.
|
|
160
|
+
const parent = this.parent;
|
|
153
161
|
return parent !== null ? parent.getAttribute('role') : null;
|
|
154
162
|
}
|
|
155
163
|
/**
|
|
@@ -172,7 +180,7 @@ const MenuItemBehavior = (Base) => {
|
|
|
172
180
|
* @returns {number} 0 for focusable menu items, -1 otherwise.
|
|
173
181
|
*/
|
|
174
182
|
get itemTabIndex() {
|
|
175
|
-
return resolveTabIndex(this.menuItemRole, this.disabled, this.
|
|
183
|
+
return resolveTabIndex(this.menuItemRole, this.disabled, this.activeItem);
|
|
176
184
|
}
|
|
177
185
|
/**
|
|
178
186
|
* Processes keyboard events for arrow navigation and activation.
|
|
@@ -184,11 +192,11 @@ const MenuItemBehavior = (Base) => {
|
|
|
184
192
|
*/
|
|
185
193
|
handleKeyDownLogic(e, onActivate) {
|
|
186
194
|
preventNavigationKeys(e);
|
|
187
|
-
if (e.key === Keys.KEYBOARD.Enter
|
|
195
|
+
if (e.key === Keys.KEYBOARD.Enter || e.key === Keys.KEYBOARD.Space) {
|
|
188
196
|
onActivate();
|
|
189
197
|
return;
|
|
190
198
|
}
|
|
191
|
-
const parent = this.
|
|
199
|
+
const parent = this.parent;
|
|
192
200
|
if (parent === null)
|
|
193
201
|
return;
|
|
194
202
|
const items = Array.from(parent.querySelectorAll(`${this.el.tagName.toLocaleLowerCase()}:not([disabled]):not([variant="label"])`));
|
|
@@ -292,8 +300,7 @@ const WithLinks = (Base) => {
|
|
|
292
300
|
handleLinkKeyDown(event) {
|
|
293
301
|
if (!this.isLink)
|
|
294
302
|
return;
|
|
295
|
-
if (this.el.tagName.toLowerCase() !== 'a' &&
|
|
296
|
-
(event.key === Keys.KEYBOARD.Enter.key || event.key === Keys.KEYBOARD.Space.key)) {
|
|
303
|
+
if (this.el.tagName.toLowerCase() !== 'a' && (event.key === Keys.KEYBOARD.Enter || event.key === Keys.KEYBOARD.Space)) {
|
|
297
304
|
event.preventDefault();
|
|
298
305
|
this.handleLinkClick(new MouseEvent('click', { bubbles: true, cancelable: true }));
|
|
299
306
|
}
|
|
@@ -357,13 +364,13 @@ const LIST_MENU_ITEM_VARIANTS = {
|
|
|
357
364
|
BUTTON: 'button',
|
|
358
365
|
};
|
|
359
366
|
|
|
360
|
-
const bdsListMenuItemCss = () => `@charset "UTF-8";.bds-list-item,.bds-list-item__content
|
|
367
|
+
const bdsListMenuItemCss = () => `@charset "UTF-8";.bds-list-item,.bds-list-item__content{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.bds-list-item{width:100%;vertical-align:middle;position:relative;color:var(--boreal-text-default);font-style:normal;font-family:var(--boreal-typography-font-family-primary);font-weight:var(--boreal-typography-font-weight-regular)}.bds-list-item__content{-ms-flex-pack:justify;justify-content:space-between;-ms-flex:1;flex:1;vertical-align:middle;gap:var(--boreal-spacing-3xs)}.bds-list-item__content-left,.bds-list-item__content-right{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;vertical-align:middle}.bds-list-item__content-left__icon,.bds-list-item__content-left__text{display:inline-block;vertical-align:middle;font-style:normal;font-size:var(--boreal-typography-font-size-sm);line-height:var(--boreal-typography-line-height-xs)}.bds-list-item__content-left__icon:not(:empty){padding-right:var(--boreal-spacing-3xs)}.bds-list-item__content [class*=bds-icon-]{font-size:var(--boreal-typography-font-size-md)}.bds-list-item--button{cursor:pointer;padding:var(--boreal-spacing-1xs) var(--boreal-spacing-s);-webkit-transition:background-color 0.3s ease, border-color 0.3s ease, -webkit-box-shadow 0.3s ease;transition:background-color 0.3s ease, border-color 0.3s ease, -webkit-box-shadow 0.3s ease;transition:background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;transition:background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, -webkit-box-shadow 0.3s ease}.bds-list-item--button:not(.bds-list-item--disabled):hover:not([selected]){background-color:var(--boreal-ui-default-lighter);z-index:1}.bds-list-item--button:not(.bds-list-item--disabled):focus,.bds-list-item--button:not(.bds-list-item--disabled):focus-visible{outline:none;-webkit-box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus);box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus);z-index:1}.bds-list-item--button:not(.bds-list-item--disabled):active,.bds-list-item--button:not(.bds-list-item--disabled).bds-list-item--state-active{-webkit-box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus), 0 1px 2px 0 rgba(19, 19, 22, 0.15) inset;box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus), 0 1px 2px 0 rgba(19, 19, 22, 0.15) inset;background-color:var(--boreal-ui-default-lighter);z-index:1}.bds-list-item--selected{background-color:var(--boreal-ui-primary-lighter)}.bds-list-item--disabled{color:var(--boreal-text-disabled);cursor:not-allowed}.bds-list-item--label{cursor:default;padding:var(--boreal-spacing-3xs) 0}.bds-list-item--label .bds-typography label{color:var(--boreal-text-default-light)}`;
|
|
361
368
|
|
|
362
369
|
const BdsListMenuItem = class extends index.Mixin(MenuItemBehavior, WithLinks) {
|
|
363
370
|
constructor(hostRef) {
|
|
364
371
|
super();
|
|
365
372
|
index.registerInstance(this, hostRef);
|
|
366
|
-
this.
|
|
373
|
+
this.bdsSelectItem = index.createEvent(this, "bdsSelectItem");
|
|
367
374
|
/**
|
|
368
375
|
* Defines the visual style of the list menu item.
|
|
369
376
|
* - 'button': A standard clickable item.
|
|
@@ -378,6 +385,8 @@ const BdsListMenuItem = class extends index.Mixin(MenuItemBehavior, WithLinks) {
|
|
|
378
385
|
this.selected = false;
|
|
379
386
|
/** Value associated with the menu item */
|
|
380
387
|
this.value = '';
|
|
388
|
+
/** Checkable state item, if is activated should be visible a checkbox */
|
|
389
|
+
this.checkable = false;
|
|
381
390
|
/** Active state item */
|
|
382
391
|
this.activeItem = false;
|
|
383
392
|
/** Link behavior props */
|
|
@@ -392,11 +401,14 @@ const BdsListMenuItem = class extends index.Mixin(MenuItemBehavior, WithLinks) {
|
|
|
392
401
|
this.handleClick = (e) => {
|
|
393
402
|
if (this.disabled || this.isLabelVariant)
|
|
394
403
|
return;
|
|
404
|
+
e.stopPropagation();
|
|
395
405
|
if (this.isLink) {
|
|
396
406
|
this.handleLinkClick(e);
|
|
397
407
|
return;
|
|
398
408
|
}
|
|
399
|
-
this.
|
|
409
|
+
if (this.checkable && this.parentRole !== menu.MENU_ROLES.LISTBOX)
|
|
410
|
+
this.selected = !this.selected;
|
|
411
|
+
this.bdsSelectItem.emit({
|
|
400
412
|
value: this.value,
|
|
401
413
|
selected: !this.selected,
|
|
402
414
|
});
|
|
@@ -409,7 +421,7 @@ const BdsListMenuItem = class extends index.Mixin(MenuItemBehavior, WithLinks) {
|
|
|
409
421
|
// If the item is a link, we dont activate this animation
|
|
410
422
|
if (!this.isLink || this.linkAttributes.download !== undefined) {
|
|
411
423
|
this.currentState =
|
|
412
|
-
e.key === Keys.KEYBOARD.Enter
|
|
424
|
+
e.key === Keys.KEYBOARD.Enter || e.key === Keys.KEYBOARD.Space ? states.COMPONENT_STATES.ACTIVE : this.currentState;
|
|
413
425
|
}
|
|
414
426
|
};
|
|
415
427
|
/** Event to handle keyup navigation and reset active state */
|
|
@@ -426,6 +438,14 @@ const BdsListMenuItem = class extends index.Mixin(MenuItemBehavior, WithLinks) {
|
|
|
426
438
|
componentWillLoad() {
|
|
427
439
|
this.checkPropsVariant();
|
|
428
440
|
}
|
|
441
|
+
/** Improve aria resolve for checkable items */
|
|
442
|
+
get menuItemRoleExtended() {
|
|
443
|
+
if (!this.checkable)
|
|
444
|
+
return this.menuItemRole;
|
|
445
|
+
if (this.parentRole === 'listbox')
|
|
446
|
+
return 'checkbox';
|
|
447
|
+
return 'menuitemcheckbox';
|
|
448
|
+
}
|
|
429
449
|
/** Checks if the variant is a label */
|
|
430
450
|
get isLabelVariant() {
|
|
431
451
|
return this.variant === LIST_MENU_ITEM_VARIANTS.LABEL;
|
|
@@ -444,9 +464,14 @@ const BdsListMenuItem = class extends index.Mixin(MenuItemBehavior, WithLinks) {
|
|
|
444
464
|
renderTypeLabel() {
|
|
445
465
|
return (index.h("bds-typography", { variant: "label", element: "label", align: "start", role: "presentation" }, index.h("slot", { name: "left-content" }), " ", index.h("slot", null)));
|
|
446
466
|
}
|
|
467
|
+
renderCheckbox() {
|
|
468
|
+
if (!this.checkable)
|
|
469
|
+
return null;
|
|
470
|
+
return (index.h("bds-checkbox", { checked: this.selected, disabled: this.disabled, name: `checkbox-${this.value}`, tabindex: "-1", style: { pointerEvents: 'none' }, inert: true }));
|
|
471
|
+
}
|
|
447
472
|
/** Return the render for the button variant of the list menu item */
|
|
448
473
|
renderTypeButton() {
|
|
449
|
-
return (index.h("div", { class: "bds-list-item__content" }, index.h("div", { class: "bds-list-item__content
|
|
474
|
+
return (index.h("div", { class: "bds-list-item__content" }, index.h("div", { class: "bds-list-item__content-left" }, this.renderCheckbox(), index.h("span", { class: "bds-list-item__content-left__icon" }, index.h("slot", { name: "left-content" })), index.h("span", { class: "bds-list-item__content-left__text" }, index.h("slot", null))), index.h("div", { class: "bds-list-item__content-right" }, index.h("slot", { name: "right-content" }))));
|
|
450
475
|
}
|
|
451
476
|
/** Main render */
|
|
452
477
|
render() {
|
|
@@ -454,7 +479,7 @@ const BdsListMenuItem = class extends index.Mixin(MenuItemBehavior, WithLinks) {
|
|
|
454
479
|
if (this.isLabelVariant)
|
|
455
480
|
renderItem = this.renderTypeLabel();
|
|
456
481
|
const linkAttributes = this.isLink ? { ...this.linkAttributes, tabindex: this.activeItem ? 0 : -1 } : {};
|
|
457
|
-
return (index.h(index.Host, { key: '
|
|
482
|
+
return (index.h(index.Host, { key: '0882d4cb677f6621518113c48e92d7e94cb71916', class: this.classMap, role: this.isLabelVariant ? 'presentation' : this.menuItemRoleExtended, "aria-selected": !this.checkable ? this.ariaSelected : false, "aria-checked": this.checkable ? this.ariaSelected : undefined, ...linkAttributes, tabIndex: this.isLabelVariant ? -1 : this.itemTabIndex, onClick: this.handleClick, onKeyDown: this.handleKeyDown, onKeyUp: this.handleKeyUp }, renderItem));
|
|
458
483
|
}
|
|
459
484
|
get el() { return index.getElement(this); }
|
|
460
485
|
static get watchers() { return {
|
|
@@ -1,28 +1,45 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-CwYIVC9N.js');
|
|
4
|
+
var menu = require('./menu-BxKaEajh.js');
|
|
5
|
+
var attributes = require('./attributes-CgRFplrN.js');
|
|
6
|
+
var validateProps = require('./validateProps-CJe9X5x8.js');
|
|
4
7
|
|
|
5
|
-
const
|
|
8
|
+
const LIST_MENU_SELECTION_MODE = {
|
|
9
|
+
SINGLE: 'single',
|
|
10
|
+
MULTIPLE: 'multiple',
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
const bdsListMenuCss = () => `@charset "UTF-8";:host{display:block}.bds-list-menu{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;max-width:var(--bds-list-menu-max-width, 350px);background-color:var(--boreal-ui-inverse);font-family:var(--boreal-typography-font-family-primary)}.bds-list-menu__content{max-height:var(--bds-list-menu-max-height, 240px);overflow-y:auto;padding:var(--boreal-spacing-2xs)}.bds-list-menu__select-controls{display:-ms-flexbox;display:flex;-ms-flex-pack:distribute;justify-content:space-around;border-bottom:var(--boreal-spacing-4xs) solid var(--boreal-ui-default-lighter);margin-bottom:var(--boreal-spacing-3xs)}.bds-list-menu__header:not(:empty),.bds-list-menu__footer:not(:empty){padding:var(--boreal-spacing-xs) 0}.bds-list-menu__header:not(:empty){border-bottom:var(--boreal-spacing-4xs) solid var(--boreal-ui-default-lighter)}.bds-list-menu__footer:not(:empty){border-top:var(--boreal-spacing-4xs) solid var(--boreal-ui-default-lighter)}`;
|
|
6
14
|
|
|
7
15
|
const BdsListMenu = class {
|
|
8
16
|
constructor(hostRef) {
|
|
9
17
|
index.registerInstance(this, hostRef);
|
|
10
18
|
this.bdsChange = index.createEvent(this, "bdsChange");
|
|
11
|
-
this.
|
|
12
|
-
|
|
13
|
-
this.
|
|
19
|
+
this.bdsSelect = index.createEvent(this, "bdsSelect");
|
|
20
|
+
// Object to store inherited aria attributes
|
|
21
|
+
this.inheritedAttributes = {};
|
|
22
|
+
/** The selection mode of the menu. Can be 'SINGLE' or 'MULTIPLE'. Default is 'SINGLE'. */
|
|
23
|
+
this.selectionMode = LIST_MENU_SELECTION_MODE.SINGLE;
|
|
14
24
|
/** Defines the ARIA role of the menu. Can be 'menu' or 'listbox'. Default is 'menu'. */
|
|
15
|
-
this.menuRole =
|
|
25
|
+
this.menuRole = menu.MENU_ROLES.MENU;
|
|
26
|
+
/** Determines if the menu items have selectall/deselectall controls */
|
|
27
|
+
this.selectControls = false;
|
|
16
28
|
/** State to manage selected values */
|
|
17
29
|
this.selectedValues = [];
|
|
18
30
|
}
|
|
31
|
+
/** Verify props to be valid */
|
|
32
|
+
checkProps() {
|
|
33
|
+
validateProps.validatePropValue(Object.values(menu.MENU_ROLES), menu.MENU_ROLES.MENU, this.el, 'menuRole');
|
|
34
|
+
validateProps.validatePropValue(Object.values(LIST_MENU_SELECTION_MODE), LIST_MENU_SELECTION_MODE.SINGLE, this.el, 'selectionMode');
|
|
35
|
+
}
|
|
19
36
|
/**
|
|
20
37
|
* Retrieves the currently selected value(s) programmatically.
|
|
21
38
|
* @method getSelectedValues
|
|
22
39
|
* @returns {Promise<string | string[]>} The selected value(s) based on the 'multiple' prop.
|
|
23
40
|
*/
|
|
24
41
|
async getSelectedValues() {
|
|
25
|
-
return this.
|
|
42
|
+
return this.isMultiple ? this.selectedValues : this.selectedValues[0];
|
|
26
43
|
}
|
|
27
44
|
/**
|
|
28
45
|
* Sets the selected values programmatically.
|
|
@@ -31,7 +48,7 @@ const BdsListMenu = class {
|
|
|
31
48
|
* @param {string | string[]} values - The value or values to be marked as selected.
|
|
32
49
|
*/
|
|
33
50
|
async setSelectedValues(values) {
|
|
34
|
-
if (this.
|
|
51
|
+
if (this.isMultiple) {
|
|
35
52
|
this.selectedValues = Array.isArray(values) ? values : [values];
|
|
36
53
|
}
|
|
37
54
|
else {
|
|
@@ -42,24 +59,35 @@ const BdsListMenu = class {
|
|
|
42
59
|
/** Handles the click event on a menu item, updating the selection state accordingly. */
|
|
43
60
|
handleItemClick(event) {
|
|
44
61
|
const { value, selected } = event.detail;
|
|
45
|
-
if (this.menuRole ===
|
|
46
|
-
if (this.
|
|
62
|
+
if (this.menuRole === menu.MENU_ROLES.LISTBOX) {
|
|
63
|
+
if (this.isMultiple) {
|
|
47
64
|
this.handleMultipleSelection(value, selected);
|
|
48
65
|
}
|
|
49
66
|
else {
|
|
50
67
|
this.handleSingleSelection(value, selected);
|
|
51
68
|
}
|
|
52
|
-
this.
|
|
53
|
-
this.
|
|
69
|
+
this.updateChildrenState(event.target);
|
|
70
|
+
this.bdsChange.emit(this.isMultiple ? this.selectedValues : this.selectedValues[0] || undefined);
|
|
54
71
|
}
|
|
55
72
|
else {
|
|
56
|
-
|
|
73
|
+
const itemClicked = event.target;
|
|
74
|
+
const indexItem = this.childItems.indexOf(itemClicked);
|
|
75
|
+
this.bdsSelect.emit({
|
|
76
|
+
value,
|
|
77
|
+
index: indexItem,
|
|
78
|
+
checked: itemClicked.checkable ? itemClicked.selected : false,
|
|
79
|
+
element: itemClicked,
|
|
80
|
+
});
|
|
57
81
|
}
|
|
58
82
|
}
|
|
59
83
|
/** Initializes the selected values based on the child menu items that have the 'selected' attribute set. */
|
|
60
84
|
componentWillLoad() {
|
|
85
|
+
this.checkProps();
|
|
61
86
|
this.initialSelectedValues();
|
|
62
87
|
this.updateActiveState();
|
|
88
|
+
this.inheritedAttributes = {
|
|
89
|
+
...attributes.inheritAriaAttributes(this.el, ['aria-multiselectable']),
|
|
90
|
+
};
|
|
63
91
|
}
|
|
64
92
|
/** Get all child menu items */
|
|
65
93
|
get childItems() {
|
|
@@ -72,6 +100,9 @@ const BdsListMenu = class {
|
|
|
72
100
|
const firstEnabled = items.find(item => !item.disabled && item.variant !== 'label');
|
|
73
101
|
return firstEnabled;
|
|
74
102
|
}
|
|
103
|
+
get isMultiple() {
|
|
104
|
+
return this.selectionMode === LIST_MENU_SELECTION_MODE.MULTIPLE;
|
|
105
|
+
}
|
|
75
106
|
/** Updates the active state of the menu items based on the current selection. */
|
|
76
107
|
updateActiveState() {
|
|
77
108
|
const firstEnabled = this.firstEnabledItem;
|
|
@@ -92,20 +123,33 @@ const BdsListMenu = class {
|
|
|
92
123
|
this.selectedValues = selected ? [value] : [];
|
|
93
124
|
}
|
|
94
125
|
/** Updates the state of child menu items based on the current selection. */
|
|
95
|
-
updateChildrenState() {
|
|
126
|
+
updateChildrenState(item) {
|
|
96
127
|
const items = this.childItems;
|
|
97
128
|
items.forEach((item) => {
|
|
98
129
|
if (item.value !== undefined) {
|
|
99
130
|
const isSelected = this.selectedValues.includes(item.value);
|
|
100
131
|
item.selected = isSelected;
|
|
101
|
-
|
|
102
|
-
item.setAttribute('active-item', '');
|
|
103
|
-
else
|
|
104
|
-
item.removeAttribute('active-item');
|
|
132
|
+
item.removeAttribute('active-item');
|
|
105
133
|
}
|
|
106
134
|
});
|
|
107
|
-
|
|
108
|
-
|
|
135
|
+
this.setActiveItem(item);
|
|
136
|
+
}
|
|
137
|
+
/** activate item based on interaction */
|
|
138
|
+
setActiveItem(lastItemInteracted) {
|
|
139
|
+
let itemToActivate;
|
|
140
|
+
if (lastItemInteracted !== undefined) {
|
|
141
|
+
itemToActivate = lastItemInteracted;
|
|
142
|
+
}
|
|
143
|
+
else if (this.selectedValues.length > 0) {
|
|
144
|
+
const selectedValue = this.selectedValues[0];
|
|
145
|
+
itemToActivate = this.childItems.find(item => item.value === selectedValue);
|
|
146
|
+
}
|
|
147
|
+
else {
|
|
148
|
+
itemToActivate = this.firstEnabledItem;
|
|
149
|
+
}
|
|
150
|
+
if (itemToActivate !== undefined) {
|
|
151
|
+
itemToActivate.setAttribute('active-item', '');
|
|
152
|
+
}
|
|
109
153
|
}
|
|
110
154
|
/** Initializes the selected values based on the child menu items that have the 'selected' attribute set. */
|
|
111
155
|
initialSelectedValues() {
|
|
@@ -115,15 +159,40 @@ const BdsListMenu = class {
|
|
|
115
159
|
const values = initialSelected.map(item => {
|
|
116
160
|
return item.getAttribute('value') || '';
|
|
117
161
|
});
|
|
118
|
-
this.selectedValues = this.
|
|
162
|
+
this.selectedValues = this.isMultiple ? values : [values[0]];
|
|
119
163
|
this.updateChildrenState();
|
|
120
164
|
}
|
|
121
165
|
}
|
|
166
|
+
/** Handles the toggle of select/deselect all controls, updating the selection state accordingly. */
|
|
167
|
+
handleToggleSelect(selectAll) {
|
|
168
|
+
const allValues = this.childItems
|
|
169
|
+
.filter(item => !item.disabled && item.variant !== 'label' && item.value !== undefined)
|
|
170
|
+
.map(item => item.value);
|
|
171
|
+
this.selectedValues = selectAll ? allValues : [];
|
|
172
|
+
this.updateChildrenState();
|
|
173
|
+
this.bdsChange.emit(this.selectedValues);
|
|
174
|
+
}
|
|
175
|
+
/** Renders the select/deselect all controls if applicable based on the props. */
|
|
176
|
+
renderSelectControls() {
|
|
177
|
+
if (this.selectControls && this.menuRole === menu.MENU_ROLES.LISTBOX && this.isMultiple) {
|
|
178
|
+
return (index.h("div", { class: "bds-list-menu__select-controls" }, index.h("bds-button", { name: "Select all", variant: "plain", onBdsClick: () => this.handleToggleSelect(true) }, "Select All"), index.h("bds-button", { name: "Deselect all", variant: "plain", onBdsClick: () => this.handleToggleSelect(false) }, "Deselect All")));
|
|
179
|
+
}
|
|
180
|
+
return null;
|
|
181
|
+
}
|
|
122
182
|
/** Renders the component with a slot for menu items. */
|
|
123
183
|
render() {
|
|
124
|
-
|
|
184
|
+
const inheritedAriaAttr = this.inheritedAttributes;
|
|
185
|
+
return (index.h(index.Host, { key: '88d9e41f1116555df02ca6e883b9e50f024c69b9', class: "bds-list-menu", role: this.menuRole, tabIndex: "-1", "aria-multiselectable": this.menuRole === menu.MENU_ROLES.LISTBOX && this.isMultiple ? 'true' : 'false', ...inheritedAriaAttr }, index.h("slot", { key: '2f1730a1b5c456477d2b86f35b596d11e1b79f5c', name: "banner-content" }), index.h("div", { key: '58b6944a60ce62a8832e41a853d2621b6fc6deae', class: "bds-list-menu__header" }, index.h("slot", { key: '1a292f12ca27104fd0496477a051a1ad3bcec83e', name: "header-content" })), this.renderSelectControls(), index.h("div", { key: '9a21f481ca5a3e6b484c0bcc5501097dfceb61c3', class: "bds-list-menu__content" }, index.h("slot", { key: '43f684cb30333a5d571b4d05a4c8627703297473' })), index.h("div", { key: 'dbc3a62e055792283fef80ff4514167d079c355d', class: "bds-list-menu__footer" }, index.h("slot", { key: '8d504757a49bedf5a5ec150ed16ef5c9e7723ee1', name: "footer-content" }))));
|
|
125
186
|
}
|
|
126
187
|
get el() { return index.getElement(this); }
|
|
188
|
+
static get watchers() { return {
|
|
189
|
+
"selectionMode": [{
|
|
190
|
+
"checkProps": 0
|
|
191
|
+
}],
|
|
192
|
+
"menuRole": [{
|
|
193
|
+
"checkProps": 0
|
|
194
|
+
}]
|
|
195
|
+
}; }
|
|
127
196
|
};
|
|
128
197
|
BdsListMenu.style = bdsListMenuCss();
|
|
129
198
|
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-CwYIVC9N.js');
|
|
4
|
-
var getOffset = require('./getOffset-
|
|
5
|
-
var _enum = require('./enum-
|
|
4
|
+
var getOffset = require('./getOffset-k4ezB-eT.js');
|
|
5
|
+
var _enum = require('./enum-DeTWfR0D.js');
|
|
6
|
+
require('./Logger-DnziItRH.js');
|
|
6
7
|
require('./floating.mixin-Bje4320w.js');
|
|
7
|
-
require('./Keys-
|
|
8
|
+
require('./Keys-rKl2za5q.js');
|
|
8
9
|
|
|
9
10
|
const OFFSET = 11;
|
|
10
11
|
|
|
@@ -271,7 +272,7 @@ const BdsPopover = class extends index.Mixin(getOffset.anchoredMixin) {
|
|
|
271
272
|
this.trigger.removeEventListener('click', (evt) => this.handleShow(evt));
|
|
272
273
|
}
|
|
273
274
|
render() {
|
|
274
|
-
return (index.h(index.Host, { key: '
|
|
275
|
+
return (index.h(index.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 && (index.h("div", { key: '435cde7702b5db7ddc5f055ab379ef264a8cac16', class: "popover-header" }, index.h("div", { key: 'a3ac8f2b6610090d5947dc299a9ce62d85265e86', class: "popover-header__content" }, index.h("span", { key: 'ed1cbb198c54ffba2c7ce22085cb43648d6b7f3d', class: "popover-header__icon" }, index.h("slot", { key: 'b3049ec3dc2ad99037a662553103facad38af4f9', name: "header-icon" })), index.h("span", { key: '591ccd19d65f3a485062be8e5e4acf57a3ff4539', class: "popover-header__title" }, index.h("slot", { key: '9b65d0180f3728906302426f6436034e80f1c783', name: "header-title" }))), this.closable && (index.h("bds-button", { key: '5e13390200231b50e4a9c38fb22c623bf28d105f', class: "popover-header__close", size: _enum.BUTTON_SIZES.SMALL, onBdsClick: () => this.hide() }, index.h("em", { key: '20ea602f48d1f27ee0b10c929a4a2194304a35b2', slot: "icon", class: "bds-icon-close" }))))), this.canShowArrow && (index.h("div", { key: '551089a9b038a27277398dac47b8e72b2f3d9286', class: "popover-arrow", part: "arrow", ref: el => (this.arrowElement = el) })), index.h("div", { key: '17a6a939f83dd930aafc416b48da124faa27a4e0', class: "popover-content", tabIndex: -1, part: "popover-content" }, index.h("slot", { key: 'ab7cfa10649128cc387a54cf052429425696269a' })), this.footer && (index.h("div", { key: '7cf9fa351928fd823a49541764cdd67bd2d57def', class: "popover-footer", onClick: (e) => e.stopPropagation() }, index.h("slot", { key: 'b6a20d06d0964f6dea85afdd40a46a6fb737bbac', name: "footer-helper" }), index.h("slot", { key: '379b2b43a1e937775149e686686da9e4554dd962', name: "footer-button" })))));
|
|
275
276
|
}
|
|
276
277
|
get el() { return index.getElement(this); }
|
|
277
278
|
};
|