@signal9/era-ui 10.0.0 → 11.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ai/actions/actions.svelte +1 -1
- package/dist/ai/artifact/artifact-actions.svelte +1 -1
- package/dist/ai/artifact/artifact-close.svelte +1 -1
- package/dist/ai/artifact/artifact-content.svelte +1 -1
- package/dist/ai/artifact/artifact-header.svelte +1 -1
- package/dist/ai/artifact/artifact.svelte +1 -4
- package/dist/ai/chain-of-thought/chain-of-thought-step.svelte +3 -3
- package/dist/ai/chain-of-thought/chain-of-thought.svelte +1 -1
- package/dist/ai/checkpoint.svelte +2 -2
- package/dist/ai/confirmation/confirmation-actions.svelte +1 -1
- package/dist/ai/confirmation/confirmation-args.svelte +4 -4
- package/dist/ai/confirmation/confirmation.svelte +5 -8
- package/dist/ai/context/context.svelte +3 -3
- package/dist/ai/conversation/conversation-content.svelte +1 -4
- package/dist/ai/conversation/conversation-empty-state.svelte +1 -1
- package/dist/ai/conversation/conversation-scroll-button.svelte +3 -3
- package/dist/ai/conversations/conversations-group.svelte +2 -2
- package/dist/ai/conversations/conversations-item.svelte +8 -8
- package/dist/ai/conversations/conversations-root.svelte +2 -2
- package/dist/ai/error-panel/error-panel.svelte +7 -7
- package/dist/ai/image.svelte +1 -1
- package/dist/ai/index.js +1 -1
- package/dist/ai/inline-citation/inline-citation.svelte +5 -5
- package/dist/ai/loader.svelte +1 -4
- package/dist/ai/message/message-branch-selector.svelte +3 -3
- package/dist/ai/message/message-branch.svelte +1 -1
- package/dist/ai/message/message-content.svelte +1 -1
- package/dist/ai/message/message-toolbar.svelte +1 -1
- package/dist/ai/message/message-usage.svelte +5 -7
- package/dist/ai/message/message.svelte +1 -1
- package/dist/ai/model-selector/model-selector.svelte +2 -2
- package/dist/ai/open-in-chat/open-in-chat.svelte +2 -2
- package/dist/ai/plan/plan-content.svelte +1 -1
- package/dist/ai/plan/plan-header.svelte +2 -2
- package/dist/ai/plan/plan.svelte +1 -4
- package/dist/ai/prompt-input/prompt-input-add-attachments.svelte +1 -1
- package/dist/ai/prompt-input/prompt-input-attachments.svelte +5 -5
- package/dist/ai/prompt-input/prompt-input-submit.svelte +2 -2
- package/dist/ai/prompt-input/prompt-input-textarea.svelte +2 -2
- package/dist/ai/prompt-input/prompt-input-toolbar.svelte +1 -1
- package/dist/ai/prompt-input/prompt-input.svelte +1 -1
- package/dist/ai/queue/queue-item.svelte +1 -1
- package/dist/ai/queue/queue.svelte +1 -1
- package/dist/ai/reasoning/reasoning-trigger.svelte +1 -1
- package/dist/ai/response/response.svelte +1 -1
- package/dist/ai/run-status/run-status.svelte +7 -11
- package/dist/ai/runtime-feed/runtime-feed-item.svelte +1 -4
- package/dist/ai/runtime-feed/runtime-feed-root.svelte +1 -1
- package/dist/ai/sources/source.svelte +2 -2
- package/dist/ai/sources/sources-trigger.svelte +1 -1
- package/dist/ai/structured-value/structured-value.svelte +4 -4
- package/dist/ai/suggestion/suggestion.svelte +1 -1
- package/dist/ai/suggestion/suggestions.svelte +1 -1
- package/dist/ai/swarm/swarm-agent.svelte +3 -3
- package/dist/ai/swarm/swarm-artifact.svelte +2 -2
- package/dist/ai/swarm/swarm-barrier.svelte +3 -3
- package/dist/ai/swarm/swarm-barriers.svelte +1 -4
- package/dist/ai/swarm/swarm-counts.svelte +2 -2
- package/dist/ai/swarm/swarm-footer.svelte +4 -3
- package/dist/ai/swarm/swarm-grid.svelte +2 -2
- package/dist/ai/swarm/swarm-header.svelte +2 -2
- package/dist/ai/swarm/swarm-node.svelte +7 -9
- package/dist/ai/swarm/swarm-role.svelte +6 -3
- package/dist/ai/swarm/swarm-root.svelte +1 -4
- package/dist/ai/swarm/swarm-sandbox.svelte +4 -7
- package/dist/ai/swarm/swarm-tree.svelte +2 -2
- package/dist/ai/task/task-content.svelte +1 -4
- package/dist/ai/task/task-trigger.svelte +1 -1
- package/dist/ai/tool/tool-chip.svelte +3 -3
- package/dist/ai/tool/tool-chips.svelte +3 -3
- package/dist/ai/tool/tool-exec.svelte +4 -4
- package/dist/ai/tool/tool-header.svelte +1 -1
- package/dist/ai/web-preview/web-preview.svelte +4 -9
- package/dist/ai/workflow/canvas.svelte +1 -1
- package/dist/ai/workflow/node.svelte +3 -3
- package/dist/apps/index.d.ts +3 -3
- package/dist/apps/index.js +3 -3
- package/dist/apps/llm-shell/llm-shell.svelte +4 -4
- package/dist/apps/notes/editor/slash-menu.svelte +2 -4
- package/dist/apps/notes/notes.svelte +8 -8
- package/dist/dev/audit/audits/anonymous-text.d.ts +2 -0
- package/dist/dev/audit/audits/anonymous-text.js +73 -0
- package/dist/dev/audit/audits/even-container-padding.js +2 -2
- package/dist/dev/audit/audits/index.d.ts +2 -1
- package/dist/dev/audit/audits/index.js +3 -1
- package/dist/dev/audit/audits/single-glyph-square.js +2 -2
- package/dist/dev/audit/types.d.ts +1 -1
- package/dist/dev/audit-overlay.svelte +7 -7
- package/dist/docs/css-utilities.d.ts +31 -0
- package/dist/docs/css-utilities.js +142 -8
- package/dist/docs/llms-txt.js +2 -2
- package/dist/docs/notes.md +3 -3
- package/dist/docs/quickstart.md +5 -5
- package/dist/era-ui.css +1 -1
- package/dist/generated-docs/llms-full.txt +455 -110
- package/dist/generated-docs/llms.txt +29 -14
- package/dist/generated-docs/manifest.json +382 -55
- package/dist/generated-docs/notes.md +3 -3
- package/dist/generated-docs/utilities.json +359 -45
- package/dist/generated-docs/utilities.md +423 -93
- package/dist/os/notification-center.svelte +11 -17
- package/dist/os/pane-manager.svelte.d.ts +1 -1
- package/dist/os/pane.svelte +4 -6
- package/dist/os/taskbar.svelte +13 -18
- package/dist/os/toast.svelte +6 -11
- package/dist/os/toaster.svelte +1 -1
- package/dist/styles/density.css +0 -2
- package/dist/styles/index.css +160 -84
- package/dist/ui/accordion/accordion-content.svelte +1 -1
- package/dist/ui/accordion/accordion-trigger.svelte +2 -2
- package/dist/ui/alert-dialog/alert-dialog-content.svelte +2 -2
- package/dist/ui/alert-dialog/alert-dialog-overlay.svelte +1 -1
- package/dist/ui/aspect-ratio/aspect-ratio.svelte +1 -5
- package/dist/ui/avatar/avatar-fallback.svelte +1 -1
- package/dist/ui/avatar/avatar-root.svelte +1 -1
- package/dist/ui/badge/badge.svelte +1 -1
- package/dist/ui/badge/badge.svelte.d.ts +1 -1
- package/dist/ui/bar/bar.svelte +8 -8
- package/dist/ui/bar/bar.svelte.d.ts +16 -16
- package/dist/ui/button/button.svelte +13 -2
- package/dist/ui/button/variants.d.ts +4 -4
- package/dist/ui/button/variants.js +18 -18
- package/dist/ui/button-group/button-group.svelte +2 -2
- package/dist/ui/calendar/calendar-day.svelte +1 -1
- package/dist/ui/calendar/calendar-grid-row.svelte +1 -1
- package/dist/ui/calendar/calendar-grid.svelte +1 -1
- package/dist/ui/calendar/calendar-head-cell.svelte +1 -1
- package/dist/ui/calendar/calendar-header.svelte +1 -1
- package/dist/ui/calendar/calendar-next-button.svelte +1 -1
- package/dist/ui/calendar/calendar-prev-button.svelte +1 -1
- package/dist/ui/calendar/calendar-root.svelte +1 -1
- package/dist/ui/card/card.svelte +10 -10
- package/dist/ui/card/card.svelte.d.ts +16 -16
- package/dist/ui/checkbox/checkbox-group.svelte +1 -1
- package/dist/ui/checkbox/checkbox.svelte +1 -1
- package/dist/ui/chip/chip.svelte +15 -7
- package/dist/ui/chip/chip.svelte.d.ts +7 -7
- package/dist/ui/code-block/code-block.svelte +3 -9
- package/dist/ui/collapsible/collapsible-trigger.svelte +1 -1
- package/dist/ui/combobox/combobox-content.svelte +1 -1
- package/dist/ui/combobox/combobox-empty.svelte +1 -6
- package/dist/ui/combobox/combobox-group-heading.svelte +1 -4
- package/dist/ui/combobox/combobox-input.svelte +1 -1
- package/dist/ui/combobox/combobox-item.svelte +1 -1
- package/dist/ui/combobox/combobox-trigger.svelte +2 -2
- package/dist/ui/command/command-group-heading.svelte +1 -4
- package/dist/ui/command/command-group-items.svelte +1 -5
- package/dist/ui/command/command-item.svelte +1 -1
- package/dist/ui/command/command-link-item.svelte +1 -1
- package/dist/ui/command/command-root.svelte +2 -2
- package/dist/ui/command/command-viewport.svelte +1 -1
- package/dist/ui/command-bar/command-bar.svelte +9 -13
- package/dist/ui/context-menu/context-menu-checkbox-item.svelte +1 -1
- package/dist/ui/context-menu/context-menu-content.svelte +2 -2
- package/dist/ui/context-menu/context-menu-group-heading.svelte +1 -4
- package/dist/ui/context-menu/context-menu-item.svelte +1 -1
- package/dist/ui/context-menu/context-menu-radio-item.svelte +1 -1
- package/dist/ui/context-menu/context-menu-sub-content.svelte +1 -1
- package/dist/ui/context-menu/context-menu-sub-trigger.svelte +2 -2
- package/dist/ui/copy-button/copy-button.svelte +2 -2
- package/dist/ui/cycle/cycle.svelte +2 -2
- package/dist/ui/date-field/date-field-segment.svelte +1 -1
- package/dist/ui/date-picker/date-picker-calendar.svelte +1 -1
- package/dist/ui/date-picker/date-picker-content.svelte +1 -4
- package/dist/ui/date-picker/date-picker-day.svelte +1 -1
- package/dist/ui/date-picker/date-picker-grid-row.svelte +1 -1
- package/dist/ui/date-picker/date-picker-grid.svelte +1 -1
- package/dist/ui/date-picker/date-picker-head-cell.svelte +1 -1
- package/dist/ui/date-picker/date-picker-header.svelte +1 -1
- package/dist/ui/date-picker/date-picker-next-button.svelte +1 -1
- package/dist/ui/date-picker/date-picker-prev-button.svelte +1 -1
- package/dist/ui/date-picker/date-picker-segment.svelte +1 -1
- package/dist/ui/date-picker/date-picker-trigger.svelte +2 -2
- package/dist/ui/date-range-field/date-range-field-segment.svelte +1 -1
- package/dist/ui/date-range-picker/date-range-picker-calendar.svelte +1 -1
- package/dist/ui/date-range-picker/date-range-picker-content.svelte +1 -4
- package/dist/ui/date-range-picker/date-range-picker-day.svelte +1 -1
- package/dist/ui/date-range-picker/date-range-picker-grid-row.svelte +1 -1
- package/dist/ui/date-range-picker/date-range-picker-grid.svelte +1 -5
- package/dist/ui/date-range-picker/date-range-picker-head-cell.svelte +1 -1
- package/dist/ui/date-range-picker/date-range-picker-header.svelte +1 -1
- package/dist/ui/date-range-picker/date-range-picker-next-button.svelte +1 -1
- package/dist/ui/date-range-picker/date-range-picker-prev-button.svelte +1 -1
- package/dist/ui/date-range-picker/date-range-picker-segment.svelte +1 -1
- package/dist/ui/date-range-picker/date-range-picker-trigger.svelte +2 -2
- package/dist/ui/dialog/dialog-content.svelte +3 -5
- package/dist/ui/dialog/dialog-header.svelte +1 -6
- package/dist/ui/dialog/dialog-overlay.svelte +1 -5
- package/dist/ui/dropdown-menu/dropdown-menu-checkbox-item.svelte +1 -1
- package/dist/ui/dropdown-menu/dropdown-menu-content.svelte +2 -2
- package/dist/ui/dropdown-menu/dropdown-menu-group-heading.svelte +1 -4
- package/dist/ui/dropdown-menu/dropdown-menu-item.svelte +1 -1
- package/dist/ui/dropdown-menu/dropdown-menu-radio-item.svelte +1 -1
- package/dist/ui/dropdown-menu/dropdown-menu-sub-content.svelte +1 -1
- package/dist/ui/dropdown-menu/dropdown-menu-sub-trigger.svelte +2 -2
- package/dist/ui/dropdown-menu/dropdown-menu-trigger.svelte +2 -2
- package/dist/ui/file-upload/file-upload.svelte +2 -2
- package/dist/ui/index.js +1 -1
- package/dist/ui/input/input.svelte +2 -2
- package/dist/ui/input/textarea.svelte +1 -1
- package/dist/ui/input/variants.d.ts +18 -18
- package/dist/ui/input/variants.js +6 -6
- package/dist/ui/kv/kv.svelte +2 -3
- package/dist/ui/link-preview/link-preview-content.svelte +1 -1
- package/dist/ui/menubar/menubar-checkbox-item.svelte +1 -1
- package/dist/ui/menubar/menubar-content.svelte +2 -2
- package/dist/ui/menubar/menubar-group-heading.svelte +1 -4
- package/dist/ui/menubar/menubar-item.svelte +1 -1
- package/dist/ui/menubar/menubar-radio-item.svelte +1 -1
- package/dist/ui/menubar/menubar-root.svelte +1 -4
- package/dist/ui/menubar/menubar-sub-content.svelte +1 -1
- package/dist/ui/menubar/menubar-sub-trigger.svelte +2 -2
- package/dist/ui/menubar/menubar-trigger.svelte +1 -1
- package/dist/ui/meter/meter.svelte +2 -2
- package/dist/ui/pagination/pagination-next-button.svelte +1 -1
- package/dist/ui/pagination/pagination-prev-button.svelte +1 -1
- package/dist/ui/pagination/pagination-root.svelte +1 -1
- package/dist/ui/pane/pane-content.svelte +1 -1
- package/dist/ui/pane/pane-root.svelte +1 -1
- package/dist/ui/pane/pane-tab-list.svelte +1 -1
- package/dist/ui/pane/pane-tab-panel.svelte +1 -1
- package/dist/ui/pane/pane-tab.svelte +1 -1
- package/dist/ui/pane/pane.svelte +1 -1
- package/dist/ui/pin-input/pin-input-cell.svelte +1 -1
- package/dist/ui/popover/popover-content.svelte +1 -1
- package/dist/ui/popover/popover-trigger.svelte +1 -4
- package/dist/ui/progress/progress.svelte +2 -2
- package/dist/ui/radio-group/radio-group-item.svelte +2 -2
- package/dist/ui/radio-group/radio-group-root.svelte +1 -1
- package/dist/ui/rating-group/rating-group-item.svelte +1 -1
- package/dist/ui/rating-group/rating-group-root.svelte +1 -1
- package/dist/ui/scroll-area/scroll-area-scrollbar.svelte +1 -1
- package/dist/ui/scroll-area/scroll-area-thumb.svelte +1 -1
- package/dist/ui/scroll-area/scroll-area.svelte +1 -1
- package/dist/ui/select/select-content.svelte +7 -6
- package/dist/ui/select/select-group-heading.svelte +1 -4
- package/dist/ui/select/select-item.svelte +1 -1
- package/dist/ui/select/select-trigger.svelte +2 -2
- package/dist/ui/select/select-value.svelte +1 -1
- package/dist/ui/separator/separator.svelte +1 -1
- package/dist/ui/sheet/sheet-content.svelte +3 -3
- package/dist/ui/sheet/sheet-content.svelte.d.ts +4 -4
- package/dist/ui/skeleton/skeleton.svelte +4 -4
- package/dist/ui/skeleton/skeleton.svelte.d.ts +10 -10
- package/dist/ui/slider/slider-range.svelte +1 -1
- package/dist/ui/slider/slider-thumb.svelte +1 -1
- package/dist/ui/slider/slider-tick.svelte +1 -1
- package/dist/ui/step/step-content.svelte +1 -1
- package/dist/ui/step/step-section.svelte +1 -1
- package/dist/ui/step/step-summary.svelte +7 -7
- package/dist/ui/switch/switch.svelte +2 -2
- package/dist/ui/table/table-cell.svelte +1 -1
- package/dist/ui/table/table-head-cell.svelte +1 -1
- package/dist/ui/table/table-row.svelte +1 -1
- package/dist/ui/time-field/time-field-segment.svelte +1 -1
- package/dist/ui/time-range-field/time-range-field-segment.svelte +1 -1
- package/dist/ui/toggle-group/toggle-group-item.svelte +1 -1
- package/dist/ui/toggle-group/toggle-group-root.svelte +1 -1
- package/dist/ui/tooltip/tooltip-content.svelte +1 -1
- package/dist/ui/video-player/video-player.svelte +44 -47
- package/dist/utils/index.js +1 -1
- package/package.json +4 -3
|
@@ -10,10 +10,6 @@
|
|
|
10
10
|
}: PartProps<AspectRatio.RootProps> = $props();
|
|
11
11
|
</script>
|
|
12
12
|
|
|
13
|
-
<AspectRatio.Root
|
|
14
|
-
bind:ref
|
|
15
|
-
class={cn('overflow-hidden rounded-(--era-rd-control)', className)}
|
|
16
|
-
{...restProps}
|
|
17
|
-
>
|
|
13
|
+
<AspectRatio.Root bind:ref class={cn('overflow-hidden rounded-control', className)} {...restProps}>
|
|
18
14
|
{@render children?.()}
|
|
19
15
|
</AspectRatio.Root>
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
<Avatar.Fallback
|
|
14
14
|
bind:ref
|
|
15
15
|
class={cn(
|
|
16
|
-
'inline-flex size-full items-center justify-center bg-
|
|
16
|
+
'inline-flex size-full items-center justify-center bg-elevated text-body text-muted',
|
|
17
17
|
className
|
|
18
18
|
)}
|
|
19
19
|
{...restProps}
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
<Avatar.Root
|
|
14
14
|
bind:ref
|
|
15
15
|
class={cn(
|
|
16
|
-
'inline-flex size-
|
|
16
|
+
'inline-flex size-control shrink-0 items-center justify-center overflow-hidden rounded-full bg-elevated text-fg shadow-sm',
|
|
17
17
|
className
|
|
18
18
|
)}
|
|
19
19
|
{...restProps}
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
// that cost. A badge holding an icon must stay flex to lay the icon out
|
|
20
20
|
// beside the text, and keeps the general trim — its line-height:1 plus
|
|
21
21
|
// flex centring, which is the best available when the text is anonymous.
|
|
22
|
-
base: 'inline-flex h-
|
|
22
|
+
base: 'inline-flex h-pill min-w-pill shrink-0 items-center justify-center gap-gutter rounded-pill px-pill font-mono text-body leading-none whitespace-nowrap has-[svg]:gap-inset-pill era-text-trim not-has-[svg]:era-token-ink',
|
|
23
23
|
variants: {
|
|
24
24
|
tone: {
|
|
25
25
|
default: 'bg-fill text-fg',
|
|
@@ -6,7 +6,7 @@ export declare const badgeVariants: import("tailwind-variants").TVReturnType<{
|
|
|
6
6
|
success: "bg-success text-success-fg";
|
|
7
7
|
warning: "bg-warning text-warning-fg";
|
|
8
8
|
};
|
|
9
|
-
}, undefined, "inline-flex h-
|
|
9
|
+
}, undefined, "inline-flex h-pill min-w-pill shrink-0 items-center justify-center gap-gutter rounded-pill px-pill font-mono text-body leading-none whitespace-nowrap has-[svg]:gap-inset-pill era-text-trim not-has-[svg]:era-token-ink", {
|
|
10
10
|
tone: {
|
|
11
11
|
default: "bg-fill text-fg";
|
|
12
12
|
accent: "bg-primary text-primary-fg";
|
package/dist/ui/bar/bar.svelte
CHANGED
|
@@ -10,12 +10,12 @@
|
|
|
10
10
|
// Radius stays concentric to the height; gap/px are sp/2 (xs-inset-sm),
|
|
11
11
|
// the even gap for one-tier-smaller content at every size.
|
|
12
12
|
export const barVariants = tv({
|
|
13
|
-
base: 'flex items-center
|
|
13
|
+
base: 'flex items-center leading-none',
|
|
14
14
|
variants: {
|
|
15
15
|
size: {
|
|
16
|
-
chip: 'h-
|
|
17
|
-
control: 'h-
|
|
18
|
-
bar: 'h-
|
|
16
|
+
chip: 'h-chip rounded-chip',
|
|
17
|
+
control: 'h-control rounded-control',
|
|
18
|
+
bar: 'h-bar rounded-bar'
|
|
19
19
|
},
|
|
20
20
|
/**
|
|
21
21
|
* The tier of the CONTROLS inside, because that is what the bar's own
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
* per size and comes from the compounds below.
|
|
33
33
|
*/
|
|
34
34
|
content: {
|
|
35
|
-
tier: 'gap-
|
|
35
|
+
tier: 'gap-icon-inset-chip px-icon-inset-chip',
|
|
36
36
|
pill: ''
|
|
37
37
|
},
|
|
38
38
|
/**
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
* both. Collapses to flat in square mode like every radius.
|
|
55
55
|
*/
|
|
56
56
|
divider: {
|
|
57
|
-
true: 'shrink-0 rounded-t-none rounded-b-
|
|
57
|
+
true: 'shrink-0 rounded-t-none rounded-b-control [box-shadow:0_1px_0_var(--color-divider-faded)]',
|
|
58
58
|
false: ''
|
|
59
59
|
}
|
|
60
60
|
},
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
{
|
|
64
64
|
size: 'control',
|
|
65
65
|
content: 'pill',
|
|
66
|
-
class: 'gap-
|
|
66
|
+
class: 'gap-pill-inset-control px-pill-inset-control'
|
|
67
67
|
},
|
|
68
68
|
// chip ⊃ pill — its own token, not the text inset it used to borrow. The two
|
|
69
69
|
// were the same number only while type was 14px at every density; dense's
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
{
|
|
73
73
|
size: 'chip',
|
|
74
74
|
content: 'pill',
|
|
75
|
-
class: 'gap-
|
|
75
|
+
class: 'gap-pill-inset-chip px-pill-inset-chip'
|
|
76
76
|
}
|
|
77
77
|
],
|
|
78
78
|
defaultVariants: { size: 'bar', content: 'tier', divider: false }
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export declare const barVariants: import("tailwind-variants").TVReturnType<{
|
|
2
2
|
size: {
|
|
3
|
-
chip: "h-
|
|
4
|
-
control: "h-
|
|
5
|
-
bar: "h-
|
|
3
|
+
chip: "h-chip rounded-chip";
|
|
4
|
+
control: "h-control rounded-control";
|
|
5
|
+
bar: "h-bar rounded-bar";
|
|
6
6
|
};
|
|
7
7
|
/**
|
|
8
8
|
* The tier of the CONTROLS inside, because that is what the bar's own
|
|
@@ -19,7 +19,7 @@ export declare const barVariants: import("tailwind-variants").TVReturnType<{
|
|
|
19
19
|
* per size and comes from the compounds below.
|
|
20
20
|
*/
|
|
21
21
|
content: {
|
|
22
|
-
tier: "gap-
|
|
22
|
+
tier: "gap-icon-inset-chip px-icon-inset-chip";
|
|
23
23
|
pill: "";
|
|
24
24
|
};
|
|
25
25
|
/**
|
|
@@ -41,14 +41,14 @@ export declare const barVariants: import("tailwind-variants").TVReturnType<{
|
|
|
41
41
|
* both. Collapses to flat in square mode like every radius.
|
|
42
42
|
*/
|
|
43
43
|
divider: {
|
|
44
|
-
true: "shrink-0 rounded-t-none rounded-b-
|
|
44
|
+
true: "shrink-0 rounded-t-none rounded-b-control [box-shadow:0_1px_0_var(--color-divider-faded)]";
|
|
45
45
|
false: "";
|
|
46
46
|
};
|
|
47
|
-
}, undefined, "flex items-center
|
|
47
|
+
}, undefined, "flex items-center leading-none", {
|
|
48
48
|
size: {
|
|
49
|
-
chip: "h-
|
|
50
|
-
control: "h-
|
|
51
|
-
bar: "h-
|
|
49
|
+
chip: "h-chip rounded-chip";
|
|
50
|
+
control: "h-control rounded-control";
|
|
51
|
+
bar: "h-bar rounded-bar";
|
|
52
52
|
};
|
|
53
53
|
/**
|
|
54
54
|
* The tier of the CONTROLS inside, because that is what the bar's own
|
|
@@ -65,7 +65,7 @@ export declare const barVariants: import("tailwind-variants").TVReturnType<{
|
|
|
65
65
|
* per size and comes from the compounds below.
|
|
66
66
|
*/
|
|
67
67
|
content: {
|
|
68
|
-
tier: "gap-
|
|
68
|
+
tier: "gap-icon-inset-chip px-icon-inset-chip";
|
|
69
69
|
pill: "";
|
|
70
70
|
};
|
|
71
71
|
/**
|
|
@@ -87,14 +87,14 @@ export declare const barVariants: import("tailwind-variants").TVReturnType<{
|
|
|
87
87
|
* both. Collapses to flat in square mode like every radius.
|
|
88
88
|
*/
|
|
89
89
|
divider: {
|
|
90
|
-
true: "shrink-0 rounded-t-none rounded-b-
|
|
90
|
+
true: "shrink-0 rounded-t-none rounded-b-control [box-shadow:0_1px_0_var(--color-divider-faded)]";
|
|
91
91
|
false: "";
|
|
92
92
|
};
|
|
93
93
|
}, undefined, import("tailwind-variants").TVReturnTypeLike<{
|
|
94
94
|
size: {
|
|
95
|
-
chip: "h-
|
|
96
|
-
control: "h-
|
|
97
|
-
bar: "h-
|
|
95
|
+
chip: "h-chip rounded-chip";
|
|
96
|
+
control: "h-control rounded-control";
|
|
97
|
+
bar: "h-bar rounded-bar";
|
|
98
98
|
};
|
|
99
99
|
/**
|
|
100
100
|
* The tier of the CONTROLS inside, because that is what the bar's own
|
|
@@ -111,7 +111,7 @@ export declare const barVariants: import("tailwind-variants").TVReturnType<{
|
|
|
111
111
|
* per size and comes from the compounds below.
|
|
112
112
|
*/
|
|
113
113
|
content: {
|
|
114
|
-
tier: "gap-
|
|
114
|
+
tier: "gap-icon-inset-chip px-icon-inset-chip";
|
|
115
115
|
pill: "";
|
|
116
116
|
};
|
|
117
117
|
/**
|
|
@@ -133,7 +133,7 @@ export declare const barVariants: import("tailwind-variants").TVReturnType<{
|
|
|
133
133
|
* both. Collapses to flat in square mode like every radius.
|
|
134
134
|
*/
|
|
135
135
|
divider: {
|
|
136
|
-
true: "shrink-0 rounded-t-none rounded-b-
|
|
136
|
+
true: "shrink-0 rounded-t-none rounded-b-control [box-shadow:0_1px_0_var(--color-divider-faded)]";
|
|
137
137
|
false: "";
|
|
138
138
|
};
|
|
139
139
|
}, undefined>>;
|
|
@@ -70,9 +70,20 @@
|
|
|
70
70
|
and they separated on press. Wrapping unifies them, and `gap: inherit`
|
|
71
71
|
forwards the button's own gap so the icon/label spacing is unchanged.
|
|
72
72
|
-->
|
|
73
|
-
|
|
73
|
+
<!--
|
|
74
|
+
not-has-[svg]:era-label-ink — a text-only button ink-centres its label.
|
|
75
|
+
The span is otherwise a flex box, and a flex box's bare text is an
|
|
76
|
+
ANONYMOUS item that `text-box-trim` can never reach, so the label fell back
|
|
77
|
+
to line-box centring by font metrics (the bug era-label-ink documents).
|
|
78
|
+
With an icon present the box must stay flex for the gap, and that case is
|
|
79
|
+
still on the fallback — typography/inert-trim reports it.
|
|
80
|
+
-->
|
|
81
|
+
<span
|
|
82
|
+
data-button-content
|
|
83
|
+
class="inline-flex items-center justify-center [gap:inherit] not-has-[svg]:era-label-ink"
|
|
84
|
+
>
|
|
74
85
|
{#if loading}
|
|
75
|
-
<LoaderCircle class="size-
|
|
86
|
+
<LoaderCircle class="size-icon shrink-0 animate-spin" aria-hidden="true" />
|
|
76
87
|
{#if loadingLabel}<span class="sr-only">{loadingLabel}</span>{/if}
|
|
77
88
|
{/if}
|
|
78
89
|
{@render children?.()}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const buttonVariants: import("tailwind-variants").TVReturnType<{
|
|
2
2
|
variant: {
|
|
3
|
-
filled: "flex justify-center shadow-
|
|
3
|
+
filled: "flex justify-center shadow-sm hover:shadow-highlight active:shadow-pressed [&:active>*]:translate-x-(--era-press-sink-x) [&:active>*]:translate-y-(--era-press-sink-y)";
|
|
4
4
|
link: "inline-flex underline-offset-2 hover:underline";
|
|
5
5
|
};
|
|
6
6
|
tone: {
|
|
@@ -22,9 +22,9 @@ export declare const buttonVariants: import("tailwind-variants").TVReturnType<{
|
|
|
22
22
|
active: {
|
|
23
23
|
true: "";
|
|
24
24
|
};
|
|
25
|
-
}, undefined, "items-center gap-
|
|
25
|
+
}, undefined, "items-center gap-gutter text-body era-interactive leading-none", {
|
|
26
26
|
variant: {
|
|
27
|
-
filled: "flex justify-center shadow-
|
|
27
|
+
filled: "flex justify-center shadow-sm hover:shadow-highlight active:shadow-pressed [&:active>*]:translate-x-(--era-press-sink-x) [&:active>*]:translate-y-(--era-press-sink-y)";
|
|
28
28
|
link: "inline-flex underline-offset-2 hover:underline";
|
|
29
29
|
};
|
|
30
30
|
tone: {
|
|
@@ -48,7 +48,7 @@ export declare const buttonVariants: import("tailwind-variants").TVReturnType<{
|
|
|
48
48
|
};
|
|
49
49
|
}, undefined, import("tailwind-variants").TVReturnTypeLike<{
|
|
50
50
|
variant: {
|
|
51
|
-
filled: "flex justify-center shadow-
|
|
51
|
+
filled: "flex justify-center shadow-sm hover:shadow-highlight active:shadow-pressed [&:active>*]:translate-x-(--era-press-sink-x) [&:active>*]:translate-y-(--era-press-sink-y)";
|
|
52
52
|
link: "inline-flex underline-offset-2 hover:underline";
|
|
53
53
|
};
|
|
54
54
|
tone: {
|
|
@@ -3,7 +3,7 @@ import { tv } from '../../utils/index.js';
|
|
|
3
3
|
// entirely, so all geometry lives on filled compound variants rather than a
|
|
4
4
|
// plain size variant.
|
|
5
5
|
export const buttonVariants = tv({
|
|
6
|
-
base: 'items-center gap-
|
|
6
|
+
base: 'items-center gap-gutter text-body era-interactive leading-none',
|
|
7
7
|
variants: {
|
|
8
8
|
variant: {
|
|
9
9
|
// The active: press treatment is inert outside the bevel surface —
|
|
@@ -12,7 +12,7 @@ export const buttonVariants = tv({
|
|
|
12
12
|
// (press-sink, `[&:active>*]` — the one content-wrapper span from
|
|
13
13
|
// button.svelte) so the icon AND label depress together like a keycap
|
|
14
14
|
// while the frame holds still.
|
|
15
|
-
filled: 'flex justify-center shadow-
|
|
15
|
+
filled: 'flex justify-center shadow-sm hover:shadow-highlight active:shadow-pressed [&:active>*]:translate-x-(--era-press-sink-x) [&:active>*]:translate-y-(--era-press-sink-y)',
|
|
16
16
|
link: 'inline-flex underline-offset-2 hover:underline'
|
|
17
17
|
},
|
|
18
18
|
tone: { default: '', accent: '', destructive: '', success: '', warning: '' },
|
|
@@ -25,27 +25,27 @@ export const buttonVariants = tv({
|
|
|
25
25
|
{
|
|
26
26
|
variant: 'filled',
|
|
27
27
|
size: 'control',
|
|
28
|
-
class: 'h-
|
|
28
|
+
class: 'h-control min-w-control rounded-control'
|
|
29
29
|
},
|
|
30
30
|
{
|
|
31
31
|
variant: 'filled',
|
|
32
32
|
size: 'chip',
|
|
33
|
-
class: 'h-
|
|
33
|
+
class: 'h-chip min-w-chip rounded-chip'
|
|
34
34
|
},
|
|
35
35
|
{
|
|
36
36
|
variant: 'filled',
|
|
37
37
|
size: 'pill',
|
|
38
|
-
class: 'h-
|
|
38
|
+
class: 'h-pill min-w-pill rounded-pill'
|
|
39
39
|
},
|
|
40
40
|
{
|
|
41
41
|
variant: 'filled',
|
|
42
42
|
size: 'icon',
|
|
43
|
-
class: 'h-
|
|
43
|
+
class: 'h-icon min-w-icon rounded-icon'
|
|
44
44
|
},
|
|
45
45
|
{
|
|
46
46
|
variant: 'filled',
|
|
47
47
|
size: 'icon',
|
|
48
|
-
class: 'h-
|
|
48
|
+
class: 'h-icon min-w-icon rounded-icon'
|
|
49
49
|
},
|
|
50
50
|
// filled insets; icon buttons go square instead. When an icon is present,
|
|
51
51
|
// gap widens to match the wall inset so the icon sits in rhythm with it.
|
|
@@ -53,16 +53,16 @@ export const buttonVariants = tv({
|
|
|
53
53
|
variant: 'filled',
|
|
54
54
|
icon: false,
|
|
55
55
|
size: 'control',
|
|
56
|
-
class: 'px-
|
|
56
|
+
class: 'px-inset-control has-[svg]:gap-inset-control'
|
|
57
57
|
},
|
|
58
58
|
{
|
|
59
59
|
variant: 'filled',
|
|
60
60
|
icon: false,
|
|
61
61
|
size: 'chip',
|
|
62
|
-
class: 'px-
|
|
62
|
+
class: 'px-inset-chip has-[svg]:gap-inset-chip'
|
|
63
63
|
},
|
|
64
|
-
{ variant: 'filled', icon: false, size: 'pill', class: 'px-
|
|
65
|
-
{ variant: 'filled', icon: false, size: 'icon', class: 'px-
|
|
64
|
+
{ variant: 'filled', icon: false, size: 'pill', class: 'px-pill' },
|
|
65
|
+
{ variant: 'filled', icon: false, size: 'icon', class: 'px-gutter' },
|
|
66
66
|
{ variant: 'filled', icon: true, class: 'aspect-square px-0' },
|
|
67
67
|
// Icon glyph sizing. The glyph is the icon tier (h-icon) at default/sm —
|
|
68
68
|
// matching every text button's icon — but at the tight tiers, where the box
|
|
@@ -77,15 +77,15 @@ export const buttonVariants = tv({
|
|
|
77
77
|
// notes "new note" button rendered a 24px glyph in a 24px box — flush,
|
|
78
78
|
// no padding at all. Stating them makes the documented intent real and
|
|
79
79
|
// removes the dependency on every call site remembering.
|
|
80
|
-
{ icon: true, size: 'control', class: '[&_svg]:size-
|
|
81
|
-
{ icon: true, size: 'chip', class: '[&_svg]:size-
|
|
82
|
-
{ icon: true, size: 'pill', class: '[&_svg]:size-
|
|
83
|
-
{ icon: true, size: 'icon', class: '[&_svg]:size-
|
|
80
|
+
{ icon: true, size: 'control', class: '[&_svg]:size-icon' },
|
|
81
|
+
{ icon: true, size: 'chip', class: '[&_svg]:size-icon' },
|
|
82
|
+
{ icon: true, size: 'pill', class: '[&_svg]:size-glyph-pill' },
|
|
83
|
+
{ icon: true, size: 'icon', class: '[&_svg]:size-glyph-icon' },
|
|
84
84
|
// filled tones
|
|
85
85
|
{
|
|
86
86
|
variant: 'filled',
|
|
87
87
|
tone: 'default',
|
|
88
|
-
class: 'text-fg hover:bg-
|
|
88
|
+
class: 'text-fg hover:bg-highlight hover:text-bright'
|
|
89
89
|
},
|
|
90
90
|
{
|
|
91
91
|
variant: 'filled',
|
|
@@ -101,14 +101,14 @@ export const buttonVariants = tv({
|
|
|
101
101
|
{ variant: 'filled', tone: 'warning', class: 'text-fg hover:bg-warning hover:text-warning-fg' },
|
|
102
102
|
// Latched controls (Toggle on, current tab/page) hold the pressed face:
|
|
103
103
|
// the pressed shadow, so a selected control sits DOWN like a
|
|
104
|
-
// physically-held key — and `hover:shadow-
|
|
104
|
+
// physically-held key — and `hover:shadow-pressed` keeps it
|
|
105
105
|
// down when the cursor is over it (else the base `hover:shadow-…highlight`
|
|
106
106
|
// would raise it back up, the "it comes back up on hover" bug on bevel).
|
|
107
107
|
// The result is two states, not three: raised, and held-down.
|
|
108
108
|
{
|
|
109
109
|
variant: 'filled',
|
|
110
110
|
active: true,
|
|
111
|
-
class: 'bg-fill text-bright shadow-
|
|
111
|
+
class: 'bg-fill text-bright shadow-pressed hover:shadow-pressed'
|
|
112
112
|
},
|
|
113
113
|
// link tones: static prose until the cursor confirms interactivity
|
|
114
114
|
{ variant: 'link', tone: 'default', class: 'text-fg' },
|
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
// shrink-0: a segmented control is its buttons' width — Badge/Chip's law
|
|
23
23
|
// one tier up. Squeezed, its rounded fill slid out from under the end
|
|
24
24
|
// buttons (measured 4px at touch on the board).
|
|
25
|
-
'flex shrink-0 gap-
|
|
25
|
+
'flex shrink-0 gap-icon-inset-chip',
|
|
26
26
|
orientation === 'vertical'
|
|
27
|
-
? 'flex-col items-stretch p-
|
|
27
|
+
? 'flex-col items-stretch p-icon-inset-chip [&>*]:justify-start'
|
|
28
28
|
: 'items-center',
|
|
29
29
|
className
|
|
30
30
|
)}
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<Calendar.Day
|
|
9
9
|
bind:ref
|
|
10
10
|
class={cn(
|
|
11
|
-
'inline-flex size-
|
|
11
|
+
'inline-flex size-control cursor-default items-center justify-center rounded-control text-body text-fg hover:bg-highlight focus:outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[outside-month]:pointer-events-none data-[outside-month]:text-muted/40 data-[selected]:bg-hover data-[selected]:text-bright data-[unavailable]:text-muted data-[unavailable]:line-through',
|
|
12
12
|
className
|
|
13
13
|
)}
|
|
14
14
|
{...restProps}
|
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
let { ref = $bindable(null), class: className, ...restProps }: Calendar.GridRowProps = $props();
|
|
6
6
|
</script>
|
|
7
7
|
|
|
8
|
-
<Calendar.GridRow bind:ref class={cn('flex gap-
|
|
8
|
+
<Calendar.GridRow bind:ref class={cn('flex gap-gutter', className)} {...restProps} />
|
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
let { ref = $bindable(null), class: className, ...restProps }: Calendar.GridProps = $props();
|
|
6
6
|
</script>
|
|
7
7
|
|
|
8
|
-
<Calendar.Grid bind:ref class={cn('flex flex-col gap-
|
|
8
|
+
<Calendar.Grid bind:ref class={cn('flex flex-col gap-gutter', className)} {...restProps} />
|
package/dist/ui/card/card.svelte
CHANGED
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
import { cn, tv } from '../../utils/index.js';
|
|
3
3
|
|
|
4
4
|
export const cardVariants = tv({
|
|
5
|
-
base: 'block w-full rounded-
|
|
5
|
+
base: 'block w-full rounded-bar text-left text-fg',
|
|
6
6
|
variants: {
|
|
7
7
|
tone: {
|
|
8
|
-
elevated: 'bg-
|
|
9
|
-
surface: 'bg-
|
|
8
|
+
elevated: 'bg-elevated shadow-sm',
|
|
9
|
+
surface: 'bg-well',
|
|
10
10
|
// The recessed tier, the container-level twin of --era-field-bg. The
|
|
11
11
|
// other two tones are RAISED (elevated) and level (surface); there was
|
|
12
12
|
// no way to say "sunken", so anything wanting one — a tool's output
|
|
13
13
|
// pane, an expanded chip body — hand-rolled the fill and shadow-well
|
|
14
14
|
// pair instead of importing this.
|
|
15
|
-
well: 'bg-
|
|
15
|
+
well: 'bg-field shadow-well',
|
|
16
16
|
flat: ''
|
|
17
17
|
},
|
|
18
18
|
// Sectioned layout (header / body / footer with dividers) omits the
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
// default button padding and lines up with the <div>/<a> variants.
|
|
22
22
|
//
|
|
23
23
|
// EVEN on all four sides. This carried a half-height top padding
|
|
24
|
-
// (pt-gutter against pb-pad-md) borrowed from `p-
|
|
24
|
+
// (pt-gutter against pb-pad-md) borrowed from `p-section`, whose
|
|
25
25
|
// asymmetry is earned: a content panel always follows a section heading
|
|
26
26
|
// ROW, and that row's own bar already contributes slack above the text,
|
|
27
27
|
// so padding evenly on top of it spends the space twice. A card has no
|
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
// reported it as "cards aren't evenly spaced", which is exactly what it
|
|
32
32
|
// was: the even-gap law, broken by default, in the component that
|
|
33
33
|
// bounds more consumer content than any other.
|
|
34
|
-
sectioned: { true: 'p-0', false: 'p-
|
|
34
|
+
sectioned: { true: 'p-0', false: 'p-card' },
|
|
35
35
|
interactive: {
|
|
36
|
-
true: 'cursor-pointer hover:bg-
|
|
36
|
+
true: 'cursor-pointer hover:bg-highlight hover:shadow-highlight focus-visible:bg-highlight era-interactive aria-disabled:cursor-not-allowed aria-disabled:opacity-50'
|
|
37
37
|
}
|
|
38
38
|
},
|
|
39
39
|
defaultVariants: { tone: 'elevated', sectioned: false, interactive: false }
|
|
@@ -113,15 +113,15 @@
|
|
|
113
113
|
{#snippet body()}
|
|
114
114
|
{#if sectioned}
|
|
115
115
|
{#if header}
|
|
116
|
-
<div class="border-b border-divider-faded p-
|
|
116
|
+
<div class="border-b border-divider-faded p-card text-bright">
|
|
117
117
|
{@render header()}
|
|
118
118
|
</div>
|
|
119
119
|
{/if}
|
|
120
|
-
<div class="p-
|
|
120
|
+
<div class="p-card">
|
|
121
121
|
{@render children?.()}
|
|
122
122
|
</div>
|
|
123
123
|
{#if footer}
|
|
124
|
-
<div class="border-t border-divider-faded p-
|
|
124
|
+
<div class="border-t border-divider-faded p-card">
|
|
125
125
|
{@render footer()}
|
|
126
126
|
</div>
|
|
127
127
|
{/if}
|
|
@@ -1,44 +1,44 @@
|
|
|
1
1
|
export declare const cardVariants: import("tailwind-variants").TVReturnType<{
|
|
2
2
|
tone: {
|
|
3
|
-
elevated: "bg-
|
|
4
|
-
surface: "bg-
|
|
5
|
-
well: "bg-
|
|
3
|
+
elevated: "bg-elevated shadow-sm";
|
|
4
|
+
surface: "bg-well";
|
|
5
|
+
well: "bg-field shadow-well";
|
|
6
6
|
flat: "";
|
|
7
7
|
};
|
|
8
8
|
sectioned: {
|
|
9
9
|
true: "p-0";
|
|
10
|
-
false: "p-
|
|
10
|
+
false: "p-card";
|
|
11
11
|
};
|
|
12
12
|
interactive: {
|
|
13
|
-
true: "cursor-pointer hover:bg-
|
|
13
|
+
true: "cursor-pointer hover:bg-highlight hover:shadow-highlight focus-visible:bg-highlight era-interactive aria-disabled:cursor-not-allowed aria-disabled:opacity-50";
|
|
14
14
|
};
|
|
15
|
-
}, undefined, "block w-full rounded-
|
|
15
|
+
}, undefined, "block w-full rounded-bar text-left text-fg", {
|
|
16
16
|
tone: {
|
|
17
|
-
elevated: "bg-
|
|
18
|
-
surface: "bg-
|
|
19
|
-
well: "bg-
|
|
17
|
+
elevated: "bg-elevated shadow-sm";
|
|
18
|
+
surface: "bg-well";
|
|
19
|
+
well: "bg-field shadow-well";
|
|
20
20
|
flat: "";
|
|
21
21
|
};
|
|
22
22
|
sectioned: {
|
|
23
23
|
true: "p-0";
|
|
24
|
-
false: "p-
|
|
24
|
+
false: "p-card";
|
|
25
25
|
};
|
|
26
26
|
interactive: {
|
|
27
|
-
true: "cursor-pointer hover:bg-
|
|
27
|
+
true: "cursor-pointer hover:bg-highlight hover:shadow-highlight focus-visible:bg-highlight era-interactive aria-disabled:cursor-not-allowed aria-disabled:opacity-50";
|
|
28
28
|
};
|
|
29
29
|
}, undefined, import("tailwind-variants").TVReturnTypeLike<{
|
|
30
30
|
tone: {
|
|
31
|
-
elevated: "bg-
|
|
32
|
-
surface: "bg-
|
|
33
|
-
well: "bg-
|
|
31
|
+
elevated: "bg-elevated shadow-sm";
|
|
32
|
+
surface: "bg-well";
|
|
33
|
+
well: "bg-field shadow-well";
|
|
34
34
|
flat: "";
|
|
35
35
|
};
|
|
36
36
|
sectioned: {
|
|
37
37
|
true: "p-0";
|
|
38
|
-
false: "p-
|
|
38
|
+
false: "p-card";
|
|
39
39
|
};
|
|
40
40
|
interactive: {
|
|
41
|
-
true: "cursor-pointer hover:bg-
|
|
41
|
+
true: "cursor-pointer hover:bg-highlight hover:shadow-highlight focus-visible:bg-highlight era-interactive aria-disabled:cursor-not-allowed aria-disabled:opacity-50";
|
|
42
42
|
};
|
|
43
43
|
}, undefined>>;
|
|
44
44
|
import type { Snippet } from 'svelte';
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
bind:checked
|
|
19
19
|
bind:indeterminate
|
|
20
20
|
class={cn(
|
|
21
|
-
'group/checkbox flex size-
|
|
21
|
+
'group/checkbox flex size-icon shrink-0 era-interactive cursor-pointer items-center justify-center rounded-control bg-elevated shadow-well hover:bg-highlight',
|
|
22
22
|
className
|
|
23
23
|
)}
|
|
24
24
|
{...restProps}
|
package/dist/ui/chip/chip.svelte
CHANGED
|
@@ -13,18 +13,26 @@
|
|
|
13
13
|
export const chipVariants = tv({
|
|
14
14
|
// shrink-0 + nowrap for the same reason Badge carries them: the pill is
|
|
15
15
|
// already exactly its text's size, so any squeeze puts ink outside the fill.
|
|
16
|
-
base: 'inline-flex shrink-0 items-center bg-fill font-mono text-body leading-none whitespace-nowrap text-fg shadow-
|
|
16
|
+
base: 'inline-flex shrink-0 items-center bg-fill font-mono text-body leading-none whitespace-nowrap text-fg shadow-sm',
|
|
17
17
|
variants: {
|
|
18
18
|
size: {
|
|
19
|
-
chip: 'h-
|
|
20
|
-
pill: 'h-
|
|
19
|
+
chip: 'h-chip min-w-chip rounded-chip pl-chip',
|
|
20
|
+
pill: 'h-pill min-w-pill rounded-pill pl-pill'
|
|
21
21
|
},
|
|
22
22
|
dismissible: { true: '', false: '' }
|
|
23
23
|
},
|
|
24
24
|
compoundVariants: [
|
|
25
25
|
// Text-only: symmetric pill padding, inter-element gap for a lead icon.
|
|
26
|
-
{
|
|
27
|
-
|
|
26
|
+
{
|
|
27
|
+
size: 'chip',
|
|
28
|
+
dismissible: false,
|
|
29
|
+
class: 'gap-gutter pr-chip not-has-[svg]:era-label-ink not-has-[svg]:text-center'
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
size: 'pill',
|
|
33
|
+
dismissible: false,
|
|
34
|
+
class: 'gap-gutter pr-pill not-has-[svg]:era-label-ink not-has-[svg]:text-center'
|
|
35
|
+
},
|
|
28
36
|
// Dismissible, two geometries because the two tiers afford different ones:
|
|
29
37
|
//
|
|
30
38
|
// chip — the pill-tier button NESTS, with its concentric gap mirrored as
|
|
@@ -41,9 +49,9 @@
|
|
|
41
49
|
{
|
|
42
50
|
size: 'chip',
|
|
43
51
|
dismissible: true,
|
|
44
|
-
class: 'gap-
|
|
52
|
+
class: 'gap-pill-inset-chip pr-pill-inset-chip'
|
|
45
53
|
},
|
|
46
|
-
{ size: 'pill', dismissible: true, class: 'gap-
|
|
54
|
+
{ size: 'pill', dismissible: true, class: 'gap-icon-inset-pill pr-0' }
|
|
47
55
|
],
|
|
48
56
|
defaultVariants: { size: 'chip', dismissible: false }
|
|
49
57
|
});
|