@telesign/boreal-web-components 0.1.0-alpha.3 → 0.1.0-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components-build/bds-avatar.d.ts +11 -0
- package/components-build/bds-avatar.js +1 -0
- package/components-build/bds-badge.d.ts +11 -0
- package/components-build/bds-badge.js +1 -0
- package/components-build/bds-banner.js +1 -1
- package/components-build/bds-button.js +1 -1
- package/components-build/bds-checkbox.js +1 -1
- package/components-build/bds-dialog.js +1 -1
- package/components-build/bds-divider.d.ts +11 -0
- package/components-build/bds-divider.js +1 -0
- package/components-build/bds-flag.js +1 -1
- package/components-build/bds-grid-item.d.ts +11 -0
- package/components-build/bds-grid-item.js +1 -0
- package/components-build/bds-grid.d.ts +11 -0
- package/components-build/bds-grid.js +1 -0
- package/components-build/bds-list-menu-item.d.ts +11 -0
- package/components-build/bds-list-menu-item.js +1 -0
- package/components-build/bds-list-menu.d.ts +11 -0
- package/components-build/bds-list-menu.js +1 -0
- package/components-build/bds-popover.js +1 -1
- package/components-build/bds-spinner.js +1 -1
- package/components-build/bds-status.d.ts +11 -0
- package/components-build/bds-status.js +1 -0
- package/components-build/bds-tag.d.ts +11 -0
- package/components-build/bds-tag.js +1 -0
- package/components-build/bds-text-field.js +1 -1
- package/components-build/bds-toggle.d.ts +11 -0
- package/components-build/bds-toggle.js +1 -0
- package/components-build/bds-tooltip.js +1 -1
- package/components-build/bds-typography.js +1 -1
- package/components-build/index.js +1 -1
- package/components-build/p-B8n1ru5i.js +1 -0
- package/components-build/p-Bfazyxqi.js +1 -0
- package/components-build/p-CGdxFth9.js +1 -0
- package/components-build/p-CrAt6pGl.js +1 -0
- package/components-build/p-DCwT43Kz.js +1 -0
- package/components-build/p-DIY3CDNL.js +1 -0
- package/components-build/p-DhSchGPI.js +1 -0
- package/components-build/p-kGnB15Lz.js +1 -0
- package/custom-elements.json +2588 -540
- package/dist/boreal-web-components/boreal-web-components.esm.js +1 -1
- package/dist/boreal-web-components/boreal-web-components.js +1 -1
- package/dist/boreal-web-components/css/boreal.css +1066 -1074
- package/dist/boreal-web-components/css/global.css +403 -407
- package/dist/boreal-web-components/css/theme-connect.css +163 -164
- package/dist/boreal-web-components/css/theme-engage.css +163 -164
- package/dist/boreal-web-components/css/theme-protect.css +163 -164
- package/dist/boreal-web-components/css/theme-proximus.css +164 -165
- package/dist/boreal-web-components/p-0028481c.entry.js +1 -0
- package/dist/boreal-web-components/p-127a4134.entry.js +1 -0
- package/dist/boreal-web-components/p-1466de58.system.entry.js +1 -0
- package/dist/boreal-web-components/p-1d1bb9d2.entry.js +1 -0
- package/dist/boreal-web-components/p-2158a7cd.entry.js +1 -0
- package/dist/boreal-web-components/{p-8c57e06a.entry.js → p-251b3002.entry.js} +1 -1
- package/dist/boreal-web-components/p-251d35df.system.entry.js +1 -0
- package/dist/boreal-web-components/{p-fc2cb919.entry.js → p-2b8bd1dd.entry.js} +1 -1
- package/dist/boreal-web-components/p-32c23246.system.entry.js +1 -0
- package/dist/boreal-web-components/p-3fbcc233.entry.js +1 -0
- package/dist/boreal-web-components/p-401f1aee.system.entry.js +1 -0
- package/dist/boreal-web-components/p-41b48701.system.entry.js +1 -0
- package/dist/boreal-web-components/p-41cac1b8.system.entry.js +1 -0
- package/dist/boreal-web-components/p-44ceff4e.system.entry.js +1 -0
- package/dist/boreal-web-components/{p-efe57901.system.entry.js → p-52600375.system.entry.js} +1 -1
- package/dist/boreal-web-components/p-627b19a5.system.entry.js +1 -0
- package/dist/boreal-web-components/p-649737e5.entry.js +1 -0
- package/dist/boreal-web-components/p-64cb5825.entry.js +1 -0
- package/dist/boreal-web-components/p-66360e63.entry.js +1 -0
- package/dist/boreal-web-components/p-695d0830.entry.js +1 -0
- package/dist/boreal-web-components/p-6a99f4c6.system.entry.js +1 -0
- package/dist/boreal-web-components/p-731b88cc.entry.js +1 -0
- package/dist/boreal-web-components/{p-22378341.system.entry.js → p-74c13bed.system.entry.js} +1 -1
- package/dist/boreal-web-components/p-7a4efddd.system.entry.js +1 -0
- package/dist/boreal-web-components/p-7db870b7.entry.js +1 -0
- package/dist/boreal-web-components/p-7f7ac40f.entry.js +1 -0
- package/dist/boreal-web-components/p-80822731.system.entry.js +1 -0
- package/dist/boreal-web-components/p-82d49661.entry.js +1 -0
- package/dist/boreal-web-components/p-83ca193e.entry.js +1 -0
- package/dist/boreal-web-components/p-871c9a9f.system.entry.js +1 -0
- package/dist/boreal-web-components/p-BQ_zoZa2.js +1 -0
- package/dist/boreal-web-components/p-Bfazyxqi.js +1 -0
- package/dist/boreal-web-components/{p-D4EFsvs1.js → p-BqJlOB6b.js} +2 -2
- package/dist/boreal-web-components/p-BsZkk4oK.system.js +1 -0
- package/dist/boreal-web-components/p-CXz1RLGi.system.js +1 -0
- package/dist/boreal-web-components/p-CtknSula.system.js +1 -0
- package/dist/boreal-web-components/p-CvK2d92c.js +1 -0
- package/dist/boreal-web-components/p-CzYQb3pP.js +1 -0
- package/dist/boreal-web-components/p-DCKg5Cg_.system.js +2 -0
- package/dist/boreal-web-components/p-DZcx75cy.system.js +1 -0
- package/dist/boreal-web-components/p-DhSchGPI.js +1 -0
- package/dist/boreal-web-components/{p-BkDQsB4R.system.js → p-Dme-NuTD.system.js} +1 -1
- package/dist/boreal-web-components/p-RhSdMyWk.system.js +1 -0
- package/dist/boreal-web-components/{p-5fa53a80.system.entry.js → p-ab5ffa15.system.entry.js} +1 -1
- package/dist/boreal-web-components/p-b12d4788.system.entry.js +1 -0
- package/dist/boreal-web-components/p-ba2b625a.system.entry.js +1 -0
- package/dist/boreal-web-components/p-bf2ef10b.entry.js +1 -0
- package/dist/boreal-web-components/{p-6de2b44c.system.entry.js → p-c7aee9f4.system.entry.js} +1 -1
- package/dist/boreal-web-components/p-e0bf8a6e.entry.js +1 -0
- package/dist/boreal-web-components/p-edca16b6.system.entry.js +1 -0
- package/dist/boreal-web-components/p-fc24d963.entry.js +1 -0
- package/dist/boreal-web-components/p-kGnB15Lz.js +1 -0
- package/dist/boreal-web-components/p-vzZJGcYF.system.js +1 -0
- package/dist/boreal-web-components/scss/maps/_primitives.scss +404 -408
- package/dist/boreal-web-components/scss/maps/_theme-connect.scss +164 -165
- package/dist/boreal-web-components/scss/maps/_theme-engage.scss +164 -165
- package/dist/boreal-web-components/scss/maps/_theme-protect.scss +164 -165
- package/dist/boreal-web-components/scss/maps/_theme-proximus.scss +165 -166
- package/dist/boreal-web-components/scss/variables/_primitives.scss +404 -408
- package/dist/boreal-web-components/scss/variables/_theme-connect.scss +164 -165
- package/dist/boreal-web-components/scss/variables/_theme-engage.scss +164 -165
- package/dist/boreal-web-components/scss/variables/_theme-protect.scss +164 -165
- package/dist/boreal-web-components/scss/variables/_theme-proximus.scss +165 -166
- package/dist/cjs/BaseAttributes-DBBhKt7O.js +14 -0
- package/dist/cjs/Keys-DbIXSJF2.js +22 -0
- package/dist/cjs/bds-avatar.cjs.entry.js +89 -0
- package/dist/cjs/bds-badge.cjs.entry.js +50 -0
- package/dist/cjs/bds-banner.cjs.entry.js +12 -5
- package/dist/cjs/bds-button.cjs.entry.js +5 -5
- package/dist/cjs/bds-checkbox.cjs.entry.js +6 -6
- package/dist/cjs/bds-dialog.cjs.entry.js +7 -6
- package/dist/cjs/bds-divider.cjs.entry.js +46 -0
- package/dist/cjs/bds-flag.cjs.entry.js +3 -3
- package/dist/cjs/bds-grid-item.cjs.entry.js +93 -0
- package/dist/cjs/bds-grid.cjs.entry.js +37 -0
- package/dist/cjs/bds-list-menu-item.cjs.entry.js +468 -0
- package/dist/cjs/bds-list-menu.cjs.entry.js +130 -0
- package/dist/cjs/bds-popover.cjs.entry.js +17 -8
- package/dist/cjs/bds-spinner.cjs.entry.js +4 -4
- package/dist/cjs/bds-status.cjs.entry.js +59 -0
- package/dist/cjs/bds-tag.cjs.entry.js +140 -0
- package/dist/cjs/bds-text-field.cjs.entry.js +12 -22
- package/dist/cjs/bds-toggle.cjs.entry.js +186 -0
- package/dist/cjs/bds-tooltip_2.cjs.entry.js +320 -0
- package/dist/cjs/boreal-web-components.cjs.js +2 -2
- package/dist/cjs/{anchored.mixin-CnIwkaUi.js → getOffset-m4hBgyVP.js} +42 -26
- package/dist/cjs/{index-BcSjvXJk.js → index-CwYIVC9N.js} +64 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{states-iIYiazaM.js → states-BweP5Vpu.js} +8 -0
- package/dist/cjs/validateProps-CJe9X5x8.js +42 -0
- package/dist/collection/collection-manifest.json +10 -0
- package/dist/collection/components/actions/bds-button/bds-button.js +2 -2
- package/dist/collection/components/actions/bds-list-menu/bds-list-menu/bds-list-menu.css +25 -0
- package/dist/collection/components/actions/bds-list-menu/bds-list-menu/bds-list-menu.js +301 -0
- package/dist/collection/components/actions/bds-list-menu/bds-list-menu-item/bds-list-menu-item.css +71 -0
- package/dist/collection/components/actions/bds-list-menu/bds-list-menu-item/bds-list-menu-item.js +437 -0
- package/dist/collection/components/actions/bds-list-menu/bds-list-menu-item/types/IListMenuItem.js +1 -0
- package/dist/collection/components/actions/bds-list-menu/bds-list-menu-item/types/enum.js +4 -0
- package/dist/collection/components/actions/bds-list-menu/bds-list-menu-item/types/types.js +1 -0
- package/dist/collection/components/actions/bds-toggle/bds-toggle.css +120 -0
- package/dist/collection/components/actions/bds-toggle/bds-toggle.js +544 -0
- package/dist/collection/components/actions/bds-toggle/types/IEventChange.js +1 -0
- package/dist/collection/components/actions/bds-toggle/types/IToggle.js +1 -0
- package/dist/collection/components/actions/bds-toggle/types/enum.js +4 -0
- package/dist/collection/components/actions/bds-toggle/types/index.js +4 -0
- package/dist/collection/components/actions/bds-toggle/types/types.js +1 -0
- package/dist/collection/components/feedback/bds-badge/bds-badge.css +76 -0
- package/dist/collection/components/feedback/bds-badge/bds-badge.js +120 -0
- package/dist/collection/components/feedback/bds-badge/types/IBadge.js +1 -0
- package/dist/collection/components/feedback/bds-badge/types/enum.js +5 -0
- package/dist/collection/components/feedback/bds-banner/bds-banner.css +1 -2
- package/dist/collection/components/feedback/bds-banner/bds-banner.js +30 -6
- package/dist/collection/components/feedback/bds-spinner/bds-spinner.css +7 -8
- package/dist/collection/components/feedback/bds-spinner/bds-spinner.js +1 -1
- package/dist/collection/components/feedback/bds-status/bds-status.css +101 -0
- package/dist/collection/components/feedback/bds-status/bds-status.js +122 -0
- package/dist/collection/components/feedback/bds-status/types/IStatus.js +1 -0
- package/dist/collection/components/feedback/bds-status/types/enum.js +5 -0
- package/dist/collection/components/feedback/bds-status/types/types.js +1 -0
- package/dist/collection/components/feedback/bds-tag/bds-tag.css +202 -0
- package/dist/collection/components/feedback/bds-tag/bds-tag.js +375 -0
- package/dist/collection/components/feedback/bds-tag/types/ITag.js +1 -0
- package/dist/collection/components/feedback/bds-tag/types/enum.js +10 -0
- package/dist/collection/components/feedback/bds-tag/types/index.js +3 -0
- package/dist/collection/components/feedback/bds-tag/types/types.js +1 -0
- package/dist/collection/components/forms/bds-checkbox/bds-checkbox.js +1 -1
- package/dist/collection/components/forms/bds-flag/bds-flag.js +1 -1
- package/dist/collection/components/forms/bds-text-field/bds-text-field.js +1 -1
- package/dist/collection/components/helpers/bds-divider.css +36 -0
- package/dist/collection/components/helpers/bds-divider.js +88 -0
- package/dist/collection/components/helpers/types/IDivider.js +1 -0
- package/dist/collection/components/helpers/types/enum.js +4 -0
- package/dist/collection/components/helpers/types/types.js +1 -0
- package/dist/collection/components/images-icons/bds-avatar/bds-avatar.css +52 -0
- package/dist/collection/components/images-icons/bds-avatar/bds-avatar.js +219 -0
- package/dist/collection/components/images-icons/bds-avatar/types/IAvatar.js +1 -0
- package/dist/collection/components/images-icons/bds-avatar/types/enum.js +5 -0
- package/dist/collection/components/images-icons/bds-avatar/types/index.js +3 -0
- package/dist/collection/components/images-icons/bds-avatar/types/types.js +1 -0
- package/dist/collection/components/layouts/bds-grid/grid/bds-grid.css +57 -0
- package/dist/collection/components/layouts/bds-grid/grid/bds-grid.js +100 -0
- package/dist/collection/components/layouts/bds-grid/grid/types/IGrid.js +1 -0
- package/dist/collection/components/layouts/bds-grid/grid/types/enum.js +4 -0
- package/dist/collection/components/layouts/bds-grid/grid/types/index.js +3 -0
- package/dist/collection/components/layouts/bds-grid/grid/types/types.js +1 -0
- package/dist/collection/components/layouts/bds-grid/grid-item/bds-grid-item.css +70 -0
- package/dist/collection/components/layouts/bds-grid/grid-item/bds-grid-item.js +306 -0
- package/dist/collection/components/layouts/bds-grid/grid-item/types/IGridItem.js +1 -0
- package/dist/collection/components/layouts/bds-grid/grid-item/types/enum.js +10 -0
- package/dist/collection/components/layouts/bds-grid/grid-item/types/index.js +3 -0
- package/dist/collection/components/layouts/bds-grid/grid-item/types/types.js +1 -0
- package/dist/collection/components/overlays/bds-dialog/bds-dialog.js +4 -3
- package/dist/collection/components/overlays/bds-popover/bds-popover.css +16 -2
- package/dist/collection/components/overlays/bds-popover/bds-popover.js +12 -4
- package/dist/collection/components/overlays/bds-popover/constants/Offset.js +1 -0
- package/dist/collection/components/overlays/bds-tooltip/bds-tooltip.css +2 -13
- package/dist/collection/components/overlays/bds-tooltip/bds-tooltip.js +4 -2
- package/dist/collection/components/overlays/bds-tooltip/constants/Offset.js +1 -0
- package/dist/collection/components/titles-text/bds-typography/bds-typography.css +4 -0
- package/dist/collection/components/titles-text/bds-typography/bds-typography.js +20 -19
- package/dist/collection/components/titles-text/bds-typography/utils/bds-typography-utils.js +2 -2
- package/dist/collection/css/boreal.css +1066 -1074
- package/dist/collection/css/global.css +403 -407
- package/dist/collection/css/theme-connect.css +163 -164
- package/dist/collection/css/theme-engage.css +163 -164
- package/dist/collection/css/theme-protect.css +163 -164
- package/dist/collection/css/theme-proximus.css +164 -165
- package/dist/collection/mixins/anchored.mixin.js +14 -1
- package/dist/collection/mixins/index.js +2 -0
- package/dist/collection/mixins/links.mixin.js +153 -0
- package/dist/collection/mixins/menu-behavior.mixin.js +113 -0
- package/dist/collection/scss/maps/_primitives.scss +404 -408
- package/dist/collection/scss/maps/_theme-connect.scss +164 -165
- package/dist/collection/scss/maps/_theme-engage.scss +164 -165
- package/dist/collection/scss/maps/_theme-protect.scss +164 -165
- package/dist/collection/scss/maps/_theme-proximus.scss +165 -166
- package/dist/collection/scss/variables/_primitives.scss +404 -408
- package/dist/collection/scss/variables/_theme-connect.scss +164 -165
- package/dist/collection/scss/variables/_theme-engage.scss +164 -165
- package/dist/collection/scss/variables/_theme-protect.scss +164 -165
- package/dist/collection/scss/variables/_theme-proximus.scss +165 -166
- package/dist/collection/services/floating/positioning.service.js +1 -1
- package/dist/collection/types/IFormProps.js +1 -0
- package/dist/collection/types/index.js +3 -0
- package/dist/collection/types/links.js +1 -0
- package/dist/collection/types/menu.js +8 -0
- package/dist/collection/types/position.js +6 -2
- package/dist/collection/utils/constants/common/Keys.js +12 -0
- package/dist/collection/utils/helpers/overlays/getOffset.js +13 -0
- package/dist/collection/utils/helpers/validateProps.js +21 -0
- package/dist/collection/utils/index.js +2 -1
- package/dist/collection/utils/menu/index.js +1 -0
- package/dist/collection/utils/menu/menu-item.utils.js +81 -0
- package/dist/collection/utils/{__test__ → testing}/index.js +0 -2
- package/dist/collection/utils/testing/mocks/console.js +30 -0
- package/dist/collection/utils/testing/mocks/index.js +4 -0
- package/dist/css/boreal.css +1066 -1074
- package/dist/css/global.css +403 -407
- package/dist/css/theme-connect.css +163 -164
- package/dist/css/theme-engage.css +163 -164
- package/dist/css/theme-protect.css +163 -164
- package/dist/css/theme-proximus.css +164 -165
- package/dist/esm/BaseAttributes-DhSchGPI.js +12 -0
- package/dist/esm/Keys-CzYQb3pP.js +20 -0
- package/dist/esm/bds-avatar.entry.js +87 -0
- package/dist/esm/bds-badge.entry.js +48 -0
- package/dist/esm/bds-banner.entry.js +12 -5
- package/dist/esm/bds-button.entry.js +5 -5
- package/dist/esm/bds-checkbox.entry.js +3 -3
- package/dist/esm/bds-dialog.entry.js +7 -6
- package/dist/esm/bds-divider.entry.js +44 -0
- package/dist/esm/bds-flag.entry.js +3 -3
- package/dist/esm/bds-grid-item.entry.js +91 -0
- package/dist/esm/bds-grid.entry.js +35 -0
- package/dist/esm/bds-list-menu-item.entry.js +466 -0
- package/dist/esm/bds-list-menu.entry.js +128 -0
- package/dist/esm/bds-popover.entry.js +16 -7
- package/dist/esm/bds-spinner.entry.js +4 -4
- package/dist/esm/bds-status.entry.js +57 -0
- package/dist/esm/bds-tag.entry.js +138 -0
- package/dist/esm/bds-text-field.entry.js +5 -15
- package/dist/esm/bds-toggle.entry.js +184 -0
- package/dist/esm/bds-tooltip_2.entry.js +317 -0
- package/dist/esm/boreal-web-components.js +3 -3
- package/dist/esm/{anchored.mixin-Y3MkGc2X.js → getOffset-DKPjeBHi.js} +40 -25
- package/dist/esm/{index-D4EFsvs1.js → index-BqJlOB6b.js} +64 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{states-BhTPNsBb.js → states-Bfazyxqi.js} +8 -1
- package/dist/esm/validateProps-kGnB15Lz.js +39 -0
- package/dist/esm-es5/BaseAttributes-DhSchGPI.js +1 -0
- package/dist/esm-es5/Keys-CzYQb3pP.js +1 -0
- package/dist/esm-es5/bds-avatar.entry.js +1 -0
- package/dist/esm-es5/bds-badge.entry.js +1 -0
- package/dist/esm-es5/bds-banner.entry.js +1 -1
- package/dist/esm-es5/bds-button.entry.js +1 -1
- package/dist/esm-es5/bds-checkbox.entry.js +1 -1
- package/dist/esm-es5/bds-dialog.entry.js +1 -1
- package/dist/esm-es5/bds-divider.entry.js +1 -0
- package/dist/esm-es5/bds-flag.entry.js +1 -1
- package/dist/esm-es5/bds-grid-item.entry.js +1 -0
- package/dist/esm-es5/bds-grid.entry.js +1 -0
- package/dist/esm-es5/bds-list-menu-item.entry.js +1 -0
- package/dist/esm-es5/bds-list-menu.entry.js +1 -0
- package/dist/esm-es5/bds-popover.entry.js +1 -1
- package/dist/esm-es5/bds-spinner.entry.js +1 -1
- package/dist/esm-es5/bds-status.entry.js +1 -0
- package/dist/esm-es5/bds-tag.entry.js +1 -0
- package/dist/esm-es5/bds-text-field.entry.js +1 -1
- package/dist/esm-es5/bds-toggle.entry.js +1 -0
- package/dist/esm-es5/bds-tooltip_2.entry.js +1 -0
- package/dist/esm-es5/boreal-web-components.js +1 -1
- package/dist/esm-es5/form-associated.mixin-CvK2d92c.js +1 -0
- package/dist/esm-es5/getOffset-DKPjeBHi.js +1 -0
- package/dist/esm-es5/index-BqJlOB6b.js +2 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/states-Bfazyxqi.js +1 -0
- package/dist/esm-es5/validateProps-kGnB15Lz.js +1 -0
- package/dist/scss/maps/_primitives.scss +404 -408
- package/dist/scss/maps/_theme-connect.scss +164 -165
- package/dist/scss/maps/_theme-engage.scss +164 -165
- package/dist/scss/maps/_theme-protect.scss +164 -165
- package/dist/scss/maps/_theme-proximus.scss +165 -166
- package/dist/scss/variables/_primitives.scss +404 -408
- package/dist/scss/variables/_theme-connect.scss +164 -165
- package/dist/scss/variables/_theme-engage.scss +164 -165
- package/dist/scss/variables/_theme-protect.scss +164 -165
- package/dist/scss/variables/_theme-proximus.scss +165 -166
- package/dist/types/components/actions/bds-list-menu/bds-list-menu/bds-list-menu.d.ts +70 -0
- package/dist/types/components/actions/bds-list-menu/bds-list-menu-item/bds-list-menu-item.d.ts +116 -0
- package/dist/types/components/actions/bds-list-menu/bds-list-menu-item/types/IListMenuItem.d.ts +12 -0
- package/dist/types/components/actions/bds-list-menu/bds-list-menu-item/types/enum.d.ts +5 -0
- package/dist/types/components/actions/bds-list-menu/bds-list-menu-item/types/types.d.ts +3 -0
- package/dist/types/components/actions/bds-toggle/bds-toggle.d.ts +91 -0
- package/dist/types/components/actions/bds-toggle/types/IEventChange.d.ts +5 -0
- package/dist/types/components/actions/bds-toggle/types/IToggle.d.ts +12 -0
- package/dist/types/components/actions/bds-toggle/types/enum.d.ts +5 -0
- package/dist/types/components/actions/bds-toggle/types/index.d.ts +5 -0
- package/dist/types/components/actions/bds-toggle/types/types.d.ts +3 -0
- package/dist/types/components/feedback/bds-badge/bds-badge.d.ts +31 -0
- package/dist/types/components/feedback/bds-badge/types/IBadge.d.ts +6 -0
- package/dist/types/components/feedback/bds-badge/types/enum.d.ts +9 -0
- package/dist/types/components/feedback/bds-banner/bds-banner.d.ts +8 -4
- package/dist/types/components/feedback/bds-status/bds-status.d.ts +26 -0
- package/dist/types/components/feedback/bds-status/types/IStatus.d.ts +7 -0
- package/dist/types/components/feedback/bds-status/types/enum.d.ts +6 -0
- package/dist/types/components/feedback/bds-status/types/types.d.ts +3 -0
- package/dist/types/components/feedback/bds-tag/bds-tag.d.ts +71 -0
- package/dist/types/components/feedback/bds-tag/types/ITag.d.ts +13 -0
- package/dist/types/components/feedback/bds-tag/types/enum.d.ts +11 -0
- package/dist/types/components/feedback/bds-tag/types/index.d.ts +4 -0
- package/dist/types/components/feedback/bds-tag/types/types.d.ts +8 -0
- package/dist/types/components/forms/bds-flag/bds-flag.d.ts +3 -4
- package/dist/types/components/helpers/bds-divider.d.ts +26 -0
- package/dist/types/components/helpers/types/IDivider.d.ts +5 -0
- package/dist/types/components/helpers/types/enum.d.ts +5 -0
- package/dist/types/components/helpers/types/types.d.ts +3 -0
- package/dist/types/components/images-icons/bds-avatar/bds-avatar.d.ts +51 -0
- package/dist/types/components/images-icons/bds-avatar/types/IAvatar.d.ts +9 -0
- package/dist/types/components/images-icons/bds-avatar/types/enum.d.ts +6 -0
- package/dist/types/components/images-icons/bds-avatar/types/index.d.ts +4 -0
- package/dist/types/components/images-icons/bds-avatar/types/types.d.ts +3 -0
- package/dist/types/components/layouts/bds-grid/grid/bds-grid.d.ts +19 -0
- package/dist/types/components/layouts/bds-grid/grid/types/IGrid.d.ts +6 -0
- package/dist/types/components/layouts/bds-grid/grid/types/enum.d.ts +5 -0
- package/dist/types/components/layouts/bds-grid/grid/types/index.d.ts +4 -0
- package/dist/types/components/layouts/bds-grid/grid/types/types.d.ts +3 -0
- package/dist/types/components/layouts/bds-grid/grid-item/bds-grid-item.d.ts +31 -0
- package/dist/types/components/layouts/bds-grid/grid-item/types/IGridItem.d.ts +12 -0
- package/dist/types/components/layouts/bds-grid/grid-item/types/enum.d.ts +11 -0
- package/dist/types/components/layouts/bds-grid/grid-item/types/index.d.ts +4 -0
- package/dist/types/components/layouts/bds-grid/grid-item/types/types.d.ts +3 -0
- package/dist/types/components/overlays/bds-dialog/bds-dialog.d.ts +2 -2
- package/dist/types/components/overlays/bds-popover/bds-popover.d.ts +1 -0
- package/dist/types/components/overlays/bds-popover/constants/Offset.d.ts +2 -0
- package/dist/types/components/overlays/bds-tooltip/bds-tooltip.d.ts +1 -0
- package/dist/types/components/overlays/bds-tooltip/constants/Offset.d.ts +2 -0
- package/dist/types/components/titles-text/bds-typography/bds-typography.d.ts +9 -9
- package/dist/types/components/titles-text/bds-typography/types/ITypography.d.ts +2 -2
- package/dist/types/components/titles-text/bds-typography/utils/bds-typography-utils.d.ts +1 -1
- package/dist/types/components.d.ts +1268 -54
- package/dist/types/mixins/anchored.mixin.d.ts +5 -0
- package/dist/types/mixins/index.d.ts +2 -0
- package/dist/types/mixins/links.mixin.d.ts +85 -0
- package/dist/types/mixins/menu-behavior.mixin.d.ts +91 -0
- package/dist/types/types/IFormProps.d.ts +25 -0
- package/dist/types/types/index.d.ts +3 -0
- package/dist/types/types/links.d.ts +14 -0
- package/dist/types/types/menu.d.ts +16 -0
- package/dist/types/types/position.d.ts +6 -2
- package/dist/types/utils/constants/common/Keys.d.ts +7 -6
- package/dist/types/utils/helpers/overlays/getOffset.d.ts +9 -0
- package/dist/types/utils/helpers/validateProps.d.ts +11 -0
- package/dist/types/utils/index.d.ts +2 -1
- package/dist/types/utils/menu/index.d.ts +2 -0
- package/dist/types/utils/menu/menu-item.utils.d.ts +50 -0
- package/dist/types/utils/{__test__ → testing}/index.d.ts +0 -2
- package/dist/types/utils/{__test__/backdrop-mock.d.ts → testing/mocks/backdrop.d.ts} +1 -1
- package/dist/types/utils/testing/mocks/console.d.ts +17 -0
- package/dist/types/utils/{__test__/mocks/ElementInternals.d.ts → testing/mocks/elementInternals.d.ts} +1 -1
- package/dist/types/utils/testing/mocks/index.d.ts +5 -0
- package/dist/types/utils/{__test__/popover-mock.d.ts → testing/mocks/popover.d.ts} +1 -1
- package/package.json +1 -1
- package/components-build/p-B6R9EVXK.js +0 -1
- package/components-build/p-BSpJ_e9f.js +0 -1
- package/components-build/p-BYEAJCas.js +0 -1
- package/components-build/p-BhTPNsBb.js +0 -1
- package/components-build/p-CYojP4vI.js +0 -1
- package/components-build/p-D5omSME4.js +0 -1
- package/components-build/p-vfAIdwy0.js +0 -1
- package/dist/boreal-web-components/p-07a933df.entry.js +0 -1
- package/dist/boreal-web-components/p-1bb2b33f.entry.js +0 -1
- package/dist/boreal-web-components/p-1fccea3f.system.entry.js +0 -1
- package/dist/boreal-web-components/p-20af732b.system.entry.js +0 -1
- package/dist/boreal-web-components/p-39c26e58.entry.js +0 -1
- package/dist/boreal-web-components/p-6210d025.entry.js +0 -1
- package/dist/boreal-web-components/p-91b9e94e.entry.js +0 -1
- package/dist/boreal-web-components/p-9e06910d.system.entry.js +0 -1
- package/dist/boreal-web-components/p-BIJhHSAt.system.js +0 -1
- package/dist/boreal-web-components/p-BKRyWlfr.js +0 -1
- package/dist/boreal-web-components/p-BhTPNsBb.js +0 -1
- package/dist/boreal-web-components/p-DoDeP7KR.system.js +0 -1
- package/dist/boreal-web-components/p-Dtp4O0H2.system.js +0 -1
- package/dist/boreal-web-components/p-Dy7QKP9e.js +0 -1
- package/dist/boreal-web-components/p-GjKJvOVG.system.js +0 -2
- package/dist/boreal-web-components/p-ac64d4a5.system.entry.js +0 -1
- package/dist/boreal-web-components/p-b61fe06c.entry.js +0 -1
- package/dist/boreal-web-components/p-cdc87437.entry.js +0 -1
- package/dist/boreal-web-components/p-d8ec8557.system.entry.js +0 -1
- package/dist/boreal-web-components/p-ea889727.entry.js +0 -1
- package/dist/boreal-web-components/p-fa327346.system.entry.js +0 -1
- package/dist/boreal-web-components/p-sDZFaZMN.system.js +0 -1
- package/dist/boreal-web-components/p-vfAIdwy0.js +0 -1
- package/dist/cjs/bds-tooltip.cjs.entry.js +0 -152
- package/dist/cjs/bds-typography.cjs.entry.js +0 -168
- package/dist/cjs/validateProps-BNOBk1Xs.js +0 -20
- package/dist/collection/utils/__test__/mocks/index.js +0 -1
- package/dist/esm/bds-tooltip.entry.js +0 -150
- package/dist/esm/bds-typography.entry.js +0 -166
- package/dist/esm/validateProps-vfAIdwy0.js +0 -18
- package/dist/esm-es5/anchored.mixin-Y3MkGc2X.js +0 -1
- package/dist/esm-es5/bds-tooltip.entry.js +0 -1
- package/dist/esm-es5/bds-typography.entry.js +0 -1
- package/dist/esm-es5/index-D4EFsvs1.js +0 -2
- package/dist/esm-es5/internals-Dy7QKP9e.js +0 -1
- package/dist/esm-es5/states-BhTPNsBb.js +0 -1
- package/dist/esm-es5/validateProps-vfAIdwy0.js +0 -1
- package/dist/types/utils/__test__/mocks/index.d.ts +0 -2
- package/dist/cjs/{internals-X77qKxsK.js → form-associated.mixin-DXwvF_vW.js} +30 -30
- package/dist/collection/utils/{__test__ → testing}/constants.js +0 -0
- package/dist/collection/utils/{__test__ → testing}/fixtures.js +0 -0
- package/dist/collection/utils/{__test__ → testing}/helpers.js +0 -0
- package/dist/collection/utils/{__test__/backdrop-mock.js → testing/mocks/backdrop.js} +0 -0
- package/dist/collection/utils/{__test__/mocks/ElementInternals.js → testing/mocks/elementInternals.js} +0 -0
- package/dist/collection/utils/{__test__/popover-mock.js → testing/mocks/popover.js} +0 -0
- package/dist/esm/{internals-Dy7QKP9e.js → form-associated.mixin-CvK2d92c.js} +30 -30
- /package/dist/types/utils/{__test__ → testing}/constants.d.ts +0 -0
- /package/dist/types/utils/{__test__ → testing}/fixtures.d.ts +0 -0
- /package/dist/types/utils/{__test__ → testing}/helpers.d.ts +0 -0
|
@@ -128,6 +128,11 @@ export declare const anchoredMixin: <B extends MixedInCtor>(Base: B) => {
|
|
|
128
128
|
* @returns `false` if `triggerSlot` is not set, otherwise delegates to super
|
|
129
129
|
*/
|
|
130
130
|
onBeforeShow(target?: HTMLElement): boolean;
|
|
131
|
+
/**
|
|
132
|
+
* Hides the focus from the floating element.
|
|
133
|
+
* This is necessary to prevent the focus from being trapped inside the floating element.
|
|
134
|
+
*/
|
|
135
|
+
hideFocus(): void;
|
|
131
136
|
/**
|
|
132
137
|
* Hides the floating element using the Popover API
|
|
133
138
|
* and stops position auto-update.
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { LinksAttrs } from "../types/links";
|
|
2
|
+
import { MixedInCtor } from '../stencil-public-runtime';
|
|
3
|
+
/**
|
|
4
|
+
* Creates a mixin that adds link-related properties and behaviors to a base class.
|
|
5
|
+
* It provides computed attributes for links, handles keyboard interactions, and sanitizes URLs to ensure security.
|
|
6
|
+
* It allows components to easily handle link attributes and execute link events.
|
|
7
|
+
*
|
|
8
|
+
* This mixin includes:
|
|
9
|
+
* - `href`: The URL the link points to.
|
|
10
|
+
* - `newTab`: Whether the link should open in a new tab.
|
|
11
|
+
* - `downloadable`: Whether the link should be treated as a download.
|
|
12
|
+
* - `filename`: The filename to use when downloading.
|
|
13
|
+
* - `getLinkAttributes`: A computed property that returns the appropriate attributes for the link based on its state and props.
|
|
14
|
+
* - `handleLinkKeyDown`: A method to handle keyboard interactions for accessibility.
|
|
15
|
+
* - `handleLinkClick`: A method to manage click behavior, including external links and downloads.
|
|
16
|
+
* - `sanitizeUrl`: A utility method to sanitize URLs and prevent XSS vulnerabilities.
|
|
17
|
+
*
|
|
18
|
+
* @typeParam T - The base constructor type to extend.
|
|
19
|
+
* @param {T} Base - The base component class to be extended.
|
|
20
|
+
* @returns {WithLinks} - A class with injected link behaviors.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```tsx
|
|
24
|
+
* import { Component, h } from '../stencil-public-runtime';
|
|
25
|
+
* import { WithLinks } from '@/mixins/links.mixin';
|
|
26
|
+
*
|
|
27
|
+
* @Component({
|
|
28
|
+
* tag: 'my-link',
|
|
29
|
+
* styleUrl: 'my-link.scss',
|
|
30
|
+
* })
|
|
31
|
+
* class MyLink extends Mixin(WithLinks) {
|
|
32
|
+
* @Element() el!: HTMLElement;
|
|
33
|
+
* @Prop() href: string = '';
|
|
34
|
+
* @Prop() newTab: boolean = false;
|
|
35
|
+
* @Prop() downloadable: boolean = false;
|
|
36
|
+
* @Prop() filename: string = '';
|
|
37
|
+
* @Prop() disabled: boolean = false;
|
|
38
|
+
*
|
|
39
|
+
* private handleKeyDown = (e: KeyboardEvent) => {
|
|
40
|
+
* if (this.disabled) return;
|
|
41
|
+
* this.handleLinkKeyDown(e);
|
|
42
|
+
* };
|
|
43
|
+
*
|
|
44
|
+
* render() {
|
|
45
|
+
* return (
|
|
46
|
+
* <Host
|
|
47
|
+
* {...this.getLinkAttributes}
|
|
48
|
+
* onKeyDown={this.handleKeyDown} >
|
|
49
|
+
* <slot />
|
|
50
|
+
* </Host>
|
|
51
|
+
* );
|
|
52
|
+
* }
|
|
53
|
+
* } ```
|
|
54
|
+
*
|
|
55
|
+
*/
|
|
56
|
+
export declare const WithLinks: <T extends MixedInCtor>(Base: T) => {
|
|
57
|
+
new (...args: any[]): {
|
|
58
|
+
/** Props should be declared in the component using the Mixin */
|
|
59
|
+
el: HTMLElement;
|
|
60
|
+
href: string;
|
|
61
|
+
newTab: boolean;
|
|
62
|
+
download: string;
|
|
63
|
+
readonly isLink: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Computes the appropriate link attributes based on the component's props and state.
|
|
66
|
+
* It handles external links, new tab behavior, and download attributes while ensuring accessibility.
|
|
67
|
+
* @returns {LinksAttrs} - The computed link attributes.
|
|
68
|
+
* */
|
|
69
|
+
readonly linkAttributes: LinksAttrs;
|
|
70
|
+
_isExternalLink(url: string): boolean;
|
|
71
|
+
/** Keydown handler to allow keyboard interaction with the link */
|
|
72
|
+
handleLinkKeyDown(event: KeyboardEvent): void;
|
|
73
|
+
/** Click handler to manage link behavior, including external links and downloads */
|
|
74
|
+
handleLinkClick(event: MouseEvent): void;
|
|
75
|
+
/** Sanitizes the URL to prevent XSS vulnerabilities. It removes dangerous protocols and ensures valid URLs.
|
|
76
|
+
* @param {string} url - The URL to sanitize.
|
|
77
|
+
* @returns {string} - The sanitized URL, or an empty string if the URL is deemed unsafe.
|
|
78
|
+
* @example
|
|
79
|
+
* const safeUrl = sanitizeUrl('https://example.com'); // returns 'https://example.com'
|
|
80
|
+
* const unsafeUrl = sanitizeUrl('javascript:alert(1)'); // returns ''
|
|
81
|
+
*/
|
|
82
|
+
sanitizeUrl(url: string): string;
|
|
83
|
+
};
|
|
84
|
+
} & T;
|
|
85
|
+
//# sourceMappingURL=links.mixin.d.ts.map
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { MenuRole, MenuItemRole } from "../types/index";
|
|
2
|
+
import { MixedInCtor } from '../stencil-public-runtime';
|
|
3
|
+
/**
|
|
4
|
+
* A Mixin that provides menu item behaviors, including ARIA roles,
|
|
5
|
+
* focus management, and keyboard navigation logic.
|
|
6
|
+
* This mixin is designed to be used with Stencil components that represent items within a menu or listbox,
|
|
7
|
+
* allowing them to automatically adapt their behavior based on the context of their parent container.
|
|
8
|
+
*
|
|
9
|
+
* The mixin includes:
|
|
10
|
+
* - Dynamic ARIA role resolution based on the nearest parent menu or listbox.
|
|
11
|
+
* - Computation of aria-selected and tabIndex attributes for accessibility.
|
|
12
|
+
* - A method to handle keyboard navigation (Arrow keys, Enter, Space) within the menu context.
|
|
13
|
+
*
|
|
14
|
+
*
|
|
15
|
+
* @typeParam B - The base constructor type.
|
|
16
|
+
* @param {B} Base - The base component class to be extended.
|
|
17
|
+
* @returns {MenuBehaviorMixin} - A class with injected menu behaviors.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```tsx
|
|
21
|
+
* import { Component, h } from '../stencil-public-runtime';
|
|
22
|
+
* import { MenuItemBehavior } from '@/mixins/menu-behavior.mixin';
|
|
23
|
+
*
|
|
24
|
+
* @Component({
|
|
25
|
+
* tag: 'my-menu-item',
|
|
26
|
+
* styleUrl: 'my-menu-item.scss',
|
|
27
|
+
* })
|
|
28
|
+
* export class MyMenuItem extends Mixin(MenuItemBehavior) {
|
|
29
|
+
* @Element() el!: HTMLElement;
|
|
30
|
+
* @Prop() disabled: boolean = false;
|
|
31
|
+
* @Prop() selected: boolean = false;
|
|
32
|
+
*
|
|
33
|
+
* private handleKeyDown = (e: KeyboardEvent) => {
|
|
34
|
+
* if (this.disabled) return;
|
|
35
|
+
* this.handleKeyDownLogic(e, () => this.handleSelection());
|
|
36
|
+
* };
|
|
37
|
+
*
|
|
38
|
+
* render() {
|
|
39
|
+
* return (
|
|
40
|
+
* <Host
|
|
41
|
+
* role={this.menuItemRole}
|
|
42
|
+
* aria-selected={this.ariaSelected}
|
|
43
|
+
* tabIndex={ this.itemTabIndex}
|
|
44
|
+
* onKeyDown={this.handleKeyDown} >
|
|
45
|
+
* <slot />
|
|
46
|
+
* </Host>
|
|
47
|
+
* );
|
|
48
|
+
* }
|
|
49
|
+
* } ```
|
|
50
|
+
*
|
|
51
|
+
*
|
|
52
|
+
*/
|
|
53
|
+
export declare const MenuItemBehavior: <B extends MixedInCtor>(Base: B) => {
|
|
54
|
+
new (...args: any[]): {
|
|
55
|
+
el: HTMLElement;
|
|
56
|
+
disabled: boolean;
|
|
57
|
+
selected: boolean;
|
|
58
|
+
activeItem: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Detects the ARIA role of the nearest parent menu or listbox.
|
|
61
|
+
* @returns {MenuRole | null} - 'menu', 'listbox', or null if not found.
|
|
62
|
+
*/
|
|
63
|
+
readonly parentRole: MenuRole | null;
|
|
64
|
+
/**
|
|
65
|
+
* Resolves the specific item role ('menuitem' or 'option').
|
|
66
|
+
* Defaults to 'menuitem' if no parent is detected.
|
|
67
|
+
* @returns {MenuItemRole}
|
|
68
|
+
*/
|
|
69
|
+
readonly menuItemRole: MenuItemRole;
|
|
70
|
+
/**
|
|
71
|
+
* Returns the 'aria-selected' value as a string for listbox options.
|
|
72
|
+
* @returns {string | null}
|
|
73
|
+
*/
|
|
74
|
+
readonly ariaSelected: string | null;
|
|
75
|
+
/**
|
|
76
|
+
* Calculates the tabIndex for the item.
|
|
77
|
+
* @returns {number} 0 for focusable menu items, -1 otherwise.
|
|
78
|
+
*/
|
|
79
|
+
readonly itemTabIndex: number;
|
|
80
|
+
/**
|
|
81
|
+
* Processes keyboard events for arrow navigation and activation.
|
|
82
|
+
* @param {KeyboardEvent} e - The native keyboard event.
|
|
83
|
+
* @param {() => void} onActivate - Function to execute when Enter or Space is pressed.
|
|
84
|
+
* @example
|
|
85
|
+
* // Inside a component's keydown listener:
|
|
86
|
+
* this.handleKeyDownLogic(event, () => this.emitSelection());
|
|
87
|
+
*/
|
|
88
|
+
handleKeyDownLogic(e: KeyboardEvent, onActivate: () => void): void;
|
|
89
|
+
};
|
|
90
|
+
} & B;
|
|
91
|
+
//# sourceMappingURL=menu-behavior.mixin.d.ts.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Interface that define and centralize some props to the form components.
|
|
3
|
+
* In this way we standardize the props and avoid repetition.
|
|
4
|
+
* @public
|
|
5
|
+
* @interface IFormProps
|
|
6
|
+
* @augments {IFormProps}
|
|
7
|
+
* @property {string} name - Name of the form control, submitted as a key in the form data.
|
|
8
|
+
* @property {boolean} disabled - Disables the control. Defaults to `false`.
|
|
9
|
+
* @property {boolean} required - Marks the control as required for form submission. Defaults to `false`.
|
|
10
|
+
* @property {string} info - Tooltip content attached to the label. Rendered via `bds-typography` `tooltipText` prop.
|
|
11
|
+
* @property {boolean} error - When `true`, applies the error visual state.
|
|
12
|
+
* @property {string} errorMessage - Message shown below the input when `error` is `true`. Replaces `helperText`.
|
|
13
|
+
* @property {string} label - Label displayed next to the input. Defaults to `""`.
|
|
14
|
+
* @property {string} helperText - Help text displayed below the input. Defaults to `""`.
|
|
15
|
+
* @example
|
|
16
|
+
* export interface IToggle extends IFormProps {}
|
|
17
|
+
*/
|
|
18
|
+
export interface IFormProps {
|
|
19
|
+
info?: string;
|
|
20
|
+
error?: boolean;
|
|
21
|
+
errorMessage?: string;
|
|
22
|
+
label?: string;
|
|
23
|
+
helperText?: string;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=IFormProps.d.ts.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type LinksAttrs = {
|
|
2
|
+
href?: string;
|
|
3
|
+
target?: string;
|
|
4
|
+
rel?: string;
|
|
5
|
+
download?: string;
|
|
6
|
+
role?: string;
|
|
7
|
+
tabindex?: string;
|
|
8
|
+
};
|
|
9
|
+
export interface IWithLinks {
|
|
10
|
+
href: string;
|
|
11
|
+
newTab: boolean;
|
|
12
|
+
download: string;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=links.d.ts.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const MENU_ROLES: {
|
|
2
|
+
readonly MENU: "menu";
|
|
3
|
+
readonly LISTBOX: "listbox";
|
|
4
|
+
};
|
|
5
|
+
export type MenuRole = (typeof MENU_ROLES)[keyof typeof MENU_ROLES];
|
|
6
|
+
export declare const MENU_ITEM_ROLES: {
|
|
7
|
+
readonly MENUITEM: "menuitem";
|
|
8
|
+
readonly OPTION: "option";
|
|
9
|
+
};
|
|
10
|
+
export type MenuItemRole = (typeof MENU_ITEM_ROLES)[keyof typeof MENU_ITEM_ROLES];
|
|
11
|
+
export interface IMenuBehavior {
|
|
12
|
+
disabled: boolean;
|
|
13
|
+
selected: boolean;
|
|
14
|
+
activeItem: boolean;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=menu.d.ts.map
|
|
@@ -10,10 +10,14 @@ export declare const POSITION: {
|
|
|
10
10
|
readonly RIGHT: "right";
|
|
11
11
|
};
|
|
12
12
|
export declare const POPOVER_POSITION: {
|
|
13
|
-
readonly
|
|
14
|
-
readonly
|
|
13
|
+
readonly TOP_START: "top-start";
|
|
14
|
+
readonly BOTTOM_START: "bottom-start";
|
|
15
15
|
readonly LEFT: "left";
|
|
16
16
|
readonly RIGHT: "right";
|
|
17
|
+
readonly TOP_END: "top-end";
|
|
18
|
+
readonly BOTTOM_END: "bottom-end";
|
|
19
|
+
readonly TOP: "top";
|
|
20
|
+
readonly BOTTOM: "bottom";
|
|
17
21
|
};
|
|
18
22
|
export type Position = (typeof POSITION)[keyof typeof POSITION];
|
|
19
23
|
export type PopoverPosition = (typeof POPOVER_POSITION)[keyof typeof POPOVER_POSITION];
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
+
/** Type for key types used across components */
|
|
2
|
+
export type KeyTypes = 'Enter' | 'Escape' | 'Space' | 'ArrowUp' | 'ArrowDown';
|
|
3
|
+
export type KeyValues = 'Enter' | 'Escape' | ' ' | 'ArrowUp' | 'ArrowDown';
|
|
1
4
|
/**
|
|
2
5
|
* Type to add keyboard keys to the component.
|
|
3
6
|
*/
|
|
4
|
-
type Key = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
};
|
|
9
|
-
};
|
|
7
|
+
type Key = Record<KeyTypes, {
|
|
8
|
+
key: KeyValues;
|
|
9
|
+
code: number;
|
|
10
|
+
}>;
|
|
10
11
|
/**
|
|
11
12
|
* Default keyboard keys.
|
|
12
13
|
* Add more keys to the `KEYBOARD` object to add more keyboard shortcuts.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Calculates the offset for the floating element based on whether the arrow is hidden and if a custom offset is provided.
|
|
3
|
+
* @param hideArrow - A boolean indicating whether the arrow is hidden.
|
|
4
|
+
* @param hasOffset - An optional number indicating the custom offset.
|
|
5
|
+
* @param offset - The default offset value.
|
|
6
|
+
* @returns The calculated offset value.
|
|
7
|
+
*/
|
|
8
|
+
export declare const getOffset: (hideArrow: boolean, hasOffset: number, offset: number) => number;
|
|
9
|
+
//# sourceMappingURL=getOffset.d.ts.map
|
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Validates a numeric component prop against a min/max range.
|
|
3
|
+
* Issues a console warning when out of range — does not reset the value.
|
|
4
|
+
* Silently skips `undefined` (optional props) and `'full'` (valid sentinel for span props).
|
|
5
|
+
*
|
|
6
|
+
* @param min - Minimum valid value (inclusive).
|
|
7
|
+
* @param max - Maximum valid value (inclusive). Omit for unbounded upper limit.
|
|
8
|
+
* @param element - The host element whose property is being checked.
|
|
9
|
+
* @param propertyName - The name of the prop to validate.
|
|
10
|
+
*/
|
|
11
|
+
export declare function validateNumericProp(min: number, max: number | undefined, element: HTMLElement, propertyName: string): void;
|
|
1
12
|
/**
|
|
2
13
|
* Validates a component prop against a list of accepted values.
|
|
3
14
|
* If the current value is invalid, the prop is reset to the fallback and a warning is issued.
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { MenuRole, MenuItemRole } from "../../types/index";
|
|
2
|
+
/**
|
|
3
|
+
* Resolves the appropriate ARIA role for a menu item.
|
|
4
|
+
* @param {MenuRole} role - The role of the parent menu container ('menu' or 'listbox').
|
|
5
|
+
* @returns {MenuItemRole} - Returns 'menuitem' if parent is 'menu', otherwise 'option'.
|
|
6
|
+
* @example
|
|
7
|
+
* const itemRole = resolveMenuItemRole('menu'); // returns 'menuitem'
|
|
8
|
+
*/
|
|
9
|
+
export declare function resolveMenuItemRole(role: MenuRole): MenuItemRole;
|
|
10
|
+
/**
|
|
11
|
+
* Determines the aria-selected value based on the item's role and state.
|
|
12
|
+
* @param {MenuItemRole} role - The role of the item ('menuitem' or 'option').
|
|
13
|
+
* @param {boolean} selected - The current selection state of the item.
|
|
14
|
+
* @returns {string | null} - Returns the string representation of the boolean if role is 'option', otherwise null.
|
|
15
|
+
* @example
|
|
16
|
+
* const attr = resolveAriaSelected('option', true); // returns 'true'
|
|
17
|
+
* const attrNull = resolveAriaSelected('menuitem', true); // returns null
|
|
18
|
+
*/
|
|
19
|
+
export declare function resolveAriaSelected(role: MenuItemRole, selected: boolean): string | null;
|
|
20
|
+
/**
|
|
21
|
+
* Resolves the tabIndex attribute for keyboard navigation.
|
|
22
|
+
* @param {MenuItemRole} role - The role of the item.
|
|
23
|
+
* @param {boolean} disabled - Whether the item is currently disabled.
|
|
24
|
+
* @param {boolean} selected - Whether the item is currently selected.
|
|
25
|
+
* @param {boolean} active - Whether the item is currently active.
|
|
26
|
+
* @returns {number} - Returns 0 for focusable menu items, or -1 for disabled/options.
|
|
27
|
+
* @example
|
|
28
|
+
* const index = resolveTabIndex('menuitem', false); // returns 0
|
|
29
|
+
* const indexDisabled = resolveTabIndex('menuitem', true); // returns -1
|
|
30
|
+
*/
|
|
31
|
+
export declare function resolveTabIndex(role: MenuItemRole, disabled: boolean, selected: boolean, active: boolean): number;
|
|
32
|
+
/**
|
|
33
|
+
* Manages focus and activation through keyboard events.
|
|
34
|
+
* @param {KeyboardEvent} event - The keyboard event object from the listener.
|
|
35
|
+
* @param {HTMLElement[]} items - An array of focusable HTML elements within the menu.
|
|
36
|
+
* @param {number} currentIndex - The index of the currently focused item.
|
|
37
|
+
* @returns {void}
|
|
38
|
+
* @example
|
|
39
|
+
* handleMenuKeyNavigation(event, menuItems, 2);
|
|
40
|
+
*/
|
|
41
|
+
export declare function handleMenuKeyNavigation(event: KeyboardEvent, items: HTMLElement[], currentIndex: number): void;
|
|
42
|
+
/** Prevents default browser behavior for specific navigation keys.
|
|
43
|
+
* @param {KeyboardEvent} e - The keyboard event to evaluate.
|
|
44
|
+
* @returns {void}
|
|
45
|
+
* @example
|
|
46
|
+
* // Inside a keydown listener:
|
|
47
|
+
* preventNavigationKeys(event);
|
|
48
|
+
*/
|
|
49
|
+
export declare function preventNavigationKeys(e: KeyboardEvent): void;
|
|
50
|
+
//# sourceMappingURL=menu-item.utils.d.ts.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Registers `beforeEach`/`afterEach` hooks that silence `console.warn` for the
|
|
3
|
+
* enclosing `describe` block. Call at the top of any `describe` that expects
|
|
4
|
+
* prop-validation warnings but does not need to assert on them.
|
|
5
|
+
*
|
|
6
|
+
* For tests that need to assert on the warning call, create the spy manually
|
|
7
|
+
* inside the individual `it` block instead.
|
|
8
|
+
*/
|
|
9
|
+
export declare function suppressConsoleWarn(): void;
|
|
10
|
+
/**
|
|
11
|
+
* Registers `beforeEach`/`afterEach` hooks that silence `console.error` for the
|
|
12
|
+
* enclosing `describe` block. Use in components that rely on `ElementInternals`
|
|
13
|
+
* (FACE components) to suppress the Stencil mock-doc noise:
|
|
14
|
+
* "Property X was accessed on ElementInternals, but this property is not implemented."
|
|
15
|
+
*/
|
|
16
|
+
export declare function suppressConsoleError(): void;
|
|
17
|
+
//# sourceMappingURL=console.d.ts.map
|
|
@@ -43,4 +43,4 @@ export declare class ElementInternals {
|
|
|
43
43
|
* This includes defining the attachInternals method on HTMLElement and simulating form submission methods.
|
|
44
44
|
*/
|
|
45
45
|
export declare function attachInternals(): void;
|
|
46
|
-
//# sourceMappingURL=
|
|
46
|
+
//# sourceMappingURL=elementInternals.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare function setupPopoverMocks(): void;
|
|
2
|
-
//# sourceMappingURL=popover
|
|
2
|
+
//# sourceMappingURL=popover.d.ts.map
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{p as o,a as t,c as r,h as b,t as e}from"./index.js";import{C as a}from"./p-BhTPNsBb.js";import{v as s}from"./p-vfAIdwy0.js";const n={DEFAULT:"default",OUTLINE:"outline",PLAIN:"plain"},d={SMALL:"small",MEDIUM:"medium",LARGE:"large"},i={BUTTON:"button",SUBMIT:"submit",RESET:"reset"},u={DEFAULT:"default",PRIMARY:"primary",SUCCESS:"success",ERROR:"error"},l=o(class extends t{constructor(o){super(),!1!==o&&this.__registerHost(),this.bdsClick=r(this,"bdsClick"),this.internals=this.attachInternals(),this.currentState=a.DEFAULT,this.label="",this.disabled=!1,this.name="",this.type=i.BUTTON,this.color=u.DEFAULT,this.variant=n.DEFAULT,this.size=d.MEDIUM,this.loading=!1,this.disclosure=!1,this.handleKeyDown=o=>{"Enter"!==o.key&&" "!==o.key||(this.currentState=a.ACTIVE,o.preventDefault(),this.bdsClick.emit(o))},this.handleKeyUp=()=>{this.currentState=a.DEFAULT},this.handleClick=o=>{o.preventDefault(),o.stopPropagation(),this.disabled||this.loading||(this.type===i.SUBMIT||this.type===i.RESET?this.processFormClick():this.bdsClick.emit(o))}}checkPropValues(){s(Object.values(i),i.BUTTON,this.el,"type"),s(Object.values(u),u.DEFAULT,this.el,"color"),s(Object.values(n),n.DEFAULT,this.el,"variant"),s(Object.values(d),d.MEDIUM,this.el,"size")}componentWillLoad(){this.checkPropValues()}componentDidLoad(){this.setupFormAssociation()}setupFormAssociation(){const o=this.el.closest("form");this.internalForm=(this.internals&&"form"in this.internals?this.internals.form:null)||o||void 0}processFormClick(){if(void 0===this.internalForm)return void console.warn("[BorealDS Button] No form found for submit/reset action. Please ensure the button is within a form or that the form is properly associated.");const o={[i.SUBMIT]:()=>{"function"==typeof this.internalForm?.requestSubmit?this.internalForm.requestSubmit():this.internalForm?.submit()},[i.RESET]:()=>this.internalForm?.reset()}[this.type];"function"==typeof o&&o()}get getClassMap(){return{"bds-button":!0,"bds-button--is-disabled":this.disabled,"bds-button--is-loading":this.loading,[`bds-button--state-${this.currentState}`]:!0,[`bds-button--${this.color}`]:!0,[`bds-button--var-${this.variant}`]:!0,[`bds-button--size-${this.size}`]:!0}}render(){return b("button",{key:"4f71bb10d1910ea7b1fc0d64eedb6269e7049a89",name:this.name,class:this.getClassMap,type:this.type,disabled:this.disabled||this.loading,"aria-label":this.label||void 0,"aria-disabled":this.disabled||this.loading,onClick:this.handleClick,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp},b("div",{key:"e28da0b776917c6a2c0efc6c7140a2bfa979b708",class:"bds-button__content"},b("span",{key:"ce3d60b504bbf38dc7116560dbfbe51c955f79db",class:"bds-button__content-icon bds-button__content-icon--start"},b("slot",{key:"23b6bbb9d4fbf8ad5e0e584cddaac477edf4a91e",name:"icon"})),b("slot",{key:"adcdc5d87a8db4e346d272b843966405692a2a32"}),b("span",{key:"c908b3a8a18ba4cce854ee20d064178f6420d007",class:"bds-button__content-badge"},b("slot",{key:"ce66f69366dc7436a8f8ca1b2b8f55b91a225ec8",name:"badge"})),this.disclosure&&b("span",{key:"921c0f144f2616da238356705c1e5ff634406b87",class:"bds-button__content-icon"},b("i",{key:"9dc7a891ac4fcb1a73113aeae83976d74cff0c2e",class:"bds-icon-chevron-down"}))))}static get formAssociated(){return!0}get el(){return this}static get watchers(){return{type:[{checkPropValues:0}],color:[{checkPropValues:0}],variant:[{checkPropValues:0}],size:[{checkPropValues:0}]}}static get style(){return'@charset "UTF-8";bds-button{position:relative;display:-ms-inline-flexbox;display:inline-flex;vertical-align:middle}.bds-button{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-webkit-box-sizing:border-box;box-sizing:border-box;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:1px solid transparent;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;-webkit-transition:background-color 0.3s ease, border-color 0.3s ease, -webkit-box-shadow 0.3s ease;transition:background-color 0.3s ease, border-color 0.3s ease, -webkit-box-shadow 0.3s ease;transition:background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;transition:background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, -webkit-box-shadow 0.3s ease;margin:var(--boreal-spacing-2xs) var(--boreal-spacing-3xs);outline:none;font-family:var(--boreal-typography-font-family-primary);font-weight:var(--boreal-typography-font-weight-semibold);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;vertical-align:middle}.bds-button .bds-button__content{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;gap:var(--boreal-spacing-2xs)}.bds-button--is-loading{pointer-events:none;position:relative;color:transparent !important}.bds-button--is-loading::after{position:absolute;content:" ";-webkit-box-sizing:inherit;box-sizing:inherit;-webkit-animation:rotateSpinner 0.5s linear infinite;animation:rotateSpinner 0.5s linear infinite;border-radius:9999px;display:block;height:1em;width:1em;rotate:45deg;left:calc(50% - 0.5em);top:calc(50% - 0.5em);border:3px solid;border-right-color:transparent;border-top-color:transparent}.bds-button--size-small{border-radius:var(--boreal-radius-xs);font-size:var(--boreal-typography-font-size-xs);padding:var(--boreal-spacing-3xs) var(--boreal-spacing-2xs);line-height:var(--boreal-typography-line-height-xs);height:26px}.bds-button--size-small .bds-button__content{padding:var(--boreal-spacing-3xs) var(--boreal-spacing-2xs)}.bds-button--size-small .bds-button__content-icon{display:-ms-flexbox;display:flex;font-size:var(--boreal-typography-font-size-sm);line-height:var(--boreal-typography-line-height-xs)}.bds-button--size-small .bds-button__content-icon:empty{display:none}.bds-button--size-small .bds-button__content{}.bds-button--size-small .bds-button__content-badge:empty{display:none}.bds-button--size-small .bds-button__content-badge{display:none}.bds-button--size-medium{border-radius:var(--boreal-radius-xs);font-size:var(--boreal-typography-font-size-sm);padding:var(--boreal-spacing-2xs) var(--boreal-spacing-1xs);line-height:var(--boreal-typography-line-height-sm);height:32px}.bds-button--size-medium .bds-button__content{padding:var(--boreal-spacing-3xs) var(--boreal-spacing-2xs)}.bds-button--size-medium .bds-button__content-icon{display:-ms-flexbox;display:flex;font-size:var(--boreal-typography-font-size-md);line-height:var(--boreal-typography-line-height-sm)}.bds-button--size-medium .bds-button__content-icon:empty{display:none}.bds-button--size-medium .bds-button__content{}.bds-button--size-medium .bds-button__content-badge:empty{display:none}.bds-button--size-large{border-radius:var(--boreal-radius-xs);font-size:var(--boreal-typography-font-size-md);padding:var(--boreal-spacing-xs);line-height:var(--boreal-typography-line-height-md);height:44px}.bds-button--size-large .bds-button__content{padding:var(--boreal-spacing-3xs) var(--boreal-spacing-2xs)}.bds-button--size-large .bds-button__content-icon{display:-ms-flexbox;display:flex;font-size:var(--boreal-typography-font-size-lg);line-height:var(--boreal-typography-line-height-md)}.bds-button--size-large .bds-button__content-icon:empty{display:none}.bds-button--size-large .bds-button__content{}.bds-button--size-large .bds-button__content-badge:empty{display:none}.bds-button.bds-button--var-default.bds-button--default{color:var(--boreal-text-default);background-color:var(--boreal-ui-inverse);border-color:transparent}.bds-button.bds-button--var-default.bds-button--default:hover{background-color:var(--boreal-ui-default-lighter);-webkit-box-shadow:0 1px 2px 0 rgba(19, 19, 22, 0.15);box-shadow:0 1px 2px 0 rgba(19, 19, 22, 0.15)}.bds-button.bds-button--var-default.bds-button--default:focus{background-color:var(--boreal-ui-default-lighter);-webkit-box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus);box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus)}.bds-button.bds-button--var-default.bds-button--default:active,.bds-button.bds-button--var-default.bds-button--default.bds-button--state-active{background-color:var(--boreal-ui-default-lighter);-webkit-box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus), 0 1px 2px 0 rgba(19, 19, 22, 0.15) inset;box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus), 0 1px 2px 0 rgba(19, 19, 22, 0.15) inset}.bds-button.bds-button--var-default.bds-button--default.bds-button--is-disabled,.bds-button.bds-button--var-default.bds-button--default.bds-button--is-loading{cursor:not-allowed;color:var(--boreal-text-disabled);background-color:var(--boreal-ui-inverse);border-color:transparent;-webkit-box-shadow:none;box-shadow:none}.bds-button.bds-button--var-default.bds-button--default.bds-button--is-loading::after{border-left-color:var(--boreal-text-disabled);border-bottom-color:var(--boreal-text-disabled)}.bds-button.bds-button--var-default.bds-button--primary{color:var(--boreal-text-inverse);background-color:var(--boreal-ui-primary-base);border-color:transparent}.bds-button.bds-button--var-default.bds-button--primary:hover{background-color:var(--boreal-ui-primary-dark);-webkit-box-shadow:0 1px 2px 0 rgba(19, 19, 22, 0.15);box-shadow:0 1px 2px 0 rgba(19, 19, 22, 0.15)}.bds-button.bds-button--var-default.bds-button--primary:focus{background-color:var(--boreal-ui-primary-base);-webkit-box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus);box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus)}.bds-button.bds-button--var-default.bds-button--primary:active,.bds-button.bds-button--var-default.bds-button--primary.bds-button--state-active{background-color:var(--boreal-ui-primary-dark);-webkit-box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus);box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus)}.bds-button.bds-button--var-default.bds-button--primary.bds-button--is-disabled,.bds-button.bds-button--var-default.bds-button--primary.bds-button--is-loading{cursor:not-allowed;color:var(--boreal-text-inverse);background-color:var(--boreal-ui-primary-light);border-color:transparent;-webkit-box-shadow:none;box-shadow:none}.bds-button.bds-button--var-default.bds-button--primary.bds-button--is-loading::after{border-left-color:var(--boreal-text-inverse);border-bottom-color:var(--boreal-text-inverse)}.bds-button.bds-button--var-default.bds-button--success{color:var(--boreal-text-inverse);background-color:var(--boreal-ui-success-base);border-color:transparent}.bds-button.bds-button--var-default.bds-button--success:hover{background-color:var(--boreal-ui-success-dark);-webkit-box-shadow:0 1px 2px 0 rgba(19, 19, 22, 0.15);box-shadow:0 1px 2px 0 rgba(19, 19, 22, 0.15)}.bds-button.bds-button--var-default.bds-button--success:focus{background-color:var(--boreal-ui-success-base);-webkit-box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus);box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus)}.bds-button.bds-button--var-default.bds-button--success:active,.bds-button.bds-button--var-default.bds-button--success.bds-button--state-active{background-color:var(--boreal-ui-success-dark);-webkit-box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus);box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus)}.bds-button.bds-button--var-default.bds-button--success.bds-button--is-disabled,.bds-button.bds-button--var-default.bds-button--success.bds-button--is-loading{cursor:not-allowed;color:var(--boreal-text-inverse);background-color:var(--boreal-ui-success-light);border-color:transparent;-webkit-box-shadow:none;box-shadow:none}.bds-button.bds-button--var-default.bds-button--success.bds-button--is-loading::after{border-left-color:var(--boreal-text-inverse);border-bottom-color:var(--boreal-text-inverse)}.bds-button.bds-button--var-default.bds-button--error{color:var(--boreal-text-inverse);background-color:var(--boreal-ui-danger-base);border-color:transparent}.bds-button.bds-button--var-default.bds-button--error:hover{background-color:var(--boreal-ui-danger-dark);-webkit-box-shadow:0 1px 2px 0 rgba(19, 19, 22, 0.15);box-shadow:0 1px 2px 0 rgba(19, 19, 22, 0.15)}.bds-button.bds-button--var-default.bds-button--error:focus{background-color:var(--boreal-ui-danger-base);-webkit-box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus);box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus)}.bds-button.bds-button--var-default.bds-button--error:active,.bds-button.bds-button--var-default.bds-button--error.bds-button--state-active{background-color:var(--boreal-ui-danger-dark);-webkit-box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus);box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus)}.bds-button.bds-button--var-default.bds-button--error.bds-button--is-disabled,.bds-button.bds-button--var-default.bds-button--error.bds-button--is-loading{cursor:not-allowed;color:var(--boreal-text-inverse);background-color:var(--boreal-ui-danger-light);border-color:transparent;-webkit-box-shadow:none;box-shadow:none}.bds-button.bds-button--var-default.bds-button--error.bds-button--is-loading::after{border-left-color:var(--boreal-text-inverse);border-bottom-color:var(--boreal-text-inverse)}.bds-button.bds-button--var-outline{background-color:transparent}.bds-button.bds-button--var-outline.bds-button--default{color:var(--boreal-text-default);background-color:transparent;border-color:var(--boreal-stroke-default-light)}.bds-button.bds-button--var-outline.bds-button--default:hover{background-color:var(--boreal-ui-default-lighter);-webkit-box-shadow:0 1px 2px 0 rgba(19, 19, 22, 0.15);box-shadow:0 1px 2px 0 rgba(19, 19, 22, 0.15)}.bds-button.bds-button--var-outline.bds-button--default:focus{background-color:var(--boreal-ui-default-lighter);-webkit-box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus);box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus)}.bds-button.bds-button--var-outline.bds-button--default:active,.bds-button.bds-button--var-outline.bds-button--default.bds-button--state-active{background-color:var(--boreal-ui-default-lighter);-webkit-box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus);box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus)}.bds-button.bds-button--var-outline.bds-button--default.bds-button--is-disabled,.bds-button.bds-button--var-outline.bds-button--default.bds-button--is-loading{cursor:not-allowed;color:var(--boreal-text-disabled);background-color:var(--boreal-ui-inverse);border-color:var(--boreal-stroke-default-light);-webkit-box-shadow:none;box-shadow:none}.bds-button.bds-button--var-outline.bds-button--default.bds-button--is-loading::after{border-left-color:var(--boreal-text-disabled);border-bottom-color:var(--boreal-text-disabled)}.bds-button.bds-button--var-outline.bds-button--primary{color:var(--boreal-text-primary-base);background-color:transparent;border-color:var(--boreal-ui-primary-base)}.bds-button.bds-button--var-outline.bds-button--primary:hover{background-color:var(--boreal-ui-primary-lighter);-webkit-box-shadow:0 1px 2px 0 rgba(19, 19, 22, 0.15);box-shadow:0 1px 2px 0 rgba(19, 19, 22, 0.15)}.bds-button.bds-button--var-outline.bds-button--primary:focus{background-color:var(--boreal-ui-primary-lighter);-webkit-box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus);box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus)}.bds-button.bds-button--var-outline.bds-button--primary:active,.bds-button.bds-button--var-outline.bds-button--primary.bds-button--state-active{background-color:var(--boreal-ui-primary-lighter);-webkit-box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus);box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus)}.bds-button.bds-button--var-outline.bds-button--primary.bds-button--is-disabled,.bds-button.bds-button--var-outline.bds-button--primary.bds-button--is-loading{cursor:not-allowed;color:var(--boreal-text-primary-light);background-color:transparent;border-color:var(--boreal-stroke-primary-light);-webkit-box-shadow:none;box-shadow:none}.bds-button.bds-button--var-outline.bds-button--primary.bds-button--is-loading::after{border-left-color:var(--boreal-text-primary-light);border-bottom-color:var(--boreal-text-primary-light)}.bds-button.bds-button--var-outline.bds-button--success{color:var(--boreal-text-success-base);background-color:transparent;border-color:var(--boreal-stroke-success-base)}.bds-button.bds-button--var-outline.bds-button--success:hover{background-color:var(--boreal-ui-success-lighter);-webkit-box-shadow:0 1px 2px 0 rgba(19, 19, 22, 0.15);box-shadow:0 1px 2px 0 rgba(19, 19, 22, 0.15)}.bds-button.bds-button--var-outline.bds-button--success:focus{background-color:var(--boreal-ui-success-lighter);-webkit-box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus);box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus)}.bds-button.bds-button--var-outline.bds-button--success:active,.bds-button.bds-button--var-outline.bds-button--success.bds-button--state-active{background-color:var(--boreal-ui-success-lighter);-webkit-box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus);box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus)}.bds-button.bds-button--var-outline.bds-button--success.bds-button--is-disabled,.bds-button.bds-button--var-outline.bds-button--success.bds-button--is-loading{cursor:not-allowed;color:var(--boreal-text-success-light);background-color:transparent;border-color:var(--boreal-stroke-success-light);-webkit-box-shadow:none;box-shadow:none}.bds-button.bds-button--var-outline.bds-button--success.bds-button--is-loading::after{border-left-color:var(--boreal-text-success-light);border-bottom-color:var(--boreal-text-success-light)}.bds-button.bds-button--var-outline.bds-button--error{color:var(--boreal-text-danger-base);background-color:transparent;border-color:var(--boreal-stroke-danger-base)}.bds-button.bds-button--var-outline.bds-button--error:hover{background-color:var(--boreal-ui-danger-lighter);-webkit-box-shadow:0 1px 2px 0 rgba(19, 19, 22, 0.15);box-shadow:0 1px 2px 0 rgba(19, 19, 22, 0.15)}.bds-button.bds-button--var-outline.bds-button--error:focus{background-color:var(--boreal-ui-danger-lighter);-webkit-box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus);box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus)}.bds-button.bds-button--var-outline.bds-button--error:active,.bds-button.bds-button--var-outline.bds-button--error.bds-button--state-active{background-color:var(--boreal-ui-danger-lighter);-webkit-box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus);box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus)}.bds-button.bds-button--var-outline.bds-button--error.bds-button--is-disabled,.bds-button.bds-button--var-outline.bds-button--error.bds-button--is-loading{cursor:not-allowed;color:var(--boreal-text-danger-light);background-color:transparent;border-color:var(--boreal-stroke-danger-light);-webkit-box-shadow:none;box-shadow:none}.bds-button.bds-button--var-outline.bds-button--error.bds-button--is-loading::after{border-left-color:var(--boreal-text-danger-light);border-bottom-color:var(--boreal-text-danger-light)}.bds-button.bds-button--var-plain{background-color:transparent}.bds-button.bds-button--var-plain.bds-button--default{color:var(--boreal-text-default);background-color:transparent;border-color:transparent}.bds-button.bds-button--var-plain.bds-button--default:hover{background-color:var(--boreal-ui-default-lighter);-webkit-box-shadow:0 1px 2px 0 rgba(19, 19, 22, 0.15);box-shadow:0 1px 2px 0 rgba(19, 19, 22, 0.15)}.bds-button.bds-button--var-plain.bds-button--default:focus{background-color:var(--boreal-ui-default-lighter);-webkit-box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus);box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus)}.bds-button.bds-button--var-plain.bds-button--default:active,.bds-button.bds-button--var-plain.bds-button--default.bds-button--state-active{background-color:var(--boreal-ui-default-lighter);-webkit-box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus), 0 1px 2px 0 rgba(19, 19, 22, 0.15) inset;box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus), 0 1px 2px 0 rgba(19, 19, 22, 0.15) inset}.bds-button.bds-button--var-plain.bds-button--default.bds-button--is-disabled,.bds-button.bds-button--var-plain.bds-button--default.bds-button--is-loading{cursor:not-allowed;color:var(--boreal-text-disabled);background-color:var(--boreal-ui-inverse);border-color:transparent;-webkit-box-shadow:none;box-shadow:none}.bds-button.bds-button--var-plain.bds-button--default.bds-button--is-loading::after{border-left-color:var(--boreal-text-disabled);border-bottom-color:var(--boreal-text-disabled)}.bds-button.bds-button--var-plain.bds-button--primary{color:var(--boreal-text-primary-base);background-color:transparent;border-color:transparent}.bds-button.bds-button--var-plain.bds-button--primary:hover{background-color:var(--boreal-ui-primary-lighter);-webkit-box-shadow:0 1px 2px 0 rgba(19, 19, 22, 0.15);box-shadow:0 1px 2px 0 rgba(19, 19, 22, 0.15)}.bds-button.bds-button--var-plain.bds-button--primary:focus{background-color:var(--boreal-ui-primary-lighter);-webkit-box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus);box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus)}.bds-button.bds-button--var-plain.bds-button--primary:active,.bds-button.bds-button--var-plain.bds-button--primary.bds-button--state-active{background-color:var(--boreal-ui-primary-lighter);-webkit-box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus), 0 1px 2px 0 rgba(19, 19, 22, 0.15) inset;box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus), 0 1px 2px 0 rgba(19, 19, 22, 0.15) inset}.bds-button.bds-button--var-plain.bds-button--primary.bds-button--is-disabled,.bds-button.bds-button--var-plain.bds-button--primary.bds-button--is-loading{cursor:not-allowed;color:var(--boreal-text-primary-light);background-color:transparent;border-color:transparent;-webkit-box-shadow:none;box-shadow:none}.bds-button.bds-button--var-plain.bds-button--primary.bds-button--is-loading::after{border-left-color:var(--boreal-text-primary-light);border-bottom-color:var(--boreal-text-primary-light)}.bds-button.bds-button--var-plain.bds-button--success{color:var(--boreal-text-success-base);background-color:transparent;border-color:transparent}.bds-button.bds-button--var-plain.bds-button--success:hover{background-color:var(--boreal-ui-success-lighter);-webkit-box-shadow:0 1px 2px 0 rgba(19, 19, 22, 0.15);box-shadow:0 1px 2px 0 rgba(19, 19, 22, 0.15)}.bds-button.bds-button--var-plain.bds-button--success:focus{background-color:var(--boreal-ui-success-lighter);-webkit-box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus);box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus)}.bds-button.bds-button--var-plain.bds-button--success:active,.bds-button.bds-button--var-plain.bds-button--success.bds-button--state-active{background-color:var(--boreal-ui-success-lighter);-webkit-box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus), 0 1px 2px 0 rgba(19, 19, 22, 0.15) inset;box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus), 0 1px 2px 0 rgba(19, 19, 22, 0.15) inset}.bds-button.bds-button--var-plain.bds-button--success.bds-button--is-disabled,.bds-button.bds-button--var-plain.bds-button--success.bds-button--is-loading{cursor:not-allowed;color:var(--boreal-text-success-light);background-color:transparent;border-color:transparent;-webkit-box-shadow:none;box-shadow:none}.bds-button.bds-button--var-plain.bds-button--success.bds-button--is-loading::after{border-left-color:var(--boreal-text-success-light);border-bottom-color:var(--boreal-text-success-light)}.bds-button.bds-button--var-plain.bds-button--error{color:var(--boreal-text-danger-base);background-color:transparent;border-color:transparent}.bds-button.bds-button--var-plain.bds-button--error:hover{background-color:var(--boreal-ui-danger-lighter);-webkit-box-shadow:0 1px 2px 0 rgba(19, 19, 22, 0.15);box-shadow:0 1px 2px 0 rgba(19, 19, 22, 0.15)}.bds-button.bds-button--var-plain.bds-button--error:focus{background-color:var(--boreal-ui-danger-lighter);-webkit-box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus);box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus)}.bds-button.bds-button--var-plain.bds-button--error:active,.bds-button.bds-button--var-plain.bds-button--error.bds-button--state-active{background-color:var(--boreal-ui-danger-lighter);-webkit-box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus), 0 1px 2px 0 rgba(19, 19, 22, 0.15) inset;box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus), 0 1px 2px 0 rgba(19, 19, 22, 0.15) inset}.bds-button.bds-button--var-plain.bds-button--error.bds-button--is-disabled,.bds-button.bds-button--var-plain.bds-button--error.bds-button--is-loading{cursor:not-allowed;color:var(--boreal-text-danger-light);background-color:transparent;border-color:transparent;-webkit-box-shadow:none;box-shadow:none}.bds-button.bds-button--var-plain.bds-button--error.bds-button--is-loading::after{border-left-color:var(--boreal-text-danger-light);border-bottom-color:var(--boreal-text-danger-light)}@-webkit-keyframes rotateSpinner{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes rotateSpinner{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}'}},[324,"bds-button",{label:[1],disabled:[4],name:[1],type:[1],color:[1],variant:[1],size:[1],loading:[4],disclosure:[4],currentState:[32]},void 0,{type:[{checkPropValues:0}],color:[{checkPropValues:0}],variant:[{checkPropValues:0}],size:[{checkPropValues:0}]}]);function c(){"undefined"!=typeof customElements&&["bds-button"].forEach((o=>{"bds-button"===o&&(customElements.get(e(o))||customElements.define(e(o),l))}))}export{l as B,d as a,c as d}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{p as t,a as e,h as a,H as r,t as o}from"./index.js";import{C as i}from"./p-BhTPNsBb.js";import{a as s}from"./p-CaHOghy5.js";import{d as l}from"./p-BYEAJCas.js";const h="md",p={link:{states:[i.DISABLED],size:["sm",h]},label:{states:[i.DISABLED],isRequired:!0,canUseTooltip:!0},heading:{canUseTooltip:!0},subheading:{canUseTooltip:!0},helper:{states:[i.ERROR]},display:{size:["xs","sm",h,"lg","xl"]}},y=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.inheritedAttributes={},this.variant="display",this.size=h,this.state=i.DEFAULT,this.customClass="",this.element="p",this.align="start",this.ellipsis=!1,this.maxLines=1,this.tooltipText="",this.isRequired=!1,this.htmlFor=void 0,this.href=null,this.target=null,this.isDownloadable=!1,this.filename="download",this.sanitizedHref=""}async updateSanitizedHref(){if("a"===this.getTagName&&null!==this.href){const{sanitizeUrl:t}=await import("./p-noyWJ11s.js").then((function(t){return t.i}));this.sanitizedHref=t(this.href)}else this.sanitizedHref=""}async componentWillLoad(){"a"===this.getTagName&&null!==this.href&&await this.updateSanitizedHref(),this.inheritedAttributes={...s(this.el)}}get getTagName(){return"link"===this.variant?"a":this.element.toLowerCase()}getVariantConfig(){return p[this.variant]??{}}getAccessibilityTags(){const{isRequired:t=null}=this.getVariantConfig(),e=["a","label"].includes(this.getTagName);return{"aria-required":this.isRequired&&t,"aria-disabled":this.state===i.DISABLED&&e}}getVariantStateStyles(){const t=this.getVariantConfig();return{[`bds-typography--${this.variant}`]:!0,[`bds-typography--align-${this.align}`]:!0,[`bds-typography--${this.state}`]:!(!t?.states||!t?.states.includes(this.state)),[`bds-typography--size-${this.size}`]:!(!t?.size||!t?.size.includes(this.size)),"bds-typography--required":!(!t?.isRequired||!this.isRequired),"bds-typography--ellipsis":this.ellipsis&&this.maxLines<=1,"bds-typography--ellipsis-multiline":this.ellipsis&&this.maxLines>1,[this.customClass]:""!==this.customClass}}render(){const t=this.getTagName,e={...(o=this,s=t,{a:{href:o.state!==i.DISABLED?o.sanitizedHref:null,target:o.target,download:o.isDownloadable?o.filename:null,rel:"_blank"===o.target?"noopener noreferrer":void 0},label:{htmlFor:o.htmlFor}}[s]||{}),...this.inheritedAttributes,...this.getAccessibilityTags()};var o,s;const l=this.getVariantStateStyles(),{canUseTooltip:h=null,isRequired:p=null}=this.getVariantConfig();return a(r,{key:"98e236475142f2be85fcc227cd507d6cb8648928",class:"bds-typography"},a(t,{key:"eed74e216dc0832b5f4808ba72e1374198f60e1a",class:l,style:{webkitLineClamp:this.maxLines},...e},a("slot",{key:"cc073f2d2a3840970c62296379514884564c3473"}),this.isRequired&&p&&a("em",{key:"299a88d69856603b6e73af9567fa91b1a1e7434f",class:"bds-typography__required-indicator","aria-hidden":"true"},"*"),this.tooltipText&&h&&a("span",{key:"c8fa478a8fbd4a70d0869b4c9d523a8a0e9803bf"},a("em",{key:"0f6869a6dd7ab04b19acee773e54687dbd070af0",class:"bds-typography__info-icon bds-icon-info-circle","aria-label":this.tooltipText}),a("bds-tooltip",{key:"ec2dfc33b119bc3f60ec52e8bd10fdb16ea5cc2a"},this.tooltipText))))}get el(){return this}static get watchers(){return{href:[{updateSanitizedHref:0}]}}static get style(){return'@charset "UTF-8";.bds-typography{display:-ms-flexbox;display:flex;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:var(--boreal-typography-font-family-primary);font-weight:var(--boreal-typography-font-weight-regular)}.bds-typography__required-indicator{color:var(--boreal-icon-danger-base);font-weight:var(--boreal-typography-font-weight-regular)}.bds-typography__info-icon{color:var(--boreal-icon-default-light)}.bds-typography--heading,.bds-typography--subheading{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:var(--boreal-spacing-3xs)}.bds-typography--label{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;gap:var(--boreal-spacing-3xs)}.bds-typography--display{display:block}.bds-typography--caption,.bds-typography--helper,.bds-typography--link{display:inline-block}.bds-typography--caption{font-size:var(--boreal-typography-font-size-xs);font-weight:var(--boreal-typography-font-weight-regular);line-height:var(--boreal-typography-line-height-md);color:var(--boreal-text-default-light)}.bds-typography--helper{font-size:var(--boreal-typography-font-size-xs);font-weight:var(--boreal-typography-font-weight-regular);line-height:var(--boreal-typography-line-height-sm);color:var(--boreal-text-default-light)}.bds-typography--link{font-size:var(--boreal-typography-font-size-sm);font-weight:var(--boreal-typography-font-weight-regular);line-height:var(--boreal-typography-line-height-md);color:var(--boreal-text-primary-base);text-decoration:none}.bds-typography--link:hover{text-decoration:underline}.bds-typography--link:visited{color:var(--boreal-text-primary-base)}.bds-typography--link:active{color:var(--boreal-text-primary-dark)}.bds-typography--link.bds-typography--size-sm{font-size:var(--boreal-typography-font-size-xs)}.bds-typography--link.bds-typography--size-md{font-size:var(--boreal-typography-font-size-sm)}.bds-typography--code{font-family:var(--boreal-typography-font-family-secondary);font-size:var(--boreal-typography-font-size-xs);font-weight:var(--boreal-typography-font-weight-regular);color:var(--boreal-text-default);line-height:var(--boreal-typography-line-height-md);overflow-wrap:break-word;background-color:var(--boreal-bg-neutral);padding:var(--boreal-spacing-3xs) var(--boreal-spacing-xs);border-radius:var(--boreal-radius-xs);display:inline;box-decoration-break:clone;-webkit-box-decoration-break:clone}.bds-typography--label{font-size:var(--boreal-typography-font-size-xs);font-weight:var(--boreal-typography-font-weight-semibold);line-height:var(--boreal-typography-line-height-md);color:var(--boreal-text-default-darker)}.bds-typography--display{font-weight:var(--boreal-typography-font-weight-regular);color:var(--boreal-text-default)}.bds-typography--display.bds-typography--size-sm{font-size:var(--boreal-typography-font-size-xl);line-height:var(--boreal-typography-line-height-xl)}.bds-typography--display.bds-typography--size-md{font-size:var(--boreal-typography-font-size-2xl);line-height:var(--boreal-typography-line-height-2xl)}.bds-typography--display.bds-typography--size-lg{font-size:var(--boreal-typography-font-size-3xl);line-height:var(--boreal-typography-line-height-3xl);font-weight:var(--boreal-typography-font-weight-light)}.bds-typography--display.bds-typography--size-xl{font-size:var(--boreal-typography-font-size-4xl);line-height:var(--boreal-typography-line-height-4xl);font-weight:var(--boreal-typography-font-weight-light)}.bds-typography--heading{font-size:var(--boreal-typography-font-size-lg);line-height:var(--boreal-typography-line-height-lg);font-weight:var(--boreal-typography-font-weight-regular);color:var(--boreal-text-default)}.bds-typography h1.bds-typography--heading{font-weight:var(--boreal-typography-font-weight-regular);font-size:var(--boreal-typography-font-size-4xl);line-height:var(--boreal-typography-line-height-4xl)}.bds-typography h2.bds-typography--heading{font-weight:var(--boreal-typography-font-weight-regular);font-size:var(--boreal-typography-font-size-3xl);line-height:var(--boreal-typography-line-height-3xl)}.bds-typography h3.bds-typography--heading{font-weight:var(--boreal-typography-font-weight-regular);font-size:var(--boreal-typography-font-size-2xl);line-height:var(--boreal-typography-line-height-2xl)}.bds-typography h4.bds-typography--heading{font-weight:var(--boreal-typography-font-weight-regular);font-size:var(--boreal-typography-font-size-xl);line-height:var(--boreal-typography-line-height-xl)}.bds-typography h5.bds-typography--heading{font-weight:var(--boreal-typography-font-weight-regular);font-size:var(--boreal-typography-font-size-lg);line-height:var(--boreal-typography-line-height-lg)}.bds-typography h6.bds-typography--heading{font-size:var(--boreal-typography-font-size-md);font-weight:var(--boreal-typography-font-weight-semibold);line-height:var(--boreal-typography-line-height-md)}.bds-typography--subheading{font-size:var(--boreal-typography-font-size-md);line-height:var(--boreal-typography-line-height-md);font-weight:var(--boreal-typography-font-weight-semibold)}.bds-typography--align-start{text-align:start}.bds-typography--align-center{text-align:center}.bds-typography--align-end{text-align:end}.bds-typography--align-inherit{text-align:inherit}.bds-typography--error{color:var(--boreal-text-danger-base)}.bds-typography--disabled{color:var(--boreal-text-disabled);pointer-events:none;cursor:not-allowed}.bds-typography--disabled .bds-typography__required-indicator{color:var(--boreal-text-danger-light)}.bds-typography--ellipsis{display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}.bds-typography--ellipsis-multiline{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;white-space:normal;width:100%}'}},[260,"bds-typography",{variant:[513],size:[513],state:[513],customClass:[1,"custom-class"],element:[1],align:[1],ellipsis:[4],maxLines:[2,"max-lines"],tooltipText:[1,"tooltip-text"],isRequired:[516,"is-required"],htmlFor:[1,"html-for"],href:[1],target:[1],isDownloadable:[4,"is-downloadable"],filename:[1],sanitizedHref:[32]},void 0,{href:[{updateSanitizedHref:0}]}]);function n(){"undefined"!=typeof customElements&&["bds-typography","bds-tooltip"].forEach((t=>{switch(t){case"bds-typography":customElements.get(o(t))||customElements.define(o(t),y);break;case"bds-tooltip":customElements.get(o(t))||l()}}))}export{y as B,n as d}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{p as t,M as o,h as e,H as i,t as r}from"./index.js";import{a}from"./p-CYojP4vI.js";const s=t(class extends(o(a)){constructor(t){super(!1),!1!==t&&this.__registerHost(),this.multiline=!1,this.disabled=!1,this.floatingOptions={},this.isVisible=!1}get options(){return{placement:this.floatingOptions.placement??"bottom",offset:this.floatingOptions.offset??8,arrow:this.floatingOptions.hideArrow?void 0:this.arrowElement,strategy:"fixed"}}get hooks(){return{onPositionUpdate:t=>this.handlePosition(t),onBeforeShow:()=>this.validateShow(),onBeforeHide:t=>this.validateHide(t),subscribeToTrigger:t=>this.subscribe(t)}}get canShowArrow(){return!this.floatingOptions.hideArrow||!1}get getPlacement(){return this.floatingOptions.placement||"bottom"}validateShow(){return!this.disabled}validateHide(t){return!this.floatingOptions.stayOnHover||void 0===t||!t.isConnected||!this.floatingContent.contains(t)&&this.floatingContent!==t}handlePosition(t){this.floatingContent.setAttribute("data-placement",t.placement),this.setArrowPosition(t)}setArrowPosition(t){if(t.middlewareData?.arrow&&!this.disabled&&this.arrowElement?.isConnected){const{x:o,y:e}=t.middlewareData.arrow;Object.assign(this.arrowElement.style,{left:null!=o?`${o}px`:"",top:null!=e?`${e}px`:""})}}get hasMultiline(){return void 0!==this.multiline&&this.multiline}get tooltipStyles(){return{"tooltip-content":!0,"tooltip-content--multiline":this.hasMultiline}}subscribe(t){void 0!==t&&(t.setAttribute("part","tooltip-trigger"),t.setAttribute("ariaDescribedBy","tooltip-content"),t.addEventListener("mouseenter",(()=>this.show())),t.addEventListener("mouseleave",(t=>this.hide(t.target))))}render(){return e(i,{key:"65758ffb473363eadce15b09704224a95304dbf2",class:"tooltip"},e("div",{key:"d488e67b2da3c788ccf8eb9b9eeb273b9d1c58be",id:"tooltip-content",part:"tooltip-content",class:this.tooltipStyles,popover:"manual",role:"tooltip","aria-hidden":this.isVisible?"false":"true","data-placement":this.getPlacement,"data-multiline":this.multiline,"data-hidearrow":this.canShowArrow,ref:t=>this.floatingContent=t},this.canShowArrow&&e("div",{key:"de86ff5432b49a2e31d94c6c8e16f33327ef5baa",class:"tooltip-arrow",part:"arrow",ref:t=>this.arrowElement=t}),e("slot",{key:"8428151ba6b9b835f721be33cc61b1bacdba7494"})))}get el(){return this}static get style(){return'@charset "UTF-8";:root{--tooltip-arrow-size:var(--boreal-spacing-s);--tooltip-width:320px}.tooltip-content{position:fixed;margin:0;border:0;overflow:visible;border-radius:var(--boreal-radius-xs2);background:var(--boreal-ui-black);color:var(--boreal-text-inverse);padding:var(--boreal-spacing-2xs) var(--boreal-spacing-s);font-size:var(--boreal-typography-font-size-xs);line-height:var(--boreal-typography-line-height-xs);font-family:var(--boreal-typography-font-family-primary);border:var(--boreal-spacing-2xs) solid var(--boreal-ui-black);font-weight:var(--boreal-typography-font-weight-regular)}.tooltip-content--multiline{white-space:normal;max-width:var(--tooltip-width, 320px);word-break:break-word;text-align:center}.tooltip-arrow{position:absolute;width:var(--tooltip-arrow-size);height:var(--tooltip-arrow-size);pointer-events:none;z-index:-1}.tooltip-arrow::before{content:"";position:absolute;width:var(--tooltip-arrow-size);height:var(--tooltip-arrow-size);background:var(--boreal-ui-black);-webkit-transform:rotate(45deg);transform:rotate(45deg)}.tooltip-content[data-placement^=top] .tooltip-arrow{bottom:calc(var(--tooltip-arrow-size) / -2)}.tooltip-content[data-placement^=top] .tooltip-arrow::before{top:0}.tooltip-content[data-placement^=bottom] .tooltip-arrow{top:calc(var(--tooltip-arrow-size) / -2)}.tooltip-content[data-placement^=bottom] .tooltip-arrow::before{top:0}.tooltip-content[data-placement^=left] .tooltip-arrow{right:calc(var(--tooltip-arrow-size) / -2)}.tooltip-content[data-placement^=left] .tooltip-arrow::before{left:0}.tooltip-content[data-placement^=right] .tooltip-arrow{left:calc(var(--tooltip-arrow-size) / -2)}.tooltip-content[data-placement^=right] .tooltip-arrow::before{left:0}'}},[772,"bds-tooltip",{multiline:[4],disabled:[4],floatingOptions:[16],isVisible:[32]}]);function l(){"undefined"!=typeof customElements&&["bds-tooltip"].forEach((t=>{"bds-tooltip"===t&&(customElements.get(r(t))||customElements.define(r(t),s))}))}export{s as B,l as d}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const a={DEFAULT:"default",ERROR:"error",DISABLED:"disabled",ACTIVE:"active"},e={INFO:"info",SUCCESS:"success",WARNING:"warning",DANGER:"danger"};export{a as C,e as S}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{f as t}from"./p-DCXSEEVH.js";const n=Math.min,e=Math.max,o=Math.round,i=Math.floor,r=t=>({x:t,y:t}),s={left:"right",right:"left",bottom:"top",top:"bottom"},l={start:"end",end:"start"};function a(t,o,i){return e(t,n(o,i))}function c(t,n){return"function"==typeof t?t(n):t}function u(t){return t.split("-")[0]}function f(t){return t.split("-")[1]}function h(t){return"x"===t?"y":"x"}function d(t){return"y"===t?"height":"width"}const p=new Set(["top","bottom"]);function m(t){return p.has(u(t))?"y":"x"}function y(t){return h(m(t))}function g(t){return t.replace(/start|end/g,(t=>l[t]))}const w=["left","right"],x=["right","left"],v=["top","bottom"],b=["bottom","top"];function A(t){return t.replace(/left|right|bottom|top/g,(t=>s[t]))}function S(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}function F(t){const{x:n,y:e,width:o,height:i}=t;return{width:o,height:i,top:e,left:n,right:n+o,bottom:e+i,x:n,y:e}}function R(t,n,e){let{reference:o,floating:i}=t;const r=m(n),s=y(n),l=d(s),a=u(n),c="y"===r,h=o.x+o.width/2-i.width/2,p=o.y+o.height/2-i.height/2,g=o[l]/2-i[l]/2;let w;switch(a){case"top":w={x:h,y:o.y-i.height};break;case"bottom":w={x:h,y:o.y+o.height};break;case"right":w={x:o.x+o.width,y:p};break;case"left":w={x:o.x-i.width,y:p};break;default:w={x:o.x,y:o.y}}switch(f(n)){case"start":w[s]-=g*(e&&c?-1:1);break;case"end":w[s]+=g*(e&&c?-1:1)}return w}async function P(t,n){var e;void 0===n&&(n={});const{x:o,y:i,platform:r,rects:s,elements:l,strategy:a}=t,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:h="floating",altBoundary:d=!1,padding:p=0}=c(n,t),m=S(p),y=l[d?"floating"===h?"reference":"floating":h],g=F(await r.getClippingRect({element:null==(e=await(null==r.isElement?void 0:r.isElement(y)))||e?y:y.contextElement||await(null==r.getDocumentElement?void 0:r.getDocumentElement(l.floating)),boundary:u,rootBoundary:f,strategy:a})),w="floating"===h?{x:o,y:i,width:s.floating.width,height:s.floating.height}:s.reference,x=await(null==r.getOffsetParent?void 0:r.getOffsetParent(l.floating)),v=await(null==r.isElement?void 0:r.isElement(x))&&await(null==r.getScale?void 0:r.getScale(x))||{x:1,y:1},b=F(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:w,offsetParent:x,strategy:a}):w);return{top:(g.top-b.top+m.top)/v.y,bottom:(b.bottom-g.bottom+m.bottom)/v.y,left:(g.left-b.left+m.left)/v.x,right:(b.right-g.right+m.right)/v.x}}const k=new Set(["left","top"]);function D(){return"undefined"!=typeof window}function E(t){return L(t)?(t.nodeName||"").toLowerCase():"#document"}function T(t){var n;return(null==t||null==(n=t.ownerDocument)?void 0:n.defaultView)||window}function C(t){var n;return null==(n=(L(t)?t.ownerDocument:t.document)||window.document)?void 0:n.documentElement}function L(t){return!!D()&&(t instanceof Node||t instanceof T(t).Node)}function O(t){return!!D()&&(t instanceof Element||t instanceof T(t).Element)}function $(t){return!!D()&&(t instanceof HTMLElement||t instanceof T(t).HTMLElement)}function M(t){return!(!D()||"undefined"==typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof T(t).ShadowRoot)}const z=new Set(["inline","contents"]);function B(t){const{overflow:n,overflowX:e,overflowY:o,display:i}=_(t);return/auto|scroll|overlay|hidden|clip/.test(n+o+e)&&!z.has(i)}const q=new Set(["table","td","th"]);function j(t){return q.has(E(t))}const H=[":popover-open",":modal"];function I(t){return H.some((n=>{try{return t.matches(n)}catch(t){return!1}}))}const N=["transform","translate","scale","rotate","perspective"],U=["transform","translate","scale","rotate","perspective","filter"],V=["paint","layout","strict","content"];function W(t){const n=X(),e=O(t)?_(t):t;return N.some((t=>!!e[t]&&"none"!==e[t]))||!!e.containerType&&"normal"!==e.containerType||!n&&!!e.backdropFilter&&"none"!==e.backdropFilter||!n&&!!e.filter&&"none"!==e.filter||U.some((t=>(e.willChange||"").includes(t)))||V.some((t=>(e.contain||"").includes(t)))}function X(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const K=new Set(["html","body","#document"]);function Y(t){return K.has(E(t))}function _(t){return T(t).getComputedStyle(t)}function G(t){return O(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function J(t){if("html"===E(t))return t;const n=t.assignedSlot||t.parentNode||M(t)&&t.host||C(t);return M(n)?n.host:n}function Q(t){const n=J(t);return Y(n)?t.ownerDocument?t.ownerDocument.body:t.body:$(n)&&B(n)?n:Q(n)}function Z(t,n,e){var o;void 0===n&&(n=[]),void 0===e&&(e=!0);const i=Q(t),r=i===(null==(o=t.ownerDocument)?void 0:o.body),s=T(i);if(r){const t=tt(s);return n.concat(s,s.visualViewport||[],B(i)?i:[],t&&e?Z(t):[])}return n.concat(i,Z(i,[],e))}function tt(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function nt(t){const n=_(t);let e=parseFloat(n.width)||0,i=parseFloat(n.height)||0;const r=$(t),s=r?t.offsetWidth:e,l=r?t.offsetHeight:i,a=o(e)!==s||o(i)!==l;return a&&(e=s,i=l),{width:e,height:i,$:a}}function et(t){return O(t)?t:t.contextElement}function ot(t){const n=et(t);if(!$(n))return r(1);const e=n.getBoundingClientRect(),{width:i,height:s,$:l}=nt(n);let a=(l?o(e.width):e.width)/i,c=(l?o(e.height):e.height)/s;return a&&Number.isFinite(a)||(a=1),c&&Number.isFinite(c)||(c=1),{x:a,y:c}}const it=r(0);function rt(t){const n=T(t);return X()&&n.visualViewport?{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}:it}function st(t,n,e,o){void 0===n&&(n=!1),void 0===e&&(e=!1);const i=t.getBoundingClientRect(),s=et(t);let l=r(1);n&&(o?O(o)&&(l=ot(o)):l=ot(t));const a=function(t,n,e){return void 0===n&&(n=!1),!(!e||n&&e!==T(t))&&n}(s,e,o)?rt(s):r(0);let c=(i.left+a.x)/l.x,u=(i.top+a.y)/l.y,f=i.width/l.x,h=i.height/l.y;if(s){const t=T(s),n=o&&O(o)?T(o):o;let e=t,i=tt(e);for(;i&&o&&n!==e;){const t=ot(i),n=i.getBoundingClientRect(),o=_(i),r=n.left+(i.clientLeft+parseFloat(o.paddingLeft))*t.x,s=n.top+(i.clientTop+parseFloat(o.paddingTop))*t.y;c*=t.x,u*=t.y,f*=t.x,h*=t.y,c+=r,u+=s,e=T(i),i=tt(e)}}return F({width:f,height:h,x:c,y:u})}function lt(t,n){const e=G(t).scrollLeft;return n?n.left+e:st(C(t)).left+e}function at(t,n){const e=t.getBoundingClientRect();return{x:e.left+n.scrollLeft-lt(t,e),y:e.top+n.scrollTop}}const ct=new Set(["absolute","fixed"]);function ut(t,n,o){let i;if("viewport"===n)i=function(t,n){const e=T(t),o=C(t),i=e.visualViewport;let r=o.clientWidth,s=o.clientHeight,l=0,a=0;if(i){r=i.width,s=i.height;const t=X();(!t||t&&"fixed"===n)&&(l=i.offsetLeft,a=i.offsetTop)}const c=lt(o);if(c<=0){const t=o.ownerDocument,n=t.body,e=getComputedStyle(n),i="CSS1Compat"===t.compatMode&&parseFloat(e.marginLeft)+parseFloat(e.marginRight)||0,s=Math.abs(o.clientWidth-n.clientWidth-i);s<=25&&(r-=s)}else c<=25&&(r+=c);return{width:r,height:s,x:l,y:a}}(t,o);else if("document"===n)i=function(t){const n=C(t),o=G(t),i=t.ownerDocument.body,r=e(n.scrollWidth,n.clientWidth,i.scrollWidth,i.clientWidth),s=e(n.scrollHeight,n.clientHeight,i.scrollHeight,i.clientHeight);let l=-o.scrollLeft+lt(t);const a=-o.scrollTop;return"rtl"===_(i).direction&&(l+=e(n.clientWidth,i.clientWidth)-r),{width:r,height:s,x:l,y:a}}(C(t));else if(O(n))i=function(t,n){const e=st(t,!0,"fixed"===n),o=e.top+t.clientTop,i=e.left+t.clientLeft,s=$(t)?ot(t):r(1);return{width:t.clientWidth*s.x,height:t.clientHeight*s.y,x:i*s.x,y:o*s.y}}(n,o);else{const e=rt(t);i={x:n.x-e.x,y:n.y-e.y,width:n.width,height:n.height}}return F(i)}function ft(t,n){const e=J(t);return!(e===n||!O(e)||Y(e))&&("fixed"===_(e).position||ft(e,n))}function ht(t,n,e){const o=$(n),i=C(n),s="fixed"===e,l=st(t,!0,s,n);let a={scrollLeft:0,scrollTop:0};const c=r(0);function u(){c.x=lt(i)}if(o||!o&&!s)if(("body"!==E(n)||B(i))&&(a=G(n)),o){const t=st(n,!0,s,n);c.x=t.x+n.clientLeft,c.y=t.y+n.clientTop}else i&&u();s&&!o&&i&&u();const f=!i||o||s?r(0):at(i,a);return{x:l.left+a.scrollLeft-c.x-f.x,y:l.top+a.scrollTop-c.y-f.y,width:l.width,height:l.height}}function dt(t){return"static"===_(t).position}function pt(t,n){if(!$(t)||"fixed"===_(t).position)return null;if(n)return n(t);let e=t.offsetParent;return C(t)===e&&(e=e.ownerDocument.body),e}function mt(t,n){const e=T(t);if(I(t))return e;if(!$(t)){let n=J(t);for(;n&&!Y(n);){if(O(n)&&!dt(n))return n;n=J(n)}return e}let o=pt(t,n);for(;o&&j(o)&&dt(o);)o=pt(o,n);return o&&Y(o)&&dt(o)&&!W(o)?e:o||function(t){let n=J(t);for(;$(n)&&!Y(n);){if(W(n))return n;if(I(n))return null;n=J(n)}return null}(t)||e}const yt={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:n,rect:e,offsetParent:o,strategy:i}=t;const s="fixed"===i,l=C(o),a=!!n&&I(n.floating);if(o===l||a&&s)return e;let c={scrollLeft:0,scrollTop:0},u=r(1);const f=r(0),h=$(o);if((h||!h&&!s)&&(("body"!==E(o)||B(l))&&(c=G(o)),$(o))){const t=st(o);u=ot(o),f.x=t.x+o.clientLeft,f.y=t.y+o.clientTop}const d=!l||h||s?r(0):at(l,c);return{width:e.width*u.x,height:e.height*u.y,x:e.x*u.x-c.scrollLeft*u.x+f.x+d.x,y:e.y*u.y-c.scrollTop*u.y+f.y+d.y}},getDocumentElement:C,getClippingRect:function(t){let{element:o,boundary:i,rootBoundary:r,strategy:s}=t;const l=[..."clippingAncestors"===i?I(o)?[]:function(t,n){const e=n.get(t);if(e)return e;let o=Z(t,[],!1).filter((t=>O(t)&&"body"!==E(t))),i=null;const r="fixed"===_(t).position;let s=r?J(t):t;for(;O(s)&&!Y(s);){const n=_(s),e=W(s);e||"fixed"!==n.position||(i=null),(r?!e&&!i:!e&&"static"===n.position&&i&&ct.has(i.position)||B(s)&&!e&&ft(t,s))?o=o.filter((t=>t!==s)):i=n,s=J(s)}return n.set(t,o),o}(o,this._c):[].concat(i),r],a=l.reduce(((t,i)=>{const r=ut(o,i,s);return t.top=e(r.top,t.top),t.right=n(r.right,t.right),t.bottom=n(r.bottom,t.bottom),t.left=e(r.left,t.left),t}),ut(o,l[0],s));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:mt,getElementRects:async function(t){const n=this.getOffsetParent||mt,e=this.getDimensions,o=await e(t.floating);return{reference:ht(t.reference,await n(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:n,height:e}=nt(t);return{width:n,height:e}},getScale:ot,isElement:O,isRTL:function(t){return"rtl"===_(t).direction}};function gt(t,n){return t.x===n.x&&t.y===n.y&&t.width===n.width&&t.height===n.height}const wt=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(n){var e,o;const{x:i,y:r,placement:s,middlewareData:l}=n,a=await async function(t,n){const{placement:e,platform:o,elements:i}=t,r=await(null==o.isRTL?void 0:o.isRTL(i.floating)),s=u(e),l=f(e),a="y"===m(e),h=k.has(s)?-1:1,d=r&&a?-1:1,p=c(n,t);let{mainAxis:y,crossAxis:g,alignmentAxis:w}="number"==typeof p?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return l&&"number"==typeof w&&(g="end"===l?-1*w:w),a?{x:g*d,y:y*h}:{x:y*h,y:g*d}}(n,t);return s===(null==(e=l.offset)?void 0:e.placement)&&null!=(o=l.arrow)&&o.alignmentOffset?{}:{x:i+a.x,y:r+a.y,data:{...a,placement:s}}}}},xt=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(n){var e,o;const{placement:i,middlewareData:r,rects:s,initialPlacement:l,platform:a,elements:h}=n,{mainAxis:p=!0,crossAxis:S=!0,fallbackPlacements:F,fallbackStrategy:R="bestFit",fallbackAxisSideDirection:P="none",flipAlignment:k=!0,...D}=c(t,n);if(null!=(e=r.arrow)&&e.alignmentOffset)return{};const E=u(i),T=m(l),C=u(l)===l,L=await(null==a.isRTL?void 0:a.isRTL(h.floating)),O=F||(C||!k?[A(l)]:function(t){const n=A(t);return[g(t),n,g(n)]}(l)),$="none"!==P;!F&&$&&O.push(...function(t,n,e,o){const i=f(t);let r=function(t,n,e){switch(t){case"top":case"bottom":return e?n?x:w:n?w:x;case"left":case"right":return n?v:b;default:return[]}}(u(t),"start"===e,o);return i&&(r=r.map((t=>t+"-"+i)),n&&(r=r.concat(r.map(g)))),r}(l,k,P,L));const M=[l,...O],z=await a.detectOverflow(n,D),B=[];let q=(null==(o=r.flip)?void 0:o.overflows)||[];if(p&&B.push(z[E]),S){const t=function(t,n,e){void 0===e&&(e=!1);const o=f(t),i=y(t),r=d(i);let s="x"===i?o===(e?"end":"start")?"right":"left":"start"===o?"bottom":"top";return n.reference[r]>n.floating[r]&&(s=A(s)),[s,A(s)]}(i,s,L);B.push(z[t[0]],z[t[1]])}if(q=[...q,{placement:i,overflows:B}],!B.every((t=>t<=0))){var j,H;const t=((null==(j=r.flip)?void 0:j.index)||0)+1,n=M[t];if(n&&("alignment"!==S||T===m(n)||q.every((t=>m(t.placement)!==T||t.overflows[0]>0))))return{data:{index:t,overflows:q},reset:{placement:n}};let e=null==(H=q.filter((t=>t.overflows[0]<=0)).sort(((t,n)=>t.overflows[1]-n.overflows[1]))[0])?void 0:H.placement;if(!e)switch(R){case"bestFit":{var I;const t=null==(I=q.filter((t=>{if($){const n=m(t.placement);return n===T||"y"===n}return!0})).map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,n)=>t+n),0)])).sort(((t,n)=>t[1]-n[1]))[0])?void 0:I[0];t&&(e=t);break}case"initialPlacement":e=l}if(i!==e)return{reset:{placement:e}}}return{}}}};class vt{error(t,n){throw new Error(`[${t}]: ${n}`)}warn(t,n){console.warn(`[${t}]: ${n}`)}log(t,n){console.log(`[${t}]: ${n}`)}}class bt{constructor(t){this.logger=t}async computePosition(t,e,o){null==t&&this.logger.error("FloatingAdapter.computePosition","Reference element is required for positioning."),null==e&&this.logger.error("FloatingAdapter.computePosition","Floating element is required for positioning.");const{placement:i,offset:r,flip:s,shift:l,arrow:p,strategy:g}=o,w=[wt(r)];s&&w.push(xt()),l&&w.push(function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(n){const{x:e,y:o,placement:i,platform:r}=n,{mainAxis:s=!0,crossAxis:l=!1,limiter:f={fn:t=>{let{x:n,y:e}=t;return{x:n,y:e}}},...d}=c(t,n),p={x:e,y:o},y=await r.detectOverflow(n,d),g=m(u(i)),w=h(g);let x=p[w],v=p[g];s&&(x=a(x+y["y"===w?"top":"left"],x,x-y["y"===w?"bottom":"right"])),l&&(v=a(v+y["y"===g?"top":"left"],v,v-y["y"===g?"bottom":"right"]));const b=f.fn({...n,[w]:x,[g]:v});return{...b,data:{x:b.x-e,y:b.y-o,enabled:{[w]:s,[g]:l}}}}}}()),void 0===p&&null===p||w.push((t=>({name:"arrow",options:t,async fn(e){const{x:o,y:i,placement:r,rects:s,platform:l,elements:u,middlewareData:h}=e,{element:p,padding:m=0}=c(t,e)||{};if(null==p)return{};const g=S(m),w={x:o,y:i},x=y(r),v=d(x),b=await l.getDimensions(p),A="y"===x,F=A?"top":"left",R=A?"bottom":"right",P=A?"clientHeight":"clientWidth",k=s.reference[v]+s.reference[x]-w[x]-s.floating[v],D=w[x]-s.reference[x],E=await(null==l.getOffsetParent?void 0:l.getOffsetParent(p));let T=E?E[P]:0;T&&await(null==l.isElement?void 0:l.isElement(E))||(T=u.floating[P]||s.floating[v]);const C=k/2-D/2,L=T/2-b[v]/2-1,O=n(g[F],L),$=n(g[R],L),M=O,z=T-b[v]-$,B=T/2-b[v]/2+C,q=a(M,B,z),j=!h.arrow&&null!=f(r)&&B!==q&&s.reference[v]/2-(B<M?O:$)-b[v]/2<0,H=j?B<M?B-M:B-z:0;return{[x]:w[x]+H,data:{[x]:q,centerOffset:B-q-H,...j&&{alignmentOffset:H}},reset:j}}}))({element:p}));const x=await((t,n,e)=>{const o=new Map,i={platform:yt,...e},r={...i.platform,_c:o};return(async(t,n,e)=>{const{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:s}=e,l=r.filter(Boolean),a=await(null==s.isRTL?void 0:s.isRTL(n));let c=await s.getElementRects({reference:t,floating:n,strategy:i}),{x:u,y:f}=R(c,o,a),h=o,d={},p=0;for(let e=0;e<l.length;e++){var m;const{name:r,fn:y}=l[e],{x:g,y:w,data:x,reset:v}=await y({x:u,y:f,initialPlacement:o,placement:h,strategy:i,middlewareData:d,rects:c,platform:{...s,detectOverflow:null!=(m=s.detectOverflow)?m:P},elements:{reference:t,floating:n}});u=null!=g?g:u,f=null!=w?w:f,d={...d,[r]:{...d[r],...x}},v&&p<=50&&(p++,"object"==typeof v&&(v.placement&&(h=v.placement),v.rects&&(c=!0===v.rects?await s.getElementRects({reference:t,floating:n,strategy:i}):v.rects),({x:u,y:f}=R(c,h,a))),e=-1)}return{x:u,y:f,placement:h,strategy:i,middlewareData:d}})(t,n,{...i,platform:r})})(t,e,{placement:i,middleware:w,strategy:g}).catch((t=>{this.logger.error("FloatingAdapter.computePosition",t.message)})).then((t=>t)),{x:v,y:b,placement:A,middlewareData:F}=x;return{x:v,y:b,placement:A,middlewareData:F}}applyPosition(t,n){null==t&&this.logger.error("FloatingAdapter.applyPosition","Element is required to apply positioning."),t.style.left=`${n.x}px`,t.style.top=`${n.y}px`}}class At extends bt{constructor(){super(new vt)}}const St="focus",Ft="blur",Rt="Enter",Pt="Escape",kt=o=>class extends(t(o)){constructor(){super()}get options(){return{placement:"bottom",offset:8,strategy:"fixed"}}get hooks(){return{}}showElement(){this.floatingContent.showPopover(),this.isVisible=!0,this.startAutoUpdate(this.triggerSlot,this.floatingContent,this.options,(t=>{this.hooks.onPositionUpdate?.(t)}))}onBeforeShow(t){return null==this.triggerSlot?(this.logger.error("AnchoredMixin.show","triggerSlot is required"),!1):super.onBeforeShow(t)}hideElement(){this.stopAutoUpdate(),this.floatingContent?.hidePopover(),this.isVisible=!1}handleSlotChange(t,n,e){const o=t.target;null!=this.previousTrigger&&this.detachTriggerListeners(this.previousTrigger,n,e),null!=o&&(this.attachTriggerListeners(o,n,e),this.previousTrigger=o)}handleKeydown(t,n,e){t.key!==Rt&&" "!==t.key||n(),t.key===Pt&&e()}async updatePosition(t,n,e,o){const i=await this.positionEngine.computePosition(t,n,{placement:e.placement,offset:e.offset,flip:e.flip??!0,shift:e.shift??!0,arrow:e.arrow,strategy:e.strategy??"fixed"});return this.positionEngine.applyPosition(n,i),o?.(i),i}startAutoUpdate(t,o,r,s){const l=()=>{this.updatePosition(t,o,r,s)};l(),this.cleanupAutoUpdate=function(t,o,r,s){void 0===s&&(s={});const{ancestorScroll:l=!0,ancestorResize:a=!0,elementResize:c="function"==typeof ResizeObserver,layoutShift:u="function"==typeof IntersectionObserver,animationFrame:f=!1}=s,h=et(t),d=l||a?[...h?Z(h):[],...Z(o)]:[];d.forEach((t=>{l&&t.addEventListener("scroll",r,{passive:!0}),a&&t.addEventListener("resize",r)}));const p=h&&u?function(t,o){let r,s=null;const l=C(t);function a(){var t;clearTimeout(r),null==(t=s)||t.disconnect(),s=null}return function c(u,f){void 0===u&&(u=!1),void 0===f&&(f=1),a();const h=t.getBoundingClientRect(),{left:d,top:p,width:m,height:y}=h;if(u||o(),!m||!y)return;const g={rootMargin:-i(p)+"px "+-i(l.clientWidth-(d+m))+"px "+-i(l.clientHeight-(p+y))+"px "+-i(d)+"px",threshold:e(0,n(1,f))||1};let w=!0;function x(n){const e=n[0].intersectionRatio;if(e!==f){if(!w)return c();e?c(!1,e):r=setTimeout((()=>{c(!1,1e-7)}),1e3)}1!==e||gt(h,t.getBoundingClientRect())||c(),w=!1}try{s=new IntersectionObserver(x,{...g,root:l.ownerDocument})}catch(t){s=new IntersectionObserver(x,g)}s.observe(t)}(!0),a}(h,r):null;let m,y=-1,g=null;c&&(g=new ResizeObserver((t=>{let[n]=t;n&&n.target===h&&g&&(g.unobserve(o),cancelAnimationFrame(y),y=requestAnimationFrame((()=>{var t;null==(t=g)||t.observe(o)}))),r()})),h&&!f&&g.observe(h),g.observe(o));let w=f?st(t):null;return f&&function n(){const e=st(t);w&&!gt(w,e)&&r(),w=e,m=requestAnimationFrame(n)}(),r(),()=>{var t;d.forEach((t=>{l&&t.removeEventListener("scroll",r),a&&t.removeEventListener("resize",r)})),null==p||p(),null==(t=g)||t.disconnect(),g=null,f&&cancelAnimationFrame(m)}}(t,o,l,{elementResize:!0,layoutShift:!0})}stopAutoUpdate(){this.cleanupAutoUpdate?.(),this.cleanupAutoUpdate=void 0}attachTriggerListeners(t,n,e){t.addEventListener(St,n),t.addEventListener(Ft,e)}detachTriggerListeners(t,n,e){t.removeEventListener(St,n),t.removeEventListener(Ft,e)}floatingDisconnect(t,n){null!=this.previousTrigger&&this.detachTriggerListeners(this.previousTrigger,t,n),this.stopAutoUpdate()}subscribeToTrigger(t){void 0!==this.hooks.subscribeToTrigger&&this.hooks.subscribeToTrigger(t)}onBeforeLoad(){const t=this.el.parentElement;if(null===t)return;const n=t.querySelector("[bds-tooltip], [bds-popover]")||t;n.isConnected&&(this.triggerSlot=n,this.subscribeToTrigger(n))}componentDidLoad(){this.onBeforeLoad(),this.hooks.onBeforeLoad?.(this.el)}componentWillLoad(){this.toggle=this.toggle.bind(this),this.show=this.show.bind(this),this.hide=this.hide.bind(this),this.positionEngine=new At,this.logger=new vt,this.cleanupAutoUpdate=void 0,this.previousTrigger=void 0}disconnectedCallback(){null!=this.previousTrigger&&this.floatingDisconnect((()=>this.show()),(()=>this.hide())),this.stopAutoUpdate(),this.hide()}};export{kt as a}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const s=s=>class extends s{constructor(){super(!1)}formDisabledCallback(s){this.isDisabled=s}};function t(s,t){s.setFormValue?.(t)}function o(s,t,o){const c={};let e="";for(const{key:s,isValid:n,message:a}of t)n(o)||(c[s]=!0,""===e&&(e=a));const n=0===Object.keys(c).length;return s.setValidity?.(n?{}:c,e),n}export{s as f,o as r,t as s}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function o(o,e,n,a){const c=n[a];o.includes(c)||(n[a]=e,console.warn(`[BorealDS] Invalid value "${c}" for prop "${a}" on <${n.tagName.toLowerCase()}>. Expected one of: ${o.join(", ")}.`))}export{o as v}
|