@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
|
@@ -0,0 +1,620 @@
|
|
|
1
|
+
import { Host, Mixin, h, } from "@stencil/core";
|
|
2
|
+
import { formAssociatedMixin } from "../../../mixins/form-associated.mixin";
|
|
3
|
+
import { ORIENTATIONS } from "../../../types/index";
|
|
4
|
+
import { createId, validatePropValue, KEYBOARD } from "../../../utils/index";
|
|
5
|
+
import { RADIO_GROUP_TYPES } from "./types/enum";
|
|
6
|
+
const LEAF_TAGS = ['BDS-RADIO', 'BDS-RADIO-BUTTON', 'BDS-RADIO-CARD'];
|
|
7
|
+
/**
|
|
8
|
+
* Radio group component that orchestrates single-selection across a set of `bds-radio` children.
|
|
9
|
+
*
|
|
10
|
+
* @slot - Default slot for `bds-radio` child elements.
|
|
11
|
+
*/
|
|
12
|
+
export class BdsRadioGroup extends Mixin(formAssociatedMixin) {
|
|
13
|
+
constructor() {
|
|
14
|
+
this._id = createId('bds-radio-group');
|
|
15
|
+
/** Internal mirror of the `disabled` prop, kept in sync via `@Watch` and `formDisabledCallback`. */
|
|
16
|
+
this.isDisabled = false;
|
|
17
|
+
/** Set to true when native form validation fires the `invalid` event; cleared on reset or when value becomes valid. */
|
|
18
|
+
this.isInvalid = false;
|
|
19
|
+
/** Disables all child radios and prevents selection. Also mirrored to isDisabled @State for form-level disable support. */
|
|
20
|
+
this.disabled = false;
|
|
21
|
+
/** Shows error styling on the group helper text. Propagated to all child radios. */
|
|
22
|
+
this.error = false;
|
|
23
|
+
/** Error message rendered below the radio options when error is true. Replaces helperText. */
|
|
24
|
+
this.errorMessage = '';
|
|
25
|
+
/** Helper text rendered below the radio options. Shown in default state; replaced by errorMessage in error state. */
|
|
26
|
+
this.helperText = '';
|
|
27
|
+
/** Tooltip text shown on the group label info icon. */
|
|
28
|
+
this.info = '';
|
|
29
|
+
/** Group label rendered above the radio options. */
|
|
30
|
+
this.label = '';
|
|
31
|
+
/** Layout direction of the radio options. */
|
|
32
|
+
this.orientation = ORIENTATIONS.VERTICAL;
|
|
33
|
+
/** Marks the group as required for form submission. Triggers validity error when no radio is selected. */
|
|
34
|
+
this.required = false;
|
|
35
|
+
/** Identifies this group variant. 'radio' renders circular bds-radio children; 'radiobutton' renders bds-radio-button segmented control; 'radiocard' renders bds-radio-card element. */
|
|
36
|
+
this.type = RADIO_GROUP_TYPES.RADIO;
|
|
37
|
+
/** Currently selected radio value. Synced to children on change. */
|
|
38
|
+
this.value = '';
|
|
39
|
+
this.handleKeyDown = (event) => {
|
|
40
|
+
const target = event.target;
|
|
41
|
+
if (!LEAF_TAGS.includes(target.tagName))
|
|
42
|
+
return;
|
|
43
|
+
switch (event.key) {
|
|
44
|
+
case KEYBOARD.ArrowDown:
|
|
45
|
+
case KEYBOARD.ArrowRight:
|
|
46
|
+
this.navigateTo(target, true);
|
|
47
|
+
event.preventDefault();
|
|
48
|
+
break;
|
|
49
|
+
case KEYBOARD.ArrowUp:
|
|
50
|
+
case KEYBOARD.ArrowLeft:
|
|
51
|
+
this.navigateTo(target, false);
|
|
52
|
+
event.preventDefault();
|
|
53
|
+
break;
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
this.handleSlotChange = () => {
|
|
57
|
+
this.updateLayoutCount();
|
|
58
|
+
};
|
|
59
|
+
this._buttonCount = 0;
|
|
60
|
+
super();
|
|
61
|
+
}
|
|
62
|
+
checkPropValues() {
|
|
63
|
+
validatePropValue(Object.values(ORIENTATIONS), ORIENTATIONS.VERTICAL, this.el, 'orientation');
|
|
64
|
+
}
|
|
65
|
+
onDisabledChange(next) {
|
|
66
|
+
this.isDisabled = next;
|
|
67
|
+
this.radioElements.forEach(el => (el.disabled = next));
|
|
68
|
+
}
|
|
69
|
+
onErrorChange(val) {
|
|
70
|
+
this.radioElements.forEach(el => (el.error = val));
|
|
71
|
+
}
|
|
72
|
+
onValueChange(val) {
|
|
73
|
+
this.radioElements.forEach(el => {
|
|
74
|
+
el.checked = el.value === val;
|
|
75
|
+
el.setAttribute('aria-checked', String(el.value === val));
|
|
76
|
+
});
|
|
77
|
+
const checked = this.radioElements.find(el => el.checked);
|
|
78
|
+
this.updateTabIndexes(checked ?? null);
|
|
79
|
+
}
|
|
80
|
+
componentWillLoad() {
|
|
81
|
+
this.checkPropValues();
|
|
82
|
+
this.isDisabled = this.disabled;
|
|
83
|
+
if (this.value === '') {
|
|
84
|
+
const lastChecked = Array.from(this.el.querySelectorAll('bds-radio[checked], bds-radio-button[checked], bds-radio-card[checked]')).at(-1);
|
|
85
|
+
if (lastChecked !== undefined) {
|
|
86
|
+
this.value = lastChecked.getAttribute('value') ?? '';
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
componentDidLoad() {
|
|
91
|
+
const checkedChildren = this.radioElements.filter(el => el.checked);
|
|
92
|
+
if (checkedChildren.length > 1) {
|
|
93
|
+
checkedChildren.slice(0, -1).forEach(el => (el.checked = false));
|
|
94
|
+
}
|
|
95
|
+
this.onValueChange(this.value);
|
|
96
|
+
if (this.error)
|
|
97
|
+
this.radioElements.forEach(el => (el.error = true));
|
|
98
|
+
this.updateLayoutCount();
|
|
99
|
+
this.updateTabIndexes(this.radioElements.find(el => el.checked) ?? this.radioElements.find(el => !el.disabled) ?? null);
|
|
100
|
+
this.updateFormValidity();
|
|
101
|
+
}
|
|
102
|
+
formAssociatedCallback() {
|
|
103
|
+
this.syncFormValue();
|
|
104
|
+
}
|
|
105
|
+
formResetCallback() {
|
|
106
|
+
this.value = '';
|
|
107
|
+
this.isInvalid = false;
|
|
108
|
+
this.radioElements.forEach(radio => {
|
|
109
|
+
radio.checked = false;
|
|
110
|
+
radio.setAttribute('aria-checked', 'false');
|
|
111
|
+
if (!this.error)
|
|
112
|
+
radio.error = false;
|
|
113
|
+
});
|
|
114
|
+
this.internals.setFormValue(null);
|
|
115
|
+
this.updateFormValidity();
|
|
116
|
+
const first = this.radioElements.find(el => !el.disabled);
|
|
117
|
+
this.updateTabIndexes(first ?? null);
|
|
118
|
+
}
|
|
119
|
+
formStateRestoreCallback(state, _mode) {
|
|
120
|
+
const val = typeof state === 'string' ? state : '';
|
|
121
|
+
this.value = val;
|
|
122
|
+
this.internals.setFormValue(val !== '' ? val : null);
|
|
123
|
+
}
|
|
124
|
+
formDisabledCallback(disabled) {
|
|
125
|
+
this.isDisabled = disabled;
|
|
126
|
+
this.radioElements.forEach(el => (el.disabled = disabled));
|
|
127
|
+
}
|
|
128
|
+
handleRadioChange(event) {
|
|
129
|
+
const target = event.target;
|
|
130
|
+
if (!LEAF_TAGS.includes(target.tagName))
|
|
131
|
+
return;
|
|
132
|
+
this.radioElements
|
|
133
|
+
.filter(el => el !== target)
|
|
134
|
+
.forEach(el => {
|
|
135
|
+
el.checked = false;
|
|
136
|
+
el.setAttribute('aria-checked', 'false');
|
|
137
|
+
});
|
|
138
|
+
this.value = event.detail.value;
|
|
139
|
+
this.internals.setFormValue(this.value);
|
|
140
|
+
this.updateTabIndexes(target);
|
|
141
|
+
this.updateFormValidity();
|
|
142
|
+
this.bdsChange.emit({ value: this.value });
|
|
143
|
+
this.valueChange.emit(this.value);
|
|
144
|
+
}
|
|
145
|
+
handleInvalid(event) {
|
|
146
|
+
if (this.errorMessage !== '') {
|
|
147
|
+
event.preventDefault();
|
|
148
|
+
this.isInvalid = true;
|
|
149
|
+
this.radioElements.forEach(el => (el.error = true));
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
/** Returns whether the group's current value satisfies the browser's built-in constraint validation. */
|
|
153
|
+
async checkValidity() {
|
|
154
|
+
return this.internals.checkValidity();
|
|
155
|
+
}
|
|
156
|
+
/** Reports the group's validity state to the user, showing native validation UI if invalid. */
|
|
157
|
+
async reportValidity() {
|
|
158
|
+
return this.internals.reportValidity();
|
|
159
|
+
}
|
|
160
|
+
navigateTo(current, forward) {
|
|
161
|
+
const elements = this.radioElements.filter(el => !el.disabled);
|
|
162
|
+
if (elements.length === 0)
|
|
163
|
+
return;
|
|
164
|
+
const idx = elements.indexOf(current);
|
|
165
|
+
const newIndex = (elements.length + idx + (forward ? 1 : -1)) % elements.length;
|
|
166
|
+
const next = elements[newIndex];
|
|
167
|
+
next.checked = true;
|
|
168
|
+
next.setAttribute('aria-checked', 'true');
|
|
169
|
+
this.radioElements
|
|
170
|
+
.filter(el => el !== next)
|
|
171
|
+
.forEach(el => {
|
|
172
|
+
el.checked = false;
|
|
173
|
+
el.setAttribute('aria-checked', 'false');
|
|
174
|
+
});
|
|
175
|
+
this.value = next.value;
|
|
176
|
+
this.internals.setFormValue(this.value);
|
|
177
|
+
this.updateTabIndexes(next);
|
|
178
|
+
this.updateFormValidity();
|
|
179
|
+
this.bdsChange.emit({ value: this.value });
|
|
180
|
+
this.valueChange.emit(this.value);
|
|
181
|
+
next.focus();
|
|
182
|
+
}
|
|
183
|
+
insertDividers() {
|
|
184
|
+
this.el.querySelectorAll('bds-divider[data-injected]').forEach(d => d.remove());
|
|
185
|
+
if (this.type !== 'radiobutton')
|
|
186
|
+
return;
|
|
187
|
+
const dividerOrientation = this.orientation === ORIENTATIONS.HORIZONTAL ? ORIENTATIONS.VERTICAL : ORIENTATIONS.HORIZONTAL;
|
|
188
|
+
const buttons = this.radioElements.filter((el) => el.tagName === 'BDS-RADIO-BUTTON');
|
|
189
|
+
buttons.forEach((btn, i) => {
|
|
190
|
+
if (i === 0)
|
|
191
|
+
return;
|
|
192
|
+
const divider = document.createElement('bds-divider');
|
|
193
|
+
divider.setAttribute('orientation', dividerOrientation);
|
|
194
|
+
divider.setAttribute('data-injected', '');
|
|
195
|
+
btn.parentNode?.insertBefore(divider, btn);
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
get radioElements() {
|
|
199
|
+
return Array.from(this.el.querySelectorAll('bds-radio, bds-radio-button, bds-radio-card'));
|
|
200
|
+
}
|
|
201
|
+
syncFormValue() {
|
|
202
|
+
this.internals.setFormValue(this.value !== '' ? this.value : null);
|
|
203
|
+
this.updateFormValidity();
|
|
204
|
+
}
|
|
205
|
+
updateFormValidity() {
|
|
206
|
+
if (this.required && this.value === '') {
|
|
207
|
+
const anchor = this.radioElements.find(el => !el.disabled);
|
|
208
|
+
this.internals.setValidity({ valueMissing: true }, this.errorMessage !== '' ? this.errorMessage : 'Please select an option.', anchor);
|
|
209
|
+
}
|
|
210
|
+
else {
|
|
211
|
+
this.internals.setValidity({});
|
|
212
|
+
if (this.isInvalid) {
|
|
213
|
+
this.isInvalid = false;
|
|
214
|
+
if (!this.error)
|
|
215
|
+
this.radioElements.forEach(el => (el.error = false));
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
updateLayoutCount() {
|
|
220
|
+
const count = this.radioElements.length;
|
|
221
|
+
this.el.style.setProperty('--layout-count', `${count}`);
|
|
222
|
+
if (count !== this._buttonCount) {
|
|
223
|
+
this._buttonCount = count;
|
|
224
|
+
this.insertDividers();
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
updateTabIndexes(active) {
|
|
228
|
+
this.radioElements.forEach(el => el.setAttribute('tabindex', '-1'));
|
|
229
|
+
if (active !== null)
|
|
230
|
+
active.setAttribute('tabindex', '0');
|
|
231
|
+
}
|
|
232
|
+
get isError() {
|
|
233
|
+
const error = this.error && !this.disabled;
|
|
234
|
+
return error || this.isInvalid;
|
|
235
|
+
}
|
|
236
|
+
get classMap() {
|
|
237
|
+
return {
|
|
238
|
+
'bds-radio-group': true,
|
|
239
|
+
'bds-radio-group--disabled': this.isDisabled,
|
|
240
|
+
'bds-radio-group--error': this.isError,
|
|
241
|
+
'bds-radio-group--required': this.required,
|
|
242
|
+
};
|
|
243
|
+
}
|
|
244
|
+
render() {
|
|
245
|
+
const labelId = `${this._id}-label`;
|
|
246
|
+
const helperId = `${this._id}-helper`;
|
|
247
|
+
const showError = this.isError;
|
|
248
|
+
const typographyState = this.isDisabled ? 'disabled' : showError ? 'error' : 'default';
|
|
249
|
+
const helperContent = showError && this.errorMessage !== '' ? this.errorMessage : this.helperText;
|
|
250
|
+
return (h(Host, { key: 'ab755f253ab7096e8ed0efa7196cedd96cdc7ca8', class: this.classMap, role: "radiogroup", "aria-labelledby": this.label !== '' ? labelId : undefined, "aria-describedby": helperContent !== '' ? helperId : undefined, "aria-invalid": showError ? 'true' : undefined, "aria-required": this.required ? 'true' : undefined, onKeyDown: this.handleKeyDown }, this.label && (h("bds-typography", { key: '85bc7d114efabd92930c6c934c19e4ba887a3663', id: labelId, variant: "label", state: typographyState, required: this.required, tooltipText: this.info !== '' ? this.info : undefined }, this.label)), h("div", { key: '3f1670875353369c608c9cf064ccb1b7beede19a', class: "bds-radio-group__options" }, h("slot", { key: 'b0d52880c82dec9557c10bcf7ef8930299bdf7a6', onSlotchange: this.handleSlotChange })), helperContent && (h("bds-typography", { key: 'f0a17de329944c3fe63cf7cb586ec85016693208', id: helperId, variant: "helper", state: typographyState }, helperContent))));
|
|
251
|
+
}
|
|
252
|
+
static get is() { return "bds-radio-group"; }
|
|
253
|
+
static get formAssociated() { return true; }
|
|
254
|
+
static get originalStyleUrls() {
|
|
255
|
+
return {
|
|
256
|
+
"$": ["bds-radio-group.scss"]
|
|
257
|
+
};
|
|
258
|
+
}
|
|
259
|
+
static get styleUrls() {
|
|
260
|
+
return {
|
|
261
|
+
"$": ["bds-radio-group.css"]
|
|
262
|
+
};
|
|
263
|
+
}
|
|
264
|
+
static get properties() {
|
|
265
|
+
return {
|
|
266
|
+
"disabled": {
|
|
267
|
+
"type": "boolean",
|
|
268
|
+
"mutable": false,
|
|
269
|
+
"complexType": {
|
|
270
|
+
"original": "false",
|
|
271
|
+
"resolved": "boolean",
|
|
272
|
+
"references": {}
|
|
273
|
+
},
|
|
274
|
+
"required": false,
|
|
275
|
+
"optional": false,
|
|
276
|
+
"docs": {
|
|
277
|
+
"tags": [{
|
|
278
|
+
"name": "State",
|
|
279
|
+
"text": "for form-level disable support."
|
|
280
|
+
}],
|
|
281
|
+
"text": "Disables all child radios and prevents selection. Also mirrored to isDisabled"
|
|
282
|
+
},
|
|
283
|
+
"getter": false,
|
|
284
|
+
"setter": false,
|
|
285
|
+
"reflect": true,
|
|
286
|
+
"attribute": "disabled",
|
|
287
|
+
"defaultValue": "false"
|
|
288
|
+
},
|
|
289
|
+
"error": {
|
|
290
|
+
"type": "boolean",
|
|
291
|
+
"mutable": false,
|
|
292
|
+
"complexType": {
|
|
293
|
+
"original": "false",
|
|
294
|
+
"resolved": "boolean",
|
|
295
|
+
"references": {}
|
|
296
|
+
},
|
|
297
|
+
"required": false,
|
|
298
|
+
"optional": false,
|
|
299
|
+
"docs": {
|
|
300
|
+
"tags": [],
|
|
301
|
+
"text": "Shows error styling on the group helper text. Propagated to all child radios."
|
|
302
|
+
},
|
|
303
|
+
"getter": false,
|
|
304
|
+
"setter": false,
|
|
305
|
+
"reflect": true,
|
|
306
|
+
"attribute": "error",
|
|
307
|
+
"defaultValue": "false"
|
|
308
|
+
},
|
|
309
|
+
"errorMessage": {
|
|
310
|
+
"type": "string",
|
|
311
|
+
"mutable": false,
|
|
312
|
+
"complexType": {
|
|
313
|
+
"original": "\"\"",
|
|
314
|
+
"resolved": "\"\"",
|
|
315
|
+
"references": {}
|
|
316
|
+
},
|
|
317
|
+
"required": false,
|
|
318
|
+
"optional": false,
|
|
319
|
+
"docs": {
|
|
320
|
+
"tags": [],
|
|
321
|
+
"text": "Error message rendered below the radio options when error is true. Replaces helperText."
|
|
322
|
+
},
|
|
323
|
+
"getter": false,
|
|
324
|
+
"setter": false,
|
|
325
|
+
"reflect": false,
|
|
326
|
+
"attribute": "error-message",
|
|
327
|
+
"defaultValue": "''"
|
|
328
|
+
},
|
|
329
|
+
"helperText": {
|
|
330
|
+
"type": "string",
|
|
331
|
+
"mutable": false,
|
|
332
|
+
"complexType": {
|
|
333
|
+
"original": "\"\"",
|
|
334
|
+
"resolved": "\"\"",
|
|
335
|
+
"references": {}
|
|
336
|
+
},
|
|
337
|
+
"required": false,
|
|
338
|
+
"optional": false,
|
|
339
|
+
"docs": {
|
|
340
|
+
"tags": [],
|
|
341
|
+
"text": "Helper text rendered below the radio options. Shown in default state; replaced by errorMessage in error state."
|
|
342
|
+
},
|
|
343
|
+
"getter": false,
|
|
344
|
+
"setter": false,
|
|
345
|
+
"reflect": false,
|
|
346
|
+
"attribute": "helper-text",
|
|
347
|
+
"defaultValue": "''"
|
|
348
|
+
},
|
|
349
|
+
"info": {
|
|
350
|
+
"type": "string",
|
|
351
|
+
"mutable": false,
|
|
352
|
+
"complexType": {
|
|
353
|
+
"original": "\"\"",
|
|
354
|
+
"resolved": "\"\"",
|
|
355
|
+
"references": {}
|
|
356
|
+
},
|
|
357
|
+
"required": false,
|
|
358
|
+
"optional": false,
|
|
359
|
+
"docs": {
|
|
360
|
+
"tags": [],
|
|
361
|
+
"text": "Tooltip text shown on the group label info icon."
|
|
362
|
+
},
|
|
363
|
+
"getter": false,
|
|
364
|
+
"setter": false,
|
|
365
|
+
"reflect": false,
|
|
366
|
+
"attribute": "info",
|
|
367
|
+
"defaultValue": "''"
|
|
368
|
+
},
|
|
369
|
+
"label": {
|
|
370
|
+
"type": "string",
|
|
371
|
+
"mutable": false,
|
|
372
|
+
"complexType": {
|
|
373
|
+
"original": "\"\"",
|
|
374
|
+
"resolved": "\"\"",
|
|
375
|
+
"references": {}
|
|
376
|
+
},
|
|
377
|
+
"required": false,
|
|
378
|
+
"optional": false,
|
|
379
|
+
"docs": {
|
|
380
|
+
"tags": [],
|
|
381
|
+
"text": "Group label rendered above the radio options."
|
|
382
|
+
},
|
|
383
|
+
"getter": false,
|
|
384
|
+
"setter": false,
|
|
385
|
+
"reflect": false,
|
|
386
|
+
"attribute": "label",
|
|
387
|
+
"defaultValue": "''"
|
|
388
|
+
},
|
|
389
|
+
"name": {
|
|
390
|
+
"type": "string",
|
|
391
|
+
"mutable": false,
|
|
392
|
+
"complexType": {
|
|
393
|
+
"original": "string",
|
|
394
|
+
"resolved": "string",
|
|
395
|
+
"references": {}
|
|
396
|
+
},
|
|
397
|
+
"required": true,
|
|
398
|
+
"optional": false,
|
|
399
|
+
"docs": {
|
|
400
|
+
"tags": [],
|
|
401
|
+
"text": "Name of the form control; submitted as the field key in FormData."
|
|
402
|
+
},
|
|
403
|
+
"getter": false,
|
|
404
|
+
"setter": false,
|
|
405
|
+
"reflect": true,
|
|
406
|
+
"attribute": "name"
|
|
407
|
+
},
|
|
408
|
+
"orientation": {
|
|
409
|
+
"type": "string",
|
|
410
|
+
"mutable": false,
|
|
411
|
+
"complexType": {
|
|
412
|
+
"original": "Orientation",
|
|
413
|
+
"resolved": "\"horizontal\" | \"vertical\"",
|
|
414
|
+
"references": {
|
|
415
|
+
"Orientation": {
|
|
416
|
+
"location": "import",
|
|
417
|
+
"path": "@/types",
|
|
418
|
+
"id": "src/types/index.ts::Orientation",
|
|
419
|
+
"referenceLocation": "Orientation"
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
},
|
|
423
|
+
"required": false,
|
|
424
|
+
"optional": false,
|
|
425
|
+
"docs": {
|
|
426
|
+
"tags": [],
|
|
427
|
+
"text": "Layout direction of the radio options."
|
|
428
|
+
},
|
|
429
|
+
"getter": false,
|
|
430
|
+
"setter": false,
|
|
431
|
+
"reflect": true,
|
|
432
|
+
"attribute": "orientation",
|
|
433
|
+
"defaultValue": "ORIENTATIONS.VERTICAL"
|
|
434
|
+
},
|
|
435
|
+
"required": {
|
|
436
|
+
"type": "boolean",
|
|
437
|
+
"mutable": false,
|
|
438
|
+
"complexType": {
|
|
439
|
+
"original": "false",
|
|
440
|
+
"resolved": "boolean",
|
|
441
|
+
"references": {}
|
|
442
|
+
},
|
|
443
|
+
"required": false,
|
|
444
|
+
"optional": false,
|
|
445
|
+
"docs": {
|
|
446
|
+
"tags": [],
|
|
447
|
+
"text": "Marks the group as required for form submission. Triggers validity error when no radio is selected."
|
|
448
|
+
},
|
|
449
|
+
"getter": false,
|
|
450
|
+
"setter": false,
|
|
451
|
+
"reflect": true,
|
|
452
|
+
"attribute": "required",
|
|
453
|
+
"defaultValue": "false"
|
|
454
|
+
},
|
|
455
|
+
"type": {
|
|
456
|
+
"type": "string",
|
|
457
|
+
"mutable": false,
|
|
458
|
+
"complexType": {
|
|
459
|
+
"original": "RadioGroupType",
|
|
460
|
+
"resolved": "\"radio\" | \"radiobutton\" | \"radiocard\"",
|
|
461
|
+
"references": {
|
|
462
|
+
"RadioGroupType": {
|
|
463
|
+
"location": "import",
|
|
464
|
+
"path": "./types/types",
|
|
465
|
+
"id": "src/components/forms/bds-radio-group/types/types.ts::RadioGroupType",
|
|
466
|
+
"referenceLocation": "RadioGroupType"
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
},
|
|
470
|
+
"required": false,
|
|
471
|
+
"optional": false,
|
|
472
|
+
"docs": {
|
|
473
|
+
"tags": [],
|
|
474
|
+
"text": "Identifies this group variant. 'radio' renders circular bds-radio children; 'radiobutton' renders bds-radio-button segmented control; 'radiocard' renders bds-radio-card element."
|
|
475
|
+
},
|
|
476
|
+
"getter": false,
|
|
477
|
+
"setter": false,
|
|
478
|
+
"reflect": true,
|
|
479
|
+
"attribute": "type",
|
|
480
|
+
"defaultValue": "RADIO_GROUP_TYPES.RADIO"
|
|
481
|
+
},
|
|
482
|
+
"value": {
|
|
483
|
+
"type": "string",
|
|
484
|
+
"mutable": true,
|
|
485
|
+
"complexType": {
|
|
486
|
+
"original": "string",
|
|
487
|
+
"resolved": "string",
|
|
488
|
+
"references": {}
|
|
489
|
+
},
|
|
490
|
+
"required": false,
|
|
491
|
+
"optional": false,
|
|
492
|
+
"docs": {
|
|
493
|
+
"tags": [],
|
|
494
|
+
"text": "Currently selected radio value. Synced to children on change."
|
|
495
|
+
},
|
|
496
|
+
"getter": false,
|
|
497
|
+
"setter": false,
|
|
498
|
+
"reflect": false,
|
|
499
|
+
"attribute": "value",
|
|
500
|
+
"defaultValue": "''"
|
|
501
|
+
}
|
|
502
|
+
};
|
|
503
|
+
}
|
|
504
|
+
static get states() {
|
|
505
|
+
return {
|
|
506
|
+
"isDisabled": {},
|
|
507
|
+
"isInvalid": {}
|
|
508
|
+
};
|
|
509
|
+
}
|
|
510
|
+
static get events() {
|
|
511
|
+
return [{
|
|
512
|
+
"method": "bdsChange",
|
|
513
|
+
"name": "bdsChange",
|
|
514
|
+
"bubbles": true,
|
|
515
|
+
"cancelable": true,
|
|
516
|
+
"composed": true,
|
|
517
|
+
"docs": {
|
|
518
|
+
"tags": [],
|
|
519
|
+
"text": "Emitted when the selected radio changes. Payload includes the new value."
|
|
520
|
+
},
|
|
521
|
+
"complexType": {
|
|
522
|
+
"original": "RadioGroupChangeDetail",
|
|
523
|
+
"resolved": "RadioGroupChangeDetail",
|
|
524
|
+
"references": {
|
|
525
|
+
"RadioGroupChangeDetail": {
|
|
526
|
+
"location": "import",
|
|
527
|
+
"path": "./types/IRadioGroup",
|
|
528
|
+
"id": "src/components/forms/bds-radio-group/types/IRadioGroup.ts::RadioGroupChangeDetail",
|
|
529
|
+
"referenceLocation": "RadioGroupChangeDetail"
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
}, {
|
|
534
|
+
"method": "valueChange",
|
|
535
|
+
"name": "valueChange",
|
|
536
|
+
"bubbles": true,
|
|
537
|
+
"cancelable": true,
|
|
538
|
+
"composed": true,
|
|
539
|
+
"docs": {
|
|
540
|
+
"tags": [],
|
|
541
|
+
"text": "Emitted when the selected radio changes. Used for v-model two-way binding in Vue."
|
|
542
|
+
},
|
|
543
|
+
"complexType": {
|
|
544
|
+
"original": "string",
|
|
545
|
+
"resolved": "string",
|
|
546
|
+
"references": {}
|
|
547
|
+
}
|
|
548
|
+
}];
|
|
549
|
+
}
|
|
550
|
+
static get methods() {
|
|
551
|
+
return {
|
|
552
|
+
"checkValidity": {
|
|
553
|
+
"complexType": {
|
|
554
|
+
"signature": "() => Promise<boolean>",
|
|
555
|
+
"parameters": [],
|
|
556
|
+
"references": {
|
|
557
|
+
"Promise": {
|
|
558
|
+
"location": "global",
|
|
559
|
+
"id": "global::Promise"
|
|
560
|
+
}
|
|
561
|
+
},
|
|
562
|
+
"return": "Promise<boolean>"
|
|
563
|
+
},
|
|
564
|
+
"docs": {
|
|
565
|
+
"text": "Returns whether the group's current value satisfies the browser's built-in constraint validation.",
|
|
566
|
+
"tags": []
|
|
567
|
+
}
|
|
568
|
+
},
|
|
569
|
+
"reportValidity": {
|
|
570
|
+
"complexType": {
|
|
571
|
+
"signature": "() => Promise<boolean>",
|
|
572
|
+
"parameters": [],
|
|
573
|
+
"references": {
|
|
574
|
+
"Promise": {
|
|
575
|
+
"location": "global",
|
|
576
|
+
"id": "global::Promise"
|
|
577
|
+
}
|
|
578
|
+
},
|
|
579
|
+
"return": "Promise<boolean>"
|
|
580
|
+
},
|
|
581
|
+
"docs": {
|
|
582
|
+
"text": "Reports the group's validity state to the user, showing native validation UI if invalid.",
|
|
583
|
+
"tags": []
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
};
|
|
587
|
+
}
|
|
588
|
+
static get elementRef() { return "el"; }
|
|
589
|
+
static get watchers() {
|
|
590
|
+
return [{
|
|
591
|
+
"propName": "orientation",
|
|
592
|
+
"methodName": "checkPropValues"
|
|
593
|
+
}, {
|
|
594
|
+
"propName": "disabled",
|
|
595
|
+
"methodName": "onDisabledChange"
|
|
596
|
+
}, {
|
|
597
|
+
"propName": "error",
|
|
598
|
+
"methodName": "onErrorChange"
|
|
599
|
+
}, {
|
|
600
|
+
"propName": "value",
|
|
601
|
+
"methodName": "onValueChange"
|
|
602
|
+
}];
|
|
603
|
+
}
|
|
604
|
+
static get listeners() {
|
|
605
|
+
return [{
|
|
606
|
+
"name": "bdsChange",
|
|
607
|
+
"method": "handleRadioChange",
|
|
608
|
+
"target": undefined,
|
|
609
|
+
"capture": false,
|
|
610
|
+
"passive": false
|
|
611
|
+
}, {
|
|
612
|
+
"name": "invalid",
|
|
613
|
+
"method": "handleInvalid",
|
|
614
|
+
"target": undefined,
|
|
615
|
+
"capture": false,
|
|
616
|
+
"passive": false
|
|
617
|
+
}];
|
|
618
|
+
}
|
|
619
|
+
static get attachInternalsMemberName() { return "internals"; }
|
|
620
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -323,7 +323,7 @@ export class BdsTextField extends Mixin(formAssociatedMixin) {
|
|
|
323
323
|
: this.helperText;
|
|
324
324
|
const showFooter = helperContent !== '' || (this.counter && this.charCount > 0);
|
|
325
325
|
const typographyState = this.isDisabled ? 'disabled' : effectiveError ? 'error' : 'default';
|
|
326
|
-
return (h(Host, { key: '
|
|
326
|
+
return (h(Host, { key: '5f52a0a9553efa1ec140b9edc4d3d332b9b306bc', class: this.classMap, style: this.hostStyle, tabIndex: -1, onFocus: () => !this.readOnly && this.el.querySelector('input')?.focus() }, this.label !== '' && (h("bds-typography", { key: 'eea2b4211cb13cc24baa650239ceca1168933eb5', id: labelId, variant: "label", htmlFor: this._id, required: this.required, tooltipText: this.info !== '' ? this.info : undefined, state: typographyState }, this.label)), h("div", { key: '17d9e4b5f7e0d64a7e6e73200073db9e2d89b601', class: "bds-text-field__container" }, (this.icon !== '' || this.sublabel !== '') && (h("span", { key: '5557471fd0b5b49a1bb856ea4c1b901ca96039e6', class: "bds-text-field__sublabel" }, this.icon !== '' && h("em", { key: 'e213979d268b2fce51a0a090b82dff0552515a8c', class: this.icon }), this.sublabel)), h("slot", { key: '828b889037a40e562bf45a4b502988542b815701', name: "prefix" }), h("input", { key: 'b842de768f53b095b65fc60da7a0cfabfbcc87d1', id: this._id, class: "bds-text-field__control", "aria-labelledby": this.label !== '' ? labelId : undefined, "aria-describedby": showFooter && helperContent !== '' ? helperId : undefined, "aria-invalid": this.error || this.validationError ? 'true' : undefined, "aria-required": this.required ? 'true' : undefined, type: this.type === TEXT_FIELD_TYPES.PASSWORD && this.showPassword ? TEXT_FIELD_TYPES.TEXT : this.type, value: this.value, disabled: this.isDisabled, readOnly: this.readOnly, tabIndex: this.readOnly ? -1 : undefined, placeholder: this.placeholder, autocomplete: this.autocomplete, pattern: this.pattern !== '' ? this.pattern : undefined, minLength: this.minLength !== 0 ? this.minLength : undefined, maxLength: this.effectiveMaxLength, onMouseDown: (e) => this.handleMouseDown(e), onInput: (e) => this.handleInput(e), onChange: (e) => this.handleChange(e), onFocus: (e) => this.handleFocus(e), onBlur: (e) => this.handleBlur(e) }), (showClear || this.type === TEXT_FIELD_TYPES.PASSWORD) && (h("div", { key: '19ffb36c88f72645969fed69eb8368647ea8071c', class: "bds-text-field__actions" }, showClear && (h("button", { key: '1adbe2d791fa48cbc6d0b9d71bda40f01f77efe4', class: "bds-text-field__action bds-text-field__action--clear", type: "button", "aria-label": ARIA_LABELS.Clear, onClick: () => this.handleClear() }, h("em", { key: '72e94a903896a8f0d04569ffb4b692c5fe37c621', class: this.iconClear }))), this.type === TEXT_FIELD_TYPES.PASSWORD && (h("button", { key: '795a85ad395254a8dbac151eb225aeb0d0d9266a', class: "bds-text-field__action bds-text-field__action--password", type: "button", "aria-label": this.showPassword ? ARIA_LABELS.HidePassword : ARIA_LABELS.ShowPassword, onClick: () => this.handleShowPassword() }, h("em", { key: 'e84632218e25422ce5ba64ad6efc40a94310a0c5', class: this.showPasswordIcon })))))), showFooter && (h("div", { key: 'ef98f783b7cd1ccf37d04a209d1bcf4b87ca048a', class: "bds-text-field__footer" }, helperContent !== '' && (h("bds-typography", { key: 'c560b15810400be0710368c089294a6ee51746b1', id: helperId, variant: "helper", state: typographyState }, helperContent)), this.counter && this.charCount > 0 && (h("span", { key: 'e4f7d33f2e3bf588f30ccb7165a9b385d8f5a8e3', class: "bds-text-field__char-count" }, this.currentCharCount, "/", this.charCount))))));
|
|
327
327
|
}
|
|
328
328
|
static get is() { return "bds-text-field"; }
|
|
329
329
|
static get formAssociated() { return true; }
|