@diegopluna/narvi 0.3.1 → 0.3.3
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/activity/ActivityIcon.svelte +54 -0
- package/dist/components/activity/ActivityIcon.svelte.d.ts +24 -0
- package/dist/components/activity/ActivityStep.svelte +47 -13
- package/dist/components/activity/ActivityStep.svelte.d.ts +13 -4
- package/dist/components/activity/ActivityThought.svelte +24 -5
- package/dist/components/activity/ActivityThought.svelte.d.ts +12 -2
- package/dist/components/activity/index.d.ts +3 -1
- package/dist/components/activity/index.js +2 -1
- package/dist/components/app-shell/AppShellHeader.svelte +18 -4
- package/dist/components/app-shell/AppShellHeader.svelte.d.ts +5 -0
- package/dist/components/app-shell/AppShellMain.svelte +5 -1
- package/dist/components/approval/Approval.svelte +14 -1
- package/dist/components/approval/Approval.svelte.d.ts +5 -0
- package/dist/components/badge/Badge.svelte +19 -2
- package/dist/components/badge/Badge.svelte.d.ts +4 -1
- package/dist/components/button/Button.svelte +63 -13
- package/dist/components/composer/ComposerModelPicker.svelte +80 -13
- package/dist/components/composer/ComposerModelPicker.svelte.d.ts +23 -6
- package/dist/components/composer/ComposerRoot.svelte +51 -12
- package/dist/components/composer/ComposerRoot.svelte.d.ts +16 -0
- package/dist/components/composer/ComposerSubmit.svelte +19 -5
- package/dist/components/composer/ComposerSubmit.svelte.d.ts +3 -1
- package/dist/components/composer/ComposerToggle.svelte +18 -4
- package/dist/components/composer/ComposerToggle.svelte.d.ts +2 -0
- package/dist/components/composer/ComposerTray.svelte +17 -3
- package/dist/components/composer/ComposerTray.svelte.d.ts +5 -0
- package/dist/components/composer/context.d.ts +4 -1
- package/dist/components/dialog/DialogContent.svelte +22 -12
- package/dist/components/dialog/DialogContent.svelte.d.ts +10 -0
- package/dist/components/divider/Divider.svelte +56 -14
- package/dist/components/divider/Divider.svelte.d.ts +13 -3
- package/dist/components/empty-state/EmptyState.svelte +12 -2
- package/dist/components/empty-state/EmptyState.svelte.d.ts +6 -0
- package/dist/components/heading/Heading.svelte +15 -0
- package/dist/components/heading/Heading.svelte.d.ts +6 -0
- package/dist/components/hover-card/HoverCardContent.svelte +19 -3
- package/dist/components/hover-card/HoverCardContent.svelte.d.ts +8 -0
- package/dist/components/input/Input.svelte +13 -3
- package/dist/components/input/Input.svelte.d.ts +10 -2
- package/dist/components/markdown/Markdown.svelte +22 -2
- package/dist/components/markdown/MarkdownDiagram.svelte +33 -2
- package/dist/components/markdown/MarkdownFile.svelte +56 -10
- package/dist/components/markdown/MarkdownMath.svelte +6 -0
- package/dist/components/markdown/MarkdownTable.svelte +3 -4
- package/dist/components/markdown/context.d.ts +6 -0
- package/dist/components/markdown/labels.d.ts +7 -0
- package/dist/components/markdown/labels.js +2 -0
- package/dist/components/menu/ContextMenuTrigger.svelte +14 -2
- package/dist/components/menu/ContextMenuTrigger.svelte.d.ts +10 -0
- package/dist/components/menu/MenuCheckboxItem.svelte +50 -7
- package/dist/components/menu/MenuCheckboxItem.svelte.d.ts +16 -0
- package/dist/components/menu/MenuContent.svelte +10 -2
- package/dist/components/menu/MenuContent.svelte.d.ts +10 -0
- package/dist/components/menu/MenuGroup.svelte +16 -0
- package/dist/components/menu/MenuGroup.svelte.d.ts +6 -0
- package/dist/components/menu/MenuItem.svelte +17 -2
- package/dist/components/menu/MenuItem.svelte.d.ts +8 -0
- package/dist/components/menu/MenuLabel.svelte +22 -8
- package/dist/components/menu/MenuRadioGroup.svelte +16 -0
- package/dist/components/menu/MenuRadioGroup.svelte.d.ts +6 -0
- package/dist/components/menu/MenuSubContent.svelte +10 -2
- package/dist/components/menu/MenuSubContent.svelte.d.ts +10 -0
- package/dist/components/menu/MenuSubTrigger.svelte +19 -2
- package/dist/components/menu/MenuSubTrigger.svelte.d.ts +6 -0
- package/dist/components/menu/group.d.ts +2 -0
- package/dist/components/menu/group.js +9 -0
- package/dist/components/menu/index.d.ts +4 -2
- package/dist/components/menu/index.js +2 -2
- package/dist/components/message/MessageBubble.svelte +40 -0
- package/dist/components/message/MessageBubble.svelte.d.ts +12 -0
- package/dist/components/message/MessageContent.svelte +23 -14
- package/dist/components/message/MessageContent.svelte.d.ts +6 -0
- package/dist/components/message/MessageCopy.svelte +27 -15
- package/dist/components/message/MessageCopy.svelte.d.ts +9 -2
- package/dist/components/message/MessageRoot.svelte +20 -3
- package/dist/components/message/MessageRoot.svelte.d.ts +6 -0
- package/dist/components/message/context.d.ts +2 -0
- package/dist/components/message/index.d.ts +4 -1
- package/dist/components/message/index.js +3 -2
- package/dist/components/message/styles.d.ts +30 -0
- package/dist/components/message/styles.js +24 -0
- package/dist/components/notice/Notice.svelte +3 -3
- package/dist/components/popover/PopoverContent.svelte +27 -3
- package/dist/components/popover/PopoverContent.svelte.d.ts +18 -0
- package/dist/components/questionnaire/Questionnaire.svelte +103 -19
- package/dist/components/questionnaire/Questionnaire.svelte.d.ts +13 -1
- package/dist/components/queued-message/QueuedMessage.svelte +44 -6
- package/dist/components/queued-message/QueuedMessage.svelte.d.ts +12 -1
- package/dist/components/select/Select.svelte +18 -2
- package/dist/components/select/Select.svelte.d.ts +7 -0
- package/dist/components/sidebar/SidebarContent.svelte +59 -13
- package/dist/components/sidebar/SidebarContent.svelte.d.ts +6 -0
- package/dist/components/sidebar/SidebarFolder.svelte +29 -2
- package/dist/components/sidebar/SidebarGroup.svelte +50 -7
- package/dist/components/sidebar/SidebarGroup.svelte.d.ts +10 -1
- package/dist/components/sidebar/SidebarItem.svelte +136 -21
- package/dist/components/sidebar/SidebarItem.svelte.d.ts +22 -2
- package/dist/components/sidebar/SidebarSwitcher.svelte +18 -2
- package/dist/components/sidebar/SidebarSwitcher.svelte.d.ts +2 -0
- package/dist/components/sidebar/fold.d.ts +12 -0
- package/dist/components/sidebar/fold.js +8 -0
- package/dist/components/status-indicator/StatusDot.svelte +90 -0
- package/dist/components/status-indicator/StatusDot.svelte.d.ts +18 -0
- package/dist/components/toast/Toaster.svelte +1 -1
- package/dist/components/toggle/Toggle.svelte +12 -2
- package/dist/components/toggle/Toggle.svelte.d.ts +11 -1
- package/dist/components/toggle-group/ToggleGroupItem.svelte +10 -1
- package/dist/components/toggle-group/ToggleGroupRoot.svelte +7 -1
- package/dist/components/toggle-group/ToggleGroupRoot.svelte.d.ts +3 -1
- package/dist/components/toggle-group/context.d.ts +2 -1
- package/dist/components/tooltip/TooltipContent.svelte +13 -1
- package/dist/components/tooltip/TooltipContent.svelte.d.ts +10 -0
- package/dist/components/work-fold/WorkFold.svelte +13 -4
- package/dist/components/work-fold/WorkFold.svelte.d.ts +2 -1
- package/dist/focus-ring.d.ts +29 -0
- package/dist/focus-ring.js +42 -0
- package/dist/index.d.ts +9 -6
- package/dist/index.js +8 -2
- package/dist/internal/Collapse.svelte +15 -2
- package/dist/internal/Glyph.svelte +28 -0
- package/dist/internal/Glyph.svelte.d.ts +5 -0
- package/dist/internal/Tile.svelte +3 -2
- package/dist/internal/layer.d.ts +23 -0
- package/dist/internal/layer.js +19 -0
- package/dist/internal/toggle.d.ts +8 -1
- package/dist/internal/toggle.js +20 -2
- package/dist/markdown/file-paths.d.ts +7 -0
- package/dist/markdown/file-paths.js +29 -0
- package/dist/markdown/files.d.ts +22 -2
- package/dist/markdown/files.js +45 -14
- package/dist/tokens.stylex.d.ts +3 -0
- package/dist/tokens.stylex.js +5 -1
- package/package.json +1 -1
- package/skills/building-ui/SKILL.md +87 -8
- package/skills/building-ui/references/components.md +39 -38
- package/skills/markdown/SKILL.md +22 -6
- package/skills/setup/SKILL.md +1 -1
- package/skills/styling/SKILL.md +10 -3
- package/skills/theming/SKILL.md +11 -4
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import Action from './MessageAction.svelte';
|
|
2
2
|
import Actions from './MessageActions.svelte';
|
|
3
|
+
import Bubble from './MessageBubble.svelte';
|
|
3
4
|
import Content from './MessageContent.svelte';
|
|
4
5
|
import Copy from './MessageCopy.svelte';
|
|
5
6
|
import Header from './MessageHeader.svelte';
|
|
6
7
|
import Pending from './MessagePending.svelte';
|
|
7
8
|
import Root from './MessageRoot.svelte';
|
|
8
9
|
import Time from './MessageTime.svelte';
|
|
9
|
-
export { Root, Header, Pending, Content, Actions, Action, Copy, Time,
|
|
10
|
+
export { Root, Header, Pending, Content, Bubble, Actions, Action, Copy, Time,
|
|
10
11
|
//
|
|
11
|
-
Root as MessageRoot, Header as MessageHeader, Pending as MessagePending, Content as MessageContent, Actions as MessageActions, Action as MessageAction, Copy as MessageCopy, Time as MessageTime };
|
|
12
|
+
Root as MessageRoot, Header as MessageHeader, Pending as MessagePending, Content as MessageContent, Bubble as MessageBubble, Actions as MessageActions, Action as MessageAction, Copy as MessageCopy, Time as MessageTime };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What a message's words look like, shared by Message.Content and Message.Bubble: the size
|
|
3
|
+
* they are read at, and the person's bubble.
|
|
4
|
+
*/
|
|
5
|
+
import * as stylex from '@stylexjs/stylex';
|
|
6
|
+
/** The size a message is read at: `reading`, a step up from interface text, or `body`, as the interface's. */
|
|
7
|
+
export type MessageTextSize = 'reading' | 'body';
|
|
8
|
+
export declare const text: Readonly<{
|
|
9
|
+
readonly reading: Readonly<{
|
|
10
|
+
readonly fontSize: stylex.StyleXClassNameFor<"fontSize", string>;
|
|
11
|
+
readonly lineHeight: stylex.StyleXClassNameFor<"lineHeight", string>;
|
|
12
|
+
}>;
|
|
13
|
+
readonly body: Readonly<{
|
|
14
|
+
readonly fontSize: stylex.StyleXClassNameFor<"fontSize", string>;
|
|
15
|
+
readonly lineHeight: stylex.StyleXClassNameFor<"lineHeight", string>;
|
|
16
|
+
}>;
|
|
17
|
+
}>;
|
|
18
|
+
export declare const bubble: Readonly<{
|
|
19
|
+
readonly bubble: Readonly<{
|
|
20
|
+
readonly boxSizing: stylex.StyleXClassNameFor<"boxSizing", "border-box">;
|
|
21
|
+
readonly maxWidth: stylex.StyleXClassNameFor<"maxWidth", "min(85%, 36rem)">;
|
|
22
|
+
readonly minWidth: stylex.StyleXClassNameFor<"minWidth", 0>;
|
|
23
|
+
readonly paddingBlock: stylex.StyleXClassNameFor<"paddingBlock", "0.5625rem">;
|
|
24
|
+
readonly paddingInline: stylex.StyleXClassNameFor<"paddingInline", "0.875rem">;
|
|
25
|
+
readonly borderRadius: stylex.StyleXClassNameFor<"borderRadius", string>;
|
|
26
|
+
readonly backgroundColor: stylex.StyleXClassNameFor<"backgroundColor", string>;
|
|
27
|
+
readonly whiteSpace: stylex.StyleXClassNameFor<"whiteSpace", "pre-wrap">;
|
|
28
|
+
readonly overflowWrap: stylex.StyleXClassNameFor<"overflowWrap", "anywhere">;
|
|
29
|
+
}>;
|
|
30
|
+
}>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What a message's words look like, shared by Message.Content and Message.Bubble: the size
|
|
3
|
+
* they are read at, and the person's bubble.
|
|
4
|
+
*/
|
|
5
|
+
import * as stylex from '@stylexjs/stylex';
|
|
6
|
+
import { colors, font, radius } from '../../tokens.stylex.js';
|
|
7
|
+
export const text = stylex.create({
|
|
8
|
+
reading: { fontSize: font.sizeReading, lineHeight: font.leadingNormal },
|
|
9
|
+
body: { fontSize: font.sizeBody, lineHeight: font.leadingNormal }
|
|
10
|
+
});
|
|
11
|
+
export const bubble = stylex.create({
|
|
12
|
+
// What the person wrote, kept as they typed it, line breaks and all
|
|
13
|
+
bubble: {
|
|
14
|
+
boxSizing: 'border-box',
|
|
15
|
+
maxWidth: 'min(85%, 36rem)',
|
|
16
|
+
minWidth: 0,
|
|
17
|
+
paddingBlock: '0.5625rem',
|
|
18
|
+
paddingInline: '0.875rem',
|
|
19
|
+
borderRadius: radius.frame,
|
|
20
|
+
backgroundColor: colors.fillMuted,
|
|
21
|
+
whiteSpace: 'pre-wrap',
|
|
22
|
+
overflowWrap: 'anywhere'
|
|
23
|
+
}
|
|
24
|
+
});
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
backgroundColor: colors.fillSunken,
|
|
56
56
|
color: colors.text
|
|
57
57
|
},
|
|
58
|
-
info: { backgroundColor: colors.
|
|
58
|
+
info: { backgroundColor: colors.infoSoft, color: colors.infoText },
|
|
59
59
|
success: { backgroundColor: colors.successSoft, color: colors.successText },
|
|
60
60
|
warning: { backgroundColor: colors.warningSoft, color: colors.warningText },
|
|
61
61
|
danger: { backgroundColor: colors.dangerSoft, color: colors.dangerText },
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
backgroundColor: colors.bgRaised,
|
|
66
66
|
boxShadow: `inset 0 0 0 1px ${colors.border}`
|
|
67
67
|
},
|
|
68
|
-
raisedInfo: { backgroundImage: `linear-gradient(${colors.
|
|
68
|
+
raisedInfo: { backgroundImage: `linear-gradient(${colors.infoSoft}, ${colors.infoSoft})` },
|
|
69
69
|
raisedSuccess: {
|
|
70
70
|
backgroundImage: `linear-gradient(${colors.successSoft}, ${colors.successSoft})`
|
|
71
71
|
},
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
},
|
|
78
78
|
icon: { display: 'grid', placeItems: 'center', width: '1rem', height: '1lh' },
|
|
79
79
|
iconNeutral: { color: colors.textMuted },
|
|
80
|
-
iconInfo: { color: colors.
|
|
80
|
+
iconInfo: { color: colors.info },
|
|
81
81
|
text: { display: 'flex', flexDirection: 'column', gap: '0.125rem', minWidth: 0 },
|
|
82
82
|
title: { fontWeight: font.weightMedium },
|
|
83
83
|
detail: {
|
|
@@ -3,11 +3,20 @@
|
|
|
3
3
|
import { Popover } from 'bits-ui';
|
|
4
4
|
import * as stylex from '@stylexjs/stylex';
|
|
5
5
|
import type { Snippet } from 'svelte';
|
|
6
|
-
import { layer } from '../../internal/layer.js';
|
|
6
|
+
import { layer, widthStyle } from '../../internal/layer.js';
|
|
7
7
|
import { attrs, type Sx } from '../../internal/sx.js';
|
|
8
8
|
|
|
9
9
|
export type PopoverContentProps = Loose<
|
|
10
10
|
Omit<Popover.ContentProps, 'children' | 'child'> & {
|
|
11
|
+
/**
|
|
12
|
+
* `default` gives its content room of its own; `none` takes the padding away, for
|
|
13
|
+
* content that brings its own, such as a list of items that reach the edges.
|
|
14
|
+
*/
|
|
15
|
+
padding?: 'default' | 'none' | undefined;
|
|
16
|
+
/** `column` sets its content one part under another, with room between them. */
|
|
17
|
+
layout?: 'block' | 'column' | undefined;
|
|
18
|
+
/** A width of its own, such as `20rem`, in place of fitting its content (16 to 22rem). */
|
|
19
|
+
width?: string | undefined;
|
|
11
20
|
sx?: Sx | undefined;
|
|
12
21
|
children?: Snippet | undefined;
|
|
13
22
|
}
|
|
@@ -15,7 +24,8 @@
|
|
|
15
24
|
|
|
16
25
|
const styles = stylex.create({
|
|
17
26
|
// Room for content of its own, rather than a list of items
|
|
18
|
-
padded: { padding: '0.75rem', minWidth: 'max(16rem, var(--bits-floating-anchor-width, 0px))' }
|
|
27
|
+
padded: { padding: '0.75rem', minWidth: 'max(16rem, var(--bits-floating-anchor-width, 0px))' },
|
|
28
|
+
bare: { padding: 0, minWidth: 'max(12rem, var(--bits-floating-anchor-width, 0px))' }
|
|
19
29
|
});
|
|
20
30
|
</script>
|
|
21
31
|
|
|
@@ -24,6 +34,10 @@
|
|
|
24
34
|
sideOffset = 6,
|
|
25
35
|
collisionPadding = 8,
|
|
26
36
|
align = 'start',
|
|
37
|
+
padding = 'default',
|
|
38
|
+
layout = 'block',
|
|
39
|
+
width,
|
|
40
|
+
style,
|
|
27
41
|
sx,
|
|
28
42
|
class: className,
|
|
29
43
|
children,
|
|
@@ -38,7 +52,17 @@
|
|
|
38
52
|
{align}
|
|
39
53
|
data-slot="popover-content"
|
|
40
54
|
{...rest}
|
|
41
|
-
{
|
|
55
|
+
style={widthStyle(width, style)}
|
|
56
|
+
{...attrs(
|
|
57
|
+
[
|
|
58
|
+
layer.surface,
|
|
59
|
+
padding === 'none' ? styles.bare : styles.padded,
|
|
60
|
+
layout === 'column' && layer.column,
|
|
61
|
+
!!width && layer.sized,
|
|
62
|
+
sx
|
|
63
|
+
],
|
|
64
|
+
className
|
|
65
|
+
)}
|
|
42
66
|
>
|
|
43
67
|
{@render children?.()}
|
|
44
68
|
</Popover.Content>
|
|
@@ -3,10 +3,28 @@ import { Popover } from 'bits-ui';
|
|
|
3
3
|
import type { Snippet } from 'svelte';
|
|
4
4
|
import { type Sx } from '../../internal/sx.js';
|
|
5
5
|
export type PopoverContentProps = Loose<Omit<Popover.ContentProps, 'children' | 'child'> & {
|
|
6
|
+
/**
|
|
7
|
+
* `default` gives its content room of its own; `none` takes the padding away, for
|
|
8
|
+
* content that brings its own, such as a list of items that reach the edges.
|
|
9
|
+
*/
|
|
10
|
+
padding?: 'default' | 'none' | undefined;
|
|
11
|
+
/** `column` sets its content one part under another, with room between them. */
|
|
12
|
+
layout?: 'block' | 'column' | undefined;
|
|
13
|
+
/** A width of its own, such as `20rem`, in place of fitting its content (16 to 22rem). */
|
|
14
|
+
width?: string | undefined;
|
|
6
15
|
sx?: Sx | undefined;
|
|
7
16
|
children?: Snippet | undefined;
|
|
8
17
|
}>;
|
|
9
18
|
declare const PopoverContent: import("svelte").Component<Loose<Omit<Popover.ContentProps, "children" | "child"> & {
|
|
19
|
+
/**
|
|
20
|
+
* `default` gives its content room of its own; `none` takes the padding away, for
|
|
21
|
+
* content that brings its own, such as a list of items that reach the edges.
|
|
22
|
+
*/
|
|
23
|
+
padding?: "default" | "none" | undefined;
|
|
24
|
+
/** `column` sets its content one part under another, with room between them. */
|
|
25
|
+
layout?: "block" | "column" | undefined;
|
|
26
|
+
/** A width of its own, such as `20rem`, in place of fitting its content (16 to 22rem). */
|
|
27
|
+
width?: string | undefined;
|
|
10
28
|
sx?: Sx | undefined;
|
|
11
29
|
children?: Snippet | undefined;
|
|
12
30
|
}>, {}, "">;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<!--
|
|
2
2
|
The agent asks the person questions, one at a time. Keys 1 to 9 pick an
|
|
3
|
-
answer, Enter goes on, ⌘Enter sends them all
|
|
4
|
-
focus as it arrives, so it is read
|
|
5
|
-
was said.
|
|
3
|
+
answer, Enter goes on, ⌘Enter sends them all once each is answered or
|
|
4
|
+
skipped. Each question's prompt takes focus as it arrives, so it is read
|
|
5
|
+
out. Once answered, it folds into what was said, a secret answer hidden.
|
|
6
6
|
-->
|
|
7
7
|
<script lang="ts" module>
|
|
8
8
|
import * as stylex from '@stylexjs/stylex';
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
import { colors, font, radius, space } from '../../tokens.stylex.js';
|
|
13
13
|
import { media } from '../../media.stylex.js';
|
|
14
14
|
import Button from '../button/Button.svelte';
|
|
15
|
+
import Input from '../input/Input.svelte';
|
|
15
16
|
import Kbd from '../kbd/Kbd.svelte';
|
|
16
17
|
import Progress from '../progress/Progress.svelte';
|
|
17
18
|
import Textarea from '../textarea/Textarea.svelte';
|
|
@@ -19,11 +20,18 @@
|
|
|
19
20
|
export type Question = {
|
|
20
21
|
id: string;
|
|
21
22
|
prompt: string;
|
|
23
|
+
/** More about the question, under it: why it is asked, what an answer changes. */
|
|
24
|
+
description?: string | undefined;
|
|
22
25
|
choices?: { label: string; description?: string | undefined }[] | undefined;
|
|
23
26
|
/** Lets several choices be picked. */
|
|
24
27
|
multiple?: boolean | undefined;
|
|
25
28
|
/** Offers a free answer as well; a string is its placeholder. */
|
|
26
29
|
other?: boolean | string | undefined;
|
|
30
|
+
/**
|
|
31
|
+
* The free answer is a secret, such as a token or a password: typed into a field that
|
|
32
|
+
* hides it, and never shown once the answers are in.
|
|
33
|
+
*/
|
|
34
|
+
secret?: boolean | undefined;
|
|
27
35
|
};
|
|
28
36
|
|
|
29
37
|
export type QuestionAnswer = {
|
|
@@ -40,9 +48,25 @@
|
|
|
40
48
|
ondecline?: (() => void) | undefined;
|
|
41
49
|
/** Once the answers are given, it folds into them. */
|
|
42
50
|
answered?: QuestionnaireAnswers | undefined;
|
|
51
|
+
/**
|
|
52
|
+
* Set while the answers are on their way: Send shows a spinner, and nothing else can be
|
|
53
|
+
* pressed or changed.
|
|
54
|
+
*/
|
|
55
|
+
busy?: boolean | undefined;
|
|
43
56
|
labels?:
|
|
44
57
|
| Partial<
|
|
45
|
-
Record<
|
|
58
|
+
Record<
|
|
59
|
+
| 'next'
|
|
60
|
+
| 'back'
|
|
61
|
+
| 'skip'
|
|
62
|
+
| 'send'
|
|
63
|
+
| 'decline'
|
|
64
|
+
| 'required'
|
|
65
|
+
| 'unanswered'
|
|
66
|
+
| 'skipped'
|
|
67
|
+
| 'hidden',
|
|
68
|
+
string
|
|
69
|
+
>
|
|
46
70
|
>
|
|
47
71
|
| undefined;
|
|
48
72
|
sx?: Sx | undefined;
|
|
@@ -56,7 +80,9 @@
|
|
|
56
80
|
send: 'Send answers',
|
|
57
81
|
decline: 'Decline',
|
|
58
82
|
required: 'Choose an answer, write one, or skip this question.',
|
|
59
|
-
|
|
83
|
+
unanswered: 'Answer or skip this question before sending.',
|
|
84
|
+
skipped: 'Skipped',
|
|
85
|
+
hidden: 'Hidden'
|
|
60
86
|
};
|
|
61
87
|
|
|
62
88
|
const styles = stylex.create({
|
|
@@ -78,6 +104,14 @@
|
|
|
78
104
|
lineHeight: font.leadingSnug,
|
|
79
105
|
outlineStyle: 'none'
|
|
80
106
|
},
|
|
107
|
+
about: {
|
|
108
|
+
marginTop: '-0.375rem',
|
|
109
|
+
marginBottom: 0,
|
|
110
|
+
color: colors.textMuted,
|
|
111
|
+
fontSize: font.sizeBody,
|
|
112
|
+
lineHeight: font.leadingNormal,
|
|
113
|
+
textWrap: 'pretty'
|
|
114
|
+
},
|
|
81
115
|
choices: {
|
|
82
116
|
display: 'flex',
|
|
83
117
|
flexDirection: 'column',
|
|
@@ -148,6 +182,7 @@
|
|
|
148
182
|
onsubmit,
|
|
149
183
|
ondecline,
|
|
150
184
|
answered,
|
|
185
|
+
busy = false,
|
|
151
186
|
labels,
|
|
152
187
|
sx,
|
|
153
188
|
class: className
|
|
@@ -205,15 +240,33 @@
|
|
|
205
240
|
else go(index + 1);
|
|
206
241
|
}
|
|
207
242
|
|
|
243
|
+
// Sends once every question is answered or skipped. Until then, it goes to the first that
|
|
244
|
+
// is not, and asks for an answer there.
|
|
245
|
+
async function sendAll() {
|
|
246
|
+
const open = questions.findIndex((q) => !given(answers[q.id]));
|
|
247
|
+
if (open === -1) {
|
|
248
|
+
onsubmit($state.snapshot(answers));
|
|
249
|
+
return;
|
|
250
|
+
}
|
|
251
|
+
if (open !== index) await go(open);
|
|
252
|
+
error = word.unanswered;
|
|
253
|
+
}
|
|
254
|
+
|
|
208
255
|
function onkeydown(event: KeyboardEvent) {
|
|
209
256
|
if (event.isComposing) return;
|
|
210
|
-
|
|
257
|
+
if (busy) {
|
|
258
|
+
if (event.key === 'Enter') event.preventDefault();
|
|
259
|
+
return;
|
|
260
|
+
}
|
|
261
|
+
// Typing an answer: in the free answer's field, not on a choice's radio or checkbox
|
|
262
|
+
const target = event.target;
|
|
263
|
+
const field =
|
|
264
|
+
target instanceof HTMLInputElement && target.type !== 'radio' && target.type !== 'checkbox';
|
|
265
|
+
const typing = target instanceof HTMLTextAreaElement || field;
|
|
211
266
|
if (event.key === 'Enter' && (event.metaKey || event.ctrlKey)) {
|
|
212
267
|
event.preventDefault();
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
onsubmit($state.snapshot(answers));
|
|
216
|
-
} else if (event.key === 'Enter' && !typing && !event.shiftKey) {
|
|
268
|
+
sendAll();
|
|
269
|
+
} else if (event.key === 'Enter' && !event.shiftKey && (!typing || field)) {
|
|
217
270
|
event.preventDefault();
|
|
218
271
|
next();
|
|
219
272
|
} else if (
|
|
@@ -231,8 +284,12 @@
|
|
|
231
284
|
}
|
|
232
285
|
}
|
|
233
286
|
|
|
234
|
-
const say = (a: QuestionAnswer | undefined) =>
|
|
235
|
-
!a || a.skipped
|
|
287
|
+
const say = (q: Question, a: QuestionAnswer | undefined) =>
|
|
288
|
+
!a || a.skipped
|
|
289
|
+
? word.skipped
|
|
290
|
+
: [...a.choices, q.secret && a.other?.trim() ? word.hidden : a.other?.trim()]
|
|
291
|
+
.filter(Boolean)
|
|
292
|
+
.join(', ');
|
|
236
293
|
</script>
|
|
237
294
|
|
|
238
295
|
{#if answered}
|
|
@@ -240,7 +297,7 @@
|
|
|
240
297
|
{#each questions as q (q.id)}
|
|
241
298
|
<div>
|
|
242
299
|
<dt {...stylex.attrs(styles.q)}>{q.prompt}</dt>
|
|
243
|
-
<dd {...stylex.attrs(styles.a)}>{say(answered[q.id])}</dd>
|
|
300
|
+
<dd {...stylex.attrs(styles.a)}>{say(q, answered[q.id])}</dd>
|
|
244
301
|
</div>
|
|
245
302
|
{/each}
|
|
246
303
|
</dl>
|
|
@@ -249,6 +306,7 @@
|
|
|
249
306
|
role="group"
|
|
250
307
|
aria-labelledby="{uid}-prompt"
|
|
251
308
|
data-slot="questionnaire"
|
|
309
|
+
aria-busy={busy || undefined}
|
|
252
310
|
{...attrs([styles.card, sx], className)}
|
|
253
311
|
{onkeydown}
|
|
254
312
|
>
|
|
@@ -267,9 +325,17 @@
|
|
|
267
325
|
<p bind:this={prompt} id="{uid}-prompt" tabindex="-1" {...stylex.attrs(styles.prompt)}>
|
|
268
326
|
{question.prompt}
|
|
269
327
|
</p>
|
|
328
|
+
{#if question.description}
|
|
329
|
+
<p id="{uid}-about" {...stylex.attrs(styles.about)}>{question.description}</p>
|
|
330
|
+
{/if}
|
|
270
331
|
|
|
271
332
|
{#if question.choices?.length}
|
|
272
|
-
<fieldset
|
|
333
|
+
<fieldset
|
|
334
|
+
disabled={busy}
|
|
335
|
+
aria-labelledby="{uid}-prompt"
|
|
336
|
+
aria-describedby={question.description ? `${uid}-about` : undefined}
|
|
337
|
+
{...stylex.attrs(styles.choices)}
|
|
338
|
+
>
|
|
273
339
|
{#each question.choices as choice, n (choice.label)}
|
|
274
340
|
<label {...stylex.attrs(styles.choice)}>
|
|
275
341
|
<input
|
|
@@ -291,8 +357,23 @@
|
|
|
291
357
|
</fieldset>
|
|
292
358
|
{/if}
|
|
293
359
|
|
|
294
|
-
{#if question.other || !question.choices?.length}
|
|
360
|
+
{#if question.secret && (question.other || !question.choices?.length)}
|
|
361
|
+
<!-- Hidden as it is typed, and kept out of the browser's memory of what was typed -->
|
|
362
|
+
<Input
|
|
363
|
+
type="password"
|
|
364
|
+
autocomplete="off"
|
|
365
|
+
spellcheck={false}
|
|
366
|
+
disabled={busy}
|
|
367
|
+
aria-label={typeof question.other === 'string' ? question.other : 'Your answer'}
|
|
368
|
+
aria-describedby={question.description ? `${uid}-about` : undefined}
|
|
369
|
+
placeholder={typeof question.other === 'string' ? question.other : 'Your answer'}
|
|
370
|
+
value={answer.other ?? ''}
|
|
371
|
+
oninput={(event) => set({ ...answer, skipped: false, other: event.currentTarget.value })}
|
|
372
|
+
/>
|
|
373
|
+
{:else if question.other || !question.choices?.length}
|
|
295
374
|
<Textarea
|
|
375
|
+
disabled={busy}
|
|
376
|
+
aria-describedby={question.description ? `${uid}-about` : undefined}
|
|
296
377
|
autosize
|
|
297
378
|
rows={2}
|
|
298
379
|
aria-label={typeof question.other === 'string' ? question.other : 'Your answer'}
|
|
@@ -305,14 +386,17 @@
|
|
|
305
386
|
{#if error}<p role="alert" {...stylex.attrs(styles.error)}>{error}</p>{/if}
|
|
306
387
|
|
|
307
388
|
<div {...stylex.attrs(styles.foot)}>
|
|
308
|
-
{#if ondecline}<Button size="sm" variant="ghost" onclick={ondecline}
|
|
389
|
+
{#if ondecline}<Button size="sm" variant="ghost" disabled={busy} onclick={ondecline}
|
|
390
|
+
>{word.decline}</Button
|
|
309
391
|
>{/if}
|
|
310
392
|
<span {...stylex.attrs(styles.spacer)}></span>
|
|
311
|
-
<Button size="sm" variant="ghost" onclick={skip}>{word.skip}</Button>
|
|
312
|
-
{#if index > 0}<Button size="sm" variant="ghost" onclick={() => go(index - 1)}
|
|
393
|
+
<Button size="sm" variant="ghost" disabled={busy} onclick={skip}>{word.skip}</Button>
|
|
394
|
+
{#if index > 0}<Button size="sm" variant="ghost" disabled={busy} onclick={() => go(index - 1)}
|
|
313
395
|
>{word.back}</Button
|
|
314
396
|
>{/if}
|
|
315
|
-
<Button size="sm" variant="primary"
|
|
397
|
+
<Button size="sm" variant="primary" loading={busy} onclick={next}
|
|
398
|
+
>{last ? word.send : word.next}</Button
|
|
399
|
+
>
|
|
316
400
|
</div>
|
|
317
401
|
</section>
|
|
318
402
|
{/if}
|
|
@@ -2,6 +2,8 @@ import { type Sx } from '../../internal/sx.js';
|
|
|
2
2
|
export type Question = {
|
|
3
3
|
id: string;
|
|
4
4
|
prompt: string;
|
|
5
|
+
/** More about the question, under it: why it is asked, what an answer changes. */
|
|
6
|
+
description?: string | undefined;
|
|
5
7
|
choices?: {
|
|
6
8
|
label: string;
|
|
7
9
|
description?: string | undefined;
|
|
@@ -10,6 +12,11 @@ export type Question = {
|
|
|
10
12
|
multiple?: boolean | undefined;
|
|
11
13
|
/** Offers a free answer as well; a string is its placeholder. */
|
|
12
14
|
other?: boolean | string | undefined;
|
|
15
|
+
/**
|
|
16
|
+
* The free answer is a secret, such as a token or a password: typed into a field that
|
|
17
|
+
* hides it, and never shown once the answers are in.
|
|
18
|
+
*/
|
|
19
|
+
secret?: boolean | undefined;
|
|
13
20
|
};
|
|
14
21
|
export type QuestionAnswer = {
|
|
15
22
|
choices: string[];
|
|
@@ -24,7 +31,12 @@ export type QuestionnaireProps = {
|
|
|
24
31
|
ondecline?: (() => void) | undefined;
|
|
25
32
|
/** Once the answers are given, it folds into them. */
|
|
26
33
|
answered?: QuestionnaireAnswers | undefined;
|
|
27
|
-
|
|
34
|
+
/**
|
|
35
|
+
* Set while the answers are on their way: Send shows a spinner, and nothing else can be
|
|
36
|
+
* pressed or changed.
|
|
37
|
+
*/
|
|
38
|
+
busy?: boolean | undefined;
|
|
39
|
+
labels?: Partial<Record<'next' | 'back' | 'skip' | 'send' | 'decline' | 'required' | 'unanswered' | 'skipped' | 'hidden', string>> | undefined;
|
|
28
40
|
sx?: Sx | undefined;
|
|
29
41
|
class?: string | undefined;
|
|
30
42
|
};
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
import { attrs, type Sx } from '../../internal/sx.js';
|
|
11
11
|
import { colors, font, radius } from '../../tokens.stylex.js';
|
|
12
12
|
import Button from '../button/Button.svelte';
|
|
13
|
+
import { text, type MessageTextSize } from '../message/styles.js';
|
|
13
14
|
import * as Tooltip from '../tooltip/index.js';
|
|
14
15
|
|
|
15
16
|
export type QueuedMessageStatus = 'queued' | 'editing' | 'unsent';
|
|
@@ -26,12 +27,23 @@
|
|
|
26
27
|
/** Stops the turn and sends it. */
|
|
27
28
|
onsend?: (() => void) | undefined;
|
|
28
29
|
labels?: Partial<Record<'edit' | 'takeBack' | 'steer' | 'send', string>> | undefined;
|
|
30
|
+
/**
|
|
31
|
+
* Holds the actions back, such as while the message is being sent: `true` for all of
|
|
32
|
+
* them, or the ones to hold back by name.
|
|
33
|
+
*/
|
|
34
|
+
disabled?: boolean | QueuedMessageAction[] | undefined;
|
|
35
|
+
/** The size its words are read at, as a Message's `textSize`. */
|
|
36
|
+
textSize?: MessageTextSize | undefined;
|
|
37
|
+
/** What goes with it, over the bubble: its images and files. */
|
|
38
|
+
attachments?: Snippet | undefined;
|
|
29
39
|
sx?: Sx | undefined;
|
|
30
40
|
class?: string | undefined;
|
|
31
|
-
/** The message. */
|
|
41
|
+
/** The message's words. With none, only its attachments show, with no bubble. */
|
|
32
42
|
children?: Snippet | undefined;
|
|
33
43
|
};
|
|
34
44
|
|
|
45
|
+
export type QueuedMessageAction = 'edit' | 'takeBack' | 'steer' | 'send';
|
|
46
|
+
|
|
35
47
|
// One short label each. What "queued" means is said on hover, not strung on with a dot.
|
|
36
48
|
const STATUS: Record<QueuedMessageStatus, string> = {
|
|
37
49
|
queued: 'Queued',
|
|
@@ -51,7 +63,18 @@
|
|
|
51
63
|
gap: '0.25rem',
|
|
52
64
|
minWidth: 0
|
|
53
65
|
},
|
|
66
|
+
attachments: {
|
|
67
|
+
display: { default: 'flex', ':empty': 'none' },
|
|
68
|
+
flexWrap: 'wrap',
|
|
69
|
+
justifyContent: 'flex-end',
|
|
70
|
+
gap: '0.375rem',
|
|
71
|
+
maxWidth: 'min(85%, 36rem)',
|
|
72
|
+
// Waiting, as the bubble is
|
|
73
|
+
opacity: 0.8
|
|
74
|
+
},
|
|
54
75
|
bubble: {
|
|
76
|
+
// A bubble with no words in it is not drawn
|
|
77
|
+
display: { default: 'block', ':empty': 'none' },
|
|
55
78
|
maxWidth: 'min(85%, 36rem)',
|
|
56
79
|
paddingBlock: '0.5625rem',
|
|
57
80
|
paddingInline: '0.875rem',
|
|
@@ -59,8 +82,6 @@
|
|
|
59
82
|
backgroundColor: 'transparent',
|
|
60
83
|
boxShadow: `inset 0 0 0 1px ${colors.borderStrong}`,
|
|
61
84
|
color: colors.textMuted,
|
|
62
|
-
fontSize: font.sizeReading,
|
|
63
|
-
lineHeight: font.leadingNormal,
|
|
64
85
|
whiteSpace: 'pre-wrap',
|
|
65
86
|
overflowWrap: 'anywhere'
|
|
66
87
|
},
|
|
@@ -87,11 +108,17 @@
|
|
|
87
108
|
onsteer,
|
|
88
109
|
onsend,
|
|
89
110
|
labels,
|
|
111
|
+
disabled = false,
|
|
112
|
+
textSize = 'reading',
|
|
113
|
+
attachments,
|
|
90
114
|
sx,
|
|
91
115
|
class: className,
|
|
92
116
|
children
|
|
93
117
|
}: QueuedMessageProps = $props();
|
|
94
118
|
|
|
119
|
+
const held = (key: QueuedMessageAction) =>
|
|
120
|
+
disabled === true || (Array.isArray(disabled) && disabled.includes(key));
|
|
121
|
+
|
|
95
122
|
const actions = $derived(
|
|
96
123
|
(
|
|
97
124
|
[
|
|
@@ -105,9 +132,19 @@
|
|
|
105
132
|
</script>
|
|
106
133
|
|
|
107
134
|
<div data-slot="queued-message" data-status={status} {...attrs([styles.root, sx], className)}>
|
|
108
|
-
|
|
109
|
-
{
|
|
110
|
-
|
|
135
|
+
{#if attachments}
|
|
136
|
+
<div data-slot="queued-message-attachments" {...stylex.attrs(styles.attachments)}>
|
|
137
|
+
{@render attachments()}
|
|
138
|
+
</div>
|
|
139
|
+
{/if}
|
|
140
|
+
{#if children}
|
|
141
|
+
<div
|
|
142
|
+
data-slot="queued-message-bubble"
|
|
143
|
+
{...stylex.attrs(styles.bubble, text[textSize], status !== 'unsent' && styles.waiting)}
|
|
144
|
+
>
|
|
145
|
+
{@render children()}
|
|
146
|
+
</div>
|
|
147
|
+
{/if}
|
|
111
148
|
<div {...stylex.attrs(styles.foot)}>
|
|
112
149
|
<span
|
|
113
150
|
title={statusText ? undefined : DETAIL[status]}
|
|
@@ -126,6 +163,7 @@
|
|
|
126
163
|
size="sm"
|
|
127
164
|
iconOnly
|
|
128
165
|
aria-label={label}
|
|
166
|
+
disabled={held(key)}
|
|
129
167
|
onclick={() => handler?.()}
|
|
130
168
|
>
|
|
131
169
|
<Glyph name={icon as GlyphName} />
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Snippet } from 'svelte';
|
|
2
2
|
import { type Sx } from '../../internal/sx.js';
|
|
3
|
+
import { type MessageTextSize } from '../message/styles.js';
|
|
3
4
|
export type QueuedMessageStatus = 'queued' | 'editing' | 'unsent';
|
|
4
5
|
export type QueuedMessageProps = {
|
|
5
6
|
status?: QueuedMessageStatus | undefined;
|
|
@@ -13,11 +14,21 @@ export type QueuedMessageProps = {
|
|
|
13
14
|
/** Stops the turn and sends it. */
|
|
14
15
|
onsend?: (() => void) | undefined;
|
|
15
16
|
labels?: Partial<Record<'edit' | 'takeBack' | 'steer' | 'send', string>> | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* Holds the actions back, such as while the message is being sent: `true` for all of
|
|
19
|
+
* them, or the ones to hold back by name.
|
|
20
|
+
*/
|
|
21
|
+
disabled?: boolean | QueuedMessageAction[] | undefined;
|
|
22
|
+
/** The size its words are read at, as a Message's `textSize`. */
|
|
23
|
+
textSize?: MessageTextSize | undefined;
|
|
24
|
+
/** What goes with it, over the bubble: its images and files. */
|
|
25
|
+
attachments?: Snippet | undefined;
|
|
16
26
|
sx?: Sx | undefined;
|
|
17
27
|
class?: string | undefined;
|
|
18
|
-
/** The message. */
|
|
28
|
+
/** The message's words. With none, only its attachments show, with no bubble. */
|
|
19
29
|
children?: Snippet | undefined;
|
|
20
30
|
};
|
|
31
|
+
export type QueuedMessageAction = 'edit' | 'takeBack' | 'steer' | 'send';
|
|
21
32
|
declare const QueuedMessage: import("svelte").Component<QueuedMessageProps, {}, "">;
|
|
22
33
|
type QueuedMessage = ReturnType<typeof QueuedMessage>;
|
|
23
34
|
export default QueuedMessage;
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
import type { IconComponent } from '../../internal/icon.js';
|
|
7
7
|
import { Select } from 'bits-ui';
|
|
8
8
|
import * as stylex from '@stylexjs/stylex';
|
|
9
|
+
import type { Snippet } from 'svelte';
|
|
9
10
|
import Glyph from '../../internal/Glyph.svelte';
|
|
10
11
|
import { control, type ControlSize } from '../../internal/control.js';
|
|
11
12
|
import { layer } from '../../internal/layer.js';
|
|
@@ -32,6 +33,12 @@
|
|
|
32
33
|
value?: string | undefined;
|
|
33
34
|
/** Shown while nothing is chosen. */
|
|
34
35
|
placeholder?: string | undefined;
|
|
36
|
+
/**
|
|
37
|
+
* Draws each option's icon, in the list and on the trigger, in place of `option.icon`:
|
|
38
|
+
* for an icon that takes props, such as a provider's mark in its colours, or a dot.
|
|
39
|
+
* It is given the option, and is sized as a 16px icon.
|
|
40
|
+
*/
|
|
41
|
+
optionIcon?: Snippet<[option: SelectOption]> | undefined;
|
|
35
42
|
size?: ControlSize | undefined;
|
|
36
43
|
/** Where the list lines up with the trigger: `end` for a select at the end of a row. */
|
|
37
44
|
align?: 'start' | 'center' | 'end' | undefined;
|
|
@@ -92,6 +99,7 @@
|
|
|
92
99
|
options,
|
|
93
100
|
value = $bindable(),
|
|
94
101
|
placeholder = 'Choose…',
|
|
102
|
+
optionIcon,
|
|
95
103
|
size = 'md',
|
|
96
104
|
align = 'start',
|
|
97
105
|
disabled,
|
|
@@ -124,7 +132,11 @@
|
|
|
124
132
|
data-slot="select"
|
|
125
133
|
{...attrs([control.base, control[size], styles.trigger, sx], className)}
|
|
126
134
|
>
|
|
127
|
-
{#if selected
|
|
135
|
+
{#if selected && optionIcon}
|
|
136
|
+
<span data-icons aria-hidden="true" {...stylex.attrs(styles.icon)}
|
|
137
|
+
>{@render optionIcon(selected)}</span
|
|
138
|
+
>
|
|
139
|
+
{:else if selected?.icon}
|
|
128
140
|
<span data-icons {...stylex.attrs(styles.icon)}><selected.icon aria-hidden="true" /></span>
|
|
129
141
|
{/if}
|
|
130
142
|
<span {...stylex.attrs(styles.value, !selected && styles.placeholder)}>
|
|
@@ -150,7 +162,11 @@
|
|
|
150
162
|
{...stylex.attrs(layer.item)}
|
|
151
163
|
>
|
|
152
164
|
{#snippet children({ selected })}
|
|
153
|
-
{#if
|
|
165
|
+
{#if optionIcon}
|
|
166
|
+
<span data-icons aria-hidden="true" {...stylex.attrs(layer.icon)}
|
|
167
|
+
>{@render optionIcon(option)}</span
|
|
168
|
+
>
|
|
169
|
+
{:else if option.icon}
|
|
154
170
|
<span data-icons {...stylex.attrs(layer.icon)}
|
|
155
171
|
><option.icon aria-hidden="true" /></span
|
|
156
172
|
>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { IconComponent } from '../../internal/icon.js';
|
|
2
2
|
import { Select } from 'bits-ui';
|
|
3
|
+
import type { Snippet } from 'svelte';
|
|
3
4
|
import { type ControlSize } from '../../internal/control.js';
|
|
4
5
|
import { type Sx } from '../../internal/sx.js';
|
|
5
6
|
export type SelectOption = {
|
|
@@ -20,6 +21,12 @@ export type SelectProps = {
|
|
|
20
21
|
value?: string | undefined;
|
|
21
22
|
/** Shown while nothing is chosen. */
|
|
22
23
|
placeholder?: string | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* Draws each option's icon, in the list and on the trigger, in place of `option.icon`:
|
|
26
|
+
* for an icon that takes props, such as a provider's mark in its colours, or a dot.
|
|
27
|
+
* It is given the option, and is sized as a 16px icon.
|
|
28
|
+
*/
|
|
29
|
+
optionIcon?: Snippet<[option: SelectOption]> | undefined;
|
|
23
30
|
size?: ControlSize | undefined;
|
|
24
31
|
/** Where the list lines up with the trigger: `end` for a select at the end of a row. */
|
|
25
32
|
align?: 'start' | 'center' | 'end' | undefined;
|