@brad-frost-web/eddie-web-components 0.1.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/components/EdElement.d.ts +61 -0
- package/components/EdElement.d.ts.map +1 -0
- package/components/EdElement.js +63 -0
- package/components/EdFormElement.d.ts +65 -0
- package/components/EdFormElement.d.ts.map +1 -0
- package/components/EdFormElement.js +46 -0
- package/components/accordion/accordion.d.ts +19 -0
- package/components/accordion/accordion.d.ts.map +1 -0
- package/components/accordion/accordion.js +31 -0
- package/components/accordion-panel/accordion-panel.d.ts +57 -0
- package/components/accordion-panel/accordion-panel.d.ts.map +1 -0
- package/components/accordion-panel/accordion-panel.js +95 -0
- package/components/alert/alert.d.ts +72 -0
- package/components/alert/alert.d.ts.map +1 -0
- package/components/alert/alert.js +77 -0
- package/components/badge/badge.d.ts +29 -0
- package/components/badge/badge.d.ts.map +1 -0
- package/components/badge/badge.js +33 -0
- package/components/band/band.d.ts +24 -0
- package/components/band/band.d.ts.map +1 -0
- package/components/band/band.js +32 -0
- package/components/box/box.d.ts +14 -0
- package/components/box/box.d.ts.map +1 -0
- package/components/box/box.js +20 -0
- package/components/breadcrumbs/breadcrumbs.d.ts +14 -0
- package/components/breadcrumbs/breadcrumbs.d.ts.map +1 -0
- package/components/breadcrumbs/breadcrumbs.js +22 -0
- package/components/breadcrumbs-item/breadcrumbs-item.d.ts +31 -0
- package/components/breadcrumbs-item/breadcrumbs-item.d.ts.map +1 -0
- package/components/breadcrumbs-item/breadcrumbs-item.js +36 -0
- package/components/button/button.d.ts +93 -0
- package/components/button/button.d.ts.map +1 -0
- package/components/button/button.js +118 -0
- package/components/button-group/button-group.d.ts +24 -0
- package/components/button-group/button-group.d.ts.map +1 -0
- package/components/button-group/button-group.js +35 -0
- package/components/card/card.d.ts +34 -0
- package/components/card/card.d.ts.map +1 -0
- package/components/card/card.js +43 -0
- package/components/checkbox-field/checkbox-field.d.ts +76 -0
- package/components/checkbox-field/checkbox-field.d.ts.map +1 -0
- package/components/checkbox-field/checkbox-field.js +98 -0
- package/components/checkbox-field-item/checkbox-field-item.d.ts +81 -0
- package/components/checkbox-field-item/checkbox-field-item.d.ts.map +1 -0
- package/components/checkbox-field-item/checkbox-field-item.js +110 -0
- package/components/counter/counter.d.ts +134 -0
- package/components/counter/counter.d.ts.map +1 -0
- package/components/counter/counter.js +176 -0
- package/components/drawer/drawer.d.ts +41 -0
- package/components/drawer/drawer.d.ts.map +1 -0
- package/components/drawer/drawer.js +74 -0
- package/components/feature/feature.d.ts +27 -0
- package/components/feature/feature.d.ts.map +1 -0
- package/components/feature/feature.js +42 -0
- package/components/field-note/field-note.d.ts +33 -0
- package/components/field-note/field-note.d.ts.map +1 -0
- package/components/field-note/field-note.js +44 -0
- package/components/file-upload/file-upload.d.ts +118 -0
- package/components/file-upload/file-upload.d.ts.map +1 -0
- package/components/file-upload/file-upload.js +224 -0
- package/components/file-upload/file-upload.model.d.ts +24 -0
- package/components/file-upload/file-upload.model.d.ts.map +1 -0
- package/components/file-upload.model/file-upload.model.js +11 -0
- package/components/footer/footer.d.ts +16 -0
- package/components/footer/footer.d.ts.map +1 -0
- package/components/footer/footer.js +35 -0
- package/components/global-nav/global-nav.d.ts +14 -0
- package/components/global-nav/global-nav.d.ts.map +1 -0
- package/components/global-nav/global-nav.js +22 -0
- package/components/global-nav-item/global-nav-item.d.ts +80 -0
- package/components/global-nav-item/global-nav-item.d.ts.map +1 -0
- package/components/global-nav-item/global-nav-item.js +128 -0
- package/components/grid/grid.d.ts +51 -0
- package/components/grid/grid.d.ts.map +1 -0
- package/components/grid/grid.js +49 -0
- package/components/grid-item/grid-item.d.ts +14 -0
- package/components/grid-item/grid-item.d.ts.map +1 -0
- package/components/grid-item/grid-item.js +20 -0
- package/components/header/header.d.ts +19 -0
- package/components/header/header.d.ts.map +1 -0
- package/components/header/header.js +49 -0
- package/components/heading/heading.d.ts +44 -0
- package/components/heading/heading.d.ts.map +1 -0
- package/components/heading/heading.js +51 -0
- package/components/hero/hero.d.ts +22 -0
- package/components/hero/hero.d.ts.map +1 -0
- package/components/hero/hero.js +37 -0
- package/components/hr/hr.d.ts +23 -0
- package/components/hr/hr.d.ts.map +1 -0
- package/components/hr/hr.js +27 -0
- package/components/icon/icon.d.ts +51 -0
- package/components/icon/icon.d.ts.map +1 -0
- package/components/icon/icon.js +66 -0
- package/components/icon-link-list/icon-link-list.d.ts +19 -0
- package/components/icon-link-list/icon-link-list.d.ts.map +1 -0
- package/components/icon-link-list/icon-link-list.js +31 -0
- package/components/icon-link-list-item/icon-link-list-item.d.ts +23 -0
- package/components/icon-link-list-item/icon-link-list-item.d.ts.map +1 -0
- package/components/icon-link-list-item/icon-link-list-item.js +39 -0
- package/components/index.browser.js +4 -0
- package/components/inline-checkbox/inline-checkbox.d.ts +73 -0
- package/components/inline-checkbox/inline-checkbox.d.ts.map +1 -0
- package/components/inline-checkbox/inline-checkbox.js +114 -0
- package/components/key-value-table/key-value-table.d.ts +19 -0
- package/components/key-value-table/key-value-table.d.ts.map +1 -0
- package/components/key-value-table/key-value-table.js +33 -0
- package/components/key-value-table-row/key-value-table-row.d.ts +30 -0
- package/components/key-value-table-row/key-value-table-row.d.ts.map +1 -0
- package/components/key-value-table-row/key-value-table-row.js +38 -0
- package/components/layout/layout.d.ts +50 -0
- package/components/layout/layout.d.ts.map +1 -0
- package/components/layout/layout.js +43 -0
- package/components/layout-container/layout-container.d.ts +14 -0
- package/components/layout-container/layout-container.d.ts.map +1 -0
- package/components/layout-container/layout-container.js +20 -0
- package/components/layout-section/layout-section.d.ts +28 -0
- package/components/layout-section/layout-section.d.ts.map +1 -0
- package/components/layout-section/layout-section.js +37 -0
- package/components/linelength-container/linelength-container.d.ts +14 -0
- package/components/linelength-container/linelength-container.d.ts.map +1 -0
- package/components/linelength-container/linelength-container.js +20 -0
- package/components/link-list/link-list.d.ts +56 -0
- package/components/link-list/link-list.d.ts.map +1 -0
- package/components/link-list/link-list.js +48 -0
- package/components/link-list-item/link-list-item.d.ts +26 -0
- package/components/link-list-item/link-list-item.d.ts.map +1 -0
- package/components/link-list-item/link-list-item.js +41 -0
- package/components/list/list.d.ts +33 -0
- package/components/list/list.d.ts.map +1 -0
- package/components/list/list.js +36 -0
- package/components/list-item/list-item.d.ts +14 -0
- package/components/list-item/list-item.d.ts.map +1 -0
- package/components/list-item/list-item.js +20 -0
- package/components/loading-indicator/loading-indicator.d.ts +14 -0
- package/components/loading-indicator/loading-indicator.d.ts.map +1 -0
- package/components/loading-indicator/loading-indicator.js +20 -0
- package/components/logo/logo.d.ts +18 -0
- package/components/logo/logo.d.ts.map +1 -0
- package/components/logo/logo.js +29 -0
- package/components/main/main.d.ts +14 -0
- package/components/main/main.d.ts.map +1 -0
- package/components/main/main.js +16 -0
- package/components/media-block/media-block.d.ts +24 -0
- package/components/media-block/media-block.d.ts.map +1 -0
- package/components/media-block/media-block.js +37 -0
- package/components/modal/modal.d.ts +37 -0
- package/components/modal/modal.d.ts.map +1 -0
- package/components/modal/modal.js +67 -0
- package/components/nav-container/nav-container.d.ts +14 -0
- package/components/nav-container/nav-container.d.ts.map +1 -0
- package/components/nav-container/nav-container.js +20 -0
- package/components/page-header/page-header.d.ts +18 -0
- package/components/page-header/page-header.d.ts.map +1 -0
- package/components/page-header/page-header.js +39 -0
- package/components/pagination/pagination.d.ts +38 -0
- package/components/pagination/pagination.d.ts.map +1 -0
- package/components/pagination/pagination.js +52 -0
- package/components/pagination-item/pagination-item.d.ts +35 -0
- package/components/pagination-item/pagination-item.d.ts.map +1 -0
- package/components/pagination-item/pagination-item.js +52 -0
- package/components/primary-nav/primary-nav.d.ts +23 -0
- package/components/primary-nav/primary-nav.d.ts.map +1 -0
- package/components/primary-nav/primary-nav.js +33 -0
- package/components/primary-nav-item/primary-nav-item.d.ts +70 -0
- package/components/primary-nav-item/primary-nav-item.d.ts.map +1 -0
- package/components/primary-nav-item/primary-nav-item.js +121 -0
- package/components/radio-field/radio-field.d.ts +84 -0
- package/components/radio-field/radio-field.d.ts.map +1 -0
- package/components/radio-field/radio-field.js +108 -0
- package/components/radio-field-item/radio-field-item.d.ts +100 -0
- package/components/radio-field-item/radio-field-item.d.ts.map +1 -0
- package/components/radio-field-item/radio-field-item.js +142 -0
- package/components/search-form/search-form.d.ts +91 -0
- package/components/search-form/search-form.d.ts.map +1 -0
- package/components/search-form/search-form.js +131 -0
- package/components/section/section.d.ts +16 -0
- package/components/section/section.d.ts.map +1 -0
- package/components/section/section.js +27 -0
- package/components/select-field/select-field.d.ts +94 -0
- package/components/select-field/select-field.d.ts.map +1 -0
- package/components/select-field/select-field.js +123 -0
- package/components/show-hide/show-hide.d.ts +61 -0
- package/components/show-hide/show-hide.d.ts.map +1 -0
- package/components/show-hide/show-hide.js +72 -0
- package/components/show-more/show-more.d.ts +33 -0
- package/components/show-more/show-more.d.ts.map +1 -0
- package/components/show-more/show-more.js +63 -0
- package/components/skeleton/skeleton.d.ts +31 -0
- package/components/skeleton/skeleton.d.ts.map +1 -0
- package/components/skeleton/skeleton.js +33 -0
- package/components/tab/tab.d.ts +45 -0
- package/components/tab/tab.d.ts.map +1 -0
- package/components/tab/tab.js +47 -0
- package/components/table/table.d.ts +33 -0
- package/components/table/table.d.ts.map +1 -0
- package/components/table/table.js +39 -0
- package/components/table-body/table-body.d.ts +14 -0
- package/components/table-body/table-body.d.ts.map +1 -0
- package/components/table-body/table-body.js +20 -0
- package/components/table-cell/table-cell.d.ts +38 -0
- package/components/table-cell/table-cell.d.ts.map +1 -0
- package/components/table-cell/table-cell.js +36 -0
- package/components/table-header/table-header.d.ts +14 -0
- package/components/table-header/table-header.d.ts.map +1 -0
- package/components/table-header/table-header.js +20 -0
- package/components/table-header-cell/table-header-cell.d.ts +62 -0
- package/components/table-header-cell/table-header-cell.d.ts.map +1 -0
- package/components/table-header-cell/table-header-cell.js +62 -0
- package/components/table-object/table-object.d.ts +66 -0
- package/components/table-object/table-object.d.ts.map +1 -0
- package/components/table-object/table-object.js +96 -0
- package/components/table-row/table-row.d.ts +14 -0
- package/components/table-row/table-row.d.ts.map +1 -0
- package/components/table-row/table-row.js +20 -0
- package/components/tabs/tabs.d.ts +101 -0
- package/components/tabs/tabs.d.ts.map +1 -0
- package/components/tabs/tabs.js +184 -0
- package/components/tag/tag.d.ts +27 -0
- package/components/tag/tag.d.ts.map +1 -0
- package/components/tag/tag.js +41 -0
- package/components/tag-list/tag-list.d.ts +14 -0
- package/components/tag-list/tag-list.d.ts.map +1 -0
- package/components/tag-list/tag-list.js +20 -0
- package/components/text-field/text-field.d.ts +89 -0
- package/components/text-field/text-field.d.ts.map +1 -0
- package/components/text-field/text-field.js +124 -0
- package/components/text-link/text-link.d.ts +42 -0
- package/components/text-link/text-link.d.ts.map +1 -0
- package/components/text-link/text-link.js +47 -0
- package/components/text-passage/text-passage.d.ts +38 -0
- package/components/text-passage/text-passage.d.ts.map +1 -0
- package/components/text-passage/text-passage.js +57 -0
- package/components/textarea-field/textarea-field.d.ts +82 -0
- package/components/textarea-field/textarea-field.d.ts.map +1 -0
- package/components/textarea-field/textarea-field.js +111 -0
- package/components/toggle/toggle.d.ts +89 -0
- package/components/toggle/toggle.d.ts.map +1 -0
- package/components/toggle/toggle.js +132 -0
- package/components/toolbar/toolbar.d.ts +32 -0
- package/components/toolbar/toolbar.d.ts.map +1 -0
- package/components/toolbar/toolbar.js +40 -0
- package/components/tooltip/tooltip.d.ts +15 -0
- package/components/tooltip/tooltip.d.ts.map +1 -0
- package/components/tooltip/tooltip.js +35 -0
- package/components/tooltip-trigger/tooltip-trigger.d.ts +46 -0
- package/components/tooltip-trigger/tooltip-trigger.d.ts.map +1 -0
- package/components/tooltip-trigger/tooltip-trigger.js +100 -0
- package/components/utility-nav/utility-nav.d.ts +14 -0
- package/components/utility-nav/utility-nav.d.ts.map +1 -0
- package/components/utility-nav/utility-nav.js +22 -0
- package/components/utility-nav-item/utility-nav-item.d.ts +38 -0
- package/components/utility-nav-item/utility-nav-item.d.ts.map +1 -0
- package/components/utility-nav-item/utility-nav-item.js +57 -0
- package/package.json +49 -0
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { EdFormElement } from '@brad-frost-web/eddie-web-components/components/EdFormElement';
|
|
2
|
+
/**
|
|
3
|
+
* @slot - The component content
|
|
4
|
+
*/
|
|
5
|
+
export declare class EdSelectField extends EdFormElement {
|
|
6
|
+
readonly type = "select";
|
|
7
|
+
static get styles(): import('lit').CSSResult;
|
|
8
|
+
/**
|
|
9
|
+
* The unique id of the field
|
|
10
|
+
*/
|
|
11
|
+
fieldId?: string;
|
|
12
|
+
/**
|
|
13
|
+
* The form field's label
|
|
14
|
+
*/
|
|
15
|
+
label: string;
|
|
16
|
+
/**
|
|
17
|
+
* Checkbox name attribute property
|
|
18
|
+
*/
|
|
19
|
+
name?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Field note
|
|
22
|
+
*/
|
|
23
|
+
fieldNote?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Aria describedby
|
|
26
|
+
* 1) Used to connect the field note in select field to the select menu for accessibility
|
|
27
|
+
*/
|
|
28
|
+
ariaDescribedBy?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Required attribute
|
|
31
|
+
*/
|
|
32
|
+
required: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Disabled attribute
|
|
35
|
+
*/
|
|
36
|
+
disabled?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Select field option items
|
|
39
|
+
* 1) optGroupLabel groups `options` items. Only use `label` when not grouping items
|
|
40
|
+
* 2) `label` represents the `<option>` label
|
|
41
|
+
*/
|
|
42
|
+
items: string[];
|
|
43
|
+
/**
|
|
44
|
+
* Style variant
|
|
45
|
+
* * <ed-text-passage size="sm">
|
|
46
|
+
* <ul>
|
|
47
|
+
* <li>**display** applies branded, bolder display form fields</li>
|
|
48
|
+
* </ul>
|
|
49
|
+
* </ed-text-passage>
|
|
50
|
+
*/
|
|
51
|
+
variant?: 'display';
|
|
52
|
+
/**
|
|
53
|
+
* Inverted variation for dark backgrounds
|
|
54
|
+
*/
|
|
55
|
+
inverted?: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Error state
|
|
58
|
+
*/
|
|
59
|
+
isError?: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Success state
|
|
62
|
+
*/
|
|
63
|
+
isSuccess?: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Field note icon name
|
|
66
|
+
*/
|
|
67
|
+
iconName?: string;
|
|
68
|
+
/**
|
|
69
|
+
* Select input querySelector
|
|
70
|
+
*/
|
|
71
|
+
field: HTMLSelectElement;
|
|
72
|
+
/**
|
|
73
|
+
* Get all select option elements
|
|
74
|
+
*/
|
|
75
|
+
selectOptions: HTMLOptionElement[];
|
|
76
|
+
/**
|
|
77
|
+
* Selected item value
|
|
78
|
+
*/
|
|
79
|
+
private selectedItem;
|
|
80
|
+
firstUpdated(): void;
|
|
81
|
+
handleChange(event: Event): void;
|
|
82
|
+
/**
|
|
83
|
+
* Set form data
|
|
84
|
+
* 1) Set the element internals to the selected item value if it exists, otherwise the default selected item is the first one
|
|
85
|
+
*/
|
|
86
|
+
private setFormData;
|
|
87
|
+
render(): import('lit-html').TemplateResult<1>;
|
|
88
|
+
}
|
|
89
|
+
declare global {
|
|
90
|
+
interface HTMLElementTagNameMap {
|
|
91
|
+
'ed-select-field': EdSelectField;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
//# sourceMappingURL=select-field.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select-field.d.ts","sourceRoot":"","sources":["../../../../packages/eddie-web-components/components/select-field/select-field.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,+DAA+D,CAAC;AAK9F,OAAO,0BAA0B,CAAC;AAGlC;;GAEG;AACH,qBAAa,aAAc,SAAQ,aAAa;IAC9C,QAAQ,CAAC,IAAI,YAAY;IACzB,MAAM,KAAK,MAAM,4BAEhB;IAED;;OAEG;IAEH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IAEH,KAAK,EAAE,MAAM,CAAW;IAExB;;OAEG;IAEH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IAEH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IAEH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;OAEG;IAEH,QAAQ,EAAE,OAAO,CAAS;IAE1B;;OAEG;IAEH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;;OAIG;IAEH,KAAK,EAAE,MAAM,EAAE,CAAM;IAErB;;;;;;;OAOG;IAEH,OAAO,CAAC,EAAE,SAAS,CAAC;IAEpB;;OAEG;IAEH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IAEH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;OAEG;IAEH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;OAEG;IAEH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IAEH,KAAK,EAAG,iBAAiB,CAAC;IAE1B;;OAEG;IAEH,aAAa,EAAE,iBAAiB,EAAE,CAAC;IAEnC;;OAEG;IACH,OAAO,CAAC,YAAY,CAAS;IAE7B,YAAY;IAgBZ,YAAY,CAAC,KAAK,EAAE,KAAK;IAOzB;;;OAGG;IACH,OAAO,CAAC,WAAW;IAInB,MAAM;CAgDP;AAMD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,iBAAiB,EAAE,aAAa,CAAC;KAClC;CACF"}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { E as f } from "../EdFormElement.js";
|
|
2
|
+
import { unsafeCSS as p, html as a } from "lit";
|
|
3
|
+
import { property as o, query as m, queryAll as b } from "lit/decorators.js";
|
|
4
|
+
import { ifDefined as i } from "lit-html/directives/if-defined.js";
|
|
5
|
+
import { n as u } from "../index.browser.js";
|
|
6
|
+
import "../field-note/field-note.js";
|
|
7
|
+
const y = ":root,:host{--size-base-unit: .5rem}*,::slotted(*),*:before,*:after{box-sizing:border-box}h1,h2,h3,h4,h5,h6{margin:0}.ed-c-select-field__label{font-family:var(--ed-theme-typography-label-default-font-family);font-weight:var(--ed-theme-typography-label-default-font-weight);font-size:var(--ed-theme-typography-label-default-font-size);line-height:var(--ed-theme-typography-label-default-line-height);letter-spacing:var(--ed-theme-typography-label-default-letter-spacing);text-transform:var(--ed-theme-typography-label-default-text-transform);display:block;margin-bottom:.5rem}.ed-c-select-field--inverted .ed-c-select-field__label{color:var(--ed-theme-color-content-knockout)}.ed-c-select-field.ed-is-error .ed-c-select-field__label{color:var(--ed-theme-color-content-utility-error)}.ed-c-select-field.ed-is-success .ed-c-select-field__label{color:var(--ed-theme-color-content-utility-success)}.ed-c-select-field__body{position:relative}.ed-c-select-field__input{-webkit-appearance:none;width:100%;border-width:var(--ed-theme-border-width-sm);border-style:solid;border-color:var(--ed-theme-form-color-border-default);border-radius:var(--ed-theme-border-radius-sm);outline:none;padding:.8125rem .5rem;font-family:var(--ed-theme-typography-body-default-font-family);font-weight:var(--ed-theme-typography-body-default-font-weight);font-size:var(--ed-theme-typography-body-default-font-size);line-height:var(--ed-theme-typography-body-default-line-height);letter-spacing:var(--ed-theme-typography-body-default-letter-spacing);text-transform:var(--ed-theme-typography-body-default-text-transform);color:var(--ed-theme-form-color-content-default);background-color:var(--ed-theme-form-color-background-default);transition:border-color var(--ed-theme-animation-fade-quick) var(--ed-theme-animation-ease),background-color var(--ed-theme-animation-fade-quick) var(--ed-theme-animation-ease),box-shadow var(--ed-theme-animation-fade-quick) var(--ed-theme-animation-ease)}.ed-c-select-field__input:hover{border-color:var(--ed-theme-color-border-brand);background-color:var(--ed-theme-form-color-background-hover)}.ed-c-select-field__input:focus:not(:disabled){border-color:var(--ed-theme-form-color-border-focus)}.ed-c-select-field__input:not(:placeholder-shown):focus:not(:disabled){border-color:var(--ed-theme-form-color-border-focus);background-color:var(--ed-theme-form-color-background-hover)}.ed-is-error .ed-c-select-field__input:not(:placeholder-shown):focus:not(:disabled){background-color:var(--ed-theme-color-background-utility-error)}.ed-is-success .ed-c-select-field__input:not(:placeholder-shown):focus:not(:disabled){background-color:var(--ed-theme-color-background-utility-success)}.ed-c-select-field__input:active:not(:disabled){border-color:var(--ed-theme-form-color-border)}.ed-c-select-field__input:disabled{background-color:var(--ed-theme-color-background-subtle);border-color:var(--ed-theme-color-border-disabled);color:var(--ed-theme-color-content-disabled);cursor:not-allowed}.ed-c-select-field__input:disabled~.ed-c-text-field__label,.ed-c-select-field__input:disabled:hover~.ed-c-text-field__label,.ed-c-select-field__input:disabled::placeholder{color:var(--ed-theme-color-content-disabled)}.ed-c-select-field__input:focus-visible{outline:var(--ed-theme-border-width-lg) solid var(--ed-theme-focus-ring-color-border-default);outline-offset:var(--ed-theme-offset-focus-ring, .25rem )}.ed-c-select-field__input::placeholder{font-family:var(--ed-theme-typography-body-sm-font-family);font-weight:var(--ed-theme-typography-body-sm-font-weight);font-size:var(--ed-theme-typography-body-sm-font-size);line-height:var(--ed-theme-typography-body-sm-line-height);letter-spacing:var(--ed-theme-typography-body-sm-letter-spacing);text-transform:var(--ed-theme-typography-body-sm-text-transform);color:var(--ed-theme-color-content-subtle);transition:color var(--ed-theme-animation-fade-quick) var(--ed-theme-animation-ease)}.ed-is-error .ed-c-select-field__input::placeholder{color:var(--ed-theme-color-content-utility-error)}.ed-is-error .ed-c-select-field__input:hover::placeholder{color:var(--ed-theme-color-content-utility-error-hover)}.ed-is-error .ed-c-select-field__input{color:var(--ed-theme-color-content-default);border-color:var(--ed-theme-color-border-utility-error);background-color:var(--ed-theme-color-background-utility-error)}.ed-is-error .ed-c-select-field__input:hover,.ed-is-error .ed-c-select-field__input:focus{background-color:var(--ed-theme-color-background-utility-error)}.ed-is-error .ed-c-select-field__input:not(:focus){color:var(--ed-theme-color-content-default)}.ed-is-success .ed-c-select-field__input{color:var(--ed-theme-color-content-default);border-color:var(--ed-theme-color-border-utility-success);background-color:var(--ed-theme-color-background-utility-success)}.ed-is-success .ed-c-select-field__input:hover,.ed-is-success .ed-c-select-field__input:focus{background-color:var(--ed-theme-color-background-utility-success)}.ed-c-select-field__input{padding-right:2rem}.ed-c-select-field--inverted .ed-c-select-field__input{border-color:var(--ed-theme-color-border-subtle)}select::-ms-expand{display:none}ed-icon{position:absolute;top:50%;transform:translateY(-50%);right:.75rem;pointer-events:none;--ed-icon-fill: var(--ed-theme-color-content-brand-knockout);--ed-icon-height: .75rem ;--ed-icon-width: .75rem }";
|
|
8
|
+
var v = Object.defineProperty, t = (c, d, r, s) => {
|
|
9
|
+
for (var l = void 0, n = c.length - 1, h; n >= 0; n--)
|
|
10
|
+
(h = c[n]) && (l = h(d, r, l) || l);
|
|
11
|
+
return l && v(d, r, l), l;
|
|
12
|
+
};
|
|
13
|
+
class e extends f {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments), this.type = "select", this.label = "Label", this.required = !1, this.items = [];
|
|
16
|
+
}
|
|
17
|
+
static get styles() {
|
|
18
|
+
return p(y.toString());
|
|
19
|
+
}
|
|
20
|
+
firstUpdated() {
|
|
21
|
+
super.connectedCallback(), this.selectOptions.forEach((d) => {
|
|
22
|
+
d.selected === !0 && (this.selectedItem = d.value);
|
|
23
|
+
}), this.defaultValue = this.selectedItem ? this.selectedItem : this.selectOptions[0].value, this.fieldId = this.fieldId || u(), this.fieldNote && (this.ariaDescribedBy = this.ariaDescribedBy || u()), this.setFormData();
|
|
24
|
+
}
|
|
25
|
+
handleChange(d) {
|
|
26
|
+
const r = d.target;
|
|
27
|
+
this.value = r.value, console.log("event", this.value), this.dispatchEvent(new Event("change"));
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Set form data
|
|
31
|
+
* 1) Set the element internals to the selected item value if it exists, otherwise the default selected item is the first one
|
|
32
|
+
*/
|
|
33
|
+
setFormData() {
|
|
34
|
+
this.selectedItem ? this.internals.setFormValue(this.selectedItem) : this.internals.setFormValue(this.defaultValue.toString());
|
|
35
|
+
}
|
|
36
|
+
render() {
|
|
37
|
+
const d = this.componentClassNames("ed-c-select-field", {
|
|
38
|
+
"ed-c-select-field--display": this.variant === "display",
|
|
39
|
+
"ed-c-select-field--inverted": this.inverted === !0,
|
|
40
|
+
"ed-is-error": this.isError,
|
|
41
|
+
"ed-is-success": this.isSuccess
|
|
42
|
+
});
|
|
43
|
+
return a`
|
|
44
|
+
<div class="${d}">
|
|
45
|
+
<label class="ed-c-select-field__label" for="${this.fieldId}">${this.label}</label>
|
|
46
|
+
<div class="ed-c-select-field__body">
|
|
47
|
+
<select
|
|
48
|
+
class="ed-c-select-field__input"
|
|
49
|
+
id="${this.fieldId}"
|
|
50
|
+
name="${i(this.name)}"
|
|
51
|
+
value="${i(this.value)}"
|
|
52
|
+
?required="${this.required}"
|
|
53
|
+
?disabled="${this.disabled}"
|
|
54
|
+
aria-describedby="${i(this.ariaDescribedBy)}"
|
|
55
|
+
@change="${this.handleChange}"
|
|
56
|
+
>
|
|
57
|
+
${this.items.map((r) => r.optGroupLabel ? a`<optgroup label="${r.optGroupLabel}">
|
|
58
|
+
${r.options.map((s) => a`<option value="${s.value}" selected=${i(s.selected)}>${s.label}</option>`)}
|
|
59
|
+
</optgroup>` : a`<option value="${r.value}">${r.label}</option>`)}
|
|
60
|
+
</select>
|
|
61
|
+
<ed-icon name="keyboard-arrow-down" styleModifier="ed-c-select-field__icon"></ed-icon>
|
|
62
|
+
</div>
|
|
63
|
+
${this.fieldNote && a`<ed-field-note
|
|
64
|
+
id=${i(this.ariaDescribedBy)}
|
|
65
|
+
iconName=${i(this.iconName)}
|
|
66
|
+
?isSuccess=${this.isSuccess}
|
|
67
|
+
?isError=${this.isError}
|
|
68
|
+
?inverted=${this.inverted}
|
|
69
|
+
>${this.fieldNote}</ed-field-note
|
|
70
|
+
>`}
|
|
71
|
+
</div>
|
|
72
|
+
`;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
t([
|
|
76
|
+
o()
|
|
77
|
+
], e.prototype, "fieldId");
|
|
78
|
+
t([
|
|
79
|
+
o()
|
|
80
|
+
], e.prototype, "label");
|
|
81
|
+
t([
|
|
82
|
+
o()
|
|
83
|
+
], e.prototype, "name");
|
|
84
|
+
t([
|
|
85
|
+
o()
|
|
86
|
+
], e.prototype, "fieldNote");
|
|
87
|
+
t([
|
|
88
|
+
o()
|
|
89
|
+
], e.prototype, "ariaDescribedBy");
|
|
90
|
+
t([
|
|
91
|
+
o({ type: Boolean })
|
|
92
|
+
], e.prototype, "required");
|
|
93
|
+
t([
|
|
94
|
+
o({ type: Boolean })
|
|
95
|
+
], e.prototype, "disabled");
|
|
96
|
+
t([
|
|
97
|
+
o({ type: Array })
|
|
98
|
+
], e.prototype, "items");
|
|
99
|
+
t([
|
|
100
|
+
o()
|
|
101
|
+
], e.prototype, "variant");
|
|
102
|
+
t([
|
|
103
|
+
o({ type: Boolean })
|
|
104
|
+
], e.prototype, "inverted");
|
|
105
|
+
t([
|
|
106
|
+
o({ type: Boolean })
|
|
107
|
+
], e.prototype, "isError");
|
|
108
|
+
t([
|
|
109
|
+
o({ type: Boolean })
|
|
110
|
+
], e.prototype, "isSuccess");
|
|
111
|
+
t([
|
|
112
|
+
o()
|
|
113
|
+
], e.prototype, "iconName");
|
|
114
|
+
t([
|
|
115
|
+
m("select")
|
|
116
|
+
], e.prototype, "field");
|
|
117
|
+
t([
|
|
118
|
+
b("option")
|
|
119
|
+
], e.prototype, "selectOptions");
|
|
120
|
+
customElements.get("ed-select-field") === void 0 && customElements.define("ed-select-field", e);
|
|
121
|
+
export {
|
|
122
|
+
e as EdSelectField
|
|
123
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { EdElement } from '@brad-frost-web/eddie-web-components/components/EdElement';
|
|
2
|
+
/**
|
|
3
|
+
* @slot - The component content
|
|
4
|
+
*/
|
|
5
|
+
export declare class EdShowHide extends EdElement {
|
|
6
|
+
static get styles(): import('lit').CSSResult;
|
|
7
|
+
/**
|
|
8
|
+
* Active state of the show more
|
|
9
|
+
* 1) Reveals hidden information when `true`. Hides when `false`
|
|
10
|
+
*/
|
|
11
|
+
isActive?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Button style variant
|
|
14
|
+
* <ed-text-passage size="sm">
|
|
15
|
+
* <ul>
|
|
16
|
+
* <li>**primary** renders the button used for primary actions</li>
|
|
17
|
+
* <li>**bare** renders a button that has padding and margin removed and a bare background</li>
|
|
18
|
+
* <li>**link** renders a button that looks like a text link</li>
|
|
19
|
+
* </ul>
|
|
20
|
+
* </ed-text-passage>
|
|
21
|
+
*/
|
|
22
|
+
buttonVariant?: 'primary' | 'bare' | 'link';
|
|
23
|
+
/**
|
|
24
|
+
* Name of SVG icon
|
|
25
|
+
*/
|
|
26
|
+
iconName: string;
|
|
27
|
+
/**
|
|
28
|
+
* Button icon position
|
|
29
|
+
*/
|
|
30
|
+
iconPosition: 'before' | 'after';
|
|
31
|
+
/**
|
|
32
|
+
* Size variations:
|
|
33
|
+
*<ed-text-passage size="sm">
|
|
34
|
+
* <ul>
|
|
35
|
+
* <li>**sm** yields a small button</li>
|
|
36
|
+
* <li>**lg** yields a large button</li>
|
|
37
|
+
* </ed-text-passage>
|
|
38
|
+
*/
|
|
39
|
+
size: 'sm' | 'lg';
|
|
40
|
+
/**
|
|
41
|
+
* Button text
|
|
42
|
+
*/
|
|
43
|
+
buttonText: string;
|
|
44
|
+
/**
|
|
45
|
+
* Hide button text
|
|
46
|
+
* 1) Button text when panel content is exposed to hide the content again
|
|
47
|
+
*/
|
|
48
|
+
hideButtonText: string;
|
|
49
|
+
/**
|
|
50
|
+
* Handle click function
|
|
51
|
+
* 1) Toggle the active state to true/false
|
|
52
|
+
*/
|
|
53
|
+
handleClick(): void;
|
|
54
|
+
render(): import('lit-html').TemplateResult<1>;
|
|
55
|
+
}
|
|
56
|
+
declare global {
|
|
57
|
+
interface HTMLElementTagNameMap {
|
|
58
|
+
'ed-show-hide': EdShowHide;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=show-hide.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"show-hide.d.ts","sourceRoot":"","sources":["../../../../packages/eddie-web-components/components/show-hide/show-hide.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,2DAA2D,CAAC;AAGtF,OAAO,kBAAkB,CAAC;AAG1B;;GAEG;AACH,qBAAa,UAAW,SAAQ,SAAS;IACvC,MAAM,KAAK,MAAM,4BAEhB;IAED;;;OAGG;IAEH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;;;;;;;OASG;IAEH,aAAa,CAAC,EAAE,SAAS,GAAG,MAAM,GAAG,MAAM,CAAU;IAErD;;OAEG;IAEH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IAEH,YAAY,EAAE,QAAQ,GAAG,OAAO,CAAC;IAEjC;;;;;;;OAOG;IAEH,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;IAElB;;OAEG;IAEH,UAAU,EAAE,MAAM,CAAe;IAEjC;;;OAGG;IAEH,cAAc,EAAE,MAAM,CAAe;IAErC;;;OAGG;IACH,WAAW;IAIX,MAAM;CAuBP;AAMD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,cAAc,EAAE,UAAU,CAAC;KAC5B;CACF"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { E as h } from "../EdElement.js";
|
|
2
|
+
import { unsafeCSS as c, html as p } from "lit";
|
|
3
|
+
import { property as e } from "lit/decorators.js";
|
|
4
|
+
import "../button/button.js";
|
|
5
|
+
const m = ":root,:host{--size-base-unit: .5rem}*,::slotted(*),*:before,*:after{box-sizing:border-box}h1,h2,h3,h4,h5,h6{margin:0}.ed-c-show-hide__panel{display:none}.ed-c-show-hide.ed-is-active .ed-c-show-hide__panel{margin-top:.5rem;display:block}.ed-c-show-hide.ed-is-active{transition:transform var(--ed-theme-animation-fade-quick) var(--ed-theme-animation-ease);--ed-button-icon-transform: rotate(90deg)}";
|
|
6
|
+
var l = Object.defineProperty, i = (n, s, a, u) => {
|
|
7
|
+
for (var o = void 0, r = n.length - 1, d; r >= 0; r--)
|
|
8
|
+
(d = n[r]) && (o = d(s, a, o) || o);
|
|
9
|
+
return o && l(s, a, o), o;
|
|
10
|
+
};
|
|
11
|
+
class t extends h {
|
|
12
|
+
constructor() {
|
|
13
|
+
super(...arguments), this.buttonVariant = "bare", this.buttonText = "Show More", this.hideButtonText = "Show Less";
|
|
14
|
+
}
|
|
15
|
+
static get styles() {
|
|
16
|
+
return c(m.toString());
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Handle click function
|
|
20
|
+
* 1) Toggle the active state to true/false
|
|
21
|
+
*/
|
|
22
|
+
handleClick() {
|
|
23
|
+
this.isActive = !this.isActive;
|
|
24
|
+
}
|
|
25
|
+
render() {
|
|
26
|
+
const s = this.componentClassNames("ed-c-show-hide", {
|
|
27
|
+
"ed-is-active": this.isActive === !0
|
|
28
|
+
});
|
|
29
|
+
return p`
|
|
30
|
+
<div class="${s}">
|
|
31
|
+
<ed-button
|
|
32
|
+
class="ed-c-show-hide__btn"
|
|
33
|
+
@click=${this.handleClick}
|
|
34
|
+
text=${this.isActive ? this.hideButtonText : this.buttonText}
|
|
35
|
+
size=${this.size}
|
|
36
|
+
variant=${this.buttonVariant}
|
|
37
|
+
iconPosition=${this.iconPosition}
|
|
38
|
+
iconName=${this.iconName}
|
|
39
|
+
aria-expanded=${this.isActive}
|
|
40
|
+
></ed-button>
|
|
41
|
+
<div class="ed-c-show-hide__panel">
|
|
42
|
+
<slot></slot>
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
`;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
i([
|
|
49
|
+
e({ type: Boolean })
|
|
50
|
+
], t.prototype, "isActive");
|
|
51
|
+
i([
|
|
52
|
+
e()
|
|
53
|
+
], t.prototype, "buttonVariant");
|
|
54
|
+
i([
|
|
55
|
+
e()
|
|
56
|
+
], t.prototype, "iconName");
|
|
57
|
+
i([
|
|
58
|
+
e()
|
|
59
|
+
], t.prototype, "iconPosition");
|
|
60
|
+
i([
|
|
61
|
+
e()
|
|
62
|
+
], t.prototype, "size");
|
|
63
|
+
i([
|
|
64
|
+
e()
|
|
65
|
+
], t.prototype, "buttonText");
|
|
66
|
+
i([
|
|
67
|
+
e()
|
|
68
|
+
], t.prototype, "hideButtonText");
|
|
69
|
+
customElements.get("ed-show-hide") === void 0 && customElements.define("ed-show-hide", t);
|
|
70
|
+
export {
|
|
71
|
+
t as EdShowHide
|
|
72
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { EdElement } from '@brad-frost-web/eddie-web-components/components/EdElement';
|
|
2
|
+
/**
|
|
3
|
+
* @slot - The component content
|
|
4
|
+
*/
|
|
5
|
+
export declare class EdShowMore extends EdElement {
|
|
6
|
+
static get styles(): import('lit').CSSResult;
|
|
7
|
+
/**
|
|
8
|
+
* Active state of the show more
|
|
9
|
+
* 1) Reveals hidden information when `true`. Hides when `false`
|
|
10
|
+
*/
|
|
11
|
+
isActive?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Button text
|
|
14
|
+
*/
|
|
15
|
+
buttonText?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Hide button text
|
|
18
|
+
* 1) Used for the button text when the content is expanded
|
|
19
|
+
*/
|
|
20
|
+
hideButtonText?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Handle click function
|
|
23
|
+
* 1) Toggle the active state to true/false
|
|
24
|
+
*/
|
|
25
|
+
handleClick(): void;
|
|
26
|
+
render(): import('lit-html').TemplateResult<1>;
|
|
27
|
+
}
|
|
28
|
+
declare global {
|
|
29
|
+
interface HTMLElementTagNameMap {
|
|
30
|
+
'ed-show-more': EdShowMore;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=show-more.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"show-more.d.ts","sourceRoot":"","sources":["../../../../packages/eddie-web-components/components/show-more/show-more.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,2DAA2D,CAAC;AAGtF,OAAO,kBAAkB,CAAC;AAG1B;;GAEG;AACH,qBAAa,UAAW,SAAQ,SAAS;IACvC,MAAM,KAAK,MAAM,4BAEhB;IAED;;;OAGG;IAEH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IAEH,UAAU,CAAC,EAAE,MAAM,CAAe;IAElC;;;OAGG;IAEH,cAAc,CAAC,EAAE,MAAM,CAAe;IAEtC;;;OAGG;IACH,WAAW;IAIX,MAAM;CA0BP;AAMD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,cAAc,EAAE,UAAU,CAAC;KAC5B;CACF"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { E as m } from "../EdElement.js";
|
|
2
|
+
import { unsafeCSS as a, html as c } from "lit";
|
|
3
|
+
import { property as r } from "lit/decorators.js";
|
|
4
|
+
import "../button/button.js";
|
|
5
|
+
const l = ":root,:host{--size-base-unit: .5rem}*,::slotted(*),*:before,*:after{box-sizing:border-box}h1,h2,h3,h4,h5,h6{margin:0}.ed-c-show-more__panel{padding-bottom:.5rem;margin-bottom:.5rem;border-bottom:1px solid var(--ed-theme-color-border-subtle)}.ed-c-show-more__hidden{display:none}.ed-c-show-more.ed-is-active .ed-c-show-more__hidden{display:block}";
|
|
6
|
+
var p = Object.defineProperty, d = (s, t, n, v) => {
|
|
7
|
+
for (var e = void 0, i = s.length - 1, h; i >= 0; i--)
|
|
8
|
+
(h = s[i]) && (e = h(t, n, e) || e);
|
|
9
|
+
return e && p(t, n, e), e;
|
|
10
|
+
};
|
|
11
|
+
class o extends m {
|
|
12
|
+
constructor() {
|
|
13
|
+
super(...arguments), this.buttonText = "Show More", this.hideButtonText = "Show Less";
|
|
14
|
+
}
|
|
15
|
+
static get styles() {
|
|
16
|
+
return a(l.toString());
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Handle click function
|
|
20
|
+
* 1) Toggle the active state to true/false
|
|
21
|
+
*/
|
|
22
|
+
handleClick() {
|
|
23
|
+
this.isActive = !this.isActive;
|
|
24
|
+
}
|
|
25
|
+
render() {
|
|
26
|
+
const t = this.componentClassNames("ed-c-show-more", {
|
|
27
|
+
"ed-is-active": this.isActive === !0
|
|
28
|
+
});
|
|
29
|
+
return c`
|
|
30
|
+
<div class="${t}">
|
|
31
|
+
<div class="ed-c-show-more__panel">
|
|
32
|
+
<div class="ed-c-show-more__shown">
|
|
33
|
+
<slot name="shown"></slot>
|
|
34
|
+
</div>
|
|
35
|
+
<div class="ed-c-show-more__hidden">
|
|
36
|
+
<slot name="hidden"></slot>
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
<ed-button
|
|
40
|
+
@click=${this.handleClick}
|
|
41
|
+
class="ed-c-show-more__button"
|
|
42
|
+
variant="bare"
|
|
43
|
+
text="${this.isActive ? this.hideButtonText : this.buttonText}"
|
|
44
|
+
iconPosition="after"
|
|
45
|
+
iconName="${this.isActive ? "minus" : "add"}"
|
|
46
|
+
></ed-button>
|
|
47
|
+
</div>
|
|
48
|
+
`;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
d([
|
|
52
|
+
r({ type: Boolean })
|
|
53
|
+
], o.prototype, "isActive");
|
|
54
|
+
d([
|
|
55
|
+
r()
|
|
56
|
+
], o.prototype, "buttonText");
|
|
57
|
+
d([
|
|
58
|
+
r()
|
|
59
|
+
], o.prototype, "hideButtonText");
|
|
60
|
+
customElements.get("ed-show-more") === void 0 && customElements.define("ed-show-more", o);
|
|
61
|
+
export {
|
|
62
|
+
o as EdShowMore
|
|
63
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { EdElement } from '@brad-frost-web/eddie-web-components/components/EdElement';
|
|
2
|
+
/**
|
|
3
|
+
* @slot - The component content
|
|
4
|
+
*/
|
|
5
|
+
export declare class EdSkeleton extends EdElement {
|
|
6
|
+
static get styles(): import('lit').CSSResult;
|
|
7
|
+
/**
|
|
8
|
+
* Style variant
|
|
9
|
+
* <ed-text-passage size="sm">
|
|
10
|
+
* <ul>
|
|
11
|
+
* <li>**sm** renders a skeleton smaller in height than the default</li>
|
|
12
|
+
* <li>**lg** renders a skeleton larger in height than the default</li>
|
|
13
|
+
* <li>**xl** renders a skeleton larger in height than the `lg` variant</li>
|
|
14
|
+
* <li>**xxl** renders a skeleton larger in height than the `xl` variant</li>
|
|
15
|
+
* </ul>
|
|
16
|
+
* </ed-text-passage>
|
|
17
|
+
*/
|
|
18
|
+
size?: 'sm' | 'lg' | 'xl' | 'xxl';
|
|
19
|
+
/**
|
|
20
|
+
* Width property
|
|
21
|
+
* 1) By default, the width is set to 100%. This property overrides the default for customization.
|
|
22
|
+
*/
|
|
23
|
+
width?: string;
|
|
24
|
+
render(): import('lit-html').TemplateResult<1>;
|
|
25
|
+
}
|
|
26
|
+
declare global {
|
|
27
|
+
interface HTMLElementTagNameMap {
|
|
28
|
+
'ed-skeleton': EdSkeleton;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=skeleton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skeleton.d.ts","sourceRoot":"","sources":["../../../../packages/eddie-web-components/components/skeleton/skeleton.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,2DAA2D,CAAC;AAGtF;;GAEG;AACH,qBAAa,UAAW,SAAQ,SAAS;IACvC,MAAM,KAAK,MAAM,4BAEhB;IAED;;;;;;;;;;OAUG;IAEH,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,CAAC;IAElC;;;OAGG;IAEH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,MAAM;CASP;AAMD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,aAAa,EAAE,UAAU,CAAC;KAC3B;CACF"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { unsafeCSS as a, html as m } from "lit";
|
|
2
|
+
import { property as l } from "lit/decorators.js";
|
|
3
|
+
import { E as p } from "../EdElement.js";
|
|
4
|
+
const c = ":root,:host{--size-base-unit: .5rem}*,::slotted(*),*:before,*:after{box-sizing:border-box}h1,h2,h3,h4,h5,h6{margin:0}.ed-c-skeleton{position:relative;padding:1rem;width:100%;background:linear-gradient(-90deg,#f9f9f9,#e1e1e6,#f9f9f9);background-size:400% 400%;animation:pulse 1.25s linear infinite}.ed-c-skeleton--small{padding:.5rem}.ed-c-skeleton--large{padding:2rem 1rem}.ed-c-skeleton--xl{padding:6rem 1rem}.ed-c-skeleton--xxl{padding:12rem 1rem}@keyframes pulse{0%{background-position:0% 0%}to{background-position:-135% 0%}}";
|
|
5
|
+
var f = Object.defineProperty, d = (s, t, i, g) => {
|
|
6
|
+
for (var e = void 0, o = s.length - 1, r; o >= 0; o--)
|
|
7
|
+
(r = s[o]) && (e = r(t, i, e) || e);
|
|
8
|
+
return e && f(t, i, e), e;
|
|
9
|
+
};
|
|
10
|
+
class n extends p {
|
|
11
|
+
static get styles() {
|
|
12
|
+
return a(c.toString());
|
|
13
|
+
}
|
|
14
|
+
render() {
|
|
15
|
+
const t = this.componentClassNames("ed-c-skeleton", {
|
|
16
|
+
"ed-c-skeleton--small": this.size == "sm",
|
|
17
|
+
"ed-c-skeleton--large": this.size == "lg",
|
|
18
|
+
"ed-c-skeleton--xl": this.size == "xl",
|
|
19
|
+
"ed-c-skeleton--xxl": this.size == "xxl"
|
|
20
|
+
});
|
|
21
|
+
return m` <div class="${t}" style="width: ${this.width};"></div> `;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
d([
|
|
25
|
+
l()
|
|
26
|
+
], n.prototype, "size");
|
|
27
|
+
d([
|
|
28
|
+
l()
|
|
29
|
+
], n.prototype, "width");
|
|
30
|
+
customElements.get("ed-skeleton") === void 0 && customElements.define("ed-skeleton", n);
|
|
31
|
+
export {
|
|
32
|
+
n as EdSkeleton
|
|
33
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { TemplateResult } from 'lit';
|
|
2
|
+
import { EdElement } from '@brad-frost-web/eddie-web-components/components/EdElement';
|
|
3
|
+
/**
|
|
4
|
+
* An example element.
|
|
5
|
+
*
|
|
6
|
+
*/
|
|
7
|
+
export declare class EdTab extends EdElement {
|
|
8
|
+
static get styles(): import('lit').CSSResult;
|
|
9
|
+
/**
|
|
10
|
+
* Aria labelledby property
|
|
11
|
+
* 1) Used to connect tab trigger and tab panel for accessibility
|
|
12
|
+
*/
|
|
13
|
+
ariaLabelledBy?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Tab URL
|
|
16
|
+
* 1) Set to the id to connect the tab trigger to the tab panel
|
|
17
|
+
*
|
|
18
|
+
* @required
|
|
19
|
+
*/
|
|
20
|
+
href: string;
|
|
21
|
+
/**
|
|
22
|
+
* Tab ID
|
|
23
|
+
* 1) Used to connect the href of the tab trigger to the panel
|
|
24
|
+
*/
|
|
25
|
+
tabId?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Set tab label property
|
|
28
|
+
*/
|
|
29
|
+
private _label?;
|
|
30
|
+
/**
|
|
31
|
+
* Sets the value of the tab label using the `label` attribute
|
|
32
|
+
*/
|
|
33
|
+
set label(value: TemplateResult | string);
|
|
34
|
+
/**
|
|
35
|
+
* Gets the value of the tab text
|
|
36
|
+
*/
|
|
37
|
+
get label(): TemplateResult | string;
|
|
38
|
+
render(): TemplateResult<1>;
|
|
39
|
+
}
|
|
40
|
+
declare global {
|
|
41
|
+
interface HTMLElementTagNameMap {
|
|
42
|
+
'ed-ta': EdTab;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=tab.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tab.d.ts","sourceRoot":"","sources":["../../../../packages/eddie-web-components/components/tab/tab.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAE1C,OAAO,EAAE,SAAS,EAAE,MAAM,2DAA2D,CAAC;AAGtF;;;GAGG;AACH,qBAAa,KAAM,SAAQ,SAAS;IAClC,MAAM,KAAK,MAAM,4BAEhB;IAED;;;OAGG;IAEH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;;;OAKG;IAEH,IAAI,EAAE,MAAM,CAAC;IAEb;;;OAGG;IAEH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,CAA0B;IAEzC;;OAEG;IACH,IAAI,KAAK,CAAC,KAAK,EAAE,cAAc,GAAG,MAAM,EAEvC;IAED;;OAEG;IACH,IAAI,KAAK,IAPQ,cAAc,GAAG,MAAM,CASvC;IAED,MAAM;CASP;AAMD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,OAAO,EAAE,KAAK,CAAC;KAChB;CACF"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { unsafeCSS as n, html as b } from "lit";
|
|
2
|
+
import { property as l } from "lit/decorators.js";
|
|
3
|
+
import { E as p } from "../EdElement.js";
|
|
4
|
+
const h = ":root,:host{--size-base-unit: .5rem}*,::slotted(*),*:before,*:after{box-sizing:border-box}h1,h2,h3,h4,h5,h6{margin:0}.ed-c-tab{padding:0;display:var(--ed-tab-hidden, block)}";
|
|
5
|
+
var m = Object.defineProperty, o = (a, e, i, f) => {
|
|
6
|
+
for (var t = void 0, s = a.length - 1, d; s >= 0; s--)
|
|
7
|
+
(d = a[s]) && (t = d(e, i, t) || t);
|
|
8
|
+
return t && m(e, i, t), t;
|
|
9
|
+
};
|
|
10
|
+
class r extends p {
|
|
11
|
+
static get styles() {
|
|
12
|
+
return n(h);
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Sets the value of the tab label using the `label` attribute
|
|
16
|
+
*/
|
|
17
|
+
set label(e) {
|
|
18
|
+
this._label = e;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Gets the value of the tab text
|
|
22
|
+
*/
|
|
23
|
+
get label() {
|
|
24
|
+
return this.getAttribute("label") || this._label;
|
|
25
|
+
}
|
|
26
|
+
render() {
|
|
27
|
+
const e = this.componentClassNames("ed-c-tab", {});
|
|
28
|
+
return b`
|
|
29
|
+
<div id=${this.href} class="${e}" role="tabpanel" aria-labelledby=${this.ariaLabelledBy}>
|
|
30
|
+
<slot></slot>
|
|
31
|
+
</div>
|
|
32
|
+
`;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
o([
|
|
36
|
+
l()
|
|
37
|
+
], r.prototype, "ariaLabelledBy");
|
|
38
|
+
o([
|
|
39
|
+
l()
|
|
40
|
+
], r.prototype, "href");
|
|
41
|
+
o([
|
|
42
|
+
l()
|
|
43
|
+
], r.prototype, "tabId");
|
|
44
|
+
customElements.get("ed-tab") === void 0 && customElements.define("ed-tab", r);
|
|
45
|
+
export {
|
|
46
|
+
r as EdTab
|
|
47
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { EdElement } from '@brad-frost-web/eddie-web-components/components/EdElement';
|
|
2
|
+
/**
|
|
3
|
+
* @slot - The table content
|
|
4
|
+
*/
|
|
5
|
+
export declare class EdTable extends EdElement {
|
|
6
|
+
static get styles(): import('lit').CSSResult;
|
|
7
|
+
/**
|
|
8
|
+
* Style variants
|
|
9
|
+
* <ed-text-passage size="sm">
|
|
10
|
+
* <ul>
|
|
11
|
+
* <li>**zebra** renders a table with alternating background colors every other row</li>
|
|
12
|
+
* </ul>
|
|
13
|
+
* </ed-text-passage>
|
|
14
|
+
*/
|
|
15
|
+
variant?: 'zebra';
|
|
16
|
+
/**
|
|
17
|
+
* Hover rows variant
|
|
18
|
+
* 1) If set to true, rows can be hovered over and change color to help readability
|
|
19
|
+
*/
|
|
20
|
+
hoverRows?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Full-width variant
|
|
23
|
+
* 1) Table expands to the full width of its container when set to `true`
|
|
24
|
+
*/
|
|
25
|
+
fullWidth?: boolean;
|
|
26
|
+
render(): import('lit-html').TemplateResult<1>;
|
|
27
|
+
}
|
|
28
|
+
declare global {
|
|
29
|
+
interface HTMLElementTagNameMap {
|
|
30
|
+
'ed-table': EdTable;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=table.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../../../packages/eddie-web-components/components/table/table.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,2DAA2D,CAAC;AAGtF;;GAEG;AACH,qBAAa,OAAQ,SAAQ,SAAS;IACpC,MAAM,KAAK,MAAM,4BAEhB;IAED;;;;;;;OAOG;IAEH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;OAGG;IAEH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;OAGG;IAEH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB,MAAM;CAaP;AAMD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,UAAU,EAAE,OAAO,CAAC;KACrB;CACF"}
|