@urbicon-ui/blocks 6.33.0 → 6.35.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/README.md +11 -1
- package/dist/components/Calendar/CalendarHeader.svelte +32 -26
- package/dist/components/Calendar/CalendarMiniMonth.svelte +10 -10
- package/dist/components/Calendar/calendar.variants.d.ts +63 -63
- package/dist/components/Calendar/calendar.variants.js +19 -5
- package/dist/components/FileUpload/FileUpload.svelte +17 -2
- package/dist/components/Planner/PlannerHeader.svelte +16 -13
- package/dist/components/Planner/planner.variants.js +14 -3
- package/dist/i18n/index.d.ts +467 -205
- package/dist/i18n/index.js +83 -9
- package/dist/internal/core/CoreIconButton.svelte +66 -0
- package/dist/internal/core/CoreIconButton.svelte.d.ts +13 -0
- package/dist/internal/core/CoreSpinner.svelte +49 -0
- package/dist/internal/core/CoreSpinner.svelte.d.ts +8 -0
- package/dist/internal/core/spinner-geometry.d.ts +6 -0
- package/dist/internal/core/spinner-geometry.js +6 -0
- package/dist/mint/README.md +33 -0
- package/dist/mint/compose.d.ts +7 -1
- package/dist/mint/compose.js +35 -8
- package/dist/mint/engine.d.ts +34 -0
- package/dist/mint/engine.js +106 -0
- package/dist/mint/index.d.ts +2 -2
- package/dist/mint/index.js +1 -1
- package/dist/mint/micro-interactions.d.ts +9 -3
- package/dist/mint/micro-interactions.js +18 -87
- package/dist/mint/presets.d.ts +7 -1
- package/dist/mint/presets.js +9 -3
- package/dist/mint/registry.d.ts +61 -4
- package/dist/mint/registry.js +99 -28
- package/dist/mint/ripple.js +1 -1
- package/dist/primitives/Alert/alert.variants.d.ts +8 -8
- package/dist/primitives/Badge/Badge.svelte +5 -5
- package/dist/primitives/Badge/badge.variants.js +17 -1
- package/dist/primitives/Button/Button.svelte +9 -3
- package/dist/primitives/Dialog/Dialog.svelte +7 -5
- package/dist/primitives/Dialog/dialog.variants.d.ts +7 -0
- package/dist/primitives/Dialog/dialog.variants.js +17 -0
- package/dist/primitives/Drawer/Drawer.svelte +7 -5
- package/dist/primitives/Drawer/drawer.variants.d.ts +8 -0
- package/dist/primitives/Drawer/drawer.variants.js +17 -0
- package/dist/primitives/JourneyTimeline/journey-timeline.variants.d.ts +22 -22
- package/dist/primitives/Spinner/Spinner.svelte +3 -1
- package/dist/primitives/Spinner/spinner.variants.d.ts +16 -16
- package/dist/primitives/Stepper/stepper.variants.d.ts +11 -11
- package/dist/primitives/Toast/Toaster.svelte +17 -2
- package/dist/primitives/Toast/toast.variants.d.ts +12 -12
- package/dist/primitives/Tooltip/tooltip.variants.d.ts +3 -3
- package/dist/utils/variants.js +44 -10
- package/package.json +4 -6
|
@@ -7,12 +7,23 @@ export const calendarVariants = tv({
|
|
|
7
7
|
header: ['flex items-center justify-between', 'border-b border-border-hairline'],
|
|
8
8
|
title: 'font-semibold text-text-primary select-none',
|
|
9
9
|
nav: 'flex items-center gap-1',
|
|
10
|
+
// Rendered on the internal CoreIconButton (behaviour-only base: inline-flex
|
|
11
|
+
// centring, cursor/select affordance, focus-visible reset, disabled
|
|
12
|
+
// opacity/cursor/inertness), so this slot carries only the visual identity
|
|
13
|
+
// on top — the classes the core already supplies (inline-flex items-center
|
|
14
|
+
// justify-center, focus-visible:outline-none, disabled:opacity-50,
|
|
15
|
+
// disabled:cursor-not-allowed) are not repeated here. Deliberate deltas vs.
|
|
16
|
+
// the old `<Button unstyled mint="none">` render (which had NO plumbing):
|
|
17
|
+
// `cursor-pointer` (was the UA arrow — Tailwind 4 preflight doesn't set it;
|
|
18
|
+
// now consistent with every styled Button) and `disabled:pointer-events-none`
|
|
19
|
+
// (a disabled nav button is fully inert: no more hover-bg feedback or
|
|
20
|
+
// not-allowed cursor while disabled — matching the styled Button base).
|
|
21
|
+
// Mirrors planner.variants navButton. See internal/core/.
|
|
10
22
|
navButton: [
|
|
11
|
-
'
|
|
23
|
+
'rounded-md',
|
|
12
24
|
'text-text-secondary hover:bg-surface-hover hover:text-text-primary',
|
|
13
25
|
'transition-colors duration-[var(--blocks-duration-fast)]',
|
|
14
|
-
'focus-visible:
|
|
15
|
-
'disabled:opacity-50 disabled:cursor-not-allowed'
|
|
26
|
+
'focus-visible:ring-2 focus-visible:ring-primary/50 focus-visible:ring-offset-2'
|
|
16
27
|
],
|
|
17
28
|
// Grid
|
|
18
29
|
grid: 'w-full',
|
|
@@ -131,11 +142,14 @@ export const calendarVariants = tv({
|
|
|
131
142
|
miniCalendar: ['shrink-0 flex flex-col', 'border-r border-border-hairline'],
|
|
132
143
|
miniCalendarHeader: 'flex items-center justify-between',
|
|
133
144
|
miniCalendarTitle: 'font-semibold text-text-primary text-center select-none',
|
|
145
|
+
// Rendered on the internal CoreIconButton — same plumbing/slot split as
|
|
146
|
+
// `navButton` above (and the same deliberate cursor-pointer delta); these
|
|
147
|
+
// buttons are never disabled, so the disabled plumbing is inert.
|
|
134
148
|
miniCalendarNavButton: [
|
|
135
|
-
'
|
|
149
|
+
'rounded-md',
|
|
136
150
|
'text-text-secondary hover:bg-surface-hover hover:text-text-primary',
|
|
137
151
|
'transition-colors duration-[var(--blocks-duration-fast)]',
|
|
138
|
-
'focus-visible:
|
|
152
|
+
'focus-visible:ring-2 focus-visible:ring-primary/50'
|
|
139
153
|
],
|
|
140
154
|
miniCalendarWeekday: 'text-center text-text-tertiary select-none font-medium',
|
|
141
155
|
miniCalendarDay: [
|
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
import DangerCircleIconDefault from '../../icons/DangerCircleIcon.svelte';
|
|
18
18
|
import { mintRegistry } from '../../mint';
|
|
19
19
|
import { Progress } from '../../primitives/Progress';
|
|
20
|
-
import
|
|
20
|
+
// internal core, not the public component — keeps the public-to-public import graph clean (see internal/core/)
|
|
21
|
+
import CoreSpinner from '../../internal/core/CoreSpinner.svelte';
|
|
21
22
|
import { fly } from 'svelte/transition';
|
|
22
23
|
import { quintOut } from 'svelte/easing';
|
|
23
24
|
import { onDestroy } from 'svelte';
|
|
@@ -520,7 +521,21 @@
|
|
|
520
521
|
<!-- Status indicator -->
|
|
521
522
|
<div class={slot('fileItemStatusIcon')}>
|
|
522
523
|
{#if entry.status === 'uploading'}
|
|
523
|
-
|
|
524
|
+
<!--
|
|
525
|
+
CoreSpinner instead of the public Spinner (see internal/core/).
|
|
526
|
+
The old call was `visible` (explicitly true) with no label
|
|
527
|
+
override, and this branch already gates rendering on the
|
|
528
|
+
uploading status — so the core needs no {#if} of its own.
|
|
529
|
+
Deliberate a11y delta: the old Spinner emitted role="status" +
|
|
530
|
+
aria-live + an sr-only "Loading..." inside the file list's own
|
|
531
|
+
aria-live="polite" region (nested live regions); the core emits
|
|
532
|
+
no semantics — the list region owns announcements. `text-primary`
|
|
533
|
+
pins the old default color (the public Spinner's intent default),
|
|
534
|
+
matching the explicit text-success/text-danger on the sibling
|
|
535
|
+
status icons; it wins the duel against the core's `text-current`
|
|
536
|
+
by stylesheet order (theme colors sort after keyword colors).
|
|
537
|
+
-->
|
|
538
|
+
<CoreSpinner size="xs" class="text-primary" />
|
|
524
539
|
{:else if entry.status === 'complete'}
|
|
525
540
|
<CheckCircleIcon size={itemIconSize} class="text-success" />
|
|
526
541
|
{:else if entry.status === 'error'}
|
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
-->
|
|
7
7
|
<script lang="ts">
|
|
8
8
|
import { useBlocksI18n } from '../..';
|
|
9
|
-
import
|
|
9
|
+
// internal core, not the public component — keeps the public-to-public import graph clean (see internal/core/)
|
|
10
|
+
import CoreIconButton from '../../internal/core/CoreIconButton.svelte';
|
|
10
11
|
import { Tooltip } from '../../primitives/Tooltip';
|
|
11
12
|
import { resolveIcon } from '../../icons';
|
|
12
13
|
import ChevronLeftIconDefault from '../../icons/ChevronLeftIcon.svelte';
|
|
@@ -37,44 +38,46 @@
|
|
|
37
38
|
);
|
|
38
39
|
</script>
|
|
39
40
|
|
|
41
|
+
<!--
|
|
42
|
+
Nav buttons render on the internal CoreIconButton (was `<Button unstyled
|
|
43
|
+
mint="none">`, which emitted only the call-site classes). The core's plumbing
|
|
44
|
+
overlaps the navButton slot's old baseline (inline-flex centring, focus-visible
|
|
45
|
+
reset, disabled opacity/cursor — now supplied by the core, stripped from the
|
|
46
|
+
slot); the deliberate deltas it introduces are documented on the slot in
|
|
47
|
+
planner.variants.ts.
|
|
48
|
+
-->
|
|
40
49
|
<div class={ctx.slot('header')}>
|
|
41
50
|
<div class={ctx.slot('nav')}>
|
|
42
|
-
<
|
|
43
|
-
unstyled
|
|
44
|
-
mint="none"
|
|
51
|
+
<CoreIconButton
|
|
45
52
|
class={ctx.slot('navButton')}
|
|
46
53
|
onclick={() => ctx.navigate(-1)}
|
|
47
54
|
disabled={!ctx.canGoBack || ctx.disabled}
|
|
48
55
|
aria-label={prevLabel}
|
|
49
56
|
>
|
|
50
57
|
<ChevronLeftIcon size={16} />
|
|
51
|
-
</
|
|
58
|
+
</CoreIconButton>
|
|
52
59
|
</div>
|
|
53
60
|
|
|
54
61
|
<span class={ctx.slot('headerTitle')}>{ctx.title}</span>
|
|
55
62
|
|
|
56
63
|
<div class={ctx.slot('nav')}>
|
|
57
64
|
<Tooltip label={bt('planner.today')}>
|
|
58
|
-
<
|
|
59
|
-
unstyled
|
|
60
|
-
mint="none"
|
|
65
|
+
<CoreIconButton
|
|
61
66
|
class={ctx.slot('navButton')}
|
|
62
67
|
onclick={() => ctx.goToToday()}
|
|
63
68
|
disabled={!ctx.canGoToToday || ctx.disabled}
|
|
64
69
|
aria-label={bt('planner.today')}
|
|
65
70
|
>
|
|
66
71
|
<CalendarDaysIcon size={16} />
|
|
67
|
-
</
|
|
72
|
+
</CoreIconButton>
|
|
68
73
|
</Tooltip>
|
|
69
|
-
<
|
|
70
|
-
unstyled
|
|
71
|
-
mint="none"
|
|
74
|
+
<CoreIconButton
|
|
72
75
|
class={ctx.slot('navButton')}
|
|
73
76
|
onclick={() => ctx.navigate(1)}
|
|
74
77
|
disabled={!ctx.canGoForward || ctx.disabled}
|
|
75
78
|
aria-label={nextLabel}
|
|
76
79
|
>
|
|
77
80
|
<ChevronRightIcon size={16} />
|
|
78
|
-
</
|
|
81
|
+
</CoreIconButton>
|
|
79
82
|
</div>
|
|
80
83
|
</div>
|
|
@@ -14,12 +14,23 @@ export const plannerVariants = tv({
|
|
|
14
14
|
header: ['flex items-center justify-between gap-2', 'border-b border-border-hairline'],
|
|
15
15
|
headerTitle: 'font-semibold text-text-primary select-none tabular-nums',
|
|
16
16
|
nav: 'flex items-center gap-1',
|
|
17
|
+
// Rendered on the internal CoreIconButton (behaviour-only base: inline-flex
|
|
18
|
+
// centring, cursor/select affordance, focus-visible reset, disabled
|
|
19
|
+
// opacity/cursor/inertness), so this slot carries only the visual identity
|
|
20
|
+
// on top — the classes the core already supplies (inline-flex items-center
|
|
21
|
+
// justify-center, focus-visible:outline-none, disabled:opacity-50,
|
|
22
|
+
// disabled:cursor-not-allowed) are not repeated here. Deliberate deltas vs.
|
|
23
|
+
// the old `<Button unstyled mint="none">` render (which had NO plumbing):
|
|
24
|
+
// `cursor-pointer` (was the UA arrow — Tailwind 4 preflight doesn't set it;
|
|
25
|
+
// now consistent with every styled Button) and `disabled:pointer-events-none`
|
|
26
|
+
// (a disabled nav button is fully inert: no more hover-bg feedback or
|
|
27
|
+
// not-allowed cursor while disabled — matching the styled Button base).
|
|
28
|
+
// Mirrors calendar.variants navButton. See internal/core/.
|
|
17
29
|
navButton: [
|
|
18
|
-
'
|
|
30
|
+
'rounded-md',
|
|
19
31
|
'text-text-secondary hover:bg-surface-hover hover:text-text-primary',
|
|
20
32
|
'transition-colors duration-[var(--blocks-duration-fast)]',
|
|
21
|
-
'focus-visible:
|
|
22
|
-
'disabled:opacity-50 disabled:cursor-not-allowed'
|
|
33
|
+
'focus-visible:ring-2 focus-visible:ring-primary/50 focus-visible:ring-offset-2'
|
|
23
34
|
],
|
|
24
35
|
// Grid scaffolding
|
|
25
36
|
grid: 'w-full',
|