@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,224 @@
|
|
|
1
|
+
import { E as w } from "../EdFormElement.js";
|
|
2
|
+
import { unsafeCSS as z, nothing as _, html as f } from "lit";
|
|
3
|
+
import { property as l, state as v, query as F } from "lit/decorators.js";
|
|
4
|
+
import { ifDefined as h } from "lit/directives/if-defined.js";
|
|
5
|
+
import { n as y } from "../index.browser.js";
|
|
6
|
+
import "../button/button.js";
|
|
7
|
+
import "../field-note/field-note.js";
|
|
8
|
+
import "../icon/icon.js";
|
|
9
|
+
import { defaultTextConfig as n } from "../file-upload.model/file-upload.model.js";
|
|
10
|
+
const O = ":root,:host{--size-base-unit: .5rem}*,::slotted(*),*:before,*:after{box-sizing:border-box}h1,h2,h3,h4,h5,h6{margin:0}.ed-c-file-upload__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-file-upload.ed-is-error .ed-c-file-upload__label{color:var(--ed-theme-color-content-utility-error)}.ed-c-file-upload.ed-is-success .ed-c-file-upload__label{color:var(--ed-theme-color-content-utility-success)}.ed-c-file-upload--hidden-label .ed-c-file-upload__label{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ed-is-dragging .ed-c-file-upload__body{background:var(--ed-theme-color-background-disabled);position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:calc(var(--size-base-unit) * 3);text-align:center;border:var(--ed-theme-border-width-sm) dashed var(--ed-theme-color-border-default)}.ed-c-file-upload__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);position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:1rem;text-align:center;border:var(--ed-theme-border-width-sm) dashed var(--ed-theme-color-border-default)}.ed-c-file-upload--button .ed-c-file-upload__body{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);color:var(--ed-theme-color-content-knockout);background-color:var(--ed-color-neutral-70);height:var(--ed-line-height-40);border:var(--ed-theme-border-width-sm) solid var(--ed-color-neutral-70);border-radius:var(--ed-theme-border-radius-md)}.ed-c-file-upload--disabled{cursor:not-allowed;color:var(--ed-theme-color-content-disabled);pointer-events:none}.ed-c-file-upload--disabled .ed-c-file-upload__list,.ed-c-file-upload--disabled .ed-c-file-upload__list .ed-c-file-upload__status--failed,.ed-c-file-upload--disabled .ed-c-file-upload__list .ed-c-file-upload__status--success{color:var(--ed-theme-color-content-disabled)}.ed-c-file-upload--disabled .ed-c-file-upload__list .ed-c-file-upload__close-button{--ed-icon-fill: var(--ed-theme-color-button-content-disabled)}.ed-c-file-upload--disabled .ed-c-file-upload__body,.ed-c-file-upload--disabled .ed-c-file-upload__input{cursor:not-allowed}.ed-c-file-upload__body slot{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;align-items:center}ed-loading-indicator{display:block;margin-inline-end:.5rem}.ed-c-file-upload__icon{--ed-icon-height: 1.25rem ;--ed-icon-width: 1.25rem }.ed-c-file-upload__input{position:absolute;inset-block-start:0;inset-inline-start:0;width:100%;height:100%;cursor:pointer;border:none;z-index:2;opacity:0}.ed-c-file-upload__list{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);list-style:none;margin:.5rem 0 0;padding:0}.ed-c-file-upload__item{display:flex;align-items:center;padding:.25rem .5rem .25rem .25rem;justify-content:space-between;border-block-end:var(--ed-theme-border-width-sm) solid var(--ed-theme-color-border-subtle)}.ed-c-file-upload__item:last-child{margin-block-end:0}.ed-c-file-upload__item ed-heading{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);--ed-font-size-16: var(--ed-font-size-14);margin-block-end:.25rem}h3.ed-c-file-upload__item-first{padding-inline-start:.5rem}.ed-c-file-upload__item-first,.ed-c-file-upload__item-second{display:flex;align-items:center;width:50%}.ed-c-file-upload__item-first__title,.ed-c-file-upload__item-second__title{display:flex;align-items:center;width:50%;font-size:var(--ed-font-size-14);font-weight:var(--ed-font-weight-semibold);line-height:var(--ed-line-height-20);color:var(--ed-color-neutral-100)}.ed-c-file-upload__list-small-table{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);list-style:none;margin:.5rem 0 0;padding:0}.ed-c-file-upload__list-small-table .ed-c-file-upload__item-small-table{display:flex;align-items:center;padding:.25rem .5rem .25rem .25rem;width:260px;justify-content:space-between;border-block-end:var(--ed-theme-border-width-sm) solid var(--ed-theme-color-border-subtle)}.ed-c-file-upload__list-small-table .ed-c-file-upload__item-small-table .ed-c-file-upload__small-table .ed-c-file-upload__name-container{display:flex;align-items:center}.ed-c-file-upload__list-small-table .ed-c-file-upload__item-small-table .ed-c-file-upload__small-table .ed-c-file-upload__name-container .ed-c-file-upload__item-text{margin-block-start:3px}.ed-c-file-upload__list-small-table .ed-c-file-upload__item-small-table .ed-c-file-upload__item-second{margin-block-start:8px;width:unset}.ed-c-file-upload__list-small-table .ed-c-file-upload__item-small-table .ed-c-file-upload__item-second .ed-c-file-upload__status-text{margin-inline-start:3px}.ed-c-file-upload__list-small-table .ed-c-file-upload__close-button{margin:9px 0 2px 50px}.ed-c-file-upload__item-text{word-break:break-all}.ed-c-file-upload__status{width:100%;display:flex;align-items:center;justify-content:flex-start}.ed-c-file-upload__status ed-icon,.ed-c-file-upload__status .ed-icon{--ed-icon-height: 1.25rem ;--ed-icon-width: 1.25rem ;margin-inline-end:.5rem}@media all and (max-width:48rem){.ed-c-file-upload__status ed-icon,.ed-c-file-upload__status .ed-icon{margin-block-start:3px}}.ed-c-file-upload__status--success{color:var(--ed-theme-color-content-utility-success)}.ed-c-file-upload__status--failed{color:var(--ed-theme-color-content-utility-error)}.ed-c-file-upload__icon{--ed-icon-width: 1.5rem ;--ed-icon-height: 1.5rem ;height:var(--ed-icon-height);width:var(--ed-icon-width);margin-inline-end:.5rem}.ed-c-file-upload__close-button{--ed-icon-fill: var(--ed-color-utility-red);margin-inline-start:.5rem}.ed-c-file-upload__file-list-heading{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)}";
|
|
11
|
+
var $ = Object.defineProperty, t = (m, i, o, r) => {
|
|
12
|
+
for (var a = void 0, s = m.length - 1, d; s >= 0; s--)
|
|
13
|
+
(d = m[s]) && (a = d(i, o, a) || a);
|
|
14
|
+
return a && $(i, o, a), a;
|
|
15
|
+
};
|
|
16
|
+
class e extends w {
|
|
17
|
+
constructor() {
|
|
18
|
+
super(), this.type = "file-upload", this.fieldId = "", this.label = "", this.name = "", this.fieldNote = "", this.errorNote = "", this.ariaDescribedBy = "", this.required = !1, this.disabled = !1, this.placeholder = "", this.isError = !1, this.filesState = [], this.isSuccess = !1, this.hideLabel = !1, this.textConfig = {
|
|
19
|
+
fileFormatErrorText: n.fileFormatErrorText,
|
|
20
|
+
fileSizeErrorText: n.fileSizeErrorText,
|
|
21
|
+
uploadingText: n.uploadingText,
|
|
22
|
+
dragandDropText: n.dragandDropText,
|
|
23
|
+
deleteIconName: n.deleteIconName,
|
|
24
|
+
tableFileText: n.tableFileText
|
|
25
|
+
}, this.uploadFiles = [], this.uploadingtime = 1e3, this.fileSizeLimit = 75, this.accept = "", this.multiple = !1, this.isDragging = !1, this.validFileMimeType = [];
|
|
26
|
+
}
|
|
27
|
+
static get styles() {
|
|
28
|
+
return z(O);
|
|
29
|
+
}
|
|
30
|
+
connectedCallback() {
|
|
31
|
+
super.connectedCallback(), this.fieldId = this.fieldId || y(), this.fieldNote && (this.ariaDescribedBy = this.ariaDescribedBy || y());
|
|
32
|
+
}
|
|
33
|
+
updated(i) {
|
|
34
|
+
i.forEach((o, r) => {
|
|
35
|
+
r === "uploadFiles" && this.uploadFiles !== o && setTimeout(() => {
|
|
36
|
+
const a = [...this.filesState];
|
|
37
|
+
this.uploadFiles.forEach((s) => {
|
|
38
|
+
const d = a.findIndex((p) => p.fieldId === s.fileId);
|
|
39
|
+
d > -1 && (a[d].status = s.status, a[d].statusText = s.statusText);
|
|
40
|
+
}), this.filesState = a;
|
|
41
|
+
}, this.uploadingtime);
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
getFileSizeBasedOnOS(i) {
|
|
45
|
+
if (navigator.appVersion.indexOf("Win") !== -1)
|
|
46
|
+
return i * 1024 * 1024;
|
|
47
|
+
if (navigator.appVersion.indexOf("Mac") !== -1 || navigator.appVersion.indexOf("Linux") !== -1)
|
|
48
|
+
return i * 1e3 * 1e3;
|
|
49
|
+
}
|
|
50
|
+
handleOnDragOver(i) {
|
|
51
|
+
i.preventDefault(), this.isDragging || (this.isDragging = !0);
|
|
52
|
+
}
|
|
53
|
+
handleOnDragEnd(i) {
|
|
54
|
+
i.preventDefault(), this.isDragging && (this.isDragging = !1);
|
|
55
|
+
}
|
|
56
|
+
updateFilesState() {
|
|
57
|
+
this.filesState = [];
|
|
58
|
+
}
|
|
59
|
+
handleOnFileRemove(i) {
|
|
60
|
+
const r = this.filesState.filter((a) => a.fieldId !== i);
|
|
61
|
+
this.dispatch({ eventName: "removedfiles", detailObj: { updatedFiles: r } }), this.filesState = r, r.length === 0 && (this.filesState = []);
|
|
62
|
+
}
|
|
63
|
+
handleOnFileInputChange(i) {
|
|
64
|
+
const o = i.dataTransfer?.files || i.target?.files;
|
|
65
|
+
if (!o) return;
|
|
66
|
+
const r = Array.apply(void 0, this.filesState), a = [];
|
|
67
|
+
this.validFileMimeType = this.accept?.split(","), Object.entries(o).forEach((d) => {
|
|
68
|
+
let p = !1, u = !1;
|
|
69
|
+
if (d[1] && typeof d[1].size == "number") {
|
|
70
|
+
const c = d[1].size, g = this.getFileSizeBasedOnOS(this.fileSizeLimit);
|
|
71
|
+
g && c > g && (p = !0);
|
|
72
|
+
}
|
|
73
|
+
if (this.validFileMimeType?.length && d[1]) {
|
|
74
|
+
const c = d[1].type, x = c.split("/")[0] + "/*";
|
|
75
|
+
this.validFileMimeType.indexOf(c) === -1 && this.validFileMimeType.indexOf(x) === -1 && (u = !0);
|
|
76
|
+
}
|
|
77
|
+
const b = {
|
|
78
|
+
fileObject: d,
|
|
79
|
+
status: p || u ? "Failed" : "uploading",
|
|
80
|
+
fieldId: y(),
|
|
81
|
+
statusText: "",
|
|
82
|
+
fileSizeExceeded: p,
|
|
83
|
+
fileFormatError: u
|
|
84
|
+
};
|
|
85
|
+
a.push(b), r.push(b);
|
|
86
|
+
}), this.dispatch({
|
|
87
|
+
eventName: "uploadedfiles",
|
|
88
|
+
detailObj: { uploadedFiles: a }
|
|
89
|
+
}), this.filesState = r;
|
|
90
|
+
const s = i.target;
|
|
91
|
+
this.internals.setFormValue(s.value);
|
|
92
|
+
}
|
|
93
|
+
render() {
|
|
94
|
+
const i = this.componentClassNames("ed-c-file-upload", {
|
|
95
|
+
"ed-is-error": this.isError === !0,
|
|
96
|
+
"ed-is-success": this.isSuccess === !0,
|
|
97
|
+
"ed-is-dragging": this.isDragging === !0,
|
|
98
|
+
"ed-c-file-upload--hidden-label": this.hideLabel,
|
|
99
|
+
"ed-c-file-upload--disabled": this.disabled
|
|
100
|
+
});
|
|
101
|
+
return f`
|
|
102
|
+
<div class="${i}">
|
|
103
|
+
<label class="ed-c-file-upload__label" for="${this.fieldId}">${this.label}</label>
|
|
104
|
+
<div
|
|
105
|
+
class="ed-c-file-upload__body"
|
|
106
|
+
@dragover=${this.handleOnDragOver}
|
|
107
|
+
@dragend=${this.handleOnDragEnd}
|
|
108
|
+
@dragleave=${this.handleOnDragEnd}
|
|
109
|
+
@drop=${this.handleOnDragEnd}
|
|
110
|
+
>
|
|
111
|
+
<input
|
|
112
|
+
class="ed-c-file-upload__input"
|
|
113
|
+
type="file"
|
|
114
|
+
accept="${this.accept}"
|
|
115
|
+
id="${this.fieldId}"
|
|
116
|
+
@drop=${this.handleOnFileInputChange}
|
|
117
|
+
name="${h(this.name)}"
|
|
118
|
+
value=${h(this.value)}
|
|
119
|
+
@change=${this.handleOnFileInputChange}
|
|
120
|
+
?required="${this.required}"
|
|
121
|
+
?disabled="${this.disabled}"
|
|
122
|
+
aria-describedby="${h(this.ariaDescribedBy)}"
|
|
123
|
+
aria-invalid="false"
|
|
124
|
+
placeholder="${h(this.placeholder)}"
|
|
125
|
+
?multiple="${this.multiple}"
|
|
126
|
+
/>
|
|
127
|
+
<ed-icon class="ed-c-file-upload__icon" name="arrow-up"></ed-icon>
|
|
128
|
+
${this.isDragging ? this.textConfig.dragandDropText : f`<slot></slot>`}
|
|
129
|
+
</div>
|
|
130
|
+
${this.fieldNote ? f`<ed-field-note id=${h(this.ariaDescribedBy)} ?isError=${this.isError} ?isDisabled=${this.disabled}>
|
|
131
|
+
<slot name="field-note">${this.fieldNote}</slot>
|
|
132
|
+
</ed-field-note> ` : _}
|
|
133
|
+
${this.filesState ? f`<span class="ed-c-file-upload__file-list-heading">File(s)</span>` : _}
|
|
134
|
+
<ul class="ed-c-file-upload__list">
|
|
135
|
+
${this.filesState?.map(
|
|
136
|
+
(o) => f`
|
|
137
|
+
<li class="ed-c-file-upload__item">
|
|
138
|
+
<div class="ed-c-file-upload__item-first">
|
|
139
|
+
<span class="ed-c-file-upload__item-text">${o.fileObject[1].name}</span>
|
|
140
|
+
</div>
|
|
141
|
+
<ed-button
|
|
142
|
+
class="ed-c-file-upload__close-button"
|
|
143
|
+
variant="bare"
|
|
144
|
+
text="${this.textConfig.deleteIconName}"
|
|
145
|
+
type="button"
|
|
146
|
+
@click=${() => this.handleOnFileRemove(o.fieldId)}
|
|
147
|
+
>
|
|
148
|
+
</ed-button>
|
|
149
|
+
</div>
|
|
150
|
+
</li>
|
|
151
|
+
`
|
|
152
|
+
)}
|
|
153
|
+
</ul>
|
|
154
|
+
</div>
|
|
155
|
+
`;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
t([
|
|
159
|
+
l()
|
|
160
|
+
], e.prototype, "fieldId");
|
|
161
|
+
t([
|
|
162
|
+
l()
|
|
163
|
+
], e.prototype, "label");
|
|
164
|
+
t([
|
|
165
|
+
l()
|
|
166
|
+
], e.prototype, "name");
|
|
167
|
+
t([
|
|
168
|
+
l()
|
|
169
|
+
], e.prototype, "fieldNote");
|
|
170
|
+
t([
|
|
171
|
+
l()
|
|
172
|
+
], e.prototype, "errorNote");
|
|
173
|
+
t([
|
|
174
|
+
l()
|
|
175
|
+
], e.prototype, "ariaDescribedBy");
|
|
176
|
+
t([
|
|
177
|
+
l({ type: Boolean })
|
|
178
|
+
], e.prototype, "required");
|
|
179
|
+
t([
|
|
180
|
+
l({ type: Boolean })
|
|
181
|
+
], e.prototype, "disabled");
|
|
182
|
+
t([
|
|
183
|
+
l()
|
|
184
|
+
], e.prototype, "placeholder");
|
|
185
|
+
t([
|
|
186
|
+
l({ type: Boolean })
|
|
187
|
+
], e.prototype, "isError");
|
|
188
|
+
t([
|
|
189
|
+
v()
|
|
190
|
+
], e.prototype, "filesState");
|
|
191
|
+
t([
|
|
192
|
+
l({ type: Boolean })
|
|
193
|
+
], e.prototype, "isSuccess");
|
|
194
|
+
t([
|
|
195
|
+
l({ type: Boolean })
|
|
196
|
+
], e.prototype, "hideLabel");
|
|
197
|
+
t([
|
|
198
|
+
l()
|
|
199
|
+
], e.prototype, "textConfig");
|
|
200
|
+
t([
|
|
201
|
+
l()
|
|
202
|
+
], e.prototype, "uploadFiles");
|
|
203
|
+
t([
|
|
204
|
+
l()
|
|
205
|
+
], e.prototype, "uploadingtime");
|
|
206
|
+
t([
|
|
207
|
+
l()
|
|
208
|
+
], e.prototype, "fileSizeLimit");
|
|
209
|
+
t([
|
|
210
|
+
l()
|
|
211
|
+
], e.prototype, "accept");
|
|
212
|
+
t([
|
|
213
|
+
l({ type: Boolean })
|
|
214
|
+
], e.prototype, "multiple");
|
|
215
|
+
t([
|
|
216
|
+
v()
|
|
217
|
+
], e.prototype, "isDragging");
|
|
218
|
+
t([
|
|
219
|
+
F("input")
|
|
220
|
+
], e.prototype, "field");
|
|
221
|
+
customElements.get("ed-file-upload") === void 0 && customElements.define("ed-file-upload", e);
|
|
222
|
+
export {
|
|
223
|
+
e as EdFileUpload
|
|
224
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export interface FileUploadTextConfig {
|
|
2
|
+
fileFormatErrorText: string;
|
|
3
|
+
fileSizeErrorText: string;
|
|
4
|
+
uploadingText: string;
|
|
5
|
+
dragandDropText: string;
|
|
6
|
+
deleteIconName: string;
|
|
7
|
+
tableFileText: string;
|
|
8
|
+
}
|
|
9
|
+
export interface filesStateConfig {
|
|
10
|
+
fileObject: File;
|
|
11
|
+
status: string;
|
|
12
|
+
fieldId: string;
|
|
13
|
+
statusText: string;
|
|
14
|
+
fileSizeExceeded: boolean;
|
|
15
|
+
fileFormatError: boolean;
|
|
16
|
+
}
|
|
17
|
+
export interface FileUploadProgressStream {
|
|
18
|
+
fileId: string;
|
|
19
|
+
file: string;
|
|
20
|
+
status: string;
|
|
21
|
+
statusText: string;
|
|
22
|
+
}
|
|
23
|
+
export declare const defaultTextConfig: FileUploadTextConfig;
|
|
24
|
+
//# sourceMappingURL=file-upload.model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-upload.model.d.ts","sourceRoot":"","sources":["../../../../packages/eddie-web-components/components/file-upload/file-upload.model.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,oBAAoB;IACnC,mBAAmB,EAAE,MAAM,CAAC;IAC5B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,gBAAgB;IAC/B,UAAU,EAAE,IAAI,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,eAAe,EAAE,OAAO,CAAC;CAC1B;AACD,MAAM,WAAW,wBAAwB;IACvC,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,iBAAiB,EAAE,oBAO/B,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const e = {
|
|
2
|
+
fileFormatErrorText: "Failed, file format error",
|
|
3
|
+
fileSizeErrorText: "Failed, file size exceeded 75 MB",
|
|
4
|
+
uploadingText: "Uploading",
|
|
5
|
+
dragandDropText: "Drop files here",
|
|
6
|
+
deleteIconName: "delete",
|
|
7
|
+
tableFileText: "File Name"
|
|
8
|
+
};
|
|
9
|
+
export {
|
|
10
|
+
e as defaultTextConfig
|
|
11
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { EdElement } from '@brad-frost-web/eddie-web-components/components/EdElement';
|
|
2
|
+
/**
|
|
3
|
+
* @slot - The footer content
|
|
4
|
+
* @slot top - The top content (above the default slot)
|
|
5
|
+
* @slot bottom - The bottom content (below the default slot)
|
|
6
|
+
*/
|
|
7
|
+
export declare class EdFooter extends EdElement {
|
|
8
|
+
static get styles(): import('lit').CSSResult;
|
|
9
|
+
render(): import('lit-html').TemplateResult<1>;
|
|
10
|
+
}
|
|
11
|
+
declare global {
|
|
12
|
+
interface HTMLElementTagNameMap {
|
|
13
|
+
'ed-footer': EdFooter;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=footer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"footer.d.ts","sourceRoot":"","sources":["../../../../packages/eddie-web-components/components/footer/footer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,2DAA2D,CAAC;AACtF,OAAO,sCAAsC,CAAC;AAG9C;;;;GAIG;AACH,qBAAa,QAAS,SAAQ,SAAS;IACrC,MAAM,KAAK,MAAM,4BAEhB;IAED,MAAM;CAyBP;AAMD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,WAAW,EAAE,QAAQ,CAAC;KACvB;CACF"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { unsafeCSS as o, html as t } from "lit";
|
|
2
|
+
import { E as r } from "../EdElement.js";
|
|
3
|
+
import "../layout-container/layout-container.js";
|
|
4
|
+
const a = ":root,:host{--size-base-unit: .5rem}*,::slotted(*),*:before,*:after{box-sizing:border-box}h1,h2,h3,h4,h5,h6{margin:0}.ed-c-footer{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);background:var(--ed-theme-color-background-knockout);color:var(--ed-theme-color-content-knockout);padding-top:2.5rem;padding-bottom:3rem}@media all and (min-width:60rem){.ed-c-footer{padding-top:3.4375rem}}";
|
|
5
|
+
class d extends r {
|
|
6
|
+
static get styles() {
|
|
7
|
+
return o(a);
|
|
8
|
+
}
|
|
9
|
+
render() {
|
|
10
|
+
const e = this.componentClassNames("ed-c-footer", {});
|
|
11
|
+
return t`
|
|
12
|
+
<footer class="${e}" role="contentinfo">
|
|
13
|
+
${this.slotNotEmpty("top") && t`<div class="ed-c-footer__top">
|
|
14
|
+
<ed-layout-container>
|
|
15
|
+
<slot name="top"></slot>
|
|
16
|
+
</ed-layout-container>
|
|
17
|
+
</div>`}
|
|
18
|
+
<div class="ed-c-footer__middle">
|
|
19
|
+
<ed-layout-container>
|
|
20
|
+
<slot></slot>
|
|
21
|
+
</ed-layout-container>
|
|
22
|
+
</div>
|
|
23
|
+
${this.slotNotEmpty("bottom") && t`<div class="ed-c-footer__bottom">
|
|
24
|
+
<ed-layout-container>
|
|
25
|
+
<slot name="bottom"></slot>
|
|
26
|
+
</ed-layout-container>
|
|
27
|
+
</div>`}
|
|
28
|
+
</footer>
|
|
29
|
+
`;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
customElements.get("ed-footer") === void 0 && customElements.define("ed-footer", d);
|
|
33
|
+
export {
|
|
34
|
+
d as EdFooter
|
|
35
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { EdElement } from '@brad-frost-web/eddie-web-components/components/EdElement';
|
|
2
|
+
/**
|
|
3
|
+
* @slot - The global navigation items
|
|
4
|
+
*/
|
|
5
|
+
export declare class EdGlobalNav extends EdElement {
|
|
6
|
+
static get styles(): import('lit').CSSResult;
|
|
7
|
+
render(): import('lit-html').TemplateResult<1>;
|
|
8
|
+
}
|
|
9
|
+
declare global {
|
|
10
|
+
interface HTMLElementTagNameMap {
|
|
11
|
+
'ed-global-nav': EdGlobalNav;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=global-nav.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"global-nav.d.ts","sourceRoot":"","sources":["../../../../packages/eddie-web-components/components/global-nav/global-nav.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,2DAA2D,CAAC;AAGtF;;GAEG;AACH,qBAAa,WAAY,SAAQ,SAAS;IACxC,MAAM,KAAK,MAAM,4BAEhB;IAED,MAAM;CAWP;AAMD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,eAAe,EAAE,WAAW,CAAC;KAC9B;CACF"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { unsafeCSS as s, html as t } from "lit";
|
|
2
|
+
import { E as l } from "../EdElement.js";
|
|
3
|
+
const o = ":root,:host{--size-base-unit: .5rem}*,::slotted(*),*:before,*:after{box-sizing:border-box}h1,h2,h3,h4,h5,h6{margin:0}.ed-c-global-nav__list{display:flex;margin:0;padding:0;list-style:none}";
|
|
4
|
+
class a extends l {
|
|
5
|
+
static get styles() {
|
|
6
|
+
return s(o);
|
|
7
|
+
}
|
|
8
|
+
render() {
|
|
9
|
+
const e = this.componentClassNames("ed-c-global-nav", {});
|
|
10
|
+
return t`
|
|
11
|
+
<nav class="${e}">
|
|
12
|
+
<ul class="ed-c-global-nav__list">
|
|
13
|
+
<slot></slot>
|
|
14
|
+
</ul>
|
|
15
|
+
</nav>
|
|
16
|
+
`;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
customElements.get("ed-global-nav") === void 0 && customElements.define("ed-global-nav", a);
|
|
20
|
+
export {
|
|
21
|
+
a as EdGlobalNav
|
|
22
|
+
};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { EdElement } from '@brad-frost-web/eddie-web-components/components/EdElement';
|
|
2
|
+
/**
|
|
3
|
+
* @slot - The label for the navigation item
|
|
4
|
+
*/
|
|
5
|
+
export declare class EdGlobalNavItem extends EdElement {
|
|
6
|
+
/**
|
|
7
|
+
* Global nav item text
|
|
8
|
+
*/
|
|
9
|
+
text: string;
|
|
10
|
+
/**
|
|
11
|
+
* Global nav item URL
|
|
12
|
+
*/
|
|
13
|
+
href?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Icon name
|
|
16
|
+
*/
|
|
17
|
+
iconName?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Megamenu toggle
|
|
20
|
+
* 1) If set to true, adds the icon used for global nav items
|
|
21
|
+
*/
|
|
22
|
+
megaMenu?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Active state for global nav item megamenu
|
|
25
|
+
* 1) Used to help toggle the global nav item on or off
|
|
26
|
+
*/
|
|
27
|
+
isActive?: boolean;
|
|
28
|
+
static get styles(): import('lit').CSSResult;
|
|
29
|
+
/**
|
|
30
|
+
* Initialize functions
|
|
31
|
+
*/
|
|
32
|
+
constructor();
|
|
33
|
+
/**
|
|
34
|
+
* Connected Callback lifecycle
|
|
35
|
+
*/
|
|
36
|
+
connectedCallback(): void;
|
|
37
|
+
/**
|
|
38
|
+
* Disconnected callback lifecycle
|
|
39
|
+
* 1) Remove window resize event listener
|
|
40
|
+
*/
|
|
41
|
+
disconnectedCallback(): void;
|
|
42
|
+
/**
|
|
43
|
+
* Handle click outside the component
|
|
44
|
+
* 1) Close the show hide panel on click outside
|
|
45
|
+
* 2) If the nav is already closed then we don't care about outside clicks and we
|
|
46
|
+
* can bail early
|
|
47
|
+
* 3) By the time a user clicks on the page the shadowRoot will almost certainly be
|
|
48
|
+
* defined, but TypeScript isn't that trusting and sees this.shadowRoot as possibly
|
|
49
|
+
* undefined. To work around that we'll check that we have a shadowRoot (and a
|
|
50
|
+
* rendered .host) element here to appease the TypeScript compiler. This should never
|
|
51
|
+
* actually be shown or run for a human end user.
|
|
52
|
+
* 4) Check to see if we clicked inside the active navigation item
|
|
53
|
+
* 5) If the navigation is active and we've clicked outside of the nav then it should
|
|
54
|
+
* be closed.
|
|
55
|
+
*/
|
|
56
|
+
handleOnClickOutside(event: MouseEvent): void;
|
|
57
|
+
/**
|
|
58
|
+
* Toggle active state of global nav item
|
|
59
|
+
* 1) Remove isActive state from all sibling elements
|
|
60
|
+
* 2) Toggle active state of element selected
|
|
61
|
+
*/
|
|
62
|
+
clickHandler(e: MouseEvent): void;
|
|
63
|
+
/**
|
|
64
|
+
* Close megamenu panel
|
|
65
|
+
*/
|
|
66
|
+
closePanel(): void;
|
|
67
|
+
/**
|
|
68
|
+
* Keyboard functionality
|
|
69
|
+
* 1) If the escape key is struck, close the megamenu panel
|
|
70
|
+
* 2) After closing, focus back on the global nav item
|
|
71
|
+
*/
|
|
72
|
+
handleOnKeyDown(e: KeyboardEvent): void;
|
|
73
|
+
render(): import('lit-html').TemplateResult<1>;
|
|
74
|
+
}
|
|
75
|
+
declare global {
|
|
76
|
+
interface HTMLElementTagNameMap {
|
|
77
|
+
'ed-global-nav-item': EdGlobalNavItem;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
//# sourceMappingURL=global-nav-item.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"global-nav-item.d.ts","sourceRoot":"","sources":["../../../../packages/eddie-web-components/components/global-nav-item/global-nav-item.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,MAAM,2DAA2D,CAAC;AAGtF;;GAEG;AACH,qBAAa,eAAgB,SAAQ,SAAS;IAC5C;;OAEG;IAEH,IAAI,EAAE,MAAM,CAAc;IAE1B;;OAEG;IAEH,IAAI,CAAC,EAAE,MAAM,CAAO;IAEpB;;OAEG;IAEH,QAAQ,CAAC,EAAE,MAAM,CAAyB;IAE1C;;;OAGG;IAEH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;OAGG;IAEH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,MAAM,KAAK,MAAM,4BAEhB;IAED;;OAEG;;IAMH;;OAEG;IACH,iBAAiB;IAMjB;;;OAGG;IACH,oBAAoB;IAKpB;;;;;;;;;;;;;OAaG;IACH,oBAAoB,CAAC,KAAK,EAAE,UAAU;IAoBtC;;;;OAIG;IACH,YAAY,CAAC,CAAC,EAAE,UAAU;IAa1B;;OAEG;IACH,UAAU;IAIV;;;;OAIG;IACH,eAAe,CAAC,CAAC,EAAE,aAAa;IAWhC,MAAM;CA4BP;AAMD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,oBAAoB,EAAE,eAAe,CAAC;KACvC;CACF"}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { unsafeCSS as m, html as c } from "lit";
|
|
2
|
+
import { ifDefined as h } from "lit-html/directives/if-defined.js";
|
|
3
|
+
import { property as o, state as v } from "lit/decorators.js";
|
|
4
|
+
import { E as g } from "../EdElement.js";
|
|
5
|
+
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-global-nav__link{font-family:var(--ed-theme-typography-label-sm-font-family);font-weight:var(--ed-theme-typography-label-sm-font-weight);font-size:var(--ed-theme-typography-label-sm-font-size);line-height:var(--ed-theme-typography-label-sm-line-height);letter-spacing:var(--ed-theme-typography-label-sm-letter-spacing);text-transform:var(--ed-theme-typography-label-sm-text-transform);display:flex;align-items:center;appearance:none;background:none;border:none;width:100%;padding:1rem 2rem;color:var(--ed-theme-color-content-default);text-decoration:none;transition:all var(--ed-theme-animation-fade-quick) var(--ed-theme-animation-ease);cursor:pointer}.ed-c-global-nav__link:hover,.ed-c-global-nav__link:focus{background:var(--ed-theme-color-background-brand);color:var(--ed-theme-color-content-default-knockout)}.ed-c-global-nav__item.ed-is-active .ed-c-global-nav__link{background:var(--ed-theme-color-background-brand);color:var(--ed-theme-color-content-subtle)}@media all and (min-width:75rem){.ed-c-global-nav__link{padding:.75rem;color:var(--ed-theme-color-content-knockout)}}ed-icon{--ed-icon-height: .75rem;--ed-icon-width: .75rem;margin-left:auto;transition:transform var(--ed-theme-animation-fade-quick) var(--ed-theme-animation-ease)}.ed-c-global-nav__item.ed-is-active ed-icon{transform:rotate(-180deg)}@media all and (min-width:75rem){ed-icon{margin-left:.5rem}}.ed-c-global-nav__item-panel{visibility:hidden;width:100%;height:0;overflow:hidden;background:transparent;opacity:0;transition:all 0s var(--ed-theme-animation-ease);z-index:-1}@media all and (min-width:75rem){.ed-c-global-nav__item-panel{position:absolute;top:100%;left:0;height:auto;box-shadow:var(--ed-theme-box-shadow-md)}}.ed-c-global-nav__item.ed-is-active .ed-c-global-nav__item-panel{display:block;visibility:visible;height:auto;padding-top:2rem;padding-bottom:2rem;background:var(--ed-theme-color-background-default);opacity:1;z-index:1;transition:opacity var(--ed-theme-animation-fade-quick) var(--ed-theme-animation-ease)}.ed-c-global-nav__item--megamenu .ed-c-global-nav__item-panel-inner{max-width:70rem;padding-right:2rem;padding-left:2rem;margin:0 auto}";
|
|
6
|
+
var u = Object.defineProperty, n = (l, e, t, d) => {
|
|
7
|
+
for (var a = void 0, r = l.length - 1, s; r >= 0; r--)
|
|
8
|
+
(s = l[r]) && (a = s(e, t, a) || a);
|
|
9
|
+
return a && u(e, t, a), a;
|
|
10
|
+
};
|
|
11
|
+
class i extends g {
|
|
12
|
+
/**
|
|
13
|
+
* Initialize functions
|
|
14
|
+
*/
|
|
15
|
+
constructor() {
|
|
16
|
+
super(), this.text = "Nav item", this.href = "#", this.iconName = "keyboard-arrow-down", this.handleOnClickOutside = this.handleOnClickOutside.bind(this);
|
|
17
|
+
}
|
|
18
|
+
static get styles() {
|
|
19
|
+
return m(p);
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Connected Callback lifecycle
|
|
23
|
+
*/
|
|
24
|
+
connectedCallback() {
|
|
25
|
+
super.connectedCallback(), document.addEventListener("mousedown", this.handleOnClickOutside, !1);
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Disconnected callback lifecycle
|
|
29
|
+
* 1) Remove window resize event listener
|
|
30
|
+
*/
|
|
31
|
+
disconnectedCallback() {
|
|
32
|
+
document.removeEventListener("mousedown", this.handleOnClickOutside, !1), super.disconnectedCallback();
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Handle click outside the component
|
|
36
|
+
* 1) Close the show hide panel on click outside
|
|
37
|
+
* 2) If the nav is already closed then we don't care about outside clicks and we
|
|
38
|
+
* can bail early
|
|
39
|
+
* 3) By the time a user clicks on the page the shadowRoot will almost certainly be
|
|
40
|
+
* defined, but TypeScript isn't that trusting and sees this.shadowRoot as possibly
|
|
41
|
+
* undefined. To work around that we'll check that we have a shadowRoot (and a
|
|
42
|
+
* rendered .host) element here to appease the TypeScript compiler. This should never
|
|
43
|
+
* actually be shown or run for a human end user.
|
|
44
|
+
* 4) Check to see if we clicked inside the active navigation item
|
|
45
|
+
* 5) If the navigation is active and we've clicked outside of the nav then it should
|
|
46
|
+
* be closed.
|
|
47
|
+
*/
|
|
48
|
+
handleOnClickOutside(e) {
|
|
49
|
+
if (!this.isActive)
|
|
50
|
+
return;
|
|
51
|
+
if (!this.shadowRoot?.host)
|
|
52
|
+
throw Error("Could not determine navigation context during click handler");
|
|
53
|
+
const t = e.composedPath().includes(this.shadowRoot.host);
|
|
54
|
+
this.isActive && !t && (this.isActive = !1);
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Toggle active state of global nav item
|
|
58
|
+
* 1) Remove isActive state from all sibling elements
|
|
59
|
+
* 2) Toggle active state of element selected
|
|
60
|
+
*/
|
|
61
|
+
clickHandler(e) {
|
|
62
|
+
e.preventDefault(), this.parentNode && this.parentNode.querySelectorAll("ed-global-nav-item").forEach((d) => {
|
|
63
|
+
d !== this && (d.isActive = !1);
|
|
64
|
+
}), this.isActive = !this.isActive;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Close megamenu panel
|
|
68
|
+
*/
|
|
69
|
+
closePanel() {
|
|
70
|
+
this.isActive = !1;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Keyboard functionality
|
|
74
|
+
* 1) If the escape key is struck, close the megamenu panel
|
|
75
|
+
* 2) After closing, focus back on the global nav item
|
|
76
|
+
*/
|
|
77
|
+
handleOnKeyDown(e) {
|
|
78
|
+
if (e.key === "Escape" && this.isActive === !0) {
|
|
79
|
+
this.closePanel();
|
|
80
|
+
const t = this.shadowRoot?.querySelector(".ed-c-global-nav__link");
|
|
81
|
+
t && setTimeout(() => {
|
|
82
|
+
t.focus();
|
|
83
|
+
}, 1);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
render() {
|
|
87
|
+
const e = this.componentClassNames("ed-c-global-nav__item", {
|
|
88
|
+
"ed-is-active": this.isActive === !0,
|
|
89
|
+
"ed-c-global-nav__item--megamenu": this.megaMenu === !0
|
|
90
|
+
});
|
|
91
|
+
return this.megaMenu ? c`
|
|
92
|
+
<li class="${e}" @keydown=${this.handleOnKeyDown}>
|
|
93
|
+
<button class="ed-c-global-nav__link" @click=${this.clickHandler} aria-expanded=${this.isActive === !0}>
|
|
94
|
+
${this.text}
|
|
95
|
+
<ed-icon styleModifier="ed-c-button__icon" aria-hidden="true" name="${h(this.iconName)}"></ed-icon>
|
|
96
|
+
</button>
|
|
97
|
+
<div class="ed-c-global-nav__item-panel">
|
|
98
|
+
<div class="ed-c-global-nav__item-panel-inner">
|
|
99
|
+
<slot></slot>
|
|
100
|
+
</div>
|
|
101
|
+
</div>
|
|
102
|
+
</li>
|
|
103
|
+
` : c`
|
|
104
|
+
<li class="${e}">
|
|
105
|
+
<a class="ed-c-global-nav__link" href="${this.href}">${this.text}</a>
|
|
106
|
+
</li>
|
|
107
|
+
`;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
n([
|
|
111
|
+
o()
|
|
112
|
+
], i.prototype, "text");
|
|
113
|
+
n([
|
|
114
|
+
o()
|
|
115
|
+
], i.prototype, "href");
|
|
116
|
+
n([
|
|
117
|
+
o()
|
|
118
|
+
], i.prototype, "iconName");
|
|
119
|
+
n([
|
|
120
|
+
o({ type: Boolean })
|
|
121
|
+
], i.prototype, "megaMenu");
|
|
122
|
+
n([
|
|
123
|
+
v()
|
|
124
|
+
], i.prototype, "isActive");
|
|
125
|
+
customElements.get("ed-global-nav-item") === void 0 && customElements.define("ed-global-nav-item", i);
|
|
126
|
+
export {
|
|
127
|
+
i as EdGlobalNavItem
|
|
128
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { EdElement } from '@brad-frost-web/eddie-web-components/components/EdElement';
|
|
2
|
+
/**
|
|
3
|
+
* @slot - The grid items
|
|
4
|
+
*/
|
|
5
|
+
export declare class EdGrid extends EdElement {
|
|
6
|
+
static get styles(): import('lit').CSSResult;
|
|
7
|
+
/**
|
|
8
|
+
* Style variant
|
|
9
|
+
* <ed-text-passage size="sm">
|
|
10
|
+
* <ul>
|
|
11
|
+
* <li>**side-by-side** yields a grid whose grid items display side-by-side (2 per row) on all screen sizes</li>
|
|
12
|
+
* <li>**2up** yields a grid whose grid items are stacked on small screens but display side-by-side when enough screen real estate is available to do so</li>
|
|
13
|
+
* <li>**3up** yields a grid whose grid items are stacked on small screens, transforms to a 2-across pattern and then transforms again to a 3-across pattern</li>
|
|
14
|
+
* <li>**1-3up** yields a grid whose grid items are stacked on small screens and transforms to a 3-across pattern on larger screens</li>
|
|
15
|
+
* <li>**4up** yields a grid whose grid items are stacked on small screens, transforms to a 2-across pattern, transforms again to a 3-across pattern, and ultimately transforms to a 4-across pattern</li>
|
|
16
|
+
* <li>**1-2-4up** yields a grid whose grid items are stacked on small screens, transforms to a 2-across pattern, and ultimately transforms to a 4-across pattern</li>
|
|
17
|
+
* <li>**1-4up** yields a grid whose grid items are stacked on small screens, transforms to a 4-across pattern on medium/large screens</li>
|
|
18
|
+
* </ul>
|
|
19
|
+
* </ed-text-passage>
|
|
20
|
+
*/
|
|
21
|
+
variant?: 'side-by-side' | '2up' | '3up' | '1-3up' | '4up' | '1-4up' | '1-2-4up' | '2-4-6up';
|
|
22
|
+
/**
|
|
23
|
+
* Style variant
|
|
24
|
+
* <ed-text-passage size="sm">
|
|
25
|
+
* <ul>
|
|
26
|
+
* <li>**none** yields a grid whose grid items are spaced without any gutter in between</li>
|
|
27
|
+
* <li>**sm** yields a grid whose grid items are spaced with a gap smaller than the default</li>
|
|
28
|
+
* <li>**lg** yields a grid whose grid items are spaced with a gap larger than the default</li>
|
|
29
|
+
* </ul>
|
|
30
|
+
* </ed-text-passage>
|
|
31
|
+
*/
|
|
32
|
+
gap?: 'none' | 'sm' | 'lg';
|
|
33
|
+
/**
|
|
34
|
+
* Break variant
|
|
35
|
+
* <ed-text-passage size="sm">
|
|
36
|
+
* <ul>
|
|
37
|
+
* <li> **faster** breaks the grid at a smaller width than the default. Example: 2up grid breaks to 2 per row at smaller width than default</li>
|
|
38
|
+
* <li> **slower** breaks the grid at a larger width than the default. Example: 2up grid breaks to 2 per row at larger width than default</li>
|
|
39
|
+
* <li> **lg** yields a grid whose grid items are spaced with a gap larger than the default</li>
|
|
40
|
+
* </ul>
|
|
41
|
+
* </ed-text-passage>
|
|
42
|
+
*/
|
|
43
|
+
break?: 'faster' | 'slower';
|
|
44
|
+
render(): import('lit-html').TemplateResult<1>;
|
|
45
|
+
}
|
|
46
|
+
declare global {
|
|
47
|
+
interface HTMLElementTagNameMap {
|
|
48
|
+
'ed-grid': EdGrid;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=grid.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grid.d.ts","sourceRoot":"","sources":["../../../../packages/eddie-web-components/components/grid/grid.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,2DAA2D,CAAC;AAGtF;;GAEG;AACH,qBAAa,MAAO,SAAQ,SAAS;IACnC,MAAM,KAAK,MAAM,4BAEhB;IAED;;;;;;;;;;;;;OAaG;IAEH,OAAO,CAAC,EAAE,cAAc,GAAG,KAAK,GAAG,KAAK,GAAG,OAAO,GAAG,KAAK,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,CAAC;IAE7F;;;;;;;;;OASG;IAEH,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAAC;IAE3B;;;;;;;;;OASG;IAEH,KAAK,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAE5B,MAAM;CAuBP;AAMD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,SAAS,EAAE,MAAM,CAAC;KACnB;CACF"}
|