@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.
- package/README.md +35 -0
- package/dist/alert-dialog/index.d.ts +2 -0
- package/dist/alert-dialog/index.js +2 -0
- package/dist/alert-dialog-1hxVC_5N.js +71 -0
- package/dist/badge/index.d.ts +2 -0
- package/dist/badge/index.js +2 -0
- package/dist/badge-C3p1L0E7.css +53 -0
- package/dist/badge-C3p1L0E7.js +32 -0
- package/dist/button/index.d.ts +2 -0
- package/dist/button/index.js +2 -0
- package/dist/button-B48UNbaC.css +152 -0
- package/dist/button-B48UNbaC.js +46 -0
- package/dist/button-Dvd4n2U4.d.ts +56 -0
- package/dist/checkbox/index.d.ts +2 -0
- package/dist/checkbox/index.js +2 -0
- package/dist/checkbox-wh2BoiSj.css +76 -0
- package/dist/checkbox-wh2BoiSj.js +112 -0
- package/dist/cluster-BJ4m5uGN.css +9 -0
- package/dist/cluster-BJ4m5uGN.js +21 -0
- package/dist/combobox/index.d.ts +2 -0
- package/dist/combobox/index.js +2 -0
- package/dist/combobox-DWH7uSsx.css +389 -0
- package/dist/combobox-DWH7uSsx.js +327 -0
- package/dist/command-palette/index.d.ts +2 -0
- package/dist/command-palette/index.js +2 -0
- package/dist/command-palette-DF4XJ8qz.css +164 -0
- package/dist/command-palette-DF4XJ8qz.js +191 -0
- package/dist/dialog/index.d.ts +6 -0
- package/dist/dialog/index.js +2 -0
- package/dist/dialog-C4yqxII_.js +73 -0
- package/dist/dialog-footer-Br9KZP4v.js +29 -0
- package/dist/dialog-footer-bNVIVPbu.d.ts +56 -0
- package/dist/dialog-portal-B21WFYkQ.css +131 -0
- package/dist/dialog-portal-B21WFYkQ.js +26 -0
- package/dist/dialog-portal-BF89FBeX.d.ts +15 -0
- package/dist/dialog-title-DRYRIxCp.js +35 -0
- package/dist/dialog-title-jyf86Q8C.d.ts +36 -0
- package/dist/dialog-viewport-CaMWJrCJ.d.ts +42 -0
- package/dist/dialog-viewport-vpbsq7Ib.js +21 -0
- package/dist/drawer/index.d.ts +2 -0
- package/dist/drawer/index.js +2 -0
- package/dist/drawer-DQmz_uCP.css +214 -0
- package/dist/drawer-DQmz_uCP.js +180 -0
- package/dist/icon/index.d.ts +2 -0
- package/dist/icon/index.js +2 -0
- package/dist/icon-DBOdxNvH.css +6 -0
- package/dist/icon-DBOdxNvH.js +20 -0
- package/dist/index-A2QmU5r9.d.ts +37 -0
- package/dist/index-B0uNLS7z.d.ts +301 -0
- package/dist/index-B63PSP58.d.ts +94 -0
- package/dist/index-BBOkTl3h.d.ts +261 -0
- package/dist/index-BLFVnve3.d.ts +53 -0
- package/dist/index-BXPUT5u-.d.ts +72 -0
- package/dist/index-BngvATZx.d.ts +35 -0
- package/dist/index-Br2NrBW_.d.ts +444 -0
- package/dist/index-CUy-9csi.d.ts +135 -0
- package/dist/index-CbMW32E9.d.ts +82 -0
- package/dist/index-CyTcR6iv.d.ts +433 -0
- package/dist/index-CznsZ_1M.d.ts +85 -0
- package/dist/index-D-6gOciw.d.ts +350 -0
- package/dist/index-DdqDyczP.d.ts +209 -0
- package/dist/index-GOGpFujX.d.ts +144 -0
- package/dist/index-W3ozKcis.d.ts +245 -0
- package/dist/index-kpw3_4q_.d.ts +50 -0
- package/dist/index-rH7TJeJt.d.ts +334 -0
- package/dist/index-rQ7sRkqg.d.ts +122 -0
- package/dist/index.css +93 -0
- package/dist/index.d.ts +26 -0
- package/dist/index.js +26 -0
- package/dist/input/index.d.ts +2 -0
- package/dist/input/index.js +2 -0
- package/dist/input-CQ_ean8e.css +129 -0
- package/dist/input-CQ_ean8e.js +65 -0
- package/dist/layout/index.d.ts +2 -0
- package/dist/layout/index.js +4 -0
- package/dist/layout-qoyutnKU.css +181 -0
- package/dist/layout-qoyutnKU.js +169 -0
- package/dist/menu/index.d.ts +2 -0
- package/dist/menu/index.js +2 -0
- package/dist/menu-DRdGMI_-.css +236 -0
- package/dist/menu-DRdGMI_-.js +243 -0
- package/dist/merge-class-name-C4KJJGuK.js +15 -0
- package/dist/popover/index.d.ts +2 -0
- package/dist/popover/index.js +2 -0
- package/dist/popover-CenynT0Z.css +139 -0
- package/dist/popover-CenynT0Z.js +174 -0
- package/dist/radio/index.d.ts +2 -0
- package/dist/radio/index.js +2 -0
- package/dist/radio-BJrvdkga.css +80 -0
- package/dist/radio-BJrvdkga.js +75 -0
- package/dist/scroll-area/index.d.ts +2 -0
- package/dist/scroll-area/index.js +2 -0
- package/dist/scroll-area-DkORxJE9.css +175 -0
- package/dist/scroll-area-DkORxJE9.js +114 -0
- package/dist/select/index.d.ts +2 -0
- package/dist/select/index.js +2 -0
- package/dist/select-BaqBHUac.css +273 -0
- package/dist/select-BaqBHUac.js +254 -0
- package/dist/skeleton/index.d.ts +2 -0
- package/dist/skeleton/index.js +2 -0
- package/dist/skeleton-W6fwO5pf.css +88 -0
- package/dist/skeleton-W6fwO5pf.js +97 -0
- package/dist/spinner/index.d.ts +2 -0
- package/dist/spinner/index.js +2 -0
- package/dist/spinner-DB6ap8Si.css +43 -0
- package/dist/spinner-DB6ap8Si.js +27 -0
- package/dist/stack-BzFVrsmT.css +12 -0
- package/dist/stack-BzFVrsmT.js +52 -0
- package/dist/style-vars-ZSrCUzKx.js +13 -0
- package/dist/switch/index.d.ts +2 -0
- package/dist/switch/index.js +2 -0
- package/dist/switch-DizP31iF.css +76 -0
- package/dist/switch-DizP31iF.js +58 -0
- package/dist/tooltip/index.d.ts +2 -0
- package/dist/tooltip/index.js +2 -0
- package/dist/tooltip-CQk2WjUS.css +92 -0
- package/dist/tooltip-CQk2WjUS.js +138 -0
- package/package.json +68 -0
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { CheckboxGroupProps } from "@base-ui/react/checkbox-group";
|
|
2
|
+
import { CheckboxIndicatorProps, CheckboxRootProps } from "@base-ui/react/checkbox";
|
|
3
|
+
//#region src/checkbox/checkbox-group.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Shared state for a series of checkboxes. Renders a `<div>` laid out as a
|
|
6
|
+
* vertical stack.
|
|
7
|
+
*
|
|
8
|
+
* Place `Checkbox.Root` items inside; each child submits under its own
|
|
9
|
+
* `name` / `value`. For form libraries, treat the group as one array-valued
|
|
10
|
+
* field — e.g. with React Hook Form's `Controller`, keep the group controlled
|
|
11
|
+
* and map `onValueChange` to `field.onChange`:
|
|
12
|
+
*
|
|
13
|
+
* ```tsx
|
|
14
|
+
* <Controller
|
|
15
|
+
* control={control}
|
|
16
|
+
* name="protocols"
|
|
17
|
+
* render={({ field }) => (
|
|
18
|
+
* <Checkbox.Group value={field.value} onValueChange={field.onChange} onBlur={field.onBlur}>
|
|
19
|
+
* <label><Checkbox.Root value="http" /> HTTP</label>
|
|
20
|
+
* <label><Checkbox.Root value="https" /> HTTPS</label>
|
|
21
|
+
* </Checkbox.Group>
|
|
22
|
+
* )}
|
|
23
|
+
* />
|
|
24
|
+
* ```
|
|
25
|
+
*
|
|
26
|
+
* TanStack Form works the same way via `form.Field` (`field.state.value`,
|
|
27
|
+
* `field.handleChange`). For a "select all" parent checkbox, pass `allValues`
|
|
28
|
+
* (every child value) and add the `parent` prop on that checkbox — the group
|
|
29
|
+
* then drives its indeterminate state automatically.
|
|
30
|
+
*
|
|
31
|
+
* Label the group accessibly with `aria-labelledby` or by wrapping in Base
|
|
32
|
+
* UI's `Fieldset.Root`.
|
|
33
|
+
*/
|
|
34
|
+
interface CheckboxGroupProps$1 extends CheckboxGroupProps {}
|
|
35
|
+
declare function CheckboxGroup$1({ className, ...props }: CheckboxGroupProps$1): import("react").JSX.Element;
|
|
36
|
+
//#endregion
|
|
37
|
+
//#region src/checkbox/checkbox-indicator.d.ts
|
|
38
|
+
/**
|
|
39
|
+
* The tick mark shown when the checkbox is checked. Renders a `<span>`.
|
|
40
|
+
*
|
|
41
|
+
* By default it draws a check icon, swapped for a dash when the parent
|
|
42
|
+
* `Checkbox.Root` is `indeterminate` (e.g. a "select all" parent). Both are
|
|
43
|
+
* tinted with the root's foreground color, so no color props are needed.
|
|
44
|
+
*
|
|
45
|
+
* Pass your own `children` or `render` to draw something else; they replace
|
|
46
|
+
* the default icons entirely. Unmounts while unchecked unless `keepMounted`
|
|
47
|
+
* is set. Animates in/out via `data-starting-style` / `data-ending-style`.
|
|
48
|
+
*
|
|
49
|
+
* @default keepMounted = false
|
|
50
|
+
*/
|
|
51
|
+
interface CheckboxIndicatorProps$1 extends CheckboxIndicatorProps {}
|
|
52
|
+
declare function CheckboxIndicator({ className, render, children, ...props }: CheckboxIndicatorProps$1): import("react").JSX.Element;
|
|
53
|
+
//#endregion
|
|
54
|
+
//#region src/checkbox/checkbox-root.d.ts
|
|
55
|
+
/**
|
|
56
|
+
* A single checkbox control. Renders a `<span>` with a hidden `<input>`
|
|
57
|
+
* beside it, so it participates in native form submission and validation
|
|
58
|
+
* (`required`, `name` / `value`) without any extra wiring.
|
|
59
|
+
*
|
|
60
|
+
* Works directly with headless form libraries — the hidden input carries
|
|
61
|
+
* `name` and submits `value` when ticked:
|
|
62
|
+
*
|
|
63
|
+
* - **React Hook Form** — wrap with `Controller` and map the change handler:
|
|
64
|
+
*
|
|
65
|
+
* ```tsx
|
|
66
|
+
* <Controller
|
|
67
|
+
* control={control}
|
|
68
|
+
* name="terms"
|
|
69
|
+
* render={({ field }) => (
|
|
70
|
+
* <Checkbox.Root
|
|
71
|
+
* checked={field.value}
|
|
72
|
+
* onCheckedChange={(checked) => field.onChange(checked)}
|
|
73
|
+
* onBlur={field.onBlur}
|
|
74
|
+
* inputRef={field.ref}
|
|
75
|
+
* />
|
|
76
|
+
* )}
|
|
77
|
+
* />
|
|
78
|
+
* ```
|
|
79
|
+
*
|
|
80
|
+
* - **TanStack Form** — drive it from `form.Field` state:
|
|
81
|
+
*
|
|
82
|
+
* ```tsx
|
|
83
|
+
* <form.Field name="terms">
|
|
84
|
+
* {(field) => (
|
|
85
|
+
* <Checkbox.Root
|
|
86
|
+
* checked={field.state.value}
|
|
87
|
+
* onCheckedChange={(checked) => field.handleChange(checked)}
|
|
88
|
+
* onBlur={field.handleBlur}
|
|
89
|
+
* />
|
|
90
|
+
* )}
|
|
91
|
+
* </form.Field>
|
|
92
|
+
* ```
|
|
93
|
+
*
|
|
94
|
+
* - **Formisch** / uncontrolled forms — just pass `name`; the hidden input
|
|
95
|
+
* submits `value` (or `"on"`) when checked, exactly like a native checkbox.
|
|
96
|
+
*
|
|
97
|
+
* Validation styling (`data-invalid`, `data-valid`, ...) activates when the
|
|
98
|
+
* checkbox is wrapped in Base UI's `Field.Root`.
|
|
99
|
+
*/
|
|
100
|
+
interface CheckboxProps extends CheckboxRootProps {}
|
|
101
|
+
declare function CheckboxRoot({ className, children, ...props }: CheckboxProps): import("react").JSX.Element;
|
|
102
|
+
//#endregion
|
|
103
|
+
//#region src/checkbox/index.d.ts
|
|
104
|
+
/**
|
|
105
|
+
* Compound component for ticking one or many independent options.
|
|
106
|
+
*
|
|
107
|
+
* Assemble the parts as properties of the object:
|
|
108
|
+
*
|
|
109
|
+
* ```tsx
|
|
110
|
+
* import { Checkbox } from '@vikram-hegde/skeletal'
|
|
111
|
+
*
|
|
112
|
+
* <label>
|
|
113
|
+
* <Checkbox.Root defaultChecked name="terms" required />
|
|
114
|
+
* Accept terms and conditions
|
|
115
|
+
* </label>
|
|
116
|
+
* ```
|
|
117
|
+
*
|
|
118
|
+
* Wrap several checkboxes in `Checkbox.Group` to manage them as one
|
|
119
|
+
* array-valued field (see the Group docs for react-hook-form / TanStack Form
|
|
120
|
+
* wiring), and add a parent checkbox with the `parent` prop + `allValues` on
|
|
121
|
+
* the group for "select all" behavior.
|
|
122
|
+
*
|
|
123
|
+
* All parts are thin styled wrappers over Base UI's `Checkbox`, so every Base
|
|
124
|
+
* UI prop, `render` override, and ref behaves the same. The hidden native
|
|
125
|
+
* input keeps native form submission and library integrations working. Part
|
|
126
|
+
* prop types are exported separately (`CheckboxProps`,
|
|
127
|
+
* `CheckboxGroupProps`, ...).
|
|
128
|
+
*/
|
|
129
|
+
declare const Checkbox$1: {
|
|
130
|
+
Root: typeof CheckboxRoot;
|
|
131
|
+
Group: typeof CheckboxGroup$1;
|
|
132
|
+
Indicator: typeof CheckboxIndicator;
|
|
133
|
+
};
|
|
134
|
+
//#endregion
|
|
135
|
+
export { CheckboxGroupProps$1 as i, CheckboxProps as n, CheckboxIndicatorProps$1 as r, Checkbox$1 as t };
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { r as DialogBackdrop, t as DialogViewport } from "./dialog-viewport-CaMWJrCJ.js";
|
|
2
|
+
import { n as ButtonProps } from "./button-Dvd4n2U4.js";
|
|
3
|
+
import { a as DialogClose, r as DialogDescription, t as DialogTitle } from "./dialog-title-jyf86Q8C.js";
|
|
4
|
+
import { r as DialogContent, t as DialogFooter } from "./dialog-footer-bNVIVPbu.js";
|
|
5
|
+
import { t as DialogPortal } from "./dialog-portal-BF89FBeX.js";
|
|
6
|
+
import { AlertDialogRootProps, AlertDialogTriggerProps } from "@base-ui/react/alert-dialog";
|
|
7
|
+
//#region src/alert-dialog/alert-dialog-root.d.ts
|
|
8
|
+
/**
|
|
9
|
+
* The root of the alert dialog, grouping all parts together. Renders no DOM
|
|
10
|
+
* element.
|
|
11
|
+
*
|
|
12
|
+
* Semantically an alert dialog (`role="alertdialog"`) — always modal with
|
|
13
|
+
* focus trapped, and it cannot be dismissed by clicking outside. Note that
|
|
14
|
+
* pressing Esc still closes it (Base UI behavior). Use it for interruptions
|
|
15
|
+
* that require a decision.
|
|
16
|
+
*
|
|
17
|
+
* All Base UI root props are supported: `open`, `defaultOpen`,
|
|
18
|
+
* `onOpenChange`, `onOpenChangeComplete`, `actionsRef`, `handle`, and
|
|
19
|
+
* `triggerId`.
|
|
20
|
+
*/
|
|
21
|
+
interface AlertDialogProps<Payload = unknown> extends AlertDialogRootProps<Payload> {}
|
|
22
|
+
declare function AlertDialogRoot<Payload>(props: AlertDialogProps<Payload>): import("react").JSX.Element;
|
|
23
|
+
//#endregion
|
|
24
|
+
//#region src/alert-dialog/alert-dialog-trigger.d.ts
|
|
25
|
+
/**
|
|
26
|
+
* A button that opens the alert dialog. Renders a `<button>` element.
|
|
27
|
+
*
|
|
28
|
+
* Composed from the `Button` component via Base UI's `render` prop, so it
|
|
29
|
+
* accepts all `Button` props (`variant`, `size`, `fullWidth`, `disabled`, ...)
|
|
30
|
+
* plus the alert-dialog-trigger props from Base UI (`payload`, `handle`, `id`).
|
|
31
|
+
* Defaults to the `primary` variant; for destructive triggers (e.g. "Delete"),
|
|
32
|
+
* pass `variant="destructive"`.
|
|
33
|
+
*/
|
|
34
|
+
interface AlertDialogTriggerProps$1<Payload = unknown> extends ButtonProps, Omit<AlertDialogTriggerProps<Payload>, "className" | "style" | "render" | "nativeButton"> {}
|
|
35
|
+
declare function AlertDialogTrigger<Payload>({ className, variant, size, fullWidth, ...props }: AlertDialogTriggerProps$1<Payload>): import("react").JSX.Element;
|
|
36
|
+
//#endregion
|
|
37
|
+
//#region src/alert-dialog/index.d.ts
|
|
38
|
+
/**
|
|
39
|
+
* Compound component for alert dialogs.
|
|
40
|
+
*
|
|
41
|
+
* Assemble the parts as properties of the object:
|
|
42
|
+
*
|
|
43
|
+
* ```tsx
|
|
44
|
+
* import { AlertDialog } from '@vikram-hegde/skeletal'
|
|
45
|
+
*
|
|
46
|
+
* <AlertDialog.Root>
|
|
47
|
+
* <AlertDialog.Trigger>Delete</AlertDialog.Trigger>
|
|
48
|
+
* <AlertDialog.Portal>
|
|
49
|
+
* <AlertDialog.Backdrop />
|
|
50
|
+
* <AlertDialog.Viewport>
|
|
51
|
+
* <AlertDialog.Content size="sm">
|
|
52
|
+
* <AlertDialog.Title>Delete project?</AlertDialog.Title>
|
|
53
|
+
* <AlertDialog.Description>This cannot be undone.</AlertDialog.Description>
|
|
54
|
+
* <AlertDialog.Footer>
|
|
55
|
+
* <AlertDialog.Close>Cancel</AlertDialog.Close>
|
|
56
|
+
* <AlertDialog.Close variant="destructive">Delete</AlertDialog.Close>
|
|
57
|
+
* </AlertDialog.Footer>
|
|
58
|
+
* </AlertDialog.Content>
|
|
59
|
+
* </AlertDialog.Viewport>
|
|
60
|
+
* </AlertDialog.Portal>
|
|
61
|
+
* </AlertDialog.Root>
|
|
62
|
+
* ```
|
|
63
|
+
*
|
|
64
|
+
* An alert dialog is a dialog at heart, so `Portal`, `Backdrop`, `Content`,
|
|
65
|
+
* `Title`, `Description`, `Footer`, `Close`, and `Viewport` are the same styled
|
|
66
|
+
* parts as `Dialog`'s (their prop types live under `Dialog*Props`). Only `Root`
|
|
67
|
+
* and `Trigger` are alert-dialog specific.
|
|
68
|
+
*/
|
|
69
|
+
declare const AlertDialog$1: {
|
|
70
|
+
Root: typeof AlertDialogRoot;
|
|
71
|
+
Trigger: typeof AlertDialogTrigger;
|
|
72
|
+
Portal: typeof DialogPortal;
|
|
73
|
+
Backdrop: typeof DialogBackdrop;
|
|
74
|
+
Content: typeof DialogContent;
|
|
75
|
+
Title: typeof DialogTitle;
|
|
76
|
+
Description: typeof DialogDescription;
|
|
77
|
+
Footer: typeof DialogFooter;
|
|
78
|
+
Close: typeof DialogClose;
|
|
79
|
+
Viewport: typeof DialogViewport;
|
|
80
|
+
};
|
|
81
|
+
//#endregion
|
|
82
|
+
export { AlertDialogTriggerProps$1 as n, AlertDialogProps as r, AlertDialog$1 as t };
|
|
@@ -0,0 +1,433 @@
|
|
|
1
|
+
import { ElementType, HTMLAttributes, ReactElement } from "react";
|
|
2
|
+
//#region src/layout/layout-props.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* Props shared by every layout primitive: an optional element override and all
|
|
5
|
+
* standard HTML attributes (`className`, `style`, `id`, `aria-*`, ...).
|
|
6
|
+
*/
|
|
7
|
+
interface LayoutPrimitiveProps extends HTMLAttributes<HTMLDivElement> {
|
|
8
|
+
/**
|
|
9
|
+
* The element to render. Useful for semantics (e.g. a `Stack` of steps as an
|
|
10
|
+
* `<ol>`).
|
|
11
|
+
*
|
|
12
|
+
* @default 'div'
|
|
13
|
+
*/
|
|
14
|
+
as?: ElementType;
|
|
15
|
+
}
|
|
16
|
+
//#endregion
|
|
17
|
+
//#region src/layout/box.d.ts
|
|
18
|
+
/**
|
|
19
|
+
* The padded container primitive: gives its content consistent padding and an
|
|
20
|
+
* optional border/background/color.
|
|
21
|
+
*
|
|
22
|
+
* Use for cards, panels, and any bounded surface. `invert` swaps the surface
|
|
23
|
+
* to the foreground color with background text — handy for emphasis bars.
|
|
24
|
+
*/
|
|
25
|
+
interface BoxProps extends LayoutPrimitiveProps {
|
|
26
|
+
/**
|
|
27
|
+
* Padding inside the box.
|
|
28
|
+
*
|
|
29
|
+
* @default '1.5rem'
|
|
30
|
+
*/
|
|
31
|
+
padding?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Border shorthand (width style color).
|
|
34
|
+
*
|
|
35
|
+
* @default 'none'
|
|
36
|
+
*/
|
|
37
|
+
border?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Background color.
|
|
40
|
+
*
|
|
41
|
+
* @default 'transparent'
|
|
42
|
+
*/
|
|
43
|
+
background?: string;
|
|
44
|
+
/**
|
|
45
|
+
* Text color.
|
|
46
|
+
*
|
|
47
|
+
* @default 'inherit'
|
|
48
|
+
*/
|
|
49
|
+
color?: string;
|
|
50
|
+
/**
|
|
51
|
+
* Swap the box's background and foreground tokens.
|
|
52
|
+
*
|
|
53
|
+
* Text becomes the background token, with slightly reduced padding.
|
|
54
|
+
*
|
|
55
|
+
* @default false
|
|
56
|
+
*/
|
|
57
|
+
invert?: boolean;
|
|
58
|
+
}
|
|
59
|
+
declare function Box({ as, padding, border, background, color, invert, className, style, children, ...props }: BoxProps): import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
60
|
+
//#endregion
|
|
61
|
+
//#region src/layout/center.d.ts
|
|
62
|
+
/**
|
|
63
|
+
* The centering primitive: constrains content to a readable measure and centers
|
|
64
|
+
* it horizontally.
|
|
65
|
+
*
|
|
66
|
+
* Use for prose, forms, and any content that benefits from a bounded line
|
|
67
|
+
* length. `intrinsic` centers content that is narrower than the measure
|
|
68
|
+
* without stretching it; `centerText` centers the text within.
|
|
69
|
+
*/
|
|
70
|
+
interface CenterProps extends LayoutPrimitiveProps {
|
|
71
|
+
/**
|
|
72
|
+
* The maximum content width (the measure).
|
|
73
|
+
*
|
|
74
|
+
* @default '60ch'
|
|
75
|
+
*/
|
|
76
|
+
max?: string;
|
|
77
|
+
/**
|
|
78
|
+
* Horizontal gutters applied as padding on each side.
|
|
79
|
+
*
|
|
80
|
+
* @default '1rem'
|
|
81
|
+
*/
|
|
82
|
+
gutters?: string;
|
|
83
|
+
/**
|
|
84
|
+
* Center narrower content instead of stretching it to the full width.
|
|
85
|
+
*
|
|
86
|
+
* @default false
|
|
87
|
+
*/
|
|
88
|
+
intrinsic?: boolean;
|
|
89
|
+
/**
|
|
90
|
+
* Center the text of the content.
|
|
91
|
+
*
|
|
92
|
+
* @default false
|
|
93
|
+
*/
|
|
94
|
+
centerText?: boolean;
|
|
95
|
+
}
|
|
96
|
+
declare function Center({ as, max, gutters, intrinsic, centerText, className, style, children, ...props }: CenterProps): import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
97
|
+
//#endregion
|
|
98
|
+
//#region src/layout/cluster.d.ts
|
|
99
|
+
/**
|
|
100
|
+
* The group-by-row primitive: lays its children out horizontally and wraps
|
|
101
|
+
* them onto new rows when they run out of space, with a consistent gap.
|
|
102
|
+
*
|
|
103
|
+
* The natural choice for button/toolbar rows, tag groups, and any "chips"
|
|
104
|
+
* layout. `justify` controls the horizontal placement of the whole group and
|
|
105
|
+
* `align` the vertical alignment of items within a row.
|
|
106
|
+
*/
|
|
107
|
+
interface ClusterProps extends LayoutPrimitiveProps {
|
|
108
|
+
/**
|
|
109
|
+
* Gap between items (both axes).
|
|
110
|
+
*
|
|
111
|
+
* @default '1rem'
|
|
112
|
+
*/
|
|
113
|
+
space?: string;
|
|
114
|
+
/**
|
|
115
|
+
* Horizontal placement of the group within the container.
|
|
116
|
+
*
|
|
117
|
+
* @default 'flex-start'
|
|
118
|
+
*/
|
|
119
|
+
justify?: string;
|
|
120
|
+
/**
|
|
121
|
+
* Vertical alignment of items within a row.
|
|
122
|
+
*
|
|
123
|
+
* @default 'center'
|
|
124
|
+
*/
|
|
125
|
+
align?: string;
|
|
126
|
+
}
|
|
127
|
+
declare function Cluster({ as, space, justify, align, className, style, children, ...props }: ClusterProps): import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
128
|
+
//#endregion
|
|
129
|
+
//#region src/layout/container.d.ts
|
|
130
|
+
/**
|
|
131
|
+
* The page-width primitive: constrains content to a maximum width and centers
|
|
132
|
+
* it with horizontal gutters. The standard wrapper for page-level content.
|
|
133
|
+
*/
|
|
134
|
+
interface ContainerProps extends LayoutPrimitiveProps {
|
|
135
|
+
/**
|
|
136
|
+
* The maximum width of the container.
|
|
137
|
+
*
|
|
138
|
+
* @default '60rem'
|
|
139
|
+
*/
|
|
140
|
+
max?: string;
|
|
141
|
+
/**
|
|
142
|
+
* Horizontal gutters applied as padding on each side.
|
|
143
|
+
*
|
|
144
|
+
* @default '1rem'
|
|
145
|
+
*/
|
|
146
|
+
padding?: string;
|
|
147
|
+
}
|
|
148
|
+
declare function Container({ as, max, padding, className, style, children, ...props }: ContainerProps): import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
149
|
+
//#endregion
|
|
150
|
+
//#region src/layout/cover.d.ts
|
|
151
|
+
/**
|
|
152
|
+
* The vertical-centering primitive: fills a minimum height and centers one
|
|
153
|
+
* child vertically while pinning the first and last children to the top and
|
|
154
|
+
* bottom edges.
|
|
155
|
+
*
|
|
156
|
+
* The classic full-viewport hero. Mark the child you want centered with
|
|
157
|
+
* `data-cover-center`:
|
|
158
|
+
*
|
|
159
|
+
* ```tsx
|
|
160
|
+
* <Cover minHeight="70svh">
|
|
161
|
+
* <header />
|
|
162
|
+
* <main data-cover-center>Centered</main>
|
|
163
|
+
* <footer />
|
|
164
|
+
* </Cover>
|
|
165
|
+
* ```
|
|
166
|
+
*/
|
|
167
|
+
interface CoverProps extends LayoutPrimitiveProps {
|
|
168
|
+
/**
|
|
169
|
+
* The minimum height of the cover.
|
|
170
|
+
*
|
|
171
|
+
* @default '100svh'
|
|
172
|
+
*/
|
|
173
|
+
minHeight?: string;
|
|
174
|
+
/**
|
|
175
|
+
* Space between the cover children (also used as the cover's padding).
|
|
176
|
+
*
|
|
177
|
+
* @default '1rem'
|
|
178
|
+
*/
|
|
179
|
+
space?: string;
|
|
180
|
+
}
|
|
181
|
+
declare function Cover({ as, minHeight, space, className, style, children, ...props }: CoverProps): import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
182
|
+
//#endregion
|
|
183
|
+
//#region src/layout/frame.d.ts
|
|
184
|
+
/**
|
|
185
|
+
* The aspect-ratio primitive: constrains its content to a fixed ratio. Media
|
|
186
|
+
* (`img`, `video`, `iframe`) fills and crops to cover the frame; any other
|
|
187
|
+
* content is centered and scrolls if it doesn't fit.
|
|
188
|
+
*
|
|
189
|
+
* Use for media thumbnails, video embeds, and images that must keep a ratio.
|
|
190
|
+
*/
|
|
191
|
+
interface FrameProps extends LayoutPrimitiveProps {
|
|
192
|
+
/**
|
|
193
|
+
* The aspect ratio, e.g. `'16 / 9'`, `'1 / 1'`, or a decimal.
|
|
194
|
+
*
|
|
195
|
+
* @default '16 / 9'
|
|
196
|
+
*/
|
|
197
|
+
ratio?: string;
|
|
198
|
+
}
|
|
199
|
+
declare function Frame({ as, ratio, className, style, children, ...props }: FrameProps): import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
200
|
+
//#endregion
|
|
201
|
+
//#region src/layout/grid.d.ts
|
|
202
|
+
/**
|
|
203
|
+
* The intrinsic grid primitive: auto-fills as many columns as fit, each at
|
|
204
|
+
* least `min` wide, and wraps onto new rows. No breakpoints required — the
|
|
205
|
+
* column count derives from the available space.
|
|
206
|
+
*
|
|
207
|
+
* Use for card galleries, product lists, and any collection of equal items.
|
|
208
|
+
*/
|
|
209
|
+
interface GridProps extends LayoutPrimitiveProps {
|
|
210
|
+
/**
|
|
211
|
+
* The smallest a column is allowed to be before wrapping.
|
|
212
|
+
*
|
|
213
|
+
* @default '16rem'
|
|
214
|
+
*/
|
|
215
|
+
min?: string;
|
|
216
|
+
/**
|
|
217
|
+
* Gap between cells.
|
|
218
|
+
*
|
|
219
|
+
* @default '1rem'
|
|
220
|
+
*/
|
|
221
|
+
gap?: string;
|
|
222
|
+
}
|
|
223
|
+
declare function Grid({ as, min, gap, className, style, children, ...props }: GridProps): import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
224
|
+
//#endregion
|
|
225
|
+
//#region src/layout/imposter.d.ts
|
|
226
|
+
/**
|
|
227
|
+
* The overlay primitive: positions its content centered over its nearest
|
|
228
|
+
* positioned ancestor. Use sparingly — overlays obscure content — for
|
|
229
|
+
* modals, notifications, and floating action controls.
|
|
230
|
+
*
|
|
231
|
+
* ```tsx
|
|
232
|
+
* <div style={{ position: 'relative' }}>
|
|
233
|
+
* <Imposter>Tooltip-ish</Imposter>
|
|
234
|
+
* </div>
|
|
235
|
+
* ```
|
|
236
|
+
*/
|
|
237
|
+
interface ImposterProps extends LayoutPrimitiveProps {
|
|
238
|
+
/**
|
|
239
|
+
* Position relative to the viewport instead of the parent.
|
|
240
|
+
*
|
|
241
|
+
* @default false
|
|
242
|
+
*/
|
|
243
|
+
fixed?: boolean;
|
|
244
|
+
/**
|
|
245
|
+
* Keep the imposter clear of its container's edges by applying a margin.
|
|
246
|
+
*
|
|
247
|
+
* @default false
|
|
248
|
+
*/
|
|
249
|
+
margin?: boolean;
|
|
250
|
+
/**
|
|
251
|
+
* Allow the imposter to break out of its container by this much on each side.
|
|
252
|
+
*
|
|
253
|
+
* @default '1rem'
|
|
254
|
+
*/
|
|
255
|
+
breakout?: string;
|
|
256
|
+
}
|
|
257
|
+
declare function Imposter({ as, fixed, margin, breakout, className, style, children, ...props }: ImposterProps): import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
258
|
+
//#endregion
|
|
259
|
+
//#region src/layout/reel.d.ts
|
|
260
|
+
/**
|
|
261
|
+
* The horizontal-scroll primitive: lays children out in a row that scrolls
|
|
262
|
+
* horizontally, with scroll-snap alignment.
|
|
263
|
+
*
|
|
264
|
+
* Use for horizontal strips that shouldn't wrap — carousels, table-like rows,
|
|
265
|
+
* and tab bars. Items are snap-aligned and kept at their natural width.
|
|
266
|
+
*/
|
|
267
|
+
interface ReelProps extends LayoutPrimitiveProps {
|
|
268
|
+
/**
|
|
269
|
+
* Space between items.
|
|
270
|
+
*
|
|
271
|
+
* @default '1rem'
|
|
272
|
+
*/
|
|
273
|
+
space?: string;
|
|
274
|
+
/**
|
|
275
|
+
* Hide the horizontal scrollbar (visual-only; scrolling still works).
|
|
276
|
+
*
|
|
277
|
+
* @default false
|
|
278
|
+
*/
|
|
279
|
+
noBar?: boolean;
|
|
280
|
+
}
|
|
281
|
+
declare function Reel({ as, space, noBar, className, style, children, ...props }: ReelProps): import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
282
|
+
//#endregion
|
|
283
|
+
//#region src/layout/sidebar.d.ts
|
|
284
|
+
/**
|
|
285
|
+
* The media-object primitive: two children sit side by side — a fixed-width
|
|
286
|
+
* (or content-width) sidebar and a main element taking the rest of the space.
|
|
287
|
+
* When the container gets too narrow, they wrap to a stacked (vertical)
|
|
288
|
+
* configuration. No breakpoints required.
|
|
289
|
+
*
|
|
290
|
+
* Use for media + text, inputs + buttons, label + control rows. The sidebar is
|
|
291
|
+
* the FIRST child by default; pass `side="right"` to make the LAST child the
|
|
292
|
+
* sidebar.
|
|
293
|
+
*
|
|
294
|
+
* ```tsx
|
|
295
|
+
* <Sidebar sideWidth="12rem" space="1.5rem">
|
|
296
|
+
* <img src="..." alt="" />
|
|
297
|
+
* <p>Description</p>
|
|
298
|
+
* </Sidebar>
|
|
299
|
+
* ```
|
|
300
|
+
*/
|
|
301
|
+
interface SidebarProps extends LayoutPrimitiveProps {
|
|
302
|
+
/**
|
|
303
|
+
* Which child is the sidebar.
|
|
304
|
+
*
|
|
305
|
+
* @default 'left'
|
|
306
|
+
*/
|
|
307
|
+
side?: "left" | "right";
|
|
308
|
+
/**
|
|
309
|
+
* Width of the sidebar in the horizontal configuration.
|
|
310
|
+
*
|
|
311
|
+
* When unset, the sidebar is sized by its content.
|
|
312
|
+
*
|
|
313
|
+
* @default 'content'
|
|
314
|
+
*/
|
|
315
|
+
sideWidth?: string;
|
|
316
|
+
/**
|
|
317
|
+
* The narrowest the main element can be before the two children wrap.
|
|
318
|
+
*
|
|
319
|
+
* Should be a percentage.
|
|
320
|
+
*
|
|
321
|
+
* @default '50%'
|
|
322
|
+
*/
|
|
323
|
+
contentMin?: string;
|
|
324
|
+
/**
|
|
325
|
+
* Space between the sidebar and the main element.
|
|
326
|
+
*
|
|
327
|
+
* @default '1rem'
|
|
328
|
+
*/
|
|
329
|
+
space?: string;
|
|
330
|
+
/**
|
|
331
|
+
* Let each child adopt its natural height instead of stretching to match.
|
|
332
|
+
*
|
|
333
|
+
* @default false
|
|
334
|
+
*/
|
|
335
|
+
noStretch?: boolean;
|
|
336
|
+
}
|
|
337
|
+
declare function Sidebar({ as, side, sideWidth, contentMin, space, noStretch, className, style, children, ...props }: SidebarProps): import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
338
|
+
//#endregion
|
|
339
|
+
//#region src/layout/stack.d.ts
|
|
340
|
+
/**
|
|
341
|
+
* The vertical rhythm primitive: stacks its direct children with a consistent
|
|
342
|
+
* space between them.
|
|
343
|
+
*
|
|
344
|
+
* The recommended default for vertical composition. Combine with `space` to
|
|
345
|
+
* tune the rhythm and `splitAfter` to push a trailing group to the bottom
|
|
346
|
+
* (e.g. a card with footer actions pinned to its base).
|
|
347
|
+
*
|
|
348
|
+
* ```tsx
|
|
349
|
+
* <Stack space="1.5rem">
|
|
350
|
+
* <header />
|
|
351
|
+
* <main />
|
|
352
|
+
* <footer />
|
|
353
|
+
* </Stack>
|
|
354
|
+
* ```
|
|
355
|
+
*/
|
|
356
|
+
interface StackProps extends LayoutPrimitiveProps {
|
|
357
|
+
/**
|
|
358
|
+
* Space between stacked items.
|
|
359
|
+
*
|
|
360
|
+
* @default '1.5rem'
|
|
361
|
+
*/
|
|
362
|
+
space?: string;
|
|
363
|
+
/**
|
|
364
|
+
* Apply the space between items at every nesting level.
|
|
365
|
+
*
|
|
366
|
+
* By default the space applies to direct children only.
|
|
367
|
+
*
|
|
368
|
+
* @default false
|
|
369
|
+
*/
|
|
370
|
+
recursive?: boolean;
|
|
371
|
+
/**
|
|
372
|
+
* Index (1-based) of the direct child at which the stack splits.
|
|
373
|
+
*
|
|
374
|
+
* That child and everything after it are pushed to the bottom via
|
|
375
|
+
* `margin-block-start: auto`. The child is cloned and restyled inline, so it
|
|
376
|
+
* must accept a `style` prop.
|
|
377
|
+
*
|
|
378
|
+
* @default undefined
|
|
379
|
+
*/
|
|
380
|
+
splitAfter?: number;
|
|
381
|
+
/**
|
|
382
|
+
* Stretch the stack to fill its parent's height (`height: 100%`).
|
|
383
|
+
*
|
|
384
|
+
* Opt in explicitly — the stack does not stretch by default, so using one
|
|
385
|
+
* as the only child of a fixed-height scroll container (a nav pane, a docs
|
|
386
|
+
* page) keeps its content at natural height and preserves the container's
|
|
387
|
+
* bottom padding. Reach for it when the stack should pin content to the
|
|
388
|
+
* bottom of a definite-height box (dialog popups, cards with `splitAfter`
|
|
389
|
+
* footers).
|
|
390
|
+
*
|
|
391
|
+
* @default false
|
|
392
|
+
*/
|
|
393
|
+
fill?: boolean;
|
|
394
|
+
}
|
|
395
|
+
declare function Stack({ as, space, recursive, splitAfter, fill, className, style, children, ...props }: StackProps): ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
396
|
+
//#endregion
|
|
397
|
+
//#region src/layout/switcher.d.ts
|
|
398
|
+
/**
|
|
399
|
+
* The mode-switch primitive: children sit in a single horizontal row when the
|
|
400
|
+
* container is wide enough, and switch directly to a single vertical column
|
|
401
|
+
* (bypassing intermediate states) when it isn't.
|
|
402
|
+
*
|
|
403
|
+
* Use for equal items that should never appear as "featured" by wrapping
|
|
404
|
+
* unevenly — e.g. product cards or numbered steps. The switch happens at
|
|
405
|
+
* `threshold` (a container-based breakpoint) and, with `limit`, when there are
|
|
406
|
+
* more items than fit comfortably in one row.
|
|
407
|
+
*/
|
|
408
|
+
interface SwitcherProps extends LayoutPrimitiveProps {
|
|
409
|
+
/**
|
|
410
|
+
* Container width at which the layout switches from horizontal to vertical.
|
|
411
|
+
*
|
|
412
|
+
* @default '30rem'
|
|
413
|
+
*/
|
|
414
|
+
threshold?: string;
|
|
415
|
+
/**
|
|
416
|
+
* Space between the children.
|
|
417
|
+
*
|
|
418
|
+
* @default '1rem'
|
|
419
|
+
*/
|
|
420
|
+
space?: string;
|
|
421
|
+
/**
|
|
422
|
+
* Maximum items allowed in the horizontal configuration.
|
|
423
|
+
*
|
|
424
|
+
* With more items than this, each is forced to a full row (stacked). Children
|
|
425
|
+
* are cloned and restyled inline, so they must accept a `style` prop.
|
|
426
|
+
*
|
|
427
|
+
* @default 4
|
|
428
|
+
*/
|
|
429
|
+
limit?: number;
|
|
430
|
+
}
|
|
431
|
+
declare function Switcher({ as, threshold, space, limit, className, style, children, ...props }: SwitcherProps): ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
432
|
+
//#endregion
|
|
433
|
+
export { Box as C, CenterProps as S, LayoutPrimitiveProps as T, Container as _, Sidebar as a, ClusterProps as b, ReelProps as c, Grid as d, GridProps as f, CoverProps as g, Cover as h, StackProps as i, Imposter as l, FrameProps as m, SwitcherProps as n, SidebarProps as o, Frame as p, Stack as r, Reel as s, Switcher as t, ImposterProps as u, ContainerProps as v, BoxProps as w, Center as x, Cluster as y };
|