@tmorrow/cre8-wc 1.1.2 → 1.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (435) hide show
  1. package/cdn/cre8-wc.esm.js +1 -1
  2. package/cdn/cre8-wc.esm.js.map +1 -1
  3. package/cdn/cre8-wc.min.js +1 -1
  4. package/cdn/cre8-wc.min.js.map +1 -1
  5. package/lib/cdn-entry.js +129 -0
  6. package/lib/cdn-entry.js.map +1 -0
  7. package/lib/components/accordion/accordion.js +58 -40
  8. package/lib/components/accordion/accordion.js.map +1 -0
  9. package/lib/components/accordion/accordion.styles.js +4 -0
  10. package/lib/components/accordion/accordion.styles.js.map +1 -0
  11. package/lib/components/accordion-item/accordion-item.js +187 -98
  12. package/lib/components/accordion-item/accordion-item.js.map +1 -0
  13. package/lib/components/accordion-item/accordion-item.styles.js +4 -0
  14. package/lib/components/accordion-item/accordion-item.styles.js.map +1 -0
  15. package/lib/components/alert/alert.js +146 -107
  16. package/lib/components/alert/alert.js.map +1 -0
  17. package/lib/components/alert/alert.styles.js +4 -0
  18. package/lib/components/alert/alert.styles.js.map +1 -0
  19. package/lib/components/badge/badge.js +73 -50
  20. package/lib/components/badge/badge.js.map +1 -0
  21. package/lib/components/badge/badge.styles.js +4 -0
  22. package/lib/components/badge/badge.styles.js.map +1 -0
  23. package/lib/components/band/band.js +34 -31
  24. package/lib/components/band/band.js.map +1 -0
  25. package/lib/components/band/band.styles.js +4 -0
  26. package/lib/components/band/band.styles.js.map +1 -0
  27. package/lib/components/breadcrumbs/breadcrumbs.js +52 -28
  28. package/lib/components/breadcrumbs/breadcrumbs.js.map +1 -0
  29. package/lib/components/breadcrumbs/breadcrumbs.styles.js +4 -0
  30. package/lib/components/breadcrumbs/breadcrumbs.styles.js.map +1 -0
  31. package/lib/components/breadcrumbs-item/breadcrumbs-item.js +28 -27
  32. package/lib/components/breadcrumbs-item/breadcrumbs-item.js.map +1 -0
  33. package/lib/components/breadcrumbs-item/breadcrumbs-item.styles.js +4 -0
  34. package/lib/components/breadcrumbs-item/breadcrumbs-item.styles.js.map +1 -0
  35. package/lib/components/button/button.js +297 -1040
  36. package/lib/components/button/button.js.map +1 -0
  37. package/lib/components/button/button.styles.js +885 -0
  38. package/lib/components/button/button.styles.js.map +1 -0
  39. package/lib/components/button-group/button-group.js +30 -27
  40. package/lib/components/button-group/button-group.js.map +1 -0
  41. package/lib/components/button-group/button-group.styles.js +4 -0
  42. package/lib/components/button-group/button-group.styles.js.map +1 -0
  43. package/lib/components/card/card.js +57 -35
  44. package/lib/components/card/card.js.map +1 -0
  45. package/lib/components/card/card.styles.js +4 -0
  46. package/lib/components/card/card.styles.js.map +1 -0
  47. package/lib/components/chart/chart.js +528 -354
  48. package/lib/components/chart/chart.js.map +1 -0
  49. package/lib/components/chart/chart.styles.js +4 -0
  50. package/lib/components/chart/chart.styles.js.map +1 -0
  51. package/lib/components/checkbox-field/checkbox-field.js +66 -53
  52. package/lib/components/checkbox-field/checkbox-field.js.map +1 -0
  53. package/lib/components/checkbox-field/checkbox-field.styles.js +4 -0
  54. package/lib/components/checkbox-field/checkbox-field.styles.js.map +1 -0
  55. package/lib/components/checkbox-field-item/checkbox-field-item.js +252 -183
  56. package/lib/components/checkbox-field-item/checkbox-field-item.js.map +1 -0
  57. package/lib/components/checkbox-field-item/checkbox-field-item.styles.js +4 -0
  58. package/lib/components/checkbox-field-item/checkbox-field-item.styles.js.map +1 -0
  59. package/lib/components/contexts/form-internals-context.js +9 -0
  60. package/lib/components/contexts/form-internals-context.js.map +1 -0
  61. package/lib/components/cre8-element.js +57 -56
  62. package/lib/components/cre8-element.js.map +1 -0
  63. package/lib/components/cre8-form-element.js +212 -244
  64. package/lib/components/cre8-form-element.js.map +1 -0
  65. package/lib/components/danger-button/danger-button.js +274 -147
  66. package/lib/components/danger-button/danger-button.js.map +1 -0
  67. package/lib/components/danger-button/danger-button.styles.js +4 -0
  68. package/lib/components/danger-button/danger-button.styles.js.map +1 -0
  69. package/lib/components/date-picker/calendar/calendar.js +465 -0
  70. package/lib/components/date-picker/calendar/calendar.js.map +1 -0
  71. package/lib/components/date-picker/calendar/calendar.styles.js +4 -0
  72. package/lib/components/date-picker/calendar/calendar.styles.js.map +1 -0
  73. package/lib/components/date-picker/calendar-month-modal/calendar-month-modal.js +76 -0
  74. package/lib/components/date-picker/calendar-month-modal/calendar-month-modal.js.map +1 -0
  75. package/lib/components/date-picker/calendar-month-modal/calendar-month-modal.styles.js +4 -0
  76. package/lib/components/date-picker/calendar-month-modal/calendar-month-modal.styles.js.map +1 -0
  77. package/lib/components/date-picker/calendar-navigation/calendar-navigation.js +110 -0
  78. package/lib/components/date-picker/calendar-navigation/calendar-navigation.js.map +1 -0
  79. package/lib/components/date-picker/calendar-navigation/calendar-navigation.styles.js +4 -0
  80. package/lib/components/date-picker/calendar-navigation/calendar-navigation.styles.js.map +1 -0
  81. package/lib/components/date-picker/calendar-year-modal/calendar-year-modal.js +116 -0
  82. package/lib/components/date-picker/calendar-year-modal/calendar-year-modal.js.map +1 -0
  83. package/lib/components/date-picker/calendar-year-modal/calendar-year-modal.styles.js +4 -0
  84. package/lib/components/date-picker/calendar-year-modal/calendar-year-modal.styles.js.map +1 -0
  85. package/lib/components/date-picker/date-picker.js +91 -784
  86. package/lib/components/date-picker/date-picker.js.map +1 -0
  87. package/lib/components/date-picker/date-picker.styles.js +4 -0
  88. package/lib/components/date-picker/date-picker.styles.js.map +1 -0
  89. package/lib/components/divider/divider.js +45 -35
  90. package/lib/components/divider/divider.js.map +1 -0
  91. package/lib/components/divider/divider.styles.js +4 -0
  92. package/lib/components/divider/divider.styles.js.map +1 -0
  93. package/lib/components/dropdown/dropdown.js +97 -63
  94. package/lib/components/dropdown/dropdown.js.map +1 -0
  95. package/lib/components/dropdown/dropdown.styles.js +4 -0
  96. package/lib/components/dropdown/dropdown.styles.js.map +1 -0
  97. package/lib/components/dropdown-item/dropdown-item.js +38 -31
  98. package/lib/components/dropdown-item/dropdown-item.js.map +1 -0
  99. package/lib/components/dropdown-item/dropdown-item.styles.js +4 -0
  100. package/lib/components/dropdown-item/dropdown-item.styles.js.map +1 -0
  101. package/lib/components/feature/feature.js +40 -35
  102. package/lib/components/feature/feature.js.map +1 -0
  103. package/lib/components/feature/feature.styles.js +4 -0
  104. package/lib/components/feature/feature.styles.js.map +1 -0
  105. package/lib/components/field/field.js +218 -153
  106. package/lib/components/field/field.js.map +1 -0
  107. package/lib/components/field/field.styles.js +4 -0
  108. package/lib/components/field/field.styles.js.map +1 -0
  109. package/lib/components/field-note/field-note.js +58 -45
  110. package/lib/components/field-note/field-note.js.map +1 -0
  111. package/lib/components/field-note/field-note.styles.js +4 -0
  112. package/lib/components/field-note/field-note.styles.js.map +1 -0
  113. package/lib/components/footer/footer.js +25 -18
  114. package/lib/components/footer/footer.js.map +1 -0
  115. package/lib/components/footer/footer.styles.js +4 -0
  116. package/lib/components/footer/footer.styles.js.map +1 -0
  117. package/lib/components/global-nav/global-nav.js +44 -37
  118. package/lib/components/global-nav/global-nav.js.map +1 -0
  119. package/lib/components/global-nav/global-nav.styles.js +4 -0
  120. package/lib/components/global-nav/global-nav.styles.js.map +1 -0
  121. package/lib/components/global-nav-item/global-nav-item.js +149 -112
  122. package/lib/components/global-nav-item/global-nav-item.js.map +1 -0
  123. package/lib/components/global-nav-item/global-nav-item.styles.js +4 -0
  124. package/lib/components/global-nav-item/global-nav-item.styles.js.map +1 -0
  125. package/lib/components/grid/grid.js +48 -45
  126. package/lib/components/grid/grid.js.map +1 -0
  127. package/lib/components/grid/grid.styles.js +4 -0
  128. package/lib/components/grid/grid.styles.js.map +1 -0
  129. package/lib/components/grid-item/grid-item.js +19 -16
  130. package/lib/components/grid-item/grid-item.js.map +1 -0
  131. package/lib/components/grid-item/grid-item.styles.js +4 -0
  132. package/lib/components/grid-item/grid-item.styles.js.map +1 -0
  133. package/lib/components/header/header.js +34 -29
  134. package/lib/components/header/header.js.map +1 -0
  135. package/lib/components/header/header.styles.js +4 -0
  136. package/lib/components/header/header.styles.js.map +1 -0
  137. package/lib/components/heading/heading.js +113 -76
  138. package/lib/components/heading/heading.js.map +1 -0
  139. package/lib/components/heading/heading.styles.js +4 -0
  140. package/lib/components/heading/heading.styles.js.map +1 -0
  141. package/lib/components/hero/hero.js +43 -40
  142. package/lib/components/hero/hero.js.map +1 -0
  143. package/lib/components/hero/hero.styles.js +4 -0
  144. package/lib/components/hero/hero.styles.js.map +1 -0
  145. package/lib/components/icon/icon.js +232 -9
  146. package/lib/components/icon/icon.js.map +1 -0
  147. package/lib/components/icon/icon.styles.js +4 -0
  148. package/lib/components/icon/icon.styles.js.map +1 -0
  149. package/lib/components/inline-alert/inline-alert.js +114 -87
  150. package/lib/components/inline-alert/inline-alert.js.map +1 -0
  151. package/lib/components/inline-alert/inline-alert.styles.js +4 -0
  152. package/lib/components/inline-alert/inline-alert.styles.js.map +1 -0
  153. package/lib/components/layout/layout.js +30 -27
  154. package/lib/components/layout/layout.js.map +1 -0
  155. package/lib/components/layout/layout.styles.js +4 -0
  156. package/lib/components/layout/layout.styles.js.map +1 -0
  157. package/lib/components/layout-container/layout-container.js +30 -27
  158. package/lib/components/layout-container/layout-container.js.map +1 -0
  159. package/lib/components/layout-container/layout-container.styles.js +4 -0
  160. package/lib/components/layout-container/layout-container.styles.js.map +1 -0
  161. package/lib/components/layout-section/layout-section.js +41 -33
  162. package/lib/components/layout-section/layout-section.js.map +1 -0
  163. package/lib/components/layout-section/layout-section.styles.js +4 -0
  164. package/lib/components/layout-section/layout-section.styles.js.map +1 -0
  165. package/lib/components/linelength-container/linelength-container.js +19 -16
  166. package/lib/components/linelength-container/linelength-container.js.map +1 -0
  167. package/lib/components/linelength-container/linelength-container.styles.js +4 -0
  168. package/lib/components/linelength-container/linelength-container.styles.js.map +1 -0
  169. package/lib/components/link/link.js +125 -87
  170. package/lib/components/link/link.js.map +1 -0
  171. package/lib/components/link/link.styles.js +4 -0
  172. package/lib/components/link/link.styles.js.map +1 -0
  173. package/lib/components/link-list/link-list.js +48 -45
  174. package/lib/components/link-list/link-list.js.map +1 -0
  175. package/lib/components/link-list/link-list.styles.js +4 -0
  176. package/lib/components/link-list/link-list.styles.js.map +1 -0
  177. package/lib/components/link-list-item/link-list-item.js +40 -37
  178. package/lib/components/link-list-item/link-list-item.js.map +1 -0
  179. package/lib/components/link-list-item/link-list-item.styles.js +4 -0
  180. package/lib/components/link-list-item/link-list-item.styles.js.map +1 -0
  181. package/lib/components/list/list.js +35 -32
  182. package/lib/components/list/list.js.map +1 -0
  183. package/lib/components/list/list.styles.js +4 -0
  184. package/lib/components/list/list.styles.js.map +1 -0
  185. package/lib/components/list-item/list-item.js +25 -21
  186. package/lib/components/list-item/list-item.js.map +1 -0
  187. package/lib/components/list-item/list-item.styles.js +4 -0
  188. package/lib/components/list-item/list-item.styles.js.map +1 -0
  189. package/lib/components/loading-spinner/loading-spinner.js +126 -71
  190. package/lib/components/loading-spinner/loading-spinner.js.map +1 -0
  191. package/lib/components/loading-spinner/loading-spinner.styles.js +4 -0
  192. package/lib/components/loading-spinner/loading-spinner.styles.js.map +1 -0
  193. package/lib/components/logo/logo.js +28 -25
  194. package/lib/components/logo/logo.js.map +1 -0
  195. package/lib/components/logo/logo.styles.js +4 -0
  196. package/lib/components/logo/logo.styles.js.map +1 -0
  197. package/lib/components/main/main.js +29 -26
  198. package/lib/components/main/main.js.map +1 -0
  199. package/lib/components/main/main.styles.js +4 -0
  200. package/lib/components/main/main.styles.js.map +1 -0
  201. package/lib/components/modal/modal.js +174 -125
  202. package/lib/components/modal/modal.js.map +1 -0
  203. package/lib/components/modal/modal.styles.js +4 -0
  204. package/lib/components/modal/modal.styles.js.map +1 -0
  205. package/lib/components/multi-select/multi-select.js +300 -211
  206. package/lib/components/multi-select/multi-select.js.map +1 -0
  207. package/lib/components/multi-select/multi-select.styles.js +4 -0
  208. package/lib/components/multi-select/multi-select.styles.js.map +1 -0
  209. package/lib/components/nav-container/nav-container.js +19 -16
  210. package/lib/components/nav-container/nav-container.js.map +1 -0
  211. package/lib/components/nav-container/nav-container.styles.js +4 -0
  212. package/lib/components/nav-container/nav-container.styles.js.map +1 -0
  213. package/lib/components/page-header/page-header.js +36 -29
  214. package/lib/components/page-header/page-header.js.map +1 -0
  215. package/lib/components/page-header/page-header.styles.js +4 -0
  216. package/lib/components/page-header/page-header.styles.js.map +1 -0
  217. package/lib/components/pagination/page-counter/page-counter.js +67 -0
  218. package/lib/components/pagination/page-counter/page-counter.js.map +1 -0
  219. package/lib/components/pagination/page-counter/page-counter.styles.js +4 -0
  220. package/lib/components/pagination/page-counter/page-counter.styles.js.map +1 -0
  221. package/lib/components/pagination/pagination.js +282 -237
  222. package/lib/components/pagination/pagination.js.map +1 -0
  223. package/lib/components/pagination/pagination.styles.js +4 -0
  224. package/lib/components/pagination/pagination.styles.js.map +1 -0
  225. package/lib/components/percent-bar/percent-bar.js +56 -48
  226. package/lib/components/percent-bar/percent-bar.js.map +1 -0
  227. package/lib/components/percent-bar/percent-bar.styles.js +4 -0
  228. package/lib/components/percent-bar/percent-bar.styles.js.map +1 -0
  229. package/lib/components/popover/popover.js +304 -179
  230. package/lib/components/popover/popover.js.map +1 -0
  231. package/lib/components/popover/popover.styles.js +4 -0
  232. package/lib/components/popover/popover.styles.js.map +1 -0
  233. package/lib/components/primary-nav/primary-nav.js +44 -37
  234. package/lib/components/primary-nav/primary-nav.js.map +1 -0
  235. package/lib/components/primary-nav/primary-nav.styles.js +4 -0
  236. package/lib/components/primary-nav/primary-nav.styles.js.map +1 -0
  237. package/lib/components/primary-nav-item/primary-nav-item.js +151 -113
  238. package/lib/components/primary-nav-item/primary-nav-item.js.map +1 -0
  239. package/lib/components/primary-nav-item/primary-nav-item.styles.js +4 -0
  240. package/lib/components/primary-nav-item/primary-nav-item.styles.js.map +1 -0
  241. package/lib/components/progress-meter/progress-meter.js +74 -57
  242. package/lib/components/progress-meter/progress-meter.js.map +1 -0
  243. package/lib/components/progress-meter/progress-meter.styles.js +4 -0
  244. package/lib/components/progress-meter/progress-meter.styles.js.map +1 -0
  245. package/lib/components/progress-steps/progress-steps.js +19 -0
  246. package/lib/components/progress-steps/progress-steps.js.map +1 -0
  247. package/lib/components/progress-steps/progress-steps.styles.js +4 -0
  248. package/lib/components/progress-steps/progress-steps.styles.js.map +1 -0
  249. package/lib/components/progress-steps-item/progress-steps-item.js +52 -40
  250. package/lib/components/progress-steps-item/progress-steps-item.js.map +1 -0
  251. package/lib/components/progress-steps-item/progress-steps-item.styles.js +4 -0
  252. package/lib/components/progress-steps-item/progress-steps-item.styles.js.map +1 -0
  253. package/lib/components/radio-field/radio-field.js +59 -49
  254. package/lib/components/radio-field/radio-field.js.map +1 -0
  255. package/lib/components/radio-field/radio-field.styles.js +4 -0
  256. package/lib/components/radio-field/radio-field.styles.js.map +1 -0
  257. package/lib/components/radio-field-item/radio-field-item.js +222 -179
  258. package/lib/components/radio-field-item/radio-field-item.js.map +1 -0
  259. package/lib/components/radio-field-item/radio-field-item.styles.js +4 -0
  260. package/lib/components/radio-field-item/radio-field-item.styles.js.map +1 -0
  261. package/lib/components/remove-tag/remove-tag.js +89 -60
  262. package/lib/components/remove-tag/remove-tag.js.map +1 -0
  263. package/lib/components/remove-tag/remove-tag.styles.js +4 -0
  264. package/lib/components/remove-tag/remove-tag.styles.js.map +1 -0
  265. package/lib/components/section/section.js +46 -27
  266. package/lib/components/section/section.js.map +1 -0
  267. package/lib/components/section/section.styles.js +4 -0
  268. package/lib/components/section/section.styles.js.map +1 -0
  269. package/lib/components/select/select.js +243 -158
  270. package/lib/components/select/select.js.map +1 -0
  271. package/lib/components/select/select.styles.js +4 -0
  272. package/lib/components/select/select.styles.js.map +1 -0
  273. package/lib/components/select-tile/select-tile-checkbox-controller.js +60 -0
  274. package/lib/components/select-tile/select-tile-checkbox-controller.js.map +1 -0
  275. package/lib/components/select-tile/select-tile-radio-controller.js +167 -0
  276. package/lib/components/select-tile/select-tile-radio-controller.js.map +1 -0
  277. package/lib/components/select-tile/select-tile.js +228 -223
  278. package/lib/components/select-tile/select-tile.js.map +1 -0
  279. package/lib/components/select-tile/select-tile.styles.js +4 -0
  280. package/lib/components/select-tile/select-tile.styles.js.map +1 -0
  281. package/lib/components/select-tile-list/select-tile-list.js +76 -62
  282. package/lib/components/select-tile-list/select-tile-list.js.map +1 -0
  283. package/lib/components/select-tile-list/select-tile-list.styles.js +4 -0
  284. package/lib/components/select-tile-list/select-tile-list.styles.js.map +1 -0
  285. package/lib/components/skeleton-loader/skeleton-loader.js +68 -39
  286. package/lib/components/skeleton-loader/skeleton-loader.js.map +1 -0
  287. package/lib/components/skeleton-loader/skeleton-loader.styles.js +4 -0
  288. package/lib/components/skeleton-loader/skeleton-loader.styles.js.map +1 -0
  289. package/lib/components/split-button/split-button.js +51 -46
  290. package/lib/components/split-button/split-button.js.map +1 -0
  291. package/lib/components/split-button/split-button.styles.js +4 -0
  292. package/lib/components/split-button/split-button.styles.js.map +1 -0
  293. package/lib/components/submenu/submenu.js +19 -16
  294. package/lib/components/submenu/submenu.js.map +1 -0
  295. package/lib/components/submenu/submenu.styles.js +4 -0
  296. package/lib/components/submenu/submenu.styles.js.map +1 -0
  297. package/lib/components/submenu-item/submenu-item.js +32 -26
  298. package/lib/components/submenu-item/submenu-item.js.map +1 -0
  299. package/lib/components/submenu-item/submenu-item.styles.js +4 -0
  300. package/lib/components/submenu-item/submenu-item.styles.js.map +1 -0
  301. package/lib/components/tab/tab.js +74 -63
  302. package/lib/components/tab/tab.js.map +1 -0
  303. package/lib/components/tab/tab.styles.js +4 -0
  304. package/lib/components/tab/tab.styles.js.map +1 -0
  305. package/lib/components/tab-panel/tab-panel.js +49 -43
  306. package/lib/components/tab-panel/tab-panel.js.map +1 -0
  307. package/lib/components/tab-panel/tab-panel.styles.js +4 -0
  308. package/lib/components/tab-panel/tab-panel.styles.js.map +1 -0
  309. package/lib/components/table/table.js +46 -41
  310. package/lib/components/table/table.js.map +1 -0
  311. package/lib/components/table/table.styles.js +4 -0
  312. package/lib/components/table/table.styles.js.map +1 -0
  313. package/lib/components/table-body/table-body.js +20 -17
  314. package/lib/components/table-body/table-body.js.map +1 -0
  315. package/lib/components/table-body/table-body.styles.js +4 -0
  316. package/lib/components/table-body/table-body.styles.js.map +1 -0
  317. package/lib/components/table-cell/table-cell.js +39 -36
  318. package/lib/components/table-cell/table-cell.js.map +1 -0
  319. package/lib/components/table-cell/table-cell.styles.js +4 -0
  320. package/lib/components/table-cell/table-cell.styles.js.map +1 -0
  321. package/lib/components/table-header/table-header.js +20 -17
  322. package/lib/components/table-header/table-header.js.map +1 -0
  323. package/lib/components/table-header/table-header.styles.js +4 -0
  324. package/lib/components/table-header/table-header.styles.js.map +1 -0
  325. package/lib/components/table-header-cell/table-header-cell.js +35 -32
  326. package/lib/components/table-header-cell/table-header-cell.js.map +1 -0
  327. package/lib/components/table-header-cell/table-header-cell.styles.js +4 -0
  328. package/lib/components/table-header-cell/table-header-cell.styles.js.map +1 -0
  329. package/lib/components/table-object/table-object.js +21 -18
  330. package/lib/components/table-object/table-object.js.map +1 -0
  331. package/lib/components/table-object/table-object.styles.js +4 -0
  332. package/lib/components/table-object/table-object.styles.js.map +1 -0
  333. package/lib/components/table-row/table-row.js +76 -55
  334. package/lib/components/table-row/table-row.js.map +1 -0
  335. package/lib/components/table-row/table-row.styles.js +4 -0
  336. package/lib/components/table-row/table-row.styles.js.map +1 -0
  337. package/lib/components/tabs/tabs.js +452 -303
  338. package/lib/components/tabs/tabs.js.map +1 -0
  339. package/lib/components/tabs/tabs.styles.js +4 -0
  340. package/lib/components/tabs/tabs.styles.js.map +1 -0
  341. package/lib/components/tag/tag.js +236 -167
  342. package/lib/components/tag/tag.js.map +1 -0
  343. package/lib/components/tag/tag.styles.js +4 -0
  344. package/lib/components/tag/tag.styles.js.map +1 -0
  345. package/lib/components/tag-list/tag-list.js +40 -35
  346. package/lib/components/tag-list/tag-list.js.map +1 -0
  347. package/lib/components/tag-list/tag-list.styles.js +4 -0
  348. package/lib/components/tag-list/tag-list.styles.js.map +1 -0
  349. package/lib/components/tertiary-nav/tertiary-nav.js +40 -33
  350. package/lib/components/tertiary-nav/tertiary-nav.js.map +1 -0
  351. package/lib/components/tertiary-nav/tertiary-nav.styles.js +4 -0
  352. package/lib/components/tertiary-nav/tertiary-nav.styles.js.map +1 -0
  353. package/lib/components/tertiary-nav-item/tertiary-nav-item.js +52 -43
  354. package/lib/components/tertiary-nav-item/tertiary-nav-item.js.map +1 -0
  355. package/lib/components/tertiary-nav-item/tertiary-nav-item.styles.js +4 -0
  356. package/lib/components/tertiary-nav-item/tertiary-nav-item.styles.js.map +1 -0
  357. package/lib/components/text-link/text-link.js +45 -41
  358. package/lib/components/text-link/text-link.js.map +1 -0
  359. package/lib/components/text-link/text-link.styles.js +4 -0
  360. package/lib/components/text-link/text-link.styles.js.map +1 -0
  361. package/lib/components/text-passage/text-passage-light-dom.js +145 -0
  362. package/lib/components/text-passage/text-passage-light-dom.js.map +1 -0
  363. package/lib/components/text-passage/text-passage-light-dom.styles.js +4 -0
  364. package/lib/components/text-passage/text-passage-light-dom.styles.js.map +1 -0
  365. package/lib/components/text-passage/text-passage.js +72 -44
  366. package/lib/components/text-passage/text-passage.js.map +1 -0
  367. package/lib/components/text-passage/text-passage.styles.js +4 -0
  368. package/lib/components/text-passage/text-passage.styles.js.map +1 -0
  369. package/lib/components/tooltip/tooltip.js +278 -173
  370. package/lib/components/tooltip/tooltip.js.map +1 -0
  371. package/lib/components/tooltip/tooltip.styles.js +4 -0
  372. package/lib/components/tooltip/tooltip.styles.js.map +1 -0
  373. package/lib/components/utility-nav/utility-nav.js +40 -33
  374. package/lib/components/utility-nav/utility-nav.js.map +1 -0
  375. package/lib/components/utility-nav/utility-nav.styles.js +4 -0
  376. package/lib/components/utility-nav/utility-nav.styles.js.map +1 -0
  377. package/lib/components/utility-nav-item/utility-nav-item.js +70 -49
  378. package/lib/components/utility-nav-item/utility-nav-item.js.map +1 -0
  379. package/lib/components/utility-nav-item/utility-nav-item.styles.js +4 -0
  380. package/lib/components/utility-nav-item/utility-nav-item.styles.js.map +1 -0
  381. package/lib/design-tokens/brands/blue/css/tokens_blue.module.js +737 -0
  382. package/lib/design-tokens/brands/blue/css/tokens_blue.module.js.map +1 -0
  383. package/lib/design-tokens/brands/bolt/tokens_bolt.theme.js +756 -0
  384. package/lib/design-tokens/brands/bolt/tokens_bolt.theme.js.map +1 -0
  385. package/lib/design-tokens/brands/cre8/css/tokens_cre8.module.js +771 -0
  386. package/lib/design-tokens/brands/cre8/css/tokens_cre8.module.js.map +1 -0
  387. package/lib/design-tokens/brands/cre8-a2ui/css/tokens_cre8-a2ui.module.js +772 -0
  388. package/lib/design-tokens/brands/cre8-a2ui/css/tokens_cre8-a2ui.module.js.map +1 -0
  389. package/lib/design-tokens/brands/cre8-legacy/css/tokens_cre8-legacy.module.js +737 -0
  390. package/lib/design-tokens/brands/cre8-legacy/css/tokens_cre8-legacy.module.js.map +1 -0
  391. package/lib/design-tokens/brands/femmecubator/css/tokens_femmecubator2.module.js +983 -0
  392. package/lib/design-tokens/brands/femmecubator/css/tokens_femmecubator2.module.js.map +1 -0
  393. package/lib/design-tokens/brands/legacy/css/tokens_legacy.module.js +737 -0
  394. package/lib/design-tokens/brands/legacy/css/tokens_legacy.module.js.map +1 -0
  395. package/lib/design-tokens/brands/marketing/css/tokens_marketing.module.js +736 -0
  396. package/lib/design-tokens/brands/marketing/css/tokens_marketing.module.js.map +1 -0
  397. package/lib/design-tokens/brands/minimalist/css/tokens_minimalist.module.js +737 -0
  398. package/lib/design-tokens/brands/minimalist/css/tokens_minimalist.module.js.map +1 -0
  399. package/lib/design-tokens/brands/prisma/tokens_prisma.module.js +771 -0
  400. package/lib/design-tokens/brands/prisma/tokens_prisma.module.js.map +1 -0
  401. package/lib/design-tokens/brands/starbucks/tokens.module.js +552 -0
  402. package/lib/design-tokens/brands/starbucks/tokens.module.js.map +1 -0
  403. package/lib/design-tokens/brands/starbucks/tokens_starbucks.module.js +776 -0
  404. package/lib/design-tokens/brands/starbucks/tokens_starbucks.module.js.map +1 -0
  405. package/lib/design-tokens/brands copy/blue/css/tokens_blue.module.js +253 -0
  406. package/lib/design-tokens/brands copy/blue/css/tokens_blue.module.js.map +1 -0
  407. package/lib/design-tokens/core/scss/theming/head.module.js +6 -0
  408. package/lib/design-tokens/core/scss/theming/head.module.js.map +1 -0
  409. package/lib/design-tokens/tokens_netflix.theme.js +806 -0
  410. package/lib/design-tokens/tokens_netflix.theme.js.map +1 -0
  411. package/lib/directives/if-truthy.js +24 -0
  412. package/lib/directives/if-truthy.js.map +1 -0
  413. package/lib/directives/spread.js +29 -0
  414. package/lib/directives/spread.js.map +1 -0
  415. package/lib/index.js +84 -168
  416. package/lib/index.js.map +1 -0
  417. package/lib/scripts/convert-scss-to-ts.js +25 -0
  418. package/lib/scripts/convert-scss-to-ts.js.map +1 -0
  419. package/lib/scripts/extract-tokens.js +120 -0
  420. package/lib/scripts/extract-tokens.js.map +1 -0
  421. package/lib/scripts/generate-react-wrappers.js +229 -0
  422. package/lib/scripts/generate-react-wrappers.js.map +1 -0
  423. package/lib/scripts/generateWesparkleThemes.js +52 -0
  424. package/lib/scripts/generateWesparkleThemes.js.map +1 -0
  425. package/lib/toBeAccessible.js +18 -0
  426. package/lib/toBeAccessible.js.map +1 -0
  427. package/lib/utilities/is-mobile.js +10 -0
  428. package/lib/utilities/is-mobile.js.map +1 -0
  429. package/lib/utilities/story-helpers.js +14 -0
  430. package/lib/utilities/story-helpers.js.map +1 -0
  431. package/lib/vite.config.cdn.js +85 -0
  432. package/lib/vite.config.cdn.js.map +1 -0
  433. package/lib/vite.config.js +156 -0
  434. package/lib/vite.config.js.map +1 -0
  435. package/package.json +8 -9
@@ -1,183 +1,269 @@
1
- import { ifDefined as b } from "lit-html/directives/if-defined.js";
2
- import { css as f, html as l, nothing as n } from "lit";
3
- import { property as o, state as m } from "lit/decorators.js";
4
- import { nanoid as h } from "nanoid";
5
- import { Cre8Element as y } from "../cre8-element.js";
6
- import "../remove-tag/remove-tag.js";
7
- import "../field-note/field-note.js";
8
- import "../button/button.js";
9
- import "../checkbox-field-item/checkbox-field-item.js";
10
- const g = `<svg fill="currentColor" width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
11
- <path d="M15.7869 4.87827L8.51452 12.1506C8.44698 12.2182 8.36677 12.2719 8.27849 12.3085C8.1902 12.3451 8.09557 12.3639 8 12.3639C7.90443 12.3639 7.8098 12.3451 7.72151 12.3085C7.63323 12.2719 7.55302 12.2182 7.48548 12.1506L0.213121 4.87827C0.0766618 4.74181 0 4.55673 0 4.36375C0 4.17077 0.0766618 3.98569 0.213121 3.84923C0.34958 3.71277 0.534658 3.63611 0.72764 3.63611C0.920622 3.63611 1.1057 3.71277 1.24216 3.84923L8 10.608L14.7578 3.84923C14.8254 3.78166 14.9056 3.72806 14.9939 3.6915C15.0822 3.65493 15.1768 3.63611 15.2724 3.63611C15.3679 3.63611 15.4625 3.65493 15.5508 3.6915C15.6391 3.72806 15.7193 3.78166 15.7869 3.84923C15.8544 3.9168 15.908 3.99701 15.9446 4.08529C15.9812 4.17357 16 4.26819 16 4.36375C16 4.4593 15.9812 4.55392 15.9446 4.6422C15.908 4.73049 15.8544 4.8107 15.7869 4.87827Z"/>
12
- </svg>
13
- `, v = `<svg fill="currentColor" width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
14
- <path d="M10.8969 5.97385L8.87 8L10.8969 10.0262C10.9541 10.0833 10.9995 10.1512 11.0304 10.2259C11.0613 10.3006 11.0773 10.3807 11.0773 10.4615C11.0773 10.5424 11.0613 10.6225 11.0304 10.6972C10.9995 10.7719 10.9541 10.8397 10.8969 10.8969C10.8397 10.9541 10.7719 10.9994 10.6972 11.0304C10.6225 11.0613 10.5424 11.0773 10.4615 11.0773C10.3807 11.0773 10.3006 11.0613 10.2259 11.0304C10.1512 10.9994 10.0833 10.9541 10.0262 10.8969L8 8.87L5.97385 10.8969C5.91667 10.9541 5.8488 10.9994 5.77409 11.0304C5.69939 11.0613 5.61932 11.0773 5.53846 11.0773C5.45761 11.0773 5.37754 11.0613 5.30283 11.0304C5.22813 10.9994 5.16025 10.9541 5.10308 10.8969C5.0459 10.8397 5.00055 10.7719 4.96961 10.6972C4.93866 10.6225 4.92274 10.5424 4.92274 10.4615C4.92274 10.3807 4.93866 10.3006 4.96961 10.2259C5.00055 10.1512 5.0459 10.0833 5.10308 10.0262L7.13 8L5.10308 5.97385C4.98761 5.85837 4.92274 5.70176 4.92274 5.53846C4.92274 5.37516 4.98761 5.21855 5.10308 5.10308C5.21855 4.9876 5.37516 4.92273 5.53846 4.92273C5.70176 4.92273 5.85838 4.9876 5.97385 5.10308L8 7.13L10.0262 5.10308C10.0833 5.0459 10.1512 5.00055 10.2259 4.9696C10.3006 4.93866 10.3807 4.92273 10.4615 4.92273C10.5424 4.92273 10.6225 4.93866 10.6972 4.9696C10.7719 5.00055 10.8397 5.0459 10.8969 5.10308C10.9541 5.16025 10.9995 5.22813 11.0304 5.30283C11.0613 5.37753 11.0773 5.4576 11.0773 5.53846C11.0773 5.61932 11.0613 5.69939 11.0304 5.77409C10.9995 5.84879 10.9541 5.91667 10.8969 5.97385ZM16 8C16 9.58225 15.5308 11.129 14.6518 12.4446C13.7727 13.7602 12.5233 14.7855 11.0615 15.391C9.59966 15.9965 7.99113 16.155 6.43928 15.8463C4.88743 15.5376 3.46197 14.7757 2.34315 13.6569C1.22433 12.538 0.462403 11.1126 0.153721 9.56072C-0.15496 8.00887 0.00346628 6.40034 0.608967 4.93853C1.21447 3.47672 2.23985 2.22729 3.55544 1.34824C4.87103 0.469192 6.41775 0 8 0C10.121 0.00223986 12.1546 0.845814 13.6544 2.34562C15.1542 3.84542 15.9978 5.87895 16 8ZM14.7692 8C14.7692 6.66117 14.3722 5.35241 13.6284 4.23922C12.8846 3.12602 11.8274 2.25839 10.5905 1.74605C9.35356 1.2337 7.99249 1.09965 6.67939 1.36084C5.36629 1.62203 4.16013 2.26674 3.21343 3.21343C2.26674 4.16012 1.62203 5.36629 1.36084 6.67939C1.09965 7.99249 1.2337 9.35356 1.74605 10.5905C2.2584 11.8274 3.12603 12.8846 4.23922 13.6284C5.35241 14.3722 6.66117 14.7692 8 14.7692C9.79469 14.7672 11.5153 14.0534 12.7843 12.7843C14.0534 11.5153 14.7672 9.79468 14.7692 8Z"/>
15
- </svg>
16
- `, _ = f`*,::slotted(*),*:before,*:after{box-sizing:border-box}:root{--size-base-unit: 0.5rem}[dir=rtl]{--rtlTranslateX: 50%;--rtlGradientToRight: 270deg;--rtlRotate45Inverse: -45deg}:host{--cre8-z-index-1: 1;--cre8-z-index-50: 50;--cre8-z-index-100: 100;--cre8-z-index-200: 200;--cre8-z-index-1030: 1030;--cre8-anim-fade-quick: 0.35s;--cre8-anim-ease: ease}@keyframes fadeIn{100%{opacity:1}}@keyframes slideIn{100%{transform:translateX(0)}}@keyframes slideInFwd{100%{width:272px;height:272px}}@keyframes slideOutRight{100%{width:272px;height:272px}}@keyframes slideUp{100%{transform:translateY(0)}}@media(width >= 481px){@keyframes slideInFwd{100%{width:417px;height:417px}}@keyframes slideOutRight{100%{width:417px;height:417px}}}@media(width >= 48rem){@keyframes slideInFwd{100%{width:330px;height:330px}}@keyframes slideOutRight{100%{width:330px;height:330px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 60rem){@keyframes slideInFwd{100%{width:460px;height:460px}}@keyframes slideOutRight{100%{width:460px;height:460px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 75rem){@keyframes slideInFwd{100%{width:592px;height:591px}}@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 87.5rem){@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 120px))}}}@media(width >= 2200px){@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 592px))}}}span.ripple{position:absolute;border-radius:50%;transform:scale(0);animation:ripple 600ms linear;background-color:var(--ripple-bg-color)}@keyframes ripple{to{transform:scale(4);opacity:1}}:root{--size-base-unit: 0.5rem}[dir=rtl]{--rtlTranslateX: 50%;--rtlGradientToRight: 270deg;--rtlRotate45Inverse: -45deg}:host{display:block}.cre8-c-multi-select{position:relative}.cre8-c-multi-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-multi-select__body{display:flex;align-items:center;justify-content:space-between;position:relative;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-multi-select__body:hover:not(:disabled),.cre8-c-multi-select__body:focus:not(:disabled),.cre8-c-multi-select__body:active:not(:disabled),.cre8-c-multi-select__body:focus-visible{outline:var(--cre8-border-width-focus) solid var(--cre8-color-border-active-outline);outline-offset:0.125rem}.cre8-is-error .cre8-c-multi-select__body:hover:not(:disabled),.cre8-is-error .cre8-c-multi-select__body:focus:not(:disabled),.cre8-is-error .cre8-c-multi-select__body:active:not(:disabled),.cre8-is-error .cre8-c-multi-select__body:focus-visible{outline-color:var(--cre8-color-border-error)}.cre8-is-success .cre8-c-multi-select__body:hover:not(:disabled),.cre8-is-success .cre8-c-multi-select__body:focus:not(:disabled),.cre8-is-success .cre8-c-multi-select__body:active:not(:disabled),.cre8-is-success .cre8-c-multi-select__body:focus-visible{outline-color:var(--cre8-color-border-success)}.cre8-c-multi-select__body: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-multi-select__body:disabled::placeholder{color:var(--cre8-color-content-disabled)}.cre8-c-multi-select__body::placeholder{color:var(--cre8-color-content-subtle)}.cre8-is-error .cre8-c-multi-select__body{border-color:var(--cre8-color-border-error)}.cre8-is-success .cre8-c-multi-select__body{border-color:var(--cre8-color-border-success)}.cre8-c-multi-select__body{padding:var(--cre8-spacing-8);padding-inline-end:2.75rem;min-width:240px;cursor:pointer;min-height:3rem;height:fit-content}.cre8-is-disabled .cre8-c-multi-select__body{box-shadow:none;background-color:var(--cre8-color-bg-disabled);border-color:var(--cre8-color-border-disabled);cursor:not-allowed;outline:none}.cre8-is-disabled .cre8-c-multi-select__body:hover,.cre8-is-disabled .cre8-c-multi-select__body:focus,.cre8-is-disabled .cre8-c-multi-select__body:active,.cre8-is-disabled .cre8-c-multi-select__body:focus-visible{outline:none;background-color:var(--cre8-color-bg-disabled);border-color:var(--cre8-color-border-disabled);color:var(--cre8-color-content-disabled)}.cre8-is-disabled .cre8-c-multi-select__body .cre8-c-multi-select__content{border-color:var(--cre8-color-border-disabled)}.cre8-c-multi-select__content{display:flex;min-height:30px;width:100%;border-right:var(--cre8-border-width-default) var(--cre8-border-style-default) var(--cre8-color-border-strong);padding-right:2.75rem}.cre8-c-multi-select__tag-wrapper{list-style-type:none;margin:0;padding:0;display:flex;flex-wrap:wrap;height:100%;gap:0.25rem}.cre8-c-multi-select__icons-wrapper{display:flex;justify-content:end;margin-right:-36px;margin-left:-48px;gap:1.5rem;min-width:96px}.cre8-c-multi-select__icons-wrapper button{background-color:inherit;border:none;padding:none}.cre8-is-disabled .cre8-c-multi-select__icons-wrapper button{cursor:not-allowed}.cre8-c-multi-select--no-clear-icon .cre8-c-multi-select__clear_icon{display:none}cre8-icon{display:flex;pointer-events:none;color:var(--cre8-color-button-tertiary-content)}.cre8-is-disabled cre8-icon{color:var(--cre8-color-border-disabled)}.cre8-c-multi-select__dropdown{background-color:var(--cre8-color-bg-default);border:var(--cre8-border-width-default) var(--cre8-border-style-default) var(--cre8-color-border-strong);box-shadow:var(--cre8-shadow-default);border-radius:var(--cre8-border-radius-default);flex-direction:column;left:0;min-width:100%;position:absolute;top:100%;white-space:nowrap;margin-top:var(--cre8-spacing-4);margin-left:0;padding:var(--cre8-spacing-8)}.cre8-c-multi-select__dropdown ul{list-style-type:none;padding:0;margin:0}.cre8-c-multi-select__dropdown li{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);background-color:var(--cre8-color-bg-default);border:var(--cre8-border-width-focus) var(--cre8-border-style-default) var(--cre8-color-border-transparent);border-radius:var(--cre8-border-radius-default);color:var(--cre8-color-content-default);width:100%;cursor:pointer;margin:var(--cre8-spacing-0);padding:var(--cre8-spacing-8) var(--cre8-spacing-8);text-align:left}.cre8-c-multi-select__dropdown li:active,.cre8-c-multi-select__dropdown li:hover,.cre8-c-multi-select__dropdown li:focus{background-color:var(--cre8-color-bg-brand-hover);color:var(--cre8-color-content-default);outline:var(--cre8-border-width-none);border:var(--cre8-border-width-focus) var(--cre8-border-style-default) var(--cre8-color-border-active-outline)}.cre8-c-multi-select__field-note,.cre8-c-multi-select__field-note-success,.cre8-c-multi-select__field-note-error{flex-basis:100%}`;
17
- var w = Object.defineProperty, i = (u, e, t, s) => {
18
- for (var c = void 0, a = u.length - 1, d; a >= 0; a--)
19
- (d = u[a]) && (c = d(e, t, c) || c);
20
- return c && w(e, t, c), c;
1
+ /* eslint-disable import/no-duplicates */
2
+ /* eslint-disable no-duplicate-imports */
3
+ /* eslint-disable lit/no-template-arrow */
4
+ /* eslint-disable indent */
5
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
6
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
7
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
8
+ 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;
9
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
21
10
  };
22
- const p = class p extends y {
23
- /* Life Cycle Methods */
24
- constructor() {
25
- super(), this.items = [], this.selectedTagItems = [], this.dropdownOpen = !1, this._handleOnClick = this._handleOnClick.bind(this);
26
- }
27
- firstUpdated() {
28
- this.preselectedItems && this.setPreselectedItemsinDropdown(), this.selectedTagItems = this.preselectedItems || [], this._initializeAria();
29
- }
30
- connectedCallback() {
31
- super.connectedCallback(), window.addEventListener("click", this._handleOnClick, !1);
32
- }
33
- disconnectedCallback() {
34
- super.disconnectedCallback(), window.removeEventListener("click", this._handleOnClick, !1);
35
- }
36
- /* HTML Content functions */
37
- _renderDropdownItems() {
38
- return this.items.map(
39
- // Note: Keyboard can already navigate to the checkbox
40
- // eslint-disable-next-line lit-a11y/click-events-have-key-events
41
- (e, t) => l`<li
42
- @click="${(s) => this._handleListItemClick(s, t)}"
11
+ import { ifDefined } from 'lit-html/directives/if-defined.js';
12
+ import { html, nothing, } from 'lit';
13
+ import { property, state } from 'lit/decorators.js';
14
+ import { nanoid } from 'nanoid';
15
+ import svgCaretDown from '/Users/tylersmbp/Projects/cre8-web-components/packages/cre8-wc/icons/System/Regular/Caret_Down.svg?raw';
16
+ import svgClear from '/Users/tylersmbp/Projects/cre8-web-components/packages/cre8-wc/icons/System/Regular/Clear_X.svg?raw';
17
+ import styles from './multi-select.styles.js';
18
+ import { Cre8Element } from '../cre8-element';
19
+ import '../remove-tag/remove-tag';
20
+ import '../field-note/field-note';
21
+ import '../button/button';
22
+ import '../checkbox-field-item/checkbox-field-item';
23
+ /**
24
+ * Multiselect is used when multiple options can be chosen from a static dropdown
25
+ * This component has a list of items in the dropdown that can be added as "selected tags"
26
+ * The checkbox will always reflect the selected nature of the item and is not removed
27
+ * from the dropdown when clicked, the tags will be added and removed based on their state.
28
+ *
29
+ * Event `selectedItemsChange` emits whenever a tag is added or remove from the list and the
30
+ * current list after the change is given in the detail.
31
+ */
32
+ export class Cre8MultiSelect extends Cre8Element {
33
+ /* Life Cycle Methods */
34
+ constructor() {
35
+ super();
36
+ /**
37
+ * The list of string items the user can choose in the dropdown
38
+ *
39
+ * Note: For passing props containing arrays and complex types, you should pass the props using a
40
+ * period in from of the prop like so: `.items="[]"`
41
+ * (this is only needed for Web Components and not the React version)
42
+ * @attr {string[]}
43
+ */
44
+ this.items = [];
45
+ this.selectedTagItems = [];
46
+ this.dropdownOpen = false;
47
+ this._handleOnClick = this._handleOnClick.bind(this);
48
+ }
49
+ firstUpdated() {
50
+ if (this.preselectedItems)
51
+ this.setPreselectedItemsinDropdown();
52
+ this.selectedTagItems = this.preselectedItems || [];
53
+ this._initializeAria();
54
+ }
55
+ connectedCallback() {
56
+ super.connectedCallback();
57
+ window.addEventListener('click', this._handleOnClick, false);
58
+ }
59
+ disconnectedCallback() {
60
+ super.disconnectedCallback();
61
+ window.removeEventListener('click', this._handleOnClick, false);
62
+ }
63
+ /* HTML Content functions */
64
+ _renderDropdownItems() {
65
+ return this.items.map(
66
+ // Note: Keyboard can already navigate to the checkbox
67
+ // eslint-disable-next-line lit-a11y/click-events-have-key-events
68
+ (item, index) => html `<li
69
+ @click="${(e) => this._handleListItemClick(e, index)}"
43
70
  >
44
71
  <cre8-checkbox-field-item
45
- .checked="${!!this.selectedTagItems.includes(e)}"
46
- label=${e}
47
- id=${t}
48
- @input="${(s) => this._handleDropdownItemInput(e, s)}"
72
+ .checked="${!!this.selectedTagItems.includes(item)}"
73
+ label=${item}
74
+ id=${index}
75
+ @input="${(e) => this._handleDropdownItemInput(item, e)}"
49
76
  >
50
77
  </cre8-checkbox-field-item>
51
- </li>`
52
- );
53
- }
54
- _renderSelectedTags() {
55
- return this.selectedTagItems.length ? this.selectedTagItems.map(
56
- (e) => l`<li>
78
+ </li>`);
79
+ }
80
+ _renderSelectedTags() {
81
+ if (!this.selectedTagItems.length) {
82
+ return nothing;
83
+ }
84
+ return this.selectedTagItems.map((item) => html `<li>
57
85
  <cre8-remove-tag
58
- text="${e}"
86
+ text="${item}"
59
87
  color="neutral"
60
88
  shape="square"
61
89
  ?disabled="${this.disabled}"
62
- @removeTagClicked="${() => this._handleRemoveTagClick(e)}"
90
+ @removeTagClicked="${() => this._handleRemoveTagClick(item)}"
63
91
  ></cre8-remove-tag>
64
- </li>`
65
- ) : n;
66
- }
67
- /* Helper Functions */
68
- setPreselectedItemsinDropdown() {
69
- this.preselectedItems.forEach((e) => {
70
- this.selectedTagItems = this.selectedTagItems.concat(e);
71
- });
72
- }
73
- clearAllTags() {
74
- this.disabled || (this.dropdownOpen && this.selectedTagItems.forEach((e) => {
75
- this.shadowRoot?.querySelector(`cre8-checkbox-field-item[label="${e}"]`).shadowRoot?.querySelector("input").click();
76
- }), this.selectedTagItems = [], this.emitSelectedItems());
77
- }
78
- emitSelectedItems() {
79
- const e = new CustomEvent("selectedItemsChange", {
80
- detail: {
81
- selectedItems: this.selectedTagItems
82
- },
83
- bubbles: !0,
84
- composed: !0
85
- });
86
- this.dispatchEvent(e);
87
- }
88
- toggleDropDown() {
89
- this.dropdownOpen = !this.dropdownOpen;
90
- }
91
- /* Click Event Functions */
92
- _handleOnClick(e) {
93
- if (!this.shadowRoot?.host)
94
- throw Error(
95
- "Could not determine navigation context during click handler"
96
- );
97
- const t = e.composedPath().includes(this.shadowRoot.host), s = this.renderRoot.querySelector(
98
- ".cre8-c-multi-select__label"
99
- ), c = this.renderRoot.querySelector(
100
- ".cre8-c-multi-select__icons-wrapper"
101
- ), a = this.shadowRoot?.querySelector(
102
- ".cre8-c-multi-select__tag-wrapper"
103
- ), d = this.shadowRoot?.querySelector(
104
- ".cre8-c-multi-select__dropdown"
105
- );
106
- t ? !e.composedPath().includes(s) && !e.composedPath().includes(a) && !e.composedPath().includes(c) && !e.composedPath().includes(d) && !this.disabled && this.toggleDropDown() : this.dropdownOpen = !1;
107
- }
108
- _handleListItemClick(e, t) {
109
- e.target !== this.shadowRoot?.querySelector(`cre8-checkbox-field-item[id="${t}"]`) && this.shadowRoot?.querySelector(`cre8-checkbox-field-item[id="${t}"]`).shadowRoot?.querySelector("input").click();
110
- }
111
- _handleDropdownItemInput(e, t) {
112
- t.target.checked ? this.selectedTagItems = this.selectedTagItems.concat(e) : this.selectedTagItems = this.selectedTagItems.filter((c) => c !== e), this.emitSelectedItems();
113
- }
114
- async _handleRemoveTagClick(e) {
115
- this.disabled || (this.selectedTagItems = this.selectedTagItems.filter((t) => t !== e), this.shadowRoot?.querySelector(`cre8-checkbox-field-item[label="${e}"]`).shadowRoot?.querySelector("input").click(), await this.updateComplete, this.emitSelectedItems());
116
- }
117
- dropdownArrowClick() {
118
- this.disabled || this.toggleDropDown();
119
- }
120
- _handleButtonToListKeydown(e) {
121
- e.code === "Escape" && (e.preventDefault(), this.toggleDropDown());
122
- }
123
- _handleListKeydown(e) {
124
- e.code === "Escape" && (e.preventDefault(), this.toggleDropDown());
125
- }
126
- _initializeAria() {
127
- this.fieldId = this.fieldId || h(), (this.fieldNote || this.slotNotEmpty("fieldNote")) && (this.ariaDescribedBy = this.ariaDescribedBy || h()), (this.successNote || this.errorNote) && (this.validationAriaDescribedBy = this.validationAriaDescribedBy || h());
128
- }
129
- /**
130
- * Aria describedby string based on field notes and error/success notes
131
- * 1) If both validationAriaDescribedBy (error/success note) and field note exists,
132
- * render both in the input's `aria-describedby` attribute
133
- * 2) Otherwise, if only validationAriaDescribedBy exists, then render only that as
134
- * the `aria-describedby` attribute (input without field note initially, but then error/success is added).
135
- * 3) Otherwise, render only the `ariaDescribedBy` property (field note only)
136
- */
137
- _fieldNoteAria() {
138
- return this.validationAriaDescribedBy && this.ariaDescribedBy ? `${this.ariaDescribedBy} ${this.validationAriaDescribedBy}` : this.validationAriaDescribedBy && !this.ariaDescribedBy ? this.validationAriaDescribedBy : this.ariaDescribedBy;
139
- }
140
- /**
141
- * Render the success or error field notes
142
- * 1. If there is a successNote, then return the field note with the success message and state.
143
- * 2. If there is a errorNote, then return the field note with the error message and state.
144
- */
145
- _renderSuccessErrorFieldNote() {
146
- return this.successNote ? l` <cre8-field-note
92
+ </li>`);
93
+ }
94
+ /* Helper Functions */
95
+ setPreselectedItemsinDropdown() {
96
+ this.preselectedItems.forEach((item) => {
97
+ this.selectedTagItems = this.selectedTagItems.concat(item);
98
+ });
99
+ }
100
+ clearAllTags() {
101
+ if (!this.disabled) {
102
+ if (this.dropdownOpen) {
103
+ this.selectedTagItems.forEach((item) => {
104
+ this.shadowRoot
105
+ ?.querySelector(`cre8-checkbox-field-item[label="${item}"]`)
106
+ .shadowRoot?.querySelector('input')
107
+ .click();
108
+ });
109
+ }
110
+ this.selectedTagItems = [];
111
+ this.emitSelectedItems();
112
+ }
113
+ }
114
+ emitSelectedItems() {
115
+ const customEvent = new CustomEvent('selectedItemsChange', {
116
+ detail: {
117
+ selectedItems: this.selectedTagItems,
118
+ },
119
+ bubbles: true,
120
+ composed: true,
121
+ });
122
+ this.dispatchEvent(customEvent);
123
+ }
124
+ toggleDropDown() {
125
+ this.dropdownOpen = !this.dropdownOpen;
126
+ }
127
+ /* Click Event Functions */
128
+ _handleOnClick(event) {
129
+ if (!this.shadowRoot?.host) {
130
+ throw Error('Could not determine navigation context during click handler');
131
+ }
132
+ const didClickInside = event.composedPath().includes(this.shadowRoot.host);
133
+ const label = this.renderRoot.querySelector('.cre8-c-multi-select__label');
134
+ const buttonsWrapper = this.renderRoot.querySelector('.cre8-c-multi-select__icons-wrapper');
135
+ const removeTagWrapper = this.shadowRoot?.querySelector('.cre8-c-multi-select__tag-wrapper');
136
+ const dropdownWrapper = this.shadowRoot?.querySelector('.cre8-c-multi-select__dropdown');
137
+ if (!didClickInside) {
138
+ this.dropdownOpen = false;
139
+ }
140
+ else if (!event.composedPath().includes(label)
141
+ && !event.composedPath().includes(removeTagWrapper)
142
+ && !event.composedPath().includes(buttonsWrapper)
143
+ && !event.composedPath().includes(dropdownWrapper)
144
+ && !this.disabled) {
145
+ this.toggleDropDown();
146
+ }
147
+ }
148
+ _handleListItemClick(e, index) {
149
+ if (e.target
150
+ !== this.shadowRoot?.querySelector(`cre8-checkbox-field-item[id="${index}"]`)) {
151
+ this.shadowRoot
152
+ ?.querySelector(`cre8-checkbox-field-item[id="${index}"]`)
153
+ .shadowRoot?.querySelector('input')
154
+ .click();
155
+ }
156
+ }
157
+ _handleDropdownItemInput(item, e) {
158
+ const targetCheckbox = e.target;
159
+ if (targetCheckbox.checked) {
160
+ this.selectedTagItems = this.selectedTagItems.concat(item);
161
+ }
162
+ else {
163
+ this.selectedTagItems = this.selectedTagItems.filter((i) => i !== item);
164
+ }
165
+ this.emitSelectedItems();
166
+ }
167
+ async _handleRemoveTagClick(item) {
168
+ if (!this.disabled) {
169
+ this.selectedTagItems = this.selectedTagItems.filter((i) => i !== item);
170
+ this.shadowRoot
171
+ ?.querySelector(`cre8-checkbox-field-item[label="${item}"]`)
172
+ .shadowRoot?.querySelector('input')
173
+ .click();
174
+ await this.updateComplete;
175
+ this.emitSelectedItems();
176
+ }
177
+ }
178
+ dropdownArrowClick() {
179
+ if (!this.disabled) {
180
+ this.toggleDropDown();
181
+ }
182
+ }
183
+ _handleButtonToListKeydown(e) {
184
+ if (e.code === 'Escape') {
185
+ e.preventDefault();
186
+ this.toggleDropDown();
187
+ }
188
+ }
189
+ _handleListKeydown(e) {
190
+ if (e.code === 'Escape') {
191
+ e.preventDefault();
192
+ this.toggleDropDown();
193
+ }
194
+ }
195
+ _initializeAria() {
196
+ this.fieldId = this.fieldId || nanoid();
197
+ if (this.fieldNote || this.slotNotEmpty('fieldNote')) {
198
+ this.ariaDescribedBy = this.ariaDescribedBy || nanoid();
199
+ }
200
+ if (this.successNote || this.errorNote) {
201
+ this.validationAriaDescribedBy = this.validationAriaDescribedBy || nanoid();
202
+ }
203
+ }
204
+ /**
205
+ * Aria describedby string based on field notes and error/success notes
206
+ * 1) If both validationAriaDescribedBy (error/success note) and field note exists,
207
+ * render both in the input's `aria-describedby` attribute
208
+ * 2) Otherwise, if only validationAriaDescribedBy exists, then render only that as
209
+ * the `aria-describedby` attribute (input without field note initially, but then error/success is added).
210
+ * 3) Otherwise, render only the `ariaDescribedBy` property (field note only)
211
+ */
212
+ _fieldNoteAria() {
213
+ if (this.validationAriaDescribedBy && this.ariaDescribedBy) {
214
+ return `${this.ariaDescribedBy} ${this.validationAriaDescribedBy}`; /* 1 */
215
+ }
216
+ if (this.validationAriaDescribedBy && !this.ariaDescribedBy) {
217
+ return this.validationAriaDescribedBy; /* 2 */
218
+ }
219
+ return this.ariaDescribedBy; /* 3 */
220
+ }
221
+ /**
222
+ * Render the success or error field notes
223
+ * 1. If there is a successNote, then return the field note with the success message and state.
224
+ * 2. If there is a errorNote, then return the field note with the error message and state.
225
+ */
226
+ _renderSuccessErrorFieldNote() {
227
+ if (this.successNote) {
228
+ /* 1 */
229
+ return html ` <cre8-field-note
147
230
  ?isSuccess=${this.isSuccess}
148
231
  id=${this.validationAriaDescribedBy}
149
232
  class="cre8-c-multi-select__field-note-success"
150
233
  iconName="success"
151
234
  >
152
235
  ${this.successNote}
153
- </cre8-field-note>` : this.errorNote ? l` <cre8-field-note
236
+ </cre8-field-note>`;
237
+ }
238
+ if (this.errorNote) {
239
+ /* 2 */
240
+ return html ` <cre8-field-note
154
241
  ?isError=${this.isError}
155
242
  id=${this.validationAriaDescribedBy}
156
243
  class="cre8-c-multi-select__field-note-error"
157
244
  iconName="error-alt"
158
245
  >
159
246
  ${this.errorNote}
160
- </cre8-field-note>` : null;
161
- }
162
- render() {
163
- const e = this.componentClassNames(
164
- "cre8-c-multi-select",
165
- {
166
- "cre8-is-error": this.isError,
167
- "cre8-is-success": this.isSuccess,
168
- "cre8-is-disabled": this.disabled,
169
- "cre8-c-multi-select--no-clear-icon": !this.selectedTagItems.length
170
- }
171
- );
172
- return l`
173
- <div class="${e}">
247
+ </cre8-field-note>`;
248
+ }
249
+ return null;
250
+ }
251
+ render() {
252
+ const componentClassNames = this.componentClassNames('cre8-c-multi-select', {
253
+ 'cre8-is-error': this.isError,
254
+ 'cre8-is-success': this.isSuccess,
255
+ 'cre8-is-disabled': this.disabled,
256
+ 'cre8-c-multi-select--no-clear-icon': !this.selectedTagItems.length,
257
+ });
258
+ return html `
259
+ <div class="${componentClassNames}">
174
260
  <label class="cre8-c-multi-select__label" id="${this.fieldId}"
175
261
  >${this.label}</label
176
262
  >
177
263
  <div class="cre8-c-multi-select__body" ?disabled=${this.disabled}>
178
264
  <div
179
265
  class="cre8-c-multi-select__content"
180
- aria-describedby="${b(this._fieldNoteAria())}"
266
+ aria-describedby="${ifDefined(this._fieldNoteAria())}"
181
267
  >
182
268
  <ul
183
269
  class="cre8-c-multi-select__tag-wrapper"
@@ -188,8 +274,8 @@ const p = class p extends y {
188
274
  </div>
189
275
  <div class="cre8-c-multi-select__icons-wrapper">
190
276
  <cre8-button
191
- ?hideText=${!0}
192
- svg="${v}"
277
+ ?hideText=${true}
278
+ svg="${svgClear}"
193
279
  text="Clear All"
194
280
  variant="tertiary"
195
281
  ?disabled="${this.disabled}"
@@ -198,8 +284,8 @@ const p = class p extends y {
198
284
  >
199
285
  </cre8-button>
200
286
  <cre8-button
201
- ?hideText=${!0}
202
- svg="${g}"
287
+ ?hideText=${true}
288
+ svg="${svgCaretDown}"
203
289
  variant="tertiary"
204
290
  ?disabled="${this.disabled}"
205
291
  class="cre8-c-multi-select__down_icon"
@@ -212,7 +298,8 @@ const p = class p extends y {
212
298
  </cre8-button>
213
299
  </div>
214
300
  </div>
215
- ${this.dropdownOpen ? l`
301
+ ${this.dropdownOpen
302
+ ? html `
216
303
  <fieldset class="cre8-c-multi-select__dropdown" aria-describedby="${this.fieldId}">
217
304
  <ul
218
305
  aria-label="available items"
@@ -220,64 +307,66 @@ const p = class p extends y {
220
307
  >
221
308
  ${this._renderDropdownItems()}
222
309
  </ul>
223
- </fieldset>` : n}
310
+ </fieldset>`
311
+ : nothing}
224
312
  </div>
225
- ${this.fieldNote || this.slotNotEmpty("fieldNote") ? l`<cre8-field-note
313
+ ${this.fieldNote || this.slotNotEmpty('fieldNote')
314
+ ? html `<cre8-field-note
226
315
  id=${this.ariaDescribedBy}
227
316
  class="cre8-c-multi-select__field-note"
228
317
  >
229
318
  <slot name="fieldNote">${this.fieldNote}</slot>
230
- </cre8-field-note>` : n}
319
+ </cre8-field-note>`
320
+ : nothing}
231
321
  ${this._renderSuccessErrorFieldNote()}
232
322
  `;
233
- }
234
- };
235
- p.styles = [_];
236
- let r = p;
237
- i([
238
- o({ type: Array })
239
- ], r.prototype, "items");
240
- i([
241
- m()
242
- ], r.prototype, "selectedTagItems");
243
- i([
244
- o({ type: Array })
245
- ], r.prototype, "preselectedItems");
246
- i([
247
- m()
248
- ], r.prototype, "dropdownOpen");
249
- i([
250
- o()
251
- ], r.prototype, "label");
252
- i([
253
- o()
254
- ], r.prototype, "fieldId");
255
- i([
256
- o()
257
- ], r.prototype, "fieldNote");
258
- i([
259
- o()
260
- ], r.prototype, "ariaDescribedBy");
261
- i([
262
- o()
263
- ], r.prototype, "validationAriaDescribedBy");
264
- i([
265
- o({ type: Boolean, reflect: !0 })
266
- ], r.prototype, "disabled");
267
- i([
268
- o({ type: Boolean, reflect: !0 })
269
- ], r.prototype, "isError");
270
- i([
271
- o()
272
- ], r.prototype, "errorNote");
273
- i([
274
- o({ type: Boolean, reflect: !0 })
275
- ], r.prototype, "isSuccess");
276
- i([
277
- o()
278
- ], r.prototype, "successNote");
279
- customElements.get("cre8-multi-select") === void 0 && customElements.define("cre8-multi-select", r);
280
- export {
281
- r as Cre8MultiSelect,
282
- r as default
283
- };
323
+ }
324
+ }
325
+ Cre8MultiSelect.styles = [styles];
326
+ __decorate([
327
+ property({ type: Array })
328
+ ], Cre8MultiSelect.prototype, "items", void 0);
329
+ __decorate([
330
+ state()
331
+ ], Cre8MultiSelect.prototype, "selectedTagItems", void 0);
332
+ __decorate([
333
+ property({ type: Array })
334
+ ], Cre8MultiSelect.prototype, "preselectedItems", void 0);
335
+ __decorate([
336
+ state()
337
+ ], Cre8MultiSelect.prototype, "dropdownOpen", void 0);
338
+ __decorate([
339
+ property()
340
+ ], Cre8MultiSelect.prototype, "label", void 0);
341
+ __decorate([
342
+ property()
343
+ ], Cre8MultiSelect.prototype, "fieldId", void 0);
344
+ __decorate([
345
+ property()
346
+ ], Cre8MultiSelect.prototype, "fieldNote", void 0);
347
+ __decorate([
348
+ property()
349
+ ], Cre8MultiSelect.prototype, "ariaDescribedBy", void 0);
350
+ __decorate([
351
+ property()
352
+ ], Cre8MultiSelect.prototype, "validationAriaDescribedBy", void 0);
353
+ __decorate([
354
+ property({ type: Boolean, reflect: true })
355
+ ], Cre8MultiSelect.prototype, "disabled", void 0);
356
+ __decorate([
357
+ property({ type: Boolean, reflect: true })
358
+ ], Cre8MultiSelect.prototype, "isError", void 0);
359
+ __decorate([
360
+ property()
361
+ ], Cre8MultiSelect.prototype, "errorNote", void 0);
362
+ __decorate([
363
+ property({ type: Boolean, reflect: true })
364
+ ], Cre8MultiSelect.prototype, "isSuccess", void 0);
365
+ __decorate([
366
+ property()
367
+ ], Cre8MultiSelect.prototype, "successNote", void 0);
368
+ if (customElements.get('cre8-multi-select') === undefined) {
369
+ customElements.define('cre8-multi-select', Cre8MultiSelect);
370
+ }
371
+ export default Cre8MultiSelect;
372
+ //# sourceMappingURL=multi-select.js.map