@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,4 +1,7 @@
|
|
|
1
1
|
import { Host, h } from "@stencil/core";
|
|
2
|
+
import { LIST_MENU_SELECTION_MODE } from "./types/enum";
|
|
3
|
+
import { MENU_ROLES } from "../../../../types/index";
|
|
4
|
+
import { inheritAriaAttributes, validatePropValue } from "../../../../utils/index";
|
|
2
5
|
/**
|
|
3
6
|
* Container component that manages a list of menu items.
|
|
4
7
|
* It handles selection logic (single/multiple) and maintains the data state.
|
|
@@ -6,36 +9,36 @@ import { Host, h } from "@stencil/core";
|
|
|
6
9
|
* @summary A list menu component that can contain multiple menu items and manage their selection state.
|
|
7
10
|
* @slot - Default slot for bds-list-menu-item elements.
|
|
8
11
|
*
|
|
9
|
-
* @
|
|
10
|
-
* @
|
|
11
|
-
*
|
|
12
|
-
* @property {boolean} multiple - If true, allows multiple items to be selected. Default is false (single selection).
|
|
13
|
-
* @property {string} menuRole - Defines the ARIA role of the menu. Can be 'menu' or 'listbox'. Default is 'menu'.
|
|
14
|
-
*
|
|
15
|
-
* @event bdsChange - Emitted when the selection changes, providing the current selected value(s).
|
|
12
|
+
* @fires bdsChange - Emitted when the selection changes, providing the current selected value(s).
|
|
13
|
+
* @fires bdsSelect - Emmited when item is selected in menu-role="menu" is clicked
|
|
16
14
|
* @method getSelectedValues - Returns the currently selected value(s). If multiple is true, returns an array of strings; otherwise, returns a single string or undefined.
|
|
17
15
|
* @method setSelectedValues - Sets the selected value(s). Accepts a string for single selection or an array of strings for multiple selection.
|
|
18
|
-
*
|
|
19
|
-
* @default false - By default, the menu does not allow multiple selections (single selection mode).
|
|
20
|
-
* @default 'menu' - The default ARIA role for the menu is 'menu'.
|
|
21
|
-
*
|
|
22
16
|
*/
|
|
23
17
|
export class BdsListMenu {
|
|
24
18
|
constructor() {
|
|
25
|
-
|
|
26
|
-
this.
|
|
19
|
+
// Object to store inherited aria attributes
|
|
20
|
+
this.inheritedAttributes = {};
|
|
21
|
+
/** The selection mode of the menu. Can be 'SINGLE' or 'MULTIPLE'. Default is 'SINGLE'. */
|
|
22
|
+
this.selectionMode = LIST_MENU_SELECTION_MODE.SINGLE;
|
|
27
23
|
/** Defines the ARIA role of the menu. Can be 'menu' or 'listbox'. Default is 'menu'. */
|
|
28
|
-
this.menuRole =
|
|
24
|
+
this.menuRole = MENU_ROLES.MENU;
|
|
25
|
+
/** Determines if the menu items have selectall/deselectall controls */
|
|
26
|
+
this.selectControls = false;
|
|
29
27
|
/** State to manage selected values */
|
|
30
28
|
this.selectedValues = [];
|
|
31
29
|
}
|
|
30
|
+
/** Verify props to be valid */
|
|
31
|
+
checkProps() {
|
|
32
|
+
validatePropValue(Object.values(MENU_ROLES), MENU_ROLES.MENU, this.el, 'menuRole');
|
|
33
|
+
validatePropValue(Object.values(LIST_MENU_SELECTION_MODE), LIST_MENU_SELECTION_MODE.SINGLE, this.el, 'selectionMode');
|
|
34
|
+
}
|
|
32
35
|
/**
|
|
33
36
|
* Retrieves the currently selected value(s) programmatically.
|
|
34
37
|
* @method getSelectedValues
|
|
35
38
|
* @returns {Promise<string | string[]>} The selected value(s) based on the 'multiple' prop.
|
|
36
39
|
*/
|
|
37
40
|
async getSelectedValues() {
|
|
38
|
-
return this.
|
|
41
|
+
return this.isMultiple ? this.selectedValues : this.selectedValues[0];
|
|
39
42
|
}
|
|
40
43
|
/**
|
|
41
44
|
* Sets the selected values programmatically.
|
|
@@ -44,7 +47,7 @@ export class BdsListMenu {
|
|
|
44
47
|
* @param {string | string[]} values - The value or values to be marked as selected.
|
|
45
48
|
*/
|
|
46
49
|
async setSelectedValues(values) {
|
|
47
|
-
if (this.
|
|
50
|
+
if (this.isMultiple) {
|
|
48
51
|
this.selectedValues = Array.isArray(values) ? values : [values];
|
|
49
52
|
}
|
|
50
53
|
else {
|
|
@@ -55,24 +58,35 @@ export class BdsListMenu {
|
|
|
55
58
|
/** Handles the click event on a menu item, updating the selection state accordingly. */
|
|
56
59
|
handleItemClick(event) {
|
|
57
60
|
const { value, selected } = event.detail;
|
|
58
|
-
if (this.menuRole ===
|
|
59
|
-
if (this.
|
|
61
|
+
if (this.menuRole === MENU_ROLES.LISTBOX) {
|
|
62
|
+
if (this.isMultiple) {
|
|
60
63
|
this.handleMultipleSelection(value, selected);
|
|
61
64
|
}
|
|
62
65
|
else {
|
|
63
66
|
this.handleSingleSelection(value, selected);
|
|
64
67
|
}
|
|
65
|
-
this.
|
|
66
|
-
this.
|
|
68
|
+
this.updateChildrenState(event.target);
|
|
69
|
+
this.bdsChange.emit(this.isMultiple ? this.selectedValues : this.selectedValues[0] || undefined);
|
|
67
70
|
}
|
|
68
71
|
else {
|
|
69
|
-
|
|
72
|
+
const itemClicked = event.target;
|
|
73
|
+
const indexItem = this.childItems.indexOf(itemClicked);
|
|
74
|
+
this.bdsSelect.emit({
|
|
75
|
+
value,
|
|
76
|
+
index: indexItem,
|
|
77
|
+
checked: itemClicked.checkable ? itemClicked.selected : false,
|
|
78
|
+
element: itemClicked,
|
|
79
|
+
});
|
|
70
80
|
}
|
|
71
81
|
}
|
|
72
82
|
/** Initializes the selected values based on the child menu items that have the 'selected' attribute set. */
|
|
73
83
|
componentWillLoad() {
|
|
84
|
+
this.checkProps();
|
|
74
85
|
this.initialSelectedValues();
|
|
75
86
|
this.updateActiveState();
|
|
87
|
+
this.inheritedAttributes = {
|
|
88
|
+
...inheritAriaAttributes(this.el, ['aria-multiselectable']),
|
|
89
|
+
};
|
|
76
90
|
}
|
|
77
91
|
/** Get all child menu items */
|
|
78
92
|
get childItems() {
|
|
@@ -85,6 +99,9 @@ export class BdsListMenu {
|
|
|
85
99
|
const firstEnabled = items.find(item => !item.disabled && item.variant !== 'label');
|
|
86
100
|
return firstEnabled;
|
|
87
101
|
}
|
|
102
|
+
get isMultiple() {
|
|
103
|
+
return this.selectionMode === LIST_MENU_SELECTION_MODE.MULTIPLE;
|
|
104
|
+
}
|
|
88
105
|
/** Updates the active state of the menu items based on the current selection. */
|
|
89
106
|
updateActiveState() {
|
|
90
107
|
const firstEnabled = this.firstEnabledItem;
|
|
@@ -105,20 +122,33 @@ export class BdsListMenu {
|
|
|
105
122
|
this.selectedValues = selected ? [value] : [];
|
|
106
123
|
}
|
|
107
124
|
/** Updates the state of child menu items based on the current selection. */
|
|
108
|
-
updateChildrenState() {
|
|
125
|
+
updateChildrenState(item) {
|
|
109
126
|
const items = this.childItems;
|
|
110
127
|
items.forEach((item) => {
|
|
111
128
|
if (item.value !== undefined) {
|
|
112
129
|
const isSelected = this.selectedValues.includes(item.value);
|
|
113
130
|
item.selected = isSelected;
|
|
114
|
-
|
|
115
|
-
item.setAttribute('active-item', '');
|
|
116
|
-
else
|
|
117
|
-
item.removeAttribute('active-item');
|
|
131
|
+
item.removeAttribute('active-item');
|
|
118
132
|
}
|
|
119
133
|
});
|
|
120
|
-
|
|
121
|
-
|
|
134
|
+
this.setActiveItem(item);
|
|
135
|
+
}
|
|
136
|
+
/** activate item based on interaction */
|
|
137
|
+
setActiveItem(lastItemInteracted) {
|
|
138
|
+
let itemToActivate;
|
|
139
|
+
if (lastItemInteracted !== undefined) {
|
|
140
|
+
itemToActivate = lastItemInteracted;
|
|
141
|
+
}
|
|
142
|
+
else if (this.selectedValues.length > 0) {
|
|
143
|
+
const selectedValue = this.selectedValues[0];
|
|
144
|
+
itemToActivate = this.childItems.find(item => item.value === selectedValue);
|
|
145
|
+
}
|
|
146
|
+
else {
|
|
147
|
+
itemToActivate = this.firstEnabledItem;
|
|
148
|
+
}
|
|
149
|
+
if (itemToActivate !== undefined) {
|
|
150
|
+
itemToActivate.setAttribute('active-item', '');
|
|
151
|
+
}
|
|
122
152
|
}
|
|
123
153
|
/** Initializes the selected values based on the child menu items that have the 'selected' attribute set. */
|
|
124
154
|
initialSelectedValues() {
|
|
@@ -128,13 +158,30 @@ export class BdsListMenu {
|
|
|
128
158
|
const values = initialSelected.map(item => {
|
|
129
159
|
return item.getAttribute('value') || '';
|
|
130
160
|
});
|
|
131
|
-
this.selectedValues = this.
|
|
161
|
+
this.selectedValues = this.isMultiple ? values : [values[0]];
|
|
132
162
|
this.updateChildrenState();
|
|
133
163
|
}
|
|
134
164
|
}
|
|
165
|
+
/** Handles the toggle of select/deselect all controls, updating the selection state accordingly. */
|
|
166
|
+
handleToggleSelect(selectAll) {
|
|
167
|
+
const allValues = this.childItems
|
|
168
|
+
.filter(item => !item.disabled && item.variant !== 'label' && item.value !== undefined)
|
|
169
|
+
.map(item => item.value);
|
|
170
|
+
this.selectedValues = selectAll ? allValues : [];
|
|
171
|
+
this.updateChildrenState();
|
|
172
|
+
this.bdsChange.emit(this.selectedValues);
|
|
173
|
+
}
|
|
174
|
+
/** Renders the select/deselect all controls if applicable based on the props. */
|
|
175
|
+
renderSelectControls() {
|
|
176
|
+
if (this.selectControls && this.menuRole === MENU_ROLES.LISTBOX && this.isMultiple) {
|
|
177
|
+
return (h("div", { class: "bds-list-menu__select-controls" }, h("bds-button", { name: "Select all", variant: "plain", onBdsClick: () => this.handleToggleSelect(true) }, "Select All"), h("bds-button", { name: "Deselect all", variant: "plain", onBdsClick: () => this.handleToggleSelect(false) }, "Deselect All")));
|
|
178
|
+
}
|
|
179
|
+
return null;
|
|
180
|
+
}
|
|
135
181
|
/** Renders the component with a slot for menu items. */
|
|
136
182
|
render() {
|
|
137
|
-
|
|
183
|
+
const inheritedAriaAttr = this.inheritedAttributes;
|
|
184
|
+
return (h(Host, { key: '88d9e41f1116555df02ca6e883b9e50f024c69b9', class: "bds-list-menu", role: this.menuRole, tabIndex: "-1", "aria-multiselectable": this.menuRole === MENU_ROLES.LISTBOX && this.isMultiple ? 'true' : 'false', ...inheritedAriaAttr }, h("slot", { key: '2f1730a1b5c456477d2b86f35b596d11e1b79f5c', name: "banner-content" }), h("div", { key: '58b6944a60ce62a8832e41a853d2621b6fc6deae', class: "bds-list-menu__header" }, h("slot", { key: '1a292f12ca27104fd0496477a051a1ad3bcec83e', name: "header-content" })), this.renderSelectControls(), h("div", { key: '9a21f481ca5a3e6b484c0bcc5501097dfceb61c3', class: "bds-list-menu__content" }, h("slot", { key: '43f684cb30333a5d571b4d05a4c8627703297473' })), h("div", { key: 'dbc3a62e055792283fef80ff4514167d079c355d', class: "bds-list-menu__footer" }, h("slot", { key: '8d504757a49bedf5a5ec150ed16ef5c9e7723ee1', name: "footer-content" }))));
|
|
138
185
|
}
|
|
139
186
|
static get is() { return "bds-list-menu"; }
|
|
140
187
|
static get originalStyleUrls() {
|
|
@@ -149,33 +196,47 @@ export class BdsListMenu {
|
|
|
149
196
|
}
|
|
150
197
|
static get properties() {
|
|
151
198
|
return {
|
|
152
|
-
"
|
|
153
|
-
"type": "
|
|
199
|
+
"selectionMode": {
|
|
200
|
+
"type": "string",
|
|
154
201
|
"mutable": false,
|
|
155
202
|
"complexType": {
|
|
156
|
-
"original": "
|
|
157
|
-
"resolved": "
|
|
158
|
-
"references": {
|
|
203
|
+
"original": "IListMenu['selectionMode']",
|
|
204
|
+
"resolved": "\"multiple\" | \"single\"",
|
|
205
|
+
"references": {
|
|
206
|
+
"IListMenu": {
|
|
207
|
+
"location": "import",
|
|
208
|
+
"path": "./types/IListMenu",
|
|
209
|
+
"id": "src/components/actions/bds-list-menu/bds-list-menu/types/IListMenu.ts::IListMenu",
|
|
210
|
+
"referenceLocation": "IListMenu"
|
|
211
|
+
}
|
|
212
|
+
}
|
|
159
213
|
},
|
|
160
214
|
"required": false,
|
|
161
215
|
"optional": false,
|
|
162
216
|
"docs": {
|
|
163
217
|
"tags": [],
|
|
164
|
-
"text": "
|
|
218
|
+
"text": "The selection mode of the menu. Can be 'SINGLE' or 'MULTIPLE'. Default is 'SINGLE'."
|
|
165
219
|
},
|
|
166
220
|
"getter": false,
|
|
167
221
|
"setter": false,
|
|
168
222
|
"reflect": false,
|
|
169
|
-
"attribute": "
|
|
170
|
-
"defaultValue": "
|
|
223
|
+
"attribute": "selection-mode",
|
|
224
|
+
"defaultValue": "LIST_MENU_SELECTION_MODE.SINGLE"
|
|
171
225
|
},
|
|
172
226
|
"menuRole": {
|
|
173
227
|
"type": "string",
|
|
174
228
|
"mutable": false,
|
|
175
229
|
"complexType": {
|
|
176
|
-
"original": "'
|
|
230
|
+
"original": "IListMenu['menuRole']",
|
|
177
231
|
"resolved": "\"listbox\" | \"menu\"",
|
|
178
|
-
"references": {
|
|
232
|
+
"references": {
|
|
233
|
+
"IListMenu": {
|
|
234
|
+
"location": "import",
|
|
235
|
+
"path": "./types/IListMenu",
|
|
236
|
+
"id": "src/components/actions/bds-list-menu/bds-list-menu/types/IListMenu.ts::IListMenu",
|
|
237
|
+
"referenceLocation": "IListMenu"
|
|
238
|
+
}
|
|
239
|
+
}
|
|
179
240
|
},
|
|
180
241
|
"required": false,
|
|
181
242
|
"optional": false,
|
|
@@ -187,7 +248,34 @@ export class BdsListMenu {
|
|
|
187
248
|
"setter": false,
|
|
188
249
|
"reflect": false,
|
|
189
250
|
"attribute": "menu-role",
|
|
190
|
-
"defaultValue": "
|
|
251
|
+
"defaultValue": "MENU_ROLES.MENU"
|
|
252
|
+
},
|
|
253
|
+
"selectControls": {
|
|
254
|
+
"type": "boolean",
|
|
255
|
+
"mutable": false,
|
|
256
|
+
"complexType": {
|
|
257
|
+
"original": "IListMenu['selectControls']",
|
|
258
|
+
"resolved": "boolean",
|
|
259
|
+
"references": {
|
|
260
|
+
"IListMenu": {
|
|
261
|
+
"location": "import",
|
|
262
|
+
"path": "./types/IListMenu",
|
|
263
|
+
"id": "src/components/actions/bds-list-menu/bds-list-menu/types/IListMenu.ts::IListMenu",
|
|
264
|
+
"referenceLocation": "IListMenu"
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
},
|
|
268
|
+
"required": false,
|
|
269
|
+
"optional": false,
|
|
270
|
+
"docs": {
|
|
271
|
+
"tags": [],
|
|
272
|
+
"text": "Determines if the menu items have selectall/deselectall controls"
|
|
273
|
+
},
|
|
274
|
+
"getter": false,
|
|
275
|
+
"setter": false,
|
|
276
|
+
"reflect": false,
|
|
277
|
+
"attribute": "select-controls",
|
|
278
|
+
"defaultValue": "false"
|
|
191
279
|
}
|
|
192
280
|
};
|
|
193
281
|
}
|
|
@@ -213,8 +301,8 @@ export class BdsListMenu {
|
|
|
213
301
|
"references": {}
|
|
214
302
|
}
|
|
215
303
|
}, {
|
|
216
|
-
"method": "
|
|
217
|
-
"name": "
|
|
304
|
+
"method": "bdsSelect",
|
|
305
|
+
"name": "bdsSelect",
|
|
218
306
|
"bubbles": true,
|
|
219
307
|
"cancelable": true,
|
|
220
308
|
"composed": true,
|
|
@@ -223,12 +311,14 @@ export class BdsListMenu {
|
|
|
223
311
|
"text": "Emitted when the selection changes, providing the current selected value(s)."
|
|
224
312
|
},
|
|
225
313
|
"complexType": {
|
|
226
|
-
"original": "
|
|
227
|
-
"resolved": "
|
|
314
|
+
"original": "ListMenuChangeDetail",
|
|
315
|
+
"resolved": "ListMenuChangeDetail",
|
|
228
316
|
"references": {
|
|
229
|
-
"
|
|
230
|
-
"location": "
|
|
231
|
-
"
|
|
317
|
+
"ListMenuChangeDetail": {
|
|
318
|
+
"location": "import",
|
|
319
|
+
"path": "./types/IListMenu",
|
|
320
|
+
"id": "src/components/actions/bds-list-menu/bds-list-menu/types/IListMenu.ts::ListMenuChangeDetail",
|
|
321
|
+
"referenceLocation": "ListMenuChangeDetail"
|
|
232
322
|
}
|
|
233
323
|
}
|
|
234
324
|
}
|
|
@@ -289,9 +379,18 @@ export class BdsListMenu {
|
|
|
289
379
|
};
|
|
290
380
|
}
|
|
291
381
|
static get elementRef() { return "el"; }
|
|
382
|
+
static get watchers() {
|
|
383
|
+
return [{
|
|
384
|
+
"propName": "selectionMode",
|
|
385
|
+
"methodName": "checkProps"
|
|
386
|
+
}, {
|
|
387
|
+
"propName": "menuRole",
|
|
388
|
+
"methodName": "checkProps"
|
|
389
|
+
}];
|
|
390
|
+
}
|
|
292
391
|
static get listeners() {
|
|
293
392
|
return [{
|
|
294
|
-
"name": "
|
|
393
|
+
"name": "bdsSelectItem",
|
|
295
394
|
"method": "handleItemClick",
|
|
296
395
|
"target": undefined,
|
|
297
396
|
"capture": false,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/collection/components/actions/bds-list-menu/bds-list-menu-item/bds-list-menu-item.css
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
/**
|
|
11
11
|
* TODO: Refactor to use styleguidelines this work as first draft
|
|
12
12
|
**/
|
|
13
|
-
.bds-list-item, .bds-list-item__content
|
|
13
|
+
.bds-list-item, .bds-list-item__content {
|
|
14
14
|
display: flex;
|
|
15
15
|
align-items: center;
|
|
16
16
|
}
|
|
@@ -20,31 +20,46 @@
|
|
|
20
20
|
* These are used across multiple components to ensure consistency in interaction feedback.
|
|
21
21
|
*/
|
|
22
22
|
.bds-list-item {
|
|
23
|
-
font-family: var(--boreal-typography-font-family-primary);
|
|
24
|
-
align-self: stretch;
|
|
25
|
-
color: var(--boreal-text-default);
|
|
26
23
|
width: 100%;
|
|
27
|
-
|
|
24
|
+
vertical-align: middle;
|
|
25
|
+
position: relative;
|
|
26
|
+
color: var(--boreal-text-default);
|
|
28
27
|
font-style: normal;
|
|
28
|
+
font-family: var(--boreal-typography-font-family-primary);
|
|
29
29
|
font-weight: var(--boreal-typography-font-weight-regular);
|
|
30
|
-
line-height: var(--boreal-typography-line-height-sm);
|
|
31
30
|
}
|
|
32
31
|
.bds-list-item__content {
|
|
33
32
|
justify-content: space-between;
|
|
34
|
-
|
|
33
|
+
flex: 1;
|
|
34
|
+
vertical-align: middle;
|
|
35
35
|
gap: var(--boreal-spacing-3xs);
|
|
36
36
|
}
|
|
37
|
+
.bds-list-item__content-left, .bds-list-item__content-right {
|
|
38
|
+
display: flex;
|
|
39
|
+
align-items: center;
|
|
40
|
+
vertical-align: middle;
|
|
41
|
+
}
|
|
42
|
+
.bds-list-item__content-left__icon, .bds-list-item__content-left__text {
|
|
43
|
+
display: inline-block;
|
|
44
|
+
vertical-align: middle;
|
|
45
|
+
font-style: normal;
|
|
46
|
+
font-size: var(--boreal-typography-font-size-sm);
|
|
47
|
+
line-height: var(--boreal-typography-line-height-xs);
|
|
48
|
+
}
|
|
49
|
+
.bds-list-item__content-left__icon:not(:empty) {
|
|
50
|
+
padding-right: var(--boreal-spacing-3xs);
|
|
51
|
+
}
|
|
37
52
|
.bds-list-item__content [class*=bds-icon-] {
|
|
38
53
|
font-size: var(--boreal-typography-font-size-md);
|
|
39
54
|
}
|
|
40
55
|
.bds-list-item--button {
|
|
41
56
|
cursor: pointer;
|
|
42
|
-
padding: var(--boreal-spacing-
|
|
57
|
+
padding: var(--boreal-spacing-1xs) var(--boreal-spacing-s);
|
|
43
58
|
transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
|
|
44
59
|
}
|
|
45
60
|
.bds-list-item--button:not(.bds-list-item--disabled):hover:not([selected]) {
|
|
46
61
|
background-color: var(--boreal-ui-default-lighter);
|
|
47
|
-
|
|
62
|
+
z-index: 1;
|
|
48
63
|
}
|
|
49
64
|
.bds-list-item--button:not(.bds-list-item--disabled):focus, .bds-list-item--button:not(.bds-list-item--disabled):focus-visible {
|
|
50
65
|
outline: none;
|
|
@@ -54,6 +69,7 @@
|
|
|
54
69
|
.bds-list-item--button:not(.bds-list-item--disabled):active, .bds-list-item--button:not(.bds-list-item--disabled).bds-list-item--state-active {
|
|
55
70
|
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;
|
|
56
71
|
background-color: var(--boreal-ui-default-lighter);
|
|
72
|
+
z-index: 1;
|
|
57
73
|
}
|
|
58
74
|
.bds-list-item--selected {
|
|
59
75
|
background-color: var(--boreal-ui-primary-lighter);
|
package/dist/collection/components/actions/bds-list-menu/bds-list-menu-item/bds-list-menu-item.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Host, Mixin, h } from "@stencil/core";
|
|
2
|
-
import { COMPONENT_STATES } from "../../../../types/index";
|
|
2
|
+
import { COMPONENT_STATES, MENU_ROLES } from "../../../../types/index";
|
|
3
3
|
import { validatePropValue } from "../../../../utils/helpers/validateProps";
|
|
4
4
|
import { MenuItemBehavior, WithLinks } from "../../../../mixins/index";
|
|
5
5
|
import { LIST_MENU_ITEM_VARIANTS } from "./types/enum";
|
|
@@ -60,6 +60,8 @@ export class BdsListMenuItem extends Mixin(MenuItemBehavior, WithLinks) {
|
|
|
60
60
|
this.selected = false;
|
|
61
61
|
/** Value associated with the menu item */
|
|
62
62
|
this.value = '';
|
|
63
|
+
/** Checkable state item, if is activated should be visible a checkbox */
|
|
64
|
+
this.checkable = false;
|
|
63
65
|
/** Active state item */
|
|
64
66
|
this.activeItem = false;
|
|
65
67
|
/** Link behavior props */
|
|
@@ -74,11 +76,14 @@ export class BdsListMenuItem extends Mixin(MenuItemBehavior, WithLinks) {
|
|
|
74
76
|
this.handleClick = (e) => {
|
|
75
77
|
if (this.disabled || this.isLabelVariant)
|
|
76
78
|
return;
|
|
79
|
+
e.stopPropagation();
|
|
77
80
|
if (this.isLink) {
|
|
78
81
|
this.handleLinkClick(e);
|
|
79
82
|
return;
|
|
80
83
|
}
|
|
81
|
-
this.
|
|
84
|
+
if (this.checkable && this.parentRole !== MENU_ROLES.LISTBOX)
|
|
85
|
+
this.selected = !this.selected;
|
|
86
|
+
this.bdsSelectItem.emit({
|
|
82
87
|
value: this.value,
|
|
83
88
|
selected: !this.selected,
|
|
84
89
|
});
|
|
@@ -91,7 +96,7 @@ export class BdsListMenuItem extends Mixin(MenuItemBehavior, WithLinks) {
|
|
|
91
96
|
// If the item is a link, we dont activate this animation
|
|
92
97
|
if (!this.isLink || this.linkAttributes.download !== undefined) {
|
|
93
98
|
this.currentState =
|
|
94
|
-
e.key === KEYBOARD.Enter
|
|
99
|
+
e.key === KEYBOARD.Enter || e.key === KEYBOARD.Space ? COMPONENT_STATES.ACTIVE : this.currentState;
|
|
95
100
|
}
|
|
96
101
|
};
|
|
97
102
|
/** Event to handle keyup navigation and reset active state */
|
|
@@ -109,6 +114,14 @@ export class BdsListMenuItem extends Mixin(MenuItemBehavior, WithLinks) {
|
|
|
109
114
|
componentWillLoad() {
|
|
110
115
|
this.checkPropsVariant();
|
|
111
116
|
}
|
|
117
|
+
/** Improve aria resolve for checkable items */
|
|
118
|
+
get menuItemRoleExtended() {
|
|
119
|
+
if (!this.checkable)
|
|
120
|
+
return this.menuItemRole;
|
|
121
|
+
if (this.parentRole === 'listbox')
|
|
122
|
+
return 'checkbox';
|
|
123
|
+
return 'menuitemcheckbox';
|
|
124
|
+
}
|
|
112
125
|
/** Checks if the variant is a label */
|
|
113
126
|
get isLabelVariant() {
|
|
114
127
|
return this.variant === LIST_MENU_ITEM_VARIANTS.LABEL;
|
|
@@ -127,9 +140,14 @@ export class BdsListMenuItem extends Mixin(MenuItemBehavior, WithLinks) {
|
|
|
127
140
|
renderTypeLabel() {
|
|
128
141
|
return (h("bds-typography", { variant: "label", element: "label", align: "start", role: "presentation" }, h("slot", { name: "left-content" }), " ", h("slot", null)));
|
|
129
142
|
}
|
|
143
|
+
renderCheckbox() {
|
|
144
|
+
if (!this.checkable)
|
|
145
|
+
return null;
|
|
146
|
+
return (h("bds-checkbox", { checked: this.selected, disabled: this.disabled, name: `checkbox-${this.value}`, tabindex: "-1", style: { pointerEvents: 'none' }, inert: true }));
|
|
147
|
+
}
|
|
130
148
|
/** Return the render for the button variant of the list menu item */
|
|
131
149
|
renderTypeButton() {
|
|
132
|
-
return (h("div", { class: "bds-list-item__content" }, h("div", { class: "bds-list-item__content
|
|
150
|
+
return (h("div", { class: "bds-list-item__content" }, h("div", { class: "bds-list-item__content-left" }, this.renderCheckbox(), h("span", { class: "bds-list-item__content-left__icon" }, h("slot", { name: "left-content" })), h("span", { class: "bds-list-item__content-left__text" }, h("slot", null))), h("div", { class: "bds-list-item__content-right" }, h("slot", { name: "right-content" }))));
|
|
133
151
|
}
|
|
134
152
|
/** Main render */
|
|
135
153
|
render() {
|
|
@@ -137,7 +155,7 @@ export class BdsListMenuItem extends Mixin(MenuItemBehavior, WithLinks) {
|
|
|
137
155
|
if (this.isLabelVariant)
|
|
138
156
|
renderItem = this.renderTypeLabel();
|
|
139
157
|
const linkAttributes = this.isLink ? { ...this.linkAttributes, tabindex: this.activeItem ? 0 : -1 } : {};
|
|
140
|
-
return (h(Host, { key: '
|
|
158
|
+
return (h(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));
|
|
141
159
|
}
|
|
142
160
|
static get is() { return "bds-list-menu-item"; }
|
|
143
161
|
static get originalStyleUrls() {
|
|
@@ -235,7 +253,7 @@ export class BdsListMenuItem extends Mixin(MenuItemBehavior, WithLinks) {
|
|
|
235
253
|
},
|
|
236
254
|
"selected": {
|
|
237
255
|
"type": "boolean",
|
|
238
|
-
"mutable":
|
|
256
|
+
"mutable": true,
|
|
239
257
|
"complexType": {
|
|
240
258
|
"original": "IListMenuItem['selected']",
|
|
241
259
|
"resolved": "boolean",
|
|
@@ -287,6 +305,33 @@ export class BdsListMenuItem extends Mixin(MenuItemBehavior, WithLinks) {
|
|
|
287
305
|
"attribute": "value",
|
|
288
306
|
"defaultValue": "''"
|
|
289
307
|
},
|
|
308
|
+
"checkable": {
|
|
309
|
+
"type": "boolean",
|
|
310
|
+
"mutable": false,
|
|
311
|
+
"complexType": {
|
|
312
|
+
"original": "IListMenuItem['checkable']",
|
|
313
|
+
"resolved": "boolean",
|
|
314
|
+
"references": {
|
|
315
|
+
"IListMenuItem": {
|
|
316
|
+
"location": "import",
|
|
317
|
+
"path": "./types/IListMenuItem",
|
|
318
|
+
"id": "src/components/actions/bds-list-menu/bds-list-menu-item/types/IListMenuItem.ts::IListMenuItem",
|
|
319
|
+
"referenceLocation": "IListMenuItem"
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
},
|
|
323
|
+
"required": false,
|
|
324
|
+
"optional": false,
|
|
325
|
+
"docs": {
|
|
326
|
+
"tags": [],
|
|
327
|
+
"text": "Checkable state item, if is activated should be visible a checkbox"
|
|
328
|
+
},
|
|
329
|
+
"getter": false,
|
|
330
|
+
"setter": false,
|
|
331
|
+
"reflect": true,
|
|
332
|
+
"attribute": "checkable",
|
|
333
|
+
"defaultValue": "false"
|
|
334
|
+
},
|
|
290
335
|
"activeItem": {
|
|
291
336
|
"type": "boolean",
|
|
292
337
|
"mutable": false,
|
|
@@ -404,8 +449,8 @@ export class BdsListMenuItem extends Mixin(MenuItemBehavior, WithLinks) {
|
|
|
404
449
|
}
|
|
405
450
|
static get events() {
|
|
406
451
|
return [{
|
|
407
|
-
"method": "
|
|
408
|
-
"name": "
|
|
452
|
+
"method": "bdsSelectItem",
|
|
453
|
+
"name": "bdsSelectItem",
|
|
409
454
|
"bubbles": true,
|
|
410
455
|
"cancelable": true,
|
|
411
456
|
"composed": true,
|
|
@@ -168,7 +168,7 @@ export class BdsToggle extends Mixin(formAssociatedMixin) {
|
|
|
168
168
|
: this.validationError && this.validationMessage !== ''
|
|
169
169
|
? this.validationMessage
|
|
170
170
|
: this.helperText;
|
|
171
|
-
return (h(Host, { key: '
|
|
171
|
+
return (h(Host, { key: 'b5d27825358eaadb5cbca86e48488350e6099d8f', ...this.inheritedAttributes, onClick: this.handleClick, onKeyDown: this.handleKeyDown, class: blockClass }, h("div", { key: '9b7bb4c4551beb61ed72c9ee4a4d7ee14e746c4e', part: "container", class: this.containerClasses }, this.canShowLabel && (h("bds-typography", { key: 'a95e1b66d8452b983002348b9456aa0c3674b202', variant: "label", class: `${blockClass}__label`, htmlFor: this._id, required: this.required, tooltipText: this.info }, this.label)), h("label", { key: '954125135521cd6e65c2e6c3dfa41216e6f52dd3', class: `${blockClass}__switch`, htmlFor: this._id, onClick: e => e.preventDefault() }, h("input", { key: 'c3e0ee266aba0bd6e8ca7fb2d3efaeb412161806', class: `${blockClass}__input`, "aria-invalid": this.error || this.validationError ? 'true' : undefined, "aria-label": this.label || null, id: this._id, type: "checkbox", name: this.name, required: this.required, disabled: this.isDisabled, checked: this.isChecked, onInvalid: this.handleInvalid }), h("span", { key: '68912685234edb7c6ec972231c7f951531862f7c', class: `${blockClass}__slider ${blockClass}__slider--round` }))), helperContent !== '' && (h("bds-typography", { key: '3e5645d234edc1f3efe7805260def2c74bc7cd44', class: `${blockClass}__helper-text`, variant: "helper", state: typographyState, onClick: e => e.stopPropagation() }, helperContent))));
|
|
172
172
|
}
|
|
173
173
|
static get is() { return "bds-toggle"; }
|
|
174
174
|
static get formAssociated() { return true; }
|
|
@@ -39,7 +39,7 @@ export class BdsBadge {
|
|
|
39
39
|
};
|
|
40
40
|
}
|
|
41
41
|
render() {
|
|
42
|
-
return (h(Host, { key: '
|
|
42
|
+
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' })));
|
|
43
43
|
}
|
|
44
44
|
static get is() { return "bds-badge"; }
|
|
45
45
|
static get originalStyleUrls() {
|
|
@@ -123,7 +123,7 @@ export class BdsBanner {
|
|
|
123
123
|
const closeIcon = this.renderCloseIcon();
|
|
124
124
|
const classes = this.getStyles();
|
|
125
125
|
const iconName = this.getIconName();
|
|
126
|
-
return (h(Host, { key: '
|
|
126
|
+
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)))));
|
|
127
127
|
}
|
|
128
128
|
static get is() { return "bds-banner"; }
|
|
129
129
|
static get originalStyleUrls() {
|
|
@@ -41,7 +41,7 @@ export class BdsSpinner {
|
|
|
41
41
|
};
|
|
42
42
|
}
|
|
43
43
|
render() {
|
|
44
|
-
return (h(Host, { key: '
|
|
44
|
+
return (h(Host, { key: '7e7846adadb6224abfcaaf2478768b72ec712659', class: this.getClassMap, role: "status", "aria-label": this.label, "aria-live": "polite", "aria-busy": "true" }, h("span", { key: '1c6aad446ed35a3adcb4e4f28fd4a3e7b9b7cb3a', class: "bds-spinner__sr-only" }, this.label)));
|
|
45
45
|
}
|
|
46
46
|
static get is() { return "bds-spinner"; }
|
|
47
47
|
static get originalStyleUrls() {
|
|
@@ -38,7 +38,7 @@ export class BdsStatus {
|
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
40
|
render() {
|
|
41
|
-
return (h(Host, { key: '
|
|
41
|
+
return (h(Host, { key: '9a952b22de8565fcca464d045f71ea86c92c8632', class: this.classMap, role: "status" }, this.indicator === INDICATOR_TYPES.DOT ? h("div", { class: "bds-status__dot", "aria-hidden": "true" }) : '', h("slot", { key: '47e03b139fcb4da8b15fe115518856c54d02a320', name: "icon" }), h("slot", { key: 'e512e975c2df8fa3e3380f27808eec96be5ad455' })));
|
|
42
42
|
}
|
|
43
43
|
static get is() { return "bds-status"; }
|
|
44
44
|
static get originalStyleUrls() {
|
|
@@ -116,7 +116,7 @@ export class BdsTag {
|
|
|
116
116
|
const classes = this.getClasses();
|
|
117
117
|
const hasCloseButton = !this.readonly;
|
|
118
118
|
const isSelectable = this.multiselect;
|
|
119
|
-
return (h(Host, { key: '
|
|
119
|
+
return (h(Host, { key: 'bd62a05fccbfa4aed3b7f72b9edf800c3ab05362', class: classes, role: isSelectable ? 'option' : undefined, tabIndex: isSelectable && !this.disabled ? 0 : -1, "aria-disabled": this.disabled ? 'true' : undefined, "aria-selected": isSelectable ? `${this.internalSelected}` : undefined, onKeyDown: !this.disabled ? (e) => this.handleKeyDown(e) : undefined, onClick: !this.disabled ? this.handleSelection : undefined, id: this._id }, this.renderTag(), hasCloseButton && this.renderCloseIcon()));
|
|
120
120
|
}
|
|
121
121
|
static get is() { return "bds-tag"; }
|
|
122
122
|
static get originalStyleUrls() {
|