@wirecore/wirelayer-recipes 0.10.0 → 0.11.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.
Files changed (69) hide show
  1. package/dist/avatar.js +5 -5
  2. package/dist/avatar.js.map +1 -1
  3. package/dist/collections.js +2 -2
  4. package/dist/collections.js.map +1 -1
  5. package/dist/controls.js +1 -1
  6. package/dist/controls.js.map +1 -1
  7. package/dist/hierarchy.d.ts.map +1 -1
  8. package/dist/hierarchy.js +22 -10
  9. package/dist/hierarchy.js.map +1 -1
  10. package/dist/inputs.js +4 -4
  11. package/dist/inputs.js.map +1 -1
  12. package/dist/media.js +2 -2
  13. package/dist/native/display.js +5 -5
  14. package/dist/native/display.js.map +1 -1
  15. package/dist/native/form.d.ts +7 -7
  16. package/dist/native/form.d.ts.map +1 -1
  17. package/dist/native/form.js +20 -8
  18. package/dist/native/form.js.map +1 -1
  19. package/dist/native/inputs.js +1 -1
  20. package/dist/native/inputs.js.map +1 -1
  21. package/dist/native/overlay.js +2 -2
  22. package/dist/native/overlay.js.map +1 -1
  23. package/dist/native/picker.d.ts.map +1 -1
  24. package/dist/native/picker.js +11 -3
  25. package/dist/native/picker.js.map +1 -1
  26. package/dist/native/tv.d.ts.map +1 -1
  27. package/dist/native/tv.js +2 -0
  28. package/dist/native/tv.js.map +1 -1
  29. package/dist/native/widgets.js +4 -4
  30. package/dist/native/widgets.js.map +1 -1
  31. package/dist/overlay.js +2 -2
  32. package/dist/overlay.js.map +1 -1
  33. package/dist/patterns.js +1 -1
  34. package/dist/patterns.js.map +1 -1
  35. package/dist/selection.js +1 -1
  36. package/dist/selection.js.map +1 -1
  37. package/dist/sources/avatar.css +1 -1
  38. package/dist/sources/cascadeSelect.css +1 -1
  39. package/dist/sources/checkbox.css +1 -1
  40. package/dist/sources/dialog.css +1 -1
  41. package/dist/sources/gallery.css +1 -1
  42. package/dist/sources/listbox.css +1 -1
  43. package/dist/sources/multiSelect.css +1 -1
  44. package/dist/sources/orderList.css +1 -1
  45. package/dist/sources/pickList.css +1 -1
  46. package/dist/sources/selectionCard.css +1 -1
  47. package/dist/sources/timeGrid.css +1 -1
  48. package/dist/sources/tree.css +1 -1
  49. package/dist/sources/treeSelect.css +1 -1
  50. package/dist/tv.js +2 -2
  51. package/dist/tv.js.map +1 -1
  52. package/package.json +1 -1
  53. package/src/avatar.ts +5 -5
  54. package/src/collections.ts +2 -2
  55. package/src/controls.ts +1 -1
  56. package/src/hierarchy.ts +22 -10
  57. package/src/inputs.ts +4 -4
  58. package/src/media.ts +2 -2
  59. package/src/native/display.ts +5 -5
  60. package/src/native/form.ts +21 -8
  61. package/src/native/inputs.ts +1 -1
  62. package/src/native/overlay.ts +2 -2
  63. package/src/native/picker.ts +11 -3
  64. package/src/native/tv.ts +2 -0
  65. package/src/native/widgets.ts +4 -4
  66. package/src/overlay.ts +2 -2
  67. package/src/patterns.ts +1 -1
  68. package/src/selection.ts +1 -1
  69. package/src/tv.ts +2 -2
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-lg border border-line-strong bg-bg pe-2.5 ps-3 text-start text-[15px] text-fg',
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-lg border border-line-strong bg-bg py-[5px] pe-2.5 ps-1.5 text-fg',
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-md ps-2.5 pe-2 text-[13px]' },
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: { ...fieldSizes.sm, chipsControl: 'min-h-8 rounded-md py-0.5', chipsTrigger: 'text-[13px]' },
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: { ...fieldSizes.lg, chipsControl: 'min-h-12 rounded-[10px] py-[9px]', chipsTrigger: 'text-base' },
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-lg border border-line-strong bg-bg pe-1 ps-3 text-[15px] text-fg',
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: { ...fieldSizes.sm, searchControl: 'h-8 rounded-md ps-2.5 text-[13px]', levelsTrigger: 'size-6' },
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/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-lg border border-line-strong bg-bg px-3 text-sm text-fg tabular-nums',
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-md px-2 text-xs',
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/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-[14px] border border-line-2 bg-card p-4 text-fg outline-none',
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-[14px] border border-line-2 bg-card p-4 text-fg outline-none',
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
  ],
@@ -168,11 +168,11 @@ export const avatar = tv({
168
168
  },
169
169
  },
170
170
  compoundVariants: [
171
- { shape: 'square', size: 'sm', class: { base: 'rounded-lg' } },
172
- { shape: 'square', size: 'md', class: { base: 'rounded-[10px]' } },
173
- { shape: 'square', size: 'lg', class: { base: 'rounded-xl' } },
174
- { shape: 'square', size: 'xl', class: { base: 'rounded-2xl' } },
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',
@@ -47,9 +47,21 @@ export const input = tv({
47
47
  },
48
48
  variants: {
49
49
  size: {
50
- sm: { base: 'h-8 rounded-md', control: 'px-2.5 text-[13px]', icon: 'ml-2.5 size-3.5' },
51
- md: { base: 'h-10 rounded-lg', control: 'px-3 text-[15px]', icon: 'ml-3 size-4' },
52
- lg: { base: 'h-12 rounded-[10px]', control: 'px-4 text-base', icon: 'ml-4 size-[18px]' },
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-lg border border-line-strong bg-bg px-3 py-[9px] font-sans text-[15px] leading-6 text-fg web:outline-none',
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-md px-2.5 py-1.5 text-[13px] leading-5',
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: 'mt-px size-[18px] shrink-0 items-center justify-center rounded-[5px] border border-line-strong',
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: {
@@ -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-lg border border-line-strong bg-bg px-1.5 py-1',
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],
@@ -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-[14px] border border-line-2 bg-card',
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',
@@ -33,7 +33,7 @@ export const sheetSize = tv({
33
33
  export const select = tv({
34
34
  slots: {
35
35
  trigger: [
36
- 'h-10 w-full flex-row items-center justify-between gap-2.5 rounded-lg border border-line-strong bg-bg pr-2.5 pl-3',
36
+ '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
37
  pressable,
38
38
  'active:opacity-100',
39
39
  ],
@@ -76,9 +76,17 @@ export const select = tv({
76
76
  true: { trigger: 'border-primary' },
77
77
  },
78
78
  size: {
79
- sm: { trigger: 'h-8 rounded-md pl-2.5', valueText: 'text-[13px]', placeholder: 'text-[13px]' },
79
+ sm: {
80
+ trigger: 'h-8 rounded-[var(--wc-control-radius-sm,6px)] pl-2.5',
81
+ valueText: 'text-[13px]',
82
+ placeholder: 'text-[13px]',
83
+ },
80
84
  md: {},
81
- lg: { trigger: 'h-12 rounded-[10px] pl-4', valueText: 'text-base', placeholder: 'text-base' },
85
+ lg: {
86
+ trigger: 'h-12 rounded-[var(--wc-control-radius-lg,10px)] pl-4',
87
+ valueText: 'text-base',
88
+ placeholder: 'text-base',
89
+ },
82
90
  },
83
91
  /** The chips make the trigger grow with them */
84
92
  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
  },
@@ -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-lg border border-line-2', pressable],
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-lg border border-line-strong bg-bg px-3',
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-md px-2.5' },
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,12 @@ 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-[14px] border border-line-2 bg-card text-fg outline-none',
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
- iconBox: 'flex size-9 items-center justify-center rounded-[10px]',
110
+ iconBox: 'flex size-9 items-center justify-center rounded-[var(--wc-dialog-icon-radius,10px)]',
111
111
  icon: 'size-[18px]',
112
112
  close: [
113
113
  'ms-auto flex size-8 items-center justify-center rounded-full text-muted hover:bg-line hover:text-fg',
package/src/patterns.ts CHANGED
@@ -156,7 +156,7 @@ export const selectionCard = tv({
156
156
  },
157
157
  variants: {
158
158
  type: {
159
- checkbox: { control: 'rounded-[5px]' },
159
+ checkbox: { control: 'rounded-[var(--wc-checkbox-radius,5px)]' },
160
160
  radio: {
161
161
  control:
162
162
  'rounded-full data-[state=checked]:bg-transparent after:size-2 after:rounded-full data-[state=checked]:after:bg-primary forced-colors:data-[state=checked]:after:bg-[Highlight]',
package/src/selection.ts CHANGED
@@ -8,7 +8,7 @@ export const checkbox = tv({
8
8
  slots: {
9
9
  base: 'inline-flex cursor-pointer items-start gap-2.5 text-sm leading-[1.45] text-muted data-disabled:cursor-not-allowed data-disabled:opacity-40',
10
10
  control: [
11
- 'mt-px flex size-[18px] shrink-0 items-center justify-center rounded-[5px] border border-line-strong text-on-primary',
11
+ 'mt-px flex size-[18px] shrink-0 items-center justify-center rounded-[var(--wc-checkbox-radius,5px)] border border-line-strong text-on-primary',
12
12
  'transition-colors motion-reduce:transition-none data-invalid:border-danger',
13
13
  'data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=indeterminate]:border-primary data-[state=indeterminate]:bg-primary',
14
14
  'forced-colors:data-[state=checked]:forced-color-adjust-none forced-colors:data-[state=checked]:border-[Highlight] forced-colors:data-[state=checked]:bg-[Highlight] forced-colors:data-[state=checked]:text-[HighlightText]',
package/src/tv.ts CHANGED
@@ -3,8 +3,8 @@ import { createTV } from 'tailwind-variants';
3
3
  /** tailwind-merge knows the custom WireLayer utilities (also used by the @wirecore/wirelayer-css generator). */
4
4
  export const twMergeConfig = {
5
5
  extend: {
6
- // rounded-popup, -card and -panel are radii, so `classes` like rounded-none (or a Card's size) replace them
7
- theme: { radius: ['popup', 'card', 'panel'] },
6
+ // rounded-popup, -card, -panel and -dialog are radii, so `classes` like rounded-none (or a Card's size) replace them
7
+ theme: { radius: ['popup', 'card', 'panel', 'dialog'] },
8
8
  classGroups: {
9
9
  'bg-image': ['bg-glow'],
10
10
  'text-gradient': ['text-gradient'],