@viasat/beam-web-components 2.0.0
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/Accordion/Accordion.d.ts +56 -0
- package/Accordion/Accordion.js +12 -0
- package/Accordion/AccordionGroup.context.d.ts +10 -0
- package/Accordion/AccordionGroup.context.js +8 -0
- package/Accordion/AccordionGroup.d.ts +33 -0
- package/Accordion/AccordionGroup.js +79 -0
- package/Accordion/index.d.ts +3 -0
- package/Accordion/index.js +6 -0
- package/Alert/Alert.d.ts +64 -0
- package/Alert/Alert.js +300 -0
- package/Alert/index.d.ts +2 -0
- package/Alert/index.js +4 -0
- package/Avatar/Avatar.d.ts +60 -0
- package/Avatar/Avatar.js +12 -0
- package/Avatar/AvatarGroup.context.d.ts +11 -0
- package/Avatar/AvatarGroup.context.js +8 -0
- package/Avatar/AvatarGroup.d.ts +43 -0
- package/Avatar/AvatarGroup.js +181 -0
- package/Avatar/index.d.ts +3 -0
- package/Avatar/index.js +6 -0
- package/Badge/Badge.d.ts +40 -0
- package/Badge/Badge.js +125 -0
- package/Badge/index.d.ts +2 -0
- package/Badge/index.js +4 -0
- package/BadgeDot/BadgeDot.d.ts +38 -0
- package/BadgeDot/BadgeDot.js +59 -0
- package/BadgeDot/index.d.ts +2 -0
- package/BadgeDot/index.js +4 -0
- package/Box/Box.d.ts +99 -0
- package/Box/Box.js +115 -0
- package/Box/index.d.ts +2 -0
- package/Box/index.js +4 -0
- package/Breadcrumbs/Breadcrumbs.context.d.ts +10 -0
- package/Breadcrumbs/Breadcrumbs.context.js +8 -0
- package/Breadcrumbs/Breadcrumbs.d.ts +38 -0
- package/Breadcrumbs/Breadcrumbs.js +115 -0
- package/Breadcrumbs/BreadcrumbsItem.d.ts +39 -0
- package/Breadcrumbs/BreadcrumbsItem.js +13 -0
- package/Breadcrumbs/index.d.ts +3 -0
- package/Breadcrumbs/index.js +6 -0
- package/Button/Button.d.ts +73 -0
- package/Button/Button.js +125 -0
- package/Button/index.d.ts +2 -0
- package/Button/index.js +4 -0
- package/CloseButton/CloseButton.d.ts +25 -0
- package/CloseButton/CloseButton.js +60 -0
- package/CloseButton/index.d.ts +2 -0
- package/CloseButton/index.js +4 -0
- package/Divider/Divider.d.ts +56 -0
- package/Divider/Divider.js +111 -0
- package/Divider/index.d.ts +2 -0
- package/Divider/index.js +4 -0
- package/EmptyState/EmptyState.d.ts +36 -0
- package/EmptyState/EmptyState.js +56 -0
- package/EmptyState/index.d.ts +2 -0
- package/EmptyState/index.js +4 -0
- package/HelperText/HelperText.d.ts +45 -0
- package/HelperText/HelperText.js +11 -0
- package/HelperText/index.d.ts +2 -0
- package/HelperText/index.js +4 -0
- package/Icon/Icon.d.ts +35 -0
- package/Icon/Icon.js +62 -0
- package/Icon/index.d.ts +2 -0
- package/Icon/index.js +4 -0
- package/InputChoiceGroup/InputChoiceGroup.context.d.ts +13 -0
- package/InputChoiceGroup/InputChoiceGroup.context.js +8 -0
- package/InputChoiceGroup/InputChoiceGroup.d.ts +87 -0
- package/InputChoiceGroup/InputChoiceGroup.js +205 -0
- package/InputChoiceGroup/index.d.ts +2 -0
- package/InputChoiceGroup/index.js +4 -0
- package/Link/Link.d.ts +48 -0
- package/Link/Link.js +77 -0
- package/Link/index.d.ts +2 -0
- package/Link/index.js +4 -0
- package/List/List.context.d.ts +15 -0
- package/List/List.context.js +8 -0
- package/List/List.d.ts +43 -0
- package/List/List.js +101 -0
- package/List/ListItem.d.ts +23 -0
- package/List/ListItem.js +90 -0
- package/List/index.d.ts +3 -0
- package/List/index.js +6 -0
- package/ProgressBar/ProgressBar.d.ts +52 -0
- package/ProgressBar/ProgressBar.js +128 -0
- package/ProgressBar/index.d.ts +2 -0
- package/ProgressBar/index.js +4 -0
- package/README.md +360 -0
- package/SegmentedControl/SegmentedControl.context.d.ts +16 -0
- package/SegmentedControl/SegmentedControl.context.js +8 -0
- package/SegmentedControl/SegmentedControl.d.ts +41 -0
- package/SegmentedControl/SegmentedControl.js +103 -0
- package/SegmentedControl/SegmentedControlItem.d.ts +54 -0
- package/SegmentedControl/SegmentedControlItem.js +284 -0
- package/SegmentedControl/SegmentedControlList.d.ts +23 -0
- package/SegmentedControl/SegmentedControlList.js +61 -0
- package/SegmentedControl/SegmentedControlPanel.d.ts +21 -0
- package/SegmentedControl/SegmentedControlPanel.js +43 -0
- package/SegmentedControl/index.d.ts +5 -0
- package/SegmentedControl/index.js +10 -0
- package/Spinner/Spinner.d.ts +50 -0
- package/Spinner/Spinner.js +186 -0
- package/Spinner/index.d.ts +2 -0
- package/Spinner/index.js +4 -0
- package/StateLayer/StateLayer.d.ts +17 -0
- package/StateLayer/StateLayer.js +6 -0
- package/StateLayer/index.d.ts +2 -0
- package/StateLayer/index.js +5 -0
- package/Text/Text.d.ts +85 -0
- package/Text/Text.js +103 -0
- package/Text/index.d.ts +2 -0
- package/Text/index.js +4 -0
- package/Tooltip/Tooltip.d.ts +139 -0
- package/Tooltip/Tooltip.js +1827 -0
- package/Tooltip/index.d.ts +2 -0
- package/Tooltip/index.js +5 -0
- package/chunks/Accordion.DYD3XcAx.js +161 -0
- package/chunks/Avatar.C2rfzUGP.js +174 -0
- package/chunks/BreadcrumbsItem.4ZR6wbMz.js +121 -0
- package/chunks/CSSLookup.BdqZ5Li9.js +106 -0
- package/chunks/HelperText.CcVVOtA3.js +108 -0
- package/chunks/Upload.B9YEyp7b.js +12 -0
- package/chunks/WarningOutlined.DPfQnPPj.js +12 -0
- package/chunks/classNames.Cq_tbDRp.js +94 -0
- package/chunks/constants.jOWREYQE.js +30 -0
- package/chunks/delegate.baxDQosr.js +63 -0
- package/chunks/dom.C98AFbJh.js +22 -0
- package/chunks/fileUpload.module.kN6o64aL.js +4 -0
- package/chunks/globals.Bz4SVF2g.js +4 -0
- package/chunks/helpers.AwJwaZvv.js +53 -0
- package/chunks/list.module.CZRPBLzy.js +4 -0
- package/chunks/register-custom-element.DHGKOhmA.js +17 -0
- package/chunks/segmentedControl.module.BPXEWodj.js +4 -0
- package/chunks/tokens.CTW8Tt94.js +9 -0
- package/custom-elements.json +11341 -0
- package/local/Accordion/Accordion.js +12 -0
- package/local/Accordion/AccordionGroup.context.js +8 -0
- package/local/Accordion/AccordionGroup.js +78 -0
- package/local/Accordion/index.js +6 -0
- package/local/Alert/Alert.js +301 -0
- package/local/Alert/index.js +4 -0
- package/local/Avatar/Avatar.js +11 -0
- package/local/Avatar/AvatarGroup.context.js +8 -0
- package/local/Avatar/AvatarGroup.js +180 -0
- package/local/Avatar/index.js +6 -0
- package/local/Badge/Badge.js +123 -0
- package/local/Badge/index.js +4 -0
- package/local/BadgeDot/BadgeDot.js +57 -0
- package/local/BadgeDot/index.js +4 -0
- package/local/Box/Box.js +113 -0
- package/local/Box/index.js +4 -0
- package/local/Breadcrumbs/Breadcrumbs.context.js +8 -0
- package/local/Breadcrumbs/Breadcrumbs.js +113 -0
- package/local/Breadcrumbs/BreadcrumbsItem.js +13 -0
- package/local/Breadcrumbs/index.js +6 -0
- package/local/Button/Button.js +154 -0
- package/local/Button/index.js +4 -0
- package/local/CloseButton/CloseButton.js +58 -0
- package/local/CloseButton/index.js +4 -0
- package/local/Divider/Divider.js +111 -0
- package/local/Divider/index.js +4 -0
- package/local/EmptyState/EmptyState.js +54 -0
- package/local/EmptyState/index.js +4 -0
- package/local/HelperText/HelperText.js +9 -0
- package/local/HelperText/index.js +4 -0
- package/local/Icon/Icon.js +60 -0
- package/local/Icon/index.js +4 -0
- package/local/InputChoiceGroup/InputChoiceGroup.context.js +8 -0
- package/local/InputChoiceGroup/InputChoiceGroup.js +205 -0
- package/local/InputChoiceGroup/index.js +4 -0
- package/local/Link/Link.js +75 -0
- package/local/Link/index.js +4 -0
- package/local/List/List.context.js +8 -0
- package/local/List/List.js +101 -0
- package/local/List/ListItem.js +90 -0
- package/local/List/index.js +6 -0
- package/local/ProgressBar/ProgressBar.js +126 -0
- package/local/ProgressBar/index.js +4 -0
- package/local/SegmentedControl/SegmentedControl.context.js +8 -0
- package/local/SegmentedControl/SegmentedControl.js +103 -0
- package/local/SegmentedControl/SegmentedControlItem.js +284 -0
- package/local/SegmentedControl/SegmentedControlList.js +59 -0
- package/local/SegmentedControl/SegmentedControlPanel.js +41 -0
- package/local/SegmentedControl/index.js +10 -0
- package/local/Spinner/Spinner.js +185 -0
- package/local/Spinner/index.js +4 -0
- package/local/StateLayer/StateLayer.js +6 -0
- package/local/StateLayer/index.js +5 -0
- package/local/Text/Text.js +121 -0
- package/local/Text/index.js +4 -0
- package/local/Tooltip/Tooltip.js +1826 -0
- package/local/Tooltip/index.js +5 -0
- package/local/chunks/Accordion.PGU7OILE.js +161 -0
- package/local/chunks/Avatar.CvTOzaRT.js +172 -0
- package/local/chunks/BreadcrumbsItem.GM6sBp_o.js +121 -0
- package/local/chunks/CSSLookup.BdqZ5Li9.js +106 -0
- package/local/chunks/Upload.B9YEyp7b.js +12 -0
- package/local/chunks/WarningOutlined.DPfQnPPj.js +12 -0
- package/local/chunks/base.D76d76ww.js +9 -0
- package/local/chunks/classNames.C6fNrXWF.js +106 -0
- package/local/chunks/constants.jOWREYQE.js +30 -0
- package/local/chunks/consume.Ce9k1-wN.js +47 -0
- package/local/chunks/context-request-event.Bl9Vpkzl.js +13 -0
- package/local/chunks/create-context.DS1OG3vJ.js +11 -0
- package/local/chunks/delegate.baxDQosr.js +63 -0
- package/local/chunks/directive.kLG6oqUu.js +27 -0
- package/local/chunks/dom.C98AFbJh.js +22 -0
- package/local/chunks/fileUpload.module.kN6o64aL.js +4 -0
- package/local/chunks/globals.Bz4SVF2g.js +4 -0
- package/local/chunks/helpers.BWcXAteC.js +53 -0
- package/local/chunks/index.Bz1Jq4c2.js +106 -0
- package/local/chunks/list.module.CZRPBLzy.js +4 -0
- package/local/chunks/lit-element.CJtt9wj5.js +557 -0
- package/local/chunks/provide.i2FlUkOu.js +110 -0
- package/local/chunks/query-assigned-elements.Drkgpk9q.js +19 -0
- package/local/chunks/query-assigned-nodes.Dgvsf6BR.js +19 -0
- package/local/chunks/query.lbpOn5CD.js +20 -0
- package/local/chunks/ref.B7e1Hu4F.js +107 -0
- package/local/chunks/register-custom-element.vod7zfGv.js +51 -0
- package/local/chunks/segmentedControl.module.BPXEWodj.js +4 -0
- package/local/chunks/state.CqiuSzAl.js +12 -0
- package/local/chunks/tokens.CTW8Tt94.js +9 -0
- package/local/chunks/unsafe-html.BzhXEygn.js +27 -0
- package/local/chunks/unsafe-svg.HSGf1NCU.js +14 -0
- package/local/wip/Checkbox/Checkbox.js +102 -0
- package/local/wip/Checkbox/CheckboxGroup/CheckboxGroup.js +27 -0
- package/local/wip/Checkbox/index.js +6 -0
- package/local/wip/FileUpload/FileUpload.Button.js +75 -0
- package/local/wip/FileUpload/FileUpload.Dropzone.js +149 -0
- package/local/wip/FileUpload/FileUpload.List.Item.js +201 -0
- package/local/wip/FileUpload/FileUpload.List.js +105 -0
- package/local/wip/FileUpload/FileUpload.js +452 -0
- package/local/wip/FileUpload/FileUploadContext.js +8 -0
- package/local/wip/FileUpload/FileUploadListContext.js +8 -0
- package/local/wip/FileUpload/index.js +13 -0
- package/local/wip/Form/Form.context.js +20 -0
- package/local/wip/Form/Form.decorator.js +145 -0
- package/local/wip/Form/Form.js +288 -0
- package/local/wip/Form/Form.utils.js +8 -0
- package/local/wip/Form/index.js +7 -0
- package/local/wip/Label/Label.js +86 -0
- package/local/wip/Label/index.js +4 -0
- package/local/wip/NativeSelect/NativeSelect.js +162 -0
- package/local/wip/NativeSelect/index.js +4 -0
- package/local/wip/RadioButton/RadioButton.js +123 -0
- package/local/wip/RadioButton/RadioButtonGroup/RadioButtonGroup.js +96 -0
- package/local/wip/RadioButton/index.js +6 -0
- package/local/wip/Switch/Switch.js +153 -0
- package/local/wip/Switch/SwitchGroup/SwitchGroup.js +15 -0
- package/local/wip/Switch/index.js +6 -0
- package/local/wip/TextArea/TextArea.js +192 -0
- package/local/wip/TextArea/index.js +4 -0
- package/local/wip/TextField/TextField.js +169 -0
- package/local/wip/TextField/index.js +4 -0
- package/package.json +78 -0
- package/vscode.css-custom-data.json +6 -0
- package/vscode.html-custom-data.json +2704 -0
- package/wip/Checkbox/Checkbox.d.ts +55 -0
- package/wip/Checkbox/Checkbox.js +104 -0
- package/wip/Checkbox/CheckboxGroup/CheckboxGroup.d.ts +11 -0
- package/wip/Checkbox/CheckboxGroup/CheckboxGroup.js +27 -0
- package/wip/Checkbox/index.d.ts +3 -0
- package/wip/Checkbox/index.js +6 -0
- package/wip/FileUpload/FileUpload.Button.d.ts +36 -0
- package/wip/FileUpload/FileUpload.Button.js +77 -0
- package/wip/FileUpload/FileUpload.Dropzone.d.ts +55 -0
- package/wip/FileUpload/FileUpload.Dropzone.js +150 -0
- package/wip/FileUpload/FileUpload.List.Item.d.ts +62 -0
- package/wip/FileUpload/FileUpload.List.Item.js +203 -0
- package/wip/FileUpload/FileUpload.List.d.ts +46 -0
- package/wip/FileUpload/FileUpload.List.js +106 -0
- package/wip/FileUpload/FileUpload.d.ts +101 -0
- package/wip/FileUpload/FileUpload.js +451 -0
- package/wip/FileUpload/FileUploadContext.d.ts +5 -0
- package/wip/FileUpload/FileUploadContext.js +8 -0
- package/wip/FileUpload/FileUploadListContext.d.ts +5 -0
- package/wip/FileUpload/FileUploadListContext.js +8 -0
- package/wip/FileUpload/index.d.ts +6 -0
- package/wip/FileUpload/index.js +13 -0
- package/wip/Form/Form.context.d.ts +19 -0
- package/wip/Form/Form.context.js +20 -0
- package/wip/Form/Form.d.ts +50 -0
- package/wip/Form/Form.decorator.d.ts +47 -0
- package/wip/Form/Form.decorator.js +144 -0
- package/wip/Form/Form.js +288 -0
- package/wip/Form/Form.utils.d.ts +2 -0
- package/wip/Form/Form.utils.js +8 -0
- package/wip/Form/index.d.ts +3 -0
- package/wip/Form/index.js +7 -0
- package/wip/Label/Label.d.ts +43 -0
- package/wip/Label/Label.js +87 -0
- package/wip/Label/index.d.ts +2 -0
- package/wip/Label/index.js +4 -0
- package/wip/NativeSelect/NativeSelect.d.ts +69 -0
- package/wip/NativeSelect/NativeSelect.js +163 -0
- package/wip/NativeSelect/index.d.ts +2 -0
- package/wip/NativeSelect/index.js +4 -0
- package/wip/RadioButton/RadioButton.d.ts +56 -0
- package/wip/RadioButton/RadioButton.js +125 -0
- package/wip/RadioButton/RadioButtonGroup/RadioButtonGroup.d.ts +23 -0
- package/wip/RadioButton/RadioButtonGroup/RadioButtonGroup.js +96 -0
- package/wip/RadioButton/index.d.ts +3 -0
- package/wip/RadioButton/index.js +6 -0
- package/wip/Switch/Switch.d.ts +62 -0
- package/wip/Switch/Switch.js +155 -0
- package/wip/Switch/SwitchGroup/SwitchGroup.d.ts +15 -0
- package/wip/Switch/SwitchGroup/SwitchGroup.js +15 -0
- package/wip/Switch/index.d.ts +3 -0
- package/wip/Switch/index.js +6 -0
- package/wip/TextArea/TextArea.d.ts +89 -0
- package/wip/TextArea/TextArea.js +193 -0
- package/wip/TextArea/index.d.ts +2 -0
- package/wip/TextArea/index.js +4 -0
- package/wip/TextField/TextField.d.ts +70 -0
- package/wip/TextField/TextField.js +169 -0
- package/wip/TextField/index.d.ts +2 -0
- package/wip/TextField/index.js +4 -0
package/Tooltip/index.js
ADDED
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { consume as x } from "@lit/context";
|
|
2
|
+
import { unsafeCSS as C, css as S, LitElement as z, html as s, nothing as P } from "lit";
|
|
3
|
+
import { property as p, state as w, queryAssignedNodes as O } from "lit/decorators.js";
|
|
4
|
+
import { unsafeSVG as k } from "lit/directives/unsafe-svg.js";
|
|
5
|
+
import l from "clsx";
|
|
6
|
+
import { b as E } from "./constants.jOWREYQE.js";
|
|
7
|
+
import { n as I, g as N } from "./classNames.Cq_tbDRp.js";
|
|
8
|
+
import { c as D } from "./register-custom-element.DHGKOhmA.js";
|
|
9
|
+
import { AccordionGroupCtx as M } from "../Accordion/AccordionGroup.context.js";
|
|
10
|
+
const U = `<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
11
|
+
<path
|
|
12
|
+
d="M6.2194 9.37496C6.13729 9.4775 6.07619 9.59521 6.03959 9.72137C6.00299 9.84754 5.99161 9.97967 6.0061 10.1102C6.02059 10.2408 6.06066 10.3672 6.12402 10.4823C6.18738 10.5974 6.2728 10.6988 6.37539 10.7809L11.3751 14.7806C11.5524 14.9226 11.7729 15 12.0001 15C12.2272 15 12.4477 14.9226 12.625 14.7806L17.6247 10.7809C17.8318 10.6151 17.9646 10.3739 17.9939 10.1102C18.0231 9.84656 17.9465 9.58208 17.7807 9.37496C17.615 9.16784 17.3737 9.03504 17.1101 9.00579C16.8464 8.97653 16.5819 9.05322 16.3748 9.21897L12.0001 12.7188L7.62532 9.21897C7.52278 9.13686 7.40506 9.07576 7.2789 9.03916C7.15274 9.00256 7.0206 8.99118 6.89004 9.00567C6.75947 9.02015 6.63305 9.06022 6.51798 9.12359C6.4029 9.18695 6.30145 9.27237 6.2194 9.37496Z"
|
|
13
|
+
fill="currentColor"
|
|
14
|
+
/>
|
|
15
|
+
</svg>
|
|
16
|
+
`, q = E.md, B = ':root,:host,.bm-light,.bm-dark .bm-inverse,[data-bm-theme~=bm-light]{--bm-comp-accordion-color-heading: var(--bm-sem-color-text-primary, #141d24);--bm-comp-accordion-color-body: var(--bm-sem-color-text-secondary, #576775);--bm-comp-accordion-color-icon: var(--bm-sem-color-icon-primary, #141d24);--bm-comp-accordion-color-divider: var(--bm-sem-color-border-01, #dfe7ec);--bm-comp-accordion-size-sm-height: var( --bm-primitive-dimension-275, 2.75rem );--bm-comp-accordion-size-sm-icon: var(--bm-sem-size-icon-md, 1.25rem);--bm-comp-accordion-size-md-height: var( --bm-primitive-dimension-325, 3.25rem );--bm-comp-accordion-size-md-icon: var(--bm-sem-size-icon-md, 1.25rem);--bm-comp-accordion-size-lg-height: var(--bm-primitive-dimension-400, 4rem);--bm-comp-accordion-size-lg-icon: var(--bm-sem-size-icon-lg, 1.5rem);--bm-comp-accordion-space-header-gap: var(--bm-sem-space-50, .5rem);--bm-comp-accordion-space-content-gap: var(--bm-sem-space-100, 1rem);--bm-comp-accordion-space-sm-header-y: var(--bm-sem-space-50, .5rem);--bm-comp-accordion-space-sm-content-bottom: var(--bm-sem-space-125, 1.25rem);--bm-comp-accordion-space-md-header-y: var(--bm-sem-space-75, .75rem);--bm-comp-accordion-space-md-content-bottom: var(--bm-sem-space-125, 1.25rem);--bm-comp-accordion-space-lg-header-y: var(--bm-sem-space-100, 1rem);--bm-comp-accordion-space-lg-content-bottom: var(--bm-sem-space-200, 2rem);--bm-comp-accordion-typo-sm-heading: var( --bm-sem-typo-compact-label-md, 600 1rem/1.25rem "Source Sans Pro" );--bm-comp-accordion-typo-sm-body: var( --bm-sem-typo-body-md, 400 1rem/1.5rem "Source Sans Pro" );--bm-comp-accordion-typo-md-heading: var( --bm-sem-typo-compact-label-lg, 600 1.125rem/1.25rem "Source Sans Pro" );--bm-comp-accordion-typo-md-body: var( --bm-sem-typo-body-md, 400 1rem/1.5rem "Source Sans Pro" );--bm-comp-accordion-typo-lg-heading: var( --bm-sem-typo-compact-label-xl, 600 1.25rem/1.5rem "Source Sans Pro" );--bm-comp-accordion-typo-lg-body: var( --bm-sem-typo-body-lg, 400 1.125rem/1.75rem "Source Sans Pro" )}:host,.bm-dark,.bm-light .bm-inverse,[data-bm-theme~=bm-dark]{--bm-comp-accordion-color-heading: var(--bm-sem-color-text-primary, #ffffff);--bm-comp-accordion-color-body: var(--bm-sem-color-text-secondary, #c3cdd5);--bm-comp-accordion-color-icon: var(--bm-sem-color-icon-primary, #ffffff);--bm-comp-accordion-color-divider: var(--bm-sem-color-border-01, #32424e);--bm-comp-accordion-size-sm-height: var( --bm-primitive-dimension-275, 2.75rem );--bm-comp-accordion-size-sm-icon: var(--bm-sem-size-icon-md, 1.25rem);--bm-comp-accordion-size-md-height: var( --bm-primitive-dimension-325, 3.25rem );--bm-comp-accordion-size-md-icon: var(--bm-sem-size-icon-md, 1.25rem);--bm-comp-accordion-size-lg-height: var(--bm-primitive-dimension-400, 4rem);--bm-comp-accordion-size-lg-icon: var(--bm-sem-size-icon-lg, 1.5rem);--bm-comp-accordion-space-header-gap: var(--bm-sem-space-50, .5rem);--bm-comp-accordion-space-content-gap: var(--bm-sem-space-100, 1rem);--bm-comp-accordion-space-sm-header-y: var(--bm-sem-space-50, .5rem);--bm-comp-accordion-space-sm-content-bottom: var(--bm-sem-space-125, 1.25rem);--bm-comp-accordion-space-md-header-y: var(--bm-sem-space-75, .75rem);--bm-comp-accordion-space-md-content-bottom: var(--bm-sem-space-125, 1.25rem);--bm-comp-accordion-space-lg-header-y: var(--bm-sem-space-100, 1rem);--bm-comp-accordion-space-lg-content-bottom: var(--bm-sem-space-200, 2rem);--bm-comp-accordion-typo-sm-heading: var( --bm-sem-typo-compact-label-md, 600 1rem/1.25rem "Source Sans Pro" );--bm-comp-accordion-typo-sm-body: var( --bm-sem-typo-body-md, 400 1rem/1.5rem "Source Sans Pro" );--bm-comp-accordion-typo-md-heading: var( --bm-sem-typo-compact-label-lg, 600 1.125rem/1.25rem "Source Sans Pro" );--bm-comp-accordion-typo-md-body: var( --bm-sem-typo-body-md, 400 1rem/1.5rem "Source Sans Pro" );--bm-comp-accordion-typo-lg-heading: var( --bm-sem-typo-compact-label-xl, 600 1.25rem/1.5rem "Source Sans Pro" );--bm-comp-accordion-typo-lg-body: var( --bm-sem-typo-body-lg, 400 1.125rem/1.75rem "Source Sans Pro" )}.bm-accordion--sm .bm-accordion__container{min-height:var(--bm-comp-accordion-size-sm-height);padding:var(--bm-comp-accordion-space-sm-header-y) 0}.bm-accordion--sm .bm-accordion__chevron{height:var(--bm-comp-accordion-size-sm-icon);min-width:var(--bm-comp-accordion-size-sm-icon)}.bm-accordion--sm .bm-accordion__heading{font:var(--bm-comp-accordion-typo-sm-heading)}.bm-accordion--sm .bm-accordion__icon{height:var(--bm-comp-accordion-size-sm-icon)}.bm-accordion__panel--sm{visibility:hidden;font:var(--bm-comp-accordion-typo-sm-body);color:var(--bm-comp-accordion-color-body);position:relative;display:grid;grid-template-rows:0fr;transition:grid-template-rows,padding-bottom,.2s linear;will-change:grid-template-rows,transform,padding-bottom}.bm-accordion__panel--sm>div{overflow:hidden;display:flex;flex-direction:column;align-items:flex-start;gap:var(--bm-comp-accordion-space-content-gap);align-self:stretch;padding:.3rem;margin:-.3rem}.bm-accordion__panel--expanded--sm{visibility:visible;grid-template-rows:1fr;padding-bottom:var(--bm-comp-accordion-space-sm-content-bottom)}.bm-accordion--md .bm-accordion__container{min-height:var(--bm-comp-accordion-size-md-height);padding:var(--bm-comp-accordion-space-md-header-y) 0}.bm-accordion--md .bm-accordion__chevron{height:var(--bm-comp-accordion-size-md-icon);min-width:var(--bm-comp-accordion-size-md-icon)}.bm-accordion--md .bm-accordion__heading{font:var(--bm-comp-accordion-typo-md-heading)}.bm-accordion--md .bm-accordion__icon{height:var(--bm-comp-accordion-size-md-icon)}.bm-accordion__panel--md{visibility:hidden;font:var(--bm-comp-accordion-typo-md-body);color:var(--bm-comp-accordion-color-body);position:relative;display:grid;grid-template-rows:0fr;transition:grid-template-rows,padding-bottom,.2s linear;will-change:grid-template-rows,transform,padding-bottom}.bm-accordion__panel--md>div{overflow:hidden;display:flex;flex-direction:column;align-items:flex-start;gap:var(--bm-comp-accordion-space-content-gap);align-self:stretch;padding:.3rem;margin:-.3rem}.bm-accordion__panel--expanded--md{visibility:visible;grid-template-rows:1fr;padding-bottom:var(--bm-comp-accordion-space-md-content-bottom)}.bm-accordion--lg .bm-accordion__container{min-height:var(--bm-comp-accordion-size-lg-height);padding:var(--bm-comp-accordion-space-lg-header-y) 0}.bm-accordion--lg .bm-accordion__chevron{height:var(--bm-comp-accordion-size-lg-icon);min-width:var(--bm-comp-accordion-size-lg-icon)}.bm-accordion--lg .bm-accordion__heading{font:var(--bm-comp-accordion-typo-lg-heading)}.bm-accordion--lg .bm-accordion__icon{height:var(--bm-comp-accordion-size-lg-icon)}.bm-accordion__panel--lg{visibility:hidden;font:var(--bm-comp-accordion-typo-lg-body);color:var(--bm-comp-accordion-color-body);position:relative;display:grid;grid-template-rows:0fr;transition:grid-template-rows,padding-bottom,.2s linear;will-change:grid-template-rows,transform,padding-bottom}.bm-accordion__panel--lg>div{overflow:hidden;display:flex;flex-direction:column;align-items:flex-start;gap:var(--bm-comp-accordion-space-content-gap);align-self:stretch;padding:.3rem;margin:-.3rem}.bm-accordion__panel--expanded--lg{visibility:visible;grid-template-rows:1fr;padding-bottom:var(--bm-comp-accordion-space-lg-content-bottom)}.bm-accordion__container{display:flex;justify-content:space-between;align-items:center;cursor:pointer;gap:var(--bm-comp-accordion-space-header-gap)}.bm-accordion__container:focus-visible{outline:var(--bm-sem-border-width-focus) solid var(--bm-sem-color-border-focus);border-radius:var(--bm-sem-radius-focus-md)}.bm-accordion__icon{flex-shrink:0;display:inline-flex;color:var(--bm-comp-accordion-color-icon)}.bm-accordion__icon ::slotted([slot=icon]){display:inline-flex}.bm-accordion__heading{flex-grow:1;color:var(--bm-comp-accordion-color-heading);display:flex;align-items:center;gap:var(--bm-comp-accordion-space-header-gap)}.bm-accordion__heading ::slotted([slot=heading]){gap:var(--bm-comp-accordion-space-header-gap)}.bm-accordion__chevron{transition:transform .2s ease;color:var(--bm-comp-accordion-color-icon)}.bm-accordion__chevron--rotated{transform:rotate(180deg)}.bm-accordion>div:not(:first-child)>.bm-accordion__container{border-top:var(--bm-sem-border-width-md) solid var(--bm-comp-accordion-color-divider)}:host(:not(:first-of-type)) .bm-accordion__container{border-top:var(--bm-sem-border-width-md) solid var(--bm-comp-accordion-color-divider)}:host(*) .bm-accordion__container{box-sizing:border-box}:host(*) .bm-accordion__container:focus-visible{outline:var(--bm-sem-border-width-focus) solid var(--bm-sem-color-border-focus);border-radius:var(--bm-sem-radius-focus-md)}.bm-accordion--no-box{display:contents}';
|
|
17
|
+
var T = Object.defineProperty, A = Object.getOwnPropertyDescriptor, $ = (o) => {
|
|
18
|
+
throw TypeError(o);
|
|
19
|
+
}, a = (o, e, c, t) => {
|
|
20
|
+
for (var m = t > 1 ? void 0 : t ? A(e, c) : e, d = o.length - 1, n; d >= 0; d--)
|
|
21
|
+
(n = o[d]) && (m = (t ? n(e, c, m) : n(m)) || m);
|
|
22
|
+
return t && m && T(e, c, m), m;
|
|
23
|
+
}, L = (o, e, c) => e.has(o) || $("Cannot " + c), b = (o, e, c) => (L(o, e, "read from private field"), c ? c.call(o) : e.get(o)), h = (o, e, c) => e.has(o) ? $("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(o) : e.set(o, c), v, y, f, _;
|
|
24
|
+
const { baseClassNamePrefix: g, subElementClassPrefix: i, classModifierPrefix: W } = N("accordion");
|
|
25
|
+
let r = class extends z {
|
|
26
|
+
constructor() {
|
|
27
|
+
super(...arguments), this.defaultOpen = !1, this._isOpen = !1, this._accordionUniqueId = "", h(this, v, () => this.requestUpdate()), h(this, y, () => s`<span
|
|
28
|
+
class=${l(
|
|
29
|
+
`${i}icon`,
|
|
30
|
+
!this.hasIconSlot && `${W}no-box`
|
|
31
|
+
)}
|
|
32
|
+
role="img"
|
|
33
|
+
aria-label="icon"
|
|
34
|
+
>
|
|
35
|
+
<slot name="icon" @slotchange=${b(this, v)}></slot>
|
|
36
|
+
</span>`), h(this, f, () => {
|
|
37
|
+
const o = `${i}heading`, e = this.heading ? s` <div class=${o}>${this.heading}</div>` : P;
|
|
38
|
+
return s`
|
|
39
|
+
<div class=${o}>
|
|
40
|
+
<slot name="heading">${e}</slot>
|
|
41
|
+
</div>
|
|
42
|
+
`;
|
|
43
|
+
}), h(this, _, () => {
|
|
44
|
+
const o = `${i}content`;
|
|
45
|
+
return s`
|
|
46
|
+
<div class=${o}>
|
|
47
|
+
<slot></slot>
|
|
48
|
+
</div>
|
|
49
|
+
`;
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
get hasIconSlot() {
|
|
53
|
+
return I(this.iconNodes);
|
|
54
|
+
}
|
|
55
|
+
connectedCallback() {
|
|
56
|
+
var o;
|
|
57
|
+
super.connectedCallback(), this._accordionUniqueId = this.id || `${g}-${Math.random().toString(36).slice(2, 9)}`, (o = this.group) == null || o.register(this);
|
|
58
|
+
}
|
|
59
|
+
disconnectedCallback() {
|
|
60
|
+
var o;
|
|
61
|
+
(o = this.group) == null || o.unregister(this);
|
|
62
|
+
}
|
|
63
|
+
willUpdate(o) {
|
|
64
|
+
o.has("defaultOpen") && (this._isOpen = this.defaultOpen);
|
|
65
|
+
}
|
|
66
|
+
handleToggle() {
|
|
67
|
+
this.open === void 0 && (this._isOpen = !this._isOpen);
|
|
68
|
+
const o = this.open === void 0 ? this._isOpen : !this.open;
|
|
69
|
+
this.dispatchToggleEvent(o);
|
|
70
|
+
}
|
|
71
|
+
dispatchToggleEvent(o) {
|
|
72
|
+
const e = new CustomEvent("bm-toggle", {
|
|
73
|
+
detail: { accordion: this, isOpen: o },
|
|
74
|
+
bubbles: !0,
|
|
75
|
+
composed: !0
|
|
76
|
+
});
|
|
77
|
+
return this.dispatchEvent(e), e;
|
|
78
|
+
}
|
|
79
|
+
handleKeyDown(o) {
|
|
80
|
+
(o.key === "Enter" || o.key === " ") && (o.preventDefault(), this.handleToggle());
|
|
81
|
+
}
|
|
82
|
+
render() {
|
|
83
|
+
var u;
|
|
84
|
+
const o = this.open === void 0 ? this._isOpen : this.open, e = this.size || ((u = this.group) == null ? void 0 : u.size) || q, c = l(`${i}container`, {
|
|
85
|
+
[`${i}container--expanded`]: o,
|
|
86
|
+
[`${i}${e}`]: e
|
|
87
|
+
}), t = l(`${i}chevron`, {
|
|
88
|
+
[`${i}chevron--rotated`]: o
|
|
89
|
+
}), m = l(`${i}panel--${e}`, {
|
|
90
|
+
[`${i}panel--expanded--${e}`]: o
|
|
91
|
+
}), d = `${g}-heading-${this._accordionUniqueId}`, n = `${g}-panel-${this._accordionUniqueId}`;
|
|
92
|
+
return s`
|
|
93
|
+
<div class="${g}--${e}">
|
|
94
|
+
<div
|
|
95
|
+
class=${c}
|
|
96
|
+
role="button"
|
|
97
|
+
id=${d}
|
|
98
|
+
tabindex="0"
|
|
99
|
+
aria-expanded=${o}
|
|
100
|
+
aria-controls=${n}
|
|
101
|
+
@click=${this.handleToggle}
|
|
102
|
+
@keydown=${this.handleKeyDown}
|
|
103
|
+
>
|
|
104
|
+
${b(this, y).call(this)} ${b(this, f).call(this)}
|
|
105
|
+
<span class=${t} aria-label="chevron-down-icon" role="img">
|
|
106
|
+
${k(U)}
|
|
107
|
+
</span>
|
|
108
|
+
</div>
|
|
109
|
+
<section
|
|
110
|
+
id=${n}
|
|
111
|
+
class=${m}
|
|
112
|
+
?hidden=${!o}
|
|
113
|
+
data-testid="accordion-panel-${n}"
|
|
114
|
+
>
|
|
115
|
+
${b(this, _).call(this)}
|
|
116
|
+
</section>
|
|
117
|
+
</div>
|
|
118
|
+
`;
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
v = /* @__PURE__ */ new WeakMap();
|
|
122
|
+
y = /* @__PURE__ */ new WeakMap();
|
|
123
|
+
f = /* @__PURE__ */ new WeakMap();
|
|
124
|
+
_ = /* @__PURE__ */ new WeakMap();
|
|
125
|
+
r.styles = S`
|
|
126
|
+
${C(B)}
|
|
127
|
+
`;
|
|
128
|
+
a([
|
|
129
|
+
p({ type: String })
|
|
130
|
+
], r.prototype, "size", 2);
|
|
131
|
+
a([
|
|
132
|
+
p({ type: String })
|
|
133
|
+
], r.prototype, "heading", 2);
|
|
134
|
+
a([
|
|
135
|
+
p({ type: Boolean, reflect: !0 })
|
|
136
|
+
], r.prototype, "open", 2);
|
|
137
|
+
a([
|
|
138
|
+
p({ type: Boolean })
|
|
139
|
+
], r.prototype, "defaultOpen", 2);
|
|
140
|
+
a([
|
|
141
|
+
p({ type: String })
|
|
142
|
+
], r.prototype, "id", 2);
|
|
143
|
+
a([
|
|
144
|
+
w()
|
|
145
|
+
], r.prototype, "_isOpen", 2);
|
|
146
|
+
a([
|
|
147
|
+
w()
|
|
148
|
+
], r.prototype, "_accordionUniqueId", 2);
|
|
149
|
+
a([
|
|
150
|
+
O({ slot: "icon", flatten: !0 })
|
|
151
|
+
], r.prototype, "iconNodes", 2);
|
|
152
|
+
a([
|
|
153
|
+
x({ context: M, subscribe: !0 })
|
|
154
|
+
], r.prototype, "group", 2);
|
|
155
|
+
r = a([
|
|
156
|
+
D("bm-accordion")
|
|
157
|
+
], r);
|
|
158
|
+
export {
|
|
159
|
+
r as B,
|
|
160
|
+
B as a
|
|
161
|
+
};
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import { consume as M } from "@lit/context";
|
|
2
|
+
import { unsafeCSS as H, LitElement as $, html as d, nothing as P } from "lit";
|
|
3
|
+
import { property as i } from "lit/decorators.js";
|
|
4
|
+
import { unsafeSVG as I } from "lit/directives/unsafe-svg.js";
|
|
5
|
+
import v from "clsx";
|
|
6
|
+
import { g as C } from "./classNames.Cq_tbDRp.js";
|
|
7
|
+
import "./constants.jOWREYQE.js";
|
|
8
|
+
import { c as Z } from "./CSSLookup.BdqZ5Li9.js";
|
|
9
|
+
import { c as B } from "./register-custom-element.DHGKOhmA.js";
|
|
10
|
+
import { stateLayerStyles as N, stateLayerClassName as W } from "../StateLayer/StateLayer.js";
|
|
11
|
+
import { AvatarGroupCtx as E } from "../Avatar/AvatarGroup.context.js";
|
|
12
|
+
const A = `<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
13
|
+
<path
|
|
14
|
+
fill-rule="evenodd"
|
|
15
|
+
clip-rule="evenodd"
|
|
16
|
+
d="M12 7V3H2V21H22V7H12ZM6 19H4V17H6V19ZM6 15H4V13H6V15ZM6 11H4V9H6V11ZM6 7H4V5H6V7ZM10 19H8V17H10V19ZM10 15H8V13H10V15ZM10 11H8V9H10V11ZM10 7H8V5H10V7ZM20 19H12V17H14V15H12V13H14V11H12V9H20V19ZM18 11H16V13H18V11ZM18 15H16V17H18V15Z"
|
|
17
|
+
fill="currentColor"
|
|
18
|
+
/>
|
|
19
|
+
</svg>
|
|
20
|
+
`, G = `<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
21
|
+
<path
|
|
22
|
+
fill-rule="evenodd"
|
|
23
|
+
clip-rule="evenodd"
|
|
24
|
+
d="M12 12C14.21 12 16 10.21 16 8C16 5.79 14.21 4 12 4C9.79 4 8 5.79 8 8C8 10.21 9.79 12 12 12ZM12 14C9.33 14 4 15.34 4 18V20H20V18C20 15.34 14.67 14 12 14Z"
|
|
25
|
+
fill="currentColor"
|
|
26
|
+
/>
|
|
27
|
+
</svg>
|
|
28
|
+
`, { baseClassNamePrefix: L, subElementClassPrefix: g, classModifierPrefix: l } = C("avatar"), ia = {
|
|
29
|
+
xs: 1.25,
|
|
30
|
+
sm: 1.5,
|
|
31
|
+
md: 2,
|
|
32
|
+
lg: 2.5,
|
|
33
|
+
xl: 3
|
|
34
|
+
}, q = (a, r) => {
|
|
35
|
+
var _, S, k;
|
|
36
|
+
const e = a.split(" "), o = e.length > 1, t = r !== "xs" && o, p = (_ = e.at(0)) != null && _.startsWith("+") ? e.at(0) : void 0, b = `${((S = e.at(0)) == null ? void 0 : S[0]) || ""}${t && ((k = e.at(-1)) == null ? void 0 : k[0]) || ""}`.toUpperCase();
|
|
37
|
+
return p || b;
|
|
38
|
+
}, O = 0.25, R = 0.5, T = (a, r) => (["xs", "sm", "md"].includes(a) ? O : R) * (r === "stacked" ? 1 : -1), ca = (a, r) => Z(T(a, r)) * (r === "stacked" ? 1 : -1), {
|
|
39
|
+
baseClassNamePrefix: va,
|
|
40
|
+
classModifierPrefix: la
|
|
41
|
+
} = C("avatar-group"), F = ':root,:host,.bm-light,.bm-dark .bm-inverse,[data-bm-theme~=bm-light]{--bm-comp-avatar-size-xs: var(--bm-primitive-dimension-125, 1.25rem);--bm-comp-avatar-size-sm: var(--bm-primitive-dimension-150, 1.5rem);--bm-comp-avatar-size-md: var(--bm-primitive-dimension-200, 2rem);--bm-comp-avatar-size-lg: var(--bm-primitive-dimension-250, 2.5rem);--bm-comp-avatar-size-xl: var(--bm-primitive-dimension-300, 3rem);--bm-comp-avatar-size-icon-xs: var(--bm-sem-size-icon-xs, .75rem);--bm-comp-avatar-size-icon-sm: var(--bm-sem-size-icon-xs, .75rem);--bm-comp-avatar-size-icon-md: var(--bm-sem-size-icon-sm, 1rem);--bm-comp-avatar-size-icon-lg: var(--bm-sem-size-icon-md, 1.25rem);--bm-comp-avatar-size-icon-xl: var(--bm-sem-size-icon-lg, 1.5rem);--bm-comp-avatar-color-border: var(--bm-sem-color-surface-01, #ffffff);--bm-comp-avatar-color-accent-bg: var( --bm-utility-color-accent-default, #00768f );--bm-comp-avatar-color-accent-fg: var( --bm-sem-color-text-primary-inverse, #ffffff );--bm-comp-avatar-color-neutral-bg: var( --bm-utility-color-gray-default, #576775 );--bm-comp-avatar-color-neutral-fg: var( --bm-sem-color-text-primary-inverse, #ffffff );--bm-comp-avatar-color-overflow-bg: var( --bm-utility-color-gray-subtler, #dfe7ec );--bm-comp-avatar-color-overflow-fg: var(--bm-sem-color-text-primary, #141d24);--bm-comp-avatar-color-overflow-border: var( --bm-sem-color-surface-01, #ffffff );--bm-comp-avatar-typo-xs: var( --bm-sem-typo-label-xs, 600 .75rem/1.25rem "Source Sans Pro" );--bm-comp-avatar-typo-sm: var( --bm-sem-typo-label-xs, 600 .75rem/1.25rem "Source Sans Pro" );--bm-comp-avatar-typo-md: var( --bm-sem-typo-label-sm, 600 .875rem/1.25rem "Source Sans Pro" );--bm-comp-avatar-typo-lg: var( --bm-sem-typo-label-md, 600 1rem/1.5rem "Source Sans Pro" );--bm-comp-avatar-typo-xl: var( --bm-sem-typo-label-lg, 600 1.125rem/1.75rem "Source Sans Pro" )}:host,.bm-dark,.bm-light .bm-inverse,[data-bm-theme~=bm-dark]{--bm-comp-avatar-size-xs: var(--bm-primitive-dimension-125, 1.25rem);--bm-comp-avatar-size-sm: var(--bm-primitive-dimension-150, 1.5rem);--bm-comp-avatar-size-md: var(--bm-primitive-dimension-200, 2rem);--bm-comp-avatar-size-lg: var(--bm-primitive-dimension-250, 2.5rem);--bm-comp-avatar-size-xl: var(--bm-primitive-dimension-300, 3rem);--bm-comp-avatar-size-icon-xs: var(--bm-sem-size-icon-xs, .75rem);--bm-comp-avatar-size-icon-sm: var(--bm-sem-size-icon-xs, .75rem);--bm-comp-avatar-size-icon-md: var(--bm-sem-size-icon-sm, 1rem);--bm-comp-avatar-size-icon-lg: var(--bm-sem-size-icon-md, 1.25rem);--bm-comp-avatar-size-icon-xl: var(--bm-sem-size-icon-lg, 1.5rem);--bm-comp-avatar-color-border: var(--bm-sem-color-surface-01, #202e39);--bm-comp-avatar-color-accent-bg: var( --bm-utility-color-accent-default, #43bfd6 );--bm-comp-avatar-color-accent-fg: var( --bm-sem-color-text-primary-inverse, #141d24 );--bm-comp-avatar-color-neutral-bg: var( --bm-utility-color-gray-default, #9fafbc );--bm-comp-avatar-color-neutral-fg: var( --bm-sem-color-text-primary-inverse, #141d24 );--bm-comp-avatar-color-overflow-bg: var( --bm-utility-color-gray-subtler, #32424e );--bm-comp-avatar-color-overflow-fg: var(--bm-sem-color-text-primary, #ffffff);--bm-comp-avatar-color-overflow-border: var( --bm-sem-color-surface-01, #202e39 );--bm-comp-avatar-typo-xs: var( --bm-sem-typo-label-xs, 600 .75rem/1.25rem "Source Sans Pro" );--bm-comp-avatar-typo-sm: var( --bm-sem-typo-label-xs, 600 .75rem/1.25rem "Source Sans Pro" );--bm-comp-avatar-typo-md: var( --bm-sem-typo-label-sm, 600 .875rem/1.25rem "Source Sans Pro" );--bm-comp-avatar-typo-lg: var( --bm-sem-typo-label-md, 600 1rem/1.5rem "Source Sans Pro" );--bm-comp-avatar-typo-xl: var( --bm-sem-typo-label-lg, 600 1.125rem/1.75rem "Source Sans Pro" )}.bm-avatar{display:inline-flex;align-items:center;justify-content:center;overflow:hidden;position:relative}.bm-avatar__image{display:flex;height:100%;width:100%}.bm-avatar--interactive{cursor:pointer}.bm-avatar--disabled{opacity:var(--bm-sem-opacity-disabled);-webkit-user-select:none;user-select:none}.bm-avatar--hidden{display:none}.bm-avatar--with-border{flex:0 0 auto;outline:var(--bm-sem-border-width-md) solid var(--bm-comp-avatar-color-border)}.bm-avatar--content{z-index:1;position:relative}.bm-avatar:focus-visible{outline-offset:var(--bm-sem-size-focus-offset);outline:var(--bm-sem-border-width-focus) solid var(--bm-sem-color-border-focus)}.bm-avatar--xs{height:var(--bm-comp-avatar-size-xs);width:var(--bm-comp-avatar-size-xs)}.bm-avatar__icon--xs{display:flex;color:var(--bm-comp-avatar-color-neutral-fg);width:var(--bm-comp-avatar-size-icon-xs);height:var(--bm-comp-avatar-size-icon-xs)}.bm-avatar__text--xs{cursor:default;font:var(--bm-comp-avatar-typo-xs)}.bm-avatar--sm{height:var(--bm-comp-avatar-size-sm);width:var(--bm-comp-avatar-size-sm)}.bm-avatar__icon--sm{display:flex;color:var(--bm-comp-avatar-color-neutral-fg);width:var(--bm-comp-avatar-size-icon-sm);height:var(--bm-comp-avatar-size-icon-sm)}.bm-avatar__text--sm{cursor:default;font:var(--bm-comp-avatar-typo-sm)}.bm-avatar--md{height:var(--bm-comp-avatar-size-md);width:var(--bm-comp-avatar-size-md)}.bm-avatar__icon--md{display:flex;color:var(--bm-comp-avatar-color-neutral-fg);width:var(--bm-comp-avatar-size-icon-md);height:var(--bm-comp-avatar-size-icon-md)}.bm-avatar__text--md{cursor:default;font:var(--bm-comp-avatar-typo-md)}.bm-avatar--lg{height:var(--bm-comp-avatar-size-lg);width:var(--bm-comp-avatar-size-lg)}.bm-avatar__icon--lg{display:flex;color:var(--bm-comp-avatar-color-neutral-fg);width:var(--bm-comp-avatar-size-icon-lg);height:var(--bm-comp-avatar-size-icon-lg)}.bm-avatar__text--lg{cursor:default;font:var(--bm-comp-avatar-typo-lg)}.bm-avatar--xl{height:var(--bm-comp-avatar-size-xl);width:var(--bm-comp-avatar-size-xl)}.bm-avatar__icon--xl{display:flex;color:var(--bm-comp-avatar-color-neutral-fg);width:var(--bm-comp-avatar-size-icon-xl);height:var(--bm-comp-avatar-size-icon-xl)}.bm-avatar__text--xl{cursor:default;font:var(--bm-comp-avatar-typo-xl)}.bm-avatar--circle{border-radius:var(--bm-sem-radius-round)}.bm-avatar--square{border-radius:var(--bm-sem-radius-sm)}.bm-avatar--neutral{background:var(--bm-comp-avatar-color-neutral-bg);color:var(--bm-comp-avatar-color-neutral-fg)}.bm-avatar--accent{background:var(--bm-comp-avatar-color-accent-bg);color:var(--bm-comp-avatar-color-accent-fg)}.bm-avatar--overflow{background:var(--bm-comp-avatar-color-overflow-bg);color:var(--bm-comp-avatar-color-overflow-fg)}.bm-avatar-group{display:flex;row-gap:var(--bm-sem-space-50)}.bm-avatar-group>*,.bm-avatar-group bm-avatar{flex:0 0 auto;outline:var(--bm-sem-border-width-md) solid var(--bm-comp-avatar-color-border)}.bm-avatar-group--wrapping{flex-wrap:wrap}.bm-avatar-group--stacked-xs{padding-inline-start:calc(var(--bm-sem-space-25))}.bm-avatar-group--stacked-xs ::slotted(*){margin-inline-start:calc(var(--bm-sem-space-25) * -1)}.bm-avatar-group--stacked-xs>*,.bm-avatar-group--stacked-xs bm-avatar{margin-inline-start:calc(var(--bm-sem-space-25) * -1)}.bm-avatar-group--stacked-sm{padding-inline-start:calc(var(--bm-sem-space-25))}.bm-avatar-group--stacked-sm ::slotted(*){margin-inline-start:calc(var(--bm-sem-space-25) * -1)}.bm-avatar-group--stacked-sm>*,.bm-avatar-group--stacked-sm bm-avatar{margin-inline-start:calc(var(--bm-sem-space-25) * -1)}.bm-avatar-group--stacked-md{padding-inline-start:calc(var(--bm-sem-space-25))}.bm-avatar-group--stacked-md ::slotted(*){margin-inline-start:calc(var(--bm-sem-space-25) * -1)}.bm-avatar-group--stacked-md>*,.bm-avatar-group--stacked-md bm-avatar{margin-inline-start:calc(var(--bm-sem-space-25) * -1)}.bm-avatar-group--stacked-lg{padding-inline-start:calc(var(--bm-sem-space-50))}.bm-avatar-group--stacked-lg ::slotted(*){margin-inline-start:calc(var(--bm-sem-space-50) * -1)}.bm-avatar-group--stacked-lg>*,.bm-avatar-group--stacked-lg bm-avatar{margin-inline-start:calc(var(--bm-sem-space-50) * -1)}.bm-avatar-group--stacked-xl{padding-inline-start:calc(var(--bm-sem-space-50))}.bm-avatar-group--stacked-xl ::slotted(*){margin-inline-start:calc(var(--bm-sem-space-50) * -1)}.bm-avatar-group--stacked-xl>*,.bm-avatar-group--stacked-xl bm-avatar{margin-inline-start:calc(var(--bm-sem-space-50) * -1)}.bm-avatar-group--spaced-xs,.bm-avatar-group--spaced-sm,.bm-avatar-group--spaced-md{gap:var(--bm-sem-space-25)}.bm-avatar-group--spaced-lg,.bm-avatar-group--spaced-xl{gap:var(--bm-sem-space-50)}.bm-avatar-group--xs ::slotted(*){height:var(--bm-comp-avatar-size-xs)}.bm-avatar-group--sm ::slotted(*){height:var(--bm-comp-avatar-size-sm)}.bm-avatar-group--md ::slotted(*){height:var(--bm-comp-avatar-size-md)}.bm-avatar-group--lg ::slotted(*){height:var(--bm-comp-avatar-size-lg)}.bm-avatar-group--xl ::slotted(*){height:var(--bm-comp-avatar-size-xl)}.bm-avatar-group--circle>*,.bm-avatar-group--circle bm-avatar{border-radius:var(--bm-sem-radius-round)}.bm-avatar-group--circle ::slotted(*){border-radius:var(--bm-sem-radius-round)}.bm-avatar-group--square>*,.bm-avatar-group--square bm-avatar{border-radius:var(--bm-sem-radius-sm)}.bm-avatar-group--square ::slotted(*){border-radius:var(--bm-sem-radius-sm)}';
|
|
42
|
+
var D = Object.defineProperty, U = Object.getOwnPropertyDescriptor, V = (a) => {
|
|
43
|
+
throw TypeError(a);
|
|
44
|
+
}, s = (a, r, e, o) => {
|
|
45
|
+
for (var t = o > 1 ? void 0 : o ? U(r, e) : r, p = a.length - 1, b; p >= 0; p--)
|
|
46
|
+
(b = a[p]) && (t = (o ? b(r, e, t) : b(t)) || t);
|
|
47
|
+
return o && t && D(r, e, t), t;
|
|
48
|
+
}, J = (a, r, e) => r.has(a) || V("Cannot " + e), c = (a, r, e) => (J(a, r, "read from private field"), e ? e.call(a) : r.get(a)), n = (a, r, e) => r.has(a) ? V("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(a) : r.set(a, e), f, h, x, u, y, z, w;
|
|
49
|
+
const K = {
|
|
50
|
+
square: A,
|
|
51
|
+
circle: G
|
|
52
|
+
};
|
|
53
|
+
let m = class extends $ {
|
|
54
|
+
constructor() {
|
|
55
|
+
super(...arguments), this.appearance = "neutral", this.size = "md", this.disabled = !1, this.shape = "circle", this.isInteractive = !1, this.isFocusable = !1, this.withBorder = !1, n(this, f, () => {
|
|
56
|
+
var t;
|
|
57
|
+
const a = this.appearance || "neutral", r = ((t = this.group) == null ? void 0 : t.size) || this.size || "md", e = this.shape || "circle", o = this.group ? !0 : this.withBorder;
|
|
58
|
+
return v(
|
|
59
|
+
this.className,
|
|
60
|
+
L,
|
|
61
|
+
`${l}${e}`,
|
|
62
|
+
this.disabled && `${l}disabled`,
|
|
63
|
+
o && `${l}with-border`,
|
|
64
|
+
this.isInteractive && !this.disabled && `${l}interactive`,
|
|
65
|
+
`${l}${r}`,
|
|
66
|
+
`${l}${a}`
|
|
67
|
+
);
|
|
68
|
+
}), n(this, h, () => this.isInteractive || this.isFocusable ? 0 : -1), n(this, x, v(`${g}image`)), n(this, u, v(`${l}content`)), n(this, y, () => {
|
|
69
|
+
var o;
|
|
70
|
+
const a = ((o = this.group) == null ? void 0 : o.size) || this.size || "md", r = v(`${g}icon--${a}`);
|
|
71
|
+
if (this.src !== void 0 && this.src !== "")
|
|
72
|
+
return d`
|
|
73
|
+
<img
|
|
74
|
+
src=${this.src}
|
|
75
|
+
alt=${this.alt || this.name}
|
|
76
|
+
class=${v(
|
|
77
|
+
c(this, x),
|
|
78
|
+
this.isInteractive && c(this, u)
|
|
79
|
+
)}
|
|
80
|
+
/>
|
|
81
|
+
`;
|
|
82
|
+
if (this.name !== void 0 && this.name !== "") {
|
|
83
|
+
const t = v(`${g}text--${a}`);
|
|
84
|
+
return d`
|
|
85
|
+
<span
|
|
86
|
+
class=${v(t, this.isInteractive && c(this, u))}
|
|
87
|
+
>
|
|
88
|
+
${q(this.name, a)}
|
|
89
|
+
</span>
|
|
90
|
+
`;
|
|
91
|
+
}
|
|
92
|
+
const e = K[this.shape || "circle"];
|
|
93
|
+
return d`
|
|
94
|
+
<span
|
|
95
|
+
role="img"
|
|
96
|
+
aria-label=${this.alt || this.name}
|
|
97
|
+
class=${v(r, this.isInteractive && c(this, u))}
|
|
98
|
+
part="icon"
|
|
99
|
+
>
|
|
100
|
+
<slot name="icon"> ${I(e)} </slot>
|
|
101
|
+
</span>
|
|
102
|
+
`;
|
|
103
|
+
}), n(this, z, W()), n(this, w, () => !this.isInteractive || this.disabled ? P : d`<span aria-hidden="true" class=${c(this, z)}></span>`);
|
|
104
|
+
}
|
|
105
|
+
connectedCallback() {
|
|
106
|
+
var a, r;
|
|
107
|
+
super.connectedCallback(), (r = (a = this.group) == null ? void 0 : a.register) == null || r.call(a, this);
|
|
108
|
+
}
|
|
109
|
+
disconnectedCallback() {
|
|
110
|
+
var a, r;
|
|
111
|
+
(r = (a = this.group) == null ? void 0 : a.unregister) == null || r.call(a, this), super.disconnectedCallback();
|
|
112
|
+
}
|
|
113
|
+
render() {
|
|
114
|
+
return d`
|
|
115
|
+
<div class=${c(this, f).call(this)} part="avatar" tabindex=${c(this, h).call(this)}>
|
|
116
|
+
${c(this, w).call(this)} ${c(this, y).call(this)}
|
|
117
|
+
</div>
|
|
118
|
+
`;
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
f = /* @__PURE__ */ new WeakMap();
|
|
122
|
+
h = /* @__PURE__ */ new WeakMap();
|
|
123
|
+
x = /* @__PURE__ */ new WeakMap();
|
|
124
|
+
u = /* @__PURE__ */ new WeakMap();
|
|
125
|
+
y = /* @__PURE__ */ new WeakMap();
|
|
126
|
+
z = /* @__PURE__ */ new WeakMap();
|
|
127
|
+
w = /* @__PURE__ */ new WeakMap();
|
|
128
|
+
m.styles = [H(F), N];
|
|
129
|
+
s([
|
|
130
|
+
i({ type: String })
|
|
131
|
+
], m.prototype, "appearance", 2);
|
|
132
|
+
s([
|
|
133
|
+
i({ type: String })
|
|
134
|
+
], m.prototype, "name", 2);
|
|
135
|
+
s([
|
|
136
|
+
i({ type: String })
|
|
137
|
+
], m.prototype, "src", 2);
|
|
138
|
+
s([
|
|
139
|
+
i({ type: String })
|
|
140
|
+
], m.prototype, "alt", 2);
|
|
141
|
+
s([
|
|
142
|
+
i({ type: String })
|
|
143
|
+
], m.prototype, "size", 2);
|
|
144
|
+
s([
|
|
145
|
+
i({ type: Boolean })
|
|
146
|
+
], m.prototype, "disabled", 2);
|
|
147
|
+
s([
|
|
148
|
+
i({ type: String })
|
|
149
|
+
], m.prototype, "shape", 2);
|
|
150
|
+
s([
|
|
151
|
+
i({ type: Boolean })
|
|
152
|
+
], m.prototype, "isInteractive", 2);
|
|
153
|
+
s([
|
|
154
|
+
i({ type: Boolean })
|
|
155
|
+
], m.prototype, "isFocusable", 2);
|
|
156
|
+
s([
|
|
157
|
+
i({ type: Boolean })
|
|
158
|
+
], m.prototype, "withBorder", 2);
|
|
159
|
+
s([
|
|
160
|
+
M({ context: E, subscribe: !0 })
|
|
161
|
+
], m.prototype, "group", 2);
|
|
162
|
+
m = s([
|
|
163
|
+
B("bm-avatar")
|
|
164
|
+
], m);
|
|
165
|
+
export {
|
|
166
|
+
m as B,
|
|
167
|
+
F as a,
|
|
168
|
+
ia as b,
|
|
169
|
+
l as c,
|
|
170
|
+
ca as d,
|
|
171
|
+
va as e,
|
|
172
|
+
la as f,
|
|
173
|
+
T as g
|
|
174
|
+
};
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { consume as y } from "@lit/context";
|
|
2
|
+
import { unsafeCSS as g, LitElement as x, html as s } from "lit";
|
|
3
|
+
import { property as b, queryAssignedNodes as C } from "lit/decorators.js";
|
|
4
|
+
import { unsafeSVG as u } from "lit/directives/unsafe-svg.js";
|
|
5
|
+
import { g as k } from "./classNames.Cq_tbDRp.js";
|
|
6
|
+
import { c as $ } from "./register-custom-element.DHGKOhmA.js";
|
|
7
|
+
import { b as w } from "./helpers.AwJwaZvv.js";
|
|
8
|
+
import { BreadcrumbGroupCtx as z } from "../Breadcrumbs/Breadcrumbs.context.js";
|
|
9
|
+
import "../Link/Link.js";
|
|
10
|
+
const B = ':root,:host,.bm-light,.bm-dark .bm-inverse,[data-bm-theme~=bm-light]{--bm-comp-breadcrumb-color-enabled: var( --bm-sem-color-text-secondary, #576775 );--bm-comp-breadcrumb-color-hover: var(--bm-sem-color-text-primary, #141d24);--bm-comp-breadcrumb-color-active: var(--bm-sem-color-text-primary, #141d24);--bm-comp-breadcrumb-color-selected: var( --bm-sem-color-text-primary, #141d24 );--bm-comp-breadcrumb-size-icon-chevron: var(--bm-sem-size-icon-sm, 1rem);--bm-comp-breadcrumb-typo-default: var( --bm-sem-typo-body-sm, 400 .875rem/1.25rem "Source Sans Pro" );--bm-comp-breadcrumb-space-gap: var(--bm-sem-space-25, .25rem)}:host,.bm-dark,.bm-light .bm-inverse,[data-bm-theme~=bm-dark]{--bm-comp-breadcrumb-color-enabled: var( --bm-sem-color-text-secondary, #c3cdd5 );--bm-comp-breadcrumb-color-hover: var(--bm-sem-color-text-primary, #ffffff);--bm-comp-breadcrumb-color-active: var(--bm-sem-color-text-primary, #ffffff);--bm-comp-breadcrumb-color-selected: var( --bm-sem-color-text-primary, #ffffff );--bm-comp-breadcrumb-size-icon-chevron: var(--bm-sem-size-icon-sm, 1rem);--bm-comp-breadcrumb-typo-default: var( --bm-sem-typo-body-sm, 400 .875rem/1.25rem "Source Sans Pro" );--bm-comp-breadcrumb-space-gap: var(--bm-sem-space-25, .25rem)}.bm-breadcrumbs__list{display:flex;align-items:center;list-style:none;padding:0;margin:0;gap:var(--bm-comp-breadcrumb-space-gap)}.bm-breadcrumbs__item{display:flex;align-items:center;gap:var(--bm-comp-breadcrumb-space-gap)}.bm-breadcrumbs__link{--bm-sem-color-link-secondary: var(--bm-comp-breadcrumb-color-enabled)}.bm-breadcrumbs__link:hover{--bm-comp-link-color-primary-hover: var(--bm-comp-breadcrumb-color-hover)}.bm-breadcrumbs__link:active{--bm-comp-link-color-secondary-active: var(--bm-comp-breadcrumb-color-active)}.bm-breadcrumbs__link.bm-link--disabled{cursor:pointer;--bm-sem-opacity-disabled: 1}.bm-breadcrumbs__link.bm-link--disabled:hover{text-decoration:underline}.bm-breadcrumbs__icon{flex-shrink:0;display:inline-flex}.bm-breadcrumbs__icon ::slotted([slot=icon]){color:var(--bm-comp-breadcrumb-color-enabled);width:var(--bm-comp-link-size-sm-icon);height:var(--bm-comp-link-size-sm-icon);display:inline-flex}.bm-breadcrumbs__icon--current{width:var(--bm-comp-link-size-sm-icon);height:var(--bm-comp-link-size-sm-icon);color:var(--bm-comp-breadcrumb-color-selected)}.bm-breadcrumbs__separator{min-width:var(--bm-comp-breadcrumb-size-icon-chevron);min-height:var(--bm-comp-breadcrumb-size-icon-chevron);max-width:var(--bm-comp-breadcrumb-size-icon-chevron);max-height:var(--bm-comp-breadcrumb-size-icon-chevron);color:var(--bm-comp-breadcrumb-color-enabled)}[dir=rtl] .bm-breadcrumbs__separator{transform:rotate(180deg)}.bm-breadcrumbs__text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}[dir=rtl] .bm-breadcrumbs__text{unicode-bidi:plaintext}.bm-breadcrumbs__current{color:var(--bm-comp-breadcrumb-color-selected);font:var(--bm-comp-breadcrumb-typo-default);display:flex;align-items:center;gap:var(--bm-comp-breadcrumb-space-gap)}.bm-breadcrumbs__item--ellipsis{color:var(--bm-comp-breadcrumb-color-enabled)}.bm-breadcrumbs__item--ellipsis :focus-visible{outline:var(--bm-sem-border-width-focus) solid var(--bm-sem-color-border-focus);border-radius:var(--bm-sem-radius-focus-md)}.bm-breadcrumbs--wrap .bm-breadcrumbs__list{flex-wrap:wrap}:host(*) .bm-breadcrumbs__text{color:var(--bm-comp-breadcrumb-color-enabled)}:host(*) .bm-breadcrumbs__text:hover{color:var(--bm-comp-breadcrumb-color-hover)}:host(*) .bm-breadcrumbs__text:active{color:var(--bm-comp-breadcrumb-color-active)}::part(link){max-width:var(--bm-comp-breadcrumbs-truncation-width, auto);--bm-sem-color-link-secondary: var(--bm-comp-breadcrumb-color-enabled)}:host-context([dir=rtl]) .bm-breadcrumbs__text{unicode-bidi:plaintext}:host-context([dir=rtl]) .bm-breadcrumbs__separator{transform:rotate(180deg)}', h = `<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
11
|
+
<path
|
|
12
|
+
d="M9.37538 6.2194C9.47793 6.13729 9.59564 6.07619 9.7218 6.03959C9.84796 6.00299 9.9801 5.99161 10.1107 6.0061C10.2412 6.02059 10.3677 6.06066 10.4827 6.12402C10.5978 6.18738 10.6993 6.2728 10.7813 6.37539L14.7811 11.3751C14.9231 11.5524 15.0004 11.7729 15.0004 12.0001C15.0004 12.2272 14.9231 12.4477 14.7811 12.625L10.7813 17.6247C10.6156 17.8318 10.3743 17.9646 10.1107 17.9939C9.84699 18.0231 9.58251 17.9465 9.37538 17.7807C9.16826 17.615 9.03547 17.3737 9.00621 17.1101C8.97696 16.8464 9.05364 16.5819 9.21939 16.3748L12.7192 12.0001L9.21939 7.62532C9.13729 7.52278 9.07619 7.40506 9.03959 7.2789C9.00299 7.15274 8.99161 7.0206 9.00609 6.89004C9.02058 6.75947 9.06065 6.63305 9.12401 6.51798C9.18738 6.4029 9.2728 6.30145 9.37538 6.2194Z"
|
|
13
|
+
fill="currentColor"
|
|
14
|
+
/>
|
|
15
|
+
</svg>
|
|
16
|
+
`;
|
|
17
|
+
var S = Object.defineProperty, P = Object.getOwnPropertyDescriptor, _ = (r) => {
|
|
18
|
+
throw TypeError(r);
|
|
19
|
+
}, m = (r, e, o, i) => {
|
|
20
|
+
for (var c = i > 1 ? void 0 : i ? P(e, o) : e, l = r.length - 1, n; l >= 0; l--)
|
|
21
|
+
(n = r[l]) && (c = (i ? n(e, o, c) : n(c)) || c);
|
|
22
|
+
return i && c && S(e, o, c), c;
|
|
23
|
+
}, N = (r, e, o) => e.has(r) || _("Cannot " + o), v = (r, e, o) => (N(r, e, "read from private field"), o ? o.call(r) : e.get(r)), f = (r, e, o) => e.has(r) ? _("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(r) : e.set(r, o), d, p;
|
|
24
|
+
const { subElementClassPrefix: a, variablePrefix: W } = k("breadcrumbs");
|
|
25
|
+
let t = class extends x {
|
|
26
|
+
constructor() {
|
|
27
|
+
super(...arguments), this.clickable = !1, this.isCurrent = !1, this.isCollapsed = !1, f(this, d, () => {
|
|
28
|
+
var o;
|
|
29
|
+
const r = `${a}icon--current`;
|
|
30
|
+
return this._iconNode && ((o = this._iconNode) == null ? void 0 : o.length) > 0 ? s` <span class="${r}">
|
|
31
|
+
<slot name="iconBefore"></slot>
|
|
32
|
+
</span>` : s` <slot name="iconBefore"></slot>`;
|
|
33
|
+
}), f(this, p, (r) => {
|
|
34
|
+
!this.href && this.clickable && r.preventDefault();
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
connectedCallback() {
|
|
38
|
+
var r, e;
|
|
39
|
+
super.connectedCallback(), (e = (r = this.group) == null ? void 0 : r.register) == null || e.call(r, this);
|
|
40
|
+
}
|
|
41
|
+
disconnectedCallback() {
|
|
42
|
+
var r, e;
|
|
43
|
+
(e = (r = this.group) == null ? void 0 : r.unregister) == null || e.call(r, this), super.disconnectedCallback();
|
|
44
|
+
}
|
|
45
|
+
render() {
|
|
46
|
+
const r = s`
|
|
47
|
+
<span class=${`${a}text`}><slot></slot></span>
|
|
48
|
+
`;
|
|
49
|
+
this.truncationWidth && this.style.setProperty(
|
|
50
|
+
`${W}-truncation-width`,
|
|
51
|
+
`${this.truncationWidth}`
|
|
52
|
+
);
|
|
53
|
+
const e = w(this, this.truncationWidth);
|
|
54
|
+
return this.isCollapsed ? s`
|
|
55
|
+
<li
|
|
56
|
+
class="${`${a}item`} ${`${a}item--ellipsis`}"
|
|
57
|
+
>
|
|
58
|
+
<span class=${`${a}text`} aria-hidden="true">…</span>
|
|
59
|
+
<span class=${`${a}separator`}>
|
|
60
|
+
${u(h)}
|
|
61
|
+
</span>
|
|
62
|
+
</li>
|
|
63
|
+
` : s`
|
|
64
|
+
<li class=${`${a}item`}>
|
|
65
|
+
${this.isCurrent ? s`
|
|
66
|
+
${v(this, d).call(this)}
|
|
67
|
+
<span class=${`${a}current`} aria-current="page"
|
|
68
|
+
><slot></slot>
|
|
69
|
+
</span>
|
|
70
|
+
` : s` <bm-link
|
|
71
|
+
href=${this.href || "#"}
|
|
72
|
+
appearance="secondary"
|
|
73
|
+
size="sm"
|
|
74
|
+
hideUnderline
|
|
75
|
+
className=${`${a}link`}
|
|
76
|
+
.disabled=${!this.href && !this.clickable}
|
|
77
|
+
tabIndex=${this.href ? void 0 : 0}
|
|
78
|
+
title=${e}
|
|
79
|
+
@click=${v(this, p)}
|
|
80
|
+
>
|
|
81
|
+
<slot name="iconBefore"></slot>
|
|
82
|
+
${r}
|
|
83
|
+
</bm-link>
|
|
84
|
+
<span class=${`${a}separator`}>
|
|
85
|
+
${u(h)}
|
|
86
|
+
</span>`}
|
|
87
|
+
</li>
|
|
88
|
+
`;
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
d = /* @__PURE__ */ new WeakMap();
|
|
92
|
+
p = /* @__PURE__ */ new WeakMap();
|
|
93
|
+
t.styles = g(B);
|
|
94
|
+
m([
|
|
95
|
+
b({ type: String })
|
|
96
|
+
], t.prototype, "href", 2);
|
|
97
|
+
m([
|
|
98
|
+
b({ type: Boolean })
|
|
99
|
+
], t.prototype, "clickable", 2);
|
|
100
|
+
m([
|
|
101
|
+
b({ type: String })
|
|
102
|
+
], t.prototype, "truncationWidth", 2);
|
|
103
|
+
m([
|
|
104
|
+
b({ type: Boolean, reflect: !0 })
|
|
105
|
+
], t.prototype, "isCurrent", 2);
|
|
106
|
+
m([
|
|
107
|
+
b({ type: Boolean, reflect: !0, attribute: "isCollapsed" })
|
|
108
|
+
], t.prototype, "isCollapsed", 2);
|
|
109
|
+
m([
|
|
110
|
+
C({ slot: "iconBefore", flatten: !0 })
|
|
111
|
+
], t.prototype, "_iconNode", 2);
|
|
112
|
+
m([
|
|
113
|
+
y({ context: z, subscribe: !0 })
|
|
114
|
+
], t.prototype, "group", 2);
|
|
115
|
+
t = m([
|
|
116
|
+
$("bm-breadcrumb-item")
|
|
117
|
+
], t);
|
|
118
|
+
export {
|
|
119
|
+
t as B,
|
|
120
|
+
B as b
|
|
121
|
+
};
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
var b = (s) => {
|
|
2
|
+
throw TypeError(s);
|
|
3
|
+
};
|
|
4
|
+
var h = (s, e, t) => e.has(s) || b("Cannot " + t);
|
|
5
|
+
var o = (s, e, t) => (h(s, e, "read from private field"), t ? t.call(s) : e.get(s)), c = (s, e, t) => e.has(s) ? b("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(s) : e.set(s, t), a = (s, e, t, n) => (h(s, e, "write to private field"), n ? n.call(s, t) : e.set(s, t), t);
|
|
6
|
+
import { B as S } from "./constants.jOWREYQE.js";
|
|
7
|
+
const m = typeof window > "u", E = 5e3, g = 5, I = m ? S : parseFloat(getComputedStyle(document.documentElement).fontSize), w = (s) => s * I, F = (s) => {
|
|
8
|
+
const e = M(s);
|
|
9
|
+
return window.getComputedStyle(document.documentElement).getPropertyValue(e);
|
|
10
|
+
}, x = (s) => {
|
|
11
|
+
const e = parseFloat(s) ?? 0;
|
|
12
|
+
return s.includes("rem") ? w(e) : s.includes("px") ? e : 0;
|
|
13
|
+
}, M = (s) => {
|
|
14
|
+
const e = s.match(/var\((.*)\)/);
|
|
15
|
+
if (!e)
|
|
16
|
+
return console.warn(
|
|
17
|
+
`Are you sure you're passing the right arguments? This function isdesigned to accept strings in the format var(--var-name) as found in the tokens file. Received: ${s}`
|
|
18
|
+
), s;
|
|
19
|
+
let t = e[0];
|
|
20
|
+
return e.length > 1 && (t = e[1]), t;
|
|
21
|
+
};
|
|
22
|
+
var l, f, u, d;
|
|
23
|
+
const i = class i {
|
|
24
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
25
|
+
constructor() {
|
|
26
|
+
c(this, l);
|
|
27
|
+
c(this, f);
|
|
28
|
+
c(this, u);
|
|
29
|
+
c(this, d);
|
|
30
|
+
this.lookupMap = /* @__PURE__ */ new Map(), this.subscribers = /* @__PURE__ */ new Map(), a(this, l, (e, t) => {
|
|
31
|
+
const n = this.subscribers.get(e);
|
|
32
|
+
return n ? (t && n.push(t), !0) : !1;
|
|
33
|
+
}), a(this, f, (e, t) => {
|
|
34
|
+
const n = this.subscribers.get(e);
|
|
35
|
+
n == null || n.forEach((r) => r(t)), o(this, u).call(this, e);
|
|
36
|
+
}), a(this, u, (e) => {
|
|
37
|
+
this.subscribers.delete(e);
|
|
38
|
+
}), a(this, d, (e, t, n) => {
|
|
39
|
+
t === 0 && this.subscribers.set(e, [n]), setTimeout(() => {
|
|
40
|
+
this.findVarHelper(e, t + 1, n);
|
|
41
|
+
}, E);
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Returns the singleton instance of the CSSLookup class.
|
|
46
|
+
* If the instance does not exist, it creates one.
|
|
47
|
+
*/
|
|
48
|
+
static getInstance() {
|
|
49
|
+
return i.instance || (i.instance = new i()), i.instance;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Find CSS variable value. Takes in a CSS variable string of format var(--varName)
|
|
53
|
+
* or --varName. If the value is not found, it will retry the lookup every second
|
|
54
|
+
* and will call the onChange function with the value once it is found.
|
|
55
|
+
*
|
|
56
|
+
* @param cssVar
|
|
57
|
+
* @param onChange - callback to call when value is found. if not specified, will
|
|
58
|
+
* not retry lookup
|
|
59
|
+
*/
|
|
60
|
+
findVar(e, t) {
|
|
61
|
+
if (m) return "";
|
|
62
|
+
const n = this.lookupMap.get(e);
|
|
63
|
+
return o(this, l).call(this, e, t) || n !== void 0 && n !== "" || n === "" && !t ? n : this.findVarHelper(e, 0, t);
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Find CSS variable value. Retries if not found initially.
|
|
67
|
+
*
|
|
68
|
+
* Lookup max retries and interval specified by LOOKUP_MAX_RETRIES and LOOKUP_FREQUENCY
|
|
69
|
+
*
|
|
70
|
+
* If callback is not specified, retries will not be attempted. This is useful for
|
|
71
|
+
* cursory lookups where the value is not critical (like initial value of useState
|
|
72
|
+
* hook)
|
|
73
|
+
*
|
|
74
|
+
* @param cssVar CSS variable to find
|
|
75
|
+
* @param onChange callback to call when value is found
|
|
76
|
+
* @param prevRetries previous number of retries
|
|
77
|
+
*/
|
|
78
|
+
findVarHelper(e, t, n) {
|
|
79
|
+
t > g && (o(this, u).call(this, e), console.warn(
|
|
80
|
+
`Failed to find CSS variable '${e}' after ${g} retries`
|
|
81
|
+
));
|
|
82
|
+
const r = F(e);
|
|
83
|
+
return this.lookupMap.set(e, r), r ? (o(this, f).call(this, e, r), r) : (n && o(this, d).call(this, e, t, n), "");
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Unsubscribe from CSS variable value
|
|
87
|
+
*
|
|
88
|
+
* @param cssVar
|
|
89
|
+
* @param onChange
|
|
90
|
+
*/
|
|
91
|
+
unsubscribe(e, t) {
|
|
92
|
+
const n = this.subscribers.get(e);
|
|
93
|
+
if (!n)
|
|
94
|
+
return;
|
|
95
|
+
const r = n.indexOf(t);
|
|
96
|
+
r !== -1 && n.splice(r, 1);
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
l = new WeakMap(), f = new WeakMap(), u = new WeakMap(), d = new WeakMap(), i.instance = null;
|
|
100
|
+
let p = i;
|
|
101
|
+
const y = Object.freeze(p.getInstance());
|
|
102
|
+
export {
|
|
103
|
+
y as C,
|
|
104
|
+
w as c,
|
|
105
|
+
x as p
|
|
106
|
+
};
|