@tc96/cli 0.27.0 → 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.
- package/README.md +4 -4
- package/cli.js +82 -27
- package/package.json +1 -1
- package/registry/agenda-1.json +1297 -0
- package/registry/aggregate.json +1 -1
- package/registry/ai-chat-1.json +91 -0
- package/registry/checklist.json +21 -7
- package/registry/collection.json +624 -351
- package/registry/crm-1.json +1317 -0
- package/registry/crm-2.json +1400 -0
- package/registry/dashboard-5.json +167 -0
- package/registry/dashboard-6.json +143 -0
- package/registry/dashboard-7.json +188 -0
- package/registry/documents-1.json +1322 -0
- package/registry/finance-1.json +845 -0
- package/registry/finance-2.json +973 -0
- package/registry/finance-3.json +1436 -0
- package/registry/{workflow-editor.json → flow-1.json} +37 -37
- package/registry/{agent-builder.json → flow-2.json} +55 -55
- package/registry/{run-monitor.json → flow-3.json} +16 -16
- package/registry/{impact-map.json → flow-4.json} +16 -16
- package/registry/inbox-1.json +1184 -0
- package/registry/inventory-1.json +828 -0
- package/registry/inventory-2.json +956 -0
- package/registry/legal-1.json +1345 -0
- package/registry/legal-2.json +1279 -0
- package/registry/legal-3.json +1273 -0
- package/registry/legal-4.json +1273 -0
- package/registry/legal-5.json +1393 -0
- package/registry/legal-6.json +1309 -0
- package/registry/legal-7.json +1315 -0
- package/registry/legal-8.json +1358 -0
- package/registry/legal-9.json +1381 -0
- package/registry/marketing-1.json +833 -0
- package/registry/marketing-2.json +961 -0
- package/registry/navbar-1.json +6 -6
- package/registry/navbar-10.json +50 -0
- package/registry/navbar-11.json +48 -0
- package/registry/navbar-12.json +48 -0
- package/registry/navbar-6.json +48 -0
- package/registry/navbar-7.json +72 -0
- package/registry/navbar-8.json +50 -0
- package/registry/navbar-9.json +54 -0
- package/registry/projects-1.json +865 -0
- package/registry/projects-2.json +993 -0
- package/registry/projects-3.json +1346 -0
- package/registry/properties.json +65 -58
- package/registry/record-group.json +5 -1
- package/registry/revenue-1.json +834 -0
- package/registry/revenue-2.json +968 -0
- package/registry/revenue-3.json +821 -0
- package/registry/revenue-4.json +949 -0
- package/registry/rich-text-editor-1.json +172 -0
- package/registry/rich-text-editor-2.json +158 -0
- package/registry/rich-text-editor-3.json +198 -0
- package/registry/rich-text-editor-4.json +200 -0
- package/registry/rich-text-editor-5.json +237 -0
- package/registry/rich-text-editor.json +27 -7
- package/registry/{settings-1.json → settings-account-1.json} +17 -17
- package/registry/{settings-23.json → settings-account-2.json} +17 -17
- package/registry/{settings-7.json → settings-catalog-1.json} +17 -17
- package/registry/{settings-16.json → settings-catalog-10.json} +17 -17
- package/registry/{settings-8.json → settings-catalog-2.json} +17 -17
- package/registry/{settings-9.json → settings-catalog-3.json} +17 -17
- package/registry/{settings-10.json → settings-catalog-4.json} +29 -20
- package/registry/{settings-11.json → settings-catalog-5.json} +17 -17
- package/registry/{settings-12.json → settings-catalog-6.json} +17 -17
- package/registry/{settings-13.json → settings-catalog-7.json} +17 -17
- package/registry/{settings-14.json → settings-catalog-8.json} +29 -19
- package/registry/{settings-15.json → settings-catalog-9.json} +28 -18
- package/registry/{settings-19.json → settings-integration-1.json} +17 -17
- package/registry/settings-integration-2.json +122 -0
- package/registry/{settings-22.json → settings-integration-3.json} +17 -17
- package/registry/settings-integration-4.json +129 -0
- package/registry/settings-integration-5.json +122 -0
- package/registry/settings-integration-6.json +92 -0
- package/registry/{settings-21.json → settings-integration-7.json} +23 -17
- package/registry/settings-integration-8.json +593 -0
- package/registry/{settings-20.json → settings-notification-channel-1.json} +17 -17
- package/registry/{settings-2.json → settings-preference-1.json} +17 -17
- package/registry/{settings-3.json → settings-preference-2.json} +17 -17
- package/registry/{settings-4.json → settings-preference-3.json} +17 -17
- package/registry/{settings-18.json → settings-role-permission-1.json} +17 -17
- package/registry/{settings-17.json → settings-security-1.json} +17 -17
- package/registry/{settings-5.json → settings-workspace-1.json} +28 -28
- package/registry/{settings-6.json → settings-workspace-2.json} +31 -31
- package/registry/support-1.json +853 -0
- package/registry/support-2.json +981 -0
- package/registry/support-3.json +762 -0
- package/registry/support-4.json +538 -0
- package/registry/team-1.json +829 -0
- package/registry/team-2.json +957 -0
- package/registry/ui/gauge.json +1 -1
- package/registry/ui/menu.json +1 -1
- package/registry/ui/property-meta.json +16 -0
- package/registry/ui/property-tone.json +12 -0
- package/registry/ui/scroll-area.json +1 -1
- package/registry/ui/select.json +1 -1
- package/registry/view.json +624 -351
- package/registry/app-shell-5.json +0 -106
- package/registry/bulk-import-1.json +0 -151
- package/registry/collection-layouts.json +0 -836
- package/registry/collection-views.json +0 -836
- package/registry/detail-sheet.json +0 -54
- package/registry/icon-row.json +0 -52
- package/registry/lookup-create-1.json +0 -157
- package/registry/next-steps-1.json +0 -147
- package/registry/settings-shell.json +0 -60
package/registry/ui/gauge.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
},
|
|
9
9
|
{
|
|
10
10
|
"path": "registry/default/ui/gauge/AGENTS.md",
|
|
11
|
-
"content": "# Gauge\n\nGauge shows how much of a range one value fills: a bar, a row of segments or a ring, all on the Base UI `Meter`, so the value is announced as a meter. `GaugeRing` is the ring drawing alone, decorative and without a meter. `GaugeStack` shows how a total splits into parts. Neither knows what the number means: the consumer passes `value`, `max`, the tone and the accessible name.\n\nCOSS has `Meter` and `Progress` but no segmented bar, stacked bar or ring; each widget and block built its own until 2026-11-24, when `Gauge` was added here as a repo-owned ui component (`origin: \"own\"` in `ui.manifest.json`, ADR 0008). Every change to how it looks starts in `TOKENS.md`, the blueprint, and is then copied into `gauge.tsx`. The Storybook node `UI/Gauge` documents it in five pages: `API Reference`, `Playground`, `Layouts`, `Behavior` and `Usages`.\n\n## Map\n\n- `gauge.tsx`: `Gauge`, `GaugeRing`, `GaugeStack`, their props, `gaugeVariants`, the pure `gaugeRatio` and `filledSegments`, and the value lists `gaugeVariantNames`, `gaugeSizes`, `gaugeTones` with their types.\n- `index.ts`: the barrel `@tc96/ui/gauge` resolves to.\n- `TOKENS.md`: the blueprint of every part, size and tone.\n- `ACCESSIBILITY.md`: roles, names and contrast.\n\n## Architecture\n\n- Layer: `packages/ui`. `gauge.tsx` imports only Base UI `Meter`, `class-variance-authority` and `cn` from `@tc96/utils`.\n- Resolution: `packages/ui/package.json` exports `./gauge` as `./src/gauge/index.ts`, ahead of the `./*` pattern.\n- Manifest: the `gauge` item of `packages/ui/ui.manifest.json` lists the five files with `origin: \"own\"`; `sync:coss` never touches it.\n\n## Dependents\n\n- `packages/ui/src/patterns/widgets/shared/progress-ring.tsx`: `ProgressRing` renders `GaugeRing` with `data-slot=\"progress-ring\"`, so its public name, DOM hooks, text content and plays stay as they were.\n- `packages/ui/src/patterns`: the meters of `widgets` (`BudgetWidget` with `color` per category and `tone=\"destructive\"` over the limit, `QuestsWidget`, `XpMeter`, `ProjectCardWidget`) and `records/group` (`RecordGroupMetric`).\n- `packages/ui/src/blocks/application`: `stats/shared/segmented-meter.tsx` (`stats-3`), `stats/stats-6`, `settings/settings-
|
|
11
|
+
"content": "# Gauge\n\nGauge shows how much of a range one value fills: a bar, a row of segments or a ring, all on the Base UI `Meter`, so the value is announced as a meter. `GaugeRing` is the ring drawing alone, decorative and without a meter. `GaugeStack` shows how a total splits into parts. Neither knows what the number means: the consumer passes `value`, `max`, the tone and the accessible name.\n\nCOSS has `Meter` and `Progress` but no segmented bar, stacked bar or ring; each widget and block built its own until 2026-11-24, when `Gauge` was added here as a repo-owned ui component (`origin: \"own\"` in `ui.manifest.json`, ADR 0008). Every change to how it looks starts in `TOKENS.md`, the blueprint, and is then copied into `gauge.tsx`. The Storybook node `UI/Gauge` documents it in five pages: `API Reference`, `Playground`, `Layouts`, `Behavior` and `Usages`.\n\n## Map\n\n- `gauge.tsx`: `Gauge`, `GaugeRing`, `GaugeStack`, their props, `gaugeVariants`, the pure `gaugeRatio` and `filledSegments`, and the value lists `gaugeVariantNames`, `gaugeSizes`, `gaugeTones` with their types.\n- `index.ts`: the barrel `@tc96/ui/gauge` resolves to.\n- `TOKENS.md`: the blueprint of every part, size and tone.\n- `ACCESSIBILITY.md`: roles, names and contrast.\n\n## Architecture\n\n- Layer: `packages/ui`. `gauge.tsx` imports only Base UI `Meter`, `class-variance-authority` and `cn` from `@tc96/utils`.\n- Resolution: `packages/ui/package.json` exports `./gauge` as `./src/gauge/index.ts`, ahead of the `./*` pattern.\n- Manifest: the `gauge` item of `packages/ui/ui.manifest.json` lists the five files with `origin: \"own\"`; `sync:coss` never touches it.\n\n## Dependents\n\n- `packages/ui/src/patterns/widgets/shared/progress-ring.tsx`: `ProgressRing` renders `GaugeRing` with `data-slot=\"progress-ring\"`, so its public name, DOM hooks, text content and plays stay as they were.\n- `packages/ui/src/patterns`: the meters of `widgets` (`BudgetWidget` with `color` per category and `tone=\"destructive\"` over the limit, `QuestsWidget`, `XpMeter`, `ProjectCardWidget`) and `records/group` (`RecordGroupMetric`).\n- `packages/ui/src/blocks/application`: `stats/shared/segmented-meter.tsx` (`stats-3`), `stats/stats-6`, `settings/account/settings-account-2`, `shell/app-shell-3/usage-card.tsx`; each names its gauge with `aria-labelledby` on a visible label built from `useId()`.\n- `apps/storybook/src/patterns/stats/stats-layouts.tsx` (`LeadsOverviewCard`).\n- Not migrated, on purpose: `Progress` stays where a task runs (`flow-run-card`, `flow-3`, `flow-4`, `dashboard-3`, `stats-4`, `onboarding-2`), since that is a `progressbar`, not a `meter`; `RiskScoreWidget` (a striped scale) and `ShareBar` (a trend column per segment) are not plain bars; `stats-2` has no bar.\n\n## Invariants\n\n- `TOKENS.md` and `gauge.tsx` carry the same classes; `scripts/ui-tokens.test.ts` fails when they drift.\n- `value` is clamped to `[min, max]` before it reaches the `Meter`, and the fill uses the same ratio; `max <= min` reads as empty fill, not a division by zero.\n- `empty` is not zero: it drops the indicator (and the filled segments), dashes the ring track and sets `data-empty=\"true\"`; at zero `data-empty` is absent.\n- `segmented` fills `Math.round(ratio * segments)` segments; the segments are `aria-hidden`, the meter carries the value.\n- Props spread last, so a consumer can override `data-slot`, as `ProgressRing` does.\n- `color` paints the fill inline (indicator, filled segments, ring arc) and wins over `tone`; `data-tone` still reports `tone`.\n- The Base UI `Meter` root renders a hidden text node (`x`), so an `aria-hidden` `Gauge` still changes the `textContent` of its container; a decorative ring is `GaugeRing`, which has no meter. `Gauge` with `variant=\"ring\"` and `GaugeRing` share one private drawing, `GaugeRingGraphic`.\n- `GaugeStack` sizes each part by `flexGrow: value`; a negative value counts as zero. The label is the part's whole accessible text: the consumer passes it already formatted (`Vendas 38,7%`), the component composes nothing.\n\n## Styling\n\n- `data-slot`: `gauge`, `gauge-ring`, `gauge-track`, `gauge-indicator`, `gauge-segment`, `gauge-stack`, `gauge-stack-part`; `data-variant`, `data-size`, `data-tone`, `data-empty`, and `data-filled` (`\"true\"` or `\"false\"`) on each segment.\n- A part color in `GaugeStack` goes through `color` (inline), never a `bg-*` class.\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\ncd apps/storybook && bunx vitest run --project=storybook src/ui/gauge\n```\n\n## Pointers\n\n- `ACCESSIBILITY.md` and `TOKENS.md` (this folder).\n- Stories: `apps/storybook/src/ui/gauge/`; the API text is `api-reference.mdx` there.\n- Decisions: `.specs/adr/0008-ui-owned-source.md`; `docs/architecture/tc96-ui.md`, section \"UI: Gauge\".\n"
|
|
12
12
|
},
|
|
13
13
|
{
|
|
14
14
|
"path": "registry/default/ui/gauge/TOKENS.md",
|
package/registry/ui/menu.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
},
|
|
9
9
|
{
|
|
10
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`, `
|
|
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
12
|
},
|
|
13
13
|
{
|
|
14
14
|
"path": "registry/default/ui/menu/TOKENS.md",
|
|
@@ -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
|
+
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"files": [
|
|
5
5
|
{
|
|
6
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 function ScrollArea({\n className,\n children,\n scrollFade = false,\n scrollbarGutter = false,\n fill = false,\n clampContentMinWidth = true,\n overscrollContain = false,\n ...props\n}:
|
|
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
8
|
}
|
|
9
9
|
],
|
|
10
10
|
"dependencies": [
|
package/registry/ui/select.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"files": [
|
|
5
5
|
{
|
|
6
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 portalProps,\n ...props\n}: SelectPrimitive.Popup.Props & {\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 >\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"
|
|
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
8
|
}
|
|
9
9
|
],
|
|
10
10
|
"dependencies": [
|