tembro 3.1.6 → 3.1.7

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 (120) hide show
  1. package/CHANGELOG.md +1 -1
  2. package/README.md +241 -91
  3. package/dist/components/ui/dialog/index.d.ts +3 -1
  4. package/dist/components/ui/select/index.d.ts +6 -3
  5. package/dist/showcase/package-meta.d.ts +3 -3
  6. package/dist/showcase/premium/wizard/index.cjs +1 -0
  7. package/dist/showcase/premium/wizard/index.d.ts +2 -0
  8. package/dist/showcase/premium/wizard/index.js +1 -0
  9. package/dist/showcase/premium/wizard/mock.cjs +1 -0
  10. package/dist/showcase/premium/wizard/mock.d.ts +2 -0
  11. package/dist/showcase/premium/wizard/mock.js +1 -0
  12. package/dist/showcase/premium/wizard/showcase.cjs +1 -0
  13. package/dist/showcase/premium/wizard/showcase.d.ts +2 -0
  14. package/dist/showcase/premium/wizard/showcase.js +1 -0
  15. package/dist/showcase/search-utils.d.ts +1 -1
  16. package/dist/showcase/site-data.d.ts +6 -6
  17. package/dist/src/components/layout/app-sidebar.cjs +1 -1
  18. package/dist/src/components/layout/app-sidebar.js +49 -36
  19. package/dist/src/components/theme-provider.cjs +1 -1
  20. package/dist/src/components/theme-provider.js +1 -1
  21. package/dist/src/components/ui/dialog/index.cjs +1 -1
  22. package/dist/src/components/ui/dialog/index.js +14 -7
  23. package/dist/src/components/ui/select/index.cjs +1 -1
  24. package/dist/src/components/ui/select/index.js +30 -29
  25. package/dist/src/index.cjs +1 -1
  26. package/dist/src/index.js +101 -101
  27. package/dist/src/showcase/component-api-schema.cjs +1 -1
  28. package/dist/src/showcase/component-api-schema.js +868 -9
  29. package/dist/src/showcase/demo-snippets/forms/index.cjs +1 -1
  30. package/dist/src/showcase/demo-snippets/forms/index.js +1 -1
  31. package/dist/src/showcase/fallback.cjs +4 -4
  32. package/dist/src/showcase/fallback.js +354 -181
  33. package/dist/src/showcase/index.cjs +1 -1
  34. package/dist/src/showcase/index.js +2 -2
  35. package/dist/src/showcase/package-meta.cjs +1 -1
  36. package/dist/src/showcase/package-meta.js +1 -1
  37. package/dist/src/showcase/premium/app-sidebar/mock.cjs +3 -2
  38. package/dist/src/showcase/premium/app-sidebar/mock.js +1 -1
  39. package/dist/src/showcase/premium/app-sidebar/showcase.cjs +1 -1
  40. package/dist/src/showcase/premium/app-sidebar/showcase.js +1 -1
  41. package/dist/src/showcase/premium/async-select/showcase.cjs +1 -1
  42. package/dist/src/showcase/premium/async-select/showcase.js +118 -74
  43. package/dist/src/showcase/premium/avatar/showcase.cjs +1 -1
  44. package/dist/src/showcase/premium/avatar/showcase.js +5 -5
  45. package/dist/src/showcase/premium/dialog/mock.cjs +6 -1
  46. package/dist/src/showcase/premium/dialog/mock.js +1 -1
  47. package/dist/src/showcase/premium/dialog/showcase.cjs +1 -1
  48. package/dist/src/showcase/premium/dialog/showcase.js +101 -39
  49. package/dist/src/showcase/premium/form-wrapper/mock.cjs +2 -2
  50. package/dist/src/showcase/premium/form-wrapper/mock.js +2 -2
  51. package/dist/src/showcase/premium/form-wrapper/showcase.cjs +1 -1
  52. package/dist/src/showcase/premium/form-wrapper/showcase.js +1 -1
  53. package/dist/src/showcase/premium/index.cjs +1 -1
  54. package/dist/src/showcase/premium/index.js +9 -3
  55. package/dist/src/showcase/premium/input/showcase.cjs +1 -1
  56. package/dist/src/showcase/premium/input/showcase.js +1 -1
  57. package/dist/src/showcase/premium/json-input/showcase.cjs +1 -1
  58. package/dist/src/showcase/premium/json-input/showcase.js +1 -1
  59. package/dist/src/showcase/premium/select/showcase.cjs +1 -1
  60. package/dist/src/showcase/premium/select/showcase.js +53 -0
  61. package/dist/src/showcase/premium/table/mock.cjs +1 -1
  62. package/dist/src/showcase/premium/table/mock.js +1 -1
  63. package/dist/src/showcase/premium/types.cjs +1 -1
  64. package/dist/src/showcase/premium/types.js +1 -1
  65. package/dist/src/showcase/premium/wizard/index.cjs +1 -0
  66. package/dist/src/showcase/premium/wizard/index.js +3 -0
  67. package/dist/src/showcase/premium/wizard/mock.cjs +25 -0
  68. package/dist/src/showcase/premium/wizard/mock.js +32 -0
  69. package/dist/src/showcase/premium/wizard/showcase.cjs +1 -0
  70. package/dist/src/showcase/premium/wizard/showcase.js +130 -0
  71. package/dist/src/showcase/preview-registry.cjs +1 -1
  72. package/dist/src/showcase/preview-registry.js +6 -6
  73. package/dist/src/showcase/registry-quality.cjs +1 -1
  74. package/dist/src/showcase/registry-quality.js +5 -0
  75. package/dist/src/showcase/registry-specific.cjs +1 -1
  76. package/dist/src/showcase/registry-specific.js +2 -2
  77. package/dist/src/showcase/render-registry-preview.cjs +1 -1
  78. package/dist/src/showcase/render-registry-preview.js +2 -2
  79. package/dist/src/showcase/site-data.cjs +1 -1
  80. package/dist/src/showcase/site-data.js +198 -44
  81. package/dist/src/showcase/tembro-registry.json.cjs +1 -1
  82. package/dist/src/showcase/tembro-registry.json.js +1 -1
  83. package/dist/src/showcase/types.cjs +1 -1
  84. package/dist/src/showcase/types.js +1 -1
  85. package/package.json +7 -3
  86. package/packages/cli/dist/index.cjs +127 -127
  87. package/packages/cli/vendor/src/components/layout/app-sidebar.tsx +31 -6
  88. package/packages/cli/vendor/src/components/theme-provider.tsx +1 -1
  89. package/packages/cli/vendor/src/components/ui/dialog/index.tsx +15 -3
  90. package/packages/cli/vendor/src/components/ui/select/index.tsx +17 -9
  91. package/packages/cli/vendor/src/showcase/component-api-schema.ts +269 -39
  92. package/packages/cli/vendor/src/showcase/demo-snippets/forms/index.ts +1 -1
  93. package/packages/cli/vendor/src/showcase/fallback.tsx +202 -39
  94. package/packages/cli/vendor/src/showcase/index.ts +6 -6
  95. package/packages/cli/vendor/src/showcase/package-meta.ts +3 -3
  96. package/packages/cli/vendor/src/showcase/premium/app-sidebar/mock.ts +3 -2
  97. package/packages/cli/vendor/src/showcase/premium/app-sidebar/showcase.tsx +1 -1
  98. package/packages/cli/vendor/src/showcase/premium/async-select/showcase.tsx +50 -4
  99. package/packages/cli/vendor/src/showcase/premium/avatar/showcase.tsx +5 -5
  100. package/packages/cli/vendor/src/showcase/premium/dialog/mock.ts +6 -1
  101. package/packages/cli/vendor/src/showcase/premium/dialog/showcase.tsx +53 -1
  102. package/packages/cli/vendor/src/showcase/premium/form-wrapper/mock.ts +2 -2
  103. package/packages/cli/vendor/src/showcase/premium/form-wrapper/showcase.tsx +1 -1
  104. package/packages/cli/vendor/src/showcase/premium/index.ts +5 -3
  105. package/packages/cli/vendor/src/showcase/premium/input/showcase.tsx +1 -1
  106. package/packages/cli/vendor/src/showcase/premium/json-input/showcase.tsx +1 -1
  107. package/packages/cli/vendor/src/showcase/premium/select/showcase.tsx +38 -0
  108. package/packages/cli/vendor/src/showcase/premium/table/mock.ts +1 -1
  109. package/packages/cli/vendor/src/showcase/premium/types.ts +1 -1
  110. package/packages/cli/vendor/src/showcase/premium/wizard/index.ts +2 -0
  111. package/packages/cli/vendor/src/showcase/premium/wizard/mock.ts +41 -0
  112. package/packages/cli/vendor/src/showcase/premium/wizard/showcase.tsx +88 -0
  113. package/packages/cli/vendor/src/showcase/preview-registry.tsx +6 -6
  114. package/packages/cli/vendor/src/showcase/registry-quality.ts +5 -0
  115. package/packages/cli/vendor/src/showcase/registry-specific.tsx +2 -2
  116. package/packages/cli/vendor/src/showcase/render-registry-preview.tsx +2 -2
  117. package/packages/cli/vendor/src/showcase/site-data.tsx +89 -32
  118. package/packages/cli/vendor/src/showcase/tembro-registry.json +1 -1
  119. package/packages/cli/vendor/src/showcase/types.ts +1 -1
  120. package/registry.json +1 -1
package/CHANGELOG.md CHANGED
@@ -102,7 +102,7 @@ All notable changes to this project will be documented in this file.
102
102
  - replaced `SavedFilterSelect` browser `prompt()` saving with an inline input flow so saved-view creation is stylable, testable, and accessible
103
103
  - rebuilt `ResizablePanel` into an actual split-panel primitive with draggable and keyboard-accessible handles instead of a fake CSS resize shell
104
104
  - upgraded `MentionInput` into a real trigger-based mention surface with inline suggestions, keyboard selection, and cursor-aware insertion
105
- - synced `JsonInput` validation with controlled values and aligned `TrendCard` success sparkline colors with Azamat UI theme tokens
105
+ - synced `JsonInput` validation with controlled values and aligned `TrendCard` success sparkline colors with Tembro theme tokens
106
106
  - refreshed registry/showcase wiring and CLI vendor copies so the new component behavior ships consistently in both package and source-copy flows
107
107
 
108
108
  ## 0.3.22 - 2026-07-01
package/README.md CHANGED
@@ -1,91 +1,241 @@
1
- # tembro
2
-
3
- tembro is a source-copy-first React UI kit.
4
-
5
- The CLI copies editable component source into your app. New projects should treat local `components` code as the canonical surface.
6
-
7
- ## Start
8
-
9
- Next.js:
10
-
11
- ```bash
12
- npx tembro init --template next --defaults
13
- npx tembro add button input
14
- ```
15
-
16
- Vite:
17
-
18
- ```bash
19
- npx tembro init --template vite --defaults
20
- npx tembro add button input
21
- ```
22
-
23
- ## Use
24
-
25
- After `add`, import from local app source:
26
-
27
- ```tsx
28
- import { Button } from "@/components/ui/button"
29
- import { Input } from "@/components/ui/input"
30
- ```
31
-
32
- ## Core rule
33
-
34
- - `init` sets up config and theme tokens.
35
- - `add` copies component source into your app.
36
- - Local source is the product surface.
37
- - Runtime package import is compatibility-only, not the main path.
38
-
39
- ## Component model
40
-
41
- Every public surface is a component. Repeated behavior should be handled with props, hooks, helpers, and local source files, not separate family abstractions.
42
-
43
- ## Migrating to 3.0
44
-
45
- Replace compatibility component imports with the canonical API:
46
-
47
- ```tsx
48
- // before
49
- <FormNumberInput control={control} name="price" />
50
- <FormAsyncSelect control={control} name="ownerId" loadOptions={loadOwners} />
51
- <AppSidebar items={items} />
52
- <SmartCard title="Account" />
53
-
54
- // after
55
- <FormInput control={control} name="price" kind="number" />
56
- <FormSelect control={control} name="ownerId" kind="async" loadOptions={loadOwners} />
57
- <Sidebar items={items} />
58
- <InfoCard title="Account" />
59
- ```
60
-
61
- The CLI still accepts old component names and redirects them to canonical source-copy entries. Removed incomplete components do not have drop-in replacements; use a production-grade implementation only when the application actually needs that interaction.
62
-
63
- ## Production interaction components
64
-
65
- Install the new drag-and-drop and virtualization surfaces through the CLI:
66
-
67
- ```bash
68
- npx tembro add sortable-list kanban virtual-list data-table
69
- ```
70
-
71
- - `SortableList` supports pointer, touch, and keyboard reordering with controlled or uncontrolled state.
72
- - `KanbanBoard` moves cards within and across columns, including empty columns and canceled operations.
73
- - `VirtualList` keeps large collections responsive by mounting only the visible window.
74
- - `DataTable` enables row virtualization with `virtualization={{ height: 480 }}`.
75
-
76
- ## Current direction
77
-
78
- The docs layer is being rebuilt from scratch around:
79
-
80
- - source-copy workflow
81
- - fewer public component names
82
- - stronger component quality
83
- - simpler theming and API contracts
84
-
85
- ## Local verification
86
-
87
- ```bash
88
- npm run lint
89
- npm run build
90
- npm run test:run
91
- ```
1
+ # tembro
2
+
3
+ tembro is a source-copy-first React UI kit for production dashboards, admin panels, forms, data-heavy screens, and application shells.
4
+
5
+ The package gives you two things:
6
+
7
+ - A CLI that copies editable component source into your app.
8
+ - A typed React component library and registry metadata for docs, migration, and compatibility.
9
+
10
+ ## Why source-copy-first?
11
+
12
+ Most product teams eventually need to change UI behavior, tokens, density, copy, and accessibility details. tembro treats copied local source as the main product surface so your app can own the final implementation without fighting a closed dependency.
13
+
14
+ ## Start
15
+
16
+ Next.js:
17
+
18
+ ```bash
19
+ npx tembro init --template next --defaults
20
+ npx tembro add button input data-table
21
+ ```
22
+
23
+ Vite:
24
+
25
+ ```bash
26
+ npx tembro init --template vite --defaults
27
+ npx tembro add button input data-table
28
+ ```
29
+
30
+ ## Use
31
+
32
+ After `add`, import from your local app source:
33
+
34
+ ```tsx
35
+ import { Button } from "@/components/ui/button"
36
+ import { Input } from "@/components/ui/input"
37
+ import { DataTable } from "@/components/data-table/data-table"
38
+ ```
39
+
40
+ Runtime package imports are compatibility-oriented:
41
+
42
+ ```tsx
43
+ import { Button, Input } from "tembro"
44
+ ```
45
+
46
+ For production apps, prefer the local copied source because it is easier to audit, customize, and ship.
47
+
48
+ ## Core rule
49
+
50
+ - `init` sets up config and theme tokens.
51
+ - `add` copies component source into your app.
52
+ - Local source is the canonical product surface.
53
+ - Runtime package import is available, but it is not the main customization path.
54
+
55
+ ## Public API
56
+
57
+ The public API is intentionally organized by real product surfaces:
58
+
59
+ - `ui`: button, input, select, card, badge, dialog, table, tabs, accordion, primitives.
60
+ - `data-table`: reusable operational table with selection, pagination, toolbar, row actions, mobile cards, pinning, expansion, and virtualization.
61
+ - `form`: React Hook Form wrappers for input, select, textarea, switch, date fields, and field shell.
62
+ - `layout`: sidebar, breadcrumbs, section and page-level composition helpers.
63
+ - `display`: avatar, list, statistic, timeline, QR code, virtual list, typography, carousel, state surfaces.
64
+ - `inputs`: async select, rating, slider, tag input, color picker, signature pad, JSON input, time picker.
65
+ - `overlay`: alert dialog, confirm dialog, drawer.
66
+ - `patterns`: resource pages, form builder, empty state, settings page, data view.
67
+
68
+ Use the registry to discover the available source-copy entries:
69
+
70
+ ```bash
71
+ npx tembro list
72
+ npx tembro add data-table sidebar command-palette
73
+ ```
74
+
75
+ ## Theme tokens
76
+
77
+ `tembro init` writes a managed theme block into your CSS. Edit tokens first, not scattered component classes.
78
+
79
+ Important token families:
80
+
81
+ - `--background`, `--foreground`, `--card`, `--popover`, `--primary`, `--border`, `--ring`.
82
+ - `--aui-radius-control`, `--aui-radius-surface`, `--aui-radius-overlay`.
83
+ - `--aui-control-surface`, `--aui-control-border-strong`, `--aui-control-shadow`.
84
+ - `--aui-sidebar-item-active-bg`, `--aui-sidebar-item-active-fg`, `--aui-sidebar-nav-item-active-bg`.
85
+ - `--aui-table-toolbar-bg`, `--aui-table-row-selected-bg`, `--aui-table-footer-bg`.
86
+
87
+ Use the preserved custom block for app-specific overrides:
88
+
89
+ ```css
90
+ /* tembro:custom-styles:start */
91
+ @layer theme {
92
+ :root {
93
+ --aui-radius-control: 0.5rem;
94
+ }
95
+ }
96
+ /* tembro:custom-styles:end */
97
+ ```
98
+
99
+ ## Production interaction components
100
+
101
+ Install advanced surfaces through the CLI:
102
+
103
+ ```bash
104
+ npx tembro add sortable-list kanban virtual-list data-table command-palette
105
+ ```
106
+
107
+ - `DataTable` supports search, filters, bulk actions, row actions, row click, pagination, mobile card rendering, expansion, column pinning, and virtualization.
108
+ - `SortableList` supports pointer/touch drag ordering with controlled or uncontrolled state.
109
+ - `KanbanBoard` moves cards within and across columns, including empty columns and canceled operations.
110
+ - `VirtualList` keeps large lists responsive by rendering only the visible window.
111
+ - `CommandPalette` supports grouped commands, async groups, recents, shortcuts, loading, and empty states.
112
+
113
+ ## Component model
114
+
115
+ Every public surface should be useful on its own. Repeated behavior belongs in props, hooks, helpers, and local source files, not in many near-duplicate public component names.
116
+
117
+ Preferred direction:
118
+
119
+ ```tsx
120
+ <FormInput control={control} name="price" kind="number" />
121
+ <FormSelect control={control} name="ownerId" kind="async" loadOptions={loadOwners} />
122
+ <Sidebar items={items} />
123
+ <InfoCard title="Account" />
124
+ ```
125
+
126
+ Avoid exposing one-off wrappers unless they solve a real reusable product problem.
127
+
128
+ ## Migration aliases
129
+
130
+ The CLI accepts several old names and redirects them to canonical entries. Examples:
131
+
132
+ ```tsx
133
+ // before
134
+ <FormNumberInput control={control} name="price" />
135
+ <FormAsyncSelect control={control} name="ownerId" loadOptions={loadOwners} />
136
+ <AppSidebar items={items} />
137
+ <SmartCard title="Account" />
138
+
139
+ // after
140
+ <FormInput control={control} name="price" kind="number" />
141
+ <FormSelect control={control} name="ownerId" kind="async" loadOptions={loadOwners} />
142
+ <Sidebar items={items} />
143
+ <InfoCard title="Account" />
144
+ ```
145
+
146
+ Removed incomplete components do not have drop-in replacements. Add production-grade source only when the application actually needs that interaction.
147
+
148
+ ## Production readiness
149
+
150
+ A component is considered production-ready when it has:
151
+
152
+ - Public props documented in the showcase API schema.
153
+ - Real preview coverage, not only a generic placeholder card.
154
+ - Light and dark token coverage through the central theme contract.
155
+ - Keyboard and focus behavior covered where interaction exists.
156
+ - Registry entry, source files, dependencies, migration aliases, and docs metadata kept in sync.
157
+ - Render/build checks passing before publish.
158
+
159
+ ## Release gates
160
+
161
+ Local verification:
162
+
163
+ ```bash
164
+ npm run lint
165
+ npm run build
166
+ npm run test:run
167
+ npm run test:cli
168
+ npm run test:fixtures
169
+ npm run pack:dry-run
170
+ ```
171
+
172
+ Faster package gate:
173
+
174
+ ```bash
175
+ npm run release:quick
176
+ ```
177
+
178
+ Full publish gate:
179
+
180
+ ```bash
181
+ npm run release:gate
182
+ ```
183
+
184
+ The release pipeline checks:
185
+
186
+ - TypeScript and render tests.
187
+ - Registry consistency.
188
+ - Root export governance.
189
+ - API schema coverage against source props.
190
+ - Showcase quality and fallback coverage.
191
+ - Theme contract tokens/selectors.
192
+ - Package contract metadata.
193
+ - CLI behavior and fixture smoke.
194
+ - Build output and npm pack dry run.
195
+
196
+ ## Docs site sync
197
+
198
+ The public docs site lives beside this repo as `azamat-ui`.
199
+
200
+ ```bash
201
+ npm run sync:site
202
+ ```
203
+
204
+ After sync, validate the docs repo:
205
+
206
+ ```bash
207
+ cd ../azamat-ui
208
+ npm run check:version
209
+ npm run build
210
+ npm run smoke:browser
211
+ npm run test:visual
212
+ ```
213
+
214
+ Intentional visual changes require updating baselines in the docs repo:
215
+
216
+ ```bash
217
+ $env:UPDATE_VISUAL_BASELINES='1'; npm run test:visual
218
+ ```
219
+
220
+ ## Current direction
221
+
222
+ The library is moving toward:
223
+
224
+ - source-copy workflow as the default install model
225
+ - fewer, stronger public component names
226
+ - richer component demos with real behavior
227
+ - central theme tokens instead of scattered style overrides
228
+ - registry-driven docs and migration metadata
229
+ - production-grade release gates before every publish
230
+ ## CLI production workflows
231
+
232
+ Tembro CLI includes workflow commands for predictable source-copy usage:
233
+
234
+ ```bash
235
+ npx tembro doctor
236
+ npx tembro list --category data-table
237
+ npx tembro list --json
238
+ npx tembro add data-table --plan
239
+ ```
240
+
241
+ Read the full workflow guide in `docs/cli-workflows.md`.
@@ -11,6 +11,7 @@ export type DialogPopupProps = DialogPrimitive.Popup.Props & {
11
11
  surface?: "default" | "plain";
12
12
  };
13
13
  export type DialogHeaderProps = React.ComponentProps<"div">;
14
+ export type DialogBodyProps = React.ComponentProps<"div">;
14
15
  export type DialogFooterProps = React.ComponentProps<"div"> & {
15
16
  showCloseButton?: boolean;
16
17
  };
@@ -23,7 +24,8 @@ declare function DialogClose({ ...props }: DialogCloseProps): React.JSX.Element;
23
24
  declare function DialogOverlay({ className, ...props }: DialogOverlayProps): React.JSX.Element;
24
25
  declare function DialogContent({ className, children, showCloseButton, size, surface, ...props }: DialogPopupProps): React.JSX.Element;
25
26
  declare function DialogHeader({ className, ...props }: DialogHeaderProps): React.JSX.Element;
27
+ declare function DialogBody({ className, ...props }: DialogBodyProps): React.JSX.Element;
26
28
  declare function DialogFooter({ className, showCloseButton, children, ...props }: DialogFooterProps): React.JSX.Element;
27
29
  declare function DialogTitle({ className, ...props }: DialogTitleProps): React.JSX.Element;
28
30
  declare function DialogDescription({ className, ...props }: DialogDescriptionProps): React.JSX.Element;
29
- export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, };
31
+ export { Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, };
@@ -8,7 +8,9 @@ export type SelectTriggerProps = SelectPrimitive.Trigger.Props & {
8
8
  };
9
9
  export type SelectContentProps = SelectPrimitive.Popup.Props & Pick<SelectPrimitive.Positioner.Props, "align" | "alignOffset" | "side" | "sideOffset" | "alignItemWithTrigger">;
10
10
  export type SelectLabelProps = SelectPrimitive.GroupLabel.Props;
11
- export type SelectItemProps = SelectPrimitive.Item.Props;
11
+ export type SelectItemProps = SelectPrimitive.Item.Props & {
12
+ showIndicator?: boolean;
13
+ };
12
14
  export type SelectSeparatorProps = SelectPrimitive.Separator.Props;
13
15
  export type SelectScrollUpButtonProps = React.ComponentProps<typeof SelectPrimitive.ScrollUpArrow>;
14
16
  export type SelectScrollDownButtonProps = React.ComponentProps<typeof SelectPrimitive.ScrollDownArrow>;
@@ -48,16 +50,17 @@ export type SelectProps = Omit<SelectRootProps, "value" | "defaultValue" | "onVa
48
50
  renderOption?: (option: SelectOption, state: {
49
51
  selected: boolean;
50
52
  }) => React.ReactNode;
53
+ showSelectedIndicator?: boolean;
51
54
  invalid?: boolean;
52
55
  onSearchChange?: (value: string) => void;
53
56
  };
54
- declare function Select({ value, defaultValue, onValueChange, options, groups, placeholder, searchPlaceholder, emptyLabel, emptyMessage, clearLabel, size, clearable, searchable, loading, loadingLabel, disabled, showSelectedDescription, triggerClassName, contentClassName, itemClassName, searchClassName, renderOption, invalid, children, onOpenChange, onSearchChange, ...props }: SelectProps): React.JSX.Element;
57
+ declare function Select({ value, defaultValue, onValueChange, options, groups, placeholder, searchPlaceholder, emptyLabel, emptyMessage, clearLabel, size, clearable, searchable, loading, loadingLabel, disabled, showSelectedDescription, triggerClassName, contentClassName, itemClassName, searchClassName, renderOption, showSelectedIndicator, invalid, children, onOpenChange, onSearchChange, ...props }: SelectProps): React.JSX.Element;
55
58
  declare function SelectGroup({ className, ...props }: SelectGroupProps): React.JSX.Element;
56
59
  declare function SelectValue({ className, ...props }: SelectValueProps): React.JSX.Element;
57
60
  declare function SelectTrigger({ className, size, children, ...props }: SelectTriggerProps): React.JSX.Element;
58
61
  declare function SelectContent({ className, children, side, sideOffset, align, alignOffset, alignItemWithTrigger, ...props }: SelectContentProps): React.JSX.Element;
59
62
  declare function SelectLabel({ className, ...props }: SelectLabelProps): React.JSX.Element;
60
- declare function SelectItem({ className, children, ...props }: SelectItemProps): React.JSX.Element;
63
+ declare function SelectItem({ className, children, showIndicator, ...props }: SelectItemProps): React.JSX.Element;
61
64
  declare function SelectSeparator({ className, ...props }: SelectSeparatorProps): React.JSX.Element;
62
65
  declare function SelectScrollUpButton({ className, ...props }: SelectScrollUpButtonProps): React.JSX.Element;
63
66
  declare function SelectScrollDownButton({ className, ...props }: SelectScrollDownButtonProps): React.JSX.Element;
@@ -1,3 +1,3 @@
1
- export declare const PACKAGE_LATEST_VERSION = "3.1.6";
2
- export declare const PACKAGE_LATEST_RELEASE_DATE = "July 13, 2026";
3
- export declare const PACKAGE_DEPENDENCY_RANGE = "^3.1.6";
1
+ export declare const PACKAGE_LATEST_VERSION = "3.1.7";
2
+ export declare const PACKAGE_LATEST_RELEASE_DATE = "July 15, 2026";
3
+ export declare const PACKAGE_DEPENDENCY_RANGE = "3.1.7";
@@ -0,0 +1 @@
1
+ module.exports = require("../../../src/showcase/premium/wizard/index.cjs")
@@ -0,0 +1,2 @@
1
+ export { wizardMock } from "./mock";
2
+ export { WizardShowcase } from "./showcase";
@@ -0,0 +1 @@
1
+ export * from "../../../src/showcase/premium/wizard/index.js"
@@ -0,0 +1 @@
1
+ module.exports = require("../../../src/showcase/premium/wizard/mock.cjs")
@@ -0,0 +1,2 @@
1
+ import type { ComponentDemoMock } from "../types";
2
+ export declare const wizardMock: ComponentDemoMock;
@@ -0,0 +1 @@
1
+ export * from "../../../src/showcase/premium/wizard/mock.js"
@@ -0,0 +1 @@
1
+ module.exports = require("../../../src/showcase/premium/wizard/showcase.cjs")
@@ -0,0 +1,2 @@
1
+ import * as React from "react";
2
+ export declare function WizardShowcase(): React.JSX.Element;
@@ -0,0 +1 @@
1
+ export * from "../../../src/showcase/premium/wizard/showcase.js"
@@ -3,7 +3,7 @@ export type SearchItem = (typeof globalSearchItems)[number];
3
3
  export declare const searchGroupOrder: Array<SearchItem["group"]>;
4
4
  export declare function searchGroupLabel(group: SearchItem["group"]): "Components" | "Docs" | "Examples" | "Blocks" | "Templates";
5
5
  export declare function isAdvancedSearchItem(item: SearchItem): boolean;
6
- export declare function searchItemKindLabel(item: SearchItem): "Docs page" | "Live example" | "Block" | "Template section" | "Template" | "Surface member" | "API item" | "Component group" | "Component";
6
+ export declare function searchItemKindLabel(item: SearchItem): "Component" | "Docs page" | "Live example" | "Block" | "Template section" | "Template" | "Surface member" | "API item" | "Component group";
7
7
  export declare function getSearchItemByHref(href: string): import("./site-data").GlobalSearchItem | undefined;
8
8
  export declare function scoreSearchItem(item: SearchItem, query: string): number;
9
9
  export declare function getVisibleSearchItems(query: string): import("./site-data").GlobalSearchItem[];
@@ -170,7 +170,7 @@ export type ComponentDetailSidebarSection = {
170
170
  export declare const PACKAGE_NAME = "tembro";
171
171
  export declare const CLI_PACKAGE_NAME = "tembro";
172
172
  export declare const PACKAGE_IMPORT = "tembro";
173
- export declare const DOCS_APP_NAME = "azamat-ui";
173
+ export declare const DOCS_APP_NAME = "tembro";
174
174
  export declare const CLI_INIT_NEXT_COMMAND = "npx tembro init --template next --defaults";
175
175
  export declare const CLI_INIT_VITE_COMMAND = "npx tembro init --template vite --defaults";
176
176
  export declare const CLI_ADD_COMMAND = "npx tembro add button input";
@@ -178,11 +178,11 @@ export declare const PACKAGE_INSTALL_COMMAND = "npx tembro init --template next
178
178
  export declare const CLI_INSTALL_COMMAND = "npx tembro --help";
179
179
  export declare const CLI_THEME_COMMAND = "npx tembro theme";
180
180
  export declare const PACKAGE_NPM_URL = "https://www.npmjs.com/package/tembro";
181
- export declare const PACKAGE_GITHUB_URL = "https://github.com/AzamatJurayev-dev/tembro";
182
- export declare const PACKAGE_GITHUB_RELEASES_URL = "https://github.com/AzamatJurayev-dev/tembro/releases";
183
- export declare const DOCS_REPO_URL = "https://github.com/AzamatJurayev-dev/azamat-ui";
184
- export declare const PACKAGE_RELEASES_URL = "https://github.com/AzamatJurayev-dev/tembro/releases";
185
- export declare const DOCS_RELEASES_URL = "https://github.com/AzamatJurayev-dev/azamat-ui/releases";
181
+ export declare const PACKAGE_GITHUB_URL = "https://github.com/AzamatJurayev-dev/azamat-ui-kit";
182
+ export declare const PACKAGE_GITHUB_RELEASES_URL = "https://github.com/AzamatJurayev-dev/azamat-ui-kit/releases";
183
+ export declare const DOCS_REPO_URL = "https://github.com/AzamatJurayev-dev/azamat-ui-kit";
184
+ export declare const PACKAGE_RELEASES_URL = "https://github.com/AzamatJurayev-dev/azamat-ui-kit/releases";
185
+ export declare const DOCS_RELEASES_URL = "https://github.com/AzamatJurayev-dev/azamat-ui-kit/releases";
186
186
  export declare const DOCS_ROOT_PATH = "/docs";
187
187
  export declare const releaseHistory: PackageReleaseRecord[];
188
188
  export declare const PACKAGE_VERSION: string;
@@ -1 +1 @@
1
- "use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../lib/utils.cjs"),n=require("../ui/tooltip/index.cjs"),r=require("../../hooks/use-is-mobile.cjs"),i=require("./controllable-details.cjs");let a=require("react");a=e.__toESM(a,1);let o=require("lucide-react"),s=require("react/jsx-runtime");var c=1024,l=`18rem`,u=`4.75rem`,d=`min(88vw, 22rem)`;function f({active:e,disabled:n}){return t.cn(`border border-transparent bg-transparent text-[color:color-mix(in_oklch,var(--sidebar-foreground),transparent_6%)] hover:border-[color:var(--aui-sidebar-item-active-border)] hover:bg-[color:var(--aui-sidebar-item-hover-bg)] hover:text-[color:var(--sidebar-foreground)] focus-visible:border-[color:var(--sidebar-ring)] focus-visible:bg-[color:var(--aui-sidebar-item-hover-bg)] focus-visible:text-[color:var(--sidebar-foreground)] focus-visible:shadow-[0_0_0_3px_color-mix(in_oklch,var(--sidebar-ring),transparent_82%)]`,e&&`border-[color:var(--aui-sidebar-item-active-border)] bg-[color:var(--aui-sidebar-item-active-bg)] text-[color:var(--aui-sidebar-item-active-fg)] shadow-[inset_0_1px_0_rgba(255,255,255,0.08),0_10px_24px_color-mix(in_oklch,var(--sidebar-primary),transparent_88%)]`,n&&`hover:border-transparent hover:bg-transparent hover:text-[color:color-mix(in_oklch,var(--sidebar-foreground),transparent_6%)]`)}function p(e){return e.items?.some(e=>!e.hidden)??!1}function m(e){return e.active?!0:e.items?.some(e=>m(e))??!1}function h(e,t){e.onSelect?.(),t?.(e)}function g({item:e,collapsed:r,depth:i,itemSize:a,activeIndicator:o,onItemSelect:c,renderLink:l}){let u={"aria-current":e.current??(e.active?`page`:void 0),"aria-disabled":e.disabled||void 0,"data-slot":`app-sidebar-item`,"data-active":e.active||void 0,"data-disabled":e.disabled||void 0,"data-depth":String(i),"data-size":a,"data-active-indicator":o,className:t.cn(`flex items-center gap-2 border border-transparent text-sm font-medium outline-none transition-[background-color,border-color,color,box-shadow] data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50`,f({active:e.active,disabled:e.disabled}),r&&`justify-center px-2`)},d=(0,s.jsxs)(s.Fragment,{children:[e.icon&&(0,s.jsx)(`span`,{className:`shrink-0`,children:e.icon}),!r&&(0,s.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:e.label}),!r&&e.badge&&(0,s.jsx)(`span`,{className:`shrink-0`,children:e.badge})]}),p=t=>r?(0,s.jsx)(n.Tooltip,{content:e.tooltip??e.label,side:`right`,children:(0,s.jsx)(`span`,{className:`block`,children:t})}):t;return e.href?.startsWith(`/`)?p(l?(0,s.jsx)(s.Fragment,{children:l({item:e,href:e.href,...u,onClick:t=>{if(e.disabled){t.preventDefault();return}h(e,c)},children:d})}):(0,s.jsx)(`a`,{href:e.href,...u,onClick:t=>{if(e.disabled){t.preventDefault();return}h(e,c)},children:d})):e.href?p((0,s.jsx)(`button`,{type:`button`,...u,className:t.cn(u.className,`w-full`),onClick:()=>{if(e.disabled)return;let t=e.href;if(t){if(h(e,c),t.startsWith(`http`)){window.open(t,`_blank`,`noopener,noreferrer`);return}window.location.assign(t)}},children:d})):p((0,s.jsx)(`button`,{type:`button`,disabled:e.disabled,...u,onClick:()=>{e.disabled||h(e,c)},children:d}))}function _({items:e,collapsed:r,depth:c,showSectionLabels:l,itemSize:u,activeIndicator:d,onItemSelect:h,renderLink:v}){return e.map(e=>{if(e.hidden)return null;let y=p(e),b=m(e),x=l&&!r&&c===0&&e.sectionLabel;if(!y)return(0,s.jsxs)(a.Fragment,{children:[x?(0,s.jsx)(`div`,{"data-slot":`app-sidebar-group-label`,className:`px-2.5 pb-1 pt-3 text-[11px] font-semibold uppercase tracking-[0.14em] text-[color:color-mix(in_oklch,var(--sidebar-foreground),transparent_42%)] first:pt-0`,children:e.sectionLabel}):null,(0,s.jsx)(g,{item:e,collapsed:r,depth:c,itemSize:u,activeIndicator:d,onItemSelect:h,renderLink:v})]},e.key);let S=e.defaultExpanded??b;return(0,s.jsxs)(`div`,{"data-slot":`app-sidebar-group`,"data-depth":c,children:[x&&(0,s.jsx)(`div`,{"data-slot":`app-sidebar-group-label`,className:`px-2.5 pb-1 pt-3 text-[11px] font-semibold uppercase tracking-[0.14em] text-[color:color-mix(in_oklch,var(--sidebar-foreground),transparent_42%)] first:pt-0`,children:e.sectionLabel}),(0,s.jsxs)(i.ControllableDetails,{"data-slot":`app-sidebar-group-details`,open:e.expanded,defaultOpen:S,className:`group/app-sidebar-details`,onOpenChange:e.onExpandedChange,children:[(0,s.jsxs)(`summary`,{"data-slot":`app-sidebar-group-trigger`,"data-size":u,"data-active":b||void 0,"data-active-indicator":d,className:t.cn(`flex list-none items-center gap-2 border border-transparent text-sm font-medium outline-none transition-[background-color,border-color,color,box-shadow]`,f({active:b}),r?`justify-center px-2`:`px-2.5`),children:[e.icon?r?(0,s.jsx)(n.Tooltip,{content:e.tooltip??e.label,side:`right`,children:(0,s.jsx)(`span`,{className:`shrink-0`,children:e.icon})}):(0,s.jsx)(`span`,{className:`shrink-0`,children:e.icon}):null,!r&&(0,s.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:e.label}),!r&&e.badge&&(0,s.jsx)(`span`,{className:`shrink-0`,children:e.badge}),!r&&(0,s.jsx)(o.ChevronRightIcon,{"data-slot":`app-sidebar-group-chevron`,className:`ml-auto size-3.5 shrink-0 text-[color:color-mix(in_oklch,var(--sidebar-foreground),transparent_42%)] transition-transform group-open/app-sidebar-details:rotate-90`})]}),(0,s.jsx)(`div`,{"data-slot":`app-sidebar-group-content`,className:t.cn(`mt-1 flex flex-col gap-1`,!r&&`pl-3`),children:(0,s.jsx)(_,{items:e.items??[],collapsed:r,depth:c+1,showSectionLabels:l,itemSize:u,activeIndicator:d,onItemSelect:h,renderLink:v})})]})]},e.key)})}function v({item:e,collapsed:r,onItemSelect:i}){let a=(0,s.jsxs)(`button`,{type:`button`,"data-slot":`app-sidebar-action`,"data-active":e.active||void 0,"data-disabled":e.disabled||void 0,className:t.cn(`flex min-h-9 items-center gap-2 rounded-lg border border-transparent px-2.5 text-sm font-medium outline-none transition-[background-color,border-color,color,box-shadow] data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50`,f({active:e.active,disabled:e.disabled}),r&&`justify-center px-2`),disabled:e.disabled,onClick:()=>{e.disabled||h(e,i)},children:[e.icon?(0,s.jsx)(`span`,{className:`shrink-0`,children:e.icon}):null,r?null:(0,s.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:e.label}),!r&&e.badge?(0,s.jsx)(`span`,{className:`shrink-0`,children:e.badge}):null]});return r?(0,s.jsx)(n.Tooltip,{content:e.tooltip??e.label,side:`right`,children:(0,s.jsx)(`span`,{className:`block`,children:a})}):a}function y({account:e,collapsed:r,onAfterSelect:i}){let a=(0,s.jsxs)(`button`,{type:`button`,"data-slot":`app-sidebar-account`,className:t.cn(`flex w-full items-center gap-3 rounded-[min(var(--radius-xl),16px)] border border-transparent text-left transition-[background-color,border-color,color,box-shadow]`,f({}),r?`justify-center px-2 py-2.5`:`px-3 py-2.5`),onClick:()=>{if(e.onSelect?.(),i?.(),e.href){if(e.href.startsWith(`http`)){window.open(e.href,`_blank`,`noopener,noreferrer`);return}window.location.assign(e.href)}},children:[e.avatar?(0,s.jsx)(`span`,{"data-slot":`app-sidebar-account-avatar`,className:`inline-flex size-9 shrink-0 items-center justify-center overflow-hidden rounded-full border border-border/65 bg-muted/45 text-sm font-semibold`,children:e.avatar}):null,r?null:(0,s.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,s.jsx)(`span`,{"data-slot":`app-sidebar-account-label`,className:`block truncate text-sm font-semibold text-[color:var(--sidebar-foreground)]`,children:e.label}),e.description?(0,s.jsx)(`span`,{"data-slot":`app-sidebar-account-description`,className:`block truncate text-xs text-[color:color-mix(in_oklch,var(--sidebar-foreground),transparent_36%)]`,children:e.description}):null]})]});return r?(0,s.jsx)(n.Tooltip,{content:e.tooltip??e.label,side:`right`,children:(0,s.jsx)(`span`,{className:`block`,children:a})}):a}function b({className:e,style:r,header:i,footer:c,items:d=[],collapsed:f=!1,width:p=l,collapsedWidth:m=u,collapsedRail:h,railItems:g=[],footerAccount:b,secondaryActions:x=[],footerSecondary:S,footerClassName:C,tooltipOnCollapsed:w,showSectionLabels:T=!0,itemSize:E=`md`,activeIndicator:D=`bar`,navigationLabel:O=`Primary navigation`,onItemSelect:k,renderItem:A,renderLink:j,children:M,mobile:N,mobileTitle:P,mobileDescription:F,mobileCloseLabel:I=`Close navigation`,onRequestClose:L,closeOnSelect:R=!0,...z}){let B=d.filter(e=>!e.hidden),V=g.filter(e=>!e.hidden),H=x.filter(e=>!e.hidden),U=a.useCallback(e=>{k?.(e),N&&R&&L?.()},[R,N,k,L]),W=N&&(P||F||L);return(0,s.jsxs)(`aside`,{"data-slot":`app-sidebar`,"data-collapsed":f||void 0,"data-mobile":N||void 0,className:t.cn(`flex h-full min-h-0 flex-col overflow-hidden`,e),style:{width:f?m:p,minWidth:f?m:p,...r},...z,children:[(i||W)&&(0,s.jsx)(`div`,{"data-slot":`app-sidebar-header`,className:`shrink-0 border-b p-3`,children:(0,s.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,s.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[i??null,W?(0,s.jsxs)(`div`,{className:t.cn(i&&`mt-3`),children:[P?(0,s.jsx)(`p`,{className:`text-sm font-semibold text-foreground`,children:P}):null,F?(0,s.jsx)(`p`,{className:`mt-1 text-xs leading-5 text-muted-foreground`,children:F}):null]}):null]}),N&&L?(0,s.jsx)(`button`,{type:`button`,"aria-label":I,"data-slot":`app-sidebar-mobile-close`,className:`inline-flex size-9 shrink-0 items-center justify-center rounded-xl border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg-alt)] text-[color:var(--aui-page-foreground)] transition hover:bg-[color:var(--aui-control-bg)]`,onClick:L,children:(0,s.jsx)(o.XIcon,{className:`size-4`})}):null]})}),(0,s.jsxs)(`nav`,{"data-slot":`app-sidebar-nav`,"aria-label":O,className:`flex min-h-0 flex-1 flex-col gap-1 overflow-y-auto overscroll-contain p-2`,children:[M??B.map(e=>{if(!A)return null;let t=A(e,{collapsed:f});return!f||!w?(0,s.jsx)(a.Fragment,{children:t},e.key):(0,s.jsx)(n.Tooltip,{content:e.tooltip??e.label,side:`right`,children:(0,s.jsx)(`span`,{className:`block`,children:t})},e.key)}),!M&&!A&&(0,s.jsx)(_,{items:B,collapsed:f,depth:0,showSectionLabels:T,itemSize:E,activeIndicator:D,onItemSelect:U,renderLink:j})]}),(b||S||c||H.length>0||f&&(h||V.length>0))&&(0,s.jsxs)(`div`,{"data-slot":`app-sidebar-footer`,className:t.cn(`shrink-0 border-t p-3`,C),children:[f?(0,s.jsxs)(s.Fragment,{children:[V.length>0?(0,s.jsx)(`div`,{"data-slot":`app-sidebar-rail-actions`,className:`grid gap-2`,children:V.map(e=>(0,s.jsx)(v,{item:e,collapsed:!0,onItemSelect:U},e.key))}):null,h?(0,s.jsx)(`div`,{"data-slot":`app-sidebar-rail`,children:h}):null]}):null,!f&&b?(0,s.jsx)(`div`,{"data-slot":`app-sidebar-account-wrap`,className:`mb-3`,children:(0,s.jsx)(y,{account:b,collapsed:!1,onAfterSelect:()=>{N&&R&&L?.()}})}):null,!f&&H.length>0?(0,s.jsx)(`div`,{"data-slot":`app-sidebar-secondary-actions`,className:`mb-3 grid gap-2`,children:H.map(e=>(0,s.jsx)(v,{item:e,collapsed:!1,onItemSelect:U},e.key))}):null,!f&&S?(0,s.jsx)(`div`,{"data-slot":`app-sidebar-footer-secondary`,className:`mb-3`,children:S}):null,f&&b?(0,s.jsx)(`div`,{"data-slot":`app-sidebar-account-wrap`,children:(0,s.jsx)(y,{account:b,collapsed:!0,onAfterSelect:()=>{N&&R&&L?.()}})}):null,!f&&c]})]})}function x({className:e,header:n,footer:i,items:f=[],collapsed:p=!1,width:m=l,collapsedWidth:h=u,mobileWidth:g=d,collapsedRail:_,railItems:v=[],footerAccount:y,secondaryActions:x=[],footerSecondary:S,tooltipOnCollapsed:C=!0,showSectionLabels:w=!0,itemSize:T=`md`,activeIndicator:E=`bar`,navigationLabel:D=`Primary navigation`,responsive:O=!0,mobileBreakpoint:k=c,mobileOpen:A,defaultMobileOpen:j=!1,onMobileOpenChange:M,mobileTitle:N,mobileDescription:P,mobileToggleLabel:F=`Open navigation`,mobileCloseLabel:I=`Close navigation`,mobileToggleIcon:L,showMobileToggle:R=!0,closeOnSelect:z=!0,mobileToggleClassName:B,mobilePanelClassName:V,mobileOverlayClassName:H,renderMobileToggle:U,onItemSelect:W,renderItem:G,renderLink:K,children:q,...J}){let Y=r.useIsMobile(k),X=O&&Y,[ee,te]=a.useState(j),Z=A??ee,Q=a.useCallback(e=>{A??te(e),M?.(e)},[A,M]);a.useEffect(()=>{!X&&Z&&Q(!1)},[X,Z,Q]),a.useEffect(()=>{if(!X||!Z)return;let e=document.body.style.overflow;document.body.style.overflow=`hidden`;let t=e=>{e.key===`Escape`&&Q(!1)};return window.addEventListener(`keydown`,t),()=>{document.body.style.overflow=e,window.removeEventListener(`keydown`,t)}},[X,Z,Q]);let $={className:e,header:n,footer:i,items:f,collapsed:p,width:m,collapsedWidth:h,collapsedRail:_,railItems:v,footerAccount:y,secondaryActions:x,footerSecondary:S,tooltipOnCollapsed:C,showSectionLabels:w,itemSize:T,activeIndicator:E,navigationLabel:D,mobileCloseLabel:I,closeOnSelect:z,onItemSelect:W,renderItem:G,renderLink:K,children:q,...J};if(!O||!X)return(0,s.jsx)(b,{...$});let ne=(0,s.jsxs)(`button`,{type:`button`,"aria-label":Z?I:F,"data-slot":`app-sidebar-mobile-trigger`,"data-state":Z?`open`:`closed`,className:t.cn(`inline-flex min-h-10 items-center gap-2 rounded-xl border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg)] px-3 text-sm font-medium text-[color:var(--aui-page-foreground)] shadow-sm transition hover:bg-[color:var(--aui-page-bg-alt)]`,B),onClick:()=>Q(!Z),children:[(0,s.jsx)(`span`,{className:`inline-flex size-8 items-center justify-center rounded-lg bg-[color:var(--aui-page-bg-alt)]`,children:L??(0,s.jsx)(o.MenuIcon,{className:`size-4`})}),(0,s.jsx)(`span`,{children:Z?I:F})]});return(0,s.jsxs)(s.Fragment,{children:[R?U?U({open:Z,setOpen:Q}):ne:null,(0,s.jsxs)(`div`,{"data-slot":`app-sidebar-mobile-root`,className:`relative z-40`,children:[(0,s.jsx)(`button`,{type:`button`,"aria-label":`Dismiss navigation`,"data-slot":`app-sidebar-mobile-overlay`,"data-state":Z?`open`:`closed`,className:t.cn(`fixed inset-0 z-40 bg-black/45 transition-opacity duration-200`,Z?`opacity-100`:`pointer-events-none opacity-0`,H),onClick:()=>Q(!1)}),(0,s.jsx)(b,{...$,mobile:!0,collapsed:!1,mobileTitle:N,mobileDescription:P,onRequestClose:()=>Q(!1),"data-state":Z?`open`:`closed`,role:`dialog`,"aria-modal":`true`,"aria-label":typeof N==`string`?N:`Navigation`,className:t.cn(`fixed inset-y-0 left-0 z-50 max-w-[22rem] border-r border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg)] shadow-2xl transition-transform duration-200 ease-out`,Z?`translate-x-0`:`-translate-x-full`,V,e),style:{width:g,minWidth:g}})]})]})}exports.Sidebar=x;
1
+ "use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../lib/utils.cjs"),n=require("../ui/tooltip/index.cjs"),r=require("../../hooks/use-is-mobile.cjs"),i=require("./controllable-details.cjs");let a=require("react");a=e.__toESM(a,1);let o=require("lucide-react"),s=require("react/jsx-runtime");var c=1024,l=`18rem`,u=`4.75rem`,d=`min(88vw, 22rem)`;function f({active:e,disabled:n}){return t.cn(`border border-transparent bg-transparent text-[color:color-mix(in_oklch,var(--sidebar-foreground),transparent_6%)] hover:border-[color:var(--aui-sidebar-item-active-border)] hover:bg-[color:var(--aui-sidebar-item-hover-bg)] hover:text-[color:var(--sidebar-foreground)] focus-visible:border-[color:var(--sidebar-ring)] focus-visible:bg-[color:var(--aui-sidebar-item-hover-bg)] focus-visible:text-[color:var(--sidebar-foreground)] focus-visible:shadow-[0_0_0_3px_color-mix(in_oklch,var(--sidebar-ring),transparent_82%)]`,e&&`border-[color:var(--aui-sidebar-item-active-border)] bg-[color:var(--aui-sidebar-item-active-bg)] text-[color:var(--aui-sidebar-item-active-fg)] shadow-[inset_0_1px_0_rgba(255,255,255,0.08),0_10px_24px_color-mix(in_oklch,var(--sidebar-primary),transparent_88%)]`,n&&`hover:border-transparent hover:bg-transparent hover:text-[color:color-mix(in_oklch,var(--sidebar-foreground),transparent_6%)]`)}function p({collapsed:e,depth:n,itemSize:r,activeIndicator:i}){return t.cn(`relative w-full rounded-[min(var(--radius-xl),14px)] py-2`,r===`sm`&&`min-h-8 text-xs`,r===`md`&&`min-h-9 text-sm`,r===`lg`&&`min-h-11 text-sm`,e?`justify-center px-2`:`px-2.5`,!e&&n>0&&`pl-3`,i===`bar`&&`data-[active=true]:pl-4 before:pointer-events-none before:absolute before:left-1.5 before:top-1/2 before:hidden before:h-5 before:w-1 before:-translate-y-1/2 before:rounded-full before:bg-[color:var(--sidebar-primary)] data-[active=true]:before:block`,i===`pill`&&`rounded-full`,i===`none`&&`data-[active=true]:shadow-none`)}function m(e){return e.items?.some(e=>!e.hidden)??!1}function h(e){return e.active?!0:e.items?.some(e=>h(e))??!1}function g(e,t){e.onSelect?.(),t?.(e)}function _({item:e,collapsed:r,depth:i,itemSize:a,activeIndicator:o,onItemSelect:c,renderLink:l}){let u={"aria-current":e.current??(e.active?`page`:void 0),"aria-disabled":e.disabled||void 0,"data-slot":`app-sidebar-item`,"data-active":e.active||void 0,"data-disabled":e.disabled||void 0,"data-depth":String(i),"data-size":a,"data-active-indicator":o,className:t.cn(`flex items-center gap-2 border border-transparent font-medium outline-none transition-[background-color,border-color,color,box-shadow] data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50`,f({active:e.active,disabled:e.disabled}),p({collapsed:r,depth:i,itemSize:a,activeIndicator:o}))},d=(0,s.jsxs)(s.Fragment,{children:[e.icon&&(0,s.jsx)(`span`,{className:`shrink-0`,children:e.icon}),!r&&(0,s.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:e.label}),!r&&e.badge&&(0,s.jsx)(`span`,{className:`shrink-0`,children:e.badge})]}),m=t=>r?(0,s.jsx)(n.Tooltip,{content:e.tooltip??e.label,side:`right`,children:(0,s.jsx)(`span`,{className:`block`,children:t})}):t;return e.href?.startsWith(`/`)?m(l?(0,s.jsx)(s.Fragment,{children:l({item:e,href:e.href,...u,onClick:t=>{if(e.disabled){t.preventDefault();return}g(e,c)},children:d})}):(0,s.jsx)(`a`,{href:e.href,...u,onClick:t=>{if(e.disabled){t.preventDefault();return}g(e,c)},children:d})):e.href?m((0,s.jsx)(`button`,{type:`button`,...u,className:t.cn(u.className,`w-full`),onClick:()=>{if(e.disabled)return;let t=e.href;if(t){if(g(e,c),t.startsWith(`http`)){window.open(t,`_blank`,`noopener,noreferrer`);return}window.location.assign(t)}},children:d})):m((0,s.jsx)(`button`,{type:`button`,disabled:e.disabled,...u,onClick:()=>{e.disabled||g(e,c)},children:d}))}function v({items:e,collapsed:r,depth:c,showSectionLabels:l,itemSize:u,activeIndicator:d,onItemSelect:g,renderLink:y}){return e.map(e=>{if(e.hidden)return null;let b=m(e),x=h(e),S=l&&!r&&c===0&&e.sectionLabel;if(!b)return(0,s.jsxs)(a.Fragment,{children:[S?(0,s.jsx)(`div`,{"data-slot":`app-sidebar-group-label`,className:`px-2.5 pb-1 pt-3 text-[11px] font-semibold uppercase tracking-[0.14em] text-[color:color-mix(in_oklch,var(--sidebar-foreground),transparent_42%)] first:pt-0`,children:e.sectionLabel}):null,(0,s.jsx)(_,{item:e,collapsed:r,depth:c,itemSize:u,activeIndicator:d,onItemSelect:g,renderLink:y})]},e.key);let C=e.defaultExpanded??x;return(0,s.jsxs)(`div`,{"data-slot":`app-sidebar-group`,"data-depth":c,children:[S&&(0,s.jsx)(`div`,{"data-slot":`app-sidebar-group-label`,className:`px-2.5 pb-1 pt-3 text-[11px] font-semibold uppercase tracking-[0.14em] text-[color:color-mix(in_oklch,var(--sidebar-foreground),transparent_42%)] first:pt-0`,children:e.sectionLabel}),(0,s.jsxs)(i.ControllableDetails,{"data-slot":`app-sidebar-group-details`,open:e.expanded,defaultOpen:C,className:`group/app-sidebar-details`,onOpenChange:e.onExpandedChange,children:[(0,s.jsxs)(`summary`,{"data-slot":`app-sidebar-group-trigger`,"data-size":u,"data-active":x||void 0,"data-active-indicator":d,className:t.cn(`flex list-none items-center gap-2 border border-transparent font-medium outline-none transition-[background-color,border-color,color,box-shadow]`,f({active:x}),p({collapsed:r,depth:c,itemSize:u,activeIndicator:d})),children:[e.icon?r?(0,s.jsx)(n.Tooltip,{content:e.tooltip??e.label,side:`right`,children:(0,s.jsx)(`span`,{className:`shrink-0`,children:e.icon})}):(0,s.jsx)(`span`,{className:`shrink-0`,children:e.icon}):null,!r&&(0,s.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:e.label}),!r&&e.badge&&(0,s.jsx)(`span`,{className:`shrink-0`,children:e.badge}),!r&&(0,s.jsx)(o.ChevronRightIcon,{"data-slot":`app-sidebar-group-chevron`,className:`ml-auto size-3.5 shrink-0 text-[color:color-mix(in_oklch,var(--sidebar-foreground),transparent_42%)] transition-transform group-open/app-sidebar-details:rotate-90`})]}),(0,s.jsx)(`div`,{"data-slot":`app-sidebar-group-content`,className:t.cn(`mt-1 flex flex-col gap-1`,!r&&`pl-3`),children:(0,s.jsx)(v,{items:e.items??[],collapsed:r,depth:c+1,showSectionLabels:l,itemSize:u,activeIndicator:d,onItemSelect:g,renderLink:y})})]})]},e.key)})}function y({item:e,collapsed:r,onItemSelect:i}){let a=(0,s.jsxs)(`button`,{type:`button`,"data-slot":`app-sidebar-action`,"data-active":e.active||void 0,"data-disabled":e.disabled||void 0,className:t.cn(`flex min-h-9 items-center gap-2 rounded-lg border border-transparent px-2.5 text-sm font-medium outline-none transition-[background-color,border-color,color,box-shadow] data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50`,f({active:e.active,disabled:e.disabled}),r&&`justify-center px-2`),disabled:e.disabled,onClick:()=>{e.disabled||g(e,i)},children:[e.icon?(0,s.jsx)(`span`,{className:`shrink-0`,children:e.icon}):null,r?null:(0,s.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:e.label}),!r&&e.badge?(0,s.jsx)(`span`,{className:`shrink-0`,children:e.badge}):null]});return r?(0,s.jsx)(n.Tooltip,{content:e.tooltip??e.label,side:`right`,children:(0,s.jsx)(`span`,{className:`block`,children:a})}):a}function b({account:e,collapsed:r,onAfterSelect:i}){let a=(0,s.jsxs)(`button`,{type:`button`,"data-slot":`app-sidebar-account`,className:t.cn(`flex w-full items-center gap-3 rounded-[min(var(--radius-xl),16px)] border border-transparent text-left transition-[background-color,border-color,color,box-shadow]`,f({}),r?`justify-center px-2 py-2.5`:`px-3 py-2.5`),onClick:()=>{if(e.onSelect?.(),i?.(),e.href){if(e.href.startsWith(`http`)){window.open(e.href,`_blank`,`noopener,noreferrer`);return}window.location.assign(e.href)}},children:[e.avatar?(0,s.jsx)(`span`,{"data-slot":`app-sidebar-account-avatar`,className:`inline-flex size-9 shrink-0 items-center justify-center overflow-hidden rounded-full border border-border/65 bg-muted/45 text-sm font-semibold`,children:e.avatar}):null,r?null:(0,s.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,s.jsx)(`span`,{"data-slot":`app-sidebar-account-label`,className:`block truncate text-sm font-semibold text-[color:var(--sidebar-foreground)]`,children:e.label}),e.description?(0,s.jsx)(`span`,{"data-slot":`app-sidebar-account-description`,className:`block truncate text-xs text-[color:color-mix(in_oklch,var(--sidebar-foreground),transparent_36%)]`,children:e.description}):null]})]});return r?(0,s.jsx)(n.Tooltip,{content:e.tooltip??e.label,side:`right`,children:(0,s.jsx)(`span`,{className:`block`,children:a})}):a}function x({className:e,style:r,header:i,footer:c,items:d=[],collapsed:f=!1,width:p=l,collapsedWidth:m=u,collapsedRail:h,railItems:g=[],footerAccount:_,secondaryActions:x=[],footerSecondary:S,footerClassName:C,tooltipOnCollapsed:w,showSectionLabels:T=!0,itemSize:E=`md`,activeIndicator:D=`bar`,navigationLabel:O=`Primary navigation`,onItemSelect:k,renderItem:A,renderLink:j,children:M,mobile:N,mobileTitle:P,mobileDescription:F,mobileCloseLabel:I=`Close navigation`,onRequestClose:L,closeOnSelect:R=!0,...z}){let B=d.filter(e=>!e.hidden),V=g.filter(e=>!e.hidden),H=x.filter(e=>!e.hidden),U=a.useCallback(e=>{k?.(e),N&&R&&L?.()},[R,N,k,L]),W=N&&(P||F||L);return(0,s.jsxs)(`aside`,{"data-slot":`app-sidebar`,"data-collapsed":f||void 0,"data-mobile":N||void 0,className:t.cn(`flex h-full min-h-0 flex-col overflow-hidden`,e),style:{width:f?m:p,minWidth:f?m:p,...r},...z,children:[(i||W)&&(0,s.jsx)(`div`,{"data-slot":`app-sidebar-header`,className:`shrink-0 border-b p-3`,children:(0,s.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,s.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[i??null,W?(0,s.jsxs)(`div`,{className:t.cn(i&&`mt-3`),children:[P?(0,s.jsx)(`p`,{className:`text-sm font-semibold text-foreground`,children:P}):null,F?(0,s.jsx)(`p`,{className:`mt-1 text-xs leading-5 text-muted-foreground`,children:F}):null]}):null]}),N&&L?(0,s.jsx)(`button`,{type:`button`,"aria-label":I,"data-slot":`app-sidebar-mobile-close`,className:`inline-flex size-9 shrink-0 items-center justify-center rounded-xl border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg-alt)] text-[color:var(--aui-page-foreground)] transition hover:bg-[color:var(--aui-control-bg)]`,onClick:L,children:(0,s.jsx)(o.XIcon,{className:`size-4`})}):null]})}),(0,s.jsxs)(`nav`,{"data-slot":`app-sidebar-nav`,"aria-label":O,className:`flex min-h-0 flex-1 flex-col gap-1 overflow-y-auto overscroll-contain p-2`,children:[M??B.map(e=>{if(!A)return null;let t=A(e,{collapsed:f});return!f||!w?(0,s.jsx)(a.Fragment,{children:t},e.key):(0,s.jsx)(n.Tooltip,{content:e.tooltip??e.label,side:`right`,children:(0,s.jsx)(`span`,{className:`block`,children:t})},e.key)}),!M&&!A&&(0,s.jsx)(v,{items:B,collapsed:f,depth:0,showSectionLabels:T,itemSize:E,activeIndicator:D,onItemSelect:U,renderLink:j})]}),(_||S||c||H.length>0||f&&(h||V.length>0))&&(0,s.jsxs)(`div`,{"data-slot":`app-sidebar-footer`,className:t.cn(`shrink-0 border-t p-3`,C),children:[f?(0,s.jsxs)(s.Fragment,{children:[V.length>0?(0,s.jsx)(`div`,{"data-slot":`app-sidebar-rail-actions`,className:`grid gap-2`,children:V.map(e=>(0,s.jsx)(y,{item:e,collapsed:!0,onItemSelect:U},e.key))}):null,h?(0,s.jsx)(`div`,{"data-slot":`app-sidebar-rail`,children:h}):null]}):null,!f&&_?(0,s.jsx)(`div`,{"data-slot":`app-sidebar-account-wrap`,className:`mb-3`,children:(0,s.jsx)(b,{account:_,collapsed:!1,onAfterSelect:()=>{N&&R&&L?.()}})}):null,!f&&H.length>0?(0,s.jsx)(`div`,{"data-slot":`app-sidebar-secondary-actions`,className:`mb-3 grid gap-2`,children:H.map(e=>(0,s.jsx)(y,{item:e,collapsed:!1,onItemSelect:U},e.key))}):null,!f&&S?(0,s.jsx)(`div`,{"data-slot":`app-sidebar-footer-secondary`,className:`mb-3`,children:S}):null,f&&_?(0,s.jsx)(`div`,{"data-slot":`app-sidebar-account-wrap`,children:(0,s.jsx)(b,{account:_,collapsed:!0,onAfterSelect:()=>{N&&R&&L?.()}})}):null,!f&&c]})]})}function S({className:e,header:n,footer:i,items:f=[],collapsed:p=!1,width:m=l,collapsedWidth:h=u,mobileWidth:g=d,collapsedRail:_,railItems:v=[],footerAccount:y,secondaryActions:b=[],footerSecondary:S,tooltipOnCollapsed:C=!0,showSectionLabels:w=!0,itemSize:T=`md`,activeIndicator:E=`bar`,navigationLabel:D=`Primary navigation`,responsive:O=!0,mobileBreakpoint:k=c,mobileOpen:A,defaultMobileOpen:j=!1,onMobileOpenChange:M,mobileTitle:N,mobileDescription:P,mobileToggleLabel:F=`Open navigation`,mobileCloseLabel:I=`Close navigation`,mobileToggleIcon:L,showMobileToggle:R=!0,closeOnSelect:z=!0,mobileToggleClassName:B,mobilePanelClassName:V,mobileOverlayClassName:H,renderMobileToggle:U,onItemSelect:W,renderItem:G,renderLink:K,children:q,...J}){let Y=r.useIsMobile(k),X=O&&Y,[ee,te]=a.useState(j),Z=A??ee,Q=a.useCallback(e=>{A??te(e),M?.(e)},[A,M]);a.useEffect(()=>{!X&&Z&&Q(!1)},[X,Z,Q]),a.useEffect(()=>{if(!X||!Z)return;let e=document.body.style.overflow;document.body.style.overflow=`hidden`;let t=e=>{e.key===`Escape`&&Q(!1)};return window.addEventListener(`keydown`,t),()=>{document.body.style.overflow=e,window.removeEventListener(`keydown`,t)}},[X,Z,Q]);let $={className:e,header:n,footer:i,items:f,collapsed:p,width:m,collapsedWidth:h,collapsedRail:_,railItems:v,footerAccount:y,secondaryActions:b,footerSecondary:S,tooltipOnCollapsed:C,showSectionLabels:w,itemSize:T,activeIndicator:E,navigationLabel:D,mobileCloseLabel:I,closeOnSelect:z,onItemSelect:W,renderItem:G,renderLink:K,children:q,...J};if(!O||!X)return(0,s.jsx)(x,{...$});let ne=(0,s.jsxs)(`button`,{type:`button`,"aria-label":Z?I:F,"data-slot":`app-sidebar-mobile-trigger`,"data-state":Z?`open`:`closed`,className:t.cn(`inline-flex min-h-10 items-center gap-2 rounded-xl border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg)] px-3 text-sm font-medium text-[color:var(--aui-page-foreground)] shadow-sm transition hover:bg-[color:var(--aui-page-bg-alt)]`,B),onClick:()=>Q(!Z),children:[(0,s.jsx)(`span`,{className:`inline-flex size-8 items-center justify-center rounded-lg bg-[color:var(--aui-page-bg-alt)]`,children:L??(0,s.jsx)(o.MenuIcon,{className:`size-4`})}),(0,s.jsx)(`span`,{children:Z?I:F})]});return(0,s.jsxs)(s.Fragment,{children:[R?U?U({open:Z,setOpen:Q}):ne:null,(0,s.jsxs)(`div`,{"data-slot":`app-sidebar-mobile-root`,className:`relative z-40`,children:[(0,s.jsx)(`button`,{type:`button`,"aria-label":`Dismiss navigation`,"data-slot":`app-sidebar-mobile-overlay`,"data-state":Z?`open`:`closed`,className:t.cn(`fixed inset-0 z-40 bg-black/45 transition-opacity duration-200`,Z?`opacity-100`:`pointer-events-none opacity-0`,H),onClick:()=>Q(!1)}),(0,s.jsx)(x,{...$,mobile:!0,collapsed:!1,mobileTitle:N,mobileDescription:P,onRequestClose:()=>Q(!1),"data-state":Z?`open`:`closed`,role:`dialog`,"aria-modal":`true`,"aria-label":typeof N==`string`?N:`Navigation`,className:t.cn(`fixed inset-y-0 left-0 z-50 max-w-[22rem] border-r border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg)] shadow-2xl transition-transform duration-200 ease-out`,Z?`translate-x-0`:`-translate-x-full`,V,e),style:{width:g,minWidth:g}})]})]})}exports.Sidebar=S;