@tmorrow/cre8-wc 1.1.2 → 1.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (435) hide show
  1. package/cdn/cre8-wc.esm.js +1 -1
  2. package/cdn/cre8-wc.esm.js.map +1 -1
  3. package/cdn/cre8-wc.min.js +1 -1
  4. package/cdn/cre8-wc.min.js.map +1 -1
  5. package/lib/cdn-entry.js +129 -0
  6. package/lib/cdn-entry.js.map +1 -0
  7. package/lib/components/accordion/accordion.js +58 -40
  8. package/lib/components/accordion/accordion.js.map +1 -0
  9. package/lib/components/accordion/accordion.styles.js +4 -0
  10. package/lib/components/accordion/accordion.styles.js.map +1 -0
  11. package/lib/components/accordion-item/accordion-item.js +187 -98
  12. package/lib/components/accordion-item/accordion-item.js.map +1 -0
  13. package/lib/components/accordion-item/accordion-item.styles.js +4 -0
  14. package/lib/components/accordion-item/accordion-item.styles.js.map +1 -0
  15. package/lib/components/alert/alert.js +146 -107
  16. package/lib/components/alert/alert.js.map +1 -0
  17. package/lib/components/alert/alert.styles.js +4 -0
  18. package/lib/components/alert/alert.styles.js.map +1 -0
  19. package/lib/components/badge/badge.js +73 -50
  20. package/lib/components/badge/badge.js.map +1 -0
  21. package/lib/components/badge/badge.styles.js +4 -0
  22. package/lib/components/badge/badge.styles.js.map +1 -0
  23. package/lib/components/band/band.js +34 -31
  24. package/lib/components/band/band.js.map +1 -0
  25. package/lib/components/band/band.styles.js +4 -0
  26. package/lib/components/band/band.styles.js.map +1 -0
  27. package/lib/components/breadcrumbs/breadcrumbs.js +52 -28
  28. package/lib/components/breadcrumbs/breadcrumbs.js.map +1 -0
  29. package/lib/components/breadcrumbs/breadcrumbs.styles.js +4 -0
  30. package/lib/components/breadcrumbs/breadcrumbs.styles.js.map +1 -0
  31. package/lib/components/breadcrumbs-item/breadcrumbs-item.js +28 -27
  32. package/lib/components/breadcrumbs-item/breadcrumbs-item.js.map +1 -0
  33. package/lib/components/breadcrumbs-item/breadcrumbs-item.styles.js +4 -0
  34. package/lib/components/breadcrumbs-item/breadcrumbs-item.styles.js.map +1 -0
  35. package/lib/components/button/button.js +297 -1040
  36. package/lib/components/button/button.js.map +1 -0
  37. package/lib/components/button/button.styles.js +885 -0
  38. package/lib/components/button/button.styles.js.map +1 -0
  39. package/lib/components/button-group/button-group.js +30 -27
  40. package/lib/components/button-group/button-group.js.map +1 -0
  41. package/lib/components/button-group/button-group.styles.js +4 -0
  42. package/lib/components/button-group/button-group.styles.js.map +1 -0
  43. package/lib/components/card/card.js +57 -35
  44. package/lib/components/card/card.js.map +1 -0
  45. package/lib/components/card/card.styles.js +4 -0
  46. package/lib/components/card/card.styles.js.map +1 -0
  47. package/lib/components/chart/chart.js +528 -354
  48. package/lib/components/chart/chart.js.map +1 -0
  49. package/lib/components/chart/chart.styles.js +4 -0
  50. package/lib/components/chart/chart.styles.js.map +1 -0
  51. package/lib/components/checkbox-field/checkbox-field.js +66 -53
  52. package/lib/components/checkbox-field/checkbox-field.js.map +1 -0
  53. package/lib/components/checkbox-field/checkbox-field.styles.js +4 -0
  54. package/lib/components/checkbox-field/checkbox-field.styles.js.map +1 -0
  55. package/lib/components/checkbox-field-item/checkbox-field-item.js +252 -183
  56. package/lib/components/checkbox-field-item/checkbox-field-item.js.map +1 -0
  57. package/lib/components/checkbox-field-item/checkbox-field-item.styles.js +4 -0
  58. package/lib/components/checkbox-field-item/checkbox-field-item.styles.js.map +1 -0
  59. package/lib/components/contexts/form-internals-context.js +9 -0
  60. package/lib/components/contexts/form-internals-context.js.map +1 -0
  61. package/lib/components/cre8-element.js +57 -56
  62. package/lib/components/cre8-element.js.map +1 -0
  63. package/lib/components/cre8-form-element.js +212 -244
  64. package/lib/components/cre8-form-element.js.map +1 -0
  65. package/lib/components/danger-button/danger-button.js +274 -147
  66. package/lib/components/danger-button/danger-button.js.map +1 -0
  67. package/lib/components/danger-button/danger-button.styles.js +4 -0
  68. package/lib/components/danger-button/danger-button.styles.js.map +1 -0
  69. package/lib/components/date-picker/calendar/calendar.js +465 -0
  70. package/lib/components/date-picker/calendar/calendar.js.map +1 -0
  71. package/lib/components/date-picker/calendar/calendar.styles.js +4 -0
  72. package/lib/components/date-picker/calendar/calendar.styles.js.map +1 -0
  73. package/lib/components/date-picker/calendar-month-modal/calendar-month-modal.js +76 -0
  74. package/lib/components/date-picker/calendar-month-modal/calendar-month-modal.js.map +1 -0
  75. package/lib/components/date-picker/calendar-month-modal/calendar-month-modal.styles.js +4 -0
  76. package/lib/components/date-picker/calendar-month-modal/calendar-month-modal.styles.js.map +1 -0
  77. package/lib/components/date-picker/calendar-navigation/calendar-navigation.js +110 -0
  78. package/lib/components/date-picker/calendar-navigation/calendar-navigation.js.map +1 -0
  79. package/lib/components/date-picker/calendar-navigation/calendar-navigation.styles.js +4 -0
  80. package/lib/components/date-picker/calendar-navigation/calendar-navigation.styles.js.map +1 -0
  81. package/lib/components/date-picker/calendar-year-modal/calendar-year-modal.js +116 -0
  82. package/lib/components/date-picker/calendar-year-modal/calendar-year-modal.js.map +1 -0
  83. package/lib/components/date-picker/calendar-year-modal/calendar-year-modal.styles.js +4 -0
  84. package/lib/components/date-picker/calendar-year-modal/calendar-year-modal.styles.js.map +1 -0
  85. package/lib/components/date-picker/date-picker.js +91 -784
  86. package/lib/components/date-picker/date-picker.js.map +1 -0
  87. package/lib/components/date-picker/date-picker.styles.js +4 -0
  88. package/lib/components/date-picker/date-picker.styles.js.map +1 -0
  89. package/lib/components/divider/divider.js +45 -35
  90. package/lib/components/divider/divider.js.map +1 -0
  91. package/lib/components/divider/divider.styles.js +4 -0
  92. package/lib/components/divider/divider.styles.js.map +1 -0
  93. package/lib/components/dropdown/dropdown.js +97 -63
  94. package/lib/components/dropdown/dropdown.js.map +1 -0
  95. package/lib/components/dropdown/dropdown.styles.js +4 -0
  96. package/lib/components/dropdown/dropdown.styles.js.map +1 -0
  97. package/lib/components/dropdown-item/dropdown-item.js +38 -31
  98. package/lib/components/dropdown-item/dropdown-item.js.map +1 -0
  99. package/lib/components/dropdown-item/dropdown-item.styles.js +4 -0
  100. package/lib/components/dropdown-item/dropdown-item.styles.js.map +1 -0
  101. package/lib/components/feature/feature.js +40 -35
  102. package/lib/components/feature/feature.js.map +1 -0
  103. package/lib/components/feature/feature.styles.js +4 -0
  104. package/lib/components/feature/feature.styles.js.map +1 -0
  105. package/lib/components/field/field.js +218 -153
  106. package/lib/components/field/field.js.map +1 -0
  107. package/lib/components/field/field.styles.js +4 -0
  108. package/lib/components/field/field.styles.js.map +1 -0
  109. package/lib/components/field-note/field-note.js +58 -45
  110. package/lib/components/field-note/field-note.js.map +1 -0
  111. package/lib/components/field-note/field-note.styles.js +4 -0
  112. package/lib/components/field-note/field-note.styles.js.map +1 -0
  113. package/lib/components/footer/footer.js +25 -18
  114. package/lib/components/footer/footer.js.map +1 -0
  115. package/lib/components/footer/footer.styles.js +4 -0
  116. package/lib/components/footer/footer.styles.js.map +1 -0
  117. package/lib/components/global-nav/global-nav.js +44 -37
  118. package/lib/components/global-nav/global-nav.js.map +1 -0
  119. package/lib/components/global-nav/global-nav.styles.js +4 -0
  120. package/lib/components/global-nav/global-nav.styles.js.map +1 -0
  121. package/lib/components/global-nav-item/global-nav-item.js +149 -112
  122. package/lib/components/global-nav-item/global-nav-item.js.map +1 -0
  123. package/lib/components/global-nav-item/global-nav-item.styles.js +4 -0
  124. package/lib/components/global-nav-item/global-nav-item.styles.js.map +1 -0
  125. package/lib/components/grid/grid.js +48 -45
  126. package/lib/components/grid/grid.js.map +1 -0
  127. package/lib/components/grid/grid.styles.js +4 -0
  128. package/lib/components/grid/grid.styles.js.map +1 -0
  129. package/lib/components/grid-item/grid-item.js +19 -16
  130. package/lib/components/grid-item/grid-item.js.map +1 -0
  131. package/lib/components/grid-item/grid-item.styles.js +4 -0
  132. package/lib/components/grid-item/grid-item.styles.js.map +1 -0
  133. package/lib/components/header/header.js +34 -29
  134. package/lib/components/header/header.js.map +1 -0
  135. package/lib/components/header/header.styles.js +4 -0
  136. package/lib/components/header/header.styles.js.map +1 -0
  137. package/lib/components/heading/heading.js +113 -76
  138. package/lib/components/heading/heading.js.map +1 -0
  139. package/lib/components/heading/heading.styles.js +4 -0
  140. package/lib/components/heading/heading.styles.js.map +1 -0
  141. package/lib/components/hero/hero.js +43 -40
  142. package/lib/components/hero/hero.js.map +1 -0
  143. package/lib/components/hero/hero.styles.js +4 -0
  144. package/lib/components/hero/hero.styles.js.map +1 -0
  145. package/lib/components/icon/icon.js +232 -9
  146. package/lib/components/icon/icon.js.map +1 -0
  147. package/lib/components/icon/icon.styles.js +4 -0
  148. package/lib/components/icon/icon.styles.js.map +1 -0
  149. package/lib/components/inline-alert/inline-alert.js +114 -87
  150. package/lib/components/inline-alert/inline-alert.js.map +1 -0
  151. package/lib/components/inline-alert/inline-alert.styles.js +4 -0
  152. package/lib/components/inline-alert/inline-alert.styles.js.map +1 -0
  153. package/lib/components/layout/layout.js +30 -27
  154. package/lib/components/layout/layout.js.map +1 -0
  155. package/lib/components/layout/layout.styles.js +4 -0
  156. package/lib/components/layout/layout.styles.js.map +1 -0
  157. package/lib/components/layout-container/layout-container.js +30 -27
  158. package/lib/components/layout-container/layout-container.js.map +1 -0
  159. package/lib/components/layout-container/layout-container.styles.js +4 -0
  160. package/lib/components/layout-container/layout-container.styles.js.map +1 -0
  161. package/lib/components/layout-section/layout-section.js +41 -33
  162. package/lib/components/layout-section/layout-section.js.map +1 -0
  163. package/lib/components/layout-section/layout-section.styles.js +4 -0
  164. package/lib/components/layout-section/layout-section.styles.js.map +1 -0
  165. package/lib/components/linelength-container/linelength-container.js +19 -16
  166. package/lib/components/linelength-container/linelength-container.js.map +1 -0
  167. package/lib/components/linelength-container/linelength-container.styles.js +4 -0
  168. package/lib/components/linelength-container/linelength-container.styles.js.map +1 -0
  169. package/lib/components/link/link.js +125 -87
  170. package/lib/components/link/link.js.map +1 -0
  171. package/lib/components/link/link.styles.js +4 -0
  172. package/lib/components/link/link.styles.js.map +1 -0
  173. package/lib/components/link-list/link-list.js +48 -45
  174. package/lib/components/link-list/link-list.js.map +1 -0
  175. package/lib/components/link-list/link-list.styles.js +4 -0
  176. package/lib/components/link-list/link-list.styles.js.map +1 -0
  177. package/lib/components/link-list-item/link-list-item.js +40 -37
  178. package/lib/components/link-list-item/link-list-item.js.map +1 -0
  179. package/lib/components/link-list-item/link-list-item.styles.js +4 -0
  180. package/lib/components/link-list-item/link-list-item.styles.js.map +1 -0
  181. package/lib/components/list/list.js +35 -32
  182. package/lib/components/list/list.js.map +1 -0
  183. package/lib/components/list/list.styles.js +4 -0
  184. package/lib/components/list/list.styles.js.map +1 -0
  185. package/lib/components/list-item/list-item.js +25 -21
  186. package/lib/components/list-item/list-item.js.map +1 -0
  187. package/lib/components/list-item/list-item.styles.js +4 -0
  188. package/lib/components/list-item/list-item.styles.js.map +1 -0
  189. package/lib/components/loading-spinner/loading-spinner.js +126 -71
  190. package/lib/components/loading-spinner/loading-spinner.js.map +1 -0
  191. package/lib/components/loading-spinner/loading-spinner.styles.js +4 -0
  192. package/lib/components/loading-spinner/loading-spinner.styles.js.map +1 -0
  193. package/lib/components/logo/logo.js +28 -25
  194. package/lib/components/logo/logo.js.map +1 -0
  195. package/lib/components/logo/logo.styles.js +4 -0
  196. package/lib/components/logo/logo.styles.js.map +1 -0
  197. package/lib/components/main/main.js +29 -26
  198. package/lib/components/main/main.js.map +1 -0
  199. package/lib/components/main/main.styles.js +4 -0
  200. package/lib/components/main/main.styles.js.map +1 -0
  201. package/lib/components/modal/modal.js +174 -125
  202. package/lib/components/modal/modal.js.map +1 -0
  203. package/lib/components/modal/modal.styles.js +4 -0
  204. package/lib/components/modal/modal.styles.js.map +1 -0
  205. package/lib/components/multi-select/multi-select.js +300 -211
  206. package/lib/components/multi-select/multi-select.js.map +1 -0
  207. package/lib/components/multi-select/multi-select.styles.js +4 -0
  208. package/lib/components/multi-select/multi-select.styles.js.map +1 -0
  209. package/lib/components/nav-container/nav-container.js +19 -16
  210. package/lib/components/nav-container/nav-container.js.map +1 -0
  211. package/lib/components/nav-container/nav-container.styles.js +4 -0
  212. package/lib/components/nav-container/nav-container.styles.js.map +1 -0
  213. package/lib/components/page-header/page-header.js +36 -29
  214. package/lib/components/page-header/page-header.js.map +1 -0
  215. package/lib/components/page-header/page-header.styles.js +4 -0
  216. package/lib/components/page-header/page-header.styles.js.map +1 -0
  217. package/lib/components/pagination/page-counter/page-counter.js +67 -0
  218. package/lib/components/pagination/page-counter/page-counter.js.map +1 -0
  219. package/lib/components/pagination/page-counter/page-counter.styles.js +4 -0
  220. package/lib/components/pagination/page-counter/page-counter.styles.js.map +1 -0
  221. package/lib/components/pagination/pagination.js +282 -237
  222. package/lib/components/pagination/pagination.js.map +1 -0
  223. package/lib/components/pagination/pagination.styles.js +4 -0
  224. package/lib/components/pagination/pagination.styles.js.map +1 -0
  225. package/lib/components/percent-bar/percent-bar.js +56 -48
  226. package/lib/components/percent-bar/percent-bar.js.map +1 -0
  227. package/lib/components/percent-bar/percent-bar.styles.js +4 -0
  228. package/lib/components/percent-bar/percent-bar.styles.js.map +1 -0
  229. package/lib/components/popover/popover.js +304 -179
  230. package/lib/components/popover/popover.js.map +1 -0
  231. package/lib/components/popover/popover.styles.js +4 -0
  232. package/lib/components/popover/popover.styles.js.map +1 -0
  233. package/lib/components/primary-nav/primary-nav.js +44 -37
  234. package/lib/components/primary-nav/primary-nav.js.map +1 -0
  235. package/lib/components/primary-nav/primary-nav.styles.js +4 -0
  236. package/lib/components/primary-nav/primary-nav.styles.js.map +1 -0
  237. package/lib/components/primary-nav-item/primary-nav-item.js +151 -113
  238. package/lib/components/primary-nav-item/primary-nav-item.js.map +1 -0
  239. package/lib/components/primary-nav-item/primary-nav-item.styles.js +4 -0
  240. package/lib/components/primary-nav-item/primary-nav-item.styles.js.map +1 -0
  241. package/lib/components/progress-meter/progress-meter.js +74 -57
  242. package/lib/components/progress-meter/progress-meter.js.map +1 -0
  243. package/lib/components/progress-meter/progress-meter.styles.js +4 -0
  244. package/lib/components/progress-meter/progress-meter.styles.js.map +1 -0
  245. package/lib/components/progress-steps/progress-steps.js +19 -0
  246. package/lib/components/progress-steps/progress-steps.js.map +1 -0
  247. package/lib/components/progress-steps/progress-steps.styles.js +4 -0
  248. package/lib/components/progress-steps/progress-steps.styles.js.map +1 -0
  249. package/lib/components/progress-steps-item/progress-steps-item.js +52 -40
  250. package/lib/components/progress-steps-item/progress-steps-item.js.map +1 -0
  251. package/lib/components/progress-steps-item/progress-steps-item.styles.js +4 -0
  252. package/lib/components/progress-steps-item/progress-steps-item.styles.js.map +1 -0
  253. package/lib/components/radio-field/radio-field.js +59 -49
  254. package/lib/components/radio-field/radio-field.js.map +1 -0
  255. package/lib/components/radio-field/radio-field.styles.js +4 -0
  256. package/lib/components/radio-field/radio-field.styles.js.map +1 -0
  257. package/lib/components/radio-field-item/radio-field-item.js +222 -179
  258. package/lib/components/radio-field-item/radio-field-item.js.map +1 -0
  259. package/lib/components/radio-field-item/radio-field-item.styles.js +4 -0
  260. package/lib/components/radio-field-item/radio-field-item.styles.js.map +1 -0
  261. package/lib/components/remove-tag/remove-tag.js +89 -60
  262. package/lib/components/remove-tag/remove-tag.js.map +1 -0
  263. package/lib/components/remove-tag/remove-tag.styles.js +4 -0
  264. package/lib/components/remove-tag/remove-tag.styles.js.map +1 -0
  265. package/lib/components/section/section.js +46 -27
  266. package/lib/components/section/section.js.map +1 -0
  267. package/lib/components/section/section.styles.js +4 -0
  268. package/lib/components/section/section.styles.js.map +1 -0
  269. package/lib/components/select/select.js +243 -158
  270. package/lib/components/select/select.js.map +1 -0
  271. package/lib/components/select/select.styles.js +4 -0
  272. package/lib/components/select/select.styles.js.map +1 -0
  273. package/lib/components/select-tile/select-tile-checkbox-controller.js +60 -0
  274. package/lib/components/select-tile/select-tile-checkbox-controller.js.map +1 -0
  275. package/lib/components/select-tile/select-tile-radio-controller.js +167 -0
  276. package/lib/components/select-tile/select-tile-radio-controller.js.map +1 -0
  277. package/lib/components/select-tile/select-tile.js +228 -223
  278. package/lib/components/select-tile/select-tile.js.map +1 -0
  279. package/lib/components/select-tile/select-tile.styles.js +4 -0
  280. package/lib/components/select-tile/select-tile.styles.js.map +1 -0
  281. package/lib/components/select-tile-list/select-tile-list.js +76 -62
  282. package/lib/components/select-tile-list/select-tile-list.js.map +1 -0
  283. package/lib/components/select-tile-list/select-tile-list.styles.js +4 -0
  284. package/lib/components/select-tile-list/select-tile-list.styles.js.map +1 -0
  285. package/lib/components/skeleton-loader/skeleton-loader.js +68 -39
  286. package/lib/components/skeleton-loader/skeleton-loader.js.map +1 -0
  287. package/lib/components/skeleton-loader/skeleton-loader.styles.js +4 -0
  288. package/lib/components/skeleton-loader/skeleton-loader.styles.js.map +1 -0
  289. package/lib/components/split-button/split-button.js +51 -46
  290. package/lib/components/split-button/split-button.js.map +1 -0
  291. package/lib/components/split-button/split-button.styles.js +4 -0
  292. package/lib/components/split-button/split-button.styles.js.map +1 -0
  293. package/lib/components/submenu/submenu.js +19 -16
  294. package/lib/components/submenu/submenu.js.map +1 -0
  295. package/lib/components/submenu/submenu.styles.js +4 -0
  296. package/lib/components/submenu/submenu.styles.js.map +1 -0
  297. package/lib/components/submenu-item/submenu-item.js +32 -26
  298. package/lib/components/submenu-item/submenu-item.js.map +1 -0
  299. package/lib/components/submenu-item/submenu-item.styles.js +4 -0
  300. package/lib/components/submenu-item/submenu-item.styles.js.map +1 -0
  301. package/lib/components/tab/tab.js +74 -63
  302. package/lib/components/tab/tab.js.map +1 -0
  303. package/lib/components/tab/tab.styles.js +4 -0
  304. package/lib/components/tab/tab.styles.js.map +1 -0
  305. package/lib/components/tab-panel/tab-panel.js +49 -43
  306. package/lib/components/tab-panel/tab-panel.js.map +1 -0
  307. package/lib/components/tab-panel/tab-panel.styles.js +4 -0
  308. package/lib/components/tab-panel/tab-panel.styles.js.map +1 -0
  309. package/lib/components/table/table.js +46 -41
  310. package/lib/components/table/table.js.map +1 -0
  311. package/lib/components/table/table.styles.js +4 -0
  312. package/lib/components/table/table.styles.js.map +1 -0
  313. package/lib/components/table-body/table-body.js +20 -17
  314. package/lib/components/table-body/table-body.js.map +1 -0
  315. package/lib/components/table-body/table-body.styles.js +4 -0
  316. package/lib/components/table-body/table-body.styles.js.map +1 -0
  317. package/lib/components/table-cell/table-cell.js +39 -36
  318. package/lib/components/table-cell/table-cell.js.map +1 -0
  319. package/lib/components/table-cell/table-cell.styles.js +4 -0
  320. package/lib/components/table-cell/table-cell.styles.js.map +1 -0
  321. package/lib/components/table-header/table-header.js +20 -17
  322. package/lib/components/table-header/table-header.js.map +1 -0
  323. package/lib/components/table-header/table-header.styles.js +4 -0
  324. package/lib/components/table-header/table-header.styles.js.map +1 -0
  325. package/lib/components/table-header-cell/table-header-cell.js +35 -32
  326. package/lib/components/table-header-cell/table-header-cell.js.map +1 -0
  327. package/lib/components/table-header-cell/table-header-cell.styles.js +4 -0
  328. package/lib/components/table-header-cell/table-header-cell.styles.js.map +1 -0
  329. package/lib/components/table-object/table-object.js +21 -18
  330. package/lib/components/table-object/table-object.js.map +1 -0
  331. package/lib/components/table-object/table-object.styles.js +4 -0
  332. package/lib/components/table-object/table-object.styles.js.map +1 -0
  333. package/lib/components/table-row/table-row.js +76 -55
  334. package/lib/components/table-row/table-row.js.map +1 -0
  335. package/lib/components/table-row/table-row.styles.js +4 -0
  336. package/lib/components/table-row/table-row.styles.js.map +1 -0
  337. package/lib/components/tabs/tabs.js +452 -303
  338. package/lib/components/tabs/tabs.js.map +1 -0
  339. package/lib/components/tabs/tabs.styles.js +4 -0
  340. package/lib/components/tabs/tabs.styles.js.map +1 -0
  341. package/lib/components/tag/tag.js +236 -167
  342. package/lib/components/tag/tag.js.map +1 -0
  343. package/lib/components/tag/tag.styles.js +4 -0
  344. package/lib/components/tag/tag.styles.js.map +1 -0
  345. package/lib/components/tag-list/tag-list.js +40 -35
  346. package/lib/components/tag-list/tag-list.js.map +1 -0
  347. package/lib/components/tag-list/tag-list.styles.js +4 -0
  348. package/lib/components/tag-list/tag-list.styles.js.map +1 -0
  349. package/lib/components/tertiary-nav/tertiary-nav.js +40 -33
  350. package/lib/components/tertiary-nav/tertiary-nav.js.map +1 -0
  351. package/lib/components/tertiary-nav/tertiary-nav.styles.js +4 -0
  352. package/lib/components/tertiary-nav/tertiary-nav.styles.js.map +1 -0
  353. package/lib/components/tertiary-nav-item/tertiary-nav-item.js +52 -43
  354. package/lib/components/tertiary-nav-item/tertiary-nav-item.js.map +1 -0
  355. package/lib/components/tertiary-nav-item/tertiary-nav-item.styles.js +4 -0
  356. package/lib/components/tertiary-nav-item/tertiary-nav-item.styles.js.map +1 -0
  357. package/lib/components/text-link/text-link.js +45 -41
  358. package/lib/components/text-link/text-link.js.map +1 -0
  359. package/lib/components/text-link/text-link.styles.js +4 -0
  360. package/lib/components/text-link/text-link.styles.js.map +1 -0
  361. package/lib/components/text-passage/text-passage-light-dom.js +145 -0
  362. package/lib/components/text-passage/text-passage-light-dom.js.map +1 -0
  363. package/lib/components/text-passage/text-passage-light-dom.styles.js +4 -0
  364. package/lib/components/text-passage/text-passage-light-dom.styles.js.map +1 -0
  365. package/lib/components/text-passage/text-passage.js +72 -44
  366. package/lib/components/text-passage/text-passage.js.map +1 -0
  367. package/lib/components/text-passage/text-passage.styles.js +4 -0
  368. package/lib/components/text-passage/text-passage.styles.js.map +1 -0
  369. package/lib/components/tooltip/tooltip.js +278 -173
  370. package/lib/components/tooltip/tooltip.js.map +1 -0
  371. package/lib/components/tooltip/tooltip.styles.js +4 -0
  372. package/lib/components/tooltip/tooltip.styles.js.map +1 -0
  373. package/lib/components/utility-nav/utility-nav.js +40 -33
  374. package/lib/components/utility-nav/utility-nav.js.map +1 -0
  375. package/lib/components/utility-nav/utility-nav.styles.js +4 -0
  376. package/lib/components/utility-nav/utility-nav.styles.js.map +1 -0
  377. package/lib/components/utility-nav-item/utility-nav-item.js +70 -49
  378. package/lib/components/utility-nav-item/utility-nav-item.js.map +1 -0
  379. package/lib/components/utility-nav-item/utility-nav-item.styles.js +4 -0
  380. package/lib/components/utility-nav-item/utility-nav-item.styles.js.map +1 -0
  381. package/lib/design-tokens/brands/blue/css/tokens_blue.module.js +737 -0
  382. package/lib/design-tokens/brands/blue/css/tokens_blue.module.js.map +1 -0
  383. package/lib/design-tokens/brands/bolt/tokens_bolt.theme.js +756 -0
  384. package/lib/design-tokens/brands/bolt/tokens_bolt.theme.js.map +1 -0
  385. package/lib/design-tokens/brands/cre8/css/tokens_cre8.module.js +771 -0
  386. package/lib/design-tokens/brands/cre8/css/tokens_cre8.module.js.map +1 -0
  387. package/lib/design-tokens/brands/cre8-a2ui/css/tokens_cre8-a2ui.module.js +772 -0
  388. package/lib/design-tokens/brands/cre8-a2ui/css/tokens_cre8-a2ui.module.js.map +1 -0
  389. package/lib/design-tokens/brands/cre8-legacy/css/tokens_cre8-legacy.module.js +737 -0
  390. package/lib/design-tokens/brands/cre8-legacy/css/tokens_cre8-legacy.module.js.map +1 -0
  391. package/lib/design-tokens/brands/femmecubator/css/tokens_femmecubator2.module.js +983 -0
  392. package/lib/design-tokens/brands/femmecubator/css/tokens_femmecubator2.module.js.map +1 -0
  393. package/lib/design-tokens/brands/legacy/css/tokens_legacy.module.js +737 -0
  394. package/lib/design-tokens/brands/legacy/css/tokens_legacy.module.js.map +1 -0
  395. package/lib/design-tokens/brands/marketing/css/tokens_marketing.module.js +736 -0
  396. package/lib/design-tokens/brands/marketing/css/tokens_marketing.module.js.map +1 -0
  397. package/lib/design-tokens/brands/minimalist/css/tokens_minimalist.module.js +737 -0
  398. package/lib/design-tokens/brands/minimalist/css/tokens_minimalist.module.js.map +1 -0
  399. package/lib/design-tokens/brands/prisma/tokens_prisma.module.js +771 -0
  400. package/lib/design-tokens/brands/prisma/tokens_prisma.module.js.map +1 -0
  401. package/lib/design-tokens/brands/starbucks/tokens.module.js +552 -0
  402. package/lib/design-tokens/brands/starbucks/tokens.module.js.map +1 -0
  403. package/lib/design-tokens/brands/starbucks/tokens_starbucks.module.js +776 -0
  404. package/lib/design-tokens/brands/starbucks/tokens_starbucks.module.js.map +1 -0
  405. package/lib/design-tokens/brands copy/blue/css/tokens_blue.module.js +253 -0
  406. package/lib/design-tokens/brands copy/blue/css/tokens_blue.module.js.map +1 -0
  407. package/lib/design-tokens/core/scss/theming/head.module.js +6 -0
  408. package/lib/design-tokens/core/scss/theming/head.module.js.map +1 -0
  409. package/lib/design-tokens/tokens_netflix.theme.js +806 -0
  410. package/lib/design-tokens/tokens_netflix.theme.js.map +1 -0
  411. package/lib/directives/if-truthy.js +24 -0
  412. package/lib/directives/if-truthy.js.map +1 -0
  413. package/lib/directives/spread.js +29 -0
  414. package/lib/directives/spread.js.map +1 -0
  415. package/lib/index.js +84 -168
  416. package/lib/index.js.map +1 -0
  417. package/lib/scripts/convert-scss-to-ts.js +25 -0
  418. package/lib/scripts/convert-scss-to-ts.js.map +1 -0
  419. package/lib/scripts/extract-tokens.js +120 -0
  420. package/lib/scripts/extract-tokens.js.map +1 -0
  421. package/lib/scripts/generate-react-wrappers.js +229 -0
  422. package/lib/scripts/generate-react-wrappers.js.map +1 -0
  423. package/lib/scripts/generateWesparkleThemes.js +52 -0
  424. package/lib/scripts/generateWesparkleThemes.js.map +1 -0
  425. package/lib/toBeAccessible.js +18 -0
  426. package/lib/toBeAccessible.js.map +1 -0
  427. package/lib/utilities/is-mobile.js +10 -0
  428. package/lib/utilities/is-mobile.js.map +1 -0
  429. package/lib/utilities/story-helpers.js +14 -0
  430. package/lib/utilities/story-helpers.js.map +1 -0
  431. package/lib/vite.config.cdn.js +85 -0
  432. package/lib/vite.config.cdn.js.map +1 -0
  433. package/lib/vite.config.js +156 -0
  434. package/lib/vite.config.js.map +1 -0
  435. package/package.json +8 -9
@@ -0,0 +1,4 @@
1
+ import { css } from 'lit';
2
+ const styles = css `*,::slotted(*),*:before,*:after{box-sizing:border-box}:root{--size-base-unit: 0.5rem}[dir=rtl]{--rtlTranslateX: 50%;--rtlGradientToRight: 270deg;--rtlRotate45Inverse: -45deg}:host{--cre8-z-index-1: 1;--cre8-z-index-50: 50;--cre8-z-index-100: 100;--cre8-z-index-200: 200;--cre8-z-index-1030: 1030;--cre8-anim-fade-quick: 0.35s;--cre8-anim-ease: ease}@keyframes fadeIn{100%{opacity:1}}@keyframes slideIn{100%{transform:translateX(0)}}@keyframes slideInFwd{100%{width:272px;height:272px}}@keyframes slideOutRight{100%{width:272px;height:272px}}@keyframes slideUp{100%{transform:translateY(0)}}@media(width >= 481px){@keyframes slideInFwd{100%{width:417px;height:417px}}@keyframes slideOutRight{100%{width:417px;height:417px}}}@media(width >= 48rem){@keyframes slideInFwd{100%{width:330px;height:330px}}@keyframes slideOutRight{100%{width:330px;height:330px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 60rem){@keyframes slideInFwd{100%{width:460px;height:460px}}@keyframes slideOutRight{100%{width:460px;height:460px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 75rem){@keyframes slideInFwd{100%{width:592px;height:591px}}@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 87.5rem){@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 120px))}}}@media(width >= 2200px){@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 592px))}}}span.ripple{position:absolute;border-radius:50%;transform:scale(0);animation:ripple 600ms linear;background-color:var(--ripple-bg-color)}@keyframes ripple{to{transform:scale(4);opacity:1}}:root{--size-base-unit: 0.5rem}[dir=rtl]{--rtlTranslateX: 50%;--rtlGradientToRight: 270deg;--rtlRotate45Inverse: -45deg}.cre8-c-feature{display:flex;flex-direction:column;align-items:stretch;color:var(--cre8-feature-text-color, var(--cre8-theme-color-core-text, var(--cre8-color-neutral-black)));border-radius:var(--cre8-feature-border-radius, var(--cre8-border-radius-default, 0))}@media all and (min-width: 768px){.cre8-c-feature{flex-direction:row}}.cre8-c-feature--inverted{color:var(--cre8-feature-inverted-text-color, var(--cre8-theme-color-inverted, var(--cre8-color-neutral-white)))}.cre8-c-feature__body{margin-bottom:2rem}@media all and (min-width: 768px){.cre8-c-feature__body{display:flex;flex-direction:column;flex:1;padding-right:2rem;margin-bottom:0}}.cre8-c-feature__media{width:100%}@media all and (min-width: 768px){.cre8-c-feature__media{width:45%}}.cre8-c-feature__image{display:block;width:100%}`;
3
+ export default styles;
4
+ //# sourceMappingURL=feature.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"feature.styles.js","sourceRoot":"","sources":["../../../components/feature/feature.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,MAAM,MAAM,GAAG,GAAG,CAAA,siFAAsiF,CAAC;AACzjF,eAAe,MAAM,CAAC","sourcesContent":["import { css } from 'lit';\nconst styles = css`*,::slotted(*),*:before,*:after{box-sizing:border-box}:root{--size-base-unit: 0.5rem}[dir=rtl]{--rtlTranslateX: 50%;--rtlGradientToRight: 270deg;--rtlRotate45Inverse: -45deg}:host{--cre8-z-index-1: 1;--cre8-z-index-50: 50;--cre8-z-index-100: 100;--cre8-z-index-200: 200;--cre8-z-index-1030: 1030;--cre8-anim-fade-quick: 0.35s;--cre8-anim-ease: ease}@keyframes fadeIn{100%{opacity:1}}@keyframes slideIn{100%{transform:translateX(0)}}@keyframes slideInFwd{100%{width:272px;height:272px}}@keyframes slideOutRight{100%{width:272px;height:272px}}@keyframes slideUp{100%{transform:translateY(0)}}@media(width >= 481px){@keyframes slideInFwd{100%{width:417px;height:417px}}@keyframes slideOutRight{100%{width:417px;height:417px}}}@media(width >= 48rem){@keyframes slideInFwd{100%{width:330px;height:330px}}@keyframes slideOutRight{100%{width:330px;height:330px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 60rem){@keyframes slideInFwd{100%{width:460px;height:460px}}@keyframes slideOutRight{100%{width:460px;height:460px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 75rem){@keyframes slideInFwd{100%{width:592px;height:591px}}@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 87.5rem){@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 120px))}}}@media(width >= 2200px){@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 592px))}}}span.ripple{position:absolute;border-radius:50%;transform:scale(0);animation:ripple 600ms linear;background-color:var(--ripple-bg-color)}@keyframes ripple{to{transform:scale(4);opacity:1}}:root{--size-base-unit: 0.5rem}[dir=rtl]{--rtlTranslateX: 50%;--rtlGradientToRight: 270deg;--rtlRotate45Inverse: -45deg}.cre8-c-feature{display:flex;flex-direction:column;align-items:stretch;color:var(--cre8-feature-text-color, var(--cre8-theme-color-core-text, var(--cre8-color-neutral-black)));border-radius:var(--cre8-feature-border-radius, var(--cre8-border-radius-default, 0))}@media all and (min-width: 768px){.cre8-c-feature{flex-direction:row}}.cre8-c-feature--inverted{color:var(--cre8-feature-inverted-text-color, var(--cre8-theme-color-inverted, var(--cre8-color-neutral-white)))}.cre8-c-feature__body{margin-bottom:2rem}@media all and (min-width: 768px){.cre8-c-feature__body{display:flex;flex-direction:column;flex:1;padding-right:2rem;margin-bottom:0}}.cre8-c-feature__media{width:100%}@media all and (min-width: 768px){.cre8-c-feature__media{width:45%}}.cre8-c-feature__image{display:block;width:100%}`;\nexport default styles;\n"]}
@@ -1,183 +1,248 @@
1
- import { css as f, html as l, nothing as u } from "lit";
2
- import { ifDefined as i } from "lit-html/directives/if-defined.js";
3
- import { property as t, query as y } from "lit/decorators.js";
4
- import { nanoid as d } from "nanoid";
5
- import { Cre8FormElement as m } from "../cre8-form-element.js";
6
- import "../field-note/field-note.js";
7
- const b = 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-field__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-field__body{position:relative}.cre8-c-field__input{font-family:var(--cre8-typography-body-default-font-family);font-size:var(--cre8-typography-body-default-font-size);font-weight:var(--cre8-typography-body-default-font-weight);line-height:var(--cre8-typography-body-default-line-height);text-decoration:var(--cre8-typography-body-default-text-decoration);text-transform:var(--cre8-typography-body-default-text-transform);outline:var(--cre8-border-width-focus) solid rgba(0,0,0,0);outline-offset:0.125rem;-webkit-appearance:none;width:100%;border-width:var(--cre8-border-width-default);border-style:solid;border-color:var(--cre8-color-border-strong);border-radius:var(--cre8-border-radius-default);padding:0.75rem 0.5rem;color:var(--cre8-color-content-default);background-color:var(--cre8-color-bg-default);transition:outline-color var(--cre8-anim-fade-quick) var(--cre8-anim-ease),border-color var(--cre8-anim-fade-quick) var(--cre8-anim-ease),background-color var(--cre8-anim-fade-quick) var(--cre8-anim-ease),color var(--cre8-anim-fade-quick) var(--cre8-anim-ease)}.cre8-c-field__input:hover:not(:disabled),.cre8-c-field__input:focus:not(:disabled),.cre8-c-field__input:active:not(:disabled),.cre8-c-field__input:focus-visible{outline:var(--cre8-border-width-focus) solid var(--cre8-color-border-active-outline);outline-offset:0.125rem}.cre8-is-error .cre8-c-field__input:hover:not(:disabled),.cre8-is-error .cre8-c-field__input:focus:not(:disabled),.cre8-is-error .cre8-c-field__input:active:not(:disabled),.cre8-is-error .cre8-c-field__input:focus-visible{outline-color:var(--cre8-color-border-error)}.cre8-is-success .cre8-c-field__input:hover:not(:disabled),.cre8-is-success .cre8-c-field__input:focus:not(:disabled),.cre8-is-success .cre8-c-field__input:active:not(:disabled),.cre8-is-success .cre8-c-field__input:focus-visible{outline-color:var(--cre8-color-border-success)}.cre8-c-field__input:disabled{background-color:var(--cre8-color-bg-disabled);border-color:var(--cre8-color-border-disabled);color:var(--cre8-color-content-disabled);cursor:not-allowed}.cre8-c-field__input:disabled::placeholder{color:var(--cre8-color-content-disabled)}.cre8-c-field__input::placeholder{color:var(--cre8-color-content-subtle)}.cre8-is-error .cre8-c-field__input{border-color:var(--cre8-color-border-error)}.cre8-is-success .cre8-c-field__input{border-color:var(--cre8-color-border-success)}.cre8-c-field__input:read-only{background-color:var(--cre8-color-bg-disabled);border-color:var(--cre8-color-border-disabled);cursor:default}`;
8
- var v = Object.defineProperty, r = (p, o, s, g) => {
9
- for (var a = void 0, c = p.length - 1, h; c >= 0; c--)
10
- (h = p[c]) && (a = h(o, s, a) || a);
11
- return a && v(o, s, a), a;
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
12
6
  };
13
- const n = class n extends m {
14
- constructor() {
15
- super(...arguments), this.type = "text", this.label = "Label", this.ariaLive = "polite", this.errorText = "Error", this.successText = "Success";
16
- }
17
- /**
18
- * First update lifecycle hook
19
- * 1) super.firstUpdated also uses the firstUpdated from the Cre8FormElement
20
- */
21
- firstUpdated() {
22
- return this.initializeAria(), super.firstUpdated();
23
- }
24
- /**
25
- * Initialize aria attributes
26
- */
27
- initializeAria() {
28
- this.fieldId = this.fieldId || d(), (this.fieldNote || this.slotNotEmpty("fieldNote")) && (this.ariaDescribedBy = this.ariaDescribedBy || `Field_${d()}`), (this.successNote || this.errorNote) && (this.validationAriaDescribedBy = this.validationAriaDescribedBy || `Field_validation_${d()}`);
29
- }
30
- /**
31
- * Aria describedby string based on field notes and error/success notes
32
- * 1) If both validationAriaDescribedBy (error/success note) and field note exists,
33
- * render both in the input's `aria-describedby` attribute
34
- * 2) Otherwise, if only validationAriaDescribedBy exists, then render only that as
35
- * the `aria-describedby` attribute (input without field note initially, but then error/success is added).
36
- * 3) Otherwise, render only the `ariaDescribedBy` property (field note only)
37
- */
38
- fieldNoteAria() {
39
- return this.validationAriaDescribedBy && this.ariaDescribedBy ? `${this.ariaDescribedBy} ${this.validationAriaDescribedBy}` : this.validationAriaDescribedBy && !this.ariaDescribedBy ? this.validationAriaDescribedBy : this.ariaDescribedBy;
40
- }
41
- /**
42
- * Handle On Input
43
- * 1) Set the input's value equal to the event.target.value when the input is changed.
44
- * 2) Set the internal form value of the input to the updated value
45
- */
46
- _handleOnInput(o) {
47
- const s = o.target.value;
48
- this.value = s, this._internals.setFormValue(this.value);
49
- }
50
- /**
51
- * Render the success or error field notes
52
- * 1. If there is a successNote, then return the field note with the success message and state.
53
- * 2. If there is a errorNote, then return the field note with the error message and state.
54
- */
55
- renderSuccessErrorFieldNote() {
56
- return this.successNote ? l` <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 { Cre8FormElement } from '../cre8-form-element';
12
+ import '../field-note/field-note';
13
+ import styles from './field.styles.js';
14
+ /**
15
+ * The Field component renders a form group with label, control, help text and validation styling. There are
16
+ * convenience variants of Field to support HTML5 input types and static content.
17
+ */
18
+ export class Cre8Field extends Cre8FormElement {
19
+ constructor() {
20
+ super(...arguments);
21
+ /**
22
+ * Type variants
23
+ * - **text** renders a standard text input
24
+ * - **email** renders a text input for an email format
25
+ * - **number** renders an input for number values only
26
+ * - **url** renders an input for urls only
27
+ * - **tel** renders an input for telephone number values only
28
+ *
29
+ * @attr {string}
30
+ */
31
+ this.type = 'text';
32
+ /**
33
+ * The required label that appears above the input
34
+ *
35
+ * @attr {string}
36
+ */
37
+ this.label = 'Label';
38
+ /**
39
+ * Controls how the voiceover will experience the new information when field note changes,
40
+ * immediately (used for more urgently needed updates) using `assertive` or at the next convenient
41
+ * pause in their navigation using `polite`.
42
+ */
43
+ this.ariaLive = 'polite';
44
+ /**
45
+ * Visually hidden text that always signifies that this is an error for screen reader usage
46
+ *
47
+ * @attr {string}
48
+ */
49
+ this.errorText = 'Error';
50
+ /**
51
+ * Visually hidden text that always signifies that this is successful for screen reader usage
52
+ *
53
+ * @attr {string}
54
+ */
55
+ this.successText = 'Success';
56
+ }
57
+ /**
58
+ * First update lifecycle hook
59
+ * 1) super.firstUpdated also uses the firstUpdated from the Cre8FormElement
60
+ */
61
+ firstUpdated() {
62
+ this.initializeAria();
63
+ return super.firstUpdated();
64
+ }
65
+ /**
66
+ * Initialize aria attributes
67
+ */
68
+ initializeAria() {
69
+ this.fieldId = this.fieldId || nanoid();
70
+ if (this.fieldNote || this.slotNotEmpty('fieldNote')) {
71
+ this.ariaDescribedBy = this.ariaDescribedBy || `Field_${nanoid()}`;
72
+ }
73
+ if (this.successNote || this.errorNote) {
74
+ this.validationAriaDescribedBy = this.validationAriaDescribedBy || `Field_validation_${nanoid()}`;
75
+ }
76
+ }
77
+ /**
78
+ * Aria describedby string based on field notes and error/success notes
79
+ * 1) If both validationAriaDescribedBy (error/success note) and field note exists,
80
+ * render both in the input's `aria-describedby` attribute
81
+ * 2) Otherwise, if only validationAriaDescribedBy exists, then render only that as
82
+ * the `aria-describedby` attribute (input without field note initially, but then error/success is added).
83
+ * 3) Otherwise, render only the `ariaDescribedBy` property (field note only)
84
+ */
85
+ fieldNoteAria() {
86
+ if (this.validationAriaDescribedBy && this.ariaDescribedBy) {
87
+ return `${this.ariaDescribedBy} ${this.validationAriaDescribedBy}`; /* 1 */
88
+ }
89
+ if (this.validationAriaDescribedBy && !this.ariaDescribedBy) {
90
+ return this.validationAriaDescribedBy; /* 2 */
91
+ }
92
+ return this.ariaDescribedBy; /* 3 */
93
+ }
94
+ /**
95
+ * Handle On Input
96
+ * 1) Set the input's value equal to the event.target.value when the input is changed.
97
+ * 2) Set the internal form value of the input to the updated value
98
+ */
99
+ _handleOnInput(e) {
100
+ /* 1 */
101
+ const inputValue = e.target.value;
102
+ this.value = inputValue;
103
+ /* 2 */
104
+ this._internals.setFormValue(this.value);
105
+ }
106
+ /**
107
+ * Render the success or error field notes
108
+ * 1. If there is a successNote, then return the field note with the success message and state.
109
+ * 2. If there is a errorNote, then return the field note with the error message and state.
110
+ */
111
+ renderSuccessErrorFieldNote() {
112
+ if (this.successNote) {
113
+ /* 1 */
114
+ return html ` <cre8-field-note
57
115
  ?isSuccess=${this.isSuccess}
58
116
  class="cre8-c-field__field-note-success"
59
117
  id=${this.validationAriaDescribedBy}
60
118
  iconName="success"
61
119
  >
62
120
  ${this.successNote}
63
- </cre8-field-note>` : this.errorNote ? l` <cre8-field-note
121
+ </cre8-field-note>`;
122
+ }
123
+ if (this.errorNote) {
124
+ /* 2 */
125
+ return html ` <cre8-field-note
64
126
  ?isError=${this.isError}
65
127
  class="cre8-c-field__field-note-error"
66
128
  id=${this.validationAriaDescribedBy}
67
129
  iconName="error-alt"
68
130
  >
69
131
  ${this.errorNote}
70
- </cre8-field-note>` : null;
71
- }
72
- render() {
73
- const o = this.componentClassNames("cre8-c-field", {
74
- "cre8-is-error": this.isError,
75
- "cre8-is-success": this.isSuccess
76
- });
77
- return l`
78
- <div class="${o}">
132
+ </cre8-field-note>`;
133
+ }
134
+ return null;
135
+ }
136
+ render() {
137
+ const componentClassNames = this.componentClassNames('cre8-c-field', {
138
+ 'cre8-is-error': this.isError,
139
+ 'cre8-is-success': this.isSuccess,
140
+ });
141
+ return html `
142
+ <div class="${componentClassNames}">
79
143
  <label class="cre8-c-field__label" for="${this.fieldId}">${this.label}</label>
80
144
  <div class="cre8-c-field__body">
81
145
  <input
82
146
  class="cre8-c-field__input"
83
- autocomplete=${i(this.autocomplete)}
147
+ autocomplete=${ifDefined(this.autocomplete)}
84
148
  type="${this.type}"
85
149
  id="${this.fieldId}"
86
- max=${this.type === "date" && i(this.max).toString()}
87
- min=${this.type === "date" && i(this.max).toString()}
88
- maxlength=${i(this.maxlength)}
150
+ max=${(this.type === 'date') && ifDefined(this.max).toString()}
151
+ min=${(this.type === 'date') && ifDefined(this.max).toString()}
152
+ maxlength=${ifDefined(this.maxlength)}
89
153
  ?readonly=${this.readonly}
90
154
  ?required=${this.required}
91
- aria-invalid=${this.isError ? "true" : "false"}
155
+ aria-invalid=${this.isError ? 'true' : 'false'}
92
156
  ?disabled="${this.disabled}"
93
- pattern=${i(this.pattern)}
94
- aria-describedby="${i(this.fieldNoteAria())}"
95
- placeholder="${i(this.placeholder)}"
157
+ pattern=${ifDefined(this.pattern)}
158
+ aria-describedby="${ifDefined(this.fieldNoteAria())}"
159
+ placeholder="${ifDefined(this.placeholder)}"
96
160
  .value="${this.value}"
97
161
  @input=${this._handleOnInput}
98
162
  />
99
163
  </div>
100
- ${this.fieldNote || this.slotNotEmpty("fieldNote") ? l`<cre8-field-note id=${this.ariaDescribedBy} class="cre8-c-field__field-note"
164
+ ${this.fieldNote || this.slotNotEmpty('fieldNote')
165
+ ? html `<cre8-field-note id=${this.ariaDescribedBy} class="cre8-c-field__field-note"
101
166
  ><slot name="fieldNote">${this.fieldNote}</slot></cre8-field-note
102
- >` : u}
167
+ >`
168
+ : nothing}
103
169
  ${this.renderSuccessErrorFieldNote()}
104
170
  </div>
105
171
  `;
106
- }
107
- };
108
- n.styles = [b];
109
- let e = n;
110
- r([
111
- t()
112
- ], e.prototype, "autocomplete");
113
- r([
114
- t()
115
- ], e.prototype, "pattern");
116
- r([
117
- t()
118
- ], e.prototype, "type");
119
- r([
120
- t()
121
- ], e.prototype, "placeholder");
122
- r([
123
- t()
124
- ], e.prototype, "label");
125
- r([
126
- t()
127
- ], e.prototype, "fieldId");
128
- r([
129
- t()
130
- ], e.prototype, "fieldNote");
131
- r([
132
- t()
133
- ], e.prototype, "ariaLive");
134
- r([
135
- t()
136
- ], e.prototype, "ariaDescribedBy");
137
- r([
138
- t({ type: Boolean, reflect: !0 })
139
- ], e.prototype, "required");
140
- r([
141
- t({ type: Boolean, reflect: !0 })
142
- ], e.prototype, "disabled");
143
- r([
144
- t({ type: Boolean, reflect: !0 })
145
- ], e.prototype, "isError");
146
- r([
147
- t()
148
- ], e.prototype, "errorText");
149
- r([
150
- t()
151
- ], e.prototype, "errorNote");
152
- r([
153
- t()
154
- ], e.prototype, "max");
155
- r([
156
- t()
157
- ], e.prototype, "min");
158
- r([
159
- t({ type: Number })
160
- ], e.prototype, "maxlength");
161
- r([
162
- t()
163
- ], e.prototype, "validationAriaDescribedBy");
164
- r([
165
- t({ type: Boolean, reflect: !0 })
166
- ], e.prototype, "isSuccess");
167
- r([
168
- t()
169
- ], e.prototype, "successText");
170
- r([
171
- t({ type: Boolean, reflect: !0 })
172
- ], e.prototype, "readonly");
173
- r([
174
- t()
175
- ], e.prototype, "successNote");
176
- r([
177
- y("input")
178
- ], e.prototype, "field");
179
- customElements.get("cre8-field") === void 0 && customElements.define("cre8-field", e);
180
- export {
181
- e as Cre8Field,
182
- e as default
183
- };
172
+ }
173
+ }
174
+ Cre8Field.styles = [styles];
175
+ __decorate([
176
+ property()
177
+ ], Cre8Field.prototype, "autocomplete", void 0);
178
+ __decorate([
179
+ property()
180
+ ], Cre8Field.prototype, "pattern", void 0);
181
+ __decorate([
182
+ property()
183
+ ], Cre8Field.prototype, "type", void 0);
184
+ __decorate([
185
+ property()
186
+ ], Cre8Field.prototype, "placeholder", void 0);
187
+ __decorate([
188
+ property()
189
+ ], Cre8Field.prototype, "label", void 0);
190
+ __decorate([
191
+ property()
192
+ ], Cre8Field.prototype, "fieldId", void 0);
193
+ __decorate([
194
+ property()
195
+ ], Cre8Field.prototype, "fieldNote", void 0);
196
+ __decorate([
197
+ property()
198
+ ], Cre8Field.prototype, "ariaLive", void 0);
199
+ __decorate([
200
+ property()
201
+ ], Cre8Field.prototype, "ariaDescribedBy", void 0);
202
+ __decorate([
203
+ property({ type: Boolean, reflect: true })
204
+ ], Cre8Field.prototype, "required", void 0);
205
+ __decorate([
206
+ property({ type: Boolean, reflect: true })
207
+ ], Cre8Field.prototype, "disabled", void 0);
208
+ __decorate([
209
+ property({ type: Boolean, reflect: true })
210
+ ], Cre8Field.prototype, "isError", void 0);
211
+ __decorate([
212
+ property()
213
+ ], Cre8Field.prototype, "errorText", void 0);
214
+ __decorate([
215
+ property()
216
+ ], Cre8Field.prototype, "errorNote", void 0);
217
+ __decorate([
218
+ property()
219
+ ], Cre8Field.prototype, "max", void 0);
220
+ __decorate([
221
+ property()
222
+ ], Cre8Field.prototype, "min", void 0);
223
+ __decorate([
224
+ property({ type: Number })
225
+ ], Cre8Field.prototype, "maxlength", void 0);
226
+ __decorate([
227
+ property()
228
+ ], Cre8Field.prototype, "validationAriaDescribedBy", void 0);
229
+ __decorate([
230
+ property({ type: Boolean, reflect: true })
231
+ ], Cre8Field.prototype, "isSuccess", void 0);
232
+ __decorate([
233
+ property()
234
+ ], Cre8Field.prototype, "successText", void 0);
235
+ __decorate([
236
+ property({ type: Boolean, reflect: true })
237
+ ], Cre8Field.prototype, "readonly", void 0);
238
+ __decorate([
239
+ property()
240
+ ], Cre8Field.prototype, "successNote", void 0);
241
+ __decorate([
242
+ query('input')
243
+ ], Cre8Field.prototype, "field", void 0);
244
+ if (customElements.get('cre8-field') === undefined) {
245
+ customElements.define('cre8-field', Cre8Field);
246
+ }
247
+ export default Cre8Field;
248
+ //# sourceMappingURL=field.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"field.js","sourceRoot":"","sources":["../../../components/field/field.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 { Cre8FormElement } from '../cre8-form-element';\nimport '../field-note/field-note';\nimport styles from './field.styles.js';\n\n/**\n * The Field component renders a form group with label, control, help text and validation styling. There are\n * convenience variants of Field to support HTML5 input types and static content.\n */\nexport class Cre8Field extends Cre8FormElement {\n static styles = [styles];\n \n\n /**\n * Autocomplete attribute that allows input to expect certain types of information. Note: autocomplete is supported\n * by most browsers, but the suggested 'completions' are also sourced from those browsers. Values come\n * from past user stored data from past interactions in that browser, such as:\n *\n * 1. From past values entered by the user, but they may also come from pre-configured values. For\n * instance, a browser might let the user save their name, address, phone number, and email addresses for\n * autocomplete purposes.\n *\n * 2. Perhaps the browser offers the ability to save encrypted credit card information, for autocompletion\n * following a an authentication procedure.\n * See: [MDN web docs_](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete)\n *\n * NOTE:: In order to provide autocompletion, user-agents might require input, select, textarea\n * elements to:\n *\n * 1. Have a {{name}} and/or {{id}} attribute\n * 2. Be descendants of a form element\n * 3. The form to have a [submit button](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/submit)\n *\n * @attr {string}\n */\n @property()\n autocomplete?: 'on' | 'off' | 'name' | 'email' | 'username' | 'new-password' | 'current-password' | 'tel' | 'url' | 'address-line1' | 'address-line2' | 'country' | 'postal-code';\n\n /**\n * Pattern attribute defines a regular expression to validate against input\n *\n * @attr {string}\n */\n @property()\n pattern?: string;\n\n /**\n * Type variants\n * - **text** renders a standard text input\n * - **email** renders a text input for an email format\n * - **number** renders an input for number values only\n * - **url** renders an input for urls only\n * - **tel** renders an input for telephone number values only\n *\n * @attr {string}\n */\n @property()\n type: 'text' | 'email' | 'number' | 'url' | 'tel' | 'password' | 'date' = 'text';\n\n /**\n * The placeholder text that appears inside the input\n *\n * @attr {string}\n */\n @property()\n placeholder?: string;\n\n /**\n * The required label that appears above the input\n *\n * @attr {string}\n */\n @property()\n label: string = 'Label';\n\n /**\n * The name property on the input\n *\n * @attr {string}\n */\n\n\n /**\n * The unique id of the field\n * <br/><br/> _*This property is dynamically set_\n *\n * @attr {string}\n */\n @property()\n fieldId?: string;\n\n /**\n * The text that displays below in text field input\n *\n * @attr {string}\n */\n @property()\n fieldNote?: string;\n\n /**\n * Controls how the voiceover will experience the new information when field note changes,\n * immediately (used for more urgently needed updates) using `assertive` or at the next convenient\n * pause in their navigation using `polite`.\n */\n @property()\n ariaLive: 'polite' | 'assertive' = 'polite';\n\n /**\n * Used to connect the field note in text field to the text menu for accessibility\n *\n * @attr {string}\n */\n @property()\n ariaDescribedBy?: string;\n\n /**\n * The required attribute on the input\n *\n * @attr {boolean}\n */\n @property({ type: Boolean, reflect: true })\n required?: boolean;\n\n /**\n * The disabled attribute on the input\n *\n * @attr {boolean}\n */\n @property({ type: Boolean, reflect: true })\n disabled?: boolean;\n\n /**\n * Changes the component's treatment to represent an error state\n *\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 *\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 * @attr {string}\n */\n @property()\n errorNote?: string;\n\n /**\n * The max attribute defines the maximum value that is acceptable and valid for the input containing the attribute.\n * @attr {string | number}\n */\n @property()\n max?: string;\n\n /**\n * The min attribute defines the minimum value that is acceptable and valid for the input containing the attribute.\n * @attr {string | number}\n */\n @property()\n min?: string;\n\n /**\n * The maxlength is an integer above 0 that indicates the maximum allowed characters to be entered. When using the\n * maxlength prop, you must also use the \"required\" prop to provide Constraint Validation on the input field.\n * This allows users to know why the input they attempted didn't render in the input field. see\n * [MDN maxlength](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/maxlength#constraint_validation)\n *\n * @attr {string}\n */\n @property({ type: Number })\n maxlength?: number;\n\n /**\n * Additional aria-describedby connection to id for additional success and error notes to be accessible\n *\n * @attr {string}\n */\n @property()\n validationAriaDescribedBy?: string;\n\n /**\n * Changes the component's treatment to represent a success state\n *\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 * @attr {string}\n */\n @property()\n successText: string = 'Success';\n\n /**\n * Readonly attribute\n *\n * @attr {boolean}\n */\n @property({ type: Boolean, reflect: true })\n readonly?: boolean;\n\n /**\n * The success field note that appears below the default field note\n *\n * @attr {string}\n */\n @property()\n successNote?: string;\n\n @query('input')\n field!: HTMLInputElement;\n\n /**\n * First update lifecycle hook\n * 1) super.firstUpdated also uses the firstUpdated from the Cre8FormElement\n */\n firstUpdated() {\n this.initializeAria();\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 || `Field_${nanoid()}`;\n }\n if (this.successNote || this.errorNote) {\n this.validationAriaDescribedBy = this.validationAriaDescribedBy || `Field_validation_${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() {\n if (this.validationAriaDescribedBy && this.ariaDescribedBy) {\n return `${this.ariaDescribedBy} ${this.validationAriaDescribedBy}`; /* 1 */\n }\n if (this.validationAriaDescribedBy && !this.ariaDescribedBy) {\n return this.validationAriaDescribedBy; /* 2 */\n }\n return this.ariaDescribedBy; /* 3 */\n }\n\n /**\n * Handle On Input\n * 1) Set the input's value equal to the event.target.value when the input is changed.\n * 2) Set the internal form value of the input to the updated value\n */\n private _handleOnInput(e: Event) {\n /* 1 */\n const inputValue = (e.target as HTMLInputElement).value;\n this.value = inputValue;\n\n /* 2 */\n this._internals.setFormValue(this.value);\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 class=\"cre8-c-field__field-note-success\"\n id=${this.validationAriaDescribedBy}\n iconName=\"success\"\n >\n ${this.successNote}\n </cre8-field-note>`;\n }\n if (this.errorNote) {\n /* 2 */\n return html` <cre8-field-note\n ?isError=${this.isError}\n class=\"cre8-c-field__field-note-error\"\n id=${this.validationAriaDescribedBy}\n iconName=\"error-alt\"\n >\n ${this.errorNote}\n </cre8-field-note>`;\n }\n return null;\n }\n\n render() {\n const componentClassNames = this.componentClassNames('cre8-c-field', {\n 'cre8-is-error': this.isError,\n 'cre8-is-success': this.isSuccess,\n });\n\n return html`\n <div class=\"${componentClassNames}\">\n <label class=\"cre8-c-field__label\" for=\"${this.fieldId}\">${this.label}</label>\n <div class=\"cre8-c-field__body\">\n <input\n class=\"cre8-c-field__input\"\n autocomplete=${ifDefined(this.autocomplete)}\n type=\"${this.type}\"\n id=\"${this.fieldId}\"\n max=${(this.type === 'date') && ifDefined(this.max).toString()}\n min=${(this.type === 'date') && ifDefined(this.max).toString()}\n maxlength=${ifDefined(this.maxlength)}\n ?readonly=${this.readonly}\n ?required=${this.required}\n aria-invalid=${this.isError ? 'true' : 'false'}\n ?disabled=\"${this.disabled}\"\n pattern=${ifDefined(this.pattern)}\n aria-describedby=\"${ifDefined(this.fieldNoteAria())}\"\n placeholder=\"${ifDefined(this.placeholder)}\"\n .value=\"${this.value}\"\n @input=${this._handleOnInput}\n />\n </div>\n ${this.fieldNote || this.slotNotEmpty('fieldNote')\n ? html`<cre8-field-note id=${this.ariaDescribedBy} class=\"cre8-c-field__field-note\"\n ><slot name=\"fieldNote\">${this.fieldNote}</slot></cre8-field-note\n >`\n : nothing}\n ${this.renderSuccessErrorFieldNote()}\n </div>\n `;\n }\n}\n\nif (customElements.get('cre8-field') === undefined) {\n customElements.define('cre8-field', Cre8Field);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'cre8-field': Cre8Field;\n }\n}\n\nexport default Cre8Field;\n"]}
@@ -0,0 +1,4 @@
1
+ import { css } from 'lit';
2
+ const styles = css `*,::slotted(*),*:before,*:after{box-sizing:border-box}:root{--size-base-unit: 0.5rem}[dir=rtl]{--rtlTranslateX: 50%;--rtlGradientToRight: 270deg;--rtlRotate45Inverse: -45deg}:host{--cre8-z-index-1: 1;--cre8-z-index-50: 50;--cre8-z-index-100: 100;--cre8-z-index-200: 200;--cre8-z-index-1030: 1030;--cre8-anim-fade-quick: 0.35s;--cre8-anim-ease: ease}@keyframes fadeIn{100%{opacity:1}}@keyframes slideIn{100%{transform:translateX(0)}}@keyframes slideInFwd{100%{width:272px;height:272px}}@keyframes slideOutRight{100%{width:272px;height:272px}}@keyframes slideUp{100%{transform:translateY(0)}}@media(width >= 481px){@keyframes slideInFwd{100%{width:417px;height:417px}}@keyframes slideOutRight{100%{width:417px;height:417px}}}@media(width >= 48rem){@keyframes slideInFwd{100%{width:330px;height:330px}}@keyframes slideOutRight{100%{width:330px;height:330px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 60rem){@keyframes slideInFwd{100%{width:460px;height:460px}}@keyframes slideOutRight{100%{width:460px;height:460px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 75rem){@keyframes slideInFwd{100%{width:592px;height:591px}}@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 87.5rem){@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 120px))}}}@media(width >= 2200px){@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 592px))}}}span.ripple{position:absolute;border-radius:50%;transform:scale(0);animation:ripple 600ms linear;background-color:var(--ripple-bg-color)}@keyframes ripple{to{transform:scale(4);opacity:1}}:root{--size-base-unit: 0.5rem}[dir=rtl]{--rtlTranslateX: 50%;--rtlGradientToRight: 270deg;--rtlRotate45Inverse: -45deg}:host{display:block}.cre8-c-field__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-field__body{position:relative}.cre8-c-field__input{font-family:var(--cre8-typography-body-default-font-family);font-size:var(--cre8-typography-body-default-font-size);font-weight:var(--cre8-typography-body-default-font-weight);line-height:var(--cre8-typography-body-default-line-height);text-decoration:var(--cre8-typography-body-default-text-decoration);text-transform:var(--cre8-typography-body-default-text-transform);outline:var(--cre8-border-width-focus) solid rgba(0,0,0,0);outline-offset:0.125rem;-webkit-appearance:none;width:100%;border-width:var(--cre8-border-width-default);border-style:solid;border-color:var(--cre8-color-border-strong);border-radius:var(--cre8-border-radius-default);padding:0.75rem 0.5rem;color:var(--cre8-color-content-default);background-color:var(--cre8-color-bg-default);transition:outline-color var(--cre8-anim-fade-quick) var(--cre8-anim-ease),border-color var(--cre8-anim-fade-quick) var(--cre8-anim-ease),background-color var(--cre8-anim-fade-quick) var(--cre8-anim-ease),color var(--cre8-anim-fade-quick) var(--cre8-anim-ease)}.cre8-c-field__input:hover:not(:disabled),.cre8-c-field__input:focus:not(:disabled),.cre8-c-field__input:active:not(:disabled),.cre8-c-field__input:focus-visible{outline:var(--cre8-border-width-focus) solid var(--cre8-color-border-active-outline);outline-offset:0.125rem}.cre8-is-error .cre8-c-field__input:hover:not(:disabled),.cre8-is-error .cre8-c-field__input:focus:not(:disabled),.cre8-is-error .cre8-c-field__input:active:not(:disabled),.cre8-is-error .cre8-c-field__input:focus-visible{outline-color:var(--cre8-color-border-error)}.cre8-is-success .cre8-c-field__input:hover:not(:disabled),.cre8-is-success .cre8-c-field__input:focus:not(:disabled),.cre8-is-success .cre8-c-field__input:active:not(:disabled),.cre8-is-success .cre8-c-field__input:focus-visible{outline-color:var(--cre8-color-border-success)}.cre8-c-field__input:disabled{background-color:var(--cre8-color-bg-disabled);border-color:var(--cre8-color-border-disabled);color:var(--cre8-color-content-disabled);cursor:not-allowed}.cre8-c-field__input:disabled::placeholder{color:var(--cre8-color-content-disabled)}.cre8-c-field__input::placeholder{color:var(--cre8-color-content-subtle)}.cre8-is-error .cre8-c-field__input{border-color:var(--cre8-color-border-error)}.cre8-is-success .cre8-c-field__input{border-color:var(--cre8-color-border-success)}.cre8-c-field__input:read-only{background-color:var(--cre8-color-bg-disabled);border-color:var(--cre8-color-border-disabled);cursor:default}`;
3
+ export default styles;
4
+ //# sourceMappingURL=field.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"field.styles.js","sourceRoot":"","sources":["../../../components/field/field.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,MAAM,MAAM,GAAG,GAAG,CAAA,yqJAAyqJ,CAAC;AAC5rJ,eAAe,MAAM,CAAC","sourcesContent":["import { css } from 'lit';\nconst styles = css`*,::slotted(*),*:before,*:after{box-sizing:border-box}:root{--size-base-unit: 0.5rem}[dir=rtl]{--rtlTranslateX: 50%;--rtlGradientToRight: 270deg;--rtlRotate45Inverse: -45deg}:host{--cre8-z-index-1: 1;--cre8-z-index-50: 50;--cre8-z-index-100: 100;--cre8-z-index-200: 200;--cre8-z-index-1030: 1030;--cre8-anim-fade-quick: 0.35s;--cre8-anim-ease: ease}@keyframes fadeIn{100%{opacity:1}}@keyframes slideIn{100%{transform:translateX(0)}}@keyframes slideInFwd{100%{width:272px;height:272px}}@keyframes slideOutRight{100%{width:272px;height:272px}}@keyframes slideUp{100%{transform:translateY(0)}}@media(width >= 481px){@keyframes slideInFwd{100%{width:417px;height:417px}}@keyframes slideOutRight{100%{width:417px;height:417px}}}@media(width >= 48rem){@keyframes slideInFwd{100%{width:330px;height:330px}}@keyframes slideOutRight{100%{width:330px;height:330px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 60rem){@keyframes slideInFwd{100%{width:460px;height:460px}}@keyframes slideOutRight{100%{width:460px;height:460px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 75rem){@keyframes slideInFwd{100%{width:592px;height:591px}}@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 87.5rem){@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 120px))}}}@media(width >= 2200px){@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 592px))}}}span.ripple{position:absolute;border-radius:50%;transform:scale(0);animation:ripple 600ms linear;background-color:var(--ripple-bg-color)}@keyframes ripple{to{transform:scale(4);opacity:1}}:root{--size-base-unit: 0.5rem}[dir=rtl]{--rtlTranslateX: 50%;--rtlGradientToRight: 270deg;--rtlRotate45Inverse: -45deg}:host{display:block}.cre8-c-field__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-field__body{position:relative}.cre8-c-field__input{font-family:var(--cre8-typography-body-default-font-family);font-size:var(--cre8-typography-body-default-font-size);font-weight:var(--cre8-typography-body-default-font-weight);line-height:var(--cre8-typography-body-default-line-height);text-decoration:var(--cre8-typography-body-default-text-decoration);text-transform:var(--cre8-typography-body-default-text-transform);outline:var(--cre8-border-width-focus) solid rgba(0,0,0,0);outline-offset:0.125rem;-webkit-appearance:none;width:100%;border-width:var(--cre8-border-width-default);border-style:solid;border-color:var(--cre8-color-border-strong);border-radius:var(--cre8-border-radius-default);padding:0.75rem 0.5rem;color:var(--cre8-color-content-default);background-color:var(--cre8-color-bg-default);transition:outline-color var(--cre8-anim-fade-quick) var(--cre8-anim-ease),border-color var(--cre8-anim-fade-quick) var(--cre8-anim-ease),background-color var(--cre8-anim-fade-quick) var(--cre8-anim-ease),color var(--cre8-anim-fade-quick) var(--cre8-anim-ease)}.cre8-c-field__input:hover:not(:disabled),.cre8-c-field__input:focus:not(:disabled),.cre8-c-field__input:active:not(:disabled),.cre8-c-field__input:focus-visible{outline:var(--cre8-border-width-focus) solid var(--cre8-color-border-active-outline);outline-offset:0.125rem}.cre8-is-error .cre8-c-field__input:hover:not(:disabled),.cre8-is-error .cre8-c-field__input:focus:not(:disabled),.cre8-is-error .cre8-c-field__input:active:not(:disabled),.cre8-is-error .cre8-c-field__input:focus-visible{outline-color:var(--cre8-color-border-error)}.cre8-is-success .cre8-c-field__input:hover:not(:disabled),.cre8-is-success .cre8-c-field__input:focus:not(:disabled),.cre8-is-success .cre8-c-field__input:active:not(:disabled),.cre8-is-success .cre8-c-field__input:focus-visible{outline-color:var(--cre8-color-border-success)}.cre8-c-field__input:disabled{background-color:var(--cre8-color-bg-disabled);border-color:var(--cre8-color-border-disabled);color:var(--cre8-color-content-disabled);cursor:not-allowed}.cre8-c-field__input:disabled::placeholder{color:var(--cre8-color-content-disabled)}.cre8-c-field__input::placeholder{color:var(--cre8-color-content-subtle)}.cre8-is-error .cre8-c-field__input{border-color:var(--cre8-color-border-error)}.cre8-is-success .cre8-c-field__input{border-color:var(--cre8-color-border-success)}.cre8-c-field__input:read-only{background-color:var(--cre8-color-bg-disabled);border-color:var(--cre8-color-border-disabled);cursor:default}`;\nexport default styles;\n"]}
@@ -1,50 +1,63 @@
1
- import { b as h } from "../../icon-D22g8aWB.js";
2
- import { s as m } from "../../Error-aYunUubM.js";
3
- import { css as p, html as s } from "lit";
4
- import { property as o } from "lit/decorators.js";
5
- import { Cre8Element as f } from "../cre8-element.js";
6
- const x = p`*,::slotted(*),*:before,*:after{box-sizing:border-box}:root{--size-base-unit: 0.5rem}[dir=rtl]{--rtlTranslateX: 50%;--rtlGradientToRight: 270deg;--rtlRotate45Inverse: -45deg}:host{--cre8-z-index-1: 1;--cre8-z-index-50: 50;--cre8-z-index-100: 100;--cre8-z-index-200: 200;--cre8-z-index-1030: 1030;--cre8-anim-fade-quick: 0.35s;--cre8-anim-ease: ease}@keyframes fadeIn{100%{opacity:1}}@keyframes slideIn{100%{transform:translateX(0)}}@keyframes slideInFwd{100%{width:272px;height:272px}}@keyframes slideOutRight{100%{width:272px;height:272px}}@keyframes slideUp{100%{transform:translateY(0)}}@media(width >= 481px){@keyframes slideInFwd{100%{width:417px;height:417px}}@keyframes slideOutRight{100%{width:417px;height:417px}}}@media(width >= 48rem){@keyframes slideInFwd{100%{width:330px;height:330px}}@keyframes slideOutRight{100%{width:330px;height:330px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 60rem){@keyframes slideInFwd{100%{width:460px;height:460px}}@keyframes slideOutRight{100%{width:460px;height:460px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 75rem){@keyframes slideInFwd{100%{width:592px;height:591px}}@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 45px))}}}@media(width >= 87.5rem){@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 120px))}}}@media(width >= 2200px){@keyframes slideOutRight{100%{width:592px;height:591px;transform:translateX(calc(100vw - 592px))}}}span.ripple{position:absolute;border-radius:50%;transform:scale(0);animation:ripple 600ms linear;background-color:var(--ripple-bg-color)}@keyframes ripple{to{transform:scale(4);opacity:1}}:root{--size-base-unit: 0.5rem}[dir=rtl]{--rtlTranslateX: 50%;--rtlGradientToRight: 270deg;--rtlRotate45Inverse: -45deg}:host{display:flex}.cre8-c-field-note{display:flex;align-items:flex-start;gap:0.25rem;color:var(--cre8-color-content-default);margin-top:0.25rem}.cre8-field-note-icon{margin-top:0.25rem;height:1rem;width:1rem}.cre8-c-field-note.cre8-is-error{color:var(--cre8-color-content-error)}.cre8-c-field-note.cre8-is-success{color:var(--cre8-color-content-success)}.cre8-c-field-note--inverted{color:var(--cre8-color-content-knockout)}`;
7
- var g = Object.defineProperty, a = (l, t, n, u) => {
8
- for (var e = void 0, i = l.length - 1, d; i >= 0; i--)
9
- (d = l[i]) && (e = d(t, n, e) || e);
10
- return e && g(t, n, e), e;
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
11
6
  };
12
- const c = class c extends f {
13
- /**
14
- * Check if there are success or error states and set "aria-live=polite"
15
- */
16
- fieldNoteAriaLive() {
17
- return this.isError || this.isSuccess ? "polite" : null;
18
- }
19
- render() {
20
- const t = this.componentClassNames("cre8-c-field-note", {
21
- "cre8-is-error": this.isError,
22
- "cre8-is-success": this.isSuccess
23
- });
24
- return s`
7
+ import svgCheckCircle from '/Users/tylersmbp/Projects/cre8-web-components/packages/cre8-wc/icons/System/Filled/Check.svg?raw';
8
+ import svgErrorFilled from '/Users/tylersmbp/Projects/cre8-web-components/packages/cre8-wc/icons/System/Filled/Error.svg?raw';
9
+ import { html, } from 'lit';
10
+ import { property } from 'lit/decorators.js';
11
+ import { Cre8Element } from '../cre8-element';
12
+ import '../icon/icon';
13
+ import styles from './field-note.styles.js';
14
+ /**
15
+ * Field Note gives direction on how to fill out a form field and to alert users of form errors and successes.
16
+ * It’s used below an input field and never on its own.
17
+ * @slot - The note content
18
+ */
19
+ export class Cre8FieldNote extends Cre8Element {
20
+ /**
21
+ * Check if there are success or error states and set "aria-live=polite"
22
+ */
23
+ fieldNoteAriaLive() {
24
+ if (this.isError || this.isSuccess) {
25
+ return 'polite';
26
+ }
27
+ return null;
28
+ }
29
+ render() {
30
+ const componentClassName = this.componentClassNames('cre8-c-field-note', {
31
+ 'cre8-is-error': this.isError,
32
+ 'cre8-is-success': this.isSuccess,
33
+ });
34
+ return html `
25
35
  <div
26
- aria-live="${this.fieldNoteAriaLive() ?? "off"}"
27
- class="${t}">
28
- ${this.isError === !0 ? s`<cre8-icon class="cre8-field-note-icon" svg='${m}' aria-hidden="true" ></cre8-icon>` : ""}
29
- ${this.isSuccess === !0 ? s`<cre8-icon class="cre8-field-note-icon" svg='${h}' aria-hidden="true"></cre8-icon>` : ""}
36
+ aria-live="${this.fieldNoteAriaLive() ?? 'off'}"
37
+ class="${componentClassName}">
38
+ ${this.isError === true
39
+ ? html `<cre8-icon class="cre8-field-note-icon" svg='${svgErrorFilled}' aria-hidden="true" ></cre8-icon>`
40
+ : ''}
41
+ ${this.isSuccess === true
42
+ ? html `<cre8-icon class="cre8-field-note-icon" svg='${svgCheckCircle}' aria-hidden="true"></cre8-icon>`
43
+ : ''}
30
44
  <div><slot></slot></div>
31
45
  </div>
32
46
  `;
33
- }
34
- };
35
- c.styles = [x];
36
- let r = c;
37
- a([
38
- o({ type: Boolean, reflect: !0 })
39
- ], r.prototype, "isError");
40
- a([
41
- o({ type: Boolean, reflect: !0 })
42
- ], r.prototype, "isSuccess");
43
- a([
44
- o()
45
- ], r.prototype, "iconName");
46
- customElements.get("cre8-field-note") === void 0 && customElements.define("cre8-field-note", r);
47
- export {
48
- r as Cre8FieldNote,
49
- r as default
50
- };
47
+ }
48
+ }
49
+ Cre8FieldNote.styles = [styles];
50
+ __decorate([
51
+ property({ type: Boolean, reflect: true })
52
+ ], Cre8FieldNote.prototype, "isError", void 0);
53
+ __decorate([
54
+ property({ type: Boolean, reflect: true })
55
+ ], Cre8FieldNote.prototype, "isSuccess", void 0);
56
+ __decorate([
57
+ property()
58
+ ], Cre8FieldNote.prototype, "iconName", void 0);
59
+ if (customElements.get('cre8-field-note') === undefined) {
60
+ customElements.define('cre8-field-note', Cre8FieldNote);
61
+ }
62
+ export default Cre8FieldNote;
63
+ //# sourceMappingURL=field-note.js.map