@zvoove/unity-ui 2.40.1 → 2.42.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 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, Wizard steps, Progress steps, Status steps, Step indicator | **StatusStepper** |
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
@@ -658,7 +658,7 @@ PopUpMenuItem special props:
658
658
  ## DATA DISPLAY COMPONENTS
659
659
 
660
660
  ### Table
661
- Data table with sorting, expandable rows, and actions.
661
+ Data table with sorting, expandable rows, actions, section rows, and clickable rows.
662
662
  ```tsx
663
663
  import { Table } from '@zvoove/unity-ui';
664
664
 
@@ -670,8 +670,9 @@ const columns = [
670
670
 
671
671
  <Table
672
672
  columns={columns} // TableColumnProps[] (required)
673
- data={[ // TableRowData[] (required)
674
- { id: '1', name: 'John Doe', email: 'john@example.com', role: 'Admin' },
673
+ data={[ // TableBodyRow[] (required)
674
+ { name: 'John Doe', email: 'john@example.com', role: 'Admin' },
675
+ { type: 'section', label: 'Diese Woche' },
675
676
  ]}
676
677
  title="Users" // string
677
678
  subtitle="All active users" // string
@@ -684,8 +685,20 @@ const columns = [
684
685
  expandedRows={['1']} // string[]
685
686
  emptyState="No data found" // ReactNode
686
687
  footer={footerContent} // ReactNode
688
+ onRowClick={(event, row, index) => {}} // data-row callback
689
+ linkComponent={Link} // ElementType, defaults to 'a'
690
+ getRowLinkProps={(_, index) => ({ href: `/users/${index}` })}
691
+ rowAriaLabel="Open row" // accessible name fallback
687
692
  />
688
693
  ```
694
+ Section rows use `{ type: 'section', label, id? }` and span all visible columns.
695
+ Data rows can provide `onClick`, `href`, `to`, and `linkProps`. Use `href` with
696
+ the default anchor; use `to` with a custom router `linkComponent`. For links
697
+ that need additional router props, use `getRowLinkProps`. The `index` passed to
698
+ `onRowClick` and `getRowLinkProps` is the position in `data`, including section
699
+ rows. `rowAriaLabel` supplies a fallback accessible name when no non-empty
700
+ string cell is available. The row keys `type`, `onClick`, `href`, `to`, `target`,
701
+ `rel`, `linkProps`, and `expandableRow` are reserved for Table behavior.
689
702
 
690
703
  ### Tag
691
704
  Colored label/badge for categorization.
@@ -945,6 +958,31 @@ import { Tabs } from '@zvoove/unity-ui';
945
958
  />
946
959
  ```
947
960
 
961
+ ### TabStepper
962
+ Interactive step navigation with status icons, subtitles, overflow scrolling, and optional panels.
963
+ ```tsx
964
+ import { TabStepper } from '@zvoove/unity-ui';
965
+
966
+ <TabStepper
967
+ items={[
968
+ { id: 'work-app', title: 'Work App', subtitle: 'Abgeschlossen', status: 'done' },
969
+ { id: 'master-data', title: 'Stammdaten', subtitle: '3 von 8 Feldern' },
970
+ { id: 'contract', title: 'Vertrag', subtitle: 'Nicht gestartet' },
971
+ ]}
972
+ activeItem="master-data" // string (required)
973
+ onChange={handleChange} // (item: TabStepperItem) => void
974
+ itemsAlignment="left" // 'left' | 'center' | 'right' | 'between' | 'around' | 'evenly'
975
+ hideBorder={false} // boolean
976
+ isSticky={true} // boolean
977
+ linkComponent={Link} // React.ElementType (default: 'button')
978
+ panels={[ // TabStepperPanel[]
979
+ { id: 'master-data', children: <div>Stammdaten Inhalt</div> },
980
+ ]}
981
+ />
982
+ ```
983
+
984
+ `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.
985
+
948
986
  ### Breadcrumbs
949
987
  Navigation breadcrumb trail. First item renders as an icon (customizable via `homeIcon`).
950
988
  ```tsx