@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,11 @@
|
|
|
1
|
+
import "lit";
|
|
2
|
+
import "lit/decorators.js";
|
|
3
|
+
import "lit/directives/unsafe-svg.js";
|
|
4
|
+
import "clsx";
|
|
5
|
+
import { B as a } from "../chunks/HelperText.CcVVOtA3.js";
|
|
6
|
+
import "../chunks/classNames.Cq_tbDRp.js";
|
|
7
|
+
import "../chunks/constants.jOWREYQE.js";
|
|
8
|
+
import "../chunks/register-custom-element.DHGKOhmA.js";
|
|
9
|
+
export {
|
|
10
|
+
a as BmHelperText
|
|
11
|
+
};
|
package/Icon/Icon.d.ts
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
import { IconColor, IconSize } from '@viasat/beam-shared/components/icon';
|
|
3
|
+
/**
|
|
4
|
+
* `bm-icon`
|
|
5
|
+
* @slot default - Specify which Icon to display
|
|
6
|
+
*/
|
|
7
|
+
export declare class BmIcon extends LitElement {
|
|
8
|
+
static styles: import('lit').CSSResult;
|
|
9
|
+
/**
|
|
10
|
+
* Specify the color of Icon
|
|
11
|
+
*/
|
|
12
|
+
color?: IconColor;
|
|
13
|
+
/**
|
|
14
|
+
* Specify the size of Icon
|
|
15
|
+
* @default md
|
|
16
|
+
*/
|
|
17
|
+
size: IconSize;
|
|
18
|
+
/**
|
|
19
|
+
* Specify a custom size for the Icon
|
|
20
|
+
*
|
|
21
|
+
*/
|
|
22
|
+
customIconSize?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Specify a custom color for the Icon
|
|
25
|
+
*
|
|
26
|
+
*/
|
|
27
|
+
customIconColor?: string;
|
|
28
|
+
render(): import('lit-html').TemplateResult<1>;
|
|
29
|
+
}
|
|
30
|
+
declare global {
|
|
31
|
+
interface HTMLElementTagNameMap {
|
|
32
|
+
'bm-icon': BmIcon;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=Icon.d.ts.map
|
package/Icon/Icon.js
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { unsafeCSS as p, LitElement as v, nothing as g, html as f } from "lit";
|
|
2
|
+
import { property as s } from "lit/decorators.js";
|
|
3
|
+
import y from "clsx";
|
|
4
|
+
import { g as h } from "../chunks/classNames.Cq_tbDRp.js";
|
|
5
|
+
import { p as z } from "../chunks/constants.jOWREYQE.js";
|
|
6
|
+
import { r as u } from "../chunks/delegate.baxDQosr.js";
|
|
7
|
+
import { c as d } from "../chunks/register-custom-element.DHGKOhmA.js";
|
|
8
|
+
const $ = (n) => `--${z}comp-${n}`, S = '.bm-icon{-webkit-font-feature-settings:"liga";font-feature-settings:"liga";-webkit-font-smoothing:antialiased}.bm-icon{--bm-comp-icon-color: inherit;box-sizing:border-box!important;font-weight:400;font-style:normal;fill:currentColor;font-size:var(--bm-comp-icon-size, var(--bm-sem-size-icon-md));width:var(--bm-comp-icon-size, var(--bm-sem-size-icon-md));height:var(--bm-comp-icon-size, var(--bm-sem-size-icon-md));color:var(--bm-comp-icon-color);vertical-align:middle;line-height:inherit;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal}.bm-icon--primary{--bm-comp-icon-color: var(--bm-sem-color-icon-primary)}.bm-icon--secondary{--bm-comp-icon-color: var(--bm-sem-color-icon-secondary)}.bm-icon--positive{--bm-comp-icon-color: var(--bm-sem-color-icon-positive)}.bm-icon--warning{--bm-comp-icon-color: var(--bm-sem-color-icon-warning)}.bm-icon--negative{--bm-comp-icon-color: var(--bm-sem-color-icon-negative)}.bm-icon--infoPrimary{--bm-comp-icon-color: var(--bm-sem-color-icon-info-primary)}.bm-icon--infoSecondary{--bm-comp-icon-color: var(--bm-sem-color-icon-info-secondary)}.bm-icon--positiveStrong{--bm-comp-icon-color: var(--bm-sem-color-icon-positive-strong)}.bm-icon--warningStrong{--bm-comp-icon-color: var(--bm-sem-color-icon-warning-strong)}.bm-icon--negativeStrong{--bm-comp-icon-color: var(--bm-sem-color-icon-negative-strong)}.bm-icon--infoPrimaryStrong{--bm-comp-icon-color: var(--bm-sem-color-icon-info-primary-strong)}.bm-icon--infoSecondaryStrong{--bm-comp-icon-color: var(--bm-sem-color-icon-info-secondary-strong)}.bm-icon--primaryInverse{--bm-comp-icon-color: var(--bm-sem-color-icon-primary-inverse)}.bm-icon--secondaryInverse{--bm-comp-icon-color: var(--bm-sem-color-icon-secondary-inverse)}.bm-icon--xs{--bm-comp-icon-size: var(--bm-sem-size-icon-xs)}.bm-icon--sm{--bm-comp-icon-size: var(--bm-sem-size-icon-sm)}.bm-icon--md{--bm-comp-icon-size: var(--bm-sem-size-icon-md)}.bm-icon--lg{--bm-comp-icon-size: var(--bm-sem-size-icon-lg)}.bm-icon--xl{--bm-comp-icon-size: var(--bm-sem-size-icon-xl)}.bm-icon--clickable{cursor:pointer}';
|
|
9
|
+
var x = Object.defineProperty, w = Object.getOwnPropertyDescriptor, m = (n, r, e, c) => {
|
|
10
|
+
for (var o = c > 1 ? void 0 : c ? w(r, e) : r, t = n.length - 1, a; t >= 0; t--)
|
|
11
|
+
(a = n[t]) && (o = (c ? a(r, e, o) : a(o)) || o);
|
|
12
|
+
return c && o && x(r, e, o), o;
|
|
13
|
+
};
|
|
14
|
+
const { baseClassNamePrefix: C, classModifierPrefix: l } = h("icon"), b = $("icon"), P = `${b}-size`, I = `${b}-color`;
|
|
15
|
+
let i = class extends v {
|
|
16
|
+
constructor() {
|
|
17
|
+
super(...arguments), this.size = "md";
|
|
18
|
+
}
|
|
19
|
+
render() {
|
|
20
|
+
const n = y(
|
|
21
|
+
C,
|
|
22
|
+
this.size && `${l}${this.size}`,
|
|
23
|
+
this.color && `${l}${this.color}`,
|
|
24
|
+
this.hasAttribute("onClick") && `${l}clickable`
|
|
25
|
+
), r = `
|
|
26
|
+
${this.customIconSize ? `${P}: ${this.customIconSize};` : ""}
|
|
27
|
+
${this.customIconColor ? `${I}: ${this.customIconColor};` : ""}
|
|
28
|
+
`, { role: e, ariaLabel: c } = this;
|
|
29
|
+
return f`
|
|
30
|
+
<span
|
|
31
|
+
class=${n}
|
|
32
|
+
role=${e || c ? "img" : "presentation"}
|
|
33
|
+
focusable=${this.hasAttribute("onClick") ? "true" : "false"}
|
|
34
|
+
style=${r}
|
|
35
|
+
aria-label=${c || g}
|
|
36
|
+
part="icon"
|
|
37
|
+
>
|
|
38
|
+
<slot></slot>
|
|
39
|
+
</span>
|
|
40
|
+
`;
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
u(i);
|
|
44
|
+
i.styles = p(S);
|
|
45
|
+
m([
|
|
46
|
+
s({ type: String })
|
|
47
|
+
], i.prototype, "color", 2);
|
|
48
|
+
m([
|
|
49
|
+
s({ type: String })
|
|
50
|
+
], i.prototype, "size", 2);
|
|
51
|
+
m([
|
|
52
|
+
s({ type: String })
|
|
53
|
+
], i.prototype, "customIconSize", 2);
|
|
54
|
+
m([
|
|
55
|
+
s({ type: String })
|
|
56
|
+
], i.prototype, "customIconColor", 2);
|
|
57
|
+
i = m([
|
|
58
|
+
d("bm-icon")
|
|
59
|
+
], i);
|
|
60
|
+
export {
|
|
61
|
+
i as BmIcon
|
|
62
|
+
};
|
package/Icon/index.d.ts
ADDED
package/Icon/index.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface InputChoiceGroupContextProps {
|
|
2
|
+
name: string;
|
|
3
|
+
required: boolean;
|
|
4
|
+
error?: string;
|
|
5
|
+
readOnly: boolean;
|
|
6
|
+
disabled: boolean;
|
|
7
|
+
selectedValue?: string;
|
|
8
|
+
updateSelectedValue?: (value: string) => void;
|
|
9
|
+
}
|
|
10
|
+
export declare const inputChoiceGroupContext: {
|
|
11
|
+
__context__: InputChoiceGroupContextProps;
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=InputChoiceGroup.context.d.ts.map
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { PropertyValues } from 'lit';
|
|
2
|
+
import { InputChoiceGroupOrientation, InputChoiceGroupLayouts } from '@viasat/beam-shared/components/inputChoiceGroup';
|
|
3
|
+
import { ThemeTypes } from '@viasat/beam-shared/utils/constants';
|
|
4
|
+
import { FormField } from '../wip/Form/Form.decorator';
|
|
5
|
+
import { InputChoiceGroupContextProps } from './InputChoiceGroup.context';
|
|
6
|
+
/**
|
|
7
|
+
* `bm-input-choice-group`
|
|
8
|
+
*
|
|
9
|
+
* @slot label - Add label text to the InputChoiceGroup
|
|
10
|
+
* @slot helperText - Add helper text to the InputChoiceGroup
|
|
11
|
+
*/
|
|
12
|
+
export declare class InputChoiceGroup extends FormField {
|
|
13
|
+
#private;
|
|
14
|
+
static styles: import('lit').CSSResult;
|
|
15
|
+
/**
|
|
16
|
+
* Specify the theme of the InputChoiceGroup. By default it inherits the theme from the parent
|
|
17
|
+
*/
|
|
18
|
+
theme?: ThemeTypes;
|
|
19
|
+
/**
|
|
20
|
+
* Specify InputChoiceGroup orientation
|
|
21
|
+
*
|
|
22
|
+
* **Deprecated**: use `orientation` and `fluid` instead
|
|
23
|
+
*
|
|
24
|
+
* @default 'vertical'
|
|
25
|
+
* @deprecated use `orientation` and `fluid` instead
|
|
26
|
+
*/
|
|
27
|
+
layout: InputChoiceGroupLayouts;
|
|
28
|
+
/**
|
|
29
|
+
* Specify InputChoiceGroup orientation
|
|
30
|
+
* @default 'vertical'
|
|
31
|
+
*/
|
|
32
|
+
orientation: InputChoiceGroupOrientation;
|
|
33
|
+
private _orientationSet;
|
|
34
|
+
/**
|
|
35
|
+
* Specify if InputChoiceGroup should take the full width of its container
|
|
36
|
+
* @default false
|
|
37
|
+
*/
|
|
38
|
+
fluid: boolean;
|
|
39
|
+
private _fluidSet;
|
|
40
|
+
/**
|
|
41
|
+
* Specify if InputChoiceGroup is a required input
|
|
42
|
+
*/
|
|
43
|
+
required: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Specify if the InputChoiceGroup displays with an asterisk
|
|
46
|
+
*/
|
|
47
|
+
hideRequiredMarker: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Specify error text and display error state of a InputChoiceGroup
|
|
50
|
+
*/
|
|
51
|
+
error?: string;
|
|
52
|
+
/**
|
|
53
|
+
* Specify if InputChoiceGroup displays in a read-only state
|
|
54
|
+
*/
|
|
55
|
+
readOnly: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Specify if InputChoiceGroup displays in a disabled state
|
|
58
|
+
*/
|
|
59
|
+
disabled: boolean;
|
|
60
|
+
private _inputGroupLabel;
|
|
61
|
+
private _inputGroupHelperText;
|
|
62
|
+
radioButtons: NodeListOf<Element>;
|
|
63
|
+
checkboxes: NodeListOf<Element>;
|
|
64
|
+
switches: NodeListOf<Element>;
|
|
65
|
+
private groupRef;
|
|
66
|
+
protected selectedValue?: string;
|
|
67
|
+
inputGroupContextValue: InputChoiceGroupContextProps;
|
|
68
|
+
firstUpdated(): void;
|
|
69
|
+
willUpdate(changedProperties: PropertyValues): void;
|
|
70
|
+
updated(): void;
|
|
71
|
+
/**
|
|
72
|
+
*
|
|
73
|
+
* NOTE: This should provide default behavior that can be overridable for
|
|
74
|
+
* RadioButtonGroup || CheckboxGroup || SwitchGroup
|
|
75
|
+
* in case default behavior is not desired
|
|
76
|
+
*
|
|
77
|
+
* Check RadioButtonGroup `handleKeyDown` || `updateSelectedValue` as example
|
|
78
|
+
*
|
|
79
|
+
*/
|
|
80
|
+
protected handleKeyDown(_event: KeyboardEvent): void;
|
|
81
|
+
protected updateSelectedValue(_value: string): void;
|
|
82
|
+
protected handleClick(_event: MouseEvent): void;
|
|
83
|
+
protected getOrientation(): "horizontal" | "vertical";
|
|
84
|
+
protected isFluid(): boolean;
|
|
85
|
+
render(): import('lit-html').TemplateResult<1>;
|
|
86
|
+
}
|
|
87
|
+
//# sourceMappingURL=InputChoiceGroup.d.ts.map
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
import { provide as S } from "@lit/context";
|
|
2
|
+
import { unsafeCSS as C, html as x, nothing as $ } from "lit";
|
|
3
|
+
import { property as a, queryAssignedElements as d, state as z } from "lit/decorators.js";
|
|
4
|
+
import { createRef as V, ref as G } from "lit/directives/ref.js";
|
|
5
|
+
import q from "clsx";
|
|
6
|
+
import { a as w, g as O } from "../chunks/classNames.Cq_tbDRp.js";
|
|
7
|
+
import { t as M } from "../chunks/constants.jOWREYQE.js";
|
|
8
|
+
import { c as P } from "../chunks/register-custom-element.DHGKOhmA.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 s = m > 1 ? void 0 : m ? W(o, t) : o, l = e.length - 1, b; l >= 0; l--)
|
|
16
|
+
(b = e[l]) && (s = (m ? b(o, t, s) : b(s)) || s);
|
|
17
|
+
return m && s && I(o, t, s), s;
|
|
18
|
+
}, R = (e, o, t) => o.has(e) || k("Cannot " + t), c = (e, o, t) => (R(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: T, subElementClassPrefix: _, classModifierPrefix: D } = O("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 = V(), 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
|
+
` : $), 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(), s = this.isFluid(), l = m === "horizontal" && s ? "horizontalFluid" : m;
|
|
106
|
+
console.log(
|
|
107
|
+
"haha",
|
|
108
|
+
this.orientation,
|
|
109
|
+
this.layout,
|
|
110
|
+
this.fluid,
|
|
111
|
+
m,
|
|
112
|
+
s
|
|
113
|
+
);
|
|
114
|
+
const b = q(
|
|
115
|
+
T,
|
|
116
|
+
this.theme && M(this.theme),
|
|
117
|
+
`${D}${l}`
|
|
118
|
+
);
|
|
119
|
+
return x`
|
|
120
|
+
<fieldset
|
|
121
|
+
${G(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 = C(E);
|
|
151
|
+
r([
|
|
152
|
+
a({ type: String })
|
|
153
|
+
], i.prototype, "theme", 2);
|
|
154
|
+
r([
|
|
155
|
+
a({ type: String })
|
|
156
|
+
], i.prototype, "layout", 2);
|
|
157
|
+
r([
|
|
158
|
+
a({ type: String })
|
|
159
|
+
], i.prototype, "orientation", 2);
|
|
160
|
+
r([
|
|
161
|
+
a({ type: Boolean })
|
|
162
|
+
], i.prototype, "fluid", 2);
|
|
163
|
+
r([
|
|
164
|
+
a({ type: Boolean })
|
|
165
|
+
], i.prototype, "required", 2);
|
|
166
|
+
r([
|
|
167
|
+
a({ type: Boolean })
|
|
168
|
+
], i.prototype, "hideRequiredMarker", 2);
|
|
169
|
+
r([
|
|
170
|
+
a({ type: String })
|
|
171
|
+
], i.prototype, "error", 2);
|
|
172
|
+
r([
|
|
173
|
+
a({ type: Boolean })
|
|
174
|
+
], i.prototype, "readOnly", 2);
|
|
175
|
+
r([
|
|
176
|
+
a({ 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
|
+
P("bm-input-choice-group")
|
|
202
|
+
], i);
|
|
203
|
+
export {
|
|
204
|
+
i as InputChoiceGroup
|
|
205
|
+
};
|
package/Link/Link.d.ts
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
import { LinkAppearances, LinkSizes } from '@viasat/beam-shared/components/link';
|
|
3
|
+
/**
|
|
4
|
+
* `bm-link`
|
|
5
|
+
*
|
|
6
|
+
* @slot default - Provide text for the Link or use the `text` attribute
|
|
7
|
+
* @slot iconBefore - Specify if the Link displays icon before the text
|
|
8
|
+
* @slot iconAfter - Specify if the Link displays icon after the text
|
|
9
|
+
*/
|
|
10
|
+
export declare class BmLink extends LitElement {
|
|
11
|
+
#private;
|
|
12
|
+
static styles: import('lit').CSSResult;
|
|
13
|
+
/**
|
|
14
|
+
* Specify the appearance of a Link
|
|
15
|
+
*/
|
|
16
|
+
appearance: LinkAppearances;
|
|
17
|
+
/**
|
|
18
|
+
* Specify if the Link displays as bold
|
|
19
|
+
*/
|
|
20
|
+
bold: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Specify the size of a Link
|
|
23
|
+
*/
|
|
24
|
+
size?: LinkSizes;
|
|
25
|
+
/**
|
|
26
|
+
* Specify if the Link is disabled
|
|
27
|
+
*/
|
|
28
|
+
disabled: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Specify the target link for the href attribute
|
|
31
|
+
*/
|
|
32
|
+
href: string;
|
|
33
|
+
/**
|
|
34
|
+
* Provide text for the Link
|
|
35
|
+
*/
|
|
36
|
+
text?: string | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* Specify if Link displays with an underline
|
|
39
|
+
*/
|
|
40
|
+
hideUnderline: boolean;
|
|
41
|
+
render(): import('lit-html').TemplateResult<1>;
|
|
42
|
+
}
|
|
43
|
+
declare global {
|
|
44
|
+
interface HTMLElementTagNameMap {
|
|
45
|
+
'bm-link': BmLink;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=Link.d.ts.map
|
package/Link/Link.js
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { unsafeCSS as v, LitElement as y, html as d } from "lit";
|
|
2
|
+
import { property as n } from "lit/decorators.js";
|
|
3
|
+
import h from "clsx";
|
|
4
|
+
import { g as f } from "../chunks/classNames.Cq_tbDRp.js";
|
|
5
|
+
import { c as g } from "../chunks/register-custom-element.DHGKOhmA.js";
|
|
6
|
+
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)}';
|
|
7
|
+
var x = Object.defineProperty, z = Object.getOwnPropertyDescriptor, k = (o) => {
|
|
8
|
+
throw TypeError(o);
|
|
9
|
+
}, m = (o, e, r, t) => {
|
|
10
|
+
for (var l = t > 1 ? void 0 : t ? z(e, r) : e, b = o.length - 1, p; b >= 0; b--)
|
|
11
|
+
(p = o[b]) && (l = (t ? p(e, r, l) : p(l)) || l);
|
|
12
|
+
return t && l && x(e, r, l), l;
|
|
13
|
+
}, S = (o, e, r) => e.has(o) || k("Cannot " + r), c = (o, e, r) => (S(o, e, "read from private field"), r ? r.call(o) : e.get(o)), _ = (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;
|
|
14
|
+
const { baseClassNamePrefix: $, classModifierPrefix: a } = f("link");
|
|
15
|
+
let i = class extends y {
|
|
16
|
+
constructor() {
|
|
17
|
+
super(...arguments), this.appearance = "primary", this.bold = !1, this.disabled = !1, this.href = "", this.text = "", this.hideUnderline = !1, _(this, s, (o) => d`<slot name=${o}></slot>`);
|
|
18
|
+
}
|
|
19
|
+
render() {
|
|
20
|
+
const o = h(
|
|
21
|
+
$,
|
|
22
|
+
this.size && `${a}${this.size}`,
|
|
23
|
+
this.disabled && `${a}disabled`,
|
|
24
|
+
this.appearance && `${a}${this.appearance}`,
|
|
25
|
+
this.hideUnderline && `${a}hide-underline`,
|
|
26
|
+
this.bold && `${a}body-bold`,
|
|
27
|
+
this.className
|
|
28
|
+
);
|
|
29
|
+
return this.disabled ? d`
|
|
30
|
+
<span aria-disabled=${this.disabled} class=${o} tabindex="-1">
|
|
31
|
+
${c(this, s).call(this, "iconBefore")}
|
|
32
|
+
<slot>${this.text}</slot>
|
|
33
|
+
${c(this, s).call(this, "iconAfter")}
|
|
34
|
+
</span>
|
|
35
|
+
` : d`
|
|
36
|
+
<a
|
|
37
|
+
class=${o}
|
|
38
|
+
tabindex="0"
|
|
39
|
+
href=${this.href && this.href}
|
|
40
|
+
part="link"
|
|
41
|
+
>
|
|
42
|
+
${c(this, s).call(this, "iconBefore")}
|
|
43
|
+
<slot>${this.text}</slot>
|
|
44
|
+
${c(this, s).call(this, "iconAfter")}
|
|
45
|
+
</a>
|
|
46
|
+
`;
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
s = /* @__PURE__ */ new WeakMap();
|
|
50
|
+
i.styles = v(u);
|
|
51
|
+
m([
|
|
52
|
+
n({ type: String })
|
|
53
|
+
], i.prototype, "appearance", 2);
|
|
54
|
+
m([
|
|
55
|
+
n({ type: Boolean })
|
|
56
|
+
], i.prototype, "bold", 2);
|
|
57
|
+
m([
|
|
58
|
+
n({ type: String })
|
|
59
|
+
], i.prototype, "size", 2);
|
|
60
|
+
m([
|
|
61
|
+
n({ type: Boolean })
|
|
62
|
+
], i.prototype, "disabled", 2);
|
|
63
|
+
m([
|
|
64
|
+
n({ type: String })
|
|
65
|
+
], i.prototype, "href", 2);
|
|
66
|
+
m([
|
|
67
|
+
n({ type: String })
|
|
68
|
+
], i.prototype, "text", 2);
|
|
69
|
+
m([
|
|
70
|
+
n({ type: Boolean })
|
|
71
|
+
], i.prototype, "hideUnderline", 2);
|
|
72
|
+
i = m([
|
|
73
|
+
g("bm-link")
|
|
74
|
+
], i);
|
|
75
|
+
export {
|
|
76
|
+
i as BmLink
|
|
77
|
+
};
|
package/Link/index.d.ts
ADDED
package/Link/index.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ListDensity, ListKind, ListSize } from '@viasat/beam-shared/components/list';
|
|
2
|
+
import { BmListItem } from './ListItem';
|
|
3
|
+
export interface ListContext {
|
|
4
|
+
kind: ListKind | undefined;
|
|
5
|
+
size: ListSize | undefined;
|
|
6
|
+
density: ListDensity | undefined;
|
|
7
|
+
indent: boolean | undefined;
|
|
8
|
+
nestCount: number;
|
|
9
|
+
register?: (el: BmListItem) => void;
|
|
10
|
+
unregister?: (el: BmListItem) => void;
|
|
11
|
+
}
|
|
12
|
+
export declare const ListContext: {
|
|
13
|
+
__context__: ListContext;
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=List.context.d.ts.map
|