@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
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
import { e as S } from "../chunks/provide.i2FlUkOu.js";
|
|
2
|
+
import { r as $, x, E as C } from "../chunks/lit-element.CJtt9wj5.js";
|
|
3
|
+
import { n as s, c as V } from "../chunks/register-custom-element.vod7zfGv.js";
|
|
4
|
+
import { r as z } from "../chunks/state.CqiuSzAl.js";
|
|
5
|
+
import { o as d } from "../chunks/query-assigned-elements.Drkgpk9q.js";
|
|
6
|
+
import { e as G, n as O } from "../chunks/ref.B7e1Hu4F.js";
|
|
7
|
+
import { a as w, c as q, g as M } from "../chunks/classNames.C6fNrXWF.js";
|
|
8
|
+
import { t as P } from "../chunks/constants.jOWREYQE.js";
|
|
9
|
+
import { FormField as F } from "../wip/Form/Form.decorator.js";
|
|
10
|
+
import { inputChoiceGroupContext as B } from "./InputChoiceGroup.context.js";
|
|
11
|
+
const E = ':root,:host,.bm-light,.bm-dark .bm-inverse,[data-bm-theme~=bm-light]{--bm-comp-input-color-bg: var(--bm-sem-color-surface-01, #ffffff);--bm-comp-input-color-bg-disabled: var( --bm-sem-color-surface-highlight, rgba(159, 175, 188, .16) );--bm-comp-input-color-border: var(--bm-sem-color-border-strong, #8697a5);--bm-comp-input-color-border-error: var( --bm-sem-color-border-negative-strong, #cc2429 );--bm-comp-input-color-border-disabled: rgba(134, 151, 165, .4);--bm-comp-input-color-text: var(--bm-sem-color-text-primary, #141d24);--bm-comp-input-color-text-placeholder: var( --bm-sem-color-text-secondary, #576775 );--bm-comp-input-color-text-disabled: var( --bm-sem-color-text-disabled, rgba(87, 103, 117, .4) );--bm-comp-input-color-icon-disabled: var( --bm-sem-color-text-disabled, rgba(87, 103, 117, .4) );--bm-comp-input-color-icon: var(--bm-sem-color-icon-secondary, #576775);--bm-comp-input-color-icon-error: var( --bm-sem-color-icon-negative-strong, #cc2429 );--bm-comp-input-color-divider: var(--bm-sem-color-border-02, #d1dae0);--bm-comp-input-color-choice-checkbox-selected-bg: var( --bm-utility-color-accent-default, #00768f );--bm-comp-input-color-choice-checkbox-selected-icon: var( --bm-sem-color-icon-primary-inverse, #ffffff );--bm-comp-input-color-choice-checkbox-selected-bg-error: var( --bm-sem-color-surface-negative-strong, #cc2429 );--bm-comp-input-color-choice-checkbox-selected-border: var( --bm-sem-color-none, #ffffff00 );--bm-comp-input-color-choice-switch-selected-bg: var( --bm-utility-color-accent-default, #00768f );--bm-comp-input-color-choice-switch-selected-icon: var( --bm-sem-color-icon-primary-inverse, #ffffff );--bm-comp-input-color-choice-switch-selected-border: var( --bm-sem-color-none, #ffffff00 );--bm-comp-input-color-choice-radio-selected-bg: var( --bm-sem-color-surface-01, #ffffff );--bm-comp-input-color-choice-radio-selected-border: var( --bm-utility-color-accent-default, #00768f );--bm-comp-input-color-choice-radio-selected-inner-circle: var( --bm-utility-color-accent-default, #00768f );--bm-comp-input-color-choice-radio-selected-bg-error: var( --bm-sem-color-surface-01, #ffffff );--bm-comp-input-color-choice-radio-selected-border-error: var( --bm-sem-color-surface-negative-strong, #cc2429 );--bm-comp-input-color-choice-radio-selected-inner-circle-error: var( --bm-sem-color-surface-negative-strong, #cc2429 );--bm-comp-input-typo-default: var( --bm-sem-typo-compact-body-md, 400 1rem/1.25rem "Source Sans Pro" );--bm-comp-input-typo-character-count: var( --bm-sem-typo-body-sm, 400 .875rem/1.25rem "Source Sans Pro" );--bm-comp-input-typo-label-choice: var( --bm-sem-typo-body-md, 400 1rem/1.5rem "Source Sans Pro" );--bm-comp-input-space-field-x: var(--bm-sem-space-100, 1rem);--bm-comp-input-space-field-y: var(--bm-sem-space-50, .5rem);--bm-comp-input-space-field-gap: var(--bm-sem-space-50, .5rem);--bm-comp-input-space-choice-gap-inside: var(--bm-sem-space-50, .5rem);--bm-comp-input-space-choice-gap-items-y: var(--bm-sem-space-50, .5rem);--bm-comp-input-space-choice-gap-items-x: var(--bm-sem-space-100, 1rem);--bm-comp-input-space-choice-nudge: var( --bm-primitive-dimension-12, .125rem );--bm-comp-input-size-field-md-height: var(--bm-sem-size-height-md, 2.5rem);--bm-comp-input-size-field-width: var(--bm-primitive-dimension-1800, 18rem);--bm-comp-input-size-field-icon: var(--bm-sem-size-icon-md, 1.25rem);--bm-comp-input-size-field-text-area-height: var( --bm-primitive-dimension-475, 4.75rem );--bm-comp-input-size-choice-checkbox: var(--bm-sem-size-icon-sm, 1rem);--bm-comp-input-size-choice-radio: var(--bm-sem-size-icon-sm, 1rem);--bm-comp-input-size-choice-radio-inside: var( --bm-primitive-dimension-50, .5rem );--bm-comp-input-size-choice-switch-height: var( --bm-sem-size-icon-md, 1.25rem );--bm-comp-input-size-choice-switch-width: var( --bm-primitive-dimension-250, 2.5rem );--bm-comp-input-size-choice-switch-knob: var( --bm-primitive-dimension-87, .875rem );--bm-comp-input-radius-field: var(--bm-sem-radius-input-md, .25rem);--bm-comp-input-radius-choice-checkbox: var( --bm-sem-radius-input-sm, .125rem );--bm-comp-input-radius-choice-radio: var( --bm-sem-radius-input-lg, 624.938rem );--bm-comp-input-radius-choice-switch: var( --bm-sem-radius-input-lg, 624.938rem );--bm-comp-input-border-width-field-default: var( --bm-sem-border-width-input, .063rem );--bm-comp-input-border-width-field-error: var( --bm-sem-border-width-lg, .125rem );--bm-comp-input-border-width-choice: var( --bm-sem-border-width-input, .063rem );--bm-comp-input-shadow-field: var( --bm-sem-shadow-none, 0 0 0 0 rgb(0, 0, 0, 0) )}:host,.bm-dark,.bm-light .bm-inverse,[data-bm-theme~=bm-dark]{--bm-comp-input-color-bg: var(--bm-sem-color-surface-01, #202e39);--bm-comp-input-color-bg-disabled: var( --bm-sem-color-surface-highlight, rgba(134, 151, 165, .16) );--bm-comp-input-color-border: var(--bm-sem-color-border-strong, #9fafbc);--bm-comp-input-color-border-error: var( --bm-sem-color-border-negative-strong, #f67378 );--bm-comp-input-color-border-disabled: rgba(159, 175, 188, .4);--bm-comp-input-color-text: var(--bm-sem-color-text-primary, #ffffff);--bm-comp-input-color-text-placeholder: var( --bm-sem-color-text-secondary, #c3cdd5 );--bm-comp-input-color-text-disabled: var( --bm-sem-color-text-disabled, rgba(195, 205, 213, .4) );--bm-comp-input-color-icon-disabled: var( --bm-sem-color-text-disabled, rgba(195, 205, 213, .4) );--bm-comp-input-color-icon: var(--bm-sem-color-icon-secondary, #c3cdd5);--bm-comp-input-color-icon-error: var( --bm-sem-color-icon-negative-strong, #f67378 );--bm-comp-input-color-divider: var(--bm-sem-color-border-02, #465967);--bm-comp-input-color-choice-checkbox-selected-bg: var( --bm-utility-color-accent-default, #43bfd6 );--bm-comp-input-color-choice-checkbox-selected-icon: var( --bm-sem-color-icon-primary-inverse, #141d24 );--bm-comp-input-color-choice-checkbox-selected-bg-error: var( --bm-sem-color-surface-negative-strong, #f67378 );--bm-comp-input-color-choice-checkbox-selected-border: var( --bm-sem-color-none, #ffffff00 );--bm-comp-input-color-choice-switch-selected-bg: var( --bm-utility-color-accent-default, #43bfd6 );--bm-comp-input-color-choice-switch-selected-icon: var( --bm-sem-color-icon-primary-inverse, #141d24 );--bm-comp-input-color-choice-switch-selected-border: var( --bm-sem-color-none, #ffffff00 );--bm-comp-input-color-choice-radio-selected-bg: var( --bm-sem-color-surface-01, #202e39 );--bm-comp-input-color-choice-radio-selected-border: var( --bm-utility-color-accent-default, #43bfd6 );--bm-comp-input-color-choice-radio-selected-inner-circle: var( --bm-utility-color-accent-default, #43bfd6 );--bm-comp-input-color-choice-radio-selected-bg-error: var( --bm-sem-color-surface-01, #202e39 );--bm-comp-input-color-choice-radio-selected-border-error: var( --bm-sem-color-surface-negative-strong, #f67378 );--bm-comp-input-color-choice-radio-selected-inner-circle-error: var( --bm-sem-color-surface-negative-strong, #f67378 );--bm-comp-input-typo-default: var( --bm-sem-typo-compact-body-md, 400 1rem/1.25rem "Source Sans Pro" );--bm-comp-input-typo-character-count: var( --bm-sem-typo-body-sm, 400 .875rem/1.25rem "Source Sans Pro" );--bm-comp-input-typo-label-choice: var( --bm-sem-typo-body-md, 400 1rem/1.5rem "Source Sans Pro" );--bm-comp-input-space-field-x: var(--bm-sem-space-100, 1rem);--bm-comp-input-space-field-y: var(--bm-sem-space-50, .5rem);--bm-comp-input-space-field-gap: var(--bm-sem-space-50, .5rem);--bm-comp-input-space-choice-gap-inside: var(--bm-sem-space-50, .5rem);--bm-comp-input-space-choice-gap-items-y: var(--bm-sem-space-50, .5rem);--bm-comp-input-space-choice-gap-items-x: var(--bm-sem-space-100, 1rem);--bm-comp-input-space-choice-nudge: var( --bm-primitive-dimension-12, .125rem );--bm-comp-input-size-field-md-height: var(--bm-sem-size-height-md, 2.5rem);--bm-comp-input-size-field-width: var(--bm-primitive-dimension-1800, 18rem);--bm-comp-input-size-field-icon: var(--bm-sem-size-icon-md, 1.25rem);--bm-comp-input-size-field-text-area-height: var( --bm-primitive-dimension-475, 4.75rem );--bm-comp-input-size-choice-checkbox: var(--bm-sem-size-icon-sm, 1rem);--bm-comp-input-size-choice-radio: var(--bm-sem-size-icon-sm, 1rem);--bm-comp-input-size-choice-radio-inside: var( --bm-primitive-dimension-50, .5rem );--bm-comp-input-size-choice-switch-height: var( --bm-sem-size-icon-md, 1.25rem );--bm-comp-input-size-choice-switch-width: var( --bm-primitive-dimension-250, 2.5rem );--bm-comp-input-size-choice-switch-knob: var( --bm-primitive-dimension-87, .875rem );--bm-comp-input-radius-field: var(--bm-sem-radius-input-md, .25rem);--bm-comp-input-radius-choice-checkbox: var( --bm-sem-radius-input-sm, .125rem );--bm-comp-input-radius-choice-radio: var( --bm-sem-radius-input-lg, 624.938rem );--bm-comp-input-radius-choice-switch: var( --bm-sem-radius-input-lg, 624.938rem );--bm-comp-input-border-width-field-default: var( --bm-sem-border-width-input, .063rem );--bm-comp-input-border-width-field-error: var( --bm-sem-border-width-lg, .125rem );--bm-comp-input-border-width-choice: var( --bm-sem-border-width-input, .063rem );--bm-comp-input-shadow-field: var( --bm-sem-shadow-none, 0 0 0 0 rgb(0, 0, 0, 0) )}.bm-input-choice-group{--bm-label-space-bottom: var(--bm-comp-label-space-bottom);--bm-helper-text-space-top: var(--bm-comp-helper-text-space-top)}.bm-input-choice-group,.bm-input-choice-group legend{border:none;margin:var(--bm-sem-space-0);padding:var(--bm-sem-space-0)}.bm-input-choice-group__inputs{display:flex;gap:var(--bm-comp-input-space-choice-gap-items-y) var(--bm-comp-input-space-choice-gap-items-x)}.bm-input-choice-group--vertical .bm-input-choice-group__inputs{flex-direction:column}.bm-input-choice-group--horizontal .bm-input-choice-group__inputs{flex-wrap:wrap;flex-direction:row}.bm-input-choice-group--horizontalFluid .bm-input-choice-group__inputs{flex-direction:row;justify-content:space-between}.bm-input-choice-group--horizontalFluid .bm-input-choice-group__inputs>*,.bm-input-choice-group--horizontalFluid .bm-input-choice-group__inputs>::slotted(*){flex:1 1 auto}';
|
|
12
|
+
var I = Object.defineProperty, W = Object.getOwnPropertyDescriptor, k = (e) => {
|
|
13
|
+
throw TypeError(e);
|
|
14
|
+
}, r = (e, o, t, m) => {
|
|
15
|
+
for (var a = m > 1 ? void 0 : m ? W(o, t) : o, l = e.length - 1, b; l >= 0; l--)
|
|
16
|
+
(b = e[l]) && (a = (m ? b(o, t, a) : b(a)) || a);
|
|
17
|
+
return m && a && I(o, t, a), a;
|
|
18
|
+
}, T = (e, o, t) => o.has(e) || k("Cannot " + t), c = (e, o, t) => (T(e, o, "read from private field"), t ? t.call(e) : o.get(e)), p = (e, o, t) => o.has(e) ? k("Cannot add the same private member more than once") : o instanceof WeakSet ? o.add(e) : o.set(e, t), n, h, u, f, v, g, y;
|
|
19
|
+
const { baseClassNamePrefix: D, subElementClassPrefix: _, classModifierPrefix: L } = M("input-choice-group");
|
|
20
|
+
let i = class extends F {
|
|
21
|
+
constructor() {
|
|
22
|
+
super(...arguments), this.layout = "vertical", this.orientation = "vertical", this._orientationSet = !1, this.fluid = !1, this._fluidSet = !1, this.required = !1, this.hideRequiredMarker = !1, this.readOnly = !1, this.disabled = !1, this.groupRef = G(), this.inputGroupContextValue = {
|
|
23
|
+
name: "",
|
|
24
|
+
required: !1,
|
|
25
|
+
error: void 0,
|
|
26
|
+
readOnly: !1,
|
|
27
|
+
disabled: !1,
|
|
28
|
+
selectedValue: void 0,
|
|
29
|
+
updateSelectedValue: this.updateSelectedValue.bind(this)
|
|
30
|
+
}, p(this, n, () => {
|
|
31
|
+
var e;
|
|
32
|
+
return !!(this.disabled || (e = this.formContext) != null && e.disabled);
|
|
33
|
+
}), p(this, h, () => {
|
|
34
|
+
var e;
|
|
35
|
+
return !!(this.readOnly || (e = this.formContext) != null && e.readOnly);
|
|
36
|
+
}), p(this, u, () => {
|
|
37
|
+
var e;
|
|
38
|
+
return !!(this.required || (e = this.formContext) != null && e.required);
|
|
39
|
+
}), p(this, f, () => {
|
|
40
|
+
var o;
|
|
41
|
+
const { [this.name]: e } = ((o = this.formContext) == null ? void 0 : o.initialValues) || {};
|
|
42
|
+
e || (this.selectedValue = e, this.requestUpdate());
|
|
43
|
+
}), p(this, v, (e) => this.error ? x`
|
|
44
|
+
<bm-helper-text
|
|
45
|
+
id="${e}"
|
|
46
|
+
text="${this.error}"
|
|
47
|
+
appearance="negative"
|
|
48
|
+
.disabled="${c(this, n).call(this)}"
|
|
49
|
+
class="${_}helper-text"
|
|
50
|
+
></bm-helper-text>
|
|
51
|
+
` : C), p(this, g, (e) => {
|
|
52
|
+
const { formBlurHandler: o } = this.formContext || {};
|
|
53
|
+
o == null || o(e);
|
|
54
|
+
}), p(this, y, (e) => {
|
|
55
|
+
const { formChangeHandler: o } = this.formContext || {};
|
|
56
|
+
o == null || o(e);
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
firstUpdated() {
|
|
60
|
+
c(this, f).call(this);
|
|
61
|
+
}
|
|
62
|
+
willUpdate(e) {
|
|
63
|
+
e.has("orientation") && (this._orientationSet = !0), e.has("fluid") && (this._fluidSet = !0), this.inputGroupContextValue = {
|
|
64
|
+
name: this.name,
|
|
65
|
+
required: c(this, u).call(this),
|
|
66
|
+
error: this.error,
|
|
67
|
+
readOnly: c(this, h).call(this),
|
|
68
|
+
disabled: c(this, n).call(this),
|
|
69
|
+
selectedValue: this.selectedValue
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
updated() {
|
|
73
|
+
const [e] = this._inputGroupLabel, [o] = this._inputGroupHelperText, { decorate: t } = w(e), { decorate: m } = w(o);
|
|
74
|
+
m({ disabled: c(this, n).call(this) }), t({
|
|
75
|
+
htmlFor: this.id,
|
|
76
|
+
disabled: c(this, n).call(this),
|
|
77
|
+
required: c(this, u).call(this) && !this.hideRequiredMarker
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
*
|
|
82
|
+
* NOTE: This should provide default behavior that can be overridable for
|
|
83
|
+
* RadioButtonGroup || CheckboxGroup || SwitchGroup
|
|
84
|
+
* in case default behavior is not desired
|
|
85
|
+
*
|
|
86
|
+
* Check RadioButtonGroup `handleKeyDown` || `updateSelectedValue` as example
|
|
87
|
+
*
|
|
88
|
+
*/
|
|
89
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function, @typescript-eslint/no-unused-vars
|
|
90
|
+
handleKeyDown(e) {
|
|
91
|
+
}
|
|
92
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function, @typescript-eslint/no-unused-vars
|
|
93
|
+
updateSelectedValue(e) {
|
|
94
|
+
}
|
|
95
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function, @typescript-eslint/no-unused-vars
|
|
96
|
+
handleClick(e) {
|
|
97
|
+
}
|
|
98
|
+
getOrientation() {
|
|
99
|
+
return this._orientationSet ? this.orientation : this.layout === "horizontalFluid" ? "horizontal" : this.layout;
|
|
100
|
+
}
|
|
101
|
+
isFluid() {
|
|
102
|
+
return this._fluidSet ? this.fluid : this.layout === "horizontalFluid";
|
|
103
|
+
}
|
|
104
|
+
render() {
|
|
105
|
+
const { ariaInvalid: e } = this, { length: o } = this.validationErrors(), t = !!this.error || !!o, m = this.getOrientation(), a = this.isFluid(), l = m === "horizontal" && a ? "horizontalFluid" : m;
|
|
106
|
+
console.log(
|
|
107
|
+
"haha",
|
|
108
|
+
this.orientation,
|
|
109
|
+
this.layout,
|
|
110
|
+
this.fluid,
|
|
111
|
+
m,
|
|
112
|
+
a
|
|
113
|
+
);
|
|
114
|
+
const b = q(
|
|
115
|
+
D,
|
|
116
|
+
this.theme && P(this.theme),
|
|
117
|
+
`${L}${l}`
|
|
118
|
+
);
|
|
119
|
+
return x`
|
|
120
|
+
<fieldset
|
|
121
|
+
${O(this.groupRef)}
|
|
122
|
+
class=${b}
|
|
123
|
+
aria-invalid="${e || t}"
|
|
124
|
+
@blur=${c(this, g)}
|
|
125
|
+
@input=${c(this, y)}
|
|
126
|
+
@keydown=${this.handleKeyDown}
|
|
127
|
+
@click=${this.handleClick}
|
|
128
|
+
role="group"
|
|
129
|
+
aria-labelledby=${`group-label-${this.name}`}
|
|
130
|
+
>
|
|
131
|
+
<legend id=${`group-label-${this.name}`}>
|
|
132
|
+
<slot name="label" id="${this.labelId}"></slot>
|
|
133
|
+
</legend>
|
|
134
|
+
<div class="${_}inputs">
|
|
135
|
+
<slot></slot>
|
|
136
|
+
</div>
|
|
137
|
+
<slot name="helper-text" id="${this.helperTextId}"></slot>
|
|
138
|
+
${c(this, v).call(this, this.errorId)} ${this.renderValidationErrors()}
|
|
139
|
+
</fieldset>
|
|
140
|
+
`;
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
n = /* @__PURE__ */ new WeakMap();
|
|
144
|
+
h = /* @__PURE__ */ new WeakMap();
|
|
145
|
+
u = /* @__PURE__ */ new WeakMap();
|
|
146
|
+
f = /* @__PURE__ */ new WeakMap();
|
|
147
|
+
v = /* @__PURE__ */ new WeakMap();
|
|
148
|
+
g = /* @__PURE__ */ new WeakMap();
|
|
149
|
+
y = /* @__PURE__ */ new WeakMap();
|
|
150
|
+
i.styles = $(E);
|
|
151
|
+
r([
|
|
152
|
+
s({ type: String })
|
|
153
|
+
], i.prototype, "theme", 2);
|
|
154
|
+
r([
|
|
155
|
+
s({ type: String })
|
|
156
|
+
], i.prototype, "layout", 2);
|
|
157
|
+
r([
|
|
158
|
+
s({ type: String })
|
|
159
|
+
], i.prototype, "orientation", 2);
|
|
160
|
+
r([
|
|
161
|
+
s({ type: Boolean })
|
|
162
|
+
], i.prototype, "fluid", 2);
|
|
163
|
+
r([
|
|
164
|
+
s({ type: Boolean })
|
|
165
|
+
], i.prototype, "required", 2);
|
|
166
|
+
r([
|
|
167
|
+
s({ type: Boolean })
|
|
168
|
+
], i.prototype, "hideRequiredMarker", 2);
|
|
169
|
+
r([
|
|
170
|
+
s({ type: String })
|
|
171
|
+
], i.prototype, "error", 2);
|
|
172
|
+
r([
|
|
173
|
+
s({ type: Boolean })
|
|
174
|
+
], i.prototype, "readOnly", 2);
|
|
175
|
+
r([
|
|
176
|
+
s({ type: Boolean })
|
|
177
|
+
], i.prototype, "disabled", 2);
|
|
178
|
+
r([
|
|
179
|
+
d({ slot: "label" })
|
|
180
|
+
], i.prototype, "_inputGroupLabel", 2);
|
|
181
|
+
r([
|
|
182
|
+
d({ slot: "helper-text" })
|
|
183
|
+
], i.prototype, "_inputGroupHelperText", 2);
|
|
184
|
+
r([
|
|
185
|
+
d({ selector: "bm-radio-button" })
|
|
186
|
+
], i.prototype, "radioButtons", 2);
|
|
187
|
+
r([
|
|
188
|
+
d({ selector: "bm-checkbox" })
|
|
189
|
+
], i.prototype, "checkboxes", 2);
|
|
190
|
+
r([
|
|
191
|
+
d({ selector: "bm-switch" })
|
|
192
|
+
], i.prototype, "switches", 2);
|
|
193
|
+
r([
|
|
194
|
+
z()
|
|
195
|
+
], i.prototype, "selectedValue", 2);
|
|
196
|
+
r([
|
|
197
|
+
S({ context: B }),
|
|
198
|
+
z()
|
|
199
|
+
], i.prototype, "inputGroupContextValue", 2);
|
|
200
|
+
i = r([
|
|
201
|
+
V("bm-input-choice-group")
|
|
202
|
+
], i);
|
|
203
|
+
export {
|
|
204
|
+
i as InputChoiceGroup
|
|
205
|
+
};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { r as v, a as y, x as d } from "../chunks/lit-element.CJtt9wj5.js";
|
|
2
|
+
import { n, c as h } from "../chunks/register-custom-element.vod7zfGv.js";
|
|
3
|
+
import { c as f, g } from "../chunks/classNames.C6fNrXWF.js";
|
|
4
|
+
const u = ':root,:host,.bm-light,.bm-dark .bm-inverse,[data-bm-theme~=bm-light]{--bm-comp-link-space-gap: var(--bm-sem-space-25, .25rem);--bm-comp-link-size-sm-icon: var(--bm-sem-size-icon-sm, 1rem);--bm-comp-link-size-md-icon: var(--bm-sem-size-icon-md, 1.25rem);--bm-comp-link-size-lg-icon: var(--bm-sem-size-icon-md, 1.25rem);--bm-comp-link-size-xl-icon: var(--bm-sem-size-icon-lg, 1.5rem);--bm-comp-link-typo-sm: var( --bm-sem-typo-body-sm, 400 .875rem/1.25rem "Source Sans Pro" );--bm-comp-link-typo-md: var( --bm-sem-typo-body-md, 400 1rem/1.5rem "Source Sans Pro" );--bm-comp-link-typo-lg: var( --bm-sem-typo-body-lg, 400 1.125rem/1.75rem "Source Sans Pro" );--bm-comp-link-typo-xl: var( --bm-sem-typo-body-xl, 400 1.25rem/2rem "Source Sans Pro" );--bm-comp-link-color-primary-enabled: var( --bm-sem-color-link-primary, #00768f );--bm-comp-link-color-primary-hover: var( --bm-utility-color-accent-strong, #005b75 );--bm-comp-link-color-primary-active: var( --bm-utility-color-accent-stronger, #00414d );--bm-comp-link-color-secondary-enabled: var( --bm-sem-color-link-secondary, #141d24 );--bm-comp-link-color-secondary-hover: var( --bm-sem-color-link-secondary, #141d24 );--bm-comp-link-color-secondary-active: var( --bm-sem-color-link-secondary, #141d24 )}:host,.bm-dark,.bm-light .bm-inverse,[data-bm-theme~=bm-dark]{--bm-comp-link-space-gap: var(--bm-sem-space-25, .25rem);--bm-comp-link-size-sm-icon: var(--bm-sem-size-icon-sm, 1rem);--bm-comp-link-size-md-icon: var(--bm-sem-size-icon-md, 1.25rem);--bm-comp-link-size-lg-icon: var(--bm-sem-size-icon-md, 1.25rem);--bm-comp-link-size-xl-icon: var(--bm-sem-size-icon-lg, 1.5rem);--bm-comp-link-typo-sm: var( --bm-sem-typo-body-sm, 400 .875rem/1.25rem "Source Sans Pro" );--bm-comp-link-typo-md: var( --bm-sem-typo-body-md, 400 1rem/1.5rem "Source Sans Pro" );--bm-comp-link-typo-lg: var( --bm-sem-typo-body-lg, 400 1.125rem/1.75rem "Source Sans Pro" );--bm-comp-link-typo-xl: var( --bm-sem-typo-body-xl, 400 1.25rem/2rem "Source Sans Pro" );--bm-comp-link-color-primary-enabled: var( --bm-sem-color-link-primary, #43bfd6 );--bm-comp-link-color-primary-hover: var( --bm-utility-color-accent-strong, #b2e7f0 );--bm-comp-link-color-primary-active: var( --bm-utility-color-accent-stronger, #d7f4f9 );--bm-comp-link-color-secondary-enabled: var( --bm-sem-color-link-secondary, #ffffff );--bm-comp-link-color-secondary-hover: var( --bm-sem-color-link-secondary, #ffffff );--bm-comp-link-color-secondary-active: var( --bm-sem-color-link-secondary, #ffffff )}.bm-link{outline:none;width:fit-content;display:inline-flex;align-items:center;border:var(--bm-sem-border-width-focus) solid transparent;margin:calc(var(--bm-sem-border-width-focus) * -1)}.bm-link:hover{text-decoration:underline}.bm-link:focus,.bm-link:focus-visible{outline:none;border-radius:var(--bm-sem-radius-focus-md);border:var(--bm-sem-border-width-focus) solid var(--bm-sem-color-border-focus)}.bm-link--disabled{cursor:not-allowed;opacity:var(--bm-sem-opacity-disabled);text-decoration:none!important}.bm-link--disabled:focus,.bm-link--disabled:focus-visible{border:var(--bm-sem-border-width-focus) solid transparent}.bm-link--hide-underline{text-decoration:none}.bm-link--sm{font:var(--bm-comp-link-typo-sm);gap:var(--bm-comp-link-space-gap)}.bm-link--sm .bm-link__icon,.bm-link--sm ::slotted([slot=iconBefore]),.bm-link--sm ::slotted([slot=iconAfter]){flex-shrink:0;width:var(--bm-comp-link-size-sm-icon);height:var(--bm-comp-link-size-sm-icon)}.bm-link--md{font:var(--bm-comp-link-typo-md);gap:var(--bm-comp-link-space-gap)}.bm-link--md .bm-link__icon,.bm-link--md ::slotted([slot=iconBefore]),.bm-link--md ::slotted([slot=iconAfter]){flex-shrink:0;width:var(--bm-comp-link-size-md-icon);height:var(--bm-comp-link-size-md-icon)}.bm-link--lg{font:var(--bm-comp-link-typo-lg);gap:var(--bm-comp-link-space-gap)}.bm-link--lg .bm-link__icon,.bm-link--lg ::slotted([slot=iconBefore]),.bm-link--lg ::slotted([slot=iconAfter]){flex-shrink:0;width:var(--bm-comp-link-size-lg-icon);height:var(--bm-comp-link-size-lg-icon)}.bm-link--xl{font:var(--bm-comp-link-typo-xl);gap:var(--bm-comp-link-space-gap)}.bm-link--xl .bm-link__icon,.bm-link--xl ::slotted([slot=iconBefore]),.bm-link--xl ::slotted([slot=iconAfter]){flex-shrink:0;width:var(--bm-comp-link-size-xl-icon);height:var(--bm-comp-link-size-xl-icon)}.bm-link--primary{color:var(--bm-sem-color-link-primary)}.bm-link--primary:not(.bm-link--primary--disabled):hover{color:var(--bm-comp-link-color-primary-hover)}.bm-link--primary:not(.bm-link--primary--disabled):active{color:var(--bm-comp-link-color-primary-active)}.bm-link--secondary{color:var(--bm-sem-color-link-secondary)}.bm-link--secondary:not(.bm-link--secondary--disabled):hover{color:var(--bm-comp-link-color-secondary-hover)}.bm-link--secondary:not(.bm-link--secondary--disabled):active{color:var(--bm-comp-link-color-secondary-active)}.bm-link--body-bold{font-weight:var(--bm-sem-font-weight-body-bold)}';
|
|
5
|
+
var x = Object.defineProperty, z = Object.getOwnPropertyDescriptor, k = (o) => {
|
|
6
|
+
throw TypeError(o);
|
|
7
|
+
}, m = (o, e, r, t) => {
|
|
8
|
+
for (var l = t > 1 ? void 0 : t ? z(e, r) : e, b = o.length - 1, p; b >= 0; b--)
|
|
9
|
+
(p = o[b]) && (l = (t ? p(e, r, l) : p(l)) || l);
|
|
10
|
+
return t && l && x(e, r, l), l;
|
|
11
|
+
}, _ = (o, e, r) => e.has(o) || k("Cannot " + r), c = (o, e, r) => (_(o, e, "read from private field"), r ? r.call(o) : e.get(o)), S = (o, e, r) => e.has(o) ? k("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(o) : e.set(o, r), s;
|
|
12
|
+
const { baseClassNamePrefix: $, classModifierPrefix: a } = g("link");
|
|
13
|
+
let i = class extends y {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments), this.appearance = "primary", this.bold = !1, this.disabled = !1, this.href = "", this.text = "", this.hideUnderline = !1, S(this, s, (o) => d`<slot name=${o}></slot>`);
|
|
16
|
+
}
|
|
17
|
+
render() {
|
|
18
|
+
const o = f(
|
|
19
|
+
$,
|
|
20
|
+
this.size && `${a}${this.size}`,
|
|
21
|
+
this.disabled && `${a}disabled`,
|
|
22
|
+
this.appearance && `${a}${this.appearance}`,
|
|
23
|
+
this.hideUnderline && `${a}hide-underline`,
|
|
24
|
+
this.bold && `${a}body-bold`,
|
|
25
|
+
this.className
|
|
26
|
+
);
|
|
27
|
+
return this.disabled ? d`
|
|
28
|
+
<span aria-disabled=${this.disabled} class=${o} tabindex="-1">
|
|
29
|
+
${c(this, s).call(this, "iconBefore")}
|
|
30
|
+
<slot>${this.text}</slot>
|
|
31
|
+
${c(this, s).call(this, "iconAfter")}
|
|
32
|
+
</span>
|
|
33
|
+
` : d`
|
|
34
|
+
<a
|
|
35
|
+
class=${o}
|
|
36
|
+
tabindex="0"
|
|
37
|
+
href=${this.href && this.href}
|
|
38
|
+
part="link"
|
|
39
|
+
>
|
|
40
|
+
${c(this, s).call(this, "iconBefore")}
|
|
41
|
+
<slot>${this.text}</slot>
|
|
42
|
+
${c(this, s).call(this, "iconAfter")}
|
|
43
|
+
</a>
|
|
44
|
+
`;
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
s = /* @__PURE__ */ new WeakMap();
|
|
48
|
+
i.styles = v(u);
|
|
49
|
+
m([
|
|
50
|
+
n({ type: String })
|
|
51
|
+
], i.prototype, "appearance", 2);
|
|
52
|
+
m([
|
|
53
|
+
n({ type: Boolean })
|
|
54
|
+
], i.prototype, "bold", 2);
|
|
55
|
+
m([
|
|
56
|
+
n({ type: String })
|
|
57
|
+
], i.prototype, "size", 2);
|
|
58
|
+
m([
|
|
59
|
+
n({ type: Boolean })
|
|
60
|
+
], i.prototype, "disabled", 2);
|
|
61
|
+
m([
|
|
62
|
+
n({ type: String })
|
|
63
|
+
], i.prototype, "href", 2);
|
|
64
|
+
m([
|
|
65
|
+
n({ type: String })
|
|
66
|
+
], i.prototype, "text", 2);
|
|
67
|
+
m([
|
|
68
|
+
n({ type: Boolean })
|
|
69
|
+
], i.prototype, "hideUnderline", 2);
|
|
70
|
+
i = m([
|
|
71
|
+
h("bm-link")
|
|
72
|
+
], i);
|
|
73
|
+
export {
|
|
74
|
+
i as BmLink
|
|
75
|
+
};
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { e as w } from "../chunks/provide.i2FlUkOu.js";
|
|
2
|
+
import { c as S } from "../chunks/consume.Ce9k1-wN.js";
|
|
3
|
+
import { r as P, a as z, x as m } from "../chunks/lit-element.CJtt9wj5.js";
|
|
4
|
+
import { n as d, c as M } from "../chunks/register-custom-element.vod7zfGv.js";
|
|
5
|
+
import { r as W } from "../chunks/state.CqiuSzAl.js";
|
|
6
|
+
import { c, g as B } from "../chunks/classNames.C6fNrXWF.js";
|
|
7
|
+
import "../chunks/constants.jOWREYQE.js";
|
|
8
|
+
import { l as E } from "../chunks/list.module.CZRPBLzy.js";
|
|
9
|
+
import { ListContext as _ } from "./List.context.js";
|
|
10
|
+
var N = Object.defineProperty, O = Object.getOwnPropertyDescriptor, v = (t) => {
|
|
11
|
+
throw TypeError(t);
|
|
12
|
+
}, n = (t, e, s, l) => {
|
|
13
|
+
for (var o = l > 1 ? void 0 : l ? O(e, s) : e, h = t.length - 1, p; h >= 0; h--)
|
|
14
|
+
(p = t[h]) && (o = (l ? p(e, s, o) : p(o)) || o);
|
|
15
|
+
return l && o && N(e, s, o), o;
|
|
16
|
+
}, $ = (t, e, s) => e.has(t) || v("Cannot " + s), y = (t, e, s) => ($(t, e, "read from private field"), s ? s.call(t) : e.get(t)), C = (t, e, s) => e.has(t) ? v("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, s), x = (t, e, s) => ($(t, e, "access private method"), s), f, u, a, k, L, g;
|
|
17
|
+
const { baseClassNamePrefix: I, classModifierPrefix: r } = B("list");
|
|
18
|
+
let i = class extends z {
|
|
19
|
+
constructor() {
|
|
20
|
+
super(...arguments), C(this, a), this.listeners = /* @__PURE__ */ new Set(), this.listContext = {
|
|
21
|
+
kind: void 0,
|
|
22
|
+
size: void 0,
|
|
23
|
+
density: void 0,
|
|
24
|
+
indent: void 0,
|
|
25
|
+
nestCount: 0,
|
|
26
|
+
register: (t) => y(this, f).call(this, t),
|
|
27
|
+
unregister: (t) => y(this, u).call(this, t)
|
|
28
|
+
}, this.indent = !0, C(this, f, (t) => {
|
|
29
|
+
this.listeners.add(t);
|
|
30
|
+
}), C(this, u, (t) => {
|
|
31
|
+
this.listeners.delete(t);
|
|
32
|
+
}), this.nested = !1;
|
|
33
|
+
}
|
|
34
|
+
updated() {
|
|
35
|
+
x(this, a, k).call(this);
|
|
36
|
+
}
|
|
37
|
+
render() {
|
|
38
|
+
x(this, a, L).call(this), x(this, a, g).call(this);
|
|
39
|
+
let t = c(
|
|
40
|
+
I,
|
|
41
|
+
`${r}${this.listContext.kind}`,
|
|
42
|
+
`${r}${this.listContext.size}`,
|
|
43
|
+
`${r}density-${this.listContext.density}`,
|
|
44
|
+
this.nested && `${r}density-${this.listContext.density}--nested`
|
|
45
|
+
);
|
|
46
|
+
if (this.listContext.kind === "ordered")
|
|
47
|
+
return m`
|
|
48
|
+
<ol class=${t}>
|
|
49
|
+
<slot></slot>
|
|
50
|
+
</ol>
|
|
51
|
+
`;
|
|
52
|
+
const e = this.listContext.kind === "unstyled" || this.listContext.kind === "withIcons" ? this.listContext.indent : !1;
|
|
53
|
+
return t = c(t, e && `${r}indent`), this.listContext.nestCount > 0 && this.listContext.kind === "withIcons" && (t = c(t, `${r}wcWithIcons`)), m`
|
|
54
|
+
<ul class=${t}>
|
|
55
|
+
<slot></slot>
|
|
56
|
+
</ul>
|
|
57
|
+
`;
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
f = /* @__PURE__ */ new WeakMap();
|
|
61
|
+
u = /* @__PURE__ */ new WeakMap();
|
|
62
|
+
a = /* @__PURE__ */ new WeakSet();
|
|
63
|
+
k = function() {
|
|
64
|
+
for (const t of this.listeners)
|
|
65
|
+
t.requestUpdate();
|
|
66
|
+
};
|
|
67
|
+
L = function() {
|
|
68
|
+
var t, e, s;
|
|
69
|
+
this.listContext.kind = this.kind || ((t = this.parentListContext) == null ? void 0 : t.kind) || "ordered", this.listContext.size = this.size || ((e = this.parentListContext) == null ? void 0 : e.size) || "md", this.listContext.density = this.density || ((s = this.parentListContext) == null ? void 0 : s.density) || "md", this.listContext.indent = this.indent ?? !0;
|
|
70
|
+
};
|
|
71
|
+
g = function() {
|
|
72
|
+
this.parentListContext ? (this.listContext.kind === this.parentListContext.kind && (this.listContext.nestCount = this.parentListContext.nestCount + 1), this.nested = !0) : this.listContext.nestCount = 0;
|
|
73
|
+
};
|
|
74
|
+
i.styles = P(E);
|
|
75
|
+
n([
|
|
76
|
+
w({ context: _ })
|
|
77
|
+
], i.prototype, "listContext", 2);
|
|
78
|
+
n([
|
|
79
|
+
S({ context: _, subscribe: !0 })
|
|
80
|
+
], i.prototype, "parentListContext", 2);
|
|
81
|
+
n([
|
|
82
|
+
d({ type: String })
|
|
83
|
+
], i.prototype, "kind", 2);
|
|
84
|
+
n([
|
|
85
|
+
d({ type: String })
|
|
86
|
+
], i.prototype, "size", 2);
|
|
87
|
+
n([
|
|
88
|
+
d({ type: String })
|
|
89
|
+
], i.prototype, "density", 2);
|
|
90
|
+
n([
|
|
91
|
+
d({ type: Boolean })
|
|
92
|
+
], i.prototype, "indent", 2);
|
|
93
|
+
n([
|
|
94
|
+
W()
|
|
95
|
+
], i.prototype, "nested", 2);
|
|
96
|
+
i = n([
|
|
97
|
+
M("bm-list")
|
|
98
|
+
], i);
|
|
99
|
+
export {
|
|
100
|
+
i as BmList
|
|
101
|
+
};
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { c as u } from "../chunks/consume.Ce9k1-wN.js";
|
|
2
|
+
import { r as v, a as $, x as m, E as x } from "../chunks/lit-element.CJtt9wj5.js";
|
|
3
|
+
import { r as y } from "../chunks/state.CqiuSzAl.js";
|
|
4
|
+
import { o as L } from "../chunks/query-assigned-elements.Drkgpk9q.js";
|
|
5
|
+
import { o as g } from "../chunks/unsafe-svg.HSGf1NCU.js";
|
|
6
|
+
import { c, g as w } from "../chunks/classNames.C6fNrXWF.js";
|
|
7
|
+
import "../chunks/constants.jOWREYQE.js";
|
|
8
|
+
import { l as S } from "../chunks/list.module.CZRPBLzy.js";
|
|
9
|
+
import { c as b } from "../chunks/register-custom-element.vod7zfGv.js";
|
|
10
|
+
import { ListContext as E } from "./List.context.js";
|
|
11
|
+
const I = `<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
12
|
+
<path
|
|
13
|
+
fill-rule="evenodd"
|
|
14
|
+
clip-rule="evenodd"
|
|
15
|
+
d="M19 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H19C20.1 21 21 20.1 21 19V5C21 3.9 20.1 3 19 3ZM5 4.99H8C8 6.65 6.66 8 5 8V4.99ZM5 12V10C7.76 10 10 7.75 10 4.99H12C12 8.86 8.87 12 5 12ZM5 18L8.5 13.5L11 16.51L14.5 12L19 18H5Z"
|
|
16
|
+
fill="currentColor"
|
|
17
|
+
/>
|
|
18
|
+
</svg>
|
|
19
|
+
`, d = ["decimal", "lower-alpha", "lower-roman"], h = ["disc", "circle"];
|
|
20
|
+
var M = Object.defineProperty, k = Object.getOwnPropertyDescriptor, C = (t) => {
|
|
21
|
+
throw TypeError(t);
|
|
22
|
+
}, a = (t, s, e, o) => {
|
|
23
|
+
for (var i = o > 1 ? void 0 : o ? k(s, e) : s, r = t.length - 1, n; r >= 0; r--)
|
|
24
|
+
(n = t[r]) && (i = (o ? n(s, e, i) : n(i)) || i);
|
|
25
|
+
return o && i && M(s, e, i), i;
|
|
26
|
+
}, B = (t, s, e) => s.has(t) || C("Cannot " + e), H = (t, s, e) => s.has(t) ? C("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(t) : s.set(t, e), P = (t, s, e) => (B(t, s, "access private method"), e), p, _;
|
|
27
|
+
const { subElementClassPrefix: f } = w("list");
|
|
28
|
+
let l = class extends $ {
|
|
29
|
+
constructor() {
|
|
30
|
+
super(...arguments), H(this, p), this._hasList = !1;
|
|
31
|
+
}
|
|
32
|
+
connectedCallback() {
|
|
33
|
+
var t, s;
|
|
34
|
+
super.connectedCallback(), (s = (t = this.listContext) == null ? void 0 : t.register) == null || s.call(t, this);
|
|
35
|
+
}
|
|
36
|
+
disconnectedCallback() {
|
|
37
|
+
var t, s;
|
|
38
|
+
super.disconnectedCallback(), (s = (t = this.listContext) == null ? void 0 : t.unregister) == null || s.call(t, this);
|
|
39
|
+
}
|
|
40
|
+
updated() {
|
|
41
|
+
this._hasList = this._listComponents.length > 0;
|
|
42
|
+
}
|
|
43
|
+
render() {
|
|
44
|
+
var e, o, i, r;
|
|
45
|
+
const t = `${f}item`;
|
|
46
|
+
let s = c(
|
|
47
|
+
t,
|
|
48
|
+
`${t}--${(e = this.listContext) == null ? void 0 : e.size}`,
|
|
49
|
+
!this._hasList && `${t}--density-${(o = this.listContext) == null ? void 0 : o.density}`
|
|
50
|
+
);
|
|
51
|
+
if (((i = this.listContext) == null ? void 0 : i.kind) === "ordered") {
|
|
52
|
+
const n = d[this.listContext.nestCount % d.length];
|
|
53
|
+
s = c(s, `${t}--${n}`);
|
|
54
|
+
}
|
|
55
|
+
if (((r = this.listContext) == null ? void 0 : r.kind) === "unordered") {
|
|
56
|
+
const n = h[this.listContext.nestCount % h.length];
|
|
57
|
+
s = c(s, `${t}--${n}`);
|
|
58
|
+
}
|
|
59
|
+
return m` <li class=${s}>
|
|
60
|
+
<span class=${`${t}__content`}>
|
|
61
|
+
${P(this, p, _).call(this)}
|
|
62
|
+
<div>
|
|
63
|
+
<slot></slot>
|
|
64
|
+
</div>
|
|
65
|
+
</span>
|
|
66
|
+
</li>`;
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
p = /* @__PURE__ */ new WeakSet();
|
|
70
|
+
_ = function() {
|
|
71
|
+
var e, o;
|
|
72
|
+
const t = g(I), s = `${f}item--${(e = this.listContext) == null ? void 0 : e.size}__icon`;
|
|
73
|
+
return m`${((o = this.listContext) == null ? void 0 : o.kind) === "withIcons" ? m`<slot name="icon" class=${s}>${t}</slot>` : x}`;
|
|
74
|
+
};
|
|
75
|
+
l.styles = v(S);
|
|
76
|
+
a([
|
|
77
|
+
u({ context: E, subscribe: !0 })
|
|
78
|
+
], l.prototype, "listContext", 2);
|
|
79
|
+
a([
|
|
80
|
+
L({ selector: "bm-list" })
|
|
81
|
+
], l.prototype, "_listComponents", 2);
|
|
82
|
+
a([
|
|
83
|
+
y()
|
|
84
|
+
], l.prototype, "_hasList", 2);
|
|
85
|
+
l = a([
|
|
86
|
+
b("bm-list-item")
|
|
87
|
+
], l);
|
|
88
|
+
export {
|
|
89
|
+
l as BmListItem
|
|
90
|
+
};
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { r as k, a as y, x as m, E as p } from "../chunks/lit-element.CJtt9wj5.js";
|
|
2
|
+
import { n as o, c as $ } from "../chunks/register-custom-element.vod7zfGv.js";
|
|
3
|
+
import { c as x, g as w } from "../chunks/classNames.C6fNrXWF.js";
|
|
4
|
+
import { t as z } from "../chunks/constants.jOWREYQE.js";
|
|
5
|
+
import { r as P } from "../chunks/delegate.baxDQosr.js";
|
|
6
|
+
function S(r, e) {
|
|
7
|
+
if (r === "error")
|
|
8
|
+
return Math.max(4, e ?? 4);
|
|
9
|
+
if (r === "success")
|
|
10
|
+
return 100;
|
|
11
|
+
if (e !== void 0)
|
|
12
|
+
return Math.max(0, Math.min(100, e));
|
|
13
|
+
}
|
|
14
|
+
function T(r) {
|
|
15
|
+
return r === "success" ? {
|
|
16
|
+
appearance: "positive",
|
|
17
|
+
hideIcon: !1
|
|
18
|
+
} : r === "error" ? {
|
|
19
|
+
appearance: "negative",
|
|
20
|
+
hideIcon: !1
|
|
21
|
+
} : {
|
|
22
|
+
appearance: "info",
|
|
23
|
+
hideIcon: !0
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
const C = ':root,:host,.bm-light,.bm-dark .bm-inverse,[data-bm-theme~=bm-light]{--bm-comp-progress-bar-color-indicator-default: var( --bm-utility-color-accent-default, #00768f );--bm-comp-progress-bar-color-indicator-success: var( --bm-sem-color-surface-positive-strong, #187c36 );--bm-comp-progress-bar-color-indicator-error: var( --bm-sem-color-surface-negative-strong, #cc2429 );--bm-comp-progress-bar-color-track: var(--bm-sem-color-border-02, #d1dae0);--bm-comp-progress-bar-color-label: var(--bm-sem-color-text-primary, #141d24);--bm-comp-progress-bar-radius: var(--bm-sem-radius-round, 624.938rem);--bm-comp-progress-bar-space-label-bottom: var(--bm-sem-space-50, .5rem);--bm-comp-progress-bar-space-status-top: var(--bm-sem-space-25, .25rem);--bm-comp-progress-bar-size-sm-height: var( --bm-primitive-dimension-25, .25rem );--bm-comp-progress-bar-size-md-height: var( --bm-primitive-dimension-50, .5rem );--bm-comp-progress-bar-size-lg-height: var( --bm-primitive-dimension-75, .75rem );--bm-comp-progress-bar-typo-label: var( --bm-sem-typo-body-md, 400 1rem/1.5rem "Source Sans Pro" )}:host,.bm-dark,.bm-light .bm-inverse,[data-bm-theme~=bm-dark]{--bm-comp-progress-bar-color-indicator-default: var( --bm-utility-color-accent-default, #43bfd6 );--bm-comp-progress-bar-color-indicator-success: var( --bm-sem-color-surface-positive-strong, #b3eb9e );--bm-comp-progress-bar-color-indicator-error: var( --bm-sem-color-surface-negative-strong, #f67378 );--bm-comp-progress-bar-color-track: var(--bm-sem-color-border-02, #465967);--bm-comp-progress-bar-color-label: var(--bm-sem-color-text-primary, #ffffff);--bm-comp-progress-bar-radius: var(--bm-sem-radius-round, 624.938rem);--bm-comp-progress-bar-space-label-bottom: var(--bm-sem-space-50, .5rem);--bm-comp-progress-bar-space-status-top: var(--bm-sem-space-25, .25rem);--bm-comp-progress-bar-size-sm-height: var( --bm-primitive-dimension-25, .25rem );--bm-comp-progress-bar-size-md-height: var( --bm-primitive-dimension-50, .5rem );--bm-comp-progress-bar-size-lg-height: var( --bm-primitive-dimension-75, .75rem );--bm-comp-progress-bar-typo-label: var( --bm-sem-typo-body-md, 400 1rem/1.5rem "Source Sans Pro" )}.bm-progress-bar{display:flex;align-items:stretch;flex-direction:column}.bm-progress-bar .bm-progress-bar__label{margin-bottom:var(--bm-comp-progress-bar-space-label-bottom);font:var(--bm-comp-progress-bar-typo-label);color:var(--bm-comp-progress-bar-color-label)}.bm-progress-bar .bm-progress-bar__track{height:var(--bm-comp-progress-bar-size-md-height);border-radius:var(--bm-comp-progress-bar-radius);background-color:var(--bm-comp-progress-bar-color-track);display:flex;overflow:hidden}.bm-progress-bar .bm-progress-bar__status{margin-top:var(--bm-comp-progress-bar-space-status-top)}.bm-progress-bar--sm .bm-progress-bar__track{height:var(--bm-comp-progress-bar-size-sm-height)}.bm-progress-bar--lg .bm-progress-bar__track{height:var(--bm-comp-progress-bar-size-lg-height)}.bm-progress-bar--full-width .bm-progress-bar__track{border-radius:0}.bm-progress-bar--active .bm-progress-bar__indicator{background-color:var(--bm-comp-progress-bar-color-indicator-default)}.bm-progress-bar--success .bm-progress-bar__indicator{background-color:var(--bm-comp-progress-bar-color-indicator-success)}.bm-progress-bar--error .bm-progress-bar__indicator{background-color:var(--bm-comp-progress-bar-color-indicator-error)}.bm-progress-bar--determinate .bm-progress-bar__indicator{transition-property:width;transition-duration:.3s;transition-timing-function:ease-out}.bm-progress-bar--indeterminate.bm-progress-bar--active .bm-progress-bar__indicator{width:100%;-webkit-mask-image:linear-gradient(to right,transparent 43.0555555556%,black 50%,transparent 56.9444444444%);mask-image:linear-gradient(to right,transparent 43.0555555556%,black 50%,transparent 56.9444444444%);-webkit-mask-size:240%;mask-size:240%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:center;mask-position:center;animation:2s linear infinite bm-progress-bar-indeterminate-indicator-animation}.bm-progress-bar--indeterminate.bm-progress-bar--active .bm-progress-bar__indicator:dir(rtl){animation-direction:reverse}@keyframes bm-progress-bar-indeterminate-indicator-animation{0%{-webkit-mask-position:right;mask-position:right}to{-webkit-mask-position:left;mask-position:left}}';
|
|
27
|
+
var W = Object.defineProperty, M = Object.getOwnPropertyDescriptor, _ = (r) => {
|
|
28
|
+
throw TypeError(r);
|
|
29
|
+
}, t = (r, e, s, c) => {
|
|
30
|
+
for (var i = c > 1 ? void 0 : c ? M(e, s) : e, l = r.length - 1, g; l >= 0; l--)
|
|
31
|
+
(g = r[l]) && (i = (c ? g(e, s, i) : g(i)) || i);
|
|
32
|
+
return c && i && W(e, s, i), i;
|
|
33
|
+
}, E = (r, e, s) => e.has(r) || _("Cannot " + s), d = (r, e, s) => (E(r, e, "read from private field"), s ? s.call(r) : e.get(r)), h = (r, e, s) => e.has(r) ? _("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(r) : e.set(r, s), v, u, f;
|
|
34
|
+
const { baseClassNamePrefix: N, subElementClassPrefix: b, classModifierPrefix: n } = w("progress-bar");
|
|
35
|
+
let a = class extends y {
|
|
36
|
+
constructor() {
|
|
37
|
+
super(...arguments), this.state = "active", this.size = "md", this.fullWidth = !1, h(this, v, () => this.label ? m`<label
|
|
38
|
+
id="label"
|
|
39
|
+
for="progress"
|
|
40
|
+
class=${`${b}label`}
|
|
41
|
+
>${this.label}</label
|
|
42
|
+
>` : ""), h(this, u, (r) => {
|
|
43
|
+
const { progressbarAriaLabel: e } = this, s = S(this.state, this.value);
|
|
44
|
+
return m`<div
|
|
45
|
+
id="progress"
|
|
46
|
+
role="progressbar"
|
|
47
|
+
aria-label=${e ?? p}
|
|
48
|
+
aria-labelledby=${this.label ? "label" : p}
|
|
49
|
+
aria-describedby=${this.helperText ? "status" : p}
|
|
50
|
+
aria-valuemin="0"
|
|
51
|
+
aria-valuemax="100"
|
|
52
|
+
aria-valuenow=${this.value ?? p}
|
|
53
|
+
class=${`${b}track`}
|
|
54
|
+
>
|
|
55
|
+
${r === "determinate" ? m`<div
|
|
56
|
+
class=${`${b}indicator`}
|
|
57
|
+
style=${s !== void 0 ? `width: ${s}%` : p}
|
|
58
|
+
></div>` : m`<div class=${`${b}indicator`}></div>`}
|
|
59
|
+
</div>`;
|
|
60
|
+
}), h(this, f, () => {
|
|
61
|
+
if (!this.helperText)
|
|
62
|
+
return "";
|
|
63
|
+
const r = T(this.state);
|
|
64
|
+
return m`
|
|
65
|
+
<bm-helper-text
|
|
66
|
+
id="status"
|
|
67
|
+
class=${`${b}status`}
|
|
68
|
+
.hideIcon=${r.hideIcon}
|
|
69
|
+
appearance=${r.appearance}
|
|
70
|
+
text=${this.helperText}
|
|
71
|
+
></bm-helper-text>
|
|
72
|
+
`;
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
render() {
|
|
76
|
+
const r = this.state !== "success" && this.value === void 0 ? "indeterminate" : "determinate", e = x(
|
|
77
|
+
N,
|
|
78
|
+
this.theme && z(this.theme),
|
|
79
|
+
`${n}${r}`,
|
|
80
|
+
`${n}${this.state}`,
|
|
81
|
+
this.size && `${n}${this.size}`,
|
|
82
|
+
this.fullWidth && `${n}full-width`,
|
|
83
|
+
this.className
|
|
84
|
+
);
|
|
85
|
+
return m`
|
|
86
|
+
<div class=${e}>
|
|
87
|
+
${d(this, v).call(this)} ${d(this, u).call(this, r)} ${d(this, f).call(this)}
|
|
88
|
+
</div>
|
|
89
|
+
`;
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
v = /* @__PURE__ */ new WeakMap();
|
|
93
|
+
u = /* @__PURE__ */ new WeakMap();
|
|
94
|
+
f = /* @__PURE__ */ new WeakMap();
|
|
95
|
+
P(a);
|
|
96
|
+
a.styles = [k(C)];
|
|
97
|
+
t([
|
|
98
|
+
o({ type: String })
|
|
99
|
+
], a.prototype, "state", 2);
|
|
100
|
+
t([
|
|
101
|
+
o({ type: String })
|
|
102
|
+
], a.prototype, "size", 2);
|
|
103
|
+
t([
|
|
104
|
+
o({ type: String })
|
|
105
|
+
], a.prototype, "label", 2);
|
|
106
|
+
t([
|
|
107
|
+
o({ type: String })
|
|
108
|
+
], a.prototype, "helperText", 2);
|
|
109
|
+
t([
|
|
110
|
+
o({ type: Boolean })
|
|
111
|
+
], a.prototype, "fullWidth", 2);
|
|
112
|
+
t([
|
|
113
|
+
o({ type: String })
|
|
114
|
+
], a.prototype, "theme", 2);
|
|
115
|
+
t([
|
|
116
|
+
o({ type: Number })
|
|
117
|
+
], a.prototype, "value", 2);
|
|
118
|
+
t([
|
|
119
|
+
o({ type: String })
|
|
120
|
+
], a.prototype, "progressbarAriaLabel", 2);
|
|
121
|
+
a = t([
|
|
122
|
+
$("bm-progress-bar")
|
|
123
|
+
], a);
|
|
124
|
+
export {
|
|
125
|
+
a as BmProgressBar
|
|
126
|
+
};
|