From 99191a435753e2eb0e8750979da28b7971e69334 Mon Sep 17 00:00:00 2001 From: IzumiSy Date: Tue, 17 Nov 2026 17:02:49 +0900 Subject: [PATCH 01/12] docs(examples): replace static snippets with live previews --- .changeset/tidy-examples-preview.md | 6 + docs-manifest.json | 378 +++++++++--------- .../activity-card.docs.examples.tsx | 39 +- .../components/activity-card.docs.outline.md | 33 +- docs-src/components/ai-chat.docs.examples.tsx | 48 +++ docs-src/components/ai-chat.docs.outline.md | 31 +- docs-src/components/alert.docs.examples.tsx | 62 ++- docs-src/components/alert.docs.outline.md | 57 +-- .../components/autocomplete.docs.examples.tsx | 33 ++ .../components/autocomplete.docs.outline.md | 29 +- docs-src/components/avatar.docs.examples.tsx | 19 + docs-src/components/avatar.docs.outline.md | 15 +- docs-src/components/badge.docs.examples.tsx | 105 ++++- docs-src/components/badge.docs.outline.md | 89 +---- docs-src/components/button.docs.examples.tsx | 35 +- docs-src/components/button.docs.outline.md | 34 +- docs-src/components/card.docs.examples.tsx | 48 ++- docs-src/components/card.docs.outline.md | 29 +- .../components/checkbox.docs.examples.tsx | 19 +- docs-src/components/checkbox.docs.outline.md | 17 +- .../components/combobox.docs.examples.tsx | 27 ++ docs-src/components/combobox.docs.outline.md | 22 +- .../components/csv-importer.docs.examples.tsx | 40 ++ .../components/csv-importer.docs.outline.md | 43 +- .../components/date-picker.docs.examples.tsx | 103 +++++ .../components/date-picker.docs.outline.md | 65 +-- .../description-card.docs.examples.tsx | 117 ++++++ .../description-card.docs.outline.md | 174 +------- .../document-progress-card.docs.examples.tsx | 65 +++ .../document-progress-card.docs.outline.md | 58 +-- docs-src/components/form.docs.examples.tsx | 34 ++ docs-src/components/form.docs.outline.md | 29 +- docs-src/components/grid.docs.examples.tsx | 118 +++++- docs-src/components/grid.docs.outline.md | 54 +-- docs-src/components/input.docs.examples.tsx | 16 + docs-src/components/input.docs.outline.md | 16 +- docs-src/components/layout.docs.examples.tsx | 108 ++++- docs-src/components/layout.docs.outline.md | 67 +--- docs-src/components/menu.docs.examples.tsx | 41 ++ docs-src/components/menu.docs.outline.md | 37 +- .../components/metric-card.docs.examples.tsx | 34 +- .../components/metric-card.docs.outline.md | 28 +- docs-src/components/select.docs.examples.tsx | 50 ++- docs-src/components/select.docs.outline.md | 42 +- docs-src/components/sheet.docs.examples.tsx | 116 +++++- docs-src/components/sheet.docs.outline.md | 101 +---- docs-src/components/spinner.docs.examples.tsx | 25 +- docs-src/components/spinner.docs.outline.md | 19 +- docs-src/components/table.docs.examples.tsx | 90 +++++ docs-src/components/table.docs.outline.md | 82 +--- docs-src/components/tabs.docs.examples.tsx | 39 ++ docs-src/components/tabs.docs.outline.md | 36 +- docs-src/components/text.docs.examples.tsx | 55 ++- docs-src/components/text.docs.outline.md | 38 +- .../components/textarea.docs.examples.tsx | 20 +- docs-src/components/textarea.docs.outline.md | 18 +- .../components/timeline.docs.examples.tsx | 72 ++++ docs-src/components/timeline.docs.outline.md | 55 +-- docs-src/components/toolbar.docs.examples.tsx | 58 +++ docs-src/components/toolbar.docs.outline.md | 49 +-- docs-src/components/tooltip.docs.examples.tsx | 24 ++ docs-src/components/tooltip.docs.outline.md | 23 +- .../custom-components.docs.examples.tsx | 31 ++ .../custom-components.docs.outline.md | 34 +- .../file-based-routing.docs.examples.tsx | 3 + .../file-based-routing.docs.outline.md | 7 +- .../styling-theming.docs.examples.tsx | 83 +++- .../concepts/styling-theming.docs.outline.md | 42 +- docs-src/concepts/testing.docs.examples.tsx | 11 + docs-src/concepts/testing.docs.outline.md | 10 +- docs-src/guides/quickstart.docs.examples.tsx | 17 + docs-src/guides/quickstart.docs.outline.md | 32 +- docs-src/hooks/aggregations.docs.examples.tsx | 97 +++++ docs-src/hooks/aggregations.docs.outline.md | 64 +-- .../router/use-location.docs.examples.tsx | 6 + .../hooks/router/use-location.docs.outline.md | 10 +- .../use-app-shell-config.docs.examples.tsx | 22 + .../use-app-shell-config.docs.outline.md | 29 +- .../hooks/use-app-shell.docs.examples.tsx | 6 + docs-src/hooks/use-app-shell.docs.outline.md | 8 +- .../use-resolved-locale.docs.examples.tsx | 21 + .../hooks/use-resolved-locale.docs.outline.md | 26 +- docs-src/hooks/use-theme.docs.examples.tsx | 21 + docs-src/hooks/use-theme.docs.outline.md | 23 +- .../hooks/use-time-zone.docs.examples.tsx | 17 + docs-src/hooks/use-time-zone.docs.outline.md | 31 +- docs-src/hooks/use-toast.docs.examples.tsx | 19 + docs-src/hooks/use-toast.docs.outline.md | 19 +- docs/api/aggregations.md | 152 ++++--- docs/api/router/use-location.md | 11 +- docs/api/use-app-shell-config.md | 18 +- docs/api/use-app-shell.md | 9 +- docs/api/use-resolved-locale.md | 28 +- docs/api/use-theme.md | 28 +- docs/api/use-time-zone.md | 25 +- docs/api/use-toast.md | 33 +- docs/components/activity-card.md | 65 +-- docs/components/ai-chat.md | 70 +++- docs/components/alert.md | 109 +++-- docs/components/autocomplete.md | 54 ++- docs/components/avatar.md | 32 +- docs/components/badge.md | 153 ++++--- docs/components/button.md | 59 ++- docs/components/card.md | 69 +++- docs/components/checkbox.md | 28 +- docs/components/combobox.md | 41 +- docs/components/csv-importer.md | 15 +- docs/components/date-picker.md | 137 +++++-- docs/components/description-card.md | 199 ++++----- docs/components/document-progress-card.md | 111 ++--- docs/components/form.md | 58 +-- docs/components/grid.md | 158 ++++++-- docs/components/input.md | 24 +- docs/components/layout.md | 159 ++++++-- docs/components/menu.md | 70 ++-- docs/components/metric-card.md | 55 ++- docs/components/select.md | 78 ++-- docs/components/sheet.md | 169 +++++--- docs/components/spinner.md | 36 +- docs/components/table.md | 164 ++++---- docs/components/tabs.md | 70 ++-- docs/components/text.md | 80 +++- docs/components/textarea.md | 30 +- docs/components/timeline.md | 118 +++--- docs/components/toolbar.md | 104 +++-- docs/components/tooltip.md | 42 +- docs/concepts/custom-components.md | 58 +-- docs/concepts/file-based-routing.md | 9 +- docs/concepts/styling-theming.md | 110 ++++- docs/concepts/testing.md | 18 +- docs/quickstart.md | 26 +- 131 files changed, 4394 insertions(+), 2811 deletions(-) create mode 100644 .changeset/tidy-examples-preview.md create mode 100644 docs-src/components/ai-chat.docs.examples.tsx create mode 100644 docs-src/components/csv-importer.docs.examples.tsx create mode 100644 docs-src/components/date-picker.docs.examples.tsx create mode 100644 docs-src/components/form.docs.examples.tsx create mode 100644 docs-src/components/timeline.docs.examples.tsx create mode 100644 docs-src/components/toolbar.docs.examples.tsx create mode 100644 docs-src/concepts/custom-components.docs.examples.tsx create mode 100644 docs-src/concepts/file-based-routing.docs.examples.tsx create mode 100644 docs-src/concepts/testing.docs.examples.tsx create mode 100644 docs-src/guides/quickstart.docs.examples.tsx create mode 100644 docs-src/hooks/aggregations.docs.examples.tsx create mode 100644 docs-src/hooks/router/use-location.docs.examples.tsx create mode 100644 docs-src/hooks/use-app-shell-config.docs.examples.tsx create mode 100644 docs-src/hooks/use-app-shell.docs.examples.tsx create mode 100644 docs-src/hooks/use-resolved-locale.docs.examples.tsx create mode 100644 docs-src/hooks/use-theme.docs.examples.tsx create mode 100644 docs-src/hooks/use-time-zone.docs.examples.tsx create mode 100644 docs-src/hooks/use-toast.docs.examples.tsx diff --git a/.changeset/tidy-examples-preview.md b/.changeset/tidy-examples-preview.md new file mode 100644 index 000000000..e9300c269 --- /dev/null +++ b/.changeset/tidy-examples-preview.md @@ -0,0 +1,6 @@ +--- +"@tailor-platform/app-shell": patch +--- + +Replace static UI snippets with runnable documentation examples for components, hooks, and guides. +Keep example-specific fixtures and import guidance available alongside the generated usage documentation. diff --git a/docs-manifest.json b/docs-manifest.json index 7e3593c1e..530d282b2 100644 --- a/docs-manifest.json +++ b/docs-manifest.json @@ -37,10 +37,10 @@ ], "hashes": { "typeSurface": "8aa0f940fced61be", - "outline": "495a29df69d3819e", + "outline": "f2f7693515c414f9", "snapshot": null, - "outputMd": "1a2bb081c3e34482", - "examples": "eb7ab46dc420129f" + "outputMd": "c59d9c40b9918fe0", + "examples": "dc5a764073046dce" } }, "aggregations": { @@ -48,16 +48,16 @@ "kind": "code-backed", "outline": "docs-src/hooks/aggregations.docs.outline.md", "output": "docs/api/aggregations.md", - "examples": null, + "examples": "docs-src/hooks/aggregations.docs.examples.tsx", "sources": ["packages/core/src/lib/aggregations.ts"], "claims": [], "symbols": ["Aggregation", "aggregations"], "hashes": { "typeSurface": "0c11b3ba9d3529ad", - "outline": "5cfd5048505b0913", + "outline": "cb5c2e1df2e6811b", "snapshot": null, - "outputMd": "daf6c93e7285ee88", - "examples": null + "outputMd": "9cdbe8ff36288881", + "examples": "7b06909383caa04a" } }, "ai-chat": { @@ -65,7 +65,7 @@ "kind": "code-backed", "outline": "docs-src/components/ai-chat.docs.outline.md", "output": "docs/components/ai-chat.md", - "examples": null, + "examples": "docs-src/components/ai-chat.docs.examples.tsx", "sources": ["packages/core/src/components/ai-chat/**"], "claims": [], "symbols": [ @@ -82,10 +82,10 @@ ], "hashes": { "typeSurface": "932ff7674cc6df99", - "outline": "0d84350ee1e55312", + "outline": "48bf62509c263f50", "snapshot": "39edd53bc6562561", - "outputMd": "82313d5b6fe140d2", - "examples": null + "outputMd": "2c24af203bd14c01", + "examples": "82977c0ddb531e21" } }, "alert": { @@ -99,10 +99,10 @@ "symbols": ["Alert", "AlertProps", "alertVariants"], "hashes": { "typeSurface": "f28bf34ae1466912", - "outline": "6138eac23571e177", + "outline": "426d48dab41c630a", "snapshot": "049e72553f5b7a6f", - "outputMd": "db2c4388ca783a75", - "examples": "65d5fc73550e395a" + "outputMd": "ec553870bcb95413", + "examples": "21dfc1ea35de5ebb" } }, "app-shell": { @@ -191,10 +191,10 @@ "symbols": ["Autocomplete", "AutocompleteAsyncFetcher"], "hashes": { "typeSurface": "81040ce8342602bc", - "outline": "b8d3f69b4adc4f13", + "outline": "8ac7fee576c497c4", "snapshot": "dbd3c11b7dab615d", - "outputMd": "bd6ae01bf39d1ad6", - "examples": "63e2a53825a527a4" + "outputMd": "eb5793246e7d561e", + "examples": "95962e9882b63120" } }, "avatar": { @@ -208,10 +208,10 @@ "symbols": ["Avatar", "AvatarProps", "avatarVariants"], "hashes": { "typeSurface": "d6ee5e809e0f0590", - "outline": "e368c9ff0db15bb3", + "outline": "950cc8784ca1a16f", "snapshot": "ef0699939dd47de5", - "outputMd": "a874b74c176bcb47", - "examples": "009005eeac70961d" + "outputMd": "1a98b46e63c2cf7c", + "examples": "5de32d52039cd035" } }, "badge": { @@ -225,10 +225,10 @@ "symbols": ["Badge", "BadgeProps", "badgeVariants"], "hashes": { "typeSurface": "f4b8b24fb5f5bab1", - "outline": "0712a6c09e7ab542", + "outline": "0949dbd1404aa129", "snapshot": null, - "outputMd": "3d62a0fe0a539934", - "examples": "5aaa54515d4643ea" + "outputMd": "7897980baf93a074", + "examples": "e1241d5ce9845e2e" } }, "button": { @@ -242,10 +242,10 @@ "symbols": ["Button", "ButtonProps", "buttonVariants"], "hashes": { "typeSurface": "16df9927f8394548", - "outline": "200f12eb4bec959a", + "outline": "4852e242e511182e", "snapshot": "f57af2cc49c8b4d8", - "outputMd": "bce0e2fada1d1638", - "examples": "1ee01b1e27764cd2" + "outputMd": "be862b0bff15cc1a", + "examples": "4cd35b34c317297a" } }, "card": { @@ -259,10 +259,10 @@ "symbols": ["Card"], "hashes": { "typeSurface": "6ce6f0fdf2450cec", - "outline": "f76c947799dd3c05", + "outline": "95de4d29491affb3", "snapshot": "e6783ef54e17e11e", - "outputMd": "6e18faeb676654b4", - "examples": "58da87a258128f71" + "outputMd": "c1f88a287f197d79", + "examples": "7357698425183256" } }, "checkbox": { @@ -276,10 +276,10 @@ "symbols": ["Checkbox", "CheckboxProps"], "hashes": { "typeSurface": "3886bf7012f24283", - "outline": "916645fe8e5baf10", + "outline": "95df6a4219305305", "snapshot": "8d4d6148a3df5d61", - "outputMd": "14f7ba23f441df38", - "examples": "e8f09fba5acb116f" + "outputMd": "3486b9b3bbc6b4aa", + "examples": "3de165f1ab896397" } }, "combobox": { @@ -293,10 +293,10 @@ "symbols": ["Combobox", "ComboboxAsyncFetcher"], "hashes": { "typeSurface": "74ec02220321c626", - "outline": "d56abfe9595252ba", + "outline": "7504ff9a5d8f8dc2", "snapshot": "6fe89974e3712977", - "outputMd": "dfb775c7c4307409", - "examples": "4c96b71b68808c66" + "outputMd": "27b506bc032eedc5", + "examples": "e98b421a13c14e3f" } }, "command-palette": { @@ -355,7 +355,7 @@ "kind": "code-backed", "outline": "docs-src/components/csv-importer.docs.outline.md", "output": "docs/components/csv-importer.md", - "examples": null, + "examples": "docs-src/components/csv-importer.docs.examples.tsx", "sources": ["packages/core/src/components/csv-importer/**"], "claims": [], "symbols": [ @@ -373,10 +373,10 @@ ], "hashes": { "typeSurface": "b4f7e0dc7b95af55", - "outline": "ee6b6aaae126c832", + "outline": "bc69738786edf071", "snapshot": null, - "outputMd": "53d3c795ca21b9dc", - "examples": null + "outputMd": "10c04c78bb846c9a", + "examples": "cc53461be2050a28" } }, "custom-components": { @@ -384,16 +384,16 @@ "kind": "prose", "outline": "docs-src/concepts/custom-components.docs.outline.md", "output": "docs/concepts/custom-components.md", - "examples": null, + "examples": "docs-src/concepts/custom-components.docs.examples.tsx", "sources": [], "claims": [], "symbols": [], "hashes": { "typeSurface": null, - "outline": "8668ad90672475c7", + "outline": "33a2ab998eceebef", "snapshot": null, - "outputMd": "18b8fc747d52455a", - "examples": null + "outputMd": "efba56e470f4f164", + "examples": "e11850a33b559643" } }, "data-table": { @@ -488,7 +488,7 @@ "kind": "code-backed", "outline": "docs-src/components/date-picker.docs.outline.md", "output": "docs/components/date-picker.md", - "examples": null, + "examples": "docs-src/components/date-picker.docs.examples.tsx", "sources": ["packages/core/src/components/date-field/**"], "claims": [], "symbols": [ @@ -501,10 +501,10 @@ ], "hashes": { "typeSurface": "a0f5522359e8f81d", - "outline": "3144450969e87c0a", + "outline": "a70a0d73623531de", "snapshot": null, - "outputMd": "d4b478c7ba8304d5", - "examples": null + "outputMd": "aef949bc09716680", + "examples": "85bc7348e764a73c" } }, "default-header": { @@ -603,10 +603,10 @@ "symbols": ["DescriptionCard", "DescriptionCardProps"], "hashes": { "typeSurface": "04d576b0cf725dfe", - "outline": "6cae471c2f101ff5", + "outline": "114ca11b5431342c", "snapshot": null, - "outputMd": "a347fd1f4ccd433e", - "examples": "8e45ff2d2e3cd59b" + "outputMd": "8930a410d7d45f89", + "examples": "a5eb77c04d06ab08" } }, "design-philosophy": { @@ -688,10 +688,10 @@ "symbols": ["DocumentProgressCard", "DocumentProgressCardProps"], "hashes": { "typeSurface": "306ea2ad2a256b8d", - "outline": "c1448e17cc81a142", + "outline": "db303752449716e0", "snapshot": "b2cfca0400f29ba0", - "outputMd": "d0fb940f685f8869", - "examples": "6962c6f28d09eb0a" + "outputMd": "cabfb86627aefd6f", + "examples": "d56bfd9ea31be76a" } }, "file-based-routing": { @@ -699,16 +699,16 @@ "kind": "prose", "outline": "docs-src/concepts/file-based-routing.docs.outline.md", "output": "docs/concepts/file-based-routing.md", - "examples": null, + "examples": "docs-src/concepts/file-based-routing.docs.examples.tsx", "sources": [], "claims": [], "symbols": [], "hashes": { "typeSurface": null, - "outline": "c3de8a342b4a7be3", + "outline": "38ca45b8f69beb07", "snapshot": null, - "outputMd": "e189f95dbe4b0286", - "examples": null + "outputMd": "0d246b4ca0669f76", + "examples": "dac441829a603f20" } }, "filter-rail": { @@ -733,16 +733,16 @@ "kind": "code-backed", "outline": "docs-src/components/form.docs.outline.md", "output": "docs/components/form.md", - "examples": null, + "examples": "docs-src/components/form.docs.examples.tsx", "sources": ["packages/core/src/components/form/**"], "claims": [], "symbols": ["Form", "FormProps"], "hashes": { "typeSurface": "7b374d45d53d4535", - "outline": "bb24607b4b1195e1", + "outline": "f4a5ebf0ce86448f", "snapshot": "5d7a7904c5256f29", - "outputMd": "d14175ebbcef80fe", - "examples": null + "outputMd": "3bef3b38c8f61fca", + "examples": "d927bcfc95d109d4" } }, "form-composer": { @@ -875,10 +875,10 @@ "symbols": ["Grid", "GridItemProps", "GridProps"], "hashes": { "typeSurface": "e14ecb0505a2a8bf", - "outline": "c7befb0148d5851d", + "outline": "bc138127204f0efd", "snapshot": "40fca09bec6804cf", - "outputMd": "9051eb53dde4179f", - "examples": "90bc8a3e4816a82c" + "outputMd": "d048e972ae8aba3e", + "examples": "26def49133539478" } }, "guards/hidden": { @@ -977,10 +977,10 @@ "symbols": ["Input", "InputProps"], "hashes": { "typeSurface": "7c5b64c579f508ee", - "outline": "9b273bc9e509f1fe", + "outline": "063c7293412840a2", "snapshot": "9e448d8e65418e9b", - "outputMd": "a3a6c9679af99d37", - "examples": "fc036f7af21b9dd4" + "outputMd": "876dca4c3b3bc9c5", + "examples": "72db89e4438a02c8" } }, "interaction-confirm": { @@ -1079,10 +1079,10 @@ "symbols": ["Layout", "LayoutProps"], "hashes": { "typeSurface": "c7e8fec79020d657", - "outline": "eb9cbe2aad3a08fc", + "outline": "b5f77b82d71d0eae", "snapshot": "03dedb3cc14b1eaf", - "outputMd": "638934f69a66ef12", - "examples": "3e841d9dcde141f6" + "outputMd": "3b8bf269c15e2fa5", + "examples": "c34348bb6d088ad1" } }, "menu": { @@ -1096,10 +1096,10 @@ "symbols": ["Menu"], "hashes": { "typeSurface": "943616def28cafb0", - "outline": "8f06df28129676c8", + "outline": "c1ffae9a3872c334", "snapshot": "212e64b91be708c9", - "outputMd": "ceb4a05822538d20", - "examples": "cff0508bb5520ae6" + "outputMd": "f3daffeba45ee3dd", + "examples": "2e034d6a69c7a147" } }, "metric-card": { @@ -1113,10 +1113,10 @@ "symbols": ["MetricCard", "MetricCardProps"], "hashes": { "typeSurface": "a9cb24cc83f42bad", - "outline": "6e57749a9a03ca4f", + "outline": "9c6c02f7c5d9026b", "snapshot": null, - "outputMd": "5a1c557768c6590f", - "examples": "22b876f43b26922c" + "outputMd": "4742120c07f00991", + "examples": "19b8f138685f0b1a" } }, "migrations": { @@ -1158,16 +1158,16 @@ "kind": "prose", "outline": "docs-src/guides/quickstart.docs.outline.md", "output": "docs/quickstart.md", - "examples": null, + "examples": "docs-src/guides/quickstart.docs.examples.tsx", "sources": [], "claims": [], "symbols": [], "hashes": { "typeSurface": null, - "outline": "82b05468b438d199", + "outline": "24ea06d9cc1061ea", "snapshot": null, - "outputMd": "2261883b6d0069d3", - "examples": null + "outputMd": "83198465a694d524", + "examples": "aa349a307ebd8881" } }, "router/use-location": { @@ -1175,16 +1175,16 @@ "kind": "prose", "outline": "docs-src/hooks/router/use-location.docs.outline.md", "output": "docs/api/router/use-location.md", - "examples": null, + "examples": "docs-src/hooks/router/use-location.docs.examples.tsx", "sources": [], "claims": [], "symbols": [], "hashes": { "typeSurface": null, - "outline": "c0e437bdb7348d8e", + "outline": "20888d23eb23eac1", "snapshot": null, - "outputMd": "ddb44cc51af636cc", - "examples": null + "outputMd": "ccf87add77994830", + "examples": "21dcaa18e4be0323" } }, "router/use-navigate": { @@ -1249,10 +1249,10 @@ "symbols": ["Select", "SelectAsyncFetcher"], "hashes": { "typeSurface": "429710973dfa912b", - "outline": "85a352fb834a1208", + "outline": "ea83ec331e2d9e5c", "snapshot": "c7aa045d22de4cc7", - "outputMd": "e1835371d2ef76fc", - "examples": "1ce89cec30045466" + "outputMd": "94c4aa86831a15ea", + "examples": "cb4ae6d8371b373e" } }, "sheet": { @@ -1266,10 +1266,10 @@ "symbols": ["Sheet"], "hashes": { "typeSurface": "e760949efcbe4c38", - "outline": "5f1594d8bb39e0a5", + "outline": "3c51b0bd7cc290ab", "snapshot": "8c75bb4dad18f7b8", - "outputMd": "0f16983ba71be0bf", - "examples": "b0eebb8c5e2219dc" + "outputMd": "0be1c6430a4b7ec1", + "examples": "8f93acd2d478616f" } }, "sidebar-group": { @@ -1368,10 +1368,10 @@ "symbols": ["Spinner", "SpinnerProps"], "hashes": { "typeSurface": "cdc89a612071486c", - "outline": "4cef63f21a8c5851", + "outline": "c4418fb62a88566e", "snapshot": null, - "outputMd": "e05d94ba9c3d17da", - "examples": "19131f441efe232f" + "outputMd": "eec440408611a233", + "examples": "2782e1f9f3822dfe" } }, "styling-theming": { @@ -1385,10 +1385,10 @@ "symbols": [], "hashes": { "typeSurface": null, - "outline": "9d505cfe9358a1e7", + "outline": "c85788dd31d7e723", "snapshot": null, - "outputMd": "8a2c22e60a95b306", - "examples": "4d19f4f688e0f0ac" + "outputMd": "ba49357df367615b", + "examples": "1ea2346b99b568b7" } }, "table": { @@ -1402,10 +1402,10 @@ "symbols": ["Table"], "hashes": { "typeSurface": "bc60676f880b485b", - "outline": "9381eff2f7987a0e", + "outline": "6df1a21eb91b6fbc", "snapshot": "c788f8a131677ada", - "outputMd": "f85ec64ceb7f4acf", - "examples": "2b9d94065f2f77b7" + "outputMd": "c5933b640a78c3bf", + "examples": "d44fc86f972fd234" } }, "tabs": { @@ -1419,10 +1419,10 @@ "symbols": ["Tabs"], "hashes": { "typeSurface": "f6795191b952e110", - "outline": "833da61f24d1318a", + "outline": "f32b0cf0789281f4", "snapshot": "43ed7df4bd0f3c75", - "outputMd": "b8c595669cbe7353", - "examples": "b07f258088e81cac" + "outputMd": "a94b016f0c9709b7", + "examples": "f94b62a568ca61ee" } }, "testing": { @@ -1430,16 +1430,16 @@ "kind": "prose", "outline": "docs-src/concepts/testing.docs.outline.md", "output": "docs/concepts/testing.md", - "examples": null, + "examples": "docs-src/concepts/testing.docs.examples.tsx", "sources": [], "claims": [], "symbols": [], "hashes": { "typeSurface": null, - "outline": "e231264c4ca826e6", + "outline": "b3cb442c33cd67ca", "snapshot": null, - "outputMd": "bb713d3c7b93ad3b", - "examples": null + "outputMd": "777fd9ba9f4641f8", + "examples": "47cbf43f26e6afeb" } }, "text": { @@ -1453,10 +1453,10 @@ "symbols": ["Text", "TextProps"], "hashes": { "typeSurface": "053c8236047c6ec4", - "outline": "1441d9d6e3f5975b", + "outline": "f8366b6dd09aa48f", "snapshot": "83be7198ffac5470", - "outputMd": "24262ae6cb49a138", - "examples": "c31a669057c28ba7" + "outputMd": "e5311b1891f3ff7b", + "examples": "0e5a568ccf1638c6" } }, "textarea": { @@ -1470,10 +1470,10 @@ "symbols": ["Textarea", "TextareaProps"], "hashes": { "typeSurface": "3d9225f7356a29b2", - "outline": "40952524e46c333e", + "outline": "bf758477b779af2e", "snapshot": "c8500808c03baa29", - "outputMd": "c940bc01cd573334", - "examples": "0712ee03ad6ce259" + "outputMd": "cf324904899ed318", + "examples": "26a86dec35082a06" } }, "timeline": { @@ -1481,7 +1481,7 @@ "kind": "code-backed", "outline": "docs-src/components/timeline.docs.outline.md", "output": "docs/components/timeline.md", - "examples": null, + "examples": "docs-src/components/timeline.docs.examples.tsx", "sources": ["packages/core/src/components/timeline/**"], "claims": [], "symbols": [ @@ -1504,10 +1504,10 @@ ], "hashes": { "typeSurface": "f1d9ac66cafae3d5", - "outline": "6d4342c4015a7f33", + "outline": "962d7401a920197a", "snapshot": null, - "outputMd": "699249c9452485ab", - "examples": null + "outputMd": "958b33e8fa7a9e2b", + "examples": "fd9fed3980ca1fda" } }, "toolbar": { @@ -1515,16 +1515,16 @@ "kind": "code-backed", "outline": "docs-src/components/toolbar.docs.outline.md", "output": "docs/components/toolbar.md", - "examples": null, + "examples": "docs-src/components/toolbar.docs.examples.tsx", "sources": ["packages/core/src/components/toolbar/**"], "claims": [], "symbols": ["Toolbar", "ToolbarProps"], "hashes": { "typeSurface": "2d88f0306efcaa77", - "outline": "1257a84ccd91d5c3", + "outline": "63a21fa0d305ae6d", "snapshot": "56d61f993125508c", - "outputMd": "91d70b140c7bb747", - "examples": null + "outputMd": "f8a45109e97391f5", + "examples": "fde91e48c8a1a500" } }, "tooltip": { @@ -1538,10 +1538,10 @@ "symbols": ["Tooltip"], "hashes": { "typeSurface": "d652b740db9471c7", - "outline": "eea5aed5cf4c8f33", + "outline": "2b11960ae6fccfba", "snapshot": "19ed635d615f04af", - "outputMd": "113c95b2995917ed", - "examples": "87b93974e65d3a07" + "outputMd": "0f1ebe2b142513a6", + "examples": "e60bbb4e78a15a38" } }, "tree": { @@ -1597,16 +1597,16 @@ "kind": "prose", "outline": "docs-src/hooks/use-app-shell.docs.outline.md", "output": "docs/api/use-app-shell.md", - "examples": null, + "examples": "docs-src/hooks/use-app-shell.docs.examples.tsx", "sources": [], "claims": [], "symbols": [], "hashes": { "typeSurface": null, - "outline": "f007ab6a89ba165d", + "outline": "9fc0b4f43e702ebc", "snapshot": null, - "outputMd": "2a73bb3f3fe1a802", - "examples": null + "outputMd": "18f76736141a6cf5", + "examples": "f70172b3ffe4a317" } }, "use-app-shell-config": { @@ -1614,16 +1614,16 @@ "kind": "prose", "outline": "docs-src/hooks/use-app-shell-config.docs.outline.md", "output": "docs/api/use-app-shell-config.md", - "examples": null, + "examples": "docs-src/hooks/use-app-shell-config.docs.examples.tsx", "sources": [], "claims": [], "symbols": [], "hashes": { "typeSurface": null, - "outline": "5ed94544ff0df649", + "outline": "e9d8c057d07d752d", "snapshot": null, - "outputMd": "42363ef05098768c", - "examples": null + "outputMd": "fda8a8d0359561dd", + "examples": "2de13d7a01e94807" } }, "use-app-shell-data": { @@ -1716,16 +1716,16 @@ "kind": "prose", "outline": "docs-src/hooks/use-resolved-locale.docs.outline.md", "output": "docs/api/use-resolved-locale.md", - "examples": null, + "examples": "docs-src/hooks/use-resolved-locale.docs.examples.tsx", "sources": [], "claims": [], "symbols": [], "hashes": { "typeSurface": null, - "outline": "d27723b34eaeb8f1", + "outline": "7eae85afc3b3262d", "snapshot": null, - "outputMd": "d0eb9f125c314d85", - "examples": null + "outputMd": "eb5e8371ba10d771", + "examples": "5f231ea108de7aab" } }, "use-route-error": { @@ -1750,16 +1750,16 @@ "kind": "prose", "outline": "docs-src/hooks/use-theme.docs.outline.md", "output": "docs/api/use-theme.md", - "examples": null, + "examples": "docs-src/hooks/use-theme.docs.examples.tsx", "sources": [], "claims": [], "symbols": [], "hashes": { "typeSurface": null, - "outline": "764717d219c6a9fc", + "outline": "a03f681bf17dc2bf", "snapshot": null, - "outputMd": "c338022de386d5e4", - "examples": null + "outputMd": "000e2603cef83d47", + "examples": "c2942d679a2b5ee3" } }, "use-time-zone": { @@ -1767,16 +1767,16 @@ "kind": "prose", "outline": "docs-src/hooks/use-time-zone.docs.outline.md", "output": "docs/api/use-time-zone.md", - "examples": null, + "examples": "docs-src/hooks/use-time-zone.docs.examples.tsx", "sources": [], "claims": [], "symbols": [], "hashes": { "typeSurface": null, - "outline": "0453e622960d3c3a", + "outline": "bb783668bbf32860", "snapshot": null, - "outputMd": "30c15545ab3c4954", - "examples": null + "outputMd": "61e225e58e2b8d81", + "examples": "b081c0e5992140e1" } }, "use-toast": { @@ -1784,16 +1784,16 @@ "kind": "prose", "outline": "docs-src/hooks/use-toast.docs.outline.md", "output": "docs/api/use-toast.md", - "examples": null, + "examples": "docs-src/hooks/use-toast.docs.examples.tsx", "sources": [], "claims": [], "symbols": [], "hashes": { "typeSurface": null, - "outline": "6b730cf39dcfa154", + "outline": "9100b0606aa15761", "snapshot": null, - "outputMd": "30983a761bc61593", - "examples": null + "outputMd": "3f763c8074704709", + "examples": "0dce35625d5e56cf" } }, "with-guard": { @@ -1816,63 +1816,63 @@ }, "skill": { "packages/core/skills/app-shell-patterns/references/concepts/authentication.md": "a3f7aa913d59fdd7", - "packages/core/skills/app-shell-patterns/references/concepts/custom-components.md": "18b8fc747d52455a", - "packages/core/skills/app-shell-patterns/references/concepts/file-based-routing.md": "e189f95dbe4b0286", + "packages/core/skills/app-shell-patterns/references/concepts/custom-components.md": "efba56e470f4f164", + "packages/core/skills/app-shell-patterns/references/concepts/file-based-routing.md": "0d246b4ca0669f76", "packages/core/skills/app-shell-patterns/references/concepts/graphql.md": "0acfb736bcf90eff", "packages/core/skills/app-shell-patterns/references/concepts/modules-and-resources.md": "bf15b5460f22d165", "packages/core/skills/app-shell-patterns/references/concepts/routing-navigation.md": "225fb6e2b1efa4f6", "packages/core/skills/app-shell-patterns/references/concepts/sidebar-navigation.md": "5a3c8bac248061f9", - "packages/core/skills/app-shell-patterns/references/concepts/styling-theming.md": "8a2c22e60a95b306", - "packages/core/skills/app-shell-patterns/references/concepts/testing.md": "bb713d3c7b93ad3b", + "packages/core/skills/app-shell-patterns/references/concepts/styling-theming.md": "ba49357df367615b", + "packages/core/skills/app-shell-patterns/references/concepts/testing.md": "777fd9ba9f4641f8", "packages/core/skills/app-shell-patterns/references/components/action-panel.md": "03362008aa77d4cf", - "packages/core/skills/app-shell-patterns/references/components/activity-card.md": "1a2bb081c3e34482", - "packages/core/skills/app-shell-patterns/references/components/ai-chat.md": "82313d5b6fe140d2", - "packages/core/skills/app-shell-patterns/references/components/alert.md": "db2c4388ca783a75", + "packages/core/skills/app-shell-patterns/references/components/activity-card.md": "c59d9c40b9918fe0", + "packages/core/skills/app-shell-patterns/references/components/ai-chat.md": "2c24af203bd14c01", + "packages/core/skills/app-shell-patterns/references/components/alert.md": "ec553870bcb95413", "packages/core/skills/app-shell-patterns/references/components/app-shell.md": "cd57abd4909118a4", "packages/core/skills/app-shell-patterns/references/components/appearance-switcher.md": "b55f1d538651d467", "packages/core/skills/app-shell-patterns/references/components/attachment.md": "35bebce540d6ac28", - "packages/core/skills/app-shell-patterns/references/components/autocomplete.md": "bd6ae01bf39d1ad6", - "packages/core/skills/app-shell-patterns/references/components/avatar.md": "a874b74c176bcb47", - "packages/core/skills/app-shell-patterns/references/components/badge.md": "3d62a0fe0a539934", - "packages/core/skills/app-shell-patterns/references/components/button.md": "bce0e2fada1d1638", - "packages/core/skills/app-shell-patterns/references/components/card.md": "6e18faeb676654b4", - "packages/core/skills/app-shell-patterns/references/components/checkbox.md": "14f7ba23f441df38", - "packages/core/skills/app-shell-patterns/references/components/combobox.md": "dfb775c7c4307409", + "packages/core/skills/app-shell-patterns/references/components/autocomplete.md": "eb5793246e7d561e", + "packages/core/skills/app-shell-patterns/references/components/avatar.md": "1a98b46e63c2cf7c", + "packages/core/skills/app-shell-patterns/references/components/badge.md": "7897980baf93a074", + "packages/core/skills/app-shell-patterns/references/components/button.md": "be862b0bff15cc1a", + "packages/core/skills/app-shell-patterns/references/components/card.md": "c1f88a287f197d79", + "packages/core/skills/app-shell-patterns/references/components/checkbox.md": "3486b9b3bbc6b4aa", + "packages/core/skills/app-shell-patterns/references/components/combobox.md": "27b506bc032eedc5", "packages/core/skills/app-shell-patterns/references/components/command-palette.md": "7e5bc675a593791a", - "packages/core/skills/app-shell-patterns/references/components/csv-importer.md": "53d3c795ca21b9dc", + "packages/core/skills/app-shell-patterns/references/components/csv-importer.md": "10c04c78bb846c9a", "packages/core/skills/app-shell-patterns/references/components/data-table.md": "06f3ce2174fda10a", - "packages/core/skills/app-shell-patterns/references/components/date-picker.md": "d4b478c7ba8304d5", + "packages/core/skills/app-shell-patterns/references/components/date-picker.md": "aef949bc09716680", "packages/core/skills/app-shell-patterns/references/components/default-header.md": "375e55f4b12fa2be", "packages/core/skills/app-shell-patterns/references/components/default-sidebar.md": "9b1672c71b6db3ff", - "packages/core/skills/app-shell-patterns/references/components/description-card.md": "a347fd1f4ccd433e", + "packages/core/skills/app-shell-patterns/references/components/description-card.md": "8930a410d7d45f89", "packages/core/skills/app-shell-patterns/references/components/dialog.md": "5ff9a70e8eea88dd", - "packages/core/skills/app-shell-patterns/references/components/document-progress-card.md": "d0fb940f685f8869", + "packages/core/skills/app-shell-patterns/references/components/document-progress-card.md": "cabfb86627aefd6f", "packages/core/skills/app-shell-patterns/references/components/filter-rail.md": "224745760083ee35", - "packages/core/skills/app-shell-patterns/references/components/form.md": "d14175ebbcef80fe", + "packages/core/skills/app-shell-patterns/references/components/form.md": "3bef3b38c8f61fca", "packages/core/skills/app-shell-patterns/references/components/global-header-layout.md": "fe86450720c4d586", - "packages/core/skills/app-shell-patterns/references/components/grid.md": "9051eb53dde4179f", - "packages/core/skills/app-shell-patterns/references/components/input.md": "a3a6c9679af99d37", + "packages/core/skills/app-shell-patterns/references/components/grid.md": "d048e972ae8aba3e", + "packages/core/skills/app-shell-patterns/references/components/input.md": "876dca4c3b3bc9c5", "packages/core/skills/app-shell-patterns/references/components/item-list.md": "0190e797cd8ed318", - "packages/core/skills/app-shell-patterns/references/components/layout.md": "638934f69a66ef12", - "packages/core/skills/app-shell-patterns/references/components/menu.md": "ceb4a05822538d20", - "packages/core/skills/app-shell-patterns/references/components/metric-card.md": "5a1c557768c6590f", - "packages/core/skills/app-shell-patterns/references/components/select.md": "e1835371d2ef76fc", - "packages/core/skills/app-shell-patterns/references/components/sheet.md": "0f16983ba71be0bf", + "packages/core/skills/app-shell-patterns/references/components/layout.md": "3b8bf269c15e2fa5", + "packages/core/skills/app-shell-patterns/references/components/menu.md": "f3daffeba45ee3dd", + "packages/core/skills/app-shell-patterns/references/components/metric-card.md": "4742120c07f00991", + "packages/core/skills/app-shell-patterns/references/components/select.md": "94c4aa86831a15ea", + "packages/core/skills/app-shell-patterns/references/components/sheet.md": "0be1c6430a4b7ec1", "packages/core/skills/app-shell-patterns/references/components/sidebar-group.md": "370eccb532278bd1", "packages/core/skills/app-shell-patterns/references/components/sidebar-item.md": "9236c03e53aa79f2", "packages/core/skills/app-shell-patterns/references/components/sidebar-layout.md": "af971809e42dfdb8", "packages/core/skills/app-shell-patterns/references/components/sidebar-section.md": "281cfa2dcbff14be", - "packages/core/skills/app-shell-patterns/references/components/spinner.md": "e05d94ba9c3d17da", - "packages/core/skills/app-shell-patterns/references/components/table.md": "f85ec64ceb7f4acf", - "packages/core/skills/app-shell-patterns/references/components/tabs.md": "b8c595669cbe7353", - "packages/core/skills/app-shell-patterns/references/components/text.md": "24262ae6cb49a138", - "packages/core/skills/app-shell-patterns/references/components/textarea.md": "c940bc01cd573334", - "packages/core/skills/app-shell-patterns/references/components/timeline.md": "699249c9452485ab", - "packages/core/skills/app-shell-patterns/references/components/toolbar.md": "91d70b140c7bb747", - "packages/core/skills/app-shell-patterns/references/components/tooltip.md": "113c95b2995917ed", + "packages/core/skills/app-shell-patterns/references/components/spinner.md": "eec440408611a233", + "packages/core/skills/app-shell-patterns/references/components/table.md": "c5933b640a78c3bf", + "packages/core/skills/app-shell-patterns/references/components/tabs.md": "a94b016f0c9709b7", + "packages/core/skills/app-shell-patterns/references/components/text.md": "e5311b1891f3ff7b", + "packages/core/skills/app-shell-patterns/references/components/textarea.md": "cf324904899ed318", + "packages/core/skills/app-shell-patterns/references/components/timeline.md": "958b33e8fa7a9e2b", + "packages/core/skills/app-shell-patterns/references/components/toolbar.md": "f8a45109e97391f5", + "packages/core/skills/app-shell-patterns/references/components/tooltip.md": "0f1ebe2b142513a6", "packages/core/skills/app-shell-patterns/references/components/tree.md": "11c3358163ce9216", "packages/core/skills/app-shell-patterns/references/components/with-guard.md": "8d4fc931339d9a3f", - "packages/core/skills/app-shell-patterns/references/api/aggregations.md": "daf6c93e7285ee88", + "packages/core/skills/app-shell-patterns/references/api/aggregations.md": "9cdbe8ff36288881", "packages/core/skills/app-shell-patterns/references/api/create-ai-gateway-client.md": "ed0db6372d25e2f9", "packages/core/skills/app-shell-patterns/references/api/create-typed-paths.md": "4c3a858d3eb02a2a", "packages/core/skills/app-shell-patterns/references/api/define-i18n-labels.md": "3035dea9ac31b7f5", @@ -1882,22 +1882,22 @@ "packages/core/skills/app-shell-patterns/references/api/guards/overview.md": "bc694f0965c1d049", "packages/core/skills/app-shell-patterns/references/api/guards/pass.md": "3363ac1c6a7905f8", "packages/core/skills/app-shell-patterns/references/api/guards/redirect-to.md": "1b08b8aa0d013dc7", - "packages/core/skills/app-shell-patterns/references/api/router/use-location.md": "ddb44cc51af636cc", + "packages/core/skills/app-shell-patterns/references/api/router/use-location.md": "ccf87add77994830", "packages/core/skills/app-shell-patterns/references/api/router/use-navigate.md": "d018cb13a7ddc38b", "packages/core/skills/app-shell-patterns/references/api/router/use-params.md": "78c15519a8339ebb", "packages/core/skills/app-shell-patterns/references/api/use-ai-chat.md": "3bcaceab3290ca92", - "packages/core/skills/app-shell-patterns/references/api/use-app-shell.md": "2a73bb3f3fe1a802", - "packages/core/skills/app-shell-patterns/references/api/use-app-shell-config.md": "42363ef05098768c", + "packages/core/skills/app-shell-patterns/references/api/use-app-shell.md": "18f76736141a6cf5", + "packages/core/skills/app-shell-patterns/references/api/use-app-shell-config.md": "fda8a8d0359561dd", "packages/core/skills/app-shell-patterns/references/api/use-app-shell-data.md": "2ad40b17e578246d", "packages/core/skills/app-shell-patterns/references/api/use-auth.md": "7573794b872af4c8", "packages/core/skills/app-shell-patterns/references/api/use-override-breadcrumb.md": "6ec55fc3dfd8c21d", "packages/core/skills/app-shell-patterns/references/api/use-page-meta.md": "f988bdc0fb180f0c", "packages/core/skills/app-shell-patterns/references/api/use-register-command-palette-actions.md": "7144ae3dc68aa65b", - "packages/core/skills/app-shell-patterns/references/api/use-resolved-locale.md": "d0eb9f125c314d85", + "packages/core/skills/app-shell-patterns/references/api/use-resolved-locale.md": "eb5e8371ba10d771", "packages/core/skills/app-shell-patterns/references/api/use-route-error.md": "1a44180ec84ce4b9", - "packages/core/skills/app-shell-patterns/references/api/use-theme.md": "c338022de386d5e4", - "packages/core/skills/app-shell-patterns/references/api/use-time-zone.md": "30c15545ab3c4954", - "packages/core/skills/app-shell-patterns/references/api/use-toast.md": "30983a761bc61593", + "packages/core/skills/app-shell-patterns/references/api/use-theme.md": "000e2603cef83d47", + "packages/core/skills/app-shell-patterns/references/api/use-time-zone.md": "61e225e58e2b8d81", + "packages/core/skills/app-shell-patterns/references/api/use-toast.md": "3f763c8074704709", "packages/core/skills/app-shell-patterns/references/patterns/form-composer.md": "ed187ac3a0773d3d", "packages/core/skills/app-shell-patterns/references/patterns/form-modal.md": "a0d3c952b0b10351", "packages/core/skills/app-shell-patterns/references/patterns/form-sectioned.md": "d31cd3ae6ad0790c", diff --git a/docs-src/components/activity-card.docs.examples.tsx b/docs-src/components/activity-card.docs.examples.tsx index 0318f22cf..4ddf42eaf 100644 --- a/docs-src/components/activity-card.docs.examples.tsx +++ b/docs-src/components/activity-card.docs.examples.tsx @@ -1,4 +1,5 @@ -import { ActivityCard } from "@tailor-platform/app-shell"; +import { CheckCircle } from "lucide-react"; +import { ActivityCard, Text, type ActivityCardBaseItem } from "@tailor-platform/app-shell"; const items = [ { @@ -23,3 +24,39 @@ const items = [ export function BasicUsage() { return ; } + +export function CompoundItems() { + interface MyItem extends ActivityCardBaseItem { + kind: "approval" | "update"; + label?: string; + message?: string; + } + + const items: MyItem[] = [ + { id: "1", timestamp: "2026-03-21T09:00:00", kind: "approval", label: "PO approved" }, + { + id: "2", + timestamp: "2026-03-20T15:00:00", + kind: "update", + message: "Status changed to CONFIRMED", + }, + ]; + + return ( + + > + {(item) => + item.kind === "approval" ? ( + }> + {item.label} + + ) : ( + + {item.message} + + ) + } + + + ); +} diff --git a/docs-src/components/activity-card.docs.outline.md b/docs-src/components/activity-card.docs.outline.md index cd666b825..45180c72f 100644 --- a/docs-src/components/activity-card.docs.outline.md +++ b/docs-src/components/activity-card.docs.outline.md @@ -22,6 +22,8 @@ import { } from "@tailor-platform/app-shell"; ``` +The examples below also import `Text` from `@tailor-platform/app-shell` and `CheckCircle` from `lucide-react`. + Use `ActivityCardItem` for each item in the standalone API. Use `ActivityCardBaseItem` as the minimum constraint when extending items for the compound API. ## Basic Usage @@ -100,36 +102,7 @@ import { ActivityCard, type ActivityCardBaseItem } from "@tailor-platform/app-sh ### Example -```tsx -import { ActivityCard, Text, type ActivityCardBaseItem } from "@tailor-platform/app-shell"; - -interface MyItem extends ActivityCardBaseItem { - kind: "approval" | "update"; - label?: string; - message?: string; -} - -const items: MyItem[] = [ - { id: "1", timestamp: new Date(), kind: "approval", label: "PO approved" }, - { id: "2", timestamp: new Date(), kind: "update", message: "Status changed to CONFIRMED" }, -]; - - - > - {(item) => - item.kind === "approval" ? ( - }> - {item.label} - - ) : ( - - {item.message} - - ) - } - -; -``` + --- diff --git a/docs-src/components/ai-chat.docs.examples.tsx b/docs-src/components/ai-chat.docs.examples.tsx new file mode 100644 index 000000000..489ddd6fc --- /dev/null +++ b/docs-src/components/ai-chat.docs.examples.tsx @@ -0,0 +1,48 @@ +import { AIChat } from "@tailor-platform/app-shell"; + +export function Message() { + return ( + + Your purchase order is ready for review. + + ); +} + +export function Response() { + return ( + + { + "## Order summary\n\nThe order is **ready for review**.\n\n- Check the `quantity` for each line.\n- Confirm the delivery date.\n\n[Read the documentation](/components/ai-chat)." + } + + ); +} + +export function Reasoning() { + return ( + + + + { + "I will check the order totals, then compare the requested delivery date with the supplier's lead time." + } + + + ); +} + +export function ChainOfThought() { + return ( + + + + + + 12 hits + + + + + + ); +} diff --git a/docs-src/components/ai-chat.docs.outline.md b/docs-src/components/ai-chat.docs.outline.md index a80ab866c..3562d3771 100644 --- a/docs-src/components/ai-chat.docs.outline.md +++ b/docs-src/components/ai-chat.docs.outline.md @@ -198,11 +198,7 @@ For a docked right panel, put the collapse control in `icon` so it takes the lea ### Message -```tsx - - {message.content} - -``` + User turns render as a right-aligned primary bubble; assistant turns take the full width with no bubble, so reasoning, tool calls, and citations stack inside the same column above the response text. @@ -210,9 +206,7 @@ User turns render as a right-aligned primary bubble; assistant turns take the fu Renders the markdown subset a streamed LLM response actually emits — bold, inline code, links, headings, bullet/numbered lists — without a markdown dependency. Only `http(s):`, `mailto:`, and same-site relative links render as clickable; any other target renders as plain text, since the text passing through here is untrusted model output. For full CommonMark, swap `` for `react-markdown` or the AI SDK's `streamdown` — call sites keep the same shape. -```tsx -{message.content} -``` + ### EmptyState / Suggestions @@ -248,30 +242,13 @@ Icon-button row under a finished assistant turn — copy, retry, feedback. Rende Collapsible "thinking" block for reasoning models. Auto-opens while `isStreaming` is true and auto-closes when it turns false, unless the reader has manually toggled it. -```tsx - - - {reasoning.text} - -``` + ### ChainOfThought Structured step timeline for agentic turns — the discrete plan being executed, each step with a status and optional result chips. Use `Reasoning` for free-form thinking text and this for multi-step tool plans. -```tsx - - - - - - 12 hits - - - - - -``` + `status` is `"complete" | "active" | "pending"`. diff --git a/docs-src/components/alert.docs.examples.tsx b/docs-src/components/alert.docs.examples.tsx index 9e2759fb3..f85940620 100644 --- a/docs-src/components/alert.docs.examples.tsx +++ b/docs-src/components/alert.docs.examples.tsx @@ -1,4 +1,4 @@ -import { Alert } from "@tailor-platform/app-shell"; +import { Alert, Button, alertVariants } from "@tailor-platform/app-shell"; export function BasicUsage() { return ( @@ -8,3 +8,63 @@ export function BasicUsage() { ); } + +export function Variants() { + return ( +
+ + Note + General information. + + + Success + Operation completed successfully. + + + Warning + Proceed with caution. + + + Error + Something went wrong. + + + Info + Here is some useful information. + +
+ ); +} + +export function WithAction() { + return ( + + Review + + } + > + Review Required + This record has pending changes that need review. + + ); +} + +export function SuccessConfirmation() { + return ( + + Invoice Created + Invoice #INV-0042 has been sent to the customer. + + ); +} + +export function StylingUtility() { + return ( +
+ Custom alert container +
+ ); +} diff --git a/docs-src/components/alert.docs.outline.md b/docs-src/components/alert.docs.outline.md index d5046aa88..672f62407 100644 --- a/docs-src/components/alert.docs.outline.md +++ b/docs-src/components/alert.docs.outline.md @@ -17,6 +17,8 @@ The `Alert` component is a compound component for displaying contextual status m import { Alert } from "@tailor-platform/app-shell"; ``` +The examples below also import `Button` and `alertVariants` from `@tailor-platform/app-shell`. + ## Basic Usage @@ -37,32 +39,7 @@ All standard HTML `
` props are also accepted. Each variant automatically renders a contextual icon: -```tsx - - Note - General information. - - - - Success - Operation completed successfully. - - - - Warning - Proceed with caution. - - - - Error - Something went wrong. - - - - Info - Here is some useful information. - -``` + | Variant | Automatic Icon | Color palette | | --------- | ------------------- | --------------- | @@ -76,19 +53,7 @@ Each variant automatically renders a contextual icon: Use the `action` prop to render an action element below the description: -```tsx - - Review - - } -> - Review Required - This record has pending changes that need review. - -``` + ## Dismissible Alert @@ -127,12 +92,7 @@ function OrderForm() { ### Success Confirmation -```tsx - - Invoice Created - Invoice #INV-0042 has been sent to the customer. - -``` + ### Warning with Action @@ -163,12 +123,7 @@ Alerts are styled with the library's internal `astw:`-prefixed utilities. Write 1. **Using `className`** on `Alert.Root` for additional styles 2. **Using `alertVariants`** utility to apply variant classes to custom elements -```tsx -import { alertVariants } from "@tailor-platform/app-shell"; -import { cn } from "@/lib/utils"; - -
Custom alert container
; -``` + ## Related Components diff --git a/docs-src/components/autocomplete.docs.examples.tsx b/docs-src/components/autocomplete.docs.examples.tsx index 562512aa2..0e8c14480 100644 --- a/docs-src/components/autocomplete.docs.examples.tsx +++ b/docs-src/components/autocomplete.docs.examples.tsx @@ -9,3 +9,36 @@ export function BasicUsage() { /> ); } + +export function GroupedSuggestions() { + const cities = [ + { label: "Japan", items: ["Tokyo", "Osaka", "Kyoto"] }, + { label: "France", items: ["Paris", "Lyon", "Marseille"] }, + ]; + + return ( + + ); +} + +export function ObjectItems() { + type City = { code: string; name: string }; + const cities: City[] = [ + { code: "TYO", name: "Tokyo" }, + { code: "OSA", name: "Osaka" }, + ]; + + return ( + ({ label: city.name, key: city.code })} + aria-label="City name" + placeholder="Search cities..." + onValueChange={(name) => console.log(name)} + /> + ); +} + +export function AccessibleName() { + return ; +} diff --git a/docs-src/components/autocomplete.docs.outline.md b/docs-src/components/autocomplete.docs.outline.md index e38f6f72e..1de50b6f1 100644 --- a/docs-src/components/autocomplete.docs.outline.md +++ b/docs-src/components/autocomplete.docs.outline.md @@ -61,34 +61,13 @@ interface ItemGroup { ## Grouped Suggestions -```tsx -const cities = [ - { label: "Japan", items: ["Tokyo", "Osaka", "Kyoto"] }, - { label: "France", items: ["Paris", "Lyon", "Marseille"] }, -]; - -; -``` + ## Object Items with mapItem When items are objects, use `mapItem` to tell the component how to display them. The selected value is the item's `label` string returned by `mapItem`: -```tsx -type City = { code: string; name: string }; - -const cities: City[] = [ - { code: "TYO", name: "Tokyo" }, - { code: "OSA", name: "Osaka" }, -]; - - ({ label: city.name, key: city.code })} - placeholder="Search cities..." - onValueChange={(name) => console.log(name)} // receives "Tokyo", "Osaka", etc. -/>; -``` + ## Async Suggestions @@ -257,9 +236,7 @@ const suggestions = Autocomplete.useAsync({ - Selecting a suggestion fills the input with the item's label - When used standalone (no visible `
); } + +export function SolidAndSubtleVariants() { + return ( +
+ Default + Approved + Pending + Rejected + Draft + New + Matched + Needs Attention + Needs Review + In Progress + Archived +
+ ); +} + +export function OutlineVariants() { + return ( +
+ Active + In Progress + Failed + Info + Inactive +
+ ); +} + +export function OrderStatuses() { + const variantMap: Record = { + pending: "outline-warning", + processing: "outline-info", + shipped: "outline-success", + delivered: "success", + cancelled: "outline-error", + }; + + return ( +
+ {["pending", "processing", "shipped", "delivered", "cancelled", "draft"].map((status) => ( + + {status.toUpperCase()} + + ))} +
+ ); +} + +export function WithIcons() { + return ( +
+ + + Verified + + + + Review + + + + Blocked + +
+ ); +} + +export function DynamicVariants() { + function ProductBadge({ product }: { product: { name: string; stock: number } }) { + let variant: BadgeVariant = "success"; + if (product.stock === 0) { + variant = "error"; + } else if (product.stock < 10) { + variant = "warning"; + } + + return {product.stock} in stock; + } + + return ( +
+ + + +
+ ); +} + +export function CustomStyling() { + return ( + + Premium + + ); +} + +export function StylingUtility() { + return
Custom Badge
; +} diff --git a/docs-src/components/badge.docs.outline.md b/docs-src/components/badge.docs.outline.md index 3272298e9..da358d257 100644 --- a/docs-src/components/badge.docs.outline.md +++ b/docs-src/components/badge.docs.outline.md @@ -17,6 +17,8 @@ The `Badge` component displays status indicators, labels, and tags with multiple import { Badge, type BadgeVariant, type BadgeOptions } from "@tailor-platform/app-shell"; ``` +The examples below also import `badgeVariants` from `@tailor-platform/app-shell` and `AlertCircle`, `CheckCircle`, and `XCircle` from `lucide-react`. + ## Basic Usage @@ -27,31 +29,13 @@ import { Badge, type BadgeVariant, type BadgeOptions } from "@tailor-platform/ap Filled variants for high emphasis, plus subtle variants for lower-emphasis status labels: -```tsx -Default -Approved -Pending -Rejected -Draft -New -Matched -Needs Attention -Needs Review -In Progress -Archived -``` + ### Outline Variants with Status Dots Outlined badges with colored status dots for subtle emphasis: -```tsx -Active -In Progress -Failed -Info -Inactive -``` + @@ -98,19 +82,7 @@ interface BadgeOptions { ### Order Status -```tsx -function OrderStatus({ status }: { status: string }) { - const variantMap: Record = { - pending: "outline-warning", - processing: "outline-info", - shipped: "outline-success", - delivered: "success", - cancelled: "outline-error", - }; - - return {status.toUpperCase()}; -} -``` + ### Priority Badges @@ -133,53 +105,15 @@ const priorities = [ ### With Icons -```tsx -import { CheckCircle, AlertCircle, XCircle } from "lucide-react"; - -
- - - Verified - - - - Review - - - - Blocked - -
; -``` + ### Dynamic Variant Selection -```tsx -interface Product { - name: string; - stock: number; -} - -function ProductBadge({ product }: { product: Product }) { - // Determine variant based on stock level - let variant: BadgeVariant = "success"; - if (product.stock === 0) { - variant = "error"; - } else if (product.stock < 10) { - variant = "warning"; - } - - return {product.stock} in stock; -} -``` + ### Custom Styling -```tsx - - Premium - -``` + ## Visual Reference @@ -274,9 +208,4 @@ Badges are styled with the library's internal `astw:`-prefixed utilities. Write 2. **Overriding CSS variables** in your theme 3. **Creating custom variants** using the `badgeVariants` utility -```tsx -import { badgeVariants } from "@tailor-platform/app-shell"; -import { cn } from "@/lib/utils"; - -
Custom Badge
; -``` + diff --git a/docs-src/components/button.docs.examples.tsx b/docs-src/components/button.docs.examples.tsx index 904a18ac5..9adc7084b 100644 --- a/docs-src/components/button.docs.examples.tsx +++ b/docs-src/components/button.docs.examples.tsx @@ -1,6 +1,6 @@ import { PlusIcon } from "lucide-react"; -import { Button } from "@tailor-platform/app-shell"; +import { Button, Link, buttonVariants } from "@tailor-platform/app-shell"; export function BasicUsage() { return ( @@ -38,3 +38,36 @@ export function Sizes() { ); } + +export function RenderProp() { + return ( + + ); +} + +export function FormActions() { + return ( +
+ + +
+ ); +} + +export function IconButton() { + return ( + + ); +} + +export function StylingUtility() { + return ( + + View Table documentation + + ); +} diff --git a/docs-src/components/button.docs.outline.md b/docs-src/components/button.docs.outline.md index 15cf0fa5d..645cdef71 100644 --- a/docs-src/components/button.docs.outline.md +++ b/docs-src/components/button.docs.outline.md @@ -17,6 +17,8 @@ The `Button` component is a styled button with multiple visual variants and size import { Button } from "@tailor-platform/app-shell"; ``` +The examples below also import `Link` and `buttonVariants` from `@tailor-platform/app-shell` and `PlusIcon` from `lucide-react`. + ## Basic Usage @@ -37,14 +39,7 @@ All standard HTML `; -``` + This is the Base UI render pattern — the button's class names and event handlers are applied to the rendered element. @@ -52,12 +47,7 @@ This is the Base UI render pattern — the button's class names and event handle ### Form Actions -```tsx -
- - -
-``` + ### Destructive Confirmation @@ -69,13 +59,7 @@ This is the Base UI render pattern — the button's class names and event handle ### Icon Button -```tsx -import { PlusIcon } from "lucide-react"; - -; -``` + ## TypeScript @@ -87,13 +71,7 @@ import { type ButtonProps } from "@tailor-platform/app-shell"; Use `buttonVariants` to apply button styles to non-button elements: -```tsx -import { buttonVariants } from "@tailor-platform/app-shell"; - - - View Orders -; -``` + ## Accessibility diff --git a/docs-src/components/card.docs.examples.tsx b/docs-src/components/card.docs.examples.tsx index 530beb97e..f981aa090 100644 --- a/docs-src/components/card.docs.examples.tsx +++ b/docs-src/components/card.docs.examples.tsx @@ -1,4 +1,4 @@ -import { Card, Table, Text } from "@tailor-platform/app-shell"; +import { Button, Card, Table, Text } from "@tailor-platform/app-shell"; export function BasicUsage() { return ( @@ -38,3 +38,49 @@ export function EdgeToEdgeTable() { ); } + +export function HeaderOnly() { + return ( + + + + ); +} + +export function ContentOnly() { + return ( + + + No header needed for this card. + + + ); +} + +export function CustomHeaderContent() { + return ( + + + + + + + + + Order + Status + + + + + ORD-12345 + Confirmed + + + + + + ); +} diff --git a/docs-src/components/card.docs.outline.md b/docs-src/components/card.docs.outline.md index 76dbf56c6..4297af1ae 100644 --- a/docs-src/components/card.docs.outline.md +++ b/docs-src/components/card.docs.outline.md @@ -17,6 +17,8 @@ sources: import { Card } from "@tailor-platform/app-shell"; ``` +The examples below also import `Button`, `Table`, and `Text` from `@tailor-platform/app-shell`. + ## Basic Usage @@ -102,36 +104,15 @@ For a scrollable list, put the overflow on `Card.Content`. Rows supply their own ### Header only -```tsx - - - -``` + ### Content only -```tsx - - - No header needed for this card. - - -``` + ### Custom header content -```tsx - - - - - - {/* ... */} - - -``` + ## Related diff --git a/docs-src/components/checkbox.docs.examples.tsx b/docs-src/components/checkbox.docs.examples.tsx index b108cb850..73a70b13a 100644 --- a/docs-src/components/checkbox.docs.examples.tsx +++ b/docs-src/components/checkbox.docs.examples.tsx @@ -1,5 +1,22 @@ -import { Checkbox } from "@tailor-platform/app-shell"; +import { Checkbox, Field } from "@tailor-platform/app-shell"; export function BasicUsage() { return ; } + +export function BoxOnly() { + return ; +} + +export function Disabled() { + return ; +} + +export function WithField() { + return ( + + + You must accept the terms. + + ); +} diff --git a/docs-src/components/checkbox.docs.outline.md b/docs-src/components/checkbox.docs.outline.md index 40f408f9f..ed407d727 100644 --- a/docs-src/components/checkbox.docs.outline.md +++ b/docs-src/components/checkbox.docs.outline.md @@ -17,15 +17,15 @@ The `Checkbox` component is a styled control for boolean fields. It wraps Base U import { Checkbox } from "@tailor-platform/app-shell"; ``` +The examples below also import `Field` from `@tailor-platform/app-shell`. + ## Basic Usage Omit `label` to render just the box — useful for a table row-select cell (pass `aria-label`) or when a `Field.Label` sibling supplies the text. -```tsx - -``` + ## Props @@ -68,20 +68,13 @@ const [checked, setChecked] = useState(false); ### Disabled -```tsx - -``` + ## Use With Field Placed inside a `Field.Root`, `Checkbox` picks up the field's invalid and disabled state automatically — no `error` prop of its own. Use the inline `label` for the checkbox text and `Field.Error` for the message below it. -```tsx - - - You must accept the terms. - -``` + ## React Hook Form diff --git a/docs-src/components/combobox.docs.examples.tsx b/docs-src/components/combobox.docs.examples.tsx index 1007392a3..24cb4c5ac 100644 --- a/docs-src/components/combobox.docs.examples.tsx +++ b/docs-src/components/combobox.docs.examples.tsx @@ -9,3 +9,30 @@ export function BasicUsage() { /> ); } + +export function GroupedItems() { + const fruits = [ + { label: "Citrus", items: ["Orange", "Lemon", "Lime"] }, + { label: "Berries", items: ["Strawberry", "Blueberry"] }, + ]; + + return ( + + ); +} + +export function MultiSelect() { + return ( + console.log(colors)} + /> + ); +} + +export function AccessibleName() { + return ; +} diff --git a/docs-src/components/combobox.docs.outline.md b/docs-src/components/combobox.docs.outline.md index 0aa61924b..e4fda592a 100644 --- a/docs-src/components/combobox.docs.outline.md +++ b/docs-src/components/combobox.docs.outline.md @@ -64,27 +64,13 @@ interface ItemGroup { ## Grouped Items -```tsx -const fruits = [ - { label: "Citrus", items: ["Orange", "Lemon", "Lime"] }, - { label: "Berries", items: ["Strawberry", "Blueberry"] }, -]; - -; -``` + ## Multi-select In multi-select mode, selected items are displayed as chips inside the input: -```tsx - console.log(colors)} -/> -``` + ## Creatable Items @@ -298,9 +284,7 @@ const countries = Combobox.useAsync({ - Multi-select chips have `aria-label` set from the item label - When used standalone (no visible `