@tmorrow/cre8-wc 1.0.25 → 1.1.1
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 +9082 -15604
- package/cdn/cre8-wc.esm.js.map +1 -1
- package/cdn/cre8-wc.min.js +1231 -8308
- package/cdn/cre8-wc.min.js.map +1 -1
- package/lib/cdn-entry.d.ts +20 -2
- package/lib/cdn-entry.d.ts.map +1 -1
- package/lib/components/accordion/accordion.js +18 -64
- package/lib/components/accordion/accordion.styles.d.ts.map +1 -1
- package/lib/components/accordion-item/accordion-item.js +35 -238
- package/lib/components/accordion-item/accordion-item.styles.d.ts.map +1 -1
- package/lib/components/alert/alert.js +56 -221
- package/lib/components/alert/alert.styles.d.ts.map +1 -1
- package/lib/components/badge/badge.js +33 -164
- package/lib/components/badge/badge.styles.d.ts.map +1 -1
- package/lib/components/band/band.js +15 -46
- package/lib/components/band/band.styles.d.ts.map +1 -1
- package/lib/components/breadcrumbs/breadcrumbs.js +14 -33
- package/lib/components/breadcrumbs/breadcrumbs.styles.d.ts.map +1 -1
- package/lib/components/breadcrumbs-item/breadcrumbs-item.js +10 -45
- package/lib/components/breadcrumbs-item/breadcrumbs-item.styles.d.ts.map +1 -1
- package/lib/components/button/button.js +16 -16
- package/lib/components/button-group/button-group.js +19 -50
- package/lib/components/button-group/button-group.styles.d.ts.map +1 -1
- package/lib/components/card/card.js +17 -130
- package/lib/components/card/card.styles.d.ts.map +1 -1
- package/lib/components/chart/chart.js +137 -223
- package/lib/components/chart/chart.styles.d.ts.map +1 -1
- package/lib/components/checkbox-field/checkbox-field.js +26 -59
- package/lib/components/checkbox-field/checkbox-field.styles.d.ts.map +1 -1
- package/lib/components/checkbox-field-item/checkbox-field-item.d.ts +0 -5
- package/lib/components/checkbox-field-item/checkbox-field-item.d.ts.map +1 -1
- package/lib/components/checkbox-field-item/checkbox-field-item.js +42 -212
- package/lib/components/checkbox-field-item/checkbox-field-item.styles.d.ts.map +1 -1
- package/lib/components/contexts/form-internals-context.d.ts +30 -0
- package/lib/components/contexts/form-internals-context.d.ts.map +1 -0
- package/lib/components/cre8-form-element.d.ts +98 -24
- package/lib/components/cre8-form-element.d.ts.map +1 -1
- package/lib/components/cre8-form-element.js +221 -22
- package/lib/components/danger-button/danger-button.js +53 -582
- package/lib/components/danger-button/danger-button.styles.d.ts.map +1 -1
- package/lib/components/date-picker/calendar/calendar.styles.d.ts.map +1 -1
- package/lib/components/date-picker/calendar-month-modal/calendar-month-modal.styles.d.ts.map +1 -1
- package/lib/components/date-picker/calendar-navigation/calendar-navigation.styles.d.ts.map +1 -1
- package/lib/components/date-picker/calendar-year-modal/calendar-year-modal.styles.d.ts.map +1 -1
- package/lib/components/date-picker/date-picker.js +262 -499
- package/lib/components/date-picker/date-picker.styles.d.ts.map +1 -1
- package/lib/components/divider/divider.js +20 -61
- package/lib/components/divider/divider.styles.d.ts.map +1 -1
- package/lib/components/dropdown/dropdown.js +34 -107
- package/lib/components/dropdown/dropdown.styles.d.ts.map +1 -1
- package/lib/components/dropdown-item/dropdown-item.js +18 -49
- package/lib/components/dropdown-item/dropdown-item.styles.d.ts.map +1 -1
- package/lib/components/feature/feature.js +19 -81
- package/lib/components/feature/feature.styles.d.ts.map +1 -1
- package/lib/components/field/field.js +12 -146
- package/lib/components/field/field.styles.d.ts.map +1 -1
- package/lib/components/field-note/field-note.js +22 -66
- package/lib/components/field-note/field-note.styles.d.ts.map +1 -1
- package/lib/components/footer/footer.js +10 -29
- package/lib/components/footer/footer.styles.d.ts.map +1 -1
- package/lib/components/global-nav/global-nav.js +20 -43
- package/lib/components/global-nav/global-nav.styles.d.ts.map +1 -1
- package/lib/components/global-nav-item/global-nav-item.js +26 -105
- package/lib/components/global-nav-item/global-nav-item.styles.d.ts.map +1 -1
- package/lib/components/grid/grid.js +15 -337
- package/lib/components/grid/grid.styles.d.ts.map +1 -1
- package/lib/components/grid-item/grid-item.js +7 -15
- package/lib/components/grid-item/grid-item.styles.d.ts.map +1 -1
- package/lib/components/header/header.js +17 -80
- package/lib/components/header/header.styles.d.ts.map +1 -1
- package/lib/components/heading/heading.js +16 -153
- package/lib/components/heading/heading.styles.d.ts.map +1 -1
- package/lib/components/hero/hero.js +17 -149
- package/lib/components/hero/hero.styles.d.ts.map +1 -1
- package/lib/components/icon/icon.js +1 -1
- package/lib/components/icon/icon.styles.d.ts.map +1 -1
- package/lib/components/inline-alert/inline-alert.js +53 -214
- package/lib/components/inline-alert/inline-alert.styles.d.ts.map +1 -1
- package/lib/components/layout/layout.js +20 -53
- package/lib/components/layout/layout.styles.d.ts.map +1 -1
- package/lib/components/layout-container/layout-container.js +20 -43
- package/lib/components/layout-container/layout-container.styles.d.ts.map +1 -1
- package/lib/components/layout-section/layout-section.js +20 -29
- package/lib/components/layout-section/layout-section.styles.d.ts.map +1 -1
- package/lib/components/linelength-container/linelength-container.js +7 -15
- package/lib/components/linelength-container/linelength-container.styles.d.ts.map +1 -1
- package/lib/components/link/link.js +33 -228
- package/lib/components/link/link.styles.d.ts.map +1 -1
- package/lib/components/link-list/link-list.js +23 -129
- package/lib/components/link-list/link-list.styles.d.ts.map +1 -1
- package/lib/components/link-list-item/link-list-item.js +19 -80
- package/lib/components/link-list-item/link-list-item.styles.d.ts.map +1 -1
- package/lib/components/list/list.js +17 -67
- package/lib/components/list/list.styles.d.ts.map +1 -1
- package/lib/components/list-item/list-item.js +11 -16
- package/lib/components/list-item/list-item.styles.d.ts.map +1 -1
- package/lib/components/loading-spinner/loading-spinner.js +13 -157
- package/lib/components/loading-spinner/loading-spinner.styles.d.ts.map +1 -1
- package/lib/components/logo/logo.js +20 -30
- package/lib/components/logo/logo.styles.d.ts.map +1 -1
- package/lib/components/main/main.js +18 -42
- package/lib/components/main/main.styles.d.ts.map +1 -1
- package/lib/components/modal/modal.js +50 -215
- package/lib/components/modal/modal.styles.d.ts.map +1 -1
- package/lib/components/multi-select/multi-select.js +57 -222
- package/lib/components/multi-select/multi-select.styles.d.ts.map +1 -1
- package/lib/components/nav-container/nav-container.js +5 -40
- package/lib/components/nav-container/nav-container.styles.d.ts.map +1 -1
- package/lib/components/page-header/page-header.js +19 -54
- package/lib/components/page-header/page-header.styles.d.ts.map +1 -1
- package/lib/components/pagination/page-counter/page-counter.styles.d.ts.map +1 -1
- package/lib/components/pagination/pagination.js +102 -183
- package/lib/components/pagination/pagination.styles.d.ts.map +1 -1
- package/lib/components/percent-bar/percent-bar.js +22 -50
- package/lib/components/percent-bar/percent-bar.styles.d.ts.map +1 -1
- package/lib/components/popover/popover.js +51 -220
- package/lib/components/popover/popover.styles.d.ts.map +1 -1
- package/lib/components/primary-nav/primary-nav.js +17 -51
- package/lib/components/primary-nav/primary-nav.styles.d.ts.map +1 -1
- package/lib/components/primary-nav-item/primary-nav-item.js +24 -191
- package/lib/components/primary-nav-item/primary-nav-item.styles.d.ts.map +1 -1
- package/lib/components/progress-meter/progress-meter.js +23 -127
- package/lib/components/progress-meter/progress-meter.styles.d.ts.map +1 -1
- package/lib/components/progress-steps/progress-steps.styles.d.ts.map +1 -1
- package/lib/components/progress-steps-item/progress-steps-item.js +27 -118
- package/lib/components/progress-steps-item/progress-steps-item.styles.d.ts.map +1 -1
- package/lib/components/radio-field/radio-field.js +28 -64
- package/lib/components/radio-field/radio-field.styles.d.ts.map +1 -1
- package/lib/components/radio-field-item/radio-field-item.d.ts +0 -4
- package/lib/components/radio-field-item/radio-field-item.d.ts.map +1 -1
- package/lib/components/radio-field-item/radio-field-item.js +69 -207
- package/lib/components/radio-field-item/radio-field-item.styles.d.ts.map +1 -1
- package/lib/components/remove-tag/remove-tag.js +36 -129
- package/lib/components/remove-tag/remove-tag.styles.d.ts.map +1 -1
- package/lib/components/section/section.js +19 -50
- package/lib/components/section/section.styles.d.ts.map +1 -1
- package/lib/components/select/select.d.ts +6 -10
- package/lib/components/select/select.d.ts.map +1 -1
- package/lib/components/select/select.js +67 -135
- package/lib/components/select/select.styles.d.ts.map +1 -1
- package/lib/components/select-tile/select-tile.d.ts +0 -4
- package/lib/components/select-tile/select-tile.d.ts.map +1 -1
- package/lib/components/select-tile/select-tile.js +21 -448
- package/lib/components/select-tile/select-tile.styles.d.ts.map +1 -1
- package/lib/components/select-tile-list/select-tile-list.js +24 -62
- package/lib/components/select-tile-list/select-tile-list.styles.d.ts.map +1 -1
- package/lib/components/skeleton-loader/skeleton-loader.js +19 -73
- package/lib/components/skeleton-loader/skeleton-loader.styles.d.ts.map +1 -1
- package/lib/components/split-button/split-button.js +21 -37
- package/lib/components/split-button/split-button.styles.d.ts.map +1 -1
- package/lib/components/submenu/submenu.js +8 -18
- package/lib/components/submenu/submenu.styles.d.ts.map +1 -1
- package/lib/components/submenu-item/submenu-item.js +21 -42
- package/lib/components/submenu-item/submenu-item.styles.d.ts.map +1 -1
- package/lib/components/tab/tab.js +17 -100
- package/lib/components/tab/tab.styles.d.ts.map +1 -1
- package/lib/components/tab-panel/tab-panel.js +18 -52
- package/lib/components/tab-panel/tab-panel.styles.d.ts.map +1 -1
- package/lib/components/table/table.js +21 -73
- package/lib/components/table/table.styles.d.ts.map +1 -1
- package/lib/components/table-body/table-body.js +12 -24
- package/lib/components/table-body/table-body.styles.d.ts.map +1 -1
- package/lib/components/table-cell/table-cell.js +29 -69
- package/lib/components/table-cell/table-cell.styles.d.ts.map +1 -1
- package/lib/components/table-header/table-header.js +8 -39
- package/lib/components/table-header/table-header.styles.d.ts.map +1 -1
- package/lib/components/table-header-cell/table-header-cell.js +18 -37
- package/lib/components/table-header-cell/table-header-cell.styles.d.ts.map +1 -1
- package/lib/components/table-object/table-object.js +13 -32
- package/lib/components/table-object/table-object.styles.d.ts.map +1 -1
- package/lib/components/table-row/table-row.js +33 -139
- package/lib/components/table-row/table-row.styles.d.ts.map +1 -1
- package/lib/components/tabs/tabs.d.ts.map +1 -1
- package/lib/components/tabs/tabs.js +58 -159
- package/lib/components/tabs/tabs.styles.d.ts.map +1 -1
- package/lib/components/tag/tag.js +46 -161
- package/lib/components/tag/tag.styles.d.ts.map +1 -1
- package/lib/components/tag-list/tag-list.js +20 -51
- package/lib/components/tag-list/tag-list.styles.d.ts.map +1 -1
- package/lib/components/tertiary-nav/tertiary-nav.js +21 -54
- package/lib/components/tertiary-nav/tertiary-nav.styles.d.ts.map +1 -1
- package/lib/components/tertiary-nav-item/tertiary-nav-item.js +18 -68
- package/lib/components/tertiary-nav-item/tertiary-nav-item.styles.d.ts.map +1 -1
- package/lib/components/text-link/text-link.js +20 -85
- package/lib/components/text-link/text-link.styles.d.ts.map +1 -1
- package/lib/components/text-passage/text-passage-light-dom.styles.d.ts.map +1 -1
- package/lib/components/text-passage/text-passage.js +17 -189
- package/lib/components/text-passage/text-passage.styles.d.ts.map +1 -1
- package/lib/components/tooltip/tooltip.js +57 -248
- package/lib/components/tooltip/tooltip.styles.d.ts.map +1 -1
- package/lib/components/utility-nav/utility-nav.js +23 -56
- package/lib/components/utility-nav/utility-nav.styles.d.ts.map +1 -1
- package/lib/components/utility-nav-item/utility-nav-item.js +28 -83
- package/lib/components/utility-nav-item/utility-nav-item.styles.d.ts.map +1 -1
- package/lib/design-tokens/brands/blue/css/tokens_blue.module.d.ts.map +1 -1
- package/lib/design-tokens/brands/bolt/tokens_bolt.theme.d.ts.map +1 -1
- package/lib/design-tokens/brands/cre8-a2ui/css/tokens_cre8-a2ui.module.d.ts +3 -0
- package/lib/design-tokens/brands/cre8-a2ui/css/tokens_cre8-a2ui.module.d.ts.map +1 -0
- package/lib/design-tokens/brands/cre8-legacy/css/tokens_cre8-legacy.module.d.ts.map +1 -1
- package/lib/design-tokens/brands/femmecubator/css/tokens_femmecubator2.module.d.ts.map +1 -1
- package/lib/design-tokens/brands/legacy/css/tokens_legacy.module.d.ts.map +1 -1
- package/lib/design-tokens/brands/marketing/css/tokens_marketing.module.d.ts.map +1 -1
- package/lib/design-tokens/brands/minimalist/css/tokens_minimalist.module.d.ts +2 -2
- package/lib/design-tokens/brands/minimalist/css/tokens_minimalist.module.d.ts.map +1 -1
- package/lib/design-tokens/brands/starbucks/tokens_starbucks.module.d.ts.map +1 -1
- package/lib/design-tokens/core/scss/theming/component.scss +6 -6
- package/lib/design-tokens/core/scss/theming/functions.scss +4 -0
- package/lib/design-tokens/core/scss/theming/spacing.scss +60 -60
- package/lib/design-tokens/core/scss/theming/variables.scss +11 -11
- package/lib/design-tokens/mixins/typography-usage.scss +277 -277
- package/lib/design-tokens/tokens_netflix.theme.d.ts.map +1 -1
- package/lib/{icon-DImqxDiW.js → icon-D22g8aWB.js} +35 -138
- package/lib/index.js +1 -1
- package/package.json +12 -5
|
@@ -1,234 +1,69 @@
|
|
|
1
|
-
import { d as
|
|
2
|
-
import { s as
|
|
3
|
-
import { css as
|
|
1
|
+
import { d as h, f as p, b as g, c as m } from "../../icon-D22g8aWB.js";
|
|
2
|
+
import { s as u } from "../../Error-aYunUubM.js";
|
|
3
|
+
import { css as f, nothing as v, html as r } from "lit";
|
|
4
4
|
import { property as t } from "lit/decorators.js";
|
|
5
5
|
import "../button/button.js";
|
|
6
6
|
import "../link/link.js";
|
|
7
7
|
import "../heading/heading.js";
|
|
8
8
|
import "../text-passage/text-passage.js";
|
|
9
|
-
import { Cre8Element as
|
|
10
|
-
const
|
|
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
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
12
|
</svg>
|
|
13
|
-
`,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.cre8-c-alert {
|
|
21
|
-
padding: var(--cre8-spacing-16);
|
|
22
|
-
border-width: var(--cre8-border-width-default);
|
|
23
|
-
border-style: var(--cre8-border-style-default);
|
|
24
|
-
border-radius: var(--cre8-border-radius-default);
|
|
25
|
-
|
|
26
|
-
.cre8-c-alert__container {
|
|
27
|
-
display: flex;
|
|
28
|
-
gap: var(--cre8-spacing-8);
|
|
29
|
-
position: relative;
|
|
30
|
-
|
|
31
|
-
.cre8-c-alert__message-container {
|
|
32
|
-
color: var(--cre8-color-content-knockout);
|
|
33
|
-
display: flex;
|
|
34
|
-
flex-direction: column;
|
|
35
|
-
|
|
36
|
-
.cre8-c-alert__heading-container {
|
|
37
|
-
@include cre8-typography-title-small;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.cre8-c-alert__body-container {
|
|
41
|
-
@include cre8-typography-body-small;
|
|
42
|
-
padding-bottom: var(--cre8-spacing-8);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.cre8-c-alert__footer-container {
|
|
46
|
-
padding: 0;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.cre8-c-alert__close-btn {
|
|
52
|
-
position: absolute;
|
|
53
|
-
top: -10px;
|
|
54
|
-
right: 0px;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
&.cre8-c-alert--emphasis-subtle {
|
|
58
|
-
.cre8-c-alert__message-container {
|
|
59
|
-
color: var(--cre8-color-content-default);
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
&.cre8-c-alert--banner {
|
|
64
|
-
border-radius: 0;
|
|
65
|
-
border: none;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
&.cre8-c-alert--warning {
|
|
69
|
-
.cre8-c-alert__message-container {
|
|
70
|
-
color: var(--cre8-color-content-default);
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
.cre8-c-alert--standalone {
|
|
76
|
-
border-radius: var(--cre8-border-radius-default);
|
|
77
|
-
width: calc(8px * 45);
|
|
78
|
-
|
|
79
|
-
.cre8-c-alert__container {
|
|
80
|
-
display: flex;
|
|
81
|
-
gap: var(--cre8-spacing-8);
|
|
82
|
-
position: relative;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
.cre8-c-alert__icon {
|
|
87
|
-
height: var(--cre8-spacing-16);
|
|
88
|
-
min-height: var(--cre8-spacing-16);
|
|
89
|
-
width: var(--cre8-spacing-16);
|
|
90
|
-
min-width: var(--cre8-spacing-16);
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
.cre8-c-alert--info,
|
|
94
|
-
.cre8-c-alert--success,
|
|
95
|
-
.cre8-c-alert--error,
|
|
96
|
-
.cre8-c-alert--neutral,
|
|
97
|
-
.cre8-c-alert--notification {
|
|
98
|
-
color: var(--cre8-color-content-knockout);
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* Alert info
|
|
103
|
-
*/
|
|
104
|
-
.cre8-c-alert--info {
|
|
105
|
-
background: var(--cre8-color-bg-info-strong);
|
|
106
|
-
border-color: var(--cre8-color-border-info);
|
|
107
|
-
|
|
108
|
-
&.cre8-c-alert--emphasis-subtle {
|
|
109
|
-
background: var(--cre8-color-bg-info);
|
|
110
|
-
color: var(--cre8-color-content-info-icon);
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
* Alert warning
|
|
116
|
-
*/
|
|
117
|
-
.cre8-c-alert--warning {
|
|
118
|
-
background: var(--cre8-color-bg-warning-strong);
|
|
119
|
-
border-color: var(--cre8-color-border-warning);
|
|
120
|
-
color: var(--cre8-color-content-default);
|
|
121
|
-
|
|
122
|
-
&.cre8-c-alert--emphasis-subtle {
|
|
123
|
-
background: var(--cre8-color-bg-warning);
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
/**
|
|
128
|
-
* Alert success
|
|
129
|
-
*/
|
|
130
|
-
.cre8-c-alert--success {
|
|
131
|
-
background: var(--cre8-color-bg-success-strong);
|
|
132
|
-
border-color: var(--cre8-color-border-success);
|
|
133
|
-
|
|
134
|
-
&.cre8-c-alert--emphasis-subtle {
|
|
135
|
-
background: var(--cre8-color-bg-success);
|
|
136
|
-
color: var(--cre8-color-content-success-icon);
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
/**
|
|
141
|
-
* Alert error
|
|
142
|
-
*/
|
|
143
|
-
.cre8-c-alert--error {
|
|
144
|
-
background: var(--cre8-color-bg-error-strong);
|
|
145
|
-
border-color: var(--cre8-color-border-error);
|
|
146
|
-
|
|
147
|
-
&.cre8-c-alert--emphasis-subtle {
|
|
148
|
-
background: var(--cre8-color-bg-error);
|
|
149
|
-
color: var(--cre8-color-content-error-icon);
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
/**
|
|
154
|
-
* Alert neutral
|
|
155
|
-
*/
|
|
156
|
-
.cre8-c-alert--neutral {
|
|
157
|
-
background: var(--cre8-color-bg-strong);
|
|
158
|
-
border-color: var(--cre8-color-border-neutral);
|
|
159
|
-
|
|
160
|
-
&.cre8-c-alert--emphasis-subtle {
|
|
161
|
-
background: var(--cre8-color-bg-subtle);
|
|
162
|
-
color: var(--cre8-color-content-default);
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
/**
|
|
167
|
-
* Alert notification
|
|
168
|
-
*/
|
|
169
|
-
.cre8-c-alert--notification {
|
|
170
|
-
background: var(--cre8-color-bg-attention-strong);
|
|
171
|
-
border-color: var(--cre8-color-border-attention);
|
|
172
|
-
|
|
173
|
-
&.cre8-c-alert--emphasis-subtle {
|
|
174
|
-
background: var(--cre8-color-bg-subtle);
|
|
175
|
-
color: var(--cre8-color-content-attention-icon);
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
`;
|
|
179
|
-
var y = Object.defineProperty, c = (n, o, l, $) => {
|
|
180
|
-
for (var a = void 0, s = n.length - 1, d; s >= 0; s--)
|
|
181
|
-
(d = n[s]) && (a = d(o, l, a) || a);
|
|
182
|
-
return a && y(o, l, a), a;
|
|
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;
|
|
183
18
|
};
|
|
184
|
-
const
|
|
19
|
+
const s = class s extends b {
|
|
185
20
|
constructor() {
|
|
186
|
-
super(...arguments), this.status = "info", this.variant = "standalone", this.emphasis = "subtle", this.iconAlert = void 0, this.headerText = void 0, this.ctaBody = void 0, this.checkEmphasisAlert = () => this.emphasis !== "subtle", this.mapStatusToIconAlert = (
|
|
187
|
-
switch (
|
|
21
|
+
super(...arguments), this.status = "info", this.variant = "standalone", this.emphasis = "subtle", this.iconAlert = void 0, this.headerText = void 0, this.ctaBody = void 0, this.checkEmphasisAlert = () => this.emphasis !== "subtle", this.mapStatusToIconAlert = (c) => {
|
|
22
|
+
switch (c) {
|
|
188
23
|
case "error":
|
|
189
|
-
return
|
|
190
|
-
svg="${
|
|
24
|
+
return r`<cre8-icon
|
|
25
|
+
svg="${u}"
|
|
191
26
|
aria-label="${this.iconTitle}"
|
|
192
27
|
aria-hidden="true"
|
|
193
28
|
class="cre8-c-alert__icon"
|
|
194
29
|
></cre8-icon>`;
|
|
195
30
|
case "success":
|
|
196
|
-
return
|
|
197
|
-
svg="${
|
|
31
|
+
return r`<cre8-icon
|
|
32
|
+
svg="${g}"
|
|
198
33
|
aria-label="${this.iconTitle}"
|
|
199
34
|
aria-hidden="true"
|
|
200
35
|
class="cre8-c-alert__icon"
|
|
201
36
|
></cre8-icon>`;
|
|
202
37
|
case "warning":
|
|
203
|
-
return
|
|
204
|
-
svg="${
|
|
38
|
+
return r`<cre8-icon
|
|
39
|
+
svg="${p}"
|
|
205
40
|
aria-label="${this.iconTitle}"
|
|
206
41
|
aria-hidden="true"
|
|
207
42
|
class="cre8-c-alert__icon"
|
|
208
43
|
></cre8-icon>`;
|
|
209
44
|
case "notification":
|
|
210
|
-
return
|
|
211
|
-
svg="${
|
|
45
|
+
return r`<cre8-icon
|
|
46
|
+
svg="${y}"
|
|
212
47
|
aria-label="${this.iconTitle}"
|
|
213
48
|
aria-hidden="true"
|
|
214
49
|
class="cre8-c-alert__icon"
|
|
215
50
|
></cre8-icon>`;
|
|
216
51
|
case "info":
|
|
217
|
-
return
|
|
218
|
-
svg="${
|
|
52
|
+
return r`<cre8-icon
|
|
53
|
+
svg="${h}"
|
|
219
54
|
aria-label="${this.iconTitle}"
|
|
220
55
|
aria-hidden="true"
|
|
221
56
|
class="cre8-c-alert__icon"
|
|
222
57
|
></cre8-icon>`;
|
|
223
58
|
case "neutral":
|
|
224
|
-
return
|
|
225
|
-
svg="${
|
|
59
|
+
return r`<cre8-icon
|
|
60
|
+
svg="${h}"
|
|
226
61
|
aria-label="${this.iconTitle}"
|
|
227
62
|
aria-hidden="true"
|
|
228
63
|
class="cre8-c-alert__icon"
|
|
229
64
|
></cre8-icon>`;
|
|
230
65
|
default:
|
|
231
|
-
return
|
|
66
|
+
return v;
|
|
232
67
|
}
|
|
233
68
|
};
|
|
234
69
|
}
|
|
@@ -240,7 +75,7 @@ const i = class i extends f {
|
|
|
240
75
|
this.dismissed = !0;
|
|
241
76
|
}
|
|
242
77
|
render() {
|
|
243
|
-
const
|
|
78
|
+
const c = this.componentClassNames("cre8-c-alert", {
|
|
244
79
|
"cre8-c-alert--error": this.status === "error",
|
|
245
80
|
"cre8-c-alert--info": this.status === "info",
|
|
246
81
|
"cre8-c-alert--notification": this.status === "notification",
|
|
@@ -252,17 +87,17 @@ const i = class i extends f {
|
|
|
252
87
|
"cre8-c-alert--emphasis-subtle": this.emphasis === "subtle",
|
|
253
88
|
"cre8-c-alert--notdismissible": this.notDismissible
|
|
254
89
|
});
|
|
255
|
-
return this.dismissed ? null :
|
|
90
|
+
return this.dismissed ? null : r`
|
|
256
91
|
<dialog open>
|
|
257
|
-
<div class="${
|
|
92
|
+
<div class="${c}">
|
|
258
93
|
<div class="cre8-c-alert__container">
|
|
259
|
-
${this.status ?
|
|
94
|
+
${this.status ? r` ${this.mapStatusToIconAlert(this.status)}` : ""}
|
|
260
95
|
<div class="cre8-c-alert__message-container">
|
|
261
96
|
<div class="cre8-c-alert__heading-container">
|
|
262
|
-
${this.headerText ?
|
|
263
|
-
${this.notDismissible ? "" :
|
|
97
|
+
${this.headerText ? r`${this.headerText}` : ""}
|
|
98
|
+
${this.notDismissible ? "" : r`<cre8-button
|
|
264
99
|
class="cre8-c-alert__close-btn"
|
|
265
|
-
svg='${
|
|
100
|
+
svg='${m}'
|
|
266
101
|
iconRotateDegree="90"
|
|
267
102
|
iconPosition="after"
|
|
268
103
|
variant="tertiary"
|
|
@@ -285,37 +120,37 @@ const i = class i extends f {
|
|
|
285
120
|
`;
|
|
286
121
|
}
|
|
287
122
|
};
|
|
288
|
-
|
|
289
|
-
let
|
|
290
|
-
|
|
123
|
+
s.styles = [x];
|
|
124
|
+
let e = s;
|
|
125
|
+
a([
|
|
291
126
|
t({ reflect: !0 })
|
|
292
|
-
],
|
|
293
|
-
|
|
127
|
+
], e.prototype, "status");
|
|
128
|
+
a([
|
|
294
129
|
t({ reflect: !0 })
|
|
295
|
-
],
|
|
296
|
-
|
|
130
|
+
], e.prototype, "variant");
|
|
131
|
+
a([
|
|
297
132
|
t({ reflect: !0 })
|
|
298
|
-
],
|
|
299
|
-
|
|
133
|
+
], e.prototype, "emphasis");
|
|
134
|
+
a([
|
|
300
135
|
t({ type: String })
|
|
301
|
-
],
|
|
302
|
-
|
|
136
|
+
], e.prototype, "iconAlert");
|
|
137
|
+
a([
|
|
303
138
|
t()
|
|
304
|
-
],
|
|
305
|
-
|
|
139
|
+
], e.prototype, "iconTitle");
|
|
140
|
+
a([
|
|
306
141
|
t({ type: String })
|
|
307
|
-
],
|
|
308
|
-
|
|
142
|
+
], e.prototype, "headerText");
|
|
143
|
+
a([
|
|
309
144
|
t({ type: String })
|
|
310
|
-
],
|
|
311
|
-
|
|
145
|
+
], e.prototype, "ctaBody");
|
|
146
|
+
a([
|
|
312
147
|
t({ type: Boolean, reflect: !0 })
|
|
313
|
-
],
|
|
314
|
-
|
|
148
|
+
], e.prototype, "dismissed");
|
|
149
|
+
a([
|
|
315
150
|
t({ type: Boolean, reflect: !0 })
|
|
316
|
-
],
|
|
317
|
-
customElements.get("cre8-alert") === void 0 && customElements.define("cre8-alert",
|
|
151
|
+
], e.prototype, "notDismissible");
|
|
152
|
+
customElements.get("cre8-alert") === void 0 && customElements.define("cre8-alert", e);
|
|
318
153
|
export {
|
|
319
|
-
|
|
320
|
-
|
|
154
|
+
e as Cre8Alert,
|
|
155
|
+
e as default
|
|
321
156
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alert.styles.d.ts","sourceRoot":"","sources":["../../../components/alert/alert.styles.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"alert.styles.d.ts","sourceRoot":"","sources":["../../../components/alert/alert.styles.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,MAAM,yBAAumM,CAAC;AACpnM,eAAe,MAAM,CAAC"}
|
|
@@ -1,151 +1,20 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { css as
|
|
3
|
-
import { property as
|
|
4
|
-
import { Cre8Element as
|
|
5
|
-
import "../../icon-
|
|
6
|
-
const h =
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* 1) Badges are blocks of color with text inside used for messaging
|
|
15
|
-
*/
|
|
16
|
-
.cre8-c-badge {
|
|
17
|
-
@include cre8-typography-label-small();
|
|
18
|
-
display: inline-flex;
|
|
19
|
-
border-radius: var(--cre8-border-radius-badge);
|
|
20
|
-
padding: var(--cre8-badge-padding-vertical) var(--cre8-badge-padding-horizontal);
|
|
21
|
-
|
|
22
|
-
color: var(--cre8-color-content-knockout);
|
|
23
|
-
background-color: var(--cre8-color-bg-strong);
|
|
24
|
-
align-items: center;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Success badge
|
|
29
|
-
*/
|
|
30
|
-
.cre8-c-badge--success {
|
|
31
|
-
background-color: var(--cre8-color-bg-success-strong);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* Warning badge
|
|
36
|
-
*/
|
|
37
|
-
.cre8-c-badge--warning {
|
|
38
|
-
background-color: var(--cre8-color-bg-warning-strong);
|
|
39
|
-
color: var(--cre8-color-content-default);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* Creating space between icon and text
|
|
44
|
-
*/
|
|
45
|
-
cre8-icon {
|
|
46
|
-
height: var(--cre8-icon-height, calc(8px * 2));
|
|
47
|
-
margin-right: calc(8px * 0.5);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* Error badge
|
|
52
|
-
*/
|
|
53
|
-
.cre8-c-badge--error {
|
|
54
|
-
background-color: var(--cre8-color-bg-error-strong);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* Info badge
|
|
59
|
-
*/
|
|
60
|
-
.cre8-c-badge--info {
|
|
61
|
-
background-color: var(--cre8-color-bg-info-strong);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* Attention badge
|
|
66
|
-
*/
|
|
67
|
-
.cre8-c-badge--attention {
|
|
68
|
-
background-color: var(--cre8-color-bg-attention-strong);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* Light neutral (default) badge
|
|
73
|
-
*/
|
|
74
|
-
.cre8-c-badge--light {
|
|
75
|
-
background-color: var(--cre8-color-bg-subtle);
|
|
76
|
-
color: var(--cre8-color-content-default);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
* Light Success badge
|
|
81
|
-
*/
|
|
82
|
-
.cre8-c-badge--light.cre8-c-badge--success {
|
|
83
|
-
background-color: var(--cre8-color-bg-success);
|
|
84
|
-
color: var(--cre8-color-content-success);
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
* Light Warning badge
|
|
89
|
-
*/
|
|
90
|
-
.cre8-c-badge--light.cre8-c-badge--warning {
|
|
91
|
-
background-color: var(--cre8-color-bg-warning);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
/**
|
|
95
|
-
* Light Error badge
|
|
96
|
-
*/
|
|
97
|
-
.cre8-c-badge--light.cre8-c-badge--error {
|
|
98
|
-
background-color: var(--cre8-color-bg-error);
|
|
99
|
-
color: var(--cre8-color-content-error);
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
/**
|
|
103
|
-
* Light Info badge
|
|
104
|
-
*/
|
|
105
|
-
.cre8-c-badge--light.cre8-c-badge--info {
|
|
106
|
-
background-color: var(--cre8-color-bg-info);
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
/**
|
|
110
|
-
* Light Attention badge
|
|
111
|
-
*/
|
|
112
|
-
.cre8-c-badge--light.cre8-c-badge--attention {
|
|
113
|
-
background-color: var(--cre8-color-bg-attention);
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
/**
|
|
117
|
-
* White neutral (default) badge
|
|
118
|
-
*/
|
|
119
|
-
.cre8-c-badge--white {
|
|
120
|
-
background-color: var(--cre8-color-bg-default);
|
|
121
|
-
color: var(--cre8-color-content-default);
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
/**
|
|
125
|
-
* White Success badge
|
|
126
|
-
*/
|
|
127
|
-
.cre8-c-badge--white.cre8-c-badge--success {
|
|
128
|
-
color: var(--cre8-color-content-success);
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
/**
|
|
132
|
-
* White Error badge
|
|
133
|
-
*/
|
|
134
|
-
.cre8-c-badge--white.cre8-c-badge--error {
|
|
135
|
-
background-color: none;
|
|
136
|
-
color: var(--cre8-color-content-error);
|
|
137
|
-
}`;
|
|
138
|
-
var v = Object.defineProperty, n = (r, o, i, m) => {
|
|
139
|
-
for (var c = void 0, a = r.length - 1, d; a >= 0; a--)
|
|
140
|
-
(d = r[a]) && (c = d(o, i, c) || c);
|
|
141
|
-
return c && v(o, i, c), c;
|
|
142
|
-
}, p = /* @__PURE__ */ ((r) => (r[r.error = 0] = "error", r[r.warning = 1] = "warning", r[r.success = 2] = "success", r[r.info = 3] = "info", r[r.attention = 4] = "attention", r[r.undefined = 5] = "undefined", r))(p || {}), f = /* @__PURE__ */ ((r) => (r[r.light = 0] = "light", r[r.white = 1] = "white", r[r.undefined = 2] = "undefined", r))(f || {});
|
|
143
|
-
const g = class g extends u {
|
|
1
|
+
import g from "classnames";
|
|
2
|
+
import { css as h, html as d } from "lit";
|
|
3
|
+
import { property as c } from "lit/decorators.js";
|
|
4
|
+
import { Cre8Element as p } from "../cre8-element.js";
|
|
5
|
+
import "../../icon-D22g8aWB.js";
|
|
6
|
+
const b = h`*,::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)}`;
|
|
7
|
+
var m = Object.defineProperty, a = (e, o, s, v) => {
|
|
8
|
+
for (var t = void 0, i = e.length - 1, l; i >= 0; i--)
|
|
9
|
+
(l = e[i]) && (t = l(o, s, t) || t);
|
|
10
|
+
return t && m(o, s, t), t;
|
|
11
|
+
}, f = /* @__PURE__ */ ((e) => (e[e.error = 0] = "error", e[e.warning = 1] = "warning", e[e.success = 2] = "success", e[e.info = 3] = "info", e[e.attention = 4] = "attention", e[e.undefined = 5] = "undefined", e))(f || {}), u = /* @__PURE__ */ ((e) => (e[e.light = 0] = "light", e[e.white = 1] = "white", e[e.undefined = 2] = "undefined", e))(u || {});
|
|
12
|
+
const n = class n extends p {
|
|
144
13
|
constructor() {
|
|
145
14
|
super(...arguments), this.text = void 0;
|
|
146
15
|
}
|
|
147
16
|
render() {
|
|
148
|
-
const o =
|
|
17
|
+
const o = g("cre8-c-badge", {
|
|
149
18
|
"cre8-c-badge--success": this.status === "success",
|
|
150
19
|
"cre8-c-badge--warning": this.status === "warning",
|
|
151
20
|
"cre8-c-badge--error": this.status === "error",
|
|
@@ -154,31 +23,31 @@ const g = class g extends u {
|
|
|
154
23
|
"cre8-c-badge--light": this.variant === "light",
|
|
155
24
|
"cre8-c-badge--white": this.variant === "white"
|
|
156
25
|
});
|
|
157
|
-
return
|
|
158
|
-
${this.svg ?
|
|
26
|
+
return d`<div class="${o}">
|
|
27
|
+
${this.svg ? d` <cre8-icon
|
|
159
28
|
svg='${this.svg}' aria-hidden='true'></cre8-icon>
|
|
160
29
|
</cre8-icon>` : ""}
|
|
161
30
|
${this.text}
|
|
162
31
|
</div> `;
|
|
163
32
|
}
|
|
164
33
|
};
|
|
165
|
-
|
|
166
|
-
let
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
],
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
],
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
],
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
],
|
|
179
|
-
customElements.get("cre8-badge") === void 0 && customElements.define("cre8-badge",
|
|
34
|
+
n.styles = [b];
|
|
35
|
+
let r = n;
|
|
36
|
+
a([
|
|
37
|
+
c({ type: String })
|
|
38
|
+
], r.prototype, "text");
|
|
39
|
+
a([
|
|
40
|
+
c({ type: String })
|
|
41
|
+
], r.prototype, "status");
|
|
42
|
+
a([
|
|
43
|
+
c({ type: String })
|
|
44
|
+
], r.prototype, "variant");
|
|
45
|
+
a([
|
|
46
|
+
c({ type: String })
|
|
47
|
+
], r.prototype, "svg");
|
|
48
|
+
customElements.get("cre8-badge") === void 0 && customElements.define("cre8-badge", r);
|
|
180
49
|
export {
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
50
|
+
r as Cre8Badge,
|
|
51
|
+
f as status,
|
|
52
|
+
u as variant
|
|
184
53
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"badge.styles.d.ts","sourceRoot":"","sources":["../../../components/badge/badge.styles.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"badge.styles.d.ts","sourceRoot":"","sources":["../../../components/badge/badge.styles.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,MAAM,yBAAmxH,CAAC;AAChyH,eAAe,MAAM,CAAC"}
|