@wirecore/wirelayer-recipes 0.10.0 → 0.12.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/avatar.js +5 -5
- package/dist/avatar.js.map +1 -1
- package/dist/collections.js +2 -2
- package/dist/collections.js.map +1 -1
- package/dist/controls.js +1 -1
- package/dist/controls.js.map +1 -1
- package/dist/data.d.ts +150 -3
- package/dist/data.d.ts.map +1 -1
- package/dist/data.js +43 -2
- package/dist/data.js.map +1 -1
- package/dist/hierarchy.d.ts.map +1 -1
- package/dist/hierarchy.js +22 -10
- package/dist/hierarchy.js.map +1 -1
- package/dist/i18n.d.ts +1 -0
- package/dist/i18n.d.ts.map +1 -1
- package/dist/i18n.js +2 -0
- package/dist/i18n.js.map +1 -1
- package/dist/inputs.js +4 -4
- package/dist/inputs.js.map +1 -1
- package/dist/locales/ar.d.ts.map +1 -1
- package/dist/locales/ar.js +1 -0
- package/dist/locales/ar.js.map +1 -1
- package/dist/locales/cs.d.ts.map +1 -1
- package/dist/locales/cs.js +1 -0
- package/dist/locales/cs.js.map +1 -1
- package/dist/locales/de.d.ts +1 -0
- package/dist/locales/de.d.ts.map +1 -1
- package/dist/locales/de.js +1 -0
- package/dist/locales/de.js.map +1 -1
- package/dist/locales/es.d.ts.map +1 -1
- package/dist/locales/es.js +1 -0
- package/dist/locales/es.js.map +1 -1
- package/dist/locales/fr.d.ts.map +1 -1
- package/dist/locales/fr.js +1 -0
- package/dist/locales/fr.js.map +1 -1
- package/dist/locales/hu.d.ts.map +1 -1
- package/dist/locales/hu.js +1 -0
- package/dist/locales/hu.js.map +1 -1
- package/dist/locales/it.d.ts.map +1 -1
- package/dist/locales/it.js +1 -0
- package/dist/locales/it.js.map +1 -1
- package/dist/locales/lv.d.ts.map +1 -1
- package/dist/locales/lv.js +1 -0
- package/dist/locales/lv.js.map +1 -1
- package/dist/locales/nl.d.ts.map +1 -1
- package/dist/locales/nl.js +1 -0
- package/dist/locales/nl.js.map +1 -1
- package/dist/locales/pl.d.ts.map +1 -1
- package/dist/locales/pl.js +1 -0
- package/dist/locales/pl.js.map +1 -1
- package/dist/locales/pt.d.ts.map +1 -1
- package/dist/locales/pt.js +1 -0
- package/dist/locales/pt.js.map +1 -1
- package/dist/locales/tr.d.ts.map +1 -1
- package/dist/locales/tr.js +1 -0
- package/dist/locales/tr.js.map +1 -1
- package/dist/media.js +2 -2
- package/dist/native/display.js +5 -5
- package/dist/native/display.js.map +1 -1
- package/dist/native/form.d.ts +7 -7
- package/dist/native/form.d.ts.map +1 -1
- package/dist/native/form.js +20 -8
- package/dist/native/form.js.map +1 -1
- package/dist/native/inputs.js +1 -1
- package/dist/native/inputs.js.map +1 -1
- package/dist/native/overlay.js +2 -2
- package/dist/native/overlay.js.map +1 -1
- package/dist/native/overlays.d.ts +6 -0
- package/dist/native/overlays.d.ts.map +1 -1
- package/dist/native/overlays.js +2 -0
- package/dist/native/overlays.js.map +1 -1
- package/dist/native/picker.d.ts +12 -0
- package/dist/native/picker.d.ts.map +1 -1
- package/dist/native/picker.js +13 -3
- package/dist/native/picker.js.map +1 -1
- package/dist/native/tv.d.ts.map +1 -1
- package/dist/native/tv.js +2 -0
- package/dist/native/tv.js.map +1 -1
- package/dist/native/widgets.js +4 -4
- package/dist/native/widgets.js.map +1 -1
- package/dist/overlay.d.ts +30 -0
- package/dist/overlay.d.ts.map +1 -1
- package/dist/overlay.js +10 -2
- package/dist/overlay.js.map +1 -1
- package/dist/patterns.js +1 -1
- package/dist/patterns.js.map +1 -1
- package/dist/selection.js +1 -1
- package/dist/selection.js.map +1 -1
- package/dist/sources/avatar.css +1 -1
- package/dist/sources/cascadeSelect.css +1 -1
- package/dist/sources/checkbox.css +1 -1
- package/dist/sources/dataTable.css +1 -1
- package/dist/sources/dialog.css +1 -1
- package/dist/sources/gallery.css +1 -1
- package/dist/sources/listbox.css +1 -1
- package/dist/sources/multiSelect.css +1 -1
- package/dist/sources/orderList.css +1 -1
- package/dist/sources/pickList.css +1 -1
- package/dist/sources/selectionCard.css +1 -1
- package/dist/sources/timeGrid.css +1 -1
- package/dist/sources/tree.css +1 -1
- package/dist/sources/treeSelect.css +1 -1
- package/dist/tv.js +2 -2
- package/dist/tv.js.map +1 -1
- package/package.json +1 -1
- package/src/avatar.ts +5 -5
- package/src/collections.ts +2 -2
- package/src/controls.ts +1 -1
- package/src/data.ts +43 -2
- package/src/hierarchy.ts +22 -10
- package/src/i18n.ts +2 -0
- package/src/inputs.ts +4 -4
- package/src/locales/ar.ts +1 -0
- package/src/locales/cs.ts +1 -0
- package/src/locales/de.ts +1 -0
- package/src/locales/es.ts +1 -0
- package/src/locales/fr.ts +1 -0
- package/src/locales/hu.ts +1 -0
- package/src/locales/it.ts +1 -0
- package/src/locales/lv.ts +1 -0
- package/src/locales/nl.ts +1 -0
- package/src/locales/pl.ts +1 -0
- package/src/locales/pt.ts +1 -0
- package/src/locales/tr.ts +1 -0
- package/src/media.ts +2 -2
- package/src/native/display.ts +5 -5
- package/src/native/form.ts +21 -8
- package/src/native/inputs.ts +1 -1
- package/src/native/overlay.ts +2 -2
- package/src/native/overlays.ts +2 -0
- package/src/native/picker.ts +13 -3
- package/src/native/tv.ts +2 -0
- package/src/native/widgets.ts +4 -4
- package/src/overlay.ts +10 -2
- package/src/patterns.ts +1 -1
- package/src/selection.ts +1 -1
- package/src/tv.ts +2 -2
package/dist/tv.js
CHANGED
|
@@ -2,8 +2,8 @@ import { createTV } from 'tailwind-variants';
|
|
|
2
2
|
/** tailwind-merge knows the custom WireLayer utilities (also used by the @wirecore/wirelayer-css generator). */
|
|
3
3
|
export const twMergeConfig = {
|
|
4
4
|
extend: {
|
|
5
|
-
// rounded-popup, -card and -
|
|
6
|
-
theme: { radius: ['popup', 'card', 'panel'] },
|
|
5
|
+
// rounded-popup, -card, -panel and -dialog are radii, so `classes` like rounded-none (or a Card's size) replace them
|
|
6
|
+
theme: { radius: ['popup', 'card', 'panel', 'dialog'] },
|
|
7
7
|
classGroups: {
|
|
8
8
|
'bg-image': ['bg-glow'],
|
|
9
9
|
'text-gradient': ['text-gradient'],
|
package/dist/tv.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tv.js","sourceRoot":"","sources":["../src/tv.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,gHAAgH;AAChH,MAAM,CAAC,MAAM,aAAa,GAAG;IACzB,MAAM,EAAE;QACJ,
|
|
1
|
+
{"version":3,"file":"tv.js","sourceRoot":"","sources":["../src/tv.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,gHAAgH;AAChH,MAAM,CAAC,MAAM,aAAa,GAAG;IACzB,MAAM,EAAE;QACJ,qHAAqH;QACrH,KAAK,EAAE,EAAE,MAAM,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,CAAC,EAAE;QACvD,WAAW,EAAE;YACT,UAAU,EAAE,CAAC,SAAS,CAAC;YACvB,eAAe,EAAE,CAAC,eAAe,CAAC;YAClC,YAAY,EAAE,CAAC,YAAY,CAAC;SAC/B;KACJ;CACJ,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,EAAE,GAAG,QAAQ,CAAC,EAAE,aAAa,EAAE,CAAC,CAAC;AAE9C;;;GAGG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG;IACrB,kGAAkG;IAClG,+BAA+B;IAC/B,iFAAiF;IACjF,uEAAuE;IACvE,0DAA0D;CAC7D,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;IACvB,MAAM;IACN,8FAA8F;IAC9F,6IAA6I;CAChJ,CAAC;AAEF,0GAA0G;AAC1G,MAAM,CAAC,MAAM,SAAS,GAClB,gGAAgG,CAAC"}
|
package/package.json
CHANGED
package/src/avatar.ts
CHANGED
|
@@ -78,11 +78,11 @@ export const avatar = tv({
|
|
|
78
78
|
},
|
|
79
79
|
},
|
|
80
80
|
compoundVariants: [
|
|
81
|
-
{ shape: 'square', size: 'sm', class: { base: 'rounded-
|
|
82
|
-
{ shape: 'square', size: 'md', class: { base: 'rounded-[10px]' } },
|
|
83
|
-
{ shape: 'square', size: 'lg', class: { base: 'rounded-
|
|
84
|
-
{ shape: 'square', size: 'xl', class: { base: 'rounded-
|
|
85
|
-
{ shape: 'square', size: '2xl', class: { base: 'rounded-
|
|
81
|
+
{ shape: 'square', size: 'sm', class: { base: 'rounded-[var(--wc-avatar-radius,0.5rem)]' } },
|
|
82
|
+
{ shape: 'square', size: 'md', class: { base: 'rounded-[var(--wc-avatar-radius,10px)]' } },
|
|
83
|
+
{ shape: 'square', size: 'lg', class: { base: 'rounded-[var(--wc-avatar-radius,0.75rem)]' } },
|
|
84
|
+
{ shape: 'square', size: 'xl', class: { base: 'rounded-[var(--wc-avatar-radius,1rem)]' } },
|
|
85
|
+
{ shape: 'square', size: '2xl', class: { base: 'rounded-[var(--wc-avatar-radius,1.5rem)]' } },
|
|
86
86
|
{ grouped: true, variant: 'soft', class: { base: 'bg-bg-2 shadow-[inset_0_0_0_1px_var(--color-line-2)]' } },
|
|
87
87
|
// Hover like IconButton: outline darkens its border, soft (bg-line) the background like `secondary`, solid
|
|
88
88
|
// fades like the filled variants
|
package/src/collections.ts
CHANGED
|
@@ -42,7 +42,7 @@ export const orderList = tv({
|
|
|
42
42
|
status: 'sr-only',
|
|
43
43
|
/** The list while an item is dragged over it */
|
|
44
44
|
dropZone:
|
|
45
|
-
'rounded-[10px] data-drop:outline-2 data-drop:outline-offset-2 data-drop:outline-dashed data-drop:outline-primary',
|
|
45
|
+
'rounded-[var(--wc-control-radius-lg,10px)] data-drop:outline-2 data-drop:outline-offset-2 data-drop:outline-dashed data-drop:outline-primary',
|
|
46
46
|
},
|
|
47
47
|
});
|
|
48
48
|
|
|
@@ -54,7 +54,7 @@ export const pickList = tv({
|
|
|
54
54
|
status: 'sr-only',
|
|
55
55
|
/** A list while items are dragged over it */
|
|
56
56
|
dropZone:
|
|
57
|
-
'min-w-0 rounded-[10px] data-drop:outline-2 data-drop:outline-offset-2 data-drop:outline-dashed data-drop:outline-primary',
|
|
57
|
+
'min-w-0 rounded-[var(--wc-control-radius-lg,10px)] data-drop:outline-2 data-drop:outline-offset-2 data-drop:outline-dashed data-drop:outline-primary',
|
|
58
58
|
},
|
|
59
59
|
});
|
|
60
60
|
|
package/src/controls.ts
CHANGED
|
@@ -25,7 +25,7 @@ export const listbox = tv({
|
|
|
25
25
|
],
|
|
26
26
|
/** Check box before the label (`checkboxes`) */
|
|
27
27
|
check: [
|
|
28
|
-
'flex size-4 shrink-0 items-center justify-center rounded-[4px] border border-line-strong text-on-primary',
|
|
28
|
+
'flex size-4 shrink-0 items-center justify-center rounded-[var(--wc-checkbox-radius,4px)] border border-line-strong text-on-primary',
|
|
29
29
|
'data-[state=checked]:border-primary data-[state=checked]:bg-primary',
|
|
30
30
|
'data-[state=indeterminate]:border-primary data-[state=indeterminate]:bg-primary',
|
|
31
31
|
'forced-colors:data-[state=checked]:forced-color-adjust-none forced-colors:data-[state=checked]:bg-[Highlight] forced-colors:data-[state=checked]:text-[HighlightText]',
|
package/src/data.ts
CHANGED
|
@@ -235,9 +235,43 @@ export const dataTable = tv({
|
|
|
235
235
|
paginatorCenter: { footer: 'justify-center' },
|
|
236
236
|
paginatorEnd: { footer: 'justify-end' },
|
|
237
237
|
},
|
|
238
|
-
/**
|
|
238
|
+
/**
|
|
239
|
+
* Resize handle of the last column at the end of the table (passed to the `resizer` part): inside the column
|
|
240
|
+
* instead of half over the edge – no overflow, no line after the last column (hover and focus still show it)
|
|
241
|
+
*/
|
|
242
|
+
edge: {
|
|
243
|
+
true: { resizer: 'inset-e-0 after:bg-transparent' },
|
|
244
|
+
},
|
|
245
|
+
/**
|
|
246
|
+
* Filter row or filter menus shown at the start (`showFilters`, with `filterToggle`) – no classes of its own:
|
|
247
|
+
* a variant so `defaultVariants: { showFilters: false }` starts every table of the app with closed filters
|
|
248
|
+
*/
|
|
249
|
+
showFilters: {
|
|
250
|
+
true: {},
|
|
251
|
+
false: {},
|
|
252
|
+
},
|
|
253
|
+
/**
|
|
254
|
+
* Every column with a value can be sorted (`sortable` on the table) – no classes of its own: a variant so
|
|
255
|
+
* `defaultVariants: { sortable: true }` makes the columns of every table of the app sortable
|
|
256
|
+
*/
|
|
257
|
+
sortable: {
|
|
258
|
+
true: {},
|
|
259
|
+
false: {},
|
|
260
|
+
},
|
|
261
|
+
/**
|
|
262
|
+
* `searchAlign: 'center'` (only with `search`): the search in the middle between the controls at the start and
|
|
263
|
+
* the end of the toolbar – the end group stays at the end
|
|
264
|
+
*/
|
|
265
|
+
searchCentered: {
|
|
266
|
+
true: { search: 'mx-auto', toolbarEnd: 'ms-0' },
|
|
267
|
+
},
|
|
268
|
+
/**
|
|
269
|
+
* Every other row tinted. The components mark each data row with `data-stripe="true|false"` by its place among
|
|
270
|
+
* the data rows of the page (also with virtual scrolling, group and detail rows not counted); rows without the
|
|
271
|
+
* attribute (plain HTML) follow their position (`:nth-child(even)`). Hover and selection win.
|
|
272
|
+
*/
|
|
239
273
|
striped: {
|
|
240
|
-
true: { row: 'even:bg-bg-2/60' },
|
|
274
|
+
true: { row: '[&:where(:nth-child(even):not([data-stripe]),[data-stripe=true])]:bg-bg-2/60' },
|
|
241
275
|
},
|
|
242
276
|
/** Fixed height (`scrollHeight`): the table scrolls inside, header and footer stay visible */
|
|
243
277
|
scrollable: {
|
|
@@ -249,6 +283,13 @@ export const dataTable = tv({
|
|
|
249
283
|
filterCell: 'bg-card',
|
|
250
284
|
},
|
|
251
285
|
},
|
|
286
|
+
/**
|
|
287
|
+
* `scrollHeight="fill"`: the table is a flex item that takes the rest of its column, the rows scroll in the
|
|
288
|
+
* room left between toolbar and footer (contain: size – the rows do not stretch the page)
|
|
289
|
+
*/
|
|
290
|
+
fill: {
|
|
291
|
+
true: { base: 'min-h-0 flex-1', scroll: 'min-h-0 flex-1 [contain:size]' },
|
|
292
|
+
},
|
|
252
293
|
/** Keyboard navigation as a grid (`navigation="grid"`): the focused cell gets the focus ring */
|
|
253
294
|
grid: {
|
|
254
295
|
true: {
|
package/src/hierarchy.ts
CHANGED
|
@@ -7,7 +7,7 @@ const focusRing = 'focus-visible:outline-2 focus-visible:-outline-offset-2 focus
|
|
|
7
7
|
|
|
8
8
|
/** Select-like trigger shared by TreeSelect and CascadeSelect */
|
|
9
9
|
const trigger = [
|
|
10
|
-
'flex h-10 w-full cursor-pointer items-center justify-between gap-2.5 rounded-
|
|
10
|
+
'flex h-10 w-full cursor-pointer items-center justify-between gap-2.5 rounded-[var(--wc-control-radius-md,0.5rem)] border border-line-strong bg-bg pe-2.5 ps-3 text-start text-[15px] text-fg',
|
|
11
11
|
'outline-none transition-colors motion-reduce:transition-none focus-visible:border-primary data-[state=open]:border-primary',
|
|
12
12
|
'data-invalid:border-danger data-disabled:cursor-not-allowed data-disabled:border-line data-disabled:bg-bg-2 data-disabled:text-muted',
|
|
13
13
|
];
|
|
@@ -36,7 +36,7 @@ export const tree = tv({
|
|
|
36
36
|
icon: 'size-4 shrink-0 text-muted',
|
|
37
37
|
text: 'min-w-0 flex-1 truncate',
|
|
38
38
|
checkbox: [
|
|
39
|
-
'flex size-4 shrink-0 items-center justify-center rounded-[4px] border border-line-strong text-on-primary',
|
|
39
|
+
'flex size-4 shrink-0 items-center justify-center rounded-[var(--wc-checkbox-radius,4px)] border border-line-strong text-on-primary',
|
|
40
40
|
'data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=indeterminate]:border-primary data-[state=indeterminate]:bg-primary',
|
|
41
41
|
],
|
|
42
42
|
checkboxIcon: 'size-3 stroke-3',
|
|
@@ -184,7 +184,7 @@ export function treeDropMove<T extends TreeLike>(
|
|
|
184
184
|
/** Chips inside a select field (TreeSelect with several values) – like MultiSelect `display: 'chips'` */
|
|
185
185
|
const chipParts = {
|
|
186
186
|
chipsControl: [
|
|
187
|
-
'relative flex min-h-10 w-full flex-wrap items-center gap-1 rounded-
|
|
187
|
+
'relative flex min-h-10 w-full flex-wrap items-center gap-1 rounded-[var(--wc-control-radius-md,0.5rem)] border border-line-strong bg-bg py-[5px] pe-2.5 ps-1.5 text-fg',
|
|
188
188
|
'transition-colors motion-reduce:transition-none focus-within:border-primary data-[state=open]:border-primary',
|
|
189
189
|
'data-invalid:border-danger data-disabled:cursor-not-allowed data-disabled:border-line data-disabled:bg-bg-2 data-disabled:text-muted',
|
|
190
190
|
],
|
|
@@ -209,8 +209,8 @@ const chipParts = {
|
|
|
209
209
|
};
|
|
210
210
|
|
|
211
211
|
const fieldSizes = {
|
|
212
|
-
sm: { trigger: 'h-8 rounded-
|
|
213
|
-
lg: { trigger: 'h-12 rounded-[10px] ps-4 pe-3 text-base' },
|
|
212
|
+
sm: { trigger: 'h-8 rounded-[var(--wc-control-radius-sm,0.375rem)] ps-2.5 pe-2 text-[13px]' },
|
|
213
|
+
lg: { trigger: 'h-12 rounded-[var(--wc-control-radius-lg,10px)] ps-4 pe-3 text-base' },
|
|
214
214
|
};
|
|
215
215
|
|
|
216
216
|
/** The items without the node with this id (a copy) – the source side of a `transfer` between trees */
|
|
@@ -297,9 +297,17 @@ export const treeSelect = tv({
|
|
|
297
297
|
},
|
|
298
298
|
variants: {
|
|
299
299
|
size: {
|
|
300
|
-
sm: {
|
|
300
|
+
sm: {
|
|
301
|
+
...fieldSizes.sm,
|
|
302
|
+
chipsControl: 'min-h-8 rounded-[var(--wc-control-radius-sm,0.375rem)] py-0.5',
|
|
303
|
+
chipsTrigger: 'text-[13px]',
|
|
304
|
+
},
|
|
301
305
|
md: {},
|
|
302
|
-
lg: {
|
|
306
|
+
lg: {
|
|
307
|
+
...fieldSizes.lg,
|
|
308
|
+
chipsControl: 'min-h-12 rounded-[var(--wc-control-radius-lg,10px)] py-[9px]',
|
|
309
|
+
chipsTrigger: 'text-base',
|
|
310
|
+
},
|
|
303
311
|
},
|
|
304
312
|
// Room for the clear button between value and arrow
|
|
305
313
|
clearable: {
|
|
@@ -332,7 +340,7 @@ export const cascadeSelect = tv({
|
|
|
332
340
|
...selectFieldParts,
|
|
333
341
|
/** Search field (filter): the field itself, the levels button at its end */
|
|
334
342
|
searchControl: [
|
|
335
|
-
'flex h-10 w-full items-center gap-1 rounded-
|
|
343
|
+
'flex h-10 w-full items-center gap-1 rounded-[var(--wc-control-radius-md,0.5rem)] border border-line-strong bg-bg pe-1 ps-3 text-[15px] text-fg',
|
|
336
344
|
'transition-colors motion-reduce:transition-none focus-within:border-primary',
|
|
337
345
|
'data-invalid:border-danger data-disabled:cursor-not-allowed data-disabled:border-line data-disabled:bg-bg-2 data-disabled:text-muted',
|
|
338
346
|
],
|
|
@@ -354,9 +362,13 @@ export const cascadeSelect = tv({
|
|
|
354
362
|
},
|
|
355
363
|
variants: {
|
|
356
364
|
size: {
|
|
357
|
-
sm: {
|
|
365
|
+
sm: {
|
|
366
|
+
...fieldSizes.sm,
|
|
367
|
+
searchControl: 'h-8 rounded-[var(--wc-control-radius-sm,0.375rem)] ps-2.5 text-[13px]',
|
|
368
|
+
levelsTrigger: 'size-6',
|
|
369
|
+
},
|
|
358
370
|
md: {},
|
|
359
|
-
lg: { ...fieldSizes.lg, searchControl: 'h-12 rounded-[10px] ps-4 text-base' },
|
|
371
|
+
lg: { ...fieldSizes.lg, searchControl: 'h-12 rounded-[var(--wc-control-radius-lg,10px)] ps-4 text-base' },
|
|
360
372
|
},
|
|
361
373
|
clearable: {
|
|
362
374
|
true: { indicator: 'ms-7' },
|
package/src/i18n.ts
CHANGED
|
@@ -490,6 +490,8 @@ const en: Translations = {
|
|
|
490
490
|
searchPlaceholder: 'Search …',
|
|
491
491
|
filter: (header) => `Filter ${header}`,
|
|
492
492
|
filterAll: 'All',
|
|
493
|
+
/** Placeholder of a text field in the filter row and the filter menu */
|
|
494
|
+
filterText: 'Filter …',
|
|
493
495
|
columns: 'Columns',
|
|
494
496
|
export: 'Export (CSV)',
|
|
495
497
|
resize: (header) => `Width of ${header}`,
|
package/src/inputs.ts
CHANGED
|
@@ -189,7 +189,7 @@ export const multiSelect = tv({
|
|
|
189
189
|
content: listboxContent,
|
|
190
190
|
item: listboxOption,
|
|
191
191
|
check: [
|
|
192
|
-
'flex size-4 shrink-0 items-center justify-center rounded-[4px] border border-line-strong text-on-primary',
|
|
192
|
+
'flex size-4 shrink-0 items-center justify-center rounded-[var(--wc-checkbox-radius,4px)] border border-line-strong text-on-primary',
|
|
193
193
|
'data-[state=checked]:border-primary data-[state=checked]:bg-primary',
|
|
194
194
|
'data-[state=indeterminate]:border-primary data-[state=indeterminate]:bg-primary',
|
|
195
195
|
'forced-colors:data-[state=checked]:forced-color-adjust-none forced-colors:data-[state=checked]:bg-[Highlight] forced-colors:data-[state=checked]:text-[HighlightText]',
|
|
@@ -472,7 +472,7 @@ export const timeGrid = tv({
|
|
|
472
472
|
base: 'flex flex-col gap-2',
|
|
473
473
|
grid: 'grid grid-cols-[repeat(auto-fill,minmax(5.5rem,1fr))] gap-2',
|
|
474
474
|
slot: [
|
|
475
|
-
'flex h-10 cursor-pointer items-center justify-center rounded-
|
|
475
|
+
'flex h-10 cursor-pointer items-center justify-center rounded-[var(--wc-control-radius-md,0.5rem)] border border-line-strong bg-bg px-3 text-sm text-fg tabular-nums',
|
|
476
476
|
'transition-colors hover:border-fg motion-reduce:transition-none',
|
|
477
477
|
'focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-fg',
|
|
478
478
|
'aria-checked:border-primary aria-checked:bg-primary aria-checked:text-on-primary',
|
|
@@ -491,12 +491,12 @@ export const timeGrid = tv({
|
|
|
491
491
|
size: {
|
|
492
492
|
sm: {
|
|
493
493
|
grid: 'grid-cols-[repeat(auto-fill,minmax(4.5rem,1fr))] gap-1.5',
|
|
494
|
-
slot: 'h-8 rounded-
|
|
494
|
+
slot: 'h-8 rounded-[var(--wc-control-radius-sm,0.375rem)] px-2 text-xs',
|
|
495
495
|
},
|
|
496
496
|
md: {},
|
|
497
497
|
lg: {
|
|
498
498
|
grid: 'grid-cols-[repeat(auto-fill,minmax(6.5rem,1fr))] gap-2.5',
|
|
499
|
-
slot: 'h-12 rounded-[10px] text-base',
|
|
499
|
+
slot: 'h-12 rounded-[var(--wc-control-radius-lg,10px)] text-base',
|
|
500
500
|
},
|
|
501
501
|
},
|
|
502
502
|
},
|
package/src/locales/ar.ts
CHANGED
package/src/locales/cs.ts
CHANGED
|
@@ -572,6 +572,7 @@ export const cs: Translations = {
|
|
|
572
572
|
searchPlaceholder: 'Hledat…',
|
|
573
573
|
filter: (header) => `Filtrovat sloupec ${header}`,
|
|
574
574
|
filterAll: 'Vše',
|
|
575
|
+
filterText: 'Filtrovat…',
|
|
575
576
|
columns: 'Sloupce',
|
|
576
577
|
export: 'Exportovat (CSV)',
|
|
577
578
|
resize: (header) => `Šířka sloupce ${header}`,
|
package/src/locales/de.ts
CHANGED
|
@@ -511,6 +511,7 @@ export const de = {
|
|
|
511
511
|
searchPlaceholder: 'Suchen …',
|
|
512
512
|
filter: (header: string) => `${header} filtern`,
|
|
513
513
|
filterAll: 'Alle',
|
|
514
|
+
filterText: 'Filtern …',
|
|
514
515
|
columns: 'Spalten',
|
|
515
516
|
export: 'Exportieren (CSV)',
|
|
516
517
|
resize: (header: string) => `Breite von ${header}`,
|
package/src/locales/es.ts
CHANGED
|
@@ -496,6 +496,7 @@ export const es: Translations = {
|
|
|
496
496
|
searchPlaceholder: 'Buscar…',
|
|
497
497
|
filter: (header) => `Filtrar ${header}`,
|
|
498
498
|
filterAll: 'Todos',
|
|
499
|
+
filterText: 'Filtrar…',
|
|
499
500
|
columns: 'Columnas',
|
|
500
501
|
export: 'Exportar (CSV)',
|
|
501
502
|
resize: (header) => `Ancho de ${header}`,
|
package/src/locales/fr.ts
CHANGED
|
@@ -510,6 +510,7 @@ export const fr: Translations = {
|
|
|
510
510
|
searchPlaceholder: 'Rechercher…',
|
|
511
511
|
filter: (header) => `Filtrer ${header}`,
|
|
512
512
|
filterAll: 'Tous',
|
|
513
|
+
filterText: 'Filtrer…',
|
|
513
514
|
columns: 'Colonnes',
|
|
514
515
|
export: 'Exporter (CSV)',
|
|
515
516
|
resize: (header) => `Largeur de ${header}`,
|
package/src/locales/hu.ts
CHANGED
|
@@ -532,6 +532,7 @@ export const hu: Translations = {
|
|
|
532
532
|
searchPlaceholder: 'Keresés…',
|
|
533
533
|
filter: (header) => `Szűrés: ${header}`,
|
|
534
534
|
filterAll: 'Mind',
|
|
535
|
+
filterText: 'Szűrés…',
|
|
535
536
|
columns: 'Oszlopok',
|
|
536
537
|
export: 'Exportálás (CSV)',
|
|
537
538
|
resize: (header) => `${header} szélessége`,
|
package/src/locales/it.ts
CHANGED
|
@@ -523,6 +523,7 @@ export const it: Translations = {
|
|
|
523
523
|
searchPlaceholder: 'Cerca…',
|
|
524
524
|
filter: (header) => `Filtra ${header}`,
|
|
525
525
|
filterAll: 'Tutti',
|
|
526
|
+
filterText: 'Filtra…',
|
|
526
527
|
columns: 'Colonne',
|
|
527
528
|
export: 'Esporta (CSV)',
|
|
528
529
|
resize: (header) => `Larghezza di ${header}`,
|
package/src/locales/lv.ts
CHANGED
|
@@ -530,6 +530,7 @@ export const lv: Translations = {
|
|
|
530
530
|
searchPlaceholder: 'Meklēt…',
|
|
531
531
|
filter: (header) => `Filtrēt: ${header}`,
|
|
532
532
|
filterAll: 'Visi',
|
|
533
|
+
filterText: 'Filtrēt…',
|
|
533
534
|
columns: 'Kolonnas',
|
|
534
535
|
export: 'Eksportēt (CSV)',
|
|
535
536
|
resize: (header) => `Kolonnas platums: ${header}`,
|
package/src/locales/nl.ts
CHANGED
|
@@ -484,6 +484,7 @@ export const nl: Translations = {
|
|
|
484
484
|
searchPlaceholder: 'Zoeken…',
|
|
485
485
|
filter: (header) => `${header} filteren`,
|
|
486
486
|
filterAll: 'Alle',
|
|
487
|
+
filterText: 'Filteren…',
|
|
487
488
|
columns: 'Kolommen',
|
|
488
489
|
export: 'Exporteren (CSV)',
|
|
489
490
|
resize: (header) => `Breedte van ${header}`,
|
package/src/locales/pl.ts
CHANGED
|
@@ -587,6 +587,7 @@ export const pl: Translations = {
|
|
|
587
587
|
searchPlaceholder: 'Szukaj…',
|
|
588
588
|
filter: (header) => `Filtruj: ${header}`,
|
|
589
589
|
filterAll: 'Wszystkie',
|
|
590
|
+
filterText: 'Filtruj…',
|
|
590
591
|
columns: 'Kolumny',
|
|
591
592
|
export: 'Eksportuj (CSV)',
|
|
592
593
|
resize: (header) => `Szerokość kolumny ${header}`,
|
package/src/locales/pt.ts
CHANGED
|
@@ -502,6 +502,7 @@ export const pt: Translations = {
|
|
|
502
502
|
searchPlaceholder: 'Pesquisar…',
|
|
503
503
|
filter: (header) => `Filtrar ${header}`,
|
|
504
504
|
filterAll: 'Todos',
|
|
505
|
+
filterText: 'Filtrar…',
|
|
505
506
|
columns: 'Colunas',
|
|
506
507
|
export: 'Exportar (CSV)',
|
|
507
508
|
resize: (header) => `Largura de ${header}`,
|
package/src/locales/tr.ts
CHANGED
|
@@ -480,6 +480,7 @@ export const tr: Translations = {
|
|
|
480
480
|
searchPlaceholder: 'Ara…',
|
|
481
481
|
filter: (header) => `Filtrele: ${header}`,
|
|
482
482
|
filterAll: 'Tümü',
|
|
483
|
+
filterText: 'Filtrele…',
|
|
483
484
|
columns: 'Sütunlar',
|
|
484
485
|
export: 'Dışa aktar (CSV)',
|
|
485
486
|
resize: (header) => `Genişlik: ${header}`,
|
package/src/media.ts
CHANGED
|
@@ -72,7 +72,7 @@ export const gallery = tv({
|
|
|
72
72
|
// Fullscreen view: a dialog filling the screen
|
|
73
73
|
positioner: 'fixed inset-0 z-50 flex items-center justify-center p-4 sm:p-8',
|
|
74
74
|
content: [
|
|
75
|
-
'flex max-h-full w-full max-w-6xl flex-col gap-3 overflow-y-auto rounded-
|
|
75
|
+
'flex max-h-full w-full max-w-6xl flex-col gap-3 overflow-y-auto rounded-dialog border border-line-2 bg-card p-4 text-fg outline-none',
|
|
76
76
|
'motion-safe:data-[state=open]:animate-dialog-in motion-safe:data-[state=closed]:animate-dialog-out',
|
|
77
77
|
],
|
|
78
78
|
header: 'flex items-center justify-between gap-3',
|
|
@@ -82,7 +82,7 @@ export const gallery = tv({
|
|
|
82
82
|
video: 'aspect-video w-full rounded-xl bg-black',
|
|
83
83
|
/** Lightbox (`tools`): toolbar, zoomable stage, the zoom in percent and the keyboard help */
|
|
84
84
|
lightbox: [
|
|
85
|
-
'flex max-h-full w-full max-w-6xl flex-col gap-3 overflow-hidden rounded-
|
|
85
|
+
'flex max-h-full w-full max-w-6xl flex-col gap-3 overflow-hidden rounded-dialog border border-line-2 bg-card p-4 text-fg outline-none',
|
|
86
86
|
'motion-safe:data-[state=open]:animate-dialog-in motion-safe:data-[state=closed]:animate-dialog-out',
|
|
87
87
|
'[&:fullscreen]:max-w-none [&:fullscreen]:rounded-none [&:fullscreen]:border-0',
|
|
88
88
|
],
|
package/src/native/display.ts
CHANGED
|
@@ -168,11 +168,11 @@ export const avatar = tv({
|
|
|
168
168
|
},
|
|
169
169
|
},
|
|
170
170
|
compoundVariants: [
|
|
171
|
-
{ shape: 'square', size: 'sm', class: { base: 'rounded-
|
|
172
|
-
{ shape: 'square', size: 'md', class: { base: 'rounded-[10px]' } },
|
|
173
|
-
{ shape: 'square', size: 'lg', class: { base: 'rounded-
|
|
174
|
-
{ shape: 'square', size: 'xl', class: { base: 'rounded-
|
|
175
|
-
{ shape: 'square', size: '2xl', class: { base: 'rounded-[20px]' } },
|
|
171
|
+
{ shape: 'square', size: 'sm', class: { base: 'rounded-[var(--wc-avatar-radius,8px)]' } },
|
|
172
|
+
{ shape: 'square', size: 'md', class: { base: 'rounded-[var(--wc-avatar-radius,10px)]' } },
|
|
173
|
+
{ shape: 'square', size: 'lg', class: { base: 'rounded-[var(--wc-avatar-radius,12px)]' } },
|
|
174
|
+
{ shape: 'square', size: 'xl', class: { base: 'rounded-[var(--wc-avatar-radius,16px)]' } },
|
|
175
|
+
{ shape: 'square', size: '2xl', class: { base: 'rounded-[var(--wc-avatar-radius,20px)]' } },
|
|
176
176
|
],
|
|
177
177
|
defaultVariants: {
|
|
178
178
|
variant: 'soft',
|
package/src/native/form.ts
CHANGED
|
@@ -47,9 +47,21 @@ export const input = tv({
|
|
|
47
47
|
},
|
|
48
48
|
variants: {
|
|
49
49
|
size: {
|
|
50
|
-
sm: {
|
|
51
|
-
|
|
52
|
-
|
|
50
|
+
sm: {
|
|
51
|
+
base: 'h-8 rounded-[var(--wc-control-radius-sm,6px)]',
|
|
52
|
+
control: 'px-2.5 text-[13px]',
|
|
53
|
+
icon: 'ml-2.5 size-3.5',
|
|
54
|
+
},
|
|
55
|
+
md: {
|
|
56
|
+
base: 'h-10 rounded-[var(--wc-control-radius-md,8px)]',
|
|
57
|
+
control: 'px-3 text-[15px]',
|
|
58
|
+
icon: 'ml-3 size-4',
|
|
59
|
+
},
|
|
60
|
+
lg: {
|
|
61
|
+
base: 'h-12 rounded-[var(--wc-control-radius-lg,10px)]',
|
|
62
|
+
control: 'px-4 text-base',
|
|
63
|
+
icon: 'ml-4 size-[18px]',
|
|
64
|
+
},
|
|
53
65
|
},
|
|
54
66
|
focused: {
|
|
55
67
|
true: { base: 'border-primary' },
|
|
@@ -78,7 +90,7 @@ export const input = tv({
|
|
|
78
90
|
});
|
|
79
91
|
|
|
80
92
|
export const textarea = tv({
|
|
81
|
-
base: 'min-h-24 w-full rounded-
|
|
93
|
+
base: 'min-h-24 w-full rounded-[var(--wc-control-radius-md,8px)] border border-line-strong bg-bg px-3 py-[9px] font-sans text-[15px] leading-6 text-fg web:outline-none',
|
|
82
94
|
variants: {
|
|
83
95
|
focused: {
|
|
84
96
|
true: 'border-primary',
|
|
@@ -93,9 +105,9 @@ export const textarea = tv({
|
|
|
93
105
|
true: 'border-line bg-bg-2 text-muted',
|
|
94
106
|
},
|
|
95
107
|
size: {
|
|
96
|
-
sm: 'rounded-
|
|
108
|
+
sm: 'rounded-[var(--wc-control-radius-sm,6px)] px-2.5 py-1.5 text-[13px] leading-5',
|
|
97
109
|
md: {},
|
|
98
|
-
lg: 'rounded-[10px] px-4 py-3 text-base',
|
|
110
|
+
lg: 'rounded-[var(--wc-control-radius-lg,10px)] px-4 py-3 text-base',
|
|
99
111
|
},
|
|
100
112
|
/** Monospace font of the theme – for keys, codes and logs */
|
|
101
113
|
mono: {
|
|
@@ -129,7 +141,8 @@ export const textareaParts = tv({
|
|
|
129
141
|
export const checkbox = tv({
|
|
130
142
|
slots: {
|
|
131
143
|
base: ['flex-row items-start gap-2.5', pressable],
|
|
132
|
-
control:
|
|
144
|
+
control:
|
|
145
|
+
'mt-px size-[18px] shrink-0 items-center justify-center rounded-[var(--wc-checkbox-radius,5px)] border border-line-strong',
|
|
133
146
|
icon: 'size-[13px] text-on-primary',
|
|
134
147
|
label: 'min-w-0 shrink font-sans text-sm leading-5 text-muted',
|
|
135
148
|
},
|
|
@@ -192,7 +205,7 @@ export const selectionCard = tv({
|
|
|
192
205
|
},
|
|
193
206
|
variants: {
|
|
194
207
|
type: {
|
|
195
|
-
checkbox: { control: 'rounded-[5px]' },
|
|
208
|
+
checkbox: { control: 'rounded-[var(--wc-checkbox-radius,5px)]' },
|
|
196
209
|
radio: { control: 'rounded-full' },
|
|
197
210
|
},
|
|
198
211
|
checked: {
|
package/src/native/inputs.ts
CHANGED
|
@@ -113,7 +113,7 @@ export const phoneInput = tv({
|
|
|
113
113
|
/** Entries as chips with a text field after them (TagsInput, Autocomplete multiple) */
|
|
114
114
|
export const tagsInput = tv({
|
|
115
115
|
slots: {
|
|
116
|
-
base: 'min-h-10 w-full flex-row flex-wrap items-center gap-1 rounded-
|
|
116
|
+
base: 'min-h-10 w-full flex-row flex-wrap items-center gap-1 rounded-[var(--wc-control-radius-md,8px)] border border-line-strong bg-bg px-1.5 py-1',
|
|
117
117
|
tag: 'h-7 flex-row items-center rounded-full bg-line pl-2.5',
|
|
118
118
|
tagText: 'font-sans-medium text-[13px] text-fg',
|
|
119
119
|
tagRemove: ['-my-2 size-9 items-center justify-center rounded-full', pressable],
|
package/src/native/overlay.ts
CHANGED
|
@@ -27,9 +27,9 @@ export const dialog = tv({
|
|
|
27
27
|
backdrop: 'flex-1 items-center justify-center bg-black/60 p-4',
|
|
28
28
|
/** Behind the content: pressing outside closes */
|
|
29
29
|
dismissArea: 'absolute inset-0',
|
|
30
|
-
content: 'w-full max-w-[400px] rounded-
|
|
30
|
+
content: 'w-full max-w-[400px] rounded-dialog border border-line-2 bg-card',
|
|
31
31
|
header: 'flex-row items-center justify-between gap-3 pt-4 pr-4 pl-[18px]',
|
|
32
|
-
iconBox: 'size-9 items-center justify-center rounded-[10px]',
|
|
32
|
+
iconBox: 'size-9 items-center justify-center rounded-[var(--wc-dialog-icon-radius,10px)]',
|
|
33
33
|
icon: 'size-[18px]',
|
|
34
34
|
close: [
|
|
35
35
|
'ml-auto size-8 items-center justify-center rounded-full',
|
package/src/native/overlays.ts
CHANGED
|
@@ -9,6 +9,8 @@ export const drawer = tv({
|
|
|
9
9
|
dismissArea: 'absolute inset-0',
|
|
10
10
|
panel: 'max-w-[90%] bg-card',
|
|
11
11
|
header: 'flex-row items-center justify-between gap-3 border-b border-line py-3 pr-3 pl-5 ios:pt-14',
|
|
12
|
+
/** Own content of the header row (`header`), before the title */
|
|
13
|
+
headerContent: 'min-w-0 shrink flex-row items-center gap-3',
|
|
12
14
|
title: 'min-w-0 flex-1 font-sans-semibold text-base text-fg',
|
|
13
15
|
close: ['size-11 items-center justify-center rounded-full', pressable, 'active:bg-line active:opacity-100'],
|
|
14
16
|
closeIcon: 'size-4 text-muted',
|
package/src/native/picker.ts
CHANGED
|
@@ -10,6 +10,8 @@ const sheet = {
|
|
|
10
10
|
sheet: 'max-h-[70%] rounded-t-2xl border-t border-line-2 bg-card pb-6',
|
|
11
11
|
sheetHeader: 'flex-row items-center justify-between gap-3 border-b border-line py-3 pr-3 pl-5',
|
|
12
12
|
sheetTitle: 'font-sans-semibold text-base text-fg',
|
|
13
|
+
/** Own content of the header row (Drawer `header`), before the title */
|
|
14
|
+
sheetHeaderContent: 'min-w-0 shrink flex-row items-center gap-3',
|
|
13
15
|
close: ['size-8 items-center justify-center rounded-full', pressable, 'active:bg-line active:opacity-100'],
|
|
14
16
|
closeIcon: 'size-4 text-muted',
|
|
15
17
|
list: 'px-2 pt-2',
|
|
@@ -33,7 +35,7 @@ export const sheetSize = tv({
|
|
|
33
35
|
export const select = tv({
|
|
34
36
|
slots: {
|
|
35
37
|
trigger: [
|
|
36
|
-
'h-10 w-full flex-row items-center justify-between gap-2.5 rounded-
|
|
38
|
+
'h-10 w-full flex-row items-center justify-between gap-2.5 rounded-[var(--wc-control-radius-md,8px)] border border-line-strong bg-bg pr-2.5 pl-3',
|
|
37
39
|
pressable,
|
|
38
40
|
'active:opacity-100',
|
|
39
41
|
],
|
|
@@ -76,9 +78,17 @@ export const select = tv({
|
|
|
76
78
|
true: { trigger: 'border-primary' },
|
|
77
79
|
},
|
|
78
80
|
size: {
|
|
79
|
-
sm: {
|
|
81
|
+
sm: {
|
|
82
|
+
trigger: 'h-8 rounded-[var(--wc-control-radius-sm,6px)] pl-2.5',
|
|
83
|
+
valueText: 'text-[13px]',
|
|
84
|
+
placeholder: 'text-[13px]',
|
|
85
|
+
},
|
|
80
86
|
md: {},
|
|
81
|
-
lg: {
|
|
87
|
+
lg: {
|
|
88
|
+
trigger: 'h-12 rounded-[var(--wc-control-radius-lg,10px)] pl-4',
|
|
89
|
+
valueText: 'text-base',
|
|
90
|
+
placeholder: 'text-base',
|
|
91
|
+
},
|
|
82
92
|
},
|
|
83
93
|
/** The chips make the trigger grow with them */
|
|
84
94
|
hasChips: {
|
package/src/native/tv.ts
CHANGED
|
@@ -7,6 +7,8 @@ import { createTV } from 'tailwind-variants';
|
|
|
7
7
|
export const tv = createTV({
|
|
8
8
|
twMergeConfig: {
|
|
9
9
|
extend: {
|
|
10
|
+
// rounded-card, -dialog … are radii, so rounded-none (a full-screen dialog, `classes`) replaces them
|
|
11
|
+
theme: { radius: ['popup', 'card', 'panel', 'dialog'] },
|
|
10
12
|
classGroups: {
|
|
11
13
|
'font-family': [{ font: ['sans', 'sans-medium', 'sans-semibold', 'sans-bold', 'mono'] }],
|
|
12
14
|
},
|
package/src/native/widgets.ts
CHANGED
|
@@ -63,7 +63,7 @@ export const timeGrid = tv({
|
|
|
63
63
|
label: 'font-sans-medium text-[13px] text-fg',
|
|
64
64
|
grid: 'flex-row flex-wrap -m-1',
|
|
65
65
|
cell: 'p-1',
|
|
66
|
-
slot: ['items-center justify-center rounded-
|
|
66
|
+
slot: ['items-center justify-center rounded-[var(--wc-control-radius-md,8px)] border border-line-2', pressable],
|
|
67
67
|
slotText: 'font-sans-medium text-fg',
|
|
68
68
|
status: 'font-sans text-sm text-muted',
|
|
69
69
|
statusRow: 'flex-row items-center gap-2',
|
|
@@ -117,7 +117,7 @@ export const miniCalendar = tv({
|
|
|
117
117
|
/** DurationInput: one number field per unit */
|
|
118
118
|
export const durationInput = tv({
|
|
119
119
|
slots: {
|
|
120
|
-
base: 'w-full flex-row items-center gap-2 rounded-
|
|
120
|
+
base: 'w-full flex-row items-center gap-2 rounded-[var(--wc-control-radius-md,8px)] border border-line-strong bg-bg px-3',
|
|
121
121
|
part: 'flex-row items-baseline gap-1',
|
|
122
122
|
control: 'w-10 py-2 text-right font-mono text-[15px] text-fg web:outline-none',
|
|
123
123
|
unit: 'font-sans text-xs text-muted',
|
|
@@ -125,9 +125,9 @@ export const durationInput = tv({
|
|
|
125
125
|
},
|
|
126
126
|
variants: {
|
|
127
127
|
size: {
|
|
128
|
-
sm: { base: 'h-8 rounded-
|
|
128
|
+
sm: { base: 'h-8 rounded-[var(--wc-control-radius-sm,6px)] px-2.5' },
|
|
129
129
|
md: { base: 'h-10' },
|
|
130
|
-
lg: { base: 'h-12 rounded-[10px] px-4' },
|
|
130
|
+
lg: { base: 'h-12 rounded-[var(--wc-control-radius-lg,10px)] px-4' },
|
|
131
131
|
},
|
|
132
132
|
focused: {
|
|
133
133
|
true: { base: 'border-primary' },
|
package/src/overlay.ts
CHANGED
|
@@ -102,12 +102,14 @@ export const dialog = tv({
|
|
|
102
102
|
positioner: 'fixed inset-0 z-50 flex items-center justify-center overflow-y-auto p-4',
|
|
103
103
|
content: [
|
|
104
104
|
// Width from --wc-dialog-w: set by `size`, or your own, e.g. style="--wc-dialog-w: 36rem"
|
|
105
|
-
'flex w-full max-w-[var(--wc-dialog-w,400px)] flex-col rounded-
|
|
105
|
+
'flex w-full max-w-[var(--wc-dialog-w,400px)] flex-col rounded-dialog border border-line-2 bg-card text-fg outline-none',
|
|
106
106
|
'shadow-[0_24px_48px_-20px_rgba(0,0,0,.55)]',
|
|
107
107
|
'motion-safe:data-[state=open]:animate-dialog-in motion-safe:data-[state=closed]:animate-dialog-out',
|
|
108
108
|
],
|
|
109
109
|
header: 'flex items-center justify-between gap-3 pt-4 pe-4 ps-[18px]',
|
|
110
|
-
|
|
110
|
+
/** Own content of the header row (`#header` / `header`), before the maximize and close buttons */
|
|
111
|
+
headerContent: 'flex min-w-0 flex-1 items-center gap-3',
|
|
112
|
+
iconBox: 'flex size-9 items-center justify-center rounded-[var(--wc-dialog-icon-radius,10px)]',
|
|
111
113
|
icon: 'size-[18px]',
|
|
112
114
|
close: [
|
|
113
115
|
'ms-auto flex size-8 items-center justify-center rounded-full text-muted hover:bg-line hover:text-fg',
|
|
@@ -213,6 +215,8 @@ export const drawer = tv({
|
|
|
213
215
|
],
|
|
214
216
|
header: 'flex items-start justify-between gap-3 border-b border-line py-4 pe-4 ps-5',
|
|
215
217
|
text: 'flex min-w-0 flex-col gap-1',
|
|
218
|
+
/** Own content of the header row (`#header` / `header`), before the close button */
|
|
219
|
+
headerContent: 'flex min-w-0 flex-1 items-center gap-3',
|
|
216
220
|
title: 'text-lg font-semibold tracking-[-0.02em]',
|
|
217
221
|
description: 'text-sm leading-normal text-muted',
|
|
218
222
|
close: [
|
|
@@ -228,6 +232,10 @@ export const drawer = tv({
|
|
|
228
232
|
hideTitle: {
|
|
229
233
|
true: { title: 'sr-only' },
|
|
230
234
|
},
|
|
235
|
+
/** Own content in the header row (`#header` / `header`): centred with the close button */
|
|
236
|
+
customHeader: {
|
|
237
|
+
true: { header: 'items-center' },
|
|
238
|
+
},
|
|
231
239
|
placement: {
|
|
232
240
|
right: {
|
|
233
241
|
positioner: 'justify-end',
|