@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,176 @@
|
|
|
1
|
+
import { E as h } from "../EdElement.js";
|
|
2
|
+
import { unsafeCSS as m, html as l } from "lit";
|
|
3
|
+
import { property as t } from "lit/decorators.js";
|
|
4
|
+
import { ifDefined as a } from "lit-html/directives/if-defined.js";
|
|
5
|
+
import { n as u } from "../index.browser.js";
|
|
6
|
+
import "../button/button.js";
|
|
7
|
+
const p = ":root,:host{--size-base-unit: .5rem}*,::slotted(*),*:before,*:after{box-sizing:border-box}h1,h2,h3,h4,h5,h6{margin:0}.ed-c-counter__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-counter.ed-is-error .ed-c-counter__label{color:var(--ed-theme-color-content-utility-error)}.ed-c-counter.ed-is-success .ed-c-counter__label{color:var(--ed-theme-color-content-utility-success)}.ed-c-counter__body{display:flex;max-width:14rem}.ed-c-counter__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-counter__input:hover{border-color:var(--ed-theme-color-border-brand);background-color:var(--ed-theme-form-color-background-hover)}.ed-c-counter__input:focus:not(:disabled){border-color:var(--ed-theme-form-color-border-focus)}.ed-c-counter__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-counter__input:not(:placeholder-shown):focus:not(:disabled){background-color:var(--ed-theme-color-background-utility-error)}.ed-is-success .ed-c-counter__input:not(:placeholder-shown):focus:not(:disabled){background-color:var(--ed-theme-color-background-utility-success)}.ed-c-counter__input:active:not(:disabled){border-color:var(--ed-theme-form-color-border)}.ed-c-counter__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-counter__input:disabled~.ed-c-text-field__label,.ed-c-counter__input:disabled:hover~.ed-c-text-field__label,.ed-c-counter__input:disabled::placeholder{color:var(--ed-theme-color-content-disabled)}.ed-c-counter__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-counter__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-counter__input::placeholder{color:var(--ed-theme-color-content-utility-error)}.ed-is-error .ed-c-counter__input:hover::placeholder{color:var(--ed-theme-color-content-utility-error-hover)}.ed-is-error .ed-c-counter__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-counter__input:hover,.ed-is-error .ed-c-counter__input:focus{background-color:var(--ed-theme-color-background-utility-error)}.ed-is-error .ed-c-counter__input:not(:focus){color:var(--ed-theme-color-content-default)}.ed-is-success .ed-c-counter__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-counter__input:hover,.ed-is-success .ed-c-counter__input:focus{background-color:var(--ed-theme-color-background-utility-success)}.ed-c-counter__input{width:100%;padding:.5rem;text-align:center}.ed-c-counter__input+.ed-c-counter__button{margin-left:.5rem}.ed-c-counter__button+.ed-c-counter__input{margin-left:.5rem}";
|
|
8
|
+
var b = Object.defineProperty, o = (i, r, d, y) => {
|
|
9
|
+
for (var n = void 0, c = i.length - 1, s; c >= 0; c--)
|
|
10
|
+
(s = i[c]) && (n = s(r, d, n) || n);
|
|
11
|
+
return n && b(r, d, n), n;
|
|
12
|
+
};
|
|
13
|
+
class e extends h {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments), this.label = "Label", this.subtractButtonText = "Subtract 1", this.subtractButtonIconName = "minus", this.addButtonText = "Add 1", this.addButtonIconName = "add", this.required = !1, this.type = "text", this.count = 0;
|
|
16
|
+
}
|
|
17
|
+
static get styles() {
|
|
18
|
+
return m(p.toString());
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Increase
|
|
22
|
+
* 1) Increase the value by 1
|
|
23
|
+
*/
|
|
24
|
+
onIncrease(r) {
|
|
25
|
+
r.preventDefault(), this.count = this.count + 1;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Decrease
|
|
29
|
+
* 1) Decrease the value by 1
|
|
30
|
+
*/
|
|
31
|
+
onDecrease(r) {
|
|
32
|
+
r.preventDefault(), this.count = this.count - 1;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* On change
|
|
36
|
+
* 1) Make the count the value within the input
|
|
37
|
+
*/
|
|
38
|
+
onChange(r) {
|
|
39
|
+
this.count = parseInt(r.target.value.replace(/\D/, ""));
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* On mount/update
|
|
43
|
+
* 1) Autogenerate ids, for attribute, and aria-describedby ids to make this
|
|
44
|
+
* accessible if these properties aren't provided
|
|
45
|
+
*/
|
|
46
|
+
connectedCallback() {
|
|
47
|
+
super.connectedCallback(), console.log(this.count), console.log(this.min), this.fieldId = this.fieldId || u(), this.fieldNote && (this.ariaDescribedBy = this.ariaDescribedBy || u());
|
|
48
|
+
}
|
|
49
|
+
render() {
|
|
50
|
+
const r = this.componentClassNames("ed-c-counter", {
|
|
51
|
+
"ed-c-counter--inverted": this.inverted === !0,
|
|
52
|
+
"ed-is-error": this.isError,
|
|
53
|
+
"ed-is-success": this.isSuccess
|
|
54
|
+
});
|
|
55
|
+
return l`
|
|
56
|
+
<div class="${r}">
|
|
57
|
+
<label class="ed-c-counter__label" for="${this.fieldId}">${this.label}</label>
|
|
58
|
+
<div class="ed-c-counter__body">
|
|
59
|
+
<ed-button
|
|
60
|
+
class="ed-c-counter__button"
|
|
61
|
+
text=${this.subtractButtonText}
|
|
62
|
+
iconPosition="after"
|
|
63
|
+
iconName=${this.subtractButtonIconName}
|
|
64
|
+
?hideText=${!0}
|
|
65
|
+
@click=${(d) => this.onDecrease(d)}
|
|
66
|
+
?disabled=${this.min && this.count === this.min}
|
|
67
|
+
></ed-button>
|
|
68
|
+
<input
|
|
69
|
+
class="ed-c-counter__input"
|
|
70
|
+
type="text"
|
|
71
|
+
min=${a(this.min)}
|
|
72
|
+
max=${a(this.max)}
|
|
73
|
+
id="${this.fieldId}"
|
|
74
|
+
pattern="[0-9]*"
|
|
75
|
+
name="${a(this.name)}"
|
|
76
|
+
.value="${this.count}"
|
|
77
|
+
@change=${(d) => this.onChange(d)}
|
|
78
|
+
?required="${this.required}"
|
|
79
|
+
?disabled="${this.disabled}"
|
|
80
|
+
?readonly=${this.readOnly}
|
|
81
|
+
aria-describedby="${a(this.ariaDescribedBy)}"
|
|
82
|
+
placeholder="${a(this.placeholder)}"
|
|
83
|
+
/>
|
|
84
|
+
<ed-button
|
|
85
|
+
class="ed-c-counter__button"
|
|
86
|
+
text=${this.addButtonText}
|
|
87
|
+
iconPosition="after"
|
|
88
|
+
iconName=${this.addButtonIconName}
|
|
89
|
+
?hideText=${!0}
|
|
90
|
+
@click=${(d) => this.onIncrease(d)}
|
|
91
|
+
?disabled=${this.max && this.count === this.max}
|
|
92
|
+
></ed-button>
|
|
93
|
+
</div>
|
|
94
|
+
${this.fieldNote && l`<ed-field-note
|
|
95
|
+
?inverted=${this.inverted}
|
|
96
|
+
id=${a(this.ariaDescribedBy)}
|
|
97
|
+
iconName=${a(this.iconName)}
|
|
98
|
+
?isSuccess=${this.isSuccess}
|
|
99
|
+
?isError=${this.isError}
|
|
100
|
+
>
|
|
101
|
+
${this.fieldNote}
|
|
102
|
+
</ed-field-note>`}
|
|
103
|
+
</div>
|
|
104
|
+
`;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
o([
|
|
108
|
+
t()
|
|
109
|
+
], e.prototype, "fieldId");
|
|
110
|
+
o([
|
|
111
|
+
t()
|
|
112
|
+
], e.prototype, "label");
|
|
113
|
+
o([
|
|
114
|
+
t()
|
|
115
|
+
], e.prototype, "name");
|
|
116
|
+
o([
|
|
117
|
+
t({ type: Number })
|
|
118
|
+
], e.prototype, "value");
|
|
119
|
+
o([
|
|
120
|
+
t()
|
|
121
|
+
], e.prototype, "fieldNote");
|
|
122
|
+
o([
|
|
123
|
+
t()
|
|
124
|
+
], e.prototype, "subtractButtonText");
|
|
125
|
+
o([
|
|
126
|
+
t()
|
|
127
|
+
], e.prototype, "subtractButtonIconName");
|
|
128
|
+
o([
|
|
129
|
+
t()
|
|
130
|
+
], e.prototype, "addButtonText");
|
|
131
|
+
o([
|
|
132
|
+
t()
|
|
133
|
+
], e.prototype, "addButtonIconName");
|
|
134
|
+
o([
|
|
135
|
+
t({ type: Number })
|
|
136
|
+
], e.prototype, "min");
|
|
137
|
+
o([
|
|
138
|
+
t({ type: Number })
|
|
139
|
+
], e.prototype, "max");
|
|
140
|
+
o([
|
|
141
|
+
t()
|
|
142
|
+
], e.prototype, "ariaDescribedBy");
|
|
143
|
+
o([
|
|
144
|
+
t({ type: Boolean })
|
|
145
|
+
], e.prototype, "required");
|
|
146
|
+
o([
|
|
147
|
+
t({ type: Boolean })
|
|
148
|
+
], e.prototype, "disabled");
|
|
149
|
+
o([
|
|
150
|
+
t({ type: Boolean })
|
|
151
|
+
], e.prototype, "readOnly");
|
|
152
|
+
o([
|
|
153
|
+
t()
|
|
154
|
+
], e.prototype, "type");
|
|
155
|
+
o([
|
|
156
|
+
t({ type: Boolean })
|
|
157
|
+
], e.prototype, "inverted");
|
|
158
|
+
o([
|
|
159
|
+
t()
|
|
160
|
+
], e.prototype, "placeholder");
|
|
161
|
+
o([
|
|
162
|
+
t({ type: Boolean })
|
|
163
|
+
], e.prototype, "isError");
|
|
164
|
+
o([
|
|
165
|
+
t({ type: Boolean })
|
|
166
|
+
], e.prototype, "isSuccess");
|
|
167
|
+
o([
|
|
168
|
+
t()
|
|
169
|
+
], e.prototype, "iconName");
|
|
170
|
+
o([
|
|
171
|
+
t({ type: Number })
|
|
172
|
+
], e.prototype, "count");
|
|
173
|
+
customElements.get("ed-counter") === void 0 && customElements.define("ed-counter", e);
|
|
174
|
+
export {
|
|
175
|
+
e as EdCounter
|
|
176
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { EdElement } from '@brad-frost-web/eddie-web-components/components/EdElement';
|
|
2
|
+
/**
|
|
3
|
+
* @slot - The drawer content
|
|
4
|
+
* @slot header - The header content
|
|
5
|
+
* @slot footer - The footer ocntent
|
|
6
|
+
*/
|
|
7
|
+
export declare class EdDrawer extends EdElement {
|
|
8
|
+
static get styles(): import('lit').CSSResult;
|
|
9
|
+
/**
|
|
10
|
+
* Align variants
|
|
11
|
+
* <ed-text-passage size="sm">
|
|
12
|
+
* <ul>
|
|
13
|
+
* <li>**top** - aligns the drawer to the top of the viewport</li>
|
|
14
|
+
* <li>**right** - aligns the drawer to the right of the viewport</li>
|
|
15
|
+
* <li>**bottom** - aligns the drawer to the bottom of the viewport</li>
|
|
16
|
+
* <li>**left** - aligns the drawer to the left of the viewport</li>
|
|
17
|
+
* </ul>
|
|
18
|
+
* </ed-text-passage>
|
|
19
|
+
*/
|
|
20
|
+
align?: 'top' | 'right' | 'bottom' | 'left';
|
|
21
|
+
/**
|
|
22
|
+
* Fade/ghost back the page background content
|
|
23
|
+
*/
|
|
24
|
+
hasBackdrop?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Active state on the drawer
|
|
27
|
+
*/
|
|
28
|
+
isActive: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Click function
|
|
31
|
+
* 1) Toggles the active state when triggered
|
|
32
|
+
*/
|
|
33
|
+
handleClick(): void;
|
|
34
|
+
render(): import('lit-html').TemplateResult<1>;
|
|
35
|
+
}
|
|
36
|
+
declare global {
|
|
37
|
+
interface HTMLElementTagNameMap {
|
|
38
|
+
'ed-drawer': EdDrawer;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=drawer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drawer.d.ts","sourceRoot":"","sources":["../../../../packages/eddie-web-components/components/drawer/drawer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,2DAA2D,CAAC;AAGtF,OAAO,kBAAkB,CAAC;AAG1B;;;;GAIG;AACH,qBAAa,QAAS,SAAQ,SAAS;IACrC,MAAM,KAAK,MAAM,4BAEhB;IAED;;;;;;;;;;OAUG;IAEH,KAAK,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAW;IAEtD;;OAEG;IAEH,WAAW,CAAC,EAAE,OAAO,CAAS;IAE9B;;OAEG;IAEH,QAAQ,UAAQ;IAEhB;;;OAGG;IACH,WAAW;IAIX,MAAM;CAqCP;AAMD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,WAAW,EAAE,QAAQ,CAAC;KACvB;CACF"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { E as c } from "../EdElement.js";
|
|
2
|
+
import { unsafeCSS as l, html as h } from "lit";
|
|
3
|
+
import { property as s, state as p } from "lit/decorators.js";
|
|
4
|
+
import "../button/button.js";
|
|
5
|
+
const w = '@charset "UTF-8";:root,:host{--size-base-unit: .5rem}*,::slotted(*),*:before,*:after{box-sizing:border-box}h1,h2,h3,h4,h5,h6{margin:0}.ed-c-drawer{position:fixed;inset:0;z-index:var(--z-index-500);width:100vw;height:100vh;pointer-events:none}.ed-c-drawer--backdrop{background:#0003;transition:background .4s ease}.ed-c-drawer--backdrop.ed-c-drawer--inactive{background:none}.ed-c-drawer__panel{position:fixed;display:flex;flex-direction:column;gap:2rem;max-width:var(--ed-drawer-max-width, 24rem);padding:1rem;background:var(--ed-theme-color-background-default);box-shadow:0 2px 10px -3px #999;pointer-events:auto;transition:all .4s ease}.ed-c-drawer--horizontal .ed-c-drawer__panel{max-width:none;width:100%;padding-right:4rem}@media all and (min-width:48rem){.ed-c-drawer--horizontal .ed-c-drawer__panel{flex-direction:row}}.ed-c-drawer--top .ed-c-drawer__panel{top:0;left:0}.ed-c-drawer--top.ed-c-drawer--inactive .ed-c-drawer__panel{transform:translateY(-110%)}.ed-c-drawer--right .ed-c-drawer__panel{top:0;right:0;height:100vh}.ed-c-drawer--right.ed-c-drawer--inactive .ed-c-drawer__panel{transform:translate(110%)}.ed-c-drawer--bottom .ed-c-drawer__panel{bottom:0;left:0}.ed-c-drawer--bottom.ed-c-drawer--inactive .ed-c-drawer__panel{transform:translateY(110%)}.ed-c-drawer--left .ed-c-drawer__panel{left:0;top:0;height:100vh}.ed-c-drawer--left.ed-c-drawer--inactive .ed-c-drawer__panel{transform:translate(-110%)}.ed-c-drawer__close-button{position:relative;top:.375rem;padding-left:1rem;margin-left:auto}.ed-c-drawer__header{display:flex}.ed-c-drawer__body{flex:1}.ed-c-drawer__footer{display:flex;align-items:center}';
|
|
6
|
+
var m = Object.defineProperty, i = (a, r, o, _) => {
|
|
7
|
+
for (var e = void 0, d = a.length - 1, n; d >= 0; d--)
|
|
8
|
+
(n = a[d]) && (e = n(r, o, e) || e);
|
|
9
|
+
return e && m(r, o, e), e;
|
|
10
|
+
};
|
|
11
|
+
class t extends c {
|
|
12
|
+
constructor() {
|
|
13
|
+
super(...arguments), this.align = "right", this.hasBackdrop = !1, this.isActive = !0;
|
|
14
|
+
}
|
|
15
|
+
static get styles() {
|
|
16
|
+
return l(w);
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Click function
|
|
20
|
+
* 1) Toggles the active state when triggered
|
|
21
|
+
*/
|
|
22
|
+
handleClick() {
|
|
23
|
+
this.isActive = !this.isActive;
|
|
24
|
+
}
|
|
25
|
+
render() {
|
|
26
|
+
const r = this.componentClassNames("ed-c-drawer", {
|
|
27
|
+
"ed-c-drawer--top": this.align === "top",
|
|
28
|
+
"ed-c-drawer--right": this.align === "right",
|
|
29
|
+
"ed-c-drawer--bottom": this.align === "bottom",
|
|
30
|
+
"ed-c-drawer--left": this.align === "left",
|
|
31
|
+
"ed-c-drawer--horizontal": this.align === "bottom" || this.align === "top",
|
|
32
|
+
"ed-c-drawer--backdrop": this.hasBackdrop,
|
|
33
|
+
"ed-c-drawer--inactive": !this.isActive
|
|
34
|
+
});
|
|
35
|
+
return h`
|
|
36
|
+
<section class="${r}" role="dialog">
|
|
37
|
+
<div class="ed-c-drawer__panel">
|
|
38
|
+
<div class="ed-c-drawer__header">
|
|
39
|
+
<slot name="header"></slot>
|
|
40
|
+
<ed-button
|
|
41
|
+
variant="bare"
|
|
42
|
+
iconName="close"
|
|
43
|
+
iconPosition="after"
|
|
44
|
+
?hideText=${!0}
|
|
45
|
+
text="Close"
|
|
46
|
+
size="lg"
|
|
47
|
+
class="ed-c-drawer__close-button"
|
|
48
|
+
@click=${this.handleClick}
|
|
49
|
+
></ed-button>
|
|
50
|
+
</div>
|
|
51
|
+
<div class="ed-c-drawer__body">
|
|
52
|
+
<slot></slot>
|
|
53
|
+
</div>
|
|
54
|
+
<div class="ed-c-drawer__footer">
|
|
55
|
+
<slot name="footer"></slot>
|
|
56
|
+
</div>
|
|
57
|
+
</div>
|
|
58
|
+
</section>
|
|
59
|
+
`;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
i([
|
|
63
|
+
s()
|
|
64
|
+
], t.prototype, "align");
|
|
65
|
+
i([
|
|
66
|
+
s()
|
|
67
|
+
], t.prototype, "hasBackdrop");
|
|
68
|
+
i([
|
|
69
|
+
p()
|
|
70
|
+
], t.prototype, "isActive");
|
|
71
|
+
customElements.get("ed-drawer") === void 0 && customElements.define("ed-drawer", t);
|
|
72
|
+
export {
|
|
73
|
+
t as EdDrawer
|
|
74
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { EdElement } from '@brad-frost-web/eddie-web-components/components/EdElement';
|
|
2
|
+
/**
|
|
3
|
+
* @slot - The component content
|
|
4
|
+
*/
|
|
5
|
+
export declare class EdFeature extends EdElement {
|
|
6
|
+
static get styles(): import('lit').CSSResult;
|
|
7
|
+
/**
|
|
8
|
+
* Image source
|
|
9
|
+
*/
|
|
10
|
+
imgSrc?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Image alt text
|
|
13
|
+
*/
|
|
14
|
+
imgAlt?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Inverted variant
|
|
17
|
+
* 1) Used for dark backgrounds
|
|
18
|
+
*/
|
|
19
|
+
inverted?: boolean;
|
|
20
|
+
render(): import('lit-html').TemplateResult<1>;
|
|
21
|
+
}
|
|
22
|
+
declare global {
|
|
23
|
+
interface HTMLElementTagNameMap {
|
|
24
|
+
'ed-feature': EdFeature;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=feature.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feature.d.ts","sourceRoot":"","sources":["../../../../packages/eddie-web-components/components/feature/feature.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,2DAA2D,CAAC;AAGtF;;GAEG;AACH,qBAAa,SAAU,SAAQ,SAAS;IACtC,MAAM,KAAK,MAAM,4BAEhB;IAED;;OAEG;IAEH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IAEH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IAEH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,MAAM;CAkBP;AAMD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,YAAY,EAAE,SAAS,CAAC;KACzB;CACF"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { unsafeCSS as n, html as l } from "lit";
|
|
2
|
+
import { property as o } from "lit/decorators.js";
|
|
3
|
+
import { E as c } from "../EdElement.js";
|
|
4
|
+
const f = '@charset "UTF-8";:root,:host{--size-base-unit: .5rem}*,::slotted(*),*:before,*:after{box-sizing:border-box}h1,h2,h3,h4,h5,h6{margin:0}.ed-c-feature{display:flex;flex-direction:column;align-items:stretch;color:var(--ed-theme-color-content-default);border-radius:var(--ed-theme-border-radius-md)}@media all and (min-width:48rem){.ed-c-feature{flex-direction:row}}.ed-c-feature--inverted{color:var(--ed-theme-color-content-knockout)}.ed-c-feature__body{margin-bottom:2rem}@media all and (min-width:48rem){.ed-c-feature__body{display:flex;flex-direction:column;flex:1;padding-right:2rem;margin-bottom:0}}.ed-c-feature__media{width:100%}@media all and (min-width:48rem){.ed-c-feature__media{width:45%}}.ed-c-feature__image{display:block;width:100%}';
|
|
5
|
+
var u = Object.defineProperty, a = (d, t, s, h) => {
|
|
6
|
+
for (var e = void 0, i = d.length - 1, m; i >= 0; i--)
|
|
7
|
+
(m = d[i]) && (e = m(t, s, e) || e);
|
|
8
|
+
return e && u(t, s, e), e;
|
|
9
|
+
};
|
|
10
|
+
class r extends c {
|
|
11
|
+
static get styles() {
|
|
12
|
+
return n(f.toString());
|
|
13
|
+
}
|
|
14
|
+
render() {
|
|
15
|
+
const t = this.componentClassNames("ed-c-feature", {
|
|
16
|
+
"ed-c-feature--inverted": this.inverted === !0
|
|
17
|
+
});
|
|
18
|
+
return l`
|
|
19
|
+
<div class="${t}">
|
|
20
|
+
<div class="ed-c-feature__body">
|
|
21
|
+
<slot></slot>
|
|
22
|
+
</div>
|
|
23
|
+
${this.imgAlt ? l`<div class="ed-c-feature__media">
|
|
24
|
+
<img class="ed-c-feature__image" src=${this.imgSrc} alt=${this.imgAlt} />
|
|
25
|
+
</div>` : ""}
|
|
26
|
+
</div>
|
|
27
|
+
`;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
a([
|
|
31
|
+
o()
|
|
32
|
+
], r.prototype, "imgSrc");
|
|
33
|
+
a([
|
|
34
|
+
o()
|
|
35
|
+
], r.prototype, "imgAlt");
|
|
36
|
+
a([
|
|
37
|
+
o({ type: Boolean })
|
|
38
|
+
], r.prototype, "inverted");
|
|
39
|
+
customElements.get("ed-feature") === void 0 && customElements.define("ed-feature", r);
|
|
40
|
+
export {
|
|
41
|
+
r as EdFeature
|
|
42
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { EdElement } from '@brad-frost-web/eddie-web-components/components/EdElement';
|
|
2
|
+
/**
|
|
3
|
+
* @slot - The note content
|
|
4
|
+
*/
|
|
5
|
+
export declare class EdFieldNote extends EdElement {
|
|
6
|
+
static get styles(): import('lit').CSSResult;
|
|
7
|
+
/**
|
|
8
|
+
* Error state
|
|
9
|
+
* 1) Changes the component's treatment to represent an error
|
|
10
|
+
*/
|
|
11
|
+
isError?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Success state
|
|
14
|
+
* 1) Changes the component's treatment to represent a success
|
|
15
|
+
*/
|
|
16
|
+
isSuccess?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Icon name
|
|
19
|
+
*/
|
|
20
|
+
iconName?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Inverted variant
|
|
23
|
+
* 1) Used for dark backgrounds
|
|
24
|
+
*/
|
|
25
|
+
inverted?: boolean;
|
|
26
|
+
render(): import('lit-html').TemplateResult<1>;
|
|
27
|
+
}
|
|
28
|
+
declare global {
|
|
29
|
+
interface HTMLElementTagNameMap {
|
|
30
|
+
'ed-field-note': EdFieldNote;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=field-note.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"field-note.d.ts","sourceRoot":"","sources":["../../../../packages/eddie-web-components/components/field-note/field-note.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,2DAA2D,CAAC;AAGtF,OAAO,cAAc,CAAC;AAGtB;;GAEG;AACH,qBAAa,WAAY,SAAQ,SAAS;IACxC,MAAM,KAAK,MAAM,4BAEhB;IAED;;;OAGG;IAEH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;OAGG;IAEH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;OAEG;IAEH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;OAGG;IAEH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,MAAM;CAcP;AAMD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,eAAe,EAAE,WAAW,CAAC;KAC9B;CACF"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { E as m } from "../EdElement.js";
|
|
2
|
+
import { unsafeCSS as c, html as l } from "lit";
|
|
3
|
+
import { property as r } from "lit/decorators.js";
|
|
4
|
+
import "../icon/icon.js";
|
|
5
|
+
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-field-note{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);display:flex;color:var(--ed-theme-color-content-subtle);margin-top:.5rem}.ed-c-field-note.ed-is-error{color:var(--ed-theme-color-content-utility-error)}.ed-c-field-note.ed-is-success{color:var(--ed-theme-color-content-utility-success)}.ed-c-field-note--inverted{color:var(--ed-theme-color-content-knockout)}ed-icon{margin-right:.25rem}";
|
|
6
|
+
var p = Object.defineProperty, s = (i, o, d, y) => {
|
|
7
|
+
for (var e = void 0, n = i.length - 1, a; n >= 0; n--)
|
|
8
|
+
(a = i[n]) && (e = a(o, d, e) || e);
|
|
9
|
+
return e && p(o, d, e), e;
|
|
10
|
+
};
|
|
11
|
+
class t extends m {
|
|
12
|
+
static get styles() {
|
|
13
|
+
return c(h);
|
|
14
|
+
}
|
|
15
|
+
render() {
|
|
16
|
+
const o = this.componentClassNames("ed-c-field-note", {
|
|
17
|
+
"ed-is-error": this.isError,
|
|
18
|
+
"ed-is-success": this.isSuccess,
|
|
19
|
+
"ed-c-field-note--inverted": this.inverted === !0
|
|
20
|
+
});
|
|
21
|
+
return l`
|
|
22
|
+
<div class="${o}">
|
|
23
|
+
${this.iconName && l`<ed-icon name="${this.iconName}"></ed-icon>`}
|
|
24
|
+
<slot></slot>
|
|
25
|
+
</div>
|
|
26
|
+
`;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
s([
|
|
30
|
+
r({ type: Boolean })
|
|
31
|
+
], t.prototype, "isError");
|
|
32
|
+
s([
|
|
33
|
+
r({ type: Boolean })
|
|
34
|
+
], t.prototype, "isSuccess");
|
|
35
|
+
s([
|
|
36
|
+
r()
|
|
37
|
+
], t.prototype, "iconName");
|
|
38
|
+
s([
|
|
39
|
+
r({ type: Boolean })
|
|
40
|
+
], t.prototype, "inverted");
|
|
41
|
+
customElements.get("ed-field-note") === void 0 && customElements.define("ed-field-note", t);
|
|
42
|
+
export {
|
|
43
|
+
t as EdFieldNote
|
|
44
|
+
};
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { EdFormElement } from '@brad-frost-web/eddie-web-components/components/EdFormElement';
|
|
2
|
+
import { FileUploadTextConfig, FileUploadProgressStream, filesStateConfig } from './file-upload.model';
|
|
3
|
+
/**
|
|
4
|
+
* @slot - The component content
|
|
5
|
+
*/
|
|
6
|
+
export declare class EdFileUpload extends EdFormElement {
|
|
7
|
+
readonly type = "file-upload";
|
|
8
|
+
static get styles(): import('lit').CSSResult;
|
|
9
|
+
/**
|
|
10
|
+
* The unique id of the field
|
|
11
|
+
*/
|
|
12
|
+
fieldId: string;
|
|
13
|
+
/**
|
|
14
|
+
* The form field's label
|
|
15
|
+
*/
|
|
16
|
+
label: string;
|
|
17
|
+
/**
|
|
18
|
+
* Checkbox name attribute property
|
|
19
|
+
*/
|
|
20
|
+
name: string;
|
|
21
|
+
/**
|
|
22
|
+
* Fieldnote text
|
|
23
|
+
*/
|
|
24
|
+
fieldNote: string;
|
|
25
|
+
/**
|
|
26
|
+
* Errornote text
|
|
27
|
+
*/
|
|
28
|
+
errorNote: string;
|
|
29
|
+
/**
|
|
30
|
+
* Aria describedby
|
|
31
|
+
* 1) Used to connect the field note in select field to the select menu for accessibility
|
|
32
|
+
*/
|
|
33
|
+
ariaDescribedBy: string;
|
|
34
|
+
/**
|
|
35
|
+
* Required attribute
|
|
36
|
+
*/
|
|
37
|
+
required: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Disabled attribute
|
|
40
|
+
*/
|
|
41
|
+
disabled: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Placeholder text
|
|
44
|
+
*/
|
|
45
|
+
placeholder: string;
|
|
46
|
+
/**
|
|
47
|
+
* To set FieldNote to Error State
|
|
48
|
+
*/
|
|
49
|
+
isError: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Files state
|
|
52
|
+
*/
|
|
53
|
+
filesState: filesStateConfig[];
|
|
54
|
+
/**
|
|
55
|
+
* Success state
|
|
56
|
+
*/
|
|
57
|
+
isSuccess: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Hide label
|
|
60
|
+
*/
|
|
61
|
+
hideLabel: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* Getter and setter methods for textConfig
|
|
64
|
+
* TextConfig is a JSON structure used to configure the text messages for file upload
|
|
65
|
+
* fileFormatErrorText - Text to be displayed when the file uploaded is not as per supported format,
|
|
66
|
+
* fileSizeErrorText - Text to be displayed when the file size exceeds,
|
|
67
|
+
* uploadingText - Text to be displayed when the file is getting uploaded,
|
|
68
|
+
* dragandDropText - Text to be displayed on drag and drop state,
|
|
69
|
+
* deleteIconName - Icon name for the delete button,
|
|
70
|
+
* tableFileText - Text to be displayed for the first column heading of preview table,
|
|
71
|
+
* tableStatusText - Text to be displayed for the second column heading of preview table
|
|
72
|
+
*/
|
|
73
|
+
textConfig: FileUploadTextConfig;
|
|
74
|
+
/**
|
|
75
|
+
* Getter and setter methods for files to upload from the application
|
|
76
|
+
* TextConfig is a JSON structure used to set the status for the files
|
|
77
|
+
*/
|
|
78
|
+
uploadFiles: FileUploadProgressStream[];
|
|
79
|
+
/**
|
|
80
|
+
* Getter and Setter for uploading time
|
|
81
|
+
*/
|
|
82
|
+
uploadingtime: number;
|
|
83
|
+
/**
|
|
84
|
+
* Getter and Setter for file size Validation
|
|
85
|
+
*/
|
|
86
|
+
fileSizeLimit: number;
|
|
87
|
+
/**
|
|
88
|
+
* Getter and Setter for file type Validation
|
|
89
|
+
*/
|
|
90
|
+
accept: string;
|
|
91
|
+
/**
|
|
92
|
+
* Multiple attribute
|
|
93
|
+
* 1) Allow multiple files to be added to the file upload
|
|
94
|
+
*/
|
|
95
|
+
multiple: boolean;
|
|
96
|
+
/**
|
|
97
|
+
* Dragging state
|
|
98
|
+
*/
|
|
99
|
+
isDragging: boolean;
|
|
100
|
+
field: HTMLInputElement;
|
|
101
|
+
private validFileMimeType;
|
|
102
|
+
constructor();
|
|
103
|
+
connectedCallback(): void;
|
|
104
|
+
updated(changedProperties: Map<string, unknown>): void;
|
|
105
|
+
getFileSizeBasedOnOS(fileSize: number): number;
|
|
106
|
+
handleOnDragOver(e: DragEvent): void;
|
|
107
|
+
handleOnDragEnd(e: DragEvent): void;
|
|
108
|
+
updateFilesState(): void;
|
|
109
|
+
handleOnFileRemove(fieldId: string): void;
|
|
110
|
+
private handleOnFileInputChange;
|
|
111
|
+
render(): import('lit-html').TemplateResult<1>;
|
|
112
|
+
}
|
|
113
|
+
declare global {
|
|
114
|
+
interface HTMLElementTagNameMap {
|
|
115
|
+
'ed-file-upload': EdFileUpload;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
//# sourceMappingURL=file-upload.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-upload.d.ts","sourceRoot":"","sources":["../../../../packages/eddie-web-components/components/file-upload/file-upload.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,+DAA+D,CAAC;AAO9F,OAAO,kBAAkB,CAAC;AAC1B,OAAO,0BAA0B,CAAC;AAClC,OAAO,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAI5G;;GAEG;AACH,qBAAa,YAAa,SAAQ,aAAa;IAC7C,QAAQ,CAAC,IAAI,iBAAiB;IAE9B,MAAM,KAAK,MAAM,4BAEhB;IAED;;OAEG;IAEH,OAAO,EAAE,MAAM,CAAM;IAErB;;OAEG;IAEH,KAAK,EAAE,MAAM,CAAM;IAEnB;;OAEG;IAEH,IAAI,EAAE,MAAM,CAAM;IAElB;;OAEG;IAEH,SAAS,EAAE,MAAM,CAAM;IAEvB;;OAEG;IAEH,SAAS,EAAE,MAAM,CAAM;IAEvB;;;OAGG;IAEH,eAAe,EAAE,MAAM,CAAM;IAE7B;;OAEG;IAEH,QAAQ,UAAS;IAEjB;;OAEG;IAEH,QAAQ,EAAE,OAAO,CAAS;IAE1B;;OAEG;IAEH,WAAW,EAAE,MAAM,CAAM;IAEzB;;OAEG;IAEH,OAAO,EAAE,OAAO,CAAS;IAEzB;;OAEG;IAEH,UAAU,EAAE,gBAAgB,EAAE,CAAM;IAEpC;;OAEG;IAEH,SAAS,EAAE,OAAO,CAAS;IAE3B;;OAEG;IAEH,SAAS,EAAE,OAAO,CAAS;IAE3B;;;;;;;;;;OAUG;IAGH,UAAU,EAAE,oBAAoB,CAO9B;IAEF;;;OAGG;IAEH,WAAW,EAAE,wBAAwB,EAAE,CAAM;IAE7C;;OAEG;IAGH,aAAa,EAAE,MAAM,CAAQ;IAE7B;;OAEG;IAGH,aAAa,EAAE,MAAM,CAAM;IAE3B;;OAEG;IAGH,MAAM,EAAE,MAAM,CAAM;IAEpB;;;OAGG;IAEH,QAAQ,EAAE,OAAO,CAAS;IAE1B;;OAEG;IAEH,UAAU,EAAE,OAAO,CAAS;IAG5B,KAAK,EAAG,gBAAgB,CAAC;IAEzB,OAAO,CAAC,iBAAiB,CAAgB;;IAMzC,iBAAiB;IAQjB,OAAO,CAAC,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC;IAkB/C,oBAAoB,CAAC,QAAQ,EAAE,MAAM;IAQrC,gBAAgB,CAAC,CAAC,EAAE,SAAS;IAO7B,eAAe,CAAC,CAAC,EAAE,SAAS;IAO5B,gBAAgB;IAIhB,kBAAkB,CAAC,OAAO,EAAE,MAAM;IAYlC,OAAO,CAAC,uBAAuB;IA+D/B,MAAM;CAoEP;AAMD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,gBAAgB,EAAE,YAAY,CAAC;KAChC;CACF"}
|