@urbicon-ui/blocks 6.30.1 → 6.32.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 (31) hide show
  1. package/dist/components/Calendar/Calendar.svelte +17 -21
  2. package/dist/components/Calendar/CalendarAgendaView.svelte +9 -3
  3. package/dist/components/Calendar/CalendarDayView.svelte +9 -3
  4. package/dist/components/Calendar/CalendarGrid.svelte +9 -3
  5. package/dist/components/Calendar/CalendarWeekGrid.svelte +9 -3
  6. package/dist/components/Calendar/CalendarYearGrid.svelte +12 -3
  7. package/dist/components/CommandPalette/commandPalette.variants.js +9 -4
  8. package/dist/primitives/Accordion/accordion.variants.d.ts +7 -7
  9. package/dist/primitives/Accordion/accordion.variants.js +4 -4
  10. package/dist/primitives/Accordion/index.d.ts +2 -2
  11. package/dist/primitives/Button/Button.svelte +23 -7
  12. package/dist/primitives/Combobox/Combobox.svelte +11 -3
  13. package/dist/primitives/Combobox/combobox.variants.d.ts +9 -0
  14. package/dist/primitives/Combobox/combobox.variants.js +22 -4
  15. package/dist/primitives/Combobox/index.d.ts +2 -2
  16. package/dist/primitives/Menu/menu.variants.js +13 -5
  17. package/dist/primitives/SegmentGroup/SegmentGroup.svelte +4 -4
  18. package/dist/primitives/SegmentGroup/SegmentItem.svelte +1 -1
  19. package/dist/primitives/SegmentGroup/index.d.ts +1 -1
  20. package/dist/primitives/SegmentGroup/segmentgroup.variants.d.ts +4 -4
  21. package/dist/primitives/SegmentGroup/segmentgroup.variants.js +15 -15
  22. package/dist/primitives/Select/select.variants.js +21 -7
  23. package/dist/primitives/Slider/Slider.svelte +2 -2
  24. package/dist/primitives/Slider/slider.variants.d.ts +14 -14
  25. package/dist/primitives/Slider/slider.variants.js +13 -13
  26. package/dist/primitives/Toggle/Toggle.svelte +2 -2
  27. package/dist/primitives/Toggle/index.d.ts +1 -1
  28. package/dist/primitives/Toggle/toggle.variants.d.ts +7 -7
  29. package/dist/primitives/Toggle/toggle.variants.js +32 -32
  30. package/docs/MIGRATION-v5.md +7 -5
  31. package/package.json +5 -4
@@ -26,7 +26,7 @@ export const toggleVariants = tv({
26
26
  // toggle is a status declaration, identity-shaped. Opt-in `modify`
27
27
  // renders a soft-rectangle switch for compact inline-toolbar contexts
28
28
  // (usually inherited from a wrapping `<Toolbar tier="modify">` via
29
- // TierContext). The `dot` appearance overrides geometry in compounds
29
+ // TierContext). The `dot` variant overrides geometry in compounds
30
30
  // below, so tier is functionally a no-op there — both still type-check.
31
31
  tier: {
32
32
  commit: { track: 'rounded-commit', thumb: 'rounded-commit' },
@@ -62,14 +62,14 @@ export const toggleVariants = tv({
62
62
  danger: {},
63
63
  neutral: {}
64
64
  },
65
- // Appearance contract (see docs/ARCHITECTURE.md §Tier System
65
+ // Variant contract (see docs/ARCHITECTURE.md §Tier System
66
66
  // for the commit/modify radius semantics).
67
67
  // default → classic switch pill (track + animated thumb).
68
68
  // dot → small indicator dot left of the label. Off = outline only,
69
69
  // on = fill-intent. Monochrome, no pill background. Ideal
70
70
  // for inline settings, dense toolbars, knob-strips —
71
71
  // or anywhere the switch is visually too dominant.
72
- appearance: {
72
+ variant: {
73
73
  default: {},
74
74
  // Concrete styles for `dot` live in compoundVariants below, so that
75
75
  // the override-bucket (w/h/rounded) can strip the corresponding
@@ -97,11 +97,11 @@ export const toggleVariants = tv({
97
97
  }
98
98
  },
99
99
  compoundVariants: [
100
- // ── Default-appearance compounds (classic Switch-Pill) ──
101
- // All filter on `appearance: 'default'` so the new `dot` mode picks
100
+ // ── Default-variant compounds (classic Switch-Pill) ──
101
+ // All filter on `variant: 'default'` so the new `dot` mode picks
102
102
  // up only its own monochrome compounds (defined further below).
103
103
  {
104
- appearance: 'default',
104
+ variant: 'default',
105
105
  checked: false,
106
106
  class: {
107
107
  track: 'bg-surface-interactive',
@@ -110,50 +110,50 @@ export const toggleVariants = tv({
110
110
  },
111
111
  // ── withBorder: visible boundary in both states ──
112
112
  {
113
- appearance: 'default',
113
+ variant: 'default',
114
114
  checked: false,
115
115
  withBorder: true,
116
116
  class: { track: 'border-border-strong' }
117
117
  },
118
118
  {
119
- appearance: 'default',
119
+ variant: 'default',
120
120
  checked: true,
121
121
  withBorder: true,
122
122
  class: { track: 'ring-1 ring-inset ring-surface-base/40' }
123
123
  },
124
124
  // ── Checked track per intent (Switch-Pill only) ──
125
125
  {
126
- appearance: 'default',
126
+ variant: 'default',
127
127
  checked: true,
128
128
  intent: 'primary',
129
129
  class: { track: 'bg-primary border-primary' }
130
130
  },
131
131
  {
132
- appearance: 'default',
132
+ variant: 'default',
133
133
  checked: true,
134
134
  intent: 'secondary',
135
135
  class: { track: 'bg-secondary border-secondary' }
136
136
  },
137
137
  {
138
- appearance: 'default',
138
+ variant: 'default',
139
139
  checked: true,
140
140
  intent: 'success',
141
141
  class: { track: 'bg-success border-success' }
142
142
  },
143
143
  {
144
- appearance: 'default',
144
+ variant: 'default',
145
145
  checked: true,
146
146
  intent: 'warning',
147
147
  class: { track: 'bg-warning border-warning' }
148
148
  },
149
149
  {
150
- appearance: 'default',
150
+ variant: 'default',
151
151
  checked: true,
152
152
  intent: 'danger',
153
153
  class: { track: 'bg-danger border-danger' }
154
154
  },
155
155
  {
156
- appearance: 'default',
156
+ variant: 'default',
157
157
  checked: true,
158
158
  intent: 'neutral',
159
159
  class: { track: 'bg-neutral border-neutral' }
@@ -162,28 +162,28 @@ export const toggleVariants = tv({
162
162
  // Mirrors Checkbox ("error overrides unchecked border"): the off state
163
163
  // carries the danger mark, the on state keeps its intent colour — an
164
164
  // error on a boolean control usually means "must be switched on".
165
- // The dot-appearance twin lives at the END of the compound list so it
165
+ // The dot-variant twin lives at the END of the compound list so it
166
166
  // folds over the dot-unchecked `border-border-default` (order is
167
167
  // semantic — later compounds win conflicting buckets).
168
168
  {
169
- appearance: 'default',
169
+ variant: 'default',
170
170
  error: true,
171
171
  checked: false,
172
172
  class: { track: 'border-danger peer-focus-visible:ring-danger/40' }
173
173
  },
174
174
  // ── Thumb translation per size when checked (Switch-Pill only) ──
175
- { appearance: 'default', checked: true, size: 'xs', class: { thumb: 'translate-x-4' } },
176
- { appearance: 'default', checked: true, size: 'sm', class: { thumb: 'translate-x-5' } },
177
- { appearance: 'default', checked: true, size: 'md', class: { thumb: 'translate-x-6' } },
178
- { appearance: 'default', checked: true, size: 'lg', class: { thumb: 'translate-x-7' } },
179
- // ── Dot appearance: monochrome circular indicator ──
175
+ { variant: 'default', checked: true, size: 'xs', class: { thumb: 'translate-x-4' } },
176
+ { variant: 'default', checked: true, size: 'sm', class: { thumb: 'translate-x-5' } },
177
+ { variant: 'default', checked: true, size: 'md', class: { thumb: 'translate-x-6' } },
178
+ { variant: 'default', checked: true, size: 'lg', class: { thumb: 'translate-x-7' } },
179
+ // ── Dot variant: monochrome circular indicator ──
180
180
  // The base track is overridden to a tiny outline-only circle. The thumb
181
181
  // is hidden. Off = border-only (no bg-class so CSS default `transparent`
182
182
  // applies), on = fill-intent. compoundVariants run after the size-variant
183
183
  // stage, so `w-3.5/h-3.5/rounded-full` strip the size-based
184
184
  // `w-12/h-6/rounded-commit` from the resolved class set.
185
185
  {
186
- appearance: 'dot',
186
+ variant: 'dot',
187
187
  class: {
188
188
  track: 'w-3.5 h-3.5 rounded-full border shadow-none',
189
189
  thumb: 'hidden',
@@ -191,49 +191,49 @@ export const toggleVariants = tv({
191
191
  }
192
192
  },
193
193
  {
194
- appearance: 'dot',
194
+ variant: 'dot',
195
195
  checked: false,
196
196
  class: { track: 'border-border-default' }
197
197
  },
198
198
  {
199
- appearance: 'dot',
199
+ variant: 'dot',
200
200
  checked: true,
201
201
  intent: 'primary',
202
202
  class: { track: 'border-primary bg-primary' }
203
203
  },
204
204
  {
205
- appearance: 'dot',
205
+ variant: 'dot',
206
206
  checked: true,
207
207
  intent: 'secondary',
208
208
  class: { track: 'border-secondary bg-secondary' }
209
209
  },
210
210
  {
211
- appearance: 'dot',
211
+ variant: 'dot',
212
212
  checked: true,
213
213
  intent: 'success',
214
214
  class: { track: 'border-success bg-success' }
215
215
  },
216
216
  {
217
- appearance: 'dot',
217
+ variant: 'dot',
218
218
  checked: true,
219
219
  intent: 'warning',
220
220
  class: { track: 'border-warning bg-warning' }
221
221
  },
222
222
  {
223
- appearance: 'dot',
223
+ variant: 'dot',
224
224
  checked: true,
225
225
  intent: 'danger',
226
226
  class: { track: 'border-danger bg-danger' }
227
227
  },
228
228
  {
229
- appearance: 'dot',
229
+ variant: 'dot',
230
230
  checked: true,
231
231
  intent: 'neutral',
232
232
  class: { track: 'border-neutral bg-neutral' }
233
233
  },
234
- // ── Error state, dot appearance (must fold over dot-unchecked border) ──
234
+ // ── Error state, dot variant (must fold over dot-unchecked border) ──
235
235
  {
236
- appearance: 'dot',
236
+ variant: 'dot',
237
237
  error: true,
238
238
  checked: false,
239
239
  class: { track: 'border-danger' }
@@ -243,7 +243,7 @@ export const toggleVariants = tv({
243
243
  tier: 'commit',
244
244
  size: 'md',
245
245
  intent: 'primary',
246
- appearance: 'default',
246
+ variant: 'default',
247
247
  checked: false,
248
248
  disabled: false,
249
249
  error: false,
@@ -39,19 +39,21 @@ card-with-header look.
39
39
  | Component | Before | After |
40
40
  | ----------- | --------------------- | ---------------------- |
41
41
  | `Alert` | `variant="outlined"` | `variant="inline"` |
42
- | `Accordion` | `variant="bordered"` | `variant="separated"` |
42
+ | `Accordion` | `variant="bordered"` | `variant="card"` |
43
43
 
44
44
  `Alert.inline` is a memo-style with a left accent border (`border-l-2`),
45
- no surrounding box. `Accordion.separated` renders items as a stacked
46
- card list with `surface-quiet` tint and `space-y-2`.
45
+ no surrounding box. `Accordion.card` renders items as a stacked
46
+ card list with `surface-quiet` tint and `space-y-2`. (The value was named
47
+ `separated` from v5.0 to v6.30; it now shares the `card` vocabulary with
48
+ its disclosure sibling `Collapsible`.)
47
49
 
48
50
  ```svelte
49
51
  <!-- v4 -->
50
52
  <Alert variant="outlined" intent="warning">…</Alert>
51
53
  <Accordion variant="bordered">…</Accordion>
52
- <!-- v5 -->
54
+ <!-- current -->
53
55
  <Alert variant="inline" intent="warning">…</Alert>
54
- <Accordion variant="separated">…</Accordion>
56
+ <Accordion variant="card">…</Accordion>
55
57
  ```
56
58
 
57
59
  ## 3. Table chrome
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@urbicon-ui/blocks",
3
- "version": "6.30.1",
3
+ "version": "6.32.0",
4
4
  "description": "Svelte 5 UI component library with Tailwind CSS 4, OKLCH design tokens and zero runtime dependencies",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -31,7 +31,8 @@
31
31
  "format": "biome format --write . && prettier --write \"**/*.svelte\"",
32
32
  "lint": "biome check . && svelte-check --tsconfig ./tsconfig.json",
33
33
  "test": "vitest",
34
- "test:run": "vitest run"
34
+ "test:run": "vitest run",
35
+ "size": "bun scripts/bundle-size.ts"
35
36
  },
36
37
  "files": [
37
38
  "LICENSE",
@@ -94,8 +95,8 @@
94
95
  "@sveltejs/package": "^2.5.8",
95
96
  "@sveltejs/vite-plugin-svelte": "^7.0.0",
96
97
  "@tailwindcss/vite": "^4.3.1",
97
- "@urbicon-ui/i18n": "6.30.1",
98
- "@urbicon-ui/shared-types": "6.30.1",
98
+ "@urbicon-ui/i18n": "6.32.0",
99
+ "@urbicon-ui/shared-types": "6.32.0",
99
100
  "prettier": "^3.8.4",
100
101
  "prettier-plugin-svelte": "^4.1.1",
101
102
  "prettier-plugin-tailwindcss": "^0.8.0",