@tmorrow/cre8-wc 1.1.2 → 1.1.4

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 (666) 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/fonts.css +31 -0
  382. package/lib/design-tokens/brands/blue/css/tokens_blue.css +248 -0
  383. package/lib/design-tokens/brands/blue/css/tokens_blue.module.js +737 -0
  384. package/lib/design-tokens/brands/blue/css/tokens_blue.module.js.map +1 -0
  385. package/lib/design-tokens/brands/blue/css/tokens_brand.css +492 -0
  386. package/lib/design-tokens/brands/bolt/tokens_bolt.theme.js +756 -0
  387. package/lib/design-tokens/brands/bolt/tokens_bolt.theme.js.map +1 -0
  388. package/lib/design-tokens/brands/cre8/css/fonts.css +35 -0
  389. package/lib/design-tokens/brands/cre8/css/tokens_brand.css +494 -0
  390. package/lib/design-tokens/brands/cre8/css/tokens_cre8.css +767 -0
  391. package/lib/design-tokens/brands/cre8/css/tokens_cre8.module.js +771 -0
  392. package/lib/design-tokens/brands/cre8/css/tokens_cre8.module.js.map +1 -0
  393. package/lib/design-tokens/brands/cre8-a2ui/css/fonts.css +35 -0
  394. package/lib/design-tokens/brands/cre8-a2ui/css/tokens_brand.css +494 -0
  395. package/lib/design-tokens/brands/cre8-a2ui/css/tokens_cre8-a2ui.css +248 -0
  396. package/lib/design-tokens/brands/cre8-a2ui/css/tokens_cre8-a2ui.module.js +772 -0
  397. package/lib/design-tokens/brands/cre8-a2ui/css/tokens_cre8-a2ui.module.js.map +1 -0
  398. package/lib/design-tokens/brands/cre8-legacy/css/fonts.css +47 -0
  399. package/lib/design-tokens/brands/cre8-legacy/css/tokens_brand.css +464 -0
  400. package/lib/design-tokens/brands/cre8-legacy/css/tokens_cre8-legacy.css +0 -0
  401. package/lib/design-tokens/brands/cre8-legacy/css/tokens_cre8-legacy.module.js +737 -0
  402. package/lib/design-tokens/brands/cre8-legacy/css/tokens_cre8-legacy.module.js.map +1 -0
  403. package/lib/design-tokens/brands/femmecubator/css/fonts.css +35 -0
  404. package/lib/design-tokens/brands/femmecubator/css/tokens_femmecubator2.module.js +983 -0
  405. package/lib/design-tokens/brands/femmecubator/css/tokens_femmecubator2.module.js.map +1 -0
  406. package/lib/design-tokens/brands/legacy/css/fonts.css +26 -0
  407. package/lib/design-tokens/brands/legacy/css/tokens_brand.css +491 -0
  408. package/lib/design-tokens/brands/legacy/css/tokens_legacy.css +250 -0
  409. package/lib/design-tokens/brands/legacy/css/tokens_legacy.module.js +737 -0
  410. package/lib/design-tokens/brands/legacy/css/tokens_legacy.module.js.map +1 -0
  411. package/lib/design-tokens/brands/marketing/css/fonts.css +31 -0
  412. package/lib/design-tokens/brands/marketing/css/tokens_brand.css +502 -0
  413. package/lib/design-tokens/brands/marketing/css/tokens_marketing.module.js +736 -0
  414. package/lib/design-tokens/brands/marketing/css/tokens_marketing.module.js.map +1 -0
  415. package/lib/design-tokens/brands/minimalist/css/fonts.css +26 -0
  416. package/lib/design-tokens/brands/minimalist/css/tokens_brand.css +492 -0
  417. package/lib/design-tokens/brands/minimalist/css/tokens_minimalist.css +736 -0
  418. package/lib/design-tokens/brands/minimalist/css/tokens_minimalist.module.js +737 -0
  419. package/lib/design-tokens/brands/minimalist/css/tokens_minimalist.module.js.map +1 -0
  420. package/lib/design-tokens/brands/prisma/figma-tokens.css +339 -0
  421. package/lib/design-tokens/brands/prisma/tokens_prisma.module.js +771 -0
  422. package/lib/design-tokens/brands/prisma/tokens_prisma.module.js.map +1 -0
  423. package/lib/design-tokens/brands/starbucks/fonts.css +26 -0
  424. package/lib/design-tokens/brands/starbucks/tokens.module.js +552 -0
  425. package/lib/design-tokens/brands/starbucks/tokens.module.js.map +1 -0
  426. package/lib/design-tokens/brands/starbucks/tokens_starbucks.module.js +776 -0
  427. package/lib/design-tokens/brands/starbucks/tokens_starbucks.module.js.map +1 -0
  428. package/lib/design-tokens/brands/tmorrow/css/tokens_brand.css +104 -0
  429. package/lib/design-tokens/brands/tmorrow/css/tokens_tmorrow-frost.css +222 -0
  430. package/lib/design-tokens/brands/tmorrow/css/tokens_tmorrow-neon.css +218 -0
  431. package/lib/design-tokens/capitalone/fonts.css +26 -0
  432. package/lib/design-tokens/capitalone/overrides.css +33 -0
  433. package/lib/design-tokens/capitalone/tokens.module.css +532 -0
  434. package/lib/design-tokens/core/scss/abstracts/functions.css +0 -0
  435. package/lib/design-tokens/core/scss/theming/animation.css +1 -0
  436. package/lib/design-tokens/core/scss/theming/body.css +1 -0
  437. package/lib/design-tokens/core/scss/theming/breakpoints.css +0 -0
  438. package/lib/design-tokens/core/scss/theming/component.css +1 -0
  439. package/lib/design-tokens/core/scss/theming/display.css +1 -0
  440. package/lib/design-tokens/core/scss/theming/head.css +1 -0
  441. package/lib/design-tokens/core/scss/theming/head.module.js +6 -0
  442. package/lib/design-tokens/core/scss/theming/head.module.js.map +1 -0
  443. package/lib/design-tokens/core/scss/theming/spacing.css +1 -0
  444. package/lib/design-tokens/core/scss/theming/typography-usage.css +0 -0
  445. package/lib/design-tokens/core/scss/theming/variables.css +1 -0
  446. package/lib/design-tokens/core/scss/theming/visibility.css +1 -0
  447. package/lib/design-tokens/core/scss/utilities/animation.css +1 -0
  448. package/lib/design-tokens/core/scss/utilities/colors.css +1 -0
  449. package/lib/design-tokens/core/scss/utilities/display.css +1 -0
  450. package/lib/design-tokens/femmecubator/equity.css +142 -0
  451. package/lib/design-tokens/femmecubator/fonts.css +35 -0
  452. package/lib/design-tokens/femmecubator/tokens_brand.css +146 -0
  453. package/lib/design-tokens/femmecubator/tokens_femmecubator.module.css +247 -0
  454. package/lib/design-tokens/figma-tokens.css +0 -0
  455. package/lib/design-tokens/mcdonalds/tokens.module.css +58 -0
  456. package/lib/design-tokens/target/fonts.css +26 -0
  457. package/lib/design-tokens/target/tokens.module.css +738 -0
  458. package/lib/design-tokens/tokens_netflix.theme.js +806 -0
  459. package/lib/design-tokens/tokens_netflix.theme.js.map +1 -0
  460. package/lib/directives/if-truthy.js +24 -0
  461. package/lib/directives/if-truthy.js.map +1 -0
  462. package/lib/directives/spread.js +29 -0
  463. package/lib/directives/spread.js.map +1 -0
  464. package/lib/index.js +84 -168
  465. package/lib/index.js.map +1 -0
  466. package/lib/scripts/convert-scss-to-ts.js +25 -0
  467. package/lib/scripts/convert-scss-to-ts.js.map +1 -0
  468. package/lib/scripts/extract-tokens.js +120 -0
  469. package/lib/scripts/extract-tokens.js.map +1 -0
  470. package/lib/scripts/generate-react-wrappers.js +229 -0
  471. package/lib/scripts/generate-react-wrappers.js.map +1 -0
  472. package/lib/scripts/generateWesparkleThemes.js +52 -0
  473. package/lib/scripts/generateWesparkleThemes.js.map +1 -0
  474. package/lib/toBeAccessible.js +18 -0
  475. package/lib/toBeAccessible.js.map +1 -0
  476. package/lib/utilities/is-mobile.js +10 -0
  477. package/lib/utilities/is-mobile.js.map +1 -0
  478. package/lib/utilities/story-helpers.js +14 -0
  479. package/lib/utilities/story-helpers.js.map +1 -0
  480. package/lib/vite.config.cdn.js +85 -0
  481. package/lib/vite.config.cdn.js.map +1 -0
  482. package/lib/vite.config.js +156 -0
  483. package/lib/vite.config.js.map +1 -0
  484. package/package.json +8 -9
  485. package/lib/design-tokens/brands copy/blue/_base.scss +0 -142
  486. package/lib/design-tokens/brands copy/blue/badge.scss +0 -5
  487. package/lib/design-tokens/brands copy/blue/bg.scss +0 -35
  488. package/lib/design-tokens/brands copy/blue/border-style.scss +0 -5
  489. package/lib/design-tokens/brands copy/blue/border.scss +0 -21
  490. package/lib/design-tokens/brands copy/blue/borderRadius.scss +0 -15
  491. package/lib/design-tokens/brands copy/blue/borderWidth.scss +0 -11
  492. package/lib/design-tokens/brands copy/blue/breakpoint.scss +0 -9
  493. package/lib/design-tokens/brands copy/blue/button.scss +0 -225
  494. package/lib/design-tokens/brands copy/blue/content.scss +0 -29
  495. package/lib/design-tokens/brands copy/blue/css/tokens_blue.module.d.ts +0 -3
  496. package/lib/design-tokens/brands copy/blue/css/tokens_blue.module.d.ts.map +0 -1
  497. package/lib/design-tokens/brands copy/blue/desktop-menu.scss +0 -5
  498. package/lib/design-tokens/brands copy/blue/fontFamilies.scss +0 -5
  499. package/lib/design-tokens/brands copy/blue/fontSize.scss +0 -17
  500. package/lib/design-tokens/brands copy/blue/fontWeights.scss +0 -7
  501. package/lib/design-tokens/brands copy/blue/footer.scss +0 -9
  502. package/lib/design-tokens/brands copy/blue/header.scss +0 -81
  503. package/lib/design-tokens/brands copy/blue/icon-size.scss +0 -6
  504. package/lib/design-tokens/brands copy/blue/letterSpacing.scss +0 -9
  505. package/lib/design-tokens/brands copy/blue/lineHeights.scss +0 -15
  506. package/lib/design-tokens/brands copy/blue/link.scss +0 -4
  507. package/lib/design-tokens/brands copy/blue/paragraphIndent.scss +0 -4
  508. package/lib/design-tokens/brands copy/blue/paragraphSpacing.scss +0 -4
  509. package/lib/design-tokens/brands copy/blue/progress-meter.scss +0 -4
  510. package/lib/design-tokens/brands copy/blue/shadow.scss +0 -8
  511. package/lib/design-tokens/brands copy/blue/spacing.scss +0 -21
  512. package/lib/design-tokens/brands copy/blue/textCase.scss +0 -5
  513. package/lib/design-tokens/brands copy/blue/textDecoration.scss +0 -5
  514. package/lib/design-tokens/brands copy/blue/tokens-all-blue.scss +0 -628
  515. package/lib/design-tokens/brands copy/blue/tokens-brand.scss +0 -31
  516. package/lib/design-tokens/brands copy/blue-v1/_base.scss +0 -76
  517. package/lib/design-tokens/brands copy/blue-v1/badge.scss +0 -5
  518. package/lib/design-tokens/brands copy/blue-v1/bg.scss +0 -34
  519. package/lib/design-tokens/brands copy/blue-v1/border-style.scss +0 -5
  520. package/lib/design-tokens/brands copy/blue-v1/border.scss +0 -21
  521. package/lib/design-tokens/brands copy/blue-v1/borderRadius.scss +0 -15
  522. package/lib/design-tokens/brands copy/blue-v1/borderWidth.scss +0 -11
  523. package/lib/design-tokens/brands copy/blue-v1/breakpoint.scss +0 -9
  524. package/lib/design-tokens/brands copy/blue-v1/button.scss +0 -199
  525. package/lib/design-tokens/brands copy/blue-v1/content.scss +0 -29
  526. package/lib/design-tokens/brands copy/blue-v1/desktop-menu.scss +0 -5
  527. package/lib/design-tokens/brands copy/blue-v1/fontFamilies.scss +0 -5
  528. package/lib/design-tokens/brands copy/blue-v1/fontSize.scss +0 -17
  529. package/lib/design-tokens/brands copy/blue-v1/fontWeights.scss +0 -9
  530. package/lib/design-tokens/brands copy/blue-v1/footer.scss +0 -9
  531. package/lib/design-tokens/brands copy/blue-v1/header.scss +0 -79
  532. package/lib/design-tokens/brands copy/blue-v1/icon-size.scss +0 -6
  533. package/lib/design-tokens/brands copy/blue-v1/letterSpacing.scss +0 -9
  534. package/lib/design-tokens/brands copy/blue-v1/lineHeights.scss +0 -15
  535. package/lib/design-tokens/brands copy/blue-v1/link.scss +0 -4
  536. package/lib/design-tokens/brands copy/blue-v1/paragraphIndent.scss +0 -4
  537. package/lib/design-tokens/brands copy/blue-v1/paragraphSpacing.scss +0 -4
  538. package/lib/design-tokens/brands copy/blue-v1/shadow.scss +0 -8
  539. package/lib/design-tokens/brands copy/blue-v1/spacing.scss +0 -21
  540. package/lib/design-tokens/brands copy/blue-v1/textCase.scss +0 -5
  541. package/lib/design-tokens/brands copy/blue-v1/textDecoration.scss +0 -5
  542. package/lib/design-tokens/brands copy/blue-v1/tokens-all-blue-v1.scss +0 -534
  543. package/lib/design-tokens/brands copy/blue-v1/tokens-brand.scss +0 -30
  544. package/lib/design-tokens/brands copy/cre8/_base.scss +0 -157
  545. package/lib/design-tokens/brands copy/cre8/badge.scss +0 -5
  546. package/lib/design-tokens/brands copy/cre8/bg.scss +0 -34
  547. package/lib/design-tokens/brands copy/cre8/border-style.scss +0 -5
  548. package/lib/design-tokens/brands copy/cre8/border.scss +0 -18
  549. package/lib/design-tokens/brands copy/cre8/borderRadius.scss +0 -15
  550. package/lib/design-tokens/brands copy/cre8/borderWidth.scss +0 -11
  551. package/lib/design-tokens/brands copy/cre8/breakpoint.scss +0 -9
  552. package/lib/design-tokens/brands copy/cre8/button.scss +0 -211
  553. package/lib/design-tokens/brands copy/cre8/content.scss +0 -29
  554. package/lib/design-tokens/brands copy/cre8/desktop-menu.scss +0 -5
  555. package/lib/design-tokens/brands copy/cre8/fontFamilies.scss +0 -4
  556. package/lib/design-tokens/brands copy/cre8/fontSize.scss +0 -17
  557. package/lib/design-tokens/brands copy/cre8/fontWeights.scss +0 -7
  558. package/lib/design-tokens/brands copy/cre8/footer.scss +0 -8
  559. package/lib/design-tokens/brands copy/cre8/header.scss +0 -81
  560. package/lib/design-tokens/brands copy/cre8/icon-size.scss +0 -6
  561. package/lib/design-tokens/brands copy/cre8/letterSpacing.scss +0 -10
  562. package/lib/design-tokens/brands copy/cre8/lineHeights.scss +0 -22
  563. package/lib/design-tokens/brands copy/cre8/link.scss +0 -4
  564. package/lib/design-tokens/brands copy/cre8/paragraphIndent.scss +0 -4
  565. package/lib/design-tokens/brands copy/cre8/paragraphSpacing.scss +0 -4
  566. package/lib/design-tokens/brands copy/cre8/progress-meter.scss +0 -4
  567. package/lib/design-tokens/brands copy/cre8/shadow.scss +0 -8
  568. package/lib/design-tokens/brands copy/cre8/spacing.scss +0 -21
  569. package/lib/design-tokens/brands copy/cre8/textCase.scss +0 -5
  570. package/lib/design-tokens/brands copy/cre8/textDecoration.scss +0 -5
  571. package/lib/design-tokens/brands copy/cre8/tokens-all-cre8.scss +0 -631
  572. package/lib/design-tokens/brands copy/cre8/tokens-brand.scss +0 -31
  573. package/lib/design-tokens/brands copy/femmecubator/base.scss +0 -64
  574. package/lib/design-tokens/brands copy/femmecubator/border.scss +0 -15
  575. package/lib/design-tokens/brands copy/femmecubator/color.scss +0 -56
  576. package/lib/design-tokens/brands copy/femmecubator/spacing.scss +0 -13
  577. package/lib/design-tokens/brands copy/femmecubator/tokens-all-femmecubator.scss +0 -139
  578. package/lib/design-tokens/brands copy/femmecubator/tokens-brand.scss +0 -8
  579. package/lib/design-tokens/brands copy/legacy/_base.scss +0 -103
  580. package/lib/design-tokens/brands copy/legacy/badge.scss +0 -5
  581. package/lib/design-tokens/brands copy/legacy/bg.scss +0 -34
  582. package/lib/design-tokens/brands copy/legacy/border-style.scss +0 -5
  583. package/lib/design-tokens/brands copy/legacy/border.scss +0 -17
  584. package/lib/design-tokens/brands copy/legacy/borderRadius.scss +0 -15
  585. package/lib/design-tokens/brands copy/legacy/borderWidth.scss +0 -11
  586. package/lib/design-tokens/brands copy/legacy/breakpoint.scss +0 -9
  587. package/lib/design-tokens/brands copy/legacy/button.scss +0 -225
  588. package/lib/design-tokens/brands copy/legacy/content.scss +0 -29
  589. package/lib/design-tokens/brands copy/legacy/desktop-menu.scss +0 -5
  590. package/lib/design-tokens/brands copy/legacy/fontFamilies.scss +0 -4
  591. package/lib/design-tokens/brands copy/legacy/fontSize.scss +0 -17
  592. package/lib/design-tokens/brands copy/legacy/fontWeights.scss +0 -10
  593. package/lib/design-tokens/brands copy/legacy/footer.scss +0 -9
  594. package/lib/design-tokens/brands copy/legacy/header.scss +0 -81
  595. package/lib/design-tokens/brands copy/legacy/icon-size.scss +0 -6
  596. package/lib/design-tokens/brands copy/legacy/letterSpacing.scss +0 -9
  597. package/lib/design-tokens/brands copy/legacy/lineHeights.scss +0 -19
  598. package/lib/design-tokens/brands copy/legacy/paragraphIndent.scss +0 -4
  599. package/lib/design-tokens/brands copy/legacy/paragraphSpacing.scss +0 -4
  600. package/lib/design-tokens/brands copy/legacy/progress-meter.scss +0 -4
  601. package/lib/design-tokens/brands copy/legacy/shadow.scss +0 -8
  602. package/lib/design-tokens/brands copy/legacy/spacing.scss +0 -20
  603. package/lib/design-tokens/brands copy/legacy/textCase.scss +0 -5
  604. package/lib/design-tokens/brands copy/legacy/textDecoration.scss +0 -5
  605. package/lib/design-tokens/brands copy/legacy/tokens-all-legacy.scss +0 -588
  606. package/lib/design-tokens/brands copy/legacy/tokens-brand.scss +0 -30
  607. package/lib/design-tokens/brands copy/marketing/_base.scss +0 -137
  608. package/lib/design-tokens/brands copy/marketing/asset.scss +0 -7
  609. package/lib/design-tokens/brands copy/marketing/badge.scss +0 -5
  610. package/lib/design-tokens/brands copy/marketing/bg.scss +0 -35
  611. package/lib/design-tokens/brands copy/marketing/border-style.scss +0 -5
  612. package/lib/design-tokens/brands copy/marketing/border.scss +0 -21
  613. package/lib/design-tokens/brands copy/marketing/borderRadius.scss +0 -15
  614. package/lib/design-tokens/brands copy/marketing/borderWidth.scss +0 -11
  615. package/lib/design-tokens/brands copy/marketing/breakpoint.scss +0 -9
  616. package/lib/design-tokens/brands copy/marketing/button.scss +0 -225
  617. package/lib/design-tokens/brands copy/marketing/content.scss +0 -29
  618. package/lib/design-tokens/brands copy/marketing/desktop-menu.scss +0 -5
  619. package/lib/design-tokens/brands copy/marketing/fontFamilies.scss +0 -4
  620. package/lib/design-tokens/brands copy/marketing/fontSize.scss +0 -17
  621. package/lib/design-tokens/brands copy/marketing/fontWeights.scss +0 -7
  622. package/lib/design-tokens/brands copy/marketing/footer.scss +0 -9
  623. package/lib/design-tokens/brands copy/marketing/header.scss +0 -81
  624. package/lib/design-tokens/brands copy/marketing/icon-size.scss +0 -6
  625. package/lib/design-tokens/brands copy/marketing/letterSpacing.scss +0 -9
  626. package/lib/design-tokens/brands copy/marketing/lineHeights.scss +0 -22
  627. package/lib/design-tokens/brands copy/marketing/link.scss +0 -4
  628. package/lib/design-tokens/brands copy/marketing/paragraphIndent.scss +0 -4
  629. package/lib/design-tokens/brands copy/marketing/paragraphSpacing.scss +0 -4
  630. package/lib/design-tokens/brands copy/marketing/progress-meter.scss +0 -4
  631. package/lib/design-tokens/brands copy/marketing/shadow.scss +0 -8
  632. package/lib/design-tokens/brands copy/marketing/spacing.scss +0 -21
  633. package/lib/design-tokens/brands copy/marketing/textCase.scss +0 -5
  634. package/lib/design-tokens/brands copy/marketing/textDecoration.scss +0 -5
  635. package/lib/design-tokens/brands copy/marketing/tokens-all-marketing.scss +0 -633
  636. package/lib/design-tokens/brands copy/marketing/tokens-brand.scss +0 -32
  637. package/lib/design-tokens/brands copy/minimalist/_base.scss +0 -81
  638. package/lib/design-tokens/brands copy/minimalist/asset.scss +0 -6
  639. package/lib/design-tokens/brands copy/minimalist/badge.scss +0 -5
  640. package/lib/design-tokens/brands copy/minimalist/bg.scss +0 -34
  641. package/lib/design-tokens/brands copy/minimalist/border-style.scss +0 -5
  642. package/lib/design-tokens/brands copy/minimalist/border.scss +0 -17
  643. package/lib/design-tokens/brands copy/minimalist/borderRadius.scss +0 -15
  644. package/lib/design-tokens/brands copy/minimalist/borderWidth.scss +0 -11
  645. package/lib/design-tokens/brands copy/minimalist/breakpoint.scss +0 -9
  646. package/lib/design-tokens/brands copy/minimalist/button.scss +0 -225
  647. package/lib/design-tokens/brands copy/minimalist/content.scss +0 -29
  648. package/lib/design-tokens/brands copy/minimalist/desktop-menu.scss +0 -5
  649. package/lib/design-tokens/brands copy/minimalist/fontFamilies.scss +0 -4
  650. package/lib/design-tokens/brands copy/minimalist/fontFamily.scss +0 -4
  651. package/lib/design-tokens/brands copy/minimalist/fontSize.scss +0 -17
  652. package/lib/design-tokens/brands copy/minimalist/fontWeights.scss +0 -6
  653. package/lib/design-tokens/brands copy/minimalist/footer.scss +0 -9
  654. package/lib/design-tokens/brands copy/minimalist/header.scss +0 -81
  655. package/lib/design-tokens/brands copy/minimalist/icon-size.scss +0 -6
  656. package/lib/design-tokens/brands copy/minimalist/letterSpacing.scss +0 -9
  657. package/lib/design-tokens/brands copy/minimalist/lineHeights.scss +0 -20
  658. package/lib/design-tokens/brands copy/minimalist/paragraphIndent.scss +0 -4
  659. package/lib/design-tokens/brands copy/minimalist/paragraphSpacing.scss +0 -4
  660. package/lib/design-tokens/brands copy/minimalist/progress-meter.scss +0 -4
  661. package/lib/design-tokens/brands copy/minimalist/shadow.scss +0 -8
  662. package/lib/design-tokens/brands copy/minimalist/spacing.scss +0 -20
  663. package/lib/design-tokens/brands copy/minimalist/textCase.scss +0 -5
  664. package/lib/design-tokens/brands copy/minimalist/textDecoration.scss +0 -5
  665. package/lib/design-tokens/brands copy/minimalist/tokens-all-minimalist.scss +0 -567
  666. package/lib/design-tokens/brands copy/minimalist/tokens-brand.scss +0 -32
@@ -1,103 +1,181 @@
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
- import { property as i, queryAll as y } from "lit/decorators.js";
5
- import { nanoid as d } from "nanoid";
6
- import "../field-note/field-note.js";
7
- import { Cre8FormElement as v } from "../cre8-form-element.js";
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;
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;
13
6
  };
14
- const n = class n extends v {
15
- constructor() {
16
- super(...arguments), this.type = "select", this.items = [], this.label = "Label", this.required = !1;
17
- }
18
- /**
19
- * Initialize aria attributes
7
+ import svgCaretUp from '/Users/tylersmbp/Projects/cre8-web-components/packages/cre8-wc/icons/System/Regular/Caret_Up.svg?raw';
8
+ import { html, nothing, } from 'lit';
9
+ import { ifDefined } from 'lit-html/directives/if-defined.js';
10
+ import { property, queryAll } from 'lit/decorators.js';
11
+ import { nanoid } from 'nanoid';
12
+ import '../field-note/field-note';
13
+ import styles from './select.styles.js';
14
+ import Cre8FormElement from '../cre8-form-element.js';
15
+ /**
16
+ * The Select control is designed and built to be used for selecting between choices in a form.
17
+ * It is not a Dropdown control which is generally used for displaying lists of choices
18
+ * that act as links or actions, like filter options.
19
+ *
20
+ * Consider the use of a Select control carefully.
21
+ * When you have less than 5 options for the user to choose from,
22
+ * Radio or Checkbox inputs may be a better choice to display all of the options at once.
23
+ * Users have to slow down to scan a list with more than 15 options,
24
+ * so using an option group to give the options hierarchy may help users find their choice faster.
25
+ * Alternately, a text input field might be a more appropriate control to use when there are too many options,
26
+ * especially when used with typeahead/auto-complete.
27
+ *
28
+ * ## How to use
29
+ * 1. The collapsed default state always shows a default placeholder value or a selected value.
30
+ * 2. Sort list items in a logical order, such as grouping highly related options together,
31
+ * placing most common options first, using alphabetical or numeric orders or dates in chronological order.
32
+ * 3. A list that includes 6+ items should show a scrollbar.
33
+ * 4. Users should be able to use a keystroke to quickly jump
34
+ * to selecting an option that begins with the entered letter.
35
+ * 5. Utilize appropriate native controls for when a user is on a mobile device rather than our custom Select.
36
+ * 6. Adhere to our common form field conventions and always include a Label,
37
+ * provide short and clear error messages in context, avoid using the Read-only
38
+ * and Disabled states as much as possible, and utilize the info/formatting tip
39
+ * or helpful link rather than placeholder text.
40
+ *
41
+ * @slot fieldNote - Container for optional field note content
42
+ */
43
+ export class Cre8Select extends Cre8FormElement {
44
+ constructor() {
45
+ super(...arguments);
46
+ this.type = 'select';
47
+ /**
48
+ * A mix of Cre8SelectOption and Cre8SelectOptionGroup definitions:
49
+ * - Cre8SelectOption
50
+ * - label: option label text - `string`
51
+ * - value: option value - `number | string`
52
+ * - Cre8SelectOptionGroup
53
+ * - optGroupLabel: optgroup label text - `string`
54
+ * - options: Array of multiple Cre8SelectOption items - `Cre8SelectOption[]`
55
+ */
56
+ this.items = [];
57
+ /**
58
+ * The required label that appears above the select
59
+ * @attr {string}
60
+ */
61
+ this.label = 'Label';
62
+ /**
63
+ * The required attribute on the select
64
+ * @attr {boolean}
65
+ */
66
+ this.required = false;
67
+ }
68
+ /**
69
+ * Initialize aria attributes
70
+ */
71
+ _initializeAria() {
72
+ this.fieldId = this.fieldId || nanoid();
73
+ if (this.fieldNote || this.slotNotEmpty('fieldNote')) {
74
+ this.ariaDescribedBy = this.ariaDescribedBy || nanoid();
75
+ }
76
+ if (this.successNote || this.errorNote) {
77
+ this.validationAriaDescribedBy = this.validationAriaDescribedBy || nanoid();
78
+ }
79
+ }
80
+ /**
81
+ * Aria describedby string based on field notes and error/success notes
82
+ * 1) If both validationAriaDescribedBy (error/success note) and field note exists,
83
+ * render both in the input's `aria-describedby` attribute
84
+ * 2) Otherwise, if only validationAriaDescribedBy exists, then render only that as
85
+ * the `aria-describedby` attribute (input without field note initially, but then error/success is added).
86
+ * 3) Otherwise, render only the `ariaDescribedBy` property (field note only)
87
+ */
88
+ _fieldNoteAria() {
89
+ if (this.validationAriaDescribedBy && this.ariaDescribedBy) {
90
+ return `${this.ariaDescribedBy} ${this.validationAriaDescribedBy}`; /* 1 */
91
+ }
92
+ if (this.validationAriaDescribedBy && (!this.ariaDescribedBy)) {
93
+ return this.validationAriaDescribedBy; /* 2 */
94
+ }
95
+ return this.ariaDescribedBy; /* 3 */
96
+ }
97
+ connectedCallback() {
98
+ super.connectedCallback();
99
+ this.field.setAttribute('name', this.name ?? '');
100
+ }
101
+ disconnectedCallback() {
102
+ super.disconnectedCallback();
103
+ }
104
+ /**
105
+ * First updatedLifecycle
106
+ * 1) Get the option in the items array with selected set to true. Set that as the selected item
107
+ * 2) The default value is set to the `option` with the `selected` if one exists. Otherwise, use the
108
+ * select the first item value like the native select.
109
+ */
110
+ firstUpdated() {
111
+ super.firstUpdated();
112
+ [...this._selectOptions].forEach((item) => {
113
+ if (item.selected === true) {
114
+ this.selectedItem = item.value; /* 1 */
115
+ }
116
+ });
117
+ this.defaultValue = this.selectedItem ? this.selectedItem : (this._selectOptions[0].value ?? 'Select An Option'); /* 2 */
118
+ this._setFormData();
119
+ this._initializeAria();
120
+ this.updateField();
121
+ }
122
+ /**
123
+ * Set form data
124
+ * 1) Set the element internals to the selected item value if it exists,
125
+ * otherwise the default selected item is the first one
20
126
  */
21
- _initializeAria() {
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());
23
- }
24
- /**
25
- * Aria describedby string based on field notes and error/success notes
26
- * 1) If both validationAriaDescribedBy (error/success note) and field note exists,
27
- * render both in the input's `aria-describedby` attribute
28
- * 2) Otherwise, if only validationAriaDescribedBy exists, then render only that as
29
- * the `aria-describedby` attribute (input without field note initially, but then error/success is added).
30
- * 3) Otherwise, render only the `ariaDescribedBy` property (field note only)
31
- */
32
- _fieldNoteAria() {
33
- return this.validationAriaDescribedBy && this.ariaDescribedBy ? `${this.ariaDescribedBy} ${this.validationAriaDescribedBy}` : this.validationAriaDescribedBy && !this.ariaDescribedBy ? this.validationAriaDescribedBy : this.ariaDescribedBy;
34
- }
35
- connectedCallback() {
36
- super.connectedCallback(), this.field.setAttribute("name", this.name ?? "");
37
- }
38
- disconnectedCallback() {
39
- super.disconnectedCallback();
40
- }
41
- /**
42
- * First updatedLifecycle
43
- * 1) Get the option in the items array with selected set to true. Set that as the selected item
44
- * 2) The default value is set to the `option` with the `selected` if one exists. Otherwise, use the
45
- * select the first item value like the native select.
46
- */
47
- firstUpdated() {
48
- super.firstUpdated(), [...this._selectOptions].forEach((r) => {
49
- r.selected === !0 && (this.selectedItem = r.value);
50
- }), this.defaultValue = this.selectedItem ? this.selectedItem : this._selectOptions[0].value ?? "Select An Option", this._setFormData(), this._initializeAria(), this.updateField();
51
- }
52
- /**
53
- * Set form data
54
- * 1) Set the element internals to the selected item value if it exists,
55
- * otherwise the default selected item is the first one
56
- */
57
- _setFormData() {
58
- return this.selectedItem ? this._internals?.setFormValue(this.selectedItem) : this._internals?.setFormValue(this.defaultValue.toString());
59
- }
60
- /**
61
- * Handle On Change
62
- * 1. Set the value when the select is changed.
63
- * 2. Fire the custom event with the current value.
64
- */
65
- _handleOnChange(r) {
66
- const s = r.target;
67
- this.value = s.options[s.selectedIndex].value, this._internals.setFormValue(this.value);
68
- const c = new CustomEvent("change", {
69
- detail: {
70
- name: this.name,
71
- value: this.value
72
- },
73
- bubbles: !0,
74
- composed: !0
75
- });
76
- this.dispatchEvent(c);
77
- }
78
- /**
79
- * Render the select options
80
- */
81
- _renderSelectOptions() {
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>
127
+ _setFormData() {
128
+ if (this.selectedItem) {
129
+ return this._internals?.setFormValue(this.selectedItem);
130
+ }
131
+ return this._internals?.setFormValue(this.defaultValue.toString());
132
+ }
133
+ /**
134
+ * Handle On Change
135
+ * 1. Set the value when the select is changed.
136
+ * 2. Fire the custom event with the current value.
137
+ */
138
+ _handleOnChange(e) {
139
+ /* 1 */
140
+ const target = e.target;
141
+ this.value = target.options[target.selectedIndex].value;
142
+ this._internals.setFormValue(this.value);
143
+ /* 2 */
144
+ const customEvent = new CustomEvent('change', {
145
+ detail: {
146
+ name: this.name,
147
+ value: this.value,
148
+ },
149
+ bubbles: true,
150
+ composed: true,
151
+ });
152
+ this.dispatchEvent(customEvent);
153
+ }
154
+ /**
155
+ * Render the select options
156
+ */
157
+ _renderSelectOptions() {
158
+ return this.items.map((item) => {
159
+ if ('options' in item) {
160
+ const selectedGroup = item.options.map((option) => html `
161
+ <option value="${option.value}">${option.label}</option>
86
162
  `);
87
- return o`<optgroup label="${r.optGroupLabel}">
88
- ${s}
163
+ return html `<optgroup label="${item.optGroupLabel}">
164
+ ${selectedGroup}
89
165
  </optgroup>`;
90
- }
91
- return o`<option value="${r.value}">${r.label}</option>`;
92
- });
93
- }
94
- /**
95
- * Render the success or error field notes
96
- * 1. If there is a successNote, then return the field note with the success message and state.
97
- * 2. If there is a errorNote, then return the field note with the error message and state.
98
- */
99
- _renderSuccessErrorFieldNote() {
100
- return this.successNote ? o`
166
+ }
167
+ return html `<option value="${item.value}">${item.label}</option>`;
168
+ });
169
+ }
170
+ /**
171
+ * Render the success or error field notes
172
+ * 1. If there is a successNote, then return the field note with the success message and state.
173
+ * 2. If there is a errorNote, then return the field note with the error message and state.
174
+ */
175
+ _renderSuccessErrorFieldNote() {
176
+ if (this.successNote) {
177
+ /* 1 */
178
+ return html `
101
179
  <cre8-field-note
102
180
  ?isSuccess=${this.isSuccess}
103
181
  id=${this.validationAriaDescribedBy}
@@ -105,7 +183,11 @@ const n = class n extends v {
105
183
  iconName="success"
106
184
  >
107
185
  ${this.successNote}
108
- </cre8-field-note>` : this.errorNote ? o`
186
+ </cre8-field-note>`;
187
+ }
188
+ if (this.errorNote) {
189
+ /* 2 */
190
+ return html `
109
191
  <cre8-field-note
110
192
  ?isError=${this.isError}
111
193
  id=${this.validationAriaDescribedBy}
@@ -113,84 +195,87 @@ const n = class n extends v {
113
195
  iconName="error-alt"
114
196
  >
115
197
  ${this.errorNote}
116
- </cre8-field-note>` : null;
117
- }
118
- render() {
119
- const r = this.componentClassNames("cre8-c-select", {
120
- "cre8-is-error": this.isError,
121
- "cre8-is-success": this.isSuccess
122
- });
123
- return o`
124
- <div class="${r}">
198
+ </cre8-field-note>`;
199
+ }
200
+ return null;
201
+ }
202
+ render() {
203
+ const componentClassNames = this.componentClassNames('cre8-c-select', {
204
+ 'cre8-is-error': this.isError,
205
+ 'cre8-is-success': this.isSuccess,
206
+ });
207
+ return html `
208
+ <div class="${componentClassNames}">
125
209
  <label class="cre8-c-select__label" for="${this.fieldId}">${this.label}</label>
126
210
  <div class="cre8-c-select__body">
127
211
  <select
128
212
  class="cre8-c-select__input"
129
213
  id=${this.fieldId}
130
- name=${u(this.name)}
214
+ name=${ifDefined(this.name)}
131
215
  ?required=${this.required}
132
216
  ?disabled=${this.disabled}
133
- aria-describedby="${u(this._fieldNoteAria())}"
217
+ aria-describedby="${ifDefined(this._fieldNoteAria())}"
134
218
  @change=${this._handleOnChange}
135
219
  >
136
220
  ${this._renderSelectOptions()}
137
221
  </select>
138
222
  <div class="cre8-c-select__icons">
139
- <cre8-icon svg='${f}' rotate="180" class="cre8-c-select__icon-arrow" aria-hidden='true'>
223
+ <cre8-icon svg='${svgCaretUp}' rotate="180" class="cre8-c-select__icon-arrow" aria-hidden='true'>
140
224
  </div>
141
225
  </div>
142
226
  </div>
143
- ${this.fieldNote || this.slotNotEmpty("fieldNote") ? o`
227
+ ${this.fieldNote || this.slotNotEmpty('fieldNote')
228
+ ? html `
144
229
  <cre8-field-note
145
230
  id=${this.ariaDescribedBy}
146
231
  class="cre8-c-select__field-note"
147
- ><slot name="fieldNote">${this.fieldNote}</slot></cre8-field-note>` : b}
232
+ ><slot name="fieldNote">${this.fieldNote}</slot></cre8-field-note>`
233
+ : nothing}
148
234
  ${this._renderSuccessErrorFieldNote()}
149
235
  `;
150
- }
151
- };
152
- n.styles = [_];
153
- let e = n;
154
- t([
155
- i({ type: Array })
156
- ], e.prototype, "items");
157
- t([
158
- i()
159
- ], e.prototype, "label");
160
- t([
161
- i()
162
- ], e.prototype, "fieldId");
163
- t([
164
- i()
165
- ], e.prototype, "fieldNote");
166
- t([
167
- i()
168
- ], e.prototype, "ariaDescribedBy");
169
- t([
170
- i()
171
- ], e.prototype, "validationAriaDescribedBy");
172
- t([
173
- i({ type: Boolean, reflect: !0 })
174
- ], e.prototype, "required");
175
- t([
176
- i({ type: Boolean, reflect: !0 })
177
- ], e.prototype, "disabled");
178
- t([
179
- i({ type: Boolean, reflect: !0 })
180
- ], e.prototype, "isError");
181
- t([
182
- i()
183
- ], e.prototype, "errorNote");
184
- t([
185
- i({ type: Boolean, reflect: !0 })
186
- ], e.prototype, "isSuccess");
187
- t([
188
- i()
189
- ], e.prototype, "successNote");
190
- t([
191
- y("option")
192
- ], e.prototype, "_selectOptions");
193
- customElements.get("cre8-select") === void 0 && customElements.define("cre8-select", e);
194
- export {
195
- e as Cre8Select
196
- };
236
+ }
237
+ }
238
+ Cre8Select.styles = [styles];
239
+ __decorate([
240
+ property({ type: Array })
241
+ ], Cre8Select.prototype, "items", void 0);
242
+ __decorate([
243
+ property()
244
+ ], Cre8Select.prototype, "label", void 0);
245
+ __decorate([
246
+ property()
247
+ ], Cre8Select.prototype, "fieldId", void 0);
248
+ __decorate([
249
+ property()
250
+ ], Cre8Select.prototype, "fieldNote", void 0);
251
+ __decorate([
252
+ property()
253
+ ], Cre8Select.prototype, "ariaDescribedBy", void 0);
254
+ __decorate([
255
+ property()
256
+ ], Cre8Select.prototype, "validationAriaDescribedBy", void 0);
257
+ __decorate([
258
+ property({ type: Boolean, reflect: true })
259
+ ], Cre8Select.prototype, "required", void 0);
260
+ __decorate([
261
+ property({ type: Boolean, reflect: true })
262
+ ], Cre8Select.prototype, "disabled", void 0);
263
+ __decorate([
264
+ property({ type: Boolean, reflect: true })
265
+ ], Cre8Select.prototype, "isError", void 0);
266
+ __decorate([
267
+ property()
268
+ ], Cre8Select.prototype, "errorNote", void 0);
269
+ __decorate([
270
+ property({ type: Boolean, reflect: true })
271
+ ], Cre8Select.prototype, "isSuccess", void 0);
272
+ __decorate([
273
+ property()
274
+ ], Cre8Select.prototype, "successNote", void 0);
275
+ __decorate([
276
+ queryAll('option')
277
+ ], Cre8Select.prototype, "_selectOptions", void 0);
278
+ if (customElements.get('cre8-select') === undefined) {
279
+ customElements.define('cre8-select', Cre8Select);
280
+ }
281
+ //# sourceMappingURL=select.js.map
@@ -0,0 +1 @@
1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AjSM,iBAAM,GAAG,CAAC,MAAM,CAAC,AAAX,CAAY;AAYzB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;yCACkC;AAO5D;IADC,QAAQ,EAAE;yCACa;AAQxB;IADC,QAAQ,EAAE;2CACM;AAOjB;IADC,QAAQ,EAAE;6CACQ;AAOnB;IADC,QAAQ,EAAE;mDACc;AAOzB;IADC,QAAQ,EAAE;6DACwB;AAOnC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;4CACjB;AAO1B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;4CACzB;AAOlB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;2CACzB;AAOlB;IADC,QAAQ,EAAE;6CACQ;AAOnB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;6CACvB;AAOpB;IADC,QAAQ,EAAE;+CACU;AAYrB;IADC,QAAQ,CAAC,QAAQ,CAAC;kDACmB;AA8LxC,IAAI,cAAc,CAAC,GAAG,CAAC,aAAa,CAAC,KAAK,SAAS,EAAE,CAAC;IACpD,cAAc,CAAC,MAAM,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC;AACnD,CAAC","sourcesContent":["import svgCaretUp from '/Users/tylersmbp/Projects/cre8-web-components/packages/cre8-wc/icons/System/Regular/Caret_Up.svg?raw';\nimport { html, nothing, } from 'lit';\nimport { ifDefined } from 'lit-html/directives/if-defined.js';\nimport { property, queryAll } from 'lit/decorators.js';\nimport { nanoid } from 'nanoid';\nimport '../field-note/field-note';\nimport styles from './select.styles.js';\nimport Cre8FormElement from '../cre8-form-element.js';\n\nexport interface Cre8SelectOption {\n label: string;\n value: number | string;\n}\n\nexport interface Cre8SelectOptionGroup {\n optGroupLabel: string;\n options: Cre8SelectOption[];\n}\n\n/**\n * The Select control is designed and built to be used for selecting between choices in a form.\n * It is not a Dropdown control which is generally used for displaying lists of choices\n * that act as links or actions, like filter options.\n *\n * Consider the use of a Select control carefully.\n * When you have less than 5 options for the user to choose from,\n * Radio or Checkbox inputs may be a better choice to display all of the options at once.\n * Users have to slow down to scan a list with more than 15 options,\n * so using an option group to give the options hierarchy may help users find their choice faster.\n * Alternately, a text input field might be a more appropriate control to use when there are too many options,\n * especially when used with typeahead/auto-complete.\n *\n * ## How to use\n * 1. The collapsed default state always shows a default placeholder value or a selected value.\n * 2. Sort list items in a logical order, such as grouping highly related options together,\n * placing most common options first, using alphabetical or numeric orders or dates in chronological order.\n * 3. A list that includes 6+ items should show a scrollbar.\n * 4. Users should be able to use a keystroke to quickly jump\n * to selecting an option that begins with the entered letter.\n * 5. Utilize appropriate native controls for when a user is on a mobile device rather than our custom Select.\n * 6. Adhere to our common form field conventions and always include a Label,\n * provide short and clear error messages in context, avoid using the Read-only\n * and Disabled states as much as possible, and utilize the info/formatting tip\n * or helpful link rather than placeholder text.\n *\n * @slot fieldNote - Container for optional field note content\n */\n\nexport class Cre8Select extends Cre8FormElement {\n\n readonly type = 'select';\n static styles = [styles];\n\n /**\n * A mix of Cre8SelectOption and Cre8SelectOptionGroup definitions:\n * - Cre8SelectOption\n * - label: option label text - `string`\n * - value: option value - `number | string`\n * - Cre8SelectOptionGroup\n * - optGroupLabel: optgroup label text - `string`\n * - options: Array of multiple Cre8SelectOption items - `Cre8SelectOption[]`\n */\n @property({ type: Array })\n items: Array<Cre8SelectOption | Cre8SelectOptionGroup> = [];\n\n /**\n * The required label that appears above the select\n * @attr {string}\n */\n @property()\n label: string = 'Label';\n\n\n /**\n * The unique id of the select\n * @attr {string}\n */\n @property()\n fieldId?: string;\n\n /**\n * Optional field note text can be added to provide additional field guidance.\n * @attr {string}\n */\n @property()\n fieldNote?: string;\n\n /**\n * Used to connect the field note in text field to the text menu for accessibility\n * @attr {string}\n */\n @property()\n ariaDescribedBy?: string;\n\n /**\n * Additional aria-describedby connection to id for additional success and error notes to be accessible\n * @attr {string}\n */\n @property()\n validationAriaDescribedBy?: string;\n\n /**\n * The required attribute on the select\n * @attr {boolean}\n */\n @property({ type: Boolean, reflect: true })\n required: boolean = false;\n\n /**\n * The disabled attribute on the select\n * @attr {boolean}\n */\n @property({ type: Boolean, reflect: true })\n disabled: boolean;\n\n /**\n * Changes the component's treatment to represent an error state\n * @attr {boolean}\n */\n @property({ type: Boolean, reflect: true })\n isError?: boolean;\n\n /**\n * The error field note that appears below the default field note\n * @attr {string}\n */\n @property()\n errorNote?: string;\n\n /**\n * Changes the component's treatment to represent a success state\n * @attr {boolean}\n */\n @property({ type: Boolean, reflect: true })\n isSuccess?: boolean;\n\n /**\n * The success field note that appears below the default field note\n * @attr {string}\n */\n @property()\n successNote?: string;\n\n /**\n * Select input querySelector\n */\n\n\n\n /**\n * Get all select option elements\n */\n @queryAll('option')\n _selectOptions: HTMLOptionsCollection;\n\n\n /**\n * Selected item value\n */\n private selectedItem: string;\n\n /**\n * Initialize aria attributes\n */\n private _initializeAria() {\n this.fieldId = this.fieldId || nanoid();\n if (this.fieldNote || this.slotNotEmpty('fieldNote')) {\n this.ariaDescribedBy = this.ariaDescribedBy || nanoid();\n }\n if (this.successNote || this.errorNote) {\n this.validationAriaDescribedBy = this.validationAriaDescribedBy || nanoid();\n }\n }\n\n /**\n * Aria describedby string based on field notes and error/success notes\n * 1) If both validationAriaDescribedBy (error/success note) and field note exists,\n * render both in the input's `aria-describedby` attribute\n * 2) Otherwise, if only validationAriaDescribedBy exists, then render only that as\n * the `aria-describedby` attribute (input without field note initially, but then error/success is added).\n * 3) Otherwise, render only the `ariaDescribedBy` property (field note only)\n */\n private _fieldNoteAria() {\n if (this.validationAriaDescribedBy && this.ariaDescribedBy) {\n return `${this.ariaDescribedBy} ${this.validationAriaDescribedBy}`; /* 1 */\n }\n if (this.validationAriaDescribedBy && (!this.ariaDescribedBy)) {\n return this.validationAriaDescribedBy; /* 2 */\n }\n return this.ariaDescribedBy; /* 3 */\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n this.field.setAttribute('name', this.name ?? '')\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n }\n /**\n * First updatedLifecycle\n * 1) Get the option in the items array with selected set to true. Set that as the selected item\n * 2) The default value is set to the `option` with the `selected` if one exists. Otherwise, use the\n * select the first item value like the native select.\n */\n firstUpdated() {\n super.firstUpdated();\n [...this._selectOptions].forEach((item: { selected: boolean; value: string; }) => { /* 1 */\n if (item.selected === true) {\n this.selectedItem = item.value; /* 1 */\n }\n });\n this.defaultValue = this.selectedItem ? this.selectedItem : (this._selectOptions[0].value ?? 'Select An Option'); /* 2 */\n this._setFormData();\n this._initializeAria();\n this.updateField();\n }\n\n /**\n * Set form data\n * 1) Set the element internals to the selected item value if it exists,\n * otherwise the default selected item is the first one\n */\n private _setFormData() {\n if (this.selectedItem) {\n return this._internals?.setFormValue(this.selectedItem);\n }\n return this._internals?.setFormValue(this.defaultValue.toString());\n }\n\n /**\n * Handle On Change\n * 1. Set the value when the select is changed.\n * 2. Fire the custom event with the current value.\n */\n private _handleOnChange(e: Event) {\n /* 1 */\n const target = e.target as HTMLSelectElement;\n this.value = target.options[target.selectedIndex].value;\n this._internals.setFormValue(this.value);\n\n\n /* 2 */\n const customEvent = new CustomEvent('change', {\n detail: {\n name: this.name,\n value: this.value,\n },\n bubbles: true,\n composed: true,\n });\n this.dispatchEvent(customEvent);\n }\n\n /**\n * Render the select options\n */\n private _renderSelectOptions() {\n return this.items.map((item: Cre8SelectOption | Cre8SelectOptionGroup) => {\n if ('options' in item) {\n const selectedGroup = item.options.map((option: Cre8SelectOption) => html`\n <option value=\"${option.value}\">${option.label}</option>\n `);\n return html`<optgroup label=\"${item.optGroupLabel}\">\n ${selectedGroup}\n </optgroup>`;\n }\n return html`<option value=\"${item.value}\">${item.label}</option>`;\n });\n }\n\n /**\n * Render the success or error field notes\n * 1. If there is a successNote, then return the field note with the success message and state.\n * 2. If there is a errorNote, then return the field note with the error message and state.\n */\n private _renderSuccessErrorFieldNote() {\n if (this.successNote) {\n /* 1 */\n return html`\n <cre8-field-note\n ?isSuccess=${this.isSuccess}\n id=${this.validationAriaDescribedBy}\n class=\"cre8-c-select__field-note-success\"\n iconName=\"success\"\n >\n ${this.successNote}\n </cre8-field-note>`;\n }\n if (this.errorNote) {\n /* 2 */\n return html`\n <cre8-field-note\n ?isError=${this.isError}\n id=${this.validationAriaDescribedBy}\n class=\"cre8-c-select__field-note-error\"\n iconName=\"error-alt\"\n >\n ${this.errorNote}\n </cre8-field-note>`;\n }\n return null;\n }\n\n render() {\n const componentClassNames = this.componentClassNames('cre8-c-select', {\n 'cre8-is-error': this.isError,\n 'cre8-is-success': this.isSuccess,\n });\n\n return html`\n <div class=\"${componentClassNames}\">\n <label class=\"cre8-c-select__label\" for=\"${this.fieldId}\">${this.label}</label>\n <div class=\"cre8-c-select__body\">\n <select\n class=\"cre8-c-select__input\"\n id=${this.fieldId}\n name=${ifDefined(this.name)}\n ?required=${this.required}\n ?disabled=${this.disabled}\n aria-describedby=\"${ifDefined(this._fieldNoteAria())}\"\n @change=${this._handleOnChange}\n >\n ${this._renderSelectOptions()}\n </select>\n <div class=\"cre8-c-select__icons\">\n <cre8-icon svg='${svgCaretUp}' rotate=\"180\" class=\"cre8-c-select__icon-arrow\" aria-hidden='true'>\n </div>\n </div>\n </div>\n ${this.fieldNote || this.slotNotEmpty('fieldNote')\n ? html`\n <cre8-field-note\n id=${this.ariaDescribedBy}\n class=\"cre8-c-select__field-note\"\n ><slot name=\"fieldNote\">${this.fieldNote}</slot></cre8-field-note>`\n : nothing}\n ${this._renderSuccessErrorFieldNote()}\n `;\n }\n}\n\nif (customElements.get('cre8-select') === undefined) {\n customElements.define('cre8-select', Cre8Select);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'cre8-select': Cre8Select;\n }\n}\n"]}
@@ -0,0 +1,4 @@
1
+ import { css } from 'lit';
2
+ const styles = css `*,::slotted(*),*:before,*:after{box-sizing:border-box}:root{--size-base-unit: 0.5rem}[dir=rtl]{--rtlTranslateX: 50%;--rtlGradientToRight: 270deg;--rtlRotate45Inverse: -45deg}:host{--cre8-z-index-1: 1;--cre8-z-index-50: 50;--cre8-z-index-100: 100;--cre8-z-index-200: 200;--cre8-z-index-1030: 1030;--cre8-anim-fade-quick: 0.35s;--cre8-anim-ease: ease}@keyframes fadeIn{100%{opacity:1}}@keyframes slideIn{100%{transform:translateX(0)}}@keyframes slideInFwd{100%{width:272px;height:272px}}@keyframes slideOutRight{100%{width:272px;height:272px}}@keyframes slideUp{100%{transform:translateY(0)}}@media(width >= 481px){@keyframes slideInFwd{100%{width:417px;height:417px}}@keyframes slideOutRight{100%{width:417px;height:417px}}}@media(width >= 48rem){@keyframes slideInFwd{100%{width:330px;height:330px}}@keyframes slideOutRight{100%{width:330px;height:330px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 60rem){@keyframes slideInFwd{100%{width:460px;height:460px}}@keyframes slideOutRight{100%{width:460px;height:460px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 75rem){@keyframes slideInFwd{100%{width:592px;height:591px}}@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 87.5rem){@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 120px))}}}@media(width >= 2200px){@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 592px))}}}span.ripple{position:absolute;border-radius:50%;transform:scale(0);animation:ripple 600ms linear;background-color:var(--ripple-bg-color)}@keyframes ripple{to{transform:scale(4);opacity:1}}:root{--size-base-unit: 0.5rem}[dir=rtl]{--rtlTranslateX: 50%;--rtlGradientToRight: 270deg;--rtlRotate45Inverse: -45deg}:host{display:inline-flex;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%}`;
3
+ export default styles;
4
+ //# sourceMappingURL=select.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"select.styles.js","sourceRoot":"","sources":["../../../components/select/select.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,MAAM,MAAM,GAAG,GAAG,CAAA,4gKAA4gK,CAAC;AAC/hK,eAAe,MAAM,CAAC","sourcesContent":["import { css } from 'lit';\nconst styles = css`*,::slotted(*),*:before,*:after{box-sizing:border-box}:root{--size-base-unit: 0.5rem}[dir=rtl]{--rtlTranslateX: 50%;--rtlGradientToRight: 270deg;--rtlRotate45Inverse: -45deg}:host{--cre8-z-index-1: 1;--cre8-z-index-50: 50;--cre8-z-index-100: 100;--cre8-z-index-200: 200;--cre8-z-index-1030: 1030;--cre8-anim-fade-quick: 0.35s;--cre8-anim-ease: ease}@keyframes fadeIn{100%{opacity:1}}@keyframes slideIn{100%{transform:translateX(0)}}@keyframes slideInFwd{100%{width:272px;height:272px}}@keyframes slideOutRight{100%{width:272px;height:272px}}@keyframes slideUp{100%{transform:translateY(0)}}@media(width >= 481px){@keyframes slideInFwd{100%{width:417px;height:417px}}@keyframes slideOutRight{100%{width:417px;height:417px}}}@media(width >= 48rem){@keyframes slideInFwd{100%{width:330px;height:330px}}@keyframes slideOutRight{100%{width:330px;height:330px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 60rem){@keyframes slideInFwd{100%{width:460px;height:460px}}@keyframes slideOutRight{100%{width:460px;height:460px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 75rem){@keyframes slideInFwd{100%{width:592px;height:591px}}@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 87.5rem){@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 120px))}}}@media(width >= 2200px){@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 592px))}}}span.ripple{position:absolute;border-radius:50%;transform:scale(0);animation:ripple 600ms linear;background-color:var(--ripple-bg-color)}@keyframes ripple{to{transform:scale(4);opacity:1}}:root{--size-base-unit: 0.5rem}[dir=rtl]{--rtlTranslateX: 50%;--rtlGradientToRight: 270deg;--rtlRotate45Inverse: -45deg}:host{display:inline-flex;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%}`;\nexport default styles;\n"]}
@@ -0,0 +1,60 @@
1
+ /**
2
+ * This Controller handles the special checkbox logic.
3
+ * This should be a lot simpler than the radio version.
4
+ *
5
+ * See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/checkbox_role
6
+ */
7
+ export class SelectTileCheckboxController {
8
+ constructor(host) {
9
+ /**
10
+ * Handle clicking on the radio button
11
+ * @see _checkAndFocus
12
+ */
13
+ this._clickHandler = (e) => {
14
+ this._checkAndFocus();
15
+ e.preventDefault();
16
+ };
17
+ /**
18
+ * Set the element to `checked`
19
+ * 2) Set us to checked.
20
+ */
21
+ this._checkAndFocus = () => {
22
+ this.host.checked = !this.host.checked;
23
+ this.host.dispatchEvent(new Event('input', { bubbles: true, composed: true }));
24
+ this.host.dispatchEvent(new Event('change', { bubbles: true }));
25
+ };
26
+ /**
27
+ * Handle keydown
28
+ */
29
+ this._handleKeyDown = (e) => {
30
+ // Enter and Space
31
+ if (['Enter', ' '].includes(e.key)) {
32
+ this._handleEnterSpace(e);
33
+ }
34
+ };
35
+ /**
36
+ * Handle Enter and Space
37
+ * @see _checkAndFocus
38
+ */
39
+ this._handleEnterSpace = (e) => {
40
+ this._checkAndFocus();
41
+ e.preventDefault();
42
+ };
43
+ this.host = host;
44
+ host.addController(this);
45
+ }
46
+ hostConnected() {
47
+ this.host._internals.role = 'checkbox';
48
+ this.host.setAttribute('tabindex', '0');
49
+ this.host.addEventListener('click', this._clickHandler);
50
+ this.host.addEventListener('keydown', this._handleKeyDown);
51
+ }
52
+ hostDisconnected() {
53
+ this.host._internals.role = undefined;
54
+ this.host.removeAttribute('tabindex');
55
+ this.host.removeEventListener('click', this._clickHandler);
56
+ this.host.removeEventListener('keydown', this._handleKeyDown);
57
+ }
58
+ }
59
+ export default SelectTileCheckboxController;
60
+ //# sourceMappingURL=select-tile-checkbox-controller.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"select-tile-checkbox-controller.js","sourceRoot":"","sources":["../../../components/select-tile/select-tile-checkbox-controller.ts"],"names":[],"mappings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C,IAAI,CAAC,YAAY,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;QAExC,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;QACxD,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,SAAS,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC;IAC/D,CAAC;IAED,gBAAgB;QACZ,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,GAAG,SAAS,CAAC;QACtC,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC;QAEtC,IAAI,CAAC,IAAI,CAAC,mBAAmB,CAAC,OAAO,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;QAC3D,IAAI,CAAC,IAAI,CAAC,mBAAmB,CAAC,SAAS,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC;IAClE,CAAC;CAuCJ;AAED,eAAe,4BAA4B,CAAC","sourcesContent":["import { ReactiveController } from 'lit';\nimport { Cre8FormElement } from '../cre8-form-element';\n\ntype FormElement = Cre8FormElement & { form: HTMLFormElement, name?: string, checked?: boolean };\n\n\n/**\n * This Controller handles the special checkbox logic.\n * This should be a lot simpler than the radio version.\n *\n * See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/checkbox_role\n */\nexport class SelectTileCheckboxController implements ReactiveController {\n private host: FormElement;\n\n constructor(host: FormElement) {\n this.host = host;\n host.addController(this);\n }\n\n hostConnected(): void {\n this.host._internals.role = 'checkbox';\n this.host.setAttribute('tabindex', '0');\n\n this.host.addEventListener('click', this._clickHandler);\n this.host.addEventListener('keydown', this._handleKeyDown);\n }\n\n hostDisconnected(): void {\n this.host._internals.role = undefined;\n this.host.removeAttribute('tabindex');\n\n this.host.removeEventListener('click', this._clickHandler);\n this.host.removeEventListener('keydown', this._handleKeyDown);\n }\n\n /**\n * Handle clicking on the radio button\n * @see _checkAndFocus\n */\n private _clickHandler = (e: MouseEvent | KeyboardEvent) => {\n this._checkAndFocus();\n e.preventDefault();\n };\n\n /**\n * Set the element to `checked`\n * 2) Set us to checked.\n */\n private _checkAndFocus = () => {\n this.host.checked = !this.host.checked;\n this.host.dispatchEvent(new Event('input', { bubbles: true, composed: true }));\n this.host.dispatchEvent(new Event('change', { bubbles: true }));\n };\n\n /**\n * Handle keydown\n */\n private _handleKeyDown = (e: KeyboardEvent) => {\n // Enter and Space\n if (['Enter', ' '].includes(e.key)) {\n this._handleEnterSpace(e);\n }\n };\n\n /**\n * Handle Enter and Space\n * @see _checkAndFocus\n */\n private _handleEnterSpace = (e: KeyboardEvent) => {\n this._checkAndFocus();\n e.preventDefault();\n };\n}\n\nexport default SelectTileCheckboxController;\n"]}