@cloudgrid-io/ui 0.41.0 → 0.43.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/blocks/confirm-delete-dialog.d.ts.map +1 -1
- package/dist/blocks/confirm-delete-dialog.js +5 -1
- package/dist/blocks/confirm-delete-dialog.js.map +1 -1
- package/dist/blocks/locked-section.d.ts +36 -9
- package/dist/blocks/locked-section.d.ts.map +1 -1
- package/dist/blocks/locked-section.js +31 -6
- package/dist/blocks/locked-section.js.map +1 -1
- package/dist/blocks/search-field.d.ts +24 -0
- package/dist/blocks/search-field.d.ts.map +1 -0
- package/dist/blocks/search-field.js +28 -0
- package/dist/blocks/search-field.js.map +1 -0
- package/dist/blocks/shelf.d.ts +24 -9
- package/dist/blocks/shelf.d.ts.map +1 -1
- package/dist/blocks/shelf.js +52 -15
- package/dist/blocks/shelf.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/cloudgrid-cn.d.ts +14 -0
- package/dist/lib/cloudgrid-cn.d.ts.map +1 -1
- package/dist/lib/cloudgrid-cn.js +17 -0
- package/dist/lib/cloudgrid-cn.js.map +1 -1
- package/dist/ui/badge.d.ts +1 -1
- package/dist/ui/badge.d.ts.map +1 -1
- package/dist/ui/badge.js +19 -0
- package/dist/ui/badge.js.map +1 -1
- package/dist/ui/button.d.ts +4 -2
- package/dist/ui/button.d.ts.map +1 -1
- package/dist/ui/button.js +97 -43
- package/dist/ui/button.js.map +1 -1
- package/dist/ui/dialog.d.ts +52 -0
- package/dist/ui/dialog.d.ts.map +1 -1
- package/dist/ui/dialog.js +57 -5
- package/dist/ui/dialog.js.map +1 -1
- package/dist/ui/drawer.d.ts +83 -11
- package/dist/ui/drawer.d.ts.map +1 -1
- package/dist/ui/drawer.js +137 -17
- package/dist/ui/drawer.js.map +1 -1
- package/dist/ui/input-group.d.ts.map +1 -1
- package/dist/ui/input-group.js +7 -2
- package/dist/ui/input-group.js.map +1 -1
- package/dist/ui/input.d.ts +6 -1
- package/dist/ui/input.d.ts.map +1 -1
- package/dist/ui/input.js +61 -3
- package/dist/ui/input.js.map +1 -1
- package/dist/ui/radio-group.d.ts.map +1 -1
- package/dist/ui/radio-group.js +24 -6
- package/dist/ui/radio-group.js.map +1 -1
- package/dist/ui/select.d.ts +10 -0
- package/dist/ui/select.d.ts.map +1 -1
- package/dist/ui/select.js +11 -1
- package/dist/ui/select.js.map +1 -1
- package/dist/ui/table.d.ts +27 -0
- package/dist/ui/table.d.ts.map +1 -1
- package/dist/ui/table.js +39 -6
- package/dist/ui/table.js.map +1 -1
- package/dist/ui/tabs.d.ts +1 -1
- package/dist/ui/textarea.d.ts +7 -0
- package/dist/ui/textarea.d.ts.map +1 -1
- package/dist/ui/textarea.js +8 -1
- package/dist/ui/textarea.js.map +1 -1
- package/package.json +1 -1
package/dist/ui/input.js
CHANGED
|
@@ -1,9 +1,67 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { Input as InputPrimitive } from "@base-ui/react/input";
|
|
4
4
|
import { cn } from "../lib/cloudgrid-cn.js";
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
/**
|
|
6
|
+
* The text field, as the CloudGrid 2026 Figma draws it (#384): the popup form
|
|
7
|
+
* fields of New Vault Item (7537:8484) and the search above every Admin list
|
|
8
|
+
* (7404:5007, 7414:5979).
|
|
9
|
+
*
|
|
10
|
+
* ## The metrics, and why the padding reads 19 and 11
|
|
11
|
+
*
|
|
12
|
+
* 40 tall, radius 16 (`--radius-xl`), white, a 1px N3 border (`--cg-slate-500`,
|
|
13
|
+
* the `steel` utility), Manrope 15 ink, placeholder N3. The frame's padding is
|
|
14
|
+
* 12/20 measured from the OUTER edge, because Figma draws the stroke inside the
|
|
15
|
+
* box. CSS puts the border outside the padding, so the padding is 11/19 and the
|
|
16
|
+
* text still starts 20px in.
|
|
17
|
+
*
|
|
18
|
+
* ## The dark grounds
|
|
19
|
+
*
|
|
20
|
+
* `--cg-slate-500` is a brand ramp rung, declared at `:root` only, and it
|
|
21
|
+
* measures 1.71:1 on the purple panel. So on `[data-cg-surface=panel|ink]` the
|
|
22
|
+
* border and placeholder fall back to the scope's control line and muted text,
|
|
23
|
+
* which is what the field drew there before #384. `bg-card` is white on the page
|
|
24
|
+
* and the scope's own card ground on the dark surfaces, so ink text (which flips
|
|
25
|
+
* to white there) stays legible.
|
|
26
|
+
*
|
|
27
|
+
* ## Icons: `leading` and `trailing`
|
|
28
|
+
*
|
|
29
|
+
* A 20px mark, 19px in from its edge, with the text kept 16px clear of it (so
|
|
30
|
+
* the text starts at 56px with a leading mark, and stops 56px from the right
|
|
31
|
+
* with a trailing one). With neither, `Input` renders a bare `<input>` exactly
|
|
32
|
+
* as before. With either, it renders a wrapper and the `className` still lands
|
|
33
|
+
* on the input; size the field with the wrapper's parent.
|
|
34
|
+
*
|
|
35
|
+
* The leading slot is decorative and ignores the pointer, so a click on the
|
|
36
|
+
* search mark focuses the field. The trailing slot takes clicks, because what
|
|
37
|
+
* goes there is a control: the show-secret Eye is a `<button>` with its own
|
|
38
|
+
* name (`aria-label="Show value"`, `aria-pressed`).
|
|
39
|
+
*
|
|
40
|
+
* ## The label and helper pattern
|
|
41
|
+
*
|
|
42
|
+
* There is no `Field` component; the pattern is three elements in a column:
|
|
43
|
+
*
|
|
44
|
+
* <div className="grid gap-2">
|
|
45
|
+
* <label htmlFor={id} className="text-body-sm font-medium text-foreground">Value</label>
|
|
46
|
+
* <Input id={id} aria-describedby={helpId} />
|
|
47
|
+
* <p id={helpId} className="text-caption text-steel in-data-[cg-surface=panel]:text-faint in-data-[cg-surface=ink]:text-faint">
|
|
48
|
+
* The value is never displayed after save.
|
|
49
|
+
* </p>
|
|
50
|
+
* </div>
|
|
51
|
+
*
|
|
52
|
+
* Label Manrope Medium 15 with 8px to the field; helper Regular 13/1.46 in N3,
|
|
53
|
+
* wired with `aria-describedby`. N3 on white is 3.41:1, under the 4.5:1 body
|
|
54
|
+
* floor; it is what the frame draws, and `text-steel-strong` is the AA
|
|
55
|
+
* companion when a helper carries information a reader must not miss.
|
|
56
|
+
*/
|
|
57
|
+
const FIELD = "h-10 w-full min-w-0 rounded-xl border border-steel bg-card px-[19px] py-[11px] text-body-md text-foreground transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-body-sm file:font-medium file:text-foreground placeholder:text-steel focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-body-sm in-data-[cg-surface=panel]:border-input in-data-[cg-surface=ink]:border-input in-data-[cg-surface=panel]:placeholder:text-muted-foreground in-data-[cg-surface=ink]:placeholder:text-muted-foreground dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40";
|
|
58
|
+
/** The icon slots: a 20px mark, vertically centred, in the steel tone. */
|
|
59
|
+
const SLOT = "absolute inset-y-0 flex items-center text-steel in-data-[cg-surface=panel]:text-muted-foreground in-data-[cg-surface=ink]:text-muted-foreground [&_svg]:size-5 [&_svg]:shrink-0";
|
|
60
|
+
function Input({ className, type, leading, trailing, ...props }) {
|
|
61
|
+
const input = (_jsx(InputPrimitive, { type: type, "data-slot": "input", className: cn(FIELD, leading && "ps-[55px]", trailing && "pe-[55px]", className), ...props }));
|
|
62
|
+
if (!leading && !trailing)
|
|
63
|
+
return input;
|
|
64
|
+
return (_jsxs("div", { "data-slot": "input-wrapper", className: "relative w-full min-w-0", children: [leading ? (_jsx("span", { "data-slot": "input-leading", "aria-hidden": "true", className: cn(SLOT, "pointer-events-none start-[19px]"), children: leading })) : null, input, trailing ? (_jsx("span", { "data-slot": "input-trailing", className: cn(SLOT, "end-[19px]"), children: trailing })) : null] }));
|
|
7
65
|
}
|
|
8
66
|
export { Input };
|
|
9
67
|
//# sourceMappingURL=input.js.map
|
package/dist/ui/input.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.js","sourceRoot":"","sources":["../../src/ui/input.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,KAAK,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAE9D,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAA;AAEvC,SAAS,KAAK,CAAC,
|
|
1
|
+
{"version":3,"file":"input.js","sourceRoot":"","sources":["../../src/ui/input.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,KAAK,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAE9D,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAA;AAEvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AACH,MAAM,KAAK,GACT,o2BAAo2B,CAAA;AAEt2B,0EAA0E;AAC1E,MAAM,IAAI,GACR,iLAAiL,CAAA;AAEnL,SAAS,KAAK,CAAC,EACb,SAAS,EACT,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,GAAG,KAAK,EAMT;IACC,MAAM,KAAK,GAAG,CACZ,KAAC,cAAc,IACb,IAAI,EAAE,IAAI,eACA,OAAO,EACjB,SAAS,EAAE,EAAE,CAAC,KAAK,EAAE,OAAO,IAAI,WAAW,EAAE,QAAQ,IAAI,WAAW,EAAE,SAAS,CAAC,KAC5E,KAAK,GACT,CACH,CAAA;IAED,IAAI,CAAC,OAAO,IAAI,CAAC,QAAQ;QAAE,OAAO,KAAK,CAAA;IAEvC,OAAO,CACL,4BAAe,eAAe,EAAC,SAAS,EAAC,yBAAyB,aAC/D,OAAO,CAAC,CAAC,CAAC,CACT,4BAAgB,eAAe,iBAAa,MAAM,EAAC,SAAS,EAAE,EAAE,CAAC,IAAI,EAAE,kCAAkC,CAAC,YACvG,OAAO,GACH,CACR,CAAC,CAAC,CAAC,IAAI,EACP,KAAK,EACL,QAAQ,CAAC,CAAC,CAAC,CACV,4BAAgB,gBAAgB,EAAC,SAAS,EAAE,EAAE,CAAC,IAAI,EAAE,YAAY,CAAC,YAC/D,QAAQ,GACJ,CACR,CAAC,CAAC,CAAC,IAAI,IACJ,CACP,CAAA;AACH,CAAC;AAED,OAAO,EAAE,KAAK,EAAE,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-group.d.ts","sourceRoot":"","sources":["../../src/ui/radio-group.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,KAAK,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC9D,OAAO,EAAE,UAAU,IAAI,mBAAmB,EAAE,MAAM,4BAA4B,CAAA;
|
|
1
|
+
{"version":3,"file":"radio-group.d.ts","sourceRoot":"","sources":["../../src/ui/radio-group.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,KAAK,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC9D,OAAO,EAAE,UAAU,IAAI,mBAAmB,EAAE,MAAM,4BAA4B,CAAA;AA0F9E,iBAAS,UAAU,CAAC,EAClB,SAAS,EACT,KAAK,EACL,YAAY,EACZ,aAAa,EACb,GAAG,KAAK,EACT,EAAE,mBAAmB,CAAC,KAAK,qBAsB3B;AAED,iBAAS,KAAK,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,IAAI,CAAC,KAAK,qBAgBhE;AAED,iBAAS,WAAW,CAAC,EACnB,KAAK,EACL,KAAK,EACL,WAAW,EACX,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,KAAK,GAAG,UAAU,CAAC,GAAG;IACzD,sDAAsD;IACtD,KAAK,EAAE,OAAO,CAAA;IACd,2CAA2C;IAC3C,KAAK,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,mFAAmF;IACnF,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;;OAGG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAC3B,qBA+DA;AAED,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,CAAA"}
|
package/dist/ui/radio-group.js
CHANGED
|
@@ -22,7 +22,7 @@ import { cn } from "../lib/cloudgrid-cn.js";
|
|
|
22
22
|
* ## The option row, and the name it must NOT have
|
|
23
23
|
*
|
|
24
24
|
* `RadioOption` wraps the control and both lines of text in a `<label>`, which
|
|
25
|
-
* is what makes the whole row clickable rather than the
|
|
25
|
+
* is what makes the whole row clickable rather than the 18px circle.
|
|
26
26
|
*
|
|
27
27
|
* It then passes `aria-labelledby` and `aria-describedby` EXPLICITLY, and that
|
|
28
28
|
* is the load-bearing part. Base UI names a `role="radio"` span by looking for
|
|
@@ -57,6 +57,24 @@ import { cn } from "../lib/cloudgrid-cn.js";
|
|
|
57
57
|
* overlaps its neighbour and a click near the boundary selects the wrong option.
|
|
58
58
|
* The row is the target instead, and it is wider and taller than any overlay.
|
|
59
59
|
*
|
|
60
|
+
* ## The 2026 Figma metrics (#384)
|
|
61
|
+
*
|
|
62
|
+
* From the New Vault Item popup (7537:8484): an 18px control with a 10px dot
|
|
63
|
+
* (node 4957:3340, 4px of space around it), 10px to its label (Manrope Regular
|
|
64
|
+
* 15), an optional description in Regular 13, and 12px between items.
|
|
65
|
+
*
|
|
66
|
+
* THE DESCRIPTION IS NOT N3, deliberately. The frame draws it in N3
|
|
67
|
+
* (`--cg-slate-500`), which is 3.41:1 on white and under the 4.5:1 floor for
|
|
68
|
+
* 13px text; the token layer keeps N3 off every text semantic for that reason.
|
|
69
|
+
* It is `text-faint-strong` (`--cg-text-muted-strong`), the caption rung that
|
|
70
|
+
* clears 4.5:1 on the card, page, panel and ink and flips per scope. The group's own label is Medium 15 with 8px to the first
|
|
71
|
+
* option; it is the caller's element, wired with `aria-labelledby`:
|
|
72
|
+
*
|
|
73
|
+
* <div className="grid gap-2">
|
|
74
|
+
* <span id={id} className="text-body-sm font-medium text-foreground">Type</span>
|
|
75
|
+
* <RadioGroup aria-labelledby={id}>…</RadioGroup>
|
|
76
|
+
* </div>
|
|
77
|
+
*
|
|
60
78
|
* Colour comes from `--primary` through the shadcn bridge, which is declared per
|
|
61
79
|
* surface scope, so the selected ring and dot are brand purple on the page and
|
|
62
80
|
* brand lime on both dark grounds. Selection is never colour alone: the dot is a
|
|
@@ -82,7 +100,7 @@ function RadioGroup({ className, value, defaultValue, onValueChange, ...props })
|
|
|
82
100
|
}, ...props }) }));
|
|
83
101
|
}
|
|
84
102
|
function Radio({ className, ...props }) {
|
|
85
|
-
return (_jsx(RadioPrimitive.Root, { "data-slot": "radio", className: cn("peer flex size-4 shrink-0 items-center justify-center rounded-pill border border-
|
|
103
|
+
return (_jsx(RadioPrimitive.Root, { "data-slot": "radio", className: cn("peer flex size-4.5 shrink-0 items-center justify-center rounded-pill border border-steel p-0 in-data-[cg-surface=panel]:border-input in-data-[cg-surface=ink]:border-input transition-colors outline-none group-has-disabled/field:opacity-50 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-checked:border-primary data-checked:text-primary data-disabled:cursor-not-allowed data-disabled:opacity-50", className), ...props, children: _jsx(RadioPrimitive.Indicator, { "data-slot": "radio-indicator", className: "size-2.5 shrink-0 rounded-pill bg-current" }) }));
|
|
86
104
|
}
|
|
87
105
|
function RadioOption({ value, label, description, disabled, className, children, ...props }) {
|
|
88
106
|
const selected = React.useContext(RadioGroupValueContext);
|
|
@@ -92,10 +110,10 @@ function RadioOption({ value, label, description, disabled, className, children,
|
|
|
92
110
|
const descriptionId = `${id}-description`;
|
|
93
111
|
return (_jsxs("div", { "data-slot": "radio-option", "data-checked": checked ? "" : undefined, "data-disabled": disabled ? "" : undefined, className: cn("grid gap-1.5", className), ...props, children: [_jsxs("label", { className: cn("flex cursor-pointer items-start gap-2.5 select-none", disabled && "cursor-not-allowed opacity-50"), children: [_jsx(Radio, { value: value, disabled: disabled, "aria-labelledby": labelId, "aria-describedby": description ? descriptionId : undefined,
|
|
94
112
|
// Optically centred on the label's first line rather than its box.
|
|
95
|
-
className: "mt-0.5" }), _jsxs("span", { className: "grid gap-0.5", children: [_jsx("span", { id: labelId, "data-slot": "radio-option-label", className: "text-body-sm text-ink", children: label }), description ? (_jsx("span", { id: descriptionId, "data-slot": "radio-option-description", className: "text-caption text-faint", children: description })) : null] })] }), children && checked ? (_jsx("div", { "data-slot": "radio-option-detail",
|
|
96
|
-
// Indented to the label's edge: the control is
|
|
97
|
-
// 10px, so the text column starts at
|
|
98
|
-
className: "grid gap-2 ps-
|
|
113
|
+
className: "mt-0.5" }), _jsxs("span", { className: "grid gap-0.5", children: [_jsx("span", { id: labelId, "data-slot": "radio-option-label", className: "text-body-sm text-ink", children: label }), description ? (_jsx("span", { id: descriptionId, "data-slot": "radio-option-description", className: "text-caption text-faint-strong", children: description })) : null] })] }), children && checked ? (_jsx("div", { "data-slot": "radio-option-detail",
|
|
114
|
+
// Indented to the label's edge: the control is 18px and the gap is
|
|
115
|
+
// 10px, so the text column starts at 28px.
|
|
116
|
+
className: "grid gap-2 ps-7", children: children })) : null] }));
|
|
99
117
|
}
|
|
100
118
|
export { Radio, RadioGroup, RadioOption };
|
|
101
119
|
//# sourceMappingURL=radio-group.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-group.js","sourceRoot":"","sources":["../../src/ui/radio-group.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,KAAK,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC9D,OAAO,EAAE,UAAU,IAAI,mBAAmB,EAAE,MAAM,4BAA4B,CAAA;AAE9E,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAA;AAEvC
|
|
1
|
+
{"version":3,"file":"radio-group.js","sourceRoot":"","sources":["../../src/ui/radio-group.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,KAAK,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC9D,OAAO,EAAE,UAAU,IAAI,mBAAmB,EAAE,MAAM,4BAA4B,CAAA;AAE9E,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAA;AAEvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2EG;AAEH;;;;;;GAMG;AACH,MAAM,sBAAsB,GAAG,KAAK,CAAC,aAAa,CAAU,SAAS,CAAC,CAAA;AAEtE,SAAS,UAAU,CAAC,EAClB,SAAS,EACT,KAAK,EACL,YAAY,EACZ,aAAa,EACb,GAAG,KAAK,EACkB;IAC1B,8EAA8E;IAC9E,2EAA2E;IAC3E,oDAAoD;IACpD,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAU,YAAY,CAAC,CAAA;IAC7E,MAAM,QAAQ,GAAG,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,YAAY,CAAA;I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AC,SAAS,EACxC,SAAS,EAAE,EAAE,CAAC,cAAc,EAAE,SAAS,CAAC,KACpC,KAAK,aAET,iBACE,SAAS,EAAE,EAAE,CACX,qDAAqD,EACrD,QAAQ,IAAI,+BAA+B,CAC5C,aAED,KAAC,KAAK,IACJ,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,qBACD,OAAO,sBACN,WAAW,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,SAAS;wBACzD,mEAAmE;wBACnE,SAAS,EAAC,QAAQ,GAClB,EACF,gBAAM,SAAS,EAAC,cAAc,aAC5B,eACE,EAAE,EAAE,OAAO,eACD,oBAAoB,EAC9B,SAAS,EAAC,uBAAuB,YAEhC,KAAK,GACD,EACN,WAAW,CAAC,CAAC,CAAC,CACb,eACE,EAAE,EAAE,aAAa,eACP,0BAA0B,EACpC,SAAS,EAAC,gCAAgC,YAEzC,WAAW,GACP,CACR,CAAC,CAAC,CAAC,IAAI,IACH,IACD,EAEP,QAAQ,IAAI,OAAO,CAAC,CAAC,CAAC,CACrB,2BACY,qBAAqB;gBAC/B,mEAAmE;gBACnE,2CAA2C;gBAC3C,SAAS,EAAC,iBAAiB,YAE1B,QAAQ,GACL,CACP,CAAC,CAAC,CAAC,IAAI,IACJ,CACP,CAAA;AACH,CAAC;AAED,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,CAAA"}
|
package/dist/ui/select.d.ts
CHANGED
|
@@ -3,6 +3,16 @@ import { Select as SelectPrimitive } from "@base-ui/react/select";
|
|
|
3
3
|
declare const Select: typeof SelectPrimitive.Root;
|
|
4
4
|
declare function SelectGroup({ className, ...props }: SelectPrimitive.Group.Props): React.JSX.Element;
|
|
5
5
|
declare function SelectValue({ className, ...props }: SelectPrimitive.Value.Props): React.JSX.Element;
|
|
6
|
+
/**
|
|
7
|
+
* The filter dropdown above every Admin list, as the 2026 Figma draws it
|
|
8
|
+
* (#384; 7404:5007, 7414:5979): 40 tall, radius 12 (`--radius-md`), white, a 1px
|
|
9
|
+
* N3 border, padding 12/20 from the outer edge (11/19 inside the border), Manrope
|
|
10
|
+
* Regular 15 ink, a 16px caret 16px after the value. Two side by side sit 12px
|
|
11
|
+
* apart; that is the caller's `gap-3`. On the purple panel and ink the border
|
|
12
|
+
* falls back to the scope's control line, as `Input` does.
|
|
13
|
+
*
|
|
14
|
+
* `size="sm"` keeps its compact pre-#384 metrics for dense rows.
|
|
15
|
+
*/
|
|
6
16
|
declare function SelectTrigger({ className, size, children, ...props }: SelectPrimitive.Trigger.Props & {
|
|
7
17
|
size?: "sm" | "default";
|
|
8
18
|
}): React.JSX.Element;
|
package/dist/ui/select.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../src/ui/select.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAKjE,QAAA,MAAM,MAAM,6BAAuB,CAAA;AAEnC,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,CAAC,KAAK,CAAC,KAAK,qBAQxE;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,CAAC,KAAK,CAAC,KAAK,qBAQxE;AAED,iBAAS,aAAa,CAAC,EACrB,SAAS,EACT,IAAgB,EAChB,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,eAAe,CAAC,OAAO,CAAC,KAAK,GAAG;IACjC,IAAI,CAAC,EAAE,IAAI,GAAG,SAAS,CAAA;CACxB,qBAmBA;AAED,iBAAS,aAAa,CAAC,EACrB,SAAS,EACT,QAAQ,EACR,IAAe,EACf,UAAc,EACd,KAAgB,EAChB,WAAe,EACf,oBAA2B,EAC3B,GAAG,KAAK,EACT,EAAE,eAAe,CAAC,KAAK,C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EACpB,eAAe,EACf,aAAa,EACb,WAAW,GACZ,CAAA"}
|
package/dist/ui/select.js
CHANGED
|
@@ -11,8 +11,18 @@ function SelectGroup({ className, ...props }) {
|
|
|
11
11
|
function SelectValue({ className, ...props }) {
|
|
12
12
|
return (_jsx(SelectPrimitive.Value, { "data-slot": "select-value", className: cn("flex flex-1 text-left", className), ...props }));
|
|
13
13
|
}
|
|
14
|
+
/**
|
|
15
|
+
* The filter dropdown above every Admin list, as the 2026 Figma draws it
|
|
16
|
+
* (#384; 7404:5007, 7414:5979): 40 tall, radius 12 (`--radius-md`), white, a 1px
|
|
17
|
+
* N3 border, padding 12/20 from the outer edge (11/19 inside the border), Manrope
|
|
18
|
+
* Regular 15 ink, a 16px caret 16px after the value. Two side by side sit 12px
|
|
19
|
+
* apart; that is the caller's `gap-3`. On the purple panel and ink the border
|
|
20
|
+
* falls back to the scope's control line, as `Input` does.
|
|
21
|
+
*
|
|
22
|
+
* `size="sm"` keeps its compact pre-#384 metrics for dense rows.
|
|
23
|
+
*/
|
|
14
24
|
function SelectTrigger({ className, size = "default", children, ...props }) {
|
|
15
|
-
return (_jsxs(SelectPrimitive.Trigger, { "data-slot": "select-trigger", "data-size": size, className: cn("flex w-fit items-center justify-between gap-
|
|
25
|
+
return (_jsxs(SelectPrimitive.Trigger, { "data-slot": "select-trigger", "data-size": size, className: cn("flex w-fit items-center justify-between gap-4 rounded-md border border-steel bg-card px-[19px] py-[11px] text-body-sm text-foreground whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-steel in-data-[cg-surface=panel]:data-placeholder:text-muted-foreground in-data-[cg-surface=ink]:data-placeholder:text-muted-foreground data-[size=default]:h-10 data-[size=sm]:h-7 data-[size=sm]:gap-1.5 data-[size=sm]:rounded-[min(var(--radius-md),10px)] data-[size=sm]:py-2 data-[size=sm]:pr-2 data-[size=sm]:pl-2.5 in-data-[cg-surface=panel]:border-input in-data-[cg-surface=ink]:border-input *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className), ...props, children: [children, _jsx(SelectPrimitive.Icon, { render: _jsx(ChevronDownIcon, { className: "pointer-events-none size-4 text-muted-foreground" }) })] }));
|
|
16
26
|
}
|
|
17
27
|
function SelectContent({ className, children, side = "bottom", sideOffset = 4, align = "center", alignOffset = 0, alignItemWithTrigger = true, ...props }) {
|
|
18
28
|
return (_jsx(SelectPrimitive.Portal, { children: _jsx(SelectPrimitive.Positioner, { side: side, sideOffset: sideOffset, align: align, alignOffset: alignOffset, alignItemWithTrigger: alignItemWithTrigger, className: "isolate z-50", children: _jsxs(SelectPrimitive.Popup, { "data-slot": "select-content", "data-align-trigger": alignItemWithTrigger, className: cn("relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className), ...props, children: [_jsx(SelectScrollUpButton, {}), _jsx(SelectPrimitive.List, { children: children }), _jsx(SelectScrollDownButton, {})] }) }) }));
|
package/dist/ui/select.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.js","sourceRoot":"","sources":["../../src/ui/select.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAEjE,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAA;AACvC,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAE/E,MAAM,MAAM,GAAG,eAAe,CAAC,IAAI,CAAA;AAEnC,SAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAA+B;IACvE,OAAO,CACL,KAAC,eAAe,CAAC,KAAK,iBACV,cAAc,EACxB,SAAS,EAAE,EAAE,CAAC,iBAAiB,EAAE,SAAS,CAAC,KACvC,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,SAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAA+B;IACvE,OAAO,CACL,KAAC,eAAe,CAAC,KAAK,iBACV,cAAc,EACxB,SAAS,EAAE,EAAE,CAAC,uBAAuB,EAAE,SAAS,CAAC,KAC7C,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,SAAS,aAAa,CAAC,EACrB,SAAS,EACT,IAAI,GAAG,SAAS,EAChB,QAAQ,EACR,GAAG,KAAK,EAGT;IACC,OAAO,CACL,MAAC,eAAe,CAAC,OAAO,iBACZ,gBAAgB,eACf,IAAI,EACf,SAAS,EAAE,EAAE,CACX,
|
|
1
|
+
{"version":3,"file":"select.js","sourceRoot":"","sources":["../../src/ui/select.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAEjE,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAA;AACvC,OAAO,E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AAoB,CAAC,EAC5B,SAAS,EACT,GAAG,KAAK,EACmD;IAC3D,OAAO,CACL,KAAC,eAAe,CAAC,aAAa,iBAClB,yBAAyB,EACnC,SAAS,EAAE,EAAE,CACX,wHAAwH,EACxH,SAAS,CACV,KACG,KAAK,YAET,KAAC,aAAa,KAAG,GACa,CACjC,CAAA;AACH,CAAC;AAED,SAAS,sBAAsB,CAAC,EAC9B,SAAS,EACT,GAAG,KAAK,EACqD;IAC7D,OAAO,CACL,KAAC,eAAe,CAAC,eAAe,iBACpB,2BAA2B,EACrC,SAAS,EAAE,EAAE,CACX,2HAA2H,EAC3H,SAAS,CACV,KACG,KAAK,YAET,KAAC,eAAe,KAAG,GACa,CACnC,CAAA;AACH,CAAC;AAED,OAAO,EACL,MAAM,EACN,aAAa,EACb,WAAW,EACX,UAAU,EACV,WAAW,EACX,sBAAsB,EACtB,oBAAoB,EACpB,eAAe,EACf,aAAa,EACb,WAAW,GACZ,CAAA"}
|
package/dist/ui/table.d.ts
CHANGED
|
@@ -1,4 +1,31 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* The 2026 Figma list (#383): the Users table in the Admin frame, node
|
|
4
|
+
* 7406:5146. An N3 13px header with no rule under it, then rounded rows 2px
|
|
5
|
+
* apart, every other one on N1 at half strength, starting with the first.
|
|
6
|
+
*
|
|
7
|
+
* ## Rounded zebra rows on a real <table>
|
|
8
|
+
*
|
|
9
|
+
* This stays a `<table>`, so a screen reader keeps announcing rows and columns.
|
|
10
|
+
* Two things a table does not do on its own are done like this:
|
|
11
|
+
*
|
|
12
|
+
* - **The 2px between rows** is `border-separate` with `border-spacing: 0 2px`.
|
|
13
|
+
* Spacing is the only gap a table can put between rows. It also adds 2px
|
|
14
|
+
* above the header and below the last row, at the table's outer edges.
|
|
15
|
+
* - **The 12px corner** is on the CELLS, not the row: the first cell rounds
|
|
16
|
+
* its left corners and the last its right. A `<tr>` cannot clip its own
|
|
17
|
+
* background to its cells' corners, so the row paints nothing. Every ground
|
|
18
|
+
* (zebra, hover, selected) is painted by the cells, keyed off the row through
|
|
19
|
+
* `group/row`, so the corners clip it.
|
|
20
|
+
*
|
|
21
|
+
* Horizontal rhythm: the frame's rows are auto-layout with padding 12 and a
|
|
22
|
+
* 16px gap. Cells get 8px each side (8 + 8 = 16 between neighbours), and the
|
|
23
|
+
* first and last cell take 12 at the row's two ends.
|
|
24
|
+
*
|
|
25
|
+
* Row states, cell grounds over the zebra: hover (and a row whose menu is
|
|
26
|
+
* open) takes N1 at full strength, `bg-page`; `data-state="selected"` takes
|
|
27
|
+
* the primary tint, `bg-brand-tint`.
|
|
28
|
+
*/
|
|
2
29
|
declare function Table({ className, ...props }: React.ComponentProps<"table">): React.JSX.Element;
|
|
3
30
|
declare function TableHeader({ className, ...props }: React.ComponentProps<"thead">): React.JSX.Element;
|
|
4
31
|
declare function TableBody({ className, ...props }: React.ComponentProps<"tbody">): React.JSX.Element;
|
package/dist/ui/table.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../src/ui/table.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,iBAAS,KAAK,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../src/ui/table.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,iBAAS,KAAK,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,qBAgBpE;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,qBAQ1E;AAED,iBAAS,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,qBAQxE;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,qBAW1E;AAED,iBAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,qBAapE;AAED,iBAAS,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,qBAWrE;AAED,iBAAS,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,qBAcrE;AAED,iBAAS,YAAY,CAAC,EACpB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,SAAS,CAAC,qBAQjC;AAED,OAAO,EACL,KAAK,EACL,WAAW,EACX,SAAS,EACT,WAAW,EACX,SAAS,EACT,QAAQ,EACR,SAAS,EACT,YAAY,GACb,CAAA"}
|
package/dist/ui/table.js
CHANGED
|
@@ -2,26 +2,59 @@
|
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { cn } from "../lib/cloudgrid-cn.js";
|
|
5
|
+
/**
|
|
6
|
+
* The 2026 Figma list (#383): the Users table in the Admin frame, node
|
|
7
|
+
* 7406:5146. An N3 13px header with no rule under it, then rounded rows 2px
|
|
8
|
+
* apart, every other one on N1 at half strength, starting with the first.
|
|
9
|
+
*
|
|
10
|
+
* ## Rounded zebra rows on a real <table>
|
|
11
|
+
*
|
|
12
|
+
* This stays a `<table>`, so a screen reader keeps announcing rows and columns.
|
|
13
|
+
* Two things a table does not do on its own are done like this:
|
|
14
|
+
*
|
|
15
|
+
* - **The 2px between rows** is `border-separate` with `border-spacing: 0 2px`.
|
|
16
|
+
* Spacing is the only gap a table can put between rows. It also adds 2px
|
|
17
|
+
* above the header and below the last row, at the table's outer edges.
|
|
18
|
+
* - **The 12px corner** is on the CELLS, not the row: the first cell rounds
|
|
19
|
+
* its left corners and the last its right. A `<tr>` cannot clip its own
|
|
20
|
+
* background to its cells' corners, so the row paints nothing. Every ground
|
|
21
|
+
* (zebra, hover, selected) is painted by the cells, keyed off the row through
|
|
22
|
+
* `group/row`, so the corners clip it.
|
|
23
|
+
*
|
|
24
|
+
* Horizontal rhythm: the frame's rows are auto-layout with padding 12 and a
|
|
25
|
+
* 16px gap. Cells get 8px each side (8 + 8 = 16 between neighbours), and the
|
|
26
|
+
* first and last cell take 12 at the row's two ends.
|
|
27
|
+
*
|
|
28
|
+
* Row states, cell grounds over the zebra: hover (and a row whose menu is
|
|
29
|
+
* open) takes N1 at full strength, `bg-page`; `data-state="selected"` takes
|
|
30
|
+
* the primary tint, `bg-brand-tint`.
|
|
31
|
+
*/
|
|
5
32
|
function Table({ className, ...props }) {
|
|
6
|
-
return (_jsx("div", { "data-slot": "table-container", className: "relative w-full overflow-x-auto", children: _jsx("table", { "data-slot": "table", className: cn("w-full caption-bottom text-body-sm", className), ...props }) }));
|
|
33
|
+
return (_jsx("div", { "data-slot": "table-container", className: "relative w-full overflow-x-auto", children: _jsx("table", { "data-slot": "table", className: cn("w-full caption-bottom border-separate border-spacing-x-0 border-spacing-y-0.5 text-body-sm text-ink", className), ...props }) }));
|
|
7
34
|
}
|
|
8
35
|
function TableHeader({ className, ...props }) {
|
|
9
|
-
return (_jsx("thead", { "data-slot": "table-header", className:
|
|
36
|
+
return (_jsx("thead", { "data-slot": "table-header", className: className, ...props }));
|
|
10
37
|
}
|
|
11
38
|
function TableBody({ className, ...props }) {
|
|
12
|
-
return (_jsx("tbody", { "data-slot": "table-body", className:
|
|
39
|
+
return (_jsx("tbody", { "data-slot": "table-body", className: className, ...props }));
|
|
13
40
|
}
|
|
14
41
|
function TableFooter({ className, ...props }) {
|
|
15
42
|
return (_jsx("tfoot", { "data-slot": "table-footer", className: cn("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0", className), ...props }));
|
|
16
43
|
}
|
|
17
44
|
function TableRow({ className, ...props }) {
|
|
18
|
-
return (_jsx("tr", { "data-slot": "table-row", className: cn(
|
|
45
|
+
return (_jsx("tr", { "data-slot": "table-row", className: cn(
|
|
46
|
+
// No ground of its own: see the docblock on Table. The cells read
|
|
47
|
+
// the row's parity, hover and selection through this group.
|
|
48
|
+
"group/row", className), ...props }));
|
|
19
49
|
}
|
|
20
50
|
function TableHead({ className, ...props }) {
|
|
21
|
-
return (_jsx("th", { "data-slot": "table-head", className: cn("
|
|
51
|
+
return (_jsx("th", { "data-slot": "table-head", className: cn("px-2 py-2 text-left align-middle text-caption font-normal whitespace-nowrap text-steel first:pl-3 last:pr-3 [&:has([role=checkbox])]:pr-0", className), ...props }));
|
|
22
52
|
}
|
|
23
53
|
function TableCell({ className, ...props }) {
|
|
24
|
-
return (_jsx("td", { "data-slot": "table-cell", className: cn("
|
|
54
|
+
return (_jsx("td", { "data-slot": "table-cell", className: cn("px-2 py-2 align-middle whitespace-nowrap transition-colors first:rounded-l-md first:pl-3 last:rounded-r-md last:pr-3 [&:has([role=checkbox])]:pr-0",
|
|
55
|
+
// The zebra, then the states over it. Odd first: the first body row
|
|
56
|
+
// is tinted.
|
|
57
|
+
"group-odd/row:bg-page/50 group-hover/row:bg-page group-has-aria-expanded/row:bg-page group-data-[state=selected]/row:bg-brand-tint", className), ...props }));
|
|
25
58
|
}
|
|
26
59
|
function TableCaption({ className, ...props }) {
|
|
27
60
|
return (_jsx("caption", { "data-slot": "table-caption", className: cn("mt-4 text-body-sm text-muted-foreground", className), ...props }));
|
package/dist/ui/table.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table.js","sourceRoot":"","sources":["../../src/ui/table.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAA;AAEvC,SAAS,KAAK,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAiC;IACnE,OAAO,CACL,2BACY,iBAAiB,EAC3B,SAAS,EAAC,iCAAiC,YAE3C,6BACY,OAAO,EACjB,SAAS,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"table.js","sourceRoot":"","sources":["../../src/ui/table.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAA;AAEvC;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,SAAS,KAAK,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAiC;IACnE,OAAO,CACL,2BACY,iBAAiB,EAC3B,SAAS,EAAC,iCAAiC,YAE3C,6BACY,OAAO,EACjB,SAAS,EAAE,EAAE,CACX,qGAAqG,EACrG,SAAS,CACV,KACG,KAAK,GACT,GACE,CACP,CAAA;AACH,CAAC;AAED,SAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAiC;IACzE,OAAO,CACL,6BACY,cAAc,EACxB,SAAS,EAAE,SAAS,KAChB,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,SAAS,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAiC;IACvE,OAAO,CACL,6BACY,YAAY,EACtB,SAAS,EAAE,SAAS,KAChB,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,SAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAiC;IACzE,OAAO,CACL,6BACY,cAAc,EACxB,SAAS,EAAE,EAAE,CACX,yDAAyD,EACzD,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,SAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAA8B;IACnE,OAAO,CACL,0BACY,WAAW,EACrB,SAAS,EAAE,EAAE;QACX,kEAAkE;QAClE,4DAA4D;QAC5D,WAAW,EACX,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,SAAS,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAA8B;IACpE,OAAO,CACL,0BACY,YAAY,EACtB,SAAS,EAAE,EAAE,CACX,2IAA2I,EAC3I,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,SAAS,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAA8B;IACpE,OAAO,CACL,0BACY,YAAY,EACtB,SAAS,EAAE,EAAE,CACX,oJAAoJ;QACpJ,oEAAoE;QACpE,aAAa;QACb,oIAAoI,EACpI,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,SAAS,YAAY,CAAC,EACpB,SAAS,EACT,GAAG,KAAK,EACwB;IAChC,OAAO,CACL,+BACY,eAAe,EACzB,SAAS,EAAE,EAAE,CAAC,yCAAyC,EAAE,SAAS,CAAC,KAC/D,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,OAAO,EACL,KAAK,EACL,WAAW,EACX,SAAS,EACT,WAAW,EACX,SAAS,EACT,QAAQ,EACR,SAAS,EACT,YAAY,GACb,CAAA"}
|
package/dist/ui/tabs.d.ts
CHANGED
|
@@ -49,7 +49,7 @@ import { type VariantProps } from "class-variance-authority";
|
|
|
49
49
|
declare function scrollActiveTabIntoView(list: HTMLElement | null | undefined): void;
|
|
50
50
|
declare function Tabs({ className, orientation, ...props }: TabsPrimitive.Root.Props): React.JSX.Element;
|
|
51
51
|
declare const tabsListVariants: (props?: ({
|
|
52
|
-
variant?: "
|
|
52
|
+
variant?: "pill" | "line" | "default" | null | undefined;
|
|
53
53
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
54
54
|
declare function TabsList({ className, variant, ref, ...props }: TabsPrimitive.List.Props & VariantProps<typeof tabsListVariants>): React.JSX.Element;
|
|
55
55
|
declare function TabsTrigger({ className, ...props }: TabsPrimitive.Tab.Props): React.JSX.Element;
|
package/dist/ui/textarea.d.ts
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* The multi-line text field: the 2026 text field's border, radius, ground and
|
|
4
|
+
* horizontal padding (#384), growing with its content. The block padding is 8,
|
|
5
|
+
* not the Input's 11: a content-sized textarea is line box + padding + border,
|
|
6
|
+
* and 11 made one row 46. With 8 one row is 40 (21.9 + 16 + 2 at 15/1.46). See `input.tsx`
|
|
7
|
+
* for the metrics, the dark-ground fallback, and the label and helper pattern.
|
|
8
|
+
*/
|
|
2
9
|
declare function Textarea({ className, ...props }: React.ComponentProps<"textarea">): React.JSX.Element;
|
|
3
10
|
export { Textarea };
|
|
4
11
|
//# sourceMappingURL=textarea.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textarea.d.ts","sourceRoot":"","sources":["../../src/ui/textarea.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,iBAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,UAAU,CAAC,qBAW1E;AAED,OAAO,EAAE,QAAQ,EAAE,CAAA"}
|
|
1
|
+
{"version":3,"file":"textarea.d.ts","sourceRoot":"","sources":["../../src/ui/textarea.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B;;;;;;GAMG;AACH,iBAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,UAAU,CAAC,qBAW1E;AAED,OAAO,EAAE,QAAQ,EAAE,CAAA"}
|
package/dist/ui/textarea.js
CHANGED
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { cn } from "../lib/cloudgrid-cn.js";
|
|
4
|
+
/**
|
|
5
|
+
* The multi-line text field: the 2026 text field's border, radius, ground and
|
|
6
|
+
* horizontal padding (#384), growing with its content. The block padding is 8,
|
|
7
|
+
* not the Input's 11: a content-sized textarea is line box + padding + border,
|
|
8
|
+
* and 11 made one row 46. With 8 one row is 40 (21.9 + 16 + 2 at 15/1.46). See `input.tsx`
|
|
9
|
+
* for the metrics, the dark-ground fallback, and the label and helper pattern.
|
|
10
|
+
*/
|
|
4
11
|
function Textarea({ className, ...props }) {
|
|
5
|
-
return (_jsx("textarea", { "data-slot": "textarea", className: cn("flex field-sizing-content min-h-
|
|
12
|
+
return (_jsx("textarea", { "data-slot": "textarea", className: cn("flex field-sizing-content min-h-10 w-full rounded-xl border border-steel bg-card px-[19px] py-2 text-body-md text-foreground transition-colors outline-none placeholder:text-steel focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-body-sm in-data-[cg-surface=panel]:border-input in-data-[cg-surface=ink]:border-input in-data-[cg-surface=panel]:placeholder:text-muted-foreground in-data-[cg-surface=ink]:placeholder:text-muted-foreground dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40", className), ...props }));
|
|
6
13
|
}
|
|
7
14
|
export { Textarea };
|
|
8
15
|
//# sourceMappingURL=textarea.js.map
|
package/dist/ui/textarea.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textarea.js","sourceRoot":"","sources":["../../src/ui/textarea.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAA;AAEvC,SAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAoC;IACzE,OAAO,CACL,gCACY,UAAU,EACpB,SAAS,EAAE,EAAE,CACX,
|
|
1
|
+
{"version":3,"file":"textarea.js","sourceRoot":"","sources":["../../src/ui/textarea.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAA;AAEvC;;;;;;GAMG;AACH,SAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAoC;IACzE,OAAO,CACL,gCACY,UAAU,EACpB,SAAS,EAAE,EAAE,CACX,ouBAAouB,EACpuB,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,OAAO,EAAE,QAAQ,EAAE,CAAA"}
|
package/package.json
CHANGED