@nxds/claude-design 0.0.0-stage → 0.5.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.
Files changed (154) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +21 -2
  3. package/coverage.json +2823 -0
  4. package/coverage.md +174 -0
  5. package/files.json +594 -0
  6. package/package.json +18 -3
  7. package/project/README.md +97 -0
  8. package/project/components/Accordion/README.md +84 -0
  9. package/project/components/Accordion/preview.html +16 -0
  10. package/project/components/Alert/README.md +97 -0
  11. package/project/components/Alert/preview.html +16 -0
  12. package/project/components/AlertDialog/README.md +170 -0
  13. package/project/components/AlertDialog/preview.html +16 -0
  14. package/project/components/AspectRatio/README.md +23 -0
  15. package/project/components/AspectRatio/preview.html +16 -0
  16. package/project/components/Attachment/README.md +127 -0
  17. package/project/components/Attachment/preview.html +16 -0
  18. package/project/components/Avatar/README.md +76 -0
  19. package/project/components/Avatar/preview.html +16 -0
  20. package/project/components/Badge/README.md +27 -0
  21. package/project/components/Badge/preview.html +16 -0
  22. package/project/components/Breadcrumb/README.md +117 -0
  23. package/project/components/Breadcrumb/preview.html +16 -0
  24. package/project/components/Bubble/README.md +57 -0
  25. package/project/components/Bubble/preview.html +16 -0
  26. package/project/components/Button/README.md +35 -0
  27. package/project/components/Button/preview.html +16 -0
  28. package/project/components/ButtonGroup/README.md +54 -0
  29. package/project/components/ButtonGroup/preview.html +16 -0
  30. package/project/components/Card/README.md +92 -0
  31. package/project/components/Card/preview.html +16 -0
  32. package/project/components/Carousel/README.md +85 -0
  33. package/project/components/Carousel/preview.html +16 -0
  34. package/project/components/Chart/README.md +124 -0
  35. package/project/components/Chart/preview.html +16 -0
  36. package/project/components/Checkbox/README.md +30 -0
  37. package/project/components/Checkbox/preview.html +16 -0
  38. package/project/components/ChoiceCard/README.md +61 -0
  39. package/project/components/ChoiceCard/preview.html +16 -0
  40. package/project/components/ChoiceRow/README.md +58 -0
  41. package/project/components/ChoiceRow/preview.html +16 -0
  42. package/project/components/Collapsible/README.md +73 -0
  43. package/project/components/Collapsible/preview.html +16 -0
  44. package/project/components/Combobox/README.md +158 -0
  45. package/project/components/Combobox/preview.html +16 -0
  46. package/project/components/Command/README.md +152 -0
  47. package/project/components/Command/preview.html +16 -0
  48. package/project/components/ContextMenu/README.md +215 -0
  49. package/project/components/ContextMenu/preview.html +16 -0
  50. package/project/components/Cover/preview.html +101 -0
  51. package/project/components/DatePicker/README.md +104 -0
  52. package/project/components/DatePicker/preview.html +16 -0
  53. package/project/components/DescriptionList/README.md +57 -0
  54. package/project/components/DescriptionList/preview.html +16 -0
  55. package/project/components/Dialog/README.md +166 -0
  56. package/project/components/Dialog/preview.html +16 -0
  57. package/project/components/Drawer/README.md +188 -0
  58. package/project/components/Drawer/preview.html +16 -0
  59. package/project/components/DropdownMenu/README.md +250 -0
  60. package/project/components/DropdownMenu/preview.html +16 -0
  61. package/project/components/EmptyState/README.md +84 -0
  62. package/project/components/EmptyState/preview.html +16 -0
  63. package/project/components/Field/README.md +129 -0
  64. package/project/components/Field/preview.html +16 -0
  65. package/project/components/FilterBuilder/README.md +34 -0
  66. package/project/components/FilterBuilder/preview.html +16 -0
  67. package/project/components/FilterChip/README.md +31 -0
  68. package/project/components/FilterChip/preview.html +16 -0
  69. package/project/components/FilterCondition/README.md +66 -0
  70. package/project/components/FilterCondition/preview.html +16 -0
  71. package/project/components/Hide/README.md +26 -0
  72. package/project/components/Hide/preview.html +16 -0
  73. package/project/components/HoverCard/README.md +77 -0
  74. package/project/components/HoverCard/preview.html +16 -0
  75. package/project/components/Input/README.md +37 -0
  76. package/project/components/Input/preview.html +16 -0
  77. package/project/components/InputGroup/README.md +109 -0
  78. package/project/components/InputGroup/preview.html +16 -0
  79. package/project/components/InputOTP/README.md +72 -0
  80. package/project/components/InputOTP/preview.html +16 -0
  81. package/project/components/Item/README.md +124 -0
  82. package/project/components/Item/preview.html +16 -0
  83. package/project/components/Kbd/README.md +40 -0
  84. package/project/components/Kbd/preview.html +16 -0
  85. package/project/components/Label/README.md +25 -0
  86. package/project/components/Label/preview.html +16 -0
  87. package/project/components/Marker/README.md +48 -0
  88. package/project/components/Marker/preview.html +16 -0
  89. package/project/components/Menubar/README.md +266 -0
  90. package/project/components/Menubar/preview.html +16 -0
  91. package/project/components/Message/README.md +78 -0
  92. package/project/components/Message/preview.html +16 -0
  93. package/project/components/MessageScroller/README.md +84 -0
  94. package/project/components/MessageScroller/preview.html +16 -0
  95. package/project/components/MultiSelect/README.md +122 -0
  96. package/project/components/MultiSelect/preview.html +16 -0
  97. package/project/components/NativeSelect/README.md +56 -0
  98. package/project/components/NativeSelect/preview.html +16 -0
  99. package/project/components/NavigationMenu/README.md +153 -0
  100. package/project/components/NavigationMenu/preview.html +16 -0
  101. package/project/components/PageHeader/README.md +86 -0
  102. package/project/components/PageHeader/preview.html +16 -0
  103. package/project/components/Pagination/README.md +123 -0
  104. package/project/components/Pagination/preview.html +16 -0
  105. package/project/components/Popover/README.md +87 -0
  106. package/project/components/Popover/preview.html +16 -0
  107. package/project/components/Progress/README.md +27 -0
  108. package/project/components/Progress/preview.html +16 -0
  109. package/project/components/RadioGroup/README.md +67 -0
  110. package/project/components/RadioGroup/preview.html +16 -0
  111. package/project/components/Resizable/README.md +66 -0
  112. package/project/components/Resizable/preview.html +16 -0
  113. package/project/components/ScrollArea/README.md +42 -0
  114. package/project/components/ScrollArea/preview.html +16 -0
  115. package/project/components/Select/README.md +161 -0
  116. package/project/components/Select/preview.html +16 -0
  117. package/project/components/Separator/README.md +37 -0
  118. package/project/components/Separator/preview.html +16 -0
  119. package/project/components/Sheet/README.md +160 -0
  120. package/project/components/Sheet/preview.html +16 -0
  121. package/project/components/Show/README.md +26 -0
  122. package/project/components/Show/preview.html +16 -0
  123. package/project/components/Sidebar/README.md +290 -0
  124. package/project/components/Sidebar/preview.html +16 -0
  125. package/project/components/Skeleton/README.md +30 -0
  126. package/project/components/Skeleton/preview.html +16 -0
  127. package/project/components/Slider/README.md +38 -0
  128. package/project/components/Slider/preview.html +16 -0
  129. package/project/components/Sonner/README.md +37 -0
  130. package/project/components/Sonner/preview.html +16 -0
  131. package/project/components/Spinner/README.md +27 -0
  132. package/project/components/Spinner/preview.html +16 -0
  133. package/project/components/Switch/README.md +31 -0
  134. package/project/components/Switch/preview.html +16 -0
  135. package/project/components/Table/README.md +120 -0
  136. package/project/components/Table/preview.html +16 -0
  137. package/project/components/Tabs/README.md +81 -0
  138. package/project/components/Tabs/preview.html +16 -0
  139. package/project/components/Textarea/README.md +32 -0
  140. package/project/components/Textarea/preview.html +16 -0
  141. package/project/components/Toggle/README.md +33 -0
  142. package/project/components/Toggle/preview.html +16 -0
  143. package/project/components/ToggleGroup/README.md +64 -0
  144. package/project/components/ToggleGroup/preview.html +16 -0
  145. package/project/components/Toolbar/README.md +123 -0
  146. package/project/components/Toolbar/preview.html +16 -0
  147. package/project/components/Tooltip/README.md +84 -0
  148. package/project/components/Tooltip/preview.html +16 -0
  149. package/project/components/bundle.css +8329 -0
  150. package/project/components/bundle.js +346 -0
  151. package/project/components/index.d.ts +8349 -0
  152. package/project/design-system.json +34 -0
  153. package/project/tokens.css +702 -0
  154. package/project/tokens.json +2998 -0
@@ -0,0 +1,122 @@
1
+ # MultiSelect
2
+
3
+ MultiSelect lets the user search a list and pick several options, shown as chips. Use it for tags, filters and other choices with several answers. For one option, use Combobox or Select.
4
+
5
+ ## On the canvas
6
+
7
+ ```html
8
+ <x-import component-from-global-scope="Nxds.MultiSelect">MultiSelect</x-import>
9
+ ```
10
+
11
+ Attributes set props, kebab-case to camelCase. Element content becomes `children`. An attribute holds text, so a prop that takes an element, a function or an object has no attribute.
12
+
13
+ ## Parts
14
+
15
+ - `Nxds.MultiSelect` — Searchable field for picking several options, shown as chips.
16
+ - `Nxds.MultiSelectContent` — Searchable list of options, shown in a popover.
17
+ - `Nxds.MultiSelectGroup` — Groups related options under an optional `heading`.
18
+ - `Nxds.MultiSelectItem` — Option with a checkbox, found by its `value`, `keywords` or plain-text
19
+ label.
20
+ - `Nxds.MultiSelectSeparator` — Divider between groups or options.
21
+ - `Nxds.MultiSelectTrigger` — Field that shows the selected values, opens the list, and removes the last
22
+ value on Backspace or Delete.
23
+ - `Nxds.MultiSelectValue` — Selected values inside the trigger, shown as removable chips.
24
+
25
+ ## Props
26
+
27
+ ### MultiSelect
28
+
29
+ | Prop | Type | Default | Control |
30
+ | --- | --- | --- | --- |
31
+ | `children` | `React.ReactNode` | | content |
32
+ | `values` | `string[]` | | none (object) |
33
+ | `defaultValues` | `string[]` | | none (object) |
34
+ | `onValuesChange` | `(values: string[]) => void` | | none (function) |
35
+
36
+ ### MultiSelectContent
37
+
38
+ | Prop | Type | Default | Control |
39
+ | --- | --- | --- | --- |
40
+ | `children` | `React.ReactNode` | | content |
41
+ | `searchPlaceholder` | `string` | `"Search…"` | text |
42
+ | `emptyMessage` | `React.ReactNode` | `"No results found."` | none (element) |
43
+ | `className` | `string` | | text |
44
+ | `id` | `string` | | text |
45
+ | `align` | `"end" \| "center" \| "start"` | `"start"` | dropdown |
46
+ | `asChild` | `boolean` | | toggle |
47
+ | `forceMount` | `true` | | toggle |
48
+ | `onEscapeKeyDown` | `(event: KeyboardEvent) => void` | | none (function) |
49
+ | `onPointerDownOutside` | `(event: PointerDownOutsideEvent) => void` | | none (function) |
50
+ | `onFocusOutside` | `(event: FocusOutsideEvent) => void` | | none (function) |
51
+ | `onInteractOutside` | `(event: FocusOutsideEvent \| PointerDownOutsideEvent) => void` | | none (function) |
52
+ | `onOpenAutoFocus` | `(event: Event) => void` | | none (function) |
53
+ | `onCloseAutoFocus` | `(event: Event) => void` | | none (function) |
54
+ | `side` | `"top" \| "bottom" \| "left" \| "right"` | | dropdown |
55
+ | `sideOffset` | `number` | `6` | number |
56
+ | `alignOffset` | `number` | | number |
57
+ | `arrowPadding` | `number` | | number |
58
+ | `avoidCollisions` | `boolean` | | toggle |
59
+ | `collisionBoundary` | `Element \| Boundary[]` | | none (object) |
60
+ | `collisionPadding` | `number \| Partial<Record<"top" \| "bottom" \| "left" \| "right", number>>` | | none (object) |
61
+ | `sticky` | `"partial" \| "always"` | | dropdown |
62
+ | `hideWhenDetached` | `boolean` | | toggle |
63
+ | `updatePositionStrategy` | `"always" \| "optimized"` | | dropdown |
64
+
65
+ ### MultiSelectGroup
66
+
67
+ | Prop | Type | Default | Control |
68
+ | --- | --- | --- | --- |
69
+ | `children` | `React.ReactNode` | | content |
70
+ | `className` | `string` | | text |
71
+ | `id` | `string` | | text |
72
+ | `asChild` | `boolean` | | toggle |
73
+ | `heading` | `React.ReactNode` | | none (element) |
74
+ | `value` | `string` | | text |
75
+ | `forceMount` | `boolean` | | toggle |
76
+
77
+ ### MultiSelectItem
78
+
79
+ | Prop | Type | Default | Control |
80
+ | --- | --- | --- | --- |
81
+ | `value` | `string` | | text |
82
+ | `badgeLabel` | `React.ReactNode` | | none (element) |
83
+ | `onSelect` | `(value: string) => void` | | none (function) |
84
+ | `children` | `React.ReactNode` | | content |
85
+ | `className` | `string` | | text |
86
+ | `id` | `string` | | text |
87
+ | `asChild` | `boolean` | | toggle |
88
+ | `forceMount` | `boolean` | | toggle |
89
+ | `disabled` | `boolean` | | toggle |
90
+ | `keywords` | `string[]` | | none (object) |
91
+
92
+ ### MultiSelectSeparator
93
+
94
+ | Prop | Type | Default | Control |
95
+ | --- | --- | --- | --- |
96
+ | `children` | `React.ReactNode` | | content |
97
+ | `className` | `string` | | text |
98
+ | `id` | `string` | | text |
99
+ | `asChild` | `boolean` | | toggle |
100
+ | `alwaysRender` | `boolean` | | toggle |
101
+
102
+ ### MultiSelectTrigger
103
+
104
+ | Prop | Type | Default | Control |
105
+ | --- | --- | --- | --- |
106
+ | `disabled` | `boolean` | | toggle |
107
+ | `name` | `string` | | text |
108
+ | `type` | `"button" \| "submit" \| "reset"` | | dropdown |
109
+ | `value` | `string \| number \| readonly string[]` | | none (object) |
110
+ | `className` | `string` | | text |
111
+ | `id` | `string` | | text |
112
+ | `children` | `React.ReactNode` | | content |
113
+
114
+ ### MultiSelectValue
115
+
116
+ | Prop | Type | Default | Control |
117
+ | --- | --- | --- | --- |
118
+ | `placeholder` | `React.ReactNode` | `"Select options"` | none (element) |
119
+ | `clickToRemove` | `boolean` | `true` | toggle |
120
+ | `overflowBehavior` | `"wrap" \| "wrap-when-open" \| "cutoff"` | `"wrap-when-open"` | dropdown |
121
+ | `className` | `string` | | text |
122
+ | `id` | `string` | | text |
@@ -0,0 +1,16 @@
1
+ <!-- @dsCard group="Forms" height=120 -->
2
+ <!doctype html>
3
+ <html lang="en">
4
+ <head>
5
+ <meta charset="utf-8">
6
+ <title>MultiSelect</title>
7
+ <style>
8
+ body { margin: 0; background: var(--nx-color-background); color: var(--nx-color-foreground); font-family: var(--font-sans); }
9
+ #root { padding: var(--nx-spacing-6); }
10
+ </style>
11
+ </head>
12
+ <body>
13
+ <div id="root"></div>
14
+ <script>(()=>{var k=Object.create;var p=Object.defineProperty;var E=Object.getOwnPropertyDescriptor;var P=Object.getOwnPropertyNames;var R=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty;var i=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(l){throw e=0,l}};var h=(t,e,l,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of P(e))!b.call(t,o)&&o!==l&&p(t,o,{get:()=>e[o],enumerable:!(a=E(e,o))||a.enumerable});return t};var u=(t,e,l)=>(l=t!=null?k(R(t)):{},h(e||!t||!t.__esModule?p(l,"default",{value:t,enumerable:!0}):l,t));var f=i((N,d)=>{d.exports=window.Nxds});var s=i((C,S)=>{S.exports=window.React});var g=i((j,M)=>{M.exports={createRoot:window.ReactDOM.createRoot}});var r=u(f());var c=u(s());function w(t,e){return e===void 0?t:{...t,key:e}}function n(t,e,l){return(0,c.createElement)(t,w(e,l))}function y(t,e,l){let{children:a,...o}=e;return(0,c.createElement)(t,w(o,l),...a)}var K=[{value:"react",label:"React"},{value:"vue",label:"Vue"},{value:"svelte",label:"Svelte"},{value:"angular",label:"Angular"},{value:"solid",label:"Solid"},{value:"qwik",label:"Qwik"}];function T({placeholder:t="Select frameworks",triggerClassName:e="nx:w-80",...l}){return y(r.MultiSelect,{...l,children:[n(r.MultiSelectTrigger,{"aria-label":"Frameworks",className:e,children:n(r.MultiSelectValue,{placeholder:t})}),n(r.MultiSelectContent,{searchPlaceholder:"Search frameworks…",emptyMessage:"No frameworks found.",children:K.map(a=>n(r.MultiSelectItem,{value:a.value,children:a.label},a.value))})]})}function m(){return n(T,{})}var v=u(s()),x=u(g());(0,x.createRoot)(document.getElementById("root")).render((0,v.createElement)(m));})();</script>
15
+ </body>
16
+ </html>
@@ -0,0 +1,56 @@
1
+ # NativeSelect
2
+
3
+ NativeSelect styles the browser `<select>`, so mobile users get the system picker. Use it for dense forms and long, plain lists. For a styled dropdown use Select, and for search use Combobox.
4
+
5
+ ## On the canvas
6
+
7
+ ```html
8
+ <x-import component-from-global-scope="Nxds.NativeSelect" aria-label="Plan" default-value="pro">
9
+ <x-import component-from-global-scope="Nxds.NativeSelectOption" value="free">Free</x-import>
10
+ <x-import component-from-global-scope="Nxds.NativeSelectOption" value="pro">Pro</x-import>
11
+ <x-import component-from-global-scope="Nxds.NativeSelectOption" value="team">Team</x-import>
12
+ </x-import>
13
+ ```
14
+
15
+ Attributes set props, kebab-case to camelCase. Element content becomes `children`. An attribute holds text, so a prop that takes an element, a function or an object has no attribute.
16
+
17
+ ## Parts
18
+
19
+ - `Nxds.NativeSelect` — Styled native `<select>` that opens the system picker on mobile.
20
+ - `Nxds.NativeSelectOptGroup` — `<optgroup>` for grouping `NativeSelect` options.
21
+ - `Nxds.NativeSelectOption` — `<option>` for `NativeSelect`.
22
+
23
+ ## Props
24
+
25
+ ### NativeSelect
26
+
27
+ | Prop | Type | Default | Control |
28
+ | --- | --- | --- | --- |
29
+ | `children` | `React.ReactNode` | | content |
30
+ | `className` | `string` | | text |
31
+ | `id` | `string` | | text |
32
+ | `name` | `string` | | text |
33
+ | `disabled` | `boolean` | | toggle |
34
+ | `value` | `string \| number \| readonly string[]` | | none (object) |
35
+ | `required` | `boolean` | | toggle |
36
+ | `variant` | `"bordered" \| "borderless"` | `"bordered"` | dropdown |
37
+ | `size` | `"default" \| "sm"` | `"default"` | dropdown |
38
+
39
+ ### NativeSelectOptGroup
40
+
41
+ | Prop | Type | Default | Control |
42
+ | --- | --- | --- | --- |
43
+ | `disabled` | `boolean` | | toggle |
44
+ | `className` | `string` | | text |
45
+ | `id` | `string` | | text |
46
+ | `children` | `React.ReactNode` | | content |
47
+
48
+ ### NativeSelectOption
49
+
50
+ | Prop | Type | Default | Control |
51
+ | --- | --- | --- | --- |
52
+ | `disabled` | `boolean` | | toggle |
53
+ | `value` | `string \| number \| readonly string[]` | | none (object) |
54
+ | `className` | `string` | | text |
55
+ | `id` | `string` | | text |
56
+ | `children` | `React.ReactNode` | | content |
@@ -0,0 +1,16 @@
1
+ <!-- @dsCard group="Forms" height=120 -->
2
+ <!doctype html>
3
+ <html lang="en">
4
+ <head>
5
+ <meta charset="utf-8">
6
+ <title>NativeSelect</title>
7
+ <style>
8
+ body { margin: 0; background: var(--nx-color-background); color: var(--nx-color-foreground); font-family: var(--font-sans); }
9
+ #root { padding: var(--nx-spacing-6); }
10
+ </style>
11
+ </head>
12
+ <body>
13
+ <div id="root"></div>
14
+ <script>(()=>{var P=Object.create;var s=Object.defineProperty;var R=Object.getOwnPropertyDescriptor;var K=Object.getOwnPropertyNames;var O=Object.getPrototypeOf,T=Object.prototype.hasOwnProperty;var c=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(r){throw e=0,r}};var g=(t,e,r,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of K(e))!T.call(t,o)&&o!==r&&s(t,o,{get:()=>e[o],enumerable:!(a=R(e,o))||a.enumerable});return t};var i=(t,e,r)=>(r=t!=null?P(O(t)):{},g(e||!t||!t.__esModule?s(r,"default",{value:t,enumerable:!0}):r,t));var f=c((D,d)=>{d.exports=window.Nxds});var m=c((j,y)=>{y.exports=window.React});var E=c((k,w)=>{w.exports={createRoot:window.ReactDOM.createRoot}});var n=i(f());var l=i(m());function v(t,e){return e===void 0?t:{...t,key:e}}function p(t,e,r){return(0,l.createElement)(t,v(e,r))}function x(t,e,r){let{children:a,...o}=e;return(0,l.createElement)(t,v(o,r),...a)}function u(){return x(n.NativeSelect,{"aria-label":"Plan",defaultValue:"pro",children:[p(n.NativeSelectOption,{value:"free",children:"Free"}),p(n.NativeSelectOption,{value:"pro",children:"Pro"}),p(n.NativeSelectOption,{value:"team",children:"Team"})]})}var N=i(m()),S=i(E());(0,S.createRoot)(document.getElementById("root")).render((0,N.createElement)(u));})();</script>
15
+ </body>
16
+ </html>
@@ -0,0 +1,153 @@
1
+ # NavigationMenu
2
+
3
+ NavigationMenu shows top-level site links, with flyout panels for groups of pages. Use it for a website header. For app commands, use Menubar.
4
+
5
+ ## On the canvas
6
+
7
+ ```html
8
+ <x-import component-from-global-scope="Nxds.NavigationMenu">
9
+ <x-import component-from-global-scope="Nxds.NavigationMenuList">
10
+ <x-import component-from-global-scope="Nxds.NavigationMenuItem">
11
+ <x-import component-from-global-scope="Nxds.NavigationMenuTrigger">Products</x-import>
12
+ <x-import component-from-global-scope="Nxds.NavigationMenuContent">
13
+ <ul class="nx:grid nx:w-[320px] nx:gap-1 nx:p-2">
14
+ <li>
15
+ <x-import component-from-global-scope="Nxds.NavigationMenuLink" href="#analytics">Analytics</x-import>
16
+ </li>
17
+ <li>
18
+ <x-import component-from-global-scope="Nxds.NavigationMenuLink" href="#automation">Automation</x-import>
19
+ </li>
20
+ <li>
21
+ <x-import component-from-global-scope="Nxds.NavigationMenuLink" href="#reports">Reports</x-import>
22
+ </li>
23
+ </ul>
24
+ </x-import>
25
+ </x-import>
26
+ <x-import component-from-global-scope="Nxds.NavigationMenuItem">
27
+ <x-import component-from-global-scope="Nxds.NavigationMenuTrigger">Company</x-import>
28
+ <x-import component-from-global-scope="Nxds.NavigationMenuContent">
29
+ <ul class="nx:grid nx:w-[320px] nx:gap-1 nx:p-2">
30
+ <li>
31
+ <x-import component-from-global-scope="Nxds.NavigationMenuLink" href="#about">About</x-import>
32
+ </li>
33
+ <li>
34
+ <x-import component-from-global-scope="Nxds.NavigationMenuLink" href="#careers">Careers</x-import>
35
+ </li>
36
+ </ul>
37
+ </x-import>
38
+ </x-import>
39
+ </x-import>
40
+ </x-import>
41
+ ```
42
+
43
+ Attributes set props, kebab-case to camelCase. Element content becomes `children`. An attribute holds text, so a prop that takes an element, a function or an object has no attribute.
44
+
45
+ ## Parts
46
+
47
+ - `Nxds.NavigationMenu` — Top-level site navigation with flyout panels.
48
+ - `Nxds.NavigationMenuContent` — Flyout panel for a navigation item.
49
+ - `Nxds.NavigationMenuIndicator` — Small arrow from the open trigger to its flyout.
50
+ - `Nxds.NavigationMenuItem` — One top-level navigation item, with its trigger and content.
51
+ - `Nxds.NavigationMenuLink` — Link inside a flyout panel.
52
+ - `Nxds.NavigationMenuList` — Horizontal list of top-level navigation items.
53
+ - `Nxds.NavigationMenuTrigger` — Button that opens the item's flyout.
54
+ - `Nxds.NavigationMenuViewport` — Shared panel that shows the open item's content.
55
+
56
+ ## Props
57
+
58
+ ### NavigationMenu
59
+
60
+ | Prop | Type | Default | Control |
61
+ | --- | --- | --- | --- |
62
+ | `viewport` | `boolean` | `true` | toggle |
63
+ | `value` | `string` | | text |
64
+ | `defaultValue` | `string` | | text |
65
+ | `onValueChange` | `(value: string) => void` | | none (function) |
66
+ | `dir` | `"ltr" \| "rtl"` | | dropdown |
67
+ | `orientation` | `"horizontal" \| "vertical"` | | dropdown |
68
+ | `delayDuration` | `number` | | number |
69
+ | `skipDelayDuration` | `number` | | number |
70
+ | `children` | `React.ReactNode` | | content |
71
+ | `className` | `string` | | text |
72
+ | `id` | `string` | | text |
73
+ | `asChild` | `boolean` | | toggle |
74
+
75
+ ### NavigationMenuContent
76
+
77
+ | Prop | Type | Default | Control |
78
+ | --- | --- | --- | --- |
79
+ | `forceMount` | `true` | | toggle |
80
+ | `children` | `React.ReactNode` | | content |
81
+ | `className` | `string` | | text |
82
+ | `id` | `string` | | text |
83
+ | `asChild` | `boolean` | | toggle |
84
+ | `onEscapeKeyDown` | `(event: KeyboardEvent) => void` | | none (function) |
85
+ | `onPointerDownOutside` | `(event: PointerDownOutsideEvent) => void` | | none (function) |
86
+ | `onFocusOutside` | `(event: FocusOutsideEvent) => void` | | none (function) |
87
+ | `onInteractOutside` | `(event: FocusOutsideEvent \| PointerDownOutsideEvent) => void` | | none (function) |
88
+
89
+ ### NavigationMenuIndicator
90
+
91
+ | Prop | Type | Default | Control |
92
+ | --- | --- | --- | --- |
93
+ | `forceMount` | `true` | | toggle |
94
+ | `children` | `React.ReactNode` | | content |
95
+ | `className` | `string` | | text |
96
+ | `id` | `string` | | text |
97
+ | `asChild` | `boolean` | | toggle |
98
+
99
+ ### NavigationMenuItem
100
+
101
+ | Prop | Type | Default | Control |
102
+ | --- | --- | --- | --- |
103
+ | `value` | `string` | | text |
104
+ | `children` | `React.ReactNode` | | content |
105
+ | `className` | `string` | | text |
106
+ | `id` | `string` | | text |
107
+ | `asChild` | `boolean` | | toggle |
108
+
109
+ ### NavigationMenuLink
110
+
111
+ | Prop | Type | Default | Control |
112
+ | --- | --- | --- | --- |
113
+ | `active` | `boolean` | | toggle |
114
+ | `onSelect` | `(event: Event) => void` | | none (function) |
115
+ | `children` | `React.ReactNode` | | content |
116
+ | `className` | `string` | | text |
117
+ | `id` | `string` | | text |
118
+ | `target` | `HTMLAttributeAnchorTarget` | | none (object) |
119
+ | `type` | `string` | | text |
120
+ | `href` | `string` | | text |
121
+ | `asChild` | `boolean` | | toggle |
122
+
123
+ ### NavigationMenuList
124
+
125
+ | Prop | Type | Default | Control |
126
+ | --- | --- | --- | --- |
127
+ | `children` | `React.ReactNode` | | content |
128
+ | `className` | `string` | | text |
129
+ | `id` | `string` | | text |
130
+ | `asChild` | `boolean` | | toggle |
131
+
132
+ ### NavigationMenuTrigger
133
+
134
+ | Prop | Type | Default | Control |
135
+ | --- | --- | --- | --- |
136
+ | `children` | `React.ReactNode` | | content |
137
+ | `className` | `string` | | text |
138
+ | `id` | `string` | | text |
139
+ | `name` | `string` | | text |
140
+ | `type` | `"button" \| "submit" \| "reset"` | | dropdown |
141
+ | `asChild` | `boolean` | | toggle |
142
+ | `disabled` | `boolean` | | toggle |
143
+ | `value` | `string \| number \| readonly string[]` | | none (object) |
144
+
145
+ ### NavigationMenuViewport
146
+
147
+ | Prop | Type | Default | Control |
148
+ | --- | --- | --- | --- |
149
+ | `forceMount` | `true` | | toggle |
150
+ | `children` | `React.ReactNode` | | content |
151
+ | `className` | `string` | | text |
152
+ | `id` | `string` | | text |
153
+ | `asChild` | `boolean` | | toggle |
@@ -0,0 +1,16 @@
1
+ <!-- @dsCard group="Navigation" height=120 -->
2
+ <!doctype html>
3
+ <html lang="en">
4
+ <head>
5
+ <meta charset="utf-8">
6
+ <title>NavigationMenu</title>
7
+ <style>
8
+ body { margin: 0; background: var(--nx-color-background); color: var(--nx-color-foreground); font-family: var(--font-sans); }
9
+ #root { padding: var(--nx-spacing-6); }
10
+ </style>
11
+ </head>
12
+ <body>
13
+ <div id="root"></div>
14
+ <script>(()=>{var h=Object.create;var c=Object.defineProperty;var E=Object.getOwnPropertyDescriptor;var L=Object.getOwnPropertyNames;var k=Object.getPrototypeOf,R=Object.prototype.hasOwnProperty;var p=(n,e)=>()=>{try{return e||n((e={exports:{}}).exports,e),e.exports}catch(o){throw e=0,o}};var P=(n,e,o,u)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of L(e))!R.call(n,a)&&a!==o&&c(n,a,{get:()=>e[a],enumerable:!(u=E(e,a))||u.enumerable});return n};var g=(n,e,o)=>(o=n!=null?h(k(n)):{},P(e||!n||!n.__esModule?c(o,"default",{value:n,enumerable:!0}):o,n));var M=p((C,N)=>{N.exports=window.Nxds});var s=p((K,v)=>{v.exports=window.React});var d=p((b,f)=>{f.exports={createRoot:window.ReactDOM.createRoot}});var t=g(M());var l=g(s());function x(n,e){return e===void 0?n:{...n,key:e}}function i(n,e,o){return(0,l.createElement)(n,x(e,o))}function r(n,e,o){let{children:u,...a}=e;return(0,l.createElement)(n,x(a,o),...u)}function m(){return i(t.NavigationMenu,{children:r(t.NavigationMenuList,{children:[r(t.NavigationMenuItem,{children:[i(t.NavigationMenuTrigger,{children:"Products"}),i(t.NavigationMenuContent,{children:r("ul",{className:"nx:grid nx:w-[320px] nx:gap-1 nx:p-2",children:[i("li",{children:i(t.NavigationMenuLink,{href:"#analytics",children:"Analytics"})}),i("li",{children:i(t.NavigationMenuLink,{href:"#automation",children:"Automation"})}),i("li",{children:i(t.NavigationMenuLink,{href:"#reports",children:"Reports"})})]})})]}),r(t.NavigationMenuItem,{children:[i(t.NavigationMenuTrigger,{children:"Company"}),i(t.NavigationMenuContent,{children:r("ul",{className:"nx:grid nx:w-[320px] nx:gap-1 nx:p-2",children:[i("li",{children:i(t.NavigationMenuLink,{href:"#about",children:"About"})}),i("li",{children:i(t.NavigationMenuLink,{href:"#careers",children:"Careers"})})]})})]})]})})}var y=g(s()),w=g(d());(0,w.createRoot)(document.getElementById("root")).render((0,y.createElement)(m));})();</script>
15
+ </body>
16
+ </html>
@@ -0,0 +1,86 @@
1
+ # PageHeader
2
+
3
+ PageHeader titles a page or section, with optional metadata, status, description and actions. Compact, standard and detail headers are compositions of the same parts, not variants.
4
+
5
+ - The title renders an `h1`. Use `asChild` to pick another heading level.
6
+ - For a larger title, add `className="nx:typography-heading-large"` to PageHeaderTitle.
7
+ - Put page headers inside `main` and section headers inside their `section`.
8
+ - Actions wrap below the content in narrow containers. Your app owns what they do.
9
+
10
+ ## On the canvas
11
+
12
+ ```html
13
+ <x-import component-from-global-scope="Nxds.PageHeader">PageHeader</x-import>
14
+ ```
15
+
16
+ Attributes set props, kebab-case to camelCase. Element content becomes `children`. An attribute holds text, so a prop that takes an element, a function or an object has no attribute.
17
+
18
+ ## Parts
19
+
20
+ - `Nxds.PageHeader` — Title block of a page or section, with optional description, metadata and
21
+ primary actions.
22
+ - `Nxds.PageHeaderActions` — Primary actions of the page.
23
+ - `Nxds.PageHeaderContent` — Stack of metadata, title and description.
24
+ - `Nxds.PageHeaderDescription` — Supporting text under the title.
25
+ - `Nxds.PageHeaderMeta` — Short line above the title, such as a record ID or parent project.
26
+ - `Nxds.PageHeaderTitle` — Title of the page or section, rendered as an `h1`.
27
+ - `Nxds.PageHeaderTitleRow` — Row that puts a status, such as a Badge, beside the title.
28
+
29
+ ## Props
30
+
31
+ ### PageHeader
32
+
33
+ | Prop | Type | Default | Control |
34
+ | --- | --- | --- | --- |
35
+ | `className` | `string` | | text |
36
+ | `id` | `string` | | text |
37
+ | `children` | `React.ReactNode` | | content |
38
+
39
+ ### PageHeaderActions
40
+
41
+ | Prop | Type | Default | Control |
42
+ | --- | --- | --- | --- |
43
+ | `className` | `string` | | text |
44
+ | `id` | `string` | | text |
45
+ | `children` | `React.ReactNode` | | content |
46
+
47
+ ### PageHeaderContent
48
+
49
+ | Prop | Type | Default | Control |
50
+ | --- | --- | --- | --- |
51
+ | `className` | `string` | | text |
52
+ | `id` | `string` | | text |
53
+ | `children` | `React.ReactNode` | | content |
54
+
55
+ ### PageHeaderDescription
56
+
57
+ | Prop | Type | Default | Control |
58
+ | --- | --- | --- | --- |
59
+ | `className` | `string` | | text |
60
+ | `id` | `string` | | text |
61
+ | `children` | `React.ReactNode` | | content |
62
+
63
+ ### PageHeaderMeta
64
+
65
+ | Prop | Type | Default | Control |
66
+ | --- | --- | --- | --- |
67
+ | `className` | `string` | | text |
68
+ | `id` | `string` | | text |
69
+ | `children` | `React.ReactNode` | | content |
70
+
71
+ ### PageHeaderTitle
72
+
73
+ | Prop | Type | Default | Control |
74
+ | --- | --- | --- | --- |
75
+ | `asChild` | `boolean` | `false` | toggle |
76
+ | `className` | `string` | | text |
77
+ | `id` | `string` | | text |
78
+ | `children` | `React.ReactNode` | | content |
79
+
80
+ ### PageHeaderTitleRow
81
+
82
+ | Prop | Type | Default | Control |
83
+ | --- | --- | --- | --- |
84
+ | `className` | `string` | | text |
85
+ | `id` | `string` | | text |
86
+ | `children` | `React.ReactNode` | | content |
@@ -0,0 +1,16 @@
1
+ <!-- @dsCard group="Navigation" height=120 -->
2
+ <!doctype html>
3
+ <html lang="en">
4
+ <head>
5
+ <meta charset="utf-8">
6
+ <title>PageHeader</title>
7
+ <style>
8
+ body { margin: 0; background: var(--nx-color-background); color: var(--nx-color-foreground); font-family: var(--font-sans); }
9
+ #root { padding: var(--nx-spacing-6); }
10
+ </style>
11
+ </head>
12
+ <body>
13
+ <div id="root"></div>
14
+ <script>(()=>{var h=Object.create;var x=Object.defineProperty;var D=Object.getOwnPropertyDescriptor;var K=Object.getOwnPropertyNames;var T=Object.getPrototypeOf,v=Object.prototype.hasOwnProperty;var m=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}};var B=(e,t,r,d)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of K(t))!v.call(e,n)&&n!==r&&x(e,n,{get:()=>t[n],enumerable:!(d=D(t,n))||d.enumerable});return e};var i=(e,t,r)=>(r=e!=null?h(T(e)):{},B(t||!e||!e.__esModule?x(r,"default",{value:e,enumerable:!0}):r,e));var s=m((j,y)=>{y.exports=window.Nxds});var u=m((C,P)=>{P.exports=window.React});var H=m((I,w)=>{w.exports={createRoot:window.ReactDOM.createRoot}});var l=i(s()),o=i(s());var p=i(u());function g(e,t){return t===void 0?e:{...e,key:t}}function a(e,t,r){return(0,p.createElement)(e,g(t,r))}function c(e,t,r){let{children:d,...n}=t;return(0,p.createElement)(e,g(n,r),...d)}function N({title:e=a(o.PageHeaderTitle,{children:"Activity report"})}){return c(o.PageHeader,{children:[c(o.PageHeaderContent,{children:[e,a(o.PageHeaderDescription,{children:"Review activity for the selected period."})]}),c(o.PageHeaderActions,{children:[a(l.Button,{variant:"outline",children:"Export"}),a(l.Button,{children:"Share"})]})]})}function f(){return a("main",{className:"nx:w-full nx:max-w-5xl nx:p-4",children:a(N,{})})}var R=i(u()),E=i(H());(0,E.createRoot)(document.getElementById("root")).render((0,R.createElement)(f));})();</script>
15
+ </body>
16
+ </html>
@@ -0,0 +1,123 @@
1
+ # Pagination
2
+
3
+ Pagination links to the pages of a long list or table. Use it when results are split across pages. Your app decides which page numbers to show.
4
+
5
+ ## On the canvas
6
+
7
+ ```html
8
+ <x-import component-from-global-scope="Nxds.Pagination">
9
+ <x-import component-from-global-scope="Nxds.PaginationContent">
10
+ <x-import component-from-global-scope="Nxds.PaginationItem">
11
+ <x-import component-from-global-scope="Nxds.PaginationPrevious" href="#"></x-import>
12
+ </x-import>
13
+ <x-import component-from-global-scope="Nxds.PaginationItem">
14
+ <x-import component-from-global-scope="Nxds.PaginationLink" href="#">1</x-import>
15
+ </x-import>
16
+ <x-import component-from-global-scope="Nxds.PaginationItem">
17
+ <x-import component-from-global-scope="Nxds.PaginationLink" href="#" is-active>2</x-import>
18
+ </x-import>
19
+ <x-import component-from-global-scope="Nxds.PaginationItem">
20
+ <x-import component-from-global-scope="Nxds.PaginationLink" href="#">3</x-import>
21
+ </x-import>
22
+ <x-import component-from-global-scope="Nxds.PaginationItem">
23
+ <x-import component-from-global-scope="Nxds.PaginationEllipsis"></x-import>
24
+ </x-import>
25
+ <x-import component-from-global-scope="Nxds.PaginationItem">
26
+ <x-import component-from-global-scope="Nxds.PaginationLink" href="#">10</x-import>
27
+ </x-import>
28
+ <x-import component-from-global-scope="Nxds.PaginationItem">
29
+ <x-import component-from-global-scope="Nxds.PaginationNext" href="#"></x-import>
30
+ </x-import>
31
+ </x-import>
32
+ </x-import>
33
+ ```
34
+
35
+ Attributes set props, kebab-case to camelCase. Element content becomes `children`. An attribute holds text, so a prop that takes an element, a function or an object has no attribute.
36
+
37
+ ## Parts
38
+
39
+ - `Nxds.Pagination` — Page navigation for lists and tables, in a `navigation` landmark.
40
+ - `Nxds.PaginationContent` — `<ul>` that lays out the pagination items in a row.
41
+ - `Nxds.PaginationEllipsis` — Marker for skipped page numbers.
42
+ - `Nxds.PaginationItem` — One `<li>` in the pagination row.
43
+ - `Nxds.PaginationLink` — Page number link styled as a `ghost` button, or `outline` for the current
44
+ page.
45
+ - `Nxds.PaginationNext` — Link to the next page, with the label "Next" and a right chevron.
46
+ - `Nxds.PaginationPrevious` — Link to the previous page, with a left chevron and the label "Previous".
47
+
48
+ ## Props
49
+
50
+ ### Pagination
51
+
52
+ | Prop | Type | Default | Control |
53
+ | --- | --- | --- | --- |
54
+ | `className` | `string` | | text |
55
+ | `id` | `string` | | text |
56
+ | `children` | `React.ReactNode` | | content |
57
+
58
+ ### PaginationContent
59
+
60
+ | Prop | Type | Default | Control |
61
+ | --- | --- | --- | --- |
62
+ | `className` | `string` | | text |
63
+ | `id` | `string` | | text |
64
+ | `children` | `React.ReactNode` | | content |
65
+
66
+ ### PaginationEllipsis
67
+
68
+ | Prop | Type | Default | Control |
69
+ | --- | --- | --- | --- |
70
+ | `className` | `string` | | text |
71
+ | `id` | `string` | | text |
72
+ | `children` | `React.ReactNode` | | content |
73
+
74
+ ### PaginationItem
75
+
76
+ | Prop | Type | Default | Control |
77
+ | --- | --- | --- | --- |
78
+ | `value` | `string \| number \| readonly string[]` | | none (object) |
79
+ | `className` | `string` | | text |
80
+ | `id` | `string` | | text |
81
+ | `children` | `React.ReactNode` | | content |
82
+
83
+ ### PaginationLink
84
+
85
+ | Prop | Type | Default | Control |
86
+ | --- | --- | --- | --- |
87
+ | `isActive` | `boolean` | | toggle |
88
+ | `asChild` | `boolean` | `false` | toggle |
89
+ | `href` | `string` | | text |
90
+ | `target` | `HTMLAttributeAnchorTarget` | | none (object) |
91
+ | `type` | `string` | | text |
92
+ | `className` | `string` | | text |
93
+ | `id` | `string` | | text |
94
+ | `children` | `React.ReactNode` | | content |
95
+ | `size` | `"default" \| "sm" \| "lg" \| "icon-sm" \| "icon" \| "icon-lg"` | `"icon"` | dropdown |
96
+
97
+ ### PaginationNext
98
+
99
+ | Prop | Type | Default | Control |
100
+ | --- | --- | --- | --- |
101
+ | `isActive` | `boolean` | | toggle |
102
+ | `asChild` | `boolean` | `false` | toggle |
103
+ | `href` | `string` | | text |
104
+ | `target` | `HTMLAttributeAnchorTarget` | | none (object) |
105
+ | `type` | `string` | | text |
106
+ | `className` | `string` | | text |
107
+ | `id` | `string` | | text |
108
+ | `children` | `React.ReactNode` | | content |
109
+ | `size` | `"default" \| "sm" \| "lg" \| "icon-sm" \| "icon" \| "icon-lg"` | `"default"` | dropdown |
110
+
111
+ ### PaginationPrevious
112
+
113
+ | Prop | Type | Default | Control |
114
+ | --- | --- | --- | --- |
115
+ | `isActive` | `boolean` | | toggle |
116
+ | `asChild` | `boolean` | `false` | toggle |
117
+ | `href` | `string` | | text |
118
+ | `target` | `HTMLAttributeAnchorTarget` | | none (object) |
119
+ | `type` | `string` | | text |
120
+ | `className` | `string` | | text |
121
+ | `id` | `string` | | text |
122
+ | `children` | `React.ReactNode` | | content |
123
+ | `size` | `"default" \| "sm" \| "lg" \| "icon-sm" \| "icon" \| "icon-lg"` | `"default"` | dropdown |
@@ -0,0 +1,16 @@
1
+ <!-- @dsCard group="Navigation" height=120 -->
2
+ <!doctype html>
3
+ <html lang="en">
4
+ <head>
5
+ <meta charset="utf-8">
6
+ <title>Pagination</title>
7
+ <style>
8
+ body { margin: 0; background: var(--nx-color-background); color: var(--nx-color-foreground); font-family: var(--font-sans); }
9
+ #root { padding: var(--nx-spacing-6); }
10
+ </style>
11
+ </head>
12
+ <body>
13
+ <div id="root"></div>
14
+ <script>(()=>{var I=Object.create;var f=Object.defineProperty;var k=Object.getOwnPropertyDescriptor;var R=Object.getOwnPropertyNames;var K=Object.getPrototypeOf,L=Object.prototype.hasOwnProperty;var g=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(o){throw t=0,o}};var D=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of R(t))!L.call(e,a)&&a!==o&&f(e,a,{get:()=>t[a],enumerable:!(r=k(t,a))||r.enumerable});return e};var m=(e,t,o)=>(o=e!=null?I(K(e)):{},D(t||!e||!e.__esModule?f(o,"default",{value:e,enumerable:!0}):o,e));var u=g((j,c)=>{c.exports=window.Nxds});var p=g((v,d)=>{d.exports=window.React});var h=g((B,x)=>{x.exports={createRoot:window.ReactDOM.createRoot}});var n=m(u());var P=m(p());function l(e,t){return t===void 0?e:{...e,key:t}}function i(e,t,o){return(0,P.createElement)(e,l(t,o))}function y(e,t,o){let{children:r,...a}=t;return(0,P.createElement)(e,l(a,o),...r)}function s(){return i(n.Pagination,{children:y(n.PaginationContent,{children:[i(n.PaginationItem,{children:i(n.PaginationPrevious,{href:"#"})}),i(n.PaginationItem,{children:i(n.PaginationLink,{href:"#",children:"1"})}),i(n.PaginationItem,{children:i(n.PaginationLink,{href:"#",isActive:!0,children:"2"})}),i(n.PaginationItem,{children:i(n.PaginationLink,{href:"#",children:"3"})}),i(n.PaginationItem,{children:i(n.PaginationEllipsis,{})}),i(n.PaginationItem,{children:i(n.PaginationLink,{href:"#",children:"10"})}),i(n.PaginationItem,{children:i(n.PaginationNext,{href:"#"})})]})})}var w=m(p()),E=m(h());(0,E.createRoot)(document.getElementById("root")).render((0,w.createElement)(s));})();</script>
15
+ </body>
16
+ </html>