@vikram-hegde/skeletal 0.0.1

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 (118) hide show
  1. package/README.md +35 -0
  2. package/dist/alert-dialog/index.d.ts +2 -0
  3. package/dist/alert-dialog/index.js +2 -0
  4. package/dist/alert-dialog-1hxVC_5N.js +71 -0
  5. package/dist/badge/index.d.ts +2 -0
  6. package/dist/badge/index.js +2 -0
  7. package/dist/badge-C3p1L0E7.css +53 -0
  8. package/dist/badge-C3p1L0E7.js +32 -0
  9. package/dist/button/index.d.ts +2 -0
  10. package/dist/button/index.js +2 -0
  11. package/dist/button-B48UNbaC.css +152 -0
  12. package/dist/button-B48UNbaC.js +46 -0
  13. package/dist/button-Dvd4n2U4.d.ts +56 -0
  14. package/dist/checkbox/index.d.ts +2 -0
  15. package/dist/checkbox/index.js +2 -0
  16. package/dist/checkbox-wh2BoiSj.css +76 -0
  17. package/dist/checkbox-wh2BoiSj.js +112 -0
  18. package/dist/cluster-BJ4m5uGN.css +9 -0
  19. package/dist/cluster-BJ4m5uGN.js +21 -0
  20. package/dist/combobox/index.d.ts +2 -0
  21. package/dist/combobox/index.js +2 -0
  22. package/dist/combobox-DWH7uSsx.css +389 -0
  23. package/dist/combobox-DWH7uSsx.js +327 -0
  24. package/dist/command-palette/index.d.ts +2 -0
  25. package/dist/command-palette/index.js +2 -0
  26. package/dist/command-palette-DF4XJ8qz.css +164 -0
  27. package/dist/command-palette-DF4XJ8qz.js +191 -0
  28. package/dist/dialog/index.d.ts +6 -0
  29. package/dist/dialog/index.js +2 -0
  30. package/dist/dialog-C4yqxII_.js +73 -0
  31. package/dist/dialog-footer-Br9KZP4v.js +29 -0
  32. package/dist/dialog-footer-bNVIVPbu.d.ts +56 -0
  33. package/dist/dialog-portal-B21WFYkQ.css +131 -0
  34. package/dist/dialog-portal-B21WFYkQ.js +26 -0
  35. package/dist/dialog-portal-BF89FBeX.d.ts +15 -0
  36. package/dist/dialog-title-DRYRIxCp.js +35 -0
  37. package/dist/dialog-title-jyf86Q8C.d.ts +36 -0
  38. package/dist/dialog-viewport-CaMWJrCJ.d.ts +42 -0
  39. package/dist/dialog-viewport-vpbsq7Ib.js +21 -0
  40. package/dist/drawer/index.d.ts +2 -0
  41. package/dist/drawer/index.js +2 -0
  42. package/dist/drawer-DQmz_uCP.css +214 -0
  43. package/dist/drawer-DQmz_uCP.js +180 -0
  44. package/dist/icon/index.d.ts +2 -0
  45. package/dist/icon/index.js +2 -0
  46. package/dist/icon-DBOdxNvH.css +6 -0
  47. package/dist/icon-DBOdxNvH.js +20 -0
  48. package/dist/index-A2QmU5r9.d.ts +37 -0
  49. package/dist/index-B0uNLS7z.d.ts +301 -0
  50. package/dist/index-B63PSP58.d.ts +94 -0
  51. package/dist/index-BBOkTl3h.d.ts +261 -0
  52. package/dist/index-BLFVnve3.d.ts +53 -0
  53. package/dist/index-BXPUT5u-.d.ts +72 -0
  54. package/dist/index-BngvATZx.d.ts +35 -0
  55. package/dist/index-Br2NrBW_.d.ts +444 -0
  56. package/dist/index-CUy-9csi.d.ts +135 -0
  57. package/dist/index-CbMW32E9.d.ts +82 -0
  58. package/dist/index-CyTcR6iv.d.ts +433 -0
  59. package/dist/index-CznsZ_1M.d.ts +85 -0
  60. package/dist/index-D-6gOciw.d.ts +350 -0
  61. package/dist/index-DdqDyczP.d.ts +209 -0
  62. package/dist/index-GOGpFujX.d.ts +144 -0
  63. package/dist/index-W3ozKcis.d.ts +245 -0
  64. package/dist/index-kpw3_4q_.d.ts +50 -0
  65. package/dist/index-rH7TJeJt.d.ts +334 -0
  66. package/dist/index-rQ7sRkqg.d.ts +122 -0
  67. package/dist/index.css +93 -0
  68. package/dist/index.d.ts +26 -0
  69. package/dist/index.js +26 -0
  70. package/dist/input/index.d.ts +2 -0
  71. package/dist/input/index.js +2 -0
  72. package/dist/input-CQ_ean8e.css +129 -0
  73. package/dist/input-CQ_ean8e.js +65 -0
  74. package/dist/layout/index.d.ts +2 -0
  75. package/dist/layout/index.js +4 -0
  76. package/dist/layout-qoyutnKU.css +181 -0
  77. package/dist/layout-qoyutnKU.js +169 -0
  78. package/dist/menu/index.d.ts +2 -0
  79. package/dist/menu/index.js +2 -0
  80. package/dist/menu-DRdGMI_-.css +236 -0
  81. package/dist/menu-DRdGMI_-.js +243 -0
  82. package/dist/merge-class-name-C4KJJGuK.js +15 -0
  83. package/dist/popover/index.d.ts +2 -0
  84. package/dist/popover/index.js +2 -0
  85. package/dist/popover-CenynT0Z.css +139 -0
  86. package/dist/popover-CenynT0Z.js +174 -0
  87. package/dist/radio/index.d.ts +2 -0
  88. package/dist/radio/index.js +2 -0
  89. package/dist/radio-BJrvdkga.css +80 -0
  90. package/dist/radio-BJrvdkga.js +75 -0
  91. package/dist/scroll-area/index.d.ts +2 -0
  92. package/dist/scroll-area/index.js +2 -0
  93. package/dist/scroll-area-DkORxJE9.css +175 -0
  94. package/dist/scroll-area-DkORxJE9.js +114 -0
  95. package/dist/select/index.d.ts +2 -0
  96. package/dist/select/index.js +2 -0
  97. package/dist/select-BaqBHUac.css +273 -0
  98. package/dist/select-BaqBHUac.js +254 -0
  99. package/dist/skeleton/index.d.ts +2 -0
  100. package/dist/skeleton/index.js +2 -0
  101. package/dist/skeleton-W6fwO5pf.css +88 -0
  102. package/dist/skeleton-W6fwO5pf.js +97 -0
  103. package/dist/spinner/index.d.ts +2 -0
  104. package/dist/spinner/index.js +2 -0
  105. package/dist/spinner-DB6ap8Si.css +43 -0
  106. package/dist/spinner-DB6ap8Si.js +27 -0
  107. package/dist/stack-BzFVrsmT.css +12 -0
  108. package/dist/stack-BzFVrsmT.js +52 -0
  109. package/dist/style-vars-ZSrCUzKx.js +13 -0
  110. package/dist/switch/index.d.ts +2 -0
  111. package/dist/switch/index.js +2 -0
  112. package/dist/switch-DizP31iF.css +76 -0
  113. package/dist/switch-DizP31iF.js +58 -0
  114. package/dist/tooltip/index.d.ts +2 -0
  115. package/dist/tooltip/index.js +2 -0
  116. package/dist/tooltip-CQk2WjUS.css +92 -0
  117. package/dist/tooltip-CQk2WjUS.js +138 -0
  118. package/package.json +68 -0
@@ -0,0 +1,301 @@
1
+ import { n as ButtonProps } from "./button-Dvd4n2U4.js";
2
+ import { a as DialogClose, r as DialogDescription, t as DialogTitle } from "./dialog-title-jyf86Q8C.js";
3
+ import { t as DialogPortal } from "./dialog-portal-BF89FBeX.js";
4
+ import { HTMLAttributes } from "react";
5
+ import { DrawerBackdropProps, DrawerContentProps, DrawerPopupProps, DrawerRootProps, DrawerSwipeAreaProps, DrawerTriggerProps, DrawerViewportProps } from "@base-ui/react/drawer";
6
+ //#region src/drawer/drawer-backdrop.d.ts
7
+ /**
8
+ * An overlay displayed beneath the drawer popup. Renders a `<div>` element.
9
+ *
10
+ * Clicking the backdrop dismisses the drawer (unless
11
+ * `disablePointerDismissal` is set on the root). It dims the page and fades as
12
+ * the drawer is swiped toward dismissal (its opacity tracks the drawer's swipe
13
+ * progress), and can be customised with `className` or the `render` prop.
14
+ */
15
+ interface DrawerBackdropProps$1 extends DrawerBackdropProps {}
16
+ declare function DrawerBackdrop({ className, ...props }: DrawerBackdropProps$1): import("react").JSX.Element;
17
+ //#endregion
18
+ //#region src/drawer/drawer-content.d.ts
19
+ /**
20
+ * The padded content container inside the drawer popup. Renders a `<div>`
21
+ * element.
22
+ *
23
+ * Per the Base UI anatomy, render `<Drawer.Title>`, `<Drawer.Description>`,
24
+ * and the drawer's actions inside `<Drawer.Content>`:
25
+ *
26
+ * ```tsx
27
+ * <Drawer.Popup>
28
+ * <Drawer.Content>
29
+ * <Drawer.Title>Settings</Drawer.Title>
30
+ * <Drawer.Description>…</Drawer.Description>
31
+ * <Drawer.Close>Close</Drawer.Close>
32
+ * </Drawer.Content>
33
+ * </Drawer.Popup>
34
+ * ```
35
+ *
36
+ * The content is padded (`1.5rem`), measure-constrained, and wrapped in a
37
+ * `Stack` layout primitive for the drawer's vertical rhythm
38
+ * (`space="1.25rem"`), matching `Dialog.Content`. It also lets users select
39
+ * text inside the drawer without triggering the swipe-to-dismiss gesture.
40
+ *
41
+ * `Drawer.Content` is the scrollable region of the popup: when it overflows,
42
+ * it scrolls between an optional sticky `Drawer.Header` (above) and `Drawer.Footer`
43
+ * (below), which stay pinned.
44
+ */
45
+ interface DrawerContentProps$1 extends DrawerContentProps {}
46
+ declare function DrawerContent({ className, children, ...props }: DrawerContentProps$1): import("react").JSX.Element;
47
+ //#endregion
48
+ //#region src/drawer/drawer-footer.d.ts
49
+ /**
50
+ * A sticky footer bar for drawer actions. Renders a `<div>` element.
51
+ *
52
+ * Render it as a direct child of `Drawer.Popup`, after `Drawer.Content`. It
53
+ * stays pinned to the popup's bottom edge while the content scrolls beneath it
54
+ * — the conventional placement for a drawer's primary/destructive actions:
55
+ *
56
+ * ```tsx
57
+ * <Drawer.Popup>
58
+ * <Drawer.Content>…</Drawer.Content>
59
+ * <Drawer.Footer>
60
+ * <Drawer.Close>Cancel</Drawer.Close>
61
+ * <Drawer.Close variant="primary">Save</Drawer.Close>
62
+ * </Drawer.Footer>
63
+ * </Drawer.Popup>
64
+ * ```
65
+ *
66
+ * Styled as a muted bar with a top border and a right-aligned, wrapping row of
67
+ * buttons — the same treatment as `Dialog.Footer`. Override alignment with
68
+ * `className` or `style` (e.g. `justifyContent: "space-between"`) when needed.
69
+ */
70
+ interface DrawerFooterProps extends HTMLAttributes<HTMLDivElement> {}
71
+ declare function DrawerFooter({ className, ...props }: DrawerFooterProps): import("react").JSX.Element;
72
+ //#endregion
73
+ //#region src/drawer/drawer-header.d.ts
74
+ /**
75
+ * A sticky top bar for the drawer. Renders a `<div>` element.
76
+ *
77
+ * Render it as a direct child of `Drawer.Popup`, before `Drawer.Content`. It
78
+ * stays pinned to the popup's top edge while the content scrolls beneath it —
79
+ * pair it with `Drawer.Footer` so actions are always visible:
80
+ *
81
+ * ```tsx
82
+ * <Drawer.Popup>
83
+ * <Drawer.Header>
84
+ * <Drawer.Title>Filters</Drawer.Title>
85
+ * <Drawer.Close size="sm" variant="ghost">✕</Drawer.Close>
86
+ * </Drawer.Header>
87
+ * <Drawer.Content>…</Drawer.Content>
88
+ * <Drawer.Footer>
89
+ * <Drawer.Close>Reset</Drawer.Close>
90
+ * <Drawer.Close variant="primary">Apply</Drawer.Close>
91
+ * </Drawer.Footer>
92
+ * </Drawer.Popup>
93
+ * ```
94
+ *
95
+ * Styled as a bar on the popup surface (same background as the content) with a
96
+ * bottom border to separate it from the body. It is a plain container — put
97
+ * the title on the left and trailing actions on the right
98
+ * (`justify-content: space-between`), and override alignment with `className`
99
+ * or `style` when needed.
100
+ */
101
+ interface DrawerHeaderProps extends HTMLAttributes<HTMLDivElement> {}
102
+ declare function DrawerHeader({ className, ...props }: DrawerHeaderProps): import("react").JSX.Element;
103
+ //#endregion
104
+ //#region src/drawer/drawer-popup.d.ts
105
+ /**
106
+ * The extent of the drawer along its slide axis.
107
+ *
108
+ * For left/right drawers this is the panel width; for top/bottom sheets it is
109
+ * the maximum height (the sheet grows to its content, capped at this size):
110
+ * - `sm`: 20rem
111
+ * - `md`: 24rem — default; most drawers.
112
+ * - `lg`: 32rem — wide panels and complex forms.
113
+ *
114
+ * @default 'md'
115
+ */
116
+ type DrawerPopupSize = "sm" | "md" | "lg";
117
+ /**
118
+ * The sliding panel itself. Renders a `<div>` element with the popup role.
119
+ *
120
+ * Per the Base UI anatomy it sits inside `<Drawer.Viewport>`, which pins it to
121
+ * the edge selected by the root's `side` prop. The popup carries the surface
122
+ * (background, border, shadow, radius) and animates in and out of view —
123
+ * including following the finger while the drawer is being swiped to dismiss.
124
+ *
125
+ * Accepts all Base UI popup props, including `initialFocus` and `finalFocus`
126
+ * for controlling focus when the drawer opens and closes.
127
+ *
128
+ * `size` controls the drawer's extent along its slide axis. The popup lays out
129
+ * as a column: render `<Drawer.Content>` for the scrollable middle, with an
130
+ * optional sticky `<Drawer.Header>` and `<Drawer.Footer>` that stay pinned.
131
+ *
132
+ * @default size = 'md'
133
+ */
134
+ interface DrawerPopupProps$1 extends DrawerPopupProps {
135
+ /** Extent of the drawer along its slide axis. @default 'md' */
136
+ size?: DrawerPopupSize;
137
+ }
138
+ declare function DrawerPopup({ className, size, children, ...props }: DrawerPopupProps$1): import("react").JSX.Element;
139
+ //#endregion
140
+ //#region src/drawer/drawer-root.d.ts
141
+ /**
142
+ * The edge of the screen the drawer slides out from.
143
+ *
144
+ * Pairs with `side` to position the drawer and pick the swipe gesture:
145
+ * - `right`: a side panel on the right edge (default) — dismiss by swiping right.
146
+ * - `left`: a side panel on the left edge — dismiss by swiping left.
147
+ * - `bottom`: a bottom sheet — dismiss by swiping down.
148
+ * - `top`: a top sheet — dismiss by swiping up.
149
+ *
150
+ * @default 'right'
151
+ */
152
+ type DrawerSide = "left" | "right" | "top" | "bottom";
153
+ /**
154
+ * The root of the drawer, grouping all parts together. Renders no DOM element.
155
+ *
156
+ * All Base UI root props are supported: `open`, `defaultOpen`, `modal`,
157
+ * `onOpenChange`, `onOpenChangeComplete`, `actionsRef`, `handle`,
158
+ * `triggerId`, `snapPoints`, and `swipeDirection`.
159
+ *
160
+ * `side` picks which edge the drawer slides from and is the recommended way to
161
+ * position it — it maps to `swipeDirection` under the hood. Pass
162
+ * `swipeDirection` directly instead when you need fine-grained control (or
163
+ * snap points, which only apply to top/bottom sheets).
164
+ *
165
+ * Use `open` + `onOpenChange` to control the drawer; otherwise it is
166
+ * uncontrolled. `modal` accepts `true`, `'trap-focus'`, or `false`.
167
+ *
168
+ * @default modal = true, side = 'right'
169
+ */
170
+ interface DrawerProps<Payload = unknown> extends DrawerRootProps<Payload> {
171
+ /** Edge of the screen the drawer slides out from. @default 'right' */
172
+ side?: DrawerSide;
173
+ }
174
+ declare function DrawerRoot<Payload>({ side, swipeDirection, ...props }: DrawerProps<Payload>): import("react").JSX.Element;
175
+ //#endregion
176
+ //#region src/drawer/drawer-swipe-area.d.ts
177
+ /**
178
+ * An invisible area that listens for swipe gestures to open the drawer. Renders
179
+ * a `<div>` element.
180
+ *
181
+ * Place it along the edge the drawer slides out from. The default
182
+ * `swipeDirection` (opposite of the root's) matches that edge, so a right-side
183
+ * drawer opens by swiping from the right edge, a bottom sheet by swiping up
184
+ * from the bottom edge, and so on.
185
+ *
186
+ * The swipe area is styled to fill the screen edge it sits on (a thin strip).
187
+ * Style it with `className` if you want to make it visible or resize it.
188
+ *
189
+ * @default disabled = false
190
+ */
191
+ interface DrawerSwipeAreaProps$1 extends DrawerSwipeAreaProps {}
192
+ declare function DrawerSwipeArea({ className, ...props }: DrawerSwipeAreaProps$1): import("react").JSX.Element;
193
+ //#endregion
194
+ //#region src/drawer/drawer-trigger.d.ts
195
+ /**
196
+ * A button that opens the drawer. Renders a `<button>` element.
197
+ *
198
+ * Composed from the `Button` component via Base UI's `render` prop, so it
199
+ * accepts all `Button` props (`variant`, `size`, `fullWidth`, `disabled`,
200
+ * `onClick`, ...) plus the drawer-trigger props from Base UI (`payload`,
201
+ * `handle`, `id`). Defaults to the `primary` variant.
202
+ *
203
+ * The `payload` prop lets you pass data from the trigger to the drawer's
204
+ * render-prop content.
205
+ */
206
+ interface DrawerTriggerProps$1<Payload = unknown> extends ButtonProps, Omit<DrawerTriggerProps<Payload>, "className" | "style" | "render" | "nativeButton"> {}
207
+ declare function DrawerTrigger<Payload>({ className, variant, size, fullWidth, ...props }: DrawerTriggerProps$1<Payload>): import("react").JSX.Element;
208
+ //#endregion
209
+ //#region src/drawer/drawer-viewport.d.ts
210
+ /**
211
+ * The full-screen positioning container for the drawer popup. Renders a
212
+ * `<div>` element.
213
+ *
214
+ * Per the Base UI anatomy, render `<Drawer.Popup>` inside
215
+ * `<Drawer.Viewport>`:
216
+ *
217
+ * ```tsx
218
+ * <Drawer.Portal>
219
+ * <Drawer.Backdrop />
220
+ * <Drawer.Viewport>
221
+ * <Drawer.Popup>...</Drawer.Popup>
222
+ * </Drawer.Viewport>
223
+ * </Drawer.Portal>
224
+ * ```
225
+ *
226
+ * The viewport is `position: fixed`, fills the screen, and pins the popup to
227
+ * the edge selected by the root's `side` prop (left/right drawers stretch to
228
+ * full height, top/bottom sheets stretch to full width). The drawer's swipe
229
+ * gesture is registered on the viewport, so don't wrap the popup in an extra
230
+ * positioning element.
231
+ *
232
+ * Styled with the `drawer__viewport` BEM class; override positioning with
233
+ * `className` if you need a different layout.
234
+ */
235
+ interface DrawerViewportProps$1 extends DrawerViewportProps {}
236
+ declare function DrawerViewport({ className, ...props }: DrawerViewportProps$1): import("react").JSX.Element;
237
+ //#endregion
238
+ //#region src/drawer/index.d.ts
239
+ /**
240
+ * Compound component for drawers.
241
+ *
242
+ * Assemble the parts as properties of the object:
243
+ *
244
+ * ```tsx
245
+ * import { Drawer } from '@vikram-hegde/skeletal'
246
+ *
247
+ * <Drawer.Root side="right">
248
+ * <Drawer.Trigger>Open</Drawer.Trigger>
249
+ * <Drawer.Portal>
250
+ * <Drawer.Backdrop />
251
+ * <Drawer.Viewport>
252
+ * <Drawer.Popup>
253
+ * <Drawer.Header>
254
+ * <Drawer.Title>Title</Drawer.Title>
255
+ * <Drawer.Close size="sm" variant="ghost">✕</Drawer.Close>
256
+ * </Drawer.Header>
257
+ * <Drawer.Content>
258
+ * <Drawer.Description>Description</Drawer.Description>
259
+ * </Drawer.Content>
260
+ * <Drawer.Footer>
261
+ * <Drawer.Close>Cancel</Drawer.Close>
262
+ * <Drawer.Close variant="primary">Confirm</Drawer.Close>
263
+ * </Drawer.Footer>
264
+ * </Drawer.Popup>
265
+ * </Drawer.Viewport>
266
+ * </Drawer.Portal>
267
+ * </Drawer.Root>
268
+ * ```
269
+ *
270
+ * Composition follows the Base UI anatomy — `Drawer.Viewport` is the
271
+ * full-screen positioning/scroll container that pins `Drawer.Popup` to the
272
+ * edge set by the root's `side` prop.
273
+ *
274
+ * All parts are thin styled wrappers over Base UI's `Drawer`, so every Base UI
275
+ * prop, `render` override, and ref behaves the same. The drawer adds swipe-to-
276
+ * dismiss gestures on top of a Dialog, so `Backdrop`, `Viewport`, `Popup`,
277
+ * `Content`, and `SwipeArea` are drawer-specific; `Portal`, `Title`,
278
+ * `Description`, and `Close` are the same styled parts as `Dialog`'s (their
279
+ * prop types live under `Dialog*Props`). `Header` and `Footer` are plain
280
+ * sticky bars that stay pinned while `Content` scrolls.
281
+ *
282
+ * Position the drawer with the `side` prop on `Root`. Use `SwipeArea` to let
283
+ * users swipe open a closed drawer from the screen edge.
284
+ */
285
+ declare const Drawer$1: {
286
+ Root: typeof DrawerRoot;
287
+ Trigger: typeof DrawerTrigger;
288
+ Portal: typeof DialogPortal;
289
+ Backdrop: typeof DrawerBackdrop;
290
+ Viewport: typeof DrawerViewport;
291
+ Popup: typeof DrawerPopup;
292
+ Header: typeof DrawerHeader;
293
+ Content: typeof DrawerContent;
294
+ Footer: typeof DrawerFooter;
295
+ Title: typeof DialogTitle;
296
+ Description: typeof DialogDescription;
297
+ Close: typeof DialogClose;
298
+ SwipeArea: typeof DrawerSwipeArea;
299
+ };
300
+ //#endregion
301
+ export { DrawerProps as a, DrawerPopupSize as c, DrawerContentProps$1 as d, DrawerBackdropProps$1 as f, DrawerSwipeAreaProps$1 as i, DrawerHeaderProps as l, DrawerViewportProps$1 as n, DrawerSide as o, DrawerTriggerProps$1 as r, DrawerPopupProps$1 as s, Drawer$1 as t, DrawerFooterProps as u };
@@ -0,0 +1,94 @@
1
+ import { SwitchRootProps, SwitchThumbProps } from "@base-ui/react/switch";
2
+ //#region src/switch/switch-root.d.ts
3
+ /**
4
+ * An on/off toggle for instant-effect settings (not form data — use
5
+ * `Checkbox` when the value is submitted). Renders a `<span>` with a hidden
6
+ * `<input>` beside it, so it still participates in native form submission
7
+ * and validation (`name` / `value`, submits `"on"` by default) without extra
8
+ * wiring.
9
+ *
10
+ * Works directly with headless form libraries — the hidden input carries the
11
+ * value; libraries only need the controlled pair and blur/ref:
12
+ *
13
+ * - **React Hook Form** — wrap with `Controller` and map the change handler:
14
+ *
15
+ * ```tsx
16
+ * <Controller
17
+ * control={control}
18
+ * name="notifications"
19
+ * render={({ field }) => (
20
+ * <Switch.Root
21
+ * checked={field.value}
22
+ * onCheckedChange={(checked) => field.onChange(checked)}
23
+ * onBlur={field.onBlur}
24
+ * inputRef={field.ref}
25
+ * />
26
+ * )}
27
+ * />
28
+ * ```
29
+ *
30
+ * - **TanStack Form** — drive it from `form.Field` state:
31
+ *
32
+ * ```tsx
33
+ * <form.Field name="notifications">
34
+ * {(field) => (
35
+ * <Switch.Root
36
+ * checked={field.state.value}
37
+ * onCheckedChange={(checked) => field.handleChange(checked)}
38
+ * onBlur={field.handleBlur}
39
+ * />
40
+ * )}
41
+ * </form.Field>
42
+ * ```
43
+ *
44
+ * - **Formisch** / uncontrolled forms — just pass `name`; the hidden input
45
+ * submits `value` (default `"on"`) when on, like a native checkbox.
46
+ *
47
+ * Validation styling (`data-invalid`, `data-valid`, ...) activates when the
48
+ * switch is wrapped in Base UI's `Field.Root`. Label it with an enclosing
49
+ * `<label>`.
50
+ */
51
+ interface SwitchProps extends SwitchRootProps {}
52
+ declare function SwitchRoot({ className, children, ...props }: SwitchProps): import("react").JSX.Element;
53
+ //#endregion
54
+ //#region src/switch/switch-thumb.d.ts
55
+ /**
56
+ * The knob that slides along the track. Renders a `<span>`. Place exactly one
57
+ * inside a `Switch.Root` — the track animates its position via
58
+ * `data-checked` (`translate`), tinted from theme tokens so no color props
59
+ * are needed.
60
+ */
61
+ interface SwitchThumbProps$1 extends SwitchThumbProps {}
62
+ declare function SwitchThumb({ className, ...props }: SwitchThumbProps$1): import("react").JSX.Element;
63
+ //#endregion
64
+ //#region src/switch/index.d.ts
65
+ /**
66
+ * Compound component for an on/off setting.
67
+ *
68
+ * Assemble the parts as properties of the object:
69
+ *
70
+ * ```tsx
71
+ * import { Switch } from '@vikram-hegde/skeletal'
72
+ *
73
+ * <label>
74
+ * <Switch.Root defaultChecked name="notifications" />
75
+ * Notifications
76
+ * </label>
77
+ * ```
78
+ *
79
+ * Use a switch for instant-effect settings that don't wait on form
80
+ * submission ("Dark mode", "Mute"); use `Checkbox` when the value is part of
81
+ * submitted form data or represents membership in a list. See the Root docs
82
+ * for react-hook-form / TanStack Form wiring — the hidden native input keeps
83
+ * those integrations working.
84
+ *
85
+ * All parts are thin styled wrappers over Base UI's `Switch`, so every Base
86
+ * UI prop, `render` override, and ref behaves the same. Part prop types are
87
+ * exported separately (`SwitchProps`, ...).
88
+ */
89
+ declare const Switch$1: {
90
+ Root: typeof SwitchRoot;
91
+ Thumb: typeof SwitchThumb;
92
+ };
93
+ //#endregion
94
+ export { SwitchThumbProps$1 as n, SwitchProps as r, Switch$1 as t };
@@ -0,0 +1,261 @@
1
+ import { r as DialogBackdrop, t as DialogViewport } from "./dialog-viewport-CaMWJrCJ.js";
2
+ import { t as DialogPortal } from "./dialog-portal-BF89FBeX.js";
3
+ import { DialogPopupProps, DialogRootChangeEventDetails, DialogRootProps } from "@base-ui/react/dialog";
4
+ import { HTMLAttributes, ReactNode } from "react";
5
+ import { AutocompleteEmptyProps, AutocompleteGroupLabelProps, AutocompleteGroupProps, AutocompleteInputGroupProps, AutocompleteInputProps, AutocompleteItemProps, AutocompleteListProps, AutocompleteRootChangeEventDetails, AutocompleteRootProps } from "@base-ui/react/autocomplete";
6
+ //#region src/command-palette/command-palette-content.d.ts
7
+ /**
8
+ * The palette card: a compact, flush container holding the input and the
9
+ * command list. Renders a `<div>` element with the dialog popup role.
10
+ *
11
+ * Styled with the `command__content` BEM class — no inner padding; the input
12
+ * group and list define their own rhythm.
13
+ *
14
+ * Responsive: below `48rem` the palette renders as a full-width bottom sheet
15
+ * with rounded top corners, pinned to the bottom edge and sliding up on open.
16
+ */
17
+ interface CommandPaletteContentProps extends DialogPopupProps {}
18
+ declare function CommandPaletteContent({ className, ...props }: CommandPaletteContentProps): import("react").JSX.Element;
19
+ //#endregion
20
+ //#region src/command-palette/command-palette-empty.d.ts
21
+ /**
22
+ * Rendered when the query matches no commands. Renders a `<div>` element.
23
+ */
24
+ interface CommandPaletteEmptyProps extends AutocompleteEmptyProps {}
25
+ declare function CommandPaletteEmpty({ className, ...props }: CommandPaletteEmptyProps): import("react").JSX.Element;
26
+ //#endregion
27
+ //#region src/command-palette/command-palette-footer.d.ts
28
+ /**
29
+ * A footer bar for keyboard-shortcut hints and other instruction text.
30
+ * Renders a `<div>` element.
31
+ *
32
+ * Place it as the last child of `CommandPalette.Content`, after the list (or
33
+ * the empty state), to surface affordances like navigation keys:
34
+ *
35
+ * ```tsx
36
+ * <CommandPalette.Footer>
37
+ * <kbd>↑↓</kbd> to navigate · <kbd>↵</kbd> to select
38
+ * </CommandPalette.Footer>
39
+ * ```
40
+ *
41
+ * It sits flush against the card's bottom edge with a top border and muted
42
+ * background, reading as a distinct section rather than a loose row of text.
43
+ * Content is laid out in a left-aligned, wrapping row with a small gap;
44
+ * override alignment with `className` or `style` when needed.
45
+ */
46
+ interface CommandPaletteFooterProps extends HTMLAttributes<HTMLDivElement> {}
47
+ declare function CommandPaletteFooter({ className, ...props }: CommandPaletteFooterProps): import("react").JSX.Element;
48
+ //#endregion
49
+ //#region src/command-palette/command-palette-group.d.ts
50
+ /**
51
+ * Groups related commands under an accessible label. Renders a `<div>`
52
+ * element.
53
+ *
54
+ * Pair with `<CommandPalette.GroupLabel>` inside the group; Base UI wires the
55
+ * `aria-labelledby` association automatically. Pass the group's items via the
56
+ * `items` prop so filtering and keyboard navigation can find them.
57
+ *
58
+ * ```tsx
59
+ * <CommandPalette.List>
60
+ * {(group) => (
61
+ * <CommandPalette.Group key={group.value} items={group.items}>
62
+ * <CommandPalette.GroupLabel>{group.value}</CommandPalette.GroupLabel>
63
+ * {group.items.map((command) => (
64
+ * <CommandPalette.Item key={command.id} value={command.label}>
65
+ * {command.label}
66
+ * </CommandPalette.Item>
67
+ * ))}
68
+ * </CommandPalette.Group>
69
+ * )}
70
+ * </CommandPalette.List>
71
+ * ```
72
+ *
73
+ * Rendered with `display: contents` so its items participate directly in the
74
+ * scroll list.
75
+ */
76
+ interface CommandPaletteGroupProps extends AutocompleteGroupProps {}
77
+ declare function CommandPaletteGroup({ className, ...props }: CommandPaletteGroupProps): import("react").JSX.Element;
78
+ //#endregion
79
+ //#region src/command-palette/command-palette-group-label.d.ts
80
+ /**
81
+ * A label for a `<CommandPalette.Group>`, automatically associated with it for
82
+ * screen readers. Renders a `<div>` element.
83
+ *
84
+ * Styled small, muted and uppercase; add a `<CommandPalette.Group>` before the
85
+ * group to visually divide it from the commands above.
86
+ */
87
+ interface CommandPaletteGroupLabelProps extends AutocompleteGroupLabelProps {}
88
+ declare function CommandPaletteGroupLabel({ className, ...props }: CommandPaletteGroupLabelProps): import("react").JSX.Element;
89
+ //#endregion
90
+ //#region src/command-palette/command-palette-input.d.ts
91
+ /**
92
+ * The search input that filters the commands as you type. Renders an `<input>`
93
+ * element. Borderless and transparent — the surrounding `InputGroup` provides
94
+ * the chrome.
95
+ */
96
+ interface CommandPaletteInputProps extends AutocompleteInputProps {}
97
+ declare function CommandPaletteInput({ className, ...props }: CommandPaletteInputProps): import("react").JSX.Element;
98
+ //#endregion
99
+ //#region src/command-palette/command-palette-input-group.d.ts
100
+ /**
101
+ * A row containing the search icon and the query input, separated from the
102
+ * list by a bottom border. Renders a `<div>` element.
103
+ *
104
+ * The icon and input are composed in a `Cluster` layout primitive
105
+ * (`space="0.625rem"`, `align="center"`).
106
+ */
107
+ interface CommandPaletteInputGroupProps extends AutocompleteInputGroupProps {}
108
+ declare function CommandPaletteInputGroup({ className, children, ...props }: CommandPaletteInputGroupProps): import("react").JSX.Element;
109
+ //#endregion
110
+ //#region src/command-palette/command-palette-item.d.ts
111
+ /**
112
+ * A single command row. Renders a `<div>` element with the option role.
113
+ *
114
+ * Runs whatever you pass to `onClick` when activated (click or Enter on the
115
+ * highlighted item). Pass `hint` for a muted, right-aligned shortcut or group
116
+ * label.
117
+ */
118
+ interface CommandPaletteItemProps extends AutocompleteItemProps {
119
+ /**
120
+ * A muted hint shown on the right side of the row (e.g. a keyboard shortcut
121
+ * or the command's group).
122
+ */
123
+ hint?: ReactNode;
124
+ }
125
+ declare function CommandPaletteItem({ className, hint, children, ...props }: CommandPaletteItemProps): import("react").JSX.Element;
126
+ //#endregion
127
+ //#region src/command-palette/command-palette-list.d.ts
128
+ /**
129
+ * The scrollable list of filtered commands. Renders a `<div>` element with the
130
+ * listbox role.
131
+ *
132
+ * The children can be a render function that receives each filtered item:
133
+ *
134
+ * ```tsx
135
+ * <CommandPalette.List>
136
+ * {(command) => <CommandPalette.Item value={command.id}>…</CommandPalette.Item>}
137
+ * </CommandPalette.List>
138
+ * ```
139
+ */
140
+ interface CommandPaletteListProps extends AutocompleteListProps {}
141
+ declare function CommandPaletteList({ className, ...props }: CommandPaletteListProps): import("react").JSX.Element;
142
+ //#endregion
143
+ //#region src/command-palette/command-palette-root.d.ts
144
+ /**
145
+ * The open/close event details shared by the underlying Dialog and Autocomplete.
146
+ */
147
+ type CommandPaletteOpenChangeDetails = DialogRootChangeEventDetails | AutocompleteRootChangeEventDetails;
148
+ /**
149
+ * The root of the command palette, composing a modal Dialog with a
150
+ * query-filtered Autocomplete list. Renders no DOM element.
151
+ *
152
+ * Use `open` + `onOpenChange` to control the palette (e.g. a Cmd/Ctrl+K
153
+ * shortcut) and `items` to provide the commands. Items are filtered as the
154
+ * user types; highlight/selection and keyboard navigation are handled by Base
155
+ * UI's Autocomplete.
156
+ *
157
+ * ```tsx
158
+ * <CommandPalette.Root
159
+ * open={open}
160
+ * onOpenChange={setOpen}
161
+ * items={commands}
162
+ * autoHighlight="always"
163
+ * >
164
+ * <CommandPalette.Portal>
165
+ * <CommandPalette.Backdrop />
166
+ * <CommandPalette.Viewport>
167
+ * <CommandPalette.Content>
168
+ * <CommandPalette.InputGroup>
169
+ * <Icon name={MagnifyingGlass} size={16} />
170
+ * <CommandPalette.Input placeholder="Type a command…" />
171
+ * </CommandPalette.InputGroup>
172
+ * <CommandPalette.List>
173
+ * {(command) => (
174
+ * <CommandPalette.Item
175
+ * key={command.id}
176
+ * value={command.id}
177
+ * onClick={() => runCommand(command)}
178
+ * >
179
+ * {command.label}
180
+ * </CommandPalette.Item>
181
+ * )}
182
+ * </CommandPalette.List>
183
+ * <CommandPalette.Empty>No commands found.</CommandPalette.Empty>
184
+ * <CommandPalette.Footer>
185
+ * <kbd>↑↓</kbd> navigate · <kbd>↵</kbd> select
186
+ * </CommandPalette.Footer>
187
+ * </CommandPalette.Content>
188
+ * </CommandPalette.Viewport>
189
+ * </CommandPalette.Portal>
190
+ * </CommandPalette.Root>
191
+ * ```
192
+ */
193
+ interface CommandPaletteRootProps<Item> extends DialogRootProps, Pick<AutocompleteRootProps<Item>, "value" | "defaultValue" | "onValueChange" | "onItemHighlighted" | "mode" | "autoHighlight" | "keepHighlight" | "highlightItemOnHover" | "itemToStringValue" | "submitOnItemClick" | "filter"> {
194
+ /**
195
+ * The commands to filter and display.
196
+ */
197
+ items?: readonly Item[];
198
+ /**
199
+ * Event handler called when the palette opens or closes.
200
+ */
201
+ onOpenChange?: (open: boolean, eventDetails: CommandPaletteOpenChangeDetails) => void;
202
+ }
203
+ declare function CommandPaletteRoot<Item>({ open, defaultOpen, onOpenChange, onOpenChangeComplete, modal, children, items, value, defaultValue, onValueChange, onItemHighlighted, mode, autoHighlight, keepHighlight, highlightItemOnHover, itemToStringValue, submitOnItemClick, filter, ...dialogProps }: CommandPaletteRootProps<Item>): import("react").JSX.Element;
204
+ //#endregion
205
+ //#region src/command-palette/index.d.ts
206
+ /**
207
+ * Compound component for a command palette.
208
+ *
209
+ * Assemble the parts as properties of the object:
210
+ *
211
+ * ```tsx
212
+ * import { CommandPalette } from '@vikram-hegde/skeletal'
213
+ *
214
+ * <CommandPalette.Root open={open} onOpenChange={setOpen} items={commands}>
215
+ * <CommandPalette.Portal>
216
+ * <CommandPalette.Backdrop />
217
+ * <CommandPalette.Viewport>
218
+ * <CommandPalette.Content>
219
+ * <CommandPalette.InputGroup>
220
+ * <Icon name={MagnifyingGlass} size={16} />
221
+ * <CommandPalette.Input placeholder="Type a command…" />
222
+ * </CommandPalette.InputGroup>
223
+ * <CommandPalette.List>
224
+ * {(command) => (
225
+ * <CommandPalette.Item value={command.id} onClick={…}>
226
+ * {command.label}
227
+ * </CommandPalette.Item>
228
+ * )}
229
+ * </CommandPalette.List>
230
+ * <CommandPalette.Empty>No commands found.</CommandPalette.Empty>
231
+ * <CommandPalette.Footer>
232
+ * <kbd>↑↓</kbd> navigate · <kbd>↵</kbd> select
233
+ * </CommandPalette.Footer>
234
+ * </CommandPalette.Content>
235
+ * </CommandPalette.Viewport>
236
+ * </CommandPalette.Portal>
237
+ * </CommandPalette.Root>
238
+ * ```
239
+ *
240
+ * The palette is a modal Dialog composed with a query-filtered Base UI
241
+ * Autocomplete (`inline` mode): typing filters the items, arrow keys navigate,
242
+ * and Enter/click executes the highlighted command via the item's `onClick`.
243
+ * Open it with a shortcut by controlling `open`.
244
+ */
245
+ declare const CommandPalette: {
246
+ Root: typeof CommandPaletteRoot;
247
+ Portal: typeof DialogPortal;
248
+ Backdrop: typeof DialogBackdrop;
249
+ Viewport: typeof DialogViewport;
250
+ Content: typeof CommandPaletteContent;
251
+ InputGroup: typeof CommandPaletteInputGroup;
252
+ Input: typeof CommandPaletteInput;
253
+ List: typeof CommandPaletteList;
254
+ Group: typeof CommandPaletteGroup;
255
+ GroupLabel: typeof CommandPaletteGroupLabel;
256
+ Item: typeof CommandPaletteItem;
257
+ Empty: typeof CommandPaletteEmpty;
258
+ Footer: typeof CommandPaletteFooter;
259
+ };
260
+ //#endregion
261
+ export { CommandPaletteItemProps as a, CommandPaletteGroupLabelProps as c, CommandPaletteEmptyProps as d, CommandPaletteContentProps as f, CommandPaletteListProps as i, CommandPaletteGroupProps as l, CommandPaletteOpenChangeDetails as n, CommandPaletteInputGroupProps as o, CommandPaletteRootProps as r, CommandPaletteInputProps as s, CommandPalette as t, CommandPaletteFooterProps as u };