@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,61 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
export interface EdElementProps {
|
|
3
|
+
styleModifier?: string;
|
|
4
|
+
}
|
|
5
|
+
export interface DetailObj {
|
|
6
|
+
[key: string]: unknown;
|
|
7
|
+
}
|
|
8
|
+
export interface EdDispatchProps {
|
|
9
|
+
e?: Event;
|
|
10
|
+
eventName: string;
|
|
11
|
+
detailObj?: DetailObj;
|
|
12
|
+
optionsObj?: {
|
|
13
|
+
[key: string]: unknown;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
export interface EdEvent extends Event {
|
|
17
|
+
detail: {
|
|
18
|
+
originalEvent: Event;
|
|
19
|
+
detailObj: DetailObj;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* A base element.
|
|
24
|
+
*/
|
|
25
|
+
export declare class EdElement extends LitElement {
|
|
26
|
+
/**
|
|
27
|
+
* Append to the class name. Used for passing in utility classes
|
|
28
|
+
*/
|
|
29
|
+
styleModifier?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Abstraction of `classnames` that automatically includes any style modifier
|
|
32
|
+
* as well as any set variants.
|
|
33
|
+
*
|
|
34
|
+
* It is expected that `variant` would be overridden in a subclass with more
|
|
35
|
+
* specific types, `@property() variant?: 'foo' | 'bar'`
|
|
36
|
+
*
|
|
37
|
+
* @param baseClassName
|
|
38
|
+
*/
|
|
39
|
+
componentClassNames(baseClassName: string, additionalClassNames?: {}): string;
|
|
40
|
+
/**
|
|
41
|
+
* Check if a slot is empty
|
|
42
|
+
*
|
|
43
|
+
* @param slotName
|
|
44
|
+
*/
|
|
45
|
+
slotEmpty(slotName: string): boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Check if a slot is not empty
|
|
48
|
+
*
|
|
49
|
+
* @param slotName
|
|
50
|
+
*/
|
|
51
|
+
slotNotEmpty(slotName: string): boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Dispatch a custom event.
|
|
54
|
+
*/
|
|
55
|
+
dispatch({ e, eventName, detailObj, optionsObj }: EdDispatchProps): CustomEvent;
|
|
56
|
+
/**
|
|
57
|
+
* Example render, should not be used
|
|
58
|
+
*/
|
|
59
|
+
render(): import('lit-html').TemplateResult<1>;
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=EdElement.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EdElement.d.ts","sourceRoot":"","sources":["../../../packages/eddie-web-components/components/EdElement.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,UAAU,EAAO,MAAM,KAAK,CAAC;AAGrC,MAAM,WAAW,cAAc;IAC7B,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,SAAS;IACxB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,eAAe;IAC9B,CAAC,CAAC,EAAE,KAAK,CAAC;IACV,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,UAAU,CAAC,EAAE;QAAC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAC,CAAC;CACvC;AAED,MAAM,WAAW,OAAQ,SAAQ,KAAK;IACpC,MAAM,EAAE;QACN,aAAa,EAAE,KAAK,CAAC;QACrB,SAAS,EAAE,SAAS,CAAC;KACtB,CAAC;CACH;AAED;;GAEG;AACH,qBAAa,SAAU,SAAQ,UAAU;IACvC;;OAEG;IAEH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;;;;;;;OAQG;IACH,mBAAmB,CAAC,aAAa,EAAE,MAAM,EAAE,oBAAoB,KAAK;IAIpE;;;;OAIG;IACH,SAAS,CAAC,QAAQ,EAAE,MAAM;IAI1B;;;;OAIG;IACH,YAAY,CAAC,QAAQ,EAAE,MAAM;IAQ7B;;OAEG;IACH,QAAQ,CAAC,EAAC,CAAC,EAAE,SAAS,EAAE,SAAc,EAAE,UAAe,EAAC,EAAE,eAAe,GAAG,WAAW;IAYvF;;OAEG;IACH,MAAM;CAGP"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import i from "classnames";
|
|
2
|
+
import { LitElement as p, html as m } from "lit";
|
|
3
|
+
import { property as a } from "lit/decorators.js";
|
|
4
|
+
var u = Object.defineProperty, d = (n, t, r, l) => {
|
|
5
|
+
for (var e = void 0, s = n.length - 1, o; s >= 0; s--)
|
|
6
|
+
(o = n[s]) && (e = o(t, r, e) || e);
|
|
7
|
+
return e && u(t, r, e), e;
|
|
8
|
+
};
|
|
9
|
+
class f extends p {
|
|
10
|
+
/**
|
|
11
|
+
* Abstraction of `classnames` that automatically includes any style modifier
|
|
12
|
+
* as well as any set variants.
|
|
13
|
+
*
|
|
14
|
+
* It is expected that `variant` would be overridden in a subclass with more
|
|
15
|
+
* specific types, `@property() variant?: 'foo' | 'bar'`
|
|
16
|
+
*
|
|
17
|
+
* @param baseClassName
|
|
18
|
+
*/
|
|
19
|
+
componentClassNames(t, r = {}) {
|
|
20
|
+
return i(t, r);
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Check if a slot is empty
|
|
24
|
+
*
|
|
25
|
+
* @param slotName
|
|
26
|
+
*/
|
|
27
|
+
slotEmpty(t) {
|
|
28
|
+
return !this.querySelector(`[slot="${t}"]`);
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Check if a slot is not empty
|
|
32
|
+
*
|
|
33
|
+
* @param slotName
|
|
34
|
+
*/
|
|
35
|
+
slotNotEmpty(t) {
|
|
36
|
+
if (!this.slotEmpty(t))
|
|
37
|
+
return !this.slotEmpty(t);
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Dispatch a custom event.
|
|
41
|
+
*/
|
|
42
|
+
dispatch({ e: t, eventName: r, detailObj: l = {}, optionsObj: e = {} }) {
|
|
43
|
+
const s = {
|
|
44
|
+
bubbles: !0,
|
|
45
|
+
composed: !0,
|
|
46
|
+
...e,
|
|
47
|
+
detail: { ...t && { originalEvent: t }, ...l }
|
|
48
|
+
}, o = new CustomEvent(r, s);
|
|
49
|
+
return this.dispatchEvent(o), o;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Example render, should not be used
|
|
53
|
+
*/
|
|
54
|
+
render() {
|
|
55
|
+
return m`<slot></slot>`;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
d([
|
|
59
|
+
a()
|
|
60
|
+
], f.prototype, "styleModifier");
|
|
61
|
+
export {
|
|
62
|
+
f as E
|
|
63
|
+
};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { EdElement } from './EdElement';
|
|
2
|
+
export interface EdElementInternals extends ElementInternals {
|
|
3
|
+
formResetCallback: () => void;
|
|
4
|
+
ariaRole: string;
|
|
5
|
+
form: any;
|
|
6
|
+
setFormValue: any;
|
|
7
|
+
}
|
|
8
|
+
export declare abstract class EdFormElement extends EdElement {
|
|
9
|
+
/**
|
|
10
|
+
* @internal
|
|
11
|
+
*
|
|
12
|
+
* Tells the browser to treat the element like a form field.
|
|
13
|
+
* Ties the element to the HTML form it is in.
|
|
14
|
+
*
|
|
15
|
+
*/
|
|
16
|
+
static formAssociated: boolean;
|
|
17
|
+
abstract type: string;
|
|
18
|
+
/**
|
|
19
|
+
* @internal
|
|
20
|
+
*
|
|
21
|
+
* An instance of element internals.
|
|
22
|
+
* Contains properties and methods that allows the element
|
|
23
|
+
* to participate fully in the HTML form it's in.
|
|
24
|
+
*/
|
|
25
|
+
internals: EdElementInternals;
|
|
26
|
+
/**
|
|
27
|
+
* @internal
|
|
28
|
+
*
|
|
29
|
+
* Stores the value for the `value` getter and setter.
|
|
30
|
+
*/
|
|
31
|
+
internalValue: string;
|
|
32
|
+
/**
|
|
33
|
+
* @internal
|
|
34
|
+
*
|
|
35
|
+
* Stores the intial value of the field so that it can be reset
|
|
36
|
+
*/
|
|
37
|
+
protected defaultValue: string | boolean;
|
|
38
|
+
/**
|
|
39
|
+
* @internal
|
|
40
|
+
* The underlying HTML form field.
|
|
41
|
+
* This should be implemented with `@query`
|
|
42
|
+
* in the implementing class.
|
|
43
|
+
*/
|
|
44
|
+
abstract field: HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement | HTMLButtonElement;
|
|
45
|
+
/**
|
|
46
|
+
* The value of the form field.
|
|
47
|
+
*/
|
|
48
|
+
get value(): string;
|
|
49
|
+
/**
|
|
50
|
+
* Sets the value of the form field.
|
|
51
|
+
* 1. Stores the new value so it can be retrieved by the getter.
|
|
52
|
+
* 2. Sets the current value of the control.
|
|
53
|
+
* 3. Updates the actual field.
|
|
54
|
+
* 4. Rerenders the component.
|
|
55
|
+
*/
|
|
56
|
+
set value(newValue: string);
|
|
57
|
+
/**
|
|
58
|
+
* update the actual field's value
|
|
59
|
+
*/
|
|
60
|
+
protected updateField(): void;
|
|
61
|
+
protected firstUpdated(): void;
|
|
62
|
+
formResetCallback(): void;
|
|
63
|
+
constructor();
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=EdFormElement.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EdFormElement.d.ts","sourceRoot":"","sources":["../../../packages/eddie-web-components/components/EdFormElement.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AAEtC,MAAM,WAAW,kBAAmB,SAAQ,gBAAgB;IAC1D,iBAAiB,EAAE,MAAM,IAAI,CAAC;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,GAAG,CAAC;IACV,YAAY,EAAE,GAAG,CAAC;CACnB;AAED,8BAAsB,aAAc,SAAQ,SAAS;IACnD;;;;;;OAMG;IACH,MAAM,CAAC,cAAc,UAAQ;IAE7B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB;;;;;;OAMG;IACH,SAAS,EAAE,kBAAkB,CAAC;IAE9B;;;;OAIG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;;;OAIG;IACH,SAAS,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC;IAEzC;;;;;OAKG;IACH,QAAQ,CAAC,KAAK,EAAE,gBAAgB,GAAG,iBAAiB,GAAG,mBAAmB,GAAG,iBAAiB,CAAC;IAC/F;;OAEG;IACH,IACI,KAAK,WAER;IAED;;;;;;OAMG;IACH,IAAI,KAAK,CAAC,QAAQ,QAAA,EAYjB;IAED;;OAEG;IACH,SAAS,CAAC,WAAW;IAKrB,SAAS,CAAC,YAAY;IAOtB,iBAAiB;;CASlB"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { property as h } from "lit/decorators.js";
|
|
2
|
+
import { E as d } from "./EdElement.js";
|
|
3
|
+
var p = Object.defineProperty, o = Object.getOwnPropertyDescriptor, n = (r, t, i, f) => {
|
|
4
|
+
for (var e = o(t, i), s = r.length - 1, u; s >= 0; s--)
|
|
5
|
+
(u = r[s]) && (e = u(t, i, e) || e);
|
|
6
|
+
return e && p(t, i, e), e;
|
|
7
|
+
};
|
|
8
|
+
const l = class l extends d {
|
|
9
|
+
get value() {
|
|
10
|
+
return this.internalValue;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Sets the value of the form field.
|
|
14
|
+
* 1. Stores the new value so it can be retrieved by the getter.
|
|
15
|
+
* 2. Sets the current value of the control.
|
|
16
|
+
* 3. Updates the actual field.
|
|
17
|
+
* 4. Rerenders the component.
|
|
18
|
+
*/
|
|
19
|
+
set value(t) {
|
|
20
|
+
const i = this.value;
|
|
21
|
+
this.internalValue = t, this.type !== "checkbox" && this.type !== "radio" && this.internals.setFormValue(t), this.updateField(), this.requestUpdate("value", i);
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* update the actual field's value
|
|
25
|
+
*/
|
|
26
|
+
updateField() {
|
|
27
|
+
this.field && (this.value == null ? this.field.value = "" : this.field.value = this.value);
|
|
28
|
+
}
|
|
29
|
+
firstUpdated() {
|
|
30
|
+
this.type !== "checkbox" && this.type !== "radio" && (this.defaultValue = this.value || this.getAttribute("value") || null), this.updateField();
|
|
31
|
+
}
|
|
32
|
+
formResetCallback() {
|
|
33
|
+
this.value = this.defaultValue, this.updateField();
|
|
34
|
+
}
|
|
35
|
+
constructor() {
|
|
36
|
+
super(), this.internals = this.attachInternals();
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
l.formAssociated = !0;
|
|
40
|
+
let a = l;
|
|
41
|
+
n([
|
|
42
|
+
h()
|
|
43
|
+
], a.prototype, "value");
|
|
44
|
+
export {
|
|
45
|
+
a as E
|
|
46
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { EdElement } from '@brad-frost-web/eddie-web-components/components/EdElement';
|
|
2
|
+
/**
|
|
3
|
+
* @slot - The component content
|
|
4
|
+
*/
|
|
5
|
+
export declare class EdAccordion extends EdElement {
|
|
6
|
+
static get styles(): import('lit').CSSResult;
|
|
7
|
+
/**
|
|
8
|
+
* Inverted variant
|
|
9
|
+
* 1) Used for dark backgrounds
|
|
10
|
+
*/
|
|
11
|
+
inverted?: boolean;
|
|
12
|
+
render(): import('lit-html').TemplateResult<1>;
|
|
13
|
+
}
|
|
14
|
+
declare global {
|
|
15
|
+
interface HTMLElementTagNameMap {
|
|
16
|
+
'ed-accordion': EdAccordion;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=accordion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accordion.d.ts","sourceRoot":"","sources":["../../../../packages/eddie-web-components/components/accordion/accordion.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,2DAA2D,CAAC;AAGtF;;GAEG;AAEH,qBAAa,WAAY,SAAQ,SAAS;IACxC,MAAM,KAAK,MAAM,4BAEhB;IAED;;;OAGG;IAEH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,MAAM;CAWP;AAMD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,cAAc,EAAE,WAAW,CAAC;KAC7B;CACF"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { unsafeCSS as d, html as i } from "lit";
|
|
2
|
+
import { property as a } from "lit/decorators.js";
|
|
3
|
+
import { E as l } from "../EdElement.js";
|
|
4
|
+
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-accordion--inverted{color:var(--ed-theme-color-content-knockout);--ed-accordion-panel-button-hover-text-color: var(--ed-theme-color-content-subtle)}";
|
|
5
|
+
var h = Object.defineProperty, p = (t, o, n, f) => {
|
|
6
|
+
for (var e = void 0, r = t.length - 1, s; r >= 0; r--)
|
|
7
|
+
(s = t[r]) && (e = s(o, n, e) || e);
|
|
8
|
+
return e && h(o, n, e), e;
|
|
9
|
+
};
|
|
10
|
+
class c extends l {
|
|
11
|
+
static get styles() {
|
|
12
|
+
return d(m.toString());
|
|
13
|
+
}
|
|
14
|
+
render() {
|
|
15
|
+
const o = this.componentClassNames("ed-c-accordion", {
|
|
16
|
+
"ed-c-accordion--inverted": this.inverted === !0
|
|
17
|
+
});
|
|
18
|
+
return i`
|
|
19
|
+
<dl class="${o}">
|
|
20
|
+
<slot></slot>
|
|
21
|
+
</dl>
|
|
22
|
+
`;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
p([
|
|
26
|
+
a({ type: Boolean })
|
|
27
|
+
], c.prototype, "inverted");
|
|
28
|
+
customElements.get("ed-accordion") === void 0 && customElements.define("ed-accordion", c);
|
|
29
|
+
export {
|
|
30
|
+
c as EdAccordion
|
|
31
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { EdElement } from '@brad-frost-web/eddie-web-components/components/EdElement';
|
|
2
|
+
/**
|
|
3
|
+
* @slot - The component content
|
|
4
|
+
*/
|
|
5
|
+
export declare class EdAccordionPanel extends EdElement {
|
|
6
|
+
static get styles(): import('lit').CSSResult;
|
|
7
|
+
/**
|
|
8
|
+
* is Active
|
|
9
|
+
* 1) Panel is open when set to true. Close when set to false
|
|
10
|
+
*/
|
|
11
|
+
isActive?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* FullyOpen property
|
|
14
|
+
* 1) When true: panel = fully open
|
|
15
|
+
*/
|
|
16
|
+
fullyOpen?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Aria labelled by attribute
|
|
19
|
+
*/
|
|
20
|
+
ariaLabelledBy?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Height property
|
|
23
|
+
*/
|
|
24
|
+
height?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Initialize functions
|
|
27
|
+
*/
|
|
28
|
+
constructor();
|
|
29
|
+
/**
|
|
30
|
+
* Initialize/Update
|
|
31
|
+
* 1) Set panel height on load. Active state should set panel height to content within panel
|
|
32
|
+
*/
|
|
33
|
+
connectedCallback(): void;
|
|
34
|
+
/**
|
|
35
|
+
* Set panel height
|
|
36
|
+
* 1) If isActive is true and fullyOpen is false or this fullyOpen is true and isActive is false, set the height to the accordion
|
|
37
|
+
* panel body scroll height
|
|
38
|
+
* 2) If isActive and fullyOpen are true, set the height to auto
|
|
39
|
+
* 3) If isActive and fullyOpen are false, set the height to 0
|
|
40
|
+
*/
|
|
41
|
+
setPanelHeight(): Promise<void>;
|
|
42
|
+
/**
|
|
43
|
+
* Set panel height
|
|
44
|
+
* 1) If isActive is true and fullyOpen is false or this fullyOpen is true and isActive is false, set the height to the accordion
|
|
45
|
+
* panel body scroll height
|
|
46
|
+
* 2) If isActive and fullyOpen are true, set the height to auto
|
|
47
|
+
* 3) If isActive and fullyOpen are false, set the height to 0
|
|
48
|
+
*/
|
|
49
|
+
togglePanel(): void;
|
|
50
|
+
render(): import('lit-html').TemplateResult<1>;
|
|
51
|
+
}
|
|
52
|
+
declare global {
|
|
53
|
+
interface HTMLElementTagNameMap {
|
|
54
|
+
'ed-accordion-panel': EdAccordionPanel;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=accordion-panel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accordion-panel.d.ts","sourceRoot":"","sources":["../../../../packages/eddie-web-components/components/accordion-panel/accordion-panel.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,MAAM,2DAA2D,CAAC;AAEtF,OAAO,cAAc,CAAC;AAEtB;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,SAAS;IAC7C,MAAM,KAAK,MAAM,4BAEhB;IAED;;;OAGG;IAEH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;OAGG;IAEH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;OAEG;IAEH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;OAEG;IAEH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;;IAOH;;;OAGG;IACH,iBAAiB;IAejB;;;;;;OAMG;IACG,cAAc;IAYpB;;;;;;OAMG;IACH,WAAW;IAoBX,MAAM;CA2BP;AAMD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,oBAAoB,EAAE,gBAAgB,CAAC;KACxC;CACF"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { unsafeCSS as c, html as h } from "lit";
|
|
2
|
+
import { property as o } from "lit/decorators.js";
|
|
3
|
+
import { n as l } from "../index.browser.js";
|
|
4
|
+
import { E as p } from "../EdElement.js";
|
|
5
|
+
import "../icon/icon.js";
|
|
6
|
+
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-accordion-panel{border-bottom:var(--ed-theme-border-width-sm) solid var(--ed-theme-color-border-subtle)}.ed-c-accordion-panel__button{display:flex;align-items:center;appearance:none;background:none;border:none;padding:1rem 0;width:100%;cursor:pointer;color:inherit;overflow-x:hidden;transition:color var(--ed-theme-animation-fade-quick) var(--ed-theme-animation-ease)}.ed-c-accordion-panel__button:hover,.ed-c-accordion-panel__button:focus{color:var(--ed-accordion-panel-button-hover-text-color, var(--ed-theme-color-content-default-hover))}ed-icon{margin-left:auto;transition:transform var(--ed-theme-animation-fade-quick) var(--ed-theme-animation-ease)}.ed-c-accordion-panel.ed-is-active ed-icon{transform:rotate(-180deg)}.ed-c-accordion-panel__body{margin:0;padding:0;overflow:hidden;visibility:hidden;transition:height var(--ed-theme-animation-fade-quick) var(--ed-theme-animation-ease),visibility var(--ed-theme-animation-fade-quick) var(--ed-theme-animation-ease)}.ed-c-accordion-panel.ed-is-active .ed-c-accordion-panel__body{visibility:visible}.ed-c-accordion-panel__body-inner{padding-bottom:1rem;padding-top:1rem}.ed-c-accordion--condensed .ed-c-accordion-panel__body-inner{padding-top:.5rem;padding-bottom:.5rem}";
|
|
7
|
+
var b = Object.defineProperty, a = (n, i, s, u) => {
|
|
8
|
+
for (var e = void 0, d = n.length - 1, r; d >= 0; d--)
|
|
9
|
+
(r = n[d]) && (e = r(i, s, e) || e);
|
|
10
|
+
return e && b(i, s, e), e;
|
|
11
|
+
};
|
|
12
|
+
class t extends p {
|
|
13
|
+
static get styles() {
|
|
14
|
+
return c(m.toString());
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Initialize functions
|
|
18
|
+
*/
|
|
19
|
+
constructor() {
|
|
20
|
+
super(), this.togglePanel = this.togglePanel.bind(this), this.setPanelHeight = this.setPanelHeight.bind(this);
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Initialize/Update
|
|
24
|
+
* 1) Set panel height on load. Active state should set panel height to content within panel
|
|
25
|
+
*/
|
|
26
|
+
connectedCallback() {
|
|
27
|
+
super.connectedCallback(), this.id = this.id || l(), this.ariaLabelledBy = this.ariaLabelledBy || l(), this.setPanelHeight(), this.isActive && (this.fullyOpen = !0, this.setPanelHeight());
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Set panel height
|
|
31
|
+
* 1) If isActive is true and fullyOpen is false or this fullyOpen is true and isActive is false, set the height to the accordion
|
|
32
|
+
* panel body scroll height
|
|
33
|
+
* 2) If isActive and fullyOpen are true, set the height to auto
|
|
34
|
+
* 3) If isActive and fullyOpen are false, set the height to 0
|
|
35
|
+
*/
|
|
36
|
+
async setPanelHeight() {
|
|
37
|
+
await this.updateComplete, this.isActive && !this.fullyOpen || !this.isActive && this.fullyOpen ? this.height = this.shadowRoot.querySelector(".ed-c-accordion-panel__body-inner").scrollHeight + "px" : this.isActive && this.fullyOpen ? this.height = "auto" : !this.isActive && !this.fullyOpen && (this.height = "0");
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Set panel height
|
|
41
|
+
* 1) If isActive is true and fullyOpen is false or this fullyOpen is true and isActive is false, set the height to the accordion
|
|
42
|
+
* panel body scroll height
|
|
43
|
+
* 2) If isActive and fullyOpen are true, set the height to auto
|
|
44
|
+
* 3) If isActive and fullyOpen are false, set the height to 0
|
|
45
|
+
*/
|
|
46
|
+
togglePanel() {
|
|
47
|
+
this.isActive = !this.isActive, this.isActive ? (this.setPanelHeight(), setTimeout(() => {
|
|
48
|
+
this.fullyOpen = !0, this.setPanelHeight();
|
|
49
|
+
}, 150)) : (this.setPanelHeight(), setTimeout(() => {
|
|
50
|
+
this.fullyOpen = !1, this.setPanelHeight();
|
|
51
|
+
}, 50));
|
|
52
|
+
}
|
|
53
|
+
render() {
|
|
54
|
+
const i = this.componentClassNames("ed-c-accordion-panel", {
|
|
55
|
+
"ed-is-active": this.isActive === !0
|
|
56
|
+
});
|
|
57
|
+
return h`
|
|
58
|
+
<div class="${i}">
|
|
59
|
+
<dt class="ed-c-accordion-panel__header">
|
|
60
|
+
<button
|
|
61
|
+
class="ed-c-accordion-panel__button"
|
|
62
|
+
aria-expanded="${!!this.isActive}"
|
|
63
|
+
id="${this.ariaLabelledBy}"
|
|
64
|
+
aria-controls="${this.id}"
|
|
65
|
+
@click=${this.togglePanel}
|
|
66
|
+
>
|
|
67
|
+
<slot name="header"></slot>
|
|
68
|
+
<ed-icon name="keyboard-arrow-down"></ed-icon>
|
|
69
|
+
</button>
|
|
70
|
+
</dt>
|
|
71
|
+
<dd class="ed-c-accordion-panel__body" aria-labelledby="${this.ariaLabelledBy}" id="${this.id}" style=${"height: " + this.height}>
|
|
72
|
+
<div class="ed-c-accordion-panel__body-inner" #bodyInner>
|
|
73
|
+
<slot></slot>
|
|
74
|
+
</div>
|
|
75
|
+
</dd>
|
|
76
|
+
</div>
|
|
77
|
+
`;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
a([
|
|
81
|
+
o({ type: Boolean })
|
|
82
|
+
], t.prototype, "isActive");
|
|
83
|
+
a([
|
|
84
|
+
o({ type: Boolean })
|
|
85
|
+
], t.prototype, "fullyOpen");
|
|
86
|
+
a([
|
|
87
|
+
o()
|
|
88
|
+
], t.prototype, "ariaLabelledBy");
|
|
89
|
+
a([
|
|
90
|
+
o()
|
|
91
|
+
], t.prototype, "height");
|
|
92
|
+
customElements.get("ed-accordion-panel") === void 0 && customElements.define("ed-accordion-panel", t);
|
|
93
|
+
export {
|
|
94
|
+
t as EdAccordionPanel
|
|
95
|
+
};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { EdElement } from '@brad-frost-web/eddie-web-components/components/EdElement';
|
|
2
|
+
/**
|
|
3
|
+
* @slot - The component content
|
|
4
|
+
*/
|
|
5
|
+
export declare class EdAlert extends EdElement {
|
|
6
|
+
static get styles(): import('lit').CSSResult;
|
|
7
|
+
/**
|
|
8
|
+
* Icon name used for the icon next to the text
|
|
9
|
+
*/
|
|
10
|
+
iconName?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Heading variant
|
|
13
|
+
* <ed-text-passage size="sm">
|
|
14
|
+
* <ul>
|
|
15
|
+
* <li>**headline-lg** renders a heading with the heading headline-lg preset treatment</li>
|
|
16
|
+
* <li>**headline** renders a heading with the heading headline preset treatment</li>
|
|
17
|
+
* <li>**headline-sm** renders a heading with the heading headline-sm preset treatment</li>
|
|
18
|
+
* <li>**title-lg** renders a heading with the heading title-lg preset treatment</li>
|
|
19
|
+
* <li>**title** renders a heading with the heading title preset treatment</li>
|
|
20
|
+
* <li>**title-sm** renders a heading with the heading title-sm preset treatment</li>
|
|
21
|
+
* </ul>
|
|
22
|
+
* </ed-text-passage>
|
|
23
|
+
*/
|
|
24
|
+
headingVariant?: 'headline-lg' | 'headline' | 'headline-sm' | 'title-lg' | 'title' | 'title-sm';
|
|
25
|
+
/**
|
|
26
|
+
* Dynamic tag name for the component
|
|
27
|
+
* 1) This is needed to use proper semantic heading treatments depending on where the banner lives on the page
|
|
28
|
+
* <ed-text-passage size="sm">
|
|
29
|
+
* <ul>
|
|
30
|
+
* <li>**h1** renders an `h1` tag</li>
|
|
31
|
+
* <li>**h2** renders an `h2` tag. This is the default</li>
|
|
32
|
+
* <li>**h3** renders an `h3` tag</li>
|
|
33
|
+
* <li>**h4** renders an `h4` tag</li>
|
|
34
|
+
* <li>**h5** renders an `h5` tag</li>
|
|
35
|
+
* <li>**h6** renders an `h6` tag</li>
|
|
36
|
+
* </ul>
|
|
37
|
+
* </ed-text-passage>
|
|
38
|
+
*/
|
|
39
|
+
tagName: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
40
|
+
/**
|
|
41
|
+
* Text for the banner heading
|
|
42
|
+
*/
|
|
43
|
+
heading?: string;
|
|
44
|
+
/**
|
|
45
|
+
* Dismissed property
|
|
46
|
+
* 1) State that changes to true and is removed when the banner is dismissed
|
|
47
|
+
*/
|
|
48
|
+
dismissed?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Style variants
|
|
51
|
+
<ed-text-passage size="sm">
|
|
52
|
+
* <ul>
|
|
53
|
+
* <li>**success** renders a banner that represents a success state</li>
|
|
54
|
+
* <li>**warning** renders a banner that represents and warning state</li>
|
|
55
|
+
* <li>**error** renders a banner that represents and error state</li>
|
|
56
|
+
* </ul>
|
|
57
|
+
* </ed-text-passage>
|
|
58
|
+
*/
|
|
59
|
+
variant?: 'success' | 'error' | 'warning';
|
|
60
|
+
/**
|
|
61
|
+
* On banner dismiss
|
|
62
|
+
* 1) Function that toggles dismissed to true and removes the banner from the UI
|
|
63
|
+
*/
|
|
64
|
+
onDismiss(): void;
|
|
65
|
+
render(): import('lit-html').TemplateResult<1>;
|
|
66
|
+
}
|
|
67
|
+
declare global {
|
|
68
|
+
interface HTMLElementTagNameMap {
|
|
69
|
+
'ed-alert': EdAlert;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
//# sourceMappingURL=alert.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../../../packages/eddie-web-components/components/alert/alert.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,2DAA2D,CAAC;AAGtF,OAAO,kBAAkB,CAAC;AAC1B,OAAO,oBAAoB,CAAC;AAC5B,OAAO,cAAc,CAAC;AAGtB;;GAEG;AACH,qBAAa,OAAQ,SAAQ,SAAS;IACpC,MAAM,KAAK,MAAM,4BAEhB;IAED;;OAEG;IAEH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;;;;;;;;;;OAYG;IAEH,cAAc,CAAC,EAAE,aAAa,GAAG,UAAU,GAAG,aAAa,GAAG,UAAU,GAAG,OAAO,GAAG,UAAU,CAAc;IAE7G;;;;;;;;;;;;;OAaG;IAEH,OAAO,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAQ;IAExD;;OAEG;IAEH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IAEH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;;;;;;;OASG;IAEH,OAAO,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;IAE1C;;;OAGG;IACH,SAAS;IAIT,MAAM;CAgCP;AAMD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,UAAU,EAAE,OAAO,CAAC;KACrB;CACF"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { E as c } from "../EdElement.js";
|
|
2
|
+
import { unsafeCSS as m, html as s } from "lit";
|
|
3
|
+
import { property as r } from "lit/decorators.js";
|
|
4
|
+
import "../button/button.js";
|
|
5
|
+
import "../heading/heading.js";
|
|
6
|
+
import "../icon/icon.js";
|
|
7
|
+
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-alert{position:relative;padding:1rem;background:var(--ed-theme-color-content-knockout);border-radius:var(--ed-theme-border-radius-md);border-top:var(--ed-theme-border-width-sm) solid var(--ed-theme-color-border-subtle);border-right:var(--ed-theme-border-width-sm) solid var(--ed-theme-color-border-subtle);border-bottom:var(--ed-theme-border-width-sm) solid var(--ed-theme-color-border-subtle);border-left:var(--ed-theme-border-width-xl) solid var(--ed-theme-color-border-utility-info)}.ed-c-alert__inner{display:flex;align-items:flex-start}.ed-c-alert--success{border-left-color:var(--ed-theme-color-border-utility-success)}.ed-c-alert--warning{border-left-color:var(--ed-theme-color-border-utility-warning)}.ed-c-alert--error{border-left-color:var(--ed-theme-color-border-utility-error)}ed-icon{position:relative;top:.375rem;margin-right:1rem;--ed-icon-fill: var(--ed-theme-color-content-utility-info);--ed-icon-width: 1.25rem ;--ed-icon-height: 1.25rem }.ed-c-alert--warning ed-icon{--ed-icon-fill: var(--ed-theme-color-content-utility-warning)}.ed-c-alert--error ed-icon{--ed-icon-fill: var(--ed-theme-color-content-utility-error)}.ed-c-alert--success ed-icon{--ed-icon-fill: var(--ed-theme-color-content-utility-success)}.ed-c-alert__body{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);flex:1}.ed-c-alert__description{display:block;margin-top:.5rem}.ed-c-alert__close-btn{position:relative;bottom:.25rem;margin-left:1.5rem}";
|
|
8
|
+
var p = Object.defineProperty, o = (a, i, l, g) => {
|
|
9
|
+
for (var t = void 0, d = a.length - 1, n; d >= 0; d--)
|
|
10
|
+
(n = a[d]) && (t = n(i, l, t) || t);
|
|
11
|
+
return t && p(i, l, t), t;
|
|
12
|
+
};
|
|
13
|
+
class e extends c {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments), this.headingVariant = "title-sm", this.tagName = "h2";
|
|
16
|
+
}
|
|
17
|
+
static get styles() {
|
|
18
|
+
return m(h.toString());
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* On banner dismiss
|
|
22
|
+
* 1) Function that toggles dismissed to true and removes the banner from the UI
|
|
23
|
+
*/
|
|
24
|
+
onDismiss() {
|
|
25
|
+
this.dismissed = !0;
|
|
26
|
+
}
|
|
27
|
+
render() {
|
|
28
|
+
const i = this.componentClassNames("ed-c-alert", {
|
|
29
|
+
"ed-c-alert--success": this.variant === "success",
|
|
30
|
+
"ed-c-alert--error": this.variant === "error",
|
|
31
|
+
"ed-c-alert--warning": this.variant === "warning"
|
|
32
|
+
});
|
|
33
|
+
return this.dismissed ? null : s`
|
|
34
|
+
<div class="${i}">
|
|
35
|
+
<div class="ed-c-alert__inner">
|
|
36
|
+
${this.iconName && s`<ed-icon name=${this.iconName} class="ed-c-alert__icon"></ed-icon>`}
|
|
37
|
+
<div class="ed-c-alert__body">
|
|
38
|
+
${this.heading && s`<ed-heading class="ed-c-alert__title" tagName=${this.tagName} variant="${this.headingVariant}">${this.heading}</ed-heading>`}
|
|
39
|
+
<ed-text-passage class="ed-c-alert__description">
|
|
40
|
+
<slot></slot>
|
|
41
|
+
</ed-text-passage>
|
|
42
|
+
</div>
|
|
43
|
+
<ed-button
|
|
44
|
+
class="ed-c-alert__close-btn"
|
|
45
|
+
variant="bare"
|
|
46
|
+
size="lg"
|
|
47
|
+
iconName="close"
|
|
48
|
+
iconPosition="after"
|
|
49
|
+
@click=${this.onDismiss}
|
|
50
|
+
></ed-button>
|
|
51
|
+
</div>
|
|
52
|
+
</div>
|
|
53
|
+
`;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
o([
|
|
57
|
+
r()
|
|
58
|
+
], e.prototype, "iconName");
|
|
59
|
+
o([
|
|
60
|
+
r()
|
|
61
|
+
], e.prototype, "headingVariant");
|
|
62
|
+
o([
|
|
63
|
+
r()
|
|
64
|
+
], e.prototype, "tagName");
|
|
65
|
+
o([
|
|
66
|
+
r()
|
|
67
|
+
], e.prototype, "heading");
|
|
68
|
+
o([
|
|
69
|
+
r({ type: Boolean })
|
|
70
|
+
], e.prototype, "dismissed");
|
|
71
|
+
o([
|
|
72
|
+
r()
|
|
73
|
+
], e.prototype, "variant");
|
|
74
|
+
customElements.get("ed-alert") === void 0 && customElements.define("ed-alert", e);
|
|
75
|
+
export {
|
|
76
|
+
e as EdAlert
|
|
77
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { EdElement } from '@brad-frost-web/eddie-web-components/components/EdElement';
|
|
2
|
+
/**
|
|
3
|
+
* @slot - The component content
|
|
4
|
+
*/
|
|
5
|
+
export declare class EdBadge extends EdElement {
|
|
6
|
+
static get styles(): import('lit').CSSResult;
|
|
7
|
+
/**
|
|
8
|
+
* The badge text
|
|
9
|
+
*/
|
|
10
|
+
text?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Size variant
|
|
13
|
+
* <ed-text-passage size="sm">
|
|
14
|
+
* <ul>
|
|
15
|
+
* <li>**success** renders a badge with success state treatment</li>
|
|
16
|
+
* <li>**warning** renders a badge with warning state treatment</li>
|
|
17
|
+
* <li>**error** renders a badge with error state treatment</li>
|
|
18
|
+
* </ul>
|
|
19
|
+
* </ed-text-passage>
|
|
20
|
+
*/
|
|
21
|
+
variant?: 'success' | 'warning' | 'error';
|
|
22
|
+
render(): import('lit-html').TemplateResult<1>;
|
|
23
|
+
}
|
|
24
|
+
declare global {
|
|
25
|
+
interface HTMLElementTagNameMap {
|
|
26
|
+
'ed-badge': EdBadge;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=badge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../../../packages/eddie-web-components/components/badge/badge.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,MAAM,2DAA2D,CAAC;AAGtF;;GAEG;AACH,qBAAa,OAAQ,SAAQ,SAAS;IACpC,MAAM,KAAK,MAAM,4BAEhB;IAED;;OAEG;IAEH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;;;;;;;OASG;IAEH,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;IAE1C,MAAM;CASP;AAMD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,UAAU,EAAE,OAAO,CAAC;KACrB;CACF"}
|