@tmorrow/cre8-wc 1.1.2 → 1.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (435) hide show
  1. package/cdn/cre8-wc.esm.js +1 -1
  2. package/cdn/cre8-wc.esm.js.map +1 -1
  3. package/cdn/cre8-wc.min.js +1 -1
  4. package/cdn/cre8-wc.min.js.map +1 -1
  5. package/lib/cdn-entry.js +129 -0
  6. package/lib/cdn-entry.js.map +1 -0
  7. package/lib/components/accordion/accordion.js +58 -40
  8. package/lib/components/accordion/accordion.js.map +1 -0
  9. package/lib/components/accordion/accordion.styles.js +4 -0
  10. package/lib/components/accordion/accordion.styles.js.map +1 -0
  11. package/lib/components/accordion-item/accordion-item.js +187 -98
  12. package/lib/components/accordion-item/accordion-item.js.map +1 -0
  13. package/lib/components/accordion-item/accordion-item.styles.js +4 -0
  14. package/lib/components/accordion-item/accordion-item.styles.js.map +1 -0
  15. package/lib/components/alert/alert.js +146 -107
  16. package/lib/components/alert/alert.js.map +1 -0
  17. package/lib/components/alert/alert.styles.js +4 -0
  18. package/lib/components/alert/alert.styles.js.map +1 -0
  19. package/lib/components/badge/badge.js +73 -50
  20. package/lib/components/badge/badge.js.map +1 -0
  21. package/lib/components/badge/badge.styles.js +4 -0
  22. package/lib/components/badge/badge.styles.js.map +1 -0
  23. package/lib/components/band/band.js +34 -31
  24. package/lib/components/band/band.js.map +1 -0
  25. package/lib/components/band/band.styles.js +4 -0
  26. package/lib/components/band/band.styles.js.map +1 -0
  27. package/lib/components/breadcrumbs/breadcrumbs.js +52 -28
  28. package/lib/components/breadcrumbs/breadcrumbs.js.map +1 -0
  29. package/lib/components/breadcrumbs/breadcrumbs.styles.js +4 -0
  30. package/lib/components/breadcrumbs/breadcrumbs.styles.js.map +1 -0
  31. package/lib/components/breadcrumbs-item/breadcrumbs-item.js +28 -27
  32. package/lib/components/breadcrumbs-item/breadcrumbs-item.js.map +1 -0
  33. package/lib/components/breadcrumbs-item/breadcrumbs-item.styles.js +4 -0
  34. package/lib/components/breadcrumbs-item/breadcrumbs-item.styles.js.map +1 -0
  35. package/lib/components/button/button.js +297 -1040
  36. package/lib/components/button/button.js.map +1 -0
  37. package/lib/components/button/button.styles.js +885 -0
  38. package/lib/components/button/button.styles.js.map +1 -0
  39. package/lib/components/button-group/button-group.js +30 -27
  40. package/lib/components/button-group/button-group.js.map +1 -0
  41. package/lib/components/button-group/button-group.styles.js +4 -0
  42. package/lib/components/button-group/button-group.styles.js.map +1 -0
  43. package/lib/components/card/card.js +57 -35
  44. package/lib/components/card/card.js.map +1 -0
  45. package/lib/components/card/card.styles.js +4 -0
  46. package/lib/components/card/card.styles.js.map +1 -0
  47. package/lib/components/chart/chart.js +528 -354
  48. package/lib/components/chart/chart.js.map +1 -0
  49. package/lib/components/chart/chart.styles.js +4 -0
  50. package/lib/components/chart/chart.styles.js.map +1 -0
  51. package/lib/components/checkbox-field/checkbox-field.js +66 -53
  52. package/lib/components/checkbox-field/checkbox-field.js.map +1 -0
  53. package/lib/components/checkbox-field/checkbox-field.styles.js +4 -0
  54. package/lib/components/checkbox-field/checkbox-field.styles.js.map +1 -0
  55. package/lib/components/checkbox-field-item/checkbox-field-item.js +252 -183
  56. package/lib/components/checkbox-field-item/checkbox-field-item.js.map +1 -0
  57. package/lib/components/checkbox-field-item/checkbox-field-item.styles.js +4 -0
  58. package/lib/components/checkbox-field-item/checkbox-field-item.styles.js.map +1 -0
  59. package/lib/components/contexts/form-internals-context.js +9 -0
  60. package/lib/components/contexts/form-internals-context.js.map +1 -0
  61. package/lib/components/cre8-element.js +57 -56
  62. package/lib/components/cre8-element.js.map +1 -0
  63. package/lib/components/cre8-form-element.js +212 -244
  64. package/lib/components/cre8-form-element.js.map +1 -0
  65. package/lib/components/danger-button/danger-button.js +274 -147
  66. package/lib/components/danger-button/danger-button.js.map +1 -0
  67. package/lib/components/danger-button/danger-button.styles.js +4 -0
  68. package/lib/components/danger-button/danger-button.styles.js.map +1 -0
  69. package/lib/components/date-picker/calendar/calendar.js +465 -0
  70. package/lib/components/date-picker/calendar/calendar.js.map +1 -0
  71. package/lib/components/date-picker/calendar/calendar.styles.js +4 -0
  72. package/lib/components/date-picker/calendar/calendar.styles.js.map +1 -0
  73. package/lib/components/date-picker/calendar-month-modal/calendar-month-modal.js +76 -0
  74. package/lib/components/date-picker/calendar-month-modal/calendar-month-modal.js.map +1 -0
  75. package/lib/components/date-picker/calendar-month-modal/calendar-month-modal.styles.js +4 -0
  76. package/lib/components/date-picker/calendar-month-modal/calendar-month-modal.styles.js.map +1 -0
  77. package/lib/components/date-picker/calendar-navigation/calendar-navigation.js +110 -0
  78. package/lib/components/date-picker/calendar-navigation/calendar-navigation.js.map +1 -0
  79. package/lib/components/date-picker/calendar-navigation/calendar-navigation.styles.js +4 -0
  80. package/lib/components/date-picker/calendar-navigation/calendar-navigation.styles.js.map +1 -0
  81. package/lib/components/date-picker/calendar-year-modal/calendar-year-modal.js +116 -0
  82. package/lib/components/date-picker/calendar-year-modal/calendar-year-modal.js.map +1 -0
  83. package/lib/components/date-picker/calendar-year-modal/calendar-year-modal.styles.js +4 -0
  84. package/lib/components/date-picker/calendar-year-modal/calendar-year-modal.styles.js.map +1 -0
  85. package/lib/components/date-picker/date-picker.js +91 -784
  86. package/lib/components/date-picker/date-picker.js.map +1 -0
  87. package/lib/components/date-picker/date-picker.styles.js +4 -0
  88. package/lib/components/date-picker/date-picker.styles.js.map +1 -0
  89. package/lib/components/divider/divider.js +45 -35
  90. package/lib/components/divider/divider.js.map +1 -0
  91. package/lib/components/divider/divider.styles.js +4 -0
  92. package/lib/components/divider/divider.styles.js.map +1 -0
  93. package/lib/components/dropdown/dropdown.js +97 -63
  94. package/lib/components/dropdown/dropdown.js.map +1 -0
  95. package/lib/components/dropdown/dropdown.styles.js +4 -0
  96. package/lib/components/dropdown/dropdown.styles.js.map +1 -0
  97. package/lib/components/dropdown-item/dropdown-item.js +38 -31
  98. package/lib/components/dropdown-item/dropdown-item.js.map +1 -0
  99. package/lib/components/dropdown-item/dropdown-item.styles.js +4 -0
  100. package/lib/components/dropdown-item/dropdown-item.styles.js.map +1 -0
  101. package/lib/components/feature/feature.js +40 -35
  102. package/lib/components/feature/feature.js.map +1 -0
  103. package/lib/components/feature/feature.styles.js +4 -0
  104. package/lib/components/feature/feature.styles.js.map +1 -0
  105. package/lib/components/field/field.js +218 -153
  106. package/lib/components/field/field.js.map +1 -0
  107. package/lib/components/field/field.styles.js +4 -0
  108. package/lib/components/field/field.styles.js.map +1 -0
  109. package/lib/components/field-note/field-note.js +58 -45
  110. package/lib/components/field-note/field-note.js.map +1 -0
  111. package/lib/components/field-note/field-note.styles.js +4 -0
  112. package/lib/components/field-note/field-note.styles.js.map +1 -0
  113. package/lib/components/footer/footer.js +25 -18
  114. package/lib/components/footer/footer.js.map +1 -0
  115. package/lib/components/footer/footer.styles.js +4 -0
  116. package/lib/components/footer/footer.styles.js.map +1 -0
  117. package/lib/components/global-nav/global-nav.js +44 -37
  118. package/lib/components/global-nav/global-nav.js.map +1 -0
  119. package/lib/components/global-nav/global-nav.styles.js +4 -0
  120. package/lib/components/global-nav/global-nav.styles.js.map +1 -0
  121. package/lib/components/global-nav-item/global-nav-item.js +149 -112
  122. package/lib/components/global-nav-item/global-nav-item.js.map +1 -0
  123. package/lib/components/global-nav-item/global-nav-item.styles.js +4 -0
  124. package/lib/components/global-nav-item/global-nav-item.styles.js.map +1 -0
  125. package/lib/components/grid/grid.js +48 -45
  126. package/lib/components/grid/grid.js.map +1 -0
  127. package/lib/components/grid/grid.styles.js +4 -0
  128. package/lib/components/grid/grid.styles.js.map +1 -0
  129. package/lib/components/grid-item/grid-item.js +19 -16
  130. package/lib/components/grid-item/grid-item.js.map +1 -0
  131. package/lib/components/grid-item/grid-item.styles.js +4 -0
  132. package/lib/components/grid-item/grid-item.styles.js.map +1 -0
  133. package/lib/components/header/header.js +34 -29
  134. package/lib/components/header/header.js.map +1 -0
  135. package/lib/components/header/header.styles.js +4 -0
  136. package/lib/components/header/header.styles.js.map +1 -0
  137. package/lib/components/heading/heading.js +113 -76
  138. package/lib/components/heading/heading.js.map +1 -0
  139. package/lib/components/heading/heading.styles.js +4 -0
  140. package/lib/components/heading/heading.styles.js.map +1 -0
  141. package/lib/components/hero/hero.js +43 -40
  142. package/lib/components/hero/hero.js.map +1 -0
  143. package/lib/components/hero/hero.styles.js +4 -0
  144. package/lib/components/hero/hero.styles.js.map +1 -0
  145. package/lib/components/icon/icon.js +232 -9
  146. package/lib/components/icon/icon.js.map +1 -0
  147. package/lib/components/icon/icon.styles.js +4 -0
  148. package/lib/components/icon/icon.styles.js.map +1 -0
  149. package/lib/components/inline-alert/inline-alert.js +114 -87
  150. package/lib/components/inline-alert/inline-alert.js.map +1 -0
  151. package/lib/components/inline-alert/inline-alert.styles.js +4 -0
  152. package/lib/components/inline-alert/inline-alert.styles.js.map +1 -0
  153. package/lib/components/layout/layout.js +30 -27
  154. package/lib/components/layout/layout.js.map +1 -0
  155. package/lib/components/layout/layout.styles.js +4 -0
  156. package/lib/components/layout/layout.styles.js.map +1 -0
  157. package/lib/components/layout-container/layout-container.js +30 -27
  158. package/lib/components/layout-container/layout-container.js.map +1 -0
  159. package/lib/components/layout-container/layout-container.styles.js +4 -0
  160. package/lib/components/layout-container/layout-container.styles.js.map +1 -0
  161. package/lib/components/layout-section/layout-section.js +41 -33
  162. package/lib/components/layout-section/layout-section.js.map +1 -0
  163. package/lib/components/layout-section/layout-section.styles.js +4 -0
  164. package/lib/components/layout-section/layout-section.styles.js.map +1 -0
  165. package/lib/components/linelength-container/linelength-container.js +19 -16
  166. package/lib/components/linelength-container/linelength-container.js.map +1 -0
  167. package/lib/components/linelength-container/linelength-container.styles.js +4 -0
  168. package/lib/components/linelength-container/linelength-container.styles.js.map +1 -0
  169. package/lib/components/link/link.js +125 -87
  170. package/lib/components/link/link.js.map +1 -0
  171. package/lib/components/link/link.styles.js +4 -0
  172. package/lib/components/link/link.styles.js.map +1 -0
  173. package/lib/components/link-list/link-list.js +48 -45
  174. package/lib/components/link-list/link-list.js.map +1 -0
  175. package/lib/components/link-list/link-list.styles.js +4 -0
  176. package/lib/components/link-list/link-list.styles.js.map +1 -0
  177. package/lib/components/link-list-item/link-list-item.js +40 -37
  178. package/lib/components/link-list-item/link-list-item.js.map +1 -0
  179. package/lib/components/link-list-item/link-list-item.styles.js +4 -0
  180. package/lib/components/link-list-item/link-list-item.styles.js.map +1 -0
  181. package/lib/components/list/list.js +35 -32
  182. package/lib/components/list/list.js.map +1 -0
  183. package/lib/components/list/list.styles.js +4 -0
  184. package/lib/components/list/list.styles.js.map +1 -0
  185. package/lib/components/list-item/list-item.js +25 -21
  186. package/lib/components/list-item/list-item.js.map +1 -0
  187. package/lib/components/list-item/list-item.styles.js +4 -0
  188. package/lib/components/list-item/list-item.styles.js.map +1 -0
  189. package/lib/components/loading-spinner/loading-spinner.js +126 -71
  190. package/lib/components/loading-spinner/loading-spinner.js.map +1 -0
  191. package/lib/components/loading-spinner/loading-spinner.styles.js +4 -0
  192. package/lib/components/loading-spinner/loading-spinner.styles.js.map +1 -0
  193. package/lib/components/logo/logo.js +28 -25
  194. package/lib/components/logo/logo.js.map +1 -0
  195. package/lib/components/logo/logo.styles.js +4 -0
  196. package/lib/components/logo/logo.styles.js.map +1 -0
  197. package/lib/components/main/main.js +29 -26
  198. package/lib/components/main/main.js.map +1 -0
  199. package/lib/components/main/main.styles.js +4 -0
  200. package/lib/components/main/main.styles.js.map +1 -0
  201. package/lib/components/modal/modal.js +174 -125
  202. package/lib/components/modal/modal.js.map +1 -0
  203. package/lib/components/modal/modal.styles.js +4 -0
  204. package/lib/components/modal/modal.styles.js.map +1 -0
  205. package/lib/components/multi-select/multi-select.js +300 -211
  206. package/lib/components/multi-select/multi-select.js.map +1 -0
  207. package/lib/components/multi-select/multi-select.styles.js +4 -0
  208. package/lib/components/multi-select/multi-select.styles.js.map +1 -0
  209. package/lib/components/nav-container/nav-container.js +19 -16
  210. package/lib/components/nav-container/nav-container.js.map +1 -0
  211. package/lib/components/nav-container/nav-container.styles.js +4 -0
  212. package/lib/components/nav-container/nav-container.styles.js.map +1 -0
  213. package/lib/components/page-header/page-header.js +36 -29
  214. package/lib/components/page-header/page-header.js.map +1 -0
  215. package/lib/components/page-header/page-header.styles.js +4 -0
  216. package/lib/components/page-header/page-header.styles.js.map +1 -0
  217. package/lib/components/pagination/page-counter/page-counter.js +67 -0
  218. package/lib/components/pagination/page-counter/page-counter.js.map +1 -0
  219. package/lib/components/pagination/page-counter/page-counter.styles.js +4 -0
  220. package/lib/components/pagination/page-counter/page-counter.styles.js.map +1 -0
  221. package/lib/components/pagination/pagination.js +282 -237
  222. package/lib/components/pagination/pagination.js.map +1 -0
  223. package/lib/components/pagination/pagination.styles.js +4 -0
  224. package/lib/components/pagination/pagination.styles.js.map +1 -0
  225. package/lib/components/percent-bar/percent-bar.js +56 -48
  226. package/lib/components/percent-bar/percent-bar.js.map +1 -0
  227. package/lib/components/percent-bar/percent-bar.styles.js +4 -0
  228. package/lib/components/percent-bar/percent-bar.styles.js.map +1 -0
  229. package/lib/components/popover/popover.js +304 -179
  230. package/lib/components/popover/popover.js.map +1 -0
  231. package/lib/components/popover/popover.styles.js +4 -0
  232. package/lib/components/popover/popover.styles.js.map +1 -0
  233. package/lib/components/primary-nav/primary-nav.js +44 -37
  234. package/lib/components/primary-nav/primary-nav.js.map +1 -0
  235. package/lib/components/primary-nav/primary-nav.styles.js +4 -0
  236. package/lib/components/primary-nav/primary-nav.styles.js.map +1 -0
  237. package/lib/components/primary-nav-item/primary-nav-item.js +151 -113
  238. package/lib/components/primary-nav-item/primary-nav-item.js.map +1 -0
  239. package/lib/components/primary-nav-item/primary-nav-item.styles.js +4 -0
  240. package/lib/components/primary-nav-item/primary-nav-item.styles.js.map +1 -0
  241. package/lib/components/progress-meter/progress-meter.js +74 -57
  242. package/lib/components/progress-meter/progress-meter.js.map +1 -0
  243. package/lib/components/progress-meter/progress-meter.styles.js +4 -0
  244. package/lib/components/progress-meter/progress-meter.styles.js.map +1 -0
  245. package/lib/components/progress-steps/progress-steps.js +19 -0
  246. package/lib/components/progress-steps/progress-steps.js.map +1 -0
  247. package/lib/components/progress-steps/progress-steps.styles.js +4 -0
  248. package/lib/components/progress-steps/progress-steps.styles.js.map +1 -0
  249. package/lib/components/progress-steps-item/progress-steps-item.js +52 -40
  250. package/lib/components/progress-steps-item/progress-steps-item.js.map +1 -0
  251. package/lib/components/progress-steps-item/progress-steps-item.styles.js +4 -0
  252. package/lib/components/progress-steps-item/progress-steps-item.styles.js.map +1 -0
  253. package/lib/components/radio-field/radio-field.js +59 -49
  254. package/lib/components/radio-field/radio-field.js.map +1 -0
  255. package/lib/components/radio-field/radio-field.styles.js +4 -0
  256. package/lib/components/radio-field/radio-field.styles.js.map +1 -0
  257. package/lib/components/radio-field-item/radio-field-item.js +222 -179
  258. package/lib/components/radio-field-item/radio-field-item.js.map +1 -0
  259. package/lib/components/radio-field-item/radio-field-item.styles.js +4 -0
  260. package/lib/components/radio-field-item/radio-field-item.styles.js.map +1 -0
  261. package/lib/components/remove-tag/remove-tag.js +89 -60
  262. package/lib/components/remove-tag/remove-tag.js.map +1 -0
  263. package/lib/components/remove-tag/remove-tag.styles.js +4 -0
  264. package/lib/components/remove-tag/remove-tag.styles.js.map +1 -0
  265. package/lib/components/section/section.js +46 -27
  266. package/lib/components/section/section.js.map +1 -0
  267. package/lib/components/section/section.styles.js +4 -0
  268. package/lib/components/section/section.styles.js.map +1 -0
  269. package/lib/components/select/select.js +243 -158
  270. package/lib/components/select/select.js.map +1 -0
  271. package/lib/components/select/select.styles.js +4 -0
  272. package/lib/components/select/select.styles.js.map +1 -0
  273. package/lib/components/select-tile/select-tile-checkbox-controller.js +60 -0
  274. package/lib/components/select-tile/select-tile-checkbox-controller.js.map +1 -0
  275. package/lib/components/select-tile/select-tile-radio-controller.js +167 -0
  276. package/lib/components/select-tile/select-tile-radio-controller.js.map +1 -0
  277. package/lib/components/select-tile/select-tile.js +228 -223
  278. package/lib/components/select-tile/select-tile.js.map +1 -0
  279. package/lib/components/select-tile/select-tile.styles.js +4 -0
  280. package/lib/components/select-tile/select-tile.styles.js.map +1 -0
  281. package/lib/components/select-tile-list/select-tile-list.js +76 -62
  282. package/lib/components/select-tile-list/select-tile-list.js.map +1 -0
  283. package/lib/components/select-tile-list/select-tile-list.styles.js +4 -0
  284. package/lib/components/select-tile-list/select-tile-list.styles.js.map +1 -0
  285. package/lib/components/skeleton-loader/skeleton-loader.js +68 -39
  286. package/lib/components/skeleton-loader/skeleton-loader.js.map +1 -0
  287. package/lib/components/skeleton-loader/skeleton-loader.styles.js +4 -0
  288. package/lib/components/skeleton-loader/skeleton-loader.styles.js.map +1 -0
  289. package/lib/components/split-button/split-button.js +51 -46
  290. package/lib/components/split-button/split-button.js.map +1 -0
  291. package/lib/components/split-button/split-button.styles.js +4 -0
  292. package/lib/components/split-button/split-button.styles.js.map +1 -0
  293. package/lib/components/submenu/submenu.js +19 -16
  294. package/lib/components/submenu/submenu.js.map +1 -0
  295. package/lib/components/submenu/submenu.styles.js +4 -0
  296. package/lib/components/submenu/submenu.styles.js.map +1 -0
  297. package/lib/components/submenu-item/submenu-item.js +32 -26
  298. package/lib/components/submenu-item/submenu-item.js.map +1 -0
  299. package/lib/components/submenu-item/submenu-item.styles.js +4 -0
  300. package/lib/components/submenu-item/submenu-item.styles.js.map +1 -0
  301. package/lib/components/tab/tab.js +74 -63
  302. package/lib/components/tab/tab.js.map +1 -0
  303. package/lib/components/tab/tab.styles.js +4 -0
  304. package/lib/components/tab/tab.styles.js.map +1 -0
  305. package/lib/components/tab-panel/tab-panel.js +49 -43
  306. package/lib/components/tab-panel/tab-panel.js.map +1 -0
  307. package/lib/components/tab-panel/tab-panel.styles.js +4 -0
  308. package/lib/components/tab-panel/tab-panel.styles.js.map +1 -0
  309. package/lib/components/table/table.js +46 -41
  310. package/lib/components/table/table.js.map +1 -0
  311. package/lib/components/table/table.styles.js +4 -0
  312. package/lib/components/table/table.styles.js.map +1 -0
  313. package/lib/components/table-body/table-body.js +20 -17
  314. package/lib/components/table-body/table-body.js.map +1 -0
  315. package/lib/components/table-body/table-body.styles.js +4 -0
  316. package/lib/components/table-body/table-body.styles.js.map +1 -0
  317. package/lib/components/table-cell/table-cell.js +39 -36
  318. package/lib/components/table-cell/table-cell.js.map +1 -0
  319. package/lib/components/table-cell/table-cell.styles.js +4 -0
  320. package/lib/components/table-cell/table-cell.styles.js.map +1 -0
  321. package/lib/components/table-header/table-header.js +20 -17
  322. package/lib/components/table-header/table-header.js.map +1 -0
  323. package/lib/components/table-header/table-header.styles.js +4 -0
  324. package/lib/components/table-header/table-header.styles.js.map +1 -0
  325. package/lib/components/table-header-cell/table-header-cell.js +35 -32
  326. package/lib/components/table-header-cell/table-header-cell.js.map +1 -0
  327. package/lib/components/table-header-cell/table-header-cell.styles.js +4 -0
  328. package/lib/components/table-header-cell/table-header-cell.styles.js.map +1 -0
  329. package/lib/components/table-object/table-object.js +21 -18
  330. package/lib/components/table-object/table-object.js.map +1 -0
  331. package/lib/components/table-object/table-object.styles.js +4 -0
  332. package/lib/components/table-object/table-object.styles.js.map +1 -0
  333. package/lib/components/table-row/table-row.js +76 -55
  334. package/lib/components/table-row/table-row.js.map +1 -0
  335. package/lib/components/table-row/table-row.styles.js +4 -0
  336. package/lib/components/table-row/table-row.styles.js.map +1 -0
  337. package/lib/components/tabs/tabs.js +452 -303
  338. package/lib/components/tabs/tabs.js.map +1 -0
  339. package/lib/components/tabs/tabs.styles.js +4 -0
  340. package/lib/components/tabs/tabs.styles.js.map +1 -0
  341. package/lib/components/tag/tag.js +236 -167
  342. package/lib/components/tag/tag.js.map +1 -0
  343. package/lib/components/tag/tag.styles.js +4 -0
  344. package/lib/components/tag/tag.styles.js.map +1 -0
  345. package/lib/components/tag-list/tag-list.js +40 -35
  346. package/lib/components/tag-list/tag-list.js.map +1 -0
  347. package/lib/components/tag-list/tag-list.styles.js +4 -0
  348. package/lib/components/tag-list/tag-list.styles.js.map +1 -0
  349. package/lib/components/tertiary-nav/tertiary-nav.js +40 -33
  350. package/lib/components/tertiary-nav/tertiary-nav.js.map +1 -0
  351. package/lib/components/tertiary-nav/tertiary-nav.styles.js +4 -0
  352. package/lib/components/tertiary-nav/tertiary-nav.styles.js.map +1 -0
  353. package/lib/components/tertiary-nav-item/tertiary-nav-item.js +52 -43
  354. package/lib/components/tertiary-nav-item/tertiary-nav-item.js.map +1 -0
  355. package/lib/components/tertiary-nav-item/tertiary-nav-item.styles.js +4 -0
  356. package/lib/components/tertiary-nav-item/tertiary-nav-item.styles.js.map +1 -0
  357. package/lib/components/text-link/text-link.js +45 -41
  358. package/lib/components/text-link/text-link.js.map +1 -0
  359. package/lib/components/text-link/text-link.styles.js +4 -0
  360. package/lib/components/text-link/text-link.styles.js.map +1 -0
  361. package/lib/components/text-passage/text-passage-light-dom.js +145 -0
  362. package/lib/components/text-passage/text-passage-light-dom.js.map +1 -0
  363. package/lib/components/text-passage/text-passage-light-dom.styles.js +4 -0
  364. package/lib/components/text-passage/text-passage-light-dom.styles.js.map +1 -0
  365. package/lib/components/text-passage/text-passage.js +72 -44
  366. package/lib/components/text-passage/text-passage.js.map +1 -0
  367. package/lib/components/text-passage/text-passage.styles.js +4 -0
  368. package/lib/components/text-passage/text-passage.styles.js.map +1 -0
  369. package/lib/components/tooltip/tooltip.js +278 -173
  370. package/lib/components/tooltip/tooltip.js.map +1 -0
  371. package/lib/components/tooltip/tooltip.styles.js +4 -0
  372. package/lib/components/tooltip/tooltip.styles.js.map +1 -0
  373. package/lib/components/utility-nav/utility-nav.js +40 -33
  374. package/lib/components/utility-nav/utility-nav.js.map +1 -0
  375. package/lib/components/utility-nav/utility-nav.styles.js +4 -0
  376. package/lib/components/utility-nav/utility-nav.styles.js.map +1 -0
  377. package/lib/components/utility-nav-item/utility-nav-item.js +70 -49
  378. package/lib/components/utility-nav-item/utility-nav-item.js.map +1 -0
  379. package/lib/components/utility-nav-item/utility-nav-item.styles.js +4 -0
  380. package/lib/components/utility-nav-item/utility-nav-item.styles.js.map +1 -0
  381. package/lib/design-tokens/brands/blue/css/tokens_blue.module.js +737 -0
  382. package/lib/design-tokens/brands/blue/css/tokens_blue.module.js.map +1 -0
  383. package/lib/design-tokens/brands/bolt/tokens_bolt.theme.js +756 -0
  384. package/lib/design-tokens/brands/bolt/tokens_bolt.theme.js.map +1 -0
  385. package/lib/design-tokens/brands/cre8/css/tokens_cre8.module.js +771 -0
  386. package/lib/design-tokens/brands/cre8/css/tokens_cre8.module.js.map +1 -0
  387. package/lib/design-tokens/brands/cre8-a2ui/css/tokens_cre8-a2ui.module.js +772 -0
  388. package/lib/design-tokens/brands/cre8-a2ui/css/tokens_cre8-a2ui.module.js.map +1 -0
  389. package/lib/design-tokens/brands/cre8-legacy/css/tokens_cre8-legacy.module.js +737 -0
  390. package/lib/design-tokens/brands/cre8-legacy/css/tokens_cre8-legacy.module.js.map +1 -0
  391. package/lib/design-tokens/brands/femmecubator/css/tokens_femmecubator2.module.js +983 -0
  392. package/lib/design-tokens/brands/femmecubator/css/tokens_femmecubator2.module.js.map +1 -0
  393. package/lib/design-tokens/brands/legacy/css/tokens_legacy.module.js +737 -0
  394. package/lib/design-tokens/brands/legacy/css/tokens_legacy.module.js.map +1 -0
  395. package/lib/design-tokens/brands/marketing/css/tokens_marketing.module.js +736 -0
  396. package/lib/design-tokens/brands/marketing/css/tokens_marketing.module.js.map +1 -0
  397. package/lib/design-tokens/brands/minimalist/css/tokens_minimalist.module.js +737 -0
  398. package/lib/design-tokens/brands/minimalist/css/tokens_minimalist.module.js.map +1 -0
  399. package/lib/design-tokens/brands/prisma/tokens_prisma.module.js +771 -0
  400. package/lib/design-tokens/brands/prisma/tokens_prisma.module.js.map +1 -0
  401. package/lib/design-tokens/brands/starbucks/tokens.module.js +552 -0
  402. package/lib/design-tokens/brands/starbucks/tokens.module.js.map +1 -0
  403. package/lib/design-tokens/brands/starbucks/tokens_starbucks.module.js +776 -0
  404. package/lib/design-tokens/brands/starbucks/tokens_starbucks.module.js.map +1 -0
  405. package/lib/design-tokens/brands copy/blue/css/tokens_blue.module.js +253 -0
  406. package/lib/design-tokens/brands copy/blue/css/tokens_blue.module.js.map +1 -0
  407. package/lib/design-tokens/core/scss/theming/head.module.js +6 -0
  408. package/lib/design-tokens/core/scss/theming/head.module.js.map +1 -0
  409. package/lib/design-tokens/tokens_netflix.theme.js +806 -0
  410. package/lib/design-tokens/tokens_netflix.theme.js.map +1 -0
  411. package/lib/directives/if-truthy.js +24 -0
  412. package/lib/directives/if-truthy.js.map +1 -0
  413. package/lib/directives/spread.js +29 -0
  414. package/lib/directives/spread.js.map +1 -0
  415. package/lib/index.js +84 -168
  416. package/lib/index.js.map +1 -0
  417. package/lib/scripts/convert-scss-to-ts.js +25 -0
  418. package/lib/scripts/convert-scss-to-ts.js.map +1 -0
  419. package/lib/scripts/extract-tokens.js +120 -0
  420. package/lib/scripts/extract-tokens.js.map +1 -0
  421. package/lib/scripts/generate-react-wrappers.js +229 -0
  422. package/lib/scripts/generate-react-wrappers.js.map +1 -0
  423. package/lib/scripts/generateWesparkleThemes.js +52 -0
  424. package/lib/scripts/generateWesparkleThemes.js.map +1 -0
  425. package/lib/toBeAccessible.js +18 -0
  426. package/lib/toBeAccessible.js.map +1 -0
  427. package/lib/utilities/is-mobile.js +10 -0
  428. package/lib/utilities/is-mobile.js.map +1 -0
  429. package/lib/utilities/story-helpers.js +14 -0
  430. package/lib/utilities/story-helpers.js.map +1 -0
  431. package/lib/vite.config.cdn.js +85 -0
  432. package/lib/vite.config.cdn.js.map +1 -0
  433. package/lib/vite.config.js +156 -0
  434. package/lib/vite.config.js.map +1 -0
  435. package/package.json +8 -9
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loading-spinner.styles.js","sourceRoot":"","sources":["../../../components/loading-spinner/loading-spinner.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,MAAM,MAAM,GAAG,GAAG,CAAA,8/JAA8/J,CAAC;AACjhK,eAAe,MAAM,CAAC","sourcesContent":["import { css } from 'lit';\nconst styles = css`*,::slotted(*),*:before,*:after{box-sizing:border-box}:root{--size-base-unit: 0.5rem}[dir=rtl]{--rtlTranslateX: 50%;--rtlGradientToRight: 270deg;--rtlRotate45Inverse: -45deg}:host{--cre8-z-index-1: 1;--cre8-z-index-50: 50;--cre8-z-index-100: 100;--cre8-z-index-200: 200;--cre8-z-index-1030: 1030;--cre8-anim-fade-quick: 0.35s;--cre8-anim-ease: ease}@keyframes fadeIn{100%{opacity:1}}@keyframes slideIn{100%{transform:translateX(0)}}@keyframes slideInFwd{100%{width:272px;height:272px}}@keyframes slideOutRight{100%{width:272px;height:272px}}@keyframes slideUp{100%{transform:translateY(0)}}@media(width >= 481px){@keyframes slideInFwd{100%{width:417px;height:417px}}@keyframes slideOutRight{100%{width:417px;height:417px}}}@media(width >= 48rem){@keyframes slideInFwd{100%{width:330px;height:330px}}@keyframes slideOutRight{100%{width:330px;height:330px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 60rem){@keyframes slideInFwd{100%{width:460px;height:460px}}@keyframes slideOutRight{100%{width:460px;height:460px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 75rem){@keyframes slideInFwd{100%{width:592px;height:591px}}@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 87.5rem){@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 120px))}}}@media(width >= 2200px){@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 592px))}}}span.ripple{position:absolute;border-radius:50%;transform:scale(0);animation:ripple 600ms linear;background-color:var(--ripple-bg-color)}@keyframes ripple{to{transform:scale(4);opacity:1}}:root{--size-base-unit: 0.5rem}[dir=rtl]{--rtlTranslateX: 50%;--rtlGradientToRight: 270deg;--rtlRotate45Inverse: -45deg}@keyframes loading{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes spinner-circle-animation{0%,25%{stroke-dashoffset:280;transform:rotate(0)}50%,75%{stroke-dashoffset:75;transform:rotate(45deg)}100%{stroke-dashoffset:280;transform:rotate(360deg)}}:host{display:inline-block;--spinner-stroke-dasharray: 282.743px;--spinner-large-stroke-width: 10;--spinner-small-stroke-width: 14;--spinner-large-width: 4.5rem;--spinner-small-width: 1.5rem;font-family:var(--cre8-typography-label-small-font-family);font-size:var(--cre8-typography-label-small-font-size);font-weight:var(--cre8-typography-label-small-font-weight);line-height:var(--cre8-typography-label-small-line-height);text-decoration:var(--cre8-typography-label-small-text-decoration);text-transform:var(--cre8-typography-label-small-text-transform)}.cre8-c-spinner,.cre8-c-spinner--large{--spinner-height: var(--spinner-large-width);--spinner-width: var(--spinner-large-width);--icon-color: var(--cre8-color-content-brand)}.cre8-c-spinner .cre8-c-spinner__icon,.cre8-c-spinner--large .cre8-c-spinner__icon{display:block}.cre8-c-spinner .cre8-c-spinner__label,.cre8-c-spinner--large .cre8-c-spinner__label{display:block;margin-top:var(--cre8-spacing-8)}.cre8-c-spinner--small{--spinner-height: var(--spinner-small-width);--spinner-width: var(--spinner-small-width);--icon-color: var(--cre8-color-content-brand);display:flex;align-items:center}.cre8-c-spinner--small .cre8-c-spinner__label{display:inline-block;margin-left:var(--cre8-spacing-8);margin-top:0;vertical-align:.35rem}.cre8-c-spinner--inverse{--icon-color: var(--cre8-color-content-brand-knockout);--label-color: var(--cre8-color-content-brand-knockout)}.cre8-c-spinner--secondary.cre8-c-spinner--inverse.cre8-c-spinner--neutral{--icon-color: var(--cre8-color-button-secondary-neutral-inverse-content-active);--label-color: var(--cre8-color-button-secondary-neutral-inverse-content-active)}.cre8-c-spinner--neutral{--icon-color: var(--cre8-color-button-secondary-neutral-content-active)}.cre8-c-spinner--primary.cre8-c-spinner--inverse{--icon-color: var(--cre8-color-button-primary-inverse-content-active)}.cre8-c-spinner--secondary.cre8-c-spinner--inverse{--icon-color: var(--cre8-color-button-secondary-inverse-content-active)}.cre8-c-spinner--tertiary.cre8-c-spinner--inverse{--icon-color: var(--cre8-color-button-tertiary-inverse-content-active)}.cre8-c-spinner__label{color:var(--label-color, var(--cre8-color-content-default))}.cre8-c-spinner__hidden-label{display:none}.cre8-c-spinner__icon{height:var(--spinner-height, 1em);width:var(--spinner-width, 1em)}.cre8-c-spinner__icon circle{fill:rgba(0,0,0,0);stroke:var(--icon-color, inherit);stroke-dasharray:var(--spinner-stroke-dasharray);stroke-linecap:round;stroke-width:var(--spinner-large-stroke-width);transform-origin:50% 50%}.cre8-c-spinner__icon-small circle{stroke-width:var(--spinner-small-stroke-width)}.cre8-c-spinner--indeterminate .cre8-c-spinner__icon{animation:loading 2s linear 0s infinite}.cre8-c-spinner--indeterminate .cre8-c-spinner__icon circle{animation-duration:1.4s;animation-iteration-count:infinite;animation-name:spinner-circle-animation;animation-timing-function:ease-in-out}.cre8-c-spinner--determinate .cre8-c-spinner__icon{overflow:hidden;transform:rotate(-90deg);transform-origin:center center}`;\nexport default styles;\n"]}
@@ -1,29 +1,32 @@
1
- import { css as n, html as h } from "lit";
2
- import { property as o } from "lit/decorators.js";
3
- import { Cre8Element as m } from "../cre8-element.js";
4
- const p = n`*,::slotted(*),*:before,*:after{box-sizing:border-box}:root{--size-base-unit: 0.5rem}[dir=rtl]{--rtlTranslateX: 50%;--rtlGradientToRight: 270deg;--rtlRotate45Inverse: -45deg}:host{--cre8-z-index-1: 1;--cre8-z-index-50: 50;--cre8-z-index-100: 100;--cre8-z-index-200: 200;--cre8-z-index-1030: 1030;--cre8-anim-fade-quick: 0.35s;--cre8-anim-ease: ease}@keyframes fadeIn{100%{opacity:1}}@keyframes slideIn{100%{transform:translateX(0)}}@keyframes slideInFwd{100%{width:272px;height:272px}}@keyframes slideOutRight{100%{width:272px;height:272px}}@keyframes slideUp{100%{transform:translateY(0)}}@media(width >= 481px){@keyframes slideInFwd{100%{width:417px;height:417px}}@keyframes slideOutRight{100%{width:417px;height:417px}}}@media(width >= 48rem){@keyframes slideInFwd{100%{width:330px;height:330px}}@keyframes slideOutRight{100%{width:330px;height:330px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 60rem){@keyframes slideInFwd{100%{width:460px;height:460px}}@keyframes slideOutRight{100%{width:460px;height:460px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 75rem){@keyframes slideInFwd{100%{width:592px;height:591px}}@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 87.5rem){@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 120px))}}}@media(width >= 2200px){@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 592px))}}}span.ripple{position:absolute;border-radius:50%;transform:scale(0);animation:ripple 600ms linear;background-color:var(--ripple-bg-color)}@keyframes ripple{to{transform:scale(4);opacity:1}}:root{--size-base-unit: 0.5rem}[dir=rtl]{--rtlTranslateX: 50%;--rtlGradientToRight: 270deg;--rtlRotate45Inverse: -45deg}.cre8-c-logo{display:flex}`;
5
- var f = Object.defineProperty, c = (a, t, d, x) => {
6
- for (var e = void 0, i = a.length - 1, l; i >= 0; i--)
7
- (l = a[i]) && (e = l(t, d, e) || e);
8
- return e && f(t, d, e), e;
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
9
6
  };
10
- const s = class s extends m {
11
- render() {
12
- const t = this.componentClassNames("cre8-c-logo", {});
13
- return h`
14
- <a href="${this.href}" class="${t}">
7
+ import { html, } from 'lit';
8
+ import { property } from 'lit/decorators.js';
9
+ import { Cre8Element } from '../cre8-element';
10
+ import styles from './logo.styles.js';
11
+ /**
12
+ * @slot - The logo element
13
+ */
14
+ export class Cre8Logo extends Cre8Element {
15
+ render() {
16
+ const componentClassName = this.componentClassNames('cre8-c-logo', {});
17
+ return html `
18
+ <a href="${this.href}" class="${componentClassName}">
15
19
 
16
20
  </a>
17
21
  `;
18
- }
19
- };
20
- s.styles = [p];
21
- let r = s;
22
- c([
23
- o()
24
- ], r.prototype, "href");
25
- customElements.get("cre8-logo") === void 0 && customElements.define("cre8-logo", r);
26
- export {
27
- r as Cre8Logo,
28
- r as default
29
- };
22
+ }
23
+ }
24
+ Cre8Logo.styles = [styles];
25
+ __decorate([
26
+ property()
27
+ ], Cre8Logo.prototype, "href", void 0);
28
+ if (customElements.get('cre8-logo') === undefined) {
29
+ customElements.define('cre8-logo', Cre8Logo);
30
+ }
31
+ export default Cre8Logo;
32
+ //# sourceMappingURL=logo.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logo.js","sourceRoot":"","sources":["../../../components/logo/logo.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,GAAI,MAAM,KAAK,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,MAAM,MAAM,kBAAkB,CAAC;AAEtC;;GAEG;AACH,MAAM,OAAO,QAAS,SAAQ,WAAW;IASvC,MAAM;QACF,MAAM,kBAAkB,GAAG,IAAI,CAAC,mBAAmB,CAAC,aAAa,EAAE,EAAE,CAAC,CAAC;QAEvE,OAAO,IAAI,CAAA;iBACA,IAAI,CAAC,IAAI,YAAY,kBAAkB;;;KAGnD,CAAC;IACJ,CAAC;;AAhBQ,eAAM,GAAG,CAAC,MAAM,CAAC,CAAC;AAMvB;IADH,QAAQ,EAAE;sCACO;AAapB,IAAI,cAAc,CAAC,GAAG,CAAC,WAAW,CAAC,KAAK,SAAS,EAAE,CAAC;IAChD,cAAc,CAAC,MAAM,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;AACjD,CAAC;AAQD,eAAe,QAAQ,CAAC","sourcesContent":["import { html, } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { Cre8Element } from '../cre8-element';\nimport styles from './logo.styles.js';\n\n/**\n * @slot - The logo element\n */\nexport class Cre8Logo extends Cre8Element {\n static styles = [styles];\n\n /**\n * Logo link\n */\n @property()\n href?: string;\n\n render() {\n const componentClassName = this.componentClassNames('cre8-c-logo', {});\n\n return html`\n <a href=\"${this.href}\" class=\"${componentClassName}\">\n \n </a>\n `;\n }\n}\n\nif (customElements.get('cre8-logo') === undefined) {\n customElements.define('cre8-logo', Cre8Logo);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'cre8-logo': Cre8Logo;\n }\n}\n\nexport default Cre8Logo;\n"]}
@@ -0,0 +1,4 @@
1
+ import { css } from 'lit';
2
+ const styles = css `*,::slotted(*),*:before,*:after{box-sizing:border-box}:root{--size-base-unit: 0.5rem}[dir=rtl]{--rtlTranslateX: 50%;--rtlGradientToRight: 270deg;--rtlRotate45Inverse: -45deg}:host{--cre8-z-index-1: 1;--cre8-z-index-50: 50;--cre8-z-index-100: 100;--cre8-z-index-200: 200;--cre8-z-index-1030: 1030;--cre8-anim-fade-quick: 0.35s;--cre8-anim-ease: ease}@keyframes fadeIn{100%{opacity:1}}@keyframes slideIn{100%{transform:translateX(0)}}@keyframes slideInFwd{100%{width:272px;height:272px}}@keyframes slideOutRight{100%{width:272px;height:272px}}@keyframes slideUp{100%{transform:translateY(0)}}@media(width >= 481px){@keyframes slideInFwd{100%{width:417px;height:417px}}@keyframes slideOutRight{100%{width:417px;height:417px}}}@media(width >= 48rem){@keyframes slideInFwd{100%{width:330px;height:330px}}@keyframes slideOutRight{100%{width:330px;height:330px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 60rem){@keyframes slideInFwd{100%{width:460px;height:460px}}@keyframes slideOutRight{100%{width:460px;height:460px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 75rem){@keyframes slideInFwd{100%{width:592px;height:591px}}@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 87.5rem){@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 120px))}}}@media(width >= 2200px){@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 592px))}}}span.ripple{position:absolute;border-radius:50%;transform:scale(0);animation:ripple 600ms linear;background-color:var(--ripple-bg-color)}@keyframes ripple{to{transform:scale(4);opacity:1}}:root{--size-base-unit: 0.5rem}[dir=rtl]{--rtlTranslateX: 50%;--rtlGradientToRight: 270deg;--rtlRotate45Inverse: -45deg}.cre8-c-logo{display:flex}`;
3
+ export default styles;
4
+ //# sourceMappingURL=logo.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logo.styles.js","sourceRoot":"","sources":["../../../components/logo/logo.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,MAAM,MAAM,GAAG,GAAG,CAAA,oyDAAoyD,CAAC;AACvzD,eAAe,MAAM,CAAC","sourcesContent":["import { css } from 'lit';\nconst styles = css`*,::slotted(*),*:before,*:after{box-sizing:border-box}:root{--size-base-unit: 0.5rem}[dir=rtl]{--rtlTranslateX: 50%;--rtlGradientToRight: 270deg;--rtlRotate45Inverse: -45deg}:host{--cre8-z-index-1: 1;--cre8-z-index-50: 50;--cre8-z-index-100: 100;--cre8-z-index-200: 200;--cre8-z-index-1030: 1030;--cre8-anim-fade-quick: 0.35s;--cre8-anim-ease: ease}@keyframes fadeIn{100%{opacity:1}}@keyframes slideIn{100%{transform:translateX(0)}}@keyframes slideInFwd{100%{width:272px;height:272px}}@keyframes slideOutRight{100%{width:272px;height:272px}}@keyframes slideUp{100%{transform:translateY(0)}}@media(width >= 481px){@keyframes slideInFwd{100%{width:417px;height:417px}}@keyframes slideOutRight{100%{width:417px;height:417px}}}@media(width >= 48rem){@keyframes slideInFwd{100%{width:330px;height:330px}}@keyframes slideOutRight{100%{width:330px;height:330px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 60rem){@keyframes slideInFwd{100%{width:460px;height:460px}}@keyframes slideOutRight{100%{width:460px;height:460px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 75rem){@keyframes slideInFwd{100%{width:592px;height:591px}}@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 87.5rem){@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 120px))}}}@media(width >= 2200px){@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 592px))}}}span.ripple{position:absolute;border-radius:50%;transform:scale(0);animation:ripple 600ms linear;background-color:var(--ripple-bg-color)}@keyframes ripple{to{transform:scale(4);opacity:1}}:root{--size-base-unit: 0.5rem}[dir=rtl]{--rtlTranslateX: 50%;--rtlGradientToRight: 270deg;--rtlRotate45Inverse: -45deg}.cre8-c-logo{display:flex}`;\nexport default styles;\n"]}
@@ -1,27 +1,30 @@
1
- import { css as n, html as h } from "lit";
2
- import { property as m } from "lit/decorators.js";
3
- import { Cre8Element as o } from "../cre8-element.js";
4
- const p = n`*,::slotted(*),*:before,*:after{box-sizing:border-box}:root{--size-base-unit: 0.5rem}[dir=rtl]{--rtlTranslateX: 50%;--rtlGradientToRight: 270deg;--rtlRotate45Inverse: -45deg}:host{--cre8-z-index-1: 1;--cre8-z-index-50: 50;--cre8-z-index-100: 100;--cre8-z-index-200: 200;--cre8-z-index-1030: 1030;--cre8-anim-fade-quick: 0.35s;--cre8-anim-ease: ease}@keyframes fadeIn{100%{opacity:1}}@keyframes slideIn{100%{transform:translateX(0)}}@keyframes slideInFwd{100%{width:272px;height:272px}}@keyframes slideOutRight{100%{width:272px;height:272px}}@keyframes slideUp{100%{transform:translateY(0)}}@media(width >= 481px){@keyframes slideInFwd{100%{width:417px;height:417px}}@keyframes slideOutRight{100%{width:417px;height:417px}}}@media(width >= 48rem){@keyframes slideInFwd{100%{width:330px;height:330px}}@keyframes slideOutRight{100%{width:330px;height:330px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 60rem){@keyframes slideInFwd{100%{width:460px;height:460px}}@keyframes slideOutRight{100%{width:460px;height:460px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 75rem){@keyframes slideInFwd{100%{width:592px;height:591px}}@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 87.5rem){@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 120px))}}}@media(width >= 2200px){@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 592px))}}}span.ripple{position:absolute;border-radius:50%;transform:scale(0);animation:ripple 600ms linear;background-color:var(--ripple-bg-color)}@keyframes ripple{to{transform:scale(4);opacity:1}}:root{--size-base-unit: 0.5rem}[dir=rtl]{--rtlTranslateX: 50%;--rtlGradientToRight: 270deg;--rtlRotate45Inverse: -45deg}:host{display:flex;flex-direction:column;flex:1 0 auto}.cre8-c-main--full-height{display:flex;flex-direction:column;flex:1;height:100%}`;
5
- var f = Object.defineProperty, c = (a, t, l, x) => {
6
- for (var e = void 0, r = a.length - 1, d; r >= 0; r--)
7
- (d = a[r]) && (e = d(t, l, e) || e);
8
- return e && f(t, l, e), e;
9
- };
10
- const s = class s extends o {
11
- render() {
12
- const t = this.componentClassNames("cre8-c-main", {
13
- "cre8-c-main--full-height": this.fullHeight === !0
14
- });
15
- return h`<main class=${t}><slot></slot></main>`;
16
- }
17
- };
18
- s.styles = [p];
19
- let i = s;
20
- c([
21
- m({ type: Boolean, reflect: !0 })
22
- ], i.prototype, "fullHeight");
23
- customElements.get("cre8-main") === void 0 && customElements.define("cre8-main", i);
24
- export {
25
- i as Cre8Main,
26
- i as default
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
27
6
  };
7
+ import { html, } from 'lit';
8
+ import { property } from 'lit/decorators.js';
9
+ import { Cre8Element } from '../cre8-element';
10
+ import styles from './main.styles.js';
11
+ /**
12
+ * @slot - The main content
13
+ */
14
+ export class Cre8Main extends Cre8Element {
15
+ render() {
16
+ const componentClassName = this.componentClassNames('cre8-c-main', {
17
+ 'cre8-c-main--full-height': this.fullHeight === true,
18
+ });
19
+ return html `<main class=${componentClassName}><slot></slot></main>`;
20
+ }
21
+ }
22
+ Cre8Main.styles = [styles];
23
+ __decorate([
24
+ property({ type: Boolean, reflect: true })
25
+ ], Cre8Main.prototype, "fullHeight", void 0);
26
+ if (customElements.get('cre8-main') === undefined) {
27
+ customElements.define('cre8-main', Cre8Main);
28
+ }
29
+ export default Cre8Main;
30
+ //# sourceMappingURL=main.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"main.js","sourceRoot":"","sources":["../../../components/main/main.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,GAAI,MAAM,KAAK,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,MAAM,MAAM,kBAAkB,CAAC;AAEtC;;GAEG;AACH,MAAM,OAAO,QAAS,SAAQ,WAAW;IAUvC,MAAM;QACF,MAAM,kBAAkB,GAAG,IAAI,CAAC,mBAAmB,CAAC,aAAa,EAAE;YAC/D,0BAA0B,EAAE,IAAI,CAAC,UAAU,KAAK,IAAI;SACvD,CAAC,CAAC;QAEH,OAAO,IAAI,CAAA,eAAe,kBAAkB,uBAAuB,CAAC;IACxE,CAAC;;AAfQ,eAAM,GAAG,CAAC,MAAM,CAAC,CAAC;AAOvB;IADH,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;4CAClB;AAW3B,IAAI,cAAc,CAAC,GAAG,CAAC,WAAW,CAAC,KAAK,SAAS,EAAE,CAAC;IAChD,cAAc,CAAC,MAAM,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;AACjD,CAAC;AAQD,eAAe,QAAQ,CAAC","sourcesContent":["import { html, } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { Cre8Element } from '../cre8-element';\nimport styles from './main.styles.js';\n\n/**\n * @slot - The main content\n */\nexport class Cre8Main extends Cre8Element {\n static styles = [styles];\n\n /**\n * Full height variant\n * 1) Sets the height to 100%\n */\n @property({ type: Boolean, reflect: true })\n fullHeight?: boolean;\n\n render() {\n const componentClassName = this.componentClassNames('cre8-c-main', {\n 'cre8-c-main--full-height': this.fullHeight === true,\n });\n\n return html`<main class=${componentClassName}><slot></slot></main>`;\n }\n}\n\nif (customElements.get('cre8-main') === undefined) {\n customElements.define('cre8-main', Cre8Main);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'cre8-main': Cre8Main;\n }\n}\n\nexport default Cre8Main;\n"]}
@@ -0,0 +1,4 @@
1
+ import { css } from 'lit';
2
+ const styles = css `*,::slotted(*),*:before,*:after{box-sizing:border-box}:root{--size-base-unit: 0.5rem}[dir=rtl]{--rtlTranslateX: 50%;--rtlGradientToRight: 270deg;--rtlRotate45Inverse: -45deg}:host{--cre8-z-index-1: 1;--cre8-z-index-50: 50;--cre8-z-index-100: 100;--cre8-z-index-200: 200;--cre8-z-index-1030: 1030;--cre8-anim-fade-quick: 0.35s;--cre8-anim-ease: ease}@keyframes fadeIn{100%{opacity:1}}@keyframes slideIn{100%{transform:translateX(0)}}@keyframes slideInFwd{100%{width:272px;height:272px}}@keyframes slideOutRight{100%{width:272px;height:272px}}@keyframes slideUp{100%{transform:translateY(0)}}@media(width >= 481px){@keyframes slideInFwd{100%{width:417px;height:417px}}@keyframes slideOutRight{100%{width:417px;height:417px}}}@media(width >= 48rem){@keyframes slideInFwd{100%{width:330px;height:330px}}@keyframes slideOutRight{100%{width:330px;height:330px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 60rem){@keyframes slideInFwd{100%{width:460px;height:460px}}@keyframes slideOutRight{100%{width:460px;height:460px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 75rem){@keyframes slideInFwd{100%{width:592px;height:591px}}@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 87.5rem){@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 120px))}}}@media(width >= 2200px){@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 592px))}}}span.ripple{position:absolute;border-radius:50%;transform:scale(0);animation:ripple 600ms linear;background-color:var(--ripple-bg-color)}@keyframes ripple{to{transform:scale(4);opacity:1}}:root{--size-base-unit: 0.5rem}[dir=rtl]{--rtlTranslateX: 50%;--rtlGradientToRight: 270deg;--rtlRotate45Inverse: -45deg}:host{display:flex;flex-direction:column;flex:1 0 auto}.cre8-c-main--full-height{display:flex;flex-direction:column;flex:1;height:100%}`;
3
+ export default styles;
4
+ //# sourceMappingURL=main.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"main.styles.js","sourceRoot":"","sources":["../../../components/main/main.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,MAAM,MAAM,GAAG,GAAG,CAAA,i5DAAi5D,CAAC;AACp6D,eAAe,MAAM,CAAC","sourcesContent":["import { css } from 'lit';\nconst styles = css`*,::slotted(*),*:before,*:after{box-sizing:border-box}:root{--size-base-unit: 0.5rem}[dir=rtl]{--rtlTranslateX: 50%;--rtlGradientToRight: 270deg;--rtlRotate45Inverse: -45deg}:host{--cre8-z-index-1: 1;--cre8-z-index-50: 50;--cre8-z-index-100: 100;--cre8-z-index-200: 200;--cre8-z-index-1030: 1030;--cre8-anim-fade-quick: 0.35s;--cre8-anim-ease: ease}@keyframes fadeIn{100%{opacity:1}}@keyframes slideIn{100%{transform:translateX(0)}}@keyframes slideInFwd{100%{width:272px;height:272px}}@keyframes slideOutRight{100%{width:272px;height:272px}}@keyframes slideUp{100%{transform:translateY(0)}}@media(width >= 481px){@keyframes slideInFwd{100%{width:417px;height:417px}}@keyframes slideOutRight{100%{width:417px;height:417px}}}@media(width >= 48rem){@keyframes slideInFwd{100%{width:330px;height:330px}}@keyframes slideOutRight{100%{width:330px;height:330px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 60rem){@keyframes slideInFwd{100%{width:460px;height:460px}}@keyframes slideOutRight{100%{width:460px;height:460px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 75rem){@keyframes slideInFwd{100%{width:592px;height:591px}}@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 87.5rem){@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 120px))}}}@media(width >= 2200px){@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 592px))}}}span.ripple{position:absolute;border-radius:50%;transform:scale(0);animation:ripple 600ms linear;background-color:var(--ripple-bg-color)}@keyframes ripple{to{transform:scale(4);opacity:1}}:root{--size-base-unit: 0.5rem}[dir=rtl]{--rtlTranslateX: 50%;--rtlGradientToRight: 270deg;--rtlRotate45Inverse: -45deg}:host{display:flex;flex-direction:column;flex:1 0 auto}.cre8-c-main--full-height{display:flex;flex-direction:column;flex:1;height:100%}`;\nexport default styles;\n"]}
@@ -1,146 +1,195 @@
1
- import { css as m, html as i } from "lit";
2
- import { query as h, 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
- import "@a11y/focus-trap";
6
- const w = m`*,::slotted(*),*:before,*:after{box-sizing:border-box}:root{--size-base-unit: 0.5rem}[dir=rtl]{--rtlTranslateX: 50%;--rtlGradientToRight: 270deg;--rtlRotate45Inverse: -45deg}:host{--cre8-z-index-1: 1;--cre8-z-index-50: 50;--cre8-z-index-100: 100;--cre8-z-index-200: 200;--cre8-z-index-1030: 1030;--cre8-anim-fade-quick: 0.35s;--cre8-anim-ease: ease}@keyframes fadeIn{100%{opacity:1}}@keyframes slideIn{100%{transform:translateX(0)}}@keyframes slideInFwd{100%{width:272px;height:272px}}@keyframes slideOutRight{100%{width:272px;height:272px}}@keyframes slideUp{100%{transform:translateY(0)}}@media(width >= 481px){@keyframes slideInFwd{100%{width:417px;height:417px}}@keyframes slideOutRight{100%{width:417px;height:417px}}}@media(width >= 48rem){@keyframes slideInFwd{100%{width:330px;height:330px}}@keyframes slideOutRight{100%{width:330px;height:330px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 60rem){@keyframes slideInFwd{100%{width:460px;height:460px}}@keyframes slideOutRight{100%{width:460px;height:460px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 75rem){@keyframes slideInFwd{100%{width:592px;height:591px}}@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 87.5rem){@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 120px))}}}@media(width >= 2200px){@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 592px))}}}span.ripple{position:absolute;border-radius:50%;transform:scale(0);animation:ripple 600ms linear;background-color:var(--ripple-bg-color)}@keyframes ripple{to{transform:scale(4);opacity:1}}:root{--size-base-unit: 0.5rem}[dir=rtl]{--rtlTranslateX: 50%;--rtlGradientToRight: 270deg;--rtlRotate45Inverse: -45deg}:host{display:block}.cre8-c-modal{position:fixed;height:100vh;width:100vw;top:0;left:0;display:none;justify-content:center;align-items:center;background:rgba(0,0,0,.25);z-index:1000}.cre8-c-modal.cre8-is-active{display:flex;visibility:visible;opacity:1}.cre8-c-modal__focus-trap{display:contents}.cre8-c-modal__window{display:flex;flex-direction:column;flex-shrink:0;position:fixed;background:var(--cre8-color-bg-default);width:34rem;max-width:100%;border-radius:var(--cre8-border-radius-container);overflow:hidden;overflow-y:auto}@media all and (max-width: 768px){.cre8-c-modal__window{position:inherit;height:100%;width:100%}}.cre8-c-modal__window:focus-visible{outline:var(--cre8-border-width-focus) solid var(--cre8-color-border-active-outline);outline-offset:0.125rem}.cre8-c-modal__header{display:flex;padding:2rem 3rem 1rem;align-items:center}.cre8-c-modal--error .cre8-c-modal__header .cre8-modal-icon{color:var(--cre8-color-content-error-icon)}.cre8-c-modal--warning .cre8-c-modal__header .cre8-modal-icon{color:var(--cre8-color-content-warning-icon)}.cre8-c-modal--success .cre8-c-modal__header .cre8-modal-icon{color:var(--cre8-color-content-success-icon)}.cre8-c-modal--info .cre8-c-modal__header .cre8-modal-icon,.cre8-c-modal--help .cre8-c-modal__header .cre8-modal-icon{color:var(--cre8-color-content-info-icon)}.cre8-c-modal__header-inner{display:flex;align-items:center;gap:1rem}.cre8-c-modal__header-inner cre8-icon .cre8-modal-icon{height:2rem;width:2rem}.cre8-c-modal__body{max-height:240px;overflow:auto;padding:0 3rem}@media all and (max-width: 768px){.cre8-c-modal__body{height:100%;max-height:max-content}}.cre8-c-modal__footer{padding:1.5rem 3rem calc(100vh - 95dvh)}.cre8-c-modal__close-button{margin-left:auto}`;
7
- var x = Object.defineProperty, r = (d, e, o, _) => {
8
- for (var s = void 0, c = d.length - 1, n; c >= 0; c--)
9
- (n = d[c]) && (s = n(e, o, s) || s);
10
- return s && x(e, o, s), s;
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
11
6
  };
12
- const l = class l extends y {
13
- constructor() {
14
- super(...arguments), this.closeButtonText = "close", this.closeButtonIcon = "close", this.mapStatusToIconModal = (e) => {
15
- switch (e) {
16
- case "error":
17
- return i`<cre8-icon class="cre8-modal-icon" svg=${g} aria-hidden='true'></cre8-icon>`;
18
- case "success":
19
- return i`<cre8-icon class="cre8-modal-icon" svg=${v} aria-hidden='true'></cre8-icon>`;
20
- case "warning":
21
- return i`<cre8-icon class="cre8-modal-icon" svg=${f} aria-hidden='true'></cre8-icon>`;
22
- case "help":
23
- return i`<cre8-icon class="cre8-modal-icon" svg=${u} aria-hidden='true'></cre8-icon>`;
24
- case "info":
25
- return i`<cre8-icon class="cre8-modal-icon" svg=${p} aria-hidden='true'></cre8-icon>`;
26
- default:
27
- return null;
28
- }
29
- };
30
- }
31
- /**
32
- * Handle keydown
33
- * 1) Close the modal when escape is hit when the user is focused within the modal
34
- */
35
- handleKeydown(e) {
36
- e.code === "Escape" && !this.notDismissible && this.handleCloseModal();
37
- }
38
- /**
39
- * Handle on close
40
- * 1) On close, set the modal to not active and dispatch event telling the parent the modal was closed.
41
- */
42
- handleCloseModal() {
43
- this.isActive = !1, this.dispatch({
44
- eventName: "close-modal",
45
- detailObj: {
46
- isActive: this.isActive
47
- }
48
- });
49
- }
50
- /**
51
- * Handle "click outside"
52
- * 1) onClick of the area around the modal window, close the modal.
53
- */
54
- handleOnClickOutside(e) {
55
- const o = e.target;
56
- this.isActive && this._modalWindow && o.classList.contains("cre8-c-modal") && !this.notDismissible && this.handleCloseModal();
57
- }
58
- /**
59
- * Lifecycle method to focus on modal
60
- * 1) If there is a changed property, and this.isActive === true, then focus on the modal window.
61
- * 2) Disable the body from scrolling behind while the modal is open.
62
- */
63
- updated(e) {
64
- if (this.isActive === !0 && setTimeout(() => {
65
- this._modalWindow.focus();
66
- }, 200), e.has("isActive")) {
67
- const o = document.querySelector("body");
68
- this.isActive ? o.style.overflow = "hidden" : o.style.removeProperty("overflow");
7
+ import { html, } from 'lit';
8
+ import { property, query } from 'lit/decorators.js';
9
+ import svgError from '../../icons/System/Regular/Error.svg?raw';
10
+ import svgWarningFilled from '../../icons/System/Filled/Warning.svg?raw';
11
+ import svgCheckCircle from '../../icons/System/Filled/Check.svg?raw';
12
+ import svgInfoFilled from '../../icons/System/Filled/Info.svg?raw';
13
+ import svgHelp from '../../icons/System/Regular/Help.svg?raw';
14
+ import { Cre8Element } from '../cre8-element';
15
+ import '../icon/icon.js';
16
+ import '@a11y/focus-trap';
17
+ import styles from './modal.styles.js';
18
+ import '../../icons/System/Regular/Close.svg?raw';
19
+ /**
20
+ * Modal component should be used in all modal situations.
21
+ * It is natuarally composable and can even have a custom header and remove the close button.
22
+ * (note: adding `slot="header"` will insert the given element into the header section of the modal,
23
+ * same for `slot="footer"` and no given slot name will inset it into the body)
24
+ *
25
+ * If it is desired to create a utility modal. Cre8Modal requires a status value (see props table below,
26
+ * and a UtilityModalTitle since all utility modals have a cre8-heading)
27
+ * @slot - The component content
28
+ */
29
+ export class Cre8Modal extends Cre8Element {
30
+ constructor() {
31
+ super(...arguments);
32
+ /**
33
+ * Close Button Text
34
+ */
35
+ this.closeButtonText = 'close';
36
+ /**
37
+ * Close Button Icon
38
+ */
39
+ this.closeButtonIcon = 'close';
40
+ /*
41
+ * Maps modal icons and modal status variants to what the alt text of the related icon should be
42
+ * see: (https://digital.#.com/patterns-and-Components/informational-display/alerts-and-notifications#query=alerts)
43
+ * this provides the recommendated alt text of different statuses
44
+ */
45
+ this.mapStatusToIconModal = (status) => {
46
+ switch (status) {
47
+ case 'error':
48
+ return html `<cre8-icon class="cre8-modal-icon" svg=${svgError} aria-hidden='true'></cre8-icon>`;
49
+ case 'success':
50
+ return html `<cre8-icon class="cre8-modal-icon" svg=${svgCheckCircle} aria-hidden='true'></cre8-icon>`;
51
+ case 'warning':
52
+ return html `<cre8-icon class="cre8-modal-icon" svg=${svgWarningFilled} aria-hidden='true'></cre8-icon>`;
53
+ case 'help':
54
+ return html `<cre8-icon class="cre8-modal-icon" svg=${svgHelp} aria-hidden='true'></cre8-icon>`;
55
+ case 'info':
56
+ return html `<cre8-icon class="cre8-modal-icon" svg=${svgInfoFilled} aria-hidden='true'></cre8-icon>`;
57
+ default:
58
+ return null;
59
+ }
60
+ };
69
61
  }
70
- }
71
- /**
72
- * Lifecycle method on removal from the DOM
73
- * Removed body overflow and handle close (isActive set to false)
74
- */
75
- disconnectedCallback() {
76
- this.isActive = !1, document.querySelector("body").style.removeProperty("overflow");
77
- }
78
- render() {
79
- const e = this.componentClassNames("cre8-c-modal", {
80
- "cre8-is-active": this.isActive,
81
- "cre8-c-modal--error": this.status === "error",
82
- "cre8-c-modal--warning": this.status === "warning",
83
- "cre8-c-modal--success": this.status === "success",
84
- "cre8-c-modal--info": this.status === "info",
85
- "cre8-c-modal--help": this.status === "help"
86
- });
87
- return i`
88
- <div class="${e}" @click="${this.handleOnClickOutside}" @keydown=${this.handleKeydown}>
62
+ /**
63
+ * Handle keydown
64
+ * 1) Close the modal when escape is hit when the user is focused within the modal
65
+ */
66
+ handleKeydown(e) {
67
+ if (e.code === 'Escape' && !this.notDismissible) {
68
+ this.handleCloseModal(); /* 2 */
69
+ }
70
+ }
71
+ /**
72
+ * Handle on close
73
+ * 1) On close, set the modal to not active and dispatch event telling the parent the modal was closed.
74
+ */
75
+ handleCloseModal() {
76
+ this.isActive = false;
77
+ this.dispatch({
78
+ eventName: 'close-modal',
79
+ detailObj: {
80
+ isActive: this.isActive,
81
+ },
82
+ });
83
+ }
84
+ /**
85
+ * Handle "click outside"
86
+ * 1) onClick of the area around the modal window, close the modal.
87
+ */
88
+ handleOnClickOutside(e) {
89
+ const eventTarget = e.target;
90
+ if (this.isActive && this._modalWindow && eventTarget.classList.contains('cre8-c-modal') && !this.notDismissible) {
91
+ this.handleCloseModal();
92
+ }
93
+ }
94
+ /**
95
+ * Lifecycle method to focus on modal
96
+ * 1) If there is a changed property, and this.isActive === true, then focus on the modal window.
97
+ * 2) Disable the body from scrolling behind while the modal is open.
98
+ */
99
+ updated(changedProperties) {
100
+ if (this.isActive === true) {
101
+ setTimeout(() => {
102
+ this._modalWindow.focus();
103
+ }, 200);
104
+ } /* 1 */
105
+ if (changedProperties.has('isActive')) {
106
+ const body = document.querySelector('body');
107
+ if (this.isActive) {
108
+ body.style.overflow = 'hidden';
109
+ }
110
+ else {
111
+ body.style.removeProperty('overflow');
112
+ }
113
+ } /* 2 */
114
+ }
115
+ /**
116
+ * Lifecycle method on removal from the DOM
117
+ * Removed body overflow and handle close (isActive set to false)
118
+ */
119
+ disconnectedCallback() {
120
+ this.isActive = false;
121
+ const body = document.querySelector('body');
122
+ body.style.removeProperty('overflow');
123
+ }
124
+ render() {
125
+ const componentClassNames = this.componentClassNames('cre8-c-modal', {
126
+ 'cre8-is-active': this.isActive,
127
+ 'cre8-c-modal--error': this.status === 'error',
128
+ 'cre8-c-modal--warning': this.status === 'warning',
129
+ 'cre8-c-modal--success': this.status === 'success',
130
+ 'cre8-c-modal--info': this.status === 'info',
131
+ 'cre8-c-modal--help': this.status === 'help',
132
+ });
133
+ return html `
134
+ <div class="${componentClassNames}" @click="${this.handleOnClickOutside}" @keydown=${this.handleKeydown}>
89
135
  <focus-trap class="cre8-c-modal__focus-trap" ?inactive=${!this.isActive}>
90
136
  <div class="cre8-c-modal__window" role="dialog" aria-label=${this.ariaLabel} tabindex=${this.isActive ? 0 : -1}>
91
137
  <div class="cre8-c-modal__header">
92
- ${this.status ? i`<div class="cre8-c-modal__header-inner">
138
+ ${this.status
139
+ ? html `<div class="cre8-c-modal__header-inner">
93
140
  ${this.mapStatusToIconModal(this.status)}
94
- <cre8-heading type="title-large" ?brandColor=${!0}>${this.utilityModalTitle}</cre8-heading>
95
- </div>` : i`<slot name="header"></slot>`}
96
- ${this.notDismissible ? "" : i`<cre8-button
141
+ <cre8-heading type="title-large" ?brandColor=${true}>${this.utilityModalTitle}</cre8-heading>
142
+ </div>`
143
+ : html `<slot name="header"></slot>`}
144
+ ${!this.notDismissible
145
+ ? html `<cre8-button
97
146
  class="cre8-c-modal__close-button"
98
147
  variant="tertiary"
99
148
  text="${this.closeButtonText}"
100
- ?hideText=${!0}
149
+ ?hideText=${true}
101
150
  iconName="close"
102
151
  iconPosition="after"
103
152
  ?inverted=${!this.status}
104
153
  @click=${this.handleCloseModal}
105
- ></cre8-button>`}
154
+ ></cre8-button>`
155
+ : ''}
106
156
  </div>
107
157
  <div class="cre8-c-modal__body">
108
158
  <slot></slot>
109
159
  </div>
110
- ${this.slotNotEmpty("footer") && i`<div class="cre8-c-modal__footer"><slot name="footer"></slot></div>`}
160
+ ${this.slotNotEmpty('footer') && html `<div class="cre8-c-modal__footer"><slot name="footer"></slot></div>`}
111
161
  </div>
112
162
  </focus-trap>
113
163
  </div>
114
164
  `;
115
- }
116
- };
117
- l.styles = [w];
118
- let t = l;
119
- r([
120
- h(".cre8-c-modal__window")
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);
144
- export {
145
- t as Cre8Modal
146
- };
165
+ }
166
+ }
167
+ Cre8Modal.styles = [styles];
168
+ __decorate([
169
+ query('.cre8-c-modal__window')
170
+ ], Cre8Modal.prototype, "_modalWindow", void 0);
171
+ __decorate([
172
+ property({ type: Boolean, reflect: true })
173
+ ], Cre8Modal.prototype, "isActive", void 0);
174
+ __decorate([
175
+ property()
176
+ ], Cre8Modal.prototype, "status", void 0);
177
+ __decorate([
178
+ property()
179
+ ], Cre8Modal.prototype, "utilityModalTitle", void 0);
180
+ __decorate([
181
+ property({ type: Boolean, reflect: true })
182
+ ], Cre8Modal.prototype, "notDismissible", void 0);
183
+ __decorate([
184
+ property()
185
+ ], Cre8Modal.prototype, "closeButtonText", void 0);
186
+ __decorate([
187
+ property()
188
+ ], Cre8Modal.prototype, "closeButtonIcon", void 0);
189
+ __decorate([
190
+ property()
191
+ ], Cre8Modal.prototype, "ariaLabel", void 0);
192
+ if (customElements.get('cre8-modal') === undefined) {
193
+ customElements.define('cre8-modal', Cre8Modal);
194
+ }
195
+ //# sourceMappingURL=modal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"modal.js","sourceRoot":"","sources":["../../../components/modal/modal.ts"],"names":[],"mappings":"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","sourcesContent":["import { PropertyValues, html, } from 'lit';\nimport { property, query } from 'lit/decorators.js';\nimport svgError from '../../icons/System/Regular/Error.svg?raw';\nimport svgWarningFilled from '../../icons/System/Filled/Warning.svg?raw';\nimport svgCheckCircle from '../../icons/System/Filled/Check.svg?raw';\nimport svgInfoFilled from '../../icons/System/Filled/Info.svg?raw';\nimport svgHelp from '../../icons/System/Regular/Help.svg?raw';\nimport { Cre8Element } from '../cre8-element';\nimport '../icon/icon.js';\nimport '@a11y/focus-trap';\nimport styles from './modal.styles.js';\nimport '../../icons/System/Regular/Close.svg?raw';\n\n/**\n * Modal component should be used in all modal situations.\n * It is natuarally composable and can even have a custom header and remove the close button.\n * (note: adding `slot=\"header\"` will insert the given element into the header section of the modal,\n * same for `slot=\"footer\"` and no given slot name will inset it into the body)\n *\n * If it is desired to create a utility modal. Cre8Modal requires a status value (see props table below,\n * and a UtilityModalTitle since all utility modals have a cre8-heading)\n * @slot - The component content\n */\nexport class Cre8Modal extends Cre8Element {\n static styles = [styles];\n\n /**\n * Query the modal window\n */\n @query('.cre8-c-modal__window')\n _modalWindow: HTMLDivElement;\n\n /**\n * Is Active attribute\n */\n @property({ type: Boolean, reflect: true })\n isActive?: boolean;\n\n /**\n * Status Types\n * <cre8-text-passage size=\"sm\">\n * <ul>\n * <li>**default (no value)** renders a default modal</li>\n * <li>**error** renders an error modal</li>\n * <li>**warning** renders a warning modal</li>\n * <li>**success** renders a success modal</li>\n * <li>**info** renders an info modal</li>\n * <li>**help** renders an help modal</li>\n * </ul>\n * </cre8-text-passage>\n */\n @property()\n status?: 'error' | 'warning' | 'success' | 'info' | 'help';\n\n /**\n * Utility Modal Heading (String)\n */\n @property()\n utilityModalTitle: string;\n\n /**\n * Not dismissible modal\n */\n @property({ type: Boolean, reflect: true })\n notDismissible?: boolean;\n\n /**\n * Close Button Text\n */\n @property()\n closeButtonText: string = 'close';\n\n /**\n * Close Button Icon\n */\n @property()\n closeButtonIcon: string = 'close';\n\n /**\n * Modal Aria Label - This is required for accessibility and provides context of the entire modal!\n */\n @property()\n ariaLabel: string;\n\n /**\n * Handle keydown\n * 1) Close the modal when escape is hit when the user is focused within the modal\n */\n handleKeydown(e: KeyboardEvent) {\n if (e.code === 'Escape' && !this.notDismissible) {\n this.handleCloseModal(); /* 2 */\n }\n }\n\n /**\n * Handle on close\n * 1) On close, set the modal to not active and dispatch event telling the parent the modal was closed.\n */\n handleCloseModal() {\n this.isActive = false;\n this.dispatch({\n eventName: 'close-modal',\n detailObj: {\n isActive: this.isActive,\n },\n });\n }\n\n /**\n * Handle \"click outside\"\n * 1) onClick of the area around the modal window, close the modal.\n */\n\n handleOnClickOutside(e: Event) {\n const eventTarget = e.target as HTMLElement;\n if (this.isActive && this._modalWindow && eventTarget.classList.contains('cre8-c-modal') && !this.notDismissible) {\n this.handleCloseModal();\n }\n }\n\n /**\n * Lifecycle method to focus on modal\n * 1) If there is a changed property, and this.isActive === true, then focus on the modal window.\n * 2) Disable the body from scrolling behind while the modal is open.\n */\n\n updated(changedProperties: PropertyValues<this>) {\n if (this.isActive === true) {\n setTimeout(() => {\n this._modalWindow.focus();\n }, 200);\n } /* 1 */\n\n if (changedProperties.has('isActive')) {\n const body = document.querySelector('body');\n if (this.isActive) {\n body.style.overflow = 'hidden';\n } else {\n body.style.removeProperty('overflow');\n }\n } /* 2 */\n }\n\n /*\n * Maps modal icons and modal status variants to what the alt text of the related icon should be\n * see: (https://digital.#.com/patterns-and-Components/informational-display/alerts-and-notifications#query=alerts)\n * this provides the recommendated alt text of different statuses\n */\n mapStatusToIconModal = (status: string) => {\n switch (status) {\n case 'error':\n return html`<cre8-icon class=\"cre8-modal-icon\" svg=${svgError} aria-hidden='true'></cre8-icon>`;\n case 'success':\n return html`<cre8-icon class=\"cre8-modal-icon\" svg=${svgCheckCircle} aria-hidden='true'></cre8-icon>`;\n case 'warning':\n return html`<cre8-icon class=\"cre8-modal-icon\" svg=${svgWarningFilled} aria-hidden='true'></cre8-icon>`;\n case 'help':\n return html`<cre8-icon class=\"cre8-modal-icon\" svg=${svgHelp} aria-hidden='true'></cre8-icon>`;\n case 'info':\n return html`<cre8-icon class=\"cre8-modal-icon\" svg=${svgInfoFilled} aria-hidden='true'></cre8-icon>`;\n default:\n return null;\n }\n };\n\n /**\n * Lifecycle method on removal from the DOM\n * Removed body overflow and handle close (isActive set to false)\n */\n disconnectedCallback() {\n this.isActive = false;\n const body = document.querySelector('body');\n body.style.removeProperty('overflow');\n }\n\n render() {\n const componentClassNames = this.componentClassNames('cre8-c-modal', {\n 'cre8-is-active': this.isActive,\n 'cre8-c-modal--error': this.status === 'error',\n 'cre8-c-modal--warning': this.status === 'warning',\n 'cre8-c-modal--success': this.status === 'success',\n 'cre8-c-modal--info': this.status === 'info',\n 'cre8-c-modal--help': this.status === 'help',\n });\n\n return html`\n <div class=\"${componentClassNames}\" @click=\"${this.handleOnClickOutside}\" @keydown=${this.handleKeydown}>\n <focus-trap class=\"cre8-c-modal__focus-trap\" ?inactive=${!this.isActive}>\n <div class=\"cre8-c-modal__window\" role=\"dialog\" aria-label=${this.ariaLabel} tabindex=${this.isActive ? 0 : -1}>\n <div class=\"cre8-c-modal__header\">\n ${this.status\n ? html`<div class=\"cre8-c-modal__header-inner\">\n ${this.mapStatusToIconModal(this.status)}\n <cre8-heading type=\"title-large\" ?brandColor=${true}>${this.utilityModalTitle}</cre8-heading>\n </div>`\n : html`<slot name=\"header\"></slot>`}\n ${!this.notDismissible\n ? html`<cre8-button\n class=\"cre8-c-modal__close-button\"\n variant=\"tertiary\"\n text=\"${this.closeButtonText}\"\n ?hideText=${true}\n iconName=\"close\"\n iconPosition=\"after\"\n ?inverted=${!this.status}\n @click=${this.handleCloseModal}\n ></cre8-button>`\n : ''}\n </div>\n <div class=\"cre8-c-modal__body\">\n <slot></slot>\n </div>\n ${this.slotNotEmpty('footer') && html`<div class=\"cre8-c-modal__footer\"><slot name=\"footer\"></slot></div>`}\n </div>\n </focus-trap>\n </div>\n`;\n }\n}\n\nif (customElements.get('cre8-modal') === undefined) {\n customElements.define('cre8-modal', Cre8Modal);\n}\n\nexport interface CloseModalEvent extends CustomEvent<{ isActive: boolean }> {\n type: 'close-modal';\n currentTarget: Cre8Modal;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'cre8-modal': Cre8Modal;\n }\n}\n"]}
@@ -0,0 +1,4 @@
1
+ import { css } from 'lit';
2
+ const styles = css `*,::slotted(*),*:before,*:after{box-sizing:border-box}:root{--size-base-unit: 0.5rem}[dir=rtl]{--rtlTranslateX: 50%;--rtlGradientToRight: 270deg;--rtlRotate45Inverse: -45deg}:host{--cre8-z-index-1: 1;--cre8-z-index-50: 50;--cre8-z-index-100: 100;--cre8-z-index-200: 200;--cre8-z-index-1030: 1030;--cre8-anim-fade-quick: 0.35s;--cre8-anim-ease: ease}@keyframes fadeIn{100%{opacity:1}}@keyframes slideIn{100%{transform:translateX(0)}}@keyframes slideInFwd{100%{width:272px;height:272px}}@keyframes slideOutRight{100%{width:272px;height:272px}}@keyframes slideUp{100%{transform:translateY(0)}}@media(width >= 481px){@keyframes slideInFwd{100%{width:417px;height:417px}}@keyframes slideOutRight{100%{width:417px;height:417px}}}@media(width >= 48rem){@keyframes slideInFwd{100%{width:330px;height:330px}}@keyframes slideOutRight{100%{width:330px;height:330px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 60rem){@keyframes slideInFwd{100%{width:460px;height:460px}}@keyframes slideOutRight{100%{width:460px;height:460px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 75rem){@keyframes slideInFwd{100%{width:592px;height:591px}}@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 87.5rem){@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 120px))}}}@media(width >= 2200px){@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 592px))}}}span.ripple{position:absolute;border-radius:50%;transform:scale(0);animation:ripple 600ms linear;background-color:var(--ripple-bg-color)}@keyframes ripple{to{transform:scale(4);opacity:1}}:root{--size-base-unit: 0.5rem}[dir=rtl]{--rtlTranslateX: 50%;--rtlGradientToRight: 270deg;--rtlRotate45Inverse: -45deg}:host{display:block}.cre8-c-modal{position:fixed;height:100vh;width:100vw;top:0;left:0;display:none;justify-content:center;align-items:center;background:rgba(0,0,0,.25);z-index:1000}.cre8-c-modal.cre8-is-active{display:flex;visibility:visible;opacity:1}.cre8-c-modal__focus-trap{display:contents}.cre8-c-modal__window{display:flex;flex-direction:column;flex-shrink:0;position:fixed;background:var(--cre8-color-bg-default);width:34rem;max-width:100%;border-radius:var(--cre8-border-radius-container);overflow:hidden;overflow-y:auto}@media all and (max-width: 768px){.cre8-c-modal__window{position:inherit;height:100%;width:100%}}.cre8-c-modal__window:focus-visible{outline:var(--cre8-border-width-focus) solid var(--cre8-color-border-active-outline);outline-offset:0.125rem}.cre8-c-modal__header{display:flex;padding:2rem 3rem 1rem;align-items:center}.cre8-c-modal--error .cre8-c-modal__header .cre8-modal-icon{color:var(--cre8-color-content-error-icon)}.cre8-c-modal--warning .cre8-c-modal__header .cre8-modal-icon{color:var(--cre8-color-content-warning-icon)}.cre8-c-modal--success .cre8-c-modal__header .cre8-modal-icon{color:var(--cre8-color-content-success-icon)}.cre8-c-modal--info .cre8-c-modal__header .cre8-modal-icon,.cre8-c-modal--help .cre8-c-modal__header .cre8-modal-icon{color:var(--cre8-color-content-info-icon)}.cre8-c-modal__header-inner{display:flex;align-items:center;gap:1rem}.cre8-c-modal__header-inner cre8-icon .cre8-modal-icon{height:2rem;width:2rem}.cre8-c-modal__body{max-height:240px;overflow:auto;padding:0 3rem}@media all and (max-width: 768px){.cre8-c-modal__body{height:100%;max-height:max-content}}.cre8-c-modal__footer{padding:1.5rem 3rem calc(100vh - 95dvh)}.cre8-c-modal__close-button{margin-left:auto}`;
3
+ export default styles;
4
+ //# sourceMappingURL=modal.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"modal.styles.js","sourceRoot":"","sources":["../../../components/modal/modal.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,MAAM,MAAM,GAAG,GAAG,CAAA,m9GAAm9G,CAAC;AACt+G,eAAe,MAAM,CAAC","sourcesContent":["import { css } from 'lit';\nconst styles = css`*,::slotted(*),*:before,*:after{box-sizing:border-box}:root{--size-base-unit: 0.5rem}[dir=rtl]{--rtlTranslateX: 50%;--rtlGradientToRight: 270deg;--rtlRotate45Inverse: -45deg}:host{--cre8-z-index-1: 1;--cre8-z-index-50: 50;--cre8-z-index-100: 100;--cre8-z-index-200: 200;--cre8-z-index-1030: 1030;--cre8-anim-fade-quick: 0.35s;--cre8-anim-ease: ease}@keyframes fadeIn{100%{opacity:1}}@keyframes slideIn{100%{transform:translateX(0)}}@keyframes slideInFwd{100%{width:272px;height:272px}}@keyframes slideOutRight{100%{width:272px;height:272px}}@keyframes slideUp{100%{transform:translateY(0)}}@media(width >= 481px){@keyframes slideInFwd{100%{width:417px;height:417px}}@keyframes slideOutRight{100%{width:417px;height:417px}}}@media(width >= 48rem){@keyframes slideInFwd{100%{width:330px;height:330px}}@keyframes slideOutRight{100%{width:330px;height:330px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 60rem){@keyframes slideInFwd{100%{width:460px;height:460px}}@keyframes slideOutRight{100%{width:460px;height:460px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 75rem){@keyframes slideInFwd{100%{width:592px;height:591px}}@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 87.5rem){@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 120px))}}}@media(width >= 2200px){@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 592px))}}}span.ripple{position:absolute;border-radius:50%;transform:scale(0);animation:ripple 600ms linear;background-color:var(--ripple-bg-color)}@keyframes ripple{to{transform:scale(4);opacity:1}}:root{--size-base-unit: 0.5rem}[dir=rtl]{--rtlTranslateX: 50%;--rtlGradientToRight: 270deg;--rtlRotate45Inverse: -45deg}:host{display:block}.cre8-c-modal{position:fixed;height:100vh;width:100vw;top:0;left:0;display:none;justify-content:center;align-items:center;background:rgba(0,0,0,.25);z-index:1000}.cre8-c-modal.cre8-is-active{display:flex;visibility:visible;opacity:1}.cre8-c-modal__focus-trap{display:contents}.cre8-c-modal__window{display:flex;flex-direction:column;flex-shrink:0;position:fixed;background:var(--cre8-color-bg-default);width:34rem;max-width:100%;border-radius:var(--cre8-border-radius-container);overflow:hidden;overflow-y:auto}@media all and (max-width: 768px){.cre8-c-modal__window{position:inherit;height:100%;width:100%}}.cre8-c-modal__window:focus-visible{outline:var(--cre8-border-width-focus) solid var(--cre8-color-border-active-outline);outline-offset:0.125rem}.cre8-c-modal__header{display:flex;padding:2rem 3rem 1rem;align-items:center}.cre8-c-modal--error .cre8-c-modal__header .cre8-modal-icon{color:var(--cre8-color-content-error-icon)}.cre8-c-modal--warning .cre8-c-modal__header .cre8-modal-icon{color:var(--cre8-color-content-warning-icon)}.cre8-c-modal--success .cre8-c-modal__header .cre8-modal-icon{color:var(--cre8-color-content-success-icon)}.cre8-c-modal--info .cre8-c-modal__header .cre8-modal-icon,.cre8-c-modal--help .cre8-c-modal__header .cre8-modal-icon{color:var(--cre8-color-content-info-icon)}.cre8-c-modal__header-inner{display:flex;align-items:center;gap:1rem}.cre8-c-modal__header-inner cre8-icon .cre8-modal-icon{height:2rem;width:2rem}.cre8-c-modal__body{max-height:240px;overflow:auto;padding:0 3rem}@media all and (max-width: 768px){.cre8-c-modal__body{height:100%;max-height:max-content}}.cre8-c-modal__footer{padding:1.5rem 3rem calc(100vh - 95dvh)}.cre8-c-modal__close-button{margin-left:auto}`;\nexport default styles;\n"]}