@urbicon-ui/blocks 6.40.4 → 6.43.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/README.md +1 -1
- package/dist/components/Calendar/calendar.variants.d.ts +63 -63
- package/dist/components/Chat/A2UIView/A2UINode.svelte +20 -39
- package/dist/components/Chat/A2UIView/A2UIView.svelte +47 -50
- package/dist/components/Chat/A2UIView/a2ui-basic-catalog.d.ts +17 -0
- package/dist/components/Chat/A2UIView/a2ui-basic-catalog.js +69 -0
- package/dist/components/Chat/A2UIView/a2ui-catalog.d.ts +95 -0
- package/dist/components/Chat/A2UIView/a2ui-catalog.js +87 -0
- package/dist/components/Chat/A2UIView/a2ui-node-common.d.ts +40 -0
- package/dist/components/Chat/A2UIView/a2ui-node-common.js +72 -0
- package/dist/components/Chat/A2UIView/a2ui-prompt.d.ts +21 -10
- package/dist/components/Chat/A2UIView/a2ui-prompt.js +170 -24
- package/dist/components/Chat/A2UIView/a2ui-registry.d.ts +1 -1
- package/dist/components/Chat/A2UIView/a2ui-registry.js +2 -1
- package/dist/components/Chat/A2UIView/a2ui-render.d.ts +30 -0
- package/dist/components/Chat/A2UIView/a2ui-render.js +61 -23
- package/dist/components/Chat/A2UIView/a2ui-router.d.ts +136 -0
- package/dist/components/Chat/A2UIView/a2ui-router.js +264 -0
- package/dist/components/Chat/A2UIView/a2ui-schema.d.ts +45 -0
- package/dist/components/Chat/A2UIView/a2ui-schema.js +133 -0
- package/dist/components/Chat/A2UIView/a2ui-stream.d.ts +120 -0
- package/dist/components/Chat/A2UIView/a2ui-stream.js +406 -0
- package/dist/components/Chat/A2UIView/a2ui-transcript.d.ts +65 -0
- package/dist/components/Chat/A2UIView/a2ui-transcript.js +101 -0
- package/dist/components/Chat/A2UIView/a2ui-validate.d.ts +33 -1
- package/dist/components/Chat/A2UIView/a2ui-validate.js +167 -63
- package/dist/components/Chat/A2UIView/a2ui.types.d.ts +50 -0
- package/dist/components/Chat/A2UIView/a2ui.types.js +38 -1
- package/dist/components/Chat/A2UIView/index.d.ts +35 -2
- package/dist/components/Chat/A2UIView/index.js +13 -0
- package/dist/components/Chat/A2UIView/urbicon/UrbiconA2UINode.svelte +831 -0
- package/dist/components/Chat/A2UIView/urbicon/UrbiconA2UINode.svelte.d.ts +4 -0
- package/dist/components/Chat/A2UIView/urbicon/a2ui-urbicon-catalog.d.ts +14 -0
- package/dist/components/Chat/A2UIView/urbicon/a2ui-urbicon-catalog.js +87 -0
- package/dist/components/Chat/A2UIView/urbicon/a2ui-urbicon-registry.d.ts +78 -0
- package/dist/components/Chat/A2UIView/urbicon/a2ui-urbicon-registry.js +783 -0
- package/dist/components/Chat/A2UIView/urbicon/a2ui-urbicon.variants.d.ts +43 -0
- package/dist/components/Chat/A2UIView/urbicon/a2ui-urbicon.variants.js +33 -0
- package/dist/components/Chat/A2UIView/urbicon/urbicon-axes.gen.d.ts +7 -0
- package/dist/components/Chat/A2UIView/urbicon/urbicon-axes.gen.js +86 -0
- package/dist/components/Chat/ChatMessage/ChatMessage.svelte +93 -67
- package/dist/components/Chat/ChatMessage/chat-message.variants.d.ts +26 -19
- package/dist/components/Chat/ChatMessage/chat-message.variants.js +45 -12
- package/dist/components/Chat/ChatMessage/index.d.ts +20 -5
- package/dist/components/Chat/CodeBlock/CodeBlock.svelte +59 -33
- package/dist/components/Chat/CodeBlock/code-block.variants.d.ts +7 -0
- package/dist/components/Chat/CodeBlock/code-block.variants.js +28 -13
- package/dist/components/Chat/CodeBlock/index.d.ts +39 -4
- package/dist/components/Chat/PromptInput/PromptInput.svelte +9 -16
- package/dist/components/Chat/PromptInput/prompt-input.variants.js +16 -15
- package/dist/components/Chat/ToolCallCard/ToolCallCard.svelte +9 -4
- package/dist/components/Chat/ToolCallCard/index.d.ts +4 -3
- package/dist/components/Chat/ToolCallCard/tool-call-card.variants.d.ts +0 -3
- package/dist/components/Chat/ToolCallCard/tool-call-card.variants.js +4 -4
- package/dist/components/CopyButton/CopyButton.svelte +9 -19
- package/dist/components/CopyButton/copy-button.variants.d.ts +4 -4
- package/dist/components/FileUpload/fileUpload.variants.js +15 -4
- package/dist/components/PinInput/PinInput.svelte +1 -0
- package/dist/components/PinInput/pin-input.variants.js +14 -1
- package/dist/components/TimeInput/time-input.variants.js +16 -1
- package/dist/i18n/index.d.ts +398 -2
- package/dist/internal/copy-state.svelte.d.ts +60 -0
- package/dist/internal/copy-state.svelte.js +76 -0
- package/dist/internal/field-chrome.d.ts +18 -1
- package/dist/internal/field-chrome.js +19 -2
- package/dist/primitives/Alert/alert.variants.d.ts +8 -8
- package/dist/primitives/Avatar/avatar.variants.js +4 -1
- package/dist/primitives/Badge/badge.variants.js +11 -2
- package/dist/primitives/Button/button.variants.js +4 -1
- package/dist/primitives/Card/card.variants.js +4 -1
- package/dist/primitives/Checkbox/checkbox.variants.js +7 -1
- package/dist/primitives/Combobox/Combobox.svelte +9 -1
- package/dist/primitives/Combobox/combobox.variants.d.ts +25 -0
- package/dist/primitives/Combobox/combobox.variants.js +43 -7
- package/dist/primitives/Combobox/index.d.ts +8 -2
- package/dist/primitives/Dialog/dialog.variants.js +4 -1
- package/dist/primitives/Drawer/drawer.variants.js +4 -1
- package/dist/primitives/Input/input.variants.js +17 -1
- package/dist/primitives/JourneyTimeline/journey-timeline.variants.d.ts +22 -22
- package/dist/primitives/Menu/menu.variants.js +5 -1
- package/dist/primitives/Progress/progress.variants.js +5 -2
- package/dist/primitives/RadioGroup/radioGroup.variants.js +74 -10
- package/dist/primitives/Select/select.variants.js +14 -5
- package/dist/primitives/Slider/Slider.svelte +4 -1
- package/dist/primitives/Slider/slider.variants.js +9 -2
- package/dist/primitives/Spinner/spinner.variants.d.ts +16 -16
- package/dist/primitives/Stepper/stepper.variants.d.ts +11 -11
- package/dist/primitives/Stepper/stepper.variants.js +2 -1
- package/dist/primitives/Tab/tab.variants.js +4 -1
- package/dist/primitives/Textarea/textarea.variants.js +16 -2
- package/dist/primitives/Toast/toast.variants.d.ts +12 -12
- package/dist/primitives/Toast/toast.variants.js +5 -1
- package/dist/primitives/Toggle/toggle.variants.js +94 -18
- package/dist/primitives/Tooltip/tooltip.variants.d.ts +3 -3
- package/dist/primitives/Tooltip/tooltip.variants.js +5 -1
- package/dist/style/foundation.css +19 -9
- package/dist/style/semantic.css +49 -2
- package/dist/style/themes/forest.css +2 -2
- package/dist/style/themes/neutral.css +2 -2
- package/dist/style/themes/ocean.css +2 -2
- package/dist/style/themes/rose.css +2 -2
- package/dist/style/themes/sunset.css +2 -2
- package/dist/utils/figma-token-export.js +7 -3
- package/dist/utils/persistent-state.svelte.d.ts +25 -1
- package/dist/utils/persistent-state.svelte.js +98 -10
- package/docs/MIGRATION-v5.md +29 -0
- package/package.json +3 -3
|
@@ -1,53 +1,53 @@
|
|
|
1
1
|
import { type SlotNames, type VariantProps } from '../../utils/variants.js';
|
|
2
2
|
export declare const alertVariants: ((props?: {
|
|
3
|
-
intent?: "primary" | "success" | "warning" | "danger" | "neutral" |
|
|
3
|
+
intent?: "info" | "primary" | "success" | "warning" | "danger" | "neutral" | undefined;
|
|
4
4
|
variant?: "inline" | "filled" | "soft" | undefined;
|
|
5
5
|
size?: "sm" | "md" | "lg" | undefined;
|
|
6
6
|
} | undefined) => {
|
|
7
7
|
base: (props?: ({
|
|
8
|
-
intent?: "primary" | "success" | "warning" | "danger" | "neutral" |
|
|
8
|
+
intent?: "info" | "primary" | "success" | "warning" | "danger" | "neutral" | undefined;
|
|
9
9
|
variant?: "inline" | "filled" | "soft" | undefined;
|
|
10
10
|
size?: "sm" | "md" | "lg" | undefined;
|
|
11
11
|
} & {
|
|
12
12
|
class?: string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | /*elided*/ any | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined;
|
|
13
13
|
}) | undefined) => string;
|
|
14
14
|
icon: (props?: ({
|
|
15
|
-
intent?: "primary" | "success" | "warning" | "danger" | "neutral" |
|
|
15
|
+
intent?: "info" | "primary" | "success" | "warning" | "danger" | "neutral" | undefined;
|
|
16
16
|
variant?: "inline" | "filled" | "soft" | undefined;
|
|
17
17
|
size?: "sm" | "md" | "lg" | undefined;
|
|
18
18
|
} & {
|
|
19
19
|
class?: string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | /*elided*/ any | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined;
|
|
20
20
|
}) | undefined) => string;
|
|
21
21
|
content: (props?: ({
|
|
22
|
-
intent?: "primary" | "success" | "warning" | "danger" | "neutral" |
|
|
22
|
+
intent?: "info" | "primary" | "success" | "warning" | "danger" | "neutral" | undefined;
|
|
23
23
|
variant?: "inline" | "filled" | "soft" | undefined;
|
|
24
24
|
size?: "sm" | "md" | "lg" | undefined;
|
|
25
25
|
} & {
|
|
26
26
|
class?: string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | /*elided*/ any | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined;
|
|
27
27
|
}) | undefined) => string;
|
|
28
28
|
title: (props?: ({
|
|
29
|
-
intent?: "primary" | "success" | "warning" | "danger" | "neutral" |
|
|
29
|
+
intent?: "info" | "primary" | "success" | "warning" | "danger" | "neutral" | undefined;
|
|
30
30
|
variant?: "inline" | "filled" | "soft" | undefined;
|
|
31
31
|
size?: "sm" | "md" | "lg" | undefined;
|
|
32
32
|
} & {
|
|
33
33
|
class?: string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | /*elided*/ any | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined;
|
|
34
34
|
}) | undefined) => string;
|
|
35
35
|
description: (props?: ({
|
|
36
|
-
intent?: "primary" | "success" | "warning" | "danger" | "neutral" |
|
|
36
|
+
intent?: "info" | "primary" | "success" | "warning" | "danger" | "neutral" | undefined;
|
|
37
37
|
variant?: "inline" | "filled" | "soft" | undefined;
|
|
38
38
|
size?: "sm" | "md" | "lg" | undefined;
|
|
39
39
|
} & {
|
|
40
40
|
class?: string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | /*elided*/ any | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined;
|
|
41
41
|
}) | undefined) => string;
|
|
42
42
|
actions: (props?: ({
|
|
43
|
-
intent?: "primary" | "success" | "warning" | "danger" | "neutral" |
|
|
43
|
+
intent?: "info" | "primary" | "success" | "warning" | "danger" | "neutral" | undefined;
|
|
44
44
|
variant?: "inline" | "filled" | "soft" | undefined;
|
|
45
45
|
size?: "sm" | "md" | "lg" | undefined;
|
|
46
46
|
} & {
|
|
47
47
|
class?: string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | /*elided*/ any | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined;
|
|
48
48
|
}) | undefined) => string;
|
|
49
49
|
dismissButton: (props?: ({
|
|
50
|
-
intent?: "primary" | "success" | "warning" | "danger" | "neutral" |
|
|
50
|
+
intent?: "info" | "primary" | "success" | "warning" | "danger" | "neutral" | undefined;
|
|
51
51
|
variant?: "inline" | "filled" | "soft" | undefined;
|
|
52
52
|
size?: "sm" | "md" | "lg" | undefined;
|
|
53
53
|
} & {
|
|
@@ -7,7 +7,10 @@ export const avatarVariants = tv({
|
|
|
7
7
|
// the ring follows the avatar's shape.
|
|
8
8
|
base: [
|
|
9
9
|
'relative inline-flex shrink-0',
|
|
10
|
-
|
|
10
|
+
// `scale` is listed because the `interactive` axis adds
|
|
11
|
+
// `hover:scale-105 active:scale-95` — Tailwind 4 emits those as the
|
|
12
|
+
// discrete `scale:` property, which nothing else in this list covers.
|
|
13
|
+
'transition-[color,background-color,border-color,box-shadow,opacity,scale] duration-[var(--blocks-duration-fast)] ease-out'
|
|
11
14
|
],
|
|
12
15
|
// The visible disc. This is the element that clips the image/initials to
|
|
13
16
|
// the avatar shape; the status dot lives outside it so it stays whole.
|
|
@@ -15,7 +15,13 @@ export const badgeVariants = tv({
|
|
|
15
15
|
base: [
|
|
16
16
|
'relative inline-flex items-center justify-center',
|
|
17
17
|
'font-medium text-center whitespace-nowrap border select-none',
|
|
18
|
-
|
|
18
|
+
// `scale` is listed because the `interactive` axis adds
|
|
19
|
+
// `hover:scale-105 active:scale-95` — Tailwind 4 emits those as the
|
|
20
|
+
// discrete `scale:` property, which nothing else in this list covers.
|
|
21
|
+
// `translate` is deliberately NOT listed: the `placement` axis uses
|
|
22
|
+
// translate as layout, not motion (see the exemption in
|
|
23
|
+
// scripts/variants-lint.ts).
|
|
24
|
+
'transition-[color,background-color,border-color,box-shadow,opacity,scale] duration-[var(--blocks-duration-fast)] ease-out'
|
|
19
25
|
// Radius driven by `tier` axis below.
|
|
20
26
|
],
|
|
21
27
|
// `[gap:inherit]` (arbitrary property), NOT `gap-inherit` — Tailwind v4 emits
|
|
@@ -40,7 +46,10 @@ export const badgeVariants = tv({
|
|
|
40
46
|
'hover:shadow-[var(--blocks-shadow-md)] active:scale-[0.98] active:shadow-[var(--blocks-shadow-sm)]',
|
|
41
47
|
'h-6 px-2 text-xs gap-1 focus-visible:ring-offset-2',
|
|
42
48
|
// remove-control overrides (won the fold over the ghost base)
|
|
43
|
-
|
|
49
|
+
// `scale` is named because the interactive compound adds `active:scale-[0.98]`:
|
|
50
|
+
// Tailwind emits that as the discrete `scale` property, which `transition-colors`
|
|
51
|
+
// does not cover — the press cue would snap. Same fold as Dialog/Drawer's closeButton.
|
|
52
|
+
'ml-1 shrink-0 rounded-modify transition-[color,background-color,scale] text-current',
|
|
44
53
|
'hover:bg-neutral-950/10 focus-visible:ring-1 focus-visible:ring-current'
|
|
45
54
|
],
|
|
46
55
|
removeIcon: ['w-3 h-3']
|
|
@@ -4,7 +4,10 @@ export const buttonVariants = tv({
|
|
|
4
4
|
base: [
|
|
5
5
|
'relative inline-flex items-center justify-center gap-2',
|
|
6
6
|
'font-medium text-center whitespace-nowrap border cursor-pointer select-none',
|
|
7
|
-
|
|
7
|
+
// `scale`, NOT `transform`: Tailwind 4 emits `scale-*` as the discrete
|
|
8
|
+
// CSS `scale:` property, so a list naming only `transform` never animates
|
|
9
|
+
// the press cue (`active:scale-[0.98]` / `pressed`) — it would jump.
|
|
10
|
+
'transition-[color,background-color,border-color,box-shadow,opacity,scale] duration-[var(--blocks-duration-fast)] ease-out overflow-hidden',
|
|
8
11
|
// Radius is driven by the `tier` variant axis below — see `tier`.
|
|
9
12
|
'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2',
|
|
10
13
|
'disabled:opacity-50 disabled:cursor-not-allowed disabled:pointer-events-none'
|
|
@@ -2,7 +2,10 @@ import { tv } from '../../utils/variants.js';
|
|
|
2
2
|
export const cardVariants = tv({
|
|
3
3
|
slots: {
|
|
4
4
|
base: [
|
|
5
|
-
|
|
5
|
+
// `translate`, NOT `transform`: Tailwind 4 emits `-translate-y-*` as the
|
|
6
|
+
// discrete CSS `translate:` property, so a list naming only `transform`
|
|
7
|
+
// never animates the `interactive` hover lift — it would jump.
|
|
8
|
+
'relative block w-full transition-[color,background-color,border-color,box-shadow,opacity,translate] duration-[var(--blocks-duration-fast)] ease-out box-border',
|
|
6
9
|
// Structure radius — cards are architectural surfaces, not human/CTA.
|
|
7
10
|
'rounded-contain'
|
|
8
11
|
],
|
|
@@ -207,11 +207,17 @@ export const checkboxVariants = tv({
|
|
|
207
207
|
}
|
|
208
208
|
},
|
|
209
209
|
// ── Error overrides unchecked border ──
|
|
210
|
+
// `group-hover:border-danger` is not redundant: modifier prefixes are part of
|
|
211
|
+
// the conflict bucket, so the plain `border-danger` never folds the unchecked
|
|
212
|
+
// variants' `group-hover:border-border-emphasis` above — without the pin, an
|
|
213
|
+
// errored checkbox loses its danger boundary the moment it is hovered.
|
|
210
214
|
{
|
|
211
215
|
error: true,
|
|
212
216
|
checked: false,
|
|
213
217
|
indeterminate: false,
|
|
214
|
-
class: {
|
|
218
|
+
class: {
|
|
219
|
+
box: 'border-danger group-hover:border-danger peer-focus-visible:ring-danger/40'
|
|
220
|
+
}
|
|
215
221
|
}
|
|
216
222
|
],
|
|
217
223
|
defaultVariants: {
|
|
@@ -307,12 +307,20 @@
|
|
|
307
307
|
};
|
|
308
308
|
});
|
|
309
309
|
|
|
310
|
+
// `error` is the same signal that drives `aria-invalid` (`ff.invalid`), so
|
|
311
|
+
// the visible frame and the announced state can never disagree. It also
|
|
312
|
+
// reaches `resolveSlotClasses`, so a consumer `overrides` entry can target
|
|
313
|
+
// the invalid state.
|
|
310
314
|
const variantProps: ComboboxVariants = $derived({
|
|
311
315
|
variant,
|
|
312
316
|
tier: effectiveTier,
|
|
313
317
|
size,
|
|
314
318
|
open,
|
|
315
|
-
disabled
|
|
319
|
+
disabled,
|
|
320
|
+
// `|| undefined` rather than a plain `false`, matching Input: these props
|
|
321
|
+
// are also matched against `BlocksProvider` `overrides`, where an entry
|
|
322
|
+
// keyed `{ error: false }` must not fire on a valid field.
|
|
323
|
+
error: ff.invalid || undefined
|
|
316
324
|
});
|
|
317
325
|
const styles = $derived(comboboxVariants(variantProps));
|
|
318
326
|
|
|
@@ -5,6 +5,7 @@ export declare const comboboxVariants: ((props?: {
|
|
|
5
5
|
size?: "xs" | "sm" | "md" | "lg" | "xl" | undefined;
|
|
6
6
|
open?: boolean | undefined;
|
|
7
7
|
disabled?: boolean | undefined;
|
|
8
|
+
error?: boolean | undefined;
|
|
8
9
|
} | undefined) => {
|
|
9
10
|
base: (props?: ({
|
|
10
11
|
tier?: "commit" | "modify" | undefined;
|
|
@@ -12,6 +13,7 @@ export declare const comboboxVariants: ((props?: {
|
|
|
12
13
|
size?: "xs" | "sm" | "md" | "lg" | "xl" | undefined;
|
|
13
14
|
open?: boolean | undefined;
|
|
14
15
|
disabled?: boolean | undefined;
|
|
16
|
+
error?: boolean | undefined;
|
|
15
17
|
} & {
|
|
16
18
|
class?: string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | /*elided*/ any | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined;
|
|
17
19
|
}) | undefined) => string;
|
|
@@ -21,6 +23,7 @@ export declare const comboboxVariants: ((props?: {
|
|
|
21
23
|
size?: "xs" | "sm" | "md" | "lg" | "xl" | undefined;
|
|
22
24
|
open?: boolean | undefined;
|
|
23
25
|
disabled?: boolean | undefined;
|
|
26
|
+
error?: boolean | undefined;
|
|
24
27
|
} & {
|
|
25
28
|
class?: string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | /*elided*/ any | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined;
|
|
26
29
|
}) | undefined) => string;
|
|
@@ -30,6 +33,7 @@ export declare const comboboxVariants: ((props?: {
|
|
|
30
33
|
size?: "xs" | "sm" | "md" | "lg" | "xl" | undefined;
|
|
31
34
|
open?: boolean | undefined;
|
|
32
35
|
disabled?: boolean | undefined;
|
|
36
|
+
error?: boolean | undefined;
|
|
33
37
|
} & {
|
|
34
38
|
class?: string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | /*elided*/ any | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined;
|
|
35
39
|
}) | undefined) => string;
|
|
@@ -39,6 +43,7 @@ export declare const comboboxVariants: ((props?: {
|
|
|
39
43
|
size?: "xs" | "sm" | "md" | "lg" | "xl" | undefined;
|
|
40
44
|
open?: boolean | undefined;
|
|
41
45
|
disabled?: boolean | undefined;
|
|
46
|
+
error?: boolean | undefined;
|
|
42
47
|
} & {
|
|
43
48
|
class?: string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | /*elided*/ any | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined;
|
|
44
49
|
}) | undefined) => string;
|
|
@@ -48,6 +53,7 @@ export declare const comboboxVariants: ((props?: {
|
|
|
48
53
|
size?: "xs" | "sm" | "md" | "lg" | "xl" | undefined;
|
|
49
54
|
open?: boolean | undefined;
|
|
50
55
|
disabled?: boolean | undefined;
|
|
56
|
+
error?: boolean | undefined;
|
|
51
57
|
} & {
|
|
52
58
|
class?: string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | /*elided*/ any | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined;
|
|
53
59
|
}) | undefined) => string;
|
|
@@ -57,6 +63,7 @@ export declare const comboboxVariants: ((props?: {
|
|
|
57
63
|
size?: "xs" | "sm" | "md" | "lg" | "xl" | undefined;
|
|
58
64
|
open?: boolean | undefined;
|
|
59
65
|
disabled?: boolean | undefined;
|
|
66
|
+
error?: boolean | undefined;
|
|
60
67
|
} & {
|
|
61
68
|
class?: string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | /*elided*/ any | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined;
|
|
62
69
|
}) | undefined) => string;
|
|
@@ -66,6 +73,7 @@ export declare const comboboxVariants: ((props?: {
|
|
|
66
73
|
size?: "xs" | "sm" | "md" | "lg" | "xl" | undefined;
|
|
67
74
|
open?: boolean | undefined;
|
|
68
75
|
disabled?: boolean | undefined;
|
|
76
|
+
error?: boolean | undefined;
|
|
69
77
|
} & {
|
|
70
78
|
class?: string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | /*elided*/ any | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined;
|
|
71
79
|
}) | undefined) => string;
|
|
@@ -75,6 +83,7 @@ export declare const comboboxVariants: ((props?: {
|
|
|
75
83
|
size?: "xs" | "sm" | "md" | "lg" | "xl" | undefined;
|
|
76
84
|
open?: boolean | undefined;
|
|
77
85
|
disabled?: boolean | undefined;
|
|
86
|
+
error?: boolean | undefined;
|
|
78
87
|
} & {
|
|
79
88
|
class?: string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | /*elided*/ any | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined;
|
|
80
89
|
}) | undefined) => string;
|
|
@@ -84,6 +93,7 @@ export declare const comboboxVariants: ((props?: {
|
|
|
84
93
|
size?: "xs" | "sm" | "md" | "lg" | "xl" | undefined;
|
|
85
94
|
open?: boolean | undefined;
|
|
86
95
|
disabled?: boolean | undefined;
|
|
96
|
+
error?: boolean | undefined;
|
|
87
97
|
} & {
|
|
88
98
|
class?: string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | /*elided*/ any | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined;
|
|
89
99
|
}) | undefined) => string;
|
|
@@ -93,6 +103,7 @@ export declare const comboboxVariants: ((props?: {
|
|
|
93
103
|
size?: "xs" | "sm" | "md" | "lg" | "xl" | undefined;
|
|
94
104
|
open?: boolean | undefined;
|
|
95
105
|
disabled?: boolean | undefined;
|
|
106
|
+
error?: boolean | undefined;
|
|
96
107
|
} & {
|
|
97
108
|
class?: string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | /*elided*/ any | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined;
|
|
98
109
|
}) | undefined) => string;
|
|
@@ -102,6 +113,7 @@ export declare const comboboxVariants: ((props?: {
|
|
|
102
113
|
size?: "xs" | "sm" | "md" | "lg" | "xl" | undefined;
|
|
103
114
|
open?: boolean | undefined;
|
|
104
115
|
disabled?: boolean | undefined;
|
|
116
|
+
error?: boolean | undefined;
|
|
105
117
|
} & {
|
|
106
118
|
class?: string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | /*elided*/ any | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined;
|
|
107
119
|
}) | undefined) => string;
|
|
@@ -111,6 +123,7 @@ export declare const comboboxVariants: ((props?: {
|
|
|
111
123
|
size?: "xs" | "sm" | "md" | "lg" | "xl" | undefined;
|
|
112
124
|
open?: boolean | undefined;
|
|
113
125
|
disabled?: boolean | undefined;
|
|
126
|
+
error?: boolean | undefined;
|
|
114
127
|
} & {
|
|
115
128
|
class?: string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | /*elided*/ any | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined;
|
|
116
129
|
}) | undefined) => string;
|
|
@@ -120,6 +133,7 @@ export declare const comboboxVariants: ((props?: {
|
|
|
120
133
|
size?: "xs" | "sm" | "md" | "lg" | "xl" | undefined;
|
|
121
134
|
open?: boolean | undefined;
|
|
122
135
|
disabled?: boolean | undefined;
|
|
136
|
+
error?: boolean | undefined;
|
|
123
137
|
} & {
|
|
124
138
|
class?: string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | /*elided*/ any | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined;
|
|
125
139
|
}) | undefined) => string;
|
|
@@ -129,6 +143,7 @@ export declare const comboboxVariants: ((props?: {
|
|
|
129
143
|
size?: "xs" | "sm" | "md" | "lg" | "xl" | undefined;
|
|
130
144
|
open?: boolean | undefined;
|
|
131
145
|
disabled?: boolean | undefined;
|
|
146
|
+
error?: boolean | undefined;
|
|
132
147
|
} & {
|
|
133
148
|
class?: string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | /*elided*/ any | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined;
|
|
134
149
|
}) | undefined) => string;
|
|
@@ -138,6 +153,7 @@ export declare const comboboxVariants: ((props?: {
|
|
|
138
153
|
size?: "xs" | "sm" | "md" | "lg" | "xl" | undefined;
|
|
139
154
|
open?: boolean | undefined;
|
|
140
155
|
disabled?: boolean | undefined;
|
|
156
|
+
error?: boolean | undefined;
|
|
141
157
|
} & {
|
|
142
158
|
class?: string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | /*elided*/ any | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined;
|
|
143
159
|
}) | undefined) => string;
|
|
@@ -147,6 +163,7 @@ export declare const comboboxVariants: ((props?: {
|
|
|
147
163
|
size?: "xs" | "sm" | "md" | "lg" | "xl" | undefined;
|
|
148
164
|
open?: boolean | undefined;
|
|
149
165
|
disabled?: boolean | undefined;
|
|
166
|
+
error?: boolean | undefined;
|
|
150
167
|
} & {
|
|
151
168
|
class?: string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | /*elided*/ any | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined;
|
|
152
169
|
}) | undefined) => string;
|
|
@@ -156,6 +173,7 @@ export declare const comboboxVariants: ((props?: {
|
|
|
156
173
|
size?: "xs" | "sm" | "md" | "lg" | "xl" | undefined;
|
|
157
174
|
open?: boolean | undefined;
|
|
158
175
|
disabled?: boolean | undefined;
|
|
176
|
+
error?: boolean | undefined;
|
|
159
177
|
} & {
|
|
160
178
|
class?: string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | /*elided*/ any | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined;
|
|
161
179
|
}) | undefined) => string;
|
|
@@ -165,6 +183,7 @@ export declare const comboboxVariants: ((props?: {
|
|
|
165
183
|
size?: "xs" | "sm" | "md" | "lg" | "xl" | undefined;
|
|
166
184
|
open?: boolean | undefined;
|
|
167
185
|
disabled?: boolean | undefined;
|
|
186
|
+
error?: boolean | undefined;
|
|
168
187
|
} & {
|
|
169
188
|
class?: string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | /*elided*/ any | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined;
|
|
170
189
|
}) | undefined) => string;
|
|
@@ -174,6 +193,7 @@ export declare const comboboxVariants: ((props?: {
|
|
|
174
193
|
size?: "xs" | "sm" | "md" | "lg" | "xl" | undefined;
|
|
175
194
|
open?: boolean | undefined;
|
|
176
195
|
disabled?: boolean | undefined;
|
|
196
|
+
error?: boolean | undefined;
|
|
177
197
|
} & {
|
|
178
198
|
class?: string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | /*elided*/ any | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined;
|
|
179
199
|
}) | undefined) => string;
|
|
@@ -183,6 +203,7 @@ export declare const comboboxVariants: ((props?: {
|
|
|
183
203
|
size?: "xs" | "sm" | "md" | "lg" | "xl" | undefined;
|
|
184
204
|
open?: boolean | undefined;
|
|
185
205
|
disabled?: boolean | undefined;
|
|
206
|
+
error?: boolean | undefined;
|
|
186
207
|
} & {
|
|
187
208
|
class?: string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | /*elided*/ any | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined;
|
|
188
209
|
}) | undefined) => string;
|
|
@@ -192,6 +213,7 @@ export declare const comboboxVariants: ((props?: {
|
|
|
192
213
|
size?: "xs" | "sm" | "md" | "lg" | "xl" | undefined;
|
|
193
214
|
open?: boolean | undefined;
|
|
194
215
|
disabled?: boolean | undefined;
|
|
216
|
+
error?: boolean | undefined;
|
|
195
217
|
} & {
|
|
196
218
|
class?: string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | /*elided*/ any | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined;
|
|
197
219
|
}) | undefined) => string;
|
|
@@ -201,6 +223,7 @@ export declare const comboboxVariants: ((props?: {
|
|
|
201
223
|
size?: "xs" | "sm" | "md" | "lg" | "xl" | undefined;
|
|
202
224
|
open?: boolean | undefined;
|
|
203
225
|
disabled?: boolean | undefined;
|
|
226
|
+
error?: boolean | undefined;
|
|
204
227
|
} & {
|
|
205
228
|
class?: string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | /*elided*/ any | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined;
|
|
206
229
|
}) | undefined) => string;
|
|
@@ -210,6 +233,7 @@ export declare const comboboxVariants: ((props?: {
|
|
|
210
233
|
size?: "xs" | "sm" | "md" | "lg" | "xl" | undefined;
|
|
211
234
|
open?: boolean | undefined;
|
|
212
235
|
disabled?: boolean | undefined;
|
|
236
|
+
error?: boolean | undefined;
|
|
213
237
|
} & {
|
|
214
238
|
class?: string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | /*elided*/ any | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined;
|
|
215
239
|
}) | undefined) => string;
|
|
@@ -219,6 +243,7 @@ export declare const comboboxVariants: ((props?: {
|
|
|
219
243
|
size?: "xs" | "sm" | "md" | "lg" | "xl" | undefined;
|
|
220
244
|
open?: boolean | undefined;
|
|
221
245
|
disabled?: boolean | undefined;
|
|
246
|
+
error?: boolean | undefined;
|
|
222
247
|
} & {
|
|
223
248
|
class?: string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | /*elided*/ any | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined;
|
|
224
249
|
}) | undefined) => string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { FIELD_MESSAGE_TONES, fieldErrorFrame } from '../../internal/field-chrome.js';
|
|
1
2
|
import { tv } from '../../utils/variants.js';
|
|
2
3
|
export const comboboxVariants = tv({
|
|
3
4
|
slots: {
|
|
@@ -11,11 +12,24 @@ export const comboboxVariants = tv({
|
|
|
11
12
|
// `variant` axis (default `outlined` keeps the historical look).
|
|
12
13
|
'w-full border bg-surface-base text-text-primary placeholder:text-text-tertiary',
|
|
13
14
|
'transition-colors duration-[var(--blocks-duration-fast)]',
|
|
14
|
-
|
|
15
|
+
// `/20` matches `fieldFocusRing` in internal/field-chrome.ts, which Input,
|
|
16
|
+
// Textarea, Select, PinInput and TimeInput all use. At `/50` this field was
|
|
17
|
+
// the odd one out in both directions: a stronger valid ring than every
|
|
18
|
+
// sibling, and — once it gained the shared error frame (ring-danger/20) —
|
|
19
|
+
// an invalid state weaker than its own valid one. The icon-button slots
|
|
20
|
+
// below keep `/50`: they are small targets, not field frames.
|
|
21
|
+
'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/20 focus-visible:border-primary',
|
|
15
22
|
'disabled:opacity-50 disabled:cursor-not-allowed'
|
|
16
23
|
],
|
|
17
|
-
|
|
18
|
-
|
|
24
|
+
// Message tone follows the ROLE of the text, not the field state: the
|
|
25
|
+
// `message` slot only ever renders the `error` string (the markup picks it
|
|
26
|
+
// over `helper`, they are mutually exclusive), so the two slots carry the
|
|
27
|
+
// two shared field-message tones — a helper never reads red. Sibling
|
|
28
|
+
// fields express the same thing through a `messageType` axis because they
|
|
29
|
+
// render both roles through ONE `message` slot; here the slot split
|
|
30
|
+
// already encodes it.
|
|
31
|
+
message: ['text-xs', FIELD_MESSAGE_TONES.error],
|
|
32
|
+
helper: ['text-xs', FIELD_MESSAGE_TONES.helper],
|
|
19
33
|
// `position`, `width`, `overflow-y` are set inline in Combobox.svelte
|
|
20
34
|
// so the native `popover="manual"` top-layer rendering works
|
|
21
35
|
// correctly and the UA's `overflow: auto` doesn't render a duplicate
|
|
@@ -84,7 +98,8 @@ export const comboboxVariants = tv({
|
|
|
84
98
|
control: [
|
|
85
99
|
'flex w-full flex-wrap items-center border bg-surface-base cursor-text',
|
|
86
100
|
'transition-colors duration-[var(--blocks-duration-fast)]',
|
|
87
|
-
|
|
101
|
+
// `/20` — same reason as the `input` slot above.
|
|
102
|
+
'focus-within:outline-none focus-within:ring-2 focus-within:ring-primary/20 focus-within:border-primary'
|
|
88
103
|
],
|
|
89
104
|
// Borderless search input inside `control`; the frame owns the border/ring.
|
|
90
105
|
search: [
|
|
@@ -127,8 +142,8 @@ export const comboboxVariants = tv({
|
|
|
127
142
|
control: 'border-border-subtle hover:border-border-default'
|
|
128
143
|
},
|
|
129
144
|
filled: {
|
|
130
|
-
input: 'bg-surface-interactive border-transparent hover:bg-surface-hover focus-visible:bg-surface-base',
|
|
131
|
-
control: 'bg-surface-interactive border-transparent focus-within:bg-surface-base'
|
|
145
|
+
input: 'bg-surface-interactive border-transparent hover:bg-surface-interactive-hover focus-visible:bg-surface-base',
|
|
146
|
+
control: 'bg-surface-interactive border-transparent hover:bg-surface-interactive-hover focus-within:bg-surface-base'
|
|
132
147
|
},
|
|
133
148
|
ghost: {
|
|
134
149
|
input: 'bg-transparent border-transparent hover:bg-surface-subtle focus-visible:bg-surface-base focus-visible:border-border-subtle',
|
|
@@ -204,6 +219,26 @@ export const comboboxVariants = tv({
|
|
|
204
219
|
},
|
|
205
220
|
disabled: {
|
|
206
221
|
true: { base: 'opacity-50 pointer-events-none' }
|
|
222
|
+
},
|
|
223
|
+
// Validation frame, at parity with every other field — the SHARED fragment
|
|
224
|
+
// (`fieldErrorFrame`), not a hand-copied one, so the next token fix cannot
|
|
225
|
+
// miss Combobox the way it missed it before this axis existed (until then
|
|
226
|
+
// an invalid Combobox only announced itself via `aria-invalid`, with no
|
|
227
|
+
// visible frame at all).
|
|
228
|
+
//
|
|
229
|
+
// Both frames are painted because the visible frame moves between modes:
|
|
230
|
+
// single mode wears it on the `input`, multi mode on the tokenizer
|
|
231
|
+
// `control` — which lights via `focus-within`, since focus lives on the
|
|
232
|
+
// borderless search input inside it. Declared LAST so it wins the
|
|
233
|
+
// border/ring buckets against `variant`; Combobox has no `intent` axis (a
|
|
234
|
+
// deliberate non-goal for now), so nothing else competes. If one is ever
|
|
235
|
+
// added, move this frame to the compound stage — see the precedence note
|
|
236
|
+
// in input.variants.ts.
|
|
237
|
+
error: {
|
|
238
|
+
true: {
|
|
239
|
+
input: fieldErrorFrame('focus-visible'),
|
|
240
|
+
control: fieldErrorFrame('focus-within')
|
|
241
|
+
}
|
|
207
242
|
}
|
|
208
243
|
},
|
|
209
244
|
defaultVariants: {
|
|
@@ -211,6 +246,7 @@ export const comboboxVariants = tv({
|
|
|
211
246
|
variant: 'outlined',
|
|
212
247
|
size: 'md',
|
|
213
248
|
open: false,
|
|
214
|
-
disabled: false
|
|
249
|
+
disabled: false,
|
|
250
|
+
error: false
|
|
215
251
|
}
|
|
216
252
|
});
|
|
@@ -20,7 +20,7 @@ export interface ComboboxGroup<T extends SelectValue = string> {
|
|
|
20
20
|
* live on {@link ComboboxSingleProps} / {@link ComboboxMultipleProps} and narrow
|
|
21
21
|
* against `multiple`.
|
|
22
22
|
*/
|
|
23
|
-
interface ComboboxBaseProps<T extends SelectValue = string> extends ComboboxVariants, Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
23
|
+
interface ComboboxBaseProps<T extends SelectValue = string> extends Omit<ComboboxVariants, 'error'>, Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
24
24
|
/** Array of selectable options. Each needs a unique `value`. */
|
|
25
25
|
options?: ComboboxOption<T>[];
|
|
26
26
|
/**
|
|
@@ -38,7 +38,13 @@ interface ComboboxBaseProps<T extends SelectValue = string> extends ComboboxVari
|
|
|
38
38
|
label?: string;
|
|
39
39
|
/** Helper text shown below the field. Hidden when an error is set. */
|
|
40
40
|
helper?: string;
|
|
41
|
-
/**
|
|
41
|
+
/**
|
|
42
|
+
* Error message — replaces helper text, flags the field as invalid
|
|
43
|
+
* (`aria-invalid`) and paints the shared danger frame on the input (single
|
|
44
|
+
* mode) or the tokenizer control (multi). The string prop shadows the boolean
|
|
45
|
+
* `error` variant axis, which the component derives from it (mirrors Input /
|
|
46
|
+
* Select) — that is what the `Omit` above is for.
|
|
47
|
+
*/
|
|
42
48
|
error?: string;
|
|
43
49
|
/**
|
|
44
50
|
* Marks the field as required. Adds the asterisk on the label. @default false
|
|
@@ -37,7 +37,10 @@ export const dialogVariants = tv({
|
|
|
37
37
|
// internal/core/.
|
|
38
38
|
closeButton: [
|
|
39
39
|
'relative font-medium text-center whitespace-nowrap border overflow-hidden',
|
|
40
|
-
|
|
40
|
+
// `scale`, NOT `transform` — mirrors buttonVariants.base: Tailwind 4 emits
|
|
41
|
+
// `scale-*` as the discrete `scale:` property, so `active:scale-[0.98]`
|
|
42
|
+
// below only animates if the list names `scale`.
|
|
43
|
+
'transition-[color,background-color,border-color,box-shadow,opacity,scale] duration-[var(--blocks-duration-fast)] ease-out',
|
|
41
44
|
'rounded-commit bg-transparent border-transparent shadow-none',
|
|
42
45
|
'hover:shadow-[var(--blocks-shadow-md)] active:scale-[0.98] active:shadow-[var(--blocks-shadow-sm)]',
|
|
43
46
|
'h-8 px-3 text-sm gap-1.5 text-neutral-emphasis hover:bg-neutral-subtle',
|
|
@@ -29,7 +29,10 @@ export const drawerVariants = tv({
|
|
|
29
29
|
// See internal/core/.
|
|
30
30
|
closeButton: [
|
|
31
31
|
'relative font-medium text-center whitespace-nowrap border overflow-hidden',
|
|
32
|
-
|
|
32
|
+
// `scale`, NOT `transform` — mirrors buttonVariants.base: Tailwind 4 emits
|
|
33
|
+
// `scale-*` as the discrete `scale:` property, so `active:scale-[0.98]`
|
|
34
|
+
// below only animates if the list names `scale`.
|
|
35
|
+
'transition-[color,background-color,border-color,box-shadow,opacity,scale] duration-[var(--blocks-duration-fast)] ease-out',
|
|
33
36
|
'rounded-commit bg-transparent border-transparent shadow-none',
|
|
34
37
|
'hover:shadow-[var(--blocks-shadow-md)] active:scale-[0.98] active:shadow-[var(--blocks-shadow-sm)]',
|
|
35
38
|
'h-8 px-3 text-sm gap-1.5 text-neutral-emphasis hover:bg-neutral-subtle',
|
|
@@ -125,9 +125,11 @@ export const inputVariants = tv({
|
|
|
125
125
|
error: { message: FIELD_MESSAGE_TONES.error },
|
|
126
126
|
helper: { message: FIELD_MESSAGE_TONES.helper }
|
|
127
127
|
},
|
|
128
|
+
// The error FRAME is not declared here — it lives in the compound stage
|
|
129
|
+
// below, where it beats `intent` by construction. See the precedence note
|
|
130
|
+
// on the first compound entry.
|
|
128
131
|
error: {
|
|
129
132
|
true: {
|
|
130
|
-
base: fieldErrorFrame(focus),
|
|
131
133
|
message: FIELD_MESSAGE_TONES.error
|
|
132
134
|
}
|
|
133
135
|
},
|
|
@@ -144,6 +146,20 @@ export const inputVariants = tv({
|
|
|
144
146
|
}
|
|
145
147
|
},
|
|
146
148
|
compoundVariants: [
|
|
149
|
+
// ── Validation precedence: `error` beats `intent`, explicitly ────────────
|
|
150
|
+
// Both axes paint the SAME three buckets (border-color plus the focused
|
|
151
|
+
// border/ring tint), so exactly one of them can win. Emitting the error
|
|
152
|
+
// frame here rather than on the `error` axis makes that rule structural:
|
|
153
|
+
// compounds always fold after every axis, so `error: true` overrides
|
|
154
|
+
// whatever `intent` painted regardless of how the axes are ordered above.
|
|
155
|
+
// Previously the winner was decided purely by `error` happening to be
|
|
156
|
+
// DECLARED after `intent` — reordering the axes (or slipping a new one
|
|
157
|
+
// between them) would have silently turned validation feedback back into a
|
|
158
|
+
// green/amber frame. `intent` keeps its tonal job for the non-error states.
|
|
159
|
+
{
|
|
160
|
+
error: true,
|
|
161
|
+
class: { base: fieldErrorFrame(focus) }
|
|
162
|
+
},
|
|
147
163
|
// Ghost keeps a transparent border in its resting state — even when an
|
|
148
164
|
// intent would otherwise colour it. The error state intentionally drops
|
|
149
165
|
// this override so validation feedback (`border-danger`) stays visible.
|