@six-vallees/ui-react 0.5.0 → 0.6.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 (59) hide show
  1. package/README.md +3 -3
  2. package/dist/avatar/avatar.d.ts +30 -0
  3. package/dist/avatar/avatar.js +11 -0
  4. package/dist/avatar/avatar.js.map +1 -0
  5. package/dist/badge/badge.d.ts +32 -0
  6. package/dist/badge/badge.js +10 -0
  7. package/dist/badge/badge.js.map +1 -0
  8. package/dist/chunk-BYZCFI7X.js +32 -0
  9. package/dist/chunk-BYZCFI7X.js.map +1 -0
  10. package/dist/chunk-DCKWB3EY.js +35 -0
  11. package/dist/chunk-DCKWB3EY.js.map +1 -0
  12. package/dist/chunk-GNHNTI5A.js +30 -0
  13. package/dist/chunk-GNHNTI5A.js.map +1 -0
  14. package/dist/chunk-HHUI32DT.js +36 -0
  15. package/dist/chunk-HHUI32DT.js.map +1 -0
  16. package/dist/chunk-OVF2VS3L.js +42 -0
  17. package/dist/chunk-OVF2VS3L.js.map +1 -0
  18. package/dist/chunk-POUL3ZTV.js +60 -0
  19. package/dist/chunk-POUL3ZTV.js.map +1 -0
  20. package/dist/chunk-R7BM6J75.js +93 -0
  21. package/dist/chunk-R7BM6J75.js.map +1 -0
  22. package/dist/chunk-RXDJPRH5.js +39 -0
  23. package/dist/chunk-RXDJPRH5.js.map +1 -0
  24. package/dist/chunk-ULEDFFUJ.js +43 -0
  25. package/dist/chunk-ULEDFFUJ.js.map +1 -0
  26. package/dist/chunk-WHD5CSTB.js +52 -0
  27. package/dist/chunk-WHD5CSTB.js.map +1 -0
  28. package/dist/chunk-WHJ4JVO6.js +39 -0
  29. package/dist/chunk-WHJ4JVO6.js.map +1 -0
  30. package/dist/index.d.ts +19 -0
  31. package/dist/index.js +120 -14
  32. package/dist/input/input.d.ts +22 -0
  33. package/dist/input/input.js +8 -0
  34. package/dist/input/input.js.map +1 -0
  35. package/dist/input/label.d.ts +32 -0
  36. package/dist/input/label.js +11 -0
  37. package/dist/input/label.js.map +1 -0
  38. package/dist/input/textarea.d.ts +13 -0
  39. package/dist/input/textarea.js +8 -0
  40. package/dist/input/textarea.js.map +1 -0
  41. package/dist/overlay/alert-dialog.d.ts +42 -0
  42. package/dist/overlay/alert-dialog.js +23 -0
  43. package/dist/overlay/alert-dialog.js.map +1 -0
  44. package/dist/overlay/popover.d.ts +42 -0
  45. package/dist/overlay/popover.js +17 -0
  46. package/dist/overlay/popover.js.map +1 -0
  47. package/dist/overlay/sheet.d.ts +47 -0
  48. package/dist/overlay/sheet.js +29 -0
  49. package/dist/overlay/sheet.js.map +1 -0
  50. package/dist/overlay/tooltip.d.ts +31 -0
  51. package/dist/overlay/tooltip.js +15 -0
  52. package/dist/overlay/tooltip.js.map +1 -0
  53. package/dist/tabs/tabs.d.ts +24 -0
  54. package/dist/tabs/tabs.js +15 -0
  55. package/dist/tabs/tabs.js.map +1 -0
  56. package/dist/tabs/toggle-group.d.ts +19 -0
  57. package/dist/tabs/toggle-group.js +11 -0
  58. package/dist/tabs/toggle-group.js.map +1 -0
  59. package/package.json +9 -1
@@ -0,0 +1,52 @@
1
+ 'use client';
2
+
3
+ import {
4
+ cn
5
+ } from "./chunk-DXRY7AS4.js";
6
+
7
+ // src/tabs/tabs.tsx
8
+ import * as React from "react";
9
+ import * as TabsPrimitive from "@radix-ui/react-tabs";
10
+ import { jsx } from "react/jsx-runtime";
11
+ var Tabs = TabsPrimitive.Root;
12
+ var TabsList = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(TabsPrimitive.List, { ref, className: cn("inline-flex items-center gap-gap-xs", className), ...props }));
13
+ TabsList.displayName = "TabsList";
14
+ var TabsTrigger = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
15
+ TabsPrimitive.Trigger,
16
+ {
17
+ ref,
18
+ className: cn(
19
+ // min-h-6: the hit target floor (rule 9). A tab is small by nature and
20
+ // this is the line under which it stops being usable on a touch screen.
21
+ "inline-flex min-h-6 items-center rounded-pill px-3 py-1 sv-label-sm whitespace-nowrap",
22
+ "text-on-surface-variant transition-[background-color,color] duration-150",
23
+ "hover:bg-surface-subtle active:bg-surface-muted",
24
+ "data-[state=active]:bg-surface-muted data-[state=active]:text-on-surface",
25
+ "outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus",
26
+ "disabled:pointer-events-none disabled:opacity-40",
27
+ className
28
+ ),
29
+ ...props
30
+ }
31
+ ));
32
+ TabsTrigger.displayName = "TabsTrigger";
33
+ var TabsContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
34
+ TabsPrimitive.Content,
35
+ {
36
+ ref,
37
+ className: cn(
38
+ "outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus",
39
+ className
40
+ ),
41
+ ...props
42
+ }
43
+ ));
44
+ TabsContent.displayName = "TabsContent";
45
+
46
+ export {
47
+ Tabs,
48
+ TabsList,
49
+ TabsTrigger,
50
+ TabsContent
51
+ };
52
+ //# sourceMappingURL=chunk-WHD5CSTB.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/tabs/tabs.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as TabsPrimitive from '@radix-ui/react-tabs';\nimport { cn } from '@/lib/utils';\n\n/**\n * Cairn Tabs. Radix, and this one is not negotiable.\n *\n * `role=\"tablist\"` on a row of buttons is the most common accessibility lie in a\n * codebase: it announces a tab list to a screen reader and then ships none of\n * the behaviour that word promises — a single tab stop for the whole set, arrow\n * keys to move between tabs, Home/End, and the selected tab bound to its panel\n * by id. Writing the role without the behaviour is worse than writing no role at\n * all, because it tells the user a lie they will act on. Radix has all of it.\n *\n * The selected tab is marked by the surface ramp, not by hue and not by an\n * underline: `surface-muted` is the selected step, `surface-subtle` the hover\n * step, exactly as `sv-state` uses them elsewhere. One mechanism for state\n * across the system (BRAND.md, law 5).\n */\n\nexport const Tabs = TabsPrimitive.Root;\n\nexport const TabsList = React.forwardRef<\n React.ComponentRef<typeof TabsPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.List>\n>(({ className, ...props }, ref) => (\n <TabsPrimitive.List ref={ref} className={cn('inline-flex items-center gap-gap-xs', className)} {...props} />\n));\nTabsList.displayName = 'TabsList';\n\nexport const TabsTrigger = React.forwardRef<\n React.ComponentRef<typeof TabsPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger>\n>(({ className, ...props }, ref) => (\n <TabsPrimitive.Trigger\n ref={ref}\n className={cn(\n // min-h-6: the hit target floor (rule 9). A tab is small by nature and\n // this is the line under which it stops being usable on a touch screen.\n 'inline-flex min-h-6 items-center rounded-pill px-3 py-1 sv-label-sm whitespace-nowrap',\n 'text-on-surface-variant transition-[background-color,color] duration-150',\n 'hover:bg-surface-subtle active:bg-surface-muted',\n 'data-[state=active]:bg-surface-muted data-[state=active]:text-on-surface',\n 'outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus',\n 'disabled:pointer-events-none disabled:opacity-40',\n className\n )}\n {...props}\n />\n));\nTabsTrigger.displayName = 'TabsTrigger';\n\nexport const TabsContent = React.forwardRef<\n React.ComponentRef<typeof TabsPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.Content>\n>(({ className, ...props }, ref) => (\n <TabsPrimitive.Content\n ref={ref}\n className={cn(\n 'outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus',\n className\n )}\n {...props}\n />\n));\nTabsContent.displayName = 'TabsContent';\n"],"mappings":";;;;;AAEA,YAAY,WAAW;AACvB,YAAY,mBAAmB;AAyB7B;AANK,IAAM,OAAqB;AAE3B,IAAM,WAAiB,iBAG5B,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B,oBAAe,oBAAd,EAAmB,KAAU,WAAW,GAAG,uCAAuC,SAAS,GAAI,GAAG,OAAO,CAC3G;AACD,SAAS,cAAc;AAEhB,IAAM,cAAoB,iBAG/B,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B;AAAA,EAAe;AAAA,EAAd;AAAA,IACC;AAAA,IACA,WAAW;AAAA;AAAA;AAAA,MAGT;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA;AACN,CACD;AACD,YAAY,cAAc;AAEnB,IAAM,cAAoB,iBAG/B,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B;AAAA,EAAe;AAAA,EAAd;AAAA,IACC;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA;AACN,CACD;AACD,YAAY,cAAc;","names":[]}
@@ -0,0 +1,39 @@
1
+ 'use client';
2
+
3
+ import {
4
+ cn
5
+ } from "./chunk-DXRY7AS4.js";
6
+
7
+ // src/overlay/popover.tsx
8
+ import * as React from "react";
9
+ import * as PopoverPrimitive from "@radix-ui/react-popover";
10
+ import { jsx } from "react/jsx-runtime";
11
+ var Popover = PopoverPrimitive.Root;
12
+ var PopoverTrigger = PopoverPrimitive.Trigger;
13
+ var PopoverAnchor = PopoverPrimitive.Anchor;
14
+ var PopoverClose = PopoverPrimitive.Close;
15
+ var PopoverContent = React.forwardRef(({ className, align = "start", sideOffset = 8, collisionPadding = 12, container, ...props }, ref) => /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { container: container ?? void 0, children: /* @__PURE__ */ jsx(
16
+ PopoverPrimitive.Content,
17
+ {
18
+ ref,
19
+ align,
20
+ sideOffset,
21
+ collisionPadding,
22
+ className: cn(
23
+ "z-50 w-72 rounded-control border border-outline bg-surface p-inset-sm text-on-surface shadow-overlay",
24
+ "outline-none",
25
+ className
26
+ ),
27
+ ...props
28
+ }
29
+ ) }));
30
+ PopoverContent.displayName = "PopoverContent";
31
+
32
+ export {
33
+ Popover,
34
+ PopoverTrigger,
35
+ PopoverAnchor,
36
+ PopoverClose,
37
+ PopoverContent
38
+ };
39
+ //# sourceMappingURL=chunk-WHJ4JVO6.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/overlay/popover.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as PopoverPrimitive from '@radix-ui/react-popover';\nimport { cn } from '@/lib/utils';\n\n/**\n * Cairn Popover. Radix, for the positioning — which is never as simple as it looks.\n *\n * The hand-rolled version is always the same: absolute coordinates, then a\n * `Math.min/max` to keep the card on screen. It works until the trigger is near\n * an edge and the card should flip to the other side, or the page scrolls under\n * it, or the trigger sits inside its own scroll container. Radix's collision\n * handling covers all of that, and brings what the maths never does: focus moves\n * into the panel on open and returns to the trigger on close, Escape dismisses,\n * an outside click dismisses, and the trigger is wired to the panel with\n * `aria-expanded` / `aria-controls`.\n *\n * `Anchor` is exported because a popover does not always hang off a button: a\n * pin dropped on a page has a position but no trigger element.\n *\n * `control` radius, not `card`: the card radius is reserved for feature cards and\n * metric tiles (rule 7). Elevation AND a hairline, deliberately: the shadow\n * carries the lift on the light theme, the hairline is what separates the surface\n * on the dark one, where a black shadow does nothing.\n */\n\nexport const Popover = PopoverPrimitive.Root;\nexport const PopoverTrigger = PopoverPrimitive.Trigger;\nexport const PopoverAnchor = PopoverPrimitive.Anchor;\nexport const PopoverClose = PopoverPrimitive.Close;\n\nexport interface PopoverContentProps\n extends React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content> {\n /**\n * Where the portal mounts. Defaults to `document.body`.\n *\n * Override it whenever the theme lives on a subtree rather than on the\n * document — a scoped overlay root, a `data-theme` wrapper, a shadow host.\n * Portalled to the body by default, the panel escapes that subtree and renders\n * with none of its tokens: correct behaviour, no styling, and nothing in the\n * console to say why.\n */\n container?: HTMLElement | null;\n}\n\nexport const PopoverContent = React.forwardRef<\n React.ComponentRef<typeof PopoverPrimitive.Content>,\n PopoverContentProps\n>(({ className, align = 'start', sideOffset = 8, collisionPadding = 12, container, ...props }, ref) => (\n <PopoverPrimitive.Portal container={container ?? undefined}>\n <PopoverPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n collisionPadding={collisionPadding}\n className={cn(\n 'z-50 w-72 rounded-control border border-outline bg-surface p-inset-sm text-on-surface shadow-overlay',\n 'outline-none',\n className\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n));\nPopoverContent.displayName = 'PopoverContent';\n"],"mappings":";;;;;AAEA,YAAY,WAAW;AACvB,YAAY,sBAAsB;AAgD9B;AAxBG,IAAM,UAA2B;AACjC,IAAM,iBAAkC;AACxC,IAAM,gBAAiC;AACvC,IAAM,eAAgC;AAgBtC,IAAM,iBAAuB,iBAGlC,CAAC,EAAE,WAAW,QAAQ,SAAS,aAAa,GAAG,mBAAmB,IAAI,WAAW,GAAG,MAAM,GAAG,QAC7F,oBAAkB,yBAAjB,EAAwB,WAAW,aAAa,QAC/C;AAAA,EAAkB;AAAA,EAAjB;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA;AACN,GACF,CACD;AACD,eAAe,cAAc;","names":[]}
package/dist/index.d.ts CHANGED
@@ -1,5 +1,16 @@
1
1
  export { Button, ButtonProps, buttonVariants } from './button/button.js';
2
2
  export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardProps, CardTitle, CardTitleProps } from './card/card.js';
3
+ export { Input, InputProps } from './input/input.js';
4
+ export { Textarea, TextareaProps } from './input/textarea.js';
5
+ export { Field, FieldProps, Label, LabelProps } from './input/label.js';
6
+ export { Badge, BadgeProps, badgeVariants } from './badge/badge.js';
7
+ export { Avatar, AvatarProps, avatarVariants } from './avatar/avatar.js';
8
+ export { Tabs, TabsContent, TabsList, TabsTrigger } from './tabs/tabs.js';
9
+ export { ToggleGroup, ToggleGroupItem } from './tabs/toggle-group.js';
10
+ export { Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverContentProps, PopoverTrigger } from './overlay/popover.js';
11
+ export { Sheet, SheetBody, SheetClose, SheetContent, SheetContentProps, SheetDescription, SheetFooter, SheetHeader, SheetPortal, SheetTitle, SheetTrigger, sheetVariants } from './overlay/sheet.js';
12
+ export { Tooltip, TooltipContent, TooltipContentProps, TooltipProvider, TooltipTrigger } from './overlay/tooltip.js';
13
+ export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogContentProps, AlertDialogDescription, AlertDialogFooter, AlertDialogTitle, AlertDialogTrigger } from './overlay/alert-dialog.js';
3
14
  export { Icon, IconProps } from './icon/icon.js';
4
15
  export { Logo, LogoProps } from './logo/logo.js';
5
16
  export { LogoMark, LogoMarkProps } from './logo/logo-mark.js';
@@ -12,4 +23,12 @@ export { CATEGORICAL_MAX, categorical, categoricalOn, chartStroke, chartToken, s
12
23
  import 'class-variance-authority/types';
13
24
  import 'react';
14
25
  import 'class-variance-authority';
26
+ import '@radix-ui/react-label';
27
+ import '@radix-ui/react-avatar';
28
+ import '@radix-ui/react-tabs';
29
+ import '@radix-ui/react-toggle-group';
30
+ import '@radix-ui/react-popover';
31
+ import '@radix-ui/react-dialog';
32
+ import '@radix-ui/react-tooltip';
33
+ import '@radix-ui/react-alert-dialog';
15
34
  import '@phosphor-icons/react';
package/dist/index.js CHANGED
@@ -1,13 +1,86 @@
1
1
  import {
2
- Button,
3
- buttonVariants
4
- } from "./chunk-BWYWI4BC.js";
2
+ Logo
3
+ } from "./chunk-QZYA5GS2.js";
4
+ import {
5
+ AlertDialog,
6
+ AlertDialogAction,
7
+ AlertDialogCancel,
8
+ AlertDialogContent,
9
+ AlertDialogDescription,
10
+ AlertDialogFooter,
11
+ AlertDialogTitle,
12
+ AlertDialogTrigger
13
+ } from "./chunk-POUL3ZTV.js";
14
+ import {
15
+ Popover,
16
+ PopoverAnchor,
17
+ PopoverClose,
18
+ PopoverContent,
19
+ PopoverTrigger
20
+ } from "./chunk-WHJ4JVO6.js";
21
+ import {
22
+ Sheet,
23
+ SheetBody,
24
+ SheetClose,
25
+ SheetContent,
26
+ SheetDescription,
27
+ SheetFooter,
28
+ SheetHeader,
29
+ SheetPortal,
30
+ SheetTitle,
31
+ SheetTrigger,
32
+ sheetVariants
33
+ } from "./chunk-R7BM6J75.js";
34
+ import {
35
+ Tooltip,
36
+ TooltipContent,
37
+ TooltipProvider,
38
+ TooltipTrigger
39
+ } from "./chunk-DCKWB3EY.js";
40
+ import {
41
+ Tabs,
42
+ TabsContent,
43
+ TabsList,
44
+ TabsTrigger
45
+ } from "./chunk-WHD5CSTB.js";
46
+ import {
47
+ ToggleGroup,
48
+ ToggleGroupItem
49
+ } from "./chunk-OVF2VS3L.js";
50
+ import {
51
+ SegmentedBar
52
+ } from "./chunk-CZ3JB37A.js";
53
+ import {
54
+ Stat
55
+ } from "./chunk-XGYKA3GE.js";
56
+ import {
57
+ Icon
58
+ } from "./chunk-N5ZJZ7I3.js";
59
+ import {
60
+ Input
61
+ } from "./chunk-BYZCFI7X.js";
62
+ import {
63
+ Field,
64
+ Label
65
+ } from "./chunk-HHUI32DT.js";
66
+ import {
67
+ Textarea
68
+ } from "./chunk-GNHNTI5A.js";
5
69
  import {
6
70
  LogoMark
7
71
  } from "./chunk-IVQKYAL6.js";
8
72
  import {
9
- Logo
10
- } from "./chunk-QZYA5GS2.js";
73
+ Avatar,
74
+ avatarVariants
75
+ } from "./chunk-ULEDFFUJ.js";
76
+ import {
77
+ Badge,
78
+ badgeVariants
79
+ } from "./chunk-RXDJPRH5.js";
80
+ import {
81
+ Button,
82
+ buttonVariants
83
+ } from "./chunk-BWYWI4BC.js";
11
84
  import {
12
85
  Card,
13
86
  CardContent,
@@ -26,9 +99,6 @@ import "./chunk-27MWE4F5.js";
26
99
  import {
27
100
  Ring
28
101
  } from "./chunk-YX6MSLUB.js";
29
- import {
30
- SegmentedBar
31
- } from "./chunk-CZ3JB37A.js";
32
102
  import {
33
103
  CATEGORICAL_MAX,
34
104
  categorical,
@@ -39,14 +109,18 @@ import {
39
109
  sequentialOn,
40
110
  toneFill
41
111
  } from "./chunk-G2XJK244.js";
42
- import {
43
- Stat
44
- } from "./chunk-XGYKA3GE.js";
45
- import {
46
- Icon
47
- } from "./chunk-N5ZJZ7I3.js";
48
112
  import "./chunk-DXRY7AS4.js";
49
113
  export {
114
+ AlertDialog,
115
+ AlertDialogAction,
116
+ AlertDialogCancel,
117
+ AlertDialogContent,
118
+ AlertDialogDescription,
119
+ AlertDialogFooter,
120
+ AlertDialogTitle,
121
+ AlertDialogTrigger,
122
+ Avatar,
123
+ Badge,
50
124
  BarChart,
51
125
  Button,
52
126
  CATEGORICAL_MAX,
@@ -56,13 +130,44 @@ export {
56
130
  CardFooter,
57
131
  CardHeader,
58
132
  CardTitle,
133
+ Field,
59
134
  Icon,
135
+ Input,
136
+ Label,
60
137
  LineChart,
61
138
  Logo,
62
139
  LogoMark,
140
+ Popover,
141
+ PopoverAnchor,
142
+ PopoverClose,
143
+ PopoverContent,
144
+ PopoverTrigger,
63
145
  Ring,
64
146
  SegmentedBar,
147
+ Sheet,
148
+ SheetBody,
149
+ SheetClose,
150
+ SheetContent,
151
+ SheetDescription,
152
+ SheetFooter,
153
+ SheetHeader,
154
+ SheetPortal,
155
+ SheetTitle,
156
+ SheetTrigger,
65
157
  Stat,
158
+ Tabs,
159
+ TabsContent,
160
+ TabsList,
161
+ TabsTrigger,
162
+ Textarea,
163
+ ToggleGroup,
164
+ ToggleGroupItem,
165
+ Tooltip,
166
+ TooltipContent,
167
+ TooltipProvider,
168
+ TooltipTrigger,
169
+ avatarVariants,
170
+ badgeVariants,
66
171
  buttonVariants,
67
172
  categorical,
68
173
  categoricalOn,
@@ -70,6 +175,7 @@ export {
70
175
  chartToken,
71
176
  sequential,
72
177
  sequentialOn,
178
+ sheetVariants,
73
179
  toneFill
74
180
  };
75
181
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,22 @@
1
+ import * as React from 'react';
2
+
3
+ /**
4
+ * Cairn Input. A text field, and nothing more.
5
+ *
6
+ * No Radix here on purpose: an `<input>` has no behaviour to borrow. Wrapping a
7
+ * bare element in a primitive would add a dependency and a layer of indirection
8
+ * for a `className`. Radix earns its place where there is focus management,
9
+ * dismissal or ARIA wiring to get right, not here.
10
+ *
11
+ * `field` radius by role (AGENTS.md rule 7), hairline outline in neutral (rule
12
+ * 7 again: border colour is never a hue), and the placeholder sits on
13
+ * `on-surface-variant` so it reads as absent text rather than as entered text.
14
+ * Height matches `Button` at size `md`, so a field and its action align on a row.
15
+ *
16
+ * Pair it with `Label` — a field whose only label is its placeholder loses that
17
+ * label the moment someone types.
18
+ */
19
+ type InputProps = React.InputHTMLAttributes<HTMLInputElement>;
20
+ declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
21
+
22
+ export { Input, type InputProps };
@@ -0,0 +1,8 @@
1
+ import {
2
+ Input
3
+ } from "../chunk-BYZCFI7X.js";
4
+ import "../chunk-DXRY7AS4.js";
5
+ export {
6
+ Input
7
+ };
8
+ //# sourceMappingURL=input.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,32 @@
1
+ import * as React from 'react';
2
+ import * as LabelPrimitive from '@radix-ui/react-label';
3
+
4
+ /**
5
+ * Cairn Label. Radix, for one reason that is not styling.
6
+ *
7
+ * A plain `<label htmlFor>` works until the control is a composite — a Radix
8
+ * select, a toggle group, anything that is not a single native element — and
9
+ * then the association silently stops working. Radix's Label also stops the
10
+ * text-selection-on-double-click that makes a form feel broken. That is
11
+ * behaviour, so it is a dependency; the styling below is the whole of our part.
12
+ *
13
+ * The `label` type role, neutral ink on `on-surface-variant`: a label is
14
+ * supporting text and its tone says so. It is never coloured (rule 1) and never
15
+ * set in caps (rule 6) — the pill badge is the one sanctioned kicker.
16
+ */
17
+ type LabelProps = React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>;
18
+ declare const Label: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & React.RefAttributes<HTMLLabelElement>>;
19
+ /**
20
+ * A labelled control in one call: the two are wired by a generated id, so a
21
+ * consumer cannot forget the `htmlFor`/`id` pair — the most common way an
22
+ * accessible form stops being one.
23
+ */
24
+ interface FieldProps {
25
+ label: React.ReactNode;
26
+ /** Receives the generated id; render your control with it. */
27
+ children: (id: string) => React.ReactNode;
28
+ className?: string;
29
+ }
30
+ declare function Field({ label, children, className }: FieldProps): React.JSX.Element;
31
+
32
+ export { Field, type FieldProps, Label, type LabelProps };
@@ -0,0 +1,11 @@
1
+ "use client";
2
+ import {
3
+ Field,
4
+ Label
5
+ } from "../chunk-HHUI32DT.js";
6
+ import "../chunk-DXRY7AS4.js";
7
+ export {
8
+ Field,
9
+ Label
10
+ };
11
+ //# sourceMappingURL=label.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,13 @@
1
+ import * as React from 'react';
2
+
3
+ /**
4
+ * Cairn Textarea. `Input`'s multi-line sibling, same tokens, same radius role.
5
+ *
6
+ * Resize is left to the browser (`resize-y` only): a horizontally resizable
7
+ * field breaks the column it sits in, and a field that cannot grow at all
8
+ * forces the writer to compose inside a slot.
9
+ */
10
+ type TextareaProps = React.TextareaHTMLAttributes<HTMLTextAreaElement>;
11
+ declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
12
+
13
+ export { Textarea, type TextareaProps };
@@ -0,0 +1,8 @@
1
+ import {
2
+ Textarea
3
+ } from "../chunk-GNHNTI5A.js";
4
+ import "../chunk-DXRY7AS4.js";
5
+ export {
6
+ Textarea
7
+ };
8
+ //# sourceMappingURL=textarea.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,42 @@
1
+ import * as React from 'react';
2
+ import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
3
+
4
+ /**
5
+ * Cairn AlertDialog. For the one question you cannot take back.
6
+ *
7
+ * Not a Dialog with different copy. `alertdialog` is its own role: it is
8
+ * announced as an interruption, it is always modal, and focus lands on the
9
+ * safest control rather than the first one — so an accidental Enter cancels
10
+ * instead of destroying. Radix carries that; a Dialog styled to look urgent
11
+ * carries none of it.
12
+ *
13
+ * Use it only where the action is irreversible. A confirmation on a reversible
14
+ * action is a toll booth: it teaches people to click through dialogs, and the
15
+ * one that mattered gets clicked through too.
16
+ *
17
+ * The destructive action is a `danger` Button passed through `asChild`. Danger
18
+ * is a message colour with its own AA-paired ink (rule 4) — it is not the
19
+ * signature accent, and `main` must never stand in for it (rule 3).
20
+ */
21
+ declare const AlertDialog: React.FC<AlertDialogPrimitive.AlertDialogProps>;
22
+ declare const AlertDialogTrigger: React.ForwardRefExoticComponent<AlertDialogPrimitive.AlertDialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
23
+ declare const AlertDialogAction: React.ForwardRefExoticComponent<AlertDialogPrimitive.AlertDialogActionProps & React.RefAttributes<HTMLButtonElement>>;
24
+ declare const AlertDialogCancel: React.ForwardRefExoticComponent<AlertDialogPrimitive.AlertDialogCancelProps & React.RefAttributes<HTMLButtonElement>>;
25
+ interface AlertDialogContentProps extends React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Content> {
26
+ /** Where the portal mounts. Defaults to `document.body`. See `PopoverContent`. */
27
+ container?: HTMLElement | null;
28
+ /**
29
+ * Classes for the scrim.
30
+ *
31
+ * Exists so the scrim can be raised with the panel. Lifting only the content's
32
+ * z-index leaves the dim layer stranded below whatever it was meant to cover —
33
+ * the dialog reads as urgent while the page behind it stays bright.
34
+ */
35
+ overlayClassName?: string;
36
+ }
37
+ declare const AlertDialogContent: React.ForwardRefExoticComponent<AlertDialogContentProps & React.RefAttributes<HTMLDivElement>>;
38
+ declare const AlertDialogTitle: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
39
+ declare const AlertDialogDescription: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
40
+ declare const AlertDialogFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
41
+
42
+ export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, type AlertDialogContentProps, AlertDialogDescription, AlertDialogFooter, AlertDialogTitle, AlertDialogTrigger };
@@ -0,0 +1,23 @@
1
+ "use client";
2
+ import {
3
+ AlertDialog,
4
+ AlertDialogAction,
5
+ AlertDialogCancel,
6
+ AlertDialogContent,
7
+ AlertDialogDescription,
8
+ AlertDialogFooter,
9
+ AlertDialogTitle,
10
+ AlertDialogTrigger
11
+ } from "../chunk-POUL3ZTV.js";
12
+ import "../chunk-DXRY7AS4.js";
13
+ export {
14
+ AlertDialog,
15
+ AlertDialogAction,
16
+ AlertDialogCancel,
17
+ AlertDialogContent,
18
+ AlertDialogDescription,
19
+ AlertDialogFooter,
20
+ AlertDialogTitle,
21
+ AlertDialogTrigger
22
+ };
23
+ //# sourceMappingURL=alert-dialog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,42 @@
1
+ import * as React from 'react';
2
+ import * as PopoverPrimitive from '@radix-ui/react-popover';
3
+
4
+ /**
5
+ * Cairn Popover. Radix, for the positioning — which is never as simple as it looks.
6
+ *
7
+ * The hand-rolled version is always the same: absolute coordinates, then a
8
+ * `Math.min/max` to keep the card on screen. It works until the trigger is near
9
+ * an edge and the card should flip to the other side, or the page scrolls under
10
+ * it, or the trigger sits inside its own scroll container. Radix's collision
11
+ * handling covers all of that, and brings what the maths never does: focus moves
12
+ * into the panel on open and returns to the trigger on close, Escape dismisses,
13
+ * an outside click dismisses, and the trigger is wired to the panel with
14
+ * `aria-expanded` / `aria-controls`.
15
+ *
16
+ * `Anchor` is exported because a popover does not always hang off a button: a
17
+ * pin dropped on a page has a position but no trigger element.
18
+ *
19
+ * `control` radius, not `card`: the card radius is reserved for feature cards and
20
+ * metric tiles (rule 7). Elevation AND a hairline, deliberately: the shadow
21
+ * carries the lift on the light theme, the hairline is what separates the surface
22
+ * on the dark one, where a black shadow does nothing.
23
+ */
24
+ declare const Popover: React.FC<PopoverPrimitive.PopoverProps>;
25
+ declare const PopoverTrigger: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>>;
26
+ declare const PopoverAnchor: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverAnchorProps & React.RefAttributes<HTMLDivElement>>;
27
+ declare const PopoverClose: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverCloseProps & React.RefAttributes<HTMLButtonElement>>;
28
+ interface PopoverContentProps extends React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content> {
29
+ /**
30
+ * Where the portal mounts. Defaults to `document.body`.
31
+ *
32
+ * Override it whenever the theme lives on a subtree rather than on the
33
+ * document — a scoped overlay root, a `data-theme` wrapper, a shadow host.
34
+ * Portalled to the body by default, the panel escapes that subtree and renders
35
+ * with none of its tokens: correct behaviour, no styling, and nothing in the
36
+ * console to say why.
37
+ */
38
+ container?: HTMLElement | null;
39
+ }
40
+ declare const PopoverContent: React.ForwardRefExoticComponent<PopoverContentProps & React.RefAttributes<HTMLDivElement>>;
41
+
42
+ export { Popover, PopoverAnchor, PopoverClose, PopoverContent, type PopoverContentProps, PopoverTrigger };
@@ -0,0 +1,17 @@
1
+ "use client";
2
+ import {
3
+ Popover,
4
+ PopoverAnchor,
5
+ PopoverClose,
6
+ PopoverContent,
7
+ PopoverTrigger
8
+ } from "../chunk-WHJ4JVO6.js";
9
+ import "../chunk-DXRY7AS4.js";
10
+ export {
11
+ Popover,
12
+ PopoverAnchor,
13
+ PopoverClose,
14
+ PopoverContent,
15
+ PopoverTrigger
16
+ };
17
+ //# sourceMappingURL=popover.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,47 @@
1
+ import * as class_variance_authority_types from 'class-variance-authority/types';
2
+ import * as React from 'react';
3
+ import * as DialogPrimitive from '@radix-ui/react-dialog';
4
+ import { VariantProps } from 'class-variance-authority';
5
+
6
+ /**
7
+ * Cairn Sheet. A panel anchored to one edge, on Radix Dialog.
8
+ *
9
+ * The prop that matters is `modal`, and the default here is deliberately the
10
+ * opposite of Radix's. A **modal** sheet takes the page hostage: focus is
11
+ * trapped, everything behind it is inert, and the rest of the screen is dimmed.
12
+ * That is right for a form you must finish. It is wrong for a companion panel —
13
+ * an inspector, a comment thread, a filter rail — where the whole point is to
14
+ * keep working in the page while the panel is open. Ship the modal default and
15
+ * every companion panel in the system becomes a trap.
16
+ *
17
+ * So `modal` defaults to false, and Escape-to-close, the labelled dialog role and
18
+ * the focus return still come from Radix. Pass `modal` explicitly when the panel
19
+ * really must be answered before anything else.
20
+ *
21
+ * A `Title` is not optional. Radix warns when one is missing, and it is right to:
22
+ * a dialog with no accessible name is announced as "dialog", which tells the user
23
+ * nothing. Use `SheetTitle` — wrap it in `sr-only` if the design has no visible
24
+ * heading, never drop it.
25
+ */
26
+ declare const sheetVariants: (props?: ({
27
+ side?: "right" | "bottom" | "left" | null | undefined;
28
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
29
+ declare const Sheet: React.FC<DialogPrimitive.DialogProps>;
30
+ declare const SheetTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
31
+ declare const SheetClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
32
+ declare const SheetPortal: React.FC<DialogPrimitive.DialogPortalProps>;
33
+ interface SheetContentProps extends React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>, VariantProps<typeof sheetVariants> {
34
+ side?: 'right' | 'left' | 'bottom';
35
+ /** Dim and inert the page behind. Only for a panel that must be answered. */
36
+ overlay?: boolean;
37
+ /** Where the portal mounts. Defaults to `document.body`. See `PopoverContent`. */
38
+ container?: HTMLElement | null;
39
+ }
40
+ declare const SheetContent: React.ForwardRefExoticComponent<SheetContentProps & React.RefAttributes<HTMLDivElement>>;
41
+ declare const SheetHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
42
+ declare const SheetBody: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
43
+ declare const SheetFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
44
+ declare const SheetTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
45
+ declare const SheetDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
46
+
47
+ export { Sheet, SheetBody, SheetClose, SheetContent, type SheetContentProps, SheetDescription, SheetFooter, SheetHeader, SheetPortal, SheetTitle, SheetTrigger, sheetVariants };
@@ -0,0 +1,29 @@
1
+ "use client";
2
+ import {
3
+ Sheet,
4
+ SheetBody,
5
+ SheetClose,
6
+ SheetContent,
7
+ SheetDescription,
8
+ SheetFooter,
9
+ SheetHeader,
10
+ SheetPortal,
11
+ SheetTitle,
12
+ SheetTrigger,
13
+ sheetVariants
14
+ } from "../chunk-R7BM6J75.js";
15
+ import "../chunk-DXRY7AS4.js";
16
+ export {
17
+ Sheet,
18
+ SheetBody,
19
+ SheetClose,
20
+ SheetContent,
21
+ SheetDescription,
22
+ SheetFooter,
23
+ SheetHeader,
24
+ SheetPortal,
25
+ SheetTitle,
26
+ SheetTrigger,
27
+ sheetVariants
28
+ };
29
+ //# sourceMappingURL=sheet.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}