@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,212 +1,281 @@
1
- import { css as f, html as a, nothing as b } from "lit";
2
- import { ifDefined as o } from "lit-html/directives/if-defined.js";
3
- import { property as r, query as u } from "lit/decorators.js";
4
- import { nanoid as d } from "nanoid";
5
- import { s as x } from "../../icon-D22g8aWB.js";
6
- import "../field-note/field-note.js";
7
- import { Cre8FormElement as k } from "../cre8-form-element.js";
8
- const y = 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}.cre8-u-is-hidden{display:none !important;visibility:hidden !important}.cre8-u-is-vishidden{position:absolute !important;overflow:hidden;width:1px;height:1px;padding:0;border:0;clip:rect(1px, 1px, 1px, 1px)}@media all and (min-width: 23.4375rem){.cre8-u-hide-sm{display:none !important}}@media all and (min-width: 35rem){.cre8-u-hide-sm-2{display:none !important}}@media all and (min-width: 48rem){.cre8-u-hide-md{display:none !important}}@media all and (min-width: 60rem){.cre8-u-hide-lg{display:none !important}}@media all and (min-width: 75rem){.cre8-u-hide-xl{display:none !important}}@media all and (max-width: 23.4375rem){.cre8-u-show-sm{display:none !important}}@media all and (max-width: 35rem){.cre8-u-show-sm-2{display:none !important}}@media all and (max-width: 48rem){.cre8-u-show-md{display:none !important}}@media all and (max-width: 60rem){.cre8-u-show-lg{display:none !important}}@media all and (max-width: 75rem){.cre8-u-show-xl{display:none !important}}:host{display:inline-flex;flex-wrap:wrap}.cre8-c-checkbox-field-item{display:flex;position:relative;align-items:center;margin-bottom:0.5rem;min-height:1.5rem}:host(:last-child) .cre8-c-checkbox-field-item{margin-bottom:0}.cre8-c-checkbox-field-item__input{opacity:0;cursor:pointer;position:absolute;top:0;left:0;height:1.5rem;min-width:1.5rem;margin:0;z-index:1}.cre8-c-checkbox-field-item--disabled .cre8-c-checkbox-field-item__input{cursor:not-allowed}.cre8-c-checkbox-field-item__custom-checkbox{display:flex;position:absolute;top:0;left:0;height:1.5rem;width:1.5rem;cursor:pointer;align-items:center;justify-content:center;border-radius:var(--cre8-border-radius-small);border-width:var(--cre8-border-width-default);border-style:var(--cre8-border-style-default);background-color:var(--cre8-color-bg-default);border-color:var(--cre8-color-border-strong)}.cre8-c-checkbox-field-item__input:focus-visible+.cre8-c-checkbox-field-item__custom-checkbox{outline:var(--cre8-border-width-focus) solid var(--cre8-color-border-active-outline);outline-offset:0.125rem}.cre8-c-checkbox-field-item--error .cre8-c-checkbox-field-item__input:focus-visible+.cre8-c-checkbox-field-item__custom-checkbox{outline:var(--cre8-border-width-focus) solid var(--cre8-color-border-error);outline-offset:0.125rem}.cre8-c-checkbox-field-item--error .cre8-c-checkbox-field-item__custom-checkbox{background-color:var(--cre8-color-bg-default);border-color:var(--cre8-color-border-error)}.cre8-c-checkbox-field-item--disabled .cre8-c-checkbox-field-item__custom-checkbox{cursor:not-allowed;background-color:var(--cre8-color-bg-disabled);border-color:var(--cre8-color-border-disabled)}.cre8-c-checkbox-field-item__input:checked+.cre8-c-checkbox-field-item__custom-checkbox{background-color:var(--cre8-color-bg-brand-strong)}.cre8-c-checkbox-field-item--error .cre8-c-checkbox-field-item__input:checked+.cre8-c-checkbox-field-item__custom-checkbox{background-color:var(--cre8-color-bg-default)}.cre8-c-checkbox-field-item--disabled .cre8-c-checkbox-field-item__input:checked+.cre8-c-checkbox-field-item__custom-checkbox{background-color:var(--cre8-color-bg-disabled)}.cre8-c-checkbox-field-item__icon{display:none;color:var(--cre8-color-content-knockout)}.cre8-c-checkbox-field-item--error .cre8-c-checkbox-field-item__icon{color:var(--cre8-color-content-error)}.cre8-c-checkbox-field-item--disabled .cre8-c-checkbox-field-item__icon{color:var(--cre8-color-content-disabled)}.cre8-c-checkbox-field-item__input:checked+.cre8-c-checkbox-field-item__custom-checkbox .cre8-c-checkbox-field-item__icon{display:flex}.cre8-c-checkbox-field-item__label{margin-left:2rem;font-family:var(--cre8-typography-label-small-font-family);font-size:var(--cre8-typography-label-small-font-size);font-weight:var(--cre8-typography-label-small-font-weight);line-height:var(--cre8-typography-label-small-line-height);text-decoration:var(--cre8-typography-label-small-text-decoration);text-transform:var(--cre8-typography-label-small-text-transform)}.cre8-c-checkbox-field-item__field-note,.cre8-c-checkbox-field-item__field-note-success,.cre8-c-checkbox-field-item__field-note-error{flex-basis:100%}`;
9
- var g = Object.defineProperty, i = (h, t, s, m) => {
10
- for (var c = void 0, l = h.length - 1, p; l >= 0; l--)
11
- (p = h[l]) && (c = p(t, s, c) || c);
12
- return c && g(t, s, c), c;
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 k {
15
- constructor() {
16
- super(...arguments), this.type = "checkbox", this.errorText = "Error", this.successText = "Success";
17
- }
18
- /**
19
- * Connected callback lifecycle
20
- * 1) Set the fieldID to a random string if not provided so form is always accessible
21
- * 2) If a fieldnote is added, set the aria-describedby property to the `ariaDescribedBy` property
22
- * or a random string to always make the form field accessible.
23
- * 3) Set the form internal data to set that to the default checked state.
24
- * 4) Set the default value of the checkbox field item to the checked property
25
- */
26
- connectedCallback() {
27
- super.connectedCallback(), this.setFormData(), this.defaultValue = this.checked;
28
- }
29
- /**
30
- * access role when check-box-field-item embedded in checkbox-field
31
- */
32
- getRole() {
33
- return this.closest("cre8-checkbox-field") ? "listitem" : "";
34
- }
35
- /**
36
- * Set form data
37
- * 1) If a checked property is provided, set the form value the checkbox value attribute.
38
- * Otherwise, don't provide a value for the checkbox data array
39
- */
40
- setFormData() {
41
- return this.checked ? this._internals.setFormValue(this.value || "on") : this._internals.setFormValue(null);
42
- }
43
- /**
44
- * Handle on checkbox change
45
- * 1) On change of the checkbox input, if `checked` is true, then set it to false and vice versa.
46
- */
47
- _clickHandler() {
48
- return this.checked = !this.checked, this.checked ? this._internals.setFormValue(this.value || "on") : this._internals.setFormValue(null);
49
- }
50
- /**
51
- * Handle On Change
52
- * 1. Set the value when the select is changed.
53
- * 2. Fire the custom event with the current value.
54
- */
55
- _handleOnChange(t) {
56
- const s = t.target;
57
- this.value = s.value, this._internals.setFormValue(this.value);
58
- const m = new CustomEvent("change", {
59
- detail: {
60
- name: this.name,
61
- value: this.value
62
- },
63
- bubbles: !0,
64
- composed: !0
65
- });
66
- this.dispatchEvent(m);
67
- }
68
- /**
69
- * Form reset callback
70
- * 1) Set checked property to the default value and then set the input's checked attribute to that default value
71
- * 2) Set the input's checked attribute to that default value
72
- * 3) Set the element internals form data when the form is reset
73
- * 4) Change the new value to the old value on reset
74
- */
75
- formResetCallback() {
76
- this.checked = this.defaultValue, this.field.checked = this.defaultValue, this.setFormData(), this.requestUpdate();
77
- }
78
- /**
79
- * First update lifecycle hook
80
- * 1) super.firstUpdated also uses the firstUpdated from the Cre8FormElement
81
- */
82
- firstUpdated() {
83
- return this.initializeAria(), super.firstUpdated();
84
- }
85
- /**
86
- * Initialize aria attributes
87
- */
88
- initializeAria() {
89
- this.fieldId = this.fieldId || d(), (this.fieldNote || this.slotNotEmpty("fieldNote")) && (this.ariaDescribedBy = this.ariaDescribedBy || d()), (this.successNote || this.errorNote) && (this.validationAriaDescribedBy = this.validationAriaDescribedBy || d());
90
- }
91
- /**
92
- * Aria describedby string based on field notes and error/success notes
93
- * 1) If both validationAriaDescribedBy (error/success note) and field note exists,
94
- * render both in the input's `aria-describedby` attribute
95
- * 2) Otherwise, if only validationAriaDescribedBy exists, then render only that as
96
- * the `aria-describedby` attribute (input without field note initially, but then error/success is added).
97
- * 3) Otherwise, render only the `ariaDescribedBy` property (field note only)
98
- */
99
- fieldNoteAria() {
100
- return this.validationAriaDescribedBy && this.ariaDescribedBy ? `${this.ariaDescribedBy} ${this.validationAriaDescribedBy}` : this.validationAriaDescribedBy && !this.ariaDescribedBy ? this.validationAriaDescribedBy : this.ariaDescribedBy;
101
- }
102
- /**
103
- * Render the success or error field notes
104
- * 1. If there is a successNote, then return the field note with the success message and state.
105
- * 2. If there is a errorNote, then return the field note with the error message and state.
106
- */
107
- renderSuccessErrorFieldNote() {
108
- return this.successNote ? a`<cre8-field-note
7
+ import { html, nothing, } from 'lit';
8
+ import { ifDefined } from 'lit-html/directives/if-defined.js';
9
+ import { property, query } from 'lit/decorators.js';
10
+ import { nanoid } from 'nanoid';
11
+ import '../icon/icon';
12
+ import '../field-note/field-note';
13
+ import svgCheck from '/Users/tylersmbp/Projects/cre8-web-components/packages/cre8-wc/icons/System/Regular/Check.svg?raw';
14
+ import styles from './checkbox-field-item.styles.js';
15
+ import { Cre8FormElement } from '../cre8-form-element';
16
+ /**
17
+ * Checkbox Field Item is the combination of a checkbox input, label and field note.
18
+ * Checkboxes can turn an option on or off.
19
+ *
20
+ * Checkboxes should be used when the user is allowed to select one, none or multiple options
21
+ * OR to "opt-in" (ex. I would like to receive the newsletter by email)
22
+ * or as a required acknowledgement(ex. I've read the Terms and Conditions).
23
+ * If the user can only chose one option from many, use `radio-field-item`.
24
+ *
25
+ * ## How to Use
26
+ *
27
+ * - A checkbox is independent of all other checkboxes in the list,
28
+ * so checking one box should not uncheck the others in the group.
29
+ * - Place checkbox options one on top of another vertically. Do not display them in a row horizontally.
30
+ * - Avoid disabled and read-only states as much as possible.
31
+ *
32
+ * ## Universal Form Field Rules
33
+ * - Unless indicated with the "(Optional)" label, all fields are assumed required.
34
+ * Minimize the number of optional fields to keep forms as short as possible.
35
+ * - Always include a label written in sentence case.
36
+ * - Avoid using the read-only and disabled states as much as possible.
37
+ */
38
+ export class Cre8CheckboxFieldItem extends Cre8FormElement {
39
+ constructor() {
40
+ super(...arguments);
41
+ this.type = 'checkbox';
42
+ /**
43
+ * Visually hidden text that always signifies that this is an error for screen reader usage
44
+ * @attr {string}
45
+ */
46
+ this.errorText = 'Error';
47
+ /**
48
+ * Visually hidden text that always signifies that this is successful for screen reader usage
49
+ */
50
+ this.successText = 'Success';
51
+ }
52
+ /**
53
+ * Connected callback lifecycle
54
+ * 1) Set the fieldID to a random string if not provided so form is always accessible
55
+ * 2) If a fieldnote is added, set the aria-describedby property to the `ariaDescribedBy` property
56
+ * or a random string to always make the form field accessible.
57
+ * 3) Set the form internal data to set that to the default checked state.
58
+ * 4) Set the default value of the checkbox field item to the checked property
59
+ */
60
+ connectedCallback() {
61
+ super.connectedCallback();
62
+ this.setFormData(); /* 3 */
63
+ this.defaultValue = this.checked; /* 4 */
64
+ }
65
+ /**
66
+ * access role when check-box-field-item embedded in checkbox-field
67
+ */
68
+ getRole() {
69
+ const checkboxFieldContainer = this.closest('cre8-checkbox-field');
70
+ if (checkboxFieldContainer) {
71
+ return 'listitem';
72
+ }
73
+ return '';
74
+ }
75
+ /**
76
+ * Set form data
77
+ * 1) If a checked property is provided, set the form value the checkbox value attribute.
78
+ * Otherwise, don't provide a value for the checkbox data array
79
+ */
80
+ setFormData() {
81
+ return this.checked ? this._internals.setFormValue(this.value || 'on') : this._internals.setFormValue(null); /* 1 */
82
+ }
83
+ /**
84
+ * Handle on checkbox change
85
+ * 1) On change of the checkbox input, if `checked` is true, then set it to false and vice versa.
86
+ */
87
+ _clickHandler() {
88
+ this.checked = !this.checked; /* 2 */
89
+ return this.checked ? this._internals.setFormValue(this.value || 'on') : this._internals.setFormValue(null);
90
+ }
91
+ /**
92
+ * Handle On Change
93
+ * 1. Set the value when the select is changed.
94
+ * 2. Fire the custom event with the current value.
95
+ */
96
+ _handleOnChange(e) {
97
+ /* 1 */
98
+ const target = e.target;
99
+ this.value = target.value;
100
+ this._internals.setFormValue(this.value);
101
+ /* 2 */
102
+ const customEvent = new CustomEvent('change', {
103
+ detail: {
104
+ name: this.name,
105
+ value: this.value,
106
+ },
107
+ bubbles: true,
108
+ composed: true,
109
+ });
110
+ this.dispatchEvent(customEvent);
111
+ }
112
+ /**
113
+ * Form reset callback
114
+ * 1) Set checked property to the default value and then set the input's checked attribute to that default value
115
+ * 2) Set the input's checked attribute to that default value
116
+ * 3) Set the element internals form data when the form is reset
117
+ * 4) Change the new value to the old value on reset
118
+ */
119
+ formResetCallback() {
120
+ this.checked = this.defaultValue; /* 1 */
121
+ this.field.checked = this.defaultValue; /* 2 */
122
+ this.setFormData();
123
+ this.requestUpdate();
124
+ }
125
+ /**
126
+ * First update lifecycle hook
127
+ * 1) super.firstUpdated also uses the firstUpdated from the Cre8FormElement
128
+ */
129
+ firstUpdated() {
130
+ this.initializeAria(); /* 1 */
131
+ return super.firstUpdated();
132
+ }
133
+ /**
134
+ * Initialize aria attributes
135
+ */
136
+ initializeAria() {
137
+ this.fieldId = this.fieldId || nanoid();
138
+ if (this.fieldNote || this.slotNotEmpty('fieldNote')) {
139
+ this.ariaDescribedBy = this.ariaDescribedBy || nanoid();
140
+ }
141
+ if (this.successNote || this.errorNote) {
142
+ this.validationAriaDescribedBy = this.validationAriaDescribedBy || nanoid();
143
+ }
144
+ }
145
+ /**
146
+ * Aria describedby string based on field notes and error/success notes
147
+ * 1) If both validationAriaDescribedBy (error/success note) and field note exists,
148
+ * render both in the input's `aria-describedby` attribute
149
+ * 2) Otherwise, if only validationAriaDescribedBy exists, then render only that as
150
+ * the `aria-describedby` attribute (input without field note initially, but then error/success is added).
151
+ * 3) Otherwise, render only the `ariaDescribedBy` property (field note only)
152
+ */
153
+ fieldNoteAria() {
154
+ if (this.validationAriaDescribedBy && this.ariaDescribedBy) {
155
+ return `${this.ariaDescribedBy} ${this.validationAriaDescribedBy}`; /* 1 */
156
+ }
157
+ if (this.validationAriaDescribedBy && !this.ariaDescribedBy) {
158
+ return this.validationAriaDescribedBy; /* 2 */
159
+ }
160
+ return this.ariaDescribedBy; /* 3 */
161
+ }
162
+ /**
163
+ * Render the success or error field notes
164
+ * 1. If there is a successNote, then return the field note with the success message and state.
165
+ * 2. If there is a errorNote, then return the field note with the error message and state.
166
+ */
167
+ renderSuccessErrorFieldNote() {
168
+ if (this.successNote) {
169
+ /* 1 */
170
+ return html `<cre8-field-note
109
171
  ?isSuccess=${this.isSuccess}
110
172
  id=${this.validationAriaDescribedBy}
111
173
  class="cre8-c-checkbox-field-item__field-note-success"
112
174
  iconName="success"
113
175
  >
114
176
  <span class="cre8-u-is-vishidden">${this.successText}</span> ${this.successNote}
115
- </cre8-field-note>` : this.errorNote ? a` <cre8-field-note
177
+ </cre8-field-note>`;
178
+ }
179
+ if (this.errorNote) {
180
+ /* 2 */
181
+ return html ` <cre8-field-note
116
182
  ?isError=${this.isError}
117
183
  id=${this.validationAriaDescribedBy}
118
184
  class="cre8-c-checkbox-field-item__field-note-error"
119
185
  iconName="error-alt"
120
186
  >
121
187
  <span class="cre8-u-is-vishidden">${this.errorText}</span> ${this.errorNote}
122
- </cre8-field-note>` : null;
123
- }
124
- render() {
125
- const t = this.componentClassNames("cre8-c-checkbox-field-item", {
126
- "cre8-c-checkbox-field-item--error": this.isError,
127
- "cre8-c-checkbox-field-item--success": this.isSuccess,
128
- "cre8-c-checkbox-field-item--disabled": this.disabled
129
- });
130
- return a`
131
- <div role=${o(this.getRole())} class="${t}">
188
+ </cre8-field-note>`;
189
+ }
190
+ return null;
191
+ }
192
+ render() {
193
+ const componentClassNames = this.componentClassNames('cre8-c-checkbox-field-item', {
194
+ 'cre8-c-checkbox-field-item--error': this.isError,
195
+ 'cre8-c-checkbox-field-item--success': this.isSuccess,
196
+ 'cre8-c-checkbox-field-item--disabled': this.disabled,
197
+ });
198
+ return html `
199
+ <div role=${ifDefined(this.getRole())} class="${componentClassNames}">
132
200
  <input class="cre8-c-checkbox-field-item__input"
133
201
  type="checkbox"
134
202
  @input=${this._clickHandler}
135
203
  id=${this.fieldId}
136
- name=${this.name ?? void 0}
204
+ name=${this.name ?? undefined}
137
205
  .value=${this.value}
138
- required=${o(this.required)}
139
- aria-invalid=${this.required ? !!this.isError : o(this.isError)}
140
- disabled="${o(this.disabled ? this.disabled : void 0)}"
141
- aria-describedby="${o(this.fieldNoteAria())}"
206
+ required=${ifDefined(this.required)}
207
+ aria-invalid=${this.required ? !!this.isError : ifDefined(this.isError)}
208
+ disabled="${ifDefined(this.disabled ? this.disabled : undefined)}"
209
+ aria-describedby="${ifDefined(this.fieldNoteAria())}"
142
210
  .checked="${this.checked}"
143
211
  @change=${this._handleOnChange}
144
212
  />
145
213
  <span class="cre8-c-checkbox-field-item__custom-checkbox">
146
- <cre8-icon svg='${x}' class="cre8-c-checkbox-field-item__icon" aria-label="checkbox"
214
+ <cre8-icon svg='${svgCheck}' class="cre8-c-checkbox-field-item__icon" aria-label="checkbox"
147
215
  aria-hidden="${!this.checked}"></cre8-icon>
148
216
  </span>
149
217
  <label class="cre8-c-checkbox-field-item__label" for=${this.fieldId}>${this.label}</label>
150
218
  </div>
151
- ${this.fieldNote || this.slotNotEmpty("fieldNote") ? a`<cre8-field-note id=${this.ariaDescribedBy} class="cre8-c-checkbox-field-item__field-note"
219
+ ${this.fieldNote || this.slotNotEmpty('fieldNote')
220
+ ? html `<cre8-field-note id=${this.ariaDescribedBy} class="cre8-c-checkbox-field-item__field-note"
152
221
  ><slot name="fieldNote">${this.fieldNote}</slot></cre8-field-note
153
- >` : b}
222
+ >`
223
+ : nothing}
154
224
  ${this.renderSuccessErrorFieldNote()}
155
225
  `;
156
- }
157
- };
158
- n.styles = [y];
159
- let e = n;
160
- i([
161
- r({ type: String })
162
- ], e.prototype, "label");
163
- i([
164
- r({ type: Boolean, reflect: !0 })
165
- ], e.prototype, "isError");
166
- i([
167
- r()
168
- ], e.prototype, "errorText");
169
- i([
170
- r()
171
- ], e.prototype, "errorNote");
172
- i([
173
- r({ type: Boolean, reflect: !0 })
174
- ], e.prototype, "isSuccess");
175
- i([
176
- r()
177
- ], e.prototype, "successText");
178
- i([
179
- r()
180
- ], e.prototype, "successNote");
181
- i([
182
- r({ type: Boolean, reflect: !0 })
183
- ], e.prototype, "disabled");
184
- i([
185
- r({ type: Boolean, reflect: !0 })
186
- ], e.prototype, "checked");
187
- i([
188
- r()
189
- ], e.prototype, "fieldId");
190
- i([
191
- r()
192
- ], e.prototype, "fieldNote");
193
- i([
194
- r()
195
- ], e.prototype, "ariaDescribedBy");
196
- i([
197
- r()
198
- ], e.prototype, "validationAriaDescribedBy");
199
- i([
200
- r({ type: Boolean, reflect: !0 })
201
- ], e.prototype, "required");
202
- i([
203
- r()
204
- ], e.prototype, "fieldNoteIconName");
205
- i([
206
- u("input")
207
- ], e.prototype, "field");
208
- customElements.get("cre8-checkbox-field-item") === void 0 && customElements.define("cre8-checkbox-field-item", e);
209
- export {
210
- e as Cre8CheckboxFieldItem,
211
- e as default
212
- };
226
+ }
227
+ }
228
+ Cre8CheckboxFieldItem.styles = [styles];
229
+ __decorate([
230
+ property({ type: String })
231
+ ], Cre8CheckboxFieldItem.prototype, "label", void 0);
232
+ __decorate([
233
+ property({ type: Boolean, reflect: true })
234
+ ], Cre8CheckboxFieldItem.prototype, "isError", void 0);
235
+ __decorate([
236
+ property()
237
+ ], Cre8CheckboxFieldItem.prototype, "errorText", void 0);
238
+ __decorate([
239
+ property()
240
+ ], Cre8CheckboxFieldItem.prototype, "errorNote", void 0);
241
+ __decorate([
242
+ property({ type: Boolean, reflect: true })
243
+ ], Cre8CheckboxFieldItem.prototype, "isSuccess", void 0);
244
+ __decorate([
245
+ property()
246
+ ], Cre8CheckboxFieldItem.prototype, "successText", void 0);
247
+ __decorate([
248
+ property()
249
+ ], Cre8CheckboxFieldItem.prototype, "successNote", void 0);
250
+ __decorate([
251
+ property({ type: Boolean, reflect: true })
252
+ ], Cre8CheckboxFieldItem.prototype, "disabled", void 0);
253
+ __decorate([
254
+ property({ type: Boolean, reflect: true })
255
+ ], Cre8CheckboxFieldItem.prototype, "checked", void 0);
256
+ __decorate([
257
+ property()
258
+ ], Cre8CheckboxFieldItem.prototype, "fieldId", void 0);
259
+ __decorate([
260
+ property()
261
+ ], Cre8CheckboxFieldItem.prototype, "fieldNote", void 0);
262
+ __decorate([
263
+ property()
264
+ ], Cre8CheckboxFieldItem.prototype, "ariaDescribedBy", void 0);
265
+ __decorate([
266
+ property()
267
+ ], Cre8CheckboxFieldItem.prototype, "validationAriaDescribedBy", void 0);
268
+ __decorate([
269
+ property({ type: Boolean, reflect: true })
270
+ ], Cre8CheckboxFieldItem.prototype, "required", void 0);
271
+ __decorate([
272
+ property()
273
+ ], Cre8CheckboxFieldItem.prototype, "fieldNoteIconName", void 0);
274
+ __decorate([
275
+ query('input')
276
+ ], Cre8CheckboxFieldItem.prototype, "field", void 0);
277
+ if (customElements.get('cre8-checkbox-field-item') === undefined) {
278
+ customElements.define('cre8-checkbox-field-item', Cre8CheckboxFieldItem);
279
+ }
280
+ export default Cre8CheckboxFieldItem;
281
+ //# sourceMappingURL=checkbox-field-item.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checkbox-field-item.js","sourceRoot":"","sources":["../../../components/checkbox-field-item/checkbox-field-item.ts"],"names":[],"mappings":"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","sourcesContent":["import { html, nothing, } from 'lit';\nimport { ifDefined } from 'lit-html/directives/if-defined.js';\nimport { property, query } from 'lit/decorators.js';\nimport { nanoid } from 'nanoid';\nimport '../icon/icon';\nimport '../field-note/field-note';\nimport svgCheck from '/Users/tylersmbp/Projects/cre8-web-components/packages/cre8-wc/icons/System/Regular/Check.svg?raw';\nimport styles from './checkbox-field-item.styles.js';\nimport { Cre8FormElement } from '../cre8-form-element';\n\n/**\n * Checkbox Field Item is the combination of a checkbox input, label and field note.\n * Checkboxes can turn an option on or off.\n *\n * Checkboxes should be used when the user is allowed to select one, none or multiple options\n * OR to \"opt-in\" (ex. I would like to receive the newsletter by email)\n * or as a required acknowledgement(ex. I've read the Terms and Conditions).\n * If the user can only chose one option from many, use `radio-field-item`.\n *\n * ## How to Use\n *\n * - A checkbox is independent of all other checkboxes in the list,\n * so checking one box should not uncheck the others in the group.\n * - Place checkbox options one on top of another vertically. Do not display them in a row horizontally.\n * - Avoid disabled and read-only states as much as possible.\n *\n * ## Universal Form Field Rules\n * - Unless indicated with the \"(Optional)\" label, all fields are assumed required.\n * Minimize the number of optional fields to keep forms as short as possible.\n * - Always include a label written in sentence case.\n * - Avoid using the read-only and disabled states as much as possible.\n */\nexport class Cre8CheckboxFieldItem extends Cre8FormElement {\n readonly type = 'checkbox';\n\n static styles = [styles];\n\n /**\n * The checkbox label\n */\n @property({ type: String })\n label?: string;\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 * Visually hidden text that always signifies that this is an error for screen reader usage\n * @attr {string}\n */\n @property()\n errorText: string = 'Error';\n\n /**\n * The error field note that appears below the default field note\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 * Visually hidden text that always signifies that this is successful for screen reader usage\n */\n @property()\n successText: string = 'Success';\n\n /**\n * The success field note that appears below the default field note\n */\n @property()\n successNote?: string;\n\n /**\n * Disabled State\n * @attr {boolean}\n */\n @property({ type: Boolean, reflect: true })\n disabled?: boolean;\n\n /**\n * Checked State\n * @attr {boolean}\n */\n @property({ type: Boolean, reflect: true })\n checked?: boolean;\n\n /**\n * Checkbox FieldId\n * @attr {string}\n */\n @property()\n fieldId?: string;\n\n /**\n * Checkbox FieldNote\n */\n @property()\n fieldNote?: string;\n\n /**\n * Checkbox fieldnote ariaDescribeBy\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 */\n @property()\n validationAriaDescribedBy?: string;\n\n\n\n /**\n * Required property\n * @attr {boolean}\n */\n @property({ type: Boolean, reflect: true })\n required?: boolean;\n\n /**\n * Checkbox fieldnote icon name\n */\n @property()\n fieldNoteIconName?: string;\n\n /**\n * Get the input element within the shadow root and set it to this.field\n */\n @query('input')\n field!: HTMLInputElement;\n\n protected override defaultValue: boolean;\n\n /**\n * Connected callback lifecycle\n * 1) Set the fieldID to a random string if not provided so form is always accessible\n * 2) If a fieldnote is added, set the aria-describedby property to the `ariaDescribedBy` property\n * or a random string to always make the form field accessible.\n * 3) Set the form internal data to set that to the default checked state.\n * 4) Set the default value of the checkbox field item to the checked property\n */\n\n connectedCallback() {\n super.connectedCallback();\n this.setFormData(); /* 3 */\n this.defaultValue = this.checked; /* 4 */\n }\n\n /**\n * access role when check-box-field-item embedded in checkbox-field\n */\n private getRole() {\n const checkboxFieldContainer = this.closest('cre8-checkbox-field');\n if (checkboxFieldContainer) {\n return 'listitem';\n }\n return '';\n }\n\n /**\n * Set form data\n * 1) If a checked property is provided, set the form value the checkbox value attribute.\n * Otherwise, don't provide a value for the checkbox data array\n */\n private setFormData() {\n return this.checked ? this._internals.setFormValue(this.value || 'on') : this._internals.setFormValue(null); /* 1 */\n }\n\n /**\n * Handle on checkbox change\n * 1) On change of the checkbox input, if `checked` is true, then set it to false and vice versa.\n */\n private _clickHandler() {\n this.checked = !this.checked; /* 2 */\n return this.checked ? this._internals.setFormValue(this.value || 'on') : this._internals.setFormValue(null);\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.value;\n this._internals.setFormValue(this.value);\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 * Form reset callback\n * 1) Set checked property to the default value and then set the input's checked attribute to that default value\n * 2) Set the input's checked attribute to that default value\n * 3) Set the element internals form data when the form is reset\n * 4) Change the new value to the old value on reset\n */\n formResetCallback(): void {\n this.checked = this.defaultValue; /* 1 */\n this.field.checked = this.defaultValue; /* 2 */\n this.setFormData();\n this.requestUpdate();\n }\n\n /**\n * First update lifecycle hook\n * 1) super.firstUpdated also uses the firstUpdated from the Cre8FormElement\n */\n firstUpdated() {\n this.initializeAria(); /* 1 */\n return super.firstUpdated();\n }\n\n /**\n * Initialize aria attributes\n */\n 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 fieldNoteAria(): string {\n if (this.validationAriaDescribedBy && this.ariaDescribedBy) {\n return `${this.ariaDescribedBy} ${this.validationAriaDescribedBy}`; /* 1 */\n } if (this.validationAriaDescribedBy && !this.ariaDescribedBy) {\n return this.validationAriaDescribedBy; /* 2 */\n }\n return this.ariaDescribedBy; /* 3 */\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 renderSuccessErrorFieldNote() {\n if (this.successNote) {\n /* 1 */\n return html`<cre8-field-note\n ?isSuccess=${this.isSuccess}\n id=${this.validationAriaDescribedBy}\n class=\"cre8-c-checkbox-field-item__field-note-success\"\n iconName=\"success\"\n >\n <span class=\"cre8-u-is-vishidden\">${this.successText}</span> ${this.successNote}\n </cre8-field-note>`;\n }\n if (this.errorNote) {\n /* 2 */\n return html` <cre8-field-note\n ?isError=${this.isError}\n id=${this.validationAriaDescribedBy}\n class=\"cre8-c-checkbox-field-item__field-note-error\"\n iconName=\"error-alt\"\n >\n <span class=\"cre8-u-is-vishidden\">${this.errorText}</span> ${this.errorNote}\n </cre8-field-note>`;\n }\n return null;\n }\n\n render() {\n const componentClassNames = this.componentClassNames('cre8-c-checkbox-field-item', {\n 'cre8-c-checkbox-field-item--error': this.isError,\n 'cre8-c-checkbox-field-item--success': this.isSuccess,\n 'cre8-c-checkbox-field-item--disabled': this.disabled,\n });\n\n return html`\n <div role=${ifDefined(this.getRole())} class=\"${componentClassNames}\">\n <input class=\"cre8-c-checkbox-field-item__input\"\n type=\"checkbox\"\n @input=${this._clickHandler}\n id=${this.fieldId}\n name=${this.name ?? undefined}\n .value=${this.value}\n required=${ifDefined(this.required)}\n aria-invalid=${this.required ? !!this.isError : ifDefined(this.isError)}\n disabled=\"${ifDefined(this.disabled ? this.disabled : undefined)}\"\n aria-describedby=\"${ifDefined(this.fieldNoteAria())}\"\n .checked=\"${this.checked}\"\n @change=${this._handleOnChange}\n />\n <span class=\"cre8-c-checkbox-field-item__custom-checkbox\">\n <cre8-icon svg='${svgCheck}' class=\"cre8-c-checkbox-field-item__icon\" aria-label=\"checkbox\"\n aria-hidden=\"${!this.checked}\"></cre8-icon>\n </span>\n <label class=\"cre8-c-checkbox-field-item__label\" for=${this.fieldId}>${this.label}</label>\n </div>\n ${this.fieldNote || this.slotNotEmpty('fieldNote')\n ? html`<cre8-field-note id=${this.ariaDescribedBy} class=\"cre8-c-checkbox-field-item__field-note\"\n ><slot name=\"fieldNote\">${this.fieldNote}</slot></cre8-field-note\n >`\n : nothing\n }\n ${this.renderSuccessErrorFieldNote()}\n `;\n }\n}\n\nif (customElements.get('cre8-checkbox-field-item') === undefined) {\n customElements.define('cre8-checkbox-field-item', Cre8CheckboxFieldItem);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'cre8-checkbox-field-item': Cre8CheckboxFieldItem;\n }\n}\n\nexport default Cre8CheckboxFieldItem;\n"]}
@@ -0,0 +1,4 @@
1
+ import { css } from 'lit';
2
+ const styles = css `*,::slotted(*),*:before,*:after{box-sizing:border-box}:root{--size-base-unit: 0.5rem}[dir=rtl]{--rtlTranslateX: 50%;--rtlGradientToRight: 270deg;--rtlRotate45Inverse: -45deg}:host{--cre8-z-index-1: 1;--cre8-z-index-50: 50;--cre8-z-index-100: 100;--cre8-z-index-200: 200;--cre8-z-index-1030: 1030;--cre8-anim-fade-quick: 0.35s;--cre8-anim-ease: ease}@keyframes fadeIn{100%{opacity:1}}@keyframes slideIn{100%{transform:translateX(0)}}@keyframes slideInFwd{100%{width:272px;height:272px}}@keyframes slideOutRight{100%{width:272px;height:272px}}@keyframes slideUp{100%{transform:translateY(0)}}@media(width >= 481px){@keyframes slideInFwd{100%{width:417px;height:417px}}@keyframes slideOutRight{100%{width:417px;height:417px}}}@media(width >= 48rem){@keyframes slideInFwd{100%{width:330px;height:330px}}@keyframes slideOutRight{100%{width:330px;height:330px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 60rem){@keyframes slideInFwd{100%{width:460px;height:460px}}@keyframes slideOutRight{100%{width:460px;height:460px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 75rem){@keyframes slideInFwd{100%{width:592px;height:591px}}@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 87.5rem){@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 120px))}}}@media(width >= 2200px){@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 592px))}}}span.ripple{position:absolute;border-radius:50%;transform:scale(0);animation:ripple 600ms linear;background-color:var(--ripple-bg-color)}@keyframes ripple{to{transform:scale(4);opacity:1}}:root{--size-base-unit: 0.5rem}[dir=rtl]{--rtlTranslateX: 50%;--rtlGradientToRight: 270deg;--rtlRotate45Inverse: -45deg}.cre8-u-is-hidden{display:none !important;visibility:hidden !important}.cre8-u-is-vishidden{position:absolute !important;overflow:hidden;width:1px;height:1px;padding:0;border:0;clip:rect(1px, 1px, 1px, 1px)}@media all and (min-width: 23.4375rem){.cre8-u-hide-sm{display:none !important}}@media all and (min-width: 35rem){.cre8-u-hide-sm-2{display:none !important}}@media all and (min-width: 48rem){.cre8-u-hide-md{display:none !important}}@media all and (min-width: 60rem){.cre8-u-hide-lg{display:none !important}}@media all and (min-width: 75rem){.cre8-u-hide-xl{display:none !important}}@media all and (max-width: 23.4375rem){.cre8-u-show-sm{display:none !important}}@media all and (max-width: 35rem){.cre8-u-show-sm-2{display:none !important}}@media all and (max-width: 48rem){.cre8-u-show-md{display:none !important}}@media all and (max-width: 60rem){.cre8-u-show-lg{display:none !important}}@media all and (max-width: 75rem){.cre8-u-show-xl{display:none !important}}:host{display:inline-flex;flex-wrap:wrap}.cre8-c-checkbox-field-item{display:flex;position:relative;align-items:center;margin-bottom:0.5rem;min-height:1.5rem}:host(:last-child) .cre8-c-checkbox-field-item{margin-bottom:0}.cre8-c-checkbox-field-item__input{opacity:0;cursor:pointer;position:absolute;top:0;left:0;height:1.5rem;min-width:1.5rem;margin:0;z-index:1}.cre8-c-checkbox-field-item--disabled .cre8-c-checkbox-field-item__input{cursor:not-allowed}.cre8-c-checkbox-field-item__custom-checkbox{display:flex;position:absolute;top:0;left:0;height:1.5rem;width:1.5rem;cursor:pointer;align-items:center;justify-content:center;border-radius:var(--cre8-border-radius-small);border-width:var(--cre8-border-width-default);border-style:var(--cre8-border-style-default);background-color:var(--cre8-color-bg-default);border-color:var(--cre8-color-border-strong)}.cre8-c-checkbox-field-item__input:focus-visible+.cre8-c-checkbox-field-item__custom-checkbox{outline:var(--cre8-border-width-focus) solid var(--cre8-color-border-active-outline);outline-offset:0.125rem}.cre8-c-checkbox-field-item--error .cre8-c-checkbox-field-item__input:focus-visible+.cre8-c-checkbox-field-item__custom-checkbox{outline:var(--cre8-border-width-focus) solid var(--cre8-color-border-error);outline-offset:0.125rem}.cre8-c-checkbox-field-item--error .cre8-c-checkbox-field-item__custom-checkbox{background-color:var(--cre8-color-bg-default);border-color:var(--cre8-color-border-error)}.cre8-c-checkbox-field-item--disabled .cre8-c-checkbox-field-item__custom-checkbox{cursor:not-allowed;background-color:var(--cre8-color-bg-disabled);border-color:var(--cre8-color-border-disabled)}.cre8-c-checkbox-field-item__input:checked+.cre8-c-checkbox-field-item__custom-checkbox{background-color:var(--cre8-color-bg-brand-strong)}.cre8-c-checkbox-field-item--error .cre8-c-checkbox-field-item__input:checked+.cre8-c-checkbox-field-item__custom-checkbox{background-color:var(--cre8-color-bg-default)}.cre8-c-checkbox-field-item--disabled .cre8-c-checkbox-field-item__input:checked+.cre8-c-checkbox-field-item__custom-checkbox{background-color:var(--cre8-color-bg-disabled)}.cre8-c-checkbox-field-item__icon{display:none;color:var(--cre8-color-content-knockout)}.cre8-c-checkbox-field-item--error .cre8-c-checkbox-field-item__icon{color:var(--cre8-color-content-error)}.cre8-c-checkbox-field-item--disabled .cre8-c-checkbox-field-item__icon{color:var(--cre8-color-content-disabled)}.cre8-c-checkbox-field-item__input:checked+.cre8-c-checkbox-field-item__custom-checkbox .cre8-c-checkbox-field-item__icon{display:flex}.cre8-c-checkbox-field-item__label{margin-left:2rem;font-family:var(--cre8-typography-label-small-font-family);font-size:var(--cre8-typography-label-small-font-size);font-weight:var(--cre8-typography-label-small-font-weight);line-height:var(--cre8-typography-label-small-line-height);text-decoration:var(--cre8-typography-label-small-text-decoration);text-transform:var(--cre8-typography-label-small-text-transform)}.cre8-c-checkbox-field-item__field-note,.cre8-c-checkbox-field-item__field-note-success,.cre8-c-checkbox-field-item__field-note-error{flex-basis:100%}`;
3
+ export default styles;
4
+ //# sourceMappingURL=checkbox-field-item.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checkbox-field-item.styles.js","sourceRoot":"","sources":["../../../components/checkbox-field-item/checkbox-field-item.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,MAAM,MAAM,GAAG,GAAG,CAAA,6xLAA6xL,CAAC;AAChzL,eAAe,MAAM,CAAC","sourcesContent":["import { css } from 'lit';\nconst styles = css`*,::slotted(*),*:before,*:after{box-sizing:border-box}:root{--size-base-unit: 0.5rem}[dir=rtl]{--rtlTranslateX: 50%;--rtlGradientToRight: 270deg;--rtlRotate45Inverse: -45deg}:host{--cre8-z-index-1: 1;--cre8-z-index-50: 50;--cre8-z-index-100: 100;--cre8-z-index-200: 200;--cre8-z-index-1030: 1030;--cre8-anim-fade-quick: 0.35s;--cre8-anim-ease: ease}@keyframes fadeIn{100%{opacity:1}}@keyframes slideIn{100%{transform:translateX(0)}}@keyframes slideInFwd{100%{width:272px;height:272px}}@keyframes slideOutRight{100%{width:272px;height:272px}}@keyframes slideUp{100%{transform:translateY(0)}}@media(width >= 481px){@keyframes slideInFwd{100%{width:417px;height:417px}}@keyframes slideOutRight{100%{width:417px;height:417px}}}@media(width >= 48rem){@keyframes slideInFwd{100%{width:330px;height:330px}}@keyframes slideOutRight{100%{width:330px;height:330px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 60rem){@keyframes slideInFwd{100%{width:460px;height:460px}}@keyframes slideOutRight{100%{width:460px;height:460px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 75rem){@keyframes slideInFwd{100%{width:592px;height:591px}}@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 87.5rem){@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 120px))}}}@media(width >= 2200px){@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 592px))}}}span.ripple{position:absolute;border-radius:50%;transform:scale(0);animation:ripple 600ms linear;background-color:var(--ripple-bg-color)}@keyframes ripple{to{transform:scale(4);opacity:1}}:root{--size-base-unit: 0.5rem}[dir=rtl]{--rtlTranslateX: 50%;--rtlGradientToRight: 270deg;--rtlRotate45Inverse: -45deg}.cre8-u-is-hidden{display:none !important;visibility:hidden !important}.cre8-u-is-vishidden{position:absolute !important;overflow:hidden;width:1px;height:1px;padding:0;border:0;clip:rect(1px, 1px, 1px, 1px)}@media all and (min-width: 23.4375rem){.cre8-u-hide-sm{display:none !important}}@media all and (min-width: 35rem){.cre8-u-hide-sm-2{display:none !important}}@media all and (min-width: 48rem){.cre8-u-hide-md{display:none !important}}@media all and (min-width: 60rem){.cre8-u-hide-lg{display:none !important}}@media all and (min-width: 75rem){.cre8-u-hide-xl{display:none !important}}@media all and (max-width: 23.4375rem){.cre8-u-show-sm{display:none !important}}@media all and (max-width: 35rem){.cre8-u-show-sm-2{display:none !important}}@media all and (max-width: 48rem){.cre8-u-show-md{display:none !important}}@media all and (max-width: 60rem){.cre8-u-show-lg{display:none !important}}@media all and (max-width: 75rem){.cre8-u-show-xl{display:none !important}}:host{display:inline-flex;flex-wrap:wrap}.cre8-c-checkbox-field-item{display:flex;position:relative;align-items:center;margin-bottom:0.5rem;min-height:1.5rem}:host(:last-child) .cre8-c-checkbox-field-item{margin-bottom:0}.cre8-c-checkbox-field-item__input{opacity:0;cursor:pointer;position:absolute;top:0;left:0;height:1.5rem;min-width:1.5rem;margin:0;z-index:1}.cre8-c-checkbox-field-item--disabled .cre8-c-checkbox-field-item__input{cursor:not-allowed}.cre8-c-checkbox-field-item__custom-checkbox{display:flex;position:absolute;top:0;left:0;height:1.5rem;width:1.5rem;cursor:pointer;align-items:center;justify-content:center;border-radius:var(--cre8-border-radius-small);border-width:var(--cre8-border-width-default);border-style:var(--cre8-border-style-default);background-color:var(--cre8-color-bg-default);border-color:var(--cre8-color-border-strong)}.cre8-c-checkbox-field-item__input:focus-visible+.cre8-c-checkbox-field-item__custom-checkbox{outline:var(--cre8-border-width-focus) solid var(--cre8-color-border-active-outline);outline-offset:0.125rem}.cre8-c-checkbox-field-item--error .cre8-c-checkbox-field-item__input:focus-visible+.cre8-c-checkbox-field-item__custom-checkbox{outline:var(--cre8-border-width-focus) solid var(--cre8-color-border-error);outline-offset:0.125rem}.cre8-c-checkbox-field-item--error .cre8-c-checkbox-field-item__custom-checkbox{background-color:var(--cre8-color-bg-default);border-color:var(--cre8-color-border-error)}.cre8-c-checkbox-field-item--disabled .cre8-c-checkbox-field-item__custom-checkbox{cursor:not-allowed;background-color:var(--cre8-color-bg-disabled);border-color:var(--cre8-color-border-disabled)}.cre8-c-checkbox-field-item__input:checked+.cre8-c-checkbox-field-item__custom-checkbox{background-color:var(--cre8-color-bg-brand-strong)}.cre8-c-checkbox-field-item--error .cre8-c-checkbox-field-item__input:checked+.cre8-c-checkbox-field-item__custom-checkbox{background-color:var(--cre8-color-bg-default)}.cre8-c-checkbox-field-item--disabled .cre8-c-checkbox-field-item__input:checked+.cre8-c-checkbox-field-item__custom-checkbox{background-color:var(--cre8-color-bg-disabled)}.cre8-c-checkbox-field-item__icon{display:none;color:var(--cre8-color-content-knockout)}.cre8-c-checkbox-field-item--error .cre8-c-checkbox-field-item__icon{color:var(--cre8-color-content-error)}.cre8-c-checkbox-field-item--disabled .cre8-c-checkbox-field-item__icon{color:var(--cre8-color-content-disabled)}.cre8-c-checkbox-field-item__input:checked+.cre8-c-checkbox-field-item__custom-checkbox .cre8-c-checkbox-field-item__icon{display:flex}.cre8-c-checkbox-field-item__label{margin-left:2rem;font-family:var(--cre8-typography-label-small-font-family);font-size:var(--cre8-typography-label-small-font-size);font-weight:var(--cre8-typography-label-small-font-weight);line-height:var(--cre8-typography-label-small-line-height);text-decoration:var(--cre8-typography-label-small-text-decoration);text-transform:var(--cre8-typography-label-small-text-transform)}.cre8-c-checkbox-field-item__field-note,.cre8-c-checkbox-field-item__field-note-success,.cre8-c-checkbox-field-item__field-note-error{flex-basis:100%}`;\nexport default styles;\n"]}
@@ -0,0 +1,9 @@
1
+ import { createContext } from '@lit/context';
2
+ /**
3
+ * Context for sharing form element internals with descendant components.
4
+ * This allows nested components to access the parent form element's
5
+ * ElementInternals for form participation, validation, and ARIA.
6
+ */
7
+ export const formInternalsContext = createContext(Symbol('cre8-form-internals'));
8
+ export const formStateContext = createContext(Symbol('cre8-form-state'));
9
+ //# sourceMappingURL=form-internals-context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"form-internals-context.js","sourceRoot":"","sources":["../../../components/contexts/form-internals-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAU7C;;;;GAIG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,aAAa,CAC7C,MAAM,CAAC,qBAAqB,CAAC,CAChC,CAAC;AAcF,MAAM,CAAC,MAAM,gBAAgB,GAAG,aAAa,CACzC,MAAM,CAAC,iBAAiB,CAAC,CAC5B,CAAC","sourcesContent":["import { createContext } from '@lit/context';\n\n/**\n * Extended ElementInternals interface with form lifecycle callbacks\n */\nexport interface Cre8ElementInternals extends ElementInternals {\n formResetCallback?: () => void;\n ariaRole?: string;\n}\n\n/**\n * Context for sharing form element internals with descendant components.\n * This allows nested components to access the parent form element's\n * ElementInternals for form participation, validation, and ARIA.\n */\nexport const formInternalsContext = createContext<Cre8ElementInternals | null>(\n Symbol('cre8-form-internals')\n);\n\n/**\n * Context for sharing form element state with descendants\n */\nexport interface FormElementState {\n value: string;\n disabled: boolean;\n required: boolean;\n isError: boolean;\n isSuccess: boolean;\n name?: string;\n}\n\nexport const formStateContext = createContext<FormElementState>(\n Symbol('cre8-form-state')\n);\n"]}