@diegopluna/narvi 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +102 -41
- package/dist/base.css +2 -2
- package/dist/color.d.ts +1 -1
- package/dist/color.js +1 -1
- package/dist/components/activity/ActivityContent.svelte +3 -15
- package/dist/components/activity/ActivityStep.svelte +12 -12
- package/dist/components/activity/ActivityThought.svelte +4 -4
- package/dist/components/activity/ActivityTrigger.svelte +3 -3
- package/dist/components/app-shell/AppShellBar.svelte +89 -0
- package/dist/components/app-shell/AppShellBar.svelte.d.ts +20 -0
- package/dist/components/app-shell/AppShellHeader.svelte +17 -16
- package/dist/components/app-shell/AppShellHeader.svelte.d.ts +2 -2
- package/dist/components/app-shell/AppShellMain.svelte +4 -20
- package/dist/components/app-shell/AppShellPanel.svelte +21 -19
- package/dist/components/app-shell/AppShellPanes.svelte +58 -0
- package/dist/components/app-shell/AppShellPanes.svelte.d.ts +11 -0
- package/dist/components/app-shell/AppShellRail.svelte +85 -0
- package/dist/components/app-shell/AppShellRail.svelte.d.ts +11 -0
- package/dist/components/app-shell/AppShellRoot.svelte +50 -24
- package/dist/components/app-shell/AppShellRoot.svelte.d.ts +8 -6
- package/dist/components/app-shell/AppShellSheet.svelte +95 -0
- package/dist/components/app-shell/AppShellSheet.svelte.d.ts +17 -0
- package/dist/components/app-shell/AppShellSidebar.svelte +37 -61
- package/dist/components/app-shell/AppShellSidebar.svelte.d.ts +1 -5
- package/dist/components/app-shell/AppShellToggle.svelte +62 -23
- package/dist/components/app-shell/AppShellToggle.svelte.d.ts +2 -0
- package/dist/components/app-shell/context.d.ts +6 -0
- package/dist/components/app-shell/index.d.ts +9 -1
- package/dist/components/app-shell/index.js +5 -1
- package/dist/components/approval/Approval.svelte +91 -19
- package/dist/components/approval/Approval.svelte.d.ts +7 -0
- package/dist/components/avatar/AvatarFallback.svelte +1 -2
- package/dist/components/avatar/AvatarRoot.svelte +2 -2
- package/dist/components/badge/Badge.svelte +5 -5
- package/dist/components/button/Button.svelte +219 -40
- package/dist/components/button/Button.svelte.d.ts +38 -2
- package/dist/components/card/Card.svelte +15 -26
- package/dist/components/change-stats/ChangeStats.svelte +1 -2
- package/dist/components/changes-summary/ChangesSummary.svelte +14 -15
- package/dist/components/checkbox/Checkbox.svelte +18 -15
- package/dist/components/checkbox/Checkbox.svelte.d.ts +5 -0
- package/dist/components/code/Code.svelte +1 -2
- package/dist/components/collapsible/CollapsibleTrigger.svelte +2 -2
- package/dist/components/command/CommandItem.svelte +1 -1
- package/dist/components/command/styles.d.ts +3 -2
- package/dist/components/command/styles.js +13 -10
- package/dist/components/composer/ComposerAttachButton.svelte +1 -1
- package/dist/components/composer/ComposerAttachment.svelte +9 -12
- package/dist/components/composer/ComposerModelPicker.svelte +18 -20
- package/dist/components/composer/ComposerRoot.svelte +8 -7
- package/dist/components/composer/ComposerSubmit.svelte +8 -15
- package/dist/components/composer/ComposerTextarea.svelte +1 -1
- package/dist/components/composer/ComposerToggle.svelte +9 -11
- package/dist/components/composer/ComposerTray.svelte +78 -0
- package/dist/components/composer/ComposerTray.svelte.d.ts +15 -0
- package/dist/components/composer/index.d.ts +3 -1
- package/dist/components/composer/index.js +3 -2
- package/dist/components/conversation/ConversationContent.svelte +3 -2
- package/dist/components/conversation/ConversationEmpty.svelte +1 -1
- package/dist/components/conversation/ConversationScrollButton.svelte +3 -3
- package/dist/components/dialog/ConfirmDialog.svelte +1 -1
- package/dist/components/dialog/styles.d.ts +2 -3
- package/dist/components/dialog/styles.js +5 -6
- package/dist/components/divider/Divider.svelte +3 -3
- package/dist/components/empty-state/EmptyState.svelte +4 -5
- package/dist/components/field/Field.svelte +4 -4
- package/dist/components/frame/Frame.svelte +6 -7
- package/dist/components/frame/Frame.svelte.d.ts +1 -1
- package/dist/components/heading/Heading.svelte +2 -2
- package/dist/components/kbd/Kbd.svelte +12 -7
- package/dist/components/link/Link.svelte +7 -3
- package/dist/components/link/Link.svelte.d.ts +4 -1
- package/dist/components/markdown/Markdown.svelte +714 -0
- package/dist/components/markdown/Markdown.svelte.d.ts +80 -0
- package/dist/components/markdown/MarkdownBlock.svelte +231 -0
- package/dist/components/markdown/MarkdownBlock.svelte.d.ts +11 -0
- package/dist/components/markdown/MarkdownBlocks.svelte +115 -0
- package/dist/components/markdown/MarkdownBlocks.svelte.d.ts +15 -0
- package/dist/components/markdown/MarkdownCode.svelte +583 -0
- package/dist/components/markdown/MarkdownCode.svelte.d.ts +23 -0
- package/dist/components/markdown/MarkdownDiagram.svelte +310 -0
- package/dist/components/markdown/MarkdownDiagram.svelte.d.ts +6 -0
- package/dist/components/markdown/MarkdownFile.svelte +134 -0
- package/dist/components/markdown/MarkdownFile.svelte.d.ts +19 -0
- package/dist/components/markdown/MarkdownFootnotes.svelte +61 -0
- package/dist/components/markdown/MarkdownFootnotes.svelte.d.ts +8 -0
- package/dist/components/markdown/MarkdownFresh.svelte +69 -0
- package/dist/components/markdown/MarkdownFresh.svelte.d.ts +6 -0
- package/dist/components/markdown/MarkdownHtml.svelte +72 -0
- package/dist/components/markdown/MarkdownHtml.svelte.d.ts +7 -0
- package/dist/components/markdown/MarkdownImage.svelte +150 -0
- package/dist/components/markdown/MarkdownImage.svelte.d.ts +8 -0
- package/dist/components/markdown/MarkdownInlines.svelte +225 -0
- package/dist/components/markdown/MarkdownInlines.svelte.d.ts +7 -0
- package/dist/components/markdown/MarkdownLink.svelte +120 -0
- package/dist/components/markdown/MarkdownLink.svelte.d.ts +25 -0
- package/dist/components/markdown/MarkdownMath.svelte +138 -0
- package/dist/components/markdown/MarkdownMath.svelte.d.ts +7 -0
- package/dist/components/markdown/MarkdownTable.svelte +265 -0
- package/dist/components/markdown/MarkdownTable.svelte.d.ts +17 -0
- package/dist/components/markdown/caret.d.ts +14 -0
- package/dist/components/markdown/caret.js +67 -0
- package/dist/components/markdown/context.d.ts +93 -0
- package/dist/components/markdown/context.js +128 -0
- package/dist/components/markdown/copy.d.ts +13 -0
- package/dist/components/markdown/copy.js +74 -0
- package/dist/components/markdown/hidden.d.ts +12 -0
- package/dist/components/markdown/hidden.js +31 -0
- package/dist/components/markdown/kept.d.ts +32 -0
- package/dist/components/markdown/kept.js +71 -0
- package/dist/components/markdown/labels.d.ts +46 -0
- package/dist/components/markdown/labels.js +35 -0
- package/dist/components/markdown/save.d.ts +11 -0
- package/dist/components/markdown/save.js +58 -0
- package/dist/components/markdown/scrollable.d.ts +24 -0
- package/dist/components/markdown/scrollable.js +152 -0
- package/dist/components/markdown/static.d.ts +37 -0
- package/dist/components/markdown/static.js +233 -0
- package/dist/components/markdown/styles.d.ts +328 -0
- package/dist/components/markdown/styles.js +302 -0
- package/dist/components/menu/MenuRadioItem.svelte +3 -3
- package/dist/components/menu/index.d.ts +23 -0
- package/dist/components/menu/index.js +3 -1
- package/dist/components/message/MessageAction.svelte +22 -2
- package/dist/components/message/MessageAction.svelte.d.ts +9 -0
- package/dist/components/message/MessageContent.svelte +2 -3
- package/dist/components/message/MessageCopy.svelte +62 -3
- package/dist/components/message/MessageCopy.svelte.d.ts +17 -1
- package/dist/components/message/MessageHeader.svelte +3 -3
- package/dist/components/message/MessagePending.svelte +1 -1
- package/dist/components/message/MessageTime.svelte +1 -1
- package/dist/components/notice/Notice.svelte +14 -10
- package/dist/components/plan/Plan.svelte +22 -17
- package/dist/components/progress/Progress.svelte +31 -33
- package/dist/components/questionnaire/Questionnaire.svelte +19 -22
- package/dist/components/queued-message/QueuedMessage.svelte +14 -7
- package/dist/components/rail/RailItem.svelte +37 -34
- package/dist/components/rail/RailItem.svelte.d.ts +3 -1
- package/dist/components/rail/RailRoot.svelte +18 -4
- package/dist/components/rail/RailRoot.svelte.d.ts +1 -1
- package/dist/components/rail/RailSeparator.svelte +17 -0
- package/dist/components/rail/RailSeparator.svelte.d.ts +18 -0
- package/dist/components/rail/index.d.ts +2 -1
- package/dist/components/rail/index.js +2 -1
- package/dist/components/reasoning/ReasoningContent.svelte +4 -8
- package/dist/components/reasoning/ReasoningTrigger.svelte +2 -2
- package/dist/components/resize-handle/ResizeHandle.svelte +2 -3
- package/dist/components/segmented/SegmentedControl.svelte +7 -8
- package/dist/components/select/Select.svelte +1 -1
- package/dist/components/separator/Separator.svelte +1 -1
- package/dist/components/settings-row/SettingsRow.svelte +5 -5
- package/dist/components/shimmer/Shimmer.svelte +34 -21
- package/dist/components/sidebar/SidebarContent.svelte +1 -1
- package/dist/components/sidebar/SidebarFolder.svelte +142 -0
- package/dist/components/sidebar/SidebarFolder.svelte.d.ts +19 -0
- package/dist/components/sidebar/SidebarFooter.svelte +1 -1
- package/dist/components/sidebar/SidebarGroup.svelte +36 -32
- package/dist/components/sidebar/SidebarGroup.svelte.d.ts +3 -3
- package/dist/components/sidebar/SidebarHeader.svelte +12 -6
- package/dist/components/sidebar/SidebarHeader.svelte.d.ts +4 -1
- package/dist/components/sidebar/SidebarItem.svelte +26 -32
- package/dist/components/sidebar/SidebarRoot.svelte +62 -0
- package/dist/components/sidebar/SidebarRoot.svelte.d.ts +14 -0
- package/dist/components/sidebar/index.d.ts +5 -1
- package/dist/components/sidebar/index.js +3 -1
- package/dist/components/skeleton/Skeleton.svelte +26 -15
- package/dist/components/slider/Slider.svelte +11 -10
- package/dist/components/spinner/Spinner.svelte +4 -11
- package/dist/components/status-indicator/StatusIndicator.svelte +1 -1
- package/dist/components/suggestions/SuggestionsItem.svelte +5 -5
- package/dist/components/switch/Switch.svelte +9 -14
- package/dist/components/tab-strip/TabStrip.svelte +340 -0
- package/dist/components/tab-strip/TabStrip.svelte.d.ts +31 -0
- package/dist/components/tabs/Tabs.svelte +13 -9
- package/dist/components/tabs/Tabs.svelte.d.ts +4 -0
- package/dist/components/text/Text.svelte +31 -23
- package/dist/components/text/Text.svelte.d.ts +8 -4
- package/dist/components/toast/Toaster.svelte +5 -5
- package/dist/components/tool/ToolContent.svelte +3 -8
- package/dist/components/tool/ToolSection.svelte +4 -5
- package/dist/components/tool/ToolTrigger.svelte +10 -9
- package/dist/components/tooltip/TooltipContent.svelte +3 -3
- package/dist/components/work-fold/WorkFold.svelte +5 -9
- package/dist/index.d.ts +16 -8
- package/dist/index.js +17 -10
- package/dist/internal/Code.svelte +3 -4
- package/dist/internal/Glyph.svelte +16 -0
- package/dist/internal/Glyph.svelte.d.ts +6 -0
- package/dist/internal/Tile.svelte +17 -37
- package/dist/internal/control.d.ts +4 -4
- package/dist/internal/control.js +20 -17
- package/dist/internal/layer.d.ts +3 -5
- package/dist/internal/layer.js +10 -12
- package/dist/internal/markers.stylex.d.ts +8 -0
- package/dist/internal/markers.stylex.js +4 -0
- package/dist/internal/plugin-order.d.ts +8 -0
- package/dist/internal/plugin-order.js +16 -0
- package/dist/internal/roving.js +5 -2
- package/dist/internal/shared.d.ts +8 -1
- package/dist/internal/shared.js +21 -5
- package/dist/internal/sx.d.ts +1 -1
- package/dist/internal/toggle.d.ts +1 -2
- package/dist/internal/toggle.js +8 -12
- package/dist/internal/visible.d.ts +32 -0
- package/dist/internal/visible.js +44 -0
- package/dist/markdown/ast.d.ts +209 -0
- package/dist/markdown/ast.js +10 -0
- package/dist/markdown/blocks.d.ts +177 -0
- package/dist/markdown/blocks.js +1489 -0
- package/dist/markdown/code-info.d.ts +10 -0
- package/dist/markdown/code-info.js +16 -0
- package/dist/markdown/common.d.ts +25 -0
- package/dist/markdown/common.js +107 -0
- package/dist/markdown/diagrams.d.ts +2 -0
- package/dist/markdown/diagrams.js +18 -0
- package/dist/markdown/file-paths.d.ts +29 -0
- package/dist/markdown/file-paths.js +80 -0
- package/dist/markdown/files.d.ts +16 -0
- package/dist/markdown/files.js +133 -0
- package/dist/markdown/highlight.d.ts +30 -0
- package/dist/markdown/highlight.js +127 -0
- package/dist/markdown/html.d.ts +23 -0
- package/dist/markdown/html.js +289 -0
- package/dist/markdown/images.d.ts +15 -0
- package/dist/markdown/images.js +45 -0
- package/dist/markdown/index.d.ts +12 -0
- package/dist/markdown/index.js +5 -0
- package/dist/markdown/inlines.d.ts +48 -0
- package/dist/markdown/inlines.js +1714 -0
- package/dist/markdown/math.d.ts +2 -0
- package/dist/markdown/math.js +22 -0
- package/dist/markdown/parse.d.ts +81 -0
- package/dist/markdown/parse.js +204 -0
- package/dist/markdown/plugin.d.ts +178 -0
- package/dist/markdown/plugin.js +160 -0
- package/dist/markdown/sanitize.d.ts +78 -0
- package/dist/markdown/sanitize.js +522 -0
- package/dist/markdown/share.d.ts +12 -0
- package/dist/markdown/share.js +59 -0
- package/dist/markdown/table.d.ts +13 -0
- package/dist/markdown/table.js +60 -0
- package/dist/preset.d.ts +40 -16
- package/dist/preset.js +169 -51
- package/dist/tokens.stylex.d.ts +55 -37
- package/dist/tokens.stylex.js +107 -62
- package/dist/typography.d.ts +48 -0
- package/dist/typography.js +55 -0
- package/dist/vite.d.ts +7 -1
- package/dist/vite.js +27 -2
- package/package.json +53 -6
- package/skills/building-ui/SKILL.md +242 -0
- package/skills/building-ui/references/components.md +207 -0
- package/skills/markdown/SKILL.md +452 -0
- package/skills/markdown/references/plugins.md +103 -0
- package/skills/setup/SKILL.md +191 -0
- package/skills/styling/SKILL.md +269 -0
- package/skills/theming/SKILL.md +184 -0
- package/dist/internal/loop.d.ts +0 -35
- package/dist/internal/loop.js +0 -72
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { DropdownMenu } from 'bits-ui';
|
|
2
|
+
import CheckboxItem from './MenuCheckboxItem.svelte';
|
|
3
|
+
import Content from './MenuContent.svelte';
|
|
4
|
+
import Item from './MenuItem.svelte';
|
|
5
|
+
import Label from './MenuLabel.svelte';
|
|
6
|
+
import RadioItem from './MenuRadioItem.svelte';
|
|
7
|
+
import Separator from './MenuSeparator.svelte';
|
|
8
|
+
import SubContent from './MenuSubContent.svelte';
|
|
9
|
+
import SubTrigger from './MenuSubTrigger.svelte';
|
|
10
|
+
declare const Root: typeof DropdownMenu.Root;
|
|
11
|
+
declare const Trigger: typeof DropdownMenu.Trigger;
|
|
12
|
+
declare const Group: typeof DropdownMenu.Group;
|
|
13
|
+
declare const RadioGroup: typeof DropdownMenu.RadioGroup;
|
|
14
|
+
declare const Sub: typeof DropdownMenu.Sub;
|
|
15
|
+
export { Root, Trigger, Content, Item, CheckboxItem, RadioGroup, RadioItem, Group, Label, Separator, Sub, SubTrigger, SubContent };
|
|
16
|
+
export type { MenuCheckboxItemProps } from './MenuCheckboxItem.svelte';
|
|
17
|
+
export type { MenuContentProps } from './MenuContent.svelte';
|
|
18
|
+
export type { MenuItemProps } from './MenuItem.svelte';
|
|
19
|
+
export type { MenuLabelProps } from './MenuLabel.svelte';
|
|
20
|
+
export type { MenuRadioItemProps } from './MenuRadioItem.svelte';
|
|
21
|
+
export type { MenuSeparatorProps } from './MenuSeparator.svelte';
|
|
22
|
+
export type { MenuSubContentProps } from './MenuSubContent.svelte';
|
|
23
|
+
export type { MenuSubTriggerProps } from './MenuSubTrigger.svelte';
|
|
@@ -7,7 +7,9 @@ import RadioItem from './MenuRadioItem.svelte';
|
|
|
7
7
|
import Separator from './MenuSeparator.svelte';
|
|
8
8
|
import SubContent from './MenuSubContent.svelte';
|
|
9
9
|
import SubTrigger from './MenuSubTrigger.svelte';
|
|
10
|
-
// Behaviour only, with nothing to style: bits-ui's own parts
|
|
10
|
+
// Behaviour only, with nothing to style: bits-ui's own parts. The annotations are needed:
|
|
11
|
+
// without them TypeScript cannot name Root's inferred type (TS2883), and svelte-package
|
|
12
|
+
// silently leaves this module's declarations out of the package.
|
|
11
13
|
const Root = DropdownMenu.Root;
|
|
12
14
|
const Trigger = DropdownMenu.Trigger;
|
|
13
15
|
const Group = DropdownMenu.Group;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import type { Sx } from '../../internal/sx.js';
|
|
5
5
|
import { colors } from '../../tokens.stylex.js';
|
|
6
6
|
import { media } from '../../media.stylex.js';
|
|
7
|
-
import Button, { type ButtonProps } from '../button/Button.svelte';
|
|
7
|
+
import Button, { buttonHtml, type ButtonProps } from '../button/Button.svelte';
|
|
8
8
|
|
|
9
9
|
export type MessageActionProps = Omit<
|
|
10
10
|
ButtonProps,
|
|
@@ -30,9 +30,29 @@
|
|
|
30
30
|
},
|
|
31
31
|
pressed: {
|
|
32
32
|
color: colors.text,
|
|
33
|
-
backgroundColor: colors.
|
|
33
|
+
backgroundColor: colors.fillSelected
|
|
34
34
|
}
|
|
35
35
|
});
|
|
36
|
+
|
|
37
|
+
/** An action as markup, as the component draws it. `label` and `attributes` are escaped already. */
|
|
38
|
+
export function actionHtml(options: {
|
|
39
|
+
label: string;
|
|
40
|
+
attributes?: string;
|
|
41
|
+
sx?: Sx;
|
|
42
|
+
inner: string;
|
|
43
|
+
/** As `buttonHtml` takes it: the button and its icon, with nothing between. */
|
|
44
|
+
bare?: boolean;
|
|
45
|
+
}): string {
|
|
46
|
+
return buttonHtml({
|
|
47
|
+
bare: options.bare,
|
|
48
|
+
variant: 'ghost',
|
|
49
|
+
size: 'sm',
|
|
50
|
+
iconOnly: true,
|
|
51
|
+
sx: [styles.action, options.sx],
|
|
52
|
+
attributes: ` aria-label="${options.label}" data-slot="message-action"${options.attributes ?? ''}`,
|
|
53
|
+
inner: options.inner
|
|
54
|
+
});
|
|
55
|
+
}
|
|
36
56
|
</script>
|
|
37
57
|
|
|
38
58
|
<script lang="ts">
|
|
@@ -11,6 +11,15 @@ export type MessageActionProps = Omit<ButtonProps, 'children' | 'variant' | 'siz
|
|
|
11
11
|
/** A 16px icon. */
|
|
12
12
|
children?: Snippet;
|
|
13
13
|
};
|
|
14
|
+
/** An action as markup, as the component draws it. `label` and `attributes` are escaped already. */
|
|
15
|
+
export declare function actionHtml(options: {
|
|
16
|
+
label: string;
|
|
17
|
+
attributes?: string;
|
|
18
|
+
sx?: Sx;
|
|
19
|
+
inner: string;
|
|
20
|
+
/** As `buttonHtml` takes it: the button and its icon, with nothing between. */
|
|
21
|
+
bare?: boolean;
|
|
22
|
+
}): string;
|
|
14
23
|
declare const MessageAction: import("svelte").Component<MessageActionProps, {}, "ref">;
|
|
15
24
|
type MessageAction = ReturnType<typeof MessageAction>;
|
|
16
25
|
export default MessageAction;
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
gap: '0.75rem',
|
|
23
23
|
minWidth: 0,
|
|
24
24
|
// A size for reading at length: a step up from interface text
|
|
25
|
-
fontSize: font.
|
|
25
|
+
fontSize: font.sizeReading,
|
|
26
26
|
lineHeight: font.leadingNormal,
|
|
27
27
|
overflowWrap: 'break-word'
|
|
28
28
|
},
|
|
@@ -32,8 +32,7 @@
|
|
|
32
32
|
paddingBlock: '0.5625rem',
|
|
33
33
|
paddingInline: '0.875rem',
|
|
34
34
|
borderRadius: radius.frame,
|
|
35
|
-
backgroundColor: colors.
|
|
36
|
-
boxShadow: `inset 0 0 0 1px ${colors.line}, 0 1px 2px ${colors.shade}`,
|
|
35
|
+
backgroundColor: colors.fillMuted,
|
|
37
36
|
whiteSpace: 'pre-wrap',
|
|
38
37
|
overflowWrap: 'anywhere'
|
|
39
38
|
},
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<script lang="ts" module>
|
|
2
2
|
import * as stylex from '@stylexjs/stylex';
|
|
3
|
-
import Glyph from '../../internal/Glyph.svelte';
|
|
4
|
-
import type
|
|
3
|
+
import Glyph, { glyphHtml } from '../../internal/Glyph.svelte';
|
|
4
|
+
import { classes, type Sx } from '../../internal/sx.js';
|
|
5
5
|
import { colors, motion } from '../../tokens.stylex.js';
|
|
6
6
|
import { media } from '../../media.stylex.js';
|
|
7
|
-
import MessageAction, { type MessageActionProps } from './MessageAction.svelte';
|
|
7
|
+
import MessageAction, { actionHtml, type MessageActionProps } from './MessageAction.svelte';
|
|
8
8
|
|
|
9
9
|
export type MessageCopyProps = Omit<
|
|
10
10
|
MessageActionProps,
|
|
@@ -50,6 +50,65 @@
|
|
|
50
50
|
whiteSpace: 'nowrap'
|
|
51
51
|
}
|
|
52
52
|
});
|
|
53
|
+
|
|
54
|
+
const arrive = stylex.keyframes({
|
|
55
|
+
from: { opacity: 0, scale: 0.6, filter: 'blur(2px)' },
|
|
56
|
+
to: { opacity: 1, scale: 1, filter: 'blur(0)' }
|
|
57
|
+
});
|
|
58
|
+
const lean = stylex.create({
|
|
59
|
+
// An icon that has just taken another's place: it arrives as the component's does
|
|
60
|
+
arrived: {
|
|
61
|
+
animationName: { default: null, [media.motion]: arrive },
|
|
62
|
+
animationDuration: motion.base,
|
|
63
|
+
animationTimingFunction: motion.easeOut
|
|
64
|
+
},
|
|
65
|
+
check: { color: colors.text }
|
|
66
|
+
});
|
|
67
|
+
const arrivedClass = classes(lean.arrived);
|
|
68
|
+
const arrivedCheckClass = classes(lean.arrived, lean.check);
|
|
69
|
+
const statusClass = classes(styles.status);
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* A copy button as markup, with the status that says "Copied" after it: a button and its
|
|
73
|
+
* icon, and nothing else. The tick is not there until something is copied (`showCopied`):
|
|
74
|
+
* a page of code blocks has a copy button for each, and nearly none of them is pressed.
|
|
75
|
+
* `label` and `attributes` are escaped already.
|
|
76
|
+
*/
|
|
77
|
+
export function copyHtml(options: { label: string; attributes?: string; sx?: Sx }): string {
|
|
78
|
+
return (
|
|
79
|
+
actionHtml({ ...options, bare: true, inner: glyphHtml('copy') }) +
|
|
80
|
+
`<span role="status" class="${statusClass}"></span>`
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
const putBack = new WeakMap<Element, ReturnType<typeof setTimeout>>();
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Shows a copy button written by `copyHtml` as having copied, and puts it back two seconds
|
|
88
|
+
* later: the icon turns into a tick, and the status after it says so.
|
|
89
|
+
*/
|
|
90
|
+
export function showCopied(button: Element, copiedLabel: string): void {
|
|
91
|
+
const set = (copied: boolean) => {
|
|
92
|
+
button.querySelector(':scope > svg')?.remove();
|
|
93
|
+
button.insertAdjacentHTML(
|
|
94
|
+
'afterbegin',
|
|
95
|
+
copied ? glyphHtml('check', 16, 1.75) : glyphHtml('copy')
|
|
96
|
+
);
|
|
97
|
+
button.firstElementChild?.setAttribute('class', copied ? arrivedCheckClass : arrivedClass);
|
|
98
|
+
if (copied) button.setAttribute('data-copied', 'true');
|
|
99
|
+
else button.removeAttribute('data-copied');
|
|
100
|
+
const status = button.nextElementSibling;
|
|
101
|
+
if (status?.getAttribute('role') === 'status') status.textContent = copied ? copiedLabel : '';
|
|
102
|
+
};
|
|
103
|
+
clearTimeout(putBack.get(button));
|
|
104
|
+
set(true);
|
|
105
|
+
putBack.set(
|
|
106
|
+
button,
|
|
107
|
+
setTimeout(() => {
|
|
108
|
+
if (button.isConnected) set(false);
|
|
109
|
+
}, 2000)
|
|
110
|
+
);
|
|
111
|
+
}
|
|
53
112
|
</script>
|
|
54
113
|
|
|
55
114
|
<script lang="ts">
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type Sx } from '../../internal/sx.js';
|
|
2
2
|
import { type MessageActionProps } from './MessageAction.svelte';
|
|
3
3
|
export type MessageCopyProps = Omit<MessageActionProps, 'children' | 'value' | 'label' | 'onclick'> & {
|
|
4
4
|
onclick?: (event: MouseEvent) => void;
|
|
@@ -11,6 +11,22 @@ export type MessageCopyProps = Omit<MessageActionProps, 'children' | 'value' | '
|
|
|
11
11
|
oncopy?: (text: string) => void;
|
|
12
12
|
sx?: Sx;
|
|
13
13
|
};
|
|
14
|
+
/**
|
|
15
|
+
* A copy button as markup, with the status that says "Copied" after it: a button and its
|
|
16
|
+
* icon, and nothing else. The tick is not there until something is copied (`showCopied`):
|
|
17
|
+
* a page of code blocks has a copy button for each, and nearly none of them is pressed.
|
|
18
|
+
* `label` and `attributes` are escaped already.
|
|
19
|
+
*/
|
|
20
|
+
export declare function copyHtml(options: {
|
|
21
|
+
label: string;
|
|
22
|
+
attributes?: string;
|
|
23
|
+
sx?: Sx;
|
|
24
|
+
}): string;
|
|
25
|
+
/**
|
|
26
|
+
* Shows a copy button written by `copyHtml` as having copied, and puts it back two seconds
|
|
27
|
+
* later: the icon turns into a tick, and the status after it says so.
|
|
28
|
+
*/
|
|
29
|
+
export declare function showCopied(button: Element, copiedLabel: string): void;
|
|
14
30
|
declare const MessageCopy: import("svelte").Component<MessageCopyProps, {}, "">;
|
|
15
31
|
type MessageCopy = ReturnType<typeof MessageCopy>;
|
|
16
32
|
export default MessageCopy;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<!--
|
|
2
2
|
Who is speaking: a mark, a name, and a word more, such as the model or the
|
|
3
3
|
time. The default mark is the arch of the doors, which lights up while the
|
|
4
|
-
reply is arriving
|
|
4
|
+
reply is arriving.
|
|
5
5
|
-->
|
|
6
6
|
<script lang="ts" module>
|
|
7
7
|
import * as stylex from '@stylexjs/stylex';
|
|
@@ -37,13 +37,13 @@
|
|
|
37
37
|
textOverflow: 'ellipsis',
|
|
38
38
|
whiteSpace: 'nowrap',
|
|
39
39
|
color: colors.text,
|
|
40
|
-
fontSize: font.
|
|
40
|
+
fontSize: font.sizeMeta,
|
|
41
41
|
fontWeight: font.weightSemibold
|
|
42
42
|
},
|
|
43
43
|
meta: {
|
|
44
44
|
flexShrink: 0,
|
|
45
45
|
color: colors.textSubtle,
|
|
46
|
-
fontSize: font.
|
|
46
|
+
fontSize: font.sizeCaption,
|
|
47
47
|
fontVariantNumeric: 'tabular-nums'
|
|
48
48
|
}
|
|
49
49
|
});
|
|
@@ -41,25 +41,29 @@
|
|
|
41
41
|
columnGap: '0.625rem',
|
|
42
42
|
paddingBlock: '0.625rem',
|
|
43
43
|
paddingInline: '0.75rem',
|
|
44
|
-
borderRadius: radius.
|
|
45
|
-
fontSize: font.
|
|
44
|
+
borderRadius: radius.panel,
|
|
45
|
+
fontSize: font.sizeBody,
|
|
46
46
|
lineHeight: font.leadingSnug
|
|
47
47
|
},
|
|
48
48
|
neutral: {
|
|
49
|
-
backgroundColor: colors.
|
|
50
|
-
boxShadow: `inset 0 0 0 1px ${colors.line}`,
|
|
49
|
+
backgroundColor: colors.fillSunken,
|
|
51
50
|
color: colors.text
|
|
52
51
|
},
|
|
53
|
-
info: { backgroundColor: colors.
|
|
54
|
-
success: { backgroundColor: colors.successSoft, color: colors.
|
|
55
|
-
warning: { backgroundColor: colors.warningSoft, color: colors.
|
|
56
|
-
danger: { backgroundColor: colors.dangerSoft, color: colors.
|
|
52
|
+
info: { backgroundColor: colors.accentSoft, color: colors.text },
|
|
53
|
+
success: { backgroundColor: colors.successSoft, color: colors.successText },
|
|
54
|
+
warning: { backgroundColor: colors.warningSoft, color: colors.warningText },
|
|
55
|
+
danger: { backgroundColor: colors.dangerSoft, color: colors.dangerText },
|
|
57
56
|
icon: { display: 'grid', placeItems: 'center', width: '1rem', height: '1lh' },
|
|
58
57
|
iconNeutral: { color: colors.textMuted },
|
|
59
|
-
iconInfo: { color: colors.
|
|
58
|
+
iconInfo: { color: colors.accent },
|
|
60
59
|
text: { display: 'flex', flexDirection: 'column', gap: '0.125rem', minWidth: 0 },
|
|
61
60
|
title: { fontWeight: font.weightMedium },
|
|
62
|
-
detail: {
|
|
61
|
+
detail: {
|
|
62
|
+
opacity: 0.85,
|
|
63
|
+
fontSize: font.sizeMeta,
|
|
64
|
+
userSelect: 'text',
|
|
65
|
+
overflowWrap: 'anywhere'
|
|
66
|
+
},
|
|
63
67
|
actions: { display: 'flex', alignItems: 'center', gap: '0.25rem', marginBlock: '-0.25rem' }
|
|
64
68
|
});
|
|
65
69
|
</script>
|
|
@@ -29,9 +29,8 @@
|
|
|
29
29
|
paddingTop: '0.75rem',
|
|
30
30
|
paddingBottom: '0.5rem',
|
|
31
31
|
paddingInline: '0.5rem',
|
|
32
|
-
borderRadius: radius.
|
|
33
|
-
|
|
34
|
-
boxShadow: `inset 0 0 0 1px ${colors.line}, inset 0 1px 0 ${colors.highlight}, 0 1px 2px ${colors.shade}`
|
|
32
|
+
borderRadius: radius.panel,
|
|
33
|
+
boxShadow: `inset 0 0 0 1px ${colors.border}`
|
|
35
34
|
},
|
|
36
35
|
head: {
|
|
37
36
|
display: 'flex',
|
|
@@ -43,7 +42,7 @@
|
|
|
43
42
|
},
|
|
44
43
|
title: {
|
|
45
44
|
color: colors.text,
|
|
46
|
-
fontSize: font.
|
|
45
|
+
fontSize: font.sizeMeta,
|
|
47
46
|
fontWeight: font.weightSemibold
|
|
48
47
|
},
|
|
49
48
|
// One segment per step: lit as each is done, half-lit while one is under way
|
|
@@ -55,14 +54,14 @@
|
|
|
55
54
|
segment: {
|
|
56
55
|
flexGrow: 1,
|
|
57
56
|
height: '0.1875rem',
|
|
58
|
-
borderRadius: radius.
|
|
59
|
-
backgroundColor: colors.
|
|
57
|
+
borderRadius: radius.pill,
|
|
58
|
+
backgroundColor: colors.border,
|
|
60
59
|
transitionProperty: 'background-color, box-shadow',
|
|
61
60
|
transitionDuration: motion.slow,
|
|
62
61
|
transitionTimingFunction: 'ease'
|
|
63
62
|
},
|
|
64
|
-
segmentDone: { backgroundColor: colors.
|
|
65
|
-
segmentActive: { backgroundColor: `color-mix(in oklab, ${colors.
|
|
63
|
+
segmentDone: { backgroundColor: colors.accent },
|
|
64
|
+
segmentActive: { backgroundColor: `color-mix(in oklab, ${colors.accent} 40%, transparent)` },
|
|
66
65
|
steps: {
|
|
67
66
|
display: 'flex',
|
|
68
67
|
flexDirection: 'column',
|
|
@@ -77,9 +76,9 @@
|
|
|
77
76
|
gap: '0.625rem',
|
|
78
77
|
minHeight: '1.875rem',
|
|
79
78
|
paddingInline: '0.375rem',
|
|
80
|
-
borderRadius: radius.
|
|
79
|
+
borderRadius: radius.control,
|
|
81
80
|
color: colors.textMuted,
|
|
82
|
-
fontSize: font.
|
|
81
|
+
fontSize: font.sizeBody,
|
|
83
82
|
lineHeight: font.leadingSnug,
|
|
84
83
|
transitionProperty: 'color, background-color',
|
|
85
84
|
transitionDuration: motion.base,
|
|
@@ -87,7 +86,7 @@
|
|
|
87
86
|
},
|
|
88
87
|
// The step under way sits in a band of moonlight
|
|
89
88
|
active: {
|
|
90
|
-
backgroundColor: colors.
|
|
89
|
+
backgroundColor: colors.accentSoft,
|
|
91
90
|
color: colors.text,
|
|
92
91
|
fontWeight: font.weightMedium
|
|
93
92
|
},
|
|
@@ -100,7 +99,7 @@
|
|
|
100
99
|
boxSizing: 'border-box',
|
|
101
100
|
width: '1rem',
|
|
102
101
|
height: '1rem',
|
|
103
|
-
borderRadius: radius.
|
|
102
|
+
borderRadius: radius.pill,
|
|
104
103
|
color: colors.textSubtle,
|
|
105
104
|
opacity: { default: 1, '@starting-style': 0 },
|
|
106
105
|
scale: { default: null, [media.motion]: { default: 1, '@starting-style': 0.6 } },
|
|
@@ -108,11 +107,17 @@
|
|
|
108
107
|
transitionDuration: motion.slow,
|
|
109
108
|
transitionTimingFunction: motion.easeOut
|
|
110
109
|
},
|
|
111
|
-
iconActive: { color: colors.
|
|
110
|
+
iconActive: { color: colors.accent },
|
|
112
111
|
// Done: a solid green seal with the tick cut out of it
|
|
113
112
|
iconDone: { backgroundColor: colors.success, color: colors.bgRaised },
|
|
114
|
-
iconSkipped: { boxShadow: `inset 0 0 0 1px ${colors.
|
|
115
|
-
|
|
113
|
+
iconSkipped: { boxShadow: `inset 0 0 0 1px ${colors.borderStrong}` },
|
|
114
|
+
// Set off by room, not a dot
|
|
115
|
+
skipped: {
|
|
116
|
+
marginInlineStart: '0.5rem',
|
|
117
|
+
color: colors.textSubtle,
|
|
118
|
+
fontSize: font.sizeMeta,
|
|
119
|
+
fontWeight: font.weightRegular
|
|
120
|
+
},
|
|
116
121
|
hidden: {
|
|
117
122
|
position: 'absolute',
|
|
118
123
|
width: '1px',
|
|
@@ -185,8 +190,8 @@
|
|
|
185
190
|
</span>
|
|
186
191
|
{/key}
|
|
187
192
|
<span>
|
|
188
|
-
{step.label}{#if step.status === 'skipped'}<span {...stylex.attrs(styles.skipped)}
|
|
189
|
-
|
|
193
|
+
{step.label}{#if step.status === 'skipped'}<span {...stylex.attrs(styles.skipped)}
|
|
194
|
+
>{skippedLabel}</span
|
|
190
195
|
>{:else if step.status === 'done'}<span {...stylex.attrs(styles.hidden)}>
|
|
191
196
|
(done)</span
|
|
192
197
|
>{/if}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<script lang="ts" module>
|
|
2
2
|
import * as stylex from '@stylexjs/stylex';
|
|
3
3
|
import type { HTMLAttributes } from 'svelte/elements';
|
|
4
|
-
import { loop } from '../../internal/loop.js';
|
|
5
4
|
import { attrs, type Sx } from '../../internal/sx.js';
|
|
6
|
-
import {
|
|
5
|
+
import { whileVisible } from '../../internal/visible.js';
|
|
6
|
+
import { colors, motion, play, radius } from '../../tokens.stylex.js';
|
|
7
7
|
import { media } from '../../media.stylex.js';
|
|
8
8
|
|
|
9
9
|
export type ProgressProps = Omit<HTMLAttributes<HTMLDivElement>, 'children'> & {
|
|
@@ -13,28 +13,18 @@
|
|
|
13
13
|
sx?: Sx;
|
|
14
14
|
};
|
|
15
15
|
|
|
16
|
-
// The bar of an unknown amount
|
|
17
|
-
//
|
|
18
|
-
const
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
const at = -100 + 350 * ease(progress);
|
|
30
|
-
element.style.opacity = '';
|
|
31
|
-
element.style.translate = `${rtl ? -at : at}% 0`;
|
|
32
|
-
},
|
|
33
|
-
(element) => {
|
|
34
|
-
element.style.translate = '';
|
|
35
|
-
element.style.opacity = '';
|
|
36
|
-
}
|
|
37
|
-
);
|
|
16
|
+
// The bar of an unknown amount crosses the track, stepped, and only while it can be
|
|
17
|
+
// seen. With less motion asked for it fills the track and breathes in place instead.
|
|
18
|
+
const sweep = stylex.keyframes({ from: { translate: '-100% 0' }, to: { translate: '250% 0' } });
|
|
19
|
+
const sweepRtl = stylex.keyframes({
|
|
20
|
+
from: { translate: '100% 0' },
|
|
21
|
+
to: { translate: '-250% 0' }
|
|
22
|
+
});
|
|
23
|
+
const breathe = stylex.keyframes({
|
|
24
|
+
'0%': { opacity: 1 },
|
|
25
|
+
'50%': { opacity: 0.35 },
|
|
26
|
+
'100%': { opacity: 1 }
|
|
27
|
+
});
|
|
38
28
|
|
|
39
29
|
const styles = stylex.create({
|
|
40
30
|
track: {
|
|
@@ -42,9 +32,8 @@
|
|
|
42
32
|
boxSizing: 'border-box',
|
|
43
33
|
width: '100%',
|
|
44
34
|
height: '0.25rem',
|
|
45
|
-
borderRadius: radius.
|
|
46
|
-
backgroundColor: colors.
|
|
47
|
-
boxShadow: `inset 0 0 0 1px ${colors.line}`,
|
|
35
|
+
borderRadius: radius.pill,
|
|
36
|
+
backgroundColor: colors.fillSunken,
|
|
48
37
|
outlineStyle: 'solid',
|
|
49
38
|
outlineWidth: '1px',
|
|
50
39
|
outlineColor: 'transparent'
|
|
@@ -55,16 +44,17 @@
|
|
|
55
44
|
position: 'absolute',
|
|
56
45
|
inset: 0,
|
|
57
46
|
overflow: 'hidden',
|
|
58
|
-
borderRadius: radius.
|
|
59
|
-
filter: `drop-shadow(0 0 4px ${colors.glow})`
|
|
47
|
+
borderRadius: radius.pill
|
|
60
48
|
},
|
|
61
49
|
fill: {
|
|
62
50
|
display: 'block',
|
|
63
51
|
width: '100%',
|
|
64
52
|
height: '100%',
|
|
65
|
-
borderRadius: radius.
|
|
53
|
+
borderRadius: radius.pill,
|
|
54
|
+
backgroundColor: colors.accent,
|
|
55
|
+
// Forced colours drop a background colour, not an image
|
|
66
56
|
backgroundImage: {
|
|
67
|
-
default:
|
|
57
|
+
default: 'none',
|
|
68
58
|
[media.forcedColors]: 'linear-gradient(Highlight, Highlight)'
|
|
69
59
|
},
|
|
70
60
|
forcedColorAdjust: 'none'
|
|
@@ -81,7 +71,15 @@
|
|
|
81
71
|
transitionTimingFunction: motion.easeOut
|
|
82
72
|
},
|
|
83
73
|
unknown: {
|
|
84
|
-
width: { default: '100%', [media.motion]: '40%' }
|
|
74
|
+
width: { default: '100%', [media.motion]: '40%' },
|
|
75
|
+
animationName: {
|
|
76
|
+
default: breathe,
|
|
77
|
+
[media.motion]: { default: sweep, ':dir(rtl)': sweepRtl }
|
|
78
|
+
},
|
|
79
|
+
animationDuration: { default: '2s', [media.motion]: '1.4s' },
|
|
80
|
+
animationTimingFunction: { default: 'steps(12)', [media.motion]: 'steps(28)' },
|
|
81
|
+
animationIterationCount: 'infinite',
|
|
82
|
+
animationPlayState: play.whileVisible
|
|
85
83
|
}
|
|
86
84
|
});
|
|
87
85
|
</script>
|
|
@@ -105,7 +103,7 @@
|
|
|
105
103
|
<span
|
|
106
104
|
{...stylex.attrs(styles.fill, known ? styles.known : styles.unknown)}
|
|
107
105
|
style:--narvi-progress={known ? `${percent}%` : undefined}
|
|
108
|
-
{@attach !known &&
|
|
106
|
+
{@attach !known && whileVisible}
|
|
109
107
|
></span>
|
|
110
108
|
</span>
|
|
111
109
|
</div>
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
import { shared } from '../../internal/shared.js';
|
|
11
11
|
import { attrs, type Sx } from '../../internal/sx.js';
|
|
12
12
|
import { colors, font, radius, space } from '../../tokens.stylex.js';
|
|
13
|
+
import { media } from '../../media.stylex.js';
|
|
13
14
|
import Button from '../button/Button.svelte';
|
|
14
15
|
import Kbd from '../kbd/Kbd.svelte';
|
|
15
16
|
import Progress from '../progress/Progress.svelte';
|
|
@@ -58,15 +59,15 @@
|
|
|
58
59
|
flexDirection: 'column',
|
|
59
60
|
gap: space.x3,
|
|
60
61
|
padding: '0.875rem',
|
|
61
|
-
borderRadius: radius.
|
|
62
|
+
borderRadius: radius.panel,
|
|
62
63
|
backgroundColor: colors.bgRaised,
|
|
63
|
-
boxShadow: `inset 0 0 0 1px color-mix(in oklab, ${colors.
|
|
64
|
+
boxShadow: `inset 0 0 0 1px color-mix(in oklab, ${colors.accent} 35%, transparent)`
|
|
64
65
|
},
|
|
65
66
|
head: { display: 'flex', flexDirection: 'column', gap: '0.5rem' },
|
|
66
|
-
count: { color: colors.
|
|
67
|
+
count: { color: colors.accent },
|
|
67
68
|
prompt: {
|
|
68
69
|
margin: 0,
|
|
69
|
-
fontSize: font.
|
|
70
|
+
fontSize: font.sizeReading,
|
|
70
71
|
fontWeight: font.weightMedium,
|
|
71
72
|
lineHeight: font.leadingSnug,
|
|
72
73
|
outlineStyle: 'none'
|
|
@@ -86,23 +87,19 @@
|
|
|
86
87
|
columnGap: '0.625rem',
|
|
87
88
|
paddingBlock: '0.5rem',
|
|
88
89
|
paddingInline: '0.625rem',
|
|
89
|
-
borderRadius: radius.
|
|
90
|
+
borderRadius: radius.control,
|
|
90
91
|
backgroundColor: {
|
|
91
92
|
default: 'transparent',
|
|
92
|
-
':hover': { default: null,
|
|
93
|
-
':has(:checked)': colors.
|
|
94
|
-
},
|
|
95
|
-
boxShadow: {
|
|
96
|
-
default: `inset 0 0 0 1px ${colors.line}`,
|
|
97
|
-
':has(:checked)': `inset 0 0 0 1px color-mix(in oklab, ${colors.ithil} 60%, transparent)`
|
|
93
|
+
':hover': { default: null, [media.hover]: colors.fillHover },
|
|
94
|
+
':has(:checked)': colors.accentSoft
|
|
98
95
|
},
|
|
99
96
|
cursor: 'pointer',
|
|
100
|
-
transitionProperty: 'background-color
|
|
97
|
+
transitionProperty: 'background-color',
|
|
101
98
|
transitionDuration: '120ms',
|
|
102
99
|
transitionTimingFunction: 'ease'
|
|
103
100
|
},
|
|
104
101
|
// Drawn by hand, so it matches the stone in both schemes: a ring, filled
|
|
105
|
-
// with
|
|
102
|
+
// with the accent and a dot of the card's colour once chosen
|
|
106
103
|
input: {
|
|
107
104
|
appearance: 'none',
|
|
108
105
|
boxSizing: 'border-box',
|
|
@@ -111,11 +108,11 @@
|
|
|
111
108
|
height: '1rem',
|
|
112
109
|
margin: 0,
|
|
113
110
|
marginTop: '0.1875rem',
|
|
114
|
-
borderRadius: radius.
|
|
115
|
-
backgroundColor: { default:
|
|
111
|
+
borderRadius: radius.pill,
|
|
112
|
+
backgroundColor: { default: 'transparent', ':checked': colors.accent },
|
|
116
113
|
boxShadow: {
|
|
117
|
-
default: `inset 0 0 0 1px ${colors.
|
|
118
|
-
':checked': `inset 0 0 0 4px ${colors.
|
|
114
|
+
default: `inset 0 0 0 1px ${colors.borderControl}`,
|
|
115
|
+
':checked': `inset 0 0 0 4px ${colors.accent}, inset 0 0 0 10px ${colors.bgRaised}`
|
|
119
116
|
},
|
|
120
117
|
cursor: 'pointer',
|
|
121
118
|
outlineStyle: 'solid',
|
|
@@ -127,15 +124,15 @@
|
|
|
127
124
|
transitionTimingFunction: 'ease'
|
|
128
125
|
},
|
|
129
126
|
// Several may be chosen: the same, squared
|
|
130
|
-
box: { borderRadius: radius.
|
|
127
|
+
box: { borderRadius: radius.chip },
|
|
131
128
|
text: { display: 'flex', flexDirection: 'column', gap: '0.125rem', minWidth: 0 },
|
|
132
|
-
description: { color: colors.textMuted, fontSize: font.
|
|
133
|
-
error: { margin: 0, color: colors.danger, fontSize: font.
|
|
129
|
+
description: { color: colors.textMuted, fontSize: font.sizeMeta },
|
|
130
|
+
error: { margin: 0, color: colors.danger, fontSize: font.sizeMeta },
|
|
134
131
|
foot: { display: 'flex', alignItems: 'center', gap: space.x2 },
|
|
135
132
|
spacer: { flexGrow: 1 },
|
|
136
133
|
summary: { display: 'flex', flexDirection: 'column', gap: '0.5rem', margin: 0, padding: 0 },
|
|
137
|
-
q: { color: colors.textMuted, fontSize: font.
|
|
138
|
-
a: { margin: 0, fontSize: font.
|
|
134
|
+
q: { color: colors.textMuted, fontSize: font.sizeMeta },
|
|
135
|
+
a: { margin: 0, fontSize: font.sizeBody }
|
|
139
136
|
});
|
|
140
137
|
</script>
|
|
141
138
|
|