@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
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../dist/types/components";
|
|
2
|
+
|
|
3
|
+
interface BdsListMenu extends Components.BdsListMenu, HTMLElement {}
|
|
4
|
+
export const BdsListMenu: {
|
|
5
|
+
prototype: BdsListMenu;
|
|
6
|
+
new (): BdsListMenu;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as t,H as e,c as s,h as i,a as l,t as a}from"./index.js";const h=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.bdsChange=s(this,"bdsChange"),this.bdsClicked=s(this,"bdsClicked"),this.multiple=!1,this.menuRole="menu",this.selectedValues=[]}async getSelectedValues(){return this.multiple?this.selectedValues:this.selectedValues[0]}async setSelectedValues(t){this.selectedValues=this.multiple?Array.isArray(t)?t:[t]:null!==t?[t]:[],this.updateChildrenState()}handleItemClick(t){const{value:e,selected:s}=t.detail;"listbox"===this.menuRole?(this.multiple?this.handleMultipleSelection(e,s):this.handleSingleSelection(e,s),this.bdsChange.emit(this.multiple?this.selectedValues:this.selectedValues[0]||void 0),this.updateChildrenState()):this.bdsClicked.emit(t.target)}componentWillLoad(){this.initialSelectedValues(),this.updateActiveState()}get childItems(){return Array.from(this.el.querySelectorAll("bds-list-menu-item"))}get firstEnabledItem(){return this.childItems.find((t=>!t.disabled&&"label"!==t.variant))}updateActiveState(){const t=this.firstEnabledItem;this.childItems.some((t=>t.selected&&!t.disabled))||void 0===t||t.setAttribute("active-item","")}handleMultipleSelection(t,e){this.selectedValues=e?[...this.selectedValues,t]:this.selectedValues.filter((e=>e!==t))}handleSingleSelection(t,e){this.selectedValues=e?[t]:[]}updateChildrenState(){this.childItems.forEach((t=>{if(void 0!==t.value){const e=this.selectedValues.includes(t.value);t.selected=e,e?t.setAttribute("active-item",""):t.removeAttribute("active-item")}})),0===this.selectedValues.length&&this.updateActiveState()}initialSelectedValues(){const t=Array.from(this.el.querySelectorAll("bds-list-menu-item[selected]"));if(t.length>0){const e=Array.from(t).map((t=>t.getAttribute("value")||""));this.selectedValues=this.multiple?e:[e[0]],this.updateChildrenState()}}render(){return i(l,{key:"30f57283c4f8ee82833217c0281f0df6e6126d26",class:"bds-list-menu",role:this.menuRole,tabIndex:"-1","aria-multiselectable":this.multiple?"true":"false"},i("slot",{key:"3d39f6022a967a57b6d95d889ad5aadd5ba7aa96"}))}get el(){return this}static get style(){return'@charset "UTF-8";:host{display:block}.bds-list-menu{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;max-width:350px}'}},[260,"bds-list-menu",{multiple:[4],menuRole:[1,"menu-role"],selectedValues:[32],getSelectedValues:[64],setSelectedValues:[64]},[[0,"bdsSelect","handleItemClick"]]]),n=h,d=function(){"undefined"!=typeof customElements&&["bds-list-menu"].forEach((t=>{"bds-list-menu"===t&&(customElements.get(a(t))||customElements.define(a(t),h))}))};export{n as BdsListMenu,d as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,M as o,h as t,
|
|
1
|
+
import{p as e,M as o,h as t,a,t as r}from"./index.js";import{a as s,g as i}from"./p-CrAt6pGl.js";import{a as p,d as n}from"./p-B8n1ru5i.js";const l=e(class extends(o(s)){constructor(e){super(!1),!1!==e&&this.__registerHost(),this.floatingOptions={},this.disabled=!1,this.width=320,this.header=!1,this.footer=!1,this.closable=!1,this.isVisible=!1}get options(){return{placement:this.floatingOptions.placement??"bottom",offset:i(this.floatingOptions?.hideArrow,this.floatingOptions?.offset,11),arrow:this.floatingOptions.hideArrow?void 0:this.arrowElement,strategy:"fixed",shift:!0,flip:!0}}get popoverWidth(){return"full"===this.width?"100%":"auto"===this.width?"auto":this.width+"px"}get hooks(){return{onPositionUpdate:e=>this.handlePosition(e),onBeforeShow:()=>!this.disabled,onAfterShow:()=>this.attachClickOutside(),onAfterHide:()=>this.detachClickOutside(),onBeforeLoad:()=>this.attachTrigger(),subscribeToTrigger:e=>this.subscribe(e)}}attachClickOutside(){!1!==this.floatingOptions?.closeOnClickOutside&&(this.boundClickOutside=e=>this.handleClickOutside(e),document.addEventListener("mousedown",this.boundClickOutside))}detachClickOutside(){!1!==this.floatingOptions?.closeOnClickOutside&&null!==this.boundClickOutside&&(document.removeEventListener("mousedown",this.boundClickOutside),this.boundClickOutside=()=>{})}setArrowPosition(e){if(e.middlewareData?.arrow&&!this.disabled&&this.arrowElement?.isConnected){const o=this.floatingOptions.placement,t=e.middlewareData.arrow;let a=t.x||void 0;("top-start"===o||"bottom-start"===o)&&(a=t.x?20:void 0);const r=e.middlewareData.arrow.y;Object.assign(this.arrowElement.style,{left:null!=a?a+"px":"",top:null!=r?r+"px":""})}}handleClickOutside(e){const o=e.target,t=this.listenTarget?.contains(o)||this.trigger?.contains(o)||this.triggerSlot?.contains(o),a=this.floatingContent.contains(o)||this.floatingContent===o;t||a||this.hide()}handleContentClick(e){e.stopPropagation(),this.handleFloatingClick()}handleFloatingClick(){this.floatingOptions.closeOnClick&&this.hide()}handlePosition(e){if(this.floatingContent.setAttribute("data-placement",e.placement),this.setArrowPosition(e),"full"===this.width&&null!=this.triggerSlot){const e=(this.triggerSlot.parentElement??this.triggerSlot).getBoundingClientRect().width,o=this.floatingContent.getBoundingClientRect().width;Math.round(o)!==Math.round(e)&&(this.floatingContent.style.width=e+"px"),this.updatePosition(this.triggerSlot,this.floatingContent,this.options,(e=>{this.floatingContent.setAttribute("data-placement",e.placement),this.setArrowPosition(e)}))}else"auto"===this.width&&(this.floatingContent.style.width="")}attachTrigger(){}subscribe(e){if(void 0===e)return;this.trigger=e,e.setAttribute("part","popover-trigger"),e.setAttribute("ariaDescribedBy","popover-content"),e.setAttribute("aria-haspopup","true"),e.setAttribute("aria-expanded","false");const o=e.closest("bds-button, bds-input, bds-select");if(null!=o){const e=o.querySelector("button, input");this.listenTarget=e??o,this.listenTarget.addEventListener("click",(e=>this.handleShow(e))),this.listenTarget.addEventListener("keydown",(e=>this.handleKeydown(e,(()=>this.showElement()),(()=>this.hideElement()))))}else this.trigger.addEventListener("click",(e=>this.handleShow(e))),this.trigger.addEventListener("keydown",(e=>this.handleKeydown(e,(()=>this.showElement()),(()=>this.hideElement()))))}handleShow(e){e.stopPropagation(),this.toggle()}get canShowArrow(){return!this.floatingOptions.hideArrow||!1}get getPlacement(){return this.floatingOptions.placement||"bottom"}get hasHeaderSlot(){return null!==this.el.querySelector('[slot="header"]')}get hasFooterSlot(){return null!==this.el.querySelector('[slot="footer"]')}disconnectedCallback(){this.listenTarget.removeEventListener("click",(e=>this.handleShow(e))),this.trigger.removeEventListener("click",(e=>this.handleShow(e)))}render(){return t(a,{key:"d9bdf356fc8aa99312073be3589cf50f4bd1afbe",class:"popover",style:{width:this.popoverWidth},popover:"manual",role:"tooltip","data-placement":this.getPlacement,"data-hidearrow":this.canShowArrow,"aria-hidden":this.isVisible?"false":"true",onClick:e=>this.handleContentClick(e),ref:e=>this.floatingContent=e},this.header&&t("div",{key:"a9172eb13620a218c1a37bd52eddaa6f9b53739c",class:"popover-header"},t("div",{key:"3b8774f0f8f461ce164220d53c48139e95a1b8f5",class:"popover-header__content"},t("span",{key:"86cc8cedf2c7970834a61c8374fc23d67417c2dd",class:"popover-header__icon"},t("slot",{key:"1e356d9b87672942ef4d19f33f5de9c707d02cb2",name:"header-icon"})),t("span",{key:"c014a7a269a4cc79841d4350e7e8efc4fc39cb06",class:"popover-header__title"},t("slot",{key:"39ce847785bbad57635834c7957146b89245438e",name:"header-title"}))),this.closable&&t("bds-button",{key:"a54358b74d8d29f5afeaa9f6fe1f07343f6784c6",class:"popover-header__close",size:p.SMALL,onBdsClick:()=>this.hide()},t("em",{key:"efdca5b8e1f0560a15e063e832f1aeb9c754a820",slot:"icon",class:"bds-icon-close"}))),this.canShowArrow&&t("div",{key:"16870352c06b06de9b67e542e9e1753c7e3bff66",class:"popover-arrow",part:"arrow",ref:e=>this.arrowElement=e}),t("div",{key:"b5dddeeedcc5ba9d107af57a25d9ca350a0621a8",class:"popover-content",tabIndex:-1,part:"popover-content"},t("slot",{key:"4bfc174186ab356747175464922c0d6b09d6b608"})),this.footer&&t("div",{key:"8476df1ee6751d6cba4cc52efad6675ea74bdc18",class:"popover-footer",onClick:e=>e.stopPropagation()},t("slot",{key:"de60d356d96ae56c8e0a1349f6bafa87700998c6",name:"footer-helper"}),t("slot",{key:"21e59115a077f31b7b05aeea29cd23394642dd4d",name:"footer-button"})))}get el(){return this}static get style(){return'@charset "UTF-8";:root{--popover-arrow-size:var(--boreal-spacing-s);--popover-width:320px}.popover{position:fixed;margin:0;overflow:visible;border-radius:var(--boreal-radius-xs2);font-size:var(--boreal-typography-font-size-xs);line-height:var(--boreal-typography-line-height-xs);font-family:var(--boreal-typography-font-family-primary);font-weight:var(--boreal-typography-font-weight-regular);background:var(--boreal-ui-inverse);-webkit-filter:drop-shadow(0px 2px 8px rgba(0, 0, 0, 0.15));filter:drop-shadow(0px 2px 8px rgba(0, 0, 0, 0.15));-webkit-box-shadow:none;box-shadow:none;-webkit-box-sizing:border-box;box-sizing:border-box;border:transparent;cursor:auto}.popover-content{position:relative;padding:var(--boreal-spacing-s)}.popover[popover]:not(:popover-open){display:none}.popover-header{border-bottom:var(--boreal-stroke-default-light) solid 1px;padding:var(--boreal-spacing-m) var(--boreal-spacing-xs) var(--boreal-spacing-m) var(--boreal-spacing-s);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between}.popover-header__content{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.popover-header__title{font-size:var(--boreal-typography-font-size-sm);font-weight:var(--boreal-typography-font-weight-semibold);line-height:var(--boreal-typography-line-height-sm)}.popover-header__icon{font-size:var(--boreal-typography-font-size-md);margin-right:var(--boreal-spacing-3xs)}.popover-header__close{margin-left:var(--boreal-spacing-s)}.popover-header__close .bds-button{margin:0;padding:0;width:var(--boreal-spacing-ml);height:var(--boreal-spacing-ml)}.popover-header__close .bds-button__content{width:var(--boreal-spacing-ml);height:var(--boreal-spacing-ml)}.popover-header__close em{font-size:var(--boreal-typography-font-size-xs)}.popover-footer{border-top:var(--boreal-stroke-default-light) solid 1px;padding:var(--boreal-spacing-s) var(--boreal-spacing-xs) var(--boreal-spacing-s) var(--boreal-spacing-s);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between}.popover .popover-arrow{position:absolute;width:var(--popover-arrow-size);height:var(--popover-arrow-size);pointer-events:none}.popover .popover-arrow::before{content:"";position:absolute;width:var(--popover-arrow-size);height:var(--popover-arrow-size);background:var(--boreal-ui-inverse);-webkit-transform:rotate(45deg);transform:rotate(45deg);inset:0}.popover[data-placement^=top] .popover-arrow{bottom:calc(var(--popover-arrow-size) / -2)}.popover[data-placement^=top] .popover-arrow::before{bottom:0}.popover[data-placement^=bottom] .popover-arrow{top:calc(var(--popover-arrow-size) / -2)}.popover[data-placement^=bottom] .popover-arrow::before{bottom:0}.popover[data-placement^=left] .popover-arrow{right:calc(var(--popover-arrow-size) / -2)}.popover[data-placement^=left] .popover-arrow::before{left:0}.popover[data-placement^=right] .popover-arrow{left:calc(var(--popover-arrow-size) / -2)}.popover[data-placement^=right] .popover-arrow::before{left:0}'}},[772,"bds-popover",{floatingOptions:[16],disabled:[4],width:[8],header:[4],footer:[4],closable:[4],isVisible:[32]}]),h=l,d=function(){"undefined"!=typeof customElements&&["bds-popover","bds-button"].forEach((e=>{switch(e){case"bds-popover":customElements.get(r(e))||customElements.define(r(e),l);break;case"bds-button":customElements.get(r(e))||n()}}))};export{h as BdsPopover,d as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as
|
|
1
|
+
import{p as e,H as t,h as r,a,t as s}from"./index.js";import{v as o}from"./p-kGnB15Lz.js";const i={SMALL:"sm",MEDIUM:"md",LARGE:"lg"},n=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.size=i.SMALL,this.label="Loading"}checkPropValues(){o(Object.values(i),i.SMALL,this.el,"size")}componentWillLoad(){this.checkPropValues()}get getClassMap(){return{"bds-spinner":!0,"bds-spinner--small":this.size===i.SMALL,"bds-spinner--medium":this.size===i.MEDIUM,"bds-spinner--large":this.size===i.LARGE}}render(){return r(a,{key:"d114eb6445b81a4e7beafd0ff08b8aaf6e1a96e7",class:this.getClassMap,role:"status","aria-label":this.label,"aria-live":"polite","aria-busy":"true"},r("span",{key:"fa45675b2e258eca9c44a9374a65f26c781343d5",class:"bds-spinner__sr-only"},this.label))}get el(){return this}static get watchers(){return{size:[{checkPropValues:0}]}}static get style(){return'@charset "UTF-8";bds-spinner{display:inline-block;position:relative;width:1em;height:1em}bds-spinner::before,bds-spinner::after{content:"";position:absolute;border-color:transparent transparent var(--boreal-primary-base) transparent;border-radius:50%;border-width:3px;border-style:solid;top:0;left:0;width:100%;height:100%;-webkit-box-sizing:border-box;box-sizing:border-box}bds-spinner::before{opacity:0.2;border-style:dashed;-webkit-animation:spin 0.8s linear infinite;animation:spin 0.8s linear infinite}bds-spinner::after{-webkit-animation:draw-arc 0.8s linear infinite;animation:draw-arc 0.8s linear infinite}.bds-spinner--small{width:var(--boreal-layout-m);height:var(--boreal-layout-m)}.bds-spinner--medium{width:var(--boreal-layout-ml);height:var(--boreal-layout-ml)}.bds-spinner--large{width:var(--boreal-layout-xl);height:var(--boreal-layout-xl)}.bds-spinner__sr-only{position:absolute;width:1px;height:1px;padding:0;margin:0;overflow:hidden;clip:rect(0, 0, 0, 0);-webkit-clip-path:inset(50%);clip-path:inset(50%);white-space:nowrap;border:0}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes draw-arc{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}60%{-webkit-transform:rotate(330deg);transform:rotate(330deg)}65%{-webkit-transform:rotate(335deg);transform:rotate(335deg)}90%{-webkit-transform:rotate(350deg);transform:rotate(350deg)}95%{-webkit-transform:rotate(355deg);transform:rotate(355deg)}98%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes draw-arc{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}60%{-webkit-transform:rotate(330deg);transform:rotate(330deg)}65%{-webkit-transform:rotate(335deg);transform:rotate(335deg)}90%{-webkit-transform:rotate(350deg);transform:rotate(350deg)}95%{-webkit-transform:rotate(355deg);transform:rotate(355deg)}98%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}'}},[0,"bds-spinner",{size:[1],label:[1]},void 0,{size:[{checkPropValues:0}]}]),d=n,b=function(){"undefined"!=typeof customElements&&["bds-spinner"].forEach((e=>{"bds-spinner"===e&&(customElements.get(s(e))||customElements.define(s(e),n))}))};export{d as BdsSpinner,b as defineCustomElement}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../dist/types/components";
|
|
2
|
+
|
|
3
|
+
interface BdsStatus extends Components.BdsStatus, HTMLElement {}
|
|
4
|
+
export const BdsStatus: {
|
|
5
|
+
prototype: BdsStatus;
|
|
6
|
+
new (): BdsStatus;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as a,H as s,h as t,a as e,t as r}from"./index.js";import{P as o}from"./p-Bfazyxqi.js";import{v as l}from"./p-kGnB15Lz.js";const n={NONE:"none",DOT:"dot",ICON:"icon"},i=a(class extends s{constructor(a){super(),!1!==a&&this.__registerHost(),this.state=o.NEUTRAL,this.indicator=n.NONE}checkPropValues(){l(Object.values(o),o.NEUTRAL,this.el,"state"),l(Object.values(n),n.NONE,this.el,"indicator")}componentWillLoad(){this.checkPropValues()}get classMap(){return{"bds-status":!0,["bds-status--"+this.state]:!0,["bds-status--"+this.indicator]:!0}}render(){return t(e,{key:"36cf2dfe777002b02d126d38cb9ed2bce3f828a6",class:this.classMap,role:"status"},this.indicator===n.DOT?t("div",{class:"bds-status__dot","aria-hidden":"true"}):"",t("slot",{key:"99ab1fa89dc28f3ffca617508b5c577abf874d7a",name:"icon"}),t("slot",{key:"8ff726d294fc524950ac0255c71f4ba65b3c9b96"}))}get el(){return this}static get watchers(){return{state:[{checkPropValues:0}],indicator:[{checkPropValues:0}]}}static get style(){return'@charset "UTF-8";.bds-status{color:var(--boreal-text-default-ink);text-align:center;font-family:var(--boreal-typography-font-family-primary);font-size:var(--boreal-typography-font-size-xs);font-style:normal;font-weight:var(--boreal-typography-font-weight-semibold);line-height:var(--boreal-typography-line-height-xs);display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;gap:var(--boreal-spacing-3xs);padding:var(--boreal-spacing-3xs) var(--boreal-spacing-xs);min-height:var(--boreal-spacing-ml);border-radius:var(--boreal-radius-xs)}.bds-status>[slot=icon]{display:none}.bds-status--icon>[slot=icon]{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:var(--boreal-layout-s);height:var(--boreal-layout-s)}.bds-status__dot{background-color:var(--boreal-icon-default-light);width:var(--boreal-spacing-xs);height:var(--boreal-spacing-xs);border-radius:var(--boreal-radius-full)}.bds-status--neutral{color:var(--boreal-text-default-ink);background-color:var(--boreal-ui-default-lighter)}.bds-status--neutral>.bds-status__dot{background-color:var(--boreal-icon-default-lighter)}.bds-status--neutral>[slot=icon]{color:var(--boreal-icon-default-lighter)}.bds-status--neutral>.bds-status__dot{background-color:var(--boreal-icon-default-light)}.bds-status--pending{color:var(--boreal-text-warning-dark);background-color:var(--boreal-ui-warning-lighter)}.bds-status--pending>.bds-status__dot{background-color:var(--boreal-icon-warning-base)}.bds-status--pending>[slot=icon]{color:var(--boreal-icon-warning-base)}.bds-status--in-progress{color:var(--boreal-text-information-dark);background-color:var(--boreal-ui-info-lighter)}.bds-status--in-progress>.bds-status__dot{background-color:var(--boreal-icon-info-base)}.bds-status--in-progress>[slot=icon]{color:var(--boreal-icon-info-base)}.bds-status--complete{color:var(--boreal-text-success-dark);background-color:var(--boreal-ui-success-lighter)}.bds-status--complete>.bds-status__dot{background-color:var(--boreal-icon-success-base)}.bds-status--complete>[slot=icon]{color:var(--boreal-icon-success-base)}.bds-status--cancel{color:var(--boreal-text-danger-dark);background-color:var(--boreal-ui-danger-lighter)}.bds-status--cancel>.bds-status__dot{background-color:var(--boreal-icon-danger-base)}.bds-status--cancel>[slot=icon]{color:var(--boreal-icon-danger-base)}'}},[260,"bds-status",{state:[1],indicator:[1]},void 0,{state:[{checkPropValues:0}],indicator:[{checkPropValues:0}]}]),c=i,d=function(){"undefined"!=typeof customElements&&["bds-status"].forEach((a=>{"bds-status"===a&&(customElements.get(r(a))||customElements.define(r(a),i))}))};export{c as BdsStatus,d as defineCustomElement}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../dist/types/components";
|
|
2
|
+
|
|
3
|
+
interface BdsTag extends Components.BdsTag, HTMLElement {}
|
|
4
|
+
export const BdsTag: {
|
|
5
|
+
prototype: BdsTag;
|
|
6
|
+
new (): BdsTag;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as e,H as a,c as o,h as t,F as r,a as s,t as l}from"./index.js";import{c as d}from"./p-DhSchGPI.js";import{v as b}from"./p-kGnB15Lz.js";const i={GRAY:"gray",CYAN:"cyan",TEAL:"teal",LIME:"lime",ORANGE:"orange",COBALT:"cobalt",ROSE:"rose",PURPLE:"purple"},n=e(class extends a{constructor(e){super(),!1!==e&&this.__registerHost(),this.bdsClose=o(this,"bdsClose"),this.bdsSelect=o(this,"bdsSelect"),this._id=d("bds-tag"),this.internalSelected=!1,this.multiselect=!1,this.selected=!1,this.closeButtonLabel="Close tag",this.color=i.GRAY,this.readonly=!1,this.disabled=!1,this.handleClose=e=>{this.disabled||(void 0!==e&&(e.preventDefault(),e.stopPropagation()),this.bdsClose.emit({id:this._id,selected:this.internalSelected,el:this.el}))},this.handleKeyDown=e=>{this.disabled||(this.readonly||!["Delete","Backspace"].includes(e.key)?[" ","Enter"].includes(e.key)&&e.target===this.el&&(e.preventDefault(),this.handleSelection()):this.handleClose(e))},this.handleSelection=()=>{this.disabled||this.multiselect&&(this.internalSelected=!this.internalSelected,this.bdsSelect.emit({id:this._id,selected:this.internalSelected,el:this.el}))}}componentWillLoad(){this.syncSelectedFromProp(this.selected),this.checkPropValues(),this.validateMultiselectRole()}checkPropValues(){b(Object.values(i),i.GRAY,this.el,"color")}syncSelectedFromProp(e){this.internalSelected=e}validateMultiselectRole(){this.multiselect&&null===this.el.closest('[role="listbox"], [role="group"], bds-tag-group')&&console.warn('[BorealDS Tag] Missing required ARIA parent. Expected role="listbox", role="group", or <bds-tag-group> when multiselect=true.')}getClasses(){return{"bds-tag":!0,["bds-tag--"+this.color]:!0,"bds-tag--disabled":this.disabled,"bds-tag--selected":this.internalSelected}}renderTag(){return t(r,null,t("span",{"aria-hidden":"true",class:"bds-tag__icon"},t("slot",{name:"icon"})),t("span",{class:"bds-tag__text"},t("slot",null)))}renderCloseIcon(){return t("button",{class:"bds-tag__close-button","aria-label":this.closeButtonLabel,onClick:e=>this.handleClose(e),disabled:this.disabled,type:"button"},t("em",{class:"bds-icon-close","aria-hidden":"true"}))}render(){const e=this.getClasses(),a=!this.readonly,o=this.multiselect;return t(s,{key:"0864f3764aef3354e5b2c7494a5c9c2cb261582f",class:e,role:o?"option":void 0,tabIndex:o&&!this.disabled?0:-1,"aria-disabled":this.disabled?"true":void 0,"aria-selected":o?""+this.internalSelected:void 0,onKeyDown:this.disabled?void 0:e=>this.handleKeyDown(e),onClick:this.disabled?void 0:this.handleSelection,id:this._id},this.renderTag(),a&&this.renderCloseIcon())}get el(){return this}static get watchers(){return{color:[{checkPropValues:0}],selected:[{syncSelectedFromProp:0}]}}static get style(){return'@charset "UTF-8";.bds-tag{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;vertical-align:middle;gap:var(--boreal-spacing-3xs);padding:var(--boreal-spacing-3xs) var(--boreal-spacing-3xs) var(--boreal-spacing-3xs) var(--boreal-spacing-2xs);border-radius:var(--boreal-radius-m);cursor:default;max-width:100%;min-width:0;font-family:var(--boreal-typography-font-family-primary);font-size:var(--boreal-typography-font-size-xs);font-weight:var(--boreal-typography-font-weight-semibold);line-height:var(--boreal-typography-line-height-xs)}.bds-tag:hover:not(.bds-tag--selected):not(.bds-tag--disabled){-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-tag:focus:not(.bds-tag--selected){outline:none;-webkit-box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus);box-shadow:0 0 0 1px var(--boreal-ui-inverse), 0 0 0 3px var(--boreal-stroke-focus)}.bds-tag--selected{outline:none;-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-tag__icon{font-size:var(--boreal-typography-font-size-md);max-height:var(--boreal-spacing-m)}.bds-tag__icon:empty{display:none}.bds-tag__text{margin-right:var(--boreal-spacing-2xs);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.bds-tag__close-button{display:-ms-flexbox;display:flex;padding:var(--boreal-spacing-3xs);width:var(--boreal-spacing-s);height:var(--boreal-spacing-s);-webkit-box-sizing:content-box;box-sizing:content-box;border-radius:var(--boreal-radius-full);border:0px solid transparent;background-color:transparent;opacity:0.5;cursor:pointer}.bds-tag__close-button:hover{-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);background-color:var(--boreal-ui-inverse);opacity:0.5}.bds-tag__close-button:focus{background-color:var(--boreal-ui-inverse);opacity:0.5;outline:none;-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-tag__close-button:active{background-color:var(--boreal-ui-inverse);opacity:0.5;-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, 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, 0 1px 2px 0 rgba(19, 19, 22, 0.15) inset}.bds-tag--disabled{cursor:not-allowed}.bds-tag--disabled .bds-tag__close-button{pointer-events:none}.bds-tag--gray{background-color:var(--boreal-extended-onyx-light);color:var(--boreal-extended-onyx-dark)}.bds-tag--gray .bds-tag__close-button{color:var(--boreal-extended-onyx-dark)}.bds-tag--gray.bds-tag--disabled{color:var(--boreal-extended-onyx-base);background-color:var(--boreal-extended-onyx-lighter)}.bds-tag--gray.bds-tag--disabled .bds-tag__close-button{color:var(--boreal-extended-onyx-base)}.bds-tag--purple{background-color:var(--boreal-extended-purple-light);color:var(--boreal-extended-purple-dark)}.bds-tag--purple .bds-tag__close-button{color:var(--boreal-extended-purple-dark)}.bds-tag--purple.bds-tag--disabled{color:var(--boreal-extended-purple-light);background-color:var(--boreal-extended-purple-lighter)}.bds-tag--purple.bds-tag--disabled .bds-tag__close-button{color:var(--boreal-extended-purple-light)}.bds-tag--rose{background-color:var(--boreal-extended-rose-light);color:var(--boreal-extended-rose-dark)}.bds-tag--rose .bds-tag__close-button{color:var(--boreal-extended-rose-dark)}.bds-tag--rose.bds-tag--disabled{color:var(--boreal-extended-rose-light);background-color:var(--boreal-extended-rose-lighter)}.bds-tag--rose.bds-tag--disabled .bds-tag__close-button{color:var(--boreal-extended-rose-light)}.bds-tag--lime{background-color:var(--boreal-extended-lime-light);color:var(--boreal-extended-lime-dark)}.bds-tag--lime .bds-tag__close-button{color:var(--boreal-extended-lime-dark)}.bds-tag--lime.bds-tag--disabled{color:var(--boreal-extended-lime-light);background-color:var(--boreal-extended-lime-lighter)}.bds-tag--lime.bds-tag--disabled .bds-tag__close-button{color:var(--boreal-extended-lime-light)}.bds-tag--cobalt{background-color:var(--boreal-extended-cobalt-light);color:var(--boreal-extended-cobalt-dark)}.bds-tag--cobalt .bds-tag__close-button{color:var(--boreal-extended-cobalt-dark)}.bds-tag--cobalt.bds-tag--disabled{color:var(--boreal-extended-cobalt-light);background-color:var(--boreal-extended-cobalt-lighter)}.bds-tag--cobalt.bds-tag--disabled .bds-tag__close-button{color:var(--boreal-extended-cobalt-light)}.bds-tag--orange{background-color:var(--boreal-extended-orange-light);color:var(--boreal-extended-orange-dark)}.bds-tag--orange .bds-tag__close-button{color:var(--boreal-extended-orange-dark)}.bds-tag--orange.bds-tag--disabled{color:var(--boreal-extended-orange-light);background-color:var(--boreal-extended-orange-lighter)}.bds-tag--orange.bds-tag--disabled .bds-tag__close-button{color:var(--boreal-extended-orange-light)}.bds-tag--teal{background-color:var(--boreal-extended-teal-light);color:var(--boreal-extended-teal-dark)}.bds-tag--teal .bds-tag__close-button{color:var(--boreal-extended-teal-dark)}.bds-tag--teal.bds-tag--disabled{color:var(--boreal-extended-teal-light);background-color:var(--boreal-extended-teal-lighter)}.bds-tag--teal.bds-tag--disabled .bds-tag__close-button{color:var(--boreal-extended-teal-light)}.bds-tag--cyan{background-color:var(--boreal-extended-cyan-light);color:var(--boreal-extended-cyan-dark)}.bds-tag--cyan .bds-tag__close-button{color:var(--boreal-extended-cyan-dark)}.bds-tag--cyan.bds-tag--disabled{color:var(--boreal-extended-cyan-light);background-color:var(--boreal-extended-cyan-lighter)}.bds-tag--cyan.bds-tag--disabled .bds-tag__close-button{color:var(--boreal-extended-cyan-light)}'}},[260,"bds-tag",{multiselect:[4],selected:[4],closeButtonLabel:[1,"close-button-label"],color:[1],readonly:[4],disabled:[4],internalSelected:[32]},void 0,{color:[{checkPropValues:0}],selected:[{syncSelectedFromProp:0}]}]),c=n,g=function(){"undefined"!=typeof customElements&&["bds-tag"].forEach((e=>{"bds-tag"===e&&(customElements.get(l(e))||customElements.define(l(e),n))}))};export{c as BdsTag,g as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,M as t,c as s,h as i,H as a,t as o}from"./index.js";import{f as l,s as r,r as d}from"./p-D5omSME4.js";import{v as n}from"./p-vfAIdwy0.js";import{d as h}from"./p-BYEAJCas.js";import{d as b}from"./p-BSpJ_e9f.js";const c={TEXT:"text",PASSWORD:"password"},f={OUTLINE:"outline",PLAIN:"plain"},x={BLUR:"blur",CHANGE:"change",INPUT:"input",SUBMIT:"submit"},p=e(class extends(t(l)){constructor(e){super(!1),!1!==e&&this.__registerHost(),this.valueChange=s(this,"valueChange"),this.bdsInput=s(this,"bdsInput"),this.bdsChange=s(this,"bdsChange"),this.bdsFocus=s(this,"bdsFocus"),this.bdsBlur=s(this,"bdsBlur"),this.bdsClear=s(this,"bdsClear"),this.bdsValidationChange=s(this,"bdsValidationChange"),this.internals=this.attachInternals(),this.name="",this.disabled=!1,this.required=!1,this.isDisabled=!1,this.value="",this.error=!1,this.errorMessage="",this.customValidators=[],this.validationTiming=x.BLUR,this.type=c.TEXT,this.variant=f.OUTLINE,this.placeholder="",this.readOnly=!1,this.autocomplete="off",this.pattern="",this.minLength=0,this.maxLength=0,this.label="",this.sublabel="",this.icon="",this.helperText="",this.info="",this.clearable=!1,this.clearOnHover=!1,this.charCount=0,this.counter=!1,this.customWidth="",this.focused=!1,this.showPassword=!1,this.touched=!1,this.dirty=!1,this.currentCharCount=0,this.validationError=!1,this.validationMessage="",this._valueAtFocus="",this._id=function(e="bds"){return`${e}-${Math.random().toString(36).substr(2,9)}`}("bds-text-field"),this.invalidHandler=e=>{e.preventDefault(),this.validationError=!0,this.validationMessage=this.internals.validationMessage,this.bdsValidationChange.emit({valid:!1,validity:this.internals.validity,value:this.value,touched:this.touched,dirty:this.dirty})}}async checkValidity(){return this.internals.checkValidity()}async reportValidity(){return this.internals.reportValidity()}onDisabledChange(e){this.isDisabled=e}checkPropValues(){n(Object.values(c),c.TEXT,this.el,"type"),n(Object.values(f),f.OUTLINE,this.el,"variant"),n(Object.values(x),x.BLUR,this.el,"validationTiming")}componentWillLoad(){this.checkPropValues(),this.isDisabled=this.disabled,this.currentCharCount=this.value.length}componentDidLoad(){this.el.addEventListener("invalid",this.invalidHandler)}disconnectedCallback(){this.el.removeEventListener("invalid",this.invalidHandler)}onCustomValidatorsChange(){this.updateValidity()}onValueChange(e){r(this.internals,e),this.currentCharCount=e.length,this.updateValidity(),this.valueChange.emit(e)}formAssociatedCallback(){r(this.internals,this.value),this.updateValidity()}formResetCallback(){this.value="",this.touched=!1,this.dirty=!1,this.currentCharCount=0,this.validationError=!1,this.validationMessage="",r(this.internals,null),this.updateValidity()}formStateRestoreCallback(e,t){this.value="string"==typeof e?e:"",r(this.internals,this.value),this.updateValidity()}updateValidity(e=!1){const t=d(this.internals,[...this.validators,...this.customValidators],this.el);e&&(this.validationError=!t,this.validationMessage=t?"":this.internals.validationMessage,this.bdsValidationChange.emit({valid:t,validity:this.internals.validity,value:this.value,touched:this.touched,dirty:this.dirty}))}handleInput(e){this.value=e.target.value,this.dirty=!0,this.bdsInput.emit({value:this.value,event:e}),this.validationTiming===x.INPUT&&this.updateValidity(!0)}handleChange(e){this.bdsChange.emit({value:this.value,event:e}),this.validationTiming===x.CHANGE&&this.updateValidity(!0)}handleFocus(e){this.focused=!0,this._valueAtFocus=this.value,this.bdsFocus.emit({event:e})}handleBlur(e){this.focused=!1,this.touched=!0,this.bdsBlur.emit({event:e}),(this.validationTiming===x.BLUR||this.validationTiming===x.CHANGE&&this.value!==this._valueAtFocus)&&this.updateValidity(!0)}handleShowPassword(){this.showPassword=!this.showPassword}handleClear(){this.value="",this.dirty=!0,this.validationError=!1,this.validationMessage="",this.bdsClear.emit(),this.el.querySelector("input")?.focus()}handleMouseDown(e){this.readOnly&&e.preventDefault()}get validators(){return[{key:"valueMissing",isValid:()=>!this.required||""!==this.value,message:"This field is required. Please fill it out."},{key:"tooShort",isValid:()=>0===this.minLength||this.value.length>=this.minLength,message:`Please enter at least ${this.minLength} characters.`},{key:"patternMismatch",isValid:()=>{if(""===this.pattern||""===this.value)return!0;try{return RegExp(this.pattern).test(this.value)}catch{return!0}},message:"Please match the requested format."}]}get effectiveMaxLength(){return 0!==this.maxLength?this.maxLength:this.counter&&this.charCount>0?this.charCount:void 0}get classMap(){return{"bds-text-field":!0,"bds-text-field--error":this.error||this.validationError,"bds-text-field--disabled":this.isDisabled,"bds-text-field--focused":this.focused,"bds-text-field--readonly":this.readOnly,"bds-text-field--plain":this.variant===f.PLAIN,"bds-text-field--clear-on-hover":this.clearOnHover}}get hostStyle(){return""!==this.customWidth?{"--bds-text-field-width":this.customWidth}:void 0}get iconClear(){return this.clearable||this.clearOnHover?"bds-icon-close":""}get showPasswordIcon(){return this.showPassword?"bds-icon-sight-on":"bds-icon-sight-off"}render(){const e=this._id+"-label",t=this._id+"-helper",s=(this.clearable||this.clearOnHover)&&""!==this.value&&!this.isDisabled&&!this.readOnly,o=this.error&&""!==this.errorMessage?this.errorMessage:this.validationError&&""!==this.validationMessage?this.validationMessage:this.helperText,l=""!==o||this.counter&&this.charCount>0,r=this.isDisabled?"disabled":this.error||this.validationError?"error":"default";return i(a,{key:"8fcf734b92dfa2ad75a32bef27efea78bd61dd63",class:this.classMap,style:this.hostStyle,tabIndex:-1,onFocus:()=>!this.readOnly&&this.el.querySelector("input")?.focus()},""!==this.label&&i("bds-typography",{key:"d50b6407278dd93b52fbbdbbc5e999a1185d4649",id:e,variant:"label",htmlFor:this._id,isRequired:this.required,tooltipText:""!==this.info?this.info:void 0,state:r},this.label),i("div",{key:"89dc5c7830197786e7dc67b87f64a0b63c8a8c84",class:"bds-text-field__container"},(""!==this.icon||""!==this.sublabel)&&i("span",{key:"a4139e0ce3b3d37bb33d55b5811e439974ed9d53",class:"bds-text-field__sublabel"},""!==this.icon&&i("em",{key:"5fc8f5a49b348fe07c63242243274946e21aa782",class:this.icon}),this.sublabel),i("slot",{key:"a8f62dba555a26aba3b1105402f0afca1378c83a",name:"prefix"}),i("input",{key:"ba2161c8d56c42847c7006d1742a2b60613f4628",id:this._id,class:"bds-text-field__control","aria-labelledby":""!==this.label?e:void 0,"aria-describedby":l&&""!==o?t:void 0,"aria-invalid":this.error||this.validationError?"true":void 0,"aria-required":this.required?"true":void 0,type:this.type===c.PASSWORD&&this.showPassword?c.TEXT:this.type,value:this.value,disabled:this.isDisabled,readOnly:this.readOnly,tabIndex:this.readOnly?-1:void 0,placeholder:this.placeholder,autocomplete:this.autocomplete,pattern:""!==this.pattern?this.pattern:void 0,minLength:0!==this.minLength?this.minLength:void 0,maxLength:this.effectiveMaxLength,onMouseDown:e=>this.handleMouseDown(e),onInput:e=>this.handleInput(e),onChange:e=>this.handleChange(e),onFocus:e=>this.handleFocus(e),onBlur:e=>this.handleBlur(e)}),(s||this.type===c.PASSWORD)&&i("div",{key:"c9ae74b2be87e2759d60ad69c9c91b95bc199163",class:"bds-text-field__actions"},s&&i("button",{key:"d94534386505f9c54aabe892aec58d81b6a0ea94",class:"bds-text-field__action bds-text-field__action--clear",type:"button","aria-label":"Clear",onClick:()=>this.handleClear()},i("em",{key:"7899ffad5be71b731ae8ead1d5601e3fc6b5f6a5",class:this.iconClear})),this.type===c.PASSWORD&&i("button",{key:"612aff7de193d9f61b955e686484c13baca3ff57",class:"bds-text-field__action bds-text-field__action--password",type:"button","aria-label":this.showPassword?"Hide password":"Show password",onClick:()=>this.handleShowPassword()},i("em",{key:"e886085b840a351a7455a1adb685996835e47118",class:this.showPasswordIcon})))),l&&i("div",{key:"9b47bbaff802d0c4125e45c87f1e7366418dfdcc",class:"bds-text-field__footer"},""!==o&&i("bds-typography",{key:"64265da85a16152af33b3f94c05e4d8562dc26df",id:t,variant:"helper",state:r},o),this.counter&&this.charCount>0&&i("span",{key:"2a264545ba46b8d6908adabe729a1256334535ef",class:"bds-text-field__char-count"},this.currentCharCount,"/",this.charCount)))}static get formAssociated(){return!0}get el(){return this}static get watchers(){return{disabled:[{onDisabledChange:0}],type:[{checkPropValues:0}],variant:[{checkPropValues:0}],validationTiming:[{checkPropValues:0}],customValidators:[{onCustomValidatorsChange:0}],value:[{onValueChange:0}]}}static get style(){return'@charset "UTF-8";.bds-text-field__container,.bds-text-field__sublabel,.bds-text-field__actions,.bds-text-field__action,.bds-text-field__footer{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.bds-text-field [slot=prefix],.bds-text-field__sublabel{font-size:var(--boreal-typography-font-size-xs);font-weight:var(--boreal-typography-font-weight-semibold);line-height:var(--boreal-typography-line-height-xs)}.bds-text-field{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--boreal-spacing-2xs);width:var(--bds-text-field-width, 100%);font-family:var(--boreal-typography-font-family-primary);color:var(--boreal-text-default)}.bds-text-field__container{padding:var(--boreal-spacing-1xs);padding-left:0;height:var(--boreal-layout-l);border:1px solid var(--boreal-stroke-default-light);border-radius:var(--boreal-radius-xs);background-color:var(--boreal-ui-inverse);-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;overflow:hidden}.bds-text-field__sublabel{gap:var(--boreal-spacing-3xs);padding-left:var(--boreal-spacing-xs);white-space:nowrap}.bds-text-field__sublabel em[class^=bds-icon-],.bds-text-field__sublabel em[class*=" bds-icon-"]{width:var(--boreal-icons-m);height:var(--boreal-icons-m);font-size:var(--boreal-typography-font-size-md);line-height:1;-ms-flex-negative:0;flex-shrink:0;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.bds-text-field [slot=prefix]{padding-left:var(--boreal-spacing-xs);overflow:hidden;white-space:nowrap;-ms-flex-negative:0;flex-shrink:0}.bds-text-field__control{min-width:0;width:100%;border:none;outline:none;background:transparent;padding:0;padding-left:var(--boreal-spacing-xs);font-size:var(--boreal-typography-font-size-sm);font-weight:var(--boreal-typography-font-weight-regular);line-height:var(--boreal-typography-line-height-sm)}.bds-text-field__control::-webkit-input-placeholder{color:var(--boreal-text-default-light)}.bds-text-field__control::-moz-placeholder{color:var(--boreal-text-default-light)}.bds-text-field__control:-ms-input-placeholder{color:var(--boreal-text-default-light)}.bds-text-field__control::-ms-input-placeholder{color:var(--boreal-text-default-light)}.bds-text-field__control::placeholder{color:var(--boreal-text-default-light)}.bds-text-field__control:disabled{cursor:not-allowed}.bds-text-field__actions{padding-left:var(--boreal-spacing-xs);gap:var(--boreal-spacing-3xs)}.bds-text-field__action{-ms-flex-pack:center;justify-content:center;background:none;border:none;padding:var(--boreal-spacing-3xs);cursor:pointer;color:var(--boreal-icon-default-light);line-height:1;-webkit-transition:color 0.3s ease, opacity 0.3s ease;transition:color 0.3s ease, opacity 0.3s ease}.bds-text-field__action--clear em[class^=bds-icon-],.bds-text-field__action--clear em[class*=" bds-icon-"]{width:var(--boreal-icons-s);height:var(--boreal-icons-s);font-size:var(--boreal-typography-font-size-xs);line-height:1;-ms-flex-negative:0;flex-shrink:0;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.bds-text-field__action--password em[class^=bds-icon-],.bds-text-field__action--password em[class*=" bds-icon-"]{width:var(--boreal-icons-l);height:var(--boreal-icons-l);font-size:var(--boreal-typography-font-size-lg);line-height:1;-ms-flex-negative:0;flex-shrink:0;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.bds-text-field__action:hover{color:var(--boreal-icon-default-dark)}.bds-text-field__action:focus-visible{-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-text-field__footer{-ms-flex-pack:justify;justify-content:space-between}.bds-text-field__char-count{-ms-flex-negative:0;flex-shrink:0;font-size:var(--boreal-typography-font-size-xs);font-weight:var(--boreal-typography-font-weight-regular);line-height:var(--boreal-typography-line-height-xs);color:var(--boreal-text-default-light)}.bds-text-field--focused .bds-text-field__container{border-color:var(--boreal-stroke-focus);-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-text-field--error .bds-text-field__container{border-color:var(--boreal-stroke-danger-base)}.bds-text-field--disabled{cursor:not-allowed}.bds-text-field--disabled .bds-text-field__container{background-color:var(--boreal-ui-default-lighter);border-color:var(--boreal-stroke-default-light)}.bds-text-field--disabled .bds-text-field__sublabel{color:var(--boreal-text-disabled)}.bds-text-field--disabled .bds-text-field__sublabel em[class^=bds-icon-],.bds-text-field--disabled .bds-text-field__sublabel em[class*=" bds-icon-"]{color:var(--boreal-icon-disabled)}.bds-text-field--disabled .bds-text-field__control{color:var(--boreal-icon-disabled)}.bds-text-field--readonly .bds-text-field__container{background-color:transparent;border:none}.bds-text-field--readonly .bds-text-field__control::-webkit-input-placeholder{color:var(--boreal-text-default-darker)}.bds-text-field--readonly .bds-text-field__control::-moz-placeholder{color:var(--boreal-text-default-darker)}.bds-text-field--readonly .bds-text-field__control:-ms-input-placeholder{color:var(--boreal-text-default-darker)}.bds-text-field--readonly .bds-text-field__control::-ms-input-placeholder{color:var(--boreal-text-default-darker)}.bds-text-field--readonly .bds-text-field__control::placeholder{color:var(--boreal-text-default-darker)}.bds-text-field--plain .bds-text-field__container{border-color:transparent}.bds-text-field--plain.bds-text-field--focused .bds-text-field__container{border-color:var(--boreal-stroke-focus)}.bds-text-field--clear-on-hover .bds-text-field__action--clear{opacity:0;pointer-events:none}.bds-text-field--clear-on-hover:hover .bds-text-field__action--clear{opacity:1;pointer-events:auto}'}},[836,"bds-text-field",{name:[513],disabled:[516],required:[516],value:[1537],error:[516],errorMessage:[1,"error-message"],customValidators:[16],validationTiming:[1,"validation-timing"],type:[513],variant:[513],placeholder:[1],readOnly:[4,"readonly"],autocomplete:[1],pattern:[1],minLength:[2,"min-length"],maxLength:[2,"max-length"],label:[1],sublabel:[1],icon:[1],helperText:[1,"helper-text"],info:[1],clearable:[4],clearOnHover:[4,"clear-on-hover"],charCount:[2,"char-count"],counter:[4],customWidth:[1,"custom-width"],isDisabled:[32],focused:[32],showPassword:[32],touched:[32],dirty:[32],currentCharCount:[32],validationError:[32],validationMessage:[32],checkValidity:[64],reportValidity:[64]},void 0,{disabled:[{onDisabledChange:0}],type:[{checkPropValues:0}],variant:[{checkPropValues:0}],validationTiming:[{checkPropValues:0}],customValidators:[{onCustomValidatorsChange:0}],value:[{onValueChange:0}]}]),u=p,g=function(){"undefined"!=typeof customElements&&["bds-text-field","bds-tooltip","bds-typography"].forEach((e=>{switch(e){case"bds-text-field":customElements.get(o(e))||customElements.define(o(e),p);break;case"bds-tooltip":customElements.get(o(e))||h();break;case"bds-typography":customElements.get(o(e))||b()}}))};export{u as BdsTextField,g as defineCustomElement}
|
|
1
|
+
import{p as e,M as t,c as s,h as i,a,t as o}from"./index.js";import{f as l,s as r,r as d}from"./p-DCwT43Kz.js";import{c as n}from"./p-DhSchGPI.js";import{v as h}from"./p-kGnB15Lz.js";import{d as b}from"./p-CGdxFth9.js";import{d as c}from"./p-DIY3CDNL.js";const f={TEXT:"text",PASSWORD:"password"},x={OUTLINE:"outline",PLAIN:"plain"},p={BLUR:"blur",CHANGE:"change",INPUT:"input",SUBMIT:"submit"},u=e(class extends(t(l)){constructor(e){super(!1),!1!==e&&this.__registerHost(),this.valueChange=s(this,"valueChange"),this.bdsInput=s(this,"bdsInput"),this.bdsChange=s(this,"bdsChange"),this.bdsFocus=s(this,"bdsFocus"),this.bdsBlur=s(this,"bdsBlur"),this.bdsClear=s(this,"bdsClear"),this.bdsValidationChange=s(this,"bdsValidationChange"),this.internals=this.attachInternals(),this.name="",this.disabled=!1,this.required=!1,this.isDisabled=!1,this.value="",this.error=!1,this.errorMessage="",this.customValidators=[],this.validationTiming=p.BLUR,this.type=f.TEXT,this.variant=x.OUTLINE,this.placeholder="",this.readOnly=!1,this.autocomplete="off",this.pattern="",this.minLength=0,this.maxLength=0,this.label="",this.sublabel="",this.icon="",this.helperText="",this.info="",this.clearable=!1,this.clearOnHover=!1,this.charCount=0,this.counter=!1,this.customWidth="",this.focused=!1,this.showPassword=!1,this.touched=!1,this.dirty=!1,this.currentCharCount=0,this.validationError=!1,this.validationMessage="",this._valueAtFocus="",this._id=n("bds-text-field"),this.invalidHandler=e=>{e.preventDefault(),this.validationError=!0,this.validationMessage=this.internals.validationMessage,this.bdsValidationChange.emit({valid:!1,validity:this.internals.validity,value:this.value,touched:this.touched,dirty:this.dirty})}}async checkValidity(){return this.internals.checkValidity()}async reportValidity(){return this.internals.reportValidity()}onDisabledChange(e){this.isDisabled=e}checkPropValues(){h(Object.values(f),f.TEXT,this.el,"type"),h(Object.values(x),x.OUTLINE,this.el,"variant"),h(Object.values(p),p.BLUR,this.el,"validationTiming")}componentWillLoad(){this.checkPropValues(),this.isDisabled=this.disabled,this.currentCharCount=this.value.length}componentDidLoad(){this.el.addEventListener("invalid",this.invalidHandler)}disconnectedCallback(){this.el.removeEventListener("invalid",this.invalidHandler)}onCustomValidatorsChange(){this.updateValidity()}onValueChange(e){r(this.internals,e),this.currentCharCount=e.length,this.updateValidity(),this.valueChange.emit(e)}formAssociatedCallback(){r(this.internals,this.value),this.updateValidity()}formResetCallback(){this.value="",this.touched=!1,this.dirty=!1,this.currentCharCount=0,this.validationError=!1,this.validationMessage="",r(this.internals,null),this.updateValidity()}formStateRestoreCallback(e,t){this.value="string"==typeof e?e:"",r(this.internals,this.value),this.updateValidity()}updateValidity(e=!1){const t=d(this.internals,[...this.validators,...this.customValidators],this.el);e&&(this.validationError=!t,this.validationMessage=t?"":this.internals.validationMessage,this.bdsValidationChange.emit({valid:t,validity:this.internals.validity,value:this.value,touched:this.touched,dirty:this.dirty}))}handleInput(e){this.value=e.target.value,this.dirty=!0,this.bdsInput.emit({value:this.value,event:e}),this.validationTiming===p.INPUT&&this.updateValidity(!0)}handleChange(e){this.bdsChange.emit({value:this.value,event:e}),this.validationTiming===p.CHANGE&&this.updateValidity(!0)}handleFocus(e){this.focused=!0,this._valueAtFocus=this.value,this.bdsFocus.emit({event:e})}handleBlur(e){this.focused=!1,this.touched=!0,this.bdsBlur.emit({event:e}),(this.validationTiming===p.BLUR||this.validationTiming===p.CHANGE&&this.value!==this._valueAtFocus)&&this.updateValidity(!0)}handleShowPassword(){this.showPassword=!this.showPassword}handleClear(){this.value="",this.dirty=!0,this.validationError=!1,this.validationMessage="",this.bdsClear.emit(),this.el.querySelector("input")?.focus()}handleMouseDown(e){this.readOnly&&e.preventDefault()}get validators(){return[{key:"valueMissing",isValid:()=>!this.required||""!==this.value,message:"This field is required. Please fill it out."},{key:"tooShort",isValid:()=>0===this.minLength||this.value.length>=this.minLength,message:`Please enter at least ${this.minLength} characters.`},{key:"patternMismatch",isValid:()=>{if(""===this.pattern||""===this.value)return!0;try{return RegExp(this.pattern).test(this.value)}catch{return!0}},message:"Please match the requested format."}]}get effectiveMaxLength(){return 0!==this.maxLength?this.maxLength:this.counter&&this.charCount>0?this.charCount:void 0}get classMap(){return{"bds-text-field":!0,"bds-text-field--error":this.error||this.validationError,"bds-text-field--disabled":this.isDisabled,"bds-text-field--focused":this.focused,"bds-text-field--readonly":this.readOnly,"bds-text-field--plain":this.variant===x.PLAIN,"bds-text-field--clear-on-hover":this.clearOnHover}}get hostStyle(){return""!==this.customWidth?{"--bds-text-field-width":this.customWidth}:void 0}get iconClear(){return this.clearable||this.clearOnHover?"bds-icon-close":""}get showPasswordIcon(){return this.showPassword?"bds-icon-sight-on":"bds-icon-sight-off"}render(){const e=this._id+"-label",t=this._id+"-helper",s=(this.clearable||this.clearOnHover)&&""!==this.value&&!this.isDisabled&&!this.readOnly,o=this.error&&""!==this.errorMessage?this.errorMessage:this.validationError&&""!==this.validationMessage?this.validationMessage:this.helperText,l=""!==o||this.counter&&this.charCount>0,r=this.isDisabled?"disabled":this.error||this.validationError?"error":"default";return i(a,{key:"96b7e057fa7f25e8f7d13b7de0fd17f12de602bb",class:this.classMap,style:this.hostStyle,tabIndex:-1,onFocus:()=>!this.readOnly&&this.el.querySelector("input")?.focus()},""!==this.label&&i("bds-typography",{key:"e827b43ea347037ff2d404229aaefdd258d2ad22",id:e,variant:"label",htmlFor:this._id,required:this.required,tooltipText:""!==this.info?this.info:void 0,state:r},this.label),i("div",{key:"f579762db25f65031917874dbb4c2347b5d9f027",class:"bds-text-field__container"},(""!==this.icon||""!==this.sublabel)&&i("span",{key:"191d2ccec9baf8b739163eea112dce9a1073f4bd",class:"bds-text-field__sublabel"},""!==this.icon&&i("em",{key:"1cc1b1b7ece610b2a18ba872c4b7035d2239731b",class:this.icon}),this.sublabel),i("slot",{key:"ba7b08573b6ae35c10649125991a2bbed15f31f3",name:"prefix"}),i("input",{key:"6391338c4f636382cf19f888dc810baaf6820c80",id:this._id,class:"bds-text-field__control","aria-labelledby":""!==this.label?e:void 0,"aria-describedby":l&&""!==o?t:void 0,"aria-invalid":this.error||this.validationError?"true":void 0,"aria-required":this.required?"true":void 0,type:this.type===f.PASSWORD&&this.showPassword?f.TEXT:this.type,value:this.value,disabled:this.isDisabled,readOnly:this.readOnly,tabIndex:this.readOnly?-1:void 0,placeholder:this.placeholder,autocomplete:this.autocomplete,pattern:""!==this.pattern?this.pattern:void 0,minLength:0!==this.minLength?this.minLength:void 0,maxLength:this.effectiveMaxLength,onMouseDown:e=>this.handleMouseDown(e),onInput:e=>this.handleInput(e),onChange:e=>this.handleChange(e),onFocus:e=>this.handleFocus(e),onBlur:e=>this.handleBlur(e)}),(s||this.type===f.PASSWORD)&&i("div",{key:"e5dc4cab3d536ef09eaeae96ca68a7d4b4e15d92",class:"bds-text-field__actions"},s&&i("button",{key:"b18d06de000c3ea465be221dcbb77ab49bb3949f",class:"bds-text-field__action bds-text-field__action--clear",type:"button","aria-label":"Clear",onClick:()=>this.handleClear()},i("em",{key:"0aa5d75c5214b7832a2a2e80a1cd2c42af5bea9a",class:this.iconClear})),this.type===f.PASSWORD&&i("button",{key:"fd97135cca8d32178461bf7109c9b6a7eec543e9",class:"bds-text-field__action bds-text-field__action--password",type:"button","aria-label":this.showPassword?"Hide password":"Show password",onClick:()=>this.handleShowPassword()},i("em",{key:"0de72e7756ad62bbe4fb5f925526071720f358db",class:this.showPasswordIcon})))),l&&i("div",{key:"9d1c0e8920511650ab6711f2f813c01491d52414",class:"bds-text-field__footer"},""!==o&&i("bds-typography",{key:"f27235a7a38f34b9a9f7bae762c3c6be12acd8b0",id:t,variant:"helper",state:r},o),this.counter&&this.charCount>0&&i("span",{key:"3aa43ea8bd6a35963f0983ec8814e0ce19ee71ce",class:"bds-text-field__char-count"},this.currentCharCount,"/",this.charCount)))}static get formAssociated(){return!0}get el(){return this}static get watchers(){return{disabled:[{onDisabledChange:0}],type:[{checkPropValues:0}],variant:[{checkPropValues:0}],validationTiming:[{checkPropValues:0}],customValidators:[{onCustomValidatorsChange:0}],value:[{onValueChange:0}]}}static get style(){return'@charset "UTF-8";.bds-text-field__container,.bds-text-field__sublabel,.bds-text-field__actions,.bds-text-field__action,.bds-text-field__footer{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.bds-text-field [slot=prefix],.bds-text-field__sublabel{font-size:var(--boreal-typography-font-size-xs);font-weight:var(--boreal-typography-font-weight-semibold);line-height:var(--boreal-typography-line-height-xs)}.bds-text-field{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--boreal-spacing-2xs);width:var(--bds-text-field-width, 100%);font-family:var(--boreal-typography-font-family-primary);color:var(--boreal-text-default)}.bds-text-field__container{padding:var(--boreal-spacing-1xs);padding-left:0;height:var(--boreal-layout-l);border:1px solid var(--boreal-stroke-default-light);border-radius:var(--boreal-radius-xs);background-color:var(--boreal-ui-inverse);-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;overflow:hidden}.bds-text-field__sublabel{gap:var(--boreal-spacing-3xs);padding-left:var(--boreal-spacing-xs);white-space:nowrap}.bds-text-field__sublabel em[class^=bds-icon-],.bds-text-field__sublabel em[class*=" bds-icon-"]{width:var(--boreal-icons-m);height:var(--boreal-icons-m);font-size:var(--boreal-typography-font-size-md);line-height:1;-ms-flex-negative:0;flex-shrink:0;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.bds-text-field [slot=prefix]{padding-left:var(--boreal-spacing-xs);overflow:hidden;white-space:nowrap;-ms-flex-negative:0;flex-shrink:0}.bds-text-field__control{min-width:0;width:100%;border:none;outline:none;background:transparent;padding:0;padding-left:var(--boreal-spacing-xs);font-size:var(--boreal-typography-font-size-sm);font-weight:var(--boreal-typography-font-weight-regular);line-height:var(--boreal-typography-line-height-sm)}.bds-text-field__control::-webkit-input-placeholder{color:var(--boreal-text-default-light)}.bds-text-field__control::-moz-placeholder{color:var(--boreal-text-default-light)}.bds-text-field__control:-ms-input-placeholder{color:var(--boreal-text-default-light)}.bds-text-field__control::-ms-input-placeholder{color:var(--boreal-text-default-light)}.bds-text-field__control::placeholder{color:var(--boreal-text-default-light)}.bds-text-field__control:disabled{cursor:not-allowed}.bds-text-field__actions{padding-left:var(--boreal-spacing-xs);gap:var(--boreal-spacing-3xs)}.bds-text-field__action{-ms-flex-pack:center;justify-content:center;background:none;border:none;padding:var(--boreal-spacing-3xs);cursor:pointer;color:var(--boreal-icon-default-light);line-height:1;-webkit-transition:color 0.3s ease, opacity 0.3s ease;transition:color 0.3s ease, opacity 0.3s ease}.bds-text-field__action--clear em[class^=bds-icon-],.bds-text-field__action--clear em[class*=" bds-icon-"]{width:var(--boreal-icons-s);height:var(--boreal-icons-s);font-size:var(--boreal-typography-font-size-xs);line-height:1;-ms-flex-negative:0;flex-shrink:0;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.bds-text-field__action--password em[class^=bds-icon-],.bds-text-field__action--password em[class*=" bds-icon-"]{width:var(--boreal-icons-l);height:var(--boreal-icons-l);font-size:var(--boreal-typography-font-size-lg);line-height:1;-ms-flex-negative:0;flex-shrink:0;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.bds-text-field__action:hover{color:var(--boreal-icon-default-dark)}.bds-text-field__action:focus-visible{-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-text-field__footer{-ms-flex-pack:justify;justify-content:space-between}.bds-text-field__char-count{-ms-flex-negative:0;flex-shrink:0;font-size:var(--boreal-typography-font-size-xs);font-weight:var(--boreal-typography-font-weight-regular);line-height:var(--boreal-typography-line-height-xs);color:var(--boreal-text-default-light)}.bds-text-field--focused .bds-text-field__container{border-color:var(--boreal-stroke-focus);-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-text-field--error .bds-text-field__container{border-color:var(--boreal-stroke-danger-base)}.bds-text-field--disabled{cursor:not-allowed}.bds-text-field--disabled .bds-text-field__container{background-color:var(--boreal-ui-default-lighter);border-color:var(--boreal-stroke-default-light)}.bds-text-field--disabled .bds-text-field__sublabel{color:var(--boreal-text-disabled)}.bds-text-field--disabled .bds-text-field__sublabel em[class^=bds-icon-],.bds-text-field--disabled .bds-text-field__sublabel em[class*=" bds-icon-"]{color:var(--boreal-icon-disabled)}.bds-text-field--disabled .bds-text-field__control{color:var(--boreal-icon-disabled)}.bds-text-field--readonly .bds-text-field__container{background-color:transparent;border:none}.bds-text-field--readonly .bds-text-field__control::-webkit-input-placeholder{color:var(--boreal-text-default-darker)}.bds-text-field--readonly .bds-text-field__control::-moz-placeholder{color:var(--boreal-text-default-darker)}.bds-text-field--readonly .bds-text-field__control:-ms-input-placeholder{color:var(--boreal-text-default-darker)}.bds-text-field--readonly .bds-text-field__control::-ms-input-placeholder{color:var(--boreal-text-default-darker)}.bds-text-field--readonly .bds-text-field__control::placeholder{color:var(--boreal-text-default-darker)}.bds-text-field--plain .bds-text-field__container{border-color:transparent}.bds-text-field--plain.bds-text-field--focused .bds-text-field__container{border-color:var(--boreal-stroke-focus)}.bds-text-field--clear-on-hover .bds-text-field__action--clear{opacity:0;pointer-events:none}.bds-text-field--clear-on-hover:hover .bds-text-field__action--clear{opacity:1;pointer-events:auto}'}},[836,"bds-text-field",{name:[513],disabled:[516],required:[516],value:[1537],error:[516],errorMessage:[1,"error-message"],customValidators:[16],validationTiming:[1,"validation-timing"],type:[513],variant:[513],placeholder:[1],readOnly:[4,"readonly"],autocomplete:[1],pattern:[1],minLength:[2,"min-length"],maxLength:[2,"max-length"],label:[1],sublabel:[1],icon:[1],helperText:[1,"helper-text"],info:[1],clearable:[4],clearOnHover:[4,"clear-on-hover"],charCount:[2,"char-count"],counter:[4],customWidth:[1,"custom-width"],isDisabled:[32],focused:[32],showPassword:[32],touched:[32],dirty:[32],currentCharCount:[32],validationError:[32],validationMessage:[32],checkValidity:[64],reportValidity:[64]},void 0,{disabled:[{onDisabledChange:0}],type:[{checkPropValues:0}],variant:[{checkPropValues:0}],validationTiming:[{checkPropValues:0}],customValidators:[{onCustomValidatorsChange:0}],value:[{onValueChange:0}]}]),g=u,v=function(){"undefined"!=typeof customElements&&["bds-text-field","bds-tooltip","bds-typography"].forEach((e=>{switch(e){case"bds-text-field":customElements.get(o(e))||customElements.define(o(e),u);break;case"bds-tooltip":customElements.get(o(e))||b();break;case"bds-typography":customElements.get(o(e))||c()}}))};export{g as BdsTextField,v as defineCustomElement}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../dist/types/components";
|
|
2
|
+
|
|
3
|
+
interface BdsToggle extends Components.BdsToggle, HTMLElement {}
|
|
4
|
+
export const BdsToggle: {
|
|
5
|
+
prototype: BdsToggle;
|
|
6
|
+
new (): BdsToggle;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as e,M as t,c as s,h as i,a as o,t as a}from"./index.js";import{f as r,s as l}from"./p-DCwT43Kz.js";import{a as d}from"./p-CaHOghy5.js";import{c as n}from"./p-DhSchGPI.js";import{d as h}from"./p-CGdxFth9.js";import{d as b}from"./p-DIY3CDNL.js";const g=e(class extends(t(r)){constructor(e){super(!1),!1!==e&&this.__registerHost(),this.valueChange=s(this,"valueChange"),this.bdsChange=s(this,"bdsChange"),this.internals=this.attachInternals(),this.inheritedAttributes={},this.disabled=!1,this.required=!1,this.info="",this.error=!1,this.errorMessage="",this.checked=!1,this.placement="left",this.label="",this.helperText="",this.value="on",this._id=n("bds-toggle"),this.isDisabled=!1,this.validationError=!1,this.validationMessage="",this.isChecked=!1,this.handleClick=()=>this.toggle(),this.handleKeyDown=e=>{" "!==e.key&&"Enter"!==e.key||(e.preventDefault(),this.toggle())},this.handleInvalid=e=>{e.preventDefault(),this.validate()}}componentWillLoad(){this.isChecked=this.checked||!1,this.isDisabled=this.disabled||!1,this.inheritedAttributes={...d(this.el)},this.syncFormValue()}onCheckedChange(e){this.isChecked=e,this.syncFormValue()}onDisabledChange(e){this.isDisabled=e}formAssociatedCallback(){this.syncFormValue()}formDisabledCallback(e){this.isDisabled=e}formResetCallback(){this.isChecked=!1,this.internals.setValidity({}),l(this.internals,null)}formStateRestoreCallback(e,t){this.isChecked=e===this.value,this.internals.setValidity({}),this.syncFormValue()}syncFormValue(){l(this.internals,this.isChecked?this.value:null)}validate(){if(this.isDisabled||!this.required||this.isChecked)this.validationError=!1,this.validationMessage="",this.internals.setValidity({});else{const e=this.el.querySelector("input");this.validationError=!0,this.validationMessage="This field is required",this.internals.setValidity({valueMissing:!0},this.validationMessage,e??this.el)}}toggle(){this.isDisabled||(this.isChecked=!this.isChecked,this.syncFormValue(),this.validate(),this.valueChange.emit(this.isChecked),this.bdsChange.emit({checked:this.isChecked,value:this.value}))}get containerClasses(){return{"bds-toggle__container":!0,"bds-toggle__container--inverse":"right"===this.placement,"bds-toggle__container--checked":this.isChecked,"bds-toggle__container--disabled":this.isDisabled}}get canShowLabel(){return void 0!==this.label&&""!==this.label.trim()&&null!=this.label}render(){const e="bds-toggle",t=this.isDisabled?"disabled":this.error||this.validationError?"error":"default",s=this.error&&""!==this.errorMessage?this.errorMessage:this.validationError&&""!==this.validationMessage?this.validationMessage:this.helperText;return i(o,{key:"8aa5ec26708ce8eb834020353e2e01e882cefad6",...this.inheritedAttributes,onClick:this.handleClick,onKeyDown:this.handleKeyDown,class:e},i("div",{key:"a62ae102ba2167be5e03758c5bfc6197e8f3b73c",part:"container",class:this.containerClasses},this.canShowLabel&&i("bds-typography",{key:"c6129d113b083f9db5bad181f5a8cf1ae161b593",variant:"label",class:e+"__label",htmlFor:this._id,required:this.required,tooltipText:this.info},this.label),i("label",{key:"570a0637d106b24823d39945e1b7a68a4cec4f36",class:e+"__switch",htmlFor:this._id,onClick:e=>e.preventDefault()},i("input",{key:"197a94215e42e7a8a9d5a5652ad1163b501799ab",class:e+"__input","aria-invalid":this.error||this.validationError?"true":void 0,"aria-label":this.label||null,id:this._id,type:"checkbox",name:this.name,required:this.required,disabled:this.isDisabled,checked:this.isChecked,onInvalid:this.handleInvalid}),i("span",{key:"09ac81f91f9dc92c4e4cac593db4be4697243ce0",class:`${e}__slider ${e}__slider--round`}))),""!==s&&i("bds-typography",{key:"4a35755ec9e280dfedb839826683f1272c76223d",class:e+"__helper-text",variant:"helper",state:t,onClick:e=>e.stopPropagation()},s))}static get formAssociated(){return!0}get el(){return this}static get watchers(){return{checked:[{onCheckedChange:0}],disabled:[{onDisabledChange:0}]}}static get style(){return'@charset "UTF-8";.bds-toggle{font-family:var(--boreal-typography-font-family-primary);display:inline-block}.bds-toggle__container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:var(--boreal-spacing-2xs);outline:none;width:-webkit-max-content;width:-moz-max-content;width:max-content}.bds-toggle__container:focus{outline:none}.bds-toggle__container--inverse{-ms-flex-direction:row-reverse;flex-direction:row-reverse}.bds-toggle:active,.bds-toggle:focus-visible{outline:none}.bds-toggle:active .bds-toggle__input:not([disabled])+.bds-toggle__slider,.bds-toggle:focus-visible .bds-toggle__input:not([disabled])+.bds-toggle__slider{-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-toggle .bds-toggle__input:active:not([disabled])+.bds-toggle__slider,.bds-toggle .bds-toggle__input:focus-visible:not([disabled])+.bds-toggle__slider{-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-toggle:hover:not(:active):not([checked]):not([disabled]) .bds-toggle__slider,.bds-toggle:hover:not(:active):focus-within:not([checked]) .bds-toggle__slider{-webkit-box-shadow:0 1px 2px 0 var(--boreal-stroke-default-light);box-shadow:0 1px 2px 0 var(--boreal-stroke-default-light)}.bds-toggle__switch{position:relative;display:inline-block;width:var(--boreal-spacing-3xl);height:var(--boreal-spacing-l)}.bds-toggle__input{opacity:0;width:0;height:0}.bds-toggle__input:not(:checked)+.bds-toggle__slider{border:1px solid var(--boreal-stroke-default-light)}.bds-toggle__input:checked+.bds-toggle__slider{background-color:var(--boreal-ui-primary-base)}.bds-toggle__input:checked+.bds-toggle__slider::before{-webkit-transform:translateX(var(--boreal-spacing-l));-ms-transform:translateX(var(--boreal-spacing-l));transform:translateX(var(--boreal-spacing-l))}.bds-toggle__input:disabled+.bds-toggle__slider{background-color:var(--boreal-ui-disabled);cursor:default}.bds-toggle__input:disabled+.bds-toggle__slider::before{background-color:var(--boreal-icon-default-light)}.bds-toggle__input:disabled:checked+.bds-toggle__slider{background-color:var(--boreal-ui-primary-light)}.bds-toggle__input:disabled:checked+.bds-toggle__slider::before{background-color:var(--boreal-icon-inverse)}.bds-toggle__slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:var(--boreal-ui-base-light);-webkit-transition:all 0.4s, border-color 0s;transition:all 0.4s, border-color 0s}.bds-toggle__slider::before{position:absolute;content:"";height:var(--boreal-typography-font-size-md);width:var(--boreal-typography-font-size-md);left:var(--boreal-spacing-2xs);background-color:var(--boreal-text-inverse);bottom:0;top:0;margin:auto;-webkit-transition:0.3s;transition:0.3s}.bds-toggle__slider--round{border-radius:var(--boreal-radius-m)}.bds-toggle__slider--round::before{border-radius:var(--boreal-radius-full)}.bds-toggle__label{font-size:var(--boreal-typography-font-size-sm);color:var(--boreal-text-default)}.bds-toggle__helper-text{display:-ms-flexbox;display:flex;position:relative;color:var(--boreal-text-default-light);font-size:var(--boreal-typography-font-size-xs);margin-top:var(--boreal-spacing-2xs)}'}},[576,"bds-toggle",{name:[513],disabled:[516],required:[516],info:[1],error:[516],errorMessage:[513,"error-message"],checked:[516],placement:[513],label:[513],helperText:[513,"helper-text"],value:[1],isDisabled:[32],validationError:[32],validationMessage:[32],isChecked:[32]},void 0,{checked:[{onCheckedChange:0}],disabled:[{onDisabledChange:0}]}]),c=g,p=function(){"undefined"!=typeof customElements&&["bds-toggle","bds-tooltip","bds-typography"].forEach((e=>{switch(e){case"bds-toggle":customElements.get(a(e))||customElements.define(a(e),g);break;case"bds-tooltip":customElements.get(a(e))||h();break;case"bds-typography":customElements.get(a(e))||b()}}))};export{c as BdsToggle,p as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{B as
|
|
1
|
+
import{B as o,d as s}from"./p-CGdxFth9.js";const t=o,p=s;export{t as BdsTooltip,p as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{B as o,d as
|
|
1
|
+
import{B as o,d as s}from"./p-DIY3CDNL.js";const p=o,r=s;export{p as BdsTypography,r as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var t=(t,e)=>{var n;Object.entries(null!=(n=e.o.t)?n:{}).map((([n,[o]])=>{if(31&o||32&o){const o=t[n],s=function(t,e){for(;t;){const n=Object.getOwnPropertyDescriptor(t,e);if(null==n?void 0:n.get)return n;t=Object.getPrototypeOf(t)}}(Object.getPrototypeOf(t),n)||Object.getOwnPropertyDescriptor(t,n);s&&Object.defineProperty(t,n,{get(){return s.get.call(this)},set(t){s.set.call(this,t)},configurable:!0,enumerable:!0}),t[n]=e.l.has(n)?e.l.get(n):o}}))},e=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},n=(t,e)=>e in t,o=(t,e)=>(0,console.error)(t,e),s=new Map,l="http://www.w3.org/1999/xlink",i=["formAssociatedCallback","formResetCallback","formDisabledCallback","formStateRestoreCallback"],r="undefined"!=typeof window?window:{},c=r.HTMLElement||class{},f={i:0,u:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,o)=>t.addEventListener(e,n,o),rel:(t,e,n,o)=>t.removeEventListener(e,n,o),ce:(t,e)=>new CustomEvent(t,e)},u=(()=>{try{return!!r.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),a=!!u&&(()=>!!r.document&&Object.getOwnPropertyDescriptor(r.document.adoptedStyleSheets,"length").writable)(),h=!1,d=[],p=[],b=(t,e)=>n=>{t.push(n),h||(h=!0,e&&4&f.i?g(m):f.raf(m))},v=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){o(t)}t.length=0},m=()=>{v(d),v(p),(h=d.length>0)&&f.raf(m)},g=t=>Promise.resolve(void 0).then(t),y=b(p,!0),$=t=>{const e=new URL(t,f.u);return e.origin!==r.location.origin?e.href:e.pathname},j=t=>f.u=t,O=t=>{const e=Y(t,"childNodes");t.tagName&&t.tagName.includes("-")&&t["s-cr"]&&"SLOT-FB"!==t.tagName&&N(e,t.tagName).forEach((t=>{1===t.nodeType&&"SLOT-FB"===t.tagName&&(t.hidden=!!S(t,x(t),!1).length)}));let n=0;for(n=0;n<e.length;n++){const t=e[n];1===t.nodeType&&Y(t,"childNodes").length&&O(t)}},w=t=>{const e=[];for(let n=0;n<t.length;n++){const o=t[n]["s-nr"]||void 0;o&&o.isConnected&&e.push(o)}return e};function N(t,e,n){let o,s=0,l=[];for(;s<t.length;s++){if(o=t[s],o["s-sr"]&&(!e||o["s-hn"]===e)&&(void 0===n||x(o)===n)&&(l.push(o),void 0!==n))return l;l=[...l,...N(o.childNodes,e,n)]}return l}var S=(t,e,n=!0)=>{const o=[];(n&&t["s-sr"]||!t["s-sr"])&&o.push(t);let s=t;for(;s=s.nextSibling;)x(s)!==e||!n&&s["s-sr"]||o.push(s);return o},C=(t,e)=>1===t.nodeType?null===t.getAttribute("slot")&&""===e||t.getAttribute("slot")===e:t["s-sn"]===e||""===e,k=(t,e,n)=>{if(t["s-ol"]&&t["s-ol"].isConnected)return;const o=document.createTextNode("");if(o["s-nr"]=t,!e["s-cr"]||!e["s-cr"].parentNode)return;const s=e["s-cr"].parentNode;Y(s,n?"prepend":"appendChild").call(s,o),t["s-ol"]=o,t["s-sh"]=e["s-hn"]},x=t=>"string"==typeof t["s-sn"]?t["s-sn"]:1===t.nodeType&&t.getAttribute("slot")||void 0;function E(t){t.dispatchEvent(new CustomEvent("slotchange",{bubbles:!1,cancelable:!1,composed:!1}))}function _(t,e){var n;if(!(e=e||(null==(n=t["s-ol"])?void 0:n.parentElement)))return{slotNode:null,slotName:""};const o=t["s-sn"]=x(t)||"";return{slotNode:N(Y(e,"childNodes"),e.tagName,o)[0],slotName:o}}var A=t=>{if(t.__cloneNode)return;const e=t.__cloneNode=t.cloneNode;t.cloneNode=function(t){const n=e.call(this,!1);if(t){let t,e,o=0;const s=["s-id","s-cr","s-lr","s-rc","s-sc","s-p","s-cn","s-sr","s-sn","s-hn","s-ol","s-nr","s-si","s-rf","s-scs"],l=this.__childNodes||this.childNodes;for(;o<l.length;o++)t=l[o]["s-nr"],e=s.every((t=>!l[o][t])),t&&(n.__appendChild?n.__appendChild(t.cloneNode(!0)):n.appendChild(t.cloneNode(!0))),e&&n.appendChild(l[o].cloneNode(!0))}return n}},M=t=>{t.__appendChild||(t.__appendChild=t.appendChild,t.appendChild=function(t){const{slotName:e,slotNode:n}=_(t,this);if(n){k(t,n);const o=S(n,e),s=o[o.length-1],l=Y(s,"parentNode"),i=Y(l,"insertBefore")(t,s.nextSibling);return E(n),O(this),i}return this.__appendChild(t)})},R=t=>{t.__removeChild||(t.__removeChild=t.removeChild,t.removeChild=function(t){return t&&void 0!==t["s-sn"]&&N(this.__childNodes||this.childNodes,this.tagName,t["s-sn"])&&t.isConnected?(t.remove(),void O(this)):this.__removeChild(t)})},F=t=>{t.__prepend||(t.__prepend=t.prepend,t.prepend=function(...e){e.forEach((e=>{"string"==typeof e&&(e=this.ownerDocument.createTextNode(e));const n=(e["s-sn"]=x(e))||"",o=N(Y(this,"childNodes"),this.tagName,n)[0];if(o){k(e,o,!0);const t=S(o,n)[0],s=Y(t,"parentNode"),l=Y(s,"insertBefore")(e,Y(t,"nextSibling"));return E(o),l}return 1===e.nodeType&&e.getAttribute("slot")&&(e.hidden=!0),t.__prepend(e)}))})},T=t=>{t.__append||(t.__append=t.append,t.append=function(...t){t.forEach((t=>{"string"==typeof t&&(t=this.ownerDocument.createTextNode(t)),this.appendChild(t)}))})},L=t=>{if(t.__insertAdjacentHTML)return;const e=t.insertAdjacentHTML;t.insertAdjacentHTML=function(t,n){if("afterbegin"!==t&&"beforeend"!==t)return e.call(this,t,n);const o=this.ownerDocument.createElement("_");let s;if(o.innerHTML=n,"afterbegin"===t)for(;s=o.firstChild;)this.prepend(s);else if("beforeend"===t)for(;s=o.firstChild;)this.append(s)}},B=t=>{t.insertAdjacentText=function(t,e){this.insertAdjacentHTML(t,e)}},D=t=>{t.__insertBefore||t.__insertBefore||(t.__insertBefore=t.insertBefore,t.insertBefore=function(t,e){const{slotName:n,slotNode:o}=_(t,this),s=this.__childNodes?this.childNodes:w(this.childNodes);if(o){let l=!1;if(s.forEach((s=>{if(s!==e&&null!==e);else{if(l=!0,null===e||n!==e["s-sn"])return void this.appendChild(t);if(n===e["s-sn"]){k(t,o);const n=Y(e,"parentNode");Y(n,"insertBefore")(t,e),E(o)}}})),l)return t}const l=null==e?void 0:e.__parentNode;return l&&!this.isSameNode(l)?this.appendChild(t):this.__insertBefore(t,e)})},P=t=>{if(t.__insertAdjacentElement)return;const e=t.insertAdjacentElement;t.insertAdjacentElement=function(t,n){return"afterbegin"!==t&&"beforeend"!==t?e.call(this,t,n):"afterbegin"===t?(this.prepend(n),n):"beforeend"===t?(this.append(n),n):n}},H=t=>{z("textContent",t),Object.defineProperty(t,"textContent",{get:function(){let t="";return(this.__childNodes?this.childNodes:w(this.childNodes)).forEach((e=>t+=e.textContent||"")),t},set:function(t){(this.__childNodes?this.childNodes:w(this.childNodes)).forEach((t=>{t["s-ol"]&&t["s-ol"].remove(),t.remove()})),this.insertAdjacentHTML("beforeend",t)}})},U=t=>{class e extends Array{item(t){return this[t]}}z("children",t),Object.defineProperty(t,"children",{get(){return this.childNodes.filter((t=>1===t.nodeType))}}),Object.defineProperty(t,"childElementCount",{get(){return this.children.length}}),z("firstChild",t),Object.defineProperty(t,"firstChild",{get(){return this.childNodes[0]}}),z("lastChild",t),Object.defineProperty(t,"lastChild",{get(){return this.childNodes[this.childNodes.length-1]}}),z("childNodes",t),Object.defineProperty(t,"childNodes",{get(){const t=new e;return t.push(...w(this.__childNodes)),t}})},W=t=>{t&&!t.__parentNode&&(z("parentNode",t),Object.defineProperty(t,"parentNode",{get:function(){var t;return(null==(t=this["s-ol"])?void 0:t.parentNode)||this.__parentNode},set:function(t){this.__parentNode=t}}))},V=["children","nextElementSibling","previousElementSibling"],q=["childNodes","firstChild","lastChild","nextSibling","previousSibling","textContent","parentNode"];function z(t,e){if(!globalThis.Node||!globalThis.Element)return;let n;V.includes(t)?n=Object.getOwnPropertyDescriptor(Element.prototype,t):q.includes(t)&&(n=Object.getOwnPropertyDescriptor(Node.prototype,t)),n||(n=Object.getOwnPropertyDescriptor(e,t)),n&&Object.defineProperty(e,"__"+t,n)}function Y(t,e){if("__"+e in t){const n=t["__"+e];return"function"!=typeof n?n:n.bind(t)}return"function"!=typeof t[e]?t[e]:t[e].bind(t)}var I,Z,G=new WeakMap,J=t=>"sc-"+t.h,K=t=>"object"==(t=typeof t)||"function"===t,Q=(t,e,...n)=>{let o=null,s=null,l=null,i=!1,r=!1;const c=[],f=e=>{for(let n=0;n<e.length;n++)o=e[n],Array.isArray(o)?f(o):null!=o&&"boolean"!=typeof o&&((i="function"!=typeof t&&!K(o))&&(o+=""),i&&r?c[c.length-1].p+=o:c.push(i?X(null,o):o),r=i)};if(f(n),e){e.key&&(s=e.key),e.name&&(l=e.name);{const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}}if("function"==typeof t)return t(null===e?{}:e,c,et);const u=X(t,null);return u.v=e,c.length>0&&(u.m=c),u.$=s,u.j=l,u},X=(t,e)=>({i:0,O:t,p:null!=e?e:null,N:null,m:null,v:null,$:null,j:null}),tt={},et={forEach:(t,e)=>t.map(nt).forEach(e),map:(t,e)=>t.map(nt).map(e).map(ot)},nt=t=>({vattrs:t.v,vchildren:t.m,vkey:t.$,vname:t.j,vtag:t.O,vtext:t.p}),ot=t=>{if("function"==typeof t.vtag){const e={...t.vattrs};return t.vkey&&(e.key=t.vkey),t.vname&&(e.name=t.vname),Q(t.vtag,e,...t.vchildren||[])}const e=X(t.vtag,t.vtext);return e.v=t.vattrs,e.m=t.vchildren,e.$=t.vkey,e.j=t.vname,e},st=(t,e,n)=>null==t||K(t)?t:4&e?(n&&"string"==typeof t||"false"!==t)&&(""===t||!!t):2&e?"string"==typeof t?parseFloat(t):"number"==typeof t?t:NaN:1&e?t+"":t,lt=(t,e)=>{const n=t;return{emit:t=>it(n,e,{bubbles:!0,composed:!0,cancelable:!0,detail:t})}},it=(t,e,n)=>{const o=f.ce(e,n);return t.dispatchEvent(o),o},rt=(t,o,s,i,c,u)=>{if(s===i)return;let a=n(t,o),h=o.toLowerCase();if("class"===o){const e=t.classList,n=ft(s);let o=ft(i);e.remove(...n.filter((t=>t&&!o.includes(t)))),e.add(...o.filter((t=>t&&!n.includes(t))))}else if("style"===o){for(const e in s)i&&null!=i[e]||(e.includes("-")?t.style.removeProperty(e):t.style[e]="");for(const e in i)s&&i[e]===s[e]||(e.includes("-")?t.style.setProperty(e,i[e]):t.style[e]=i[e])}else if("key"===o);else if("ref"===o)i&&At(i,t);else if(t.__lookupSetter__(o)||"o"!==o[0]||"n"!==o[1]){if("a"===o[0]&&o.startsWith("attr:")){const n=o.slice(5);let s;{const o=e(t);if(o&&o.o&&o.o.t){const t=o.o.t[n];t&&t[1]&&(s=t[1])}}return s||(s=n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),void(null==i||!1===i?!1===i&&""!==t.getAttribute(s)||t.removeAttribute(s):t.setAttribute(s,!0===i?"":i))}if("p"===o[0]&&o.startsWith("prop:")){const e=o.slice(5);try{t[e]=i}catch(t){}return}{const e=K(i);if((a||e&&null!==i)&&!c)try{if(t.tagName.includes("-"))t[o]!==i&&(t[o]=i);else{const e=null==i?"":i;"list"===o?a=!1:null!=s&&t[o]===e||("function"==typeof t.__lookupSetter__(o)?t[o]=e:t.setAttribute(o,e))}}catch(t){}let n=!1;h!==(h=h.replace(/^xlink\:?/,""))&&(o=h,n=!0),null==i||!1===i?!1===i&&""!==t.getAttribute(o)||(n?t.removeAttributeNS(l,o):t.removeAttribute(o)):(!a||4&u||c)&&!e&&1===t.nodeType&&(i=!0===i?"":i,n?t.setAttributeNS(l,o,i):t.setAttribute(o,i))}}else if(o="-"===o[2]?o.slice(3):n(r,h)?h.slice(2):h[2]+o.slice(3),s||i){const e=o.endsWith(ut);o=o.replace(at,""),s&&f.rel(t,o,s,e),i&&f.ael(t,o,i,e)}},ct=/\s/,ft=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(ct):[]),ut="Capture",at=RegExp(ut+"$"),ht=(t,e,n)=>{const o=11===e.N.nodeType&&e.N.host?e.N.host:e.N,s=t&&t.v||{},l=e.v||{};for(const t of dt(Object.keys(s)))t in l||rt(o,t,s[t],void 0,n,e.i);for(const t of dt(Object.keys(l)))rt(o,t,s[t],l[t],n,e.i)};function dt(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var pt=!1,bt=!1,vt=!1,mt=!1,gt=[],yt=[],$t=(t,e,n)=>{var o;const s=e.m[n];let l,i,c,f=0;if(pt||(vt=!0,"slot"===s.O&&(s.i|=s.m?2:1)),null!=s.p)l=s.N=r.document.createTextNode(s.p);else if(1&s.i)l=s.N=r.document.createTextNode(""),ht(null,s,mt);else{if(mt||(mt="svg"===s.O),!r.document)throw Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");if(l=s.N=r.document.createElementNS(mt?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",!pt&&2&s.i?"slot-fb":s.O),mt&&"foreignObject"===s.O&&(mt=!1),ht(null,s,mt),s.m){const e="template"===s.O?l.content:l;for(f=0;f<s.m.length;++f)i=$t(t,s,f),i&&e.appendChild(i)}"svg"===s.O?mt=!1:"foreignObject"===l.tagName&&(mt=!0)}return l["s-hn"]=Z,3&s.i&&(l["s-sr"]=!0,l["s-cr"]=I,l["s-sn"]=s.j||"",l["s-rf"]=null==(o=s.v)?void 0:o.ref,function(t){if(t.assignedElements||t.assignedNodes||!t["s-sr"])return;const e=e=>function(t){const n=[],o=this["s-sn"];(null==t?void 0:t.flatten)&&console.error("\n Flattening is not supported for Stencil non-shadow slots.\n You can use `.childNodes` to nested slot fallback content.\n If you have a particular use case, please open an issue on the Stencil repo.\n ");const s=this["s-cr"].parentElement;return(s.__childNodes?s.childNodes:w(s.childNodes)).forEach((t=>{o===x(t)&&n.push(t)})),e?n.filter((t=>1===t.nodeType)):n}.bind(t);t.assignedElements=e(!0),t.assignedNodes=e(!1)}(l),c=t&&t.m&&t.m[n],c&&c.O===s.O&&t.N&&jt(t.N)),l},jt=t=>{f.i|=1;const e=t.closest(Z.toLowerCase());if(null!=e){const n=Array.from(e.__childNodes||e.childNodes).find((t=>t["s-cr"])),o=Array.from(t.__childNodes||t.childNodes);for(const t of n?o.reverse():o)null!=t["s-sh"]&&(Mt(e,t,null!=n?n:null),t["s-sh"]=void 0,vt=!0)}f.i&=-2},Ot=(t,e)=>{f.i|=1;const n=Array.from(t.__childNodes||t.childNodes);if(t["s-sr"]){let e=t;for(;e=e.nextSibling;)e&&e["s-sn"]===t["s-sn"]&&e["s-sh"]===Z&&n.push(e)}for(let t=n.length-1;t>=0;t--){const o=n[t];o["s-hn"]!==Z&&o["s-ol"]&&(Mt(Ct(o).parentNode,o,Ct(o)),o["s-ol"].remove(),o["s-ol"]=void 0,o["s-sh"]=void 0,vt=!0),e&&Ot(o,e)}f.i&=-2},wt=(t,e,n,o,s,l)=>{let i,r=t["s-cr"]&&t["s-cr"].parentNode||t;for("template"===n.O&&(r=r.content);s<=l;++s)o[s]&&(i=$t(null,n,s),i&&(o[s].N=i,Mt(r,i,Ct(e))))},Nt=(t,e,n)=>{for(let o=e;o<=n;++o){const e=t[o];if(e){const t=e.N;_t(e),t&&(bt=!0,t["s-ol"]?t["s-ol"].remove():Ot(t,!0),t.remove())}}},St=(t,e,n=!1)=>t.O===e.O&&("slot"===t.O?t.j===e.j:n?(n&&!t.$&&e.$&&(t.$=e.$),!0):t.$===e.$),Ct=t=>t&&t["s-ol"]||t,kt=(t,e,n=!1)=>{const o=e.N=t.N,s=t.m,l=e.m,i=e.O,r=e.p;let c;null==r?(mt="svg"===i||"foreignObject"!==i&&mt,"slot"!==i||pt||t.j!==e.j&&(e.N["s-sn"]=e.j||"",jt(e.N.parentElement)),ht(t,e,mt),null!==s&&null!==l?((t,e,n,o,s=!1)=>{let l,i,r=0,c=0,f=0,u=0,a=e.length-1,h=e[0],d=e[a],p=o.length-1,b=o[0],v=o[p];const m="template"===n.O?t.content:t;for(;r<=a&&c<=p;)if(null==h)h=e[++r];else if(null==d)d=e[--a];else if(null==b)b=o[++c];else if(null==v)v=o[--p];else if(St(h,b,s))kt(h,b,s),h=e[++r],b=o[++c];else if(St(d,v,s))kt(d,v,s),d=e[--a],v=o[--p];else if(St(h,v,s))"slot"!==h.O&&"slot"!==v.O||Ot(h.N.parentNode,!1),kt(h,v,s),Mt(m,h.N,d.N.nextSibling),h=e[++r],v=o[--p];else if(St(d,b,s))"slot"!==h.O&&"slot"!==v.O||Ot(d.N.parentNode,!1),kt(d,b,s),Mt(m,d.N,h.N),d=e[--a],b=o[++c];else{for(f=-1,u=r;u<=a;++u)if(e[u]&&null!==e[u].$&&e[u].$===b.$){f=u;break}f>=0?(i=e[f],i.O!==b.O?l=$t(e&&e[c],n,f):(kt(i,b,s),e[f]=void 0,l=i.N),b=o[++c]):(l=$t(e&&e[c],n,c),b=o[++c]),l&&Mt(Ct(h.N).parentNode,l,Ct(h.N))}r>a?wt(t,null==o[p+1]?null:o[p+1].N,n,o,c,p):c>p&&Nt(e,r,a)})(o,s,e,l,n):null!==l?(null!==t.p&&(o.textContent=""),wt(o,null,e,l,0,l.length-1)):!n&&null!==s&&Nt(s,0,s.length-1),mt&&"svg"===i&&(mt=!1)):(c=o["s-cr"])?c.parentNode.textContent=r:t.p!==r&&(o.data=r)},xt=[],Et=t=>{let e,n,o;const s=t.__childNodes||t.childNodes;for(const t of s){if(t["s-sr"]&&(e=t["s-cr"])&&e.parentNode){n=e.parentNode.__childNodes||e.parentNode.childNodes;const s=t["s-sn"];for(o=n.length-1;o>=0;o--)if(e=n[o],!(e["s-cn"]||e["s-nr"]||e["s-hn"]===t["s-hn"]||e["s-sh"]&&e["s-sh"]===t["s-hn"]))if(C(e,s)){let n=xt.find((t=>t.S===e));bt=!0,e["s-sn"]=e["s-sn"]||s,n?(n.S["s-sh"]=t["s-hn"],n.C=t):(e["s-sh"]=t["s-hn"],xt.push({C:t,S:e})),e["s-sr"]&&xt.map((t=>{C(t.S,e["s-sn"])&&(n=xt.find((t=>t.S===e)),n&&!t.C&&(t.C=n.C))}))}else xt.some((t=>t.S===e))||xt.push({S:e})}1===t.nodeType&&Et(t)}},_t=t=>{t.v&&t.v.ref&>.push((()=>t.v.ref(null))),t.m&&t.m.map(_t)},At=(t,e)=>{yt.push((()=>t(e)))},Mt=(t,e,n,o)=>{if("string"==typeof e["s-sn"]){11!==t.getRootNode().nodeType&&W(e),t.insertBefore(e,n);const{slotNode:s}=_(e);return s&&!o&&E(s),e}return t.__insertBefore?t.__insertBefore(e,n):null==t?void 0:t.insertBefore(e,n)},Rt=(t,e,n=!1)=>{var o,s,l,i,c;const u=t.$hostElement$,a=t.o,h=t.k||X(null,null),d=(t=>t&&t.O===tt)(e)?e:Q(null,null,e);if(Z=u.tagName,a._&&(d.v=d.v||{},a._.forEach((([t,e])=>{d.v[e]=u[t]}))),n&&d.v)for(const t of Object.keys(d.v))u.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(d.v[t]=u[t]);if(d.O=null,d.i|=4,t.k=d,d.N=h.N=u,pt=false,I=u["s-cr"],bt=!1,kt(h,d,n),f.i|=1,vt){Et(d.N);for(const t of xt){const e=t.S;if(!e["s-ol"]&&r.document){const t=r.document.createTextNode("");t["s-nr"]=e,Mt(e.parentNode,e["s-ol"]=t,e,n)}}for(const t of xt){const e=t.S,c=t.C;if(1===e.nodeType&&n&&(e["s-ih"]=null!=(o=e.hidden)&&o),c){const t=c.parentNode;let o=c.nextSibling;if(o&&1===o.nodeType){let n=null==(s=e["s-ol"])?void 0:s.previousSibling;for(;n;){let s=null!=(l=n["s-nr"])?l:null;if(s&&s["s-sn"]===e["s-sn"]&&t===(s.__parentNode||s.parentNode)){for(s=s.nextSibling;s===e||(null==s?void 0:s["s-sr"]);)s=null==s?void 0:s.nextSibling;if(!s||!s["s-nr"]){o=s;break}}n=n.previousSibling}}if((!o&&t!==(e.__parentNode||e.parentNode)||(e.__nextSibling||e.nextSibling)!==o)&&e!==o){if(Mt(t,e,o,n),8===e.nodeType&&e.nodeValue.startsWith("s-nt-")){const t=r.document.createTextNode(e.nodeValue.replace(/^s-nt-/,""));t["s-hn"]=e["s-hn"],t["s-sn"]=e["s-sn"],t["s-sh"]=e["s-sh"],t["s-sr"]=e["s-sr"],t["s-ol"]=e["s-ol"],t["s-ol"]["s-nr"]=t,Mt(e.parentNode,t,e,n),e.parentNode.removeChild(e)}1===e.nodeType&&"SLOT-FB"!==e.tagName&&(e.hidden=null!=(i=e["s-ih"])&&i)}e&&"function"==typeof c["s-rf"]&&c["s-rf"](c)}else 1===e.nodeType&&(e.hidden=!0)}}if(bt&&O(d.N),f.i&=-2,xt.length=0,!pt&&!(1&a.i)&&u["s-cr"]){const t=d.N.__childNodes||d.N.childNodes;for(const e of t)if(e["s-hn"]!==Z&&!e["s-sh"])if(n&&null==e["s-ih"]&&(e["s-ih"]=null!=(c=e.hidden)&&c),1===e.nodeType)e.hidden=!0;else if(3===e.nodeType&&e.nodeValue.trim()){const t=r.document.createComment("s-nt-"+e.nodeValue);t["s-sn"]=e["s-sn"],Mt(e.parentNode,t,e,n),e.parentNode.removeChild(e)}}I=void 0,gt.forEach((t=>t())),gt.length=0,yt.forEach((t=>t())),yt.length=0},Ft=(t,e)=>{if(e&&!t.A&&e["s-p"]){const n=e["s-p"].push(new Promise((o=>t.A=()=>{e["s-p"].splice(n-1,1),o()})))}},Tt=(t,e)=>{if(t.i|=16,4&t.i)return void(t.i|=512);Ft(t,t.M);const n=()=>Lt(t,e);if(!e)return y(n);queueMicrotask((()=>{n()}))},Lt=(t,e)=>{const n=t.$hostElement$,o=n;if(!o)throw Error(`Can't render component <${n.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let s;return s=Vt(o,e?"componentWillLoad":"componentWillUpdate",void 0,n),s=Bt(s,(()=>Vt(o,"componentWillRender",void 0,n))),Bt(s,(()=>Pt(t,o,e)))},Bt=(t,e)=>Dt(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),Dt=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,Pt=async(t,e,n)=>{var o;const l=t.$hostElement$,i=l["s-rc"];n&&(t=>{const e=t.o;((t,e)=>{var n,o,l;const i=J(e),c=s.get(i);if(!r.document)return i;if(t=11===t.nodeType?t:r.document,c)if("string"==typeof c){let s,l=G.get(t=t.head||t);if(l||G.set(t,l=new Set),!l.has(i)){s=r.document.createElement("style"),s.textContent=c;const h=null!=(n=f.R)?n:function(){var t,e,n;return null!=(n=null==(e=null==(t=r.document.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:e.getAttribute("content"))?n:void 0}();if(null!=h&&s.setAttribute("nonce",h),!(1&e.i))if("HEAD"===t.nodeName){const e=t.querySelectorAll("link[rel=preconnect]"),n=e.length>0?e[e.length-1].nextSibling:t.querySelector("style");t.insertBefore(s,(null==n?void 0:n.parentNode)===t?n:null)}else if("host"in t)if(u){const e=new(null!=(o=t.defaultView)?o:t.ownerDocument.defaultView).CSSStyleSheet;e.replaceSync(c),a?t.adoptedStyleSheets.unshift(e):t.adoptedStyleSheets=[e,...t.adoptedStyleSheets]}else{const e=t.querySelector("style");e?e.textContent=c+e.textContent:t.prepend(s)}else t.append(s);1&e.i&&t.insertBefore(s,null),4&e.i&&(s.textContent+="slot-fb{display:contents}slot-fb[hidden]{display:none}"),l&&l.add(i)}}else{let e=G.get(t);if(e||G.set(t,e=new Set),!e.has(i)){const n=null!=(l=t.defaultView)?l:t.ownerDocument.defaultView;let o;if(c.constructor===n.CSSStyleSheet)o=c;else{o=new n.CSSStyleSheet;for(let t=0;t<c.cssRules.length;t++)o.insertRule(c.cssRules[t].cssText,t)}a?t.adoptedStyleSheets.push(o):t.adoptedStyleSheets=[...t.adoptedStyleSheets,o],e.add(i)}}})(t.$hostElement$.getRootNode(),e)})(t);Ht(t,e,l,n),i&&(i.map((t=>t())),l["s-rc"]=void 0);{const e=null!=(o=l["s-p"])?o:[],n=()=>Ut(t);0===e.length?n():(Promise.all(e).then(n).catch(n),t.i|=4,e.length=0)}},Ht=(t,e,n,s)=>{try{e=e.render(),t.i&=-17,t.i|=2,Rt(t,e,s)}catch(e){o(e,t.$hostElement$)}return null},Ut=t=>{const e=t.$hostElement$,n=e,o=t.M;Vt(n,"componentDidRender",void 0,e),64&t.i?Vt(n,"componentDidUpdate",void 0,e):(t.i|=64,qt(e),Vt(n,"componentDidLoad",void 0,e),t.F(e),o||Wt()),t.A&&(t.A(),t.A=void 0),512&t.i&&g((()=>Tt(t,!1))),t.i&=-517},Wt=()=>{g((()=>it(r,"appload",{detail:{namespace:"boreal-web-components"}})))},Vt=(t,e,n,s)=>{if(t&&t[e])try{return t[e](n)}catch(t){o(t,s)}},qt=t=>t.classList.add("hydrated"),zt=(t,n,s,l)=>{const i=e(t);if(!i)return;const r=t,c=i.l.get(n),f=i.i,u=r;if(!((s=st(s,l.t[n][0],!!(64&l.i)))===c||Number.isNaN(c)&&Number.isNaN(s))){if(i.l.set(n,s),l.T){const t=l.T[n];t&&t.map((t=>{try{const[[e,o]]=Object.entries(t);(128&f||1&o)&&(u?u[e](s,c,n):i.L.push((()=>{i.B[e](s,c,n)})))}catch(t){o(t,r)}}))}if(2&f){if(u.componentShouldUpdate&&!1===u.componentShouldUpdate(s,c,n)&&!(16&f))return;16&f||Tt(i,!1)}}},Yt=(t,n,o)=>{var s,l;const r=t.prototype;64&n.i&&1&o&&i.forEach((t=>{const n=r[t];Object.defineProperty(r,t,{value(...o){var s;const l=e(this),i=this;i?"function"==typeof n&&n.call(i,...o):null==(s=null==l?void 0:l.D)||s.then((e=>{const n=e[t];"function"==typeof n&&n.call(e,...o)}))}})}));{t.watchers&&!n.T&&(n.T=t.watchers),t.deserializers&&!n.P&&(n.P=t.deserializers),t.serializers&&!n.H&&(n.H=t.serializers);const o=Object.entries(null!=(s=n.t)?s:{});o.map((([t,[o]])=>{if(31&o||32&o){const{get:s,set:l}=Object.getOwnPropertyDescriptor(r,t)||{};s&&(n.t[t][0]|=2048),l&&(n.t[t][0]|=4096),Object.defineProperty(r,t,{get(){return s?s.apply(this):((t,n)=>e(this).l.get(n))(0,t)},configurable:!0,enumerable:!0}),Object.defineProperty(r,t,{set(s){const i=e(this);if(i){if(l)return void 0===(32&o?this[t]:i.$hostElement$[t])&&i.l.get(t)&&(s=i.l.get(t)),l.call(this,st(s,o,!!(64&n.i))),void zt(this,t,s=32&o?this[t]:i.$hostElement$[t],n);zt(this,t,s,n)}}})}}));{const s=new Map;r.attributeChangedCallback=function(t,l,i){f.jmp((()=>{var c;const f=s.get(t),u=e(this);if(this.hasOwnProperty(f),r.hasOwnProperty(f)&&"number"==typeof this[f]&&this[f]==i)return;if(null==f){const e=null==u?void 0:u.i;if(u&&e&&!(8&e)&&i!==l){const o=this,s=null==(c=n.T)?void 0:c[t];null==s||s.forEach((n=>{const[[s,r]]=Object.entries(n);null!=o[s]&&(128&e||1&r)&&o[s].call(o,i,l,t)}))}return}const a=o.find((([t])=>t===f));a&&4&a[1][0]&&(i=null!==i&&"false"!==i);const h=Object.getOwnPropertyDescriptor(r,f);i==this[f]||h.get&&!h.set||(this[f]=i)}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(l=n.T)?l:{}),...o.filter((([t,e])=>31&e[0])).map((([t,e])=>{var o;const l=e[1]||t;return s.set(l,t),512&e[0]&&(null==(o=n._)||o.push([t,l])),l}))]))}}return t},It=(n,l)=>{const i={i:l[0],h:l[1]};try{i.t=l[2],i.T=n.T,i.P=n.P,i.H=n.H,i._=[],!(1&i.i)&&256&i.i?(t=>{A(t),M(t),T(t),F(t),P(t),L(t),B(t),D(t),H(t),U(t),R(t)})(n.prototype):A(n.prototype);const c=n.prototype.connectedCallback,a=n.prototype.disconnectedCallback;return Object.assign(n.prototype,{__hasHostListenerAttached:!1,__registerHost(){((e,n)=>{const o={i:0,$hostElement$:e,o:n,l:new Map,U:new Map};o.D=new Promise((t=>o.F=t)),e["s-p"]=[],e["s-rc"]=[];const s=o;e.__stencil__getHostRef=()=>s,512&n.i&&t(e,o)})(this,i)},connectedCallback(){if(!this.__hasHostListenerAttached){if(!e(this))return;this.__hasHostListenerAttached=!0}(t=>{if(!(1&f.i)){const n=e(t);if(!n)return;const l=n.o,i=()=>{};if(1&n.i)(null==n?void 0:n.B)||(null==n?void 0:n.D)&&n.D.then((()=>{}));else{n.i|=1,12&l.i&&(t=>{if(!r.document)return;const e=t["s-cr"]=r.document.createComment("");e["s-cn"]=!0,Mt(t,e,t.firstChild)})(t);{let e=t;for(;e=e.parentNode||e.host;)if(e["s-p"]){Ft(n,n.M=e);break}}l.t&&Object.entries(l.t).map((([e,[n]])=>{if(31&n&&e in t&&t[e]!==Object.prototype[e]){const n=t[e];delete t[e],t[e]=n}})),(async(t,e,n)=>{let l;try{if(!(32&e.i)&&(e.i|=32,l=t.constructor,customElements.whenDefined(t.localName).then((()=>e.i|=128)),l&&l.style)){let t;"string"==typeof l.style&&(t=l.style);const e=J(n);if(!s.has(e)){const o=()=>{};((t,e,n)=>{let o=s.get(t);u&&n?(o=o||new CSSStyleSheet,"string"==typeof o?o=e:o.replaceSync(e)):o=e,s.set(t,o)})(e,t,!!(1&n.i)),o()}}const o=e.M,i=()=>Tt(e,!0);o&&o["s-rc"]?o["s-rc"].push(i):i()}catch(n){o(n,t),e.A&&(e.A(),e.A=void 0),e.F&&e.F(t)}})(t,n,l)}i()}})(this),c&&c.call(this)},disconnectedCallback(){(async t=>{G.has(t)&&G.delete(t),t.shadowRoot&&G.has(t.shadowRoot)&&G.delete(t.shadowRoot)})(this),a&&a.call(this)},__attachShadow(){this.shadowRoot=this}}),Object.defineProperty(n,"is",{value:i.h,configurable:!0}),Yt(n,i,3)}catch(t){return o(t),n}},Zt=(t,e)=>e,Gt=globalThis.HTMLElement||class{};function Jt(...t){return t.reduceRight(((t,e)=>e(t)),Gt)}var Kt=t=>f.R=t,Qt=t=>Object.assign(f,t);function Xt(t,e){Rt({o:{i:0,h:e.tagName},$hostElement$:e},t)}function te(t){return t}export{Zt as F,tt as H,Jt as M,c as a,lt as c,$ as getAssetPath,Q as h,It as p,Xt as render,j as setAssetPath,Kt as setNonce,Qt as setPlatformOptions,te as t}
|
|
1
|
+
var t=(t,e)=>{var n;Object.entries(null!=(n=e.o.t)?n:{}).map((([n,[o]])=>{if(31&o||32&o){const o=t[n],s=function(t,e){for(;t;){const n=Object.getOwnPropertyDescriptor(t,e);if(null==n?void 0:n.get)return n;t=Object.getPrototypeOf(t)}}(Object.getPrototypeOf(t),n)||Object.getOwnPropertyDescriptor(t,n);s&&Object.defineProperty(t,n,{get(){return s.get.call(this)},set(t){s.set.call(this,t)},configurable:!0,enumerable:!0}),t[n]=e.l.has(n)?e.l.get(n):o}}))},e=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},n=(t,e)=>e in t,o=(t,e)=>(0,console.error)(t,e),s=new Map,l="http://www.w3.org/1999/xlink",i=["formAssociatedCallback","formResetCallback","formDisabledCallback","formStateRestoreCallback"],r="undefined"!=typeof window?window:{},c=r.HTMLElement||class{},f={i:0,u:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,o)=>t.addEventListener(e,n,o),rel:(t,e,n,o)=>t.removeEventListener(e,n,o),ce:(t,e)=>new CustomEvent(t,e)},u=(()=>{try{return!!r.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),a=!!u&&(()=>!!r.document&&Object.getOwnPropertyDescriptor(r.document.adoptedStyleSheets,"length").writable)(),h=!1,d=[],p=[],b=(t,e)=>n=>{t.push(n),h||(h=!0,e&&4&f.i?y(m):f.raf(m))},v=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){o(t)}t.length=0},m=()=>{v(d),v(p),(h=d.length>0)&&f.raf(m)},y=t=>Promise.resolve(void 0).then(t),g=b(p,!0),$=t=>{const e=new URL(t,f.u);return e.origin!==r.location.origin?e.href:e.pathname},j=t=>f.u=t,O=t=>{const e=Y(t,"childNodes");t.tagName&&t.tagName.includes("-")&&t["s-cr"]&&"SLOT-FB"!==t.tagName&&N(e,t.tagName).forEach((t=>{1===t.nodeType&&"SLOT-FB"===t.tagName&&(t.hidden=!!S(t,x(t),!1).length)}));let n=0;for(n=0;n<e.length;n++){const t=e[n];1===t.nodeType&&Y(t,"childNodes").length&&O(t)}},w=t=>{const e=[];for(let n=0;n<t.length;n++){const o=t[n]["s-nr"]||void 0;o&&o.isConnected&&e.push(o)}return e};function N(t,e,n){let o,s=0,l=[];for(;s<t.length;s++){if(o=t[s],o["s-sr"]&&(!e||o["s-hn"]===e)&&(void 0===n||x(o)===n)&&(l.push(o),void 0!==n))return l;l=[...l,...N(o.childNodes,e,n)]}return l}var S=(t,e,n=!0)=>{const o=[];(n&&t["s-sr"]||!t["s-sr"])&&o.push(t);let s=t;for(;s=s.nextSibling;)x(s)!==e||!n&&s["s-sr"]||o.push(s);return o},C=(t,e)=>1===t.nodeType?null===t.getAttribute("slot")&&""===e||t.getAttribute("slot")===e:t["s-sn"]===e||""===e,k=(t,e,n)=>{if(t["s-ol"]&&t["s-ol"].isConnected)return;const o=document.createTextNode("");if(o["s-nr"]=t,!e["s-cr"]||!e["s-cr"].parentNode)return;const s=e["s-cr"].parentNode;Y(s,n?"prepend":"appendChild").call(s,o),t["s-ol"]=o,t["s-sh"]=e["s-hn"]},x=t=>"string"==typeof t["s-sn"]?t["s-sn"]:1===t.nodeType&&t.getAttribute("slot")||void 0;function E(t){t.dispatchEvent(new CustomEvent("slotchange",{bubbles:!1,cancelable:!1,composed:!1}))}function _(t,e){var n;if(!(e=e||(null==(n=t["s-ol"])?void 0:n.parentElement)))return{slotNode:null,slotName:""};const o=t["s-sn"]=x(t)||"";return{slotNode:N(Y(e,"childNodes"),e.tagName,o)[0],slotName:o}}var A=t=>{if(t.__cloneNode)return;const e=t.__cloneNode=t.cloneNode;t.cloneNode=function(t){const n=e.call(this,!1);if(t){let t,e,o=0;const s=["s-id","s-cr","s-lr","s-rc","s-sc","s-p","s-cn","s-sr","s-sn","s-hn","s-ol","s-nr","s-si","s-rf","s-scs"],l=this.__childNodes||this.childNodes;for(;o<l.length;o++)t=l[o]["s-nr"],e=s.every((t=>!l[o][t])),t&&(n.__appendChild?n.__appendChild(t.cloneNode(!0)):n.appendChild(t.cloneNode(!0))),e&&n.appendChild(l[o].cloneNode(!0))}return n}},M=t=>{t.__appendChild||(t.__appendChild=t.appendChild,t.appendChild=function(t){const{slotName:e,slotNode:n}=_(t,this);if(n){k(t,n);const o=S(n,e),s=o[o.length-1],l=Y(s,"parentNode"),i=Y(l,"insertBefore")(t,s.nextSibling);return E(n),O(this),i}return this.__appendChild(t)})},R=t=>{t.__removeChild||(t.__removeChild=t.removeChild,t.removeChild=function(t){return t&&void 0!==t["s-sn"]&&N(this.__childNodes||this.childNodes,this.tagName,t["s-sn"])&&t.isConnected?(t.remove(),void O(this)):this.__removeChild(t)})},F=t=>{t.__prepend||(t.__prepend=t.prepend,t.prepend=function(...e){e.forEach((e=>{"string"==typeof e&&(e=this.ownerDocument.createTextNode(e));const n=(e["s-sn"]=x(e))||"",o=N(Y(this,"childNodes"),this.tagName,n)[0];if(o){k(e,o,!0);const t=S(o,n)[0],s=Y(t,"parentNode"),l=Y(s,"insertBefore")(e,Y(t,"nextSibling"));return E(o),l}return 1===e.nodeType&&e.getAttribute("slot")&&(e.hidden=!0),t.__prepend(e)}))})},T=t=>{t.__append||(t.__append=t.append,t.append=function(...t){t.forEach((t=>{"string"==typeof t&&(t=this.ownerDocument.createTextNode(t)),this.appendChild(t)}))})},L=t=>{if(t.__insertAdjacentHTML)return;const e=t.insertAdjacentHTML;t.insertAdjacentHTML=function(t,n){if("afterbegin"!==t&&"beforeend"!==t)return e.call(this,t,n);const o=this.ownerDocument.createElement("_");let s;if(o.innerHTML=n,"afterbegin"===t)for(;s=o.firstChild;)this.prepend(s);else if("beforeend"===t)for(;s=o.firstChild;)this.append(s)}},B=t=>{t.insertAdjacentText=function(t,e){this.insertAdjacentHTML(t,e)}},D=t=>{t.__insertBefore||t.__insertBefore||(t.__insertBefore=t.insertBefore,t.insertBefore=function(t,e){const{slotName:n,slotNode:o}=_(t,this),s=this.__childNodes?this.childNodes:w(this.childNodes);if(o){let l=!1;if(s.forEach((s=>{if(s!==e&&null!==e);else{if(l=!0,null===e||n!==e["s-sn"])return void this.appendChild(t);if(n===e["s-sn"]){k(t,o);const n=Y(e,"parentNode");Y(n,"insertBefore")(t,e),E(o)}}})),l)return t}const l=null==e?void 0:e.__parentNode;return l&&!this.isSameNode(l)?this.appendChild(t):this.__insertBefore(t,e)})},P=t=>{if(t.__insertAdjacentElement)return;const e=t.insertAdjacentElement;t.insertAdjacentElement=function(t,n){return"afterbegin"!==t&&"beforeend"!==t?e.call(this,t,n):"afterbegin"===t?(this.prepend(n),n):"beforeend"===t?(this.append(n),n):n}},U=t=>{z("textContent",t),Object.defineProperty(t,"textContent",{get:function(){let t="";return(this.__childNodes?this.childNodes:w(this.childNodes)).forEach((e=>t+=e.textContent||"")),t},set:function(t){(this.__childNodes?this.childNodes:w(this.childNodes)).forEach((t=>{t["s-ol"]&&t["s-ol"].remove(),t.remove()})),this.insertAdjacentHTML("beforeend",t)}})},W=t=>{class e extends Array{item(t){return this[t]}}z("children",t),Object.defineProperty(t,"children",{get(){return this.childNodes.filter((t=>1===t.nodeType))}}),Object.defineProperty(t,"childElementCount",{get(){return this.children.length}}),z("firstChild",t),Object.defineProperty(t,"firstChild",{get(){return this.childNodes[0]}}),z("lastChild",t),Object.defineProperty(t,"lastChild",{get(){return this.childNodes[this.childNodes.length-1]}}),z("childNodes",t),Object.defineProperty(t,"childNodes",{get(){const t=new e;return t.push(...w(this.__childNodes)),t}})},H=t=>{t&&!t.__parentNode&&(z("parentNode",t),Object.defineProperty(t,"parentNode",{get:function(){var t;return(null==(t=this["s-ol"])?void 0:t.parentNode)||this.__parentNode},set:function(t){this.__parentNode=t}}))},V=["children","nextElementSibling","previousElementSibling"],q=["childNodes","firstChild","lastChild","nextSibling","previousSibling","textContent","parentNode"];function z(t,e){if(!globalThis.Node||!globalThis.Element)return;let n;V.includes(t)?n=Object.getOwnPropertyDescriptor(Element.prototype,t):q.includes(t)&&(n=Object.getOwnPropertyDescriptor(Node.prototype,t)),n||(n=Object.getOwnPropertyDescriptor(e,t)),n&&Object.defineProperty(e,"__"+t,n)}function Y(t,e){if("__"+e in t){const n=t["__"+e];return"function"!=typeof n?n:n.bind(t)}return"function"!=typeof t[e]?t[e]:t[e].bind(t)}var I,Z,G=new WeakMap,J=t=>"sc-"+t.h,K=t=>"object"==(t=typeof t)||"function"===t,Q=(t,e,...n)=>{let o=null,s=null,l=null,i=!1,r=!1;const c=[],f=e=>{for(let n=0;n<e.length;n++)o=e[n],Array.isArray(o)?f(o):null!=o&&"boolean"!=typeof o&&((i="function"!=typeof t&&!K(o))&&(o+=""),i&&r?c[c.length-1].p+=o:c.push(i?X(null,o):o),r=i)};if(f(n),e){e.key&&(s=e.key),e.name&&(l=e.name);{const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}}if("function"==typeof t)return t(null===e?{}:e,c,et);const u=X(t,null);return u.v=e,c.length>0&&(u.m=c),u.$=s,u.j=l,u},X=(t,e)=>({i:0,O:t,p:null!=e?e:null,N:null,m:null,v:null,$:null,j:null}),tt={},et={forEach:(t,e)=>t.map(nt).forEach(e),map:(t,e)=>t.map(nt).map(e).map(ot)},nt=t=>({vattrs:t.v,vchildren:t.m,vkey:t.$,vname:t.j,vtag:t.O,vtext:t.p}),ot=t=>{if("function"==typeof t.vtag){const e={...t.vattrs};return t.vkey&&(e.key=t.vkey),t.vname&&(e.name=t.vname),Q(t.vtag,e,...t.vchildren||[])}const e=X(t.vtag,t.vtext);return e.v=t.vattrs,e.m=t.vchildren,e.$=t.vkey,e.j=t.vname,e},st=(t,e,n)=>null==t||K(t)?t:4&e?(n&&"string"==typeof t||"false"!==t)&&(""===t||!!t):2&e?"string"==typeof t?parseFloat(t):"number"==typeof t?t:NaN:1&e?t+"":t,lt=(t,e)=>{const n=t;return{emit:t=>it(n,e,{bubbles:!0,composed:!0,cancelable:!0,detail:t})}},it=(t,e,n)=>{const o=f.ce(e,n);return t.dispatchEvent(o),o},rt=(t,o,s,i,c,u)=>{if(s===i)return;let a=n(t,o),h=o.toLowerCase();if("class"===o){const e=t.classList,n=ft(s);let o=ft(i);e.remove(...n.filter((t=>t&&!o.includes(t)))),e.add(...o.filter((t=>t&&!n.includes(t))))}else if("style"===o){for(const e in s)i&&null!=i[e]||(e.includes("-")?t.style.removeProperty(e):t.style[e]="");for(const e in i)s&&i[e]===s[e]||(e.includes("-")?t.style.setProperty(e,i[e]):t.style[e]=i[e])}else if("key"===o);else if("ref"===o)i&&At(i,t);else if(t.__lookupSetter__(o)||"o"!==o[0]||"n"!==o[1]){if("a"===o[0]&&o.startsWith("attr:")){const n=o.slice(5);let s;{const o=e(t);if(o&&o.o&&o.o.t){const t=o.o.t[n];t&&t[1]&&(s=t[1])}}return s||(s=n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),void(null==i||!1===i?!1===i&&""!==t.getAttribute(s)||t.removeAttribute(s):t.setAttribute(s,!0===i?"":i))}if("p"===o[0]&&o.startsWith("prop:")){const e=o.slice(5);try{t[e]=i}catch(t){}return}{const e=K(i);if((a||e&&null!==i)&&!c)try{if(t.tagName.includes("-"))t[o]!==i&&(t[o]=i);else{const e=null==i?"":i;"list"===o?a=!1:null!=s&&t[o]===e||("function"==typeof t.__lookupSetter__(o)?t[o]=e:t.setAttribute(o,e))}}catch(t){}let n=!1;h!==(h=h.replace(/^xlink\:?/,""))&&(o=h,n=!0),null==i||!1===i?!1===i&&""!==t.getAttribute(o)||(n?t.removeAttributeNS(l,o):t.removeAttribute(o)):(!a||4&u||c)&&!e&&1===t.nodeType&&(i=!0===i?"":i,n?t.setAttributeNS(l,o,i):t.setAttribute(o,i))}}else if(o="-"===o[2]?o.slice(3):n(r,h)?h.slice(2):h[2]+o.slice(3),s||i){const e=o.endsWith(ut);o=o.replace(at,""),s&&f.rel(t,o,s,e),i&&f.ael(t,o,i,e)}},ct=/\s/,ft=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(ct):[]),ut="Capture",at=RegExp(ut+"$"),ht=(t,e,n)=>{const o=11===e.N.nodeType&&e.N.host?e.N.host:e.N,s=t&&t.v||{},l=e.v||{};for(const t of dt(Object.keys(s)))t in l||rt(o,t,s[t],void 0,n,e.i);for(const t of dt(Object.keys(l)))rt(o,t,s[t],l[t],n,e.i)};function dt(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var pt=!1,bt=!1,vt=!1,mt=!1,yt=[],gt=[],$t=(t,e,n)=>{var o;const s=e.m[n];let l,i,c,f=0;if(pt||(vt=!0,"slot"===s.O&&(s.i|=s.m?2:1)),null!=s.p)l=s.N=r.document.createTextNode(s.p);else if(1&s.i)l=s.N=r.document.createTextNode(""),ht(null,s,mt);else{if(mt||(mt="svg"===s.O),!r.document)throw Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");if(l=s.N=r.document.createElementNS(mt?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",!pt&&2&s.i?"slot-fb":s.O),mt&&"foreignObject"===s.O&&(mt=!1),ht(null,s,mt),s.m){const e="template"===s.O?l.content:l;for(f=0;f<s.m.length;++f)i=$t(t,s,f),i&&e.appendChild(i)}"svg"===s.O?mt=!1:"foreignObject"===l.tagName&&(mt=!0)}return l["s-hn"]=Z,3&s.i&&(l["s-sr"]=!0,l["s-cr"]=I,l["s-sn"]=s.j||"",l["s-rf"]=null==(o=s.v)?void 0:o.ref,function(t){if(t.assignedElements||t.assignedNodes||!t["s-sr"])return;const e=e=>function(t){const n=[],o=this["s-sn"];(null==t?void 0:t.flatten)&&console.error("\n Flattening is not supported for Stencil non-shadow slots.\n You can use `.childNodes` to nested slot fallback content.\n If you have a particular use case, please open an issue on the Stencil repo.\n ");const s=this["s-cr"].parentElement;return(s.__childNodes?s.childNodes:w(s.childNodes)).forEach((t=>{o===x(t)&&n.push(t)})),e?n.filter((t=>1===t.nodeType)):n}.bind(t);t.assignedElements=e(!0),t.assignedNodes=e(!1)}(l),c=t&&t.m&&t.m[n],c&&c.O===s.O&&t.N&&jt(t.N)),l},jt=t=>{f.i|=1;const e=t.closest(Z.toLowerCase());if(null!=e){const n=Array.from(e.__childNodes||e.childNodes).find((t=>t["s-cr"])),o=Array.from(t.__childNodes||t.childNodes);for(const t of n?o.reverse():o)null!=t["s-sh"]&&(Mt(e,t,null!=n?n:null),t["s-sh"]=void 0,vt=!0)}f.i&=-2},Ot=(t,e)=>{f.i|=1;const n=Array.from(t.__childNodes||t.childNodes);if(t["s-sr"]){let e=t;for(;e=e.nextSibling;)e&&e["s-sn"]===t["s-sn"]&&e["s-sh"]===Z&&n.push(e)}for(let t=n.length-1;t>=0;t--){const o=n[t];o["s-hn"]!==Z&&o["s-ol"]&&(Mt(Ct(o).parentNode,o,Ct(o)),o["s-ol"].remove(),o["s-ol"]=void 0,o["s-sh"]=void 0,vt=!0),e&&Ot(o,e)}f.i&=-2},wt=(t,e,n,o,s,l)=>{let i,r=t["s-cr"]&&t["s-cr"].parentNode||t;for("template"===n.O&&(r=r.content);s<=l;++s)o[s]&&(i=$t(null,n,s),i&&(o[s].N=i,Mt(r,i,Ct(e))))},Nt=(t,e,n)=>{for(let o=e;o<=n;++o){const e=t[o];if(e){const t=e.N;_t(e),t&&(bt=!0,t["s-ol"]?t["s-ol"].remove():Ot(t,!0),t.remove())}}},St=(t,e,n=!1)=>t.O===e.O&&("slot"===t.O?t.j===e.j:n?(n&&!t.$&&e.$&&(t.$=e.$),!0):t.$===e.$),Ct=t=>t&&t["s-ol"]||t,kt=(t,e,n=!1)=>{const o=e.N=t.N,s=t.m,l=e.m,i=e.O,r=e.p;let c;null==r?(mt="svg"===i||"foreignObject"!==i&&mt,"slot"!==i||pt||t.j!==e.j&&(e.N["s-sn"]=e.j||"",jt(e.N.parentElement)),ht(t,e,mt),null!==s&&null!==l?((t,e,n,o,s=!1)=>{let l,i,r=0,c=0,f=0,u=0,a=e.length-1,h=e[0],d=e[a],p=o.length-1,b=o[0],v=o[p];const m="template"===n.O?t.content:t;for(;r<=a&&c<=p;)if(null==h)h=e[++r];else if(null==d)d=e[--a];else if(null==b)b=o[++c];else if(null==v)v=o[--p];else if(St(h,b,s))kt(h,b,s),h=e[++r],b=o[++c];else if(St(d,v,s))kt(d,v,s),d=e[--a],v=o[--p];else if(St(h,v,s))"slot"!==h.O&&"slot"!==v.O||Ot(h.N.parentNode,!1),kt(h,v,s),Mt(m,h.N,d.N.nextSibling),h=e[++r],v=o[--p];else if(St(d,b,s))"slot"!==h.O&&"slot"!==v.O||Ot(d.N.parentNode,!1),kt(d,b,s),Mt(m,d.N,h.N),d=e[--a],b=o[++c];else{for(f=-1,u=r;u<=a;++u)if(e[u]&&null!==e[u].$&&e[u].$===b.$){f=u;break}f>=0?(i=e[f],i.O!==b.O?l=$t(e&&e[c],n,f):(kt(i,b,s),e[f]=void 0,l=i.N),b=o[++c]):(l=$t(e&&e[c],n,c),b=o[++c]),l&&Mt(Ct(h.N).parentNode,l,Ct(h.N))}r>a?wt(t,null==o[p+1]?null:o[p+1].N,n,o,c,p):c>p&&Nt(e,r,a)})(o,s,e,l,n):null!==l?(null!==t.p&&(o.textContent=""),wt(o,null,e,l,0,l.length-1)):!n&&null!==s&&Nt(s,0,s.length-1),mt&&"svg"===i&&(mt=!1)):(c=o["s-cr"])?c.parentNode.textContent=r:t.p!==r&&(o.data=r)},xt=[],Et=t=>{let e,n,o;const s=t.__childNodes||t.childNodes;for(const t of s){if(t["s-sr"]&&(e=t["s-cr"])&&e.parentNode){n=e.parentNode.__childNodes||e.parentNode.childNodes;const s=t["s-sn"];for(o=n.length-1;o>=0;o--)if(e=n[o],!(e["s-cn"]||e["s-nr"]||e["s-hn"]===t["s-hn"]||e["s-sh"]&&e["s-sh"]===t["s-hn"]))if(C(e,s)){let n=xt.find((t=>t.S===e));bt=!0,e["s-sn"]=e["s-sn"]||s,n?(n.S["s-sh"]=t["s-hn"],n.C=t):(e["s-sh"]=t["s-hn"],xt.push({C:t,S:e})),e["s-sr"]&&xt.map((t=>{C(t.S,e["s-sn"])&&(n=xt.find((t=>t.S===e)),n&&!t.C&&(t.C=n.C))}))}else xt.some((t=>t.S===e))||xt.push({S:e})}1===t.nodeType&&Et(t)}},_t=t=>{t.v&&t.v.ref&&yt.push((()=>t.v.ref(null))),t.m&&t.m.map(_t)},At=(t,e)=>{gt.push((()=>t(e)))},Mt=(t,e,n,o)=>{if("string"==typeof e["s-sn"]){11!==t.getRootNode().nodeType&&H(e),t.insertBefore(e,n);const{slotNode:s}=_(e);return s&&!o&&E(s),e}return t.__insertBefore?t.__insertBefore(e,n):null==t?void 0:t.insertBefore(e,n)},Rt=(t,e,n=!1)=>{var o,s,l,i,c;const u=t.$hostElement$,a=t.o,h=t.k||X(null,null),d=(t=>t&&t.O===tt)(e)?e:Q(null,null,e);if(Z=u.tagName,a._&&(d.v=d.v||{},a._.forEach((([t,e])=>{d.v[e]=u[t]}))),n&&d.v)for(const t of Object.keys(d.v))u.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(d.v[t]=u[t]);if(d.O=null,d.i|=4,t.k=d,d.N=h.N=u,pt=false,I=u["s-cr"],bt=!1,kt(h,d,n),f.i|=1,vt){Et(d.N);for(const t of xt){const e=t.S;if(!e["s-ol"]&&r.document){const t=r.document.createTextNode("");t["s-nr"]=e,Mt(e.parentNode,e["s-ol"]=t,e,n)}}for(const t of xt){const e=t.S,c=t.C;if(1===e.nodeType&&n&&(e["s-ih"]=null!=(o=e.hidden)&&o),c){const t=c.parentNode;let o=c.nextSibling;if(o&&1===o.nodeType){let n=null==(s=e["s-ol"])?void 0:s.previousSibling;for(;n;){let s=null!=(l=n["s-nr"])?l:null;if(s&&s["s-sn"]===e["s-sn"]&&t===(s.__parentNode||s.parentNode)){for(s=s.nextSibling;s===e||(null==s?void 0:s["s-sr"]);)s=null==s?void 0:s.nextSibling;if(!s||!s["s-nr"]){o=s;break}}n=n.previousSibling}}if((!o&&t!==(e.__parentNode||e.parentNode)||(e.__nextSibling||e.nextSibling)!==o)&&e!==o){if(Mt(t,e,o,n),8===e.nodeType&&e.nodeValue.startsWith("s-nt-")){const t=r.document.createTextNode(e.nodeValue.replace(/^s-nt-/,""));t["s-hn"]=e["s-hn"],t["s-sn"]=e["s-sn"],t["s-sh"]=e["s-sh"],t["s-sr"]=e["s-sr"],t["s-ol"]=e["s-ol"],t["s-ol"]["s-nr"]=t,Mt(e.parentNode,t,e,n),e.parentNode.removeChild(e)}1===e.nodeType&&"SLOT-FB"!==e.tagName&&(e.hidden=null!=(i=e["s-ih"])&&i)}e&&"function"==typeof c["s-rf"]&&c["s-rf"](c)}else 1===e.nodeType&&(e.hidden=!0)}}if(bt&&O(d.N),f.i&=-2,xt.length=0,!pt&&!(1&a.i)&&u["s-cr"]){const t=d.N.__childNodes||d.N.childNodes;for(const e of t)if(e["s-hn"]!==Z&&!e["s-sh"])if(n&&null==e["s-ih"]&&(e["s-ih"]=null!=(c=e.hidden)&&c),1===e.nodeType)e.hidden=!0;else if(3===e.nodeType&&e.nodeValue.trim()){const t=r.document.createComment("s-nt-"+e.nodeValue);t["s-sn"]=e["s-sn"],Mt(e.parentNode,t,e,n),e.parentNode.removeChild(e)}}I=void 0,yt.forEach((t=>t())),yt.length=0,gt.forEach((t=>t())),gt.length=0},Ft=(t,e)=>{if(e&&!t.A&&e["s-p"]){const n=e["s-p"].push(new Promise((o=>t.A=()=>{e["s-p"].splice(n-1,1),o()})))}},Tt=(t,e)=>{if(t.i|=16,4&t.i)return void(t.i|=512);Ft(t,t.M);const n=()=>Lt(t,e);if(!e)return g(n);queueMicrotask((()=>{n()}))},Lt=(t,e)=>{const n=t.$hostElement$,o=n;if(!o)throw Error(`Can't render component <${n.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let s;return s=Vt(o,e?"componentWillLoad":"componentWillUpdate",void 0,n),s=Bt(s,(()=>Vt(o,"componentWillRender",void 0,n))),Bt(s,(()=>Pt(t,o,e)))},Bt=(t,e)=>Dt(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),Dt=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,Pt=async(t,e,n)=>{var o;const l=t.$hostElement$,i=l["s-rc"];n&&(t=>{const e=t.o;((t,e)=>{var n,o,l;const i=J(e),c=s.get(i);if(!r.document)return i;if(t=11===t.nodeType?t:r.document,c)if("string"==typeof c){let s,l=G.get(t=t.head||t);if(l||G.set(t,l=new Set),!l.has(i)){s=r.document.createElement("style"),s.textContent=c;const h=null!=(n=f.R)?n:function(){var t,e,n;return null!=(n=null==(e=null==(t=r.document.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:e.getAttribute("content"))?n:void 0}();if(null!=h&&s.setAttribute("nonce",h),!(1&e.i))if("HEAD"===t.nodeName){const e=t.querySelectorAll("link[rel=preconnect]"),n=e.length>0?e[e.length-1].nextSibling:t.querySelector("style");t.insertBefore(s,(null==n?void 0:n.parentNode)===t?n:null)}else if("host"in t)if(u){const e=new(null!=(o=t.defaultView)?o:t.ownerDocument.defaultView).CSSStyleSheet;e.replaceSync(c),a?t.adoptedStyleSheets.unshift(e):t.adoptedStyleSheets=[e,...t.adoptedStyleSheets]}else{const e=t.querySelector("style");e?e.textContent=c+e.textContent:t.prepend(s)}else t.append(s);1&e.i&&t.insertBefore(s,null),4&e.i&&(s.textContent+="slot-fb{display:contents}slot-fb[hidden]{display:none}"),l&&l.add(i)}}else{let e=G.get(t);if(e||G.set(t,e=new Set),!e.has(i)){const n=null!=(l=t.defaultView)?l:t.ownerDocument.defaultView;let o;if(c.constructor===n.CSSStyleSheet)o=c;else{o=new n.CSSStyleSheet;for(let t=0;t<c.cssRules.length;t++)o.insertRule(c.cssRules[t].cssText,t)}a?t.adoptedStyleSheets.push(o):t.adoptedStyleSheets=[...t.adoptedStyleSheets,o],e.add(i)}}})(t.$hostElement$.getRootNode(),e)})(t);Ut(t,e,l,n),i&&(i.map((t=>t())),l["s-rc"]=void 0);{const e=null!=(o=l["s-p"])?o:[],n=()=>Wt(t);0===e.length?n():(Promise.all(e).then(n).catch(n),t.i|=4,e.length=0)}},Ut=(t,e,n,s)=>{try{e=e.render(),t.i&=-17,t.i|=2,Rt(t,e,s)}catch(e){o(e,t.$hostElement$)}return null},Wt=t=>{const e=t.$hostElement$,n=e,o=t.M;Vt(n,"componentDidRender",void 0,e),64&t.i?Vt(n,"componentDidUpdate",void 0,e):(t.i|=64,qt(e),Vt(n,"componentDidLoad",void 0,e),t.F(e),o||Ht()),t.A&&(t.A(),t.A=void 0),512&t.i&&y((()=>Tt(t,!1))),t.i&=-517},Ht=()=>{y((()=>it(r,"appload",{detail:{namespace:"boreal-web-components"}})))},Vt=(t,e,n,s)=>{if(t&&t[e])try{return t[e](n)}catch(t){o(t,s)}},qt=t=>t.classList.add("hydrated"),zt=(t,n,s,l)=>{const i=e(t);if(!i)return;const r=t,c=i.l.get(n),f=i.i,u=r;if(!((s=st(s,l.t[n][0],!!(64&l.i)))===c||Number.isNaN(c)&&Number.isNaN(s))){if(i.l.set(n,s),l.T){const t=l.T[n];t&&t.map((t=>{try{const[[e,o]]=Object.entries(t);(128&f||1&o)&&(u?u[e](s,c,n):i.L.push((()=>{i.B[e](s,c,n)})))}catch(t){o(t,r)}}))}if(2&f){if(u.componentShouldUpdate&&!1===u.componentShouldUpdate(s,c,n)&&!(16&f))return;16&f||Tt(i,!1)}}},Yt=(t,n,o)=>{var s,l;const r=t.prototype;64&n.i&&1&o&&i.forEach((t=>{const n=r[t];Object.defineProperty(r,t,{value(...o){var s;const l=e(this),i=this;i?"function"==typeof n&&n.call(i,...o):null==(s=null==l?void 0:l.D)||s.then((e=>{const n=e[t];"function"==typeof n&&n.call(e,...o)}))}})}));{t.watchers&&!n.T&&(n.T=t.watchers),t.deserializers&&!n.P&&(n.P=t.deserializers),t.serializers&&!n.U&&(n.U=t.serializers);const o=Object.entries(null!=(s=n.t)?s:{});o.map((([t,[o]])=>{if(31&o||32&o){const{get:s,set:l}=Object.getOwnPropertyDescriptor(r,t)||{};s&&(n.t[t][0]|=2048),l&&(n.t[t][0]|=4096),Object.defineProperty(r,t,{get(){return s?s.apply(this):((t,n)=>e(this).l.get(n))(0,t)},configurable:!0,enumerable:!0}),Object.defineProperty(r,t,{set(s){const i=e(this);if(i){if(l)return void 0===(32&o?this[t]:i.$hostElement$[t])&&i.l.get(t)&&(s=i.l.get(t)),l.call(this,st(s,o,!!(64&n.i))),void zt(this,t,s=32&o?this[t]:i.$hostElement$[t],n);zt(this,t,s,n)}}})}}));{const s=new Map;r.attributeChangedCallback=function(t,l,i){f.jmp((()=>{var c;const f=s.get(t),u=e(this);if(this.hasOwnProperty(f),r.hasOwnProperty(f)&&"number"==typeof this[f]&&this[f]==i)return;if(null==f){const e=null==u?void 0:u.i;if(u&&e&&!(8&e)&&i!==l){const o=this,s=null==(c=n.T)?void 0:c[t];null==s||s.forEach((n=>{const[[s,r]]=Object.entries(n);null!=o[s]&&(128&e||1&r)&&o[s].call(o,i,l,t)}))}return}const a=o.find((([t])=>t===f));a&&4&a[1][0]&&(i=null!==i&&"false"!==i);const h=Object.getOwnPropertyDescriptor(r,f);i==this[f]||h.get&&!h.set||(this[f]=i)}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(l=n.T)?l:{}),...o.filter((([t,e])=>31&e[0])).map((([t,e])=>{var o;const l=e[1]||t;return s.set(l,t),512&e[0]&&(null==(o=n._)||o.push([t,l])),l}))]))}}return t},It=(n,l)=>{const i={i:l[0],h:l[1]};try{i.t=l[2],i.W=l[3],i.T=n.T,i.P=n.P,i.U=n.U,i._=[],!(1&i.i)&&256&i.i?(t=>{A(t),M(t),T(t),F(t),P(t),L(t),B(t),D(t),U(t),W(t),R(t)})(n.prototype):A(n.prototype);const c=n.prototype.connectedCallback,a=n.prototype.disconnectedCallback;return Object.assign(n.prototype,{__hasHostListenerAttached:!1,__registerHost(){((e,n)=>{const o={i:0,$hostElement$:e,o:n,l:new Map,H:new Map};o.D=new Promise((t=>o.F=t)),e["s-p"]=[],e["s-rc"]=[];const s=o;e.__stencil__getHostRef=()=>s,512&n.i&&t(e,o)})(this,i)},connectedCallback(){if(!this.__hasHostListenerAttached){const t=e(this);if(!t)return;Gt(this,t,i.W),this.__hasHostListenerAttached=!0}(t=>{if(!(1&f.i)){const n=e(t);if(!n)return;const l=n.o,i=()=>{};if(1&n.i)Gt(t,n,l.W),(null==n?void 0:n.B)||(null==n?void 0:n.D)&&n.D.then((()=>{}));else{n.i|=1,12&l.i&&(t=>{if(!r.document)return;const e=t["s-cr"]=r.document.createComment("");e["s-cn"]=!0,Mt(t,e,t.firstChild)})(t);{let e=t;for(;e=e.parentNode||e.host;)if(e["s-p"]){Ft(n,n.M=e);break}}l.t&&Object.entries(l.t).map((([e,[n]])=>{if(31&n&&e in t&&t[e]!==Object.prototype[e]){const n=t[e];delete t[e],t[e]=n}})),(async(t,e,n)=>{let l;try{if(!(32&e.i)&&(e.i|=32,l=t.constructor,customElements.whenDefined(t.localName).then((()=>e.i|=128)),l&&l.style)){let t;"string"==typeof l.style&&(t=l.style);const e=J(n);if(!s.has(e)){const o=()=>{};((t,e,n)=>{let o=s.get(t);u&&n?(o=o||new CSSStyleSheet,"string"==typeof o?o=e:o.replaceSync(e)):o=e,s.set(t,o)})(e,t,!!(1&n.i)),o()}}const o=e.M,i=()=>Tt(e,!0);o&&o["s-rc"]?o["s-rc"].push(i):i()}catch(n){o(n,t),e.A&&(e.A(),e.A=void 0),e.F&&e.F(t)}})(t,n,l)}i()}})(this),c&&c.call(this)},disconnectedCallback(){(async t=>{if(!(1&f.i)){const n=e(t);(null==n?void 0:n.V)&&(n.V.map((t=>t())),n.V=void 0)}G.has(t)&&G.delete(t),t.shadowRoot&&G.has(t.shadowRoot)&&G.delete(t.shadowRoot)})(this),a&&a.call(this)},__attachShadow(){this.shadowRoot=this}}),Object.defineProperty(n,"is",{value:i.h,configurable:!0}),Yt(n,i,3)}catch(t){return o(t),n}},Zt=(t,e)=>e,Gt=(t,e,n)=>{n&&r.document&&n.map((([n,o,s])=>{const l=t,i=Jt(e,s),r=Kt(n);f.ael(l,o,i,r),(e.V=e.V||[]).push((()=>f.rel(l,o,i,r)))}))},Jt=(t,e)=>n=>{try{t.$hostElement$[e](n)}catch(e){o(e,t.$hostElement$)}},Kt=t=>({passive:!!(1&t),capture:!!(2&t)}),Qt=globalThis.HTMLElement||class{};function Xt(...t){return t.reduceRight(((t,e)=>e(t)),Qt)}var te=t=>f.R=t,ee=t=>Object.assign(f,t);function ne(t,e){Rt({o:{i:0,h:e.tagName},$hostElement$:e},t)}function oe(t){return t}export{Zt as F,c as H,Xt as M,tt as a,lt as c,$ as getAssetPath,Q as h,It as p,ne as render,j as setAssetPath,te as setNonce,ee as setPlatformOptions,oe as t}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as o,H as t,c as r,h as b,t as e}from"./index.js";import{C as a}from"./p-Bfazyxqi.js";import{v as s}from"./p-kGnB15Lz.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.handleClick(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:"e5e7dd996abf7f32218d1871069f4cdd5070cb6b",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:"815ced9f3e464c73f371227c098ea65a7097f376",class:"bds-button__content"},b("span",{key:"350acb5924bb036afeb2c252c71261c5b2015b1e",class:"bds-button__content-icon bds-button__content-icon--start"},b("slot",{key:"57feb7a77e7edd0d43c3432a5822cdaec60729f6",name:"icon"})),b("slot",{key:"07536c420613bc6d4d53b5947524e69999937d19"}),b("span",{key:"ae96692ab7ffe82df0f2a2cb685704912724df35",class:"bds-button__content-badge"},b("slot",{key:"6a802ae2b19f85c3678c16f7950b597efc981da6",name:"badge"})),this.disclosure&&b("span",{key:"c38f71595010045c86257f6d5c3ce48a504966ad",class:"bds-button__content-icon"},b("i",{key:"a51aff2455184cd38b2d7ebd52cc9c590b81601c",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}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={DEFAULT:"default",ERROR:"error",DISABLED:"disabled",ACTIVE:"active"},E={NEUTRAL:"neutral",PENDING:"pending",IN_PROGRESS:"in-progress",COMPLETE:"complete",CANCEL:"cancel"},a={INFO:"info",SUCCESS:"success",WARNING:"warning",DANGER:"danger"};export{e as C,E as P,a as S}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as t,M as o,h as e,a as i,t as r}from"./index.js";import{a,g as s}from"./p-CrAt6pGl.js";const l=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:s(this.floatingOptions?.hideArrow,this.floatingOptions.offset,4),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:"7ba6db9103d172c519e4f9bd3e8743ba506057f1",class:"tooltip"},e("div",{key:"bea4019c3c4d0d1ac605e3c7d5e35564c8173c9e",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:"f598c2b54709269fcb1d3335d86400cc3ab4a177",class:"tooltip-arrow",part:"arrow",ref:t=>this.arrowElement=t}),e("slot",{key:"2a18a5c6839c21ec3c0a9f82b6117bded3c08b26"})))}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;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);-webkit-transform-origin:center;transform-origin:center;inset:0}.tooltip-content[data-placement^=top] .tooltip-arrow{bottom:calc(var(--tooltip-arrow-size) / -2)}.tooltip-content[data-placement^=bottom] .tooltip-arrow{top:calc(var(--tooltip-arrow-size) / -2)}.tooltip-content[data-placement^=left] .tooltip-arrow{right:calc(var(--tooltip-arrow-size) / -2)}.tooltip-content[data-placement^=right] .tooltip-arrow{left:calc(var(--tooltip-arrow-size) / -2)}'}},[772,"bds-tooltip",{multiline:[4],disabled:[4],floatingOptions:[16],isVisible:[32]}]);function n(){"undefined"!=typeof customElements&&["bds-tooltip"].forEach((t=>{"bds-tooltip"===t&&(customElements.get(r(t))||customElements.define(r(t),l))}))}export{l as B,n as d}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{f as t}from"./p-DCXSEEVH.js";const n="focus",e="blur",o={Enter:{key:"Enter"},Escape:{key:"Escape"},Space:{key:" "},ArrowUp:{key:"ArrowUp"},ArrowDown:{key:"ArrowDown"}},i=Math.min,r=Math.max,s=Math.round,l=Math.floor,a=t=>({x:t,y:t}),c={left:"right",right:"left",bottom:"top",top:"bottom"},u={start:"end",end:"start"};function f(t,n,e){return r(t,i(n,e))}function d(t,n){return"function"==typeof t?t(n):t}function h(t){return t.split("-")[0]}function p(t){return t.split("-")[1]}function m(t){return"x"===t?"y":"x"}function y(t){return"y"===t?"height":"width"}const w=new Set(["top","bottom"]);function g(t){return w.has(h(t))?"y":"x"}function x(t){return m(g(t))}function v(t){return t.replace(/start|end/g,(t=>u[t]))}const b=["left","right"],A=["right","left"],S=["top","bottom"],F=["bottom","top"];function k(t){return t.replace(/left|right|bottom|top/g,(t=>c[t]))}function R(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 D(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 E(t,n,e){let{reference:o,floating:i}=t;const r=g(n),s=x(n),l=y(s),a=h(n),c="y"===r,u=o.x+o.width/2-i.width/2,f=o.y+o.height/2-i.height/2,d=o[l]/2-i[l]/2;let m;switch(a){case"top":m={x:u,y:o.y-i.height};break;case"bottom":m={x:u,y:o.y+o.height};break;case"right":m={x:o.x+o.width,y:f};break;case"left":m={x:o.x-i.width,y:f};break;default:m={x:o.x,y:o.y}}switch(p(n)){case"start":m[s]-=d*(e&&c?-1:1);break;case"end":m[s]+=d*(e&&c?-1:1)}return m}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:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:h=!1,padding:p=0}=d(n,t),m=R(p),y=l[h?"floating"===f?"reference":"floating":f],w=D(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:c,rootBoundary:u,strategy:a})),g="floating"===f?{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=D(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:g,offsetParent:x,strategy:a}):g);return{top:(w.top-b.top+m.top)/v.y,bottom:(b.bottom-w.bottom+m.bottom)/v.y,left:(w.left-b.left+m.left)/v.x,right:(b.right-w.right+m.right)/v.x}}const T=new Set(["left","top"]);function C(){return"undefined"!=typeof window}function L(t){return M(t)?(t.nodeName||"").toLowerCase():"#document"}function O(t){var n;return(null==t||null==(n=t.ownerDocument)?void 0:n.defaultView)||window}function $(t){var n;return null==(n=(M(t)?t.ownerDocument:t.document)||window.document)?void 0:n.documentElement}function M(t){return!!C()&&(t instanceof Node||t instanceof O(t).Node)}function z(t){return!!C()&&(t instanceof Element||t instanceof O(t).Element)}function B(t){return!!C()&&(t instanceof HTMLElement||t instanceof O(t).HTMLElement)}function q(t){return!(!C()||"undefined"==typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof O(t).ShadowRoot)}const U=new Set(["inline","contents"]);function j(t){const{overflow:n,overflowX:e,overflowY:o,display:i}=Q(t);return/auto|scroll|overlay|hidden|clip/.test(n+o+e)&&!U.has(i)}const H=new Set(["table","td","th"]);function I(t){return H.has(L(t))}const N=[":popover-open",":modal"];function K(t){return N.some((n=>{try{return t.matches(n)}catch(t){return!1}}))}const V=["transform","translate","scale","rotate","perspective"],W=["transform","translate","scale","rotate","perspective","filter"],X=["paint","layout","strict","content"];function Y(t){const n=_(),e=z(t)?Q(t):t;return V.some((t=>!!e[t]&&"none"!==e[t]))||!!e.containerType&&"normal"!==e.containerType||!n&&!!e.backdropFilter&&"none"!==e.backdropFilter||!n&&!!e.filter&&"none"!==e.filter||W.some((t=>(e.willChange||"").includes(t)))||X.some((t=>(e.contain||"").includes(t)))}function _(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const G=new Set(["html","body","#document"]);function J(t){return G.has(L(t))}function Q(t){return O(t).getComputedStyle(t)}function Z(t){return z(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function tt(t){if("html"===L(t))return t;const n=t.assignedSlot||t.parentNode||q(t)&&t.host||$(t);return q(n)?n.host:n}function nt(t){const n=tt(t);return J(n)?t.ownerDocument?t.ownerDocument.body:t.body:B(n)&&j(n)?n:nt(n)}function et(t,n,e){var o;void 0===n&&(n=[]),void 0===e&&(e=!0);const i=nt(t),r=i===(null==(o=t.ownerDocument)?void 0:o.body),s=O(i);if(r){const t=ot(s);return n.concat(s,s.visualViewport||[],j(i)?i:[],t&&e?et(t):[])}return n.concat(i,et(i,[],e))}function ot(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function it(t){const n=Q(t);let e=parseFloat(n.width)||0,o=parseFloat(n.height)||0;const i=B(t),r=i?t.offsetWidth:e,l=i?t.offsetHeight:o,a=s(e)!==r||s(o)!==l;return a&&(e=r,o=l),{width:e,height:o,$:a}}function rt(t){return z(t)?t:t.contextElement}function st(t){const n=rt(t);if(!B(n))return a(1);const e=n.getBoundingClientRect(),{width:o,height:i,$:r}=it(n);let l=(r?s(e.width):e.width)/o,c=(r?s(e.height):e.height)/i;return l&&Number.isFinite(l)||(l=1),c&&Number.isFinite(c)||(c=1),{x:l,y:c}}const lt=a(0);function at(t){const n=O(t);return _()&&n.visualViewport?{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}:lt}function ct(t,n,e,o){void 0===n&&(n=!1),void 0===e&&(e=!1);const i=t.getBoundingClientRect(),r=rt(t);let s=a(1);n&&(o?z(o)&&(s=st(o)):s=st(t));const l=function(t,n,e){return void 0===n&&(n=!1),!(!e||n&&e!==O(t))&&n}(r,e,o)?at(r):a(0);let c=(i.left+l.x)/s.x,u=(i.top+l.y)/s.y,f=i.width/s.x,d=i.height/s.y;if(r){const t=O(r),n=o&&z(o)?O(o):o;let e=t,i=ot(e);for(;i&&o&&n!==e;){const t=st(i),n=i.getBoundingClientRect(),o=Q(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,d*=t.y,c+=r,u+=s,e=O(i),i=ot(e)}}return D({width:f,height:d,x:c,y:u})}function ut(t,n){const e=Z(t).scrollLeft;return n?n.left+e:ct($(t)).left+e}function ft(t,n){const e=t.getBoundingClientRect();return{x:e.left+n.scrollLeft-ut(t,e),y:e.top+n.scrollTop}}const dt=new Set(["absolute","fixed"]);function ht(t,n,e){let o;if("viewport"===n)o=function(t,n){const e=O(t),o=$(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=_();(!t||t&&"fixed"===n)&&(l=i.offsetLeft,a=i.offsetTop)}const c=ut(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,e);else if("document"===n)o=function(t){const n=$(t),e=Z(t),o=t.ownerDocument.body,i=r(n.scrollWidth,n.clientWidth,o.scrollWidth,o.clientWidth),s=r(n.scrollHeight,n.clientHeight,o.scrollHeight,o.clientHeight);let l=-e.scrollLeft+ut(t);const a=-e.scrollTop;return"rtl"===Q(o).direction&&(l+=r(n.clientWidth,o.clientWidth)-i),{width:i,height:s,x:l,y:a}}($(t));else if(z(n))o=function(t,n){const e=ct(t,!0,"fixed"===n),o=e.top+t.clientTop,i=e.left+t.clientLeft,r=B(t)?st(t):a(1);return{width:t.clientWidth*r.x,height:t.clientHeight*r.y,x:i*r.x,y:o*r.y}}(n,e);else{const e=at(t);o={x:n.x-e.x,y:n.y-e.y,width:n.width,height:n.height}}return D(o)}function pt(t,n){const e=tt(t);return!(e===n||!z(e)||J(e))&&("fixed"===Q(e).position||pt(e,n))}function mt(t,n,e){const o=B(n),i=$(n),r="fixed"===e,s=ct(t,!0,r,n);let l={scrollLeft:0,scrollTop:0};const c=a(0);function u(){c.x=ut(i)}if(o||!o&&!r)if(("body"!==L(n)||j(i))&&(l=Z(n)),o){const t=ct(n,!0,r,n);c.x=t.x+n.clientLeft,c.y=t.y+n.clientTop}else i&&u();r&&!o&&i&&u();const f=!i||o||r?a(0):ft(i,l);return{x:s.left+l.scrollLeft-c.x-f.x,y:s.top+l.scrollTop-c.y-f.y,width:s.width,height:s.height}}function yt(t){return"static"===Q(t).position}function wt(t,n){if(!B(t)||"fixed"===Q(t).position)return null;if(n)return n(t);let e=t.offsetParent;return $(t)===e&&(e=e.ownerDocument.body),e}function gt(t,n){const e=O(t);if(K(t))return e;if(!B(t)){let n=tt(t);for(;n&&!J(n);){if(z(n)&&!yt(n))return n;n=tt(n)}return e}let o=wt(t,n);for(;o&&I(o)&&yt(o);)o=wt(o,n);return o&&J(o)&&yt(o)&&!Y(o)?e:o||function(t){let n=tt(t);for(;B(n)&&!J(n);){if(Y(n))return n;if(K(n))return null;n=tt(n)}return null}(t)||e}const xt={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:n,rect:e,offsetParent:o,strategy:i}=t;const r="fixed"===i,s=$(o),l=!!n&&K(n.floating);if(o===s||l&&r)return e;let c={scrollLeft:0,scrollTop:0},u=a(1);const f=a(0),d=B(o);if((d||!d&&!r)&&(("body"!==L(o)||j(s))&&(c=Z(o)),B(o))){const t=ct(o);u=st(o),f.x=t.x+o.clientLeft,f.y=t.y+o.clientTop}const h=!s||d||r?a(0):ft(s,c);return{width:e.width*u.x,height:e.height*u.y,x:e.x*u.x-c.scrollLeft*u.x+f.x+h.x,y:e.y*u.y-c.scrollTop*u.y+f.y+h.y}},getDocumentElement:$,getClippingRect:function(t){let{element:n,boundary:e,rootBoundary:o,strategy:s}=t;const l=[..."clippingAncestors"===e?K(n)?[]:function(t,n){const e=n.get(t);if(e)return e;let o=et(t,[],!1).filter((t=>z(t)&&"body"!==L(t))),i=null;const r="fixed"===Q(t).position;let s=r?tt(t):t;for(;z(s)&&!J(s);){const n=Q(s),e=Y(s);e||"fixed"!==n.position||(i=null),(r?!e&&!i:!e&&"static"===n.position&&i&&dt.has(i.position)||j(s)&&!e&&pt(t,s))?o=o.filter((t=>t!==s)):i=n,s=tt(s)}return n.set(t,o),o}(n,this._c):[].concat(e),o],a=l.reduce(((t,e)=>{const o=ht(n,e,s);return t.top=r(o.top,t.top),t.right=i(o.right,t.right),t.bottom=i(o.bottom,t.bottom),t.left=r(o.left,t.left),t}),ht(n,l[0],s));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:gt,getElementRects:async function(t){const n=this.getOffsetParent||gt,e=this.getDimensions,o=await e(t.floating);return{reference:mt(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}=it(t);return{width:n,height:e}},getScale:st,isElement:z,isRTL:function(t){return"rtl"===Q(t).direction}};function vt(t,n){return t.x===n.x&&t.y===n.y&&t.width===n.width&&t.height===n.height}const bt=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=h(e),l=p(e),a="y"===g(e),c=T.has(s)?-1:1,u=r&&a?-1:1,f=d(n,t);let{mainAxis:m,crossAxis:y,alignmentAxis:w}="number"==typeof f?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return l&&"number"==typeof w&&(y="end"===l?-1*w:w),a?{x:y*u,y:m*c}:{x:m*c,y:y*u}}(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}}}}},At=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:c}=n,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:m,fallbackStrategy:w="bestFit",fallbackAxisSideDirection:R="none",flipAlignment:D=!0,...E}=d(t,n);if(null!=(e=r.arrow)&&e.alignmentOffset)return{};const P=h(i),T=g(l),C=h(l)===l,L=await(null==a.isRTL?void 0:a.isRTL(c.floating)),O=m||(C||!D?[k(l)]:function(t){const n=k(t);return[v(t),n,v(n)]}(l)),$="none"!==R;!m&&$&&O.push(...function(t,n,e,o){const i=p(t);let r=function(t,n,e){switch(t){case"top":case"bottom":return e?n?A:b:n?b:A;case"left":case"right":return n?S:F;default:return[]}}(h(t),"start"===e,o);return i&&(r=r.map((t=>t+"-"+i)),n&&(r=r.concat(r.map(v)))),r}(l,D,R,L));const M=[l,...O],z=await a.detectOverflow(n,E),B=[];let q=(null==(o=r.flip)?void 0:o.overflows)||[];if(u&&B.push(z[P]),f){const t=function(t,n,e){void 0===e&&(e=!1);const o=p(t),i=x(t),r=y(i);let s="x"===i?o===(e?"end":"start")?"right":"left":"start"===o?"bottom":"top";return n.reference[r]>n.floating[r]&&(s=k(s)),[s,k(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 U,j;const t=((null==(U=r.flip)?void 0:U.index)||0)+1,n=M[t];if(n&&("alignment"!==f||T===g(n)||q.every((t=>g(t.placement)!==T||t.overflows[0]>0))))return{data:{index:t,overflows:q},reset:{placement:n}};let e=null==(j=q.filter((t=>t.overflows[0]<=0)).sort(((t,n)=>t.overflows[1]-n.overflows[1]))[0])?void 0:j.placement;if(!e)switch(w){case"bestFit":{var H;const t=null==(H=q.filter((t=>{if($){const n=g(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:H[0];t&&(e=t);break}case"initialPlacement":e=l}if(i!==e)return{reset:{placement:e}}}return{}}}};class St{error(t,n){throw new Error(`[${t}]: ${n}`)}warn(t,n){console.warn(`[${t}]: ${n}`)}log(t,n){console.log(`[${t}]: ${n}`)}}class Ft{constructor(t){this.logger=t}async computePosition(t,n,e){null==t&&this.logger.error("FloatingAdapter.computePosition","Reference element is required for positioning."),null==n&&this.logger.error("FloatingAdapter.computePosition","Floating element is required for positioning.");const{placement:o,offset:r,flip:s,shift:l,arrow:a,strategy:c}=e,u=[bt(r)];s&&u.push(At()),l&&u.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:a={fn:t=>{let{x:n,y:e}=t;return{x:n,y:e}}},...c}=d(t,n),u={x:e,y:o},p=await r.detectOverflow(n,c),y=g(h(i)),w=m(y);let x=u[w],v=u[y];s&&(x=f(x+p["y"===w?"top":"left"],x,x-p["y"===w?"bottom":"right"])),l&&(v=f(v+p["y"===y?"top":"left"],v,v-p["y"===y?"bottom":"right"]));const b=a.fn({...n,[w]:x,[y]:v});return{...b,data:{x:b.x-e,y:b.y-o,enabled:{[w]:s,[y]:l}}}}}}()),null!=a&&u.push((t=>({name:"arrow",options:t,async fn(n){const{x:e,y:o,placement:r,rects:s,platform:l,elements:a,middlewareData:c}=n,{element:u,padding:h=0}=d(t,n)||{};if(null==u)return{};const m=R(h),w={x:e,y:o},g=x(r),v=y(g),b=await l.getDimensions(u),A="y"===g,S=A?"top":"left",F=A?"bottom":"right",k=A?"clientHeight":"clientWidth",D=s.reference[v]+s.reference[g]-w[g]-s.floating[v],E=w[g]-s.reference[g],P=await(null==l.getOffsetParent?void 0:l.getOffsetParent(u));let T=P?P[k]:0;T&&await(null==l.isElement?void 0:l.isElement(P))||(T=a.floating[k]||s.floating[v]);const C=D/2-E/2,L=T/2-b[v]/2-1,O=i(m[S],L),$=i(m[F],L),M=O,z=T-b[v]-$,B=T/2-b[v]/2+C,q=f(M,B,z),U=!c.arrow&&null!=p(r)&&B!==q&&s.reference[v]/2-(B<M?O:$)-b[v]/2<0,j=U?B<M?B-M:B-z:0;return{[g]:w[g]+j,data:{[g]:q,centerOffset:B-q-j,...U&&{alignmentOffset:j}},reset:U}}}))({element:a}));const w=await((t,n,e)=>{const o=new Map,i={platform:xt,...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}=E(c,o,a),d=o,h={},p=0;for(let e=0;e<l.length;e++){var m;const{name:r,fn:y}=l[e],{x:w,y:g,data:x,reset:v}=await y({x:u,y:f,initialPlacement:o,placement:d,strategy:i,middlewareData:h,rects:c,platform:{...s,detectOverflow:null!=(m=s.detectOverflow)?m:P},elements:{reference:t,floating:n}});u=null!=w?w:u,f=null!=g?g:f,h={...h,[r]:{...h[r],...x}},v&&p<=50&&(p++,"object"==typeof v&&(v.placement&&(d=v.placement),v.rects&&(c=!0===v.rects?await s.getElementRects({reference:t,floating:n,strategy:i}):v.rects),({x:u,y:f}=E(c,d,a))),e=-1)}return{x:u,y:f,placement:d,strategy:i,middlewareData:h}})(t,n,{...i,platform:r})})(t,n,{placement:o,middleware:u,strategy:c}).catch((t=>{this.logger.error("FloatingAdapter.computePosition",t.message)})).then((t=>t)),{x:v,y:b,placement:A,middlewareData:S}=w;return{x:v,y:b,placement:A,middlewareData:S}}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 kt extends Ft{constructor(){super(new St)}}const Rt=s=>class extends(t(s)){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)}hideFocus(){const t=this.floatingContent?.contains(document.activeElement);t&&document.activeElement?.blur()}hideElement(){this.stopAutoUpdate(),this.hideFocus(),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!==o.Enter.key&&" "!==t.key||n(),t.key===o.Escape.key&&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,n,e,o){const s=()=>{this.updatePosition(t,n,e,o)};s(),this.cleanupAutoUpdate=function(t,n,e,o){void 0===o&&(o={});const{ancestorScroll:s=!0,ancestorResize:a=!0,elementResize:c="function"==typeof ResizeObserver,layoutShift:u="function"==typeof IntersectionObserver,animationFrame:f=!1}=o,d=rt(t),h=s||a?[...d?et(d):[],...et(n)]:[];h.forEach((t=>{s&&t.addEventListener("scroll",e,{passive:!0}),a&&t.addEventListener("resize",e)}));const p=d&&u?function(t,n){let e,o=null;const s=$(t);function a(){var t;clearTimeout(e),null==(t=o)||t.disconnect(),o=null}return function c(u,f){void 0===u&&(u=!1),void 0===f&&(f=1),a();const d=t.getBoundingClientRect(),{left:h,top:p,width:m,height:y}=d;if(u||n(),!m||!y)return;const w={rootMargin:-l(p)+"px "+-l(s.clientWidth-(h+m))+"px "+-l(s.clientHeight-(p+y))+"px "+-l(h)+"px",threshold:r(0,i(1,f))||1};let g=!0;function x(n){const o=n[0].intersectionRatio;if(o!==f){if(!g)return c();o?c(!1,o):e=setTimeout((()=>{c(!1,1e-7)}),1e3)}1!==o||vt(d,t.getBoundingClientRect())||c(),g=!1}try{o=new IntersectionObserver(x,{...w,root:s.ownerDocument})}catch(t){o=new IntersectionObserver(x,w)}o.observe(t)}(!0),a}(d,e):null;let m,y=-1,w=null;c&&(w=new ResizeObserver((t=>{let[o]=t;o&&o.target===d&&w&&(w.unobserve(n),cancelAnimationFrame(y),y=requestAnimationFrame((()=>{var t;null==(t=w)||t.observe(n)}))),e()})),d&&!f&&w.observe(d),w.observe(n));let g=f?ct(t):null;return f&&function n(){const o=ct(t);g&&!vt(g,o)&&e(),g=o,m=requestAnimationFrame(n)}(),e(),()=>{var t;h.forEach((t=>{s&&t.removeEventListener("scroll",e),a&&t.removeEventListener("resize",e)})),null==p||p(),null==(t=w)||t.disconnect(),w=null,f&&cancelAnimationFrame(m)}}(t,n,s,{elementResize:!0,layoutShift:!0})}stopAutoUpdate(){this.cleanupAutoUpdate?.(),this.cleanupAutoUpdate=void 0}attachTriggerListeners(t,o,i){t.addEventListener(n,o),t.addEventListener(e,i)}detachTriggerListeners(t,o,i){t.removeEventListener(n,o),t.removeEventListener(e,i)}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.closest(".bds-button, .bds-input, .bds-select")||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 kt,this.logger=new St,this.cleanupAutoUpdate=void 0,this.previousTrigger=void 0}disconnectedCallback(){null!=this.previousTrigger&&this.floatingDisconnect((()=>this.show()),(()=>this.hide())),this.stopAutoUpdate(),this.hide()}},Dt=(t=!1,n=0,e)=>t?void 0!==n?n:0:void 0!==n?e+n:e;export{o as K,Rt as a,Dt as g}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function s(s,t){s.setFormValue?.(t)}function t(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}const o=s=>class extends s{constructor(){super(!1)}formDisabledCallback(s){this.isDisabled=s}};export{o as f,t as r,s}
|