@tmorrow/cre8-wc 2.0.6 → 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.
- package/a2ui/catalog +5 -5
- package/a2ui/catalog-kg.json +156 -20
- package/a2ui/catalog.json +394 -35
- package/a2ui/catalog.svg +2445 -2445
- package/a2ui/examples/compound-families.json +298 -0
- package/a2ui/examples/llm-observability.json +678 -650
- package/a2ui/generate-catalog.mjs +116 -3
- package/a2ui/inert-props.json +32 -0
- package/a2ui/render-audit.mjs +294 -0
- package/a2ui/renderer.d.ts +2 -1
- package/a2ui/renderer.js +1 -1
- package/a2ui/renderer.ts +1 -1
- package/a2ui/smoke-test.mjs +3 -3
- package/a2ui/stream/diff-test.mjs +299 -0
- package/a2ui/stream/diff.d.ts +28 -0
- package/a2ui/stream/diff.js +130 -0
- package/a2ui/stream/diff.ts +145 -0
- package/a2ui/stream/index.d.ts +11 -0
- package/a2ui/stream/index.js +11 -0
- package/a2ui/stream/index.ts +43 -0
- package/a2ui/stream/model.d.ts +66 -0
- package/a2ui/stream/model.js +429 -0
- package/a2ui/stream/model.ts +472 -0
- package/a2ui/stream/pointer.d.ts +34 -0
- package/a2ui/stream/pointer.js +146 -0
- package/a2ui/stream/pointer.ts +147 -0
- package/a2ui/stream/renderer.d.ts +51 -0
- package/a2ui/stream/renderer.js +282 -0
- package/a2ui/stream/renderer.ts +291 -0
- package/a2ui/stream/stream-test.mjs +592 -0
- package/a2ui/stream/types.d.ts +173 -0
- package/a2ui/stream/types.js +17 -0
- package/a2ui/stream/types.ts +127 -0
- package/cdn/cre8-wc.esm.js +3528 -3227
- package/cdn/cre8-wc.esm.js.map +1 -1
- package/cdn/cre8-wc.min.js +290 -290
- package/cdn/cre8-wc.min.js.map +1 -1
- package/dist/assets/{Changelog-Documentation-BguNswiM.js → Changelog-Documentation-CeOetLxK.js} +1 -1
- package/dist/assets/{Code-Guidelines-BM3dZyzL.js → Code-Guidelines-BjdezAjj.js} +1 -1
- package/dist/assets/{Color-6AOWCN3U-C4AEGNk3.js → Color-6AOWCN3U-DPFGZitI.js} +1 -1
- package/dist/assets/{Contributing-Guidelines-DZURVehh.js → Contributing-Guidelines-B1M2V1hW.js} +1 -1
- package/dist/assets/{DocsRenderer-JROSPFPF-DeZmCI9u.js → DocsRenderer-JROSPFPF-BBy8KWNl.js} +1 -1
- package/dist/assets/{Tokens-Documentation-ZecGbtQg.js → Tokens-Documentation-CdTxFDLe.js} +1 -1
- package/dist/assets/{WithTooltip-7X4HQR7L-2Hfrkir-.js → WithTooltip-7X4HQR7L-DZzTNMQ7.js} +1 -1
- package/dist/assets/{accordion-item.stories-D-MjrX5G.js → accordion-item.stories-Bl26JlHp.js} +1 -9
- package/dist/assets/{accordion.stories-icgNa1dl.js → accordion.stories-DjoLApQw.js} +3 -11
- package/dist/assets/{alert.stories-BzDaXtj-.js → alert.stories-pO1y3YCQ.js} +15 -31
- package/dist/assets/{badge-C5wOWgyg.js → badge-BTxW3bN2.js} +3 -11
- package/dist/assets/{badge.stories-5GfB4jVI.js → badge.stories-vqh63RJ2.js} +1 -1
- package/dist/assets/{band.stories-DhXaP_kL.js → band.stories-CjKRppSb.js} +1 -9
- package/dist/assets/{blocks-DhUVut8Z.js → blocks-1be_-L6v.js} +5 -5
- package/dist/assets/{breadcrumbs.stories-CrPUBVk1.js → breadcrumbs.stories-Doyfy3V9.js} +2 -18
- package/dist/assets/{button-CJL8yzAT.js → button-CgaWukz0.js} +1 -9
- package/dist/assets/{button-group-BgwgtSFC.js → button-group-G7qN4MwM.js} +1 -9
- package/dist/assets/{button-group.stories-W-07gO63.js → button-group.stories-cL3Kay6M.js} +1 -1
- package/dist/assets/{button.stories-BPzJ-sCv.js → button.stories-C9HSpxWb.js} +6 -6
- package/dist/assets/{card.stories-mlFGY2Xn.js → card.stories-BbU8YymD.js} +3 -11
- package/dist/assets/{chart.stories-C8yuHHeK.js → chart.stories-BL4FxIA_.js} +1 -1
- package/dist/assets/{checkbox-field-item-iHcdmTNw.js → checkbox-field-item-DIMHcWM0.js} +1 -9
- package/dist/assets/{checkbox-field-item.stories-D1aVLDXn.js → checkbox-field-item.stories-XbB4x_lO.js} +1 -1
- package/dist/assets/{checkbox-field.stories-BoVB2jCx.js → checkbox-field.stories-YnqFUI4K.js} +2 -10
- package/dist/assets/{cre8-element-DfmMtHJO.js → cre8-element-B35i4Lyg.js} +1 -1
- package/dist/assets/{cre8-form-element-bQpK8UYN.js → cre8-form-element-Cfc5VeYV.js} +1 -1
- package/dist/assets/{danger-button.stories-Cb4ljnhQ.js → danger-button.stories-xh25hmfd.js} +1 -9
- package/dist/assets/{date-picker.stories-Cje3qk8D.js → date-picker.stories-DD_ctzEF.js} +1 -49
- package/dist/assets/{divider-B_PXBGWD.js → divider-xZ2KARHf.js} +2 -10
- package/dist/assets/{divider.stories-CtfeBqVV.js → divider.stories-Bk9oF-OV.js} +1 -1
- package/dist/assets/{dropdown-Cgwne34I.js → dropdown-BEP5x3CW.js} +6 -22
- package/dist/assets/{dropdown-item.stories-pXkDLRuv.js → dropdown-item.stories-Iaw_UrEP.js} +1 -1
- package/dist/assets/{dropdown.stories-DZnmHieY.js → dropdown.stories-B0OlKD7h.js} +1 -1
- package/dist/assets/{example-drug-card.stories-DTzLXTFx.js → example-drug-card.stories-Bp5JIeE_.js} +1 -1
- package/dist/assets/{f-po-C2WpbOFJ.js → f-po-BdPzDRD-.js} +1 -1
- package/dist/assets/{feature.stories-DffXdJch.js → feature.stories-DYE1Js70.js} +1 -9
- package/dist/assets/{field-DzYRqQb2.js → field-BpUYyRW1.js} +1 -9
- package/dist/assets/{field-note-DKXZiXLU.js → field-note-fccBckVl.js} +3 -11
- package/dist/assets/{field-note.stories-DS_0bQul.js → field-note.stories-BH9AZMbF.js} +1 -1
- package/dist/assets/{field.stories-BvXn0oG6.js → field.stories-BQPtmziK.js} +1 -1
- package/dist/assets/{footer.stories-C3ZibisU.js → footer.stories-DCWEciqD.js} +1 -9
- package/dist/assets/{form-example.stories-C-TuOeF2.js → form-example.stories-9IDC0AgX.js} +1 -1
- package/dist/assets/{formatter-L2YTDE3Q-CJVnxOUW.js → formatter-L2YTDE3Q-B9u1AOWn.js} +1 -1
- package/dist/assets/{global-nav-item-xQL7wVjY.js → global-nav-item-T4htN-yO.js} +6 -14
- package/dist/assets/{global-nav-item.stories-Dp9TE3aR.js → global-nav-item.stories-2dWRfCXv.js} +1 -1
- package/dist/assets/{global-nav.stories-B5Nk8JZ0.js → global-nav.stories-Fh1gScqg.js} +2 -10
- package/dist/assets/{grid-DYgnZBsd.js → grid-C5CKMXNe.js} +3 -19
- package/dist/assets/{grid.stories-BFiXTq2C.js → grid.stories-BLmCNdeA.js} +1 -1
- package/dist/assets/{header.stories-D1f7xhjV.js → header.stories-BkDrjJtj.js} +1 -9
- package/dist/assets/{heading-485Jz7JZ.js → heading-Dbka33DK.js} +2 -10
- package/dist/assets/{heading.stories-gPF_SmTc.js → heading.stories-Be40_bmG.js} +1 -1
- package/dist/assets/{hero.stories-BHlFNdvF.js → hero.stories-vRu7PZG9.js} +1 -9
- package/dist/assets/{icon-DeTLDzTS.js → icon-ChfRWXWy.js} +2 -10
- package/dist/assets/{icon-description-o-YaiEjK.js → icon-description-BBSwDykJ.js} +1 -1
- package/dist/assets/{icon-description.stories-BdPRvEwe.js → icon-description.stories-Cg6ekOme.js} +1 -1
- package/dist/assets/{icon.stories-BxWpqxT5.js → icon.stories-Cj4U7L5G.js} +1 -1
- package/dist/assets/if-defined-Bxnzk64Q.js +1 -0
- package/dist/assets/{iframe-dHvya7sk.js → iframe-BNJP6ovU.js} +35 -35
- package/dist/assets/{inline-alert.stories-FH0bQ0jh.js → inline-alert.stories-CygBYI02.js} +1 -9
- package/dist/assets/{layout-container.stories-D6Z6Kx78.js → layout-container.stories-TMyIJteJ.js} +2 -10
- package/dist/assets/{layout.stories-CNYuwC_r.js → layout.stories-ylRM-ANL.js} +7 -23
- package/dist/assets/{linelength-container.stories-pCRXZvxS.js → linelength-container.stories-Br2v8jXE.js} +1 -9
- package/dist/assets/{link-BpCiLxNW.js → link-CRE0Eqdo.js} +1 -9
- package/dist/assets/{link-list.stories-12vsAa1P.js → link-list.stories--y-urrVo.js} +7 -23
- package/dist/assets/{link.stories-DAoQtY4_.js → link.stories-C3WQOgkY.js} +2 -2
- package/dist/assets/{list.stories-D0N3yBIf.js → list.stories-Bd2bxkxn.js} +7 -23
- package/dist/assets/{loading-spinner-g6iJajXH.js → loading-spinner-C52KNq6y.js} +4 -12
- package/dist/assets/{loading-spinner.stories-B6_mgPxB.js → loading-spinner.stories-DPRGEeHT.js} +1 -1
- package/dist/assets/{logo.stories-BvMwN2qg.js → logo.stories-2LBqqraT.js} +1 -9
- package/dist/assets/{main.stories-pL4zefbs.js → main.stories-BQzD7iWD.js} +2 -10
- package/dist/assets/{medication-card.stories-DK1XGJic.js → medication-card.stories-Wc-hA0-s.js} +5 -5
- package/dist/assets/{medication-form.stories-Bj5dLp5S.js → medication-form.stories-DfFOCDaU.js} +1 -1
- package/dist/assets/{modal-CO0M4e_8.js → modal-CCfbY4fF.js} +1 -9
- package/dist/assets/{modal-BNu8xy08.js → modal-GglWRNJp.js} +1 -1
- package/dist/assets/{modal.stories-CHYBrq_E.js → modal.stories-CpybCs79.js} +1 -1
- package/dist/assets/{multi-select.stories-C9XXsWio.js → multi-select.stories-BhzEKRui.js} +1 -9
- package/dist/assets/{nav-container.stories-DU9fhvDu.js → nav-container.stories-Be1YlegP.js} +3 -11
- package/dist/assets/{page-header.stories-BrstKiEY.js → page-header.stories-BOVLQ0YF.js} +1 -9
- package/dist/assets/{pagination.stories-Bw2M2iOn.js → pagination.stories-D62sa_1K.js} +9 -25
- package/dist/assets/{percent-bar.stories-UQRXYUqd.js → percent-bar.stories-CYi4El7T.js} +1 -9
- package/dist/assets/{popover.stories-ZkwrRFpR.js → popover.stories-B9O8F4yv.js} +1 -9
- package/dist/assets/{primary-nav.stories-wqOKwgQn.js → primary-nav.stories-Bt-o7h45.js} +1 -17
- package/dist/assets/{progress-meter-TzASasu0.js → progress-meter-Dit59091.js} +1 -9
- package/dist/assets/{progress-meter.stories-qfJALZf8.js → progress-meter.stories-CYnOCmjo.js} +1 -1
- package/dist/assets/{progress-steps-item-KvW1d_7L.js → progress-steps-item-CWJsad0s.js} +1 -9
- package/dist/assets/{progress-steps-item.stories-uOn6tJ1W.js → progress-steps-item.stories-ePn_6bPn.js} +1 -1
- package/dist/assets/{progress-steps.stories-CKFPx8D0.js → progress-steps.stories-CblrEcXF.js} +1 -9
- package/dist/assets/{radio-field-item-CTaR50XR.js → radio-field-item-Bm-0RWPe.js} +5 -21
- package/dist/assets/{radio-field-item.stories-DQSLj8W1.js → radio-field-item.stories-y_TrTRIW.js} +1 -1
- package/dist/assets/{radio-field.stories-Btmc_Iep.js → radio-field.stories-CSWrbUrn.js} +1 -1
- package/dist/assets/{remove-tag-BSEZ7VT8.js → remove-tag-lCr57c5r.js} +1 -9
- package/dist/assets/{remove-tag.stories-diRKi7Ua.js → remove-tag.stories-CDfwCdvZ.js} +1 -1
- package/dist/assets/{request-prescription.stories-DQvra7ia.js → request-prescription.stories-O4zqokfb.js} +1 -1
- package/dist/assets/{sample-modal.stories-deE1EBfZ.js → sample-modal.stories-BZ4N2R2Z.js} +1 -1
- package/dist/assets/{section.stories-DF4mcy2O.js → section.stories-D_1InThX.js} +1 -9
- package/dist/assets/{select-tile-D-C8oSrm.js → select-tile-BqqB3ZtE.js} +2 -10
- package/dist/assets/{select-tile-list.stories-vsBQUIcl.js → select-tile-list.stories-Di4ILgV8.js} +1 -9
- package/dist/assets/{select-tile.stories-CqHzN5fc.js → select-tile.stories-D3h_6zlV.js} +6 -6
- package/dist/assets/{select.stories-8aOGxTtr.js → select.stories-BB2phP9A.js} +1 -9
- package/dist/assets/{skeleton-loader.stories-CwR2-aC5.js → skeleton-loader.stories-y4uml_kV.js} +5 -13
- package/dist/assets/{split-button.stories-CyfdrK4u.js → split-button.stories-C_82I4ME.js} +2 -10
- package/dist/assets/{spread-BPiNgQQF.js → spread-CnPic3C2.js} +1 -1
- package/dist/assets/state-DkQhleoO.js +1 -0
- package/dist/assets/{submenu.stories-CDhNzZzh.js → submenu.stories-UDtaREr1.js} +2 -18
- package/dist/assets/{syntaxhighlighter-T5IQBZDB-BzI6WxUR.js → syntaxhighlighter-T5IQBZDB-D-I_s_yD.js} +1 -1
- package/dist/assets/{table-header-CfcchoYz.js → table-header-2837i43H.js} +3 -51
- package/dist/assets/{table-object.stories-Bd5qdfMU.js → table-object.stories-D4KoI-wA.js} +1 -9
- package/dist/assets/{table.stories-DxuBe9dJ.js → table.stories-DUJDibEp.js} +1 -1
- package/dist/assets/{tabs.stories-Cpc3OHJx.js → tabs.stories-C06SngOF.js} +5 -29
- package/dist/assets/{tag-list.stories-BmyCmrTF.js → tag-list.stories-Du-IoYzu.js} +2 -10
- package/dist/assets/{tag-vQFuZneb.js → tag-oHGdclJl.js} +1 -9
- package/dist/assets/{tag.stories-DGzrNUbb.js → tag.stories-C5D5IbuK.js} +1 -1
- package/dist/assets/{tertiary-nav.stories-D4q5K-am.js → tertiary-nav.stories-B1GU8Zi4.js} +3 -19
- package/dist/assets/{text-link-4qLRIeJB.js → text-link-B3m3KEqY.js} +1 -9
- package/dist/assets/{text-link.stories-D6BRm2I5.js → text-link.stories-4O6qn82H.js} +1 -1
- package/dist/assets/{text-passage-DGaI5i2I.js → text-passage-xQVosjOr.js} +3 -19
- package/dist/assets/{text-passage.stories-DkmXVUhH.js → text-passage.stories-Da1nspwG.js} +1 -1
- package/dist/assets/{tooltip.stories-B7ADDq7o.js → tooltip.stories-DLKyyeKn.js} +6 -14
- package/dist/assets/{utility-nav.stories-ffXVvyLp.js → utility-nav.stories-B6xBFe7z.js} +5 -21
- package/dist/design-tokens/brands/cre8/css/tokens_brand.css +1 -1
- package/dist/design-tokens/core/scss/theming/component.css +1 -1
- package/dist/design-tokens/core/scss/theming/variables.css +1 -7
- package/dist/design-tokens/core/scss/theming/variables.scss +0 -11
- package/dist/icons/cre8-icons.svg +1 -1
- package/dist/iframe.html +1 -24
- package/dist/index.html +25 -77
- package/dist/project.json +1 -1
- package/lib/a2ui/renderer.d.ts +2 -1
- package/lib/a2ui/renderer.d.ts.map +1 -1
- package/lib/a2ui/renderer.js +1 -1
- package/lib/a2ui/renderer.js.map +1 -1
- package/lib/a2ui/stream/diff.d.ts +29 -0
- package/lib/a2ui/stream/diff.d.ts.map +1 -0
- package/lib/a2ui/stream/diff.js +131 -0
- package/lib/a2ui/stream/diff.js.map +1 -0
- package/lib/a2ui/stream/index.d.ts +12 -0
- package/lib/a2ui/stream/index.d.ts.map +1 -0
- package/lib/a2ui/stream/index.js +12 -0
- package/lib/a2ui/stream/index.js.map +1 -0
- package/lib/a2ui/stream/model.d.ts +67 -0
- package/lib/a2ui/stream/model.d.ts.map +1 -0
- package/lib/a2ui/stream/model.js +423 -0
- package/lib/a2ui/stream/model.js.map +1 -0
- package/lib/a2ui/stream/pointer.d.ts +35 -0
- package/lib/a2ui/stream/pointer.d.ts.map +1 -0
- package/lib/a2ui/stream/pointer.js +147 -0
- package/lib/a2ui/stream/pointer.js.map +1 -0
- package/lib/a2ui/stream/renderer.d.ts +52 -0
- package/lib/a2ui/stream/renderer.d.ts.map +1 -0
- package/lib/a2ui/stream/renderer.js +279 -0
- package/lib/a2ui/stream/renderer.js.map +1 -0
- package/lib/a2ui/stream/types.d.ts +174 -0
- package/lib/a2ui/stream/types.d.ts.map +1 -0
- package/lib/a2ui/stream/types.js +18 -0
- package/lib/a2ui/stream/types.js.map +1 -0
- package/lib/components/accordion/accordion.d.ts +15 -0
- package/lib/components/accordion/accordion.d.ts.map +1 -1
- package/lib/components/accordion/accordion.js +23 -0
- package/lib/components/accordion/accordion.js.map +1 -1
- package/lib/components/badge/badge.d.ts +5 -18
- package/lib/components/badge/badge.d.ts.map +1 -1
- package/lib/components/badge/badge.js +0 -15
- package/lib/components/badge/badge.js.map +1 -1
- package/lib/components/breadcrumbs/breadcrumbs.d.ts +14 -0
- package/lib/components/breadcrumbs/breadcrumbs.d.ts.map +1 -1
- package/lib/components/breadcrumbs/breadcrumbs.js +21 -0
- package/lib/components/breadcrumbs/breadcrumbs.js.map +1 -1
- package/lib/components/chart/chart.d.ts +3 -3
- package/lib/components/chart/chart.js +6 -6
- package/lib/components/chart/chart.js.map +1 -1
- package/lib/components/checkbox-field/checkbox-field.d.ts +19 -0
- package/lib/components/checkbox-field/checkbox-field.d.ts.map +1 -1
- package/lib/components/checkbox-field/checkbox-field.js +28 -0
- package/lib/components/checkbox-field/checkbox-field.js.map +1 -1
- package/lib/components/cre8-element.d.ts +19 -0
- package/lib/components/cre8-element.d.ts.map +1 -1
- package/lib/components/cre8-element.js +51 -2
- package/lib/components/cre8-element.js.map +1 -1
- package/lib/components/divider/divider.d.ts +1 -1
- package/lib/components/divider/divider.d.ts.map +1 -1
- package/lib/components/divider/divider.js.map +1 -1
- package/lib/components/dropdown/dropdown.d.ts +13 -0
- package/lib/components/dropdown/dropdown.d.ts.map +1 -1
- package/lib/components/dropdown/dropdown.js +19 -0
- package/lib/components/dropdown/dropdown.js.map +1 -1
- package/lib/components/dropdown-item/dropdown-item.d.ts +1 -1
- package/lib/components/dropdown-item/dropdown-item.js +2 -2
- package/lib/components/dropdown-item/dropdown-item.js.map +1 -1
- package/lib/components/heading/heading.d.ts +3 -5
- package/lib/components/heading/heading.d.ts.map +1 -1
- package/lib/components/heading/heading.js +2 -4
- package/lib/components/heading/heading.js.map +1 -1
- package/lib/components/icon/icon.d.ts +4 -4
- package/lib/components/icon/icon.js +6 -6
- package/lib/components/icon/icon.js.map +1 -1
- package/lib/components/link-list/link-list.d.ts +19 -0
- package/lib/components/link-list/link-list.d.ts.map +1 -1
- package/lib/components/link-list/link-list.js +19 -0
- package/lib/components/link-list/link-list.js.map +1 -1
- package/lib/components/list/list.d.ts +13 -0
- package/lib/components/list/list.d.ts.map +1 -1
- package/lib/components/list/list.js +15 -0
- package/lib/components/list/list.js.map +1 -1
- package/lib/components/modal/modal.d.ts +2 -2
- package/lib/components/modal/modal.js +2 -2
- package/lib/components/modal/modal.js.map +1 -1
- package/lib/components/multi-select/multi-select.d.ts +2 -2
- package/lib/components/multi-select/multi-select.js +5 -5
- package/lib/components/multi-select/multi-select.js.map +1 -1
- package/lib/components/pagination/pagination.d.ts +1 -1
- package/lib/components/pagination/pagination.js +2 -2
- package/lib/components/pagination/pagination.js.map +1 -1
- package/lib/components/percent-bar/percent-bar.d.ts +2 -0
- package/lib/components/percent-bar/percent-bar.d.ts.map +1 -1
- package/lib/components/percent-bar/percent-bar.js +3 -1
- package/lib/components/percent-bar/percent-bar.js.map +1 -1
- package/lib/components/popover/popover.d.ts +6 -7
- package/lib/components/popover/popover.d.ts.map +1 -1
- package/lib/components/popover/popover.js +4 -4
- package/lib/components/popover/popover.js.map +1 -1
- package/lib/components/progress-meter/progress-meter.d.ts +0 -8
- package/lib/components/progress-meter/progress-meter.d.ts.map +1 -1
- package/lib/components/progress-meter/progress-meter.js +0 -7
- package/lib/components/progress-meter/progress-meter.js.map +1 -1
- package/lib/components/progress-steps/progress-steps.d.ts +16 -0
- package/lib/components/progress-steps/progress-steps.d.ts.map +1 -1
- package/lib/components/progress-steps/progress-steps.js +25 -0
- package/lib/components/progress-steps/progress-steps.js.map +1 -1
- package/lib/components/progress-steps-item/progress-steps-item.d.ts +1 -3
- package/lib/components/progress-steps-item/progress-steps-item.d.ts.map +1 -1
- package/lib/components/progress-steps-item/progress-steps-item.js +0 -1
- package/lib/components/progress-steps-item/progress-steps-item.js.map +1 -1
- package/lib/components/radio-field/radio-field.d.ts +33 -0
- package/lib/components/radio-field/radio-field.d.ts.map +1 -1
- package/lib/components/radio-field/radio-field.js +62 -0
- package/lib/components/radio-field/radio-field.js.map +1 -1
- package/lib/components/remove-tag/remove-tag.d.ts +1 -1
- package/lib/components/remove-tag/remove-tag.js +3 -3
- package/lib/components/remove-tag/remove-tag.js.map +1 -1
- package/lib/components/split-button/split-button.d.ts +3 -0
- package/lib/components/split-button/split-button.d.ts.map +1 -1
- package/lib/components/split-button/split-button.js +5 -2
- package/lib/components/split-button/split-button.js.map +1 -1
- package/lib/components/tab/tab.d.ts +1 -1
- package/lib/components/tab/tab.js +3 -3
- package/lib/components/tab/tab.js.map +1 -1
- package/lib/components/table/table.d.ts +36 -0
- package/lib/components/table/table.d.ts.map +1 -1
- package/lib/components/table/table.js +55 -0
- package/lib/components/table/table.js.map +1 -1
- package/lib/components/tabs/tabs.d.ts +20 -3
- package/lib/components/tabs/tabs.d.ts.map +1 -1
- package/lib/components/tabs/tabs.js +33 -5
- package/lib/components/tabs/tabs.js.map +1 -1
- package/lib/components/tag-list/tag-list.d.ts +17 -0
- package/lib/components/tag-list/tag-list.d.ts.map +1 -1
- package/lib/components/tag-list/tag-list.js +25 -0
- package/lib/components/tag-list/tag-list.js.map +1 -1
- package/lib/components/tooltip/tooltip.d.ts +2 -2
- package/lib/components/tooltip/tooltip.js +4 -4
- package/lib/components/tooltip/tooltip.js.map +1 -1
- package/lib/components/utils/light-children.d.ts +40 -0
- package/lib/components/utils/light-children.d.ts.map +1 -0
- package/lib/components/utils/light-children.js +100 -0
- package/lib/components/utils/light-children.js.map +1 -0
- package/lib/design-tokens/brands/cre8/css/tokens_brand.css +1 -1
- package/lib/directives/if-truthy.d.ts +1 -1
- package/lib/icons/cre8-icons.svg +1 -1
- package/lib/light-children-TlEXev5S.js +39 -0
- package/lib/scripts/generate-react-wrappers.d.ts +8 -1
- package/lib/scripts/generate-react-wrappers.d.ts.map +1 -1
- package/lib/scripts/generate-react-wrappers.js +45 -1
- package/lib/scripts/generate-react-wrappers.js.map +1 -1
- package/mcp-manifest.json +163 -53
- package/package.json +11 -4
- package/react-manifest.json +154 -48
- package/dist/assets/if-defined-HKKhGupN.js +0 -1
- package/dist/assets/iframe-CWwoGI65.css +0 -1
- package/dist/assets/state-CfuknrX8.js +0 -1
- package/dist/fonts/PlusJakartaSans-Bold.woff2 +0 -0
- package/dist/fonts/PlusJakartaSans-Medium.woff2 +0 -0
- package/dist/fonts/PlusJakartaSans-Regular.woff2 +0 -0
- package/dist/fonts/PlusJakartaSans-SemiBold.woff2 +0 -0
- package/dist/logo.svg +0 -1
- package/dist/sb-addons/storybook-4/manager-bundle.js +0 -8
- /package/dist/icons/{express-scripts copy.svg → pharmacy copy.svg} +0 -0
- /package/dist/icons/{express-scripts.svg → pharmacy.svg} +0 -0
- /package/lib/icons/{express-scripts copy.svg → pharmacy copy.svg} +0 -0
- /package/lib/icons/{express-scripts.svg → pharmacy.svg} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-react-wrappers.js","sourceRoot":"","sources":["../../scripts/generate-react-wrappers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAoD7B;;GAEG;AACH,SAAS,SAAS,CAAC,QAAgC;IACjD,IAAI,QAAQ,CAAC,IAAI;QAAE,OAAO,QAAQ,CAAC,IAAI,CAAC;IACxC,IAAI,CAAC,QAAQ,CAAC,OAAO;QAAE,OAAO,EAAE,CAAC;IAEjC,MAAM,IAAI,GAAU,EAAE,CAAC;IACvB,KAAK,MAAM,GAAG,IAAI,QAAQ,CAAC,OAAO,EAAE,CAAC;QACnC,IAAI,CAAC,GAAG,CAAC,YAAY;YAAE,SAAS;QAChC,KAAK,MAAM,IAAI,IAAI,GAAG,CAAC,YAAY,EAAE,CAAC;YACpC,IAAI,IAAI,CAAC,IAAI,KAAK,OAAO,IAAI,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,aAAa,EAAE,CAAC;gBAChE,IAAI,CAAC,IAAI,CAAC;oBACR,IAAI,EAAE,IAAI,CAAC,OAAO;oBAClB,IAAI,EAAE,IAAI,GAAG,GAAG,CAAC,IAAI;oBACrB,WAAW,EAAE,IAAI,CAAC,WAAW;oBAC7B,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,GA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C,GAAG,IAAI,CAC5C,CAAC;IAEF,yBAAyB;IACzB,MAAM,QAAQ,GAAG;QACf,eAAe,EAAE;YACf,MAAM,EAAE,QAAQ;YAChB,MAAM,EAAE,QAAQ;YAChB,gBAAgB,EAAE,SAAS;YAC3B,WAAW,EAAE,IAAI;YACjB,cAAc,EAAE,IAAI;YACpB,MAAM,EAAE,MAAM;YACd,OAAO,EAAE,GAAG;YACZ,MAAM,EAAE,IAAI;YACZ,eAAe,EAAE,IAAI;YACrB,YAAY,EAAE,IAAI;YAClB,GAAG,EAAE,WAAW;YAChB,KAAK,EAAE;gBACL,kBAAkB,EAAE,CAAC,QAAQ,CAAC;gBAC9B,oBAAoB,EAAE,CAAC,MAAM,CAAC;aAC/B;SACF;QACD,OAAO,EAAE,CAAC,UAAU,EAAE,qBAAqB,CAAC;QAC5C,OAAO,EAAE,CAAC,MAAM,EAAE,cAAc,CAAC;KAClC,CAAC;IACF,EAAE,CAAC,aAAa,CACd,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,eAAe,CAAC,EACrC,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,IAAI,CACzC,CAAC;IAEF,OAAO,CAAC,GAAG,CAAC,eAAe,mBAAmB,CAAC,MAAM,sBAAsB,SAAS,EAAE,CAAC,CAAC;AAC1F,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC","sourcesContent":["import * as fs from 'fs';\nimport * as path from 'path';\n\ninterface Attribute {\n name: string;\n description?: string;\n type?: string;\n default?: string;\n}\n\ninterface Event {\n name: string;\n description?: string;\n}\n\ninterface Slot {\n name: string;\n description?: string;\n}\n\ninterface Tag {\n name: string;\n path: string;\n description?: string;\n attributes?: Attribute[];\n events?: Event[];\n slots?: Slot[];\n}\n\ninterface CustomElementsManifest {\n version?: string;\n schemaVersion?: string;\n tags?: Tag[];\n modules?: CemModule[];\n}\n\ninterface CemModule {\n kind: string;\n path: string;\n declarations?: CemDeclaration[];\n}\n\ninterface CemDeclaration {\n kind: string;\n name: string;\n tagName?: string;\n customElement?: boolean;\n description?: string;\n attributes?: Attribute[];\n events?: Event[];\n slots?: Slot[];\n}\n\n/**\n * Convert CEM v1 (modules/declarations) to the Tag[] format used by the generator.\n */\nfunction cemToTags(manifest: CustomElementsManifest): Tag[] {\n if (manifest.tags) return manifest.tags;\n if (!manifest.modules) return [];\n\n const tags: Tag[] = [];\n for (const mod of manifest.modules) {\n if (!mod.declarations) continue;\n for (const decl of mod.declarations) {\n if (decl.kind === 'class' && decl.tagName && decl.customElement) {\n tags.push({\n name: decl.tagName,\n path: './' + mod.path,\n description: decl.description,\n attributes: decl.attributes?.map(a => ({\n ...a,\n type: typeof a.type === 'object' && a.type !== null ? (a.type as any).text : a.type,\n })),\n events: decl.events,\n slots: decl.slots,\n });\n }\n }\n }\n return tags;\n}\n\nfunction toPascalCase(str: string): string {\n return str\n .split('-')\n .map((part) => part.charAt(0).toUpperCase() + part.slice(1))\n .join('');\n}\n\nfunction getReactPropType(type: string | undefined): string {\n if (!type) return 'any';\n\n // Handle truncated types (e.g., \"... 5 more ...\")\n if (type.includes('...') && type.includes('more')) {\n return 'string';\n }\n\n // Handle unknown/custom types that aren't standard\n const unknownTypes = [\n 'ChartTypeRegistry', 'CalendarModal', 'status', 'Color', 'Shape',\n 'Cre8SelectOption', 'Cre8SelectOptionGroup', 'Chart'\n ];\n for (const unknownType of unknownTypes) {\n if (type.includes(unknownType)) {\n return 'any';\n }\n }\n\n // Handle union types with only quoted strings\n if (type.includes('|')) {\n // Check if it's a valid union type (only strings, numbers, booleans, undefined, or quoted values)\n const parts = type.split('|').map(p => p.trim());\n const isValidUnion = parts.every(p =>\n p === 'undefined' ||\n p === 'string' ||\n p === 'number' ||\n p === 'boolean' ||\n p.startsWith('\"') ||\n p === 'string | undefined' ||\n p === 'number | undefined' ||\n p === 'boolean | undefined'\n );\n if (isValidUnion) {\n return type;\n }\n return 'any';\n }\n\n // Handle common types\n switch (type.toLowerCase()) {\n case 'string':\n return 'string';\n case 'number':\n return 'number';\n case 'boolean':\n case 'boolean | undefined':\n return 'boolean';\n default:\n // If it looks like a custom type (starts with capital letter), use any\n if (/^[A-Z]/.test(type)) {\n return 'any';\n }\n return type;\n }\n}\n\nfunction toValidEventName(eventName: string): string {\n // Convert dots and dashes to camelCase\n return eventName\n .split(/[.-]/)\n .map((part, index) =>\n index === 0 ? part : part.charAt(0).toUpperCase() + part.slice(1)\n )\n .join('');\n}\n\nfunction generateReactWrapper(tag: Tag): string {\n const componentName = toPascalCase(tag.name);\n const elementClassName = componentName;\n const tagName = tag.name;\n\n // Get the import path from the tag path\n const importPath = tag.path\n .replace('./components/', '')\n .replace('.ts', '');\n\n // Generate props interface\n const propsLines: string[] = [];\n\n if (tag.attributes) {\n for (const attr of tag.attributes) {\n const propName = attr.name.includes('-')\n ? attr.name.replace(/-([a-z])/g, (_, c) => c.toUpperCase())\n : attr.name;\n const propType = getReactPropType(attr.type);\n const description = attr.description ? ` /** ${attr.description.trim().replace(/\\n/g, ' ')} */\\n` : '';\n propsLines.push(`${description} ${propName}?: ${propType};`);\n }\n }\n\n // Add children prop for slots\n if (tag.slots && tag.slots.length > 0) {\n propsLines.push(' children?: React.ReactNode;');\n }\n\n // Generate event props\n const eventProps: string[] = [];\n if (tag.events) {\n for (const event of tag.events) {\n const validEventName = toValidEventName(event.name);\n const eventPropName = 'on' + validEventName.charAt(0).toUpperCase() + validEventName.slice(1);\n eventProps.push(` ${eventPropName}?: (event: CustomEvent) => void;`);\n }\n }\n\n const allProps = [...propsLines, ...eventProps].join('\\n');\n\n // Generate the component\n return `import { createComponent } from '@lit/react';\nimport { ${elementClassName} as ${elementClassName}Element } from '@tmorrow/cre8-wc/lib/components/${importPath}';\nimport React from 'react';\n\nexport interface ${componentName}Props {\n${allProps}\n}\n\n/**\n * ${tag.description?.trim().split('\\n')[0] || componentName + ' component'}\n */\nexport const ${componentName} = createComponent({\n react: React,\n tagName: '${tagName}',\n elementClass: ${elementClassName}Element,\n${tag.events && tag.events.length > 0 ? ` events: {\n${tag.events.map(e => {\n const validEventName = toValidEventName(e.name);\n const eventPropName = 'on' + validEventName.charAt(0).toUpperCase() + validEventName.slice(1);\n return ` ${eventPropName}: '${e.name}'`;\n }).join(',\\n')}\n }` : ''}\n});\n\nexport default ${componentName};\n`;\n}\n\nfunction generateIndexFile(tags: Tag[]): string {\n // Track which components are exported from which folder\n const folderExports = new Map<string, string[]>();\n\n for (const tag of tags) {\n if (!tag.name.startsWith('cre8-')) continue;\n\n const componentName = toPascalCase(tag.name);\n const importPath = tag.path\n .replace('./components/', '')\n .replace('.ts', '');\n const folderName = toPascalCase(importPath.split('/')[0]);\n\n if (!folderExports.has(folderName)) {\n folderExports.set(folderName, []);\n }\n folderExports.get(folderName)!.push(componentName);\n }\n\n const exports: string[] = [];\n for (const [folderName, components] of folderExports) {\n // Only export the main component (one matching folder name with Cre8 prefix)\n const expectedName = 'Cre8' + folderName;\n const mainComponent = components.find(c => c === expectedName) || components[0];\n exports.push(`export { ${mainComponent} } from './components/${folderName}';`);\n }\n\n return `// Auto-generated React wrappers\n${exports.join('\\n')}\n`;\n}\n\nasync function main() {\n const manifestPath = path.join(process.cwd(), 'custom-elements.json');\n const outputDir = path.join(process.cwd(), 'react-wrappers');\n\n // Read manifest\n const manifest: CustomElementsManifest = JSON.parse(\n fs.readFileSync(manifestPath, 'utf-8')\n );\n\n // Create output directory\n if (!fs.existsSync(outputDir)) {\n fs.mkdirSync(outputDir, { recursive: true });\n }\n\n const componentsDir = path.join(outputDir, 'components');\n if (!fs.existsSync(componentsDir)) {\n fs.mkdirSync(componentsDir, { recursive: true });\n }\n\n // Convert manifest to tags format\n const tags = cemToTags(manifest);\n\n // Generate wrapper for each tag\n const generatedComponents: string[] = [];\n\n for (const tag of tags) {\n if (!tag.name.startsWith('cre8-')) continue;\n\n const componentName = toPascalCase(tag.name);\n const folderName = tag.path\n .replace('./components/', '')\n .replace('.ts', '')\n .split('/')[0];\n\n const componentDir = path.join(componentsDir, toPascalCase(folderName));\n if (!fs.existsSync(componentDir)) {\n fs.mkdirSync(componentDir, { recursive: true });\n }\n\n const wrapperCode = generateReactWrapper(tag);\n const outputPath = path.join(componentDir, `${componentName}.tsx`);\n\n fs.writeFileSync(outputPath, wrapperCode);\n\n // Also create index.tsx\n fs.writeFileSync(\n path.join(componentDir, 'index.tsx'),\n `export * from './${componentName}';\\n`\n );\n\n generatedComponents.push(componentName);\n console.log(`Generated: ${componentName}`);\n }\n\n // Generate main index file\n const indexContent = generateIndexFile(tags);\n fs.writeFileSync(path.join(outputDir, 'index.ts'), indexContent);\n\n // Read parent package version for syncing\n const parentPkg = JSON.parse(fs.readFileSync(path.join(process.cwd(), 'package.json'), 'utf-8'));\n const version = parentPkg.version;\n\n // Generate package.json\n const packageJson = {\n name: '@tmorrow/cre8-react',\n version,\n description: 'React wrappers for cre8 Web Components (@tmorrow/cre8-wc)',\n license: parentPkg.license || 'MIT',\n type: 'module',\n main: 'dist/index.js',\n types: 'dist/index.d.ts',\n module: 'dist/index.js',\n exports: {\n '.': {\n import: './dist/index.js',\n types: './dist/index.d.ts',\n },\n './components/*': {\n import: './dist/components/*',\n types: './dist/components/*',\n },\n },\n files: ['dist'],\n repository: {\n type: 'git',\n url: 'https://github.com/tmorrowdev/Cre8-Components.git',\n directory: 'packages/cre8-wc/react-wrappers',\n },\n keywords: ['react', 'web-components', 'lit', 'cre8', 'design-system'],\n peerDependencies: {\n react: '>=18',\n 'react-dom': '>=18',\n },\n dependencies: {\n '@lit/react': parentPkg.dependencies?.['@lit/react'] || '^1.0.8',\n '@tmorrow/cre8-wc': `^${version}`,\n },\n };\n fs.writeFileSync(\n path.join(outputDir, 'package.json'),\n JSON.stringify(packageJson, null, 2) + '\\n'\n );\n\n // Generate tsconfig.json\n const tsconfig = {\n compilerOptions: {\n target: 'ES2021',\n module: 'ESNext',\n moduleResolution: 'bundler',\n declaration: true,\n declarationMap: true,\n outDir: 'dist',\n rootDir: '.',\n strict: true,\n esModuleInterop: true,\n skipLibCheck: true,\n jsx: 'react-jsx',\n paths: {\n '@tmorrow/cre8-wc': ['../lib'],\n '@tmorrow/cre8-wc/*': ['../*'],\n },\n },\n include: ['index.ts', 'components/**/*.tsx'],\n exclude: ['dist', 'node_modules'],\n };\n fs.writeFileSync(\n path.join(outputDir, 'tsconfig.json'),\n JSON.stringify(tsconfig, null, 2) + '\\n'\n );\n\n console.log(`\\nGenerated ${generatedComponents.length} React wrappers in ${outputDir}`);\n}\n\nmain().catch(console.error);\n"]}
|
|
1
|
+
{"version":3,"file":"generate-react-wrappers.js","sourceRoot":"","sources":["../../scripts/generate-react-wrappers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAoD7B;;GAEG;AACH,SAAS,SAAS,CAAC,QAAgC;IACjD,IAAI,QAAQ,CAAC,IAAI;QAAE,OAAO,QAAQ,CAAC,IAAI,CAAC;IACxC,IAAI,CAAC,QAAQ,CAAC,OAAO;QAAE,OAAO,EAAE,CAAC;IAEjC,MAAM,IAAI,GAAU,EAAE,CAAC;IACvB,KAAK,MAAM,GAAG,IAAI,QAAQ,CAAC,OAAO,EAAE,CAAC;QACnC,IAAI,CAAC,GAAG,CAAC,YAAY;YAAE,SAAS;QAChC,KAAK,MAAM,IAAI,IAAI,GAAG,CAAC,YAAY,EAAE,CAAC;YACpC,IAAI,IAAI,CAAC,IAAI,KAAK,OAAO,IAAI,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,aAAa,EAAE,CAAC;gBAChE,IAAI,CAAC,IAAI,CAAC;oBACR,IAAI,EAAE,IAAI,CAAC,OAAO;oBAClB,IAAI,EAAE,IAAI,GAAG,GAAG,CAAC,IAAI;oBACrB,WAAW,EAAE,IAAI,CAAC,WAAW;oBAC7B,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,GAA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AAC1F,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC","sourcesContent":["import * as fs from 'fs';\nimport * as path from 'path';\n\ninterface Attribute {\n name: string;\n description?: string;\n type?: string;\n default?: string;\n}\n\ninterface Event {\n name: string;\n description?: string;\n}\n\ninterface Slot {\n name: string;\n description?: string;\n}\n\ninterface Tag {\n name: string;\n path: string;\n description?: string;\n attributes?: Attribute[];\n events?: Event[];\n slots?: Slot[];\n}\n\ninterface CustomElementsManifest {\n version?: string;\n schemaVersion?: string;\n tags?: Tag[];\n modules?: CemModule[];\n}\n\ninterface CemModule {\n kind: string;\n path: string;\n declarations?: CemDeclaration[];\n}\n\ninterface CemDeclaration {\n kind: string;\n name: string;\n tagName?: string;\n customElement?: boolean;\n description?: string;\n attributes?: Attribute[];\n events?: Event[];\n slots?: Slot[];\n}\n\n/**\n * Convert CEM v1 (modules/declarations) to the Tag[] format used by the generator.\n */\nfunction cemToTags(manifest: CustomElementsManifest): Tag[] {\n if (manifest.tags) return manifest.tags;\n if (!manifest.modules) return [];\n\n const tags: Tag[] = [];\n for (const mod of manifest.modules) {\n if (!mod.declarations) continue;\n for (const decl of mod.declarations) {\n if (decl.kind === 'class' && decl.tagName && decl.customElement) {\n tags.push({\n name: decl.tagName,\n path: './' + mod.path,\n description: decl.description,\n attributes: decl.attributes?.map(a => ({\n ...a,\n type: typeof a.type === 'object' && a.type !== null ? (a.type as any).text : a.type,\n })),\n events: decl.events,\n slots: decl.slots,\n });\n }\n }\n }\n return tags;\n}\n\nfunction toPascalCase(str: string): string {\n return str\n .split('-')\n .map((part) => part.charAt(0).toUpperCase() + part.slice(1))\n .join('');\n}\n\n/**\n * Types the wrapper re-exports rather than flattening to `any`.\n *\n * The flattened compound APIs (`columns`, `rows`, `items`, `steps`, `tags`) are\n * the whole reason a React consumer would reach for them, and a prop typed\n * `any` gives no autocomplete and catches no mistakes — which for a data-driven\n * table is most of the value. These interfaces are exported from the component\n * module the element class already comes from, so importing them is free.\n */\nconst FLATTENED_DATA_TYPES = new Set([\n 'Cre8TableColumn', 'Cre8TableRowData', 'Cre8TabItemData', 'Cre8AccordionItemData',\n 'Cre8ListItemData', 'Cre8LinkData', 'Cre8BreadcrumbData', 'Cre8TagData',\n 'Cre8CheckboxItemData', 'Cre8RadioItemData', 'Cre8ProgressStepData', 'Cre8DropdownItemData',\n]);\n\n/**\n * The flattened data type a prop refers to, if any — `Cre8TagData[]` → `Cre8TagData`.\n *\n * The manifest writes an optional property's type as `Cre8TagData[] | undefined`,\n * so the `| undefined` has to come off before matching. Missing that is why the\n * first cut of this silently produced `any` for every one of them.\n */\nexport function flattenedTypeOf(type: string | undefined): string | null {\n if (!type) return null;\n const bare = type\n .split('|')\n .map((part) => part.trim())\n .find((part) => part !== 'undefined' && part !== 'null');\n const match = bare ? /^(Cre8[A-Za-z]+)\\[\\]$/.exec(bare) : null;\n return match && FLATTENED_DATA_TYPES.has(match[1]) ? match[1] : null;\n}\n\nfunction getReactPropType(type: string | undefined): string {\n if (!type) return 'any';\n\n // Keep the flattened data types intact; they are the point of the React layer.\n const flattened = flattenedTypeOf(type);\n if (flattened) return `${flattened}[]`;\n\n // Handle truncated types (e.g., \"... 5 more ...\")\n if (type.includes('...') && type.includes('more')) {\n return 'string';\n }\n\n // Handle unknown/custom types that aren't standard\n const unknownTypes = [\n 'ChartTypeRegistry', 'CalendarModal', 'status', 'Color', 'Shape',\n 'Cre8SelectOption', 'Cre8SelectOptionGroup', 'Chart'\n ];\n for (const unknownType of unknownTypes) {\n if (type.includes(unknownType)) {\n return 'any';\n }\n }\n\n // Handle union types with only quoted strings\n if (type.includes('|')) {\n // Check if it's a valid union type (only strings, numbers, booleans, undefined, or quoted values)\n const parts = type.split('|').map(p => p.trim());\n const isValidUnion = parts.every(p =>\n p === 'undefined' ||\n p === 'string' ||\n p === 'number' ||\n p === 'boolean' ||\n p.startsWith('\"') ||\n p === 'string | undefined' ||\n p === 'number | undefined' ||\n p === 'boolean | undefined'\n );\n if (isValidUnion) {\n return type;\n }\n return 'any';\n }\n\n // Handle common types\n switch (type.toLowerCase()) {\n case 'string':\n return 'string';\n case 'number':\n return 'number';\n case 'boolean':\n case 'boolean | undefined':\n return 'boolean';\n default:\n // If it looks like a custom type (starts with capital letter), use any\n if (/^[A-Z]/.test(type)) {\n return 'any';\n }\n return type;\n }\n}\n\nfunction toValidEventName(eventName: string): string {\n // Convert dots and dashes to camelCase\n return eventName\n .split(/[.-]/)\n .map((part, index) =>\n index === 0 ? part : part.charAt(0).toUpperCase() + part.slice(1)\n )\n .join('');\n}\n\nfunction generateReactWrapper(tag: Tag): string {\n const componentName = toPascalCase(tag.name);\n const elementClassName = componentName;\n const tagName = tag.name;\n\n // Get the import path from the tag path\n const importPath = tag.path\n .replace('./components/', '')\n .replace('.ts', '');\n\n // Generate props interface\n const propsLines: string[] = [];\n\n if (tag.attributes) {\n for (const attr of tag.attributes) {\n const propName = attr.name.includes('-')\n ? attr.name.replace(/-([a-z])/g, (_, c) => c.toUpperCase())\n : attr.name;\n const propType = getReactPropType(attr.type);\n const description = attr.description ? ` /** ${attr.description.trim().replace(/\\n/g, ' ')} */\\n` : '';\n propsLines.push(`${description} ${propName}?: ${propType};`);\n }\n }\n\n // Add children prop for slots\n if (tag.slots && tag.slots.length > 0) {\n propsLines.push(' children?: React.ReactNode;');\n }\n\n // Generate event props\n const eventProps: string[] = [];\n if (tag.events) {\n for (const event of tag.events) {\n const validEventName = toValidEventName(event.name);\n const eventPropName = 'on' + validEventName.charAt(0).toUpperCase() + validEventName.slice(1);\n eventProps.push(` ${eventPropName}?: (event: CustomEvent) => void;`);\n }\n }\n\n const allProps = [...propsLines, ...eventProps].join('\\n');\n\n const dataTypes = [\n ...new Set(\n (tag.attributes ?? [])\n .map((attr) => flattenedTypeOf(attr.type))\n .filter((name): name is string => Boolean(name))\n ),\n ];\n const dataTypeImport = dataTypes.length\n ? `\\nexport type { ${dataTypes.join(', ')} } from '@tmorrow/cre8-wc/lib/components/${importPath}';`\n : '';\n\n // Generate the component\n return `import { createComponent } from '@lit/react';\nimport { ${elementClassName} as ${elementClassName}Element } from '@tmorrow/cre8-wc/lib/components/${importPath}';\nimport type { ${dataTypes.join(', ')} } from '@tmorrow/cre8-wc/lib/components/${importPath}';\nimport React from 'react';${dataTypeImport}`.replace(\n dataTypes.length ? '' : `import type { } from '@tmorrow/cre8-wc/lib/components/${importPath}';\\n`,\n ''\n ) + `\n\nexport interface ${componentName}Props {\n${allProps}\n}\n\n/**\n * ${tag.description?.trim().split('\\n')[0] || componentName + ' component'}\n */\nexport const ${componentName} = createComponent({\n react: React,\n tagName: '${tagName}',\n elementClass: ${elementClassName}Element,\n${tag.events && tag.events.length > 0 ? ` events: {\n${tag.events.map(e => {\n const validEventName = toValidEventName(e.name);\n const eventPropName = 'on' + validEventName.charAt(0).toUpperCase() + validEventName.slice(1);\n return ` ${eventPropName}: '${e.name}'`;\n }).join(',\\n')}\n }` : ''}\n});\n\nexport default ${componentName};\n`;\n}\n\nfunction generateIndexFile(tags: Tag[]): string {\n // Track which components are exported from which folder\n const folderExports = new Map<string, string[]>();\n\n for (const tag of tags) {\n if (!tag.name.startsWith('cre8-')) continue;\n\n const componentName = toPascalCase(tag.name);\n const importPath = tag.path\n .replace('./components/', '')\n .replace('.ts', '');\n const folderName = toPascalCase(importPath.split('/')[0]);\n\n if (!folderExports.has(folderName)) {\n folderExports.set(folderName, []);\n }\n folderExports.get(folderName)!.push(componentName);\n }\n\n const exports: string[] = [];\n for (const [folderName, components] of folderExports) {\n // Only export the main component (one matching folder name with Cre8 prefix)\n const expectedName = 'Cre8' + folderName;\n const mainComponent = components.find(c => c === expectedName) || components[0];\n exports.push(`export { ${mainComponent} } from './components/${folderName}';`);\n }\n\n return `// Auto-generated React wrappers\n${exports.join('\\n')}\n`;\n}\n\nasync function main() {\n const manifestPath = path.join(process.cwd(), 'custom-elements.json');\n const outputDir = path.join(process.cwd(), 'react-wrappers');\n\n // Read manifest\n const manifest: CustomElementsManifest = JSON.parse(\n fs.readFileSync(manifestPath, 'utf-8')\n );\n\n // Create output directory\n if (!fs.existsSync(outputDir)) {\n fs.mkdirSync(outputDir, { recursive: true });\n }\n\n const componentsDir = path.join(outputDir, 'components');\n if (!fs.existsSync(componentsDir)) {\n fs.mkdirSync(componentsDir, { recursive: true });\n }\n\n // Convert manifest to tags format\n const tags = cemToTags(manifest);\n\n // Generate wrapper for each tag\n const generatedComponents: string[] = [];\n\n for (const tag of tags) {\n if (!tag.name.startsWith('cre8-')) continue;\n\n const componentName = toPascalCase(tag.name);\n const folderName = tag.path\n .replace('./components/', '')\n .replace('.ts', '')\n .split('/')[0];\n\n const componentDir = path.join(componentsDir, toPascalCase(folderName));\n if (!fs.existsSync(componentDir)) {\n fs.mkdirSync(componentDir, { recursive: true });\n }\n\n const wrapperCode = generateReactWrapper(tag);\n const outputPath = path.join(componentDir, `${componentName}.tsx`);\n\n fs.writeFileSync(outputPath, wrapperCode);\n\n // Also create index.tsx\n fs.writeFileSync(\n path.join(componentDir, 'index.tsx'),\n `export * from './${componentName}';\\n`\n );\n\n generatedComponents.push(componentName);\n console.log(`Generated: ${componentName}`);\n }\n\n // Generate main index file\n const indexContent = generateIndexFile(tags);\n fs.writeFileSync(path.join(outputDir, 'index.ts'), indexContent);\n\n // Read parent package version for syncing\n const parentPkg = JSON.parse(fs.readFileSync(path.join(process.cwd(), 'package.json'), 'utf-8'));\n const version = parentPkg.version;\n\n // Generate package.json\n const packageJson = {\n name: '@tmorrow/cre8-react',\n version,\n description: 'React wrappers for cre8 Web Components (@tmorrow/cre8-wc)',\n license: parentPkg.license || 'MIT',\n type: 'module',\n main: 'dist/index.js',\n types: 'dist/index.d.ts',\n module: 'dist/index.js',\n exports: {\n '.': {\n import: './dist/index.js',\n types: './dist/index.d.ts',\n },\n './components/*': {\n import: './dist/components/*',\n types: './dist/components/*',\n },\n },\n files: ['dist'],\n repository: {\n type: 'git',\n url: 'https://github.com/tmorrowdev/Cre8-Components.git',\n directory: 'packages/cre8-wc/react-wrappers',\n },\n keywords: ['react', 'web-components', 'lit', 'cre8', 'design-system'],\n peerDependencies: {\n react: '>=18',\n 'react-dom': '>=18',\n },\n dependencies: {\n '@lit/react': parentPkg.dependencies?.['@lit/react'] || '^1.0.8',\n '@tmorrow/cre8-wc': `^${version}`,\n },\n };\n fs.writeFileSync(\n path.join(outputDir, 'package.json'),\n JSON.stringify(packageJson, null, 2) + '\\n'\n );\n\n // Generate tsconfig.json\n const tsconfig = {\n compilerOptions: {\n target: 'ES2021',\n module: 'ESNext',\n moduleResolution: 'bundler',\n declaration: true,\n declarationMap: true,\n outDir: 'dist',\n rootDir: '.',\n strict: true,\n esModuleInterop: true,\n skipLibCheck: true,\n jsx: 'react-jsx',\n paths: {\n '@tmorrow/cre8-wc': ['../lib'],\n '@tmorrow/cre8-wc/*': ['../*'],\n },\n },\n include: ['index.ts', 'components/**/*.tsx'],\n exclude: ['dist', 'node_modules'],\n };\n fs.writeFileSync(\n path.join(outputDir, 'tsconfig.json'),\n JSON.stringify(tsconfig, null, 2) + '\\n'\n );\n\n console.log(`\\nGenerated ${generatedComponents.length} React wrappers in ${outputDir}`);\n}\n\nmain().catch(console.error);\n"]}
|
package/mcp-manifest.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.0.
|
|
2
|
+
"version": "2.0.8",
|
|
3
3
|
"library": "@tmorrow/cre8-wc",
|
|
4
4
|
"tagPrefix": "cre8",
|
|
5
5
|
"description": "cre8 Web Components is a library of presentational UI web components to be consumed by # web applications.",
|
|
@@ -387,11 +387,13 @@
|
|
|
387
387
|
}
|
|
388
388
|
},
|
|
389
389
|
"events": {
|
|
390
|
-
"text-click": {
|
|
391
|
-
"detail": {}
|
|
390
|
+
"split-button-text-click": {
|
|
391
|
+
"detail": {},
|
|
392
|
+
"description": "Fires when the main text button is clicked."
|
|
392
393
|
},
|
|
393
|
-
"dropdown-click": {
|
|
394
|
-
"detail": {}
|
|
394
|
+
"split-button-dropdown-click": {
|
|
395
|
+
"detail": {},
|
|
396
|
+
"description": "Fires when the dropdown toggle is clicked."
|
|
395
397
|
}
|
|
396
398
|
},
|
|
397
399
|
"cssProperties": {},
|
|
@@ -479,15 +481,15 @@
|
|
|
479
481
|
},
|
|
480
482
|
"slots": {},
|
|
481
483
|
"events": {
|
|
482
|
-
"
|
|
484
|
+
"chart-click": {
|
|
483
485
|
"detail": {},
|
|
484
486
|
"description": "Fired when a chart element is clicked"
|
|
485
487
|
},
|
|
486
|
-
"
|
|
488
|
+
"chart-hover": {
|
|
487
489
|
"detail": {},
|
|
488
490
|
"description": "Fired when hovering over chart elements"
|
|
489
491
|
},
|
|
490
|
-
"
|
|
492
|
+
"chart-ready": {
|
|
491
493
|
"detail": {},
|
|
492
494
|
"description": "Fired when the chart is initialized"
|
|
493
495
|
}
|
|
@@ -511,6 +513,10 @@
|
|
|
511
513
|
"padded"
|
|
512
514
|
],
|
|
513
515
|
"description": "Spacing variants\n<cre8-text-passage size=\"sm\">\n<ul>\n<li>**padded** applies more padding in between list items compared to the default</li>\n<li>**condensed** reduces padding in between list items compared to the default</li>\n</ul>\n</cre8-text-passage>"
|
|
516
|
+
},
|
|
517
|
+
"items": {
|
|
518
|
+
"type": "Cre8ListItemData[]",
|
|
519
|
+
"description": "Items for a data-driven list. Set this and the list builds its own\n`cre8-list-item` children in the light DOM — the same composition you would\nwrite by hand. Leave it unset to compose the list yourself."
|
|
514
520
|
}
|
|
515
521
|
},
|
|
516
522
|
"properties": {},
|
|
@@ -565,7 +571,7 @@
|
|
|
565
571
|
"properties": {},
|
|
566
572
|
"slots": {},
|
|
567
573
|
"events": {
|
|
568
|
-
"
|
|
574
|
+
"remove-tag-click": {
|
|
569
575
|
"detail": {},
|
|
570
576
|
"description": "Fires when the remove tag is clicked."
|
|
571
577
|
}
|
|
@@ -583,6 +589,14 @@
|
|
|
583
589
|
"category": "Data",
|
|
584
590
|
"description": "Table component.",
|
|
585
591
|
"attributes": {
|
|
592
|
+
"columns": {
|
|
593
|
+
"type": "Cre8TableColumn[]",
|
|
594
|
+
"description": "Columns for a data-driven table. Set this with `rows` and the table builds\nits own header, body, rows and cells — the same composition you would write\nby hand, generated into the light DOM, so nothing about styling or\nbehaviour changes.\n\nLeave both unset to compose the table yourself with `cre8-table-header`,\n`cre8-table-body` and friends. Do not do both on one table."
|
|
595
|
+
},
|
|
596
|
+
"rows": {
|
|
597
|
+
"type": "Cre8TableRowData[]",
|
|
598
|
+
"description": "Rows for a data-driven table. Each row is either an object keyed by the\ncolumns' `key`, or an array of values positioned to match `columns`."
|
|
599
|
+
},
|
|
586
600
|
"caption": {
|
|
587
601
|
"type": "string",
|
|
588
602
|
"description": "Specifies the caption/title of the table, visible to all users.\nIncreases accessibility of table."
|
|
@@ -855,6 +869,10 @@
|
|
|
855
869
|
"label": {
|
|
856
870
|
"type": "string",
|
|
857
871
|
"description": "Tag list legend label"
|
|
872
|
+
},
|
|
873
|
+
"tags": {
|
|
874
|
+
"type": "Cre8TagData[]",
|
|
875
|
+
"description": "Tags for a data-driven tag list. Set this and the list builds its own\n`cre8-tag` children in the light DOM. Leave it unset to compose them\nyourself."
|
|
858
876
|
}
|
|
859
877
|
},
|
|
860
878
|
"properties": {
|
|
@@ -876,7 +894,12 @@
|
|
|
876
894
|
"name": "cre8-accordion",
|
|
877
895
|
"category": "Disclosure",
|
|
878
896
|
"description": "The component is a vertically stacked list of headers that reveal or hide sections of related content on a page.\nThe header title gives the user a high level overview of the content allowing the user to decide\nwhich sections to expand for the information.\n\nAccordion contains Accordion Items as children. This component is the wrapper for grouping related accordion items.\n\nUsers can select different border types: default (no border), rectangle, rounded bottom, and rounded.",
|
|
879
|
-
"attributes": {
|
|
897
|
+
"attributes": {
|
|
898
|
+
"items": {
|
|
899
|
+
"type": "Cre8AccordionItemData[]",
|
|
900
|
+
"description": "Panels for a data-driven accordion. Each becomes a `cre8-accordion-item`\nwith its heading as a prop and its content in the default slot."
|
|
901
|
+
}
|
|
902
|
+
},
|
|
880
903
|
"properties": {
|
|
881
904
|
"borderType": {
|
|
882
905
|
"type": "string",
|
|
@@ -974,7 +997,12 @@
|
|
|
974
997
|
"name": "cre8-dropdown",
|
|
975
998
|
"category": "Disclosure",
|
|
976
999
|
"description": "The Dropdown menu itself is a container that can host multiple interactive items, commonly formatted as a list",
|
|
977
|
-
"attributes": {
|
|
1000
|
+
"attributes": {
|
|
1001
|
+
"items": {
|
|
1002
|
+
"type": "Cre8DropdownItemData[]",
|
|
1003
|
+
"description": "Items for a data-driven dropdown. Set this and the dropdown builds its own\n`cre8-dropdown-item` children in the light DOM."
|
|
1004
|
+
}
|
|
1005
|
+
},
|
|
978
1006
|
"properties": {
|
|
979
1007
|
"buttonText": {
|
|
980
1008
|
"type": "string",
|
|
@@ -1022,7 +1050,7 @@
|
|
|
1022
1050
|
}
|
|
1023
1051
|
},
|
|
1024
1052
|
"events": {
|
|
1025
|
-
"dropdown-item-
|
|
1053
|
+
"dropdown-item-select": {
|
|
1026
1054
|
"detail": {},
|
|
1027
1055
|
"description": "Fires when the item is clicked. `event.detail.originalEvent` holds the source `MouseEvent`."
|
|
1028
1056
|
}
|
|
@@ -1091,7 +1119,7 @@
|
|
|
1091
1119
|
}
|
|
1092
1120
|
},
|
|
1093
1121
|
"events": {
|
|
1094
|
-
"close
|
|
1122
|
+
"modal-close": {
|
|
1095
1123
|
"detail": {},
|
|
1096
1124
|
"description": "Fires when the modal is dismissed via the close button, overlay click, or Escape key."
|
|
1097
1125
|
}
|
|
@@ -1110,7 +1138,12 @@
|
|
|
1110
1138
|
},
|
|
1111
1139
|
"position": {
|
|
1112
1140
|
"type": "string",
|
|
1113
|
-
"
|
|
1141
|
+
"values": [
|
|
1142
|
+
"top",
|
|
1143
|
+
"left",
|
|
1144
|
+
"right"
|
|
1145
|
+
],
|
|
1146
|
+
"description": "Positions the popover panel absolutely to the trigger\n- Omitting this prop positions the popover panel below the trigger\n- **top** positions the popover panel above the trigger\n- **left** positions the popover panel to the left of the trigger\n- **right** positions the popover panel to the right of the trigger"
|
|
1114
1147
|
}
|
|
1115
1148
|
},
|
|
1116
1149
|
"properties": {
|
|
@@ -1162,11 +1195,11 @@
|
|
|
1162
1195
|
}
|
|
1163
1196
|
},
|
|
1164
1197
|
"events": {
|
|
1165
|
-
"open": {
|
|
1198
|
+
"popover-open": {
|
|
1166
1199
|
"detail": {},
|
|
1167
1200
|
"description": "Fires when the popover opens. `event.detail.isActive` is `true`."
|
|
1168
1201
|
},
|
|
1169
|
-
"close": {
|
|
1202
|
+
"popover-close": {
|
|
1170
1203
|
"detail": {},
|
|
1171
1204
|
"description": "Fires when the popover closes. `event.detail.isActive` is `false`."
|
|
1172
1205
|
}
|
|
@@ -1277,11 +1310,11 @@
|
|
|
1277
1310
|
}
|
|
1278
1311
|
},
|
|
1279
1312
|
"events": {
|
|
1280
|
-
"open": {
|
|
1313
|
+
"tooltip-open": {
|
|
1281
1314
|
"detail": {},
|
|
1282
1315
|
"description": "Fires when the tooltip is shown. `event.detail.isActive` is `true`."
|
|
1283
1316
|
},
|
|
1284
|
-
"close": {
|
|
1317
|
+
"tooltip-close": {
|
|
1285
1318
|
"detail": {},
|
|
1286
1319
|
"description": "Fires when the tooltip is hidden. `event.detail.isActive` is `false`."
|
|
1287
1320
|
}
|
|
@@ -1384,22 +1417,38 @@
|
|
|
1384
1417
|
},
|
|
1385
1418
|
"status": {
|
|
1386
1419
|
"type": "string",
|
|
1387
|
-
"
|
|
1420
|
+
"values": [
|
|
1421
|
+
"error",
|
|
1422
|
+
"info",
|
|
1423
|
+
"warning",
|
|
1424
|
+
"success",
|
|
1425
|
+
"attention"
|
|
1426
|
+
],
|
|
1427
|
+
"description": "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"
|
|
1388
1428
|
},
|
|
1389
1429
|
"variant": {
|
|
1390
1430
|
"type": "string",
|
|
1391
|
-
"
|
|
1431
|
+
"values": [
|
|
1432
|
+
"light",
|
|
1433
|
+
"white"
|
|
1434
|
+
],
|
|
1435
|
+
"description": "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"
|
|
1392
1436
|
},
|
|
1393
1437
|
"svg": {
|
|
1394
1438
|
"type": "string",
|
|
1395
|
-
"description": "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://
|
|
1439
|
+
"description": "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\nrepo for Cre8 icons, which includes a link to the storybook as well as relavant information for new icons"
|
|
1396
1440
|
}
|
|
1397
1441
|
},
|
|
1398
1442
|
"properties": {},
|
|
1399
1443
|
"slots": {},
|
|
1400
1444
|
"events": {},
|
|
1401
1445
|
"cssProperties": {},
|
|
1402
|
-
"examples": [
|
|
1446
|
+
"examples": [
|
|
1447
|
+
{
|
|
1448
|
+
"description": "Light badge",
|
|
1449
|
+
"html": "<cre8-badge variant=\"light\" text=\"Badge\"></cre8-badge>"
|
|
1450
|
+
}
|
|
1451
|
+
]
|
|
1403
1452
|
},
|
|
1404
1453
|
{
|
|
1405
1454
|
"name": "cre8-inline-alert",
|
|
@@ -1532,8 +1581,9 @@
|
|
|
1532
1581
|
},
|
|
1533
1582
|
"slots": {},
|
|
1534
1583
|
"events": {
|
|
1535
|
-
"
|
|
1536
|
-
"detail": {}
|
|
1584
|
+
"percent-bar-left-action-click": {
|
|
1585
|
+
"detail": {},
|
|
1586
|
+
"description": "Fires when the left action button is clicked."
|
|
1537
1587
|
}
|
|
1538
1588
|
},
|
|
1539
1589
|
"cssProperties": {},
|
|
@@ -1545,7 +1595,12 @@
|
|
|
1545
1595
|
"description": "A progress meter provides feedback that the system is working and gives\nthe user an indication of how much time they will wait.\nThis indicator should be used when the system response time is longer and determinable.",
|
|
1546
1596
|
"attributes": {
|
|
1547
1597
|
"status": {
|
|
1548
|
-
"type": "
|
|
1598
|
+
"type": "string",
|
|
1599
|
+
"values": [
|
|
1600
|
+
"error",
|
|
1601
|
+
"warning",
|
|
1602
|
+
"success"
|
|
1603
|
+
],
|
|
1549
1604
|
"description": "Progress Status\n- **Default** renders a meter with default status fill\n- **Error** renders a meter with an error status fill\n- **Warning** renders a meter with a warning status\n- **Success** renders a meter with a success status fill"
|
|
1550
1605
|
},
|
|
1551
1606
|
"knockout": {
|
|
@@ -1586,6 +1641,17 @@
|
|
|
1586
1641
|
"category": "Feedback",
|
|
1587
1642
|
"description": "The Progress Steps Item component is used to display a single step in a multi-step process.\nIt should be used as a child component of `cre8-progress-steps`.\nThese Components serve a contextual purpose and don't provide any functionality.",
|
|
1588
1643
|
"attributes": {
|
|
1644
|
+
"state": {
|
|
1645
|
+
"type": "string",
|
|
1646
|
+
"values": [
|
|
1647
|
+
"error",
|
|
1648
|
+
"warning",
|
|
1649
|
+
"complete",
|
|
1650
|
+
"current",
|
|
1651
|
+
"incomplete"
|
|
1652
|
+
],
|
|
1653
|
+
"description": "The state of the step."
|
|
1654
|
+
},
|
|
1589
1655
|
"message": {
|
|
1590
1656
|
"type": "string",
|
|
1591
1657
|
"description": "Optional message to display under the step name."
|
|
@@ -1594,10 +1660,6 @@
|
|
|
1594
1660
|
"type": "string",
|
|
1595
1661
|
"description": "The name of the step."
|
|
1596
1662
|
},
|
|
1597
|
-
"state": {
|
|
1598
|
-
"type": "string",
|
|
1599
|
-
"description": "The state of the step: 'complete', 'current', 'error',' incomplete', 'warning';"
|
|
1600
|
-
},
|
|
1601
1663
|
"svg": {
|
|
1602
1664
|
"type": "string",
|
|
1603
1665
|
"description": "An SVG string to use as the step icon."
|
|
@@ -1656,6 +1718,14 @@
|
|
|
1656
1718
|
"label": {
|
|
1657
1719
|
"type": "string",
|
|
1658
1720
|
"description": "Checkbox container legend label"
|
|
1721
|
+
},
|
|
1722
|
+
"items": {
|
|
1723
|
+
"type": "Cre8CheckboxItemData[]",
|
|
1724
|
+
"description": "Checkboxes for a data-driven field. Each becomes a\n`cre8-checkbox-field-item`, sharing the field's `name` so they submit as a\ngroup."
|
|
1725
|
+
},
|
|
1726
|
+
"name": {
|
|
1727
|
+
"type": "string",
|
|
1728
|
+
"description": "Form control name shared by every generated item."
|
|
1659
1729
|
}
|
|
1660
1730
|
},
|
|
1661
1731
|
"properties": {
|
|
@@ -2075,7 +2145,7 @@
|
|
|
2075
2145
|
{
|
|
2076
2146
|
"name": "cre8-multi-select",
|
|
2077
2147
|
"category": "Forms",
|
|
2078
|
-
"description": "Multiselect is used when multiple options can be chosen from a static dropdown\nThis component has a list of items in the dropdown that can be added as \"selected tags\"\nThe checkbox will always reflect the selected nature of the item and is not removed\nfrom the dropdown when clicked, the tags will be added and removed based on their state.\n\nEvent `
|
|
2148
|
+
"description": "Multiselect is used when multiple options can be chosen from a static dropdown\nThis component has a list of items in the dropdown that can be added as \"selected tags\"\nThe checkbox will always reflect the selected nature of the item and is not removed\nfrom the dropdown when clicked, the tags will be added and removed based on their state.\n\nEvent `multi-select-change` emits whenever a tag is added or remove from the list and the\ncurrent list after the change is given in the detail.",
|
|
2079
2149
|
"attributes": {
|
|
2080
2150
|
"items": {
|
|
2081
2151
|
"type": "string[]",
|
|
@@ -2141,7 +2211,7 @@
|
|
|
2141
2211
|
}
|
|
2142
2212
|
},
|
|
2143
2213
|
"events": {
|
|
2144
|
-
"
|
|
2214
|
+
"multi-select-change": {
|
|
2145
2215
|
"detail": {},
|
|
2146
2216
|
"description": "Fires when a tag is added or removed. `event.detail.selectedItems` is the current selection."
|
|
2147
2217
|
}
|
|
@@ -2157,6 +2227,14 @@
|
|
|
2157
2227
|
"label": {
|
|
2158
2228
|
"type": "string",
|
|
2159
2229
|
"description": "Radio field legend label"
|
|
2230
|
+
},
|
|
2231
|
+
"items": {
|
|
2232
|
+
"type": "Cre8RadioItemData[]",
|
|
2233
|
+
"description": "Options for a data-driven radio field. Each becomes a\n`cre8-radio-field-item` sharing the field's `name`, which is what the form\nsubmits under. Exclusivity is enforced by the field itself — see\n`enforceSingleSelection`, and do not assume `name` alone does it."
|
|
2234
|
+
},
|
|
2235
|
+
"name": {
|
|
2236
|
+
"type": "string",
|
|
2237
|
+
"description": "Form control name shared by every generated option."
|
|
2160
2238
|
}
|
|
2161
2239
|
},
|
|
2162
2240
|
"properties": {
|
|
@@ -2633,6 +2711,10 @@
|
|
|
2633
2711
|
},
|
|
2634
2712
|
"status": {
|
|
2635
2713
|
"type": "string",
|
|
2714
|
+
"values": [
|
|
2715
|
+
"brand",
|
|
2716
|
+
"knockout"
|
|
2717
|
+
],
|
|
2636
2718
|
"description": "Status (a color variant prop)\n- By default, the divider has gray color.\n- **brand**, the divider has blue color.\n- **knockout**, the divider has white color."
|
|
2637
2719
|
}
|
|
2638
2720
|
},
|
|
@@ -2995,7 +3077,12 @@
|
|
|
2995
3077
|
"name": "cre8-breadcrumbs",
|
|
2996
3078
|
"category": "Navigation",
|
|
2997
3079
|
"description": "The breadcrumbs component is a secondary navigation pattern that helps a user understand where the user is located.\nThe breadcrumbs component shows the users their current location relative to the information architecture\nIt 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`.\nAll 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.",
|
|
2998
|
-
"attributes": {
|
|
3080
|
+
"attributes": {
|
|
3081
|
+
"items": {
|
|
3082
|
+
"type": "Cre8BreadcrumbData[]",
|
|
3083
|
+
"description": "Crumbs for a data-driven trail. Each becomes a `cre8-breadcrumbs-item`,\nwrapping a `cre8-text-link` when it has an `href`."
|
|
3084
|
+
}
|
|
3085
|
+
},
|
|
2999
3086
|
"properties": {
|
|
3000
3087
|
"navAriaLabel": {
|
|
3001
3088
|
"type": "string",
|
|
@@ -3276,6 +3363,10 @@
|
|
|
3276
3363
|
"display"
|
|
3277
3364
|
],
|
|
3278
3365
|
"description": "Style variants\n- **secondary** renders a link list with a more subtle visual treatment\n- **display** renders a link list with a display treatment (e.g. article title)"
|
|
3366
|
+
},
|
|
3367
|
+
"items": {
|
|
3368
|
+
"type": "Cre8LinkData[]",
|
|
3369
|
+
"description": "Links for a data-driven list. Each becomes a `cre8-link-list-item`.\n\nWorth knowing if you compose these by hand: the label goes in the item's\ndefault slot, *not* its `text` prop. That prop is declared and documented\nbut never rendered, so setting it produces an empty link that passes every\ncheck — see the drift ledger in `docs/kb/07-research.md`. This API routes\naround it."
|
|
3279
3370
|
}
|
|
3280
3371
|
},
|
|
3281
3372
|
"properties": {},
|
|
@@ -3403,7 +3494,7 @@
|
|
|
3403
3494
|
}
|
|
3404
3495
|
},
|
|
3405
3496
|
"events": {
|
|
3406
|
-
"pagination
|
|
3497
|
+
"pagination-change": {
|
|
3407
3498
|
"detail": {},
|
|
3408
3499
|
"description": "Fires when the page changes. `event.detail` is `{ buttonName, value }` where `value` is the new current page."
|
|
3409
3500
|
}
|
|
@@ -3532,7 +3623,7 @@
|
|
|
3532
3623
|
}
|
|
3533
3624
|
},
|
|
3534
3625
|
"events": {
|
|
3535
|
-
"
|
|
3626
|
+
"tab-select": {
|
|
3536
3627
|
"detail": {},
|
|
3537
3628
|
"description": "Fires when the tab is clicked. `event.detail.index` is the tab's index."
|
|
3538
3629
|
}
|
|
@@ -3577,6 +3668,10 @@
|
|
|
3577
3668
|
"size": {
|
|
3578
3669
|
"type": "\"sm\"",
|
|
3579
3670
|
"description": "Tab sizes\n- **default** displays the cre8-tab text with cre8-typography-label-default\n- **sm** displays the cre8-tab text with cre8-typography-label-small"
|
|
3671
|
+
},
|
|
3672
|
+
"items": {
|
|
3673
|
+
"type": "Cre8TabItemData[]",
|
|
3674
|
+
"description": "Tabs for a data-driven tab set. Each entry becomes a `cre8-tab` in the\ndefault slot *and* a `cre8-tab-panel` in the `panel` slot, with matching\nindices — two slots kept in step, which is the part that goes wrong when\nthese are written by hand."
|
|
3580
3675
|
}
|
|
3581
3676
|
},
|
|
3582
3677
|
"properties": {
|
|
@@ -3636,8 +3731,9 @@
|
|
|
3636
3731
|
}
|
|
3637
3732
|
},
|
|
3638
3733
|
"events": {
|
|
3639
|
-
"
|
|
3640
|
-
"detail": {}
|
|
3734
|
+
"tab-change": {
|
|
3735
|
+
"detail": {},
|
|
3736
|
+
"description": "Fires when the active tab changes. `event.detail` is `{ value, activeTabIndex }`."
|
|
3641
3737
|
}
|
|
3642
3738
|
},
|
|
3643
3739
|
"cssProperties": {},
|
|
@@ -3766,7 +3862,12 @@
|
|
|
3766
3862
|
"name": "cre8-progress-steps",
|
|
3767
3863
|
"category": "Other",
|
|
3768
3864
|
"description": "The Progress Steps component is used to display where a user is in a multistep process.\nIt clearly indicates the total number of steps, which steps are complete and incomplete,\nand which step you’re currently on. They help users estimate how long a task will take and can be\nused to track status on orders.\n\nThe Progress Steps component should be used as a parent component for `cre8-progress-steps-item` components.\nThese Components serve a contextual purpose and don't provide any functionality.\n\n# How to Use\n\nProgress Steps is used when there is ample horizontal space and two to six steps. It displays each step by name\nand number to help users understand exactly where they are in a process. It is the preferred option for desktop.\nProgress Steps should change to Compact Steps on mobile web to conserve space.\n\nProgress Steps can also be used to track order status. It provides a quick visual of how an order is progressing\nwith options to alert users of any problems along the way. When used for order status, Progress Steps should\nchange to Vertical Steps on mobile web to conserve space while allowing alerts and messages to remain visible.",
|
|
3769
|
-
"attributes": {
|
|
3865
|
+
"attributes": {
|
|
3866
|
+
"steps": {
|
|
3867
|
+
"type": "Cre8ProgressStepData[]",
|
|
3868
|
+
"description": "Steps for a data-driven progress indicator. Note that the visible label is\neach item's `name` prop rather than its content — `cre8-progress-steps-item`\ndoes not render children, which is easy to get wrong by hand."
|
|
3869
|
+
}
|
|
3870
|
+
},
|
|
3770
3871
|
"properties": {},
|
|
3771
3872
|
"slots": {
|
|
3772
3873
|
"default": {
|
|
@@ -3784,7 +3885,7 @@
|
|
|
3784
3885
|
"attributes": {
|
|
3785
3886
|
"type": {
|
|
3786
3887
|
"type": "\"display-default\" | \"display-small\" | \"headline-large\" | \"headline-default\" | \"headline-small\" | \"title-xlarge\" | \"title-large\" | \"title-default\" | \"title-small\" | \"label-large\" | ... 5 more ...",
|
|
3787
|
-
"description": "Heading type\n<cre8-text-passage size=\"small\">\n<ul>\n<li>**display-default** renders a heading with the heading display-default preset treatment</li>\n<li>**display-small** renders a heading with the heading display-small preset treatment</li>\n<li>**headline-large** renders a heading with the heading headline-large preset treatment</li>\n<li>**headline-default** renders a heading with the heading headline-default preset treatment</li>\n<li>**headline-small** renders a heading with the heading headline-small preset treatment</li>\n<li>**title-xlarge** renders a heading with the heading title-xlarge preset treatment</li>\n<li>**title-large** renders a heading with the heading title-large preset treatment</li>\n<li>**title-default** renders a heading with the heading title-default preset treatment</li>\n<li>**title-small** renders a heading with the heading title-small preset treatment</li>\n<li>**label-large** renders a heading with the label-large preset treatment</li>\n<li>**label** renders a heading with the label preset treatment</li>\n<li>**label-small** renders a heading with the label-small preset treatment</li>\n<li>**meta-large** renders a heading with the meta-large preset treatment</li>\n<li>**meta-default** renders a heading with the meta-default preset treatment</li>\n<li>**meta-small** renders a heading with the meta-small preset treatment</li>\n</ul>\n</cre8-text-passage>"
|
|
3888
|
+
"description": "Heading type\n<cre8-text-passage size=\"small\">\n<ul>\n<li>**display-default** renders a heading with the heading display-default preset treatment</li>\n<li>**display-small** renders a heading with the heading display-small preset treatment</li>\n<li>**headline-large** renders a heading with the heading headline-large preset treatment</li>\n<li>**headline-default** renders a heading with the heading headline-default preset treatment</li>\n<li>**headline-small** renders a heading with the heading headline-small preset treatment</li>\n<li>**title-xlarge** renders a heading with the heading title-xlarge preset treatment</li>\n<li>**title-large** renders a heading with the heading title-large preset treatment</li>\n<li>**title-default** renders a heading with the heading title-default preset treatment</li>\n<li>**title-small** renders a heading with the heading title-small preset treatment</li>\n<li>**label-large** renders a heading with the label-large preset treatment</li>\n<li>**label-default** renders a heading with the label-default preset treatment</li>\n<li>**label-small** renders a heading with the label-small preset treatment</li>\n<li>**meta-large** renders a heading with the meta-large preset treatment</li>\n<li>**meta-default** renders a heading with the meta-default preset treatment</li>\n<li>**meta-small** renders a heading with the meta-small preset treatment</li>\n</ul>\n</cre8-text-passage>"
|
|
3788
3889
|
},
|
|
3789
3890
|
"inverted": {
|
|
3790
3891
|
"type": "boolean",
|
|
@@ -3794,8 +3895,16 @@
|
|
|
3794
3895
|
"properties": {
|
|
3795
3896
|
"tagVariant": {
|
|
3796
3897
|
"type": "string",
|
|
3898
|
+
"values": [
|
|
3899
|
+
"h1",
|
|
3900
|
+
"h2",
|
|
3901
|
+
"h3",
|
|
3902
|
+
"h4",
|
|
3903
|
+
"h5",
|
|
3904
|
+
"h6"
|
|
3905
|
+
],
|
|
3797
3906
|
"default": "h5",
|
|
3798
|
-
"description": "Dynamic tag name for the component\n1) This is needed to use proper semantic heading treatments depending on where the banner lives on the page\n<cre8-text-passage size=\"small\">\n<ul>\n<li>**h1** renders an `h1` tag</li>\n<li>**h2** renders an `h2` tag
|
|
3907
|
+
"description": "Dynamic tag name for the component\n1) This is needed to use proper semantic heading treatments depending on where the banner lives on the page\n<cre8-text-passage size=\"small\">\n<ul>\n<li>**h1** renders an `h1` tag</li>\n<li>**h2** renders an `h2` tag</li>\n<li>**h3** renders an `h3` tag</li>\n<li>**h4** renders an `h4` tag</li>\n<li>**h5** renders an `h5` tag. This is the default</li>\n<li>**h6** renders an `h6` tag</li>\n</ul>\n</cre8-text-passage>"
|
|
3799
3908
|
},
|
|
3800
3909
|
"brandColor": {
|
|
3801
3910
|
"type": "boolean",
|
|
@@ -3925,13 +4034,13 @@
|
|
|
3925
4034
|
"type": "boolean",
|
|
3926
4035
|
"description": "Required state"
|
|
3927
4036
|
},
|
|
3928
|
-
"
|
|
4037
|
+
"isError": {
|
|
3929
4038
|
"type": "boolean",
|
|
3930
|
-
"description": "Error state indicator"
|
|
4039
|
+
"description": "Error state indicator. Lit lowercases property names to derive attribute names, so the attribute is isError/iserror — is-error does not bind."
|
|
3931
4040
|
},
|
|
3932
|
-
"
|
|
4041
|
+
"isSuccess": {
|
|
3933
4042
|
"type": "boolean",
|
|
3934
|
-
"description": "Success state indicator"
|
|
4043
|
+
"description": "Success state indicator. Attribute is isSuccess/issuccess, not is-success."
|
|
3935
4044
|
}
|
|
3936
4045
|
},
|
|
3937
4046
|
"properties": {
|
|
@@ -3951,25 +4060,26 @@
|
|
|
3951
4060
|
"checkValidity()",
|
|
3952
4061
|
"reportValidity()",
|
|
3953
4062
|
"setCustomValidity(message)"
|
|
3954
|
-
]
|
|
4063
|
+
],
|
|
4064
|
+
"constraintValidation": "setValidity() is only ever called from setCustomValidity(). required, pattern, min, max and type=\"email\" are stored as props but never mapped into the validity state, so they do not block submission on their own — an empty required field still submits. Enforce constraints with setCustomValidity() or in the form's submit handler."
|
|
3955
4065
|
}
|
|
3956
4066
|
}
|
|
3957
4067
|
],
|
|
3958
4068
|
"patterns": [
|
|
3959
4069
|
{
|
|
3960
4070
|
"name": "Login Form",
|
|
3961
|
-
"description": "Standard login form with email and password",
|
|
3962
|
-
"template": "<cre8-card>\n
|
|
4071
|
+
"description": "Standard login form with email and password. Three things make it submit rather than merely look right: a real <form> wrapper (cre8 form components participate via ElementInternals, which is inert outside one), type=\"submit\" on the button (cre8-button defaults to type=\"button\"), and a name on every field (setFormValue contributes nothing to FormData without one). Note that required does not block submission on its own — cre8 form elements never map constraint attributes into setValidity, so enforce it with setCustomValidity() or a submit handler.",
|
|
4072
|
+
"template": "<form>\n <cre8-card>\n <cre8-heading tagVariant=\"h2\" type=\"headline-default\">Sign In</cre8-heading>\n <cre8-field label=\"Email\" name=\"email\" type=\"email\" autocomplete=\"email\" required></cre8-field>\n <cre8-field label=\"Password\" name=\"password\" type=\"password\" autocomplete=\"current-password\" required></cre8-field>\n <cre8-button text=\"Sign In\" variant=\"primary\" fullWidth type=\"submit\"></cre8-button>\n </cre8-card>\n</form>"
|
|
3963
4073
|
},
|
|
3964
4074
|
{
|
|
3965
4075
|
"name": "Data Table",
|
|
3966
4076
|
"description": "Table with header and data rows",
|
|
3967
|
-
"template": "<cre8-table variant=\"striped\"
|
|
4077
|
+
"template": "<cre8-table variant=\"striped\" isHoverable>\n <cre8-table-header>\n <cre8-table-row>\n <cre8-table-header-cell>Name</cre8-table-header-cell>\n <cre8-table-header-cell>Status</cre8-table-header-cell>\n </cre8-table-row>\n </cre8-table-header>\n <cre8-table-body>\n <cre8-table-row>\n <cre8-table-cell>Item 1</cre8-table-cell>\n <cre8-table-cell><cre8-badge text=\"Active\" status=\"success\"></cre8-badge></cre8-table-cell>\n </cre8-table-row>\n </cre8-table-body>\n</cre8-table>"
|
|
3968
4078
|
},
|
|
3969
4079
|
{
|
|
3970
4080
|
"name": "Page Layout",
|
|
3971
|
-
"description": "Standard page with header, main content, and footer",
|
|
3972
|
-
"template": "<cre8-layout>\n <cre8-header>\n <cre8-
|
|
4081
|
+
"description": "Standard page with header, main content, and footer. cre8-global-nav and cre8-footer expose no logo or copyright slot; content addressed to a slot that does not exist is never assigned and renders nowhere, so both go in the default slot.",
|
|
4082
|
+
"template": "<cre8-layout>\n <cre8-header>\n <cre8-logo></cre8-logo>\n <cre8-global-nav>\n <cre8-global-nav-item href=\"/\">Home</cre8-global-nav-item>\n </cre8-global-nav>\n </cre8-header>\n <cre8-main>\n <cre8-layout-container>\n <!-- Page content -->\n </cre8-layout-container>\n </cre8-main>\n <cre8-footer>\n <span>2024 Company Name</span>\n </cre8-footer>\n</cre8-layout>"
|
|
3973
4083
|
},
|
|
3974
4084
|
{
|
|
3975
4085
|
"name": "Alert Banner",
|
|
@@ -3978,13 +4088,13 @@
|
|
|
3978
4088
|
},
|
|
3979
4089
|
{
|
|
3980
4090
|
"name": "Tabbed Content",
|
|
3981
|
-
"description": "Content organized in tabs",
|
|
3982
|
-
"template": "<cre8-tabs>\n <cre8-tab
|
|
4091
|
+
"description": "Content organized in tabs. cre8-tab has no label, tab-id or selected prop: the label is slotted text content, and cre8-tabs pairs each tab with the panel at the same position and assigns index/isActive itself. Set activeIndex on cre8-tabs to choose the initial tab (defaults to 0).",
|
|
4092
|
+
"template": "<cre8-tabs>\n <cre8-tab>Tab 1</cre8-tab>\n <cre8-tab>Tab 2</cre8-tab>\n <cre8-tab-panel slot=\"panel\">Content for Tab 1</cre8-tab-panel>\n <cre8-tab-panel slot=\"panel\">Content for Tab 2</cre8-tab-panel>\n</cre8-tabs>"
|
|
3983
4093
|
},
|
|
3984
4094
|
{
|
|
3985
4095
|
"name": "Modal Dialog",
|
|
3986
|
-
"description": "Modal with header, body, and footer actions",
|
|
3987
|
-
"template": "<cre8-modal
|
|
4096
|
+
"description": "Modal with header, body, and footer actions. These buttons are deliberately type=\"button\": they are not in a form, so they do nothing until the app attaches click handlers. Wire both before shipping. If the modal instead collects input, wrap the body and footer in a <form> and give Confirm type=\"submit\" — see the Login Form pattern. Use ariaLabel, not aria-label: the modal renders its inner role=\"dialog\" label from the ariaLabel property, and a host aria-label attribute leaves that dialog unlabelled.",
|
|
4097
|
+
"template": "<cre8-modal isActive ariaLabel=\"Confirmation\">\n <span slot=\"header\">Confirm Action</span>\n <p>Are you sure you want to proceed?</p>\n <div slot=\"footer\">\n <!-- Both require a click handler; type=\"button\" is correct only because there is no form. -->\n <cre8-button text=\"Cancel\" variant=\"secondary\" type=\"button\"></cre8-button>\n <cre8-button text=\"Confirm\" variant=\"primary\" type=\"button\"></cre8-button>\n </div>\n</cre8-modal>"
|
|
3988
4098
|
}
|
|
3989
4099
|
],
|
|
3990
4100
|
"designTokens": {
|