@adea-ai/ui 0.117.0 → 0.118.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/components/composites/action-button/action-button.d.ts.map +1 -1
- package/dist/components/composites/action-button/action-button.js +1 -0
- package/dist/components/composites/action-button/action-button.js.map +1 -1
- package/dist/components/composites/list-row/list-row-control.d.ts.map +1 -1
- package/dist/components/composites/list-row/list-row-control.js +1 -0
- package/dist/components/composites/list-row/list-row-control.js.map +1 -1
- package/dist/components/composites/list-row/list-row.d.ts.map +1 -1
- package/dist/components/composites/list-row/list-row.js +16 -9
- package/dist/components/composites/list-row/list-row.js.map +1 -1
- package/dist/components/composites/settings/settings-navigation.d.ts.map +1 -1
- package/dist/components/composites/settings/settings-navigation.js +15 -6
- package/dist/components/composites/settings/settings-navigation.js.map +1 -1
- package/dist/components/composites/settings/settings.d.ts +3 -2
- package/dist/components/composites/settings/settings.d.ts.map +1 -1
- package/dist/components/composites/settings/settings.js +3 -2
- package/dist/components/composites/settings/settings.js.map +1 -1
- package/dist/components/ui/alert/alert.d.ts +7 -0
- package/dist/components/ui/alert/alert.d.ts.map +1 -1
- package/dist/components/ui/alert/alert.js +18 -1
- package/dist/components/ui/alert/alert.js.map +1 -1
- package/dist/components/ui/alert/index.d.ts +1 -1
- package/dist/components/ui/alert/index.d.ts.map +1 -1
- package/dist/components/ui/alert/index.js +2 -2
- package/dist/components/ui/badge/badge.d.ts.map +1 -1
- package/dist/components/ui/badge/badge.js +1 -0
- package/dist/components/ui/badge/badge.js.map +1 -1
- package/dist/components/ui/breadcrumb/breadcrumb.d.ts +6 -0
- package/dist/components/ui/breadcrumb/breadcrumb.d.ts.map +1 -1
- package/dist/components/ui/breadcrumb/breadcrumb.js +19 -8
- package/dist/components/ui/breadcrumb/breadcrumb.js.map +1 -1
- package/dist/components/ui/breadcrumb/index.d.ts +1 -1
- package/dist/components/ui/breadcrumb/index.d.ts.map +1 -1
- package/dist/components/ui/breadcrumb/index.js +2 -2
- package/dist/components/ui/button/button.d.ts.map +1 -1
- package/dist/components/ui/button/button.js +1 -0
- package/dist/components/ui/button/button.js.map +1 -1
- package/dist/components/ui/card/card.d.ts +19 -9
- package/dist/components/ui/card/card.d.ts.map +1 -1
- package/dist/components/ui/card/card.js +21 -3
- package/dist/components/ui/card/card.js.map +1 -1
- package/dist/components/ui/card/index.d.ts +1 -1
- package/dist/components/ui/card/index.d.ts.map +1 -1
- package/dist/components/ui/card/index.js +2 -2
- package/dist/components/ui/checkbox/checkbox.d.ts.map +1 -1
- package/dist/components/ui/checkbox/checkbox.js +1 -0
- package/dist/components/ui/checkbox/checkbox.js.map +1 -1
- package/dist/components/ui/dialog/dialog.d.ts +15 -0
- package/dist/components/ui/dialog/dialog.d.ts.map +1 -1
- package/dist/components/ui/dialog/dialog.js +11 -3
- package/dist/components/ui/dialog/dialog.js.map +1 -1
- package/dist/components/ui/dialog/index.d.ts +1 -1
- package/dist/components/ui/dialog/index.d.ts.map +1 -1
- package/dist/components/ui/entity-icon/entity-icon.d.ts +10 -0
- package/dist/components/ui/entity-icon/entity-icon.d.ts.map +1 -1
- package/dist/components/ui/entity-icon/entity-icon.js +11 -2
- package/dist/components/ui/entity-icon/entity-icon.js.map +1 -1
- package/dist/components/ui/field/field.d.ts +11 -1
- package/dist/components/ui/field/field.d.ts.map +1 -1
- package/dist/components/ui/field/field.js +2 -2
- package/dist/components/ui/field/field.js.map +1 -1
- package/dist/components/ui/field/index.d.ts +1 -1
- package/dist/components/ui/field/index.d.ts.map +1 -1
- package/dist/components/ui/input-group/index.d.ts +1 -1
- package/dist/components/ui/input-group/index.d.ts.map +1 -1
- package/dist/components/ui/input-group/input-group.d.ts +8 -1
- package/dist/components/ui/input-group/input-group.d.ts.map +1 -1
- package/dist/components/ui/input-group/input-group.js +16 -20
- package/dist/components/ui/input-group/input-group.js.map +1 -1
- package/dist/components/ui/native-select/native-select.d.ts +8 -1
- package/dist/components/ui/native-select/native-select.d.ts.map +1 -1
- package/dist/components/ui/native-select/native-select.js +9 -2
- package/dist/components/ui/native-select/native-select.js.map +1 -1
- package/dist/components/ui/progress/progress.d.ts.map +1 -1
- package/dist/components/ui/progress/progress.js +6 -3
- package/dist/components/ui/progress/progress.js.map +1 -1
- package/dist/components/ui/radio-group/radio-group.d.ts +18 -3
- package/dist/components/ui/radio-group/radio-group.d.ts.map +1 -1
- package/dist/components/ui/radio-group/radio-group.js +32 -7
- package/dist/components/ui/radio-group/radio-group.js.map +1 -1
- package/dist/components/ui/select/select.d.ts.map +1 -1
- package/dist/components/ui/select/select.js +10 -7
- package/dist/components/ui/select/select.js.map +1 -1
- package/dist/components/ui/sheet/sheet.d.ts +1 -0
- package/dist/components/ui/sheet/sheet.d.ts.map +1 -1
- package/dist/components/ui/sheet/sheet.js +27 -2
- package/dist/components/ui/sheet/sheet.js.map +1 -1
- package/dist/components/ui/slider/slider.d.ts.map +1 -1
- package/dist/components/ui/slider/slider.js +6 -3
- package/dist/components/ui/slider/slider.js.map +1 -1
- package/dist/components/ui/status-chip/status-chip.d.ts.map +1 -1
- package/dist/components/ui/status-chip/status-chip.js +1 -1
- package/dist/components/ui/status-chip/status-chip.js.map +1 -1
- package/dist/components/ui/switch/switch.d.ts.map +1 -1
- package/dist/components/ui/switch/switch.js +1 -0
- package/dist/components/ui/switch/switch.js.map +1 -1
- package/dist/components/ui/tabs/tabs.d.ts +18 -0
- package/dist/components/ui/tabs/tabs.d.ts.map +1 -1
- package/dist/components/ui/tabs/tabs.js +22 -4
- package/dist/components/ui/tabs/tabs.js.map +1 -1
- package/dist/components/ui/toggle/toggle.d.ts.map +1 -1
- package/dist/components/ui/toggle/toggle.js +9 -6
- package/dist/components/ui/toggle/toggle.js.map +1 -1
- package/dist/components/ui/toggle-group/toggle-group.d.ts.map +1 -1
- package/dist/components/ui/toggle-group/toggle-group.js +2 -0
- package/dist/components/ui/toggle-group/toggle-group.js.map +1 -1
- package/dist/components/ui/typography/typography.d.ts +12 -1
- package/dist/components/ui/typography/typography.d.ts.map +1 -1
- package/dist/components/ui/typography/typography.js +16 -2
- package/dist/components/ui/typography/typography.js.map +1 -1
- package/dist/index.js +4 -4
- package/dist/lib/cn-tables.generated.js +5 -5
- package/dist/lib/cn-tables.generated.js.map +1 -1
- package/dist/lib/tokens.d.ts.map +1 -1
- package/dist/lib/tokens.js +7 -2
- package/dist/lib/tokens.js.map +1 -1
- package/dist/r/list-row.json +1 -0
- package/dist/r/registry.json +1 -0
- package/dist/r/src/components/composites/action-button/action-button.tsx +3 -0
- package/dist/r/src/components/composites/list-row/list-row-control.tsx +1 -0
- package/dist/r/src/components/composites/list-row/list-row.tsx +3 -2
- package/dist/r/src/components/composites/settings/settings-navigation.tsx +7 -3
- package/dist/r/src/components/composites/settings/settings.tsx +3 -2
- package/dist/r/src/components/ui/alert/alert.tsx +17 -0
- package/dist/r/src/components/ui/alert/index.ts +8 -1
- package/dist/r/src/components/ui/badge/badge.tsx +1 -0
- package/dist/r/src/components/ui/breadcrumb/breadcrumb.tsx +18 -8
- package/dist/r/src/components/ui/breadcrumb/index.ts +1 -0
- package/dist/r/src/components/ui/button/button.tsx +1 -0
- package/dist/r/src/components/ui/card/card.tsx +30 -13
- package/dist/r/src/components/ui/card/index.ts +1 -0
- package/dist/r/src/components/ui/checkbox/checkbox.tsx +1 -0
- package/dist/r/src/components/ui/dialog/dialog.tsx +26 -2
- package/dist/r/src/components/ui/dialog/index.ts +1 -0
- package/dist/r/src/components/ui/entity-icon/entity-icon.tsx +15 -0
- package/dist/r/src/components/ui/field/field.tsx +23 -3
- package/dist/r/src/components/ui/field/index.ts +1 -0
- package/dist/r/src/components/ui/input-group/index.ts +1 -0
- package/dist/r/src/components/ui/input-group/input-group.tsx +28 -5
- package/dist/r/src/components/ui/native-select/native-select.tsx +20 -3
- package/dist/r/src/components/ui/progress/progress.tsx +5 -1
- package/dist/r/src/components/ui/radio-group/radio-group.tsx +40 -3
- package/dist/r/src/components/ui/select/select.tsx +1 -0
- package/dist/r/src/components/ui/sheet/sheet.tsx +20 -2
- package/dist/r/src/components/ui/slider/slider.tsx +1 -0
- package/dist/r/src/components/ui/status-chip/status-chip.tsx +1 -0
- package/dist/r/src/components/ui/switch/switch.tsx +1 -0
- package/dist/r/src/components/ui/tabs/tabs.tsx +33 -4
- package/dist/r/src/components/ui/toggle/toggle.tsx +1 -0
- package/dist/r/src/components/ui/toggle-group/toggle-group.tsx +2 -0
- package/dist/r/src/components/ui/typography/typography.tsx +20 -1
- package/dist/r/src/lib/cn-tables.generated.ts +5 -5
- package/dist/r/src/lib/tokens.ts +7 -2
- package/dist/r/src/styles/base.css +4 -1
- package/dist/r/src/styles/theme.css +4 -0
- package/package.json +1 -1
- package/registry.json +1 -0
- package/src/components/composites/action-button/action-button.tsx +3 -0
- package/src/components/composites/list-row/list-row-control.tsx +1 -0
- package/src/components/composites/list-row/list-row.tsx +3 -2
- package/src/components/composites/settings/settings-navigation.tsx +7 -3
- package/src/components/composites/settings/settings.tsx +3 -2
- package/src/components/ui/alert/alert.tsx +17 -0
- package/src/components/ui/alert/index.ts +8 -1
- package/src/components/ui/badge/badge.tsx +1 -0
- package/src/components/ui/breadcrumb/breadcrumb.tsx +18 -8
- package/src/components/ui/breadcrumb/index.ts +1 -0
- package/src/components/ui/button/button.tsx +1 -0
- package/src/components/ui/card/card.tsx +30 -13
- package/src/components/ui/card/index.ts +1 -0
- package/src/components/ui/checkbox/checkbox.tsx +1 -0
- package/src/components/ui/dialog/dialog.tsx +26 -2
- package/src/components/ui/dialog/index.ts +1 -0
- package/src/components/ui/entity-icon/entity-icon.tsx +15 -0
- package/src/components/ui/field/field.tsx +23 -3
- package/src/components/ui/field/index.ts +1 -0
- package/src/components/ui/input-group/index.ts +1 -0
- package/src/components/ui/input-group/input-group.tsx +28 -5
- package/src/components/ui/native-select/native-select.tsx +20 -3
- package/src/components/ui/progress/progress.tsx +5 -1
- package/src/components/ui/radio-group/radio-group.tsx +40 -3
- package/src/components/ui/select/select.tsx +1 -0
- package/src/components/ui/sheet/sheet.tsx +20 -2
- package/src/components/ui/slider/slider.tsx +1 -0
- package/src/components/ui/status-chip/status-chip.tsx +1 -0
- package/src/components/ui/switch/switch.tsx +1 -0
- package/src/components/ui/tabs/tabs.tsx +33 -4
- package/src/components/ui/toggle/toggle.tsx +1 -0
- package/src/components/ui/toggle-group/toggle-group.tsx +2 -0
- package/src/components/ui/typography/typography.tsx +20 -1
- package/src/lib/cn-tables.generated.ts +5 -5
- package/src/lib/tokens.ts +7 -2
- package/src/styles/base.css +4 -1
- package/src/styles/theme.css +4 -0
|
@@ -35,6 +35,14 @@ import { cn } from '#lib/utils'
|
|
|
35
35
|
* `shape="rounded"` is the default because a rounded square reads as an object
|
|
36
36
|
* and a circle reads as a person; use `circle` only when the tile really does
|
|
37
37
|
* hold a face.
|
|
38
|
+
*
|
|
39
|
+
* `monochrome` is for a third-party brand mark — a vendor logo drawn with its
|
|
40
|
+
* own `fill`. A brand's hex is chosen for a white page: GitHub's near-black and
|
|
41
|
+
* Slack's aubergine all but vanish on a dark tile, and no tone can be picked
|
|
42
|
+
* that suits every brand in both themes. `monochrome` repaints any explicitly
|
|
43
|
+
* filled shape in the tile's glyph colour (the tone's), so the mark stays
|
|
44
|
+
* recognisable by its shape and legible in every theme. Stroke-drawn icons
|
|
45
|
+
* (Lucide, `fill="none"`) are left alone.
|
|
38
46
|
*/
|
|
39
47
|
export const entityIconVariants = cva(
|
|
40
48
|
'relative inline-flex shrink-0 items-center justify-center overflow-hidden border font-semibold select-none [&_svg]:pointer-events-none [&_svg]:shrink-0',
|
|
@@ -90,6 +98,8 @@ export type EntityIconProps = Omit<ComponentProps<'span'>, 'children'> &
|
|
|
90
98
|
badge?: JSX.Element
|
|
91
99
|
/** A second edge, drawn outside the tile — an active or selected ring. */
|
|
92
100
|
ring?: boolean
|
|
101
|
+
/** Repaint a brand mark's own fills in the tile's glyph colour. */
|
|
102
|
+
monochrome?: boolean
|
|
93
103
|
}
|
|
94
104
|
|
|
95
105
|
/**
|
|
@@ -143,6 +153,7 @@ export function EntityIcon(props: EntityIconProps) {
|
|
|
143
153
|
'fallback',
|
|
144
154
|
'badge',
|
|
145
155
|
'ring',
|
|
156
|
+
'monochrome',
|
|
146
157
|
'shape',
|
|
147
158
|
'size',
|
|
148
159
|
'tone',
|
|
@@ -159,9 +170,13 @@ export function EntityIcon(props: EntityIconProps) {
|
|
|
159
170
|
|
|
160
171
|
return (
|
|
161
172
|
<span
|
|
173
|
+
data-slot="entity-icon"
|
|
162
174
|
class={cn(
|
|
163
175
|
entityIconVariants({ shape: local.shape, size: local.size, tone: local.tone }),
|
|
164
176
|
local.ring && 'ring-2 ring-ring ring-offset-2 ring-offset-background',
|
|
177
|
+
// A presentation attribute (`fill="#4A154B"`) loses to any CSS rule, so
|
|
178
|
+
// this overrides the brand's hex without touching the caller's SVG.
|
|
179
|
+
local.monochrome && "[&_[fill]:not([fill='none'])]:fill-current",
|
|
165
180
|
local.class
|
|
166
181
|
)}
|
|
167
182
|
role="img"
|
|
@@ -188,10 +188,30 @@ export function FieldSet(props: ComponentProps<'fieldset'>) {
|
|
|
188
188
|
return <fieldset class={cn('flex flex-col gap-4', local.class)} {...rest} />
|
|
189
189
|
}
|
|
190
190
|
|
|
191
|
+
export type FieldGroupProps = ComponentProps<'div'> & {
|
|
192
|
+
/**
|
|
193
|
+
* `2` lays the fields out in two columns from the `sm` breakpoint up — a
|
|
194
|
+
* short form of paired values (host and port, a name and a model). A field
|
|
195
|
+
* that needs the full width says `class="col-span-full"`. Below `sm` it is
|
|
196
|
+
* one column again, because two inputs side by side on a phone are each too
|
|
197
|
+
* narrow to read.
|
|
198
|
+
*/
|
|
199
|
+
columns?: 1 | 2
|
|
200
|
+
}
|
|
201
|
+
|
|
191
202
|
/** A visual stack for related controls that does not imply fieldset semantics. */
|
|
192
|
-
export function FieldGroup(props:
|
|
193
|
-
const [local, rest] = splitProps(props, ['class'])
|
|
194
|
-
return
|
|
203
|
+
export function FieldGroup(props: FieldGroupProps) {
|
|
204
|
+
const [local, rest] = splitProps(props, ['class', 'columns'])
|
|
205
|
+
return (
|
|
206
|
+
<div
|
|
207
|
+
data-slot="field-group"
|
|
208
|
+
class={cn(
|
|
209
|
+
local.columns === 2 ? 'grid gap-4 sm:grid-cols-2' : 'flex flex-col gap-4',
|
|
210
|
+
local.class
|
|
211
|
+
)}
|
|
212
|
+
{...rest}
|
|
213
|
+
/>
|
|
214
|
+
)
|
|
195
215
|
}
|
|
196
216
|
|
|
197
217
|
export function FieldLegend(props: ComponentProps<'legend'> & { variant?: 'legend' | 'label' }) {
|
|
@@ -15,15 +15,29 @@ import { cn } from '#lib/utils'
|
|
|
15
15
|
* The focus ring therefore lives on the group and follows `focus-within`. A
|
|
16
16
|
* group containing several focusable things still reads as focused once, which
|
|
17
17
|
* is the correct affordance: the user is somewhere inside it.
|
|
18
|
+
*
|
|
19
|
+
* `size` is the control rung, matching `Input`: `sm` for a toolbar search beside
|
|
20
|
+
* `icon-sm` actions, `md` (the default) everywhere else. The group's input and
|
|
21
|
+
* text follow it.
|
|
18
22
|
*/
|
|
19
|
-
export
|
|
20
|
-
|
|
23
|
+
export type InputGroupProps = ComponentProps<'div'> & {
|
|
24
|
+
size?: 'sm' | 'md' | 'lg'
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export function InputGroup(props: InputGroupProps) {
|
|
28
|
+
const [local, rest] = splitProps(props, ['class', 'size'])
|
|
21
29
|
|
|
22
30
|
return (
|
|
23
31
|
<div
|
|
24
32
|
data-slot="input-group"
|
|
33
|
+
data-size={local.size}
|
|
25
34
|
class={cn(
|
|
26
|
-
'border-input flex
|
|
35
|
+
'group/input-group border-input flex w-full min-w-0 items-center gap-1.5 rounded-md border bg-transparent',
|
|
36
|
+
{
|
|
37
|
+
'h-control-sm px-control-xs': local.size === 'sm',
|
|
38
|
+
'h-control-md px-control-sm': local.size === 'md' || local.size === undefined,
|
|
39
|
+
'h-control-lg px-control-md': local.size === 'lg',
|
|
40
|
+
},
|
|
27
41
|
'transition-[color,box-shadow,border-color] ease-out',
|
|
28
42
|
'focus-within:border-ring focus-within:ring-3 focus-within:ring-primary-subtle',
|
|
29
43
|
'has-[[aria-invalid=true]]:border-destructive has-[[aria-invalid=true]]:ring-3 has-[[aria-invalid=true]]:ring-destructive-subtle',
|
|
@@ -64,7 +78,7 @@ export function InputGroupInput(props: ComponentProps<'input'>) {
|
|
|
64
78
|
aria-invalid={field?.['aria-invalid'] ?? local['aria-invalid']}
|
|
65
79
|
aria-errormessage={field?.['aria-errormessage'] ?? local['aria-errormessage']}
|
|
66
80
|
class={cn(
|
|
67
|
-
'h-full min-w-0 flex-1 bg-transparent text-sm outline-none',
|
|
81
|
+
'h-full min-w-0 flex-1 bg-transparent text-sm outline-none group-data-[size=sm]/input-group:text-xs',
|
|
68
82
|
'placeholder:text-muted-foreground',
|
|
69
83
|
'disabled:cursor-not-allowed',
|
|
70
84
|
local.class
|
|
@@ -94,6 +108,7 @@ export function InputGroupAddon(props: InputGroupAddonProps) {
|
|
|
94
108
|
class={cn(
|
|
95
109
|
'text-muted-foreground flex shrink-0 items-center gap-1.5 text-sm select-none',
|
|
96
110
|
'[&_svg]:pointer-events-none [&_svg]:size-4',
|
|
111
|
+
'group-data-[size=sm]/input-group:text-xs group-data-[size=sm]/input-group:[&_svg]:size-3.5',
|
|
97
112
|
{ 'order-first': local.align !== 'end', 'order-last': local.align === 'end' },
|
|
98
113
|
local.class
|
|
99
114
|
)}
|
|
@@ -130,5 +145,13 @@ export function InputGroupButton(props: ComponentProps<'button'>) {
|
|
|
130
145
|
/** Text that reads as a value but is not an input, e.g. a unit or a suffix. */
|
|
131
146
|
export function InputGroupText(props: ComponentProps<'span'> & { children?: JSX.Element }) {
|
|
132
147
|
const [local, rest] = splitProps(props, ['class'])
|
|
133
|
-
return
|
|
148
|
+
return (
|
|
149
|
+
<span
|
|
150
|
+
class={cn(
|
|
151
|
+
'text-muted-foreground text-sm group-data-[size=sm]/input-group:text-xs',
|
|
152
|
+
local.class
|
|
153
|
+
)}
|
|
154
|
+
{...rest}
|
|
155
|
+
/>
|
|
156
|
+
)
|
|
134
157
|
}
|
|
@@ -4,7 +4,14 @@ import { createEffect, For, onMount, Show, splitProps } from 'solid-js'
|
|
|
4
4
|
import { useFormFieldControl } from '#lib/form-field'
|
|
5
5
|
import { cn } from '#lib/utils'
|
|
6
6
|
|
|
7
|
-
export type NativeSelectProps = ComponentProps<'select'> & {
|
|
7
|
+
export type NativeSelectProps = Omit<ComponentProps<'select'>, 'size'> & {
|
|
8
|
+
/**
|
|
9
|
+
* The control rung, matching `Input` and `SelectTrigger`: `sm` for a dense
|
|
10
|
+
* toolbar or pane filter, `md` (the default) everywhere else. This replaces the
|
|
11
|
+
* native `size` attribute, which turns a select into a list box — a different
|
|
12
|
+
* control that this styled single-line select is not.
|
|
13
|
+
*/
|
|
14
|
+
size?: 'sm' | 'md' | 'lg'
|
|
8
15
|
/** Render the choices from data instead of raw option children. */
|
|
9
16
|
options?: readonly NativeSelectOption[]
|
|
10
17
|
/** Initialize an uncontrolled selection after its native options mount. */
|
|
@@ -62,6 +69,7 @@ export type NativeSelectOption = Readonly<{
|
|
|
62
69
|
export function NativeSelect(props: NativeSelectProps) {
|
|
63
70
|
const [local, rest] = splitProps(props, [
|
|
64
71
|
'class',
|
|
72
|
+
'size',
|
|
65
73
|
'children',
|
|
66
74
|
'defaultValue',
|
|
67
75
|
'options',
|
|
@@ -108,7 +116,13 @@ export function NativeSelect(props: NativeSelectProps) {
|
|
|
108
116
|
aria-invalid={field?.['aria-invalid'] ?? local['aria-invalid']}
|
|
109
117
|
aria-errormessage={field?.['aria-errormessage'] ?? local['aria-errormessage']}
|
|
110
118
|
class={cn(
|
|
111
|
-
'
|
|
119
|
+
'min-w-0 appearance-none rounded-md border border-input bg-transparent',
|
|
120
|
+
{
|
|
121
|
+
'h-control-sm px-control-sm pr-8 text-xs': local.size === 'sm',
|
|
122
|
+
'h-control-md px-control-md pr-9 text-sm':
|
|
123
|
+
local.size === 'md' || local.size === undefined,
|
|
124
|
+
'h-control-lg px-control-lg pr-9 text-sm': local.size === 'lg',
|
|
125
|
+
},
|
|
112
126
|
'transition-[color,box-shadow,border-color] ease-out outline-none',
|
|
113
127
|
'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',
|
|
114
128
|
'aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive-subtle',
|
|
@@ -132,7 +146,10 @@ export function NativeSelect(props: NativeSelectProps) {
|
|
|
132
146
|
<ChevronDownIcon
|
|
133
147
|
data-slot="native-select-icon"
|
|
134
148
|
aria-hidden="true"
|
|
135
|
-
class=
|
|
149
|
+
class={cn(
|
|
150
|
+
'pointer-events-none absolute end-2 top-1/2 -translate-y-1/2 text-muted-foreground',
|
|
151
|
+
local.size === 'sm' ? 'size-3.5' : 'size-4'
|
|
152
|
+
)}
|
|
136
153
|
/>
|
|
137
154
|
</span>
|
|
138
155
|
)
|
|
@@ -39,7 +39,11 @@ export function Progress(props: ProgressProps) {
|
|
|
39
39
|
])
|
|
40
40
|
|
|
41
41
|
return (
|
|
42
|
-
<KobalteProgress
|
|
42
|
+
<KobalteProgress
|
|
43
|
+
data-slot="progress"
|
|
44
|
+
class={cn('flex w-full flex-col gap-1.5', local.class)}
|
|
45
|
+
{...rest}
|
|
46
|
+
>
|
|
43
47
|
<Show when={local.label || !local.hideValue}>
|
|
44
48
|
<div class="flex items-center justify-between gap-3">
|
|
45
49
|
<Show when={local.label}>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RadioGroup as KobalteRadioGroup } from '@kobalte/core/radio-group'
|
|
2
2
|
import { Circle } from 'lucide-solid'
|
|
3
|
-
import type { ComponentProps } from 'solid-js'
|
|
3
|
+
import type { ComponentProps, JSX } from 'solid-js'
|
|
4
4
|
import { splitProps } from 'solid-js'
|
|
5
5
|
import { useFormFieldControl } from '#lib/form-field'
|
|
6
6
|
import { cn } from '#lib/utils'
|
|
@@ -37,6 +37,7 @@ export function RadioGroup(props: ComponentProps<typeof KobalteRadioGroup>) {
|
|
|
37
37
|
})
|
|
38
38
|
return (
|
|
39
39
|
<KobalteRadioGroup
|
|
40
|
+
data-slot="radio-group"
|
|
40
41
|
id={field?.id ?? local.id}
|
|
41
42
|
aria-label={local['aria-label']}
|
|
42
43
|
aria-labelledby={field?.['aria-labelledby'] ?? local['aria-labelledby']}
|
|
@@ -58,14 +59,31 @@ export type RadioGroupItemProps = ComponentProps<typeof KobalteRadioGroup.Item>
|
|
|
58
59
|
*/
|
|
59
60
|
label?: string
|
|
60
61
|
description?: string
|
|
62
|
+
/**
|
|
63
|
+
* `card` draws the option as a bordered, selectable card — for a choice
|
|
64
|
+
* whose options need a sentence each (a source type, a sync budget), where a
|
|
65
|
+
* bare radio row reads as a form field rather than a decision. The whole card
|
|
66
|
+
* is the hit target, and the selected card takes the primary edge.
|
|
67
|
+
*/
|
|
68
|
+
variant?: 'default' | 'card'
|
|
69
|
+
/** A leading icon or `EntityIcon` between the radio and the text, for `card`. */
|
|
70
|
+
media?: JSX.Element
|
|
61
71
|
}
|
|
62
72
|
|
|
73
|
+
/**
|
|
74
|
+
* A card option's label stretches an invisible layer over the whole card, so a
|
|
75
|
+
* click anywhere on it — padding, media, description — selects the option
|
|
76
|
+
* through the label's native association with the radio input. Wrapping the
|
|
77
|
+
* card in a `<label>` would nest the item's own label inside another.
|
|
78
|
+
*/
|
|
63
79
|
export function RadioGroupItem(props: RadioGroupItemProps) {
|
|
64
80
|
const [local, rest] = splitProps(props, [
|
|
65
81
|
'class',
|
|
66
82
|
'controlClass',
|
|
67
83
|
'label',
|
|
68
84
|
'description',
|
|
85
|
+
'variant',
|
|
86
|
+
'media',
|
|
69
87
|
'children',
|
|
70
88
|
'aria-label',
|
|
71
89
|
'aria-labelledby',
|
|
@@ -74,11 +92,23 @@ export function RadioGroupItem(props: RadioGroupItemProps) {
|
|
|
74
92
|
'aria-busy',
|
|
75
93
|
'title',
|
|
76
94
|
])
|
|
95
|
+
const card = () => local.variant === 'card'
|
|
77
96
|
|
|
78
97
|
return (
|
|
79
98
|
<KobalteRadioGroup.Item
|
|
99
|
+
data-slot="radio-group-item"
|
|
100
|
+
data-variant={card() ? 'card' : undefined}
|
|
80
101
|
title={local.title}
|
|
81
|
-
class={cn(
|
|
102
|
+
class={cn(
|
|
103
|
+
'group/radio flex items-start gap-2.5',
|
|
104
|
+
{
|
|
105
|
+
'relative rounded-lg border border-border bg-card px-3 py-2.5 transition-[color,box-shadow,border-color,background-color] ease-out hover:bg-surface-hover data-[checked]:border-primary data-[disabled]:cursor-not-allowed data-[disabled]:hover:bg-card':
|
|
106
|
+
card(),
|
|
107
|
+
'has-[input:focus-visible]:border-ring has-[input:focus-visible]:ring-3 has-[input:focus-visible]:ring-primary-subtle':
|
|
108
|
+
card(),
|
|
109
|
+
},
|
|
110
|
+
local.class
|
|
111
|
+
)}
|
|
82
112
|
{...rest}
|
|
83
113
|
>
|
|
84
114
|
<KobalteRadioGroup.ItemInput
|
|
@@ -104,10 +134,17 @@ export function RadioGroupItem(props: RadioGroupItemProps) {
|
|
|
104
134
|
<Circle class="size-2 fill-current" />
|
|
105
135
|
</KobalteRadioGroup.ItemIndicator>
|
|
106
136
|
</KobalteRadioGroup.ItemControl>
|
|
137
|
+
{local.media ? (
|
|
138
|
+
<span data-slot="radio-group-item-media" class="flex shrink-0 items-center">
|
|
139
|
+
{local.media}
|
|
140
|
+
</span>
|
|
141
|
+
) : null}
|
|
107
142
|
{local.children ?? (
|
|
108
143
|
<div class="grid gap-0.5 leading-none">
|
|
109
144
|
{local.label ? (
|
|
110
|
-
<KobalteRadioGroup.ItemLabel
|
|
145
|
+
<KobalteRadioGroup.ItemLabel
|
|
146
|
+
class={cn('text-sm font-medium', card() && 'after:absolute after:inset-0')}
|
|
147
|
+
>
|
|
111
148
|
{local.label}
|
|
112
149
|
</KobalteRadioGroup.ItemLabel>
|
|
113
150
|
) : null}
|
|
@@ -46,6 +46,7 @@ export function SelectTrigger(props: SelectTriggerProps) {
|
|
|
46
46
|
|
|
47
47
|
return (
|
|
48
48
|
<KobalteSelect.Trigger
|
|
49
|
+
data-slot="select-trigger"
|
|
49
50
|
class={cn(
|
|
50
51
|
'border-input bg-transparent flex w-fit items-center justify-between gap-2 rounded-md border px-control-md',
|
|
51
52
|
'whitespace-nowrap transition-[color,box-shadow,border-color] ease-out outline-none',
|
|
@@ -60,6 +60,16 @@ const sheetVariants = cva(
|
|
|
60
60
|
edge: '',
|
|
61
61
|
inset: 'panel-dialog-inset w-lg rounded-xl border',
|
|
62
62
|
},
|
|
63
|
+
/**
|
|
64
|
+
* `panel` gives a start or end sheet the shell's panel width
|
|
65
|
+
* (`--panel-width`, 390px) — the width a pane that collapses into a sheet
|
|
66
|
+
* on a narrow window already had beside the work, so its content does not
|
|
67
|
+
* reflow when it moves. Top and bottom sheets span the window either way.
|
|
68
|
+
*/
|
|
69
|
+
size: {
|
|
70
|
+
default: '',
|
|
71
|
+
panel: '',
|
|
72
|
+
},
|
|
63
73
|
},
|
|
64
74
|
compoundVariants: [
|
|
65
75
|
{
|
|
@@ -82,8 +92,15 @@ const sheetVariants = cva(
|
|
|
82
92
|
variant: 'edge',
|
|
83
93
|
class: 'inset-y-0 end-0 h-full w-80 max-w-[85vw] rounded-s-xl border-s',
|
|
84
94
|
},
|
|
95
|
+
{
|
|
96
|
+
side: ['start', 'end'],
|
|
97
|
+
variant: 'edge',
|
|
98
|
+
size: 'panel',
|
|
99
|
+
class: 'w-panel max-w-[92vw]',
|
|
100
|
+
},
|
|
101
|
+
{ side: ['start', 'end'], variant: 'inset', size: 'panel', class: 'w-panel' },
|
|
85
102
|
],
|
|
86
|
-
defaultVariants: { side: 'end', variant: 'edge' },
|
|
103
|
+
defaultVariants: { side: 'end', variant: 'edge', size: 'default' },
|
|
87
104
|
}
|
|
88
105
|
)
|
|
89
106
|
|
|
@@ -107,6 +124,7 @@ export function SheetContent(props: SheetContentProps) {
|
|
|
107
124
|
'class',
|
|
108
125
|
'side',
|
|
109
126
|
'variant',
|
|
127
|
+
'size',
|
|
110
128
|
'children',
|
|
111
129
|
'closeButton',
|
|
112
130
|
'closeLabel',
|
|
@@ -134,7 +152,7 @@ export function SheetContent(props: SheetContentProps) {
|
|
|
134
152
|
<KobalteDialogContent
|
|
135
153
|
data-variant={variant()}
|
|
136
154
|
class={cn(
|
|
137
|
-
sheetVariants({ side: local.side, variant: variant() }),
|
|
155
|
+
sheetVariants({ side: local.side, variant: variant(), size: local.size }),
|
|
138
156
|
'data-expanded:animate-in data-expanded:fade-in-0 data-expanded:duration-200',
|
|
139
157
|
'data-closed:animate-out data-closed:fade-out-0 data-closed:duration-150',
|
|
140
158
|
local.class
|
|
@@ -42,6 +42,7 @@ export function Slider(props: SliderProps) {
|
|
|
42
42
|
|
|
43
43
|
return (
|
|
44
44
|
<KobalteSlider
|
|
45
|
+
data-slot="slider"
|
|
45
46
|
class={cn(
|
|
46
47
|
'relative flex touch-none flex-col justify-center select-none',
|
|
47
48
|
'data-[orientation=vertical]:h-full data-[orientation=vertical]:w-5 data-[orientation=horizontal]:w-full',
|
|
@@ -62,6 +62,7 @@ export function Tabs(props: ComponentProps<typeof KobalteTabs>) {
|
|
|
62
62
|
return (
|
|
63
63
|
<TabsIdContext.Provider value={tabs}>
|
|
64
64
|
<KobalteTabs
|
|
65
|
+
data-slot="tabs"
|
|
65
66
|
id={id()}
|
|
66
67
|
class={cn(
|
|
67
68
|
'flex min-h-0 min-w-0 flex-col gap-2 data-[orientation=vertical]:flex-row',
|
|
@@ -75,6 +76,18 @@ export function Tabs(props: ComponentProps<typeof KobalteTabs>) {
|
|
|
75
76
|
|
|
76
77
|
export type TabsListProps = ComponentProps<typeof KobalteTabs.List> & {
|
|
77
78
|
appearance?: 'underline' | 'segmented'
|
|
79
|
+
/**
|
|
80
|
+
* Span the container, with the triggers at the start. For a row of tabs that
|
|
81
|
+
* heads a pane: the underline's rule then runs the pane's full width, the
|
|
82
|
+
* way the pane's other header rules do, instead of stopping at the last tab.
|
|
83
|
+
*/
|
|
84
|
+
fill?: boolean
|
|
85
|
+
/**
|
|
86
|
+
* Scroll sideways when the triggers outgrow the row, with no visible
|
|
87
|
+
* scrollbar, instead of overflowing it. Implies `fill`. The underline's rule
|
|
88
|
+
* is drawn inside the scroller so the selected mark still sits on it.
|
|
89
|
+
*/
|
|
90
|
+
scrollable?: boolean
|
|
78
91
|
}
|
|
79
92
|
|
|
80
93
|
/**
|
|
@@ -82,17 +95,31 @@ export type TabsListProps = ComponentProps<typeof KobalteTabs.List> & {
|
|
|
82
95
|
* on. A vertical list has no baseline — its triggers stack — so the rule is
|
|
83
96
|
* dropped there; otherwise it draws as a stray line under the last trigger,
|
|
84
97
|
* spanning only the list's width (the SettingsLayout rail showed exactly that).
|
|
98
|
+
*
|
|
99
|
+
* A scrolling list cannot draw that rule as its border: a scroller clips at its
|
|
100
|
+
* padding edge, and the selected trigger's mark overlaps the border by a pixel
|
|
101
|
+
* (`-mb-px`), so the mark would be cut off and the list would scroll vertically
|
|
102
|
+
* by that pixel. It reserves the pixel as padding instead and paints the rule
|
|
103
|
+
* there with an inset shadow, which lands exactly where the border was.
|
|
85
104
|
*/
|
|
86
105
|
export function TabsList(props: TabsListProps) {
|
|
87
|
-
const [local, rest] = splitProps(props, ['class', 'appearance'])
|
|
106
|
+
const [local, rest] = splitProps(props, ['class', 'appearance', 'fill', 'scrollable'])
|
|
107
|
+
const underline = () => local.appearance !== 'segmented'
|
|
88
108
|
|
|
89
109
|
return (
|
|
90
110
|
<KobalteTabs.List
|
|
111
|
+
data-slot="tabs-list"
|
|
91
112
|
class={cn(
|
|
92
|
-
'
|
|
93
|
-
local.
|
|
113
|
+
'shrink-0 items-center',
|
|
114
|
+
local.fill || local.scrollable
|
|
115
|
+
? 'flex w-full justify-start'
|
|
116
|
+
: 'inline-flex w-fit justify-center',
|
|
117
|
+
local.scrollable && 'no-scrollbar overflow-x-auto overflow-y-hidden',
|
|
118
|
+
!underline()
|
|
94
119
|
? 'gap-0.5 rounded-lg bg-surface-hover p-0.5'
|
|
95
|
-
:
|
|
120
|
+
: local.scrollable
|
|
121
|
+
? 'gap-1 rounded-none pb-px shadow-[inset_0_-1px_0_var(--border)] data-[orientation=vertical]:pb-0 data-[orientation=vertical]:shadow-none'
|
|
122
|
+
: 'gap-1 rounded-none border-b border-border data-[orientation=vertical]:border-b-0',
|
|
96
123
|
'data-[orientation=vertical]:flex-col data-[orientation=vertical]:items-stretch',
|
|
97
124
|
local.class
|
|
98
125
|
)}
|
|
@@ -133,6 +160,7 @@ export function TabsTrigger(props: TabsTriggerProps) {
|
|
|
133
160
|
|
|
134
161
|
return (
|
|
135
162
|
<KobalteTabs.Trigger
|
|
163
|
+
data-slot="tabs-trigger"
|
|
136
164
|
id={triggerId()}
|
|
137
165
|
class={cn(
|
|
138
166
|
'inline-flex shrink-0 items-center justify-center gap-1.5 whitespace-nowrap text-sm font-medium',
|
|
@@ -158,6 +186,7 @@ export function TabsContent(props: ComponentProps<typeof KobalteTabs.Content>) {
|
|
|
158
186
|
const tabs = useTabsId()
|
|
159
187
|
return (
|
|
160
188
|
<KobalteTabs.Content
|
|
189
|
+
data-slot="tabs-content"
|
|
161
190
|
aria-labelledby={
|
|
162
191
|
local['aria-labelledby'] ??
|
|
163
192
|
tabs.triggerIds().get(rest.value) ??
|
|
@@ -38,6 +38,7 @@ export function ToggleGroup(props: ToggleGroupProps) {
|
|
|
38
38
|
|
|
39
39
|
return (
|
|
40
40
|
<KobalteToggleGroup
|
|
41
|
+
data-slot="toggle-group"
|
|
41
42
|
multiple={local.multiple ?? false}
|
|
42
43
|
class={cn(
|
|
43
44
|
'flex w-fit flex-row items-center',
|
|
@@ -68,6 +69,7 @@ export function ToggleGroupItem(props: ToggleGroupItemProps) {
|
|
|
68
69
|
|
|
69
70
|
return (
|
|
70
71
|
<KobalteToggleGroup.Item
|
|
72
|
+
data-slot="toggle-group-item"
|
|
71
73
|
class={cn(toggleVariants({ variant: local.variant, size: local.size }), local.class)}
|
|
72
74
|
onKeyDown={(event) => {
|
|
73
75
|
invokeEventHandler(local.onKeyDown, event)
|
|
@@ -130,6 +130,13 @@ export function Heading<T extends ValidComponent = 'h2'>(props: HeadingProps<T>)
|
|
|
130
130
|
* foreground without the caller restating it.
|
|
131
131
|
*
|
|
132
132
|
* Defaults: `body` renders a `p`, `code` a `code`, every other variant a `span`.
|
|
133
|
+
*
|
|
134
|
+
* `overline` is the small uppercase label above a group — a list group's
|
|
135
|
+
* heading, a settings navigation group, an eyebrow over a page title. It is the
|
|
136
|
+
* one variant whose tone defaults to `muted` rather than inheriting, because an
|
|
137
|
+
* overline in the body foreground competes with the heading it introduces. Pass
|
|
138
|
+
* `tone` to override. It labels a group; it is not a heading, so it renders a
|
|
139
|
+
* `span` and stays out of the document outline.
|
|
133
140
|
*/
|
|
134
141
|
export const textVariants = /* @__PURE__ */ cva('', {
|
|
135
142
|
variants: {
|
|
@@ -144,6 +151,8 @@ export const textVariants = /* @__PURE__ */ cva('', {
|
|
|
144
151
|
caption: 'text-xs',
|
|
145
152
|
/** 11px / 500. The floor: keyboard keys, the status bar. */
|
|
146
153
|
micro: 'text-2xs font-medium',
|
|
154
|
+
/** 11px / 500, uppercase and tracked. A group label or eyebrow; muted by default. */
|
|
155
|
+
overline: 'text-2xs font-medium tracking-wide uppercase',
|
|
147
156
|
/** 12px mono. Ids, paths, hashes, inline code. */
|
|
148
157
|
code: 'font-code text-code',
|
|
149
158
|
},
|
|
@@ -168,9 +177,15 @@ export const textElement = {
|
|
|
168
177
|
strong: 'span',
|
|
169
178
|
caption: 'span',
|
|
170
179
|
micro: 'span',
|
|
180
|
+
overline: 'span',
|
|
171
181
|
code: 'code',
|
|
172
182
|
} as const
|
|
173
183
|
|
|
184
|
+
/** The tone a variant takes when the caller names none: muted for `overline`, else inherit. */
|
|
185
|
+
export function textDefaultTone(variant: TextVariant | null | undefined) {
|
|
186
|
+
return variant === 'overline' ? 'muted' : undefined
|
|
187
|
+
}
|
|
188
|
+
|
|
174
189
|
type TextVariantProps = VariantProps<typeof textVariants>
|
|
175
190
|
type TextVariant = keyof typeof textElement
|
|
176
191
|
|
|
@@ -195,7 +210,11 @@ export function Text<T extends ValidComponent = 'p'>(props: TextProps<T>) {
|
|
|
195
210
|
as={local.as ?? textElement[(local.variant ?? 'body') as TextVariant]}
|
|
196
211
|
data-slot="text"
|
|
197
212
|
class={cn(
|
|
198
|
-
textVariants({
|
|
213
|
+
textVariants({
|
|
214
|
+
variant: local.variant,
|
|
215
|
+
tone: local.tone ?? textDefaultTone(local.variant),
|
|
216
|
+
numeric: local.numeric,
|
|
217
|
+
}),
|
|
199
218
|
local.class
|
|
200
219
|
)}
|
|
201
220
|
{...(rest as ComponentProps<'p'>)}
|
|
@@ -91,7 +91,7 @@ const nodeVlist = (() => {
|
|
|
91
91
|
for (let i = 0; i < A.length; i++) out[A[i]!] = V[i]!
|
|
92
92
|
return out
|
|
93
93
|
})()
|
|
94
|
-
const SETS = "container |break-after- all auto avoid avoid-page column left page right|break-before- all auto avoid avoid-page column left page right|break-inside-a uto void void-column void-page|box-decoration- clone slice|box- border content| contents flow-root hidden table table-caption table-cell table-column table-column-group table-footer-group table-header-group table-row table-row-group| not-sr-only sr-only|float- end left none right start|clear- both end left none right start|isolat e ion-auto|overflow- auto clip hidden scroll visible|overflow-x- auto clip hidden scroll visible|overflow-y- auto clip hidden scroll visible|overscroll- auto contain none|overscroll-x- auto contain none|overscroll-y- auto contain none| absolute fixed relative static sticky| collapse invisible visible|justify- around baseline between center center-safe end end-safe evenly normal start stretch|justify-items- center center-safe end end-safe normal start stretch|justify-self- auto center center-safe end end-safe start stretch|items- baseline baseline-last center center-safe end end-safe start stretch|self- auto baseline baseline-last center center-safe end end-safe start stretch|place-content- around baseline between center center-safe end end-safe evenly start stretch|place-items- baseline center center-safe end end-safe start stretch|place-self- auto center center-safe end end-safe start stretch| antialiased subpixel-antialiased| italic not-italic|normal-nums |ordinal |slashed-zero | lining-nums oldstyle-nums| proportional-nums tabular-nums| diagonal-fractions stacked-fractions| no-underline overline| capitalize lowercase normal-case uppercase|truncate |whitespace- break-spaces normal nowrap pre pre-line pre-wrap|break- all keep normal words|wrap- anywhere break-word normal|hyphens- auto manual none|mix-blend- color color-burn color-dodge darken difference exclusion hard-light hue lighten luminosity multiply normal overlay plus-darker plus-lighter saturation screen soft-light|table- auto fixed|caption- bottom top|backface- hidden visible|appearance- auto none|scheme- dark light light-dark normal only-dark only-light|field-sizing- content fixed|pointer-events- auto none|resize -none -x -y|snap- align-none center end start|snap- always normal|snap- both none x y|snap- mandatory proximity|touch- auto manipulation none|touch-pan- left right x|touch-pan- down up y|touch-pinch-zoom |select- all auto none text|forced-color-adjust- auto none| normal size| baseline bottom middle sub super text-bottom text-top top| bounce none ping pulse spin| auto square video| auto control-2xl control-2xs control-lg control-md control-sm control-xl control-xs fr max min px|none | auto control-2xl control-2xs control-lg control-md control-sm control-xl control-xs full px| fixed local scroll|clip- border content padding text|origin- border content padding| bottom bottom-left bottom-right center left left-bottom left-top right right-bottom right-top top top-left top-right| no-repeat repeat repeat-round repeat-space repeat-x repeat-y| auto contain cover| gradient-to-b gradient-to-bl gradient-to-br gradient-to-l gradient-to-r gradient-to-t gradient-to-tl gradient-to-tr none|blend- color color-burn color-dodge darken difference exclusion hard-light hue lighten luminosity multiply normal overlay saturation screen soft-light|to- b bl br l r t tl tr| auto control-2xl control-2xs control-lg control-md control-sm control-xl control-xs dvh fit full lh lvh max min px screen svh| dashed dotted double hidden none solid| collapse separate| control-2xl control-2xs control-lg control-md control-sm control-xl control-xs px|auto |full | content none strict| inline-size size|layout |paint |style | around baseline between center center-safe end end-safe evenly normal start stretch| alias all-scroll auto cell col-resize context-menu copy crosshair default e-resize ew-resize grab grabbing help move n-resize ne-resize nesw-resize no-drop none not-allowed ns-resize nw-resize nwse-resize pointer progress row-resize s-resize se-resize sw-resize text vertical-text w-resize wait zoom-in zoom-out| dashed dotted double solid wavy| auto from-font|reverse |initial | in in-out initial linear out| col col-reverse row row-reverse| nowrap wrap wrap-reverse| auto initial none| black bold extrabold extralight light medium normal semibold thin| condensed expanded extra-condensed extra-expanded normal semi-condensed semi-expanded ultra-condensed ultra-expanded|flow- col col-dense dense row row-dense| none subgrid| auto control-2xl control-2xs control-lg control-md control-sm control-xl control-xs dvh dvw fit full lh lvh lvw max min px rail-item row-lg row-md row-sm screen statusbar svh svw topbar| block flex grid table| auto control-2xl control-2xs control-lg control-md control-sm control-xl control-xs dvw fit full lvw max min px screen svw| control-2xl control-2xs control-lg control-md control-sm control-xl control-xs loose none normal px relaxed snug tight|through |item | inside outside| decimal disc none| auto control-2xl control-2xs control-lg control-md control-sm control-xl control-xs px| clip-border clip-content clip-fill clip-padding clip-stroke clip-view no-clip| add exclude intersect subtract| alpha luminance match|origin- border content fill padding stroke view|type- alpha luminance| circle ellipse| closest-corner closest-side farthest-corner farthest-side|at- bottom bottom-left bottom-right center left left-bottom left-top right right-bottom right-top top top-left top-right| control-2xl control-2xs control-lg control-md control-sm control-xl control-xs dvh fit full lh lvh max min none px screen svh| auto control-2xl control-2xs control-lg control-md control-sm control-xl control-xs dvh dvw fit full lh lvh lvw max min none px rail-item row-lg row-md row-sm screen statusbar svh svw topbar| control-2xl control-2xs control-lg control-md control-sm control-xl control-xs dvw fit full lvw max min none px screen svw| auto control-2xl control-2xs control-lg control-md control-sm control-xl control-xs dvh dvw fit full lvh lvw max min none prose px rail rail-expanded sidebar sidebar-compact svh svw| auto control-2xl control-2xs control-lg control-md control-sm control-xl control-xs dvh dvw fit full lvh lvw max min none px rail rail-expanded screen sidebar sidebar-compact svh svw| contain cover fill none scale-down| first last none| distant dramatic midrange near none normal|inset | full none|3d | auto smooth|gutter- auto both stable| auto none thin| inner none| auto control-2xl control-2xs control-lg control-md control-sm control-xl control-xs dvh dvw fit full lvh lvw max min px rail-item svh svw|base | center end justify left right start| clip ellipsis| balance nowrap pretty wrap| normal tight tighter wide wider widest| cpu gpu none| 3d flat| all colors none opacity shadow transform| discrete normal| control-2xl control-2xs control-lg control-md control-sm control-xl control-xs full px| auto control-2xl control-2xs control-lg control-md control-sm control-xl control-xs dvh dvw fit full lvh lvw max min px rail rail-expanded screen sidebar sidebar-compact svh svw| auto contents scroll transform".split('|').map((s) => {
|
|
94
|
+
const SETS = "container |break-after- all auto avoid avoid-page column left page right|break-before- all auto avoid avoid-page column left page right|break-inside-a uto void void-column void-page|box-decoration- clone slice|box- border content| contents flow-root hidden table table-caption table-cell table-column table-column-group table-footer-group table-header-group table-row table-row-group| not-sr-only sr-only|float- end left none right start|clear- both end left none right start|isolat e ion-auto|overflow- auto clip hidden scroll visible|overflow-x- auto clip hidden scroll visible|overflow-y- auto clip hidden scroll visible|overscroll- auto contain none|overscroll-x- auto contain none|overscroll-y- auto contain none| absolute fixed relative static sticky| collapse invisible visible|justify- around baseline between center center-safe end end-safe evenly normal start stretch|justify-items- center center-safe end end-safe normal start stretch|justify-self- auto center center-safe end end-safe start stretch|items- baseline baseline-last center center-safe end end-safe start stretch|self- auto baseline baseline-last center center-safe end end-safe start stretch|place-content- around baseline between center center-safe end end-safe evenly start stretch|place-items- baseline center center-safe end end-safe start stretch|place-self- auto center center-safe end end-safe start stretch| antialiased subpixel-antialiased| italic not-italic|normal-nums |ordinal |slashed-zero | lining-nums oldstyle-nums| proportional-nums tabular-nums| diagonal-fractions stacked-fractions| no-underline overline| capitalize lowercase normal-case uppercase|truncate |whitespace- break-spaces normal nowrap pre pre-line pre-wrap|break- all keep normal words|wrap- anywhere break-word normal|hyphens- auto manual none|mix-blend- color color-burn color-dodge darken difference exclusion hard-light hue lighten luminosity multiply normal overlay plus-darker plus-lighter saturation screen soft-light|table- auto fixed|caption- bottom top|backface- hidden visible|appearance- auto none|scheme- dark light light-dark normal only-dark only-light|field-sizing- content fixed|pointer-events- auto none|resize -none -x -y|snap- align-none center end start|snap- always normal|snap- both none x y|snap- mandatory proximity|touch- auto manipulation none|touch-pan- left right x|touch-pan- down up y|touch-pinch-zoom |select- all auto none text|forced-color-adjust- auto none| normal size| baseline bottom middle sub super text-bottom text-top top| bounce none ping pulse spin| auto square video| auto control-2xl control-2xs control-lg control-md control-sm control-xl control-xs fr max min px|none | auto control-2xl control-2xs control-lg control-md control-sm control-xl control-xs full px| fixed local scroll|clip- border content padding text|origin- border content padding| bottom bottom-left bottom-right center left left-bottom left-top right right-bottom right-top top top-left top-right| no-repeat repeat repeat-round repeat-space repeat-x repeat-y| auto contain cover| gradient-to-b gradient-to-bl gradient-to-br gradient-to-l gradient-to-r gradient-to-t gradient-to-tl gradient-to-tr none|blend- color color-burn color-dodge darken difference exclusion hard-light hue lighten luminosity multiply normal overlay saturation screen soft-light|to- b bl br l r t tl tr| auto control-2xl control-2xs control-lg control-md control-sm control-xl control-xs dvh fit full lh lvh max min px screen svh| dashed dotted double hidden none solid| collapse separate| control-2xl control-2xs control-lg control-md control-sm control-xl control-xs px|auto |full | content none strict| inline-size size|layout |paint |style | around baseline between center center-safe end end-safe evenly normal start stretch| alias all-scroll auto cell col-resize context-menu copy crosshair default e-resize ew-resize grab grabbing help move n-resize ne-resize nesw-resize no-drop none not-allowed ns-resize nw-resize nwse-resize pointer progress row-resize s-resize se-resize sw-resize text vertical-text w-resize wait zoom-in zoom-out| dashed dotted double solid wavy| auto from-font|reverse |initial | in in-out initial linear out| col col-reverse row row-reverse| nowrap wrap wrap-reverse| auto initial none| black bold extrabold extralight light medium normal semibold thin| condensed expanded extra-condensed extra-expanded normal semi-condensed semi-expanded ultra-condensed ultra-expanded|flow- col col-dense dense row row-dense| none subgrid| auto control-2xl control-2xs control-lg control-md control-sm control-xl control-xs dvh dvw fit full lh lvh lvw max min px rail-item row-lg row-md row-sm screen statusbar svh svw topbar| block flex grid table| auto control-2xl control-2xs control-lg control-md control-sm control-xl control-xs dvw fit full lvw max min px screen svw| control-2xl control-2xs control-lg control-md control-sm control-xl control-xs loose none normal px relaxed snug tight|through |item | inside outside| decimal disc none| auto control-2xl control-2xs control-lg control-md control-sm control-xl control-xs px| clip-border clip-content clip-fill clip-padding clip-stroke clip-view no-clip| add exclude intersect subtract| alpha luminance match|origin- border content fill padding stroke view|type- alpha luminance| circle ellipse| closest-corner closest-side farthest-corner farthest-side|at- bottom bottom-left bottom-right center left left-bottom left-top right right-bottom right-top top top-left top-right| control-2xl control-2xs control-lg control-md control-sm control-xl control-xs dvh fit full lh lvh max min none px screen svh| auto control-2xl control-2xs control-lg control-md control-sm control-xl control-xs dvh dvw fit full lh lvh lvw max min none px rail-item row-lg row-md row-sm screen statusbar svh svw topbar| control-2xl control-2xs control-lg control-md control-sm control-xl control-xs dvw fit full lvw max min none px screen svw| auto control-2xl control-2xs control-lg control-md control-sm control-xl control-xs dvh dvw fit full lvh lvw max min none panel prose px rail rail-expanded sidebar sidebar-compact svh svw| auto control-2xl control-2xs control-lg control-md control-sm control-xl control-xs dvh dvw fit full lvh lvw max min none panel px rail rail-expanded screen sidebar sidebar-compact svh svw| contain cover fill none scale-down| first last none| distant dramatic midrange near none normal|inset | full none|3d | auto smooth|gutter- auto both stable| auto none thin| inner none| auto control-2xl control-2xs control-lg control-md control-sm control-xl control-xs dvh dvw fit full lvh lvw max min px rail-item svh svw|base | center end justify left right start| clip ellipsis| balance nowrap pretty wrap| normal tight tighter wide wider widest| cpu gpu none| 3d flat| all colors none opacity shadow transform| discrete normal| control-2xl control-2xs control-lg control-md control-sm control-xl control-xs full px| auto control-2xl control-2xs control-lg control-md control-sm control-xl control-xs dvh dvw fit full lvh lvw max min panel px rail rail-expanded screen sidebar sidebar-compact svh svw| auto contents scroll transform".split('|').map((s) => {
|
|
95
95
|
const tails = s.split(' ')
|
|
96
96
|
const prefix = tails.shift()!
|
|
97
97
|
for (let i = 0; i < tails.length; i++) {
|
|
@@ -102,11 +102,11 @@ const SETS = "container |break-after- all auto avoid avoid-page column left page
|
|
|
102
102
|
const AA = DZ("0000000000000000000000000000000000000000000000000000000000000262242:6@200000006:240B428:4422400002046044222426220026642642462026224222824220022400000000\\00N222422242222222224062242222222422226264222422222222222222442804222422222222222222222222220<4<0204260002444020204224422")
|
|
103
103
|
const AG = DZ("ɠ222222222222222222222222222222222222222222222222222222222222˕4222226>ʶ22ʷʺʷ2ʸʷ42ʴ2ʓ22>621422ɶ222ɹɼɷɺɷɺ22ɱ42222ɨ2ɧ26622ɘɓ244ƸƵ222]d24242ǖǓƚÄȫ2263ȨȥȨ2222222ǣ222222222222222222ǂƽ2ƾƵ2222222422222ƜƑ22222222222222222222144Ŧţ22Ţş222222222222222222222ĸ2ı68ĦģĦɡŰ4Ġ«®ĝ822ĔđĔ2ē2222622")
|
|
104
104
|
const AS = DZ("02222222222222222222222222222222222222222222222222222222222222222202022222222222EH2200IL021042222Y\\222IL0cf2e10j2222U00X202[^2y0000120|{~22
:22|22222222222G000qOVI00000}2>40000B00000I¨©000¬00000000000000021M®00°000000000000000000000222HGHa1º222¿2À2222ÉÌ000°2±")
|
|
105
|
-
const litAnchor = new Int32Array(
|
|
106
|
-
const litGroup = new Int32Array(
|
|
107
|
-
const litPool = new Int32Array(
|
|
105
|
+
const litAnchor = new Int32Array(1638)
|
|
106
|
+
const litGroup = new Int32Array(1638)
|
|
107
|
+
const litPool = new Int32Array(1638)
|
|
108
108
|
let poolText = ''
|
|
109
|
-
const poolOffsets = new Int32Array(
|
|
109
|
+
const poolOffsets = new Int32Array(1074)
|
|
110
110
|
{
|
|
111
111
|
const tailRef = new Map()
|
|
112
112
|
let nextRef = 0
|
package/src/lib/tokens.ts
CHANGED
|
@@ -379,11 +379,11 @@ export const radiusTokens: TokenDefinition[] = [
|
|
|
379
379
|
description:
|
|
380
380
|
'10px — cards and panels. Also the knob: move this one value to re-round the whole system.',
|
|
381
381
|
},
|
|
382
|
-
{ name: 'radius-sm', kind: 'dimension', description: '6px —
|
|
382
|
+
{ name: 'radius-sm', kind: 'dimension', description: '6px — keyboard keys, menu items.' },
|
|
383
383
|
{
|
|
384
384
|
name: 'radius-md',
|
|
385
385
|
kind: 'dimension',
|
|
386
|
-
description: '8px — every control: buttons, inputs, selects.',
|
|
386
|
+
description: '8px — every control: buttons, inputs, selects; and badges.',
|
|
387
387
|
},
|
|
388
388
|
{ name: 'radius-xl', kind: 'dimension', description: '14px — dialogs, menus, sheets.' },
|
|
389
389
|
{ name: 'radius-2xl', kind: 'dimension', description: '18px — full-window surfaces and media.' },
|
|
@@ -597,6 +597,11 @@ export const densityTokens: TokenDefinition[] = [
|
|
|
597
597
|
kind: 'dimension',
|
|
598
598
|
description: '48px — the collapsed secondary column.',
|
|
599
599
|
},
|
|
600
|
+
{
|
|
601
|
+
name: 'panel-width',
|
|
602
|
+
kind: 'dimension',
|
|
603
|
+
description: '390px — a side pane beside the work, and the same pane as a sheet.',
|
|
604
|
+
},
|
|
600
605
|
{ name: 'topbar-height', kind: 'dimension', description: '48px — the window title row.' },
|
|
601
606
|
{ name: 'statusbar-height', kind: 'dimension', description: '28px — the bottom readout strip.' },
|
|
602
607
|
{
|