@zvoove/unity-ui 2.41.0 → 2.43.0
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/dist/bin/cli.mjs +41 -1
- package/dist/bin/generate-skills.mjs +8 -0
- package/dist/llms.txt +42 -3
- package/dist/unity-ui.cjs.js +1 -1
- package/dist/unity-ui.css +1 -1
- package/dist/unity-ui.d.ts +192 -11
- package/dist/unity-ui.es.js +169 -163
- package/package.json +27 -25
package/dist/bin/cli.mjs
CHANGED
|
@@ -342,6 +342,36 @@ function generateRulesContent() {
|
|
|
342
342
|
- **Always verify props before using them**: Before passing any prop to a Unity UI component, confirm it exists in the component's TypeScript type (e.g. \`ButtonProps\`, \`GridItemProps\`). Do NOT assume a prop exists because it exists on a similar component or seems logical. When in doubt, read the type definition or run a grep. Known traps: \`Button\` has no \`iconPosition\` prop; \`Grid.Item\` has no \`height\` prop (only \`Grid\` does)
|
|
343
343
|
- **No markdown tables in MDX files**: Storybook uses MDX2/3 which does NOT support GitHub Flavored Markdown tables. Never use \`| col | col |\` pipe-table syntax in \`.mdx\` files \u2014 it will not render. Use HTML \`<table>\` elements instead. Markdown tables are fine in \`.md\` files (rules, profiles, skills) since those are only read by AI agents, not rendered by Storybook
|
|
344
344
|
|
|
345
|
+
## Storybook MCP
|
|
346
|
+
|
|
347
|
+
Unity UI ships a Storybook MCP server that exposes live component documentation,
|
|
348
|
+
story previews, and test tools. Both profiles (Designer and Developer) rely on it.
|
|
349
|
+
|
|
350
|
+
### Prerequisites
|
|
351
|
+
|
|
352
|
+
1. **Storybook must be running** \u2014 start it with \`pnpm storybook\` (serves on \`localhost:6006\`).
|
|
353
|
+
2. **The MCP server must be registered in your IDE.** The repo includes a \`.mcp.json\`
|
|
354
|
+
that some editors pick up automatically. If your editor does not, add the server
|
|
355
|
+
manually:
|
|
356
|
+
|
|
357
|
+
| Setting | Value |
|
|
358
|
+
| ------- | --------------------------- |
|
|
359
|
+
| Name | \`unity-ui-sb-mcp\` |
|
|
360
|
+
| Type | \`http\` |
|
|
361
|
+
| URL | \`http://localhost:6006/mcp\` |
|
|
362
|
+
|
|
363
|
+
In **Cursor**: Settings \u2192 MCP \u2192 "+ Add new MCP server" and enter the values above.
|
|
364
|
+
|
|
365
|
+
### Available Tools
|
|
366
|
+
|
|
367
|
+
| Tool | Purpose |
|
|
368
|
+
| ---------------------------------- | -------------------------------------------------------------------- |
|
|
369
|
+
| \`list-all-documentation\` | List all documented components and their IDs |
|
|
370
|
+
| \`get-documentation\` | Get props, examples, and usage for a specific component |
|
|
371
|
+
| \`get-documentation-for-story\` | Get docs for a specific story variant |
|
|
372
|
+
| \`get-storybook-story-instructions\` | Get framework-specific story patterns and conventions |
|
|
373
|
+
| \`preview-stories\` | Render story previews \u2014 always share the returned URLs with the user |
|
|
374
|
+
|
|
345
375
|
## Skill Routing
|
|
346
376
|
|
|
347
377
|
Before building UI with Unity UI, load the relevant skill for your task:
|
|
@@ -404,6 +434,7 @@ Load the matching skill for full props, examples, and rules:
|
|
|
404
434
|
| Switch | \`unity-ui-switch\` |
|
|
405
435
|
| Table | \`unity-ui-table\` |
|
|
406
436
|
| Tabs | \`unity-ui-tabs\` |
|
|
437
|
+
| TabStepper | \`unity-ui-tab-stepper\` |
|
|
407
438
|
| Tag | \`unity-ui-tag\` |
|
|
408
439
|
| TextField | \`unity-ui-text-field\` |
|
|
409
440
|
| Textarea | \`unity-ui-textarea\` |
|
|
@@ -431,7 +462,8 @@ When a component is requested by a name not listed above, resolve it using this
|
|
|
431
462
|
| Header, AppBar, Navbar, Navigation bar, Toolbar, App header, Top navigation | **TopBar** |
|
|
432
463
|
| Sidebar, Side menu, Nav, Navigation drawer, NavBar, Left nav | **SideNavigation** |
|
|
433
464
|
| Spinner, Loader, Loading indicator, Loading spinner, Busy indicator | **ProgressIndicator** |
|
|
434
|
-
| Stepper,
|
|
465
|
+
| Stepper, Progress steps, Status steps, Step indicator | **StatusStepper** |
|
|
466
|
+
| Wizard steps, Guided step tabs, Interactive step tabs | **TabStepper** |
|
|
435
467
|
| Context menu, Action menu, Kebab menu, More menu, Dropdown menu, Options menu | **PopUpMenu** |
|
|
436
468
|
| Alert (inline/persistent), Warning banner, Info banner, Notice, Callout, Inline alert | **InfoBox** |
|
|
437
469
|
| Collapsible, Collapse, CollapsePanel, Disclosure (single item) | **Expandable** |
|
|
@@ -625,6 +657,7 @@ var SHADCN_MAP = {
|
|
|
625
657
|
url: "https://ui.shadcn.com/docs/components/data-table"
|
|
626
658
|
},
|
|
627
659
|
Tabs: { name: "Tabs", url: "https://ui.shadcn.com/docs/components/tabs" },
|
|
660
|
+
TabStepper: null,
|
|
628
661
|
Tag: {
|
|
629
662
|
name: "Badge",
|
|
630
663
|
url: "https://ui.shadcn.com/docs/components/badge",
|
|
@@ -719,6 +752,11 @@ var MUI_MAP = {
|
|
|
719
752
|
note: "For advanced features use MUI X DataGrid (@mui/x-data-grid)."
|
|
720
753
|
},
|
|
721
754
|
Tabs: { name: "Tabs", url: `${MUI_BASE}tabs/` },
|
|
755
|
+
TabStepper: {
|
|
756
|
+
name: "Stepper",
|
|
757
|
+
url: `${MUI_BASE}stepper/`,
|
|
758
|
+
note: "TabStepper is interactive tab navigation with step statuses and subtitles."
|
|
759
|
+
},
|
|
722
760
|
Tag: {
|
|
723
761
|
name: "Chip",
|
|
724
762
|
url: `${MUI_BASE}chip/`,
|
|
@@ -784,6 +822,7 @@ var STORYBOOK_MAP = {
|
|
|
784
822
|
Switch: "Forms/Switch",
|
|
785
823
|
Table: "Components/Table",
|
|
786
824
|
Tabs: "Navigation/Tabs",
|
|
825
|
+
TabStepper: "Navigation/TabStepper",
|
|
787
826
|
Tag: "Components/Tag",
|
|
788
827
|
TextField: "Forms/TextField",
|
|
789
828
|
Textarea: "Forms/Textarea",
|
|
@@ -830,6 +869,7 @@ var CATEGORIES = {
|
|
|
830
869
|
StatusStepper: "data-display",
|
|
831
870
|
CodeBlock: "data-display",
|
|
832
871
|
Tabs: "navigation",
|
|
872
|
+
TabStepper: "navigation",
|
|
833
873
|
Breadcrumbs: "navigation",
|
|
834
874
|
SideNavigation: "navigation",
|
|
835
875
|
Pagination: "navigation",
|
|
@@ -211,6 +211,7 @@ var SHADCN_MAP = {
|
|
|
211
211
|
url: "https://ui.shadcn.com/docs/components/data-table"
|
|
212
212
|
},
|
|
213
213
|
Tabs: { name: "Tabs", url: "https://ui.shadcn.com/docs/components/tabs" },
|
|
214
|
+
TabStepper: null,
|
|
214
215
|
Tag: {
|
|
215
216
|
name: "Badge",
|
|
216
217
|
url: "https://ui.shadcn.com/docs/components/badge",
|
|
@@ -305,6 +306,11 @@ var MUI_MAP = {
|
|
|
305
306
|
note: "For advanced features use MUI X DataGrid (@mui/x-data-grid)."
|
|
306
307
|
},
|
|
307
308
|
Tabs: { name: "Tabs", url: `${MUI_BASE}tabs/` },
|
|
309
|
+
TabStepper: {
|
|
310
|
+
name: "Stepper",
|
|
311
|
+
url: `${MUI_BASE}stepper/`,
|
|
312
|
+
note: "TabStepper is interactive tab navigation with step statuses and subtitles."
|
|
313
|
+
},
|
|
308
314
|
Tag: {
|
|
309
315
|
name: "Chip",
|
|
310
316
|
url: `${MUI_BASE}chip/`,
|
|
@@ -370,6 +376,7 @@ var STORYBOOK_MAP = {
|
|
|
370
376
|
Switch: "Forms/Switch",
|
|
371
377
|
Table: "Components/Table",
|
|
372
378
|
Tabs: "Navigation/Tabs",
|
|
379
|
+
TabStepper: "Navigation/TabStepper",
|
|
373
380
|
Tag: "Components/Tag",
|
|
374
381
|
TextField: "Forms/TextField",
|
|
375
382
|
Textarea: "Forms/Textarea",
|
|
@@ -416,6 +423,7 @@ var CATEGORIES = {
|
|
|
416
423
|
StatusStepper: "data-display",
|
|
417
424
|
CodeBlock: "data-display",
|
|
418
425
|
Tabs: "navigation",
|
|
426
|
+
TabStepper: "navigation",
|
|
419
427
|
Breadcrumbs: "navigation",
|
|
420
428
|
SideNavigation: "navigation",
|
|
421
429
|
Pagination: "navigation",
|
package/dist/llms.txt
CHANGED
|
@@ -283,6 +283,7 @@ import { Typography } from '@zvoove/unity-ui';
|
|
|
283
283
|
textAlign="left" // 'left' | 'center' | 'right'
|
|
284
284
|
textTransform="uppercase" // 'uppercase' | 'lowercase' | 'capitalize'
|
|
285
285
|
truncate={2} // number - max lines before truncation
|
|
286
|
+
truncatedBy="word" // 'word' | 'letter' (default: 'word')
|
|
286
287
|
hyphenate={true} // boolean (default: true)
|
|
287
288
|
wrap={true} // boolean
|
|
288
289
|
>
|
|
@@ -658,7 +659,7 @@ PopUpMenuItem special props:
|
|
|
658
659
|
## DATA DISPLAY COMPONENTS
|
|
659
660
|
|
|
660
661
|
### Table
|
|
661
|
-
Data table with sorting, expandable rows, and
|
|
662
|
+
Data table with sorting, expandable rows, actions, section rows, and clickable rows.
|
|
662
663
|
```tsx
|
|
663
664
|
import { Table } from '@zvoove/unity-ui';
|
|
664
665
|
|
|
@@ -670,8 +671,9 @@ const columns = [
|
|
|
670
671
|
|
|
671
672
|
<Table
|
|
672
673
|
columns={columns} // TableColumnProps[] (required)
|
|
673
|
-
data={[ //
|
|
674
|
-
{
|
|
674
|
+
data={[ // TableBodyRow[] (required)
|
|
675
|
+
{ name: 'John Doe', email: 'john@example.com', role: 'Admin' },
|
|
676
|
+
{ type: 'section', label: 'Diese Woche' },
|
|
675
677
|
]}
|
|
676
678
|
title="Users" // string
|
|
677
679
|
subtitle="All active users" // string
|
|
@@ -684,8 +686,20 @@ const columns = [
|
|
|
684
686
|
expandedRows={['1']} // string[]
|
|
685
687
|
emptyState="No data found" // ReactNode
|
|
686
688
|
footer={footerContent} // ReactNode
|
|
689
|
+
onRowClick={(event, row, index) => {}} // data-row callback
|
|
690
|
+
linkComponent={Link} // ElementType, defaults to 'a'
|
|
691
|
+
getRowLinkProps={(_, index) => ({ href: `/users/${index}` })}
|
|
692
|
+
rowAriaLabel="Open row" // accessible name fallback
|
|
687
693
|
/>
|
|
688
694
|
```
|
|
695
|
+
Section rows use `{ type: 'section', label, id? }` and span all visible columns.
|
|
696
|
+
Data rows can provide `onClick`, `href`, `to`, and `linkProps`. Use `href` with
|
|
697
|
+
the default anchor; use `to` with a custom router `linkComponent`. For links
|
|
698
|
+
that need additional router props, use `getRowLinkProps`. The `index` passed to
|
|
699
|
+
`onRowClick` and `getRowLinkProps` is the position in `data`, including section
|
|
700
|
+
rows. `rowAriaLabel` supplies a fallback accessible name when no non-empty
|
|
701
|
+
string cell is available. The row keys `type`, `onClick`, `href`, `to`, `target`,
|
|
702
|
+
`rel`, `linkProps`, and `expandableRow` are reserved for Table behavior.
|
|
689
703
|
|
|
690
704
|
### Tag
|
|
691
705
|
Colored label/badge for categorization.
|
|
@@ -945,6 +959,31 @@ import { Tabs } from '@zvoove/unity-ui';
|
|
|
945
959
|
/>
|
|
946
960
|
```
|
|
947
961
|
|
|
962
|
+
### TabStepper
|
|
963
|
+
Interactive step navigation with status icons, subtitles, overflow scrolling, and optional panels.
|
|
964
|
+
```tsx
|
|
965
|
+
import { TabStepper } from '@zvoove/unity-ui';
|
|
966
|
+
|
|
967
|
+
<TabStepper
|
|
968
|
+
items={[
|
|
969
|
+
{ id: 'work-app', title: 'Work App', subtitle: 'Abgeschlossen', status: 'done' },
|
|
970
|
+
{ id: 'master-data', title: 'Stammdaten', subtitle: '3 von 8 Feldern' },
|
|
971
|
+
{ id: 'contract', title: 'Vertrag', subtitle: 'Nicht gestartet' },
|
|
972
|
+
]}
|
|
973
|
+
activeItem="master-data" // string (required)
|
|
974
|
+
onChange={handleChange} // (item: TabStepperItem) => void
|
|
975
|
+
itemsAlignment="left" // 'left' | 'center' | 'right' | 'between' | 'around' | 'evenly'
|
|
976
|
+
hideBorder={false} // boolean
|
|
977
|
+
isSticky={true} // boolean
|
|
978
|
+
linkComponent={Link} // React.ElementType (default: 'button')
|
|
979
|
+
panels={[ // TabStepperPanel[]
|
|
980
|
+
{ id: 'master-data', children: <div>Stammdaten Inhalt</div> },
|
|
981
|
+
]}
|
|
982
|
+
/>
|
|
983
|
+
```
|
|
984
|
+
|
|
985
|
+
`TabStepperItem` accepts `id`, `title`, optional `subtitle`, optional `stepNumber`, and `status` (`'idle' | 'done' | 'failed' | 'warning'`). Idle steps show their number; other statuses show a green check-circle, red cancel-circle, or warning icon. Titles and subtitles stay on one line; truncated subtitles expose their full value in a tooltip. Set `linkComponent` to render anchors or a custom link component, with link props such as `href` on each item. Use `TabStepper` for interactive guided flows and `StatusStepper` for display-only progress indicators.
|
|
986
|
+
|
|
948
987
|
### Breadcrumbs
|
|
949
988
|
Navigation breadcrumb trail. First item renders as an icon (customizable via `homeIcon`).
|
|
950
989
|
```tsx
|