@tmorrow/cre8-wc 1.1.2 → 1.1.3
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/cdn/cre8-wc.esm.js +1 -1
- package/cdn/cre8-wc.esm.js.map +1 -1
- package/cdn/cre8-wc.min.js +1 -1
- package/cdn/cre8-wc.min.js.map +1 -1
- package/lib/cdn-entry.js +129 -0
- package/lib/cdn-entry.js.map +1 -0
- package/lib/components/accordion/accordion.js +58 -40
- package/lib/components/accordion/accordion.js.map +1 -0
- package/lib/components/accordion/accordion.styles.js +4 -0
- package/lib/components/accordion/accordion.styles.js.map +1 -0
- package/lib/components/accordion-item/accordion-item.js +187 -98
- package/lib/components/accordion-item/accordion-item.js.map +1 -0
- package/lib/components/accordion-item/accordion-item.styles.js +4 -0
- package/lib/components/accordion-item/accordion-item.styles.js.map +1 -0
- package/lib/components/alert/alert.js +146 -107
- package/lib/components/alert/alert.js.map +1 -0
- package/lib/components/alert/alert.styles.js +4 -0
- package/lib/components/alert/alert.styles.js.map +1 -0
- package/lib/components/badge/badge.js +73 -50
- package/lib/components/badge/badge.js.map +1 -0
- package/lib/components/badge/badge.styles.js +4 -0
- package/lib/components/badge/badge.styles.js.map +1 -0
- package/lib/components/band/band.js +34 -31
- package/lib/components/band/band.js.map +1 -0
- package/lib/components/band/band.styles.js +4 -0
- package/lib/components/band/band.styles.js.map +1 -0
- package/lib/components/breadcrumbs/breadcrumbs.js +52 -28
- package/lib/components/breadcrumbs/breadcrumbs.js.map +1 -0
- package/lib/components/breadcrumbs/breadcrumbs.styles.js +4 -0
- package/lib/components/breadcrumbs/breadcrumbs.styles.js.map +1 -0
- package/lib/components/breadcrumbs-item/breadcrumbs-item.js +28 -27
- package/lib/components/breadcrumbs-item/breadcrumbs-item.js.map +1 -0
- package/lib/components/breadcrumbs-item/breadcrumbs-item.styles.js +4 -0
- package/lib/components/breadcrumbs-item/breadcrumbs-item.styles.js.map +1 -0
- package/lib/components/button/button.js +297 -1040
- package/lib/components/button/button.js.map +1 -0
- package/lib/components/button/button.styles.js +885 -0
- package/lib/components/button/button.styles.js.map +1 -0
- package/lib/components/button-group/button-group.js +30 -27
- package/lib/components/button-group/button-group.js.map +1 -0
- package/lib/components/button-group/button-group.styles.js +4 -0
- package/lib/components/button-group/button-group.styles.js.map +1 -0
- package/lib/components/card/card.js +57 -35
- package/lib/components/card/card.js.map +1 -0
- package/lib/components/card/card.styles.js +4 -0
- package/lib/components/card/card.styles.js.map +1 -0
- package/lib/components/chart/chart.js +528 -354
- package/lib/components/chart/chart.js.map +1 -0
- package/lib/components/chart/chart.styles.js +4 -0
- package/lib/components/chart/chart.styles.js.map +1 -0
- package/lib/components/checkbox-field/checkbox-field.js +66 -53
- package/lib/components/checkbox-field/checkbox-field.js.map +1 -0
- package/lib/components/checkbox-field/checkbox-field.styles.js +4 -0
- package/lib/components/checkbox-field/checkbox-field.styles.js.map +1 -0
- package/lib/components/checkbox-field-item/checkbox-field-item.js +252 -183
- package/lib/components/checkbox-field-item/checkbox-field-item.js.map +1 -0
- package/lib/components/checkbox-field-item/checkbox-field-item.styles.js +4 -0
- package/lib/components/checkbox-field-item/checkbox-field-item.styles.js.map +1 -0
- package/lib/components/contexts/form-internals-context.js +9 -0
- package/lib/components/contexts/form-internals-context.js.map +1 -0
- package/lib/components/cre8-element.js +57 -56
- package/lib/components/cre8-element.js.map +1 -0
- package/lib/components/cre8-form-element.js +212 -244
- package/lib/components/cre8-form-element.js.map +1 -0
- package/lib/components/danger-button/danger-button.js +274 -147
- package/lib/components/danger-button/danger-button.js.map +1 -0
- package/lib/components/danger-button/danger-button.styles.js +4 -0
- package/lib/components/danger-button/danger-button.styles.js.map +1 -0
- package/lib/components/date-picker/calendar/calendar.js +465 -0
- package/lib/components/date-picker/calendar/calendar.js.map +1 -0
- package/lib/components/date-picker/calendar/calendar.styles.js +4 -0
- package/lib/components/date-picker/calendar/calendar.styles.js.map +1 -0
- package/lib/components/date-picker/calendar-month-modal/calendar-month-modal.js +76 -0
- package/lib/components/date-picker/calendar-month-modal/calendar-month-modal.js.map +1 -0
- package/lib/components/date-picker/calendar-month-modal/calendar-month-modal.styles.js +4 -0
- package/lib/components/date-picker/calendar-month-modal/calendar-month-modal.styles.js.map +1 -0
- package/lib/components/date-picker/calendar-navigation/calendar-navigation.js +110 -0
- package/lib/components/date-picker/calendar-navigation/calendar-navigation.js.map +1 -0
- package/lib/components/date-picker/calendar-navigation/calendar-navigation.styles.js +4 -0
- package/lib/components/date-picker/calendar-navigation/calendar-navigation.styles.js.map +1 -0
- package/lib/components/date-picker/calendar-year-modal/calendar-year-modal.js +116 -0
- package/lib/components/date-picker/calendar-year-modal/calendar-year-modal.js.map +1 -0
- package/lib/components/date-picker/calendar-year-modal/calendar-year-modal.styles.js +4 -0
- package/lib/components/date-picker/calendar-year-modal/calendar-year-modal.styles.js.map +1 -0
- package/lib/components/date-picker/date-picker.js +91 -784
- package/lib/components/date-picker/date-picker.js.map +1 -0
- package/lib/components/date-picker/date-picker.styles.js +4 -0
- package/lib/components/date-picker/date-picker.styles.js.map +1 -0
- package/lib/components/divider/divider.js +45 -35
- package/lib/components/divider/divider.js.map +1 -0
- package/lib/components/divider/divider.styles.js +4 -0
- package/lib/components/divider/divider.styles.js.map +1 -0
- package/lib/components/dropdown/dropdown.js +97 -63
- package/lib/components/dropdown/dropdown.js.map +1 -0
- package/lib/components/dropdown/dropdown.styles.js +4 -0
- package/lib/components/dropdown/dropdown.styles.js.map +1 -0
- package/lib/components/dropdown-item/dropdown-item.js +38 -31
- package/lib/components/dropdown-item/dropdown-item.js.map +1 -0
- package/lib/components/dropdown-item/dropdown-item.styles.js +4 -0
- package/lib/components/dropdown-item/dropdown-item.styles.js.map +1 -0
- package/lib/components/feature/feature.js +40 -35
- package/lib/components/feature/feature.js.map +1 -0
- package/lib/components/feature/feature.styles.js +4 -0
- package/lib/components/feature/feature.styles.js.map +1 -0
- package/lib/components/field/field.js +218 -153
- package/lib/components/field/field.js.map +1 -0
- package/lib/components/field/field.styles.js +4 -0
- package/lib/components/field/field.styles.js.map +1 -0
- package/lib/components/field-note/field-note.js +58 -45
- package/lib/components/field-note/field-note.js.map +1 -0
- package/lib/components/field-note/field-note.styles.js +4 -0
- package/lib/components/field-note/field-note.styles.js.map +1 -0
- package/lib/components/footer/footer.js +25 -18
- package/lib/components/footer/footer.js.map +1 -0
- package/lib/components/footer/footer.styles.js +4 -0
- package/lib/components/footer/footer.styles.js.map +1 -0
- package/lib/components/global-nav/global-nav.js +44 -37
- package/lib/components/global-nav/global-nav.js.map +1 -0
- package/lib/components/global-nav/global-nav.styles.js +4 -0
- package/lib/components/global-nav/global-nav.styles.js.map +1 -0
- package/lib/components/global-nav-item/global-nav-item.js +149 -112
- package/lib/components/global-nav-item/global-nav-item.js.map +1 -0
- package/lib/components/global-nav-item/global-nav-item.styles.js +4 -0
- package/lib/components/global-nav-item/global-nav-item.styles.js.map +1 -0
- package/lib/components/grid/grid.js +48 -45
- package/lib/components/grid/grid.js.map +1 -0
- package/lib/components/grid/grid.styles.js +4 -0
- package/lib/components/grid/grid.styles.js.map +1 -0
- package/lib/components/grid-item/grid-item.js +19 -16
- package/lib/components/grid-item/grid-item.js.map +1 -0
- package/lib/components/grid-item/grid-item.styles.js +4 -0
- package/lib/components/grid-item/grid-item.styles.js.map +1 -0
- package/lib/components/header/header.js +34 -29
- package/lib/components/header/header.js.map +1 -0
- package/lib/components/header/header.styles.js +4 -0
- package/lib/components/header/header.styles.js.map +1 -0
- package/lib/components/heading/heading.js +113 -76
- package/lib/components/heading/heading.js.map +1 -0
- package/lib/components/heading/heading.styles.js +4 -0
- package/lib/components/heading/heading.styles.js.map +1 -0
- package/lib/components/hero/hero.js +43 -40
- package/lib/components/hero/hero.js.map +1 -0
- package/lib/components/hero/hero.styles.js +4 -0
- package/lib/components/hero/hero.styles.js.map +1 -0
- package/lib/components/icon/icon.js +232 -9
- package/lib/components/icon/icon.js.map +1 -0
- package/lib/components/icon/icon.styles.js +4 -0
- package/lib/components/icon/icon.styles.js.map +1 -0
- package/lib/components/inline-alert/inline-alert.js +114 -87
- package/lib/components/inline-alert/inline-alert.js.map +1 -0
- package/lib/components/inline-alert/inline-alert.styles.js +4 -0
- package/lib/components/inline-alert/inline-alert.styles.js.map +1 -0
- package/lib/components/layout/layout.js +30 -27
- package/lib/components/layout/layout.js.map +1 -0
- package/lib/components/layout/layout.styles.js +4 -0
- package/lib/components/layout/layout.styles.js.map +1 -0
- package/lib/components/layout-container/layout-container.js +30 -27
- package/lib/components/layout-container/layout-container.js.map +1 -0
- package/lib/components/layout-container/layout-container.styles.js +4 -0
- package/lib/components/layout-container/layout-container.styles.js.map +1 -0
- package/lib/components/layout-section/layout-section.js +41 -33
- package/lib/components/layout-section/layout-section.js.map +1 -0
- package/lib/components/layout-section/layout-section.styles.js +4 -0
- package/lib/components/layout-section/layout-section.styles.js.map +1 -0
- package/lib/components/linelength-container/linelength-container.js +19 -16
- package/lib/components/linelength-container/linelength-container.js.map +1 -0
- package/lib/components/linelength-container/linelength-container.styles.js +4 -0
- package/lib/components/linelength-container/linelength-container.styles.js.map +1 -0
- package/lib/components/link/link.js +125 -87
- package/lib/components/link/link.js.map +1 -0
- package/lib/components/link/link.styles.js +4 -0
- package/lib/components/link/link.styles.js.map +1 -0
- package/lib/components/link-list/link-list.js +48 -45
- package/lib/components/link-list/link-list.js.map +1 -0
- package/lib/components/link-list/link-list.styles.js +4 -0
- package/lib/components/link-list/link-list.styles.js.map +1 -0
- package/lib/components/link-list-item/link-list-item.js +40 -37
- package/lib/components/link-list-item/link-list-item.js.map +1 -0
- package/lib/components/link-list-item/link-list-item.styles.js +4 -0
- package/lib/components/link-list-item/link-list-item.styles.js.map +1 -0
- package/lib/components/list/list.js +35 -32
- package/lib/components/list/list.js.map +1 -0
- package/lib/components/list/list.styles.js +4 -0
- package/lib/components/list/list.styles.js.map +1 -0
- package/lib/components/list-item/list-item.js +25 -21
- package/lib/components/list-item/list-item.js.map +1 -0
- package/lib/components/list-item/list-item.styles.js +4 -0
- package/lib/components/list-item/list-item.styles.js.map +1 -0
- package/lib/components/loading-spinner/loading-spinner.js +126 -71
- package/lib/components/loading-spinner/loading-spinner.js.map +1 -0
- package/lib/components/loading-spinner/loading-spinner.styles.js +4 -0
- package/lib/components/loading-spinner/loading-spinner.styles.js.map +1 -0
- package/lib/components/logo/logo.js +28 -25
- package/lib/components/logo/logo.js.map +1 -0
- package/lib/components/logo/logo.styles.js +4 -0
- package/lib/components/logo/logo.styles.js.map +1 -0
- package/lib/components/main/main.js +29 -26
- package/lib/components/main/main.js.map +1 -0
- package/lib/components/main/main.styles.js +4 -0
- package/lib/components/main/main.styles.js.map +1 -0
- package/lib/components/modal/modal.js +174 -125
- package/lib/components/modal/modal.js.map +1 -0
- package/lib/components/modal/modal.styles.js +4 -0
- package/lib/components/modal/modal.styles.js.map +1 -0
- package/lib/components/multi-select/multi-select.js +300 -211
- package/lib/components/multi-select/multi-select.js.map +1 -0
- package/lib/components/multi-select/multi-select.styles.js +4 -0
- package/lib/components/multi-select/multi-select.styles.js.map +1 -0
- package/lib/components/nav-container/nav-container.js +19 -16
- package/lib/components/nav-container/nav-container.js.map +1 -0
- package/lib/components/nav-container/nav-container.styles.js +4 -0
- package/lib/components/nav-container/nav-container.styles.js.map +1 -0
- package/lib/components/page-header/page-header.js +36 -29
- package/lib/components/page-header/page-header.js.map +1 -0
- package/lib/components/page-header/page-header.styles.js +4 -0
- package/lib/components/page-header/page-header.styles.js.map +1 -0
- package/lib/components/pagination/page-counter/page-counter.js +67 -0
- package/lib/components/pagination/page-counter/page-counter.js.map +1 -0
- package/lib/components/pagination/page-counter/page-counter.styles.js +4 -0
- package/lib/components/pagination/page-counter/page-counter.styles.js.map +1 -0
- package/lib/components/pagination/pagination.js +282 -237
- package/lib/components/pagination/pagination.js.map +1 -0
- package/lib/components/pagination/pagination.styles.js +4 -0
- package/lib/components/pagination/pagination.styles.js.map +1 -0
- package/lib/components/percent-bar/percent-bar.js +56 -48
- package/lib/components/percent-bar/percent-bar.js.map +1 -0
- package/lib/components/percent-bar/percent-bar.styles.js +4 -0
- package/lib/components/percent-bar/percent-bar.styles.js.map +1 -0
- package/lib/components/popover/popover.js +304 -179
- package/lib/components/popover/popover.js.map +1 -0
- package/lib/components/popover/popover.styles.js +4 -0
- package/lib/components/popover/popover.styles.js.map +1 -0
- package/lib/components/primary-nav/primary-nav.js +44 -37
- package/lib/components/primary-nav/primary-nav.js.map +1 -0
- package/lib/components/primary-nav/primary-nav.styles.js +4 -0
- package/lib/components/primary-nav/primary-nav.styles.js.map +1 -0
- package/lib/components/primary-nav-item/primary-nav-item.js +151 -113
- package/lib/components/primary-nav-item/primary-nav-item.js.map +1 -0
- package/lib/components/primary-nav-item/primary-nav-item.styles.js +4 -0
- package/lib/components/primary-nav-item/primary-nav-item.styles.js.map +1 -0
- package/lib/components/progress-meter/progress-meter.js +74 -57
- package/lib/components/progress-meter/progress-meter.js.map +1 -0
- package/lib/components/progress-meter/progress-meter.styles.js +4 -0
- package/lib/components/progress-meter/progress-meter.styles.js.map +1 -0
- package/lib/components/progress-steps/progress-steps.js +19 -0
- package/lib/components/progress-steps/progress-steps.js.map +1 -0
- package/lib/components/progress-steps/progress-steps.styles.js +4 -0
- package/lib/components/progress-steps/progress-steps.styles.js.map +1 -0
- package/lib/components/progress-steps-item/progress-steps-item.js +52 -40
- package/lib/components/progress-steps-item/progress-steps-item.js.map +1 -0
- package/lib/components/progress-steps-item/progress-steps-item.styles.js +4 -0
- package/lib/components/progress-steps-item/progress-steps-item.styles.js.map +1 -0
- package/lib/components/radio-field/radio-field.js +59 -49
- package/lib/components/radio-field/radio-field.js.map +1 -0
- package/lib/components/radio-field/radio-field.styles.js +4 -0
- package/lib/components/radio-field/radio-field.styles.js.map +1 -0
- package/lib/components/radio-field-item/radio-field-item.js +222 -179
- package/lib/components/radio-field-item/radio-field-item.js.map +1 -0
- package/lib/components/radio-field-item/radio-field-item.styles.js +4 -0
- package/lib/components/radio-field-item/radio-field-item.styles.js.map +1 -0
- package/lib/components/remove-tag/remove-tag.js +89 -60
- package/lib/components/remove-tag/remove-tag.js.map +1 -0
- package/lib/components/remove-tag/remove-tag.styles.js +4 -0
- package/lib/components/remove-tag/remove-tag.styles.js.map +1 -0
- package/lib/components/section/section.js +46 -27
- package/lib/components/section/section.js.map +1 -0
- package/lib/components/section/section.styles.js +4 -0
- package/lib/components/section/section.styles.js.map +1 -0
- package/lib/components/select/select.js +243 -158
- package/lib/components/select/select.js.map +1 -0
- package/lib/components/select/select.styles.js +4 -0
- package/lib/components/select/select.styles.js.map +1 -0
- package/lib/components/select-tile/select-tile-checkbox-controller.js +60 -0
- package/lib/components/select-tile/select-tile-checkbox-controller.js.map +1 -0
- package/lib/components/select-tile/select-tile-radio-controller.js +167 -0
- package/lib/components/select-tile/select-tile-radio-controller.js.map +1 -0
- package/lib/components/select-tile/select-tile.js +228 -223
- package/lib/components/select-tile/select-tile.js.map +1 -0
- package/lib/components/select-tile/select-tile.styles.js +4 -0
- package/lib/components/select-tile/select-tile.styles.js.map +1 -0
- package/lib/components/select-tile-list/select-tile-list.js +76 -62
- package/lib/components/select-tile-list/select-tile-list.js.map +1 -0
- package/lib/components/select-tile-list/select-tile-list.styles.js +4 -0
- package/lib/components/select-tile-list/select-tile-list.styles.js.map +1 -0
- package/lib/components/skeleton-loader/skeleton-loader.js +68 -39
- package/lib/components/skeleton-loader/skeleton-loader.js.map +1 -0
- package/lib/components/skeleton-loader/skeleton-loader.styles.js +4 -0
- package/lib/components/skeleton-loader/skeleton-loader.styles.js.map +1 -0
- package/lib/components/split-button/split-button.js +51 -46
- package/lib/components/split-button/split-button.js.map +1 -0
- package/lib/components/split-button/split-button.styles.js +4 -0
- package/lib/components/split-button/split-button.styles.js.map +1 -0
- package/lib/components/submenu/submenu.js +19 -16
- package/lib/components/submenu/submenu.js.map +1 -0
- package/lib/components/submenu/submenu.styles.js +4 -0
- package/lib/components/submenu/submenu.styles.js.map +1 -0
- package/lib/components/submenu-item/submenu-item.js +32 -26
- package/lib/components/submenu-item/submenu-item.js.map +1 -0
- package/lib/components/submenu-item/submenu-item.styles.js +4 -0
- package/lib/components/submenu-item/submenu-item.styles.js.map +1 -0
- package/lib/components/tab/tab.js +74 -63
- package/lib/components/tab/tab.js.map +1 -0
- package/lib/components/tab/tab.styles.js +4 -0
- package/lib/components/tab/tab.styles.js.map +1 -0
- package/lib/components/tab-panel/tab-panel.js +49 -43
- package/lib/components/tab-panel/tab-panel.js.map +1 -0
- package/lib/components/tab-panel/tab-panel.styles.js +4 -0
- package/lib/components/tab-panel/tab-panel.styles.js.map +1 -0
- package/lib/components/table/table.js +46 -41
- package/lib/components/table/table.js.map +1 -0
- package/lib/components/table/table.styles.js +4 -0
- package/lib/components/table/table.styles.js.map +1 -0
- package/lib/components/table-body/table-body.js +20 -17
- package/lib/components/table-body/table-body.js.map +1 -0
- package/lib/components/table-body/table-body.styles.js +4 -0
- package/lib/components/table-body/table-body.styles.js.map +1 -0
- package/lib/components/table-cell/table-cell.js +39 -36
- package/lib/components/table-cell/table-cell.js.map +1 -0
- package/lib/components/table-cell/table-cell.styles.js +4 -0
- package/lib/components/table-cell/table-cell.styles.js.map +1 -0
- package/lib/components/table-header/table-header.js +20 -17
- package/lib/components/table-header/table-header.js.map +1 -0
- package/lib/components/table-header/table-header.styles.js +4 -0
- package/lib/components/table-header/table-header.styles.js.map +1 -0
- package/lib/components/table-header-cell/table-header-cell.js +35 -32
- package/lib/components/table-header-cell/table-header-cell.js.map +1 -0
- package/lib/components/table-header-cell/table-header-cell.styles.js +4 -0
- package/lib/components/table-header-cell/table-header-cell.styles.js.map +1 -0
- package/lib/components/table-object/table-object.js +21 -18
- package/lib/components/table-object/table-object.js.map +1 -0
- package/lib/components/table-object/table-object.styles.js +4 -0
- package/lib/components/table-object/table-object.styles.js.map +1 -0
- package/lib/components/table-row/table-row.js +76 -55
- package/lib/components/table-row/table-row.js.map +1 -0
- package/lib/components/table-row/table-row.styles.js +4 -0
- package/lib/components/table-row/table-row.styles.js.map +1 -0
- package/lib/components/tabs/tabs.js +452 -303
- package/lib/components/tabs/tabs.js.map +1 -0
- package/lib/components/tabs/tabs.styles.js +4 -0
- package/lib/components/tabs/tabs.styles.js.map +1 -0
- package/lib/components/tag/tag.js +236 -167
- package/lib/components/tag/tag.js.map +1 -0
- package/lib/components/tag/tag.styles.js +4 -0
- package/lib/components/tag/tag.styles.js.map +1 -0
- package/lib/components/tag-list/tag-list.js +40 -35
- package/lib/components/tag-list/tag-list.js.map +1 -0
- package/lib/components/tag-list/tag-list.styles.js +4 -0
- package/lib/components/tag-list/tag-list.styles.js.map +1 -0
- package/lib/components/tertiary-nav/tertiary-nav.js +40 -33
- package/lib/components/tertiary-nav/tertiary-nav.js.map +1 -0
- package/lib/components/tertiary-nav/tertiary-nav.styles.js +4 -0
- package/lib/components/tertiary-nav/tertiary-nav.styles.js.map +1 -0
- package/lib/components/tertiary-nav-item/tertiary-nav-item.js +52 -43
- package/lib/components/tertiary-nav-item/tertiary-nav-item.js.map +1 -0
- package/lib/components/tertiary-nav-item/tertiary-nav-item.styles.js +4 -0
- package/lib/components/tertiary-nav-item/tertiary-nav-item.styles.js.map +1 -0
- package/lib/components/text-link/text-link.js +45 -41
- package/lib/components/text-link/text-link.js.map +1 -0
- package/lib/components/text-link/text-link.styles.js +4 -0
- package/lib/components/text-link/text-link.styles.js.map +1 -0
- package/lib/components/text-passage/text-passage-light-dom.js +145 -0
- package/lib/components/text-passage/text-passage-light-dom.js.map +1 -0
- package/lib/components/text-passage/text-passage-light-dom.styles.js +4 -0
- package/lib/components/text-passage/text-passage-light-dom.styles.js.map +1 -0
- package/lib/components/text-passage/text-passage.js +72 -44
- package/lib/components/text-passage/text-passage.js.map +1 -0
- package/lib/components/text-passage/text-passage.styles.js +4 -0
- package/lib/components/text-passage/text-passage.styles.js.map +1 -0
- package/lib/components/tooltip/tooltip.js +278 -173
- package/lib/components/tooltip/tooltip.js.map +1 -0
- package/lib/components/tooltip/tooltip.styles.js +4 -0
- package/lib/components/tooltip/tooltip.styles.js.map +1 -0
- package/lib/components/utility-nav/utility-nav.js +40 -33
- package/lib/components/utility-nav/utility-nav.js.map +1 -0
- package/lib/components/utility-nav/utility-nav.styles.js +4 -0
- package/lib/components/utility-nav/utility-nav.styles.js.map +1 -0
- package/lib/components/utility-nav-item/utility-nav-item.js +70 -49
- package/lib/components/utility-nav-item/utility-nav-item.js.map +1 -0
- package/lib/components/utility-nav-item/utility-nav-item.styles.js +4 -0
- package/lib/components/utility-nav-item/utility-nav-item.styles.js.map +1 -0
- package/lib/design-tokens/brands/blue/css/tokens_blue.module.js +737 -0
- package/lib/design-tokens/brands/blue/css/tokens_blue.module.js.map +1 -0
- package/lib/design-tokens/brands/bolt/tokens_bolt.theme.js +756 -0
- package/lib/design-tokens/brands/bolt/tokens_bolt.theme.js.map +1 -0
- package/lib/design-tokens/brands/cre8/css/tokens_cre8.module.js +771 -0
- package/lib/design-tokens/brands/cre8/css/tokens_cre8.module.js.map +1 -0
- package/lib/design-tokens/brands/cre8-a2ui/css/tokens_cre8-a2ui.module.js +772 -0
- package/lib/design-tokens/brands/cre8-a2ui/css/tokens_cre8-a2ui.module.js.map +1 -0
- package/lib/design-tokens/brands/cre8-legacy/css/tokens_cre8-legacy.module.js +737 -0
- package/lib/design-tokens/brands/cre8-legacy/css/tokens_cre8-legacy.module.js.map +1 -0
- package/lib/design-tokens/brands/femmecubator/css/tokens_femmecubator2.module.js +983 -0
- package/lib/design-tokens/brands/femmecubator/css/tokens_femmecubator2.module.js.map +1 -0
- package/lib/design-tokens/brands/legacy/css/tokens_legacy.module.js +737 -0
- package/lib/design-tokens/brands/legacy/css/tokens_legacy.module.js.map +1 -0
- package/lib/design-tokens/brands/marketing/css/tokens_marketing.module.js +736 -0
- package/lib/design-tokens/brands/marketing/css/tokens_marketing.module.js.map +1 -0
- package/lib/design-tokens/brands/minimalist/css/tokens_minimalist.module.js +737 -0
- package/lib/design-tokens/brands/minimalist/css/tokens_minimalist.module.js.map +1 -0
- package/lib/design-tokens/brands/prisma/tokens_prisma.module.js +771 -0
- package/lib/design-tokens/brands/prisma/tokens_prisma.module.js.map +1 -0
- package/lib/design-tokens/brands/starbucks/tokens.module.js +552 -0
- package/lib/design-tokens/brands/starbucks/tokens.module.js.map +1 -0
- package/lib/design-tokens/brands/starbucks/tokens_starbucks.module.js +776 -0
- package/lib/design-tokens/brands/starbucks/tokens_starbucks.module.js.map +1 -0
- package/lib/design-tokens/brands copy/blue/css/tokens_blue.module.js +253 -0
- package/lib/design-tokens/brands copy/blue/css/tokens_blue.module.js.map +1 -0
- package/lib/design-tokens/core/scss/theming/head.module.js +6 -0
- package/lib/design-tokens/core/scss/theming/head.module.js.map +1 -0
- package/lib/design-tokens/tokens_netflix.theme.js +806 -0
- package/lib/design-tokens/tokens_netflix.theme.js.map +1 -0
- package/lib/directives/if-truthy.js +24 -0
- package/lib/directives/if-truthy.js.map +1 -0
- package/lib/directives/spread.js +29 -0
- package/lib/directives/spread.js.map +1 -0
- package/lib/index.js +84 -168
- package/lib/index.js.map +1 -0
- package/lib/scripts/convert-scss-to-ts.js +25 -0
- package/lib/scripts/convert-scss-to-ts.js.map +1 -0
- package/lib/scripts/extract-tokens.js +120 -0
- package/lib/scripts/extract-tokens.js.map +1 -0
- package/lib/scripts/generate-react-wrappers.js +229 -0
- package/lib/scripts/generate-react-wrappers.js.map +1 -0
- package/lib/scripts/generateWesparkleThemes.js +52 -0
- package/lib/scripts/generateWesparkleThemes.js.map +1 -0
- package/lib/toBeAccessible.js +18 -0
- package/lib/toBeAccessible.js.map +1 -0
- package/lib/utilities/is-mobile.js +10 -0
- package/lib/utilities/is-mobile.js.map +1 -0
- package/lib/utilities/story-helpers.js +14 -0
- package/lib/utilities/story-helpers.js.map +1 -0
- package/lib/vite.config.cdn.js +85 -0
- package/lib/vite.config.cdn.js.map +1 -0
- package/lib/vite.config.js +156 -0
- package/lib/vite.config.js.map +1 -0
- package/package.json +8 -9
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loading-spinner.styles.js","sourceRoot":"","sources":["../../../components/loading-spinner/loading-spinner.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,MAAM,MAAM,GAAG,GAAG,CAAA,8/JAA8/J,CAAC;AACjhK,eAAe,MAAM,CAAC","sourcesContent":["import { css } from 'lit';\nconst styles = css`*,::slotted(*),*:before,*:after{box-sizing:border-box}:root{--size-base-unit: 0.5rem}[dir=rtl]{--rtlTranslateX: 50%;--rtlGradientToRight: 270deg;--rtlRotate45Inverse: -45deg}:host{--cre8-z-index-1: 1;--cre8-z-index-50: 50;--cre8-z-index-100: 100;--cre8-z-index-200: 200;--cre8-z-index-1030: 1030;--cre8-anim-fade-quick: 0.35s;--cre8-anim-ease: ease}@keyframes fadeIn{100%{opacity:1}}@keyframes slideIn{100%{transform:translateX(0)}}@keyframes slideInFwd{100%{width:272px;height:272px}}@keyframes slideOutRight{100%{width:272px;height:272px}}@keyframes slideUp{100%{transform:translateY(0)}}@media(width >= 481px){@keyframes slideInFwd{100%{width:417px;height:417px}}@keyframes slideOutRight{100%{width:417px;height:417px}}}@media(width >= 48rem){@keyframes slideInFwd{100%{width:330px;height:330px}}@keyframes slideOutRight{100%{width:330px;height:330px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 60rem){@keyframes slideInFwd{100%{width:460px;height:460px}}@keyframes slideOutRight{100%{width:460px;height:460px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 75rem){@keyframes slideInFwd{100%{width:592px;height:591px}}@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 87.5rem){@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 120px))}}}@media(width >= 2200px){@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 592px))}}}span.ripple{position:absolute;border-radius:50%;transform:scale(0);animation:ripple 600ms linear;background-color:var(--ripple-bg-color)}@keyframes ripple{to{transform:scale(4);opacity:1}}:root{--size-base-unit: 0.5rem}[dir=rtl]{--rtlTranslateX: 50%;--rtlGradientToRight: 270deg;--rtlRotate45Inverse: -45deg}@keyframes loading{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes spinner-circle-animation{0%,25%{stroke-dashoffset:280;transform:rotate(0)}50%,75%{stroke-dashoffset:75;transform:rotate(45deg)}100%{stroke-dashoffset:280;transform:rotate(360deg)}}:host{display:inline-block;--spinner-stroke-dasharray: 282.743px;--spinner-large-stroke-width: 10;--spinner-small-stroke-width: 14;--spinner-large-width: 4.5rem;--spinner-small-width: 1.5rem;font-family:var(--cre8-typography-label-small-font-family);font-size:var(--cre8-typography-label-small-font-size);font-weight:var(--cre8-typography-label-small-font-weight);line-height:var(--cre8-typography-label-small-line-height);text-decoration:var(--cre8-typography-label-small-text-decoration);text-transform:var(--cre8-typography-label-small-text-transform)}.cre8-c-spinner,.cre8-c-spinner--large{--spinner-height: var(--spinner-large-width);--spinner-width: var(--spinner-large-width);--icon-color: var(--cre8-color-content-brand)}.cre8-c-spinner .cre8-c-spinner__icon,.cre8-c-spinner--large .cre8-c-spinner__icon{display:block}.cre8-c-spinner .cre8-c-spinner__label,.cre8-c-spinner--large .cre8-c-spinner__label{display:block;margin-top:var(--cre8-spacing-8)}.cre8-c-spinner--small{--spinner-height: var(--spinner-small-width);--spinner-width: var(--spinner-small-width);--icon-color: var(--cre8-color-content-brand);display:flex;align-items:center}.cre8-c-spinner--small .cre8-c-spinner__label{display:inline-block;margin-left:var(--cre8-spacing-8);margin-top:0;vertical-align:.35rem}.cre8-c-spinner--inverse{--icon-color: var(--cre8-color-content-brand-knockout);--label-color: var(--cre8-color-content-brand-knockout)}.cre8-c-spinner--secondary.cre8-c-spinner--inverse.cre8-c-spinner--neutral{--icon-color: var(--cre8-color-button-secondary-neutral-inverse-content-active);--label-color: var(--cre8-color-button-secondary-neutral-inverse-content-active)}.cre8-c-spinner--neutral{--icon-color: var(--cre8-color-button-secondary-neutral-content-active)}.cre8-c-spinner--primary.cre8-c-spinner--inverse{--icon-color: var(--cre8-color-button-primary-inverse-content-active)}.cre8-c-spinner--secondary.cre8-c-spinner--inverse{--icon-color: var(--cre8-color-button-secondary-inverse-content-active)}.cre8-c-spinner--tertiary.cre8-c-spinner--inverse{--icon-color: var(--cre8-color-button-tertiary-inverse-content-active)}.cre8-c-spinner__label{color:var(--label-color, var(--cre8-color-content-default))}.cre8-c-spinner__hidden-label{display:none}.cre8-c-spinner__icon{height:var(--spinner-height, 1em);width:var(--spinner-width, 1em)}.cre8-c-spinner__icon circle{fill:rgba(0,0,0,0);stroke:var(--icon-color, inherit);stroke-dasharray:var(--spinner-stroke-dasharray);stroke-linecap:round;stroke-width:var(--spinner-large-stroke-width);transform-origin:50% 50%}.cre8-c-spinner__icon-small circle{stroke-width:var(--spinner-small-stroke-width)}.cre8-c-spinner--indeterminate .cre8-c-spinner__icon{animation:loading 2s linear 0s infinite}.cre8-c-spinner--indeterminate .cre8-c-spinner__icon circle{animation-duration:1.4s;animation-iteration-count:infinite;animation-name:spinner-circle-animation;animation-timing-function:ease-in-out}.cre8-c-spinner--determinate .cre8-c-spinner__icon{overflow:hidden;transform:rotate(-90deg);transform-origin:center center}`;\nexport default styles;\n"]}
|
|
@@ -1,29 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
for (var e = void 0, i = a.length - 1, l; i >= 0; i--)
|
|
7
|
-
(l = a[i]) && (e = l(t, d, e) || e);
|
|
8
|
-
return e && f(t, d, e), e;
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
9
6
|
};
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
7
|
+
import { html, } from 'lit';
|
|
8
|
+
import { property } from 'lit/decorators.js';
|
|
9
|
+
import { Cre8Element } from '../cre8-element';
|
|
10
|
+
import styles from './logo.styles.js';
|
|
11
|
+
/**
|
|
12
|
+
* @slot - The logo element
|
|
13
|
+
*/
|
|
14
|
+
export class Cre8Logo extends Cre8Element {
|
|
15
|
+
render() {
|
|
16
|
+
const componentClassName = this.componentClassNames('cre8-c-logo', {});
|
|
17
|
+
return html `
|
|
18
|
+
<a href="${this.href}" class="${componentClassName}">
|
|
15
19
|
|
|
16
20
|
</a>
|
|
17
21
|
`;
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
customElements.
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
};
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
Cre8Logo.styles = [styles];
|
|
25
|
+
__decorate([
|
|
26
|
+
property()
|
|
27
|
+
], Cre8Logo.prototype, "href", void 0);
|
|
28
|
+
if (customElements.get('cre8-logo') === undefined) {
|
|
29
|
+
customElements.define('cre8-logo', Cre8Logo);
|
|
30
|
+
}
|
|
31
|
+
export default Cre8Logo;
|
|
32
|
+
//# sourceMappingURL=logo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logo.js","sourceRoot":"","sources":["../../../components/logo/logo.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,GAAI,MAAM,KAAK,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,MAAM,MAAM,kBAAkB,CAAC;AAEtC;;GAEG;AACH,MAAM,OAAO,QAAS,SAAQ,WAAW;IASvC,MAAM;QACF,MAAM,kBAAkB,GAAG,IAAI,CAAC,mBAAmB,CAAC,aAAa,EAAE,EAAE,CAAC,CAAC;QAEvE,OAAO,IAAI,CAAA;iBACA,IAAI,CAAC,IAAI,YAAY,kBAAkB;;;KAGnD,CAAC;IACJ,CAAC;;AAhBQ,eAAM,GAAG,CAAC,MAAM,CAAC,CAAC;AAMvB;IADH,QAAQ,EAAE;sCACO;AAapB,IAAI,cAAc,CAAC,GAAG,CAAC,WAAW,CAAC,KAAK,SAAS,EAAE,CAAC;IAChD,cAAc,CAAC,MAAM,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;AACjD,CAAC;AAQD,eAAe,QAAQ,CAAC","sourcesContent":["import { html, } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { Cre8Element } from '../cre8-element';\nimport styles from './logo.styles.js';\n\n/**\n * @slot - The logo element\n */\nexport class Cre8Logo extends Cre8Element {\n static styles = [styles];\n\n /**\n * Logo link\n */\n @property()\n href?: string;\n\n render() {\n const componentClassName = this.componentClassNames('cre8-c-logo', {});\n\n return html`\n <a href=\"${this.href}\" class=\"${componentClassName}\">\n \n </a>\n `;\n }\n}\n\nif (customElements.get('cre8-logo') === undefined) {\n customElements.define('cre8-logo', Cre8Logo);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'cre8-logo': Cre8Logo;\n }\n}\n\nexport default Cre8Logo;\n"]}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { css } from 'lit';
|
|
2
|
+
const styles = css `*,::slotted(*),*:before,*:after{box-sizing:border-box}:root{--size-base-unit: 0.5rem}[dir=rtl]{--rtlTranslateX: 50%;--rtlGradientToRight: 270deg;--rtlRotate45Inverse: -45deg}:host{--cre8-z-index-1: 1;--cre8-z-index-50: 50;--cre8-z-index-100: 100;--cre8-z-index-200: 200;--cre8-z-index-1030: 1030;--cre8-anim-fade-quick: 0.35s;--cre8-anim-ease: ease}@keyframes fadeIn{100%{opacity:1}}@keyframes slideIn{100%{transform:translateX(0)}}@keyframes slideInFwd{100%{width:272px;height:272px}}@keyframes slideOutRight{100%{width:272px;height:272px}}@keyframes slideUp{100%{transform:translateY(0)}}@media(width >= 481px){@keyframes slideInFwd{100%{width:417px;height:417px}}@keyframes slideOutRight{100%{width:417px;height:417px}}}@media(width >= 48rem){@keyframes slideInFwd{100%{width:330px;height:330px}}@keyframes slideOutRight{100%{width:330px;height:330px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 60rem){@keyframes slideInFwd{100%{width:460px;height:460px}}@keyframes slideOutRight{100%{width:460px;height:460px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 75rem){@keyframes slideInFwd{100%{width:592px;height:591px}}@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 87.5rem){@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 120px))}}}@media(width >= 2200px){@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 592px))}}}span.ripple{position:absolute;border-radius:50%;transform:scale(0);animation:ripple 600ms linear;background-color:var(--ripple-bg-color)}@keyframes ripple{to{transform:scale(4);opacity:1}}:root{--size-base-unit: 0.5rem}[dir=rtl]{--rtlTranslateX: 50%;--rtlGradientToRight: 270deg;--rtlRotate45Inverse: -45deg}.cre8-c-logo{display:flex}`;
|
|
3
|
+
export default styles;
|
|
4
|
+
//# sourceMappingURL=logo.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logo.styles.js","sourceRoot":"","sources":["../../../components/logo/logo.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,MAAM,MAAM,GAAG,GAAG,CAAA,oyDAAoyD,CAAC;AACvzD,eAAe,MAAM,CAAC","sourcesContent":["import { css } from 'lit';\nconst styles = css`*,::slotted(*),*:before,*:after{box-sizing:border-box}:root{--size-base-unit: 0.5rem}[dir=rtl]{--rtlTranslateX: 50%;--rtlGradientToRight: 270deg;--rtlRotate45Inverse: -45deg}:host{--cre8-z-index-1: 1;--cre8-z-index-50: 50;--cre8-z-index-100: 100;--cre8-z-index-200: 200;--cre8-z-index-1030: 1030;--cre8-anim-fade-quick: 0.35s;--cre8-anim-ease: ease}@keyframes fadeIn{100%{opacity:1}}@keyframes slideIn{100%{transform:translateX(0)}}@keyframes slideInFwd{100%{width:272px;height:272px}}@keyframes slideOutRight{100%{width:272px;height:272px}}@keyframes slideUp{100%{transform:translateY(0)}}@media(width >= 481px){@keyframes slideInFwd{100%{width:417px;height:417px}}@keyframes slideOutRight{100%{width:417px;height:417px}}}@media(width >= 48rem){@keyframes slideInFwd{100%{width:330px;height:330px}}@keyframes slideOutRight{100%{width:330px;height:330px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 60rem){@keyframes slideInFwd{100%{width:460px;height:460px}}@keyframes slideOutRight{100%{width:460px;height:460px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 75rem){@keyframes slideInFwd{100%{width:592px;height:591px}}@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 87.5rem){@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 120px))}}}@media(width >= 2200px){@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 592px))}}}span.ripple{position:absolute;border-radius:50%;transform:scale(0);animation:ripple 600ms linear;background-color:var(--ripple-bg-color)}@keyframes ripple{to{transform:scale(4);opacity:1}}:root{--size-base-unit: 0.5rem}[dir=rtl]{--rtlTranslateX: 50%;--rtlGradientToRight: 270deg;--rtlRotate45Inverse: -45deg}.cre8-c-logo{display:flex}`;\nexport default styles;\n"]}
|
|
@@ -1,27 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
for (var e = void 0, r = a.length - 1, d; r >= 0; r--)
|
|
7
|
-
(d = a[r]) && (e = d(t, l, e) || e);
|
|
8
|
-
return e && f(t, l, e), e;
|
|
9
|
-
};
|
|
10
|
-
const s = class s extends o {
|
|
11
|
-
render() {
|
|
12
|
-
const t = this.componentClassNames("cre8-c-main", {
|
|
13
|
-
"cre8-c-main--full-height": this.fullHeight === !0
|
|
14
|
-
});
|
|
15
|
-
return h`<main class=${t}><slot></slot></main>`;
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
s.styles = [p];
|
|
19
|
-
let i = s;
|
|
20
|
-
c([
|
|
21
|
-
m({ type: Boolean, reflect: !0 })
|
|
22
|
-
], i.prototype, "fullHeight");
|
|
23
|
-
customElements.get("cre8-main") === void 0 && customElements.define("cre8-main", i);
|
|
24
|
-
export {
|
|
25
|
-
i as Cre8Main,
|
|
26
|
-
i as default
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
27
6
|
};
|
|
7
|
+
import { html, } from 'lit';
|
|
8
|
+
import { property } from 'lit/decorators.js';
|
|
9
|
+
import { Cre8Element } from '../cre8-element';
|
|
10
|
+
import styles from './main.styles.js';
|
|
11
|
+
/**
|
|
12
|
+
* @slot - The main content
|
|
13
|
+
*/
|
|
14
|
+
export class Cre8Main extends Cre8Element {
|
|
15
|
+
render() {
|
|
16
|
+
const componentClassName = this.componentClassNames('cre8-c-main', {
|
|
17
|
+
'cre8-c-main--full-height': this.fullHeight === true,
|
|
18
|
+
});
|
|
19
|
+
return html `<main class=${componentClassName}><slot></slot></main>`;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
Cre8Main.styles = [styles];
|
|
23
|
+
__decorate([
|
|
24
|
+
property({ type: Boolean, reflect: true })
|
|
25
|
+
], Cre8Main.prototype, "fullHeight", void 0);
|
|
26
|
+
if (customElements.get('cre8-main') === undefined) {
|
|
27
|
+
customElements.define('cre8-main', Cre8Main);
|
|
28
|
+
}
|
|
29
|
+
export default Cre8Main;
|
|
30
|
+
//# sourceMappingURL=main.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"main.js","sourceRoot":"","sources":["../../../components/main/main.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,GAAI,MAAM,KAAK,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,MAAM,MAAM,kBAAkB,CAAC;AAEtC;;GAEG;AACH,MAAM,OAAO,QAAS,SAAQ,WAAW;IAUvC,MAAM;QACF,MAAM,kBAAkB,GAAG,IAAI,CAAC,mBAAmB,CAAC,aAAa,EAAE;YAC/D,0BAA0B,EAAE,IAAI,CAAC,UAAU,KAAK,IAAI;SACvD,CAAC,CAAC;QAEH,OAAO,IAAI,CAAA,eAAe,kBAAkB,uBAAuB,CAAC;IACxE,CAAC;;AAfQ,eAAM,GAAG,CAAC,MAAM,CAAC,CAAC;AAOvB;IADH,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;4CAClB;AAW3B,IAAI,cAAc,CAAC,GAAG,CAAC,WAAW,CAAC,KAAK,SAAS,EAAE,CAAC;IAChD,cAAc,CAAC,MAAM,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;AACjD,CAAC;AAQD,eAAe,QAAQ,CAAC","sourcesContent":["import { html, } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { Cre8Element } from '../cre8-element';\nimport styles from './main.styles.js';\n\n/**\n * @slot - The main content\n */\nexport class Cre8Main extends Cre8Element {\n static styles = [styles];\n\n /**\n * Full height variant\n * 1) Sets the height to 100%\n */\n @property({ type: Boolean, reflect: true })\n fullHeight?: boolean;\n\n render() {\n const componentClassName = this.componentClassNames('cre8-c-main', {\n 'cre8-c-main--full-height': this.fullHeight === true,\n });\n\n return html`<main class=${componentClassName}><slot></slot></main>`;\n }\n}\n\nif (customElements.get('cre8-main') === undefined) {\n customElements.define('cre8-main', Cre8Main);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'cre8-main': Cre8Main;\n }\n}\n\nexport default Cre8Main;\n"]}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { css } from 'lit';
|
|
2
|
+
const styles = css `*,::slotted(*),*:before,*:after{box-sizing:border-box}:root{--size-base-unit: 0.5rem}[dir=rtl]{--rtlTranslateX: 50%;--rtlGradientToRight: 270deg;--rtlRotate45Inverse: -45deg}:host{--cre8-z-index-1: 1;--cre8-z-index-50: 50;--cre8-z-index-100: 100;--cre8-z-index-200: 200;--cre8-z-index-1030: 1030;--cre8-anim-fade-quick: 0.35s;--cre8-anim-ease: ease}@keyframes fadeIn{100%{opacity:1}}@keyframes slideIn{100%{transform:translateX(0)}}@keyframes slideInFwd{100%{width:272px;height:272px}}@keyframes slideOutRight{100%{width:272px;height:272px}}@keyframes slideUp{100%{transform:translateY(0)}}@media(width >= 481px){@keyframes slideInFwd{100%{width:417px;height:417px}}@keyframes slideOutRight{100%{width:417px;height:417px}}}@media(width >= 48rem){@keyframes slideInFwd{100%{width:330px;height:330px}}@keyframes slideOutRight{100%{width:330px;height:330px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 60rem){@keyframes slideInFwd{100%{width:460px;height:460px}}@keyframes slideOutRight{100%{width:460px;height:460px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 75rem){@keyframes slideInFwd{100%{width:592px;height:591px}}@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 87.5rem){@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 120px))}}}@media(width >= 2200px){@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 592px))}}}span.ripple{position:absolute;border-radius:50%;transform:scale(0);animation:ripple 600ms linear;background-color:var(--ripple-bg-color)}@keyframes ripple{to{transform:scale(4);opacity:1}}:root{--size-base-unit: 0.5rem}[dir=rtl]{--rtlTranslateX: 50%;--rtlGradientToRight: 270deg;--rtlRotate45Inverse: -45deg}:host{display:flex;flex-direction:column;flex:1 0 auto}.cre8-c-main--full-height{display:flex;flex-direction:column;flex:1;height:100%}`;
|
|
3
|
+
export default styles;
|
|
4
|
+
//# sourceMappingURL=main.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"main.styles.js","sourceRoot":"","sources":["../../../components/main/main.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,MAAM,MAAM,GAAG,GAAG,CAAA,i5DAAi5D,CAAC;AACp6D,eAAe,MAAM,CAAC","sourcesContent":["import { css } from 'lit';\nconst styles = css`*,::slotted(*),*:before,*:after{box-sizing:border-box}:root{--size-base-unit: 0.5rem}[dir=rtl]{--rtlTranslateX: 50%;--rtlGradientToRight: 270deg;--rtlRotate45Inverse: -45deg}:host{--cre8-z-index-1: 1;--cre8-z-index-50: 50;--cre8-z-index-100: 100;--cre8-z-index-200: 200;--cre8-z-index-1030: 1030;--cre8-anim-fade-quick: 0.35s;--cre8-anim-ease: ease}@keyframes fadeIn{100%{opacity:1}}@keyframes slideIn{100%{transform:translateX(0)}}@keyframes slideInFwd{100%{width:272px;height:272px}}@keyframes slideOutRight{100%{width:272px;height:272px}}@keyframes slideUp{100%{transform:translateY(0)}}@media(width >= 481px){@keyframes slideInFwd{100%{width:417px;height:417px}}@keyframes slideOutRight{100%{width:417px;height:417px}}}@media(width >= 48rem){@keyframes slideInFwd{100%{width:330px;height:330px}}@keyframes slideOutRight{100%{width:330px;height:330px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 60rem){@keyframes slideInFwd{100%{width:460px;height:460px}}@keyframes slideOutRight{100%{width:460px;height:460px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 75rem){@keyframes slideInFwd{100%{width:592px;height:591px}}@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 87.5rem){@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 120px))}}}@media(width >= 2200px){@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 592px))}}}span.ripple{position:absolute;border-radius:50%;transform:scale(0);animation:ripple 600ms linear;background-color:var(--ripple-bg-color)}@keyframes ripple{to{transform:scale(4);opacity:1}}:root{--size-base-unit: 0.5rem}[dir=rtl]{--rtlTranslateX: 50%;--rtlGradientToRight: 270deg;--rtlRotate45Inverse: -45deg}:host{display:flex;flex-direction:column;flex:1 0 auto}.cre8-c-main--full-height{display:flex;flex-direction:column;flex:1;height:100%}`;\nexport default styles;\n"]}
|
|
@@ -1,146 +1,195 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const w = m`*,::slotted(*),*:before,*:after{box-sizing:border-box}:root{--size-base-unit: 0.5rem}[dir=rtl]{--rtlTranslateX: 50%;--rtlGradientToRight: 270deg;--rtlRotate45Inverse: -45deg}:host{--cre8-z-index-1: 1;--cre8-z-index-50: 50;--cre8-z-index-100: 100;--cre8-z-index-200: 200;--cre8-z-index-1030: 1030;--cre8-anim-fade-quick: 0.35s;--cre8-anim-ease: ease}@keyframes fadeIn{100%{opacity:1}}@keyframes slideIn{100%{transform:translateX(0)}}@keyframes slideInFwd{100%{width:272px;height:272px}}@keyframes slideOutRight{100%{width:272px;height:272px}}@keyframes slideUp{100%{transform:translateY(0)}}@media(width >= 481px){@keyframes slideInFwd{100%{width:417px;height:417px}}@keyframes slideOutRight{100%{width:417px;height:417px}}}@media(width >= 48rem){@keyframes slideInFwd{100%{width:330px;height:330px}}@keyframes slideOutRight{100%{width:330px;height:330px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 60rem){@keyframes slideInFwd{100%{width:460px;height:460px}}@keyframes slideOutRight{100%{width:460px;height:460px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 75rem){@keyframes slideInFwd{100%{width:592px;height:591px}}@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 87.5rem){@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 120px))}}}@media(width >= 2200px){@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 592px))}}}span.ripple{position:absolute;border-radius:50%;transform:scale(0);animation:ripple 600ms linear;background-color:var(--ripple-bg-color)}@keyframes ripple{to{transform:scale(4);opacity:1}}:root{--size-base-unit: 0.5rem}[dir=rtl]{--rtlTranslateX: 50%;--rtlGradientToRight: 270deg;--rtlRotate45Inverse: -45deg}:host{display:block}.cre8-c-modal{position:fixed;height:100vh;width:100vw;top:0;left:0;display:none;justify-content:center;align-items:center;background:rgba(0,0,0,.25);z-index:1000}.cre8-c-modal.cre8-is-active{display:flex;visibility:visible;opacity:1}.cre8-c-modal__focus-trap{display:contents}.cre8-c-modal__window{display:flex;flex-direction:column;flex-shrink:0;position:fixed;background:var(--cre8-color-bg-default);width:34rem;max-width:100%;border-radius:var(--cre8-border-radius-container);overflow:hidden;overflow-y:auto}@media all and (max-width: 768px){.cre8-c-modal__window{position:inherit;height:100%;width:100%}}.cre8-c-modal__window:focus-visible{outline:var(--cre8-border-width-focus) solid var(--cre8-color-border-active-outline);outline-offset:0.125rem}.cre8-c-modal__header{display:flex;padding:2rem 3rem 1rem;align-items:center}.cre8-c-modal--error .cre8-c-modal__header .cre8-modal-icon{color:var(--cre8-color-content-error-icon)}.cre8-c-modal--warning .cre8-c-modal__header .cre8-modal-icon{color:var(--cre8-color-content-warning-icon)}.cre8-c-modal--success .cre8-c-modal__header .cre8-modal-icon{color:var(--cre8-color-content-success-icon)}.cre8-c-modal--info .cre8-c-modal__header .cre8-modal-icon,.cre8-c-modal--help .cre8-c-modal__header .cre8-modal-icon{color:var(--cre8-color-content-info-icon)}.cre8-c-modal__header-inner{display:flex;align-items:center;gap:1rem}.cre8-c-modal__header-inner cre8-icon .cre8-modal-icon{height:2rem;width:2rem}.cre8-c-modal__body{max-height:240px;overflow:auto;padding:0 3rem}@media all and (max-width: 768px){.cre8-c-modal__body{height:100%;max-height:max-content}}.cre8-c-modal__footer{padding:1.5rem 3rem calc(100vh - 95dvh)}.cre8-c-modal__close-button{margin-left:auto}`;
|
|
7
|
-
var x = Object.defineProperty, r = (d, e, o, _) => {
|
|
8
|
-
for (var s = void 0, c = d.length - 1, n; c >= 0; c--)
|
|
9
|
-
(n = d[c]) && (s = n(e, o, s) || s);
|
|
10
|
-
return s && x(e, o, s), s;
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
11
6
|
};
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}, 200), e.has("isActive")) {
|
|
67
|
-
const o = document.querySelector("body");
|
|
68
|
-
this.isActive ? o.style.overflow = "hidden" : o.style.removeProperty("overflow");
|
|
7
|
+
import { html, } from 'lit';
|
|
8
|
+
import { property, query } from 'lit/decorators.js';
|
|
9
|
+
import svgError from '../../icons/System/Regular/Error.svg?raw';
|
|
10
|
+
import svgWarningFilled from '../../icons/System/Filled/Warning.svg?raw';
|
|
11
|
+
import svgCheckCircle from '../../icons/System/Filled/Check.svg?raw';
|
|
12
|
+
import svgInfoFilled from '../../icons/System/Filled/Info.svg?raw';
|
|
13
|
+
import svgHelp from '../../icons/System/Regular/Help.svg?raw';
|
|
14
|
+
import { Cre8Element } from '../cre8-element';
|
|
15
|
+
import '../icon/icon.js';
|
|
16
|
+
import '@a11y/focus-trap';
|
|
17
|
+
import styles from './modal.styles.js';
|
|
18
|
+
import '../../icons/System/Regular/Close.svg?raw';
|
|
19
|
+
/**
|
|
20
|
+
* Modal component should be used in all modal situations.
|
|
21
|
+
* It is natuarally composable and can even have a custom header and remove the close button.
|
|
22
|
+
* (note: adding `slot="header"` will insert the given element into the header section of the modal,
|
|
23
|
+
* same for `slot="footer"` and no given slot name will inset it into the body)
|
|
24
|
+
*
|
|
25
|
+
* If it is desired to create a utility modal. Cre8Modal requires a status value (see props table below,
|
|
26
|
+
* and a UtilityModalTitle since all utility modals have a cre8-heading)
|
|
27
|
+
* @slot - The component content
|
|
28
|
+
*/
|
|
29
|
+
export class Cre8Modal extends Cre8Element {
|
|
30
|
+
constructor() {
|
|
31
|
+
super(...arguments);
|
|
32
|
+
/**
|
|
33
|
+
* Close Button Text
|
|
34
|
+
*/
|
|
35
|
+
this.closeButtonText = 'close';
|
|
36
|
+
/**
|
|
37
|
+
* Close Button Icon
|
|
38
|
+
*/
|
|
39
|
+
this.closeButtonIcon = 'close';
|
|
40
|
+
/*
|
|
41
|
+
* Maps modal icons and modal status variants to what the alt text of the related icon should be
|
|
42
|
+
* see: (https://digital.#.com/patterns-and-Components/informational-display/alerts-and-notifications#query=alerts)
|
|
43
|
+
* this provides the recommendated alt text of different statuses
|
|
44
|
+
*/
|
|
45
|
+
this.mapStatusToIconModal = (status) => {
|
|
46
|
+
switch (status) {
|
|
47
|
+
case 'error':
|
|
48
|
+
return html `<cre8-icon class="cre8-modal-icon" svg=${svgError} aria-hidden='true'></cre8-icon>`;
|
|
49
|
+
case 'success':
|
|
50
|
+
return html `<cre8-icon class="cre8-modal-icon" svg=${svgCheckCircle} aria-hidden='true'></cre8-icon>`;
|
|
51
|
+
case 'warning':
|
|
52
|
+
return html `<cre8-icon class="cre8-modal-icon" svg=${svgWarningFilled} aria-hidden='true'></cre8-icon>`;
|
|
53
|
+
case 'help':
|
|
54
|
+
return html `<cre8-icon class="cre8-modal-icon" svg=${svgHelp} aria-hidden='true'></cre8-icon>`;
|
|
55
|
+
case 'info':
|
|
56
|
+
return html `<cre8-icon class="cre8-modal-icon" svg=${svgInfoFilled} aria-hidden='true'></cre8-icon>`;
|
|
57
|
+
default:
|
|
58
|
+
return null;
|
|
59
|
+
}
|
|
60
|
+
};
|
|
69
61
|
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
62
|
+
/**
|
|
63
|
+
* Handle keydown
|
|
64
|
+
* 1) Close the modal when escape is hit when the user is focused within the modal
|
|
65
|
+
*/
|
|
66
|
+
handleKeydown(e) {
|
|
67
|
+
if (e.code === 'Escape' && !this.notDismissible) {
|
|
68
|
+
this.handleCloseModal(); /* 2 */
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Handle on close
|
|
73
|
+
* 1) On close, set the modal to not active and dispatch event telling the parent the modal was closed.
|
|
74
|
+
*/
|
|
75
|
+
handleCloseModal() {
|
|
76
|
+
this.isActive = false;
|
|
77
|
+
this.dispatch({
|
|
78
|
+
eventName: 'close-modal',
|
|
79
|
+
detailObj: {
|
|
80
|
+
isActive: this.isActive,
|
|
81
|
+
},
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Handle "click outside"
|
|
86
|
+
* 1) onClick of the area around the modal window, close the modal.
|
|
87
|
+
*/
|
|
88
|
+
handleOnClickOutside(e) {
|
|
89
|
+
const eventTarget = e.target;
|
|
90
|
+
if (this.isActive && this._modalWindow && eventTarget.classList.contains('cre8-c-modal') && !this.notDismissible) {
|
|
91
|
+
this.handleCloseModal();
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Lifecycle method to focus on modal
|
|
96
|
+
* 1) If there is a changed property, and this.isActive === true, then focus on the modal window.
|
|
97
|
+
* 2) Disable the body from scrolling behind while the modal is open.
|
|
98
|
+
*/
|
|
99
|
+
updated(changedProperties) {
|
|
100
|
+
if (this.isActive === true) {
|
|
101
|
+
setTimeout(() => {
|
|
102
|
+
this._modalWindow.focus();
|
|
103
|
+
}, 200);
|
|
104
|
+
} /* 1 */
|
|
105
|
+
if (changedProperties.has('isActive')) {
|
|
106
|
+
const body = document.querySelector('body');
|
|
107
|
+
if (this.isActive) {
|
|
108
|
+
body.style.overflow = 'hidden';
|
|
109
|
+
}
|
|
110
|
+
else {
|
|
111
|
+
body.style.removeProperty('overflow');
|
|
112
|
+
}
|
|
113
|
+
} /* 2 */
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Lifecycle method on removal from the DOM
|
|
117
|
+
* Removed body overflow and handle close (isActive set to false)
|
|
118
|
+
*/
|
|
119
|
+
disconnectedCallback() {
|
|
120
|
+
this.isActive = false;
|
|
121
|
+
const body = document.querySelector('body');
|
|
122
|
+
body.style.removeProperty('overflow');
|
|
123
|
+
}
|
|
124
|
+
render() {
|
|
125
|
+
const componentClassNames = this.componentClassNames('cre8-c-modal', {
|
|
126
|
+
'cre8-is-active': this.isActive,
|
|
127
|
+
'cre8-c-modal--error': this.status === 'error',
|
|
128
|
+
'cre8-c-modal--warning': this.status === 'warning',
|
|
129
|
+
'cre8-c-modal--success': this.status === 'success',
|
|
130
|
+
'cre8-c-modal--info': this.status === 'info',
|
|
131
|
+
'cre8-c-modal--help': this.status === 'help',
|
|
132
|
+
});
|
|
133
|
+
return html `
|
|
134
|
+
<div class="${componentClassNames}" @click="${this.handleOnClickOutside}" @keydown=${this.handleKeydown}>
|
|
89
135
|
<focus-trap class="cre8-c-modal__focus-trap" ?inactive=${!this.isActive}>
|
|
90
136
|
<div class="cre8-c-modal__window" role="dialog" aria-label=${this.ariaLabel} tabindex=${this.isActive ? 0 : -1}>
|
|
91
137
|
<div class="cre8-c-modal__header">
|
|
92
|
-
${this.status
|
|
138
|
+
${this.status
|
|
139
|
+
? html `<div class="cre8-c-modal__header-inner">
|
|
93
140
|
${this.mapStatusToIconModal(this.status)}
|
|
94
|
-
<cre8-heading type="title-large" ?brandColor=${
|
|
95
|
-
</div>`
|
|
96
|
-
|
|
141
|
+
<cre8-heading type="title-large" ?brandColor=${true}>${this.utilityModalTitle}</cre8-heading>
|
|
142
|
+
</div>`
|
|
143
|
+
: html `<slot name="header"></slot>`}
|
|
144
|
+
${!this.notDismissible
|
|
145
|
+
? html `<cre8-button
|
|
97
146
|
class="cre8-c-modal__close-button"
|
|
98
147
|
variant="tertiary"
|
|
99
148
|
text="${this.closeButtonText}"
|
|
100
|
-
?hideText=${
|
|
149
|
+
?hideText=${true}
|
|
101
150
|
iconName="close"
|
|
102
151
|
iconPosition="after"
|
|
103
152
|
?inverted=${!this.status}
|
|
104
153
|
@click=${this.handleCloseModal}
|
|
105
|
-
></cre8-button>`
|
|
154
|
+
></cre8-button>`
|
|
155
|
+
: ''}
|
|
106
156
|
</div>
|
|
107
157
|
<div class="cre8-c-modal__body">
|
|
108
158
|
<slot></slot>
|
|
109
159
|
</div>
|
|
110
|
-
${this.slotNotEmpty(
|
|
160
|
+
${this.slotNotEmpty('footer') && html `<div class="cre8-c-modal__footer"><slot name="footer"></slot></div>`}
|
|
111
161
|
</div>
|
|
112
162
|
</focus-trap>
|
|
113
163
|
</div>
|
|
114
164
|
`;
|
|
115
|
-
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
customElements.
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
};
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
Cre8Modal.styles = [styles];
|
|
168
|
+
__decorate([
|
|
169
|
+
query('.cre8-c-modal__window')
|
|
170
|
+
], Cre8Modal.prototype, "_modalWindow", void 0);
|
|
171
|
+
__decorate([
|
|
172
|
+
property({ type: Boolean, reflect: true })
|
|
173
|
+
], Cre8Modal.prototype, "isActive", void 0);
|
|
174
|
+
__decorate([
|
|
175
|
+
property()
|
|
176
|
+
], Cre8Modal.prototype, "status", void 0);
|
|
177
|
+
__decorate([
|
|
178
|
+
property()
|
|
179
|
+
], Cre8Modal.prototype, "utilityModalTitle", void 0);
|
|
180
|
+
__decorate([
|
|
181
|
+
property({ type: Boolean, reflect: true })
|
|
182
|
+
], Cre8Modal.prototype, "notDismissible", void 0);
|
|
183
|
+
__decorate([
|
|
184
|
+
property()
|
|
185
|
+
], Cre8Modal.prototype, "closeButtonText", void 0);
|
|
186
|
+
__decorate([
|
|
187
|
+
property()
|
|
188
|
+
], Cre8Modal.prototype, "closeButtonIcon", void 0);
|
|
189
|
+
__decorate([
|
|
190
|
+
property()
|
|
191
|
+
], Cre8Modal.prototype, "ariaLabel", void 0);
|
|
192
|
+
if (customElements.get('cre8-modal') === undefined) {
|
|
193
|
+
customElements.define('cre8-modal', Cre8Modal);
|
|
194
|
+
}
|
|
195
|
+
//# sourceMappingURL=modal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modal.js","sourceRoot":"","sources":["../../../components/modal/modal.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAkB,IAAI,GAAG,MAAM,KAAK,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,QAAQ,MAAM,0CAA0C,CAAC;AAChE,OAAO,gBAAgB,MAAM,2CAA2C,CAAC;AACzE,OAAO,cAAc,MAAM,yCAAyC,CAAC;AACrE,OAAO,aAAa,MAAM,wCAAwC,CAAC;AACnE,OAAO,OAAO,MAAM,yCAAyC,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,iBAAiB,CAAC;AACzB,OAAO,kBAAkB,CAAC;AAC1B,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,0CAA0C,CAAC;AAElD;;;;;;;;;GASG;AACH,MAAM,OAAO,SAAU,SAAQ,WAAW;IAA1C;;QA2CI;;WAEG;QAEH,oBAAe,GAAW,OAAO,CAAC;QAElC;;WAEG;QAEH,oBAAe,GAAW,OAAO,CAAC;QAmElC;;;;UAIE;QACF,yBAAoB,GAAG,CAAC,MAAc,EAAE,EAAE;YACtC,QAAQ,MAAM,EAAE,CAAC;gBACb,KAAK,OAAO;oBACR,OAAO,IAAI,CAAA,0CAA0C,QAAQ,kCAAkC,CAAC;gBACpG,KAAK,SAAS;oBACV,OAAO,IAAI,CAAA,0CAA0C,cAAc,kCAAkC,CAAC;gBAC1G,KAAK,SAAS;oBACV,OAAO,IAAI,CAAA,0CAA0C,gBAAgB,kCAAkC,CAAC;gBAC5G,KAAK,MAAM;oBACP,OAAO,IAAI,CAAA,0CAA0C,OAAO,kCAAkC,CAAC;gBACnG,KAAK,MAAM;oBACP,OAAO,IAAI,CAAA,0CAA0C,aAAa,kCAAkC,CAAC;gBACzG;oBACI,OAAO,IAAI,CAAC;YACpB,CAAC;QACL,CAAC,CAAC;IAuDN,CAAC;IAtIG;;;OAGG;IACH,aAAa,CAAC,CAAgB;QAC1B,IAAI,CAAC,CAAC,IAAI,KAAK,QAAQ,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC;YAC9C,IAAI,CAAC,gBAAgB,EAAE,CAAC,CAAC,OAAO;QACpC,CAAC;IACL,CAAC;IAED;;;OAGG;IACH,gBAAgB;QACZ,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;QACtB,IAAI,CAAC,QAAQ,CAAC;YACV,SAAS,EAAE,aAAa;YACxB,SAAS,EAAE;gBACP,QAAQ,EAAE,IAAI,CAAC,QAAQ;aAC1B;SACJ,CAAC,CAAC;IACP,CAAC;IAED;;;OAGG;IAEH,oBAAoB,CAAC,CAAQ;QACzB,MAAM,WAAW,GAAG,CAAC,CAAC,MAAqB,CAAC;QAC5C,IAAI,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,YAAY,IAAI,WAAW,CAAC,SAAS,CAAC,QAAQ,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC;YAC/G,IAAI,CAAC,gBAAgB,EAAE,CAAC;QAC5B,CAAC;IACL,CAAC;IAED;;;;OAIG;IAEH,OAAO,CAAC,iBAAuC;QAC3C,IAAI,IAAI,CAAC,QAAQ,KAAK,IAAI,EAAE,CAAC;YACzB,UAAU,CAAC,GAAG,EAAE;gBACZ,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,CAAC;YAC9B,CAAC,EAAE,GAAG,CAAC,CAAC;QACZ,CAAC,CAAC,OAAO;QAET,IAAI,iBAAiB,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,CAAC;YACpC,MAAM,IAAI,GAAG,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;YAC5C,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;gBAChB,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,QAAQ,CAAC;YACnC,CAAC;iBAAM,CAAC;gBACJ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC;YAC1C,CAAC;QACL,CAAC,CAAC,OAAO;IACb,CAAC;IAwBD;;;OAGG;IACH,oBAAoB;QAChB,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;QACtB,MAAM,IAAI,GAAG,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;QAC5C,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC;IAC1C,CAAC;IAED,MAAM;QACF,MAAM,mBAAmB,GAAG,IAAI,CAAC,mBAAmB,CAAC,cAAc,EAAE;YACjE,gBAAgB,EAAE,IAAI,CAAC,QAAQ;YAC/B,qBAAqB,EAAE,IAAI,CAAC,MAAM,KAAK,OAAO;YAC9C,uBAAuB,EAAE,IAAI,CAAC,MAAM,KAAK,SAAS;YAClD,uBAAuB,EAAE,IAAI,CAAC,MAAM,KAAK,SAAS;YAClD,oBAAoB,EAAE,IAAI,CAAC,MAAM,KAAK,MAAM;YAC5C,oBAAoB,EAAE,IAAI,CAAC,MAAM,KAAK,MAAM;SAC/C,CAAC,CAAC;QAEH,OAAO,IAAI,CAAA;kBACD,mBAAmB,aAAa,IAAI,CAAC,oBAAoB,cAAc,IAAI,CAAC,aAAa;6DAC9C,CAAC,IAAI,CAAC,QAAQ;qEACN,IAAI,CAAC,SAAS,aAAa,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;;cAExG,IAAI,CAAC,MAAM;YACT,CAAC,CAAC,IAAI,CAAA;kBACJ,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,MAAM,CAAC;+DACO,IAAI,IAAI,IAAI,CAAC,iBAAiB;uBACtE;YACP,CAAC,CAAC,IAAI,CAAA,6BAA6B;UACzC,CAAC,IAAI,CAAC,cAAc;YACd,CAAC,CAAC,IAAI,CAAA;;;wBAGE,IAAI,CAAC,eAAe;4BAChB,IAAI;;;4BAGJ,CAAC,IAAI,CAAC,MAAM;yBACf,IAAI,CAAC,gBAAgB;gCACd;YAChB,CAAC,CAAC,EAAE;;;;;UAKV,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,IAAI,IAAI,CAAA,qEAAqE;;;;CAIjH,CAAC;IACE,CAAC;;AAjMM,gBAAM,GAAG,CAAC,MAAM,CAAC,AAAX,CAAY;AAMzB;IADC,KAAK,CAAC,uBAAuB,CAAC;+CACF;AAM7B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;2CACxB;AAgBnB;IADC,QAAQ,EAAE;yCACgD;AAM3D;IADC,QAAQ,EAAE;oDACe;AAM1B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;iDAClB;AAMzB;IADC,QAAQ,EAAE;kDACuB;AAMlC;IADC,QAAQ,EAAE;kDACuB;AAMlC;IADC,QAAQ,EAAE;4CACO;AA0ItB,IAAI,cAAc,CAAC,GAAG,CAAC,YAAY,CAAC,KAAK,SAAS,EAAE,CAAC;IACjD,cAAc,CAAC,MAAM,CAAC,YAAY,EAAE,SAAS,CAAC,CAAC;AACnD,CAAC","sourcesContent":["import { PropertyValues, html, } from 'lit';\nimport { property, query } from 'lit/decorators.js';\nimport svgError from '../../icons/System/Regular/Error.svg?raw';\nimport svgWarningFilled from '../../icons/System/Filled/Warning.svg?raw';\nimport svgCheckCircle from '../../icons/System/Filled/Check.svg?raw';\nimport svgInfoFilled from '../../icons/System/Filled/Info.svg?raw';\nimport svgHelp from '../../icons/System/Regular/Help.svg?raw';\nimport { Cre8Element } from '../cre8-element';\nimport '../icon/icon.js';\nimport '@a11y/focus-trap';\nimport styles from './modal.styles.js';\nimport '../../icons/System/Regular/Close.svg?raw';\n\n/**\n * Modal component should be used in all modal situations.\n * It is natuarally composable and can even have a custom header and remove the close button.\n * (note: adding `slot=\"header\"` will insert the given element into the header section of the modal,\n * same for `slot=\"footer\"` and no given slot name will inset it into the body)\n *\n * If it is desired to create a utility modal. Cre8Modal requires a status value (see props table below,\n * and a UtilityModalTitle since all utility modals have a cre8-heading)\n * @slot - The component content\n */\nexport class Cre8Modal extends Cre8Element {\n static styles = [styles];\n\n /**\n * Query the modal window\n */\n @query('.cre8-c-modal__window')\n _modalWindow: HTMLDivElement;\n\n /**\n * Is Active attribute\n */\n @property({ type: Boolean, reflect: true })\n isActive?: boolean;\n\n /**\n * Status Types\n * <cre8-text-passage size=\"sm\">\n * <ul>\n * <li>**default (no value)** renders a default modal</li>\n * <li>**error** renders an error modal</li>\n * <li>**warning** renders a warning modal</li>\n * <li>**success** renders a success modal</li>\n * <li>**info** renders an info modal</li>\n * <li>**help** renders an help modal</li>\n * </ul>\n * </cre8-text-passage>\n */\n @property()\n status?: 'error' | 'warning' | 'success' | 'info' | 'help';\n\n /**\n * Utility Modal Heading (String)\n */\n @property()\n utilityModalTitle: string;\n\n /**\n * Not dismissible modal\n */\n @property({ type: Boolean, reflect: true })\n notDismissible?: boolean;\n\n /**\n * Close Button Text\n */\n @property()\n closeButtonText: string = 'close';\n\n /**\n * Close Button Icon\n */\n @property()\n closeButtonIcon: string = 'close';\n\n /**\n * Modal Aria Label - This is required for accessibility and provides context of the entire modal!\n */\n @property()\n ariaLabel: string;\n\n /**\n * Handle keydown\n * 1) Close the modal when escape is hit when the user is focused within the modal\n */\n handleKeydown(e: KeyboardEvent) {\n if (e.code === 'Escape' && !this.notDismissible) {\n this.handleCloseModal(); /* 2 */\n }\n }\n\n /**\n * Handle on close\n * 1) On close, set the modal to not active and dispatch event telling the parent the modal was closed.\n */\n handleCloseModal() {\n this.isActive = false;\n this.dispatch({\n eventName: 'close-modal',\n detailObj: {\n isActive: this.isActive,\n },\n });\n }\n\n /**\n * Handle \"click outside\"\n * 1) onClick of the area around the modal window, close the modal.\n */\n\n handleOnClickOutside(e: Event) {\n const eventTarget = e.target as HTMLElement;\n if (this.isActive && this._modalWindow && eventTarget.classList.contains('cre8-c-modal') && !this.notDismissible) {\n this.handleCloseModal();\n }\n }\n\n /**\n * Lifecycle method to focus on modal\n * 1) If there is a changed property, and this.isActive === true, then focus on the modal window.\n * 2) Disable the body from scrolling behind while the modal is open.\n */\n\n updated(changedProperties: PropertyValues<this>) {\n if (this.isActive === true) {\n setTimeout(() => {\n this._modalWindow.focus();\n }, 200);\n } /* 1 */\n\n if (changedProperties.has('isActive')) {\n const body = document.querySelector('body');\n if (this.isActive) {\n body.style.overflow = 'hidden';\n } else {\n body.style.removeProperty('overflow');\n }\n } /* 2 */\n }\n\n /*\n * Maps modal icons and modal status variants to what the alt text of the related icon should be\n * see: (https://digital.#.com/patterns-and-Components/informational-display/alerts-and-notifications#query=alerts)\n * this provides the recommendated alt text of different statuses\n */\n mapStatusToIconModal = (status: string) => {\n switch (status) {\n case 'error':\n return html`<cre8-icon class=\"cre8-modal-icon\" svg=${svgError} aria-hidden='true'></cre8-icon>`;\n case 'success':\n return html`<cre8-icon class=\"cre8-modal-icon\" svg=${svgCheckCircle} aria-hidden='true'></cre8-icon>`;\n case 'warning':\n return html`<cre8-icon class=\"cre8-modal-icon\" svg=${svgWarningFilled} aria-hidden='true'></cre8-icon>`;\n case 'help':\n return html`<cre8-icon class=\"cre8-modal-icon\" svg=${svgHelp} aria-hidden='true'></cre8-icon>`;\n case 'info':\n return html`<cre8-icon class=\"cre8-modal-icon\" svg=${svgInfoFilled} aria-hidden='true'></cre8-icon>`;\n default:\n return null;\n }\n };\n\n /**\n * Lifecycle method on removal from the DOM\n * Removed body overflow and handle close (isActive set to false)\n */\n disconnectedCallback() {\n this.isActive = false;\n const body = document.querySelector('body');\n body.style.removeProperty('overflow');\n }\n\n render() {\n const componentClassNames = this.componentClassNames('cre8-c-modal', {\n 'cre8-is-active': this.isActive,\n 'cre8-c-modal--error': this.status === 'error',\n 'cre8-c-modal--warning': this.status === 'warning',\n 'cre8-c-modal--success': this.status === 'success',\n 'cre8-c-modal--info': this.status === 'info',\n 'cre8-c-modal--help': this.status === 'help',\n });\n\n return html`\n <div class=\"${componentClassNames}\" @click=\"${this.handleOnClickOutside}\" @keydown=${this.handleKeydown}>\n <focus-trap class=\"cre8-c-modal__focus-trap\" ?inactive=${!this.isActive}>\n <div class=\"cre8-c-modal__window\" role=\"dialog\" aria-label=${this.ariaLabel} tabindex=${this.isActive ? 0 : -1}>\n <div class=\"cre8-c-modal__header\">\n ${this.status\n ? html`<div class=\"cre8-c-modal__header-inner\">\n ${this.mapStatusToIconModal(this.status)}\n <cre8-heading type=\"title-large\" ?brandColor=${true}>${this.utilityModalTitle}</cre8-heading>\n </div>`\n : html`<slot name=\"header\"></slot>`}\n ${!this.notDismissible\n ? html`<cre8-button\n class=\"cre8-c-modal__close-button\"\n variant=\"tertiary\"\n text=\"${this.closeButtonText}\"\n ?hideText=${true}\n iconName=\"close\"\n iconPosition=\"after\"\n ?inverted=${!this.status}\n @click=${this.handleCloseModal}\n ></cre8-button>`\n : ''}\n </div>\n <div class=\"cre8-c-modal__body\">\n <slot></slot>\n </div>\n ${this.slotNotEmpty('footer') && html`<div class=\"cre8-c-modal__footer\"><slot name=\"footer\"></slot></div>`}\n </div>\n </focus-trap>\n </div>\n`;\n }\n}\n\nif (customElements.get('cre8-modal') === undefined) {\n customElements.define('cre8-modal', Cre8Modal);\n}\n\nexport interface CloseModalEvent extends CustomEvent<{ isActive: boolean }> {\n type: 'close-modal';\n currentTarget: Cre8Modal;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'cre8-modal': Cre8Modal;\n }\n}\n"]}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { css } from 'lit';
|
|
2
|
+
const styles = css `*,::slotted(*),*:before,*:after{box-sizing:border-box}:root{--size-base-unit: 0.5rem}[dir=rtl]{--rtlTranslateX: 50%;--rtlGradientToRight: 270deg;--rtlRotate45Inverse: -45deg}:host{--cre8-z-index-1: 1;--cre8-z-index-50: 50;--cre8-z-index-100: 100;--cre8-z-index-200: 200;--cre8-z-index-1030: 1030;--cre8-anim-fade-quick: 0.35s;--cre8-anim-ease: ease}@keyframes fadeIn{100%{opacity:1}}@keyframes slideIn{100%{transform:translateX(0)}}@keyframes slideInFwd{100%{width:272px;height:272px}}@keyframes slideOutRight{100%{width:272px;height:272px}}@keyframes slideUp{100%{transform:translateY(0)}}@media(width >= 481px){@keyframes slideInFwd{100%{width:417px;height:417px}}@keyframes slideOutRight{100%{width:417px;height:417px}}}@media(width >= 48rem){@keyframes slideInFwd{100%{width:330px;height:330px}}@keyframes slideOutRight{100%{width:330px;height:330px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 60rem){@keyframes slideInFwd{100%{width:460px;height:460px}}@keyframes slideOutRight{100%{width:460px;height:460px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 75rem){@keyframes slideInFwd{100%{width:592px;height:591px}}@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 87.5rem){@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 120px))}}}@media(width >= 2200px){@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 592px))}}}span.ripple{position:absolute;border-radius:50%;transform:scale(0);animation:ripple 600ms linear;background-color:var(--ripple-bg-color)}@keyframes ripple{to{transform:scale(4);opacity:1}}:root{--size-base-unit: 0.5rem}[dir=rtl]{--rtlTranslateX: 50%;--rtlGradientToRight: 270deg;--rtlRotate45Inverse: -45deg}:host{display:block}.cre8-c-modal{position:fixed;height:100vh;width:100vw;top:0;left:0;display:none;justify-content:center;align-items:center;background:rgba(0,0,0,.25);z-index:1000}.cre8-c-modal.cre8-is-active{display:flex;visibility:visible;opacity:1}.cre8-c-modal__focus-trap{display:contents}.cre8-c-modal__window{display:flex;flex-direction:column;flex-shrink:0;position:fixed;background:var(--cre8-color-bg-default);width:34rem;max-width:100%;border-radius:var(--cre8-border-radius-container);overflow:hidden;overflow-y:auto}@media all and (max-width: 768px){.cre8-c-modal__window{position:inherit;height:100%;width:100%}}.cre8-c-modal__window:focus-visible{outline:var(--cre8-border-width-focus) solid var(--cre8-color-border-active-outline);outline-offset:0.125rem}.cre8-c-modal__header{display:flex;padding:2rem 3rem 1rem;align-items:center}.cre8-c-modal--error .cre8-c-modal__header .cre8-modal-icon{color:var(--cre8-color-content-error-icon)}.cre8-c-modal--warning .cre8-c-modal__header .cre8-modal-icon{color:var(--cre8-color-content-warning-icon)}.cre8-c-modal--success .cre8-c-modal__header .cre8-modal-icon{color:var(--cre8-color-content-success-icon)}.cre8-c-modal--info .cre8-c-modal__header .cre8-modal-icon,.cre8-c-modal--help .cre8-c-modal__header .cre8-modal-icon{color:var(--cre8-color-content-info-icon)}.cre8-c-modal__header-inner{display:flex;align-items:center;gap:1rem}.cre8-c-modal__header-inner cre8-icon .cre8-modal-icon{height:2rem;width:2rem}.cre8-c-modal__body{max-height:240px;overflow:auto;padding:0 3rem}@media all and (max-width: 768px){.cre8-c-modal__body{height:100%;max-height:max-content}}.cre8-c-modal__footer{padding:1.5rem 3rem calc(100vh - 95dvh)}.cre8-c-modal__close-button{margin-left:auto}`;
|
|
3
|
+
export default styles;
|
|
4
|
+
//# sourceMappingURL=modal.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modal.styles.js","sourceRoot":"","sources":["../../../components/modal/modal.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,MAAM,MAAM,GAAG,GAAG,CAAA,m9GAAm9G,CAAC;AACt+G,eAAe,MAAM,CAAC","sourcesContent":["import { css } from 'lit';\nconst styles = css`*,::slotted(*),*:before,*:after{box-sizing:border-box}:root{--size-base-unit: 0.5rem}[dir=rtl]{--rtlTranslateX: 50%;--rtlGradientToRight: 270deg;--rtlRotate45Inverse: -45deg}:host{--cre8-z-index-1: 1;--cre8-z-index-50: 50;--cre8-z-index-100: 100;--cre8-z-index-200: 200;--cre8-z-index-1030: 1030;--cre8-anim-fade-quick: 0.35s;--cre8-anim-ease: ease}@keyframes fadeIn{100%{opacity:1}}@keyframes slideIn{100%{transform:translateX(0)}}@keyframes slideInFwd{100%{width:272px;height:272px}}@keyframes slideOutRight{100%{width:272px;height:272px}}@keyframes slideUp{100%{transform:translateY(0)}}@media(width >= 481px){@keyframes slideInFwd{100%{width:417px;height:417px}}@keyframes slideOutRight{100%{width:417px;height:417px}}}@media(width >= 48rem){@keyframes slideInFwd{100%{width:330px;height:330px}}@keyframes slideOutRight{100%{width:330px;height:330px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 60rem){@keyframes slideInFwd{100%{width:460px;height:460px}}@keyframes slideOutRight{100%{width:460px;height:460px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 75rem){@keyframes slideInFwd{100%{width:592px;height:591px}}@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 87.5rem){@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 120px))}}}@media(width >= 2200px){@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 592px))}}}span.ripple{position:absolute;border-radius:50%;transform:scale(0);animation:ripple 600ms linear;background-color:var(--ripple-bg-color)}@keyframes ripple{to{transform:scale(4);opacity:1}}:root{--size-base-unit: 0.5rem}[dir=rtl]{--rtlTranslateX: 50%;--rtlGradientToRight: 270deg;--rtlRotate45Inverse: -45deg}:host{display:block}.cre8-c-modal{position:fixed;height:100vh;width:100vw;top:0;left:0;display:none;justify-content:center;align-items:center;background:rgba(0,0,0,.25);z-index:1000}.cre8-c-modal.cre8-is-active{display:flex;visibility:visible;opacity:1}.cre8-c-modal__focus-trap{display:contents}.cre8-c-modal__window{display:flex;flex-direction:column;flex-shrink:0;position:fixed;background:var(--cre8-color-bg-default);width:34rem;max-width:100%;border-radius:var(--cre8-border-radius-container);overflow:hidden;overflow-y:auto}@media all and (max-width: 768px){.cre8-c-modal__window{position:inherit;height:100%;width:100%}}.cre8-c-modal__window:focus-visible{outline:var(--cre8-border-width-focus) solid var(--cre8-color-border-active-outline);outline-offset:0.125rem}.cre8-c-modal__header{display:flex;padding:2rem 3rem 1rem;align-items:center}.cre8-c-modal--error .cre8-c-modal__header .cre8-modal-icon{color:var(--cre8-color-content-error-icon)}.cre8-c-modal--warning .cre8-c-modal__header .cre8-modal-icon{color:var(--cre8-color-content-warning-icon)}.cre8-c-modal--success .cre8-c-modal__header .cre8-modal-icon{color:var(--cre8-color-content-success-icon)}.cre8-c-modal--info .cre8-c-modal__header .cre8-modal-icon,.cre8-c-modal--help .cre8-c-modal__header .cre8-modal-icon{color:var(--cre8-color-content-info-icon)}.cre8-c-modal__header-inner{display:flex;align-items:center;gap:1rem}.cre8-c-modal__header-inner cre8-icon .cre8-modal-icon{height:2rem;width:2rem}.cre8-c-modal__body{max-height:240px;overflow:auto;padding:0 3rem}@media all and (max-width: 768px){.cre8-c-modal__body{height:100%;max-height:max-content}}.cre8-c-modal__footer{padding:1.5rem 3rem calc(100vh - 95dvh)}.cre8-c-modal__close-button{margin-left:auto}`;\nexport default styles;\n"]}
|