@umriss-ui/core 0.55.1 → 0.57.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/API.md +63 -51
- package/CHANGELOG.md +24 -0
- package/README.md +14 -8
- package/dist/core.css +1 -1
- package/dist/core.js +194 -199
- package/dist/de.d.ts +12 -12
- package/dist/index.d.ts +45 -26
- package/docs/llms-full.md +336 -180
- package/package.json +6 -3
package/dist/de.d.ts
CHANGED
|
@@ -90,12 +90,12 @@ declare interface Wording {
|
|
|
90
90
|
invertSelection: string;
|
|
91
91
|
nothingSelected: string;
|
|
92
92
|
/** The cross on a selected value in the trigger. */
|
|
93
|
-
removeSelectedValue: (
|
|
93
|
+
removeSelectedValue: (label: string) => string;
|
|
94
94
|
/** The "+N" counter in the trigger. */
|
|
95
95
|
manageMoreSelected: (count: number) => string;
|
|
96
96
|
/** The summary in the panel: "3 / 12". The sentence structure belongs to the
|
|
97
97
|
language, even where it is only a slash here. */
|
|
98
|
-
multiSelectSummary: (
|
|
98
|
+
multiSelectSummary: (selected: number, total: number) => string;
|
|
99
99
|
/** How many options stand, when a list opens or its filter changes; never
|
|
100
100
|
zero - an empty list says its own empty text. Named, like the three
|
|
101
101
|
below, after the moment it is spoken in: an announcement labels no
|
|
@@ -228,8 +228,8 @@ declare interface Wording {
|
|
|
228
228
|
endMinute: string;
|
|
229
229
|
endSecond: string;
|
|
230
230
|
/** Stepper buttons of a time field; the label comes from above. */
|
|
231
|
-
timeFieldIncrease: (
|
|
232
|
-
timeFieldDecrease: (
|
|
231
|
+
timeFieldIncrease: (field: string) => string;
|
|
232
|
+
timeFieldDecrease: (field: string) => string;
|
|
233
233
|
/** Said when a picker takes a new value; the text is the value as the field shows it. */
|
|
234
234
|
pickerPicked: (value: string) => string;
|
|
235
235
|
/** Footer of the range panels. */
|
|
@@ -245,7 +245,7 @@ declare interface Wording {
|
|
|
245
245
|
/** "3 days (all day)" */
|
|
246
246
|
daysAllDay: (count: number) => string;
|
|
247
247
|
/** "Duration: 1 day 2 hrs 30 min" */
|
|
248
|
-
duration: (
|
|
248
|
+
duration: (parts: readonly string[]) => string;
|
|
249
249
|
hoursShort: (count: number) => string;
|
|
250
250
|
minutesShort: (count: number) => string;
|
|
251
251
|
/** Daylight-saving change: the hour that does not exist. */
|
|
@@ -255,8 +255,8 @@ declare interface Wording {
|
|
|
255
255
|
/** Daylight-saving change: the hour that occurs twice. */
|
|
256
256
|
timeAmbiguousHint: string;
|
|
257
257
|
timeAmbiguousHintSide: (side: string) => string;
|
|
258
|
-
timeEarlier: (
|
|
259
|
-
timeLater: (
|
|
258
|
+
timeEarlier: (offset: string) => string;
|
|
259
|
+
timeLater: (offset: string) => string;
|
|
260
260
|
/** The calendar's weekday headers, starting at Monday. */
|
|
261
261
|
weekdays: readonly string[];
|
|
262
262
|
/** The quick-select ranges, in the order of PRESET_LABELS. */
|
|
@@ -363,7 +363,7 @@ declare interface Wording {
|
|
|
363
363
|
/** Header of the actions column - for the screen reader, not visible. */
|
|
364
364
|
rowActions: string;
|
|
365
365
|
/** One action on a row: "Open: A-2041". */
|
|
366
|
-
rowAction: (
|
|
366
|
+
rowAction: (action: string, row: string) => string;
|
|
367
367
|
/** The menu holding a row's actions. */
|
|
368
368
|
rowActionsMenu: (row: string) => string;
|
|
369
369
|
/** The editor of a cell in a table's grid mode, named after its column and
|
|
@@ -507,8 +507,8 @@ declare interface Wording {
|
|
|
507
507
|
target: string;
|
|
508
508
|
/** "3,2 above target" or "1,5 below target" - the amount comes from the
|
|
509
509
|
formats, which is where the comma is from. */
|
|
510
|
-
deviationAbove: (
|
|
511
|
-
deviationBelow: (
|
|
510
|
+
deviationAbove: (amount: string) => string;
|
|
511
|
+
deviationBelow: (amount: string) => string;
|
|
512
512
|
deviationOnTarget: string;
|
|
513
513
|
/** The three freshness states. They are a DIFFERENT axis from the verdict: a
|
|
514
514
|
stale value keeps its verdict (ADR-0010). */
|
|
@@ -573,7 +573,7 @@ declare interface Wording {
|
|
|
573
573
|
/** The cross on a tag without text content. */
|
|
574
574
|
remove: string;
|
|
575
575
|
/** The cross on a tag with text content. */
|
|
576
|
-
removeTag: (
|
|
576
|
+
removeTag: (label: string) => string;
|
|
577
577
|
/** The two findings, named on the ghost of a drag. */
|
|
578
578
|
scheduleOverlap: string;
|
|
579
579
|
scheduleViolatedDependency: string;
|
|
@@ -608,7 +608,7 @@ declare interface Wording {
|
|
|
608
608
|
/** How many lanes a group holds, beside its name in the header. */
|
|
609
609
|
scheduleLaneCount: (count: number) => string;
|
|
610
610
|
/** What a screen reader calls the plot that takes the keys
|
|
611
|
-
(`aria-roledescription
|
|
611
|
+
(`aria-roledescription`). */
|
|
612
612
|
scheduleRoleDescription: string;
|
|
613
613
|
/** The plot's own name, beside the figure that carries the caller's
|
|
614
614
|
`aria-label`, so the caller's name is not heard twice. */
|
package/dist/index.d.ts
CHANGED
|
@@ -270,9 +270,14 @@ export declare function cadence(ages: FreshnessAges): number;
|
|
|
270
270
|
|
|
271
271
|
/** A calendar leaf: a sheet with its header and two rings. With `range`, a
|
|
272
272
|
bar across the sheet stands for the span a range picker chooses. */
|
|
273
|
-
export declare function CalendarGlyph({ ref, size, range, ...rest }:
|
|
273
|
+
export declare function CalendarGlyph({ ref, size, range, ...rest }: CalendarGlyphProps): JSX.Element;
|
|
274
|
+
|
|
275
|
+
/** The props of `CalendarGlyph`. */
|
|
276
|
+
export declare interface CalendarGlyphProps extends GlyphProps {
|
|
277
|
+
/** Draws a bar across the sheet for the span a range picker chooses.
|
|
278
|
+
@default false */
|
|
274
279
|
range?: boolean;
|
|
275
|
-
}
|
|
280
|
+
}
|
|
276
281
|
|
|
277
282
|
/** A surface that groups content under a head: `CardHeader` and `CardBody`
|
|
278
283
|
inside a `section`. With `collapsible` the header gets a key that folds the
|
|
@@ -795,7 +800,7 @@ export declare interface DateRangePickerProps extends Omit<HTMLAttributes<HTMLBu
|
|
|
795
800
|
*
|
|
796
801
|
* @default `DEFAULT_PRESETS`, in the wording's labels
|
|
797
802
|
*/
|
|
798
|
-
presets?: RangePreset[];
|
|
803
|
+
presets?: readonly RangePreset[];
|
|
799
804
|
/** The earliest day the picker offers, inclusive. Only its calendar day counts - in the formats' zone, when one is named - not its time of day. A value given outside is shown as given. */
|
|
800
805
|
min?: Date;
|
|
801
806
|
/** The latest day the picker offers, inclusive; read as `min` is. */
|
|
@@ -924,7 +929,7 @@ export declare interface DateTimeRangePickerProps extends Omit<HTMLAttributes<HT
|
|
|
924
929
|
*
|
|
925
930
|
* @default `DEFAULT_PRESETS`, in the wording's labels
|
|
926
931
|
*/
|
|
927
|
-
presets?: RangePreset[];
|
|
932
|
+
presets?: readonly RangePreset[];
|
|
928
933
|
/** The earliest day the picker offers, inclusive. Only its calendar day counts - in the formats' zone, when one is named - not its time of day. A value given outside is shown as given. */
|
|
929
934
|
min?: Date;
|
|
930
935
|
/** The latest day the picker offers, inclusive; read as `min` is. */
|
|
@@ -1157,9 +1162,13 @@ export declare function FormField({ ref, label, hint, error, required, fieldId,
|
|
|
1157
1162
|
* then activates the field's trigger through htmlFor and closes the panel
|
|
1158
1163
|
* again immediately.
|
|
1159
1164
|
*/
|
|
1160
|
-
export declare function FormFieldBoundary({ children }:
|
|
1165
|
+
export declare function FormFieldBoundary({ children }: FormFieldBoundaryProps): JSX.Element;
|
|
1166
|
+
|
|
1167
|
+
/** The props of `FormFieldBoundary`. */
|
|
1168
|
+
export declare interface FormFieldBoundaryProps {
|
|
1169
|
+
/** What stands outside the field's wiring. */
|
|
1161
1170
|
children: ReactNode;
|
|
1162
|
-
}
|
|
1171
|
+
}
|
|
1163
1172
|
|
|
1164
1173
|
/** What `useFormField` returns: the wiring a field inside a FormField reads. */
|
|
1165
1174
|
export declare interface FormFieldContextValue {
|
|
@@ -1272,8 +1281,8 @@ export declare interface FreshnessReading {
|
|
|
1272
1281
|
/** The props of a glyph: an SVG's attributes and its edge length. */
|
|
1273
1282
|
export declare interface GlyphProps extends Omit<SVGProps<SVGSVGElement>, "viewBox" | "children">, RefProp<SVGSVGElement> {
|
|
1274
1283
|
/**
|
|
1275
|
-
* Edge length in pixels.
|
|
1276
|
-
*
|
|
1284
|
+
* Edge length in pixels. Each glyph has the size it is drawn at in the
|
|
1285
|
+
* components.
|
|
1277
1286
|
*/
|
|
1278
1287
|
size?: number;
|
|
1279
1288
|
}
|
|
@@ -2684,13 +2693,20 @@ export declare interface ToastProviderProps {
|
|
|
2684
2693
|
/** How the message turns out; `loading` is a toast still at work. */
|
|
2685
2694
|
export declare type ToastTone = "neutral" | "success" | "warning" | "danger" | "loading";
|
|
2686
2695
|
|
|
2696
|
+
/** The five tones a component can take, as the tone components name them. */
|
|
2697
|
+
export declare type Tone = "neutral" | "accent" | "success" | "warning" | "danger";
|
|
2698
|
+
|
|
2687
2699
|
/** What a tone looks like beside its colour: a tick for success, an
|
|
2688
2700
|
exclamation in a circle for danger, in a triangle for warning, and an "i" in
|
|
2689
2701
|
a circle for the neutral and accent tones. The dots of ! and i are strokes of
|
|
2690
2702
|
no length: a round cap alone is a dot as wide as the stem. */
|
|
2691
|
-
export declare function ToneGlyph({ ref, tone, size, ...rest }:
|
|
2692
|
-
|
|
2693
|
-
|
|
2703
|
+
export declare function ToneGlyph({ ref, tone, size, ...rest }: ToneGlyphProps): JSX.Element;
|
|
2704
|
+
|
|
2705
|
+
/** The props of `ToneGlyph`. */
|
|
2706
|
+
export declare interface ToneGlyphProps extends GlyphProps {
|
|
2707
|
+
/** Which tone the glyph stands for. */
|
|
2708
|
+
tone: Tone;
|
|
2709
|
+
}
|
|
2694
2710
|
|
|
2695
2711
|
/** Appears on hover and keyboard focus; purely descriptive (role="tooltip"). */
|
|
2696
2712
|
export declare function Tooltip({ content, children, delay }: TooltipProps): JSX.Element;
|
|
@@ -2861,8 +2877,9 @@ export declare type TreeViewProps<K, S extends Key = string> = TreeViewBase<K, S
|
|
|
2861
2877
|
"aria-label": string;
|
|
2862
2878
|
};
|
|
2863
2879
|
|
|
2864
|
-
/** The settings of `UmrissProvider` as the components read them
|
|
2865
|
-
|
|
2880
|
+
/** The settings of `UmrissProvider` as the components read them. `density`
|
|
2881
|
+
and `portalTarget` are always set; `toast` holds only what the provider was
|
|
2882
|
+
given - the toasts apply their own defaults to the rest. */
|
|
2866
2883
|
export declare interface UmrissConfig {
|
|
2867
2884
|
density: Density;
|
|
2868
2885
|
portalTarget: PortalTarget;
|
|
@@ -2950,7 +2967,9 @@ export declare function useDensityFor(own: "regular" | "compact" | undefined, fa
|
|
|
2950
2967
|
server writes every instant with it. */
|
|
2951
2968
|
export declare function useFormats(): Formats;
|
|
2952
2969
|
|
|
2953
|
-
/**
|
|
2970
|
+
/** Reads the wiring of the surrounding FormField (id, label, description,
|
|
2971
|
+
invalid, required) so a field sets its id and aria attributes itself.
|
|
2972
|
+
Returns `null` outside a FormField and inside a `FormFieldBoundary`. */
|
|
2954
2973
|
export declare function useFormField(): FormFieldContextValue | null;
|
|
2955
2974
|
|
|
2956
2975
|
/**
|
|
@@ -3135,12 +3154,12 @@ export declare interface Wording {
|
|
|
3135
3154
|
invertSelection: string;
|
|
3136
3155
|
nothingSelected: string;
|
|
3137
3156
|
/** The cross on a selected value in the trigger. */
|
|
3138
|
-
removeSelectedValue: (
|
|
3157
|
+
removeSelectedValue: (label: string) => string;
|
|
3139
3158
|
/** The "+N" counter in the trigger. */
|
|
3140
3159
|
manageMoreSelected: (count: number) => string;
|
|
3141
3160
|
/** The summary in the panel: "3 / 12". The sentence structure belongs to the
|
|
3142
3161
|
language, even where it is only a slash here. */
|
|
3143
|
-
multiSelectSummary: (
|
|
3162
|
+
multiSelectSummary: (selected: number, total: number) => string;
|
|
3144
3163
|
/** How many options stand, when a list opens or its filter changes; never
|
|
3145
3164
|
zero - an empty list says its own empty text. Named, like the three
|
|
3146
3165
|
below, after the moment it is spoken in: an announcement labels no
|
|
@@ -3273,8 +3292,8 @@ export declare interface Wording {
|
|
|
3273
3292
|
endMinute: string;
|
|
3274
3293
|
endSecond: string;
|
|
3275
3294
|
/** Stepper buttons of a time field; the label comes from above. */
|
|
3276
|
-
timeFieldIncrease: (
|
|
3277
|
-
timeFieldDecrease: (
|
|
3295
|
+
timeFieldIncrease: (field: string) => string;
|
|
3296
|
+
timeFieldDecrease: (field: string) => string;
|
|
3278
3297
|
/** Said when a picker takes a new value; the text is the value as the field shows it. */
|
|
3279
3298
|
pickerPicked: (value: string) => string;
|
|
3280
3299
|
/** Footer of the range panels. */
|
|
@@ -3290,7 +3309,7 @@ export declare interface Wording {
|
|
|
3290
3309
|
/** "3 days (all day)" */
|
|
3291
3310
|
daysAllDay: (count: number) => string;
|
|
3292
3311
|
/** "Duration: 1 day 2 hrs 30 min" */
|
|
3293
|
-
duration: (
|
|
3312
|
+
duration: (parts: readonly string[]) => string;
|
|
3294
3313
|
hoursShort: (count: number) => string;
|
|
3295
3314
|
minutesShort: (count: number) => string;
|
|
3296
3315
|
/** Daylight-saving change: the hour that does not exist. */
|
|
@@ -3300,8 +3319,8 @@ export declare interface Wording {
|
|
|
3300
3319
|
/** Daylight-saving change: the hour that occurs twice. */
|
|
3301
3320
|
timeAmbiguousHint: string;
|
|
3302
3321
|
timeAmbiguousHintSide: (side: string) => string;
|
|
3303
|
-
timeEarlier: (
|
|
3304
|
-
timeLater: (
|
|
3322
|
+
timeEarlier: (offset: string) => string;
|
|
3323
|
+
timeLater: (offset: string) => string;
|
|
3305
3324
|
/** The calendar's weekday headers, starting at Monday. */
|
|
3306
3325
|
weekdays: readonly string[];
|
|
3307
3326
|
/** The quick-select ranges, in the order of PRESET_LABELS. */
|
|
@@ -3408,7 +3427,7 @@ export declare interface Wording {
|
|
|
3408
3427
|
/** Header of the actions column - for the screen reader, not visible. */
|
|
3409
3428
|
rowActions: string;
|
|
3410
3429
|
/** One action on a row: "Open: A-2041". */
|
|
3411
|
-
rowAction: (
|
|
3430
|
+
rowAction: (action: string, row: string) => string;
|
|
3412
3431
|
/** The menu holding a row's actions. */
|
|
3413
3432
|
rowActionsMenu: (row: string) => string;
|
|
3414
3433
|
/** The editor of a cell in a table's grid mode, named after its column and
|
|
@@ -3552,8 +3571,8 @@ export declare interface Wording {
|
|
|
3552
3571
|
target: string;
|
|
3553
3572
|
/** "3,2 above target" or "1,5 below target" - the amount comes from the
|
|
3554
3573
|
formats, which is where the comma is from. */
|
|
3555
|
-
deviationAbove: (
|
|
3556
|
-
deviationBelow: (
|
|
3574
|
+
deviationAbove: (amount: string) => string;
|
|
3575
|
+
deviationBelow: (amount: string) => string;
|
|
3557
3576
|
deviationOnTarget: string;
|
|
3558
3577
|
/** The three freshness states. They are a DIFFERENT axis from the verdict: a
|
|
3559
3578
|
stale value keeps its verdict (ADR-0010). */
|
|
@@ -3618,7 +3637,7 @@ export declare interface Wording {
|
|
|
3618
3637
|
/** The cross on a tag without text content. */
|
|
3619
3638
|
remove: string;
|
|
3620
3639
|
/** The cross on a tag with text content. */
|
|
3621
|
-
removeTag: (
|
|
3640
|
+
removeTag: (label: string) => string;
|
|
3622
3641
|
/** The two findings, named on the ghost of a drag. */
|
|
3623
3642
|
scheduleOverlap: string;
|
|
3624
3643
|
scheduleViolatedDependency: string;
|
|
@@ -3653,7 +3672,7 @@ export declare interface Wording {
|
|
|
3653
3672
|
/** How many lanes a group holds, beside its name in the header. */
|
|
3654
3673
|
scheduleLaneCount: (count: number) => string;
|
|
3655
3674
|
/** What a screen reader calls the plot that takes the keys
|
|
3656
|
-
(`aria-roledescription
|
|
3675
|
+
(`aria-roledescription`). */
|
|
3657
3676
|
scheduleRoleDescription: string;
|
|
3658
3677
|
/** The plot's own name, beside the figure that carries the caller's
|
|
3659
3678
|
`aria-label`, so the caller's name is not heard twice. */
|