@tmorrow/cre8-wc 1.0.26 → 1.1.2

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.
Files changed (202) hide show
  1. package/cdn/cre8-wc.esm.js +9082 -15604
  2. package/cdn/cre8-wc.esm.js.map +1 -1
  3. package/cdn/cre8-wc.min.js +1231 -8308
  4. package/cdn/cre8-wc.min.js.map +1 -1
  5. package/lib/cdn-entry.d.ts +20 -2
  6. package/lib/cdn-entry.d.ts.map +1 -1
  7. package/lib/components/accordion/accordion.js +18 -64
  8. package/lib/components/accordion/accordion.styles.d.ts.map +1 -1
  9. package/lib/components/accordion-item/accordion-item.js +35 -238
  10. package/lib/components/accordion-item/accordion-item.styles.d.ts.map +1 -1
  11. package/lib/components/alert/alert.js +56 -221
  12. package/lib/components/alert/alert.styles.d.ts.map +1 -1
  13. package/lib/components/badge/badge.js +33 -164
  14. package/lib/components/badge/badge.styles.d.ts.map +1 -1
  15. package/lib/components/band/band.js +11 -261
  16. package/lib/components/band/band.styles.d.ts.map +1 -1
  17. package/lib/components/breadcrumbs/breadcrumbs.js +14 -33
  18. package/lib/components/breadcrumbs/breadcrumbs.styles.d.ts.map +1 -1
  19. package/lib/components/breadcrumbs-item/breadcrumbs-item.js +10 -45
  20. package/lib/components/breadcrumbs-item/breadcrumbs-item.styles.d.ts.map +1 -1
  21. package/lib/components/button/button.js +14 -14
  22. package/lib/components/button-group/button-group.js +10 -261
  23. package/lib/components/button-group/button-group.styles.d.ts.map +1 -1
  24. package/lib/components/card/card.js +17 -130
  25. package/lib/components/card/card.styles.d.ts.map +1 -1
  26. package/lib/components/chart/chart.js +137 -223
  27. package/lib/components/chart/chart.styles.d.ts.map +1 -1
  28. package/lib/components/checkbox-field/checkbox-field.js +26 -59
  29. package/lib/components/checkbox-field/checkbox-field.styles.d.ts.map +1 -1
  30. package/lib/components/checkbox-field-item/checkbox-field-item.js +38 -205
  31. package/lib/components/checkbox-field-item/checkbox-field-item.styles.d.ts.map +1 -1
  32. package/lib/components/danger-button/danger-button.js +53 -582
  33. package/lib/components/danger-button/danger-button.styles.d.ts.map +1 -1
  34. package/lib/components/date-picker/calendar/calendar.styles.d.ts.map +1 -1
  35. package/lib/components/date-picker/calendar-month-modal/calendar-month-modal.styles.d.ts.map +1 -1
  36. package/lib/components/date-picker/calendar-navigation/calendar-navigation.styles.d.ts.map +1 -1
  37. package/lib/components/date-picker/calendar-year-modal/calendar-year-modal.styles.d.ts.map +1 -1
  38. package/lib/components/date-picker/date-picker.js +262 -499
  39. package/lib/components/date-picker/date-picker.styles.d.ts.map +1 -1
  40. package/lib/components/divider/divider.js +20 -61
  41. package/lib/components/divider/divider.styles.d.ts.map +1 -1
  42. package/lib/components/dropdown/dropdown.js +34 -107
  43. package/lib/components/dropdown/dropdown.styles.d.ts.map +1 -1
  44. package/lib/components/dropdown-item/dropdown-item.js +18 -49
  45. package/lib/components/dropdown-item/dropdown-item.styles.d.ts.map +1 -1
  46. package/lib/components/feature/feature.js +19 -81
  47. package/lib/components/feature/feature.styles.d.ts.map +1 -1
  48. package/lib/components/field/field.js +12 -146
  49. package/lib/components/field/field.styles.d.ts.map +1 -1
  50. package/lib/components/field-note/field-note.js +22 -66
  51. package/lib/components/field-note/field-note.styles.d.ts.map +1 -1
  52. package/lib/components/footer/footer.js +10 -29
  53. package/lib/components/footer/footer.styles.d.ts.map +1 -1
  54. package/lib/components/global-nav/global-nav.js +20 -43
  55. package/lib/components/global-nav/global-nav.styles.d.ts.map +1 -1
  56. package/lib/components/global-nav-item/global-nav-item.js +26 -105
  57. package/lib/components/global-nav-item/global-nav-item.styles.d.ts.map +1 -1
  58. package/lib/components/grid/grid.js +15 -337
  59. package/lib/components/grid/grid.styles.d.ts.map +1 -1
  60. package/lib/components/grid-item/grid-item.js +7 -15
  61. package/lib/components/grid-item/grid-item.styles.d.ts.map +1 -1
  62. package/lib/components/header/header.js +17 -80
  63. package/lib/components/header/header.styles.d.ts.map +1 -1
  64. package/lib/components/heading/heading.js +16 -153
  65. package/lib/components/heading/heading.styles.d.ts.map +1 -1
  66. package/lib/components/hero/hero.js +17 -149
  67. package/lib/components/hero/hero.styles.d.ts.map +1 -1
  68. package/lib/components/icon/icon.js +1 -1
  69. package/lib/components/icon/icon.styles.d.ts.map +1 -1
  70. package/lib/components/inline-alert/inline-alert.js +53 -214
  71. package/lib/components/inline-alert/inline-alert.styles.d.ts.map +1 -1
  72. package/lib/components/layout/layout.js +20 -53
  73. package/lib/components/layout/layout.styles.d.ts.map +1 -1
  74. package/lib/components/layout-container/layout-container.js +20 -43
  75. package/lib/components/layout-container/layout-container.styles.d.ts.map +1 -1
  76. package/lib/components/layout-section/layout-section.js +20 -29
  77. package/lib/components/layout-section/layout-section.styles.d.ts.map +1 -1
  78. package/lib/components/linelength-container/linelength-container.js +7 -15
  79. package/lib/components/linelength-container/linelength-container.styles.d.ts.map +1 -1
  80. package/lib/components/link/link.js +33 -228
  81. package/lib/components/link/link.styles.d.ts.map +1 -1
  82. package/lib/components/link-list/link-list.js +23 -129
  83. package/lib/components/link-list/link-list.styles.d.ts.map +1 -1
  84. package/lib/components/link-list-item/link-list-item.js +19 -80
  85. package/lib/components/link-list-item/link-list-item.styles.d.ts.map +1 -1
  86. package/lib/components/list/list.js +17 -67
  87. package/lib/components/list/list.styles.d.ts.map +1 -1
  88. package/lib/components/list-item/list-item.js +11 -16
  89. package/lib/components/list-item/list-item.styles.d.ts.map +1 -1
  90. package/lib/components/loading-spinner/loading-spinner.js +13 -157
  91. package/lib/components/loading-spinner/loading-spinner.styles.d.ts.map +1 -1
  92. package/lib/components/logo/logo.js +20 -30
  93. package/lib/components/logo/logo.styles.d.ts.map +1 -1
  94. package/lib/components/main/main.js +18 -42
  95. package/lib/components/main/main.styles.d.ts.map +1 -1
  96. package/lib/components/modal/modal.d.ts +1 -0
  97. package/lib/components/modal/modal.d.ts.map +1 -1
  98. package/lib/components/modal/modal.js +52 -217
  99. package/lib/components/modal/modal.styles.d.ts.map +1 -1
  100. package/lib/components/multi-select/multi-select.js +71 -532
  101. package/lib/components/multi-select/multi-select.styles.d.ts.map +1 -1
  102. package/lib/components/nav-container/nav-container.js +5 -40
  103. package/lib/components/nav-container/nav-container.styles.d.ts.map +1 -1
  104. package/lib/components/page-header/page-header.js +19 -54
  105. package/lib/components/page-header/page-header.styles.d.ts.map +1 -1
  106. package/lib/components/pagination/page-counter/page-counter.styles.d.ts.map +1 -1
  107. package/lib/components/pagination/pagination.js +102 -183
  108. package/lib/components/pagination/pagination.styles.d.ts.map +1 -1
  109. package/lib/components/percent-bar/percent-bar.js +22 -50
  110. package/lib/components/percent-bar/percent-bar.styles.d.ts.map +1 -1
  111. package/lib/components/popover/popover.js +51 -220
  112. package/lib/components/popover/popover.styles.d.ts.map +1 -1
  113. package/lib/components/primary-nav/primary-nav.js +17 -51
  114. package/lib/components/primary-nav/primary-nav.styles.d.ts.map +1 -1
  115. package/lib/components/primary-nav-item/primary-nav-item.js +24 -191
  116. package/lib/components/primary-nav-item/primary-nav-item.styles.d.ts.map +1 -1
  117. package/lib/components/progress-meter/progress-meter.js +23 -127
  118. package/lib/components/progress-meter/progress-meter.styles.d.ts.map +1 -1
  119. package/lib/components/progress-steps/progress-steps.styles.d.ts.map +1 -1
  120. package/lib/components/progress-steps-item/progress-steps-item.js +27 -118
  121. package/lib/components/progress-steps-item/progress-steps-item.styles.d.ts.map +1 -1
  122. package/lib/components/radio-field/radio-field.js +28 -64
  123. package/lib/components/radio-field/radio-field.styles.d.ts.map +1 -1
  124. package/lib/components/radio-field-item/radio-field-item.js +54 -189
  125. package/lib/components/radio-field-item/radio-field-item.styles.d.ts.map +1 -1
  126. package/lib/components/remove-tag/remove-tag.js +36 -129
  127. package/lib/components/remove-tag/remove-tag.styles.d.ts.map +1 -1
  128. package/lib/components/section/section.js +19 -50
  129. package/lib/components/section/section.styles.d.ts.map +1 -1
  130. package/lib/components/select/select.js +43 -416
  131. package/lib/components/select/select.styles.d.ts.map +1 -1
  132. package/lib/components/select-tile/select-tile.js +18 -442
  133. package/lib/components/select-tile/select-tile.styles.d.ts.map +1 -1
  134. package/lib/components/select-tile-list/select-tile-list.js +24 -62
  135. package/lib/components/select-tile-list/select-tile-list.styles.d.ts.map +1 -1
  136. package/lib/components/skeleton-loader/skeleton-loader.js +19 -73
  137. package/lib/components/skeleton-loader/skeleton-loader.styles.d.ts.map +1 -1
  138. package/lib/components/split-button/split-button.js +21 -37
  139. package/lib/components/split-button/split-button.styles.d.ts.map +1 -1
  140. package/lib/components/submenu/submenu.js +8 -18
  141. package/lib/components/submenu/submenu.styles.d.ts.map +1 -1
  142. package/lib/components/submenu-item/submenu-item.js +21 -42
  143. package/lib/components/submenu-item/submenu-item.styles.d.ts.map +1 -1
  144. package/lib/components/tab/tab.js +17 -100
  145. package/lib/components/tab/tab.styles.d.ts.map +1 -1
  146. package/lib/components/tab-panel/tab-panel.js +18 -52
  147. package/lib/components/tab-panel/tab-panel.styles.d.ts.map +1 -1
  148. package/lib/components/table/table.js +21 -73
  149. package/lib/components/table/table.styles.d.ts.map +1 -1
  150. package/lib/components/table-body/table-body.js +12 -24
  151. package/lib/components/table-body/table-body.styles.d.ts.map +1 -1
  152. package/lib/components/table-cell/table-cell.js +29 -69
  153. package/lib/components/table-cell/table-cell.styles.d.ts.map +1 -1
  154. package/lib/components/table-header/table-header.js +8 -39
  155. package/lib/components/table-header/table-header.styles.d.ts.map +1 -1
  156. package/lib/components/table-header-cell/table-header-cell.js +18 -37
  157. package/lib/components/table-header-cell/table-header-cell.styles.d.ts.map +1 -1
  158. package/lib/components/table-object/table-object.js +13 -32
  159. package/lib/components/table-object/table-object.styles.d.ts.map +1 -1
  160. package/lib/components/table-row/table-row.js +33 -139
  161. package/lib/components/table-row/table-row.styles.d.ts.map +1 -1
  162. package/lib/components/tabs/tabs.js +24 -339
  163. package/lib/components/tabs/tabs.styles.d.ts.map +1 -1
  164. package/lib/components/tag/tag.js +44 -159
  165. package/lib/components/tag/tag.styles.d.ts.map +1 -1
  166. package/lib/components/tag-list/tag-list.js +20 -51
  167. package/lib/components/tag-list/tag-list.styles.d.ts.map +1 -1
  168. package/lib/components/tertiary-nav/tertiary-nav.js +21 -54
  169. package/lib/components/tertiary-nav/tertiary-nav.styles.d.ts.map +1 -1
  170. package/lib/components/tertiary-nav-item/tertiary-nav-item.js +18 -68
  171. package/lib/components/tertiary-nav-item/tertiary-nav-item.styles.d.ts.map +1 -1
  172. package/lib/components/text-link/text-link.js +20 -85
  173. package/lib/components/text-link/text-link.styles.d.ts.map +1 -1
  174. package/lib/components/text-passage/text-passage-light-dom.styles.d.ts.map +1 -1
  175. package/lib/components/text-passage/text-passage.js +17 -189
  176. package/lib/components/text-passage/text-passage.styles.d.ts.map +1 -1
  177. package/lib/components/tooltip/tooltip.js +57 -248
  178. package/lib/components/tooltip/tooltip.styles.d.ts.map +1 -1
  179. package/lib/components/utility-nav/utility-nav.js +23 -56
  180. package/lib/components/utility-nav/utility-nav.styles.d.ts.map +1 -1
  181. package/lib/components/utility-nav-item/utility-nav-item.js +28 -83
  182. package/lib/components/utility-nav-item/utility-nav-item.styles.d.ts.map +1 -1
  183. package/lib/design-tokens/brands/blue/css/tokens_blue.module.d.ts.map +1 -1
  184. package/lib/design-tokens/brands/bolt/tokens_bolt.theme.d.ts.map +1 -1
  185. package/lib/design-tokens/brands/cre8-a2ui/css/tokens_cre8-a2ui.module.d.ts +3 -0
  186. package/lib/design-tokens/brands/cre8-a2ui/css/tokens_cre8-a2ui.module.d.ts.map +1 -0
  187. package/lib/design-tokens/brands/cre8-legacy/css/tokens_cre8-legacy.module.d.ts.map +1 -1
  188. package/lib/design-tokens/brands/femmecubator/css/tokens_femmecubator2.module.d.ts.map +1 -1
  189. package/lib/design-tokens/brands/legacy/css/tokens_legacy.module.d.ts.map +1 -1
  190. package/lib/design-tokens/brands/marketing/css/tokens_marketing.module.d.ts.map +1 -1
  191. package/lib/design-tokens/brands/minimalist/css/tokens_minimalist.module.d.ts +2 -2
  192. package/lib/design-tokens/brands/minimalist/css/tokens_minimalist.module.d.ts.map +1 -1
  193. package/lib/design-tokens/brands/starbucks/tokens_starbucks.module.d.ts.map +1 -1
  194. package/lib/design-tokens/core/scss/theming/component.scss +5 -5
  195. package/lib/design-tokens/core/scss/theming/functions.scss +4 -0
  196. package/lib/design-tokens/core/scss/theming/spacing.scss +60 -60
  197. package/lib/design-tokens/core/scss/theming/variables.scss +11 -11
  198. package/lib/design-tokens/mixins/typography-usage.scss +277 -277
  199. package/lib/design-tokens/tokens_netflix.theme.d.ts.map +1 -1
  200. package/lib/{icon-DImqxDiW.js → icon-D22g8aWB.js} +35 -138
  201. package/lib/index.js +1 -1
  202. package/package.json +14 -8
@@ -1,390 +1,17 @@
1
- import { a as f } from "../../icon-DImqxDiW.js";
2
- import { css as b, html as o, nothing as m } from "lit";
3
- import { ifDefined as h } from "lit-html/directives/if-defined.js";
1
+ import { a as f } from "../../icon-D22g8aWB.js";
2
+ import { css as m, html as o, nothing as b } from "lit";
3
+ import { ifDefined as u } from "lit-html/directives/if-defined.js";
4
4
  import { property as i, queryAll as y } from "lit/decorators.js";
5
- import { nanoid as n } from "nanoid";
5
+ import { nanoid as d } from "nanoid";
6
6
  import "../field-note/field-note.js";
7
7
  import { Cre8FormElement as v } from "../cre8-form-element.js";
8
- const g = b`
9
- /**
10
- * Border-Box http:/paulirish.com/2012/box-sizing-border-box-ftw/
11
- */
12
- *,
13
- ::slotted(*),
14
- *:before,
15
- *:after {
16
- box-sizing: border-box;
17
- }
18
-
19
- :root {
20
- --size-base-unit: 0.5rem;
21
- }
22
-
23
- /**
24
- * RTL support for values logical properties can't automatically adjust for
25
- * 1) Percentage based horizontal translate values need to be flipped
26
- * 2) Background gradients using "to-right" or "to-left" need to be switched to using deg values.
27
- * 3) Inverse items that have 45degs
28
- */
29
- [dir=rtl] {
30
- --rtlTranslateX: 50%;
31
- /* 1 */
32
- --rtlGradientToRight: 270deg;
33
- /* 2 */
34
- --rtlRotate45Inverse: -45deg;
35
- /* 3 */
36
- }
37
-
38
- /**
39
- * Visible focus outline for elements on a light background
40
- */
41
- /**
42
- * Visible focus outline for elements with an error status
43
- */
44
- /**
45
- * Visible focus outline for elements on a dark background
46
- */
47
- /**
48
- * Focus state for themes that need a dashed outline for focus
49
- * state
50
- **/
51
- /**
52
- * Invisible focus outline for elements that need a more visible
53
- * focus state for high-contrast mode
54
- */
55
- /**
56
- * Visually hidden from display
57
- */
58
- /*
59
- =======
60
- Animations
61
- =======
62
- */
63
- :host {
64
- --cre8-z-index-1: 1;
65
- --cre8-z-index-50: 50;
66
- --cre8-z-index-100: 100;
67
- --cre8-z-index-200: 200;
68
- --cre8-z-index-1030: 1030;
69
- --cre8-anim-fade-quick: 0.35s;
70
- --cre8-anim-ease: ease;
71
- }
72
-
73
- @keyframes fadeIn {
74
- 100% {
75
- opacity: 1;
76
- }
77
- }
78
- @keyframes slideIn {
79
- 100% {
80
- transform: translateX(0);
81
- }
82
- }
83
- @keyframes slideInFwd {
84
- 100% {
85
- width: 272px;
86
- height: 272px;
87
- }
88
- }
89
- @keyframes slideOutRight {
90
- 100% {
91
- width: 272px;
92
- height: 272px;
93
- }
94
- }
95
- @keyframes slideUp {
96
- 100% {
97
- transform: translateY(0);
98
- }
99
- }
100
- @media (width >= 481px) {
101
- @keyframes slideInFwd {
102
- 100% {
103
- width: 417px;
104
- height: 417px;
105
- }
106
- }
107
- @keyframes slideOutRight {
108
- 100% {
109
- width: 417px;
110
- height: 417px;
111
- }
112
- }
113
- }
114
- @media (width >= 48rem) {
115
- @keyframes slideInFwd {
116
- 100% {
117
- width: 330px;
118
- height: 330px;
119
- }
120
- }
121
- @keyframes slideOutRight {
122
- 100% {
123
- width: 330px;
124
- height: 330px;
125
- transform: translateX(calc(100vw - 45px));
126
- }
127
- }
128
- }
129
- @media (width >= 60rem) {
130
- @keyframes slideInFwd {
131
- 100% {
132
- width: 460px;
133
- height: 460px;
134
- }
135
- }
136
- @keyframes slideOutRight {
137
- 100% {
138
- width: 460px;
139
- height: 460px;
140
- transform: translateX(calc(100vw - 45px));
141
- }
142
- }
143
- }
144
- @media (width >= 75rem) {
145
- @keyframes slideInFwd {
146
- 100% {
147
- width: 592px;
148
- height: 591px;
149
- }
150
- }
151
- @keyframes slideOutRight {
152
- 100% {
153
- width: 592px;
154
- height: 591px;
155
- transform: translateX(calc(100vw - 45px));
156
- }
157
- }
158
- }
159
- @media (width >= 87.5rem) {
160
- @keyframes slideOutRight {
161
- 100% {
162
- width: 592px;
163
- height: 591px;
164
- transform: translateX(calc(100vw - 120px));
165
- }
166
- }
167
- }
168
- @media (width >= 2200px) {
169
- @keyframes slideOutRight {
170
- 100% {
171
- width: 592px;
172
- height: 591px;
173
- transform: translateX(calc(100vw - 592px));
174
- }
175
- }
176
- }
177
- span.ripple {
178
- position: absolute;
179
- border-radius: 50%;
180
- transform: scale(0);
181
- animation: ripple 600ms linear;
182
- background-color: var(--ripple-bg-color);
183
- }
184
-
185
- @keyframes ripple {
186
- to {
187
- transform: scale(4);
188
- opacity: 1;
189
- }
190
- }
191
- :root {
192
- --size-base-unit: 0.5rem;
193
- }
194
-
195
- /**
196
- * RTL support for values logical properties can't automatically adjust for
197
- * 1) Percentage based horizontal translate values need to be flipped
198
- * 2) Background gradients using "to-right" or "to-left" need to be switched to using deg values.
199
- * 3) Inverse items that have 45degs
200
- */
201
- [dir=rtl] {
202
- --rtlTranslateX: 50%;
203
- /* 1 */
204
- --rtlGradientToRight: 270deg;
205
- /* 2 */
206
- --rtlRotate45Inverse: -45deg;
207
- /* 3 */
208
- }
209
-
210
- /**
211
- * Visible focus outline for elements on a light background
212
- */
213
- /**
214
- * Visible focus outline for elements with an error status
215
- */
216
- /**
217
- * Visible focus outline for elements on a dark background
218
- */
219
- /**
220
- * Focus state for themes that need a dashed outline for focus
221
- * state
222
- **/
223
- /**
224
- * Invisible focus outline for elements that need a more visible
225
- * focus state for high-contrast mode
226
- */
227
- /**
228
- * Visually hidden from display
229
- */
230
- /*------------------------------------*\
231
- #SELECT
232
- \*------------------------------------*/
233
- :host {
234
- display: inline-flex;
235
- flex-wrap: wrap;
236
- }
237
-
238
- /**
239
- * Select Label
240
- */
241
- .cre8-c-select__label {
242
- font-family: var(--cre8-typography-label-small-font-family);
243
- font-size: var(--cre8-typography-label-small-font-size);
244
- font-weight: var(--cre8-typography-label-small-font-weight);
245
- line-height: var(--cre8-typography-label-small-line-height);
246
- -webkit-text-decoration: var(--cre8-typography-label-small-text-decoration);
247
- text-decoration: var(--cre8-typography-label-small-text-decoration);
248
- text-transform: var(--cre8-typography-label-small-text-transform);
249
- display: block;
250
- margin-bottom: 8px;
251
- }
252
-
253
- /**
254
- * Select Body
255
- * 1) The div that contains the input and icons
256
- */
257
- .cre8-c-select__body {
258
- position: relative;
259
- }
260
-
261
- /**
262
- * Select Input
263
- * 1) The html5 select element
264
- */
265
- .cre8-c-select__input {
266
- font-family: var(--cre8-typography-body-default-font-family);
267
- font-size: var(--cre8-typography-body-default-font-size);
268
- font-weight: var(--cre8-typography-body-default-font-weight);
269
- line-height: var(--cre8-typography-body-default-line-height);
270
- -webkit-text-decoration: var(--cre8-typography-body-default-text-decoration);
271
- text-decoration: var(--cre8-typography-body-default-text-decoration);
272
- text-transform: var(--cre8-typography-body-default-text-transform);
273
- outline: var(--cre8-border-width-focus) solid transparent;
274
- outline-offset: 2px;
275
- -webkit-appearance: none;
276
- width: 100%;
277
- border-width: var(--cre8-border-width-default);
278
- border-style: solid;
279
- border-color: var(--cre8-color-border-strong);
280
- border-radius: var(--cre8-border-radius-default);
281
- padding: 12px 8px;
282
- color: var(--cre8-color-content-default);
283
- background-color: var(--cre8-color-bg-default);
284
- transition: outline-color var(--cre8-anim-fade-quick) var(--cre8-anim-ease), border-color var(--cre8-anim-fade-quick) var(--cre8-anim-ease), background-color var(--cre8-anim-fade-quick) var(--cre8-anim-ease), color var(--cre8-anim-fade-quick) var(--cre8-anim-ease);
285
- /**
286
- * Hover, focus, active, and focus-visible styles for default input elements
287
- */
288
- /**
289
- * Disabled styles for default input elements
290
- */
291
- /**
292
- * Placeholder styles for default input elements
293
- */
294
- /**
295
- * Error state for default input elements
296
- */
297
- /**
298
- * Success state for default input elements
299
- */
300
- padding-inline-end: 44px;
301
- cursor: pointer;
302
- }
303
- .cre8-c-select__input:hover:not(:disabled), .cre8-c-select__input:focus:not(:disabled), .cre8-c-select__input:active:not(:disabled), .cre8-c-select__input:focus-visible {
304
- outline: var(--cre8-border-width-focus) solid var(--cre8-color-border-active-outline);
305
- outline-offset: 2px;
306
- /**
307
- * Error state
308
- */
309
- /**
310
- * Success state
311
- */
312
- }
313
- .cre8-is-error .cre8-c-select__input:hover:not(:disabled), .cre8-is-error .cre8-c-select__input:focus:not(:disabled), .cre8-is-error .cre8-c-select__input:active:not(:disabled), .cre8-is-error .cre8-c-select__input:focus-visible {
314
- outline-color: var(--cre8-color-border-error);
315
- }
316
- .cre8-is-success .cre8-c-select__input:hover:not(:disabled), .cre8-is-success .cre8-c-select__input:focus:not(:disabled), .cre8-is-success .cre8-c-select__input:active:not(:disabled), .cre8-is-success .cre8-c-select__input:focus-visible {
317
- outline-color: var(--cre8-color-border-success);
318
- }
319
- .cre8-c-select__input:disabled {
320
- background-color: var(--cre8-color-bg-disabled);
321
- border-color: var(--cre8-color-border-disabled);
322
- color: var(--cre8-color-content-disabled);
323
- cursor: not-allowed;
324
- /**
325
- * Disabled text colors
326
- */
327
- }
328
- .cre8-c-select__input:disabled::-moz-placeholder {
329
- color: var(--cre8-color-content-disabled);
330
- }
331
- .cre8-c-select__input:disabled::placeholder {
332
- color: var(--cre8-color-content-disabled);
333
- }
334
- .cre8-c-select__input::-moz-placeholder {
335
- color: var(--cre8-color-content-subtle);
336
- }
337
- .cre8-c-select__input::placeholder {
338
- color: var(--cre8-color-content-subtle);
339
- }
340
- .cre8-is-error .cre8-c-select__input {
341
- border-color: var(--cre8-color-border-error);
342
- }
343
- .cre8-is-success .cre8-c-select__input {
344
- border-color: var(--cre8-color-border-success);
345
- }
346
-
347
- /**
348
- * Select Icon
349
- * 1) The icons within the body container positioned absolutely over the input
350
- */
351
- .cre8-c-select__icons {
352
- position: absolute;
353
- inset-block-start: 50%;
354
- transform: translateY(-50%);
355
- inset-inline-end: 8px;
356
- display: flex;
357
- align-items: center;
358
- justify-content: flex-end;
359
- gap: 8px;
360
- pointer-events: none;
361
- }
362
-
363
- /**
364
- * Select Arrow Icon
365
- */
366
- .cre8-c-select__icon-arrow {
367
- margin-right: 6px;
368
- width: 12px;
369
- height: 12px;
370
- }
371
-
372
- /**
373
- * Select field notes
374
- */
375
- .cre8-c-select__field-note,
376
- .cre8-c-select__field-note-success,
377
- .cre8-c-select__field-note-error {
378
- flex-basis: 100%;
379
- }
380
- /* sourceMappingURL=select.module.css.map */
381
- `;
382
- var _ = Object.defineProperty, r = (p, t, s, l) => {
383
- for (var a = void 0, c = p.length - 1, u; c >= 0; c--)
384
- (u = p[c]) && (a = u(t, s, a) || a);
385
- return a && _(t, s, a), a;
8
+ const _ = m`*,::slotted(*),*:before,*:after{box-sizing:border-box}:root{--size-base-unit: 0.5rem}[dir=rtl]{--rtlTranslateX: 50%;--rtlGradientToRight: 270deg;--rtlRotate45Inverse: -45deg}:host{--cre8-z-index-1: 1;--cre8-z-index-50: 50;--cre8-z-index-100: 100;--cre8-z-index-200: 200;--cre8-z-index-1030: 1030;--cre8-anim-fade-quick: 0.35s;--cre8-anim-ease: ease}@keyframes fadeIn{100%{opacity:1}}@keyframes slideIn{100%{transform:translateX(0)}}@keyframes slideInFwd{100%{width:272px;height:272px}}@keyframes slideOutRight{100%{width:272px;height:272px}}@keyframes slideUp{100%{transform:translateY(0)}}@media(width >= 481px){@keyframes slideInFwd{100%{width:417px;height:417px}}@keyframes slideOutRight{100%{width:417px;height:417px}}}@media(width >= 48rem){@keyframes slideInFwd{100%{width:330px;height:330px}}@keyframes slideOutRight{100%{width:330px;height:330px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 60rem){@keyframes slideInFwd{100%{width:460px;height:460px}}@keyframes slideOutRight{100%{width:460px;height:460px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 75rem){@keyframes slideInFwd{100%{width:592px;height:591px}}@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 87.5rem){@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 120px))}}}@media(width >= 2200px){@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 592px))}}}span.ripple{position:absolute;border-radius:50%;transform:scale(0);animation:ripple 600ms linear;background-color:var(--ripple-bg-color)}@keyframes ripple{to{transform:scale(4);opacity:1}}:root{--size-base-unit: 0.5rem}[dir=rtl]{--rtlTranslateX: 50%;--rtlGradientToRight: 270deg;--rtlRotate45Inverse: -45deg}:host{display:inline-flex;flex-wrap:wrap}.cre8-c-select__label{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:block;margin-bottom:0.5rem}.cre8-c-select__body{position:relative}.cre8-c-select__input{font-family:var(--cre8-typography-body-default-font-family);font-size:var(--cre8-typography-body-default-font-size);font-weight:var(--cre8-typography-body-default-font-weight);line-height:var(--cre8-typography-body-default-line-height);text-decoration:var(--cre8-typography-body-default-text-decoration);text-transform:var(--cre8-typography-body-default-text-transform);outline:var(--cre8-border-width-focus) solid rgba(0,0,0,0);outline-offset:0.125rem;-webkit-appearance:none;width:100%;border-width:var(--cre8-border-width-default);border-style:solid;border-color:var(--cre8-color-border-strong);border-radius:var(--cre8-border-radius-default);padding:0.75rem 0.5rem;color:var(--cre8-color-content-default);background-color:var(--cre8-color-bg-default);transition:outline-color var(--cre8-anim-fade-quick) var(--cre8-anim-ease),border-color var(--cre8-anim-fade-quick) var(--cre8-anim-ease),background-color var(--cre8-anim-fade-quick) var(--cre8-anim-ease),color var(--cre8-anim-fade-quick) var(--cre8-anim-ease)}.cre8-c-select__input:hover:not(:disabled),.cre8-c-select__input:focus:not(:disabled),.cre8-c-select__input:active:not(:disabled),.cre8-c-select__input:focus-visible{outline:var(--cre8-border-width-focus) solid var(--cre8-color-border-active-outline);outline-offset:0.125rem}.cre8-is-error .cre8-c-select__input:hover:not(:disabled),.cre8-is-error .cre8-c-select__input:focus:not(:disabled),.cre8-is-error .cre8-c-select__input:active:not(:disabled),.cre8-is-error .cre8-c-select__input:focus-visible{outline-color:var(--cre8-color-border-error)}.cre8-is-success .cre8-c-select__input:hover:not(:disabled),.cre8-is-success .cre8-c-select__input:focus:not(:disabled),.cre8-is-success .cre8-c-select__input:active:not(:disabled),.cre8-is-success .cre8-c-select__input:focus-visible{outline-color:var(--cre8-color-border-success)}.cre8-c-select__input:disabled{background-color:var(--cre8-color-bg-disabled);border-color:var(--cre8-color-border-disabled);color:var(--cre8-color-content-disabled);cursor:not-allowed}.cre8-c-select__input:disabled::placeholder{color:var(--cre8-color-content-disabled)}.cre8-c-select__input::placeholder{color:var(--cre8-color-content-subtle)}.cre8-is-error .cre8-c-select__input{border-color:var(--cre8-color-border-error)}.cre8-is-success .cre8-c-select__input{border-color:var(--cre8-color-border-success)}.cre8-c-select__input{padding-inline-end:2.75rem;cursor:pointer}.cre8-c-select__icons{position:absolute;inset-block-start:50%;transform:translateY(-50%);inset-inline-end:0.5rem;display:flex;align-items:center;justify-content:flex-end;gap:0.5rem;pointer-events:none}.cre8-c-select__icon-arrow{margin-right:0.375rem;width:0.75rem;height:0.75rem}.cre8-c-select__field-note,.cre8-c-select__field-note-success,.cre8-c-select__field-note-error{flex-basis:100%}`;
9
+ var g = Object.defineProperty, t = (p, r, s, c) => {
10
+ for (var a = void 0, l = p.length - 1, h; l >= 0; l--)
11
+ (h = p[l]) && (a = h(r, s, a) || a);
12
+ return a && g(r, s, a), a;
386
13
  };
387
- const d = class d extends v {
14
+ const n = class n extends v {
388
15
  constructor() {
389
16
  super(...arguments), this.type = "select", this.items = [], this.label = "Label", this.required = !1;
390
17
  }
@@ -392,7 +19,7 @@ const d = class d extends v {
392
19
  * Initialize aria attributes
393
20
  */
394
21
  _initializeAria() {
395
- this.fieldId = this.fieldId || n(), (this.fieldNote || this.slotNotEmpty("fieldNote")) && (this.ariaDescribedBy = this.ariaDescribedBy || n()), (this.successNote || this.errorNote) && (this.validationAriaDescribedBy = this.validationAriaDescribedBy || n());
22
+ this.fieldId = this.fieldId || d(), (this.fieldNote || this.slotNotEmpty("fieldNote")) && (this.ariaDescribedBy = this.ariaDescribedBy || d()), (this.successNote || this.errorNote) && (this.validationAriaDescribedBy = this.validationAriaDescribedBy || d());
396
23
  }
397
24
  /**
398
25
  * Aria describedby string based on field notes and error/success notes
@@ -418,8 +45,8 @@ const d = class d extends v {
418
45
  * select the first item value like the native select.
419
46
  */
420
47
  firstUpdated() {
421
- super.firstUpdated(), [...this._selectOptions].forEach((t) => {
422
- t.selected === !0 && (this.selectedItem = t.value);
48
+ super.firstUpdated(), [...this._selectOptions].forEach((r) => {
49
+ r.selected === !0 && (this.selectedItem = r.value);
423
50
  }), this.defaultValue = this.selectedItem ? this.selectedItem : this._selectOptions[0].value ?? "Select An Option", this._setFormData(), this._initializeAria(), this.updateField();
424
51
  }
425
52
  /**
@@ -435,10 +62,10 @@ const d = class d extends v {
435
62
  * 1. Set the value when the select is changed.
436
63
  * 2. Fire the custom event with the current value.
437
64
  */
438
- _handleOnChange(t) {
439
- const s = t.target;
65
+ _handleOnChange(r) {
66
+ const s = r.target;
440
67
  this.value = s.options[s.selectedIndex].value, this._internals.setFormValue(this.value);
441
- const l = new CustomEvent("change", {
68
+ const c = new CustomEvent("change", {
442
69
  detail: {
443
70
  name: this.name,
444
71
  value: this.value
@@ -446,22 +73,22 @@ const d = class d extends v {
446
73
  bubbles: !0,
447
74
  composed: !0
448
75
  });
449
- this.dispatchEvent(l);
76
+ this.dispatchEvent(c);
450
77
  }
451
78
  /**
452
79
  * Render the select options
453
80
  */
454
81
  _renderSelectOptions() {
455
- return this.items.map((t) => {
456
- if ("options" in t) {
457
- const s = t.options.map((l) => o`
458
- <option value="${l.value}">${l.label}</option>
82
+ return this.items.map((r) => {
83
+ if ("options" in r) {
84
+ const s = r.options.map((c) => o`
85
+ <option value="${c.value}">${c.label}</option>
459
86
  `);
460
- return o`<optgroup label="${t.optGroupLabel}">
87
+ return o`<optgroup label="${r.optGroupLabel}">
461
88
  ${s}
462
89
  </optgroup>`;
463
90
  }
464
- return o`<option value="${t.value}">${t.label}</option>`;
91
+ return o`<option value="${r.value}">${r.label}</option>`;
465
92
  });
466
93
  }
467
94
  /**
@@ -489,21 +116,21 @@ const d = class d extends v {
489
116
  </cre8-field-note>` : null;
490
117
  }
491
118
  render() {
492
- const t = this.componentClassNames("cre8-c-select", {
119
+ const r = this.componentClassNames("cre8-c-select", {
493
120
  "cre8-is-error": this.isError,
494
121
  "cre8-is-success": this.isSuccess
495
122
  });
496
123
  return o`
497
- <div class="${t}">
124
+ <div class="${r}">
498
125
  <label class="cre8-c-select__label" for="${this.fieldId}">${this.label}</label>
499
126
  <div class="cre8-c-select__body">
500
127
  <select
501
128
  class="cre8-c-select__input"
502
129
  id=${this.fieldId}
503
- name=${h(this.name)}
130
+ name=${u(this.name)}
504
131
  ?required=${this.required}
505
132
  ?disabled=${this.disabled}
506
- aria-describedby="${h(this._fieldNoteAria())}"
133
+ aria-describedby="${u(this._fieldNoteAria())}"
507
134
  @change=${this._handleOnChange}
508
135
  >
509
136
  ${this._renderSelectOptions()}
@@ -517,50 +144,50 @@ const d = class d extends v {
517
144
  <cre8-field-note
518
145
  id=${this.ariaDescribedBy}
519
146
  class="cre8-c-select__field-note"
520
- ><slot name="fieldNote">${this.fieldNote}</slot></cre8-field-note>` : m}
147
+ ><slot name="fieldNote">${this.fieldNote}</slot></cre8-field-note>` : b}
521
148
  ${this._renderSuccessErrorFieldNote()}
522
149
  `;
523
150
  }
524
151
  };
525
- d.styles = [g];
526
- let e = d;
527
- r([
152
+ n.styles = [_];
153
+ let e = n;
154
+ t([
528
155
  i({ type: Array })
529
156
  ], e.prototype, "items");
530
- r([
157
+ t([
531
158
  i()
532
159
  ], e.prototype, "label");
533
- r([
160
+ t([
534
161
  i()
535
162
  ], e.prototype, "fieldId");
536
- r([
163
+ t([
537
164
  i()
538
165
  ], e.prototype, "fieldNote");
539
- r([
166
+ t([
540
167
  i()
541
168
  ], e.prototype, "ariaDescribedBy");
542
- r([
169
+ t([
543
170
  i()
544
171
  ], e.prototype, "validationAriaDescribedBy");
545
- r([
172
+ t([
546
173
  i({ type: Boolean, reflect: !0 })
547
174
  ], e.prototype, "required");
548
- r([
175
+ t([
549
176
  i({ type: Boolean, reflect: !0 })
550
177
  ], e.prototype, "disabled");
551
- r([
178
+ t([
552
179
  i({ type: Boolean, reflect: !0 })
553
180
  ], e.prototype, "isError");
554
- r([
181
+ t([
555
182
  i()
556
183
  ], e.prototype, "errorNote");
557
- r([
184
+ t([
558
185
  i({ type: Boolean, reflect: !0 })
559
186
  ], e.prototype, "isSuccess");
560
- r([
187
+ t([
561
188
  i()
562
189
  ], e.prototype, "successNote");
563
- r([
190
+ t([
564
191
  y("option")
565
192
  ], e.prototype, "_selectOptions");
566
193
  customElements.get("cre8-select") === void 0 && customElements.define("cre8-select", e);
@@ -1 +1 @@
1
- {"version":3,"file":"select.styles.d.ts","sourceRoot":"","sources":["../../../components/select/select.styles.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,MAAM,yBAqXX,CAAC;AACF,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"select.styles.d.ts","sourceRoot":"","sources":["../../../components/select/select.styles.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,MAAM,yBAAkhK,CAAC;AAC/hK,eAAe,MAAM,CAAC"}