@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,193 +1,28 @@
|
|
|
1
|
-
import { css as h, html as
|
|
2
|
-
import { query as m, property as
|
|
3
|
-
import { d as p, e as u, f, b as v, g
|
|
4
|
-
import { Cre8Element as
|
|
1
|
+
import { css as h, html as i } from "lit";
|
|
2
|
+
import { query as m, property as a } from "lit/decorators.js";
|
|
3
|
+
import { d as p, e as u, f, b as v, g } from "../../icon-D22g8aWB.js";
|
|
4
|
+
import { Cre8Element as y } from "../cre8-element.js";
|
|
5
5
|
import "@a11y/focus-trap";
|
|
6
|
-
const w = h
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
:host {
|
|
13
|
-
display: block;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* 1) Modal Composable Component
|
|
18
|
-
*/
|
|
19
|
-
.cre8-c-modal {
|
|
20
|
-
position: fixed;
|
|
21
|
-
height: 100vh;
|
|
22
|
-
width: 100vw;
|
|
23
|
-
top: 0;
|
|
24
|
-
left: 0;
|
|
25
|
-
|
|
26
|
-
display: none;
|
|
27
|
-
justify-content: center;
|
|
28
|
-
align-items: center;
|
|
29
|
-
background: rgba(0, 0, 0, 0.25);
|
|
30
|
-
|
|
31
|
-
z-index: 1000;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.cre8-c-modal.cre8-is-active {
|
|
35
|
-
display: flex;
|
|
36
|
-
visibility: visible;
|
|
37
|
-
opacity: 1;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* Modal Focus Trap for Window (keeps focus in modal until closed)
|
|
42
|
-
*/
|
|
43
|
-
.cre8-c-modal__focus-trap {
|
|
44
|
-
display: contents;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* Modal Window
|
|
49
|
-
*/
|
|
50
|
-
.cre8-c-modal__window {
|
|
51
|
-
display: flex;
|
|
52
|
-
flex-direction: column;
|
|
53
|
-
flex-shrink: 0;
|
|
54
|
-
position: fixed;
|
|
55
|
-
background: var(--cre8-color-bg-default);
|
|
56
|
-
width: calc(8px * 68);
|
|
57
|
-
max-width: 100%;
|
|
58
|
-
border-radius: var(--cre8-border-radius-container);
|
|
59
|
-
overflow: hidden;
|
|
60
|
-
overflow-y: auto;
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* Modal Window for mobile user screen widths
|
|
64
|
-
*/
|
|
65
|
-
@media all and (max-width:$cre8-breakpoint-md) {
|
|
66
|
-
position: inherit;
|
|
67
|
-
height: 100%;
|
|
68
|
-
width: 100%;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
&:focus-visible {
|
|
72
|
-
@includefocus();
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
* Modal Window Header
|
|
78
|
-
*/
|
|
79
|
-
.cre8-c-modal__header {
|
|
80
|
-
display: flex;
|
|
81
|
-
padding: calc(8px * 4) calc(8px * 6) calc(8px * 2);
|
|
82
|
-
align-items: center;
|
|
83
|
-
/**
|
|
84
|
-
* Modal Header with Error state
|
|
85
|
-
* 1) Icon fill prop is a custom property of cre8-icon-legacy that apply the color as a fill to the whole icon
|
|
86
|
-
*/
|
|
87
|
-
.cre8-c-modal--error & {
|
|
88
|
-
.cre8-modal-icon {
|
|
89
|
-
fill: var(--cre8-color-content-error-icon); /* 1 */
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* Modal Header with Warning state
|
|
95
|
-
* 1) Icon fill prop is a custom property of cre8-icon-legacy that apply the color as a fill to the whole icon
|
|
96
|
-
*/
|
|
97
|
-
.cre8-c-modal--warning & {
|
|
98
|
-
.cre8-modal-icon {
|
|
99
|
-
fill: var(--cre8-color-content-warning-icon); /* 1 */
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* Modal Header with Success state
|
|
105
|
-
* 1) Icon fill prop is a custom property of cre8-icon-legacy that apply the color as a fill to the whole icon
|
|
106
|
-
*/
|
|
107
|
-
.cre8-c-modal--success & {
|
|
108
|
-
.cre8-modal-icon {
|
|
109
|
-
fill: var(--cre8-color-content-success-icon); /* 1 */
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
/**
|
|
114
|
-
* Modal Header with Info or Help State
|
|
115
|
-
* 1) Icon fill prop is a custom property of cre8-icon-legacy that apply the color as a fill to the whole icon
|
|
116
|
-
*/
|
|
117
|
-
.cre8-c-modal--info &,
|
|
118
|
-
.cre8-c-modal--help & {
|
|
119
|
-
.cre8-modal-icon {
|
|
120
|
-
fill: var(--cre8-color-content-info-icon); /* 1 */
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
/**
|
|
126
|
-
* Modal Heading
|
|
127
|
-
*/
|
|
128
|
-
.cre8-c-modal__header-inner {
|
|
129
|
-
display: flex;
|
|
130
|
-
align-items: center;
|
|
131
|
-
gap: calc(8px * 2);
|
|
132
|
-
|
|
133
|
-
cre8-icon {
|
|
134
|
-
.cre8-modal-icon {
|
|
135
|
-
height: calc(8px * 4);
|
|
136
|
-
width: calc(8px * 4);
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
/**
|
|
142
|
-
* Modal Window Body
|
|
143
|
-
*/
|
|
144
|
-
.cre8-c-modal__body {
|
|
145
|
-
max-height: 240px; // Prevent modal from getting too big based on content
|
|
146
|
-
overflow: auto; // Force scrolling based on long amounts of content
|
|
147
|
-
padding: 0 calc(8px * 6);
|
|
148
|
-
|
|
149
|
-
/**
|
|
150
|
-
* Modal Window Body for mobile user screen widths
|
|
151
|
-
*/
|
|
152
|
-
@media all and (max-width:$cre8-breakpoint-md) {
|
|
153
|
-
height: 100%;
|
|
154
|
-
max-height: max-content;
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
/**
|
|
159
|
-
* Modal Window Footer
|
|
160
|
-
*/
|
|
161
|
-
.cre8-c-modal__footer {
|
|
162
|
-
padding: calc(8px * 3) calc(8px * 6) calc(100vh - 95dvh); // Ensure footer slot isn't cut off on certain devices
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
/**
|
|
166
|
-
* Modal Window Close button
|
|
167
|
-
*/
|
|
168
|
-
.cre8-c-modal__close-button {
|
|
169
|
-
margin-left: auto;
|
|
170
|
-
}
|
|
171
|
-
`;
|
|
172
|
-
var b = Object.defineProperty, i = (n, e, c, _) => {
|
|
173
|
-
for (var a = void 0, r = n.length - 1, d; r >= 0; r--)
|
|
174
|
-
(d = n[r]) && (a = d(e, c, a) || a);
|
|
175
|
-
return a && b(e, c, a), a;
|
|
6
|
+
const w = 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:block}.cre8-c-modal{position:fixed;height:100vh;width:100vw;top:0;left:0;display:none;justify-content:center;align-items:center;background:rgba(0,0,0,.25);z-index:1000}.cre8-c-modal.cre8-is-active{display:flex;visibility:visible;opacity:1}.cre8-c-modal__focus-trap{display:contents}.cre8-c-modal__window{display:flex;flex-direction:column;flex-shrink:0;position:fixed;background:var(--cre8-color-bg-default);width:34rem;max-width:100%;border-radius:var(--cre8-border-radius-container);overflow:hidden;overflow-y:auto}@media all and (max-width: 768px){.cre8-c-modal__window{position:inherit;height:100%;width:100%}}.cre8-c-modal__window:focus-visible{outline:var(--cre8-border-width-focus) solid var(--cre8-color-border-active-outline);outline-offset:0.125rem}.cre8-c-modal__header{display:flex;padding:2rem 3rem 1rem;align-items:center}.cre8-c-modal--error .cre8-c-modal__header .cre8-modal-icon{color:var(--cre8-color-content-error-icon)}.cre8-c-modal--warning .cre8-c-modal__header .cre8-modal-icon{color:var(--cre8-color-content-warning-icon)}.cre8-c-modal--success .cre8-c-modal__header .cre8-modal-icon{color:var(--cre8-color-content-success-icon)}.cre8-c-modal--info .cre8-c-modal__header .cre8-modal-icon,.cre8-c-modal--help .cre8-c-modal__header .cre8-modal-icon{color:var(--cre8-color-content-info-icon)}.cre8-c-modal__header-inner{display:flex;align-items:center;gap:1rem}.cre8-c-modal__header-inner cre8-icon .cre8-modal-icon{height:2rem;width:2rem}.cre8-c-modal__body{max-height:240px;overflow:auto;padding:0 3rem}@media all and (max-width: 768px){.cre8-c-modal__body{height:100%;max-height:max-content}}.cre8-c-modal__footer{padding:1.5rem 3rem calc(100vh - 95dvh)}.cre8-c-modal__close-button{margin-left:auto}`;
|
|
7
|
+
var x = Object.defineProperty, r = (d, e, o, _) => {
|
|
8
|
+
for (var s = void 0, c = d.length - 1, n; c >= 0; c--)
|
|
9
|
+
(n = d[c]) && (s = n(e, o, s) || s);
|
|
10
|
+
return s && x(e, o, s), s;
|
|
176
11
|
};
|
|
177
|
-
const l = class l extends
|
|
12
|
+
const l = class l extends y {
|
|
178
13
|
constructor() {
|
|
179
14
|
super(...arguments), this.closeButtonText = "close", this.closeButtonIcon = "close", this.mapStatusToIconModal = (e) => {
|
|
180
15
|
switch (e) {
|
|
181
16
|
case "error":
|
|
182
|
-
return
|
|
17
|
+
return i`<cre8-icon class="cre8-modal-icon" svg=${g} aria-hidden='true'></cre8-icon>`;
|
|
183
18
|
case "success":
|
|
184
|
-
return
|
|
19
|
+
return i`<cre8-icon class="cre8-modal-icon" svg=${v} aria-hidden='true'></cre8-icon>`;
|
|
185
20
|
case "warning":
|
|
186
|
-
return
|
|
21
|
+
return i`<cre8-icon class="cre8-modal-icon" svg=${f} aria-hidden='true'></cre8-icon>`;
|
|
187
22
|
case "help":
|
|
188
|
-
return
|
|
23
|
+
return i`<cre8-icon class="cre8-modal-icon" svg=${u} aria-hidden='true'></cre8-icon>`;
|
|
189
24
|
case "info":
|
|
190
|
-
return
|
|
25
|
+
return i`<cre8-icon class="cre8-modal-icon" svg=${p} aria-hidden='true'></cre8-icon>`;
|
|
191
26
|
default:
|
|
192
27
|
return null;
|
|
193
28
|
}
|
|
@@ -217,8 +52,8 @@ const l = class l extends g {
|
|
|
217
52
|
* 1) onClick of the area around the modal window, close the modal.
|
|
218
53
|
*/
|
|
219
54
|
handleOnClickOutside(e) {
|
|
220
|
-
const
|
|
221
|
-
this.isActive && this._modalWindow &&
|
|
55
|
+
const o = e.target;
|
|
56
|
+
this.isActive && this._modalWindow && o.classList.contains("cre8-c-modal") && !this.notDismissible && this.handleCloseModal();
|
|
222
57
|
}
|
|
223
58
|
/**
|
|
224
59
|
* Lifecycle method to focus on modal
|
|
@@ -229,8 +64,8 @@ const l = class l extends g {
|
|
|
229
64
|
if (this.isActive === !0 && setTimeout(() => {
|
|
230
65
|
this._modalWindow.focus();
|
|
231
66
|
}, 200), e.has("isActive")) {
|
|
232
|
-
const
|
|
233
|
-
this.isActive ?
|
|
67
|
+
const o = document.querySelector("body");
|
|
68
|
+
this.isActive ? o.style.overflow = "hidden" : o.style.removeProperty("overflow");
|
|
234
69
|
}
|
|
235
70
|
}
|
|
236
71
|
/**
|
|
@@ -249,16 +84,16 @@ const l = class l extends g {
|
|
|
249
84
|
"cre8-c-modal--info": this.status === "info",
|
|
250
85
|
"cre8-c-modal--help": this.status === "help"
|
|
251
86
|
});
|
|
252
|
-
return
|
|
87
|
+
return i`
|
|
253
88
|
<div class="${e}" @click="${this.handleOnClickOutside}" @keydown=${this.handleKeydown}>
|
|
254
89
|
<focus-trap class="cre8-c-modal__focus-trap" ?inactive=${!this.isActive}>
|
|
255
90
|
<div class="cre8-c-modal__window" role="dialog" aria-label=${this.ariaLabel} tabindex=${this.isActive ? 0 : -1}>
|
|
256
91
|
<div class="cre8-c-modal__header">
|
|
257
|
-
${this.status ?
|
|
92
|
+
${this.status ? i`<div class="cre8-c-modal__header-inner">
|
|
258
93
|
${this.mapStatusToIconModal(this.status)}
|
|
259
94
|
<cre8-heading type="title-large" ?brandColor=${!0}>${this.utilityModalTitle}</cre8-heading>
|
|
260
|
-
</div>` :
|
|
261
|
-
${this.notDismissible ? "" :
|
|
95
|
+
</div>` : i`<slot name="header"></slot>`}
|
|
96
|
+
${this.notDismissible ? "" : i`<cre8-button
|
|
262
97
|
class="cre8-c-modal__close-button"
|
|
263
98
|
variant="tertiary"
|
|
264
99
|
text="${this.closeButtonText}"
|
|
@@ -272,7 +107,7 @@ const l = class l extends g {
|
|
|
272
107
|
<div class="cre8-c-modal__body">
|
|
273
108
|
<slot></slot>
|
|
274
109
|
</div>
|
|
275
|
-
${this.slotNotEmpty("footer") &&
|
|
110
|
+
${this.slotNotEmpty("footer") && i`<div class="cre8-c-modal__footer"><slot name="footer"></slot></div>`}
|
|
276
111
|
</div>
|
|
277
112
|
</focus-trap>
|
|
278
113
|
</div>
|
|
@@ -280,32 +115,32 @@ const l = class l extends g {
|
|
|
280
115
|
}
|
|
281
116
|
};
|
|
282
117
|
l.styles = [w];
|
|
283
|
-
let
|
|
284
|
-
|
|
118
|
+
let t = l;
|
|
119
|
+
r([
|
|
285
120
|
m(".cre8-c-modal__window")
|
|
286
|
-
],
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
],
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
],
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
],
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
],
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
],
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
],
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
],
|
|
308
|
-
customElements.get("cre8-modal") === void 0 && customElements.define("cre8-modal",
|
|
121
|
+
], t.prototype, "_modalWindow");
|
|
122
|
+
r([
|
|
123
|
+
a({ type: Boolean, reflect: !0 })
|
|
124
|
+
], t.prototype, "isActive");
|
|
125
|
+
r([
|
|
126
|
+
a()
|
|
127
|
+
], t.prototype, "status");
|
|
128
|
+
r([
|
|
129
|
+
a()
|
|
130
|
+
], t.prototype, "utilityModalTitle");
|
|
131
|
+
r([
|
|
132
|
+
a({ type: Boolean, reflect: !0 })
|
|
133
|
+
], t.prototype, "notDismissible");
|
|
134
|
+
r([
|
|
135
|
+
a()
|
|
136
|
+
], t.prototype, "closeButtonText");
|
|
137
|
+
r([
|
|
138
|
+
a()
|
|
139
|
+
], t.prototype, "closeButtonIcon");
|
|
140
|
+
r([
|
|
141
|
+
a()
|
|
142
|
+
], t.prototype, "ariaLabel");
|
|
143
|
+
customElements.get("cre8-modal") === void 0 && customElements.define("cre8-modal", t);
|
|
309
144
|
export {
|
|
310
|
-
|
|
145
|
+
t as Cre8Modal
|
|
311
146
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modal.styles.d.ts","sourceRoot":"","sources":["../../../components/modal/modal.styles.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"modal.styles.d.ts","sourceRoot":"","sources":["../../../components/modal/modal.styles.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,MAAM,yBAAy9G,CAAC;AACt+G,eAAe,MAAM,CAAC"}
|