@glasshome/ui 1.21.1 → 1.21.2
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/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/lib/use-is-mobile.d.ts +3 -1
- package/dist/solid/index.d.ts +9 -9
- package/dist/solid/index.js +5431 -5424
- package/dist/{utils-CMk7R3zM.js → utils-D5blHO4O.js} +624 -622
- package/package.json +128 -126
- package/scripts/check-gallery.ts +142 -142
- package/scripts/check-pack.ts +13 -13
- package/scripts/check-structural-classes.ts +20 -20
- package/scripts/check-tokens.ts +27 -27
- package/scripts/check-ui-drift.mjs +103 -103
- package/src/index.ts +75 -80
- package/src/lib/alert-tones.ts +41 -41
- package/src/lib/anchor-placement.ts +21 -21
- package/src/lib/button-variants.ts +28 -28
- package/src/lib/card-classes.ts +9 -9
- package/src/lib/carousel-classes.ts +14 -14
- package/src/lib/glass-tone.ts +11 -11
- package/src/lib/input-classes.ts +6 -6
- package/src/lib/layers.ts +4 -4
- package/src/lib/logo-lockup.ts +8 -8
- package/src/lib/menu-classes.ts +2 -2
- package/src/lib/motion-classes.ts +8 -8
- package/src/lib/motion-window.ts +24 -24
- package/src/lib/overlay-classes.ts +6 -6
- package/src/lib/pill-classes.ts +3 -3
- package/src/lib/position-bar-classes.ts +1 -1
- package/src/lib/spotlight-geometry.ts +67 -67
- package/src/lib/thumb-classes.ts +2 -2
- package/src/lib/tier-badge.ts +16 -16
- package/src/lib/use-is-mobile.ts +17 -14
- package/src/lib/utils.ts +1 -1
- package/src/solid/accordion.tsx +41 -41
- package/src/solid/alert-dialog.tsx +95 -95
- package/src/solid/alert.tsx +88 -88
- package/src/solid/area-picker.tsx +204 -204
- package/src/solid/aspect-ratio.tsx +13 -13
- package/src/solid/avatar.tsx +27 -27
- package/src/solid/badge.tsx +49 -49
- package/src/solid/bottom-sheet/arbitration.ts +22 -22
- package/src/solid/bottom-sheet/bottom-sheet.tsx +394 -394
- package/src/solid/bottom-sheet/drag-controller.ts +201 -201
- package/src/solid/bottom-sheet/focus-trap.ts +51 -47
- package/src/solid/bottom-sheet/index.ts +12 -12
- package/src/solid/bottom-sheet/keyboard.ts +25 -25
- package/src/solid/bottom-sheet/scroll-lock.ts +46 -46
- package/src/solid/bottom-sheet/state-machine.ts +28 -28
- package/src/solid/bottom-sheet/velocity.ts +29 -29
- package/src/solid/breadcrumb.tsx +76 -76
- package/src/solid/button-group.tsx +46 -46
- package/src/solid/button.tsx +19 -19
- package/src/solid/card.tsx +67 -67
- package/src/solid/carousel.tsx +246 -246
- package/src/solid/charts.tsx +253 -253
- package/src/solid/checkbox.tsx +51 -51
- package/src/solid/collapsible.tsx +22 -22
- package/src/solid/color-disc.tsx +213 -213
- package/src/solid/color-slider.tsx +81 -81
- package/src/solid/color-wheel.tsx +61 -61
- package/src/solid/context-menu.tsx +63 -63
- package/src/solid/copy-button.tsx +31 -31
- package/src/solid/count-pill.tsx +11 -11
- package/src/solid/dashboard-preview.tsx +104 -104
- package/src/solid/data-table.tsx +228 -228
- package/src/solid/dialog-parts.tsx +127 -127
- package/src/solid/dialog.tsx +113 -113
- package/src/solid/dock-paging.ts +9 -9
- package/src/solid/dock.tsx +339 -339
- package/src/solid/docked-panel.tsx +35 -35
- package/src/solid/dropdown-menu.tsx +77 -77
- package/src/solid/empty.tsx +70 -70
- package/src/solid/entity-data.ts +38 -38
- package/src/solid/entity-selector.tsx +634 -634
- package/src/solid/field.tsx +205 -205
- package/src/solid/form.tsx +159 -159
- package/src/solid/hero-action.tsx +85 -85
- package/src/solid/hover-card.tsx +11 -11
- package/src/solid/icon-picker.tsx +401 -401
- package/src/solid/icon.tsx +101 -78
- package/src/solid/image-picker.tsx +416 -414
- package/src/solid/index.ts +265 -304
- package/src/solid/input-group.tsx +123 -123
- package/src/solid/input-otp.tsx +143 -143
- package/src/solid/input.tsx +4 -4
- package/src/solid/item.tsx +130 -130
- package/src/solid/kbd.tsx +20 -20
- package/src/solid/label.tsx +12 -12
- package/src/solid/list-reorder.ts +122 -122
- package/src/solid/logo.tsx +60 -60
- package/src/solid/media-copy.ts +21 -21
- package/src/solid/media-store.ts +56 -56
- package/src/solid/media-tile.tsx +85 -85
- package/src/solid/menu-parts.tsx +164 -164
- package/src/solid/number-field.tsx +56 -56
- package/src/solid/option-card.tsx +164 -164
- package/src/solid/ornament.tsx +43 -43
- package/src/solid/overlay.tsx +4 -4
- package/src/solid/page-header.tsx +75 -75
- package/src/solid/pagination.tsx +80 -80
- package/src/solid/password-input.tsx +51 -51
- package/src/solid/picker-row.tsx +83 -83
- package/src/solid/picker-search.tsx +65 -63
- package/src/solid/picker-trigger.tsx +59 -57
- package/src/solid/popover.tsx +54 -54
- package/src/solid/preview-tile.tsx +67 -67
- package/src/solid/progress.tsx +21 -21
- package/src/solid/radio-group.tsx +51 -51
- package/src/solid/resizable.tsx +128 -128
- package/src/solid/responsive-dialog.tsx +134 -134
- package/src/solid/schema-form.tsx +743 -743
- package/src/solid/scope-indicator.tsx +5 -5
- package/src/solid/scroll-area.tsx +16 -16
- package/src/solid/section-card.tsx +281 -281
- package/src/solid/select.tsx +101 -101
- package/src/solid/separator.tsx +25 -25
- package/src/solid/settings-row.tsx +122 -122
- package/src/solid/sheet.tsx +96 -96
- package/src/solid/skeleton.tsx +8 -8
- package/src/solid/slider.tsx +132 -132
- package/src/solid/sliding-indicator.tsx +280 -265
- package/src/solid/sonner.tsx +164 -164
- package/src/solid/spinner.tsx +12 -12
- package/src/solid/spotlight.tsx +140 -140
- package/src/solid/step-indicator.tsx +18 -18
- package/src/solid/swatch-picker.tsx +38 -38
- package/src/solid/switch.tsx +52 -52
- package/src/solid/table.tsx +63 -63
- package/src/solid/tabs.tsx +93 -93
- package/src/solid/textarea.tsx +8 -8
- package/src/solid/toggle-group.tsx +83 -83
- package/src/solid/toggle.tsx +33 -33
- package/src/solid/tooltip.tsx +16 -16
- package/src/solid/widget-card.tsx +90 -90
- package/src/solid/widget-identity.tsx +99 -99
- package/src/solid/widget-trust-badge.tsx +20 -20
- package/src/styles/globals.css +316 -319
- package/src/styles/theme.css +448 -448
- package/src/tokens/hex.ts +29 -29
- package/src/tokens/material.ts +75 -75
- package/src/tokens/presets.ts +303 -303
- package/src/tokens/readability.ts +32 -32
- package/src/tokens/theme-colors.ts +95 -95
- package/src/tokens/theme-css.ts +22 -22
- package/src/tokens/theme-recipe.ts +106 -106
package/src/solid/field.tsx
CHANGED
|
@@ -1,253 +1,253 @@
|
|
|
1
1
|
import { cva, type VariantProps } from "cva";
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
type Component,
|
|
4
|
+
type ComponentProps,
|
|
5
|
+
createMemo,
|
|
6
|
+
For,
|
|
7
|
+
type ParentComponent,
|
|
8
|
+
Show,
|
|
9
|
+
splitProps,
|
|
10
10
|
} from "solid-js";
|
|
11
11
|
import { cn } from "../lib/utils.js";
|
|
12
12
|
import { Label } from "./label.js";
|
|
13
13
|
import { Separator } from "./separator.js";
|
|
14
14
|
|
|
15
15
|
const FieldSet: Component<ComponentProps<"fieldset">> = (props) => {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
16
|
+
const [local, rest] = splitProps(props, ["class"]);
|
|
17
|
+
return (
|
|
18
|
+
<fieldset
|
|
19
|
+
data-slot="field-set"
|
|
20
|
+
class={cn(
|
|
21
|
+
// min-w-0: a native <fieldset> computes its own min-content width
|
|
22
|
+
// from its widest child and ignores descendant min-w-0 overrides,
|
|
23
|
+
// so wide unwrapped content (a card title) can push it past a flex
|
|
24
|
+
// parent's width instead of shrinking with it.
|
|
25
|
+
// [&>legend]: the rendered legend is not a flex item, so the gap
|
|
26
|
+
// above cannot reach it; the container still owns that distance.
|
|
27
|
+
"flex min-w-0 flex-col gap-4 [&>legend]:mb-4",
|
|
28
|
+
local.class,
|
|
29
|
+
)}
|
|
30
|
+
{...rest}
|
|
31
|
+
/>
|
|
32
|
+
);
|
|
33
33
|
};
|
|
34
34
|
|
|
35
35
|
const FieldLegend: Component<ComponentProps<"legend"> & { variant?: "legend" | "label" }> = (
|
|
36
|
-
|
|
36
|
+
props,
|
|
37
37
|
) => {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
38
|
+
const [local, rest] = splitProps(props, ["class", "variant"] as const);
|
|
39
|
+
const variant = () => local.variant ?? "legend";
|
|
40
|
+
return (
|
|
41
|
+
<legend
|
|
42
|
+
data-slot="field-legend"
|
|
43
|
+
data-variant={variant()}
|
|
44
|
+
class={cn(
|
|
45
|
+
"leading-tight",
|
|
46
|
+
"data-[variant=legend]:text-base data-[variant=legend]:font-semibold",
|
|
47
|
+
"data-[variant=label]:text-sm data-[variant=label]:font-medium",
|
|
48
|
+
local.class,
|
|
49
|
+
)}
|
|
50
|
+
{...rest}
|
|
51
|
+
/>
|
|
52
|
+
);
|
|
53
53
|
};
|
|
54
54
|
|
|
55
55
|
const FieldGroup: Component<ComponentProps<"div">> = (props) => {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
56
|
+
const [local, rest] = splitProps(props, ["class"]);
|
|
57
|
+
return (
|
|
58
|
+
<div
|
|
59
|
+
data-slot="field-group"
|
|
60
|
+
class={cn("group/field-group @container/field-group flex w-full flex-col gap-6", local.class)}
|
|
61
|
+
{...rest}
|
|
62
|
+
/>
|
|
63
|
+
);
|
|
64
64
|
};
|
|
65
65
|
|
|
66
66
|
const fieldVariants = cva({
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
67
|
+
base: "group/field data-[invalid=true]:text-destructive flex w-full",
|
|
68
|
+
variants: {
|
|
69
|
+
orientation: {
|
|
70
|
+
vertical: ["flex-col gap-2 [&>*]:w-full [&>.sr-only]:w-auto"],
|
|
71
|
+
horizontal: [
|
|
72
|
+
// A stack of content tops out against the control; a single-line
|
|
73
|
+
// caption row centres on it.
|
|
74
|
+
"flex-row items-start gap-3 not-has-[>[data-slot=field-content]]:items-center",
|
|
75
|
+
"[&>[data-slot=field-label]]:flex-auto [&>[data-slot=field-title]]:flex-auto",
|
|
76
|
+
],
|
|
77
|
+
responsive: [
|
|
78
|
+
"flex-col gap-2 @md/field-group:flex-row @md/field-group:items-start @md/field-group:gap-3 [&>*]:w-full @md/field-group:[&>*]:w-auto [&>.sr-only]:w-auto",
|
|
79
|
+
"@md/field-group:not-has-[>[data-slot=field-content]]:items-center",
|
|
80
|
+
"@md/field-group:[&>[data-slot=field-label]]:flex-auto @md/field-group:[&>[data-slot=field-title]]:flex-auto",
|
|
81
|
+
],
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
defaultVariants: {
|
|
85
|
+
orientation: "vertical",
|
|
86
|
+
},
|
|
87
87
|
});
|
|
88
88
|
|
|
89
89
|
const Field: Component<ComponentProps<"div"> & VariantProps<typeof fieldVariants>> = (props) => {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
90
|
+
const [local, rest] = splitProps(props, ["class", "orientation"] as const);
|
|
91
|
+
const orientation = () => local.orientation ?? "vertical";
|
|
92
|
+
return (
|
|
93
|
+
// biome-ignore lint/a11y/useSemanticElements: fieldset would carry default browser styling and break the flex layout; role=group conveys the same semantics.
|
|
94
|
+
<div
|
|
95
|
+
role="group"
|
|
96
|
+
data-slot="field"
|
|
97
|
+
data-orientation={orientation()}
|
|
98
|
+
class={cn(fieldVariants({ orientation: orientation() }), local.class)}
|
|
99
|
+
{...rest}
|
|
100
|
+
/>
|
|
101
|
+
);
|
|
102
102
|
};
|
|
103
103
|
|
|
104
104
|
const FieldContent: Component<ComponentProps<"div">> = (props) => {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
105
|
+
const [local, rest] = splitProps(props, ["class"]);
|
|
106
|
+
return (
|
|
107
|
+
<div
|
|
108
|
+
data-slot="field-content"
|
|
109
|
+
class={cn("group/field-content flex flex-1 flex-col gap-1.5 leading-snug", local.class)}
|
|
110
|
+
{...rest}
|
|
111
|
+
/>
|
|
112
|
+
);
|
|
113
113
|
};
|
|
114
114
|
|
|
115
115
|
const FieldLabel: Component<ComponentProps<typeof Label>> = (props) => {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
116
|
+
const [local, rest] = splitProps(props, ["class"]);
|
|
117
|
+
return (
|
|
118
|
+
<Label
|
|
119
|
+
data-slot="field-label"
|
|
120
|
+
class={cn(
|
|
121
|
+
"group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50",
|
|
122
|
+
"has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border [&>*]:data-[slot=field]:p-4",
|
|
123
|
+
// Card-shaped labels only: a plain checkbox label wraps a checked control
|
|
124
|
+
// too, and would take the whole tint with it.
|
|
125
|
+
"has-[>[data-slot=field]]:has-data-[checked]:border-primary has-[>[data-slot=field]]:has-data-[checked]:bg-primary/5 dark:has-[>[data-slot=field]]:has-data-[checked]:bg-primary/10",
|
|
126
|
+
local.class,
|
|
127
|
+
)}
|
|
128
|
+
{...rest}
|
|
129
|
+
/>
|
|
130
|
+
);
|
|
131
131
|
};
|
|
132
132
|
|
|
133
133
|
const FieldTitle: Component<ComponentProps<"div">> = (props) => {
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
134
|
+
const [local, rest] = splitProps(props, ["class"]);
|
|
135
|
+
return (
|
|
136
|
+
<div
|
|
137
|
+
data-slot="field-title"
|
|
138
|
+
class={cn(
|
|
139
|
+
"flex w-fit items-center gap-2 text-sm leading-snug font-medium group-data-[disabled=true]/field:opacity-50",
|
|
140
|
+
local.class,
|
|
141
|
+
)}
|
|
142
|
+
{...rest}
|
|
143
|
+
/>
|
|
144
|
+
);
|
|
145
145
|
};
|
|
146
146
|
|
|
147
147
|
const FieldDescription: Component<ComponentProps<"p">> = (props) => {
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
148
|
+
const [local, rest] = splitProps(props, ["class"]);
|
|
149
|
+
return (
|
|
150
|
+
<p
|
|
151
|
+
data-slot="field-description"
|
|
152
|
+
class={cn(
|
|
153
|
+
"text-muted-foreground text-sm leading-normal font-normal group-has-[[data-orientation=horizontal]]/field:text-balance",
|
|
154
|
+
// Dims with its title, else a disabled row reads as description-first.
|
|
155
|
+
"group-data-[disabled=true]/field:opacity-50",
|
|
156
|
+
"[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4",
|
|
157
|
+
local.class,
|
|
158
|
+
)}
|
|
159
|
+
{...rest}
|
|
160
|
+
/>
|
|
161
|
+
);
|
|
162
162
|
};
|
|
163
163
|
|
|
164
164
|
/** Rows that belong to the control above them: stacked flush, grouped by proximity alone. */
|
|
165
165
|
const FieldSubGroup: Component<ComponentProps<"div">> = (props) => {
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
166
|
+
const [local, rest] = splitProps(props, ["class"]);
|
|
167
|
+
return (
|
|
168
|
+
<div data-slot="field-sub-group" class={cn("flex flex-col gap-1", local.class)} {...rest} />
|
|
169
|
+
);
|
|
170
170
|
};
|
|
171
171
|
|
|
172
172
|
const FieldSeparator: ParentComponent<ComponentProps<"div">> = (props) => {
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
173
|
+
const [local, rest] = splitProps(props, ["children", "class"]);
|
|
174
|
+
return (
|
|
175
|
+
<div
|
|
176
|
+
data-slot="field-separator"
|
|
177
|
+
data-content={!!local.children}
|
|
178
|
+
class={cn("relative h-5 text-sm", local.class)}
|
|
179
|
+
{...rest}
|
|
180
|
+
>
|
|
181
|
+
<Separator class="absolute inset-0 top-1/2" />
|
|
182
|
+
<Show when={local.children}>
|
|
183
|
+
<span
|
|
184
|
+
class="bg-card text-muted-foreground relative mx-auto block w-fit px-2"
|
|
185
|
+
data-slot="field-separator-content"
|
|
186
|
+
>
|
|
187
|
+
{local.children}
|
|
188
|
+
</span>
|
|
189
|
+
</Show>
|
|
190
|
+
</div>
|
|
191
|
+
);
|
|
192
192
|
};
|
|
193
193
|
|
|
194
194
|
const FieldError: Component<
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
195
|
+
ComponentProps<"div"> & {
|
|
196
|
+
errors?: Array<{ message?: string } | undefined>;
|
|
197
|
+
}
|
|
198
198
|
> = (props) => {
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
199
|
+
const [local, rest] = splitProps(props, ["class", "children", "errors"] as const);
|
|
200
|
+
|
|
201
|
+
const content = createMemo(() => {
|
|
202
|
+
if (local.children) {
|
|
203
|
+
return local.children;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
if (!local.errors?.length) {
|
|
207
|
+
return null;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
const uniqueErrors = [
|
|
211
|
+
...new Map(local.errors.map((error) => [error?.message, error])).values(),
|
|
212
|
+
];
|
|
213
|
+
|
|
214
|
+
if (uniqueErrors.length === 1) {
|
|
215
|
+
return uniqueErrors[0]?.message;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
return (
|
|
219
|
+
<ul class="flex list-disc flex-col gap-1 pl-4">
|
|
220
|
+
<For each={uniqueErrors}>
|
|
221
|
+
{(error) => <Show when={error?.message}>{(message) => <li>{message()}</li>}</Show>}
|
|
222
|
+
</For>
|
|
223
|
+
</ul>
|
|
224
|
+
);
|
|
225
|
+
});
|
|
226
|
+
|
|
227
|
+
return (
|
|
228
|
+
<Show when={content()}>
|
|
229
|
+
<div
|
|
230
|
+
role="alert"
|
|
231
|
+
data-slot="field-error"
|
|
232
|
+
class={cn("text-destructive text-sm font-normal", local.class)}
|
|
233
|
+
{...rest}
|
|
234
|
+
>
|
|
235
|
+
{content()}
|
|
236
|
+
</div>
|
|
237
|
+
</Show>
|
|
238
|
+
);
|
|
239
239
|
};
|
|
240
240
|
|
|
241
241
|
export {
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
242
|
+
Field,
|
|
243
|
+
FieldContent,
|
|
244
|
+
FieldDescription,
|
|
245
|
+
FieldError,
|
|
246
|
+
FieldGroup,
|
|
247
|
+
FieldLabel,
|
|
248
|
+
FieldLegend,
|
|
249
|
+
FieldSeparator,
|
|
250
|
+
FieldSet,
|
|
251
|
+
FieldSubGroup,
|
|
252
|
+
FieldTitle,
|
|
253
253
|
};
|