@urbicon-ui/blocks 6.19.0 → 6.19.2
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 +5 -5
- package/dist/components/AreaChart/AreaChart.svelte +7 -3
- package/dist/components/BarChart/BarChart.svelte +7 -3
- package/dist/components/Calendar/Calendar.svelte +46 -29
- package/dist/components/Calendar/CalendarAgendaView.svelte +1 -1
- package/dist/components/Calendar/CalendarDayView.svelte +19 -39
- package/dist/components/Calendar/CalendarDayView.svelte.d.ts +1 -3
- package/dist/components/Calendar/CalendarEventItem.svelte +0 -1
- package/dist/components/Calendar/CalendarGrid.svelte +12 -8
- package/dist/components/Calendar/CalendarHeader.svelte +2 -2
- package/dist/components/Calendar/CalendarMiniMonth.svelte +0 -2
- package/dist/components/Calendar/CalendarTimeEvent.svelte +1 -1
- package/dist/components/Calendar/CalendarTimeGrid.svelte +0 -3
- package/dist/components/Calendar/CalendarWeekGrid.svelte +1 -1
- package/dist/components/Calendar/calendar.context.d.ts +1 -0
- package/dist/components/Calendar/calendar.types.d.ts +2 -0
- package/dist/components/Calendar/calendar.variants.d.ts +0 -12
- package/dist/components/Calendar/calendar.variants.js +0 -4
- package/dist/components/Calendar/index.d.ts +6 -2
- package/dist/components/CompositionBar/CompositionBar.svelte +1 -1
- package/dist/components/CompositionBar/composition-bar.variants.d.ts +15 -16
- package/dist/components/CompositionBar/composition-bar.variants.js +4 -2
- package/dist/components/CompositionBar/index.d.ts +1 -1
- package/dist/components/CurrencyInput/CurrencyInput.svelte +10 -4
- package/dist/components/CurrencyInput/index.d.ts +13 -11
- package/dist/components/DatePicker/DatePicker.svelte +5 -3
- package/dist/components/DatePicker/DateRangePicker.svelte +3 -3
- package/dist/components/DatePicker/datepicker.engine.d.ts +6 -6
- package/dist/components/DatePicker/datepicker.engine.js +13 -13
- package/dist/components/DonutChart/DonutChart.svelte +5 -3
- package/dist/components/LineChart/LineChart.svelte +7 -3
- package/dist/components/Planner/Planner.svelte +7 -3
- package/dist/components/Planner/PlannerHeader.svelte +1 -1
- package/dist/components/Planner/planner.types.d.ts +3 -0
- package/dist/date/compare.d.ts +8 -0
- package/dist/date/compare.js +15 -0
- package/dist/date/index.d.ts +1 -1
- package/dist/date/index.js +1 -1
- package/dist/i18n/index.d.ts +24 -378
- package/dist/internal/date-grid/date-grid.svelte.d.ts +18 -3
- package/dist/internal/date-grid/date-grid.svelte.js +60 -19
- package/dist/internal/date-grid/index.d.ts +2 -2
- package/dist/internal/date-grid/index.js +2 -2
- package/dist/mint/README.md +12 -9
- package/dist/mint/registry.js +12 -0
- package/dist/primitives/Badge/badge.variants.d.ts +0 -1
- package/dist/primitives/Badge/badge.variants.js +1 -2
- package/dist/primitives/Breadcrumb/Breadcrumb.svelte +1 -2
- package/dist/primitives/ButtonGroup/ButtonGroup.svelte +1 -1
- package/dist/primitives/Combobox/Combobox.svelte +9 -1
- package/dist/primitives/Combobox/combobox.variants.d.ts +29 -0
- package/dist/primitives/Combobox/combobox.variants.js +22 -7
- package/dist/primitives/Menu/Menu.svelte +2 -2
- package/dist/primitives/Pagination/Pagination.svelte +10 -2
- package/dist/primitives/Pagination/PaginationItem.svelte +0 -2
- package/dist/primitives/Select/Select.svelte +0 -1
- package/dist/primitives/Stepper/StepperStep.svelte +3 -1
- package/dist/translations/de.d.ts +11 -7
- package/dist/translations/de.js +12 -8
- package/dist/translations/en.d.ts +11 -7
- package/dist/translations/en.js +12 -8
- package/dist/utils/date.d.ts +5 -0
- package/dist/utils/date.js +34 -24
- package/package.json +3 -3
package/dist/mint/README.md
CHANGED
|
@@ -98,7 +98,7 @@ interface RippleConfig extends MintConfig {
|
|
|
98
98
|
## Presets
|
|
99
99
|
|
|
100
100
|
```typescript
|
|
101
|
-
import { mintPresets } from '@urbicon/
|
|
101
|
+
import { mintPresets } from '@urbicon-ui/blocks';
|
|
102
102
|
|
|
103
103
|
// Verfügbare Presets
|
|
104
104
|
mintPresets['cta-primary']; // Für primäre Call-to-Action Buttons
|
|
@@ -108,21 +108,24 @@ mintPresets['subtle-hover']; // Für subtile Hover-Effekte
|
|
|
108
108
|
mintPresets['error-feedback']; // Für Fehler-Feedback
|
|
109
109
|
```
|
|
110
110
|
|
|
111
|
-
## Svelte
|
|
111
|
+
## Svelte 5 Attachments
|
|
112
112
|
|
|
113
113
|
```svelte
|
|
114
114
|
<script>
|
|
115
|
-
import {
|
|
115
|
+
import { mintRegistry } from '@urbicon-ui/blocks';
|
|
116
|
+
|
|
117
|
+
// {@attach} factory — mintRegistry.apply returns the cleanup the attachment needs
|
|
118
|
+
const mint = (mints) => (element) => mintRegistry.apply(element, mints);
|
|
116
119
|
</script>
|
|
117
120
|
|
|
118
|
-
<!--
|
|
119
|
-
<div
|
|
121
|
+
<!-- Einzelner Mint -->
|
|
122
|
+
<div {@attach mint('scale')}>Hover mich</div>
|
|
120
123
|
|
|
121
124
|
<!-- Mehrere Mints -->
|
|
122
|
-
<div
|
|
125
|
+
<div {@attach mint(['scale', 'glow'])}>Multi-Effekt</div>
|
|
123
126
|
|
|
124
127
|
<!-- Mit Konfiguration -->
|
|
125
|
-
<div
|
|
128
|
+
<div {@attach mint({ name: 'bounce', config: { trigger: 'click' } })}>
|
|
126
129
|
Click mich
|
|
127
130
|
</div>
|
|
128
131
|
```
|
|
@@ -130,7 +133,7 @@ mintPresets['error-feedback']; // Für Fehler-Feedback
|
|
|
130
133
|
## Eigene Mints registrieren
|
|
131
134
|
|
|
132
135
|
```typescript
|
|
133
|
-
import { mintRegistry } from '@urbicon/
|
|
136
|
+
import { mintRegistry } from '@urbicon-ui/blocks';
|
|
134
137
|
|
|
135
138
|
// Einfacher Mint
|
|
136
139
|
mintRegistry.register('my-mint', (config) => ({
|
|
@@ -203,7 +206,7 @@ const complexMint = [
|
|
|
203
206
|
### Custom Mint Bundle
|
|
204
207
|
|
|
205
208
|
```typescript
|
|
206
|
-
import { registerPlayfulMints, registerBusinessMints } from '@urbicon/
|
|
209
|
+
import { registerPlayfulMints, registerBusinessMints } from '@urbicon-ui/blocks';
|
|
207
210
|
|
|
208
211
|
// Je nach App-Kontext
|
|
209
212
|
if (appTheme === 'playful') {
|
package/dist/mint/registry.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { registerDefaultMints } from './presets.js';
|
|
1
2
|
class MintRegistry {
|
|
2
3
|
mints = new Map();
|
|
3
4
|
instances = new WeakMap();
|
|
@@ -15,6 +16,17 @@ class MintRegistry {
|
|
|
15
16
|
}
|
|
16
17
|
/** Apply mints to an element using polymorphic input */
|
|
17
18
|
apply(el, mint) {
|
|
19
|
+
// Ensure the built-in mints (scale, glow, ripple, …) are registered before
|
|
20
|
+
// the first application. Components declare mint defaults — Button defaults
|
|
21
|
+
// to 'scale' — so a consumer that never called registerDefaultMints() would
|
|
22
|
+
// otherwise hit "Unknown mint: scale" on every button (and get no hover
|
|
23
|
+
// animation). registerDefaultMints() short-circuits on a module-level flag,
|
|
24
|
+
// so the recurring cost is a single boolean check.
|
|
25
|
+
//
|
|
26
|
+
// The registry ↔ presets import is cyclic but inert: both sides dereference
|
|
27
|
+
// the cyclic binding only at call time, never at module top level, so module
|
|
28
|
+
// initialisation completes cleanly regardless of load order.
|
|
29
|
+
registerDefaultMints();
|
|
18
30
|
const mintDefinitions = this.normalizeMintProp(mint);
|
|
19
31
|
const elementMints = new Map();
|
|
20
32
|
const cleanupFunctions = [];
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
aria-current="page">{entry.item.label}</span
|
|
116
116
|
>
|
|
117
117
|
{:else}
|
|
118
|
-
<!--
|
|
118
|
+
<!-- BreadcrumbItem.href is opaque to the library; resolve() is the consumer's responsibility. -->
|
|
119
119
|
<a
|
|
120
120
|
href={entry.item.href}
|
|
121
121
|
class={unstyled ? (slotClasses?.link ?? '') : styles.link({ class: slotClasses?.link })}
|
|
@@ -124,7 +124,6 @@
|
|
|
124
124
|
>
|
|
125
125
|
{entry.item.label}
|
|
126
126
|
</a>
|
|
127
|
-
<!-- eslint-enable svelte/no-navigation-without-resolve -->
|
|
128
127
|
{/if}
|
|
129
128
|
{#if i < entries.length - 1}
|
|
130
129
|
<span
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
onClick() {
|
|
74
74
|
if (disabled || !buttonValue || selection === 'none') return;
|
|
75
75
|
|
|
76
|
-
//
|
|
76
|
+
// Local-only copy, not stored in state.
|
|
77
77
|
const next = new Set(selectedValues);
|
|
78
78
|
|
|
79
79
|
if (selection === 'single') {
|
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
required = false,
|
|
28
28
|
filter,
|
|
29
29
|
tier,
|
|
30
|
+
variant = 'outlined',
|
|
30
31
|
size = 'md',
|
|
31
32
|
clearable = false,
|
|
32
33
|
disabled = false,
|
|
@@ -89,7 +90,13 @@
|
|
|
89
90
|
return options.filter((o) => filterFn(o, query.trim()));
|
|
90
91
|
});
|
|
91
92
|
|
|
92
|
-
const variantProps: ComboboxVariants = $derived({
|
|
93
|
+
const variantProps: ComboboxVariants = $derived({
|
|
94
|
+
variant,
|
|
95
|
+
tier: effectiveTier,
|
|
96
|
+
size,
|
|
97
|
+
open,
|
|
98
|
+
disabled
|
|
99
|
+
});
|
|
93
100
|
const styles = $derived(comboboxVariants(variantProps));
|
|
94
101
|
|
|
95
102
|
const slotClasses = $derived(
|
|
@@ -352,6 +359,7 @@
|
|
|
352
359
|
{#if clearable && value}
|
|
353
360
|
<button
|
|
354
361
|
type="button"
|
|
362
|
+
{disabled}
|
|
355
363
|
class={unstyled ? (slotClasses?.clear ?? '') : styles.clear({ class: slotClasses?.clear })}
|
|
356
364
|
onclick={clear}
|
|
357
365
|
aria-label={bt('accessibility.clearSelection')}
|
|
@@ -8,6 +8,20 @@ export declare const comboboxVariants: (props?: import("../../utils/variants.js"
|
|
|
8
8
|
input: string;
|
|
9
9
|
};
|
|
10
10
|
};
|
|
11
|
+
variant: {
|
|
12
|
+
outlined: {
|
|
13
|
+
input: string;
|
|
14
|
+
};
|
|
15
|
+
filled: {
|
|
16
|
+
input: string;
|
|
17
|
+
};
|
|
18
|
+
ghost: {
|
|
19
|
+
input: string;
|
|
20
|
+
};
|
|
21
|
+
underline: {
|
|
22
|
+
input: string;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
11
25
|
size: {
|
|
12
26
|
sm: {
|
|
13
27
|
input: string;
|
|
@@ -35,6 +49,7 @@ export declare const comboboxVariants: (props?: import("../../utils/variants.js"
|
|
|
35
49
|
}> | undefined) => {
|
|
36
50
|
base: (props?: ({
|
|
37
51
|
tier?: "commit" | "modify" | undefined;
|
|
52
|
+
variant?: "ghost" | "filled" | "outlined" | "underline" | undefined;
|
|
38
53
|
size?: "sm" | "md" | "lg" | undefined;
|
|
39
54
|
open?: boolean | undefined;
|
|
40
55
|
disabled?: boolean | undefined;
|
|
@@ -44,6 +59,7 @@ export declare const comboboxVariants: (props?: import("../../utils/variants.js"
|
|
|
44
59
|
}) | undefined) => string;
|
|
45
60
|
label: (props?: ({
|
|
46
61
|
tier?: "commit" | "modify" | undefined;
|
|
62
|
+
variant?: "ghost" | "filled" | "outlined" | "underline" | undefined;
|
|
47
63
|
size?: "sm" | "md" | "lg" | undefined;
|
|
48
64
|
open?: boolean | undefined;
|
|
49
65
|
disabled?: boolean | undefined;
|
|
@@ -53,6 +69,7 @@ export declare const comboboxVariants: (props?: import("../../utils/variants.js"
|
|
|
53
69
|
}) | undefined) => string;
|
|
54
70
|
requiredMark: (props?: ({
|
|
55
71
|
tier?: "commit" | "modify" | undefined;
|
|
72
|
+
variant?: "ghost" | "filled" | "outlined" | "underline" | undefined;
|
|
56
73
|
size?: "sm" | "md" | "lg" | undefined;
|
|
57
74
|
open?: boolean | undefined;
|
|
58
75
|
disabled?: boolean | undefined;
|
|
@@ -62,6 +79,7 @@ export declare const comboboxVariants: (props?: import("../../utils/variants.js"
|
|
|
62
79
|
}) | undefined) => string;
|
|
63
80
|
inputWrapper: (props?: ({
|
|
64
81
|
tier?: "commit" | "modify" | undefined;
|
|
82
|
+
variant?: "ghost" | "filled" | "outlined" | "underline" | undefined;
|
|
65
83
|
size?: "sm" | "md" | "lg" | undefined;
|
|
66
84
|
open?: boolean | undefined;
|
|
67
85
|
disabled?: boolean | undefined;
|
|
@@ -71,6 +89,7 @@ export declare const comboboxVariants: (props?: import("../../utils/variants.js"
|
|
|
71
89
|
}) | undefined) => string;
|
|
72
90
|
input: (props?: ({
|
|
73
91
|
tier?: "commit" | "modify" | undefined;
|
|
92
|
+
variant?: "ghost" | "filled" | "outlined" | "underline" | undefined;
|
|
74
93
|
size?: "sm" | "md" | "lg" | undefined;
|
|
75
94
|
open?: boolean | undefined;
|
|
76
95
|
disabled?: boolean | undefined;
|
|
@@ -80,6 +99,7 @@ export declare const comboboxVariants: (props?: import("../../utils/variants.js"
|
|
|
80
99
|
}) | undefined) => string;
|
|
81
100
|
message: (props?: ({
|
|
82
101
|
tier?: "commit" | "modify" | undefined;
|
|
102
|
+
variant?: "ghost" | "filled" | "outlined" | "underline" | undefined;
|
|
83
103
|
size?: "sm" | "md" | "lg" | undefined;
|
|
84
104
|
open?: boolean | undefined;
|
|
85
105
|
disabled?: boolean | undefined;
|
|
@@ -89,6 +109,7 @@ export declare const comboboxVariants: (props?: import("../../utils/variants.js"
|
|
|
89
109
|
}) | undefined) => string;
|
|
90
110
|
hint: (props?: ({
|
|
91
111
|
tier?: "commit" | "modify" | undefined;
|
|
112
|
+
variant?: "ghost" | "filled" | "outlined" | "underline" | undefined;
|
|
92
113
|
size?: "sm" | "md" | "lg" | undefined;
|
|
93
114
|
open?: boolean | undefined;
|
|
94
115
|
disabled?: boolean | undefined;
|
|
@@ -98,6 +119,7 @@ export declare const comboboxVariants: (props?: import("../../utils/variants.js"
|
|
|
98
119
|
}) | undefined) => string;
|
|
99
120
|
listbox: (props?: ({
|
|
100
121
|
tier?: "commit" | "modify" | undefined;
|
|
122
|
+
variant?: "ghost" | "filled" | "outlined" | "underline" | undefined;
|
|
101
123
|
size?: "sm" | "md" | "lg" | undefined;
|
|
102
124
|
open?: boolean | undefined;
|
|
103
125
|
disabled?: boolean | undefined;
|
|
@@ -107,6 +129,7 @@ export declare const comboboxVariants: (props?: import("../../utils/variants.js"
|
|
|
107
129
|
}) | undefined) => string;
|
|
108
130
|
option: (props?: ({
|
|
109
131
|
tier?: "commit" | "modify" | undefined;
|
|
132
|
+
variant?: "ghost" | "filled" | "outlined" | "underline" | undefined;
|
|
110
133
|
size?: "sm" | "md" | "lg" | undefined;
|
|
111
134
|
open?: boolean | undefined;
|
|
112
135
|
disabled?: boolean | undefined;
|
|
@@ -116,6 +139,7 @@ export declare const comboboxVariants: (props?: import("../../utils/variants.js"
|
|
|
116
139
|
}) | undefined) => string;
|
|
117
140
|
optionActive: (props?: ({
|
|
118
141
|
tier?: "commit" | "modify" | undefined;
|
|
142
|
+
variant?: "ghost" | "filled" | "outlined" | "underline" | undefined;
|
|
119
143
|
size?: "sm" | "md" | "lg" | undefined;
|
|
120
144
|
open?: boolean | undefined;
|
|
121
145
|
disabled?: boolean | undefined;
|
|
@@ -125,6 +149,7 @@ export declare const comboboxVariants: (props?: import("../../utils/variants.js"
|
|
|
125
149
|
}) | undefined) => string;
|
|
126
150
|
optionSelected: (props?: ({
|
|
127
151
|
tier?: "commit" | "modify" | undefined;
|
|
152
|
+
variant?: "ghost" | "filled" | "outlined" | "underline" | undefined;
|
|
128
153
|
size?: "sm" | "md" | "lg" | undefined;
|
|
129
154
|
open?: boolean | undefined;
|
|
130
155
|
disabled?: boolean | undefined;
|
|
@@ -134,6 +159,7 @@ export declare const comboboxVariants: (props?: import("../../utils/variants.js"
|
|
|
134
159
|
}) | undefined) => string;
|
|
135
160
|
noResults: (props?: ({
|
|
136
161
|
tier?: "commit" | "modify" | undefined;
|
|
162
|
+
variant?: "ghost" | "filled" | "outlined" | "underline" | undefined;
|
|
137
163
|
size?: "sm" | "md" | "lg" | undefined;
|
|
138
164
|
open?: boolean | undefined;
|
|
139
165
|
disabled?: boolean | undefined;
|
|
@@ -143,6 +169,7 @@ export declare const comboboxVariants: (props?: import("../../utils/variants.js"
|
|
|
143
169
|
}) | undefined) => string;
|
|
144
170
|
clear: (props?: ({
|
|
145
171
|
tier?: "commit" | "modify" | undefined;
|
|
172
|
+
variant?: "ghost" | "filled" | "outlined" | "underline" | undefined;
|
|
146
173
|
size?: "sm" | "md" | "lg" | undefined;
|
|
147
174
|
open?: boolean | undefined;
|
|
148
175
|
disabled?: boolean | undefined;
|
|
@@ -152,6 +179,7 @@ export declare const comboboxVariants: (props?: import("../../utils/variants.js"
|
|
|
152
179
|
}) | undefined) => string;
|
|
153
180
|
chevronButton: (props?: ({
|
|
154
181
|
tier?: "commit" | "modify" | undefined;
|
|
182
|
+
variant?: "ghost" | "filled" | "outlined" | "underline" | undefined;
|
|
155
183
|
size?: "sm" | "md" | "lg" | undefined;
|
|
156
184
|
open?: boolean | undefined;
|
|
157
185
|
disabled?: boolean | undefined;
|
|
@@ -161,6 +189,7 @@ export declare const comboboxVariants: (props?: import("../../utils/variants.js"
|
|
|
161
189
|
}) | undefined) => string;
|
|
162
190
|
chevron: (props?: ({
|
|
163
191
|
tier?: "commit" | "modify" | undefined;
|
|
192
|
+
variant?: "ghost" | "filled" | "outlined" | "underline" | undefined;
|
|
164
193
|
size?: "sm" | "md" | "lg" | undefined;
|
|
165
194
|
open?: boolean | undefined;
|
|
166
195
|
disabled?: boolean | undefined;
|
|
@@ -6,13 +6,10 @@ export const comboboxVariants = tv({
|
|
|
6
6
|
requiredMark: 'text-danger ml-0.5',
|
|
7
7
|
inputWrapper: 'relative w-full',
|
|
8
8
|
input: [
|
|
9
|
-
// Radius driven by `tier` axis below
|
|
10
|
-
|
|
11
|
-
//
|
|
12
|
-
|
|
13
|
-
// `border-neutral` intent token is reserved for Action surfaces
|
|
14
|
-
// (Outline-Button, Menu) where the border needs to read as clickable.
|
|
15
|
-
'border-border-subtle hover:border-border-default placeholder:text-text-tertiary',
|
|
9
|
+
// Radius driven by `tier` axis below; the `underline` variant overrides
|
|
10
|
+
// it to `rounded-none`. Border color and background come from the
|
|
11
|
+
// `variant` axis (default `outlined` keeps the historical look).
|
|
12
|
+
'w-full border bg-surface-base text-text-primary placeholder:text-text-tertiary',
|
|
16
13
|
'transition-colors duration-[var(--blocks-duration-fast)]',
|
|
17
14
|
'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/50 focus-visible:border-primary',
|
|
18
15
|
'disabled:opacity-50 disabled:cursor-not-allowed'
|
|
@@ -70,6 +67,23 @@ export const comboboxVariants = tv({
|
|
|
70
67
|
modify: { input: 'rounded-modify' },
|
|
71
68
|
commit: { input: 'rounded-commit' }
|
|
72
69
|
},
|
|
70
|
+
// Visual style, at parity with Input / Textarea / Select. Default
|
|
71
|
+
// `outlined` reproduces the historical Combobox frame exactly.
|
|
72
|
+
variant: {
|
|
73
|
+
// Surface-family border: form-control frames stay quiet (`border-subtle`);
|
|
74
|
+
// the `border-neutral` intent token is reserved for Action surfaces
|
|
75
|
+
// (Outline-Button, Menu) where the border must read as clickable.
|
|
76
|
+
outlined: { input: 'border-border-subtle hover:border-border-default' },
|
|
77
|
+
filled: {
|
|
78
|
+
input: 'bg-surface-interactive border-transparent hover:bg-surface-hover focus-visible:bg-surface-base'
|
|
79
|
+
},
|
|
80
|
+
ghost: {
|
|
81
|
+
input: 'bg-transparent border-transparent hover:bg-surface-subtle focus-visible:bg-surface-base focus-visible:border-border-subtle'
|
|
82
|
+
},
|
|
83
|
+
underline: {
|
|
84
|
+
input: 'bg-transparent border-0 border-b-2 border-border-subtle rounded-none focus-visible:ring-0'
|
|
85
|
+
}
|
|
86
|
+
},
|
|
73
87
|
size: {
|
|
74
88
|
sm: {
|
|
75
89
|
// `pointer-coarse:text-base` floors the input to 16px on touch-primary
|
|
@@ -95,6 +109,7 @@ export const comboboxVariants = tv({
|
|
|
95
109
|
},
|
|
96
110
|
defaultVariants: {
|
|
97
111
|
tier: 'modify',
|
|
112
|
+
variant: 'outlined',
|
|
98
113
|
size: 'md',
|
|
99
114
|
open: false,
|
|
100
115
|
disabled: false
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
// `registerItem` / `unregisterItem` hooks. Used to debug + (in future)
|
|
76
76
|
// power type-ahead search; the keyboard model itself walks DOM-focusable
|
|
77
77
|
// descendants directly so it works in array-mode too.
|
|
78
|
-
//
|
|
78
|
+
// Plain Map — internal registry, not reactive UI state.
|
|
79
79
|
const registryBuffer: Map<string, MenuRegistryItem> = new Map();
|
|
80
80
|
|
|
81
81
|
// ── Item-shape mappers ─────────────────────────────────────────────────
|
|
@@ -148,7 +148,7 @@
|
|
|
148
148
|
}
|
|
149
149
|
|
|
150
150
|
function toggleSubMenu(id: string) {
|
|
151
|
-
//
|
|
151
|
+
// Copy + reassign keeps `openSubMenus` reactive.
|
|
152
152
|
const next = new Set(openSubMenus);
|
|
153
153
|
if (next.has(id)) next.delete(id);
|
|
154
154
|
else next.add(id);
|
|
@@ -149,10 +149,18 @@
|
|
|
149
149
|
if (infoText) return infoText;
|
|
150
150
|
|
|
151
151
|
if (layout === 'table') {
|
|
152
|
-
return
|
|
152
|
+
return bt('pagination.rangeInfo', {
|
|
153
|
+
start: calculatedStartItem,
|
|
154
|
+
end: calculatedEndItem,
|
|
155
|
+
total: calculatedTotalItems
|
|
156
|
+
});
|
|
153
157
|
}
|
|
154
158
|
|
|
155
|
-
return
|
|
159
|
+
return bt('pagination.pageInfo', {
|
|
160
|
+
label: pageLabel,
|
|
161
|
+
current: currentPage,
|
|
162
|
+
total: totalPages
|
|
163
|
+
});
|
|
156
164
|
});
|
|
157
165
|
</script>
|
|
158
166
|
|
|
@@ -29,7 +29,6 @@
|
|
|
29
29
|
<!-- Link-based pagination item. `href` is consumer-provided (internal or
|
|
30
30
|
external) — `resolve()` only applies to statically-known SvelteKit
|
|
31
31
|
routes. -->
|
|
32
|
-
<!-- eslint-disable svelte/no-navigation-without-resolve -->
|
|
33
32
|
<a
|
|
34
33
|
{href}
|
|
35
34
|
class="focus-visible:outline-primary/50 inline-block no-underline focus-visible:rounded-md focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 {className}"
|
|
@@ -55,7 +54,6 @@
|
|
|
55
54
|
{/if}
|
|
56
55
|
</Button>
|
|
57
56
|
</a>
|
|
58
|
-
<!-- eslint-enable svelte/no-navigation-without-resolve -->
|
|
59
57
|
{:else}
|
|
60
58
|
<!-- Button-based pagination item -->
|
|
61
59
|
<Button
|
|
@@ -63,7 +63,6 @@
|
|
|
63
63
|
// `<Select bind:value={x: T | null}>` narrow correctly. Internally we
|
|
64
64
|
// dispatch through a loose alias so the component code can hand either
|
|
65
65
|
// shape into `onValueChange` without per-branch casts at every call site.
|
|
66
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- internal dispatch escape hatch (see comment above)
|
|
67
66
|
const dispatchValueChange = onValueChange as ((v: any) => void) | undefined;
|
|
68
67
|
|
|
69
68
|
/** Resolved null option config — `null` when prop is unset or `groups` is in use. */
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { getBlocksConfig, resolveSlotClasses } from '../../provider';
|
|
3
|
+
import { useBlocksI18n } from '../..';
|
|
3
4
|
import { stepperVariants, type StepperVariants } from './stepper.variants';
|
|
4
5
|
import { getStepperContext } from './stepper.context';
|
|
5
6
|
import { resolveIcon } from '../../icons';
|
|
@@ -28,6 +29,7 @@
|
|
|
28
29
|
}: StepperStepProps = $props();
|
|
29
30
|
|
|
30
31
|
const blocksConfig = getBlocksConfig();
|
|
32
|
+
const bt = useBlocksI18n();
|
|
31
33
|
const unstyled = $derived(unstyledProp || blocksConfig?.unstyled || false);
|
|
32
34
|
|
|
33
35
|
const ctx = getStepperContext();
|
|
@@ -130,7 +132,7 @@
|
|
|
130
132
|
<span class={slot('description')}>{description}</span>
|
|
131
133
|
{/if}
|
|
132
134
|
{#if optional}
|
|
133
|
-
<span class="{slot('description')} italic">
|
|
135
|
+
<span class="{slot('description')} italic">{bt('stepper.optional')}</span>
|
|
134
136
|
{/if}
|
|
135
137
|
</div>
|
|
136
138
|
{/snippet}
|
|
@@ -50,6 +50,8 @@ declare const _default: {
|
|
|
50
50
|
readonly last: "Letzte";
|
|
51
51
|
readonly page: "Seite";
|
|
52
52
|
readonly previous: "Vorherige";
|
|
53
|
+
readonly pageInfo: "{{label}} {{current}} von {{total}}";
|
|
54
|
+
readonly rangeInfo: "{{start}}–{{end}} von {{total}}";
|
|
53
55
|
};
|
|
54
56
|
readonly calendar: {
|
|
55
57
|
readonly recurring: "Wiederkehrender Termin";
|
|
@@ -71,8 +73,6 @@ declare const _default: {
|
|
|
71
73
|
readonly legend: "Legende";
|
|
72
74
|
readonly yearView: "Jahresübersicht";
|
|
73
75
|
readonly weekView: "Wochenansicht";
|
|
74
|
-
readonly dayView: "Tagesansicht";
|
|
75
|
-
readonly monthView: "Monatsansicht";
|
|
76
76
|
readonly viewMonth: "Monat";
|
|
77
77
|
readonly viewYear: "Jahr";
|
|
78
78
|
readonly viewWeek: "Woche";
|
|
@@ -91,7 +91,6 @@ declare const _default: {
|
|
|
91
91
|
readonly nextRange: "Nächster Zeitraum";
|
|
92
92
|
readonly today: "Heute";
|
|
93
93
|
readonly grid: "Planer";
|
|
94
|
-
readonly weekNumber: "Kalenderwoche";
|
|
95
94
|
readonly itemCount: "{{count}} Einträge";
|
|
96
95
|
};
|
|
97
96
|
readonly commandPalette: {
|
|
@@ -143,7 +142,6 @@ declare const _default: {
|
|
|
143
142
|
readonly datepicker: {
|
|
144
143
|
readonly placeholder: "Datum wählen...";
|
|
145
144
|
readonly rangePlaceholder: "Zeitraum wählen...";
|
|
146
|
-
readonly clear: "Auswahl löschen";
|
|
147
145
|
readonly openCalendar: "Kalender öffnen";
|
|
148
146
|
readonly invalidDate: "Ungültiges Datum";
|
|
149
147
|
readonly outOfRange: "Datum liegt außerhalb des zulässigen Bereichs";
|
|
@@ -175,9 +173,15 @@ declare const _default: {
|
|
|
175
173
|
readonly darkMode: "Dunkler Modus";
|
|
176
174
|
readonly systemTheme: "Systemdesign";
|
|
177
175
|
};
|
|
178
|
-
readonly
|
|
179
|
-
readonly
|
|
180
|
-
readonly
|
|
176
|
+
readonly chart: {
|
|
177
|
+
readonly category: "Kategorie";
|
|
178
|
+
readonly series: "Datenreihe {{index}}";
|
|
179
|
+
readonly segment: "Segment";
|
|
180
|
+
readonly value: "Wert";
|
|
181
|
+
readonly share: "Anteil";
|
|
182
|
+
};
|
|
183
|
+
readonly stepper: {
|
|
184
|
+
readonly optional: "Optional";
|
|
181
185
|
};
|
|
182
186
|
};
|
|
183
187
|
export default _default;
|
package/dist/translations/de.js
CHANGED
|
@@ -49,7 +49,9 @@ export default {
|
|
|
49
49
|
first: 'Erste',
|
|
50
50
|
last: 'Letzte',
|
|
51
51
|
page: 'Seite',
|
|
52
|
-
previous: 'Vorherige'
|
|
52
|
+
previous: 'Vorherige',
|
|
53
|
+
pageInfo: '{{label}} {{current}} von {{total}}',
|
|
54
|
+
rangeInfo: '{{start}}–{{end}} von {{total}}'
|
|
53
55
|
},
|
|
54
56
|
calendar: {
|
|
55
57
|
recurring: 'Wiederkehrender Termin',
|
|
@@ -71,8 +73,6 @@ export default {
|
|
|
71
73
|
legend: 'Legende',
|
|
72
74
|
yearView: 'Jahresübersicht',
|
|
73
75
|
weekView: 'Wochenansicht',
|
|
74
|
-
dayView: 'Tagesansicht',
|
|
75
|
-
monthView: 'Monatsansicht',
|
|
76
76
|
viewMonth: 'Monat',
|
|
77
77
|
viewYear: 'Jahr',
|
|
78
78
|
viewWeek: 'Woche',
|
|
@@ -91,7 +91,6 @@ export default {
|
|
|
91
91
|
nextRange: 'Nächster Zeitraum',
|
|
92
92
|
today: 'Heute',
|
|
93
93
|
grid: 'Planer',
|
|
94
|
-
weekNumber: 'Kalenderwoche',
|
|
95
94
|
itemCount: '{{count}} Einträge'
|
|
96
95
|
},
|
|
97
96
|
commandPalette: {
|
|
@@ -143,7 +142,6 @@ export default {
|
|
|
143
142
|
datepicker: {
|
|
144
143
|
placeholder: 'Datum wählen...',
|
|
145
144
|
rangePlaceholder: 'Zeitraum wählen...',
|
|
146
|
-
clear: 'Auswahl löschen',
|
|
147
145
|
openCalendar: 'Kalender öffnen',
|
|
148
146
|
invalidDate: 'Ungültiges Datum',
|
|
149
147
|
outOfRange: 'Datum liegt außerhalb des zulässigen Bereichs',
|
|
@@ -175,8 +173,14 @@ export default {
|
|
|
175
173
|
darkMode: 'Dunkler Modus',
|
|
176
174
|
systemTheme: 'Systemdesign'
|
|
177
175
|
},
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
176
|
+
chart: {
|
|
177
|
+
category: 'Kategorie',
|
|
178
|
+
series: 'Datenreihe {{index}}',
|
|
179
|
+
segment: 'Segment',
|
|
180
|
+
value: 'Wert',
|
|
181
|
+
share: 'Anteil'
|
|
182
|
+
},
|
|
183
|
+
stepper: {
|
|
184
|
+
optional: 'Optional'
|
|
181
185
|
}
|
|
182
186
|
};
|
|
@@ -50,6 +50,8 @@ declare const _default: {
|
|
|
50
50
|
readonly last: "Last";
|
|
51
51
|
readonly page: "Page";
|
|
52
52
|
readonly previous: "Previous";
|
|
53
|
+
readonly pageInfo: "{{label}} {{current}} of {{total}}";
|
|
54
|
+
readonly rangeInfo: "{{start}}–{{end}} of {{total}}";
|
|
53
55
|
};
|
|
54
56
|
readonly calendar: {
|
|
55
57
|
readonly recurring: "Recurring event";
|
|
@@ -71,8 +73,6 @@ declare const _default: {
|
|
|
71
73
|
readonly legend: "Legend";
|
|
72
74
|
readonly yearView: "Year overview";
|
|
73
75
|
readonly weekView: "Week view";
|
|
74
|
-
readonly dayView: "Day view";
|
|
75
|
-
readonly monthView: "Month view";
|
|
76
76
|
readonly viewMonth: "Month";
|
|
77
77
|
readonly viewYear: "Year";
|
|
78
78
|
readonly viewWeek: "Week";
|
|
@@ -91,7 +91,6 @@ declare const _default: {
|
|
|
91
91
|
readonly nextRange: "Next range";
|
|
92
92
|
readonly today: "Today";
|
|
93
93
|
readonly grid: "Planner";
|
|
94
|
-
readonly weekNumber: "Week number";
|
|
95
94
|
readonly itemCount: "{{count}} items";
|
|
96
95
|
};
|
|
97
96
|
readonly commandPalette: {
|
|
@@ -143,7 +142,6 @@ declare const _default: {
|
|
|
143
142
|
readonly datepicker: {
|
|
144
143
|
readonly placeholder: "Select a date...";
|
|
145
144
|
readonly rangePlaceholder: "Select a date range...";
|
|
146
|
-
readonly clear: "Clear selection";
|
|
147
145
|
readonly openCalendar: "Open calendar";
|
|
148
146
|
readonly invalidDate: "Invalid date";
|
|
149
147
|
readonly outOfRange: "Date is outside the allowed range";
|
|
@@ -175,9 +173,15 @@ declare const _default: {
|
|
|
175
173
|
readonly darkMode: "Dark mode";
|
|
176
174
|
readonly systemTheme: "System theme";
|
|
177
175
|
};
|
|
178
|
-
readonly
|
|
179
|
-
readonly
|
|
180
|
-
readonly
|
|
176
|
+
readonly chart: {
|
|
177
|
+
readonly category: "Category";
|
|
178
|
+
readonly series: "Series {{index}}";
|
|
179
|
+
readonly segment: "Segment";
|
|
180
|
+
readonly value: "Value";
|
|
181
|
+
readonly share: "Share";
|
|
182
|
+
};
|
|
183
|
+
readonly stepper: {
|
|
184
|
+
readonly optional: "Optional";
|
|
181
185
|
};
|
|
182
186
|
};
|
|
183
187
|
export default _default;
|
package/dist/translations/en.js
CHANGED
|
@@ -49,7 +49,9 @@ export default {
|
|
|
49
49
|
first: 'First',
|
|
50
50
|
last: 'Last',
|
|
51
51
|
page: 'Page',
|
|
52
|
-
previous: 'Previous'
|
|
52
|
+
previous: 'Previous',
|
|
53
|
+
pageInfo: '{{label}} {{current}} of {{total}}',
|
|
54
|
+
rangeInfo: '{{start}}–{{end}} of {{total}}'
|
|
53
55
|
},
|
|
54
56
|
calendar: {
|
|
55
57
|
recurring: 'Recurring event',
|
|
@@ -71,8 +73,6 @@ export default {
|
|
|
71
73
|
legend: 'Legend',
|
|
72
74
|
yearView: 'Year overview',
|
|
73
75
|
weekView: 'Week view',
|
|
74
|
-
dayView: 'Day view',
|
|
75
|
-
monthView: 'Month view',
|
|
76
76
|
viewMonth: 'Month',
|
|
77
77
|
viewYear: 'Year',
|
|
78
78
|
viewWeek: 'Week',
|
|
@@ -91,7 +91,6 @@ export default {
|
|
|
91
91
|
nextRange: 'Next range',
|
|
92
92
|
today: 'Today',
|
|
93
93
|
grid: 'Planner',
|
|
94
|
-
weekNumber: 'Week number',
|
|
95
94
|
itemCount: '{{count}} items'
|
|
96
95
|
},
|
|
97
96
|
commandPalette: {
|
|
@@ -143,7 +142,6 @@ export default {
|
|
|
143
142
|
datepicker: {
|
|
144
143
|
placeholder: 'Select a date...',
|
|
145
144
|
rangePlaceholder: 'Select a date range...',
|
|
146
|
-
clear: 'Clear selection',
|
|
147
145
|
openCalendar: 'Open calendar',
|
|
148
146
|
invalidDate: 'Invalid date',
|
|
149
147
|
outOfRange: 'Date is outside the allowed range',
|
|
@@ -175,8 +173,14 @@ export default {
|
|
|
175
173
|
darkMode: 'Dark mode',
|
|
176
174
|
systemTheme: 'System theme'
|
|
177
175
|
},
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
176
|
+
chart: {
|
|
177
|
+
category: 'Category',
|
|
178
|
+
series: 'Series {{index}}',
|
|
179
|
+
segment: 'Segment',
|
|
180
|
+
value: 'Value',
|
|
181
|
+
share: 'Share'
|
|
182
|
+
},
|
|
183
|
+
stepper: {
|
|
184
|
+
optional: 'Optional'
|
|
181
185
|
}
|
|
182
186
|
};
|
package/dist/utils/date.d.ts
CHANGED
|
@@ -6,6 +6,11 @@
|
|
|
6
6
|
* example because the database driver serialises timestamps that way),
|
|
7
7
|
* use these helpers to convert in both directions instead of redoing the
|
|
8
8
|
* arithmetic at every form site.
|
|
9
|
+
*
|
|
10
|
+
* The strict `YYYY-MM-DD` ↔ `Date` core is not reimplemented here: it lives in
|
|
11
|
+
* `../date/range` (`toIso` / `isoToDate`, the Layer-0 source of truth). These
|
|
12
|
+
* tolerant form helpers delegate to it and only add the tolerant shape rules
|
|
13
|
+
* (empty/undefined → nullish, 1-digit month/day, epoch-number coercion).
|
|
9
14
|
*/
|
|
10
15
|
/** Shared union for utilities that accept any common "date-ish" input. */
|
|
11
16
|
export type DateInput = Date | string | number | null | undefined;
|