@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
|
@@ -1,108 +1,148 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import "../link/link.js";
|
|
7
|
-
import "../heading/heading.js";
|
|
8
|
-
import "../text-passage/text-passage.js";
|
|
9
|
-
import { Cre8Element as b } from "../cre8-element.js";
|
|
10
|
-
const y = `<svg fill="currentColor" width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
|
|
11
|
-
<path d="M11.7133 15.4286C11.7133 15.5802 11.6531 15.7255 11.5459 15.8327C11.4388 15.9398 11.2934 16 11.1419 16H5.42827C5.27674 16 5.13141 15.9398 5.02426 15.8327C4.91711 15.7255 4.85691 15.5802 4.85691 15.4286C4.85691 15.2771 4.91711 15.1318 5.02426 15.0246C5.13141 14.9175 5.27674 14.8573 5.42827 14.8573H11.1419C11.2934 14.8573 11.4388 14.9175 11.5459 15.0246C11.6531 15.1318 11.7133 15.2771 11.7133 15.4286ZM14.5701 6.28682C14.5726 7.23931 14.3574 8.17978 13.941 9.03644C13.5246 9.89311 12.918 10.6433 12.1675 11.2298C12.0272 11.3374 11.9133 11.4756 11.8346 11.6339C11.7558 11.7923 11.7144 11.9665 11.7133 12.1433V12.5718C11.7133 12.8749 11.5929 13.1655 11.3786 13.3798C11.1643 13.5942 10.8736 13.7145 10.5705 13.7145H5.99964C5.69657 13.7145 5.40591 13.5942 5.19161 13.3798C4.9773 13.1655 4.85691 12.8749 4.85691 12.5718V12.1433C4.85679 11.9686 4.81662 11.7963 4.73949 11.6395C4.66235 11.4828 4.55031 11.3458 4.41196 11.2391C3.66333 10.6561 3.05715 9.91037 2.63929 9.05844C2.22143 8.20652 2.00285 7.2707 2.00009 6.32182C1.98152 2.91792 4.73264 0.0832435 8.13368 0.00182421C8.97169 -0.0183701 9.80527 0.129276 10.5854 0.436073C11.3655 0.74287 12.0763 1.20262 12.6761 1.78826C13.2758 2.3739 13.7523 3.07359 14.0776 3.84616C14.4029 4.61873 14.5703 5.44857 14.5701 6.28682ZM12.2768 5.61976C12.1286 4.7922 11.7305 4.02991 11.1359 3.4355C10.5414 2.8411 9.77903 2.44311 8.95144 2.29513C8.87744 2.28266 8.80171 2.28488 8.72857 2.30168C8.65543 2.31847 8.58631 2.34951 8.52516 2.39301C8.46401 2.43652 8.41204 2.49164 8.37219 2.55524C8.33235 2.61883 8.30542 2.68965 8.29295 2.76365C8.28047 2.83765 8.2827 2.91339 8.29949 2.98653C8.31628 3.05967 8.34732 3.12879 8.39083 3.18993C8.43433 3.25108 8.48946 3.30306 8.55305 3.3429C8.61664 3.38275 8.68746 3.40967 8.76147 3.42215C9.9449 3.62141 10.9491 4.62558 11.1498 5.81116C11.1724 5.94423 11.2414 6.065 11.3445 6.15207C11.4477 6.23914 11.5783 6.28687 11.7133 6.28682C11.7456 6.28663 11.7778 6.284 11.8097 6.27897C11.959 6.25347 12.0921 6.1697 12.1797 6.04608C12.2673 5.92246 12.3022 5.76911 12.2768 5.61976Z"/>
|
|
12
|
-
</svg>
|
|
13
|
-
`, x = f`*,::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}dialog{border:none;width:100%}.cre8-c-alert{padding:var(--cre8-spacing-16);border-width:var(--cre8-border-width-default);border-style:var(--cre8-border-style-default);border-radius:var(--cre8-border-radius-default)}.cre8-c-alert .cre8-c-alert__container{display:flex;gap:var(--cre8-spacing-8);position:relative}.cre8-c-alert .cre8-c-alert__container .cre8-c-alert__message-container{color:var(--cre8-color-content-knockout);display:flex;flex-direction:column}.cre8-c-alert .cre8-c-alert__container .cre8-c-alert__message-container .cre8-c-alert__heading-container{font-family:var(--cre8-typography-title-small-mobile-font-family);font-size:var(--cre8-typography-title-small-mobile-font-size);font-weight:var(--cre8-typography-title-small-mobile-font-weight);line-height:var(--cre8-typography-title-small-mobile-line-height);text-decoration:var(--cre8-typography-title-small-mobile-text-decoration);text-transform:var(--cre8-typography-title-small-mobile-text-transform)}@media all and (min-width: 768px){.cre8-c-alert .cre8-c-alert__container .cre8-c-alert__message-container .cre8-c-alert__heading-container{font-family:var(--cre8-typography-title-small-font-family);font-size:var(--cre8-typography-title-small-font-size);font-weight:var(--cre8-typography-title-small-font-weight);line-height:var(--cre8-typography-title-small-line-height);text-decoration:var(--cre8-typography-title-small-text-decoration);text-transform:var(--cre8-typography-title-small-text-transform)}}.cre8-c-alert .cre8-c-alert__container .cre8-c-alert__message-container .cre8-c-alert__body-container{font-family:var(--cre8-typography-body-small-font-family);font-size:var(--cre8-typography-body-small-font-size);font-weight:var(--cre8-typography-body-small-font-weight);line-height:var(--cre8-typography-body-small-line-height);text-decoration:var(--cre8-typography-body-small-text-decoration);text-transform:var(--cre8-typography-body-small-text-transform);padding-bottom:var(--cre8-spacing-8)}.cre8-c-alert .cre8-c-alert__container .cre8-c-alert__message-container .cre8-c-alert__footer-container{padding:0}.cre8-c-alert .cre8-c-alert__close-btn{position:absolute;top:-10px;right:0px}.cre8-c-alert.cre8-c-alert--emphasis-subtle .cre8-c-alert__message-container{color:var(--cre8-color-content-default)}.cre8-c-alert.cre8-c-alert--banner{border-radius:0;border:none}.cre8-c-alert.cre8-c-alert--warning .cre8-c-alert__message-container{color:var(--cre8-color-content-default)}.cre8-c-alert--standalone{border-radius:var(--cre8-border-radius-default);width:22.5rem}.cre8-c-alert--standalone .cre8-c-alert__container{display:flex;gap:var(--cre8-spacing-8);position:relative}.cre8-c-alert__icon{height:var(--cre8-spacing-16);min-height:var(--cre8-spacing-16);width:var(--cre8-spacing-16);min-width:var(--cre8-spacing-16)}.cre8-c-alert--info,.cre8-c-alert--success,.cre8-c-alert--error,.cre8-c-alert--neutral,.cre8-c-alert--notification{color:var(--cre8-color-content-knockout)}.cre8-c-alert--info{background:var(--cre8-color-bg-info-strong);border-color:var(--cre8-color-border-info)}.cre8-c-alert--info.cre8-c-alert--emphasis-subtle{background:var(--cre8-color-bg-info);color:var(--cre8-color-content-info-icon)}.cre8-c-alert--warning{background:var(--cre8-color-bg-warning-strong);border-color:var(--cre8-color-border-warning);color:var(--cre8-color-content-default)}.cre8-c-alert--warning.cre8-c-alert--emphasis-subtle{background:var(--cre8-color-bg-warning)}.cre8-c-alert--success{background:var(--cre8-color-bg-success-strong);border-color:var(--cre8-color-border-success)}.cre8-c-alert--success.cre8-c-alert--emphasis-subtle{background:var(--cre8-color-bg-success);color:var(--cre8-color-content-success-icon)}.cre8-c-alert--error{background:var(--cre8-color-bg-error-strong);border-color:var(--cre8-color-border-error)}.cre8-c-alert--error.cre8-c-alert--emphasis-subtle{background:var(--cre8-color-bg-error);color:var(--cre8-color-content-error-icon)}.cre8-c-alert--neutral{background:var(--cre8-color-bg-strong);border-color:var(--cre8-color-border-neutral)}.cre8-c-alert--neutral.cre8-c-alert--emphasis-subtle{background:var(--cre8-color-bg-subtle);color:var(--cre8-color-content-default)}.cre8-c-alert--notification{background:var(--cre8-color-bg-attention-strong);border-color:var(--cre8-color-border-attention)}.cre8-c-alert--notification.cre8-c-alert--emphasis-subtle{background:var(--cre8-color-bg-subtle);color:var(--cre8-color-content-attention-icon)}`;
|
|
14
|
-
var _ = Object.defineProperty, a = (l, c, n, w) => {
|
|
15
|
-
for (var o = void 0, i = l.length - 1, d; i >= 0; i--)
|
|
16
|
-
(d = l[i]) && (o = d(c, n, o) || o);
|
|
17
|
-
return o && _(c, n, o), o;
|
|
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;
|
|
18
6
|
};
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
7
|
+
import svgWarningFilled from '/Users/tylersmbp/Projects/cre8-web-components/packages/cre8-wc/icons/System/Filled/Warning.svg?raw';
|
|
8
|
+
import svgCheckCircle from '/Users/tylersmbp/Projects/cre8-web-components/packages/cre8-wc/icons/System/Filled/Check.svg?raw';
|
|
9
|
+
import svgInfoFilled from '/Users/tylersmbp/Projects/cre8-web-components/packages/cre8-wc/icons/System/Filled/Info.svg?raw';
|
|
10
|
+
import svgErrorFilled from '/Users/tylersmbp/Projects/cre8-web-components/packages/cre8-wc/icons/System/Filled/Error.svg?raw';
|
|
11
|
+
import svgLightbulbFilled from '/Users/tylersmbp/Projects/cre8-web-components/packages/cre8-wc/icons/System/Filled/Lightbulb.svg?raw';
|
|
12
|
+
import svgClose from '/Users/tylersmbp/Projects/cre8-web-components/packages/cre8-wc/icons/System/Regular/Close.svg?raw';
|
|
13
|
+
import { html, nothing, } from 'lit';
|
|
14
|
+
import { property } from 'lit/decorators.js';
|
|
15
|
+
import '../button/button';
|
|
16
|
+
import '../link/link';
|
|
17
|
+
import '../heading/heading';
|
|
18
|
+
import '../text-passage/text-passage';
|
|
19
|
+
import '../icon/icon';
|
|
20
|
+
import { Cre8Element } from '../cre8-element';
|
|
21
|
+
import styles from './alert.styles.js';
|
|
22
|
+
/**
|
|
23
|
+
* The general purpose of an alert or notification is to draw the user’s attention
|
|
24
|
+
* and provide the user with timely, relevant information.
|
|
25
|
+
*
|
|
26
|
+
* ## Alert Styles:
|
|
27
|
+
* - There are 6 statuses for 6 types of alerts: 'error', 'info', 'notification', 'neutral', 'warning', 'success'.
|
|
28
|
+
* Each alert will have different icon to be displayed in the alert.
|
|
29
|
+
* - Users can select two types of alert variants: 'standalone', or 'banner'.
|
|
30
|
+
* - User can also choose the alert should be emphasized or not. There are two options: subtle or strong.
|
|
31
|
+
* - User can add button or link in the alert.
|
|
32
|
+
* If users choose to emphasize the alert (**strong**), user needs to used **"inverted"** prop in button or link.
|
|
33
|
+
* - User can choose whether the alert can be dismissed or not
|
|
34
|
+
*
|
|
35
|
+
*/
|
|
36
|
+
export class Cre8Alert extends Cre8Element {
|
|
37
|
+
constructor() {
|
|
38
|
+
super(...arguments);
|
|
39
|
+
/** The alert type. */
|
|
40
|
+
this.status = 'info';
|
|
41
|
+
/** The alert variant. */
|
|
42
|
+
this.variant = 'standalone';
|
|
43
|
+
this.emphasis = 'subtle';
|
|
44
|
+
this.iconAlert = undefined;
|
|
45
|
+
this.headerText = undefined;
|
|
46
|
+
this.ctaBody = undefined;
|
|
47
|
+
this.checkEmphasisAlert = () => {
|
|
48
|
+
if (this.emphasis === 'subtle') {
|
|
49
|
+
return false;
|
|
50
|
+
}
|
|
51
|
+
return true;
|
|
52
|
+
};
|
|
53
|
+
this.mapStatusToIconAlert = (status) => {
|
|
54
|
+
switch (status) {
|
|
55
|
+
case 'error':
|
|
56
|
+
return html `<cre8-icon
|
|
57
|
+
svg="${svgErrorFilled}"
|
|
26
58
|
aria-label="${this.iconTitle}"
|
|
27
59
|
aria-hidden="true"
|
|
28
60
|
class="cre8-c-alert__icon"
|
|
29
61
|
></cre8-icon>`;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
svg="${
|
|
62
|
+
case 'success':
|
|
63
|
+
return html `<cre8-icon
|
|
64
|
+
svg="${svgCheckCircle}"
|
|
33
65
|
aria-label="${this.iconTitle}"
|
|
34
66
|
aria-hidden="true"
|
|
35
67
|
class="cre8-c-alert__icon"
|
|
36
68
|
></cre8-icon>`;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
svg="${
|
|
69
|
+
case 'warning':
|
|
70
|
+
return html `<cre8-icon
|
|
71
|
+
svg="${svgWarningFilled}"
|
|
40
72
|
aria-label="${this.iconTitle}"
|
|
41
73
|
aria-hidden="true"
|
|
42
74
|
class="cre8-c-alert__icon"
|
|
43
75
|
></cre8-icon>`;
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
svg="${
|
|
76
|
+
case 'notification':
|
|
77
|
+
return html `<cre8-icon
|
|
78
|
+
svg="${svgLightbulbFilled}"
|
|
47
79
|
aria-label="${this.iconTitle}"
|
|
48
80
|
aria-hidden="true"
|
|
49
81
|
class="cre8-c-alert__icon"
|
|
50
82
|
></cre8-icon>`;
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
svg="${
|
|
83
|
+
case 'info':
|
|
84
|
+
return html `<cre8-icon
|
|
85
|
+
svg="${svgInfoFilled}"
|
|
54
86
|
aria-label="${this.iconTitle}"
|
|
55
87
|
aria-hidden="true"
|
|
56
88
|
class="cre8-c-alert__icon"
|
|
57
89
|
></cre8-icon>`;
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
svg="${
|
|
90
|
+
case 'neutral':
|
|
91
|
+
return html `<cre8-icon
|
|
92
|
+
svg="${svgInfoFilled}"
|
|
61
93
|
aria-label="${this.iconTitle}"
|
|
62
94
|
aria-hidden="true"
|
|
63
95
|
class="cre8-c-alert__icon"
|
|
64
96
|
></cre8-icon>`;
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
97
|
+
default:
|
|
98
|
+
return nothing;
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* On banner dismiss
|
|
104
|
+
* 1) Function that toggles dismissed to true and removes the banner from the UI
|
|
105
|
+
*/
|
|
106
|
+
onDismiss() {
|
|
107
|
+
this.dismissed = true; /* 1 */
|
|
108
|
+
}
|
|
109
|
+
render() {
|
|
110
|
+
const componentClassNames = this.componentClassNames('cre8-c-alert', {
|
|
111
|
+
'cre8-c-alert--error': this.status === 'error',
|
|
112
|
+
'cre8-c-alert--info': this.status === 'info',
|
|
113
|
+
'cre8-c-alert--notification': this.status === 'notification',
|
|
114
|
+
'cre8-c-alert--neutral': this.status === 'neutral',
|
|
115
|
+
'cre8-c-alert--success': this.status === 'success',
|
|
116
|
+
'cre8-c-alert--warning': this.status === 'warning',
|
|
117
|
+
'cre8-c-alert--standalone': this.variant === 'standalone',
|
|
118
|
+
'cre8-c-alert--banner': this.variant === 'banner',
|
|
119
|
+
'cre8-c-alert--emphasis-subtle': this.emphasis === 'subtle',
|
|
120
|
+
'cre8-c-alert--notdismissible': this.notDismissible,
|
|
121
|
+
});
|
|
122
|
+
return this.dismissed
|
|
123
|
+
? null
|
|
124
|
+
: html `
|
|
91
125
|
<dialog open>
|
|
92
|
-
<div class="${
|
|
126
|
+
<div class="${componentClassNames}">
|
|
93
127
|
<div class="cre8-c-alert__container">
|
|
94
|
-
${this.status
|
|
128
|
+
${this.status
|
|
129
|
+
? html ` ${this.mapStatusToIconAlert(this.status)}`
|
|
130
|
+
: ''}
|
|
95
131
|
<div class="cre8-c-alert__message-container">
|
|
96
132
|
<div class="cre8-c-alert__heading-container">
|
|
97
|
-
${this.headerText
|
|
98
|
-
|
|
133
|
+
${this.headerText
|
|
134
|
+
? html `${this.headerText}`
|
|
135
|
+
: ''}
|
|
136
|
+
${this.notDismissible
|
|
137
|
+
? ''
|
|
138
|
+
: html `<cre8-button
|
|
99
139
|
class="cre8-c-alert__close-btn"
|
|
100
|
-
svg='${
|
|
140
|
+
svg='${svgClose}'
|
|
101
141
|
iconRotateDegree="90"
|
|
102
142
|
iconPosition="after"
|
|
103
143
|
variant="tertiary"
|
|
104
144
|
text="close"
|
|
105
|
-
?hideText=${
|
|
145
|
+
?hideText=${true}
|
|
106
146
|
@click=${this.onDismiss}
|
|
107
147
|
?inverted=${this.checkEmphasisAlert()}
|
|
108
148
|
></cre8-button>`}
|
|
@@ -118,39 +158,38 @@ const s = class s extends b {
|
|
|
118
158
|
</div>
|
|
119
159
|
</dialog>
|
|
120
160
|
`;
|
|
121
|
-
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
customElements.
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
};
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
Cre8Alert.styles = [styles];
|
|
164
|
+
__decorate([
|
|
165
|
+
property({ reflect: true })
|
|
166
|
+
], Cre8Alert.prototype, "status", void 0);
|
|
167
|
+
__decorate([
|
|
168
|
+
property({ reflect: true })
|
|
169
|
+
], Cre8Alert.prototype, "variant", void 0);
|
|
170
|
+
__decorate([
|
|
171
|
+
property({ reflect: true })
|
|
172
|
+
], Cre8Alert.prototype, "emphasis", void 0);
|
|
173
|
+
__decorate([
|
|
174
|
+
property({ type: String })
|
|
175
|
+
], Cre8Alert.prototype, "iconAlert", void 0);
|
|
176
|
+
__decorate([
|
|
177
|
+
property()
|
|
178
|
+
], Cre8Alert.prototype, "iconTitle", void 0);
|
|
179
|
+
__decorate([
|
|
180
|
+
property({ type: String })
|
|
181
|
+
], Cre8Alert.prototype, "headerText", void 0);
|
|
182
|
+
__decorate([
|
|
183
|
+
property({ type: String })
|
|
184
|
+
], Cre8Alert.prototype, "ctaBody", void 0);
|
|
185
|
+
__decorate([
|
|
186
|
+
property({ type: Boolean, reflect: true })
|
|
187
|
+
], Cre8Alert.prototype, "dismissed", void 0);
|
|
188
|
+
__decorate([
|
|
189
|
+
property({ type: Boolean, reflect: true })
|
|
190
|
+
], Cre8Alert.prototype, "notDismissible", void 0);
|
|
191
|
+
if (customElements.get('cre8-alert') === undefined) {
|
|
192
|
+
customElements.define('cre8-alert', Cre8Alert);
|
|
193
|
+
}
|
|
194
|
+
export default Cre8Alert;
|
|
195
|
+
//# sourceMappingURL=alert.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alert.js","sourceRoot":"","sources":["../../../components/alert/alert.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,gBAAgB,MAAM,oGAAoG,CAAC;AAClI,OAAO,cAAc,MAAM,kGAAkG,CAAC;AAC9H,OAAO,aAAa,MAAM,iGAAiG,CAAC;AAC5H,OAAO,cAAc,MAAM,kGAAkG,CAAC;AAC9H,OAAO,kBAAkB,MAAM,sGAAsG,CAAC;AACtI,OAAO,QAAQ,MAAM,mGAAmG,CAAC;AACzH,OAAO,EAAE,IAAI,EAAE,OAAO,GAAI,MAAM,KAAK,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,kBAAkB,CAAC;AAC1B,OAAO,cAAc,CAAC;AACtB,OAAO,oBAAoB,CAAC;AAC5B,OAAO,8BAA8B,CAAC;AACtC,OAAO,cAAc,CAAC;AAEtB,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC;;;;;;;;;;;;;GAaG;AAEH,MAAM,OAAO,SAAU,SAAQ,WAAW;IAA1C;;QAGE,sBAAsB;QAElB,WAAM,GAMQ,MAAM,CAAC;QAEzB,yBAAyB;QAErB,YAAO,GAA4B,YAAY,CAAC;QAGhD,aAAQ,GAAwB,QAAQ,CAAC;QAIzC,cAAS,GAAW,SAAS,CAAC;QAS9B,eAAU,GAAW,SAAS,CAAC;QAG/B,YAAO,GAAW,SAAS,CAAC;QAwBxB,uBAAkB,GAAG,GAAG,EAAE;YAC9B,IAAI,IAAI,CAAC,QAAQ,KAAK,QAAQ,EAAE,CAAC;gBAC7B,OAAO,KAAK,CAAC;YACjB,CAAC;YAAC,OAAO,IAAI,CAAC;QAClB,CAAC,CAAC;QAEM,yBAAoB,GAAG,CAAC,MAAc,EAAE,EAAE;YAC9C,QAAQ,MAAM,EAAE,CAAC;gBACb,KAAK,OAAO;oBACR,OAAO,IAAI,CAAA;qBACJ,cAAc;4BACP,IAAI,CAAC,SAAS;;;4BAGd,CAAC;gBACnB,KAAK,SAAS;oBACV,OAAO,IAAI,CAAA;qBACJ,cAAc;4BACP,IAAI,CAAC,SAAS;;;4BAGd,CAAC;gBACnB,KAAK,SAAS;oBACV,OAAO,IAAI,CAAA;qBACJ,gBAAgB;4BACT,IAAI,CAAC,SAAS;;;4BAGd,CAAC;gBACnB,KAAK,cAAc;oBACf,OAAO,IAAI,CAAA;qBACJ,kBAAkB;4BACX,IAAI,CAAC,SAAS;;;4BAGd,CAAC;gBACnB,KAAK,MAAM;oBACP,OAAO,IAAI,CAAA;qBACJ,aAAa;4BACN,IAAI,CAAC,SAAS;;;4BAGd,CAAC;gBACnB,KAAK,SAAS;oBACV,OAAO,IAAI,CAAA;qBACJ,aAAa;4BACN,IAAI,CAAC,SAAS;;;4BAGd,CAAC;gBACnB;oBACI,OAAO,OAAO,CAAC;YACvB,CAAC;QACL,CAAC,CAAC;IAwDJ,CAAC;IArHC;;;OAGG;IACH,SAAS;QACL,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,CAAC,OAAO;IAClC,CAAC;IAyDD,MAAM;QACF,MAAM,mBAAmB,GAAG,IAAI,CAAC,mBAAmB,CAAC,cAAc,EAAE;YACjE,qBAAqB,EAAE,IAAI,CAAC,MAAM,KAAK,OAAO;YAC9C,oBAAoB,EAAE,IAAI,CAAC,MAAM,KAAK,MAAM;YAC5C,4BAA4B,EAAE,IAAI,CAAC,MAAM,KAAK,cAAc;YAC5D,uBAAuB,EAAE,IAAI,CAAC,MAAM,KAAK,SAAS;YAClD,uBAAuB,EAAE,IAAI,CAAC,MAAM,KAAK,SAAS;YAClD,uBAAuB,EAAE,IAAI,CAAC,MAAM,KAAK,SAAS;YAClD,0BAA0B,EAAE,IAAI,CAAC,OAAO,KAAK,YAAY;YACzD,sBAAsB,EAAE,IAAI,CAAC,OAAO,KAAK,QAAQ;YACjD,+BAA+B,EAAE,IAAI,CAAC,QAAQ,KAAK,QAAQ;YAC3D,8BAA8B,EAAE,IAAI,CAAC,cAAc;SACtD,CAAC,CAAC;QAEH,OAAO,IAAI,CAAC,SAAS;YACjB,CAAC,CAAC,IAAI;YACN,CAAC,CAAC,IAAI,CAAA;;0BAEU,mBAAmB;;kBAE3B,IAAI,CAAC,MAAM;gBACrB,CAAC,CAAC,IAAI,CAAA,IAAI,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE;gBAClD,CAAC,CAAC,EAAE;;;sBAGU,IAAI,CAAC,UAAU;gBAC7B,CAAC,CAAC,IAAI,CAAA,GAAG,IAAI,CAAC,UAAU,EAAE;gBAC1B,CAAC,CAAC,EAAE;sBACU,IAAI,CAAC,cAAc;gBACjC,CAAC,CAAC,EAAE;gBACJ,CAAC,CAAC,IAAI,CAAA;;4BAEc,QAAQ;;;;;iCAKH,IAAI;8BACP,IAAI,CAAC,SAAS;iCACX,IAAI,CAAC,kBAAkB,EAAE;8BAC5B;;;;;;2CAMa,IAAI,CAAC,OAAO;;;;;;SAM9C,CAAC;IACR,CAAC;;AArKQ,gBAAM,GAAG,CAAC,MAAM,CAAC,AAAX,CAAY;AAIvB;IADH,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;yCAOH;AAIrB;IADH,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;0CACwB;AAGhD;IADH,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;2CACiB;AAIzC;IADH,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;4CACO;AAM9B;IADH,QAAQ,EAAE;4CACY;AAGnB;IADH,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;6CACQ;AAG/B;IADH,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;0CACK;AAO5B;IADH,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;4CACnB;AAOpB;IADH,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;iDACd;AAyH/B,IAAI,cAAc,CAAC,GAAG,CAAC,YAAY,CAAC,KAAK,SAAS,EAAE,CAAC;IACjD,cAAc,CAAC,MAAM,CAAC,YAAY,EAAE,SAAS,CAAC,CAAC;AACnD,CAAC;AAQD,eAAe,SAAS,CAAC","sourcesContent":["import svgWarningFilled from '/Users/tylersmbp/Projects/cre8-web-components/packages/cre8-wc/icons/System/Filled/Warning.svg?raw';\nimport svgCheckCircle from '/Users/tylersmbp/Projects/cre8-web-components/packages/cre8-wc/icons/System/Filled/Check.svg?raw';\nimport svgInfoFilled from '/Users/tylersmbp/Projects/cre8-web-components/packages/cre8-wc/icons/System/Filled/Info.svg?raw';\nimport svgErrorFilled from '/Users/tylersmbp/Projects/cre8-web-components/packages/cre8-wc/icons/System/Filled/Error.svg?raw';\nimport svgLightbulbFilled from '/Users/tylersmbp/Projects/cre8-web-components/packages/cre8-wc/icons/System/Filled/Lightbulb.svg?raw';\nimport svgClose from '/Users/tylersmbp/Projects/cre8-web-components/packages/cre8-wc/icons/System/Regular/Close.svg?raw';\nimport { html, nothing, } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport '../button/button';\nimport '../link/link';\nimport '../heading/heading';\nimport '../text-passage/text-passage';\nimport '../icon/icon';\n\nimport { Cre8Element } from '../cre8-element';\nimport styles from './alert.styles.js';\n\n/**\n * The general purpose of an alert or notification is to draw the user’s attention\n * and provide the user with timely, relevant information.\n *\n * ## Alert Styles:\n * - There are 6 statuses for 6 types of alerts: 'error', 'info', 'notification', 'neutral', 'warning', 'success'.\n * Each alert will have different icon to be displayed in the alert.\n * - Users can select two types of alert variants: 'standalone', or 'banner'.\n * - User can also choose the alert should be emphasized or not. There are two options: subtle or strong.\n * - User can add button or link in the alert.\n * If users choose to emphasize the alert (**strong**), user needs to used **\"inverted\"** prop in button or link.\n * - User can choose whether the alert can be dismissed or not\n *\n */\n\nexport class Cre8Alert extends Cre8Element {\n static styles = [styles];\n\n /** The alert type. */\n @property({ reflect: true })\n status?:\n | 'error'\n | 'info'\n | 'notification'\n | 'neutral'\n | 'warning'\n | 'success' = 'info';\n\n /** The alert variant. */\n @property({ reflect: true })\n variant: 'standalone' | 'banner' = 'standalone';\n\n @property({ reflect: true })\n emphasis: 'subtle' | 'strong' = 'subtle';\n\n\n @property({ type: String })\n iconAlert: string = undefined;\n\n /**\n * Icon title used for the icon alt text\n */\n @property()\n iconTitle?: string;\n\n @property({ type: String })\n headerText: string = undefined;\n\n @property({ type: String })\n ctaBody: string = undefined;\n\n /**\n * Dismissed property\n * 1) State that changes to true and is removed when the banner is dismissed\n */\n @property({ type: Boolean, reflect: true })\n dismissed?: boolean;\n\n /**\n * Dismissable property\n * 1) Adds the ability to close when toggled to true\n */\n @property({ type: Boolean, reflect: true })\n notDismissible?: boolean;\n\n /**\n * On banner dismiss\n * 1) Function that toggles dismissed to true and removes the banner from the UI\n */\n onDismiss() {\n this.dismissed = true; /* 1 */\n }\n\n private checkEmphasisAlert = () => {\n if (this.emphasis === 'subtle') {\n return false;\n } return true;\n };\n\n private mapStatusToIconAlert = (status: string) => {\n switch (status) {\n case 'error':\n return html`<cre8-icon\n svg=\"${svgErrorFilled}\"\n aria-label=\"${this.iconTitle}\"\n aria-hidden=\"true\"\n class=\"cre8-c-alert__icon\"\n ></cre8-icon>`;\n case 'success':\n return html`<cre8-icon\n svg=\"${svgCheckCircle}\"\n aria-label=\"${this.iconTitle}\"\n aria-hidden=\"true\"\n class=\"cre8-c-alert__icon\"\n ></cre8-icon>`;\n case 'warning':\n return html`<cre8-icon\n svg=\"${svgWarningFilled}\"\n aria-label=\"${this.iconTitle}\"\n aria-hidden=\"true\"\n class=\"cre8-c-alert__icon\"\n ></cre8-icon>`;\n case 'notification':\n return html`<cre8-icon\n svg=\"${svgLightbulbFilled}\"\n aria-label=\"${this.iconTitle}\"\n aria-hidden=\"true\"\n class=\"cre8-c-alert__icon\"\n ></cre8-icon>`;\n case 'info':\n return html`<cre8-icon\n svg=\"${svgInfoFilled}\"\n aria-label=\"${this.iconTitle}\"\n aria-hidden=\"true\"\n class=\"cre8-c-alert__icon\"\n ></cre8-icon>`;\n case 'neutral':\n return html`<cre8-icon\n svg=\"${svgInfoFilled}\"\n aria-label=\"${this.iconTitle}\"\n aria-hidden=\"true\"\n class=\"cre8-c-alert__icon\"\n ></cre8-icon>`;\n default:\n return nothing;\n }\n };\n\n render() {\n const componentClassNames = this.componentClassNames('cre8-c-alert', {\n 'cre8-c-alert--error': this.status === 'error',\n 'cre8-c-alert--info': this.status === 'info',\n 'cre8-c-alert--notification': this.status === 'notification',\n 'cre8-c-alert--neutral': this.status === 'neutral',\n 'cre8-c-alert--success': this.status === 'success',\n 'cre8-c-alert--warning': this.status === 'warning',\n 'cre8-c-alert--standalone': this.variant === 'standalone',\n 'cre8-c-alert--banner': this.variant === 'banner',\n 'cre8-c-alert--emphasis-subtle': this.emphasis === 'subtle',\n 'cre8-c-alert--notdismissible': this.notDismissible,\n });\n\n return this.dismissed\n ? null\n : html`\n <dialog open>\n <div class=\"${componentClassNames}\">\n <div class=\"cre8-c-alert__container\">\n ${this.status\n ? html` ${this.mapStatusToIconAlert(this.status)}`\n : ''}\n <div class=\"cre8-c-alert__message-container\">\n <div class=\"cre8-c-alert__heading-container\">\n ${this.headerText\n ? html`${this.headerText}`\n : ''}\n ${this.notDismissible\n ? ''\n : html`<cre8-button\n class=\"cre8-c-alert__close-btn\"\n svg='${svgClose}'\n iconRotateDegree=\"90\"\n iconPosition=\"after\"\n variant=\"tertiary\"\n text=\"close\"\n ?hideText=${true}\n @click=${this.onDismiss}\n ?inverted=${this.checkEmphasisAlert()}\n ></cre8-button>`}\n </div>\n <div class=\"cre8-c-alert__body-container\">\n <slot></slot>\n </div>\n <div class=\"cre8-c-alert__footer-container\">\n <slot name=\"cta\">${this.ctaBody}</slot>\n </div>\n </div>\n </div>\n </div>\n </dialog>\n `;\n }\n}\n\nif (customElements.get('cre8-alert') === undefined) {\n customElements.define('cre8-alert', Cre8Alert);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'cre8-alert': Cre8Alert;\n }\n}\n\nexport default Cre8Alert;\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}dialog{border:none;width:100%}.cre8-c-alert{padding:var(--cre8-spacing-16);border-width:var(--cre8-border-width-default);border-style:var(--cre8-border-style-default);border-radius:var(--cre8-border-radius-default)}.cre8-c-alert .cre8-c-alert__container{display:flex;gap:var(--cre8-spacing-8);position:relative}.cre8-c-alert .cre8-c-alert__container .cre8-c-alert__message-container{color:var(--cre8-color-content-knockout);display:flex;flex-direction:column}.cre8-c-alert .cre8-c-alert__container .cre8-c-alert__message-container .cre8-c-alert__heading-container{font-family:var(--cre8-typography-title-small-mobile-font-family);font-size:var(--cre8-typography-title-small-mobile-font-size);font-weight:var(--cre8-typography-title-small-mobile-font-weight);line-height:var(--cre8-typography-title-small-mobile-line-height);text-decoration:var(--cre8-typography-title-small-mobile-text-decoration);text-transform:var(--cre8-typography-title-small-mobile-text-transform)}@media all and (min-width: 768px){.cre8-c-alert .cre8-c-alert__container .cre8-c-alert__message-container .cre8-c-alert__heading-container{font-family:var(--cre8-typography-title-small-font-family);font-size:var(--cre8-typography-title-small-font-size);font-weight:var(--cre8-typography-title-small-font-weight);line-height:var(--cre8-typography-title-small-line-height);text-decoration:var(--cre8-typography-title-small-text-decoration);text-transform:var(--cre8-typography-title-small-text-transform)}}.cre8-c-alert .cre8-c-alert__container .cre8-c-alert__message-container .cre8-c-alert__body-container{font-family:var(--cre8-typography-body-small-font-family);font-size:var(--cre8-typography-body-small-font-size);font-weight:var(--cre8-typography-body-small-font-weight);line-height:var(--cre8-typography-body-small-line-height);text-decoration:var(--cre8-typography-body-small-text-decoration);text-transform:var(--cre8-typography-body-small-text-transform);padding-bottom:var(--cre8-spacing-8)}.cre8-c-alert .cre8-c-alert__container .cre8-c-alert__message-container .cre8-c-alert__footer-container{padding:0}.cre8-c-alert .cre8-c-alert__close-btn{position:absolute;top:-10px;right:0px}.cre8-c-alert.cre8-c-alert--emphasis-subtle .cre8-c-alert__message-container{color:var(--cre8-color-content-default)}.cre8-c-alert.cre8-c-alert--banner{border-radius:0;border:none}.cre8-c-alert.cre8-c-alert--warning .cre8-c-alert__message-container{color:var(--cre8-color-content-default)}.cre8-c-alert--standalone{border-radius:var(--cre8-border-radius-default);width:22.5rem}.cre8-c-alert--standalone .cre8-c-alert__container{display:flex;gap:var(--cre8-spacing-8);position:relative}.cre8-c-alert__icon{height:var(--cre8-spacing-16);min-height:var(--cre8-spacing-16);width:var(--cre8-spacing-16);min-width:var(--cre8-spacing-16)}.cre8-c-alert--info,.cre8-c-alert--success,.cre8-c-alert--error,.cre8-c-alert--neutral,.cre8-c-alert--notification{color:var(--cre8-color-content-knockout)}.cre8-c-alert--info{background:var(--cre8-color-bg-info-strong);border-color:var(--cre8-color-border-info)}.cre8-c-alert--info.cre8-c-alert--emphasis-subtle{background:var(--cre8-color-bg-info);color:var(--cre8-color-content-info-icon)}.cre8-c-alert--warning{background:var(--cre8-color-bg-warning-strong);border-color:var(--cre8-color-border-warning);color:var(--cre8-color-content-default)}.cre8-c-alert--warning.cre8-c-alert--emphasis-subtle{background:var(--cre8-color-bg-warning)}.cre8-c-alert--success{background:var(--cre8-color-bg-success-strong);border-color:var(--cre8-color-border-success)}.cre8-c-alert--success.cre8-c-alert--emphasis-subtle{background:var(--cre8-color-bg-success);color:var(--cre8-color-content-success-icon)}.cre8-c-alert--error{background:var(--cre8-color-bg-error-strong);border-color:var(--cre8-color-border-error)}.cre8-c-alert--error.cre8-c-alert--emphasis-subtle{background:var(--cre8-color-bg-error);color:var(--cre8-color-content-error-icon)}.cre8-c-alert--neutral{background:var(--cre8-color-bg-strong);border-color:var(--cre8-color-border-neutral)}.cre8-c-alert--neutral.cre8-c-alert--emphasis-subtle{background:var(--cre8-color-bg-subtle);color:var(--cre8-color-content-default)}.cre8-c-alert--notification{background:var(--cre8-color-bg-attention-strong);border-color:var(--cre8-color-border-attention)}.cre8-c-alert--notification.cre8-c-alert--emphasis-subtle{background:var(--cre8-color-bg-subtle);color:var(--cre8-color-content-attention-icon)}`;
|
|
3
|
+
export default styles;
|
|
4
|
+
//# sourceMappingURL=alert.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alert.styles.js","sourceRoot":"","sources":["../../../components/alert/alert.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,MAAM,MAAM,GAAG,GAAG,CAAA,imMAAimM,CAAC;AACpnM,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}dialog{border:none;width:100%}.cre8-c-alert{padding:var(--cre8-spacing-16);border-width:var(--cre8-border-width-default);border-style:var(--cre8-border-style-default);border-radius:var(--cre8-border-radius-default)}.cre8-c-alert .cre8-c-alert__container{display:flex;gap:var(--cre8-spacing-8);position:relative}.cre8-c-alert .cre8-c-alert__container .cre8-c-alert__message-container{color:var(--cre8-color-content-knockout);display:flex;flex-direction:column}.cre8-c-alert .cre8-c-alert__container .cre8-c-alert__message-container .cre8-c-alert__heading-container{font-family:var(--cre8-typography-title-small-mobile-font-family);font-size:var(--cre8-typography-title-small-mobile-font-size);font-weight:var(--cre8-typography-title-small-mobile-font-weight);line-height:var(--cre8-typography-title-small-mobile-line-height);text-decoration:var(--cre8-typography-title-small-mobile-text-decoration);text-transform:var(--cre8-typography-title-small-mobile-text-transform)}@media all and (min-width: 768px){.cre8-c-alert .cre8-c-alert__container .cre8-c-alert__message-container .cre8-c-alert__heading-container{font-family:var(--cre8-typography-title-small-font-family);font-size:var(--cre8-typography-title-small-font-size);font-weight:var(--cre8-typography-title-small-font-weight);line-height:var(--cre8-typography-title-small-line-height);text-decoration:var(--cre8-typography-title-small-text-decoration);text-transform:var(--cre8-typography-title-small-text-transform)}}.cre8-c-alert .cre8-c-alert__container .cre8-c-alert__message-container .cre8-c-alert__body-container{font-family:var(--cre8-typography-body-small-font-family);font-size:var(--cre8-typography-body-small-font-size);font-weight:var(--cre8-typography-body-small-font-weight);line-height:var(--cre8-typography-body-small-line-height);text-decoration:var(--cre8-typography-body-small-text-decoration);text-transform:var(--cre8-typography-body-small-text-transform);padding-bottom:var(--cre8-spacing-8)}.cre8-c-alert .cre8-c-alert__container .cre8-c-alert__message-container .cre8-c-alert__footer-container{padding:0}.cre8-c-alert .cre8-c-alert__close-btn{position:absolute;top:-10px;right:0px}.cre8-c-alert.cre8-c-alert--emphasis-subtle .cre8-c-alert__message-container{color:var(--cre8-color-content-default)}.cre8-c-alert.cre8-c-alert--banner{border-radius:0;border:none}.cre8-c-alert.cre8-c-alert--warning .cre8-c-alert__message-container{color:var(--cre8-color-content-default)}.cre8-c-alert--standalone{border-radius:var(--cre8-border-radius-default);width:22.5rem}.cre8-c-alert--standalone .cre8-c-alert__container{display:flex;gap:var(--cre8-spacing-8);position:relative}.cre8-c-alert__icon{height:var(--cre8-spacing-16);min-height:var(--cre8-spacing-16);width:var(--cre8-spacing-16);min-width:var(--cre8-spacing-16)}.cre8-c-alert--info,.cre8-c-alert--success,.cre8-c-alert--error,.cre8-c-alert--neutral,.cre8-c-alert--notification{color:var(--cre8-color-content-knockout)}.cre8-c-alert--info{background:var(--cre8-color-bg-info-strong);border-color:var(--cre8-color-border-info)}.cre8-c-alert--info.cre8-c-alert--emphasis-subtle{background:var(--cre8-color-bg-info);color:var(--cre8-color-content-info-icon)}.cre8-c-alert--warning{background:var(--cre8-color-bg-warning-strong);border-color:var(--cre8-color-border-warning);color:var(--cre8-color-content-default)}.cre8-c-alert--warning.cre8-c-alert--emphasis-subtle{background:var(--cre8-color-bg-warning)}.cre8-c-alert--success{background:var(--cre8-color-bg-success-strong);border-color:var(--cre8-color-border-success)}.cre8-c-alert--success.cre8-c-alert--emphasis-subtle{background:var(--cre8-color-bg-success);color:var(--cre8-color-content-success-icon)}.cre8-c-alert--error{background:var(--cre8-color-bg-error-strong);border-color:var(--cre8-color-border-error)}.cre8-c-alert--error.cre8-c-alert--emphasis-subtle{background:var(--cre8-color-bg-error);color:var(--cre8-color-content-error-icon)}.cre8-c-alert--neutral{background:var(--cre8-color-bg-strong);border-color:var(--cre8-color-border-neutral)}.cre8-c-alert--neutral.cre8-c-alert--emphasis-subtle{background:var(--cre8-color-bg-subtle);color:var(--cre8-color-content-default)}.cre8-c-alert--notification{background:var(--cre8-color-bg-attention-strong);border-color:var(--cre8-color-border-attention)}.cre8-c-alert--notification.cre8-c-alert--emphasis-subtle{background:var(--cre8-color-bg-subtle);color:var(--cre8-color-content-attention-icon)}`;\nexport default styles;\n"]}
|
|
@@ -1,53 +1,76 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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;
|
|
6
|
+
};
|
|
7
|
+
import classnames from 'classnames';
|
|
8
|
+
import { html, } from 'lit';
|
|
9
|
+
import { property } from 'lit/decorators.js';
|
|
10
|
+
import { Cre8Element } from '../cre8-element';
|
|
11
|
+
import '../icon/icon';
|
|
12
|
+
import styles from './badge.styles.js';
|
|
13
|
+
export var status;
|
|
14
|
+
(function (status) {
|
|
15
|
+
status[status["error"] = 0] = "error";
|
|
16
|
+
status[status["warning"] = 1] = "warning";
|
|
17
|
+
status[status["success"] = 2] = "success";
|
|
18
|
+
status[status["info"] = 3] = "info";
|
|
19
|
+
status[status["attention"] = 4] = "attention";
|
|
20
|
+
status[status["undefined"] = 5] = "undefined";
|
|
21
|
+
})(status || (status = {}));
|
|
22
|
+
export var variant;
|
|
23
|
+
(function (variant) {
|
|
24
|
+
variant[variant["light"] = 0] = "light";
|
|
25
|
+
variant[variant["white"] = 1] = "white";
|
|
26
|
+
variant[variant["undefined"] = 2] = "undefined";
|
|
27
|
+
})(variant || (variant = {}));
|
|
28
|
+
/**
|
|
29
|
+
* Status badges are used most often in tables or fat rows in a list.
|
|
30
|
+
* These Components serve a contextual purpose and don't provide any functionality.
|
|
31
|
+
* Badges should be organized inside a dedicated table row communicating status such as pending, approved or rejected.
|
|
32
|
+
*
|
|
33
|
+
*/
|
|
34
|
+
export class Cre8Badge extends Cre8Element {
|
|
35
|
+
constructor() {
|
|
36
|
+
super(...arguments);
|
|
37
|
+
/**
|
|
38
|
+
* The badge text
|
|
39
|
+
*/
|
|
40
|
+
this.text = undefined;
|
|
41
|
+
}
|
|
42
|
+
render() {
|
|
43
|
+
const componentClassName = classnames('cre8-c-badge', {
|
|
44
|
+
'cre8-c-badge--success': this.status === 'success',
|
|
45
|
+
'cre8-c-badge--warning': this.status === 'warning',
|
|
46
|
+
'cre8-c-badge--error': this.status === 'error',
|
|
47
|
+
'cre8-c-badge--info': this.status === 'info',
|
|
48
|
+
'cre8-c-badge--attention': this.status === 'attention',
|
|
49
|
+
'cre8-c-badge--light': this.variant === 'light',
|
|
50
|
+
'cre8-c-badge--white': this.variant === 'white',
|
|
51
|
+
});
|
|
52
|
+
return html `<div class="${componentClassName}">
|
|
53
|
+
${this.svg ? html ` <cre8-icon
|
|
28
54
|
svg='${this.svg}' aria-hidden='true'></cre8-icon>
|
|
29
|
-
</cre8-icon>` :
|
|
55
|
+
</cre8-icon>` : ''}
|
|
30
56
|
${this.text}
|
|
31
57
|
</div> `;
|
|
32
|
-
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
customElements.
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
f as status,
|
|
52
|
-
u as variant
|
|
53
|
-
};
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
Cre8Badge.styles = [styles];
|
|
61
|
+
__decorate([
|
|
62
|
+
property({ type: String })
|
|
63
|
+
], Cre8Badge.prototype, "text", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
property({ type: String })
|
|
66
|
+
], Cre8Badge.prototype, "status", void 0);
|
|
67
|
+
__decorate([
|
|
68
|
+
property({ type: String })
|
|
69
|
+
], Cre8Badge.prototype, "variant", void 0);
|
|
70
|
+
__decorate([
|
|
71
|
+
property({ type: String })
|
|
72
|
+
], Cre8Badge.prototype, "svg", void 0);
|
|
73
|
+
if (customElements.get('cre8-badge') === undefined) {
|
|
74
|
+
customElements.define('cre8-badge', Cre8Badge);
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=badge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"badge.js","sourceRoot":"","sources":["../../../components/badge/badge.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,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,cAAc,CAAC;AAEtB,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,MAAM,CAAN,IAAY,MAEX;AAFD,WAAY,MAAM;IACjB,qCAAO,CAAA;IAAE,yCAAS,CAAA;IAAE,yCAAS,CAAA;IAAE,mCAAM,CAAA;IAAE,6CAAW,CAAA;IAAE,6CAAS,CAAA;AAC9D,CAAC,EAFW,MAAM,KAAN,MAAM,QAEjB;AACD,MAAM,CAAN,IAAY,OAEX;AAFD,WAAY,OAAO;IACjB,uCAAO,CAAA;IAAE,uCAAO,CAAA;IAAE,+CAAS,CAAA;AAC7B,CAAC,EAFW,OAAO,KAAP,OAAO,QAElB;AAED;;;;;GAKG;AACH,MAAM,OAAO,SAAU,SAAQ,WAAW;IAA1C;;QAGE;;WAEG;QAEC,SAAI,GAAW,SAAS,CAAC;IAqD/B,CAAC;IAlBC,MAAM;QACF,MAAM,kBAAkB,GAAG,UAAU,CAAC,cAAc,EAAE;YAClD,uBAAuB,EAAE,IAAI,CAAC,MAAM,KAAK,SAAS;YAClD,uBAAuB,EAAE,IAAI,CAAC,MAAM,KAAK,SAAS;YAClD,qBAAqB,EAAE,IAAI,CAAC,MAAM,KAAK,OAAO;YAC9C,oBAAoB,EAAE,IAAI,CAAC,MAAM,KAAK,MAAM;YAC5C,yBAAyB,EAAE,IAAI,CAAC,MAAM,KAAK,WAAW;YACtD,qBAAqB,EAAE,IAAI,CAAC,OAAO,KAAK,OAAO;YAC/C,qBAAqB,EAAE,IAAI,CAAC,OAAO,KAAK,OAAO;SAClD,CAAC,CAAC;QAEH,OAAO,IAAI,CAAA,eAAe,kBAAkB;UACxC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAA;mBACN,IAAI,CAAC,GAAG;qBACN,CAAC,CAAC,CAAC,EAAE;UAChB,IAAI,CAAC,IAAI;gBACH,CAAC;IACf,CAAC;;AA1DQ,gBAAM,GAAG,CAAC,MAAM,CAAC,AAAX,CAAY;AAMvB;IADH,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;uCACE;AAYzB;IADH,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;yCACR;AAUf;IADH,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;0CACP;AAWhB;IADH,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;sCACV;AAsBnB,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 classnames from 'classnames';\nimport { html, } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { Cre8Element } from '../cre8-element';\nimport '../icon/icon';\n\nimport styles from './badge.styles.js';\n\nexport enum status {\n 'error', 'warning', 'success', 'info', 'attention', undefined\n}\nexport enum variant {\n 'light', 'white', undefined\n}\n\n/**\n * Status badges are used most often in tables or fat rows in a list.\n * These Components serve a contextual purpose and don't provide any functionality.\n * Badges should be organized inside a dedicated table row communicating status such as pending, approved or rejected.\n *\n */\nexport class Cre8Badge extends Cre8Element {\n static styles = [styles];\n\n /**\n * The badge text\n */\n @property({ type: String })\n text: string = undefined;\n\n /**\n * Status (a color variant prop)\n * - **neutral** (default) renders a badge with a neutral state treatment\n * - **success** renders a badge with success state treatment\n * - **warning** renders a badge with warning state treatment\n * - **error** renders a badge with error state treatment\n * - **info** renders a badge with information state treatment\n * - **attention** renders a badge with attention state treatment\n */\n @property({ type: String })\n status: string;\n\n /**\n * Background Style Variant\n *\n * - **dark|undefined** (default) renders a badge with a dark background\n * - **light** renders a badge with a light background\n * - **white** renders a badge with a white background\n */\n @property({ type: String })\n variant: string;\n\n /**\n * SVG as a raw string\n * - For badges with icons, the icon is defined by this prop\n * - Pass in a raw svg as a String. We use raw string loader for this but any method of getting raw svgs will do\n * - Import example:`import svgFeedback from '/Users/tylersmbp/Projects/cre8-web-components/packages/cre8-wc/icons/System/Regular/Feedback.svg?raw';`\n * - [cre8-icons Github repo](https://git.express-scripts.com/ExpressScripts/cre8-icons) This is the Github\n * repo for Cre8 icons, which includes a link to the storybook as well as relavant information for new icons\n */\n @property({ type: String })\n svg?: string;\n\n render() {\n const componentClassName = classnames('cre8-c-badge', {\n 'cre8-c-badge--success': this.status === 'success',\n 'cre8-c-badge--warning': this.status === 'warning',\n 'cre8-c-badge--error': this.status === 'error',\n 'cre8-c-badge--info': this.status === 'info',\n 'cre8-c-badge--attention': this.status === 'attention',\n 'cre8-c-badge--light': this.variant === 'light',\n 'cre8-c-badge--white': this.variant === 'white',\n });\n\n return html`<div class=\"${componentClassName}\">\n ${this.svg ? html` <cre8-icon \n svg='${this.svg}' aria-hidden='true'></cre8-icon>\n </cre8-icon>` : ''} \n ${this.text} \n </div> `;\n }\n}\n\nif (customElements.get('cre8-badge') === undefined) {\n customElements.define('cre8-badge', Cre8Badge);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'cre8-badge': Cre8Badge;\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:inline-flex}.cre8-c-badge{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);display:inline-flex;border-radius:var(--cre8-border-radius-badge);padding:var(--cre8-badge-padding-vertical) var(--cre8-badge-padding-horizontal);color:var(--cre8-color-content-knockout);background-color:var(--cre8-color-bg-strong);align-items:center}.cre8-c-badge--success{background-color:var(--cre8-color-bg-success-strong)}.cre8-c-badge--warning{background-color:var(--cre8-color-bg-warning-strong);color:var(--cre8-color-content-default)}cre8-icon{height:var(--cre8-icon-height, 1rem);margin-right:0.25rem}.cre8-c-badge--error{background-color:var(--cre8-color-bg-error-strong)}.cre8-c-badge--info{background-color:var(--cre8-color-bg-info-strong)}.cre8-c-badge--attention{background-color:var(--cre8-color-bg-attention-strong)}.cre8-c-badge--light{background-color:var(--cre8-color-bg-subtle);color:var(--cre8-color-content-default)}.cre8-c-badge--light.cre8-c-badge--success{background-color:var(--cre8-color-bg-success);color:var(--cre8-color-content-success)}.cre8-c-badge--light.cre8-c-badge--warning{background-color:var(--cre8-color-bg-warning)}.cre8-c-badge--light.cre8-c-badge--error{background-color:var(--cre8-color-bg-error);color:var(--cre8-color-content-error)}.cre8-c-badge--light.cre8-c-badge--info{background-color:var(--cre8-color-bg-info)}.cre8-c-badge--light.cre8-c-badge--attention{background-color:var(--cre8-color-bg-attention)}.cre8-c-badge--white{background-color:var(--cre8-color-bg-default);color:var(--cre8-color-content-default)}.cre8-c-badge--white.cre8-c-badge--success{color:var(--cre8-color-content-success)}.cre8-c-badge--white.cre8-c-badge--error{background-color:none;color:var(--cre8-color-content-error)}`;
|
|
3
|
+
export default styles;
|
|
4
|
+
//# sourceMappingURL=badge.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"badge.styles.js","sourceRoot":"","sources":["../../../components/badge/badge.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,MAAM,MAAM,GAAG,GAAG,CAAA,6wHAA6wH,CAAC;AAChyH,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:inline-flex}.cre8-c-badge{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);display:inline-flex;border-radius:var(--cre8-border-radius-badge);padding:var(--cre8-badge-padding-vertical) var(--cre8-badge-padding-horizontal);color:var(--cre8-color-content-knockout);background-color:var(--cre8-color-bg-strong);align-items:center}.cre8-c-badge--success{background-color:var(--cre8-color-bg-success-strong)}.cre8-c-badge--warning{background-color:var(--cre8-color-bg-warning-strong);color:var(--cre8-color-content-default)}cre8-icon{height:var(--cre8-icon-height, 1rem);margin-right:0.25rem}.cre8-c-badge--error{background-color:var(--cre8-color-bg-error-strong)}.cre8-c-badge--info{background-color:var(--cre8-color-bg-info-strong)}.cre8-c-badge--attention{background-color:var(--cre8-color-bg-attention-strong)}.cre8-c-badge--light{background-color:var(--cre8-color-bg-subtle);color:var(--cre8-color-content-default)}.cre8-c-badge--light.cre8-c-badge--success{background-color:var(--cre8-color-bg-success);color:var(--cre8-color-content-success)}.cre8-c-badge--light.cre8-c-badge--warning{background-color:var(--cre8-color-bg-warning)}.cre8-c-badge--light.cre8-c-badge--error{background-color:var(--cre8-color-bg-error);color:var(--cre8-color-content-error)}.cre8-c-badge--light.cre8-c-badge--info{background-color:var(--cre8-color-bg-info)}.cre8-c-badge--light.cre8-c-badge--attention{background-color:var(--cre8-color-bg-attention)}.cre8-c-badge--white{background-color:var(--cre8-color-bg-default);color:var(--cre8-color-content-default)}.cre8-c-badge--white.cre8-c-badge--success{color:var(--cre8-color-content-success)}.cre8-c-badge--white.cre8-c-badge--error{background-color:none;color:var(--cre8-color-content-error)}`;\nexport default styles;\n"]}
|