@octanejs/shadcn 0.0.6 → 0.0.8

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 (100) hide show
  1. package/package.json +109 -10
  2. package/src/bases/base-ui/ui/accordion.tsrx +71 -0
  3. package/src/bases/base-ui/ui/alert-dialog.tsrx +149 -0
  4. package/src/bases/base-ui/ui/alert.tsrx +68 -0
  5. package/src/bases/base-ui/ui/aspect-ratio.tsrx +24 -0
  6. package/src/bases/base-ui/ui/button.tsrx +69 -0
  7. package/src/bases/base-ui/ui/card.tsrx +76 -0
  8. package/src/bases/base-ui/ui/checkbox.tsrx +43 -0
  9. package/src/bases/base-ui/ui/dialog.tsrx +137 -0
  10. package/src/bases/base-ui/ui/empty.tsrx +88 -0
  11. package/src/bases/base-ui/ui/input.tsrx +28 -0
  12. package/src/bases/base-ui/ui/kbd.tsrx +27 -0
  13. package/src/bases/base-ui/ui/label.tsrx +31 -0
  14. package/src/bases/base-ui/ui/native-select.tsrx +54 -0
  15. package/src/bases/base-ui/ui/popover.tsrx +85 -0
  16. package/src/bases/base-ui/ui/radio-group.tsrx +50 -0
  17. package/src/bases/base-ui/ui/separator.tsrx +34 -0
  18. package/src/bases/base-ui/ui/skeleton.tsrx +17 -0
  19. package/src/bases/base-ui/ui/spinner.tsrx +30 -0
  20. package/src/bases/base-ui/ui/switch.tsrx +43 -0
  21. package/src/bases/base-ui/ui/textarea.tsrx +22 -0
  22. package/src/bases/base-ui/ui/tooltip.tsrx +73 -0
  23. package/src/{ui → bases/radix/ui}/accordion.tsrx +1 -1
  24. package/src/{ui → bases/radix/ui}/alert-dialog.tsrx +1 -1
  25. package/src/{ui → bases/radix/ui}/alert.tsrx +2 -2
  26. package/src/{ui → bases/radix/ui}/avatar.tsrx +1 -1
  27. package/src/{ui → bases/radix/ui}/badge.tsrx +2 -2
  28. package/src/{ui → bases/radix/ui}/breadcrumb.tsrx +1 -1
  29. package/src/{ui → bases/radix/ui}/button.tsrx +2 -2
  30. package/src/{ui → bases/radix/ui}/card.tsrx +2 -2
  31. package/src/{ui → bases/radix/ui}/checkbox.tsrx +1 -1
  32. package/src/{ui → bases/radix/ui}/context-menu.tsrx +1 -1
  33. package/src/{ui → bases/radix/ui}/dialog.tsrx +1 -1
  34. package/src/{ui → bases/radix/ui}/dropdown-menu.tsrx +1 -1
  35. package/src/{ui → bases/radix/ui}/empty.tsrx +1 -1
  36. package/src/{ui → bases/radix/ui}/field.tsrx +1 -1
  37. package/src/{ui → bases/radix/ui}/hover-card.tsrx +1 -1
  38. package/src/{ui → bases/radix/ui}/input.tsrx +2 -2
  39. package/src/{ui → bases/radix/ui}/item.tsrx +1 -1
  40. package/src/{ui → bases/radix/ui}/kbd.tsrx +2 -2
  41. package/src/{ui → bases/radix/ui}/label.tsrx +1 -1
  42. package/src/{ui → bases/radix/ui}/menubar.tsrx +1 -1
  43. package/src/{ui → bases/radix/ui}/native-select.tsrx +1 -1
  44. package/src/{ui → bases/radix/ui}/navigation-menu.tsrx +1 -1
  45. package/src/{ui → bases/radix/ui}/pagination.tsrx +1 -1
  46. package/src/{ui → bases/radix/ui}/popover.tsrx +1 -1
  47. package/src/{ui → bases/radix/ui}/progress.tsrx +1 -1
  48. package/src/{ui → bases/radix/ui}/radio-group.tsrx +1 -1
  49. package/src/{ui → bases/radix/ui}/scroll-area.tsrx +1 -1
  50. package/src/{ui → bases/radix/ui}/select.tsrx +1 -1
  51. package/src/{ui → bases/radix/ui}/separator.tsrx +1 -1
  52. package/src/{ui → bases/radix/ui}/sheet.tsrx +1 -1
  53. package/src/{ui → bases/radix/ui}/sidebar.tsrx +2 -2
  54. package/src/{ui → bases/radix/ui}/skeleton.tsrx +2 -2
  55. package/src/{ui → bases/radix/ui}/slider.tsrx +1 -1
  56. package/src/{ui → bases/radix/ui}/spinner.tsrx +1 -1
  57. package/src/{ui → bases/radix/ui}/switch.tsrx +1 -1
  58. package/src/{ui → bases/radix/ui}/table.tsrx +1 -1
  59. package/src/{ui → bases/radix/ui}/tabs.tsrx +1 -1
  60. package/src/{ui → bases/radix/ui}/textarea.tsrx +2 -2
  61. package/src/{ui → bases/radix/ui}/toggle-group.tsrx +1 -1
  62. package/src/{ui → bases/radix/ui}/toggle.tsrx +1 -1
  63. package/src/{ui → bases/radix/ui}/tooltip.tsrx +1 -1
  64. package/src/bases/react-aria/ui/accordion.tsrx +73 -0
  65. package/src/bases/react-aria/ui/alert-dialog.tsrx +154 -0
  66. package/src/bases/react-aria/ui/alert.tsrx +60 -0
  67. package/src/bases/react-aria/ui/aspect-ratio.tsrx +13 -0
  68. package/src/bases/react-aria/ui/avatar.tsrx +83 -0
  69. package/src/bases/react-aria/ui/badge.tsrx +48 -0
  70. package/src/bases/react-aria/ui/breadcrumb.tsrx +100 -0
  71. package/src/bases/react-aria/ui/button.tsrx +96 -0
  72. package/src/bases/react-aria/ui/card.tsrx +73 -0
  73. package/src/bases/react-aria/ui/checkbox.tsrx +37 -0
  74. package/src/bases/react-aria/ui/collapsible.tsrx +20 -0
  75. package/src/bases/react-aria/ui/dialog.tsrx +131 -0
  76. package/src/bases/react-aria/ui/empty.tsrx +79 -0
  77. package/src/bases/react-aria/ui/field.tsrx +170 -0
  78. package/src/bases/react-aria/ui/input.tsrx +28 -0
  79. package/src/bases/react-aria/ui/item.tsrx +148 -0
  80. package/src/bases/react-aria/ui/kbd.tsrx +30 -0
  81. package/src/bases/react-aria/ui/label.tsrx +22 -0
  82. package/src/bases/react-aria/ui/native-select.tsrx +44 -0
  83. package/src/bases/react-aria/ui/pagination.tsrx +92 -0
  84. package/src/bases/react-aria/ui/popover.tsrx +57 -0
  85. package/src/bases/react-aria/ui/radio-group.tsrx +46 -0
  86. package/src/bases/react-aria/ui/scroll-area.tsrx +14 -0
  87. package/src/bases/react-aria/ui/separator.tsrx +28 -0
  88. package/src/bases/react-aria/ui/sheet.tsrx +143 -0
  89. package/src/bases/react-aria/ui/skeleton.tsrx +10 -0
  90. package/src/bases/react-aria/ui/slider.tsrx +56 -0
  91. package/src/bases/react-aria/ui/spinner.tsrx +28 -0
  92. package/src/bases/react-aria/ui/switch.tsrx +38 -0
  93. package/src/bases/react-aria/ui/table.tsrx +98 -0
  94. package/src/bases/react-aria/ui/tabs.tsrx +67 -0
  95. package/src/bases/react-aria/ui/textarea.tsrx +26 -0
  96. package/src/bases/react-aria/ui/toggle.tsrx +38 -0
  97. package/src/index.ts +0 -263
  98. /package/src/{ui → bases/radix/ui}/aspect-ratio.tsrx +0 -0
  99. /package/src/{ui → bases/radix/ui}/collapsible.tsrx +0 -0
  100. /package/src/{ui → bases/radix/ui}/sonner.tsrx +0 -0
@@ -0,0 +1,73 @@
1
+ // Base UI base tooltip — runs on @octanejs/base-ui's Tooltip.
2
+ //
3
+ // SAME TWO POSITIONING DIFFERENCES AS POPOVER: the transform-origin var is plain
4
+ // `--transform-origin` rather than radix's `--radix-tooltip-content-transform-origin`, and the
5
+ // tree gains a Positioner layer (Portal > Positioner > Popup) which owns the offset.
6
+ //
7
+ // ONE RADIX-ONLY STATE IS DROPPED. The radix base styles `data-[state=delayed-open]:` alongside
8
+ // `data-open:`, because radix distinguishes an immediate open from one that waited out the
9
+ // delay. Base UI publishes only `data-open`/`data-closed` — there is no delayed-open state to
10
+ // match, so those three utilities would be dead weight referencing an attribute that never
11
+ // appears. The `data-open:` variants they duplicate are kept and cover both cases.
12
+ //
13
+ // UNVERIFIED PROVENANCE: class strings come from this package's radix base rather than
14
+ // transcribed from upstream's Base UI source.
15
+ import { createElement, Fragment, type OctaneNode } from 'octane';
16
+ import { Tooltip as TooltipPrimitive } from '@octanejs/base-ui/tooltip';
17
+
18
+ import { cn } from '../../../lib/utils';
19
+
20
+ export interface TooltipProviderProps extends Record<string, unknown> {
21
+ delay?: number;
22
+ }
23
+
24
+ export function TooltipProvider({ delay = 0, ...props }: TooltipProviderProps) @{
25
+ <TooltipPrimitive.Provider data-slot="tooltip-provider" delay={delay} {...props} />
26
+ }
27
+
28
+ export function Tooltip(props: Record<string, unknown>) @{
29
+ <TooltipPrimitive.Root data-slot="tooltip" {...props} />
30
+ }
31
+
32
+ export function TooltipTrigger(props: Record<string, unknown>) @{
33
+ <TooltipPrimitive.Trigger data-slot="tooltip-trigger" {...props} />
34
+ }
35
+
36
+ export interface TooltipContentProps extends Record<string, unknown> {
37
+ className?: string;
38
+ sideOffset?: number;
39
+ children?: OctaneNode;
40
+ }
41
+
42
+ export function TooltipContent({
43
+ className,
44
+ sideOffset = 0,
45
+ children,
46
+ ...props
47
+ }: TooltipContentProps) {
48
+ return createElement(TooltipPrimitive.Portal, {
49
+ children: createElement(TooltipPrimitive.Positioner, {
50
+ sideOffset,
51
+ children: createElement(TooltipPrimitive.Popup, {
52
+ 'data-slot': 'tooltip-content',
53
+ className: cn(
54
+ 'z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95',
55
+ className,
56
+ ),
57
+ ...props,
58
+ // Octane reconciles ARRAY children as a keyed list, so every entry needs a key —
59
+ // including the consumer's. Leaving `children` bare emits the missing-key warning
60
+ // and lets the consumer node be mismatched against the arrow when its identity
61
+ // changes. The consumer may pass anything (a string, an element, an array), so it
62
+ // is wrapped in a keyed Fragment rather than keyed in place.
63
+ children: [
64
+ createElement(Fragment, { key: 'content', children }),
65
+ createElement(TooltipPrimitive.Arrow, {
66
+ key: 'arrow',
67
+ className: 'z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground',
68
+ }),
69
+ ],
70
+ }),
71
+ }),
72
+ });
73
+ }
@@ -9,7 +9,7 @@ import { Accordion as AccordionPrimitive } from '@octanejs/radix';
9
9
  import { ChevronDownIcon, ChevronUpIcon } from '@octanejs/lucide';
10
10
  import type { OctaneNode } from 'octane';
11
11
 
12
- import { cn } from '../lib/utils';
12
+ import { cn } from '../../../lib/utils';
13
13
 
14
14
  type Props = { className?: string; children?: OctaneNode } & Record<string, unknown>;
15
15
 
@@ -6,7 +6,7 @@
6
6
  import { createElement, type OctaneNode } from 'octane';
7
7
  import { AlertDialog as AlertDialogPrimitive } from '@octanejs/radix';
8
8
 
9
- import { cn } from '../lib/utils';
9
+ import { cn } from '../../../lib/utils';
10
10
  import { Button, type ButtonProps } from './button.tsrx';
11
11
 
12
12
  type Props = { className?: string; children?: OctaneNode } & Record<string, unknown>;
@@ -2,8 +2,8 @@
2
2
  // cva strings verbatim. Pure template JSX (no consumer-children interleave).
3
3
  import { cva, type VariantProps } from 'class-variance-authority';
4
4
 
5
- import { cn } from '../lib/utils';
6
- import type { DivProps } from '../lib/types';
5
+ import { cn } from '../../../lib/utils';
6
+ import type { DivProps } from '../../../lib/types';
7
7
 
8
8
  export const alertVariants = cva(
9
9
  'group/alert relative grid w-full gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*=\'size-\'])]:size-4',
@@ -3,7 +3,7 @@
3
3
  // @octanejs/radix; pure template JSX.
4
4
  import { Avatar as AvatarPrimitive } from '@octanejs/radix';
5
5
 
6
- import { cn } from '../lib/utils';
6
+ import { cn } from '../../../lib/utils';
7
7
 
8
8
  type Props = { className?: string } & Record<string, unknown>;
9
9
 
@@ -4,8 +4,8 @@
4
4
  import { cva, type VariantProps } from 'class-variance-authority';
5
5
  import { Slot } from '@octanejs/radix';
6
6
 
7
- import { cn } from '../lib/utils';
8
- import type { HostProps } from '../lib/types';
7
+ import { cn } from '../../../lib/utils';
8
+ import type { HostProps } from '../../../lib/types';
9
9
 
10
10
  export const badgeVariants = cva(
11
11
  'group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!',
@@ -7,7 +7,7 @@ import { Slot } from '@octanejs/radix';
7
7
  import { ChevronRightIcon, MoreHorizontalIcon } from '@octanejs/lucide';
8
8
  import { createElement, type OctaneNode } from 'octane';
9
9
 
10
- import { cn } from '../lib/utils';
10
+ import { cn } from '../../../lib/utils';
11
11
 
12
12
  type Props = { className?: string } & Record<string, unknown>;
13
13
 
@@ -7,8 +7,8 @@
7
7
  import { cva, type VariantProps } from 'class-variance-authority';
8
8
  import { Slot } from '@octanejs/radix';
9
9
 
10
- import { cn } from '../lib/utils';
11
- import type { HostProps } from '../lib/types';
10
+ import { cn } from '../../../lib/utils';
11
+ import type { HostProps } from '../../../lib/types';
12
12
 
13
13
  export const buttonVariants = cva(
14
14
  'group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=\'size-\'])]:size-4',
@@ -1,7 +1,7 @@
1
1
  // Default-Tailwind (package canonical) card — user-supplied flavor, class strings verbatim (uses the
2
2
  // --card-spacing custom-property pattern and the nova cn-font-heading hook).
3
- import { cn } from '../lib/utils';
4
- import type { DivProps } from '../lib/types';
3
+ import { cn } from '../../../lib/utils';
4
+ import type { DivProps } from '../../../lib/types';
5
5
 
6
6
  type Props = DivProps;
7
7
 
@@ -6,7 +6,7 @@
6
6
  import { Checkbox as CheckboxPrimitive } from '@octanejs/radix';
7
7
  import { CheckIcon } from '@octanejs/lucide';
8
8
 
9
- import { cn } from '../lib/utils';
9
+ import { cn } from '../../../lib/utils';
10
10
 
11
11
  export interface CheckboxProps extends Record<string, unknown> {
12
12
  className?: string;
@@ -8,7 +8,7 @@ import { createElement, type OctaneNode } from 'octane';
8
8
  import { ContextMenu as ContextMenuPrimitive } from '@octanejs/radix';
9
9
  import { CheckIcon, ChevronRightIcon } from '@octanejs/lucide';
10
10
 
11
- import { cn } from '../lib/utils';
11
+ import { cn } from '../../../lib/utils';
12
12
 
13
13
  type Props = { className?: string; children?: OctaneNode } & Record<string, unknown>;
14
14
 
@@ -9,7 +9,7 @@ import { createElement, type OctaneNode } from 'octane';
9
9
  import { Dialog as DialogPrimitive } from '@octanejs/radix';
10
10
  import { XIcon } from '@octanejs/lucide';
11
11
 
12
- import { cn } from '../lib/utils';
12
+ import { cn } from '../../../lib/utils';
13
13
  import { Button } from './button.tsrx';
14
14
 
15
15
  type Props = { className?: string; children?: OctaneNode } & Record<string, unknown>;
@@ -8,7 +8,7 @@ import { createElement, type OctaneNode } from 'octane';
8
8
  import { DropdownMenu as DropdownMenuPrimitive } from '@octanejs/radix';
9
9
  import { CheckIcon, ChevronRightIcon } from '@octanejs/lucide';
10
10
 
11
- import { cn } from '../lib/utils';
11
+ import { cn } from '../../../lib/utils';
12
12
 
13
13
  type Props = { className?: string; children?: OctaneNode } & Record<string, unknown>;
14
14
 
@@ -3,7 +3,7 @@
3
3
  // as a <div> (typed as "p") — both preserved as-is.
4
4
  import { cva, type VariantProps } from 'class-variance-authority';
5
5
 
6
- import { cn } from '../lib/utils';
6
+ import { cn } from '../../../lib/utils';
7
7
 
8
8
  type DivProps = { className?: string } & Record<string, unknown>;
9
9
 
@@ -6,7 +6,7 @@
6
6
  import { createElement, useMemo, type OctaneNode } from 'octane';
7
7
  import { cva, type VariantProps } from 'class-variance-authority';
8
8
 
9
- import { cn } from '../lib/utils';
9
+ import { cn } from '../../../lib/utils';
10
10
  import { Label } from './label.tsrx';
11
11
  import { Separator } from './separator.tsrx';
12
12
 
@@ -10,7 +10,7 @@
10
10
  import { createElement } from 'octane';
11
11
  import { HoverCard as HoverCardPrimitive } from '@octanejs/radix';
12
12
 
13
- import { cn } from '../lib/utils';
13
+ import { cn } from '../../../lib/utils';
14
14
 
15
15
  export function HoverCard(props: Record<string, unknown>) @{
16
16
  <HoverCardPrimitive.Root data-slot="hover-card" {...props} />
@@ -1,7 +1,7 @@
1
1
  // Default-Tailwind (package canonical) input — user-supplied flavor, class string verbatim.
2
2
  // OCTANE DIVERGENCE: per-keystroke handling is the native onInput event.
3
- import { cn } from '../lib/utils';
4
- import type { HostProps } from '../lib/types';
3
+ import { cn } from '../../../lib/utils';
4
+ import type { HostProps } from '../../../lib/types';
5
5
 
6
6
  export interface InputProps extends HostProps<'input'> {}
7
7
 
@@ -4,7 +4,7 @@
4
4
  import { cva, type VariantProps } from 'class-variance-authority';
5
5
  import { Slot } from '@octanejs/radix';
6
6
 
7
- import { cn } from '../lib/utils';
7
+ import { cn } from '../../../lib/utils';
8
8
  import { Separator } from './separator.tsrx';
9
9
 
10
10
  type DivProps = { className?: string } & Record<string, unknown>;
@@ -1,8 +1,8 @@
1
1
  // Ported from shadcn-ui/ui@4baadbc6517070ae8f8feb2c97037adc2b305544
2
2
  // apps/v4/registry/bases/radix/ui/kbd.tsx. Note: upstream renders KbdGroup as
3
3
  // a <kbd> host too — preserved as-is.
4
- import { cn } from '../lib/utils';
5
- import type { HostProps } from '../lib/types';
4
+ import { cn } from '../../../lib/utils';
5
+ import type { HostProps } from '../../../lib/types';
6
6
 
7
7
  export interface KbdProps extends HostProps<'kbd'> {}
8
8
 
@@ -3,7 +3,7 @@
3
3
  // dropped — octane has no RSC axis).
4
4
  import { Label as LabelPrimitive } from '@octanejs/radix';
5
5
 
6
- import { cn } from '../lib/utils';
6
+ import { cn } from '../../../lib/utils';
7
7
 
8
8
  export interface LabelProps extends Record<string, unknown> {
9
9
  className?: string;
@@ -8,7 +8,7 @@ import { createElement, type OctaneNode } from 'octane';
8
8
  import { Menubar as MenubarPrimitive } from '@octanejs/radix';
9
9
  import { CheckIcon, ChevronRightIcon } from '@octanejs/lucide';
10
10
 
11
- import { cn } from '../lib/utils';
11
+ import { cn } from '../../../lib/utils';
12
12
 
13
13
  type Props = { className?: string; children?: OctaneNode } & Record<string, unknown>;
14
14
 
@@ -5,7 +5,7 @@
5
5
  // <select> and the chevron keep their fixed classes.
6
6
  import { ChevronDownIcon } from '@octanejs/lucide';
7
7
 
8
- import { cn } from '../lib/utils';
8
+ import { cn } from '../../../lib/utils';
9
9
 
10
10
  export interface NativeSelectProps extends Record<string, unknown> {
11
11
  className?: string;
@@ -7,7 +7,7 @@ import { cva } from 'class-variance-authority';
7
7
  import { NavigationMenu as NavigationMenuPrimitive } from '@octanejs/radix';
8
8
  import { ChevronDownIcon } from '@octanejs/lucide';
9
9
 
10
- import { cn } from '../lib/utils';
10
+ import { cn } from '../../../lib/utils';
11
11
 
12
12
  type Props = { className?: string; children?: OctaneNode } & Record<string, unknown>;
13
13
 
@@ -6,7 +6,7 @@
6
6
  import { createElement, type OctaneNode } from 'octane';
7
7
  import { ChevronLeftIcon, ChevronRightIcon, MoreHorizontalIcon } from '@octanejs/lucide';
8
8
 
9
- import { cn } from '../lib/utils';
9
+ import { cn } from '../../../lib/utils';
10
10
  import { Button, type ButtonProps } from './button.tsrx';
11
11
 
12
12
  type Props = { className?: string } & Record<string, unknown>;
@@ -10,7 +10,7 @@
10
10
  import { createElement } from 'octane';
11
11
  import { Popover as PopoverPrimitive } from '@octanejs/radix';
12
12
 
13
- import { cn } from '../lib/utils';
13
+ import { cn } from '../../../lib/utils';
14
14
 
15
15
  type Props = { className?: string } & Record<string, unknown>;
16
16
 
@@ -5,7 +5,7 @@
5
5
  // Root, whose role/aria-valuemax/data-state contract comes from its defaults.
6
6
  import { Progress as ProgressPrimitive } from '@octanejs/radix';
7
7
 
8
- import { cn } from '../lib/utils';
8
+ import { cn } from '../../../lib/utils';
9
9
 
10
10
  export interface ProgressProps extends Record<string, unknown> {
11
11
  className?: string;
@@ -4,7 +4,7 @@
4
4
  import { RadioGroup as RadioGroupPrimitive } from '@octanejs/radix';
5
5
  import { CircleIcon } from '@octanejs/lucide';
6
6
 
7
- import { cn } from '../lib/utils';
7
+ import { cn } from '../../../lib/utils';
8
8
 
9
9
  type Props = { className?: string } & Record<string, unknown>;
10
10
 
@@ -5,7 +5,7 @@
5
5
  import type { OctaneNode } from 'octane';
6
6
  import { ScrollArea as ScrollAreaPrimitive } from '@octanejs/radix';
7
7
 
8
- import { cn } from '../lib/utils';
8
+ import { cn } from '../../../lib/utils';
9
9
 
10
10
  type Props = { className?: string; children?: OctaneNode } & Record<string, unknown>;
11
11
 
@@ -7,7 +7,7 @@ import { createElement, type OctaneNode } from 'octane';
7
7
  import { Select as SelectPrimitive } from '@octanejs/radix';
8
8
  import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from '@octanejs/lucide';
9
9
 
10
- import { cn } from '../lib/utils';
10
+ import { cn } from '../../../lib/utils';
11
11
 
12
12
  type Props = { className?: string; children?: OctaneNode } & Record<string, unknown>;
13
13
 
@@ -3,7 +3,7 @@
3
3
  // is dropped — octane has no RSC axis).
4
4
  import { Separator as SeparatorPrimitive } from '@octanejs/radix';
5
5
 
6
- import { cn } from '../lib/utils';
6
+ import { cn } from '../../../lib/utils';
7
7
 
8
8
  export interface SeparatorProps extends Record<string, unknown> {
9
9
  className?: string;
@@ -8,7 +8,7 @@ import { createElement, type OctaneNode } from 'octane';
8
8
  import { Dialog as SheetPrimitive } from '@octanejs/radix';
9
9
  import { XIcon } from '@octanejs/lucide';
10
10
 
11
- import { cn } from '../lib/utils';
11
+ import { cn } from '../../../lib/utils';
12
12
  import { Button } from './button.tsrx';
13
13
 
14
14
  type Props = { className?: string; children?: OctaneNode } & Record<string, unknown>;
@@ -18,8 +18,8 @@ import { cva, type VariantProps } from 'class-variance-authority';
18
18
  import { Slot } from '@octanejs/radix';
19
19
  import { PanelLeftIcon } from '@octanejs/lucide';
20
20
 
21
- import { cn } from '../lib/utils';
22
- import { useIsMobile } from '../hooks/use-mobile';
21
+ import { cn } from '../../../lib/utils';
22
+ import { useIsMobile } from '../../../hooks/use-mobile';
23
23
  import { Button } from './button.tsrx';
24
24
  import { Input } from './input.tsrx';
25
25
  import { Separator } from './separator.tsrx';
@@ -1,7 +1,7 @@
1
1
  // Default-Tailwind flavor (package canonical) — utilities-inlined upstream styling.
2
2
  // apps/v4/registry/bases/radix/ui/skeleton.tsx.
3
- import { cn } from '../lib/utils';
4
- import type { HostProps } from '../lib/types';
3
+ import { cn } from '../../../lib/utils';
4
+ import type { HostProps } from '../../../lib/types';
5
5
 
6
6
  export interface SkeletonProps extends HostProps<'div'> {}
7
7
 
@@ -9,7 +9,7 @@
9
9
  import { createElement, useMemo } from 'octane';
10
10
  import { Slider as SliderPrimitive } from '@octanejs/radix';
11
11
 
12
- import { cn } from '../lib/utils';
12
+ import { cn } from '../../../lib/utils';
13
13
 
14
14
  export interface SliderProps extends Record<string, unknown> {
15
15
  className?: string;
@@ -6,7 +6,7 @@
6
6
  // @octanejs/lucide. Other icon libraries are a registry-emit concern.
7
7
  import { Loader2Icon } from '@octanejs/lucide';
8
8
 
9
- import { cn } from '../lib/utils';
9
+ import { cn } from '../../../lib/utils';
10
10
 
11
11
  export interface SpinnerProps extends Record<string, unknown> {
12
12
  className?: string;
@@ -3,7 +3,7 @@
3
3
  // @octanejs/radix; pure template JSX.
4
4
  import { Switch as SwitchPrimitive } from '@octanejs/radix';
5
5
 
6
- import { cn } from '../lib/utils';
6
+ import { cn } from '../../../lib/utils';
7
7
 
8
8
  export interface SwitchProps extends Record<string, unknown> {
9
9
  className?: string;
@@ -2,7 +2,7 @@
2
2
  // apps/v4/registry/bases/radix/ui/table.tsx (the `"use client"` directive is
3
3
  // dropped — octane has no RSC axis). Table renders inside the upstream
4
4
  // table-container wrapper div.
5
- import { cn } from '../lib/utils';
5
+ import { cn } from '../../../lib/utils';
6
6
 
7
7
  // Multi-host family (div/table/thead/tbody/tr/th/td/caption): no single host
8
8
  // prop table applies, so the shared alias stays structural.
@@ -4,7 +4,7 @@
4
4
  import { cva, type VariantProps } from 'class-variance-authority';
5
5
  import { Tabs as TabsPrimitive } from '@octanejs/radix';
6
6
 
7
- import { cn } from '../lib/utils';
7
+ import { cn } from '../../../lib/utils';
8
8
 
9
9
  type Props = { className?: string } & Record<string, unknown>;
10
10
 
@@ -3,8 +3,8 @@
3
3
  //
4
4
  // OCTANE DIVERGENCE: per-keystroke handling is the native `onInput` event, not
5
5
  // a synthetic `onChange`; native `change` keeps its commit-on-blur meaning.
6
- import { cn } from '../lib/utils';
7
- import type { HostProps } from '../lib/types';
6
+ import { cn } from '../../../lib/utils';
7
+ import type { HostProps } from '../../../lib/types';
8
8
 
9
9
  export interface TextareaProps extends HostProps<'textarea'> {}
10
10
 
@@ -10,7 +10,7 @@ import { createContext, createElement, useContext, type OctaneNode } from 'octan
10
10
  import { type VariantProps } from 'class-variance-authority';
11
11
  import { ToggleGroup as ToggleGroupPrimitive } from '@octanejs/radix';
12
12
 
13
- import { cn } from '../lib/utils';
13
+ import { cn } from '../../../lib/utils';
14
14
  import { toggleVariants } from './toggle.tsrx';
15
15
 
16
16
  const ToggleGroupContext = createContext<
@@ -4,7 +4,7 @@
4
4
  import { cva, type VariantProps } from 'class-variance-authority';
5
5
  import { Toggle as TogglePrimitive } from '@octanejs/radix';
6
6
 
7
- import { cn } from '../lib/utils';
7
+ import { cn } from '../../../lib/utils';
8
8
 
9
9
  export const toggleVariants = cva(
10
10
  'inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-[color,box-shadow] outline-none hover:bg-muted hover:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=\'size-\'])]:size-4',
@@ -10,7 +10,7 @@
10
10
  import { createElement, type OctaneNode } from 'octane';
11
11
  import { Tooltip as TooltipPrimitive } from '@octanejs/radix';
12
12
 
13
- import { cn } from '../lib/utils';
13
+ import { cn } from '../../../lib/utils';
14
14
 
15
15
  export interface TooltipProviderProps extends Record<string, unknown> {
16
16
  delayDuration?: number;
@@ -0,0 +1,73 @@
1
+ import { type OctaneNode } from 'octane';
2
+ import {
3
+ DisclosurePanel as AccordionContentPrimitive,
4
+ Heading as AccordionHeaderPrimitive,
5
+ Disclosure as AccordionItemPrimitive,
6
+ DisclosureGroup as AccordionPrimitive,
7
+ Button as AccordionTriggerPrimitive,
8
+ type ButtonProps,
9
+ type DisclosureGroupProps,
10
+ type DisclosurePanelProps,
11
+ type DisclosureProps,
12
+ } from '@octanejs/aria/components';
13
+
14
+ import { cn } from '../../../lib/utils';
15
+ import { ChevronDownIcon, ChevronUpIcon } from '@octanejs/lucide';
16
+
17
+ export function Accordion({ className, ...props }: DisclosureGroupProps) {
18
+ return <AccordionPrimitive
19
+ data-slot="accordion"
20
+ className={cn('flex w-full flex-col', className)}
21
+ {...props}
22
+ />;
23
+ }
24
+
25
+ export function AccordionItem({ className, ...props }: DisclosureProps) {
26
+ return <AccordionItemPrimitive
27
+ data-slot="accordion-item"
28
+ className={cn('not-last:border-b', className)}
29
+ {...props}
30
+ />;
31
+ }
32
+
33
+ export function AccordionTrigger({ className, children, ...props }: Omit<
34
+ ButtonProps,
35
+ 'children'
36
+ > & { children: OctaneNode }) {
37
+ return <AccordionHeaderPrimitive className="flex">
38
+ <AccordionTriggerPrimitive
39
+ slot="trigger"
40
+ data-slot="accordion-trigger"
41
+ className={cn(
42
+ 'group/accordion-trigger relative flex flex-1 items-start justify-between rounded-lg border border-transparent py-2.5 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:after:border-ring disabled:pointer-events-none disabled:opacity-50 **:data-[slot=accordion-trigger-icon]:ml-auto **:data-[slot=accordion-trigger-icon]:size-4 **:data-[slot=accordion-trigger-icon]:text-muted-foreground',
43
+ className,
44
+ )}
45
+ {...props}
46
+ >
47
+ {children}
48
+ <ChevronDownIcon
49
+ data-slot="accordion-trigger-icon"
50
+ className="pointer-events-none shrink-0 group-aria-expanded/accordion-trigger:hidden"
51
+ />
52
+ <ChevronUpIcon
53
+ data-slot="accordion-trigger-icon"
54
+ className="pointer-events-none hidden shrink-0 group-aria-expanded/accordion-trigger:inline"
55
+ />
56
+ </AccordionTriggerPrimitive>
57
+ </AccordionHeaderPrimitive>;
58
+ }
59
+
60
+ export function AccordionContent({ className, children, ...props }: DisclosurePanelProps) {
61
+ return <AccordionContentPrimitive
62
+ data-slot="accordion-content"
63
+ className="h-(--disclosure-panel-height) overflow-clip text-sm transition-[height] data-open:animate-accordion-down data-closed:animate-accordion-up"
64
+ {...props}
65
+ >
66
+ <div
67
+ className={cn(
68
+ 'pt-0 pb-2.5 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4',
69
+ className,
70
+ )}
71
+ >{children}</div>
72
+ </AccordionContentPrimitive>;
73
+ }