@tmorrow/cre8-wc 2.0.7 → 2.0.8

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 (319) hide show
  1. package/a2ui/catalog +5 -5
  2. package/a2ui/catalog-kg.json +156 -20
  3. package/a2ui/catalog.json +393 -34
  4. package/a2ui/catalog.svg +2445 -2445
  5. package/a2ui/examples/compound-families.json +298 -0
  6. package/a2ui/examples/llm-observability.json +678 -650
  7. package/a2ui/generate-catalog.mjs +116 -3
  8. package/a2ui/inert-props.json +32 -0
  9. package/a2ui/render-audit.mjs +294 -0
  10. package/a2ui/renderer.d.ts +2 -1
  11. package/a2ui/renderer.js +1 -1
  12. package/a2ui/renderer.ts +1 -1
  13. package/a2ui/smoke-test.mjs +3 -3
  14. package/a2ui/stream/diff-test.mjs +299 -0
  15. package/a2ui/stream/diff.d.ts +28 -0
  16. package/a2ui/stream/diff.js +130 -0
  17. package/a2ui/stream/diff.ts +145 -0
  18. package/a2ui/stream/index.d.ts +11 -0
  19. package/a2ui/stream/index.js +11 -0
  20. package/a2ui/stream/index.ts +43 -0
  21. package/a2ui/stream/model.d.ts +66 -0
  22. package/a2ui/stream/model.js +429 -0
  23. package/a2ui/stream/model.ts +472 -0
  24. package/a2ui/stream/pointer.d.ts +34 -0
  25. package/a2ui/stream/pointer.js +146 -0
  26. package/a2ui/stream/pointer.ts +147 -0
  27. package/a2ui/stream/renderer.d.ts +51 -0
  28. package/a2ui/stream/renderer.js +282 -0
  29. package/a2ui/stream/renderer.ts +291 -0
  30. package/a2ui/stream/stream-test.mjs +592 -0
  31. package/a2ui/stream/types.d.ts +173 -0
  32. package/a2ui/stream/types.js +17 -0
  33. package/a2ui/stream/types.ts +127 -0
  34. package/cdn/cre8-wc.esm.js +3527 -3226
  35. package/cdn/cre8-wc.esm.js.map +1 -1
  36. package/cdn/cre8-wc.min.js +289 -289
  37. package/cdn/cre8-wc.min.js.map +1 -1
  38. package/dist/assets/{Changelog-Documentation-BguNswiM.js → Changelog-Documentation-CeOetLxK.js} +1 -1
  39. package/dist/assets/{Code-Guidelines-BM3dZyzL.js → Code-Guidelines-BjdezAjj.js} +1 -1
  40. package/dist/assets/{Color-6AOWCN3U-C4AEGNk3.js → Color-6AOWCN3U-DPFGZitI.js} +1 -1
  41. package/dist/assets/{Contributing-Guidelines-DZURVehh.js → Contributing-Guidelines-B1M2V1hW.js} +1 -1
  42. package/dist/assets/{DocsRenderer-JROSPFPF-DeZmCI9u.js → DocsRenderer-JROSPFPF-BBy8KWNl.js} +1 -1
  43. package/dist/assets/{Tokens-Documentation-ZecGbtQg.js → Tokens-Documentation-CdTxFDLe.js} +1 -1
  44. package/dist/assets/{WithTooltip-7X4HQR7L-2Hfrkir-.js → WithTooltip-7X4HQR7L-DZzTNMQ7.js} +1 -1
  45. package/dist/assets/{accordion-item.stories-D-MjrX5G.js → accordion-item.stories-Bl26JlHp.js} +1 -9
  46. package/dist/assets/{accordion.stories-icgNa1dl.js → accordion.stories-DjoLApQw.js} +3 -11
  47. package/dist/assets/{alert.stories-BzDaXtj-.js → alert.stories-pO1y3YCQ.js} +15 -31
  48. package/dist/assets/{badge-C5wOWgyg.js → badge-BTxW3bN2.js} +3 -11
  49. package/dist/assets/{badge.stories-5GfB4jVI.js → badge.stories-vqh63RJ2.js} +1 -1
  50. package/dist/assets/{band.stories-DhXaP_kL.js → band.stories-CjKRppSb.js} +1 -9
  51. package/dist/assets/{blocks-DhUVut8Z.js → blocks-1be_-L6v.js} +5 -5
  52. package/dist/assets/{breadcrumbs.stories-CrPUBVk1.js → breadcrumbs.stories-Doyfy3V9.js} +2 -18
  53. package/dist/assets/{button-CJL8yzAT.js → button-CgaWukz0.js} +1 -9
  54. package/dist/assets/{button-group-BgwgtSFC.js → button-group-G7qN4MwM.js} +1 -9
  55. package/dist/assets/{button-group.stories-W-07gO63.js → button-group.stories-cL3Kay6M.js} +1 -1
  56. package/dist/assets/{button.stories-BPzJ-sCv.js → button.stories-C9HSpxWb.js} +6 -6
  57. package/dist/assets/{card.stories-mlFGY2Xn.js → card.stories-BbU8YymD.js} +3 -11
  58. package/dist/assets/{chart.stories-C8yuHHeK.js → chart.stories-BL4FxIA_.js} +1 -1
  59. package/dist/assets/{checkbox-field-item-iHcdmTNw.js → checkbox-field-item-DIMHcWM0.js} +1 -9
  60. package/dist/assets/{checkbox-field-item.stories-D1aVLDXn.js → checkbox-field-item.stories-XbB4x_lO.js} +1 -1
  61. package/dist/assets/{checkbox-field.stories-BoVB2jCx.js → checkbox-field.stories-YnqFUI4K.js} +2 -10
  62. package/dist/assets/{cre8-element-DfmMtHJO.js → cre8-element-B35i4Lyg.js} +1 -1
  63. package/dist/assets/{cre8-form-element-bQpK8UYN.js → cre8-form-element-Cfc5VeYV.js} +1 -1
  64. package/dist/assets/{danger-button.stories-Cb4ljnhQ.js → danger-button.stories-xh25hmfd.js} +1 -9
  65. package/dist/assets/{date-picker.stories-Cje3qk8D.js → date-picker.stories-DD_ctzEF.js} +1 -49
  66. package/dist/assets/{divider-B_PXBGWD.js → divider-xZ2KARHf.js} +2 -10
  67. package/dist/assets/{divider.stories-CtfeBqVV.js → divider.stories-Bk9oF-OV.js} +1 -1
  68. package/dist/assets/{dropdown-Cgwne34I.js → dropdown-BEP5x3CW.js} +6 -22
  69. package/dist/assets/{dropdown-item.stories-pXkDLRuv.js → dropdown-item.stories-Iaw_UrEP.js} +1 -1
  70. package/dist/assets/{dropdown.stories-DZnmHieY.js → dropdown.stories-B0OlKD7h.js} +1 -1
  71. package/dist/assets/{example-drug-card.stories-DTzLXTFx.js → example-drug-card.stories-Bp5JIeE_.js} +1 -1
  72. package/dist/assets/{f-po-C2WpbOFJ.js → f-po-BdPzDRD-.js} +1 -1
  73. package/dist/assets/{feature.stories-DffXdJch.js → feature.stories-DYE1Js70.js} +1 -9
  74. package/dist/assets/{field-DzYRqQb2.js → field-BpUYyRW1.js} +1 -9
  75. package/dist/assets/{field-note-DKXZiXLU.js → field-note-fccBckVl.js} +3 -11
  76. package/dist/assets/{field-note.stories-DS_0bQul.js → field-note.stories-BH9AZMbF.js} +1 -1
  77. package/dist/assets/{field.stories-BvXn0oG6.js → field.stories-BQPtmziK.js} +1 -1
  78. package/dist/assets/{footer.stories-C3ZibisU.js → footer.stories-DCWEciqD.js} +1 -9
  79. package/dist/assets/{form-example.stories-C-TuOeF2.js → form-example.stories-9IDC0AgX.js} +1 -1
  80. package/dist/assets/{formatter-L2YTDE3Q-CJVnxOUW.js → formatter-L2YTDE3Q-B9u1AOWn.js} +1 -1
  81. package/dist/assets/{global-nav-item-xQL7wVjY.js → global-nav-item-T4htN-yO.js} +6 -14
  82. package/dist/assets/{global-nav-item.stories-Dp9TE3aR.js → global-nav-item.stories-2dWRfCXv.js} +1 -1
  83. package/dist/assets/{global-nav.stories-B5Nk8JZ0.js → global-nav.stories-Fh1gScqg.js} +2 -10
  84. package/dist/assets/{grid-DYgnZBsd.js → grid-C5CKMXNe.js} +3 -19
  85. package/dist/assets/{grid.stories-BFiXTq2C.js → grid.stories-BLmCNdeA.js} +1 -1
  86. package/dist/assets/{header.stories-D1f7xhjV.js → header.stories-BkDrjJtj.js} +1 -9
  87. package/dist/assets/{heading-485Jz7JZ.js → heading-Dbka33DK.js} +2 -10
  88. package/dist/assets/{heading.stories-gPF_SmTc.js → heading.stories-Be40_bmG.js} +1 -1
  89. package/dist/assets/{hero.stories-BHlFNdvF.js → hero.stories-vRu7PZG9.js} +1 -9
  90. package/dist/assets/{icon-DeTLDzTS.js → icon-ChfRWXWy.js} +2 -10
  91. package/dist/assets/{icon-description-o-YaiEjK.js → icon-description-BBSwDykJ.js} +1 -1
  92. package/dist/assets/{icon-description.stories-BdPRvEwe.js → icon-description.stories-Cg6ekOme.js} +1 -1
  93. package/dist/assets/{icon.stories-BxWpqxT5.js → icon.stories-Cj4U7L5G.js} +1 -1
  94. package/dist/assets/if-defined-Bxnzk64Q.js +1 -0
  95. package/dist/assets/{iframe-dHvya7sk.js → iframe-BNJP6ovU.js} +35 -35
  96. package/dist/assets/{inline-alert.stories-FH0bQ0jh.js → inline-alert.stories-CygBYI02.js} +1 -9
  97. package/dist/assets/{layout-container.stories-D6Z6Kx78.js → layout-container.stories-TMyIJteJ.js} +2 -10
  98. package/dist/assets/{layout.stories-CNYuwC_r.js → layout.stories-ylRM-ANL.js} +7 -23
  99. package/dist/assets/{linelength-container.stories-pCRXZvxS.js → linelength-container.stories-Br2v8jXE.js} +1 -9
  100. package/dist/assets/{link-BpCiLxNW.js → link-CRE0Eqdo.js} +1 -9
  101. package/dist/assets/{link-list.stories-12vsAa1P.js → link-list.stories--y-urrVo.js} +7 -23
  102. package/dist/assets/{link.stories-DAoQtY4_.js → link.stories-C3WQOgkY.js} +2 -2
  103. package/dist/assets/{list.stories-D0N3yBIf.js → list.stories-Bd2bxkxn.js} +7 -23
  104. package/dist/assets/{loading-spinner-g6iJajXH.js → loading-spinner-C52KNq6y.js} +4 -12
  105. package/dist/assets/{loading-spinner.stories-B6_mgPxB.js → loading-spinner.stories-DPRGEeHT.js} +1 -1
  106. package/dist/assets/{logo.stories-BvMwN2qg.js → logo.stories-2LBqqraT.js} +1 -9
  107. package/dist/assets/{main.stories-pL4zefbs.js → main.stories-BQzD7iWD.js} +2 -10
  108. package/dist/assets/{medication-card.stories-DK1XGJic.js → medication-card.stories-Wc-hA0-s.js} +5 -5
  109. package/dist/assets/{medication-form.stories-Bj5dLp5S.js → medication-form.stories-DfFOCDaU.js} +1 -1
  110. package/dist/assets/{modal-CO0M4e_8.js → modal-CCfbY4fF.js} +1 -9
  111. package/dist/assets/{modal-BNu8xy08.js → modal-GglWRNJp.js} +1 -1
  112. package/dist/assets/{modal.stories-CHYBrq_E.js → modal.stories-CpybCs79.js} +1 -1
  113. package/dist/assets/{multi-select.stories-C9XXsWio.js → multi-select.stories-BhzEKRui.js} +1 -9
  114. package/dist/assets/{nav-container.stories-DU9fhvDu.js → nav-container.stories-Be1YlegP.js} +3 -11
  115. package/dist/assets/{page-header.stories-BrstKiEY.js → page-header.stories-BOVLQ0YF.js} +1 -9
  116. package/dist/assets/{pagination.stories-Bw2M2iOn.js → pagination.stories-D62sa_1K.js} +9 -25
  117. package/dist/assets/{percent-bar.stories-UQRXYUqd.js → percent-bar.stories-CYi4El7T.js} +1 -9
  118. package/dist/assets/{popover.stories-ZkwrRFpR.js → popover.stories-B9O8F4yv.js} +1 -9
  119. package/dist/assets/{primary-nav.stories-wqOKwgQn.js → primary-nav.stories-Bt-o7h45.js} +1 -17
  120. package/dist/assets/{progress-meter-TzASasu0.js → progress-meter-Dit59091.js} +1 -9
  121. package/dist/assets/{progress-meter.stories-qfJALZf8.js → progress-meter.stories-CYnOCmjo.js} +1 -1
  122. package/dist/assets/{progress-steps-item-KvW1d_7L.js → progress-steps-item-CWJsad0s.js} +1 -9
  123. package/dist/assets/{progress-steps-item.stories-uOn6tJ1W.js → progress-steps-item.stories-ePn_6bPn.js} +1 -1
  124. package/dist/assets/{progress-steps.stories-CKFPx8D0.js → progress-steps.stories-CblrEcXF.js} +1 -9
  125. package/dist/assets/{radio-field-item-CTaR50XR.js → radio-field-item-Bm-0RWPe.js} +5 -21
  126. package/dist/assets/{radio-field-item.stories-DQSLj8W1.js → radio-field-item.stories-y_TrTRIW.js} +1 -1
  127. package/dist/assets/{radio-field.stories-Btmc_Iep.js → radio-field.stories-CSWrbUrn.js} +1 -1
  128. package/dist/assets/{remove-tag-BSEZ7VT8.js → remove-tag-lCr57c5r.js} +1 -9
  129. package/dist/assets/{remove-tag.stories-diRKi7Ua.js → remove-tag.stories-CDfwCdvZ.js} +1 -1
  130. package/dist/assets/{request-prescription.stories-DQvra7ia.js → request-prescription.stories-O4zqokfb.js} +1 -1
  131. package/dist/assets/{sample-modal.stories-deE1EBfZ.js → sample-modal.stories-BZ4N2R2Z.js} +1 -1
  132. package/dist/assets/{section.stories-DF4mcy2O.js → section.stories-D_1InThX.js} +1 -9
  133. package/dist/assets/{select-tile-D-C8oSrm.js → select-tile-BqqB3ZtE.js} +2 -10
  134. package/dist/assets/{select-tile-list.stories-vsBQUIcl.js → select-tile-list.stories-Di4ILgV8.js} +1 -9
  135. package/dist/assets/{select-tile.stories-CqHzN5fc.js → select-tile.stories-D3h_6zlV.js} +6 -6
  136. package/dist/assets/{select.stories-8aOGxTtr.js → select.stories-BB2phP9A.js} +1 -9
  137. package/dist/assets/{skeleton-loader.stories-CwR2-aC5.js → skeleton-loader.stories-y4uml_kV.js} +5 -13
  138. package/dist/assets/{split-button.stories-CyfdrK4u.js → split-button.stories-C_82I4ME.js} +2 -10
  139. package/dist/assets/{spread-BPiNgQQF.js → spread-CnPic3C2.js} +1 -1
  140. package/dist/assets/state-DkQhleoO.js +1 -0
  141. package/dist/assets/{submenu.stories-CDhNzZzh.js → submenu.stories-UDtaREr1.js} +2 -18
  142. package/dist/assets/{syntaxhighlighter-T5IQBZDB-BzI6WxUR.js → syntaxhighlighter-T5IQBZDB-D-I_s_yD.js} +1 -1
  143. package/dist/assets/{table-header-CfcchoYz.js → table-header-2837i43H.js} +3 -51
  144. package/dist/assets/{table-object.stories-Bd5qdfMU.js → table-object.stories-D4KoI-wA.js} +1 -9
  145. package/dist/assets/{table.stories-DxuBe9dJ.js → table.stories-DUJDibEp.js} +1 -1
  146. package/dist/assets/{tabs.stories-Cpc3OHJx.js → tabs.stories-C06SngOF.js} +5 -29
  147. package/dist/assets/{tag-list.stories-BmyCmrTF.js → tag-list.stories-Du-IoYzu.js} +2 -10
  148. package/dist/assets/{tag-vQFuZneb.js → tag-oHGdclJl.js} +1 -9
  149. package/dist/assets/{tag.stories-DGzrNUbb.js → tag.stories-C5D5IbuK.js} +1 -1
  150. package/dist/assets/{tertiary-nav.stories-D4q5K-am.js → tertiary-nav.stories-B1GU8Zi4.js} +3 -19
  151. package/dist/assets/{text-link-4qLRIeJB.js → text-link-B3m3KEqY.js} +1 -9
  152. package/dist/assets/{text-link.stories-D6BRm2I5.js → text-link.stories-4O6qn82H.js} +1 -1
  153. package/dist/assets/{text-passage-DGaI5i2I.js → text-passage-xQVosjOr.js} +3 -19
  154. package/dist/assets/{text-passage.stories-DkmXVUhH.js → text-passage.stories-Da1nspwG.js} +1 -1
  155. package/dist/assets/{tooltip.stories-B7ADDq7o.js → tooltip.stories-DLKyyeKn.js} +6 -14
  156. package/dist/assets/{utility-nav.stories-ffXVvyLp.js → utility-nav.stories-B6xBFe7z.js} +5 -21
  157. package/dist/design-tokens/brands/cre8/css/tokens_brand.css +1 -1
  158. package/dist/design-tokens/core/scss/theming/component.css +1 -1
  159. package/dist/design-tokens/core/scss/theming/variables.css +1 -7
  160. package/dist/design-tokens/core/scss/theming/variables.scss +0 -11
  161. package/dist/icons/cre8-icons.svg +1 -1
  162. package/dist/iframe.html +1 -24
  163. package/dist/index.html +25 -77
  164. package/dist/project.json +1 -1
  165. package/lib/a2ui/renderer.d.ts +2 -1
  166. package/lib/a2ui/renderer.d.ts.map +1 -1
  167. package/lib/a2ui/renderer.js +1 -1
  168. package/lib/a2ui/renderer.js.map +1 -1
  169. package/lib/a2ui/stream/diff.d.ts +29 -0
  170. package/lib/a2ui/stream/diff.d.ts.map +1 -0
  171. package/lib/a2ui/stream/diff.js +131 -0
  172. package/lib/a2ui/stream/diff.js.map +1 -0
  173. package/lib/a2ui/stream/index.d.ts +12 -0
  174. package/lib/a2ui/stream/index.d.ts.map +1 -0
  175. package/lib/a2ui/stream/index.js +12 -0
  176. package/lib/a2ui/stream/index.js.map +1 -0
  177. package/lib/a2ui/stream/model.d.ts +67 -0
  178. package/lib/a2ui/stream/model.d.ts.map +1 -0
  179. package/lib/a2ui/stream/model.js +423 -0
  180. package/lib/a2ui/stream/model.js.map +1 -0
  181. package/lib/a2ui/stream/pointer.d.ts +35 -0
  182. package/lib/a2ui/stream/pointer.d.ts.map +1 -0
  183. package/lib/a2ui/stream/pointer.js +147 -0
  184. package/lib/a2ui/stream/pointer.js.map +1 -0
  185. package/lib/a2ui/stream/renderer.d.ts +52 -0
  186. package/lib/a2ui/stream/renderer.d.ts.map +1 -0
  187. package/lib/a2ui/stream/renderer.js +279 -0
  188. package/lib/a2ui/stream/renderer.js.map +1 -0
  189. package/lib/a2ui/stream/types.d.ts +174 -0
  190. package/lib/a2ui/stream/types.d.ts.map +1 -0
  191. package/lib/a2ui/stream/types.js +18 -0
  192. package/lib/a2ui/stream/types.js.map +1 -0
  193. package/lib/components/accordion/accordion.d.ts +15 -0
  194. package/lib/components/accordion/accordion.d.ts.map +1 -1
  195. package/lib/components/accordion/accordion.js +23 -0
  196. package/lib/components/accordion/accordion.js.map +1 -1
  197. package/lib/components/badge/badge.d.ts +4 -17
  198. package/lib/components/badge/badge.d.ts.map +1 -1
  199. package/lib/components/badge/badge.js +0 -15
  200. package/lib/components/badge/badge.js.map +1 -1
  201. package/lib/components/breadcrumbs/breadcrumbs.d.ts +14 -0
  202. package/lib/components/breadcrumbs/breadcrumbs.d.ts.map +1 -1
  203. package/lib/components/breadcrumbs/breadcrumbs.js +21 -0
  204. package/lib/components/breadcrumbs/breadcrumbs.js.map +1 -1
  205. package/lib/components/chart/chart.d.ts +3 -3
  206. package/lib/components/chart/chart.js +6 -6
  207. package/lib/components/chart/chart.js.map +1 -1
  208. package/lib/components/checkbox-field/checkbox-field.d.ts +19 -0
  209. package/lib/components/checkbox-field/checkbox-field.d.ts.map +1 -1
  210. package/lib/components/checkbox-field/checkbox-field.js +28 -0
  211. package/lib/components/checkbox-field/checkbox-field.js.map +1 -1
  212. package/lib/components/cre8-element.d.ts +19 -0
  213. package/lib/components/cre8-element.d.ts.map +1 -1
  214. package/lib/components/cre8-element.js +51 -2
  215. package/lib/components/cre8-element.js.map +1 -1
  216. package/lib/components/divider/divider.d.ts +1 -1
  217. package/lib/components/divider/divider.d.ts.map +1 -1
  218. package/lib/components/divider/divider.js.map +1 -1
  219. package/lib/components/dropdown/dropdown.d.ts +13 -0
  220. package/lib/components/dropdown/dropdown.d.ts.map +1 -1
  221. package/lib/components/dropdown/dropdown.js +19 -0
  222. package/lib/components/dropdown/dropdown.js.map +1 -1
  223. package/lib/components/dropdown-item/dropdown-item.d.ts +1 -1
  224. package/lib/components/dropdown-item/dropdown-item.js +2 -2
  225. package/lib/components/dropdown-item/dropdown-item.js.map +1 -1
  226. package/lib/components/heading/heading.d.ts +3 -5
  227. package/lib/components/heading/heading.d.ts.map +1 -1
  228. package/lib/components/heading/heading.js +2 -4
  229. package/lib/components/heading/heading.js.map +1 -1
  230. package/lib/components/link-list/link-list.d.ts +19 -0
  231. package/lib/components/link-list/link-list.d.ts.map +1 -1
  232. package/lib/components/link-list/link-list.js +19 -0
  233. package/lib/components/link-list/link-list.js.map +1 -1
  234. package/lib/components/list/list.d.ts +13 -0
  235. package/lib/components/list/list.d.ts.map +1 -1
  236. package/lib/components/list/list.js +15 -0
  237. package/lib/components/list/list.js.map +1 -1
  238. package/lib/components/modal/modal.d.ts +2 -2
  239. package/lib/components/modal/modal.js +2 -2
  240. package/lib/components/modal/modal.js.map +1 -1
  241. package/lib/components/multi-select/multi-select.d.ts +2 -2
  242. package/lib/components/multi-select/multi-select.js +5 -5
  243. package/lib/components/multi-select/multi-select.js.map +1 -1
  244. package/lib/components/pagination/pagination.d.ts +1 -1
  245. package/lib/components/pagination/pagination.js +2 -2
  246. package/lib/components/pagination/pagination.js.map +1 -1
  247. package/lib/components/percent-bar/percent-bar.d.ts +2 -0
  248. package/lib/components/percent-bar/percent-bar.d.ts.map +1 -1
  249. package/lib/components/percent-bar/percent-bar.js +3 -1
  250. package/lib/components/percent-bar/percent-bar.js.map +1 -1
  251. package/lib/components/popover/popover.d.ts +6 -7
  252. package/lib/components/popover/popover.d.ts.map +1 -1
  253. package/lib/components/popover/popover.js +4 -4
  254. package/lib/components/popover/popover.js.map +1 -1
  255. package/lib/components/progress-meter/progress-meter.d.ts +0 -8
  256. package/lib/components/progress-meter/progress-meter.d.ts.map +1 -1
  257. package/lib/components/progress-meter/progress-meter.js +0 -7
  258. package/lib/components/progress-meter/progress-meter.js.map +1 -1
  259. package/lib/components/progress-steps/progress-steps.d.ts +16 -0
  260. package/lib/components/progress-steps/progress-steps.d.ts.map +1 -1
  261. package/lib/components/progress-steps/progress-steps.js +25 -0
  262. package/lib/components/progress-steps/progress-steps.js.map +1 -1
  263. package/lib/components/progress-steps-item/progress-steps-item.d.ts +1 -3
  264. package/lib/components/progress-steps-item/progress-steps-item.d.ts.map +1 -1
  265. package/lib/components/progress-steps-item/progress-steps-item.js +0 -1
  266. package/lib/components/progress-steps-item/progress-steps-item.js.map +1 -1
  267. package/lib/components/radio-field/radio-field.d.ts +33 -0
  268. package/lib/components/radio-field/radio-field.d.ts.map +1 -1
  269. package/lib/components/radio-field/radio-field.js +62 -0
  270. package/lib/components/radio-field/radio-field.js.map +1 -1
  271. package/lib/components/remove-tag/remove-tag.d.ts +1 -1
  272. package/lib/components/remove-tag/remove-tag.js +3 -3
  273. package/lib/components/remove-tag/remove-tag.js.map +1 -1
  274. package/lib/components/split-button/split-button.d.ts +3 -0
  275. package/lib/components/split-button/split-button.d.ts.map +1 -1
  276. package/lib/components/split-button/split-button.js +5 -2
  277. package/lib/components/split-button/split-button.js.map +1 -1
  278. package/lib/components/tab/tab.d.ts +1 -1
  279. package/lib/components/tab/tab.js +3 -3
  280. package/lib/components/tab/tab.js.map +1 -1
  281. package/lib/components/table/table.d.ts +36 -0
  282. package/lib/components/table/table.d.ts.map +1 -1
  283. package/lib/components/table/table.js +55 -0
  284. package/lib/components/table/table.js.map +1 -1
  285. package/lib/components/tabs/tabs.d.ts +20 -3
  286. package/lib/components/tabs/tabs.d.ts.map +1 -1
  287. package/lib/components/tabs/tabs.js +33 -5
  288. package/lib/components/tabs/tabs.js.map +1 -1
  289. package/lib/components/tag-list/tag-list.d.ts +17 -0
  290. package/lib/components/tag-list/tag-list.d.ts.map +1 -1
  291. package/lib/components/tag-list/tag-list.js +25 -0
  292. package/lib/components/tag-list/tag-list.js.map +1 -1
  293. package/lib/components/tooltip/tooltip.d.ts +2 -2
  294. package/lib/components/tooltip/tooltip.js +4 -4
  295. package/lib/components/tooltip/tooltip.js.map +1 -1
  296. package/lib/components/utils/light-children.d.ts +40 -0
  297. package/lib/components/utils/light-children.d.ts.map +1 -0
  298. package/lib/components/utils/light-children.js +100 -0
  299. package/lib/components/utils/light-children.js.map +1 -0
  300. package/lib/directives/if-truthy.d.ts +1 -1
  301. package/lib/light-children-TlEXev5S.js +39 -0
  302. package/lib/scripts/generate-react-wrappers.d.ts +8 -1
  303. package/lib/scripts/generate-react-wrappers.d.ts.map +1 -1
  304. package/lib/scripts/generate-react-wrappers.js +45 -1
  305. package/lib/scripts/generate-react-wrappers.js.map +1 -1
  306. package/mcp-manifest.json +162 -52
  307. package/package.json +11 -4
  308. package/react-manifest.json +153 -47
  309. package/dist/assets/if-defined-HKKhGupN.js +0 -1
  310. package/dist/assets/iframe-CWwoGI65.css +0 -1
  311. package/dist/assets/state-CfuknrX8.js +0 -1
  312. package/dist/fonts/PlusJakartaSans-Bold.woff2 +0 -0
  313. package/dist/fonts/PlusJakartaSans-Medium.woff2 +0 -0
  314. package/dist/fonts/PlusJakartaSans-Regular.woff2 +0 -0
  315. package/dist/fonts/PlusJakartaSans-SemiBold.woff2 +0 -0
  316. package/dist/logo.svg +0 -1
  317. package/dist/sb-addons/storybook-4/manager-bundle.js +0 -8
  318. /package/dist/icons/{express-scripts copy.svg → pharmacy copy.svg} +0 -0
  319. /package/dist/icons/{express-scripts.svg → pharmacy.svg} +0 -0
@@ -0,0 +1,174 @@
1
+ /**
2
+ * A2UI streaming surface protocol — types.
3
+ *
4
+ * A "surface" is a live region of UI that an agent builds up over time. The
5
+ * document model is the same nested `ComponentSpec` tree the one-shot renderer
6
+ * uses; what streaming adds is (1) addressing individual nodes by the path
7
+ * grammar the renderer already emits on events, (2) a data model that props can
8
+ * bind into, and (3) an ordered message envelope so a client can tell a dropped
9
+ * message from an out-of-order one.
10
+ */
11
+ import type { ComponentSpec, SpecChild } from '../types.js';
12
+ export declare const A2UI_STREAM_VERSION = 1;
13
+ /** RFC 6901 JSON Pointer into the surface data model, e.g. `/user/name`. */
14
+ export type JsonPointer = string;
15
+ /**
16
+ * A prop value of this shape resolves against the surface data model instead of
17
+ * being taken literally. `default` is used when the pointer resolves to
18
+ * `undefined`.
19
+ */
20
+ export interface BindingRef {
21
+ $bind: JsonPointer;
22
+ default?: unknown;
23
+ }
24
+ export declare function isBindingRef(value: unknown): value is BindingRef;
25
+ /**
26
+ * Where content goes inside a container node. `null` means the component's
27
+ * `children` array; a string names a slot. `"default"` is a slot name, and is
28
+ * NOT the same thing as `children` — see the children-vs-slots rule in the KB.
29
+ */
30
+ export type ContentTarget = string | null;
31
+ export type PatchOp =
32
+ /** Append nodes to a container's `children` (slot omitted) or a named slot. */
33
+ {
34
+ op: 'append';
35
+ path: string;
36
+ slot?: ContentTarget;
37
+ nodes: SpecChild[];
38
+ }
39
+ /** Insert nodes at `index` in a container's content list. */
40
+ | {
41
+ op: 'insert';
42
+ path: string;
43
+ slot?: ContentTarget;
44
+ index: number;
45
+ nodes: SpecChild[];
46
+ }
47
+ /** Replace the node at `path` wholesale. `$` replaces the surface root. */
48
+ | {
49
+ op: 'replace';
50
+ path: string;
51
+ node: SpecChild;
52
+ }
53
+ /** Remove the node at `path`. `$` clears the surface. */
54
+ | {
55
+ op: 'remove';
56
+ path: string;
57
+ }
58
+ /** Merge props into the node at `path`. A `null` value deletes the prop. */
59
+ | {
60
+ op: 'setProps';
61
+ path: string;
62
+ props: Record<string, unknown>;
63
+ }
64
+ /** Set event bindings on the node at `path`. A `null` value removes one. */
65
+ | {
66
+ op: 'setEvents';
67
+ path: string;
68
+ events: Record<string, unknown>;
69
+ }
70
+ /** Replace a container's whole content list with a single text node. */
71
+ | {
72
+ op: 'setText';
73
+ path: string;
74
+ slot?: ContentTarget;
75
+ text: string;
76
+ }
77
+ /** Append text to a container's trailing text node — the token-stream op. */
78
+ | {
79
+ op: 'appendText';
80
+ path: string;
81
+ slot?: ContentTarget;
82
+ text: string;
83
+ }
84
+ /** Empty a container's content list. */
85
+ | {
86
+ op: 'clear';
87
+ path: string;
88
+ slot?: ContentTarget;
89
+ };
90
+ export interface DataPatch {
91
+ pointer: JsonPointer;
92
+ /** `set` (default) writes `value`; `remove` deletes the pointed-at member. */
93
+ op?: 'set' | 'remove';
94
+ value?: unknown;
95
+ }
96
+ export type SurfaceState = 'streaming' | 'idle' | 'done' | 'error';
97
+ interface Envelope {
98
+ v: typeof A2UI_STREAM_VERSION;
99
+ surfaceId: string;
100
+ /** Monotonic per surface, starting at 1. `surface.create` is seq 0. */
101
+ seq: number;
102
+ }
103
+ export type SurfaceMessage = (Envelope & {
104
+ type: 'surface.create';
105
+ catalogId: string;
106
+ libraryVersion?: string;
107
+ title?: string;
108
+ root?: ComponentSpec;
109
+ data?: Record<string, unknown>;
110
+ }) | (Envelope & {
111
+ type: 'surface.patch';
112
+ ops: PatchOp[];
113
+ }) | (Envelope & {
114
+ type: 'surface.data';
115
+ patches: DataPatch[];
116
+ }) | (Envelope & {
117
+ type: 'surface.status';
118
+ state: SurfaceState;
119
+ message?: string;
120
+ }) | (Envelope & {
121
+ type: 'surface.delete';
122
+ });
123
+ /** Client → server. The return path for a named handler firing in the browser. */
124
+ export interface SurfaceEventMessage {
125
+ v: typeof A2UI_STREAM_VERSION;
126
+ type: 'surface.event';
127
+ surfaceId: string;
128
+ /** Server-assigned on receipt; clients may omit. */
129
+ seq?: number;
130
+ component: string;
131
+ path: string;
132
+ event: string;
133
+ handler: string;
134
+ detail?: unknown;
135
+ /** ISO 8601. Set by whichever side has a trustworthy clock. */
136
+ at?: string;
137
+ }
138
+ /**
139
+ * What changed, as an invalidation hint. The model is the source of truth — a
140
+ * renderer reads the current state at these paths rather than trusting a diff.
141
+ */
142
+ export type SurfaceChange =
143
+ /** The whole tree was replaced (create, root replace, root remove). */
144
+ {
145
+ kind: 'root';
146
+ }
147
+ /** A container's content list changed; re-reconcile its children. */
148
+ | {
149
+ kind: 'content';
150
+ path: string;
151
+ slot: ContentTarget;
152
+ }
153
+ /** Only the trailing text of a container changed — the cheap streaming path. */
154
+ | {
155
+ kind: 'text';
156
+ path: string;
157
+ slot: ContentTarget;
158
+ }
159
+ /** Props on one node changed; re-apply them. */
160
+ | {
161
+ kind: 'props';
162
+ path: string;
163
+ }
164
+ /** Event bindings on one node changed; re-attach. */
165
+ | {
166
+ kind: 'events';
167
+ path: string;
168
+ }
169
+ /** The data model changed; re-resolve every bound prop in the tree. */
170
+ | {
171
+ kind: 'data';
172
+ };
173
+ export {};
174
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../a2ui/stream/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE5D,eAAO,MAAM,mBAAmB,IAAI,CAAC;AAErC,4EAA4E;AAC5E,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC;AAEjC;;;;GAIG;AACH,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,WAAW,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,UAAU,CAOhE;AAED;;;;GAIG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,IAAI,CAAC;AAE1C,MAAM,MAAM,OAAO;AACjB,+EAA+E;AAC7E;IAAE,EAAE,EAAE,QAAQ,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,aAAa,CAAC;IAAC,KAAK,EAAE,SAAS,EAAE,CAAA;CAAE;AAC1E,6DAA6D;GAC3D;IAAE,EAAE,EAAE,QAAQ,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,aAAa,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,SAAS,EA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MAAM,MAAM,aAAa;AACvB,uEAAuE;AACrE;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE;AAClB,qEAAqE;GACnE;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,aAAa,CAAA;CAAE;AACxD,gFAAgF;GAC9E;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,aAAa,CAAA;CAAE;AACrD,gDAAgD;GAC9C;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE;AACjC,qDAAqD;GACnD;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE;AAClC,uEAAuE;GACrE;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * A2UI streaming surface protocol — types.
3
+ *
4
+ * A "surface" is a live region of UI that an agent builds up over time. The
5
+ * document model is the same nested `ComponentSpec` tree the one-shot renderer
6
+ * uses; what streaming adds is (1) addressing individual nodes by the path
7
+ * grammar the renderer already emits on events, (2) a data model that props can
8
+ * bind into, and (3) an ordered message envelope so a client can tell a dropped
9
+ * message from an out-of-order one.
10
+ */
11
+ export const A2UI_STREAM_VERSION = 1;
12
+ export function isBindingRef(value) {
13
+ return (typeof value === 'object' &&
14
+ value !== null &&
15
+ !Array.isArray(value) &&
16
+ typeof value.$bind === 'string');
17
+ }
18
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../a2ui/stream/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC;AAerC,MAAM,UAAU,YAAY,CAAC,KAAc;IACzC,OAAO,CACL,OAAO,KAAK,KAAK,QAAQ;QACzB,KAAK,KAAK,IAAI;QACd,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QACrB,OAAQ,KAA6B,CAAC,KAAK,KAAK,QAAQ,CACzD,CAAC;AACJ,CAAC","sourcesContent":["/**\n * A2UI streaming surface protocol — types.\n *\n * A \"surface\" is a live region of UI that an agent builds up over time. The\n * document model is the same nested `ComponentSpec` tree the one-shot renderer\n * uses; what streaming adds is (1) addressing individual nodes by the path\n * grammar the renderer already emits on events, (2) a data model that props can\n * bind into, and (3) an ordered message envelope so a client can tell a dropped\n * message from an out-of-order one.\n */\n\nimport type { ComponentSpec, SpecChild } from '../types.js';\n\nexport const A2UI_STREAM_VERSION = 1;\n\n/** RFC 6901 JSON Pointer into the surface data model, e.g. `/user/name`. */\nexport type JsonPointer = string;\n\n/**\n * A prop value of this shape resolves against the surface data model instead of\n * being taken literally. `default` is used when the pointer resolves to\n * `undefined`.\n */\nexport interface BindingRef {\n $bind: JsonPointer;\n default?: unknown;\n}\n\nexport function isBindingRef(value: unknown): value is BindingRef {\n return (\n typeof value === 'object' &&\n value !== null &&\n !Array.isArray(value) &&\n typeof (value as { $bind?: unknown }).$bind === 'string'\n );\n}\n\n/**\n * Where content goes inside a container node. `null` means the component's\n * `children` array; a string names a slot. `\"default\"` is a slot name, and is\n * NOT the same thing as `children` — see the children-vs-slots rule in the KB.\n */\nexport type ContentTarget = string | null;\n\nexport type PatchOp =\n /** Append nodes to a container's `children` (slot omitted) or a named slot. */\n | { op: 'append'; path: string; slot?: ContentTarget; nodes: SpecChild[] }\n /** Insert nodes at `index` in a container's content list. */\n | { op: 'insert'; path: string; slot?: ContentTarget; index: number; nodes: SpecChild[] }\n /** Replace the node at `path` wholesale. `$` replaces the surface root. */\n | { op: 'replace'; path: string; node: SpecChild }\n /** Remove the node at `path`. `$` clears the surface. */\n | { op: 'remove'; path: string }\n /** Merge props into the node at `path`. A `null` value deletes the prop. */\n | { op: 'setProps'; path: string; props: Record<string, unknown> }\n /** Set event bindings on the node at `path`. A `null` value removes one. */\n | { op: 'setEvents'; path: string; events: Record<string, unknown> }\n /** Replace a container's whole content list with a single text node. */\n | { op: 'setText'; path: string; slot?: ContentTarget; text: string }\n /** Append text to a container's trailing text node — the token-stream op. */\n | { op: 'appendText'; path: string; slot?: ContentTarget; text: string }\n /** Empty a container's content list. */\n | { op: 'clear'; path: string; slot?: ContentTarget };\n\nexport interface DataPatch {\n pointer: JsonPointer;\n /** `set` (default) writes `value`; `remove` deletes the pointed-at member. */\n op?: 'set' | 'remove';\n value?: unknown;\n}\n\nexport type SurfaceState = 'streaming' | 'idle' | 'done' | 'error';\n\ninterface Envelope {\n v: typeof A2UI_STREAM_VERSION;\n surfaceId: string;\n /** Monotonic per surface, starting at 1. `surface.create` is seq 0. */\n seq: number;\n}\n\nexport type SurfaceMessage =\n | (Envelope & {\n type: 'surface.create';\n catalogId: string;\n libraryVersion?: string;\n title?: string;\n root?: ComponentSpec;\n data?: Record<string, unknown>;\n })\n | (Envelope & { type: 'surface.patch'; ops: PatchOp[] })\n | (Envelope & { type: 'surface.data'; patches: DataPatch[] })\n | (Envelope & { type: 'surface.status'; state: SurfaceState; message?: string })\n | (Envelope & { type: 'surface.delete' });\n\n/** Client → server. The return path for a named handler firing in the browser. */\nexport interface SurfaceEventMessage {\n v: typeof A2UI_STREAM_VERSION;\n type: 'surface.event';\n surfaceId: string;\n /** Server-assigned on receipt; clients may omit. */\n seq?: number;\n component: string;\n path: string;\n event: string;\n handler: string;\n detail?: unknown;\n /** ISO 8601. Set by whichever side has a trustworthy clock. */\n at?: string;\n}\n\n/**\n * What changed, as an invalidation hint. The model is the source of truth — a\n * renderer reads the current state at these paths rather than trusting a diff.\n */\nexport type SurfaceChange =\n /** The whole tree was replaced (create, root replace, root remove). */\n | { kind: 'root' }\n /** A container's content list changed; re-reconcile its children. */\n | { kind: 'content'; path: string; slot: ContentTarget }\n /** Only the trailing text of a container changed — the cheap streaming path. */\n | { kind: 'text'; path: string; slot: ContentTarget }\n /** Props on one node changed; re-apply them. */\n | { kind: 'props'; path: string }\n /** Event bindings on one node changed; re-attach. */\n | { kind: 'events'; path: string }\n /** The data model changed; re-resolve every bound prop in the tree. */\n | { kind: 'data' };\n"]}
@@ -1,4 +1,11 @@
1
1
  import { Cre8Element } from '../cre8-element';
2
+ /** One panel in a data-driven accordion. */
3
+ export interface Cre8AccordionItemData {
4
+ heading: string;
5
+ content: string;
6
+ isActive?: boolean;
7
+ headingTagVariant?: 'h1' | 'h2' | 'h3' | 'h4';
8
+ }
2
9
  /**
3
10
  * The component is a vertically stacked list of headers that reveal or hide sections of related content on a page.
4
11
  * The header title gives the user a high level overview of the content allowing the user to decide
@@ -29,6 +36,14 @@ export declare class Cre8Accordion extends Cre8Element {
29
36
  */
30
37
  hasDivider?: boolean;
31
38
  connectedCallback(): void;
39
+ /**
40
+ * Panels for a data-driven accordion. Each becomes a `cre8-accordion-item`
41
+ * with its heading as a prop and its content in the default slot.
42
+ */
43
+ items?: Cre8AccordionItemData[];
44
+ /** The composition the data property stands for. */
45
+ private buildComposition;
46
+ protected updated(changed: Map<string, unknown>): void;
32
47
  render(): import("lit-html").TemplateResult<1>;
33
48
  }
34
49
  declare global {
@@ -1 +1 @@
1
- {"version":3,"file":"accordion.d.ts","sourceRoot":"","sources":["../../../components/accordion/accordion.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAG9C;;;;;;;;;;GAUG;AAEH,qBAAa,aAAc,SAAQ,WAAW;IAC1C,MAAM,CAAC,MAAM,4BAAY;IAG3B;;;;;;OAMG;IAEC,UAAU,CAAC,EAAE,WAAW,GAAG,gBAAgB,GAAG,SAAS,GAAG,MAAM,CAAC;IAErE;;;;;;OAMG;IAEC,UAAU,CAAC,UAAS;IAExB,iBAAiB,IAAI,IAAI;IAIzB,MAAM;CAeP;AAKD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,gBAAgB,EAAE,aAAa,CAAC;KACjC;CACF;AAED,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"accordion.d.ts","sourceRoot":"","sources":["../../../components/accordion/accordion.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAI9C,4CAA4C;AAC5C,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iBAAiB,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;CAC/C;AAED;;;;;;;;;;GAUG;AAGH,qBAAa,aAAc,SAAQ,WAAW;IAC1C,MAAM,CAAC,MAAM,4BAAY;IAG3B;;;;;;OAMG;IAEC,UAAU,CAAC,EAAE,WAAW,GAAG,gBAAgB,GAAG,SAAS,GAAG,MAAM,CAAC;IAErE;;;;;;OAMG;IAEC,UAAU,CAAC,UAAS;IAExB,iBAAiB,IAAI,IAAI;IAGzB;;;OAGG;IAEC,KAAK,CAAC,EAAE,qBAAqB,EAAE,CAAC;IAEpC,oDAAoD;IACpD,OAAO,CAAC,gBAAgB;IAaxB,SAAS,CAAC,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;IAOtD,MAAM;CAeP;AAKD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,gBAAgB,EAAE,aAAa,CAAC;KACjC;CACF;AAED,eAAe,aAAa,CAAC"}
@@ -7,6 +7,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
7
7
  import { html, } from 'lit';
8
8
  import { property } from 'lit/decorators.js';
9
9
  import { Cre8Element } from '../cre8-element';
10
+ import { syncLightChildren } from '../utils/light-children';
10
11
  import styles from './accordion.styles.js';
11
12
  /**
12
13
  * The component is a vertically stacked list of headers that reveal or hide sections of related content on a page.
@@ -34,6 +35,25 @@ export class Cre8Accordion extends Cre8Element {
34
35
  connectedCallback() {
35
36
  super.connectedCallback();
36
37
  }
38
+ /** The composition the data property stands for. */
39
+ buildComposition() {
40
+ if (!this.items)
41
+ return null;
42
+ return this.items.map((item) => ({
43
+ tag: 'cre8-accordion-item',
44
+ props: {
45
+ heading: item.heading,
46
+ isActive: item.isActive,
47
+ headingTagVariant: item.headingTagVariant,
48
+ },
49
+ text: item.content,
50
+ }));
51
+ }
52
+ updated(changed) {
53
+ if (['items'].some((key) => changed.has(key))) {
54
+ syncLightChildren(this, this.buildComposition());
55
+ }
56
+ }
37
57
  render() {
38
58
  const componentClassNames = this.componentClassNames('cre8-c-accordion', {
39
59
  'cre8-c-inner-divider': this.hasDivider === true,
@@ -56,6 +76,9 @@ __decorate([
56
76
  __decorate([
57
77
  property({ type: Boolean, reflect: true })
58
78
  ], Cre8Accordion.prototype, "hasDivider", void 0);
79
+ __decorate([
80
+ property({ type: Array })
81
+ ], Cre8Accordion.prototype, "items", void 0);
59
82
  if (customElements.get('cre8-accordion') === undefined) {
60
83
  customElements.define('cre8-accordion', Cre8Accordion);
61
84
  }
@@ -1 +1 @@
1
- {"version":3,"file":"accordion.js","sourceRoot":"","sources":["../../../components/accordion/accordion.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,GAAI,MAAM,KAAK,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,MAAM,MAAM,uBAAuB,CAAC;AAE3C;;;;;;;;;;GAUG;AAEH,MAAM,OAAO,aAAc,SAAQ,WAAW;IAA9C;;QAcE;;;;;;WAMG;QAEC,eAAU,GAAI,KAAK,CAAC;IAqB1B,CAAC;IAnBC,iBAAiB;QACb,KAAK,CAAC,iBAAiB,EAAE,CAAC;IAC9B,CAAC;IAED,MAAM;QACF,MAAM,mBAAmB,GAAG,IAAI,CAAC,mBAAmB,CAAC,kBAAkB,EAAE;YACrE,sBAAsB,EAAE,IAAI,CAAC,UAAU,KAAK,IAAI;YAChD,+BAA+B,EAAE,IAAI,CAAC,UAAU,KAAK,SAAS,IAAI,IAAI,CAAC,UAAU,KAAK,MAAM;YAC5F,oCAAoC,EAAE,IAAI,CAAC,UAAU,KAAK,WAAW;YACrE,yCAAyC,EAAE,IAAI,CAAC,UAAU,KAAK,gBAAgB;YAC/E,kCAAkC,EAAE,IAAI,CAAC,UAAU,KAAK,SAAS;SACpE,CAAC,CAAC;QAEH,OAAO,IAAI,CAAA;oBACG,mBAAmB;;;KAGlC,CAAC;IACJ,CAAC;;AAzCQ,oBAAM,GAAG,CAAC,MAAM,CAAC,AAAX,CAAY;AAWvB;IADH,QAAQ,EAAE;iDAC0D;AAUjE;IADH,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;iDACnB;AAuB1B,IAAI,cAAc,CAAC,GAAG,CAAC,gBAAgB,CAAC,KAAK,SAAS,EAAE,CAAC;IACrD,cAAc,CAAC,MAAM,CAAC,gBAAgB,EAAE,aAAa,CAAC,CAAC;AAC3D,CAAC;AAOD,eAAe,aAAa,CAAC","sourcesContent":["import { html, } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { Cre8Element } from '../cre8-element';\nimport styles from './accordion.styles.js';\n\n/**\n * The component is a vertically stacked list of headers that reveal or hide sections of related content on a page.\n * The header title gives the user a high level overview of the content allowing the user to decide\n * which sections to expand for the information.\n *\n * Accordion contains Accordion Items as children. This component is the wrapper for grouping related accordion items.\n *\n * Users can select different border types: default (no border), rectangle, rounded bottom, and rounded.\n *\n * @slot - The `cre8-accordion-item` children to group\n */\n\nexport class Cre8Accordion extends Cre8Element {\n static styles = [styles];\n\n\n /**\n * borderType\n * @prop {'rectangle' | 'rounded-bottom' | 'rounded' | 'none'}\n *\n * Controls the border and border-radius of the parent container of the slotted accordions.\n *\n */\n @property()\n borderType?: 'rectangle' | 'rounded-bottom' | 'rounded' | 'none';\n\n /**\n *\n * When it is true, the inner dividers are displayed;\n * if it is false, the inner dividers are not displayed\n * @prop {boolean} hasDivider\n *\n */\n @property({ type: Boolean, reflect: true })\n hasDivider? = false;\n\n connectedCallback(): void {\n super.connectedCallback();\n }\n\n render() {\n const componentClassNames = this.componentClassNames('cre8-c-accordion', {\n 'cre8-c-inner-divider': this.hasDivider === true,\n 'cre8-c-accordion--border-none': this.borderType === undefined || this.borderType === 'none',\n 'cre8-c-accordion--border-rectangle': this.borderType === 'rectangle',\n 'cre8-c-accordion--border-rounded-bottom': this.borderType === 'rounded-bottom',\n 'cre8-c-accordion--border-rounded': this.borderType === 'rounded',\n });\n\n return html`\n <div class=\"${componentClassNames}\">\n <slot> </slot>\n </div>\n `;\n }\n}\n\nif (customElements.get('cre8-accordion') === undefined) {\n customElements.define('cre8-accordion', Cre8Accordion);\n}\ndeclare global {\n interface HTMLElementTagNameMap {\n 'cre8-accordion': Cre8Accordion;\n }\n}\n\nexport default Cre8Accordion;\n"]}
1
+ {"version":3,"file":"accordion.js","sourceRoot":"","sources":["../../../components/accordion/accordion.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,GAAI,MAAM,KAAK,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAkB,MAAM,yBAAyB,CAAC;AAC5E,OAAO,MAAM,MAAM,uBAAuB,CAAC;AAU3C;;;;;;;;;;GAUG;AAGH,MAAM,OAAO,aAAc,SAAQ,WAAW;IAA9C;;QAcE;;;;;;WAMG;QAEC,eAAU,GAAI,KAAK,CAAC;IAgD1B,CAAC;IA9CC,iBAAiB;QACb,KAAK,CAAC,iBAAiB,EAAE,CAAC;IAC9B,CAAC;IAQD,oDAAoD;IAC5C,gBAAgB;QACpB,IAAI,CAAC,IAAI,CAAC,KAAK;YAAE,OAAO,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;IADH,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;4CACU;AAwCtC,IAAI,cAAc,CAAC,GAAG,CAAC,gBAAgB,CAAC,KAAK,SAAS,EAAE,CAAC;IACrD,cAAc,CAAC,MAAM,CAAC,gBAAgB,EAAE,aAAa,CAAC,CAAC;AAC3D,CAAC;AAOD,eAAe,aAAa,CAAC","sourcesContent":["import { html, } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { Cre8Element } from '../cre8-element';\nimport { syncLightChildren, type ChildSpec } from '../utils/light-children';\nimport styles from './accordion.styles.js';\n\n/** One panel in a data-driven accordion. */\nexport interface Cre8AccordionItemData {\n heading: string;\n content: string;\n isActive?: boolean;\n headingTagVariant?: 'h1' | 'h2' | 'h3' | 'h4';\n}\n\n/**\n * The component is a vertically stacked list of headers that reveal or hide sections of related content on a page.\n * The header title gives the user a high level overview of the content allowing the user to decide\n * which sections to expand for the information.\n *\n * Accordion contains Accordion Items as children. This component is the wrapper for grouping related accordion items.\n *\n * Users can select different border types: default (no border), rectangle, rounded bottom, and rounded.\n *\n * @slot - The `cre8-accordion-item` children to group\n */\n\n\nexport class Cre8Accordion extends Cre8Element {\n static styles = [styles];\n\n\n /**\n * borderType\n * @prop {'rectangle' | 'rounded-bottom' | 'rounded' | 'none'}\n *\n * Controls the border and border-radius of the parent container of the slotted accordions.\n *\n */\n @property()\n borderType?: 'rectangle' | 'rounded-bottom' | 'rounded' | 'none';\n\n /**\n *\n * When it is true, the inner dividers are displayed;\n * if it is false, the inner dividers are not displayed\n * @prop {boolean} hasDivider\n *\n */\n @property({ type: Boolean, reflect: true })\n hasDivider? = false;\n\n connectedCallback(): void {\n super.connectedCallback();\n }\n /**\n * Panels for a data-driven accordion. Each becomes a `cre8-accordion-item`\n * with its heading as a prop and its content in the default slot.\n */\n @property({ type: Array })\n items?: Cre8AccordionItemData[];\n\n /** The composition the data property stands for. */\n private buildComposition(): ChildSpec[] | null {\n if (!this.items) return null;\n return this.items.map((item) => ({\n tag: 'cre8-accordion-item',\n props: {\n heading: item.heading,\n isActive: item.isActive,\n headingTagVariant: item.headingTagVariant,\n },\n text: item.content,\n }));\n }\n\n protected updated(changed: Map<string, unknown>): void {\n if (['items'].some((key) => changed.has(key))) {\n syncLightChildren(this, this.buildComposition());\n }\n }\n\n\n render() {\n const componentClassNames = this.componentClassNames('cre8-c-accordion', {\n 'cre8-c-inner-divider': this.hasDivider === true,\n 'cre8-c-accordion--border-none': this.borderType === undefined || this.borderType === 'none',\n 'cre8-c-accordion--border-rectangle': this.borderType === 'rectangle',\n 'cre8-c-accordion--border-rounded-bottom': this.borderType === 'rounded-bottom',\n 'cre8-c-accordion--border-rounded': this.borderType === 'rounded',\n });\n\n return html`\n <div class=\"${componentClassNames}\">\n <slot> </slot>\n </div>\n `;\n }\n}\n\nif (customElements.get('cre8-accordion') === undefined) {\n customElements.define('cre8-accordion', Cre8Accordion);\n}\ndeclare global {\n interface HTMLElementTagNameMap {\n 'cre8-accordion': Cre8Accordion;\n }\n}\n\nexport default Cre8Accordion;\n"]}
@@ -1,18 +1,5 @@
1
1
  import { Cre8Element } from '../cre8-element';
2
2
  import '../icon/icon';
3
- export declare enum status {
4
- 'error' = 0,
5
- 'warning' = 1,
6
- 'success' = 2,
7
- 'info' = 3,
8
- 'attention' = 4,
9
- undefined = 5
10
- }
11
- export declare enum variant {
12
- 'light' = 0,
13
- 'white' = 1,
14
- undefined = 2
15
- }
16
3
  /**
17
4
  * Status badges are used most often in tables or fat rows in a list.
18
5
  * These Components serve a contextual purpose and don't provide any functionality.
@@ -27,22 +14,22 @@ export declare class Cre8Badge extends Cre8Element {
27
14
  text: string;
28
15
  /**
29
16
  * Status (a color variant prop)
30
- * - **neutral** (default) renders a badge with a neutral state treatment
17
+ * - Omitting this prop renders a badge with the neutral state treatment
31
18
  * - **success** renders a badge with success state treatment
32
19
  * - **warning** renders a badge with warning state treatment
33
20
  * - **error** renders a badge with error state treatment
34
21
  * - **info** renders a badge with information state treatment
35
22
  * - **attention** renders a badge with attention state treatment
36
23
  */
37
- status: string;
24
+ status?: 'success' | 'warning' | 'error' | 'info' | 'attention';
38
25
  /**
39
26
  * Background Style Variant
40
27
  *
41
- * - **dark|undefined** (default) renders a badge with a dark background
28
+ * - Omitting this prop renders a badge with a dark background
42
29
  * - **light** renders a badge with a light background
43
30
  * - **white** renders a badge with a white background
44
31
  */
45
- variant: string;
32
+ variant?: 'light' | 'white';
46
33
  /**
47
34
  * SVG as a raw string
48
35
  * - For badges with icons, the icon is defined by this prop
@@ -1 +1 @@
1
- {"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../../components/badge/badge.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,cAAc,CAAC;AAItB,oBAAY,MAAM;IACjB,OAAO,IAAA;IAAE,SAAS,IAAA;IAAE,SAAS,IAAA;IAAE,MAAM,IAAA;IAAE,WAAW,IAAA;IAAE,SAAS,IAAA;CAC7D;AACD,oBAAY,OAAO;IACjB,OAAO,IAAA;IAAE,OAAO,IAAA;IAAE,SAAS,IAAA;CAC5B;AAED;;;;;GAKG;AACH,qBAAa,SAAU,SAAQ,WAAW;IACtC,MAAM,CAAC,MAAM,4BAAY;IAE3B;;OAEG;IAEC,IAAI,EAAE,MAAM,CAAa;IAE7B;;;;;;;;OAQG;IAEC,MAAM,EAAE,MAAM,CAAC;IAEnB;;;;;;OAMG;IAEC,OAAO,EAAE,MAAM,CAAC;IAEpB;;;;;;;OAOG;IAEC,GAAG,CAAC,EAAE,MAAM,CAAC;IAEjB,MAAM;CAkBP;AAMD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,YAAY,EAAE,SAAS,CAAC;KACzB;CACF"}
1
+ {"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../../components/badge/badge.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,cAAc,CAAC;AAItB;;;;;GAKG;AACH,qBAAa,SAAU,SAAQ,WAAW;IACtC,MAAM,CAAC,MAAM,4BAAY;IAE3B;;OAEG;IAEC,IAAI,EAAE,MAAM,CAAa;IAE7B;;;;;;;;OAQG;IAEC,MAAM,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,WAAW,CAAC;IAEpE;;;;;;OAMG;IAEC,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;IAEhC;;;;;;;OAOG;IAEC,GAAG,CAAC,EAAE,MAAM,CAAC;IAEjB,MAAM;CAkBP;AAMD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,YAAY,EAAE,SAAS,CAAC;KACzB;CACF"}
@@ -10,21 +10,6 @@ import { property } from 'lit/decorators.js';
10
10
  import { Cre8Element } from '../cre8-element';
11
11
  import '../icon/icon';
12
12
  import styles from './badge.styles.js';
13
- export var status;
14
- (function (status) {
15
- status[status["error"] = 0] = "error";
16
- status[status["warning"] = 1] = "warning";
17
- status[status["success"] = 2] = "success";
18
- status[status["info"] = 3] = "info";
19
- status[status["attention"] = 4] = "attention";
20
- status[status["undefined"] = 5] = "undefined";
21
- })(status || (status = {}));
22
- export var variant;
23
- (function (variant) {
24
- variant[variant["light"] = 0] = "light";
25
- variant[variant["white"] = 1] = "white";
26
- variant[variant["undefined"] = 2] = "undefined";
27
- })(variant || (variant = {}));
28
13
  /**
29
14
  * Status badges are used most often in tables or fat rows in a list.
30
15
  * These Components serve a contextual purpose and don't provide any functionality.
@@ -1 +1 @@
1
- {"version":3,"file":"badge.js","sourceRoot":"","sources":["../../../components/badge/badge.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,IAAI,GAAI,MAAM,KAAK,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,W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MAAM,CAAC,AAAX,CAAY;AAMvB;IADH,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;uCACE;AAYzB;IADH,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;yCACR;AAUf;IADH,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;0CACP;AAWhB;IADH,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;sCACV;AAsBnB,IAAI,cAAc,CAAC,GAAG,CAAC,YAAY,CAAC,KAAK,SAAS,EAAE,CAAC;IACjD,cAAc,CAAC,MAAM,CAAC,YAAY,EAAE,SAAS,CAAC,CAAC;AACnD,CAAC","sourcesContent":["import classnames from 'classnames';\nimport { html, } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { Cre8Element } from '../cre8-element';\nimport '../icon/icon';\n\nimport styles from './badge.styles.js';\n\nexport enum status {\n 'error', 'warning', 'success', 'info', 'attention', undefined\n}\nexport enum variant {\n 'light', 'white', undefined\n}\n\n/**\n * Status badges are used most often in tables or fat rows in a list.\n * These Components serve a contextual purpose and don't provide any functionality.\n * Badges should be organized inside a dedicated table row communicating status such as pending, approved or rejected.\n *\n */\nexport class Cre8Badge extends Cre8Element {\n static styles = [styles];\n\n /**\n * The badge text\n */\n @property({ type: String })\n text: string = undefined;\n\n /**\n * Status (a color variant prop)\n * - **neutral** (default) renders a badge with a neutral state treatment\n * - **success** renders a badge with success state treatment\n * - **warning** renders a badge with warning state treatment\n * - **error** renders a badge with error state treatment\n * - **info** renders a badge with information state treatment\n * - **attention** renders a badge with attention state treatment\n */\n @property({ type: String })\n status: string;\n\n /**\n * Background Style Variant\n *\n * - **dark|undefined** (default) renders a badge with a dark background\n * - **light** renders a badge with a light background\n * - **white** renders a badge with a white background\n */\n @property({ type: String })\n variant: string;\n\n /**\n * SVG as a raw string\n * - For badges with icons, the icon is defined by this prop\n * - Pass in a raw svg as a String. We use raw string loader for this but any method of getting raw svgs will do\n * - Import example:`import svgFeedback from '@tmorrow/cre8-wc/icons/Feedback.svg?raw';`\n * - [cre8-icons Github repo](https://github.com/tmorrowdev/cre8-icons) This is the Github\n * repo for Cre8 icons, which includes a link to the storybook as well as relavant information for new icons\n */\n @property({ type: String })\n svg?: string;\n\n render() {\n const componentClassName = classnames('cre8-c-badge', {\n 'cre8-c-badge--success': this.status === 'success',\n 'cre8-c-badge--warning': this.status === 'warning',\n 'cre8-c-badge--error': this.status === 'error',\n 'cre8-c-badge--info': this.status === 'info',\n 'cre8-c-badge--attention': this.status === 'attention',\n 'cre8-c-badge--light': this.variant === 'light',\n 'cre8-c-badge--white': this.variant === 'white',\n });\n\n return html`<div class=\"${componentClassName}\">\n ${this.svg ? html` <cre8-icon \n svg='${this.svg}' aria-hidden='true'></cre8-icon>\n </cre8-icon>` : ''} \n ${this.text} \n </div> `;\n }\n}\n\nif (customElements.get('cre8-badge') === undefined) {\n customElements.define('cre8-badge', Cre8Badge);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'cre8-badge': Cre8Badge;\n }\n}\n"]}
1
+ {"version":3,"file":"badge.js","sourceRoot":"","sources":["../../../components/badge/badge.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,IAAI,GAAI,MAAM,KAAK,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,cAAc,CAAC;AAEtB,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC;;;;;GAKG;AACH,MAAM,OAAO,SAAU,SAAQ,WAAW;IAA1C;;QAGE;;WAEG;QAEC,SAAI,GAAW,SAAS,CAAC;IAqD/B,CAAC;IAlBC,MAAM;QACF,MAAM,kBAAkB,GAAG,UAAU,CAAC,cAAc,EAAE;YAClD,uBAAuB,EAAE,IAAI,CAAC,MAAM,KAAK,SAAS;YAClD,uBAAuB,EAAE,IAAI,CAAC,MAAM,KAAK,SAAS;YAClD,qBAAqB,EAAE,IAAI,CAAC,MAAM,KAAK,OAAO;YAC9C,oBAAoB,EAAE,IAAI,CAAC,MAAM,KAAK,MAAM;YAC5C,yBAAyB,EAAE,IAAI,CAAC,MAAM,KAAK,WAAW;YACtD,qBAAqB,EAAE,IAAI,CAAC,OAAO,KAAK,OAAO;YAC/C,qBAAqB,EAAE,IAAI,CAAC,OAAO,KAAK,OAAO;SAClD,CAAC,CAAC;QAEH,OAAO,IAAI,CAAA,eAAe,kBAAkB;UACxC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAA;mBACN,IAAI,CAAC,GAAG;qBACN,CAAC,CAAC,CAAC,EAAE;UAChB,IAAI,CAAC,IAAI;gBACH,CAAC;IACf,CAAC;;AA1DQ,gBAAM,GAAG,CAAC,MAAM,CAAC,AAAX,CAAY;AAMvB;IADH,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;uCACE;AAYzB;IADH,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;yCACyC;AAUhE;IADH,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;0CACK;AAW5B;IADH,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;sCACV;AAsBnB,IAAI,cAAc,CAAC,GAAG,CAAC,YAAY,CAAC,KAAK,SAAS,EAAE,CAAC;IACjD,cAAc,CAAC,MAAM,CAAC,YAAY,EAAE,SAAS,CAAC,CAAC;AACnD,CAAC","sourcesContent":["import classnames from 'classnames';\nimport { html, } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { Cre8Element } from '../cre8-element';\nimport '../icon/icon';\n\nimport styles from './badge.styles.js';\n\n/**\n * Status badges are used most often in tables or fat rows in a list.\n * These Components serve a contextual purpose and don't provide any functionality.\n * Badges should be organized inside a dedicated table row communicating status such as pending, approved or rejected.\n *\n */\nexport class Cre8Badge extends Cre8Element {\n static styles = [styles];\n\n /**\n * The badge text\n */\n @property({ type: String })\n text: string = undefined;\n\n /**\n * Status (a color variant prop)\n * - Omitting this prop renders a badge with the neutral state treatment\n * - **success** renders a badge with success state treatment\n * - **warning** renders a badge with warning state treatment\n * - **error** renders a badge with error state treatment\n * - **info** renders a badge with information state treatment\n * - **attention** renders a badge with attention state treatment\n */\n @property({ type: String })\n status?: 'success' | 'warning' | 'error' | 'info' | 'attention';\n\n /**\n * Background Style Variant\n *\n * - Omitting this prop renders a badge with a dark background\n * - **light** renders a badge with a light background\n * - **white** renders a badge with a white background\n */\n @property({ type: String })\n variant?: 'light' | 'white';\n\n /**\n * SVG as a raw string\n * - For badges with icons, the icon is defined by this prop\n * - Pass in a raw svg as a String. We use raw string loader for this but any method of getting raw svgs will do\n * - Import example:`import svgFeedback from '@tmorrow/cre8-wc/icons/Feedback.svg?raw';`\n * - [cre8-icons Github repo](https://github.com/tmorrowdev/cre8-icons) This is the Github\n * repo for Cre8 icons, which includes a link to the storybook as well as relavant information for new icons\n */\n @property({ type: String })\n svg?: string;\n\n render() {\n const componentClassName = classnames('cre8-c-badge', {\n 'cre8-c-badge--success': this.status === 'success',\n 'cre8-c-badge--warning': this.status === 'warning',\n 'cre8-c-badge--error': this.status === 'error',\n 'cre8-c-badge--info': this.status === 'info',\n 'cre8-c-badge--attention': this.status === 'attention',\n 'cre8-c-badge--light': this.variant === 'light',\n 'cre8-c-badge--white': this.variant === 'white',\n });\n\n return html`<div class=\"${componentClassName}\">\n ${this.svg ? html` <cre8-icon \n svg='${this.svg}' aria-hidden='true'></cre8-icon>\n </cre8-icon>` : ''} \n ${this.text} \n </div> `;\n }\n}\n\nif (customElements.get('cre8-badge') === undefined) {\n customElements.define('cre8-badge', Cre8Badge);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'cre8-badge': Cre8Badge;\n }\n}\n"]}
@@ -1,4 +1,10 @@
1
1
  import { Cre8Element } from '../cre8-element';
2
+ /** One crumb in a data-driven breadcrumb trail. */
3
+ export interface Cre8BreadcrumbData {
4
+ text: string;
5
+ /** Omit on the final crumb — the page you are on is not a link. */
6
+ href?: string;
7
+ }
2
8
  /**
3
9
  * The breadcrumbs component is a secondary navigation pattern that helps a user understand where the user is located.
4
10
  * The breadcrumbs component shows the users their current location relative to the information architecture
@@ -21,6 +27,14 @@ export declare class Cre8Breadcrumbs extends Cre8Element {
21
27
  * aria-label attribute to designate at name for the nav. Can be override by user
22
28
  */
23
29
  navAriaLabel: string;
30
+ /**
31
+ * Crumbs for a data-driven trail. Each becomes a `cre8-breadcrumbs-item`,
32
+ * wrapping a `cre8-text-link` when it has an `href`.
33
+ */
34
+ items?: Cre8BreadcrumbData[];
35
+ /** The composition the data property stands for. */
36
+ private buildComposition;
37
+ protected updated(changed: Map<string, unknown>): void;
24
38
  render(): import("lit-html").TemplateResult<1>;
25
39
  }
26
40
  declare global {
@@ -1 +1 @@
1
- {"version":3,"file":"breadcrumbs.d.ts","sourceRoot":"","sources":["../../../components/breadcrumbs/breadcrumbs.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAG9C;;;;;;;;;;;;;;;GAeG;AAEH,qBAAa,eAAgB,SAAQ,WAAW;IAC5C,MAAM,CAAC,MAAM,4BAAY;IAE3B;;OAEG;IAEC,YAAY,EAAE,MAAM,CAAiB;IAEzC,MAAM;CAWP;AAMD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,kBAAkB,EAAE,eAAe,CAAC;KACrC;CACF;AAED,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"breadcrumbs.d.ts","sourceRoot":"","sources":["../../../components/breadcrumbs/breadcrumbs.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAI9C,mDAAmD;AACnD,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,mEAAmE;IACnE,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;;;;;;;;;;;;;GAeG;AAGH,qBAAa,eAAgB,SAAQ,WAAW;IAC5C,MAAM,CAAC,MAAM,4BAAY;IAE3B;;OAEG;IAEC,YAAY,EAAE,MAAM,CAAiB;IACzC;;;OAGG;IAEC,KAAK,CAAC,EAAE,kBAAkB,EAAE,CAAC;IAEjC,oDAAoD;IACpD,OAAO,CAAC,gBAAgB;IAWxB,SAAS,CAAC,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;IAOtD,MAAM;CAWP;AAMD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,kBAAkB,EAAE,eAAe,CAAC;KACrC;CACF;AAED,eAAe,eAAe,CAAC"}
@@ -11,6 +11,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
11
11
  import { html, } from 'lit';
12
12
  import { property } from 'lit/decorators.js';
13
13
  import { Cre8Element } from '../cre8-element';
14
+ import { syncLightChildren } from '../utils/light-children';
14
15
  import styles from './breadcrumbs.styles.js';
15
16
  /**
16
17
  * The breadcrumbs component is a secondary navigation pattern that helps a user understand where the user is located.
@@ -36,6 +37,23 @@ export class Cre8Breadcrumbs extends Cre8Element {
36
37
  */
37
38
  this.navAriaLabel = 'breadcrumbs';
38
39
  }
40
+ /** The composition the data property stands for. */
41
+ buildComposition() {
42
+ if (!this.items)
43
+ return null;
44
+ return this.items.map((item) => ({
45
+ tag: 'cre8-breadcrumbs-item',
46
+ children: item.href
47
+ ? [{ tag: 'cre8-text-link', props: { href: item.href }, text: item.text }]
48
+ : undefined,
49
+ text: item.href ? undefined : item.text,
50
+ }));
51
+ }
52
+ updated(changed) {
53
+ if (['items'].some((key) => changed.has(key))) {
54
+ syncLightChildren(this, this.buildComposition());
55
+ }
56
+ }
39
57
  render() {
40
58
  const componentClassNames = this.componentClassNames('cre8-c-breadcrumbs', {});
41
59
  return html `
@@ -51,6 +69,9 @@ Cre8Breadcrumbs.styles = [styles];
51
69
  __decorate([
52
70
  property()
53
71
  ], Cre8Breadcrumbs.prototype, "navAriaLabel", void 0);
72
+ __decorate([
73
+ property({ type: Array })
74
+ ], Cre8Breadcrumbs.prototype, "items", void 0);
54
75
  if (customElements.get('cre8-breadcrumbs') === undefined) {
55
76
  customElements.define('cre8-breadcrumbs', Cre8Breadcrumbs);
56
77
  }
@@ -1 +1 @@
1
- {"version":3,"file":"breadcrumbs.js","sourceRoot":"","sources":["../../../components/breadcrumbs/breadcrumbs.ts"],"names":[],"mappings":";;;;;;AAAA;;;EAGE;AACF,OAAO,EAAE,IAAI,GAAI,MAAM,KAAK,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,MAAM,MAAM,yBAAyB,CAAC;AAE7C;;;;;;;;;;;;;;;GAeG;AAEH,MAAM,OAAO,eAAgB,SAAQ,WAAW;IAAhD;;QAGE;;WAEG;QAEC,iBAAY,GAAW,aAAa,CAAC;IAa3C,CAAC;IAXC,MAAM;QACF,MAAM,mBAAmB,GAAG,IAAI,CAAC,mBAAmB,CAAC,oBAAoB,EAAE,EAAE,CAAC,CAAC;QAE/E,OAAO,IAAI,CAAA;yBACQ,IAAI,CAAC,YAAY,aAAa,mBAAmB;;;;;KAKrE,CAAC;IACJ,CAAC;;AAlBQ,sBAAM,GAAG,CAAC,MAAM,CAAC,AAAX,CAAY;AAMvB;IADH,QAAQ,EAAE;qDAC8B;AAe3C,IAAI,cAAc,CAAC,GAAG,CAAC,kBAAkB,CAAC,KAAK,SAAS,EAAE,CAAC;IACvD,cAAc,CAAC,MAAM,CAAC,kBAAkB,EAAE,eAAe,CAAC,CAAC;AAC/D,CAAC;AAQD,eAAe,eAAe,CAAC","sourcesContent":["/* eslint-disable lit-a11y/list --\n* <slot> is a non-content element, which is permitted as a direct child within a list\n* Ref https://dequeuniversity.com/rules/axe/4.8/list regarding non-content elements\n*/\nimport { html, } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { Cre8Element } from '../cre8-element';\nimport styles from './breadcrumbs.styles.js';\n\n/**\n * The breadcrumbs component is a secondary navigation pattern that helps a user understand where the user is located.\n * The breadcrumbs component shows the users their current location relative to the information architecture\n * It enables the users to quickly move up to a parent level or previous location.\n *\n * ## How to Use\n *\n * - Import 'Breadcrumbs' component.\n * - Add the pages in the path of the breadcrumbs using `cre8-breadcrumbs-item`.\n * All the pages in the breadcrumbs component should be interactive.\n * - All the page should link to their respective pages (except the current page) using `cre8-link`.\n * - The current page is included in the breadcrumbs trail.\n * - The current page is always the last text listed and is not an interactive link.\n *\n * @slot - The component content\n */\n\nexport class Cre8Breadcrumbs extends Cre8Element {\n static styles = [styles];\n\n /**\n * aria-label attribute to designate at name for the nav. Can be override by user\n */\n @property()\n navAriaLabel: string = 'breadcrumbs';\n\n render() {\n const componentClassNames = this.componentClassNames('cre8-c-breadcrumbs', {});\n\n return html`\n <nav aria-label=\"${this.navAriaLabel}\" class=\"${componentClassNames}\">\n <ol class=\"cre8-c-breadcrumbs__list\">\n <slot></slot>\n </ol>\n </nav>\n `;\n }\n}\n\nif (customElements.get('cre8-breadcrumbs') === undefined) {\n customElements.define('cre8-breadcrumbs', Cre8Breadcrumbs);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'cre8-breadcrumbs': Cre8Breadcrumbs;\n }\n}\n\nexport default Cre8Breadcrumbs;\n"]}
1
+ {"version":3,"file":"breadcrumbs.js","sourceRoot":"","sources":["../../../components/breadcrumbs/breadcrumbs.ts"],"names":[],"mappings":";;;;;;AAAA;;;EAGE;AACF,OAAO,EAAE,IAAI,GAAI,MAAM,KAAK,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,O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Q,sBAAM,GAAG,CAAC,MAAM,CAAC,AAAX,CAAY;AAMvB;IADH,QAAQ,EAAE;qDAC8B;AAMrC;IADH,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;8CACO;AAkCnC,IAAI,cAAc,CAAC,GAAG,CAAC,kBAAkB,CAAC,KAAK,SAAS,EAAE,CAAC;IACvD,cAAc,CAAC,MAAM,CAAC,kBAAkB,EAAE,eAAe,CAAC,CAAC;AAC/D,CAAC;AAQD,eAAe,eAAe,CAAC","sourcesContent":["/* eslint-disable lit-a11y/list --\n* <slot> is a non-content element, which is permitted as a direct child within a list\n* Ref https://dequeuniversity.com/rules/axe/4.8/list regarding non-content elements\n*/\nimport { html, } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { Cre8Element } from '../cre8-element';\nimport { syncLightChildren, type ChildSpec } from '../utils/light-children';\nimport styles from './breadcrumbs.styles.js';\n\n/** One crumb in a data-driven breadcrumb trail. */\nexport interface Cre8BreadcrumbData {\n text: string;\n /** Omit on the final crumb — the page you are on is not a link. */\n href?: string;\n}\n\n/**\n * The breadcrumbs component is a secondary navigation pattern that helps a user understand where the user is located.\n * The breadcrumbs component shows the users their current location relative to the information architecture\n * It enables the users to quickly move up to a parent level or previous location.\n *\n * ## How to Use\n *\n * - Import 'Breadcrumbs' component.\n * - Add the pages in the path of the breadcrumbs using `cre8-breadcrumbs-item`.\n * All the pages in the breadcrumbs component should be interactive.\n * - All the page should link to their respective pages (except the current page) using `cre8-link`.\n * - The current page is included in the breadcrumbs trail.\n * - The current page is always the last text listed and is not an interactive link.\n *\n * @slot - The component content\n */\n\n\nexport class Cre8Breadcrumbs extends Cre8Element {\n static styles = [styles];\n\n /**\n * aria-label attribute to designate at name for the nav. Can be override by user\n */\n @property()\n navAriaLabel: string = 'breadcrumbs';\n /**\n * Crumbs for a data-driven trail. Each becomes a `cre8-breadcrumbs-item`,\n * wrapping a `cre8-text-link` when it has an `href`.\n */\n @property({ type: Array })\n items?: Cre8BreadcrumbData[];\n\n /** The composition the data property stands for. */\n private buildComposition(): ChildSpec[] | null {\n if (!this.items) return null;\n return this.items.map((item) => ({\n tag: 'cre8-breadcrumbs-item',\n children: item.href\n ? [{ tag: 'cre8-text-link', props: { href: item.href }, text: item.text }]\n : undefined,\n text: item.href ? undefined : item.text,\n }));\n }\n\n protected updated(changed: Map<string, unknown>): void {\n if (['items'].some((key) => changed.has(key))) {\n syncLightChildren(this, this.buildComposition());\n }\n }\n\n\n render() {\n const componentClassNames = this.componentClassNames('cre8-c-breadcrumbs', {});\n\n return html`\n <nav aria-label=\"${this.navAriaLabel}\" class=\"${componentClassNames}\">\n <ol class=\"cre8-c-breadcrumbs__list\">\n <slot></slot>\n </ol>\n </nav>\n `;\n }\n}\n\nif (customElements.get('cre8-breadcrumbs') === undefined) {\n customElements.define('cre8-breadcrumbs', Cre8Breadcrumbs);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'cre8-breadcrumbs': Cre8Breadcrumbs;\n }\n}\n\nexport default Cre8Breadcrumbs;\n"]}
@@ -72,9 +72,9 @@ export interface Cre8ChartEventDetail {
72
72
  * ></cre8-chart>
73
73
  * ```
74
74
  *
75
- * @fires cre8-chart-click - Fired when a chart element is clicked
76
- * @fires cre8-chart-hover - Fired when hovering over chart elements
77
- * @fires cre8-chart-ready - Fired when the chart is initialized
75
+ * @fires chart-click - Fired when a chart element is clicked
76
+ * @fires chart-hover - Fired when hovering over chart elements
77
+ * @fires chart-ready - Fired when the chart is initialized
78
78
  */
79
79
  export declare class Cre8Chart extends Cre8Element {
80
80
  static styles: import("lit").CSSResult[];
@@ -34,9 +34,9 @@ Chart.register(...registerables);
34
34
  * ></cre8-chart>
35
35
  * ```
36
36
  *
37
- * @fires cre8-chart-click - Fired when a chart element is clicked
38
- * @fires cre8-chart-hover - Fired when hovering over chart elements
39
- * @fires cre8-chart-ready - Fired when the chart is initialized
37
+ * @fires chart-click - Fired when a chart element is clicked
38
+ * @fires chart-hover - Fired when hovering over chart elements
39
+ * @fires chart-ready - Fired when the chart is initialized
40
40
  */
41
41
  export class Cre8Chart extends Cre8Element {
42
42
  constructor() {
@@ -181,7 +181,7 @@ export class Cre8Chart extends Cre8Element {
181
181
  const config = this._buildChartConfig();
182
182
  this._chartInstance = new Chart(ctx, config);
183
183
  this.dispatch({
184
- eventName: 'cre8-chart-ready',
184
+ eventName: 'chart-ready',
185
185
  detailObj: { chart: this._chartInstance },
186
186
  });
187
187
  }
@@ -411,7 +411,7 @@ export class Cre8Chart extends Cre8Element {
411
411
  label,
412
412
  };
413
413
  // @ts-expect-error: `dispatch` is not defined on `Cre8Element`
414
- this.dispatch({ eventName: 'cre8-chart-click', detailObj: detail });
414
+ this.dispatch({ eventName: 'chart-click', detailObj: detail });
415
415
  }
416
416
  }
417
417
  /**
@@ -438,7 +438,7 @@ export class Cre8Chart extends Cre8Element {
438
438
  label,
439
439
  };
440
440
  // @ts-expect-error: `dispatch` is not defined on `Cre8Element`
441
- this.dispatch({ eventName: 'cre8-chart-hover', detailObj: detail });
441
+ this.dispatch({ eventName: 'chart-hover', detailObj: detail });
442
442
  }
443
443
  }
444
444
  /**