@stll/ui 0.75.0 → 0.76.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/components/button-classes.d.ts +45 -0
- package/dist/components/button-classes.js +49 -0
- package/dist/components/button.d.ts +1 -3
- package/dist/components/button.js +8 -43
- package/dist/components/checkbox.js +1 -1
- package/dist/components/composer-tokens.d.ts +9 -1
- package/dist/components/composer-tokens.js +9 -1
- package/dist/components/composer.d.ts +2 -2
- package/dist/components/composer.js +4 -4
- package/dist/components/control-face.d.ts +132 -0
- package/dist/components/control-face.js +168 -0
- package/dist/components/court-badge.d.ts +4 -2
- package/dist/components/court-badge.js +5 -3
- package/dist/components/document-mark.shared.d.ts +149 -0
- package/dist/components/document-mark.shared.js +62 -0
- package/dist/components/frame.d.ts +5 -1
- package/dist/components/frame.js +2 -2
- package/dist/components/input-otp-face.d.ts +4 -0
- package/dist/components/input-otp-face.js +15 -0
- package/dist/components/input-otp.d.ts +1 -1
- package/dist/components/input-otp.js +3 -8
- package/dist/components/label-classes.d.ts +20 -0
- package/dist/components/label-classes.js +21 -0
- package/dist/components/label.d.ts +2 -20
- package/dist/components/label.js +2 -19
- package/dist/components/landing-shell.d.ts +64 -0
- package/dist/components/landing-shell.js +189 -0
- package/dist/components/landing.d.ts +2 -39
- package/dist/components/landing.js +2 -66
- package/dist/components/list-shell.d.ts +39 -0
- package/dist/components/list-shell.js +99 -0
- package/dist/components/list.d.ts +3 -24
- package/dist/components/list.js +2 -49
- package/dist/components/segmented-icon-toggle.d.ts +4 -1
- package/dist/components/segmented-icon-toggle.js +5 -4
- package/dist/components/select-classes.d.ts +10 -0
- package/dist/components/select-classes.js +13 -0
- package/dist/components/select.js +3 -7
- package/dist/components/skeleton.d.ts +3 -1
- package/dist/components/skeleton.js +9 -2
- package/dist/components/split-button.d.ts +2 -1
- package/dist/components/split-button.js +6 -14
- package/dist/components/switch.d.ts +1 -5
- package/dist/components/switch.js +2 -5
- package/dist/components/table-cell.d.ts +35 -0
- package/dist/components/table-cell.js +26 -0
- package/dist/components/table-shell.d.ts +126 -0
- package/dist/components/table-shell.js +136 -0
- package/dist/components/table.d.ts +4 -88
- package/dist/components/table.js +21 -70
- package/dist/components/tabs-classes.d.ts +8 -0
- package/dist/components/tabs-classes.js +10 -0
- package/dist/components/tabs.js +4 -3
- package/dist/components/toggle-classes.d.ts +13 -0
- package/dist/components/toggle-classes.js +10 -0
- package/dist/components/toggle-group-classes.d.ts +12 -0
- package/dist/components/toggle-group-classes.js +13 -0
- package/dist/components/toggle-group.js +3 -2
- package/dist/components/truncated-text-face.d.ts +33 -0
- package/dist/components/truncated-text-face.js +30 -0
- package/dist/components/truncated-text.d.ts +1 -6
- package/dist/components/truncated-text.js +1 -15
- package/dist/components/view-toolbar-classes.d.ts +13 -0
- package/dist/components/view-toolbar-classes.js +15 -0
- package/dist/components/view-toolbar-shell.d.ts +24 -0
- package/dist/components/view-toolbar-shell.js +43 -0
- package/dist/components/view-toolbar.d.ts +2 -15
- package/dist/components/view-toolbar.js +8 -26
- package/dist/data-table/table.js +2 -1
- package/dist/icons.d.ts +2 -2
- package/dist/icons.js +2 -2
- package/dist/index.d.ts +15 -9
- package/dist/index.js +11 -8
- package/dist/kanban/card-shell.js +1 -1
- package/dist/kanban/column-bands.d.ts +0 -8
- package/dist/kanban/column-bands.js +1 -18
- package/dist/kanban/column-header-shell.d.ts +39 -0
- package/dist/kanban/column-header-shell.js +48 -0
- package/dist/kanban/column-header.js +9 -12
- package/dist/kanban/index.d.ts +2 -2
- package/dist/kanban/index.js +3 -3
- package/dist/kanban/layout-tokens.d.ts +18 -1
- package/dist/kanban/layout-tokens.js +18 -1
- package/dist/kanban/sticky-lane.d.ts +2 -7
- package/dist/kanban/sticky-lane.js +1 -6
- package/dist/kanban/subgroup-board.js +2 -2
- package/package.json +44 -4
|
@@ -10,9 +10,11 @@
|
|
|
10
10
|
export type CourtBadgeWeight = "solid" | "tinted" | "outline" | "dashed";
|
|
11
11
|
/**
|
|
12
12
|
* `default` stands on its own beside a court's name; `inline` sits inside a
|
|
13
|
-
* line of small text (a list row's meta line) without making it taller
|
|
13
|
+
* line of small text (a list row's meta line) without making it taller;
|
|
14
|
+
* `prose` sits inside running text (an answer's sentence), where it takes the
|
|
15
|
+
* text's own face instead of the monospaced one.
|
|
14
16
|
*/
|
|
15
|
-
export type CourtBadgeSize = "default" | "inline";
|
|
17
|
+
export type CourtBadgeSize = "default" | "inline" | "prose";
|
|
16
18
|
type CourtBadgeProps = {
|
|
17
19
|
/** The court's own abbreviation, in the language its name is in. */
|
|
18
20
|
abbreviation: string;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { cn } from "../lib/utils.js";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
// src/components/court-badge.tsx
|
|
4
|
-
const COURT_BADGE_BASE_CLASS = "inline-flex shrink-0 items-center rounded-sm border font-
|
|
4
|
+
const COURT_BADGE_BASE_CLASS = "inline-flex shrink-0 items-center rounded-sm border font-semibold whitespace-nowrap";
|
|
5
|
+
const COLUMN_FACE_CLASS = "font-mono tracking-wide";
|
|
5
6
|
/**
|
|
6
7
|
* The line box runs a third taller than the type, because these capitals
|
|
7
8
|
* carry diacritics (Ú, Ř, Š) whose ink rises above cap height; a tighter box
|
|
@@ -9,8 +10,9 @@ const COURT_BADGE_BASE_CLASS = "inline-flex shrink-0 items-center rounded-sm bor
|
|
|
9
10
|
* smaller size and drops the padding, so the chip fits a 16px text line.
|
|
10
11
|
*/
|
|
11
12
|
const SIZE_CLASS = {
|
|
12
|
-
default: "px-1 py-0.5 text-xs leading-4",
|
|
13
|
-
inline: "px-0.5
|
|
13
|
+
default: cn(COLUMN_FACE_CLASS, "px-1 py-0.5 text-xs leading-4"),
|
|
14
|
+
inline: cn(COLUMN_FACE_CLASS, "text-3xs px-0.5 leading-3.5"),
|
|
15
|
+
prose: "px-1 text-xs leading-4 tabular-nums"
|
|
14
16
|
};
|
|
15
17
|
/**
|
|
16
18
|
* Every weight keeps a border, because `--muted` is a 4% tint: a borderless
|
|
@@ -18,6 +18,155 @@ export type DocumentMarkArtwork = {
|
|
|
18
18
|
/** A paint reference to one of the mark's gradients. */
|
|
19
19
|
export declare const GRADIENT_REFERENCE: RegExp;
|
|
20
20
|
export declare const DOCUMENT_MARKS: {
|
|
21
|
+
readonly ofd: {
|
|
22
|
+
viewBox: string;
|
|
23
|
+
gradients: never[];
|
|
24
|
+
shapes: ({
|
|
25
|
+
tag: "path";
|
|
26
|
+
attrs: {
|
|
27
|
+
d: string;
|
|
28
|
+
fill: string;
|
|
29
|
+
stroke?: never;
|
|
30
|
+
strokeWidth?: never;
|
|
31
|
+
strokeLinecap?: never;
|
|
32
|
+
strokeLinejoin?: never;
|
|
33
|
+
};
|
|
34
|
+
} | {
|
|
35
|
+
tag: "path";
|
|
36
|
+
attrs: {
|
|
37
|
+
d: string;
|
|
38
|
+
fill: string;
|
|
39
|
+
stroke: string;
|
|
40
|
+
strokeWidth: string;
|
|
41
|
+
strokeLinecap: string;
|
|
42
|
+
strokeLinejoin: string;
|
|
43
|
+
};
|
|
44
|
+
})[];
|
|
45
|
+
};
|
|
46
|
+
readonly uyap: {
|
|
47
|
+
viewBox: string;
|
|
48
|
+
gradients: never[];
|
|
49
|
+
shapes: ({
|
|
50
|
+
tag: "path";
|
|
51
|
+
attrs: {
|
|
52
|
+
d: string;
|
|
53
|
+
fill: string;
|
|
54
|
+
stroke?: never;
|
|
55
|
+
strokeWidth?: never;
|
|
56
|
+
strokeLinecap?: never;
|
|
57
|
+
strokeLinejoin?: never;
|
|
58
|
+
};
|
|
59
|
+
} | {
|
|
60
|
+
tag: "path";
|
|
61
|
+
attrs: {
|
|
62
|
+
d: string;
|
|
63
|
+
fill: string;
|
|
64
|
+
stroke: string;
|
|
65
|
+
strokeWidth: string;
|
|
66
|
+
strokeLinecap: string;
|
|
67
|
+
strokeLinejoin: string;
|
|
68
|
+
};
|
|
69
|
+
})[];
|
|
70
|
+
};
|
|
71
|
+
readonly asicE: {
|
|
72
|
+
viewBox: string;
|
|
73
|
+
gradients: never[];
|
|
74
|
+
shapes: ({
|
|
75
|
+
tag: "path";
|
|
76
|
+
attrs: {
|
|
77
|
+
d: string;
|
|
78
|
+
fill: string;
|
|
79
|
+
stroke?: never;
|
|
80
|
+
strokeWidth?: never;
|
|
81
|
+
strokeLinecap?: never;
|
|
82
|
+
strokeLinejoin?: never;
|
|
83
|
+
};
|
|
84
|
+
} | {
|
|
85
|
+
tag: "path";
|
|
86
|
+
attrs: {
|
|
87
|
+
d: string;
|
|
88
|
+
fill: string;
|
|
89
|
+
stroke: string;
|
|
90
|
+
strokeWidth: string;
|
|
91
|
+
strokeLinecap: string;
|
|
92
|
+
strokeLinejoin: string;
|
|
93
|
+
};
|
|
94
|
+
})[];
|
|
95
|
+
};
|
|
96
|
+
readonly asicS: {
|
|
97
|
+
viewBox: string;
|
|
98
|
+
gradients: never[];
|
|
99
|
+
shapes: ({
|
|
100
|
+
tag: "path";
|
|
101
|
+
attrs: {
|
|
102
|
+
d: string;
|
|
103
|
+
fill: string;
|
|
104
|
+
stroke?: never;
|
|
105
|
+
strokeWidth?: never;
|
|
106
|
+
strokeLinecap?: never;
|
|
107
|
+
strokeLinejoin?: never;
|
|
108
|
+
};
|
|
109
|
+
} | {
|
|
110
|
+
tag: "path";
|
|
111
|
+
attrs: {
|
|
112
|
+
d: string;
|
|
113
|
+
fill: string;
|
|
114
|
+
stroke: string;
|
|
115
|
+
strokeWidth: string;
|
|
116
|
+
strokeLinecap: string;
|
|
117
|
+
strokeLinejoin: string;
|
|
118
|
+
};
|
|
119
|
+
})[];
|
|
120
|
+
};
|
|
121
|
+
readonly cades: {
|
|
122
|
+
viewBox: string;
|
|
123
|
+
gradients: never[];
|
|
124
|
+
shapes: ({
|
|
125
|
+
tag: "path";
|
|
126
|
+
attrs: {
|
|
127
|
+
d: string;
|
|
128
|
+
fill: string;
|
|
129
|
+
stroke?: never;
|
|
130
|
+
strokeWidth?: never;
|
|
131
|
+
strokeLinecap?: never;
|
|
132
|
+
strokeLinejoin?: never;
|
|
133
|
+
};
|
|
134
|
+
} | {
|
|
135
|
+
tag: "path";
|
|
136
|
+
attrs: {
|
|
137
|
+
d: string;
|
|
138
|
+
fill: string;
|
|
139
|
+
stroke: string;
|
|
140
|
+
strokeWidth: string;
|
|
141
|
+
strokeLinecap: string;
|
|
142
|
+
strokeLinejoin: string;
|
|
143
|
+
};
|
|
144
|
+
})[];
|
|
145
|
+
};
|
|
146
|
+
readonly dataBox: {
|
|
147
|
+
readonly viewBox: "0 0 24 24";
|
|
148
|
+
readonly gradients: readonly [];
|
|
149
|
+
readonly shapes: readonly [{
|
|
150
|
+
readonly tag: "rect";
|
|
151
|
+
readonly attrs: {
|
|
152
|
+
readonly x: "1";
|
|
153
|
+
readonly y: "3";
|
|
154
|
+
readonly width: "22";
|
|
155
|
+
readonly height: "18";
|
|
156
|
+
readonly rx: "2";
|
|
157
|
+
readonly fill: "#245c89";
|
|
158
|
+
};
|
|
159
|
+
}, {
|
|
160
|
+
readonly tag: "path";
|
|
161
|
+
readonly attrs: {
|
|
162
|
+
readonly d: "m2 5 9 6a2 2 0 0 0 2 0l9-6M5 14h3l-3 4h3m2 0v-4h3m-3 2h2m3-2h3v4h-3z";
|
|
163
|
+
readonly fill: "none";
|
|
164
|
+
readonly stroke: "#fff";
|
|
165
|
+
readonly strokeWidth: "1.3";
|
|
166
|
+
readonly strokeLinejoin: "round";
|
|
167
|
+
};
|
|
168
|
+
}];
|
|
169
|
+
};
|
|
21
170
|
readonly pdf: {
|
|
22
171
|
readonly viewBox: "0 0 75.320129 92.604164";
|
|
23
172
|
readonly gradients: readonly [];
|
|
@@ -336,7 +336,69 @@ const openDocumentMark = ({ badge, letter, arrows, layers }) => {
|
|
|
336
336
|
]
|
|
337
337
|
};
|
|
338
338
|
};
|
|
339
|
+
const legalDocumentMark = (details) => ({
|
|
340
|
+
viewBox: "0 0 24 24",
|
|
341
|
+
gradients: [],
|
|
342
|
+
shapes: [
|
|
343
|
+
{
|
|
344
|
+
tag: "path",
|
|
345
|
+
attrs: {
|
|
346
|
+
d: "M5 1h9l5 5v15a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2z",
|
|
347
|
+
fill: "#566275"
|
|
348
|
+
}
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
tag: "path",
|
|
352
|
+
attrs: {
|
|
353
|
+
d: "M14 1v5h5",
|
|
354
|
+
fill: "#c2c9d2"
|
|
355
|
+
}
|
|
356
|
+
},
|
|
357
|
+
{
|
|
358
|
+
tag: "path",
|
|
359
|
+
attrs: {
|
|
360
|
+
d: details,
|
|
361
|
+
fill: "none",
|
|
362
|
+
stroke: "#fff",
|
|
363
|
+
strokeWidth: "1.4",
|
|
364
|
+
strokeLinecap: "round",
|
|
365
|
+
strokeLinejoin: "round"
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
]
|
|
369
|
+
});
|
|
370
|
+
const signedDocumentMark = legalDocumentMark("M7 11h8m-8 3h5m1 4 2 2 4-5");
|
|
371
|
+
const structuredDocumentMark = legalDocumentMark("M7 11h8m-8 4h8m-8 4h5");
|
|
339
372
|
const DOCUMENT_MARKS = {
|
|
373
|
+
ofd: structuredDocumentMark,
|
|
374
|
+
uyap: structuredDocumentMark,
|
|
375
|
+
asicE: signedDocumentMark,
|
|
376
|
+
asicS: signedDocumentMark,
|
|
377
|
+
cades: signedDocumentMark,
|
|
378
|
+
dataBox: {
|
|
379
|
+
viewBox: "0 0 24 24",
|
|
380
|
+
gradients: [],
|
|
381
|
+
shapes: [{
|
|
382
|
+
tag: "rect",
|
|
383
|
+
attrs: {
|
|
384
|
+
x: "1",
|
|
385
|
+
y: "3",
|
|
386
|
+
width: "22",
|
|
387
|
+
height: "18",
|
|
388
|
+
rx: "2",
|
|
389
|
+
fill: "#245c89"
|
|
390
|
+
}
|
|
391
|
+
}, {
|
|
392
|
+
tag: "path",
|
|
393
|
+
attrs: {
|
|
394
|
+
d: "m2 5 9 6a2 2 0 0 0 2 0l9-6M5 14h3l-3 4h3m2 0v-4h3m-3 2h2m3-2h3v4h-3z",
|
|
395
|
+
fill: "none",
|
|
396
|
+
stroke: "#fff",
|
|
397
|
+
strokeWidth: "1.3",
|
|
398
|
+
strokeLinejoin: "round"
|
|
399
|
+
}
|
|
400
|
+
}]
|
|
401
|
+
},
|
|
340
402
|
pdf: {
|
|
341
403
|
viewBox: "0 0 75.320129 92.604164",
|
|
342
404
|
gradients: [],
|
|
@@ -2,7 +2,11 @@ import * as React from "react";
|
|
|
2
2
|
declare const Frame: ({ className, ...props }: React.ComponentProps<"div">) => React.JSX.Element;
|
|
3
3
|
declare const FramePanel: ({ className, ...props }: React.ComponentProps<"div">) => React.JSX.Element;
|
|
4
4
|
declare const FrameHeader: ({ className, ...props }: React.ComponentProps<"header">) => React.JSX.Element;
|
|
5
|
-
|
|
5
|
+
/** `destructive` names an irreversible section (a danger zone). */
|
|
6
|
+
type FrameTitleTone = "default" | "destructive";
|
|
7
|
+
declare const FrameTitle: ({ className, tone, ...props }: React.ComponentProps<"div"> & {
|
|
8
|
+
tone?: FrameTitleTone | undefined;
|
|
9
|
+
}) => React.JSX.Element;
|
|
6
10
|
declare const FrameDescription: ({ className, ...props }: React.ComponentProps<"div">) => React.JSX.Element;
|
|
7
11
|
declare const FrameFooter: ({ className, ...props }: React.ComponentProps<"footer">) => React.JSX.Element;
|
|
8
12
|
export { Frame, FrameDescription, FrameFooter, FrameHeader, FramePanel, FrameTitle };
|
package/dist/components/frame.js
CHANGED
|
@@ -16,8 +16,8 @@ const FrameHeader = ({ className, ...props }) => /* @__PURE__ */ jsx("header", {
|
|
|
16
16
|
"data-slot": "frame-panel-header",
|
|
17
17
|
...props
|
|
18
18
|
});
|
|
19
|
-
const FrameTitle = ({ className, ...props }) => /* @__PURE__ */ jsx("div", {
|
|
20
|
-
className: cn("text-sm font-semibold", className),
|
|
19
|
+
const FrameTitle = ({ className, tone = "default", ...props }) => /* @__PURE__ */ jsx("div", {
|
|
20
|
+
className: cn("text-sm font-semibold", tone === "destructive" && "text-destructive-foreground", className),
|
|
21
21
|
"data-slot": "frame-panel-title",
|
|
22
22
|
...props
|
|
23
23
|
});
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
declare const InputOTPGroup: ({ className, ...props }: React.ComponentProps<"div">) => import("react").JSX.Element;
|
|
2
|
+
/** The box behind each code character, including before the input mounts. */
|
|
3
|
+
declare const InputOTPSlotFace: ({ className, ...props }: React.ComponentProps<"div">) => import("react").JSX.Element;
|
|
4
|
+
export { InputOTPGroup, InputOTPSlotFace };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { cn } from "../lib/utils.js";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
// src/components/input-otp-face.tsx
|
|
4
|
+
const InputOTPGroup = ({ className, ...props }) => /* @__PURE__ */ jsx("div", {
|
|
5
|
+
className: cn("flex items-center", className),
|
|
6
|
+
"data-slot": "input-otp-group",
|
|
7
|
+
...props
|
|
8
|
+
});
|
|
9
|
+
/** The box behind each code character, including before the input mounts. */
|
|
10
|
+
const InputOTPSlotFace = ({ className, ...props }) => /* @__PURE__ */ jsx("div", {
|
|
11
|
+
className: cn("border-input aria-invalid:border-destructive data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:border-destructive data-[active=true]:aria-invalid:ring-destructive/20 dark:bg-input/30 dark:data-[active=true]:aria-invalid:ring-destructive/40 relative flex h-9 w-9 items-center justify-center border-y border-e text-sm shadow-xs outline-none first:rounded-s-md first:border-s last:rounded-e-md data-[active=true]:z-10 data-[active=true]:ring-[3px]", className),
|
|
12
|
+
"data-slot": "input-otp-slot",
|
|
13
|
+
...props
|
|
14
|
+
});
|
|
15
|
+
export { InputOTPGroup, InputOTPSlotFace };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
+
import { InputOTPGroup } from "./input-otp-face.js";
|
|
2
3
|
import { OTPInput } from "input-otp";
|
|
3
4
|
declare const InputOTP: ({ className, containerClassName, ...props }: React.ComponentProps<typeof OTPInput> & {
|
|
4
5
|
containerClassName?: string;
|
|
5
6
|
}) => React.JSX.Element;
|
|
6
|
-
declare const InputOTPGroup: ({ className, ...props }: React.ComponentProps<"div">) => React.JSX.Element;
|
|
7
7
|
declare const InputOTPSlot: ({ index, className, ...props }: React.ComponentProps<"div"> & {
|
|
8
8
|
index: number;
|
|
9
9
|
}) => React.JSX.Element;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { MinusIcon } from "../icons.js";
|
|
3
3
|
import { cn } from "../lib/utils.js";
|
|
4
|
+
import { InputOTPGroup, InputOTPSlotFace } from "./input-otp-face.js";
|
|
4
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
6
|
import * as React from "react";
|
|
6
7
|
import { OTPInput, OTPInputContext } from "input-otp";
|
|
@@ -11,17 +12,11 @@ const InputOTP = ({ className, containerClassName, ...props }) => /* @__PURE__ *
|
|
|
11
12
|
"data-slot": "input-otp",
|
|
12
13
|
...props
|
|
13
14
|
});
|
|
14
|
-
const InputOTPGroup = ({ className, ...props }) => /* @__PURE__ */ jsx("div", {
|
|
15
|
-
className: cn("flex items-center", className),
|
|
16
|
-
"data-slot": "input-otp-group",
|
|
17
|
-
...props
|
|
18
|
-
});
|
|
19
15
|
const InputOTPSlot = ({ index, className, ...props }) => {
|
|
20
16
|
const { char, hasFakeCaret, isActive } = React.use(OTPInputContext).slots[index] ?? {};
|
|
21
|
-
return /* @__PURE__ */ jsxs(
|
|
22
|
-
className
|
|
17
|
+
return /* @__PURE__ */ jsxs(InputOTPSlotFace, {
|
|
18
|
+
className,
|
|
23
19
|
"data-active": isActive,
|
|
24
|
-
"data-slot": "input-otp-slot",
|
|
25
20
|
...props,
|
|
26
21
|
children: [char, hasFakeCaret && /* @__PURE__ */ jsx("div", {
|
|
27
22
|
className: "pointer-events-none absolute inset-0 flex items-center justify-center",
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* - `default`: the caption above or beside a control.
|
|
3
|
+
* - `choice`: one row of a list of choices, wrapping its radio or checkbox so
|
|
4
|
+
* the whole row picks it; it highlights on hover and rings while the
|
|
5
|
+
* control inside has keyboard focus.
|
|
6
|
+
* - `choice-card`: a bordered card wrapping its radio, for choices that carry
|
|
7
|
+
* a description; the chosen card takes the primary border.
|
|
8
|
+
* - `muted`: a quiet caption in small type, for a filter bar or a dense side
|
|
9
|
+
* form where the controls, not their names, carry the eye.
|
|
10
|
+
*
|
|
11
|
+
* The choice variants dim and stop inviting a click while their control is
|
|
12
|
+
* disabled.
|
|
13
|
+
*/
|
|
14
|
+
export declare const LABEL_VARIANT_CLASS_NAME: {
|
|
15
|
+
readonly default: "text-foreground inline-flex items-center gap-2 text-base/4.5 font-medium sm:text-sm/4";
|
|
16
|
+
readonly choice: "hover:bg-muted/60 has-focus-visible:ring-ring flex min-h-11 cursor-pointer items-center gap-2 rounded-sm px-1 py-1.5 text-sm has-focus-visible:ring-2 has-disabled:cursor-not-allowed has-disabled:opacity-64";
|
|
17
|
+
readonly "choice-card": "has-checked:border-primary has-checked:bg-muted/50 flex min-h-11 cursor-pointer items-start gap-3 rounded-md border p-3 has-disabled:cursor-not-allowed has-disabled:opacity-50";
|
|
18
|
+
readonly muted: "text-muted-foreground inline-flex items-center gap-2 text-xs/4 font-medium";
|
|
19
|
+
};
|
|
20
|
+
export type LabelVariant = keyof typeof LABEL_VARIANT_CLASS_NAME;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// src/components/label-classes.ts
|
|
2
|
+
/**
|
|
3
|
+
* - `default`: the caption above or beside a control.
|
|
4
|
+
* - `choice`: one row of a list of choices, wrapping its radio or checkbox so
|
|
5
|
+
* the whole row picks it; it highlights on hover and rings while the
|
|
6
|
+
* control inside has keyboard focus.
|
|
7
|
+
* - `choice-card`: a bordered card wrapping its radio, for choices that carry
|
|
8
|
+
* a description; the chosen card takes the primary border.
|
|
9
|
+
* - `muted`: a quiet caption in small type, for a filter bar or a dense side
|
|
10
|
+
* form where the controls, not their names, carry the eye.
|
|
11
|
+
*
|
|
12
|
+
* The choice variants dim and stop inviting a click while their control is
|
|
13
|
+
* disabled.
|
|
14
|
+
*/
|
|
15
|
+
const LABEL_VARIANT_CLASS_NAME = {
|
|
16
|
+
default: "text-foreground inline-flex items-center gap-2 text-base/4.5 font-medium sm:text-sm/4",
|
|
17
|
+
choice: "hover:bg-muted/60 has-focus-visible:ring-ring flex min-h-11 cursor-pointer items-center gap-2 rounded-sm px-1 py-1.5 text-sm has-focus-visible:ring-2 has-disabled:cursor-not-allowed has-disabled:opacity-64",
|
|
18
|
+
"choice-card": "has-checked:border-primary has-checked:bg-muted/50 flex min-h-11 cursor-pointer items-start gap-3 rounded-md border p-3 has-disabled:cursor-not-allowed has-disabled:opacity-50",
|
|
19
|
+
muted: "text-muted-foreground inline-flex items-center gap-2 text-xs/4 font-medium"
|
|
20
|
+
};
|
|
21
|
+
export { LABEL_VARIANT_CLASS_NAME };
|
|
@@ -1,24 +1,6 @@
|
|
|
1
|
+
import { LabelVariant } from "./label-classes.js";
|
|
1
2
|
import { useRender } from "@base-ui/react/use-render";
|
|
2
|
-
/**
|
|
3
|
-
* - `default`: the caption above or beside a control.
|
|
4
|
-
* - `choice`: one row of a list of choices, wrapping its radio or checkbox so
|
|
5
|
-
* the whole row picks it; it highlights on hover and rings while the
|
|
6
|
-
* control inside has keyboard focus.
|
|
7
|
-
* - `choice-card`: a bordered card wrapping its radio, for choices that carry
|
|
8
|
-
* a description; the chosen card takes the primary border.
|
|
9
|
-
* - `muted`: a quiet caption in small type, for a filter bar or a dense side
|
|
10
|
-
* form where the controls, not their names, carry the eye.
|
|
11
|
-
*
|
|
12
|
-
* The choice variants dim and stop inviting a click while their control is
|
|
13
|
-
* disabled.
|
|
14
|
-
*/
|
|
15
|
-
declare const LABEL_VARIANT_CLASS_NAME: {
|
|
16
|
-
readonly default: "text-foreground inline-flex items-center gap-2 text-base/4.5 font-medium sm:text-sm/4";
|
|
17
|
-
readonly choice: "hover:bg-muted/60 has-focus-visible:ring-ring flex min-h-11 cursor-pointer items-center gap-2 rounded-sm px-1 py-1.5 text-sm has-focus-visible:ring-2 has-disabled:cursor-not-allowed has-disabled:opacity-64";
|
|
18
|
-
readonly "choice-card": "has-checked:border-primary has-checked:bg-muted/50 flex min-h-11 cursor-pointer items-start gap-3 rounded-md border p-3 has-disabled:cursor-not-allowed has-disabled:opacity-50";
|
|
19
|
-
readonly muted: "text-muted-foreground inline-flex items-center gap-2 text-xs/4 font-medium";
|
|
20
|
-
};
|
|
21
|
-
type LabelVariant = keyof typeof LABEL_VARIANT_CLASS_NAME;
|
|
3
|
+
/** A caption for a control; the variants are described in ./label-classes.ts. */
|
|
22
4
|
declare function Label({ className, render, variant, ...props }: useRender.ComponentProps<"label"> & {
|
|
23
5
|
variant?: LabelVariant;
|
|
24
6
|
}): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
package/dist/components/label.js
CHANGED
|
@@ -1,27 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "../lib/utils.js";
|
|
3
|
+
import { LABEL_VARIANT_CLASS_NAME } from "./label-classes.js";
|
|
3
4
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
4
5
|
import { useRender } from "@base-ui/react/use-render";
|
|
5
6
|
// src/components/label.tsx
|
|
6
|
-
/**
|
|
7
|
-
* - `default`: the caption above or beside a control.
|
|
8
|
-
* - `choice`: one row of a list of choices, wrapping its radio or checkbox so
|
|
9
|
-
* the whole row picks it; it highlights on hover and rings while the
|
|
10
|
-
* control inside has keyboard focus.
|
|
11
|
-
* - `choice-card`: a bordered card wrapping its radio, for choices that carry
|
|
12
|
-
* a description; the chosen card takes the primary border.
|
|
13
|
-
* - `muted`: a quiet caption in small type, for a filter bar or a dense side
|
|
14
|
-
* form where the controls, not their names, carry the eye.
|
|
15
|
-
*
|
|
16
|
-
* The choice variants dim and stop inviting a click while their control is
|
|
17
|
-
* disabled.
|
|
18
|
-
*/
|
|
19
|
-
const LABEL_VARIANT_CLASS_NAME = {
|
|
20
|
-
default: "text-foreground inline-flex items-center gap-2 text-base/4.5 font-medium sm:text-sm/4",
|
|
21
|
-
choice: "hover:bg-muted/60 has-focus-visible:ring-ring flex min-h-11 cursor-pointer items-center gap-2 rounded-sm px-1 py-1.5 text-sm has-focus-visible:ring-2 has-disabled:cursor-not-allowed has-disabled:opacity-64",
|
|
22
|
-
"choice-card": "has-checked:border-primary has-checked:bg-muted/50 flex min-h-11 cursor-pointer items-start gap-3 rounded-md border p-3 has-disabled:cursor-not-allowed has-disabled:opacity-50",
|
|
23
|
-
muted: "text-muted-foreground inline-flex items-center gap-2 text-xs/4 font-medium"
|
|
24
|
-
};
|
|
7
|
+
/** A caption for a control; the variants are described in ./label-classes.ts. */
|
|
25
8
|
function Label({ className, render, variant = "default", ...props }) {
|
|
26
9
|
const defaultProps = {
|
|
27
10
|
className: cn(LABEL_VARIANT_CLASS_NAME[variant], className),
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { ReactElement, ReactNode } from "react";
|
|
2
|
+
type LandingLayoutProps = {
|
|
3
|
+
/** Header-slot actions that belong to the page rather than the fold. */
|
|
4
|
+
actions?: ReactNode | undefined;
|
|
5
|
+
/** The layout stands in for the page while it loads (a pending view). */
|
|
6
|
+
placeholder?: boolean | undefined;
|
|
7
|
+
/** The greeting and the box; centred in the upper fold. */
|
|
8
|
+
hero: ReactNode;
|
|
9
|
+
/** The columns; take the rest of the height, each scrolling on its own. */
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
/** Below the columns, in its own bounded scroll: crawlable navigation. */
|
|
12
|
+
footer?: ReactNode | undefined;
|
|
13
|
+
};
|
|
14
|
+
export declare const LandingLayout: ({ actions, placeholder, hero, children, footer }: LandingLayoutProps) => import("react").JSX.Element;
|
|
15
|
+
type LandingGreetingProps = {
|
|
16
|
+
/** The mark in the tile: the product mark, or the section's icon. */
|
|
17
|
+
icon: ReactNode;
|
|
18
|
+
/** The one line under the tile, as the page's heading. */
|
|
19
|
+
children: ReactNode;
|
|
20
|
+
};
|
|
21
|
+
export declare const LandingGreeting: ({ icon, children }: LandingGreetingProps) => import("react").JSX.Element;
|
|
22
|
+
/** A column's heading: an icon and a sentence-case label, as a link or a trigger. */
|
|
23
|
+
export declare const LANDING_SECTION_HEADING_CLASS = "text-foreground hover:bg-accent/50 focus-visible:ring-ring [&>svg]:text-muted-foreground flex items-center gap-2 rounded-md px-2 py-0.5 text-sm font-semibold outline-none focus-visible:ring-2";
|
|
24
|
+
/** A row of a column, as a link or a button. Its text lines up with the
|
|
25
|
+
* heading's label; the icon slot under the heading icon stays empty unless
|
|
26
|
+
* the icon identifies the row (a matter's colour). */
|
|
27
|
+
export declare const LANDING_ROW_CLASS = "group hover:bg-accent/50 focus-visible:ring-ring rounded-md px-2 py-1.5 text-start outline-none focus-visible:ring-2";
|
|
28
|
+
/**
|
|
29
|
+
* A column's rows while they load, on a `LandingItemText` row's lines (the
|
|
30
|
+
* empty icon slot, a `text-sm` title over a `text-xs` meta line), so the rows
|
|
31
|
+
* that arrive take the placeholders' place without moving anything. With a
|
|
32
|
+
* `label` the stack is announced as one busy region; without one (inside a
|
|
33
|
+
* pending frame that already announces itself) it is decoration.
|
|
34
|
+
*/
|
|
35
|
+
export declare const LandingRowsPending: ({ label }: {
|
|
36
|
+
label?: string | undefined;
|
|
37
|
+
}) => import("react").JSX.Element;
|
|
38
|
+
/** A column heading whose label is not known yet: its real icon (it needs no
|
|
39
|
+
* data) and a bar on the label's line, in the heading's own inset. */
|
|
40
|
+
export declare const LandingSectionHeadingPending: ({ icon }: {
|
|
41
|
+
icon?: ReactElement | undefined;
|
|
42
|
+
}) => import("react").JSX.Element;
|
|
43
|
+
/** Which box the hero holds: the chat composer, whose trailing controls sit
|
|
44
|
+
* on a 38px hit row, or the law entry box, whose single search button is
|
|
45
|
+
* the (+) trigger's 28px circle. */
|
|
46
|
+
export type LandingBox = "composer" | "search";
|
|
47
|
+
/**
|
|
48
|
+
* The hero's box before it mounts (the chat composer, the law entry box),
|
|
49
|
+
* from the composer tokens both are built on: the bordered box, the
|
|
50
|
+
* three-line text well, the action row with its round ends, and the status
|
|
51
|
+
* row's line beneath.
|
|
52
|
+
*/
|
|
53
|
+
export declare const LandingBoxPending: ({ box }: {
|
|
54
|
+
box: LandingBox;
|
|
55
|
+
}) => import("react").JSX.Element;
|
|
56
|
+
type LandingSectionProps = {
|
|
57
|
+
children: ReactNode;
|
|
58
|
+
heading: ReactNode;
|
|
59
|
+
};
|
|
60
|
+
/** A column: its heading stays put, its rows scroll beneath it. The rows get
|
|
61
|
+
* the same ring room as the hero box, since the viewport clips a flush row's
|
|
62
|
+
* focus ring; the heading takes the same inset so the labels stay aligned. */
|
|
63
|
+
export declare const LandingSection: ({ children, heading }: LandingSectionProps) => import("react").JSX.Element;
|
|
64
|
+
export {};
|