@tc96/cli 0.0.0-stage → 0.28.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 (248) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +213 -2
  3. package/cli.js +1450 -0
  4. package/package.json +35 -4
  5. package/registry/agenda-1.json +1297 -0
  6. package/registry/aggregate.json +4 -0
  7. package/registry/ai-chat-1.json +91 -0
  8. package/registry/app-shell-1.json +81 -0
  9. package/registry/app-shell-2.json +89 -0
  10. package/registry/app-shell-3.json +109 -0
  11. package/registry/app-shell-4.json +104 -0
  12. package/registry/card-1.json +104 -0
  13. package/registry/card-2.json +97 -0
  14. package/registry/card-3.json +104 -0
  15. package/registry/card-4.json +98 -0
  16. package/registry/card-5.json +85 -0
  17. package/registry/card-6.json +98 -0
  18. package/registry/card-7.json +104 -0
  19. package/registry/card-8.json +106 -0
  20. package/registry/card-9.json +92 -0
  21. package/registry/charts.json +30 -0
  22. package/registry/chat-assistant.json +110 -0
  23. package/registry/chats-panel.json +97 -0
  24. package/registry/checklist.json +321 -0
  25. package/registry/collection.json +1104 -0
  26. package/registry/crm-1.json +1317 -0
  27. package/registry/crm-2.json +1400 -0
  28. package/registry/dashboard-1.json +160 -0
  29. package/registry/dashboard-2.json +153 -0
  30. package/registry/dashboard-3.json +154 -0
  31. package/registry/dashboard-4.json +168 -0
  32. package/registry/dashboard-5.json +167 -0
  33. package/registry/dashboard-6.json +143 -0
  34. package/registry/dashboard-7.json +188 -0
  35. package/registry/documents-1.json +1322 -0
  36. package/registry/editable.json +36 -0
  37. package/registry/empty-state-1.json +40 -0
  38. package/registry/empty-state-2.json +39 -0
  39. package/registry/empty-state-3.json +61 -0
  40. package/registry/empty-state-4.json +39 -0
  41. package/registry/empty-state-5.json +47 -0
  42. package/registry/empty-state-6.json +40 -0
  43. package/registry/finance-1.json +845 -0
  44. package/registry/finance-2.json +973 -0
  45. package/registry/finance-3.json +1436 -0
  46. package/registry/flow-1.json +460 -0
  47. package/registry/flow-2.json +503 -0
  48. package/registry/flow-3.json +198 -0
  49. package/registry/flow-4.json +75 -0
  50. package/registry/flow-canvas.json +198 -0
  51. package/registry/flow-inspector.json +151 -0
  52. package/registry/flow-step-library.json +112 -0
  53. package/registry/forgot-password-1.json +73 -0
  54. package/registry/forgot-password-2.json +73 -0
  55. package/registry/inbox-1.json +1184 -0
  56. package/registry/inventory-1.json +828 -0
  57. package/registry/inventory-2.json +956 -0
  58. package/registry/legal-1.json +1345 -0
  59. package/registry/legal-2.json +1279 -0
  60. package/registry/legal-3.json +1273 -0
  61. package/registry/legal-4.json +1273 -0
  62. package/registry/legal-5.json +1393 -0
  63. package/registry/legal-6.json +1309 -0
  64. package/registry/legal-7.json +1315 -0
  65. package/registry/legal-8.json +1358 -0
  66. package/registry/legal-9.json +1381 -0
  67. package/registry/list-1.json +129 -0
  68. package/registry/list-2.json +117 -0
  69. package/registry/list-3.json +129 -0
  70. package/registry/list-4.json +105 -0
  71. package/registry/list-5.json +98 -0
  72. package/registry/list-6.json +92 -0
  73. package/registry/list.json +52 -0
  74. package/registry/login-1.json +89 -0
  75. package/registry/login-10.json +88 -0
  76. package/registry/login-2.json +81 -0
  77. package/registry/login-3.json +90 -0
  78. package/registry/login-4.json +81 -0
  79. package/registry/login-5.json +82 -0
  80. package/registry/login-6.json +88 -0
  81. package/registry/login-7.json +83 -0
  82. package/registry/login-8.json +81 -0
  83. package/registry/login-9.json +88 -0
  84. package/registry/magic-link-6.json +79 -0
  85. package/registry/marketing-1.json +833 -0
  86. package/registry/marketing-2.json +961 -0
  87. package/registry/navbar-1.json +66 -0
  88. package/registry/navbar-10.json +50 -0
  89. package/registry/navbar-11.json +48 -0
  90. package/registry/navbar-12.json +48 -0
  91. package/registry/navbar-2.json +48 -0
  92. package/registry/navbar-3.json +50 -0
  93. package/registry/navbar-4.json +39 -0
  94. package/registry/navbar-5.json +50 -0
  95. package/registry/navbar-6.json +48 -0
  96. package/registry/navbar-7.json +72 -0
  97. package/registry/navbar-8.json +50 -0
  98. package/registry/navbar-9.json +54 -0
  99. package/registry/onboarding-1.json +114 -0
  100. package/registry/onboarding-2.json +78 -0
  101. package/registry/onboarding-3.json +71 -0
  102. package/registry/otp-1.json +73 -0
  103. package/registry/projects-1.json +865 -0
  104. package/registry/projects-2.json +993 -0
  105. package/registry/projects-3.json +1346 -0
  106. package/registry/properties.json +530 -0
  107. package/registry/record-dialog.json +88 -0
  108. package/registry/record-group.json +194 -0
  109. package/registry/record-preview.json +70 -0
  110. package/registry/record-status-list.json +70 -0
  111. package/registry/reset-password-1.json +92 -0
  112. package/registry/reset-password-2.json +98 -0
  113. package/registry/reset-password-6.json +91 -0
  114. package/registry/revenue-1.json +834 -0
  115. package/registry/revenue-2.json +968 -0
  116. package/registry/revenue-3.json +821 -0
  117. package/registry/revenue-4.json +949 -0
  118. package/registry/rich-text-editor-1.json +172 -0
  119. package/registry/rich-text-editor-2.json +158 -0
  120. package/registry/rich-text-editor-3.json +198 -0
  121. package/registry/rich-text-editor-4.json +200 -0
  122. package/registry/rich-text-editor-5.json +237 -0
  123. package/registry/rich-text-editor.json +113 -0
  124. package/registry/settings-account-1.json +119 -0
  125. package/registry/settings-account-2.json +118 -0
  126. package/registry/settings-catalog-1.json +128 -0
  127. package/registry/settings-catalog-10.json +129 -0
  128. package/registry/settings-catalog-2.json +116 -0
  129. package/registry/settings-catalog-3.json +118 -0
  130. package/registry/settings-catalog-4.json +227 -0
  131. package/registry/settings-catalog-5.json +129 -0
  132. package/registry/settings-catalog-6.json +130 -0
  133. package/registry/settings-catalog-7.json +130 -0
  134. package/registry/settings-catalog-8.json +183 -0
  135. package/registry/settings-catalog-9.json +159 -0
  136. package/registry/settings-integration-1.json +125 -0
  137. package/registry/settings-integration-2.json +122 -0
  138. package/registry/settings-integration-3.json +118 -0
  139. package/registry/settings-integration-4.json +129 -0
  140. package/registry/settings-integration-5.json +122 -0
  141. package/registry/settings-integration-6.json +92 -0
  142. package/registry/settings-integration-7.json +122 -0
  143. package/registry/settings-integration-8.json +593 -0
  144. package/registry/settings-notification-channel-1.json +112 -0
  145. package/registry/settings-preference-1.json +123 -0
  146. package/registry/settings-preference-2.json +123 -0
  147. package/registry/settings-preference-3.json +116 -0
  148. package/registry/settings-role-permission-1.json +117 -0
  149. package/registry/settings-security-1.json +117 -0
  150. package/registry/settings-workspace-1.json +119 -0
  151. package/registry/settings-workspace-2.json +125 -0
  152. package/registry/settings.json +82 -0
  153. package/registry/signup-1.json +100 -0
  154. package/registry/signup-2.json +93 -0
  155. package/registry/signup-3.json +83 -0
  156. package/registry/signup-6.json +99 -0
  157. package/registry/state-surface.json +58 -0
  158. package/registry/stats-1.json +116 -0
  159. package/registry/stats-2.json +115 -0
  160. package/registry/stats-3.json +97 -0
  161. package/registry/stats-4.json +92 -0
  162. package/registry/stats-5.json +103 -0
  163. package/registry/stats-6.json +105 -0
  164. package/registry/stats-7.json +103 -0
  165. package/registry/stats.json +64 -0
  166. package/registry/support-1.json +853 -0
  167. package/registry/support-2.json +981 -0
  168. package/registry/support-3.json +762 -0
  169. package/registry/support-4.json +538 -0
  170. package/registry/team-1.json +829 -0
  171. package/registry/team-2.json +957 -0
  172. package/registry/timeline-1.json +97 -0
  173. package/registry/timeline-2.json +102 -0
  174. package/registry/timeline-3.json +68 -0
  175. package/registry/timeline-4.json +86 -0
  176. package/registry/ui/accordion.json +15 -0
  177. package/registry/ui/alert-dialog.json +14 -0
  178. package/registry/ui/alert.json +50 -0
  179. package/registry/ui/autocomplete.json +18 -0
  180. package/registry/ui/avatar.json +14 -0
  181. package/registry/ui/badge.json +51 -0
  182. package/registry/ui/breadcrumb.json +15 -0
  183. package/registry/ui/button.json +25 -0
  184. package/registry/ui/calendar.json +15 -0
  185. package/registry/ui/card.json +14 -0
  186. package/registry/ui/chat.json +115 -0
  187. package/registry/ui/checkbox-group.json +14 -0
  188. package/registry/ui/checkbox.json +14 -0
  189. package/registry/ui/collapsible.json +14 -0
  190. package/registry/ui/combobox.json +18 -0
  191. package/registry/ui/command.json +17 -0
  192. package/registry/ui/composer-clipboard.json +14 -0
  193. package/registry/ui/composer-document.json +14 -0
  194. package/registry/ui/composer-editor.json +16 -0
  195. package/registry/ui/composer-query.json +12 -0
  196. package/registry/ui/composer.json +17 -0
  197. package/registry/ui/context-menu.json +23 -0
  198. package/registry/ui/dialog.json +18 -0
  199. package/registry/ui/drawer.json +18 -0
  200. package/registry/ui/empty.json +14 -0
  201. package/registry/ui/field.json +22 -0
  202. package/registry/ui/fieldset.json +14 -0
  203. package/registry/ui/form.json +14 -0
  204. package/registry/ui/frame.json +12 -0
  205. package/registry/ui/gauge.json +31 -0
  206. package/registry/ui/group.json +17 -0
  207. package/registry/ui/icon-frame.json +31 -0
  208. package/registry/ui/input-group.json +17 -0
  209. package/registry/ui/input.json +14 -0
  210. package/registry/ui/kbd.json +12 -0
  211. package/registry/ui/label.json +14 -0
  212. package/registry/ui/menu.json +39 -0
  213. package/registry/ui/meter.json +14 -0
  214. package/registry/ui/number-field.json +17 -0
  215. package/registry/ui/otp-field.json +31 -0
  216. package/registry/ui/pagination.json +17 -0
  217. package/registry/ui/popover.json +14 -0
  218. package/registry/ui/preview-card.json +14 -0
  219. package/registry/ui/progress.json +14 -0
  220. package/registry/ui/property-meta.json +16 -0
  221. package/registry/ui/property-tone.json +12 -0
  222. package/registry/ui/radio-group.json +14 -0
  223. package/registry/ui/render-anchor.json +12 -0
  224. package/registry/ui/scroll-area.json +14 -0
  225. package/registry/ui/segmented-control.json +14 -0
  226. package/registry/ui/select.json +16 -0
  227. package/registry/ui/separator.json +14 -0
  228. package/registry/ui/sheet.json +18 -0
  229. package/registry/ui/sidebar.json +25 -0
  230. package/registry/ui/skeleton.json +24 -0
  231. package/registry/ui/slider.json +14 -0
  232. package/registry/ui/spinner.json +14 -0
  233. package/registry/ui/switch.json +14 -0
  234. package/registry/ui/table.json +14 -0
  235. package/registry/ui/tabs.json +16 -0
  236. package/registry/ui/text.json +31 -0
  237. package/registry/ui/textarea.json +14 -0
  238. package/registry/ui/toast.json +89 -0
  239. package/registry/ui/toggle-group.json +18 -0
  240. package/registry/ui/toggle.json +15 -0
  241. package/registry/ui/toolbar.json +14 -0
  242. package/registry/ui/tooltip.json +14 -0
  243. package/registry/ui/use-composer-editor.json +17 -0
  244. package/registry/ui/use-copy-to-clipboard.json +12 -0
  245. package/registry/ui/use-media-query.json +12 -0
  246. package/registry/view.json +1104 -0
  247. package/registry/widgets.json +319 -0
  248. package/registry/wizard.json +89 -0
@@ -0,0 +1,39 @@
1
+ {
2
+ "name": "menu",
3
+ "type": "registry:ui",
4
+ "files": [
5
+ {
6
+ "path": "registry/default/ui/menu/ACCESSIBILITY.md",
7
+ "content": "# Menu accessibility\n\nLocal accessibility and usability decisions for the menu parts. The repo-wide rules (WCAG thresholds, contrast fixed without changing token values, axe in every story) are in `docs/accessibility.md`; this file holds what applies only to the menu. Measured on 2026-11-19 in the `UI/Menu` stories, `Default` theme preset.\n\n## Roles and names\n\n- Base UI renders `role=\"menu\"` on the popup and `menuitem`, `menuitemcheckbox` and `menuitemradio` on the items, with `aria-checked`, `aria-disabled`, `aria-haspopup` and `aria-expanded` where they apply. The popup takes its name from the trigger.\n- `MenuShortcut` renders `aria-hidden`, so the item name is its label alone (`\"Edit\"`, not `\"Edit ⌘E\"`). An item with a shortcut announces it with `aria-keyshortcuts` (`<MenuItem aria-keyshortcuts=\"Meta+E\">`).\n- The `switch` variant of `MenuCheckboxItem` only changes the indicator: the item stays a `menuitemcheckbox`.\n\n## Keyboard and focus\n\n- Arrow keys move the highlight, `ArrowRight` opens a submenu, `Escape` closes, typing jumps to an item (Base UI). Focus moves to the highlighted item and returns to the trigger on close.\n- Keyboard focus shows as a 2px `--ring` outline inside the item, from the theme rule `[role^=\"menuitem\"][data-slot^=\"menu-\"]:focus-visible`. The COSS highlight alone (`data-highlighted:bg-accent`) measures 1.09:1 against `--popover` in light; the outline measures 4.73:1 (light) and 3.52:1 (dark). A pointer hover does not put the item in `:focus-visible`, so it shows the highlight only.\n\n## Contrast\n\n| Pair | Light | Dark | Note |\n| --- | --- | --- | --- |\n| focus outline (`--ring`) on `--popover` | 4.73:1 | 3.52:1 | non-text, 3:1 |\n| `MenuShortcut` (`--muted-foreground`) on `--popover` | 5.73:1 | 5.10:1 | the COSS `/72` measured 3.14:1; the theme rule `[data-slot=\"menu-shortcut\"]` drops the opacity |\n| destructive item (`--destructive-foreground`) on `--popover` | 6.42:1 | | |\n| destructive item on the highlight (`--accent`) | 5.89:1 | | |\n\nThe two theme rules live in the consumer's stylesheet, not here: the consumer copies them from `Regras de tema do menu` in `apps/docs/content/docs/installation.mdx`, which also covers `context-menu.tsx`. The dark shortcut ratio comes from the `muted-foreground` on `popover` record in `docs/accessibility.md` (`record-preview`); the light values were measured here. Disabled items (`opacity-64`) are exempt from contrast (WCAG 1.4.3).\n\n## Pointer and touch\n\n- Items are 44px tall with a coarse pointer (`pointer-coarse:min-h-11`), 32px below `sm` and 28px from `sm` with a fine pointer.\n- A disabled item ignores the pointer, so a tooltip never opens on it: the reason goes inside the item (`Pause` with `Nothing is playing`).\n\n## Layout that carries meaning\n\n- The check of `MenuCheckboxItem` and `MenuRadioItem` sits in a trailing column, so every label in a mixed menu starts at the same edge, as in `SelectItem` and the `switch` variant.\n- `inset` lines a label without an icon up with the labels after an icon.\n\n## Verified by\n\nThe `UI/Menu/Behavior` plays (`apps/storybook/src/ui/menu/behavior.stories.tsx`) check the trailing check (`CheckAfterLabel`), the inset alignment (`InsetAlignsLabels`), the focus outline (`FocusOutlineOnKeyboard`), the shortcut name (`ShortcutOutOfName`) and the disabled reason (`DisabledItemIgnoresClick`); axe runs on every story in the `storybook` and `storybook-dark` projects.\n"
8
+ },
9
+ {
10
+ "path": "registry/default/ui/menu/AGENTS.md",
11
+ "content": "# Menu\n\nA menu is a list of actions or options that opens from a trigger and floats above the page: the account menu of the shell, the \"more\" button of a row, the view and column settings of a collection. It holds plain actions, links, checkbox and radio choices, grouped and separated, with optional icons and keyboard shortcuts, and it can open nested submenus. It is keyboard first: arrow keys move through the items, typing jumps to one, `Escape` closes and focus returns to the trigger.\n\nThe parts come from COSS on top of Base UI `Menu` and are owned by this repo (ADR 0008): every change to how a part looks starts in `TOKENS.md`, the blueprint, and is then copied into `menu.tsx`; a pattern never recreates or wraps a part to restyle it (decision of 2026-11-19). Storybook documents it in the six pages under `UI/Menu`: `API Reference` (the hand-written contract of every part, with the `Anatomy`), `Playground`, `Variants` (one per item state), `Layouts` (the formations the parts take), `Behavior` (one `play` per guarantee) and `Usages` (whole menus with real content, each on a formation).\n\n## Map\n\n- `menu.tsx`: every part and the `DropdownMenu*` aliases.\n- `index.ts`: the barrel `@tc96/ui/menu` resolves to.\n- `TOKENS.md`: the blueprint and single source of truth of the look: every element of every part with its full class string, split into named rows (`layout`, `size`, `size:sm`, `color`, states).\n- `ACCESSIBILITY.md`: roles, keyboard, contrast and touch decisions, with their measures.\n\n## Architecture\n\n- Layer: `packages/ui`, the bottom of `templates` → `parttens` → `ui` → `utils`. `menu.tsx` imports only Base UI, `@phosphor-icons/react` and `cn` from `@tc96/utils`.\n- Resolution: `packages/ui/package.json` exports `./menu` as `./src/menu/index.ts`, ahead of the `./*` → `./src/*.tsx` pattern that serves the single-file components; `tsconfig.base.json` maps `@tc96/ui/*` to `packages/ui/src/*`, which reaches `menu/index.ts` as a folder index.\n- Manifest: the `menu` item of `packages/ui/ui.manifest.json` lists the five files of this folder. `check:coss` fails on a file here that the manifest does not list.\n- Scripts: `scripts/check-boundaries.ts` and `packages/registry/src/build-registry.ts` read a manifest path ending in `/index` as the folder module, so `@tc96/ui/menu` still resolves to the `menu` item.\n- Consumer: the registry item `ui/menu.json` ships the five files to `<ui alias>/menu/`, so the consumer imports `<ui alias>/menu` and also receives the agent docs. A consumer that already has a single `menu.tsx` keeps it, and that file wins over the folder in module resolution.\n- Theme: two rules of the consumer's stylesheet belong to the menu, the focus outline and the shortcut color (`apps/example/packages/ui/src/styles.css`); see `ACCESSIBILITY.md`.\n\n## Dependents\n\n- `packages/ui/src/chat/chat-message-actions.tsx`.\n- `packages/ui/src/patterns`: `collection` (data-grid and data-table submenus, filter submenu), `properties/composition/property-collection.tsx`, `action-bar`, `toolbar`, `flow/canvas`.\n- `packages/ui/src/blocks`: the shell user menu and workspace switcher, the workflow editor and agent builder.\n- `context-menu.tsx` is a separate COSS item with its own copies of the item classes; an edit here does not reach it.\n\n## Invariants\n\n- The check of `MenuCheckboxItem` and `MenuRadioItem` sits in a trailing column after the label, as in `SelectItem` and the `switch` variant; the label span is `flex items-center gap-2`, so an icon may precede the text.\n- `inset` padding equals the label start after an icon (`ps-7.5`, `sm:ps-7`), on items, link items, submenu triggers and group labels.\n- `TOKENS.md` and `menu.tsx` carry the same classes: the rows of an element's table, joined, hold exactly the classes of its string. An edit that touches one and not the other is incomplete, and `scripts/ui-tokens.test.ts` fails on it.\n- Items are 44px tall with a coarse pointer (`pointer-coarse:min-h-11`).\n- `MenuShortcut` renders `aria-hidden`; an item with a shortcut sets `aria-keyshortcuts` (`Meta+K`).\n- A disabled item ignores the pointer, so it says why it is disabled inside the item, not in a tooltip.\n- `MenuPopup` is at least 160px wide (`min-w-40`) whatever `w-*` it gets, and pads the list by 8px (`p-2`). `MenuSubPopup` is a `MenuPopup` with `side=\"inline-end\"` and `data-slot=\"menu-sub-content\"`.\n- Focus moves to the highlighted item (Base UI); keyboard focus shows through `:focus-visible`, so the pointer never draws the outline.\n\n## Styling\n\n- `data-slot`: `menu-trigger`, `menu-positioner`, `menu-popup`, `menu-sub-content`, `menu-group`, `menu-label`, `menu-item`, `menu-link-item`, `menu-checkbox-item`, `menu-radio-group`, `menu-radio-item`, `menu-separator`, `menu-shortcut`, `menu-sub`, `menu-sub-trigger`.\n- `data-variant` (`default`, `destructive`) on items and link items; `data-inset` on items, link items, submenu triggers and group labels.\n- Base UI state attributes used for style: `data-highlighted`, `data-disabled`, `data-checked`, `data-unchecked`, `data-popup-open`, `data-side`.\n- Contrast is fixed in the theme, never in `menu.tsx`; the rules and their ratios are in `ACCESSIBILITY.md`.\n\n## Verify\n\n```bash\nbun run typecheck && bun run storybook:typecheck\nbun run check:coss && bun run boundaries:check && bun run overrides:check\nbun test scripts/ui-tokens.test.ts # TOKENS.md against the class strings\ncd apps/storybook && bunx vitest run --project=storybook --project=storybook-dark src/ui/menu\n```\n\nAn edit of a class a pattern or template relies on runs the whole Storybook suite.\n\n## Pointers\n\n- `ACCESSIBILITY.md` (this folder): the menu's accessibility decisions and measures.\n- `TOKENS.md` (this folder): the blueprint of every part.\n- Stories: `apps/storybook/src/ui/menu/`; the API Reference is `api-reference.mdx` there, and the compositions the pages share are in `menu-layouts.tsx`. A change to a prop, a default or a `data-*` attribute updates that page by hand: nothing checks it.\n- Decision and history: `docs/architecture/tc96-ui.md` (`Itens de menu do COSS ficam em packages/ui`), `.specs/adr/0008-ui-owned-source.md`.\n"
12
+ },
13
+ {
14
+ "path": "registry/default/ui/menu/TOKENS.md",
15
+ "content": "# Menu tokens\n\nThe blueprint of the menu and its single source of truth. Every class `menu.tsx` sets is here, once, on the element that carries it; the rows of an element's table, joined, hold exactly the classes of the string passed to `cn()` (the order inside a string does not change the result). Where `cn()` takes two strings, as the item and variant tables of `MenuCheckboxItem`, the later one wins a conflict (`gap-4` over `gap-2`). A change to how the menu looks starts here and is then copied into `menu.tsx`.\n\n`Name` says what a row does:\n\n| Name | Meaning |\n| --- | --- |\n| `layout` | display, alignment, gaps, cursor |\n| `size` | dimensions, padding and type size with no condition |\n| `size:sm` | the same, from the `sm` breakpoint |\n| `size:coarse` | the same, with a coarse pointer |\n| `type` | weight, family, tracking |\n| `shape` | radius, border, shadow |\n| `color` | theme colors at rest |\n| `inset` | the `inset` prop (`data-inset`) |\n| `highlighted`, `open`, `checked`, `unchecked`, `pressed`, `disabled` | a Base UI state attribute |\n| `destructive` | `variant=\"destructive\"` (`data-variant`) |\n| `focus` | outline and ring |\n| `icon` | an `svg` child |\n| `anchor` | sizing against the trigger (`--anchor-width`) |\n| `motion` | transform origin and transitions |\n| `rtl` | right-to-left overrides |\n| `highlight` | the 1px inner light of the popup |\n\n## Theme\n\nTokens read: `--popover`, `--border`, `--foreground`, `--accent`, `--accent-foreground`, `--destructive-foreground`, `--muted-foreground`, `--primary`, `--input`, `--background`, `--ring`, `--radius-lg`. The ui manifest ships `--destructive-foreground` as `red-700` (light) and `red-400` (dark).\n\nRules in the consumer's stylesheet (`apps/example/packages/ui/src/styles.css`), outside `menu.tsx`:\n\n| Name | Selectors | Description |\n| --- | --- | --- |\n| `focus` | `[role^=\"menuitem\"][data-slot^=\"menu-\"]:focus-visible { outline: 2px solid var(--ring); outline-offset: -2px }` | keyboard focus on every item |\n| `color` | `[data-slot=\"menu-shortcut\"] { color: var(--muted-foreground) }` | drops the `/72` of `MenuShortcut` |\n\nWhy each rule exists, with its contrast: `ACCESSIBILITY.md`.\n\n## Parts\n\n`Menu`, `MenuPortal`, `MenuCreateHandle`, `MenuGroup` (`menu-group`), `MenuRadioGroup` (`menu-radio-group`), `MenuSub` (`menu-sub`) and `MenuTrigger` (`menu-trigger`) set no class; `MenuTrigger` takes its look from what it renders.\n\n### MenuPopup\n\n`Menu.Portal` › `Menu.Positioner` › `Menu.Popup` › list `div`. Positioner defaults: `side=\"bottom\"`, `align=\"center\"`, `sideOffset={4}`.\n\n#### Positioner (`menu-positioner`)\n\n| Name | Selectors | Description |\n| --- | --- | --- |\n| `layout` | `z-50` | stacking |\n\n#### Popup (`menu-popup`)\n\n| Name | Selectors | Description |\n| --- | --- | --- |\n| `layout` | `relative flex` | |\n| `size` | `min-w-40` | at least 160px, also when a `w-*` class is passed |\n| `motion` | `origin-(--transform-origin)` | opens from the trigger |\n| `shape` | `rounded-lg border shadow-lg/5` | `--radius-lg`, 1px `--border` |\n| `color` | `bg-popover not-dark:bg-clip-padding` | |\n| `focus` | `outline-none focus:outline-none` | the popup itself shows no outline |\n| `highlight` | `before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] before:shadow-[0_1px_--theme(--color-black/4%)] dark:before:shadow-[0_-1px_--theme(--color-white/6%)]` | fixed alpha, not a token |\n\n#### List\n\n| Name | Selectors | Description |\n| --- | --- | --- |\n| `layout` | `w-full overflow-y-auto` | scrolls when taller than the space |\n| `size` | `max-h-(--available-height) p-2` | 8px around the items |\n\n### MenuSubPopup (`menu-sub-content`)\n\nA `MenuPopup` with `side=\"inline-end\"`, `align=\"start\"`, `sideOffset={0}` and `alignOffset={-5}` when `align` is not `center`. No class of its own.\n\n### MenuItem (`menu-item`)\n\n`Menu.Item`, with `data-inset` and `data-variant` (`default`, `destructive`).\n\n| Name | Selectors | Description |\n| --- | --- | --- |\n| `layout` | `flex items-center gap-2 cursor-default select-none` | icon, label, shortcut in a row |\n| `size` | `min-h-8 px-2 py-1 text-base` | 32px, 16px text |\n| `size:sm` | `sm:min-h-7 sm:text-sm` | 28px, 14px text |\n| `size:coarse` | `pointer-coarse:min-h-11` | 44px |\n| `inset` | `data-inset:ps-7.5 sm:data-inset:ps-7` | label start after an icon |\n| `shape` | `rounded-sm` | |\n| `color` | `text-foreground` | |\n| `highlighted` | `data-highlighted:bg-accent data-highlighted:text-accent-foreground` | |\n| `destructive` | `data-[variant=destructive]:text-destructive-foreground` | |\n| `disabled` | `data-disabled:pointer-events-none data-disabled:opacity-64` | |\n| `focus` | `outline-none` | keyboard focus comes from the theme rule |\n| `icon` | `[&>svg:not([class*='size-'])]:size-4.5 sm:[&>svg:not([class*='size-'])]:size-4 [&>svg:not([class*='opacity-'])]:opacity-80 [&>svg]:pointer-events-none [&>svg]:-mx-0.5 [&>svg]:shrink-0` | 18px, 16px from `sm`, at 80% |\n\n### MenuLinkItem (`menu-link-item`)\n\n`Menu.LinkItem`, `closeOnClick` defaults to `true`. Same table as `MenuItem`, row for row.\n\n### MenuCheckboxItem (`menu-checkbox-item`)\n\n`Menu.CheckboxItem`. The item string is the item table plus one variant table.\n\n#### Item\n\n| Name | Selectors | Description |\n| --- | --- | --- |\n| `layout` | `grid items-center gap-2 cursor-default` | |\n| `size` | `min-h-8 py-1 ps-2 text-base` | |\n| `size:sm` | `sm:min-h-7 sm:text-sm` | |\n| `size:coarse` | `pointer-coarse:min-h-11` | |\n| `anchor` | `in-data-[side=none]:min-w-[calc(var(--anchor-width)+1.25rem)]` | as wide as the trigger when the popup covers it |\n| `shape` | `rounded-sm` | |\n| `color` | `text-foreground` | |\n| `highlighted` | `data-highlighted:bg-accent data-highlighted:text-accent-foreground` | |\n| `disabled` | `data-disabled:pointer-events-none data-disabled:opacity-64` | |\n| `focus` | `outline-none` | |\n| `icon` | `[&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0` | any nested `svg` |\n\n#### Variant `default`\n\n| Name | Selectors | Description |\n| --- | --- | --- |\n| `layout` | `grid-cols-[minmax(0,1fr)_.75rem] gap-4` | label, then a 12px check column |\n| `size` | `pe-2.5` | |\n\n#### Variant `switch`\n\n| Name | Selectors | Description |\n| --- | --- | --- |\n| `layout` | `grid-cols-[1fr_auto] gap-4` | label, then the switch |\n| `size` | `pe-1.5` | |\n\n#### Label, `default`\n\n| Name | Selectors | Description |\n| --- | --- | --- |\n| `layout` | `col-start-1 row-start-1 flex min-w-0 items-center gap-2` | an icon may precede the text |\n\n#### Check, `default`\n\n`Menu.CheckboxItemIndicator` holding a 24×24 `svg` (`stroke=\"currentColor\"`, `strokeWidth=\"2\"`, `aria-hidden`).\n\n| Name | Selectors | Description |\n| --- | --- | --- |\n| `layout` | `col-start-2 row-start-1 -me-0.5` | trailing column |\n\n#### Label, `switch`\n\n| Name | Selectors | Description |\n| --- | --- | --- |\n| `layout` | `col-start-1` | |\n\n#### Track, `switch`\n\n`Menu.CheckboxItemIndicator` with `keepMounted`.\n\n| Name | Selectors | Description |\n| --- | --- | --- |\n| `layout` | `inline-flex shrink-0 items-center p-px` | |\n| `size` | `h-[calc(var(--thumb-size)+2px)] w-[calc(var(--thumb-size)*2-2px)] [--thumb-size:--spacing(4)]` | 16px thumb |\n| `size:sm` | `sm:[--thumb-size:--spacing(3)]` | 12px thumb |\n| `shape` | `rounded-full inset-shadow-[0_1px_--theme(--color-black/4%)]` | |\n| `checked` | `data-checked:bg-primary` | |\n| `unchecked` | `data-unchecked:bg-input` | |\n| `disabled` | `data-disabled:opacity-64` | |\n| `focus` | `outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background` | |\n| `motion` | `transition-[background-color,box-shadow] duration-200` | |\n\n#### Thumb, `switch`\n\n| Name | Selectors | Description |\n| --- | --- | --- |\n| `layout` | `pointer-events-none block aspect-square h-full` | |\n| `shape` | `rounded-(--thumb-size) shadow-sm/5` | |\n| `color` | `bg-background` | |\n| `checked` | `in-[[data-slot=menu-checkbox-item][data-checked]]:origin-[var(--thumb-size)_50%] in-[[data-slot=menu-checkbox-item][data-checked]]:translate-x-[calc(var(--thumb-size)-4px)]` | slides to the end |\n| `pressed` | `in-[[data-slot=menu-checkbox-item]:active]:not-data-disabled:scale-x-110 in-[[data-slot=menu-checkbox-item]:active]:rounded-[var(--thumb-size)/calc(var(--thumb-size)*1.10)]` | stretches while pressed |\n| `motion` | `origin-left will-change-transform [transition:translate_.15s,border-radius_.15s,scale_.1s_.1s,transform-origin_.15s]` | |\n| `rtl` | `rtl:origin-right rtl:in-[[data-slot=menu-checkbox-item][data-checked]]:origin-left rtl:in-[[data-slot=menu-checkbox-item][data-checked]]:-translate-x-[calc(var(--thumb-size)-4px)]` | |\n\n### MenuRadioItem (`menu-radio-item`)\n\n`Menu.RadioItem`.\n\n#### Item\n\n| Name | Selectors | Description |\n| --- | --- | --- |\n| `layout` | `grid grid-cols-[minmax(0,1fr)_.75rem] items-center gap-4 cursor-default` | label, then a 12px check column |\n| `size` | `min-h-8 py-1 ps-2 pe-2.5 text-base` | |\n| `size:sm` | `sm:min-h-7 sm:text-sm` | |\n| `size:coarse` | `pointer-coarse:min-h-11` | |\n| `anchor` | `in-data-[side=none]:min-w-[calc(var(--anchor-width)+1.25rem)]` | |\n| `shape` | `rounded-sm` | |\n| `color` | `text-foreground` | |\n| `highlighted` | `data-highlighted:bg-accent data-highlighted:text-accent-foreground` | |\n| `disabled` | `data-disabled:pointer-events-none data-disabled:opacity-64` | |\n| `focus` | `outline-none` | |\n| `icon` | `[&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0` | |\n\n#### Label\n\n| Name | Selectors | Description |\n| --- | --- | --- |\n| `layout` | `col-start-1 row-start-1 flex min-w-0 items-center gap-2` | |\n\n#### Check\n\n`Menu.RadioItemIndicator` holding the same `svg` as `MenuCheckboxItem`.\n\n| Name | Selectors | Description |\n| --- | --- | --- |\n| `layout` | `col-start-2 row-start-1 -me-0.5` | |\n\n### MenuGroupLabel (`menu-label`)\n\n`Menu.GroupLabel`, with `data-inset`.\n\n| Name | Selectors | Description |\n| --- | --- | --- |\n| `size` | `px-2 py-1.5 text-xs` | |\n| `type` | `font-medium` | |\n| `color` | `text-muted-foreground` | |\n| `inset` | `data-inset:ps-7.5 sm:data-inset:ps-7` | |\n\n### MenuSeparator (`menu-separator`)\n\n`Menu.Separator`.\n\n| Name | Selectors | Description |\n| --- | --- | --- |\n| `size` | `mx-2 my-1 h-px` | |\n| `color` | `bg-border` | |\n\n### MenuShortcut (`menu-shortcut`)\n\nA `kbd` with `aria-hidden=\"true\"`.\n\n| Name | Selectors | Description |\n| --- | --- | --- |\n| `layout` | `ms-auto` | pushed to the end of the item |\n| `type` | `font-medium font-sans text-xs tracking-widest` | |\n| `color` | `text-muted-foreground/72` | the theme rule resets it to the full token |\n\n### MenuSubTrigger (`menu-sub-trigger`)\n\n`Menu.SubmenuTrigger`, with `data-inset`, followed by a chevron.\n\n#### Trigger\n\n| Name | Selectors | Description |\n| --- | --- | --- |\n| `layout` | `flex items-center gap-2` | |\n| `size` | `min-h-8 px-2 py-1 text-base` | |\n| `size:sm` | `sm:min-h-7 sm:text-sm` | |\n| `size:coarse` | `pointer-coarse:min-h-11` | |\n| `inset` | `data-inset:ps-7.5 sm:data-inset:ps-7` | |\n| `shape` | `rounded-sm` | |\n| `color` | `text-foreground` | |\n| `highlighted` | `data-highlighted:bg-accent data-highlighted:text-accent-foreground` | |\n| `open` | `data-popup-open:bg-accent data-popup-open:text-accent-foreground` | stays lit while the submenu is open |\n| `disabled` | `data-disabled:pointer-events-none data-disabled:opacity-64` | |\n| `focus` | `outline-none` | |\n| `icon` | `[&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&>svg:not(:last-child)]:-mx-0.5` | |\n\n#### Chevron\n\n`CaretRightIcon` from `@phosphor-icons/react`.\n\n| Name | Selectors | Description |\n| --- | --- | --- |\n| `layout` | `ms-auto -me-0.5` | |\n| `color` | `opacity-80` | |\n\n## Base UI variables\n\n| Name | Selectors | Description |\n| --- | --- | --- |\n| `--available-height` | List | max height before scrolling |\n| `--transform-origin` | Popup | open and close origin |\n| `--anchor-width` | `MenuCheckboxItem`, `MenuRadioItem` | width of the trigger |\n"
16
+ },
17
+ {
18
+ "path": "registry/default/ui/menu/index.ts",
19
+ "content": "export * from \"./menu\";\n"
20
+ },
21
+ {
22
+ "path": "registry/default/ui/menu/menu.tsx",
23
+ "content": "\"use client\";\n\nimport { Menu as MenuPrimitive } from \"@base-ui/react/menu\";\nimport { CaretRightIcon } from \"@phosphor-icons/react\";\nimport type * as React from \"react\";\nimport { cn } from \"@tc96/utils\";\n\nexport const MenuCreateHandle: typeof MenuPrimitive.createHandle =\n MenuPrimitive.createHandle;\n\nexport const Menu: typeof MenuPrimitive.Root = MenuPrimitive.Root;\n\nexport const MenuPortal: typeof MenuPrimitive.Portal = MenuPrimitive.Portal;\n\nexport function MenuTrigger({\n className,\n children,\n ...props\n}: MenuPrimitive.Trigger.Props): React.ReactElement {\n return (\n <MenuPrimitive.Trigger\n className={className}\n data-slot=\"menu-trigger\"\n {...props}\n >\n {children}\n </MenuPrimitive.Trigger>\n );\n}\n\nexport function MenuPopup({\n children,\n className,\n sideOffset = 4,\n align = \"center\",\n alignOffset,\n side = \"bottom\",\n anchor,\n portalProps,\n ...props\n}: MenuPrimitive.Popup.Props & {\n align?: MenuPrimitive.Positioner.Props[\"align\"];\n sideOffset?: MenuPrimitive.Positioner.Props[\"sideOffset\"];\n alignOffset?: MenuPrimitive.Positioner.Props[\"alignOffset\"];\n side?: MenuPrimitive.Positioner.Props[\"side\"];\n anchor?: MenuPrimitive.Positioner.Props[\"anchor\"];\n portalProps?: MenuPrimitive.Portal.Props;\n}): React.ReactElement {\n return (\n <MenuPortal {...portalProps}>\n <MenuPrimitive.Positioner\n align={align}\n alignOffset={alignOffset}\n anchor={anchor}\n className=\"z-50\"\n data-slot=\"menu-positioner\"\n side={side}\n sideOffset={sideOffset}\n >\n <MenuPrimitive.Popup\n className={cn(\n \"relative flex min-w-40 origin-(--transform-origin) rounded-lg border bg-popover not-dark:bg-clip-padding shadow-lg/5 outline-none before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] before:shadow-[0_1px_--theme(--color-black/4%)] focus:outline-none dark:before:shadow-[0_-1px_--theme(--color-white/6%)]\",\n className,\n )}\n data-slot=\"menu-popup\"\n {...props}\n >\n <div className=\"max-h-(--available-height) w-full overflow-y-auto p-2\">\n {children}\n </div>\n </MenuPrimitive.Popup>\n </MenuPrimitive.Positioner>\n </MenuPortal>\n );\n}\n\nexport function MenuGroup(\n props: MenuPrimitive.Group.Props,\n): React.ReactElement {\n return <MenuPrimitive.Group data-slot=\"menu-group\" {...props} />;\n}\n\nexport function MenuItem({\n className,\n inset,\n variant = \"default\",\n ...props\n}: MenuPrimitive.Item.Props & {\n inset?: boolean;\n variant?: \"default\" | \"destructive\";\n}): React.ReactElement {\n return (\n <MenuPrimitive.Item\n className={cn(\n \"flex min-h-8 pointer-coarse:min-h-11 cursor-default select-none items-center gap-2 rounded-sm px-2 py-1 text-base text-foreground outline-none data-disabled:pointer-events-none data-highlighted:bg-accent data-inset:ps-7.5 sm:data-inset:ps-7 data-[variant=destructive]:text-destructive-foreground data-highlighted:text-accent-foreground data-disabled:opacity-64 sm:min-h-7 sm:text-sm [&>svg:not([class*='opacity-'])]:opacity-80 [&>svg:not([class*='size-'])]:size-4.5 sm:[&>svg:not([class*='size-'])]:size-4 [&>svg]:pointer-events-none [&>svg]:-mx-0.5 [&>svg]:shrink-0\",\n className,\n )}\n data-inset={inset}\n data-slot=\"menu-item\"\n data-variant={variant}\n {...props}\n />\n );\n}\n\nexport function MenuLinkItem({\n className,\n inset,\n variant = \"default\",\n closeOnClick = true,\n ...props\n}: MenuPrimitive.LinkItem.Props & {\n inset?: boolean;\n variant?: \"default\" | \"destructive\";\n}): React.ReactElement {\n return (\n <MenuPrimitive.LinkItem\n className={cn(\n \"flex min-h-8 pointer-coarse:min-h-11 cursor-default select-none items-center gap-2 rounded-sm px-2 py-1 text-base text-foreground outline-none data-disabled:pointer-events-none data-highlighted:bg-accent data-inset:ps-7.5 sm:data-inset:ps-7 data-[variant=destructive]:text-destructive-foreground data-highlighted:text-accent-foreground data-disabled:opacity-64 sm:min-h-7 sm:text-sm [&>svg:not([class*='opacity-'])]:opacity-80 [&>svg:not([class*='size-'])]:size-4.5 sm:[&>svg:not([class*='size-'])]:size-4 [&>svg]:pointer-events-none [&>svg]:-mx-0.5 [&>svg]:shrink-0\",\n className,\n )}\n closeOnClick={closeOnClick}\n data-inset={inset}\n data-slot=\"menu-link-item\"\n data-variant={variant}\n {...props}\n />\n );\n}\n\nexport function MenuCheckboxItem({\n className,\n children,\n checked,\n variant = \"default\",\n ...props\n}: MenuPrimitive.CheckboxItem.Props & {\n variant?: \"default\" | \"switch\";\n}): React.ReactElement {\n return (\n <MenuPrimitive.CheckboxItem\n checked={checked}\n className={cn(\n \"grid min-h-8 pointer-coarse:min-h-11 in-data-[side=none]:min-w-[calc(var(--anchor-width)+1.25rem)] cursor-default items-center gap-2 rounded-sm py-1 ps-2 text-base text-foreground outline-none data-disabled:pointer-events-none data-highlighted:bg-accent data-highlighted:text-accent-foreground data-disabled:opacity-64 sm:min-h-7 sm:text-sm [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n variant === \"switch\"\n ? \"grid-cols-[1fr_auto] gap-4 pe-1.5\"\n : \"grid-cols-[minmax(0,1fr)_.75rem] gap-4 pe-2.5\",\n className,\n )}\n data-slot=\"menu-checkbox-item\"\n {...props}\n >\n {variant === \"switch\" ? (\n <>\n <span className=\"col-start-1\">{children}</span>\n <MenuPrimitive.CheckboxItemIndicator\n className=\"inset-shadow-[0_1px_--theme(--color-black/4%)] inline-flex h-[calc(var(--thumb-size)+2px)] w-[calc(var(--thumb-size)*2-2px)] shrink-0 items-center rounded-full p-px outline-none transition-[background-color,box-shadow] duration-200 [--thumb-size:--spacing(4)] focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background data-checked:bg-primary data-unchecked:bg-input data-disabled:opacity-64 sm:[--thumb-size:--spacing(3)]\"\n keepMounted\n >\n <span className=\"pointer-events-none block aspect-square h-full in-[[data-slot=menu-checkbox-item][data-checked]]:origin-[var(--thumb-size)_50%] origin-left in-[[data-slot=menu-checkbox-item][data-checked]]:translate-x-[calc(var(--thumb-size)-4px)] in-[[data-slot=menu-checkbox-item]:active]:not-data-disabled:scale-x-110 in-[[data-slot=menu-checkbox-item]:active]:rounded-[var(--thumb-size)/calc(var(--thumb-size)*1.10)] rounded-(--thumb-size) bg-background shadow-sm/5 will-change-transform [transition:translate_.15s,border-radius_.15s,scale_.1s_.1s,transform-origin_.15s] rtl:in-[[data-slot=menu-checkbox-item][data-checked]]:origin-left rtl:origin-right rtl:in-[[data-slot=menu-checkbox-item][data-checked]]:-translate-x-[calc(var(--thumb-size)-4px)]\" />\n </MenuPrimitive.CheckboxItemIndicator>\n </>\n ) : (\n <>\n <span className=\"col-start-1 row-start-1 flex min-w-0 items-center gap-2\">\n {children}\n </span>\n <MenuPrimitive.CheckboxItemIndicator className=\"col-start-2 row-start-1 -me-0.5\">\n <svg\n aria-hidden=\"true\"\n fill=\"none\"\n height=\"24\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth=\"2\"\n viewBox=\"0 0 24 24\"\n width=\"24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d=\"M5.252 12.7 10.2 18.63 18.748 5.37\" />\n </svg>\n </MenuPrimitive.CheckboxItemIndicator>\n </>\n )}\n </MenuPrimitive.CheckboxItem>\n );\n}\n\nexport function MenuRadioGroup(\n props: MenuPrimitive.RadioGroup.Props,\n): React.ReactElement {\n return <MenuPrimitive.RadioGroup data-slot=\"menu-radio-group\" {...props} />;\n}\n\nexport function MenuRadioItem({\n className,\n children,\n ...props\n}: MenuPrimitive.RadioItem.Props): React.ReactElement {\n return (\n <MenuPrimitive.RadioItem\n className={cn(\n \"grid min-h-8 pointer-coarse:min-h-11 in-data-[side=none]:min-w-[calc(var(--anchor-width)+1.25rem)] cursor-default grid-cols-[minmax(0,1fr)_.75rem] items-center gap-4 rounded-sm py-1 ps-2 pe-2.5 text-base text-foreground outline-none data-disabled:pointer-events-none data-highlighted:bg-accent data-highlighted:text-accent-foreground data-disabled:opacity-64 sm:min-h-7 sm:text-sm [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n className,\n )}\n data-slot=\"menu-radio-item\"\n {...props}\n >\n <span className=\"col-start-1 row-start-1 flex min-w-0 items-center gap-2\">\n {children}\n </span>\n <MenuPrimitive.RadioItemIndicator className=\"col-start-2 row-start-1 -me-0.5\">\n <svg\n aria-hidden=\"true\"\n fill=\"none\"\n height=\"24\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth=\"2\"\n viewBox=\"0 0 24 24\"\n width=\"24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d=\"M5.252 12.7 10.2 18.63 18.748 5.37\" />\n </svg>\n </MenuPrimitive.RadioItemIndicator>\n </MenuPrimitive.RadioItem>\n );\n}\n\nexport function MenuGroupLabel({\n className,\n inset,\n ...props\n}: MenuPrimitive.GroupLabel.Props & {\n inset?: boolean;\n}): React.ReactElement {\n return (\n <MenuPrimitive.GroupLabel\n className={cn(\n \"px-2 py-1.5 font-medium text-muted-foreground text-xs data-inset:ps-7.5 sm:data-inset:ps-7\",\n className,\n )}\n data-inset={inset}\n data-slot=\"menu-label\"\n {...props}\n />\n );\n}\n\nexport function MenuSeparator({\n className,\n ...props\n}: MenuPrimitive.Separator.Props): React.ReactElement {\n return (\n <MenuPrimitive.Separator\n className={cn(\"mx-2 my-1 h-px bg-border\", className)}\n data-slot=\"menu-separator\"\n {...props}\n />\n );\n}\n\nexport function MenuShortcut({\n className,\n ...props\n}: React.ComponentProps<\"kbd\">): React.ReactElement {\n return (\n <kbd\n aria-hidden=\"true\"\n className={cn(\n \"ms-auto font-medium font-sans text-muted-foreground/72 text-xs tracking-widest\",\n className,\n )}\n data-slot=\"menu-shortcut\"\n {...props}\n />\n );\n}\n\nexport function MenuSub(\n props: MenuPrimitive.SubmenuRoot.Props,\n): React.ReactElement {\n return <MenuPrimitive.SubmenuRoot data-slot=\"menu-sub\" {...props} />;\n}\n\nexport function MenuSubTrigger({\n className,\n inset,\n children,\n ...props\n}: MenuPrimitive.SubmenuTrigger.Props & {\n inset?: boolean;\n}): React.ReactElement {\n return (\n <MenuPrimitive.SubmenuTrigger\n className={cn(\n \"flex min-h-8 pointer-coarse:min-h-11 items-center gap-2 rounded-sm px-2 py-1 text-base text-foreground outline-none data-disabled:pointer-events-none data-highlighted:bg-accent data-popup-open:bg-accent data-inset:ps-7.5 sm:data-inset:ps-7 data-highlighted:text-accent-foreground data-popup-open:text-accent-foreground data-disabled:opacity-64 sm:min-h-7 sm:text-sm [&>svg:not(:last-child)]:-mx-0.5 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none\",\n className,\n )}\n data-inset={inset}\n data-slot=\"menu-sub-trigger\"\n {...props}\n >\n {children}\n <CaretRightIcon aria-hidden=\"true\" className=\"ms-auto -me-0.5 opacity-80\" />\n </MenuPrimitive.SubmenuTrigger>\n );\n}\n\nexport function MenuSubPopup({\n className,\n sideOffset = 0,\n alignOffset,\n align = \"start\",\n ...props\n}: MenuPrimitive.Popup.Props & {\n align?: MenuPrimitive.Positioner.Props[\"align\"];\n sideOffset?: MenuPrimitive.Positioner.Props[\"sideOffset\"];\n alignOffset?: MenuPrimitive.Positioner.Props[\"alignOffset\"];\n}): React.ReactElement {\n const defaultAlignOffset = align !== \"center\" ? -5 : undefined;\n\n return (\n <MenuPopup\n align={align}\n alignOffset={alignOffset ?? defaultAlignOffset}\n className={className}\n data-slot=\"menu-sub-content\"\n side=\"inline-end\"\n sideOffset={sideOffset}\n {...props}\n />\n );\n}\n\nexport {\n MenuPrimitive,\n MenuCreateHandle as DropdownMenuCreateHandle,\n Menu as DropdownMenu,\n MenuPortal as DropdownMenuPortal,\n MenuTrigger as DropdownMenuTrigger,\n MenuPopup as DropdownMenuContent,\n MenuGroup as DropdownMenuGroup,\n MenuItem as DropdownMenuItem,\n MenuCheckboxItem as DropdownMenuCheckboxItem,\n MenuRadioGroup as DropdownMenuRadioGroup,\n MenuRadioItem as DropdownMenuRadioItem,\n MenuGroupLabel as DropdownMenuLabel,\n MenuSeparator as DropdownMenuSeparator,\n MenuShortcut as DropdownMenuShortcut,\n MenuSub as DropdownMenuSub,\n MenuSubTrigger as DropdownMenuSubTrigger,\n MenuSubPopup as DropdownMenuSubContent,\n};\n"
24
+ }
25
+ ],
26
+ "dependencies": [
27
+ "@base-ui/react@1.8.0",
28
+ "@phosphor-icons/react@2.1.10"
29
+ ],
30
+ "registryDependencies": [],
31
+ "cssVars": {
32
+ "light": {
33
+ "destructive-foreground": "var(--color-red-700)"
34
+ },
35
+ "dark": {
36
+ "destructive-foreground": "var(--color-red-400)"
37
+ }
38
+ }
39
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "name": "meter",
3
+ "type": "registry:ui",
4
+ "files": [
5
+ {
6
+ "path": "registry/default/ui/meter.tsx",
7
+ "content": "\"use client\";\n\nimport { Meter as MeterPrimitive } from \"@base-ui/react/meter\";\nimport type React from \"react\";\nimport { cn } from \"@tc96/utils\";\n\nexport function Meter({\n className,\n children,\n ...props\n}: MeterPrimitive.Root.Props): React.ReactElement {\n return (\n <MeterPrimitive.Root\n className={cn(\"flex w-full flex-col gap-2\", className)}\n {...props}\n >\n {children ? (\n children\n ) : (\n <MeterTrack>\n <MeterIndicator />\n </MeterTrack>\n )}\n </MeterPrimitive.Root>\n );\n}\n\nexport function MeterLabel({\n className,\n ...props\n}: MeterPrimitive.Label.Props): React.ReactElement {\n return (\n <MeterPrimitive.Label\n className={cn(\"font-medium text-foreground text-sm\", className)}\n data-slot=\"meter-label\"\n {...props}\n />\n );\n}\n\nexport function MeterTrack({\n className,\n ...props\n}: MeterPrimitive.Track.Props): React.ReactElement {\n return (\n <MeterPrimitive.Track\n className={cn(\"block h-2 w-full overflow-hidden bg-input\", className)}\n data-slot=\"meter-track\"\n {...props}\n />\n );\n}\n\nexport function MeterIndicator({\n className,\n ...props\n}: MeterPrimitive.Indicator.Props): React.ReactElement {\n return (\n <MeterPrimitive.Indicator\n className={cn(\"bg-primary transition-all duration-500\", className)}\n data-slot=\"meter-indicator\"\n {...props}\n />\n );\n}\n\nexport function MeterValue({\n className,\n ...props\n}: MeterPrimitive.Value.Props): React.ReactElement {\n return (\n <MeterPrimitive.Value\n className={cn(\"text-foreground text-sm tabular-nums\", className)}\n data-slot=\"meter-value\"\n {...props}\n />\n );\n}\n\nexport { MeterPrimitive };\n"
8
+ }
9
+ ],
10
+ "dependencies": [
11
+ "@base-ui/react@1.8.0"
12
+ ],
13
+ "registryDependencies": []
14
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "number-field",
3
+ "type": "registry:ui",
4
+ "files": [
5
+ {
6
+ "path": "registry/default/ui/number-field.tsx",
7
+ "content": "\"use client\";\n\nimport { NumberField as NumberFieldPrimitive } from \"@base-ui/react/number-field\";\nimport { MinusIcon, PlusIcon } from \"@phosphor-icons/react\";\nimport * as React from \"react\";\nimport { cn } from \"@tc96/utils\";\nimport { Label } from \"@tc96/ui/label\";\n\nexport const NumberFieldContext: React.Context<{\n fieldId: string;\n} | null> = React.createContext<{\n fieldId: string;\n} | null>(null);\n\nexport function NumberField({\n id,\n className,\n size = \"default\",\n ...props\n}: NumberFieldPrimitive.Root.Props & {\n size?: \"sm\" | \"default\" | \"lg\";\n}): React.ReactElement {\n const generatedId = React.useId();\n const fieldId = id ?? generatedId;\n\n return (\n <NumberFieldContext.Provider value={{ fieldId }}>\n <NumberFieldPrimitive.Root\n className={cn(\"flex w-full flex-col items-start gap-2\", className)}\n data-size={size}\n data-slot=\"number-field\"\n id={fieldId}\n {...props}\n />\n </NumberFieldContext.Provider>\n );\n}\n\nexport function NumberFieldGroup({\n className,\n ...props\n}: NumberFieldPrimitive.Group.Props): React.ReactElement {\n return (\n <NumberFieldPrimitive.Group\n className={cn(\n \"relative flex w-full justify-between rounded-lg border border-input bg-background not-dark:bg-clip-padding text-base text-foreground shadow-xs/5 ring-ring/24 transition-shadow before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] not-data-disabled:not-focus-within:not-aria-invalid:before:shadow-[0_1px_--theme(--color-black/4%)] focus-within:border-ring focus-within:ring-[3px] has-aria-invalid:border-destructive/36 focus-within:has-aria-invalid:border-destructive/64 focus-within:has-aria-invalid:ring-destructive/16 data-disabled:pointer-events-none data-disabled:opacity-64 sm:text-sm dark:bg-input/32 dark:has-aria-invalid:ring-destructive/24 dark:not-data-disabled:not-focus-within:not-aria-invalid:before:shadow-[0_-1px_--theme(--color-white/6%)] [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0 [[data-disabled],:focus-within,[aria-invalid]]:shadow-none\",\n className,\n )}\n data-slot=\"number-field-group\"\n {...props}\n />\n );\n}\n\nexport function NumberFieldDecrement({\n className,\n ...props\n}: NumberFieldPrimitive.Decrement.Props): React.ReactElement {\n return (\n <NumberFieldPrimitive.Decrement\n className={cn(\n \"relative flex shrink-0 cursor-pointer items-center justify-center rounded-s-[calc(var(--radius-lg)-1px)] in-data-[size=sm]:px-[calc(--spacing(2.5)-1px)] px-[calc(--spacing(3)-1px)] transition-colors pointer-coarse:after:absolute pointer-coarse:after:size-full pointer-coarse:after:min-h-11 pointer-coarse:after:min-w-11 hover:bg-accent\",\n className,\n )}\n data-slot=\"number-field-decrement\"\n {...props}\n >\n <MinusIcon aria-hidden=\"true\" />\n </NumberFieldPrimitive.Decrement>\n );\n}\n\nexport function NumberFieldIncrement({\n className,\n ...props\n}: NumberFieldPrimitive.Increment.Props): React.ReactElement {\n return (\n <NumberFieldPrimitive.Increment\n className={cn(\n \"relative flex shrink-0 cursor-pointer items-center justify-center rounded-e-[calc(var(--radius-lg)-1px)] in-data-[size=sm]:px-[calc(--spacing(2.5)-1px)] px-[calc(--spacing(3)-1px)] transition-colors pointer-coarse:after:absolute pointer-coarse:after:size-full pointer-coarse:after:min-h-11 pointer-coarse:after:min-w-11 hover:bg-accent\",\n className,\n )}\n data-slot=\"number-field-increment\"\n {...props}\n >\n <PlusIcon aria-hidden=\"true\" />\n </NumberFieldPrimitive.Increment>\n );\n}\n\nexport function NumberFieldInput({\n className,\n ...props\n}: NumberFieldPrimitive.Input.Props): React.ReactElement {\n return (\n <NumberFieldPrimitive.Input\n className={cn(\n \"h-8.5 in-data-[size=lg]:h-9.5 in-data-[size=sm]:h-7.5 w-full min-w-0 grow bg-transparent in-data-[size=sm]:px-[calc(--spacing(2.5)-1px)] px-[calc(--spacing(3)-1px)] text-center text-foreground tabular-nums in-data-[size=lg]:leading-9.5 in-data-[size=sm]:leading-7.5 leading-8.5 outline-none sm:h-7.5 sm:in-data-[size=lg]:h-8.5 sm:in-data-[size=sm]:h-6.5 sm:in-data-[size=lg]:leading-8.5 sm:in-data-[size=sm]:leading-8.5 sm:leading-7.5\",\n className,\n )}\n data-slot=\"number-field-input\"\n {...props}\n />\n );\n}\n\nexport function NumberFieldScrubArea({\n className,\n label,\n ...props\n}: NumberFieldPrimitive.ScrubArea.Props & {\n label: string;\n}): React.ReactElement {\n const context = React.useContext(NumberFieldContext);\n\n if (!context) {\n throw new Error(\n \"NumberFieldScrubArea must be used within a NumberField component for accessibility.\",\n );\n }\n\n return (\n <NumberFieldPrimitive.ScrubArea\n className={cn(\"flex cursor-ew-resize\", className)}\n data-slot=\"number-field-scrub-area\"\n {...props}\n >\n <Label className=\"cursor-ew-resize\" htmlFor={context.fieldId}>\n {label}\n </Label>\n <NumberFieldPrimitive.ScrubAreaCursor className=\"drop-shadow-[0_1px_1px_#0008] filter\">\n <CursorGrowIcon aria-hidden=\"true\" />\n </NumberFieldPrimitive.ScrubAreaCursor>\n </NumberFieldPrimitive.ScrubArea>\n );\n}\n\nexport function CursorGrowIcon(\n props: React.ComponentProps<\"svg\">,\n): React.ReactElement {\n return (\n <svg\n aria-hidden=\"true\"\n fill=\"black\"\n height=\"14\"\n stroke=\"white\"\n viewBox=\"0 0 24 14\"\n width=\"26\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <path d=\"M19.5 5.5L6.49737 5.51844V2L1 6.9999L6.5 12L6.49737 8.5L19.5 8.5V12L25 6.9999L19.5 2V5.5Z\" />\n </svg>\n );\n}\n\nexport { NumberFieldPrimitive };\n"
8
+ }
9
+ ],
10
+ "dependencies": [
11
+ "@base-ui/react@1.8.0",
12
+ "@phosphor-icons/react@2.1.10"
13
+ ],
14
+ "registryDependencies": [
15
+ "@ui/label"
16
+ ]
17
+ }
@@ -0,0 +1,31 @@
1
+ {
2
+ "name": "otp-field",
3
+ "type": "registry:ui",
4
+ "files": [
5
+ {
6
+ "path": "registry/default/ui/otp-field.tsx",
7
+ "content": "\"use client\";\n\nimport { OTPField as OTPFieldPrimitive } from \"@base-ui/react/otp-field\";\nimport type * as React from \"react\";\nimport { cn } from \"@tc96/utils\";\nimport { Separator } from \"@tc96/ui/separator\";\n\nexport function OTPField({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<typeof OTPFieldPrimitive.Root> & {\n size?: \"default\" | \"lg\";\n}): React.ReactElement {\n return (\n <OTPFieldPrimitive.Root\n className={cn(\n \"flex items-center gap-2 has-disabled:opacity-64 has-disabled:**:data-[slot=otp-field-input]:shadow-none has-disabled:**:data-[slot=otp-field-input]:before:shadow-none!\",\n className,\n )}\n data-size={size}\n data-slot=\"otp-field\"\n {...props}\n />\n );\n}\n\nexport function OTPFieldInput({\n className,\n ...props\n}: React.ComponentProps<typeof OTPFieldPrimitive.Input>): React.ReactElement {\n return (\n <OTPFieldPrimitive.Input\n className={cn(\n \"relative in-[[data-slot=otp-field][data-size=lg]]:size-10 size-9 min-w-0 rounded-lg border border-input bg-background not-dark:bg-clip-padding text-center in-[[data-slot=otp-field][data-size=lg]]:text-lg text-base text-foreground in-[[data-slot=otp-field][data-size=lg]]:leading-10 leading-9 shadow-xs/5 outline-none ring-ring/24 transition-shadow before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] not-focus-visible:not-aria-invalid:before:shadow-[0_1px_--theme(--color-black/4%)] focus-visible:z-10 focus-visible:border-ring focus-visible:shadow-none focus-visible:ring-[3px] focus-visible:ring-ring/24 aria-invalid:border-destructive/36 aria-invalid:shadow-none aria-invalid:focus-visible:border-destructive/64 aria-invalid:focus-visible:ring-destructive/16 sm:in-[[data-slot=otp-field][data-size=lg]]:size-9 sm:size-8 sm:in-[[data-slot=otp-field][data-size=lg]]:text-base sm:text-sm sm:in-[[data-slot=otp-field][data-size=lg]]:leading-9 sm:leading-8 dark:bg-input/32 dark:aria-invalid:focus-visible:ring-destructive/24 dark:not-focus-visible:not-aria-invalid:before:shadow-[0_-1px_--theme(--color-white/6%)]\",\n className,\n )}\n data-slot=\"otp-field-input\"\n spellCheck={false}\n {...props}\n />\n );\n}\n\nexport function OTPFieldSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof Separator>): React.ReactElement {\n return (\n <OTPFieldPrimitive.Separator\n render={\n <Separator\n className={cn(\n \"rounded-full bg-input data-[orientation=horizontal]:h-0.5 data-[orientation=horizontal]:w-3\",\n className,\n )}\n orientation=\"horizontal\"\n {...props}\n />\n }\n />\n );\n}\n\nexport { OTPFieldPrimitive };\n"
8
+ }
9
+ ],
10
+ "dependencies": [
11
+ "@base-ui/react@1.8.0"
12
+ ],
13
+ "registryDependencies": [
14
+ "@ui/separator"
15
+ ],
16
+ "cssVars": {
17
+ "theme": {
18
+ "--animate-caret-blink": "1s ease-out infinite caret-blink"
19
+ }
20
+ },
21
+ "css": {
22
+ "@keyframes caret-blink": {
23
+ "0%, 70%, to": {
24
+ "opacity": "1"
25
+ },
26
+ "20%, 50%": {
27
+ "opacity": "0"
28
+ }
29
+ }
30
+ }
31
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "pagination",
3
+ "type": "registry:ui",
4
+ "files": [
5
+ {
6
+ "path": "registry/default/ui/pagination.tsx",
7
+ "content": "\"use client\";\n\nimport { mergeProps } from \"@base-ui/react/merge-props\";\nimport { useRender } from \"@base-ui/react/use-render\";\nimport { CaretLeftIcon, CaretRightIcon, DotsThreeIcon } from \"@phosphor-icons/react\";\nimport type * as React from \"react\";\nimport { cn } from \"@tc96/utils\";\nimport { type Button, buttonVariants } from \"@tc96/ui/button\";\n\nexport function Pagination({\n className,\n ...props\n}: React.ComponentProps<\"nav\">): React.ReactElement {\n return (\n <nav\n aria-label=\"pagination\"\n className={cn(\"mx-auto flex w-full justify-center\", className)}\n data-slot=\"pagination\"\n {...props}\n />\n );\n}\n\nexport function PaginationContent({\n className,\n ...props\n}: React.ComponentProps<\"ul\">): React.ReactElement {\n return (\n <ul\n className={cn(\"flex flex-row items-center gap-1\", className)}\n data-slot=\"pagination-content\"\n {...props}\n />\n );\n}\n\nexport function PaginationItem({\n ...props\n}: React.ComponentProps<\"li\">): React.ReactElement {\n return <li data-slot=\"pagination-item\" {...props} />;\n}\n\nexport type PaginationLinkProps = {\n isActive?: boolean;\n size?: React.ComponentProps<typeof Button>[\"size\"];\n} & useRender.ComponentProps<\"a\">;\n\nexport function PaginationLink({\n className,\n isActive,\n size = \"icon\",\n render,\n ...props\n}: PaginationLinkProps): React.ReactElement {\n const defaultProps = {\n \"aria-current\": isActive ? (\"page\" as const) : undefined,\n className: render\n ? className\n : cn(\n buttonVariants({\n size,\n variant: isActive ? \"outline\" : \"ghost\",\n }),\n className,\n ),\n \"data-active\": isActive,\n \"data-slot\": \"pagination-link\",\n };\n\n return useRender({\n defaultTagName: \"a\",\n props: mergeProps<\"a\">(defaultProps, props),\n render,\n });\n}\n\nexport function PaginationPrevious({\n className,\n ...props\n}: React.ComponentProps<typeof PaginationLink>): React.ReactElement {\n return (\n <PaginationLink\n aria-label=\"Go to previous page\"\n className={cn(\"max-sm:aspect-square max-sm:p-0\", className)}\n size=\"default\"\n {...props}\n >\n <CaretLeftIcon aria-hidden=\"true\" className=\"sm:-ms-1\" />\n <span className=\"max-sm:hidden\">Previous</span>\n </PaginationLink>\n );\n}\n\nexport function PaginationNext({\n className,\n ...props\n}: React.ComponentProps<typeof PaginationLink>): React.ReactElement {\n return (\n <PaginationLink\n aria-label=\"Go to next page\"\n className={cn(\"max-sm:aspect-square max-sm:p-0\", className)}\n size=\"default\"\n {...props}\n >\n <span className=\"max-sm:hidden\">Next</span>\n <CaretRightIcon aria-hidden=\"true\" className=\"sm:-me-1\" />\n </PaginationLink>\n );\n}\n\nexport function PaginationEllipsis({\n className,\n ...props\n}: React.ComponentProps<\"span\">): React.ReactElement {\n return (\n <span\n aria-hidden\n className={cn(\"flex min-w-7 justify-center\", className)}\n data-slot=\"pagination-ellipsis\"\n {...props}\n >\n <DotsThreeIcon aria-hidden=\"true\" className=\"size-5 sm:size-4\" />\n <span className=\"sr-only\">More pages</span>\n </span>\n );\n}\n"
8
+ }
9
+ ],
10
+ "dependencies": [
11
+ "@base-ui/react@1.8.0",
12
+ "@phosphor-icons/react@2.1.10"
13
+ ],
14
+ "registryDependencies": [
15
+ "@ui/button"
16
+ ]
17
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "name": "popover",
3
+ "type": "registry:ui",
4
+ "files": [
5
+ {
6
+ "path": "registry/default/ui/popover.tsx",
7
+ "content": "\"use client\";\n\nimport { Popover as PopoverPrimitive } from \"@base-ui/react/popover\";\nimport type React from \"react\";\nimport { cn } from \"@tc96/utils\";\n\nexport const PopoverCreateHandle: typeof PopoverPrimitive.createHandle =\n PopoverPrimitive.createHandle;\n\nexport const Popover: typeof PopoverPrimitive.Root = PopoverPrimitive.Root;\n\nexport function PopoverTrigger({\n className,\n children,\n ...props\n}: PopoverPrimitive.Trigger.Props): React.ReactElement {\n return (\n <PopoverPrimitive.Trigger\n className={className}\n data-slot=\"popover-trigger\"\n {...props}\n >\n {children}\n </PopoverPrimitive.Trigger>\n );\n}\n\nexport function PopoverPopup({\n children,\n className,\n side = \"bottom\",\n align = \"center\",\n sideOffset = 4,\n alignOffset = 0,\n tooltipStyle = false,\n anchor,\n portalProps,\n ...props\n}: PopoverPrimitive.Popup.Props & {\n portalProps?: PopoverPrimitive.Portal.Props;\n side?: PopoverPrimitive.Positioner.Props[\"side\"];\n align?: PopoverPrimitive.Positioner.Props[\"align\"];\n sideOffset?: PopoverPrimitive.Positioner.Props[\"sideOffset\"];\n alignOffset?: PopoverPrimitive.Positioner.Props[\"alignOffset\"];\n tooltipStyle?: boolean;\n anchor?: PopoverPrimitive.Positioner.Props[\"anchor\"];\n}): React.ReactElement {\n return (\n <PopoverPrimitive.Portal {...portalProps}>\n <PopoverPrimitive.Positioner\n align={align}\n alignOffset={alignOffset}\n anchor={anchor}\n className=\"z-50 h-(--positioner-height) w-(--positioner-width) max-w-(--available-width) transition-[top,left,right,bottom,transform] data-instant:transition-none\"\n data-slot=\"popover-positioner\"\n side={side}\n sideOffset={sideOffset}\n >\n <PopoverPrimitive.Popup\n className={cn(\n \"relative flex h-(--popup-height,auto) w-(--popup-width,auto) origin-(--transform-origin) rounded-lg border bg-popover not-dark:bg-clip-padding text-popover-foreground shadow-lg/5 outline-none transition-[width,height,scale,opacity] before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] before:shadow-[0_1px_--theme(--color-black/4%)] has-data-[slot=calendar]:rounded-xl has-data-[slot=calendar]:before:rounded-[calc(var(--radius-xl)-1px)] data-starting-style:scale-98 data-starting-style:opacity-0 dark:before:shadow-[0_-1px_--theme(--color-white/6%)]\",\n tooltipStyle &&\n \"w-fit text-balance rounded-md text-xs shadow-md/5 before:rounded-[calc(var(--radius-md)-1px)]\",\n className,\n )}\n data-slot=\"popover-popup\"\n {...props}\n >\n <PopoverPrimitive.Viewport\n className={cn(\n \"relative size-full max-h-(--available-height) overflow-clip px-(--viewport-inline-padding) py-4 [--viewport-inline-padding:--spacing(4)] has-data-[slot=calendar]:p-2 data-instant:transition-none **:data-current:data-ending-style:opacity-0 **:data-current:data-starting-style:opacity-0 **:data-previous:data-ending-style:opacity-0 **:data-previous:data-starting-style:opacity-0 **:data-current:w-[calc(var(--popup-width)-2*var(--viewport-inline-padding)-2px)] **:data-previous:w-[calc(var(--popup-width)-2*var(--viewport-inline-padding)-2px)] **:data-current:opacity-100 **:data-previous:opacity-100 **:data-current:transition-opacity **:data-previous:transition-opacity\",\n tooltipStyle\n ? \"py-1 [--viewport-inline-padding:--spacing(2)]\"\n : \"not-data-transitioning:overflow-y-auto\",\n )}\n data-slot=\"popover-viewport\"\n >\n {children}\n </PopoverPrimitive.Viewport>\n </PopoverPrimitive.Popup>\n </PopoverPrimitive.Positioner>\n </PopoverPrimitive.Portal>\n );\n}\n\nexport function PopoverClose({\n ...props\n}: PopoverPrimitive.Close.Props): React.ReactElement {\n return <PopoverPrimitive.Close data-slot=\"popover-close\" {...props} />;\n}\n\nexport function PopoverTitle({\n className,\n ...props\n}: PopoverPrimitive.Title.Props): React.ReactElement {\n return (\n <PopoverPrimitive.Title\n className={cn(\"font-semibold text-lg leading-none\", className)}\n data-slot=\"popover-title\"\n {...props}\n />\n );\n}\n\nexport function PopoverDescription({\n className,\n ...props\n}: PopoverPrimitive.Description.Props): React.ReactElement {\n return (\n <PopoverPrimitive.Description\n className={cn(\"text-muted-foreground text-sm\", className)}\n data-slot=\"popover-description\"\n {...props}\n />\n );\n}\n\nexport { PopoverPrimitive, PopoverPopup as PopoverContent };\n"
8
+ }
9
+ ],
10
+ "dependencies": [
11
+ "@base-ui/react@1.8.0"
12
+ ],
13
+ "registryDependencies": []
14
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "name": "preview-card",
3
+ "type": "registry:ui",
4
+ "files": [
5
+ {
6
+ "path": "registry/default/ui/preview-card.tsx",
7
+ "content": "\"use client\";\n\nimport { PreviewCard as PreviewCardPrimitive } from \"@base-ui/react/preview-card\";\nimport type React from \"react\";\nimport { cn } from \"@tc96/utils\";\n\nexport const PreviewCard: typeof PreviewCardPrimitive.Root =\n PreviewCardPrimitive.Root;\n\nexport function PreviewCardTrigger({\n ...props\n}: PreviewCardPrimitive.Trigger.Props): React.ReactElement {\n return (\n <PreviewCardPrimitive.Trigger data-slot=\"preview-card-trigger\" {...props} />\n );\n}\n\nexport function PreviewCardPopup({\n className,\n children,\n align = \"center\",\n sideOffset = 4,\n anchor,\n portalProps,\n ...props\n}: PreviewCardPrimitive.Popup.Props & {\n align?: PreviewCardPrimitive.Positioner.Props[\"align\"];\n sideOffset?: PreviewCardPrimitive.Positioner.Props[\"sideOffset\"];\n anchor?: PreviewCardPrimitive.Positioner.Props[\"anchor\"];\n portalProps?: PreviewCardPrimitive.Portal.Props;\n}): React.ReactElement {\n return (\n <PreviewCardPrimitive.Portal {...portalProps}>\n <PreviewCardPrimitive.Positioner\n align={align}\n anchor={anchor}\n className=\"z-50\"\n data-slot=\"preview-card-positioner\"\n sideOffset={sideOffset}\n >\n <PreviewCardPrimitive.Popup\n className={cn(\n \"relative flex w-64 origin-(--transform-origin) text-balance rounded-lg border bg-popover not-dark:bg-clip-padding p-4 text-popover-foreground text-sm shadow-lg/5 transition-[scale,opacity] before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] before:shadow-[0_1px_--theme(--color-black/4%)] data-ending-style:scale-98 data-starting-style:scale-98 data-ending-style:opacity-0 data-starting-style:opacity-0 dark:before:shadow-[0_-1px_--theme(--color-white/6%)]\",\n className,\n )}\n data-slot=\"preview-card-content\"\n {...props}\n >\n {children}\n </PreviewCardPrimitive.Popup>\n </PreviewCardPrimitive.Positioner>\n </PreviewCardPrimitive.Portal>\n );\n}\n\nexport {\n PreviewCardPrimitive,\n PreviewCard as HoverCard,\n PreviewCardTrigger as HoverCardTrigger,\n PreviewCardPopup as HoverCardContent,\n};\n"
8
+ }
9
+ ],
10
+ "dependencies": [
11
+ "@base-ui/react@1.8.0"
12
+ ],
13
+ "registryDependencies": []
14
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "name": "progress",
3
+ "type": "registry:ui",
4
+ "files": [
5
+ {
6
+ "path": "registry/default/ui/progress.tsx",
7
+ "content": "\"use client\";\n\nimport { Progress as ProgressPrimitive } from \"@base-ui/react/progress\";\nimport type React from \"react\";\nimport { cn } from \"@tc96/utils\";\n\nexport function Progress({\n className,\n children,\n ...props\n}: ProgressPrimitive.Root.Props): React.ReactElement {\n return (\n <ProgressPrimitive.Root\n className={cn(\"flex w-full flex-col gap-2\", className)}\n data-slot=\"progress\"\n {...props}\n >\n {children ? (\n children\n ) : (\n <ProgressTrack>\n <ProgressIndicator />\n </ProgressTrack>\n )}\n </ProgressPrimitive.Root>\n );\n}\n\nexport function ProgressLabel({\n className,\n ...props\n}: ProgressPrimitive.Label.Props): React.ReactElement {\n return (\n <ProgressPrimitive.Label\n className={cn(\"font-medium text-sm\", className)}\n data-slot=\"progress-label\"\n {...props}\n />\n );\n}\n\nexport function ProgressTrack({\n className,\n ...props\n}: ProgressPrimitive.Track.Props): React.ReactElement {\n return (\n <ProgressPrimitive.Track\n className={cn(\n \"block h-1.5 w-full overflow-hidden rounded-full bg-input\",\n className,\n )}\n data-slot=\"progress-track\"\n {...props}\n />\n );\n}\n\nexport function ProgressIndicator({\n className,\n ...props\n}: ProgressPrimitive.Indicator.Props): React.ReactElement {\n return (\n <ProgressPrimitive.Indicator\n className={cn(\"bg-primary transition-all duration-500\", className)}\n data-slot=\"progress-indicator\"\n {...props}\n />\n );\n}\n\nexport function ProgressValue({\n className,\n ...props\n}: ProgressPrimitive.Value.Props): React.ReactElement {\n return (\n <ProgressPrimitive.Value\n className={cn(\"text-sm tabular-nums\", className)}\n data-slot=\"progress-value\"\n {...props}\n />\n );\n}\n\nexport { ProgressPrimitive };\n"
8
+ }
9
+ ],
10
+ "dependencies": [
11
+ "@base-ui/react@1.8.0"
12
+ ],
13
+ "registryDependencies": []
14
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "name": "property-meta",
3
+ "type": "registry:ui",
4
+ "files": [
5
+ {
6
+ "path": "registry/default/ui/property-meta.tsx",
7
+ "content": "import {\n CellSignalHighIcon,\n CellSignalLowIcon,\n CellSignalMediumIcon,\n ChartPieSliceIcon,\n CheckCircleIcon,\n CircleDashedIcon,\n CircleHalfIcon,\n CircleIcon,\n type IconWeight,\n MinusIcon,\n type Icon as PhosphorIcon,\n ProhibitIcon,\n WarningCircleIcon,\n XCircleIcon,\n} from '@phosphor-icons/react'\nimport {\n type PropertyTone,\n propertyToneClassName,\n} from '@tc96/ui/lib/property-tone'\nimport { cn } from '@tc96/utils'\nimport type { ReactElement } from 'react'\n\nexport { type PropertyTone, propertyToneClassName }\n\nexport interface PropertyMeta {\n icon: PhosphorIcon\n tone: PropertyTone\n weight?: IconWeight\n}\n\nexport type WorkflowStatus =\n | 'backlog'\n | 'blocked'\n | 'canceled'\n | 'done'\n | 'in-progress'\n | 'in-review'\n | 'todo'\n\nexport const workflowStatusMeta = {\n backlog: { icon: CircleDashedIcon, tone: 'neutral' },\n blocked: { icon: ProhibitIcon, tone: 'danger' },\n canceled: { icon: XCircleIcon, tone: 'neutral' },\n done: { icon: CheckCircleIcon, tone: 'teal' },\n 'in-progress': { icon: CircleHalfIcon, tone: 'purple' },\n 'in-review': { icon: ChartPieSliceIcon, tone: 'warning' },\n todo: { icon: CircleIcon, tone: 'neutral' },\n} as const satisfies Record<WorkflowStatus, PropertyMeta>\n\nexport type PriorityLevel = 'high' | 'low' | 'medium' | 'none' | 'urgent'\n\nexport const priorityMeta = {\n high: { icon: CellSignalHighIcon, tone: 'warning', weight: 'fill' },\n low: { icon: CellSignalLowIcon, tone: 'neutral', weight: 'fill' },\n medium: { icon: CellSignalMediumIcon, tone: 'info', weight: 'fill' },\n none: { icon: MinusIcon, tone: 'neutral' },\n urgent: { icon: WarningCircleIcon, tone: 'danger', weight: 'fill' },\n} as const satisfies Record<PriorityLevel, PropertyMeta>\n\nexport interface PropertyMetaIconProps {\n className?: string\n meta: PropertyMeta\n}\n\nexport function PropertyMetaIcon({\n className,\n meta,\n}: Readonly<PropertyMetaIconProps>): ReactElement {\n const { icon: Icon, tone, weight } = meta\n\n return (\n <Icon\n aria-hidden=\"true\"\n className={cn(propertyToneClassName[tone], className)}\n data-slot=\"property-meta-icon\"\n data-tone={tone}\n weight={weight}\n />\n )\n}\n"
8
+ }
9
+ ],
10
+ "dependencies": [
11
+ "@phosphor-icons/react@2.1.10"
12
+ ],
13
+ "registryDependencies": [
14
+ "@ui/property-tone"
15
+ ]
16
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "property-tone",
3
+ "type": "registry:ui",
4
+ "files": [
5
+ {
6
+ "path": "registry/default/ui/lib/property-tone.ts",
7
+ "content": "export type PropertyTone =\n | 'danger'\n | 'info'\n | 'neutral'\n | 'purple'\n | 'success'\n | 'teal'\n | 'warning'\n\nexport const propertyToneClassName: Record<PropertyTone, string> = {\n danger: 'text-destructive-foreground',\n info: 'text-info-foreground',\n neutral: 'text-muted-foreground',\n purple: 'text-purple-foreground',\n success: 'text-success-foreground',\n teal: 'text-teal-foreground',\n warning: 'text-warning-foreground',\n}\n"
8
+ }
9
+ ],
10
+ "dependencies": [],
11
+ "registryDependencies": []
12
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "name": "radio-group",
3
+ "type": "registry:ui",
4
+ "files": [
5
+ {
6
+ "path": "registry/default/ui/radio-group.tsx",
7
+ "content": "\"use client\";\n\nimport { Radio as RadioPrimitive } from \"@base-ui/react/radio\";\nimport { RadioGroup as RadioGroupPrimitive } from \"@base-ui/react/radio-group\";\nimport type React from \"react\";\nimport { cn } from \"@tc96/utils\";\n\nexport function RadioGroup({\n className,\n ...props\n}: RadioGroupPrimitive.Props): React.ReactElement {\n return (\n <RadioGroupPrimitive\n className={cn(\"flex flex-col gap-3\", className)}\n data-slot=\"radio-group\"\n {...props}\n />\n );\n}\n\nexport function Radio({\n className,\n ...props\n}: RadioPrimitive.Root.Props): React.ReactElement {\n return (\n <RadioPrimitive.Root\n className={cn(\n \"relative inline-flex size-4.5 shrink-0 items-center justify-center rounded-full border border-input bg-background not-dark:bg-clip-padding shadow-xs/5 outline-none transition-shadow before:pointer-events-none before:absolute before:inset-0 before:rounded-full not-data-disabled:not-data-checked:not-aria-invalid:before:shadow-[0_1px_--theme(--color-black/4%)] focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background aria-invalid:border-destructive/36 focus-visible:aria-invalid:border-destructive/64 focus-visible:aria-invalid:ring-destructive/48 data-disabled:cursor-not-allowed data-disabled:opacity-64 sm:size-4 dark:not-data-checked:bg-input/32 dark:aria-invalid:ring-destructive/24 dark:not-data-disabled:not-data-checked:not-aria-invalid:before:shadow-[0_-1px_--theme(--color-white/6%)] [[data-disabled],[data-checked],[aria-invalid]]:shadow-none\",\n className,\n )}\n data-slot=\"radio\"\n {...props}\n >\n <RadioPrimitive.Indicator\n className=\"absolute -inset-px flex size-4.5 items-center justify-center rounded-full before:size-2 before:rounded-full before:bg-primary-foreground data-unchecked:hidden data-checked:bg-primary sm:size-4 sm:before:size-1.5\"\n data-slot=\"radio-indicator\"\n />\n </RadioPrimitive.Root>\n );\n}\n\nexport { RadioGroupPrimitive, RadioPrimitive, Radio as RadioGroupItem };\n"
8
+ }
9
+ ],
10
+ "dependencies": [
11
+ "@base-ui/react@1.8.0"
12
+ ],
13
+ "registryDependencies": []
14
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "render-anchor",
3
+ "type": "registry:ui",
4
+ "files": [
5
+ {
6
+ "path": "registry/default/ui/render-anchor.tsx",
7
+ "content": "import type { ReactElement } from \"react\";\n\nexport type RenderLink = (href: string) => ReactElement;\n\nexport const renderAnchor: RenderLink = (href) => (\n // biome-ignore lint/a11y/useAnchorContent: the render prop merges the link text into this element\n <a href={href} />\n);\n"
8
+ }
9
+ ],
10
+ "dependencies": [],
11
+ "registryDependencies": []
12
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "name": "scroll-area",
3
+ "type": "registry:ui",
4
+ "files": [
5
+ {
6
+ "path": "registry/default/ui/scroll-area.tsx",
7
+ "content": "\"use client\";\n\nimport { ScrollArea as ScrollAreaPrimitive } from \"@base-ui/react/scroll-area\";\nimport type React from \"react\";\nimport { cn } from \"@tc96/utils\";\n\nexport interface ScrollAreaProps extends ScrollAreaPrimitive.Root.Props {\n scrollFade?: boolean;\n scrollbarGutter?: boolean;\n fill?: boolean;\n clampContentMinWidth?: boolean;\n overscrollContain?: boolean;\n viewportProps?: Omit<ScrollAreaPrimitive.Viewport.Props, \"children\"> & {\n [attribute: `data-${string}`]: string | undefined;\n };\n contentProps?: Omit<ScrollAreaPrimitive.Content.Props, \"children\">;\n verticalScrollbarProps?: Omit<ScrollAreaPrimitive.Scrollbar.Props, \"orientation\">;\n}\n\nexport function ScrollArea({\n className,\n children,\n scrollFade = false,\n scrollbarGutter = false,\n fill = false,\n clampContentMinWidth = true,\n overscrollContain = false,\n viewportProps,\n contentProps,\n verticalScrollbarProps,\n ...props\n}: ScrollAreaProps): React.ReactElement {\n const { className: viewportClassName, ...viewportRest } = viewportProps ?? {};\n const { className: contentClassName, ...contentRest } = contentProps ?? {};\n\n return (\n <ScrollAreaPrimitive.Root\n className={cn(\"size-full min-h-0\", className)}\n {...props}\n >\n <ScrollAreaPrimitive.Viewport\n className={cn(\n \"h-full rounded-[inherit] outline-none transition-shadow focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background\",\n overscrollContain &&\n \"data-has-overflow-y:overscroll-y-contain data-has-overflow-x:overscroll-x-contain\",\n scrollFade &&\n \"mask-t-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-y-start)))] mask-b-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-y-end)))] mask-l-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-x-start)))] mask-r-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-x-end)))] [--fade-size:1.5rem]\",\n scrollbarGutter &&\n \"data-has-overflow-y:pe-2.5 data-has-overflow-x:pb-2.5\",\n typeof viewportClassName === \"string\" && viewportClassName,\n )}\n data-slot=\"scroll-area-viewport\"\n {...viewportRest}\n >\n <ScrollAreaPrimitive.Content\n className={cn(\n fill && \"size-full\",\n typeof contentClassName === \"string\" && contentClassName,\n )}\n data-slot=\"scroll-area-content\"\n style={clampContentMinWidth ? { minWidth: 0 } : undefined}\n {...contentRest}\n >\n {children}\n </ScrollAreaPrimitive.Content>\n </ScrollAreaPrimitive.Viewport>\n <ScrollBar orientation=\"vertical\" {...verticalScrollbarProps} />\n <ScrollBar orientation=\"horizontal\" />\n <ScrollAreaPrimitive.Corner data-slot=\"scroll-area-corner\" />\n </ScrollAreaPrimitive.Root>\n );\n}\n\nexport function ScrollBar({\n className,\n orientation = \"vertical\",\n ...props\n}: ScrollAreaPrimitive.Scrollbar.Props): React.ReactElement {\n return (\n <ScrollAreaPrimitive.Scrollbar\n className={cn(\n \"m-1 flex opacity-0 transition-opacity delay-300 data-[orientation=horizontal]:h-1.5 data-[orientation=vertical]:w-1.5 data-[orientation=horizontal]:flex-col data-hovering:opacity-100 data-scrolling:opacity-100 data-hovering:delay-0 data-scrolling:delay-0 data-hovering:duration-100 data-scrolling:duration-100\",\n className,\n )}\n data-slot=\"scroll-area-scrollbar\"\n orientation={orientation}\n {...props}\n >\n <ScrollAreaPrimitive.Thumb\n className=\"relative flex-1 rounded-full bg-foreground/20\"\n data-slot=\"scroll-area-thumb\"\n />\n </ScrollAreaPrimitive.Scrollbar>\n );\n}\n\nexport { ScrollAreaPrimitive };\n"
8
+ }
9
+ ],
10
+ "dependencies": [
11
+ "@base-ui/react@1.8.0"
12
+ ],
13
+ "registryDependencies": []
14
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "name": "segmented-control",
3
+ "type": "registry:ui",
4
+ "files": [
5
+ {
6
+ "path": "registry/default/ui/segmented-control.tsx",
7
+ "content": "\"use client\";\n\nimport { mergeProps } from \"@base-ui/react/merge-props\";\nimport { useRender } from \"@base-ui/react/use-render\";\nimport * as React from \"react\";\nimport { cn } from \"@tc96/utils\";\n\nexport type SegmentedControlSize = \"default\" | \"lg\" | \"sm\";\n\nexport const segmentedControlItemSizeClassNames: Record<\n SegmentedControlSize,\n string\n> = {\n default: \"h-8.5 px-[calc(--spacing(2.5)-1px)] sm:h-7.5\",\n lg: \"h-9.5 px-[calc(--spacing(3)-1px)] sm:h-8.5\",\n sm: \"h-7.5 px-[calc(--spacing(2)-1px)] sm:h-6.5\",\n};\n\nexport const segmentedControlItemLayoutClassName =\n \"gap-1.5 [&_svg:not([class*='opacity-'])]:opacity-80 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:-mx-0.5 [&_svg]:shrink-0\";\n\nexport const segmentedControlIndicatorSurfaceClassName =\n \"rounded-md bg-background shadow-sm/5 dark:bg-input\";\n\nconst SegmentedControlContext: React.Context<SegmentedControlSize> =\n React.createContext<SegmentedControlSize>(\"default\");\n\nexport function SegmentedControl({\n className,\n children,\n render,\n size = \"default\",\n ...props\n}: useRender.ComponentProps<\"div\"> & {\n size?: SegmentedControlSize;\n}): React.ReactElement {\n const defaultProps = {\n children: (\n <>\n {children}\n <SegmentedControlIndicator />\n </>\n ),\n className: cn(\n \"relative z-0 flex w-fit items-center justify-center gap-0.5 rounded-lg bg-muted p-0.5\",\n className,\n ),\n \"data-size\": size,\n \"data-slot\": \"segmented-control\",\n };\n\n const element = useRender({\n defaultTagName: \"div\",\n props: mergeProps<\"div\">(defaultProps, props),\n render,\n });\n\n return (\n <SegmentedControlContext.Provider value={size}>\n {element}\n </SegmentedControlContext.Provider>\n );\n}\n\nexport function SegmentedControlItem({\n className,\n render,\n size,\n ...props\n}: useRender.ComponentProps<\"button\"> & {\n size?: SegmentedControlSize;\n}): React.ReactElement {\n const contextSize = React.useContext(SegmentedControlContext);\n const resolvedSize = size ?? contextSize;\n\n const defaultProps = {\n className: cn(\n \"relative inline-flex shrink-0 cursor-pointer select-none items-center justify-center whitespace-nowrap rounded-md border border-transparent font-medium text-base text-muted-foreground/96 outline-2 outline-transparent transition-[color,outline-color] hover:bg-transparent hover:text-foreground focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-64 data-disabled:pointer-events-none data-disabled:opacity-64 sm:text-sm\",\n \"data-checked:bg-background data-checked:text-foreground data-checked:shadow-sm/5 dark:data-checked:bg-input\",\n \"aria-[current=page]:bg-background aria-[current=page]:text-foreground aria-[current=page]:shadow-sm/5 dark:aria-[current=page]:bg-input\",\n \"data-pressed:bg-background data-pressed:text-foreground data-pressed:shadow-sm/5 dark:data-pressed:bg-input\",\n \"[:has(>[data-slot=segmented-control-indicator]:not([hidden]))>&]:bg-transparent! [:has(>[data-slot=segmented-control-indicator]:not([hidden]))>&]:shadow-none!\",\n segmentedControlItemLayoutClassName,\n segmentedControlItemSizeClassNames[resolvedSize],\n className,\n ),\n \"data-size\": resolvedSize,\n \"data-slot\": \"segmented-control-item\",\n ...(render ? {} : { type: \"button\" as const }),\n };\n\n return useRender({\n defaultTagName: \"button\",\n props: mergeProps<\"button\">(defaultProps, props),\n render,\n });\n}\n\nconst activeItemSelector =\n ':scope > [data-checked], :scope > [aria-current=\"page\"], :scope > [data-pressed]';\n\nconst observedAttributes: string[] = [\n \"data-checked\",\n \"aria-current\",\n \"data-pressed\",\n];\n\nconst MAX_LAYOUT_ROUNDING_ERROR = 2;\n\ninterface ActiveItemRect {\n height: number;\n left: number;\n top: number;\n width: number;\n}\n\nfunction isSameRect(\n a: ActiveItemRect | null,\n b: ActiveItemRect | null,\n): boolean {\n return (\n a?.left === b?.left &&\n a?.top === b?.top &&\n a?.width === b?.width &&\n a?.height === b?.height\n );\n}\n\nfunction getCssSize(element: HTMLElement): { height: number; width: number } {\n const style = getComputedStyle(element);\n const width = Number.parseFloat(style.width) || 0;\n const height = Number.parseFloat(style.height) || 0;\n if (\n Math.round(width) !== element.offsetWidth ||\n Math.round(height) !== element.offsetHeight\n ) {\n return { height: element.offsetHeight, width: element.offsetWidth };\n }\n return { height, width };\n}\n\nfunction measureItem(item: HTMLElement, root: HTMLElement): ActiveItemRect {\n const { width, height } = getCssSize(item);\n const rootSize = getCssSize(root);\n const itemRect = item.getBoundingClientRect();\n const rootRect = root.getBoundingClientRect();\n const scaleX = rootSize.width > 0 ? rootRect.width / rootSize.width : 1;\n const scaleY = rootSize.height > 0 ? rootRect.height / rootSize.height : 1;\n\n const rectLeft =\n (itemRect.left - rootRect.left) / scaleX -\n root.clientLeft +\n root.scrollLeft;\n const rectTop =\n (itemRect.top - rootRect.top) / scaleY - root.clientTop + root.scrollTop;\n\n const isUndistorted =\n Math.abs(rectLeft - item.offsetLeft) <= MAX_LAYOUT_ROUNDING_ERROR &&\n Math.abs(rectTop - item.offsetTop) <= MAX_LAYOUT_ROUNDING_ERROR;\n\n return {\n height,\n left: isUndistorted ? rectLeft : item.offsetLeft,\n top: isUndistorted ? rectTop : item.offsetTop,\n width,\n };\n}\n\nfunction SegmentedControlIndicator(): React.ReactElement {\n const ref = React.useRef<HTMLSpanElement>(null);\n const [rect, setRect] = React.useState<ActiveItemRect | null>(null);\n\n React.useLayoutEffect(() => {\n const root = ref.current?.parentElement;\n if (!root) {\n return;\n }\n\n const update = (): void => {\n const item = root.querySelector<HTMLElement>(activeItemSelector);\n const next = item ? measureItem(item, root) : null;\n setRect((previous) => (isSameRect(previous, next) ? previous : next));\n };\n\n update();\n\n const resizeObserver = new ResizeObserver(update);\n const mutationObserver = new MutationObserver((records) => {\n if (records.some((record) => record.type === \"childList\")) {\n observeItems();\n }\n update();\n });\n const observeItems = (): void => {\n resizeObserver.disconnect();\n resizeObserver.observe(root);\n for (const child of root.children) {\n resizeObserver.observe(child);\n mutationObserver.observe(child, {\n attributeFilter: observedAttributes,\n attributes: true,\n });\n }\n };\n mutationObserver.observe(root, { childList: true });\n observeItems();\n\n return () => {\n resizeObserver.disconnect();\n mutationObserver.disconnect();\n };\n }, []);\n\n return (\n <span\n aria-hidden=\"true\"\n className={cn(\n \"pointer-events-none absolute top-0 left-0 -z-1 h-(--active-item-height) w-(--active-item-width) translate-x-(--active-item-left) translate-y-(--active-item-top) transition-[width,height,translate] duration-200 ease-in-out motion-reduce:transition-none\",\n segmentedControlIndicatorSurfaceClassName,\n )}\n data-slot=\"segmented-control-indicator\"\n hidden={!rect}\n ref={ref}\n style={\n {\n \"--active-item-height\": `${rect?.height ?? 0}px`,\n \"--active-item-left\": `${rect?.left ?? 0}px`,\n \"--active-item-top\": `${rect?.top ?? 0}px`,\n \"--active-item-width\": `${rect?.width ?? 0}px`,\n } as React.CSSProperties\n }\n />\n );\n}\n"
8
+ }
9
+ ],
10
+ "dependencies": [
11
+ "@base-ui/react@1.8.0"
12
+ ],
13
+ "registryDependencies": []
14
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "name": "select",
3
+ "type": "registry:ui",
4
+ "files": [
5
+ {
6
+ "path": "registry/default/ui/select.tsx",
7
+ "content": "\"use client\";\n\nimport { mergeProps } from \"@base-ui/react/merge-props\";\nimport { Select as SelectPrimitive } from \"@base-ui/react/select\";\nimport { useRender } from \"@base-ui/react/use-render\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { CaretDownIcon, CaretUpDownIcon, CaretUpIcon } from \"@phosphor-icons/react\";\nimport type * as React from \"react\";\nimport { cn } from \"@tc96/utils\";\n\nexport const Select: typeof SelectPrimitive.Root = SelectPrimitive.Root;\n\nexport const selectTriggerVariants = cva(\n \"relative inline-flex min-h-9 w-full min-w-36 select-none items-center justify-between gap-2 rounded-lg border border-input bg-background not-dark:bg-clip-padding px-[calc(--spacing(3)-1px)] text-left text-base text-foreground shadow-xs/5 outline-none ring-ring/24 transition-shadow before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] not-data-disabled:not-focus-visible:not-aria-invalid:not-data-pressed:before:shadow-[0_1px_--theme(--color-black/4%)] pointer-coarse:after:absolute pointer-coarse:after:size-full pointer-coarse:after:min-h-11 focus-visible:border-ring focus-visible:ring-[3px] aria-invalid:border-destructive/36 focus-visible:aria-invalid:border-destructive/64 focus-visible:aria-invalid:ring-destructive/16 data-disabled:pointer-events-none data-disabled:opacity-64 sm:min-h-8 sm:text-sm dark:bg-input/32 dark:aria-invalid:ring-destructive/24 dark:not-data-disabled:not-focus-visible:not-aria-invalid:not-data-pressed:before:shadow-[0_-1px_--theme(--color-white/6%)] [&_svg:not([class*='opacity-'])]:opacity-80 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0 [[data-disabled],:focus-visible,[aria-invalid],[data-pressed]]:shadow-none\",\n {\n defaultVariants: {\n size: \"default\",\n },\n variants: {\n size: {\n default: \"\",\n lg: \"min-h-10 sm:min-h-9\",\n sm: \"min-h-8 gap-1.5 px-[calc(--spacing(2.5)-1px)] sm:min-h-7\",\n },\n },\n },\n);\n\nexport const selectTriggerIconClassName = \"-me-1 size-4.5 opacity-80 sm:size-4\";\n\nexport interface SelectButtonProps extends useRender.ComponentProps<\"button\"> {\n size?: VariantProps<typeof selectTriggerVariants>[\"size\"];\n}\n\nexport function SelectButton({\n className,\n size,\n render,\n children,\n ...props\n}: SelectButtonProps): React.ReactElement {\n const typeValue: React.ButtonHTMLAttributes<HTMLButtonElement>[\"type\"] =\n render ? undefined : \"button\";\n\n const defaultProps = {\n children: (\n <>\n <span className=\"flex-1 truncate in-data-placeholder:text-muted-foreground/96\">\n {children}\n </span>\n <CaretUpDownIcon aria-hidden=\"true\" className={selectTriggerIconClassName} />\n </>\n ),\n className: cn(selectTriggerVariants({ size }), \"min-w-0\", className),\n \"data-slot\": \"select-button\",\n type: typeValue,\n };\n\n return useRender({\n defaultTagName: \"button\",\n props: mergeProps<\"button\">(defaultProps, props),\n render,\n });\n}\n\nexport function SelectTrigger({\n className,\n size = \"default\",\n children,\n ...props\n}: SelectPrimitive.Trigger.Props &\n VariantProps<typeof selectTriggerVariants>): React.ReactElement {\n return (\n <SelectPrimitive.Trigger\n className={cn(selectTriggerVariants({ size }), className)}\n data-slot=\"select-trigger\"\n {...props}\n >\n {children}\n <SelectPrimitive.Icon aria-hidden=\"true\" data-slot=\"select-icon\">\n <CaretUpDownIcon aria-hidden=\"true\" className={selectTriggerIconClassName} />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n );\n}\n\nexport function SelectValue({\n className,\n ...props\n}: SelectPrimitive.Value.Props): React.ReactElement {\n return (\n <SelectPrimitive.Value\n className={cn(\n \"flex-1 truncate data-placeholder:text-muted-foreground\",\n className,\n )}\n data-slot=\"select-value\"\n {...props}\n />\n );\n}\n\nexport function SelectPopup({\n className,\n children,\n side = \"bottom\",\n sideOffset = 4,\n align = \"start\",\n alignOffset = 0,\n alignItemWithTrigger = false,\n anchor,\n listProps,\n portalProps,\n ...props\n}: SelectPrimitive.Popup.Props & {\n listProps?: Omit<SelectPrimitive.List.Props, \"children\" | \"className\">;\n portalProps?: SelectPrimitive.Portal.Props;\n side?: SelectPrimitive.Positioner.Props[\"side\"];\n sideOffset?: SelectPrimitive.Positioner.Props[\"sideOffset\"];\n align?: SelectPrimitive.Positioner.Props[\"align\"];\n alignOffset?: SelectPrimitive.Positioner.Props[\"alignOffset\"];\n alignItemWithTrigger?: SelectPrimitive.Positioner.Props[\"alignItemWithTrigger\"];\n anchor?: SelectPrimitive.Positioner.Props[\"anchor\"];\n}): React.ReactElement {\n return (\n <SelectPrimitive.Portal {...portalProps}>\n <SelectPrimitive.Positioner\n align={align}\n alignItemWithTrigger={alignItemWithTrigger}\n alignOffset={alignOffset}\n anchor={anchor}\n className=\"z-50 select-none\"\n data-slot=\"select-positioner\"\n side={side}\n sideOffset={sideOffset}\n >\n <SelectPrimitive.Popup\n className=\"origin-(--transform-origin) text-foreground outline-none\"\n data-slot=\"select-popup\"\n {...props}\n >\n <SelectPrimitive.ScrollUpArrow\n className=\"top-0 z-50 flex h-6 w-full cursor-default items-center justify-center before:pointer-events-none before:absolute before:inset-x-px before:top-px before:h-[200%] before:rounded-t-[calc(var(--radius-lg)-1px)] before:bg-linear-to-b before:from-50% before:from-popover\"\n data-slot=\"select-scroll-up-arrow\"\n >\n <CaretUpIcon aria-hidden=\"true\" className=\"relative size-4.5 sm:size-4\" />\n </SelectPrimitive.ScrollUpArrow>\n <div className=\"relative h-full min-w-(--anchor-width) rounded-lg border bg-popover not-dark:bg-clip-padding shadow-lg/5 before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] before:shadow-[0_1px_--theme(--color-black/4%)] dark:before:shadow-[0_-1px_--theme(--color-white/6%)]\">\n <SelectPrimitive.List\n className={cn(\n \"max-h-(--available-height) overflow-y-auto p-1\",\n className,\n )}\n data-slot=\"select-list\"\n {...listProps}\n >\n {children}\n </SelectPrimitive.List>\n </div>\n <SelectPrimitive.ScrollDownArrow\n className=\"bottom-0 z-50 flex h-6 w-full cursor-default items-center justify-center before:pointer-events-none before:absolute before:inset-x-px before:bottom-px before:h-[200%] before:rounded-b-[calc(var(--radius-lg)-1px)] before:bg-linear-to-t before:from-50% before:from-popover\"\n data-slot=\"select-scroll-down-arrow\"\n >\n <CaretDownIcon aria-hidden=\"true\" className=\"relative size-4.5 sm:size-4\" />\n </SelectPrimitive.ScrollDownArrow>\n </SelectPrimitive.Popup>\n </SelectPrimitive.Positioner>\n </SelectPrimitive.Portal>\n );\n}\n\nexport function SelectItem({\n className,\n children,\n ...props\n}: SelectPrimitive.Item.Props): React.ReactElement {\n return (\n <SelectPrimitive.Item\n className={cn(\n \"grid min-h-8 in-data-[side=none]:min-w-[calc(var(--anchor-width)+1.25rem)] cursor-default grid-cols-[minmax(0,1fr)_.75rem] items-center gap-4 rounded-sm py-1 ps-2 pe-2.5 text-base outline-none data-disabled:pointer-events-none data-highlighted:bg-accent data-highlighted:text-accent-foreground data-disabled:opacity-64 sm:min-h-7 sm:text-sm [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n className,\n )}\n data-slot=\"select-item\"\n {...props}\n >\n <SelectPrimitive.ItemText className=\"wrap-anywhere col-start-1 min-w-0\">\n {children}\n </SelectPrimitive.ItemText>\n <SelectPrimitive.ItemIndicator className=\"col-start-2 -me-0.5\">\n <svg\n aria-hidden=\"true\"\n fill=\"none\"\n height=\"24\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth=\"2\"\n viewBox=\"0 0 24 24\"\n width=\"24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d=\"M5.252 12.7 10.2 18.63 18.748 5.37\" />\n </svg>\n </SelectPrimitive.ItemIndicator>\n </SelectPrimitive.Item>\n );\n}\n\nexport function SelectSeparator({\n className,\n ...props\n}: SelectPrimitive.Separator.Props): React.ReactElement {\n return (\n <SelectPrimitive.Separator\n className={cn(\"mx-2 my-1 h-px bg-border\", className)}\n data-slot=\"select-separator\"\n {...props}\n />\n );\n}\n\nexport function SelectGroup(\n props: SelectPrimitive.Group.Props,\n): React.ReactElement {\n return <SelectPrimitive.Group data-slot=\"select-group\" {...props} />;\n}\n\nexport function SelectLabel({\n className,\n ...props\n}: SelectPrimitive.Label.Props): React.ReactElement {\n return (\n <SelectPrimitive.Label\n className={cn(\n \"not-in-data-[slot=field]:mb-2 inline-flex cursor-default items-center gap-2 font-medium text-base/4.5 text-foreground sm:text-sm/4\",\n className,\n )}\n data-slot=\"select-label\"\n {...props}\n />\n );\n}\n\nexport function SelectGroupLabel(\n props: SelectPrimitive.GroupLabel.Props,\n): React.ReactElement {\n return (\n <SelectPrimitive.GroupLabel\n className=\"px-2 py-1.5 font-medium text-muted-foreground text-xs\"\n data-slot=\"select-group-label\"\n {...props}\n />\n );\n}\n\nexport { SelectPrimitive, SelectPopup as SelectContent };\n"
8
+ }
9
+ ],
10
+ "dependencies": [
11
+ "@base-ui/react@1.8.0",
12
+ "@phosphor-icons/react@2.1.10",
13
+ "class-variance-authority@0.7.1"
14
+ ],
15
+ "registryDependencies": []
16
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "name": "separator",
3
+ "type": "registry:ui",
4
+ "files": [
5
+ {
6
+ "path": "registry/default/ui/separator.tsx",
7
+ "content": "import { Separator as SeparatorPrimitive } from \"@base-ui/react/separator\";\nimport type React from \"react\";\nimport { cn } from \"@tc96/utils\";\n\nexport function Separator({\n className,\n orientation = \"horizontal\",\n ...props\n}: SeparatorPrimitive.Props): React.ReactElement {\n return (\n <SeparatorPrimitive\n className={cn(\n \"shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-px data-[orientation=vertical]:not-[[class^='h-']]:not-[[class*='_h-']]:self-stretch\",\n className,\n )}\n data-slot=\"separator\"\n orientation={orientation}\n {...props}\n />\n );\n}\n\nexport { SeparatorPrimitive };\n"
8
+ }
9
+ ],
10
+ "dependencies": [
11
+ "@base-ui/react@1.8.0"
12
+ ],
13
+ "registryDependencies": []
14
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "name": "sheet",
3
+ "type": "registry:ui",
4
+ "files": [
5
+ {
6
+ "path": "registry/default/ui/sheet.tsx",
7
+ "content": "\"use client\";\n\nimport { Dialog as SheetPrimitive } from \"@base-ui/react/dialog\";\nimport { mergeProps } from \"@base-ui/react/merge-props\";\nimport { useRender } from \"@base-ui/react/use-render\";\nimport { XIcon } from \"@phosphor-icons/react\";\nimport type React from \"react\";\nimport { cn } from \"@tc96/utils\";\nimport { Button } from \"@tc96/ui/button\";\nimport { ScrollArea } from \"@tc96/ui/scroll-area\";\n\nexport const Sheet: typeof SheetPrimitive.Root = SheetPrimitive.Root;\n\nexport const SheetPortal: typeof SheetPrimitive.Portal = SheetPrimitive.Portal;\n\nexport function SheetTrigger(\n props: SheetPrimitive.Trigger.Props,\n): React.ReactElement {\n return <SheetPrimitive.Trigger data-slot=\"sheet-trigger\" {...props} />;\n}\n\nexport function SheetClose(\n props: SheetPrimitive.Close.Props,\n): React.ReactElement {\n return <SheetPrimitive.Close data-slot=\"sheet-close\" {...props} />;\n}\n\nexport function SheetBackdrop({\n className,\n ...props\n}: SheetPrimitive.Backdrop.Props): React.ReactElement {\n return (\n <SheetPrimitive.Backdrop\n className={cn(\n \"fixed inset-0 z-50 bg-black/32 backdrop-blur-sm transition-all duration-200 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-[-webkit-touch-callout:none]:absolute\",\n className,\n )}\n data-slot=\"sheet-backdrop\"\n {...props}\n />\n );\n}\n\nexport function SheetViewport({\n className,\n side,\n variant = \"default\",\n ...props\n}: SheetPrimitive.Viewport.Props & {\n side?: \"right\" | \"left\" | \"top\" | \"bottom\";\n variant?: \"default\" | \"inset\";\n}): React.ReactElement {\n return (\n <SheetPrimitive.Viewport\n className={cn(\n \"fixed inset-0 z-50 grid\",\n side === \"bottom\" && \"grid grid-rows-[1fr_auto] pt-12\",\n side === \"top\" && \"grid grid-rows-[auto_1fr] pb-12\",\n side === \"left\" && \"flex justify-start\",\n side === \"right\" && \"flex justify-end\",\n variant === \"inset\" && \"sm:p-4\",\n className,\n )}\n data-slot=\"sheet-viewport\"\n {...props}\n />\n );\n}\n\nexport function SheetPopup({\n className,\n children,\n showCloseButton = true,\n side = \"right\",\n variant = \"default\",\n closeProps,\n portalProps,\n ...props\n}: SheetPrimitive.Popup.Props & {\n showCloseButton?: boolean;\n side?: \"right\" | \"left\" | \"top\" | \"bottom\";\n variant?: \"default\" | \"inset\";\n closeProps?: SheetPrimitive.Close.Props;\n portalProps?: SheetPrimitive.Portal.Props;\n}): React.ReactElement {\n return (\n <SheetPortal {...portalProps}>\n <SheetBackdrop />\n <SheetViewport side={side} variant={variant}>\n <SheetPrimitive.Popup\n className={cn(\n \"relative flex max-h-full min-h-0 w-full min-w-0 flex-col bg-popover not-dark:bg-clip-padding text-popover-foreground shadow-lg/5 transition-[opacity,translate] duration-200 ease-in-out will-change-transform before:pointer-events-none before:absolute before:inset-0 before:shadow-[0_1px_--theme(--color-black/4%)] data-ending-style:opacity-0 data-starting-style:opacity-0 max-sm:before:hidden dark:before:shadow-[0_-1px_--theme(--color-white/6%)]\",\n side === \"bottom\" &&\n \"row-start-2 border-t data-ending-style:translate-y-8 data-starting-style:translate-y-8\",\n side === \"top\" &&\n \"border-b data-ending-style:-translate-y-8 data-starting-style:-translate-y-8\",\n side === \"left\" &&\n \"w-[calc(100%-(--spacing(12)))] max-w-md border-e data-ending-style:-translate-x-8 data-starting-style:-translate-x-8\",\n side === \"right\" &&\n \"col-start-2 w-[calc(100%-(--spacing(12)))] max-w-md border-s data-ending-style:translate-x-8 data-starting-style:translate-x-8\",\n variant === \"inset\" &&\n \"before:hidden sm:rounded-2xl sm:border sm:before:rounded-[calc(var(--radius-2xl)-1px)] sm:**:data-[slot=sheet-footer]:rounded-b-[calc(var(--radius-2xl)-1px)]\",\n className,\n )}\n data-slot=\"sheet-popup\"\n {...props}\n >\n {children}\n {showCloseButton && (\n <SheetPrimitive.Close\n aria-label=\"Close\"\n className=\"absolute end-2 top-2\"\n render={<Button size=\"icon\" variant=\"ghost\" />}\n {...closeProps}\n >\n <XIcon aria-hidden=\"true\" />\n </SheetPrimitive.Close>\n )}\n </SheetPrimitive.Popup>\n </SheetViewport>\n </SheetPortal>\n );\n}\n\nexport function SheetHeader({\n className,\n render,\n ...props\n}: useRender.ComponentProps<\"div\">): React.ReactElement {\n const defaultProps = {\n className: cn(\n \"flex flex-col gap-2 p-6 in-[[data-slot=sheet-popup]:has([data-slot=sheet-panel])]:pb-3 max-sm:pb-4\",\n className,\n ),\n \"data-slot\": \"sheet-header\",\n };\n\n return useRender({\n defaultTagName: \"div\",\n props: mergeProps<\"div\">(defaultProps, props),\n render,\n });\n}\n\nexport function SheetFooter({\n className,\n variant = \"default\",\n render,\n ...props\n}: useRender.ComponentProps<\"div\"> & {\n variant?: \"default\" | \"bare\";\n}): React.ReactElement {\n const defaultProps = {\n className: cn(\n \"flex flex-col-reverse gap-2 px-6 sm:flex-row sm:justify-end\",\n variant === \"default\" && \"border-t bg-muted/72 py-4\",\n variant === \"bare\" &&\n \"in-[[data-slot=sheet-popup]:has([data-slot=sheet-panel])]:pt-3 pt-4 pb-6\",\n className,\n ),\n \"data-slot\": \"sheet-footer\",\n };\n\n return useRender({\n defaultTagName: \"div\",\n props: mergeProps<\"div\">(defaultProps, props),\n render,\n });\n}\n\nexport function SheetTitle({\n className,\n ...props\n}: SheetPrimitive.Title.Props): React.ReactElement {\n return (\n <SheetPrimitive.Title\n className={cn(\"font-bold font-heading text-xl leading-none\", className)}\n data-slot=\"sheet-title\"\n {...props}\n />\n );\n}\n\nexport function SheetDescription({\n className,\n ...props\n}: SheetPrimitive.Description.Props): React.ReactElement {\n return (\n <SheetPrimitive.Description\n className={cn(\"text-muted-foreground text-sm\", className)}\n data-slot=\"sheet-description\"\n {...props}\n />\n );\n}\n\nexport function SheetPanel({\n className,\n scrollFade = true,\n render,\n ...props\n}: useRender.ComponentProps<\"div\"> & {\n scrollFade?: boolean;\n}): React.ReactElement {\n const defaultProps = {\n className: cn(\n \"p-6 in-[[data-slot=sheet-popup]:has([data-slot=sheet-header])]:pt-1 in-[[data-slot=sheet-popup]:has([data-slot=sheet-footer]:not(.border-t))]:pb-1\",\n className,\n ),\n \"data-slot\": \"sheet-panel\",\n };\n\n return (\n <ScrollArea overscrollContain scrollFade={scrollFade}>\n {useRender({\n defaultTagName: \"div\",\n props: mergeProps<\"div\">(defaultProps, props),\n render,\n })}\n </ScrollArea>\n );\n}\n\nexport {\n SheetPrimitive,\n SheetBackdrop as SheetOverlay,\n SheetPopup as SheetContent,\n};\n"
8
+ }
9
+ ],
10
+ "dependencies": [
11
+ "@base-ui/react@1.8.0",
12
+ "@phosphor-icons/react@2.1.10"
13
+ ],
14
+ "registryDependencies": [
15
+ "@ui/button",
16
+ "@ui/scroll-area"
17
+ ]
18
+ }