@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,169 @@
|
|
|
1
|
+
import { unsafeCSS as E, html as b } from "lit";
|
|
2
|
+
import { property as c, queryAssignedElements as k, state as S } from "lit/decorators.js";
|
|
3
|
+
import { ref as O } from "lit/directives/ref.js";
|
|
4
|
+
import C from "clsx";
|
|
5
|
+
import { p as f, a as z, g as A } from "../../chunks/classNames.Cq_tbDRp.js";
|
|
6
|
+
import { t as P } from "../../chunks/constants.jOWREYQE.js";
|
|
7
|
+
import { r as I } from "../../chunks/delegate.baxDQosr.js";
|
|
8
|
+
import { c as T } from "../../chunks/register-custom-element.DHGKOhmA.js";
|
|
9
|
+
import { s as $ } from "../../chunks/helpers.AwJwaZvv.js";
|
|
10
|
+
import { FormField as W } from "../Form/Form.decorator.js";
|
|
11
|
+
import "../../chunks/HelperText.CcVVOtA3.js";
|
|
12
|
+
const L = ':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-text-field{--bm-label-cursor: pointer;max-width:var(--bm-comp-input-size-field-width);--bm-label-space-bottom: var(--bm-comp-label-space-bottom);--bm-helper-text-space-top: var(--bm-comp-helper-text-space-top)}.bm-text-field--disabled{--bm-label-cursor: not-allowed;--bm-label-pointer-events: auto;--bm-text-field-cursor: not-allowed;--bm-text-field-input-cursor: not-allowed}.bm-text-field--error .bm-text-field__field{border-color:var(--bm-comp-input-color-border-error);background-color:var(--bm-comp-input-color-bg);outline-offset:calc(0px - var(--bm-comp-input-border-width-field-error));outline:var(--bm-comp-input-border-width-field-error) solid var(--bm-comp-input-color-border-error)}.bm-text-field--error .bm-text-field__field .bm-text-field__input{color:var(--bm-comp-input-color-text)}.bm-text-field--error .bm-text-field__field .bm-text-field__input::placeholder{color:var(--bm-comp-input-color-text-placeholder)}.bm-text-field--read-only .bm-text-field__field{border-color:var(--bm-comp-input-color-border-disabled);background-color:var(--bm-comp-input-color-bg-disabled)}.bm-text-field--read-only .bm-text-field__field .bm-text-field__input{color:var(--bm-comp-input-color-text)}.bm-text-field--read-only .bm-text-field__field .bm-text-field__input::placeholder{color:var(--bm-comp-input-color-text-placeholder)}.bm-text-field--read-only .bm-text-field__field .bm-text-field__content svg,.bm-text-field--read-only .bm-text-field__field .bm-text-field__content ::slotted([slot*=content]){color:var(--bm-comp-input-color-icon)}.bm-text-field--disabled .bm-text-field__field{border-color:var(--bm-comp-input-color-border-disabled);background-color:var(--bm-comp-input-color-bg-disabled)}.bm-text-field--disabled .bm-text-field__field .bm-text-field__input{color:var(--bm-comp-input-color-text-disabled)}.bm-text-field--disabled .bm-text-field__field .bm-text-field__input::placeholder{color:var(--bm-comp-input-color-text-disabled)}.bm-text-field--disabled .bm-text-field__field .bm-text-field__content{opacity:var(--bm-sem-opacity-disabled)}.bm-text-field--disabled .bm-text-field__field .bm-text-field__content svg,.bm-text-field--disabled .bm-text-field__field .bm-text-field__content ::slotted([slot*=content]){color:var(--bm-comp-input-color-text-disabled)}.bm-text-field--fluid{max-width:100%}.bm-text-field--ellipsis .bm-text-field__field .bm-text-field__input{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.bm-text-field__field{display:flex;flex-wrap:nowrap;align-items:center;box-sizing:border-box;transform:translate3d(var(--bm-sem-space-0),var(--bm-sem-space-0),var(--bm-sem-space-0));border-style:solid;border-color:var(--bm-comp-input-color-border);border-radius:var(--bm-comp-input-radius-field);border-width:var(--bm-comp-input-border-width-field-default);cursor:var(--bm-text-field-cursor, default);gap:var(--bm-comp-input-space-field-gap);box-shadow:var(--bm-comp-input-shadow-field);background-color:var(--bm-comp-input-color-bg);height:var(--bm-comp-input-size-field-md-height);padding:var(--bm-comp-input-space-field-y) var(--bm-comp-input-space-field-x)}.bm-text-field__field:focus-within{outline-offset:calc(0px - var(--bm-sem-size-focus-offset));outline:var(--bm-sem-border-width-focus) solid var(--bm-sem-color-border-focus)}.bm-text-field__field .bm-text-field__input{border:none;outline:none;background:none;width:100%;padding:var(--bm-sem-space-0);color:var(--bm-comp-input-color-text);font:var(--bm-comp-input-typo-default);cursor:var(--bm-text-field-input-cursor, text)}.bm-text-field__field .bm-text-field__input:-webkit-autofill{caret-color:var(--bm-comp-input-color-text);-webkit-text-fill-color:var(--bm-comp-input-color-text);box-shadow:0 0 0 var(--bm-comp-input-size-field-md-height) var(--bm-comp-input-color-bg) inset}.bm-text-field__field .bm-text-field__input::placeholder{color:var(--bm-comp-input-color-text-placeholder)}.bm-text-field__field .bm-text-field__content{display:flex;align-items:center}.bm-text-field__field .bm-text-field__content svg,.bm-text-field__field .bm-text-field__content ::slotted([slot*=content]){color:var(--bm-comp-input-color-icon);width:var(--bm-comp-input-size-field-icon);height:var(--bm-comp-input-size-field-icon)}';
|
|
13
|
+
var R = Object.defineProperty, D = Object.getOwnPropertyDescriptor, B = (e) => {
|
|
14
|
+
throw TypeError(e);
|
|
15
|
+
}, r = (e, o, i, a) => {
|
|
16
|
+
for (var l = a > 1 ? void 0 : a ? D(o, i) : o, n = e.length - 1, p; n >= 0; n--)
|
|
17
|
+
(p = e[n]) && (l = (a ? p(o, i, l) : p(l)) || l);
|
|
18
|
+
return a && l && R(o, i, l), l;
|
|
19
|
+
}, H = (e, o, i) => o.has(e) || B("Cannot " + i), m = (e, o, i) => (H(e, o, "read from private field"), i ? i.call(e) : o.get(e)), s = (e, o, i) => o.has(e) ? B("Cannot add the same private member more than once") : o instanceof WeakSet ? o.add(e) : o.set(e, i), g, _, d, v, x, y, w;
|
|
20
|
+
const { baseClassNamePrefix: N, subElementClassPrefix: u, classModifierPrefix: h } = A("text-field");
|
|
21
|
+
let t = class extends W {
|
|
22
|
+
constructor() {
|
|
23
|
+
super(...arguments), this.required = !1, this.hideRequiredMarker = !1, this.readOnly = !1, this.disabled = !1, this.fluid = !1, this.ellipse = !1, this.type = "text", this.inputMode = "text", this._hasContentBeforeSlot = !1, this._hasContentAfterSlot = !1, s(this, g, () => !!this._hasContentAfterSlot), s(this, _, () => !!this._hasContentBeforeSlot), s(this, d, () => {
|
|
24
|
+
var e;
|
|
25
|
+
return !!(this.disabled || (e = this.formContext) != null && e.disabled);
|
|
26
|
+
}), s(this, v, () => {
|
|
27
|
+
var e;
|
|
28
|
+
return !!(this.readOnly || (e = this.formContext) != null && e.readOnly);
|
|
29
|
+
}), s(this, x, () => {
|
|
30
|
+
var e;
|
|
31
|
+
return !!(this.required || (e = this.formContext) != null && e.required);
|
|
32
|
+
}), s(this, y, () => {
|
|
33
|
+
const e = ({ target: o }) => {
|
|
34
|
+
this._hasContentBeforeSlot = $(o);
|
|
35
|
+
};
|
|
36
|
+
return m(this, _).call(this) ? b`
|
|
37
|
+
<div class="${u}content">
|
|
38
|
+
<slot name="content-before" @slotchange="${e}"></slot>
|
|
39
|
+
</div>
|
|
40
|
+
` : b`<slot name="content-before" @slotchange="${e}"></slot>`;
|
|
41
|
+
}), s(this, w, () => {
|
|
42
|
+
const e = ({ target: o }) => {
|
|
43
|
+
this._hasContentAfterSlot = $(o);
|
|
44
|
+
};
|
|
45
|
+
return m(this, g).call(this) ? b`
|
|
46
|
+
<div class="${u}content">
|
|
47
|
+
<slot name="content-after" @slotchange="${e}"></slot>
|
|
48
|
+
</div>
|
|
49
|
+
` : b`<slot name="content-after" @slotchange="${e}"></slot>`;
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
updated(e) {
|
|
53
|
+
const [o] = this._textFieldLabel, [i] = this._textFieldHelperText, { decorate: a } = z(o), { decorate: l } = z(i), n = f(e, ["value"]), p = f(e, ["validationRules"]), F = f(e, ["formContext", "disabled"]), M = f(e, [
|
|
54
|
+
"formContext",
|
|
55
|
+
"required",
|
|
56
|
+
"hideRequiredMarker"
|
|
57
|
+
]), q = f(e, ["formContext"]) && this.contextInitialsChanged();
|
|
58
|
+
(n || q) && this.setContextValue(), F && (a({ disabled: m(this, d).call(this) }), l({ disabled: m(this, d).call(this) })), p && this.setContextValidation(), M && a({ required: m(this, x).call(this) && !this.hideRequiredMarker });
|
|
59
|
+
}
|
|
60
|
+
render() {
|
|
61
|
+
const { ariaInvalid: e } = this, { length: o } = this.validationErrors(), i = typeof this.error == "string" || !!o, a = C(
|
|
62
|
+
this.helperTextId,
|
|
63
|
+
this.error && this.errorId,
|
|
64
|
+
this.validationErrorShown() && this.validationErrorsId
|
|
65
|
+
), l = C(
|
|
66
|
+
N,
|
|
67
|
+
i && `${h}error`,
|
|
68
|
+
this.theme && P(this.theme),
|
|
69
|
+
this.fluid && `${h}fluid`,
|
|
70
|
+
this.ellipse && `${h}ellipsis`,
|
|
71
|
+
m(this, d).call(this) && `${h}disabled`,
|
|
72
|
+
m(this, v).call(this) && `${h}read-only`
|
|
73
|
+
);
|
|
74
|
+
return b`
|
|
75
|
+
<div class="${l}" style="max-width: ${this.width}">
|
|
76
|
+
<slot name="label" id="${this.labelId}"></slot>
|
|
77
|
+
<div class="${u}field">
|
|
78
|
+
${m(this, y).call(this)}
|
|
79
|
+
<input
|
|
80
|
+
id="${this.id}"
|
|
81
|
+
name="${this.name}"
|
|
82
|
+
type="${this.type}"
|
|
83
|
+
${O(this.formFieldRef)}
|
|
84
|
+
inputmode="${this.inputMode}"
|
|
85
|
+
?required="${m(this, x).call(this)}"
|
|
86
|
+
?readonly="${m(this, v).call(this)}"
|
|
87
|
+
?disabled="${m(this, d).call(this)}"
|
|
88
|
+
placeholder="${this.placeholder}"
|
|
89
|
+
aria-labelledby="${this.labelId}"
|
|
90
|
+
aria-label="${this.inputAriaLabel}"
|
|
91
|
+
@blur="${this.validateFieldOnBlur}"
|
|
92
|
+
@keydown="${this.submitFormByEnter}"
|
|
93
|
+
aria-describedby="${a}"
|
|
94
|
+
class="${u}input"
|
|
95
|
+
@input="${this.validateFieldOnChange}"
|
|
96
|
+
aria-invalid="${e || i}"
|
|
97
|
+
/>
|
|
98
|
+
${m(this, w).call(this)}
|
|
99
|
+
</div>
|
|
100
|
+
<slot name="helper-text" id="${this.helperTextId}"></slot>
|
|
101
|
+
${this.renderError(this.error, m(this, d).call(this))}
|
|
102
|
+
${this.renderValidationErrors()}
|
|
103
|
+
</div>
|
|
104
|
+
`;
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
g = /* @__PURE__ */ new WeakMap();
|
|
108
|
+
_ = /* @__PURE__ */ new WeakMap();
|
|
109
|
+
d = /* @__PURE__ */ new WeakMap();
|
|
110
|
+
v = /* @__PURE__ */ new WeakMap();
|
|
111
|
+
x = /* @__PURE__ */ new WeakMap();
|
|
112
|
+
y = /* @__PURE__ */ new WeakMap();
|
|
113
|
+
w = /* @__PURE__ */ new WeakMap();
|
|
114
|
+
I(t);
|
|
115
|
+
t.styles = E(L);
|
|
116
|
+
r([
|
|
117
|
+
c({ type: String })
|
|
118
|
+
], t.prototype, "placeholder", 2);
|
|
119
|
+
r([
|
|
120
|
+
c({ type: Boolean })
|
|
121
|
+
], t.prototype, "required", 2);
|
|
122
|
+
r([
|
|
123
|
+
c({ type: Boolean })
|
|
124
|
+
], t.prototype, "hideRequiredMarker", 2);
|
|
125
|
+
r([
|
|
126
|
+
c({ type: String })
|
|
127
|
+
], t.prototype, "error", 2);
|
|
128
|
+
r([
|
|
129
|
+
c({ type: Boolean })
|
|
130
|
+
], t.prototype, "readOnly", 2);
|
|
131
|
+
r([
|
|
132
|
+
c({ type: Boolean })
|
|
133
|
+
], t.prototype, "disabled", 2);
|
|
134
|
+
r([
|
|
135
|
+
c({ type: Boolean })
|
|
136
|
+
], t.prototype, "fluid", 2);
|
|
137
|
+
r([
|
|
138
|
+
c({ type: String })
|
|
139
|
+
], t.prototype, "width", 2);
|
|
140
|
+
r([
|
|
141
|
+
c({ type: Boolean })
|
|
142
|
+
], t.prototype, "ellipse", 2);
|
|
143
|
+
r([
|
|
144
|
+
c({ type: String })
|
|
145
|
+
], t.prototype, "theme", 2);
|
|
146
|
+
r([
|
|
147
|
+
c({ type: String })
|
|
148
|
+
], t.prototype, "type", 2);
|
|
149
|
+
r([
|
|
150
|
+
c({ type: String })
|
|
151
|
+
], t.prototype, "inputMode", 2);
|
|
152
|
+
r([
|
|
153
|
+
k({ slot: "label" })
|
|
154
|
+
], t.prototype, "_textFieldLabel", 2);
|
|
155
|
+
r([
|
|
156
|
+
k({ slot: "helper-text" })
|
|
157
|
+
], t.prototype, "_textFieldHelperText", 2);
|
|
158
|
+
r([
|
|
159
|
+
S()
|
|
160
|
+
], t.prototype, "_hasContentBeforeSlot", 2);
|
|
161
|
+
r([
|
|
162
|
+
S()
|
|
163
|
+
], t.prototype, "_hasContentAfterSlot", 2);
|
|
164
|
+
t = r([
|
|
165
|
+
T("bm-text-field")
|
|
166
|
+
], t);
|
|
167
|
+
export {
|
|
168
|
+
t as BmTextField
|
|
169
|
+
};
|