@exsto/ds 0.0.1-rc.7 → 0.0.1-rc.9
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 +13 -0
- package/dist/chunks/date-range-picker-BvCOmQki.js +204 -0
- package/dist/chunks/date-range-picker-BvCOmQki.js.map +1 -0
- package/dist/chunks/input-9HRdsve1.js +169 -0
- package/dist/chunks/input-9HRdsve1.js.map +1 -0
- package/dist/chunks/{toggle-C2c5oDaE.js → toggle-B6VBlpwp.js} +4 -149
- package/dist/chunks/toggle-B6VBlpwp.js.map +1 -0
- package/dist/date-picker.js +331 -0
- package/dist/date-picker.js.map +1 -0
- package/dist/ds/src/date-picker.d.ts +9 -0
- package/dist/index.js +60 -188
- package/dist/index.js.map +1 -1
- package/dist/rich-text-editor.js +77 -18
- package/dist/rich-text-editor.js.map +1 -1
- package/dist/styles.css +125 -0
- package/dist/ui/src/components/edyn/animated-number/animated-number.d.ts +5 -5
- package/dist/ui/src/components/edyn/audio-player/audio-player.d.ts +3 -2
- package/dist/ui/src/components/edyn/date-picker/date-picker.d.ts +54 -0
- package/dist/ui/src/components/edyn/date-picker/date-text.d.ts +40 -0
- package/dist/ui/src/components/edyn/date-picker/date-text.test.d.ts +1 -0
- package/dist/ui/src/components/edyn/date-picker/index.d.ts +2 -0
- package/dist/ui/src/components/edyn/date-range-picker/date-range-picker.d.ts +5 -3
- package/dist/ui/src/components/edyn/initials-avatar/initials-avatar.d.ts +3 -2
- package/dist/ui/src/components/edyn/multi-select/multi-select.d.ts +12 -2
- package/dist/ui/src/components/edyn/progress-line/progress-line.d.ts +3 -3
- package/dist/ui/src/components/edyn/rich-text-editor/sync.d.ts +19 -0
- package/dist/ui/src/components/edyn/rich-text-editor/sync.test.d.ts +11 -0
- package/dist/ui/src/components/edyn/video-player/video-player.d.ts +2 -2
- package/dist/ui/src/components/forwarded-props.test.d.ts +8 -0
- package/dist/ui/src/components/ui/accordion/accordion.d.ts +9 -8
- package/dist/ui/src/components/ui/badge/badge.d.ts +1 -1
- package/dist/ui/src/components/ui/button/button.d.ts +1 -1
- package/dist/ui/src/components/ui/input-group/input-group.d.ts +1 -1
- package/dist/ui/src/components/ui/pagination/pagination.d.ts +3 -2
- package/dist/ui/src/components/ui/tabs/tabs.d.ts +9 -8
- package/dist/ui/src/lib/first-weekday.d.ts +6 -0
- package/dist/ui/src/lib/first-weekday.test.d.ts +1 -0
- package/package.json +5 -1
- package/dist/chunks/toggle-C2c5oDaE.js.map +0 -1
package/dist/styles.css
CHANGED
|
@@ -535,6 +535,10 @@
|
|
|
535
535
|
top: 0;
|
|
536
536
|
}
|
|
537
537
|
|
|
538
|
+
.top-0\.5 {
|
|
539
|
+
top: calc(var(--spacing) * .5);
|
|
540
|
+
}
|
|
541
|
+
|
|
538
542
|
.top-1\.5 {
|
|
539
543
|
top: calc(var(--spacing) * 1.5);
|
|
540
544
|
}
|
|
@@ -583,6 +587,10 @@
|
|
|
583
587
|
right: 0;
|
|
584
588
|
}
|
|
585
589
|
|
|
590
|
+
.right-0\.5 {
|
|
591
|
+
right: calc(var(--spacing) * .5);
|
|
592
|
+
}
|
|
593
|
+
|
|
586
594
|
.right-1 {
|
|
587
595
|
right: var(--spacing);
|
|
588
596
|
}
|
|
@@ -2310,6 +2318,10 @@
|
|
|
2310
2318
|
padding-right: calc(var(--spacing) * 8);
|
|
2311
2319
|
}
|
|
2312
2320
|
|
|
2321
|
+
.pr-9 {
|
|
2322
|
+
padding-right: calc(var(--spacing) * 9);
|
|
2323
|
+
}
|
|
2324
|
+
|
|
2313
2325
|
.pb-2 {
|
|
2314
2326
|
padding-bottom: calc(var(--spacing) * 2);
|
|
2315
2327
|
}
|
|
@@ -2696,6 +2708,11 @@
|
|
|
2696
2708
|
outline-width: 1px;
|
|
2697
2709
|
}
|
|
2698
2710
|
|
|
2711
|
+
.blur {
|
|
2712
|
+
--tw-blur: blur(8px);
|
|
2713
|
+
filter: var(--tw-blur, ) var(--tw-brightness, ) var(--tw-contrast, ) var(--tw-grayscale, ) var(--tw-hue-rotate, ) var(--tw-invert, ) var(--tw-saturate, ) var(--tw-sepia, ) var(--tw-drop-shadow, );
|
|
2714
|
+
}
|
|
2715
|
+
|
|
2699
2716
|
.filter {
|
|
2700
2717
|
filter: var(--tw-blur, ) var(--tw-brightness, ) var(--tw-contrast, ) var(--tw-grayscale, ) var(--tw-hue-rotate, ) var(--tw-invert, ) var(--tw-saturate, ) var(--tw-sepia, ) var(--tw-drop-shadow, );
|
|
2701
2718
|
}
|
|
@@ -4059,6 +4076,10 @@
|
|
|
4059
4076
|
cursor: not-allowed;
|
|
4060
4077
|
}
|
|
4061
4078
|
|
|
4079
|
+
.disabled\:border-transparent:disabled {
|
|
4080
|
+
border-color: #0000;
|
|
4081
|
+
}
|
|
4082
|
+
|
|
4062
4083
|
.disabled\:bg-input\/50:disabled {
|
|
4063
4084
|
background-color: var(--input);
|
|
4064
4085
|
}
|
|
@@ -4069,14 +4090,38 @@
|
|
|
4069
4090
|
}
|
|
4070
4091
|
}
|
|
4071
4092
|
|
|
4093
|
+
.disabled\:bg-muted:disabled {
|
|
4094
|
+
background-color: var(--muted);
|
|
4095
|
+
}
|
|
4096
|
+
|
|
4072
4097
|
.disabled\:bg-transparent:disabled {
|
|
4073
4098
|
background-color: #0000;
|
|
4074
4099
|
}
|
|
4075
4100
|
|
|
4101
|
+
.disabled\:text-foreground\/60:disabled {
|
|
4102
|
+
color: var(--foreground);
|
|
4103
|
+
}
|
|
4104
|
+
|
|
4105
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
4106
|
+
.disabled\:text-foreground\/60:disabled {
|
|
4107
|
+
color: color-mix(in oklab, var(--foreground) 60%, transparent);
|
|
4108
|
+
}
|
|
4109
|
+
}
|
|
4110
|
+
|
|
4076
4111
|
.disabled\:opacity-50:disabled {
|
|
4077
4112
|
opacity: .5;
|
|
4078
4113
|
}
|
|
4079
4114
|
|
|
4115
|
+
.disabled\:shadow-none:disabled {
|
|
4116
|
+
--tw-shadow: 0 0 #0000;
|
|
4117
|
+
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
4118
|
+
}
|
|
4119
|
+
|
|
4120
|
+
.disabled\:focus-visible\:ring-0:disabled:focus-visible {
|
|
4121
|
+
--tw-ring-shadow: var(--tw-ring-inset, ) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);
|
|
4122
|
+
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
4123
|
+
}
|
|
4124
|
+
|
|
4080
4125
|
:where([data-orientation="horizontal"]) .in-data-\[orientation\=horizontal\]\:w-px {
|
|
4081
4126
|
width: 1px;
|
|
4082
4127
|
}
|
|
@@ -4413,10 +4458,38 @@
|
|
|
4413
4458
|
pointer-events: none;
|
|
4414
4459
|
}
|
|
4415
4460
|
|
|
4461
|
+
.aria-disabled\:border-transparent[aria-disabled="true"] {
|
|
4462
|
+
border-color: #0000;
|
|
4463
|
+
}
|
|
4464
|
+
|
|
4465
|
+
.aria-disabled\:bg-muted[aria-disabled="true"] {
|
|
4466
|
+
background-color: var(--muted);
|
|
4467
|
+
}
|
|
4468
|
+
|
|
4469
|
+
.aria-disabled\:text-foreground\/60[aria-disabled="true"] {
|
|
4470
|
+
color: var(--foreground);
|
|
4471
|
+
}
|
|
4472
|
+
|
|
4473
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
4474
|
+
.aria-disabled\:text-foreground\/60[aria-disabled="true"] {
|
|
4475
|
+
color: color-mix(in oklab, var(--foreground) 60%, transparent);
|
|
4476
|
+
}
|
|
4477
|
+
}
|
|
4478
|
+
|
|
4416
4479
|
.aria-disabled\:opacity-50[aria-disabled="true"] {
|
|
4417
4480
|
opacity: .5;
|
|
4418
4481
|
}
|
|
4419
4482
|
|
|
4483
|
+
.aria-disabled\:shadow-none[aria-disabled="true"] {
|
|
4484
|
+
--tw-shadow: 0 0 #0000;
|
|
4485
|
+
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
4486
|
+
}
|
|
4487
|
+
|
|
4488
|
+
.aria-disabled\:focus-visible\:ring-0[aria-disabled="true"]:focus-visible {
|
|
4489
|
+
--tw-ring-shadow: var(--tw-ring-inset, ) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);
|
|
4490
|
+
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
4491
|
+
}
|
|
4492
|
+
|
|
4420
4493
|
.aria-expanded\:bg-muted[aria-expanded="true"] {
|
|
4421
4494
|
background-color: var(--muted);
|
|
4422
4495
|
}
|
|
@@ -5824,6 +5897,10 @@
|
|
|
5824
5897
|
}
|
|
5825
5898
|
}
|
|
5826
5899
|
|
|
5900
|
+
.dark\:disabled\:border-transparent:is(.dark *):disabled {
|
|
5901
|
+
border-color: #0000;
|
|
5902
|
+
}
|
|
5903
|
+
|
|
5827
5904
|
.dark\:disabled\:bg-input\/80:is(.dark *):disabled {
|
|
5828
5905
|
background-color: var(--input);
|
|
5829
5906
|
}
|
|
@@ -5834,6 +5911,10 @@
|
|
|
5834
5911
|
}
|
|
5835
5912
|
}
|
|
5836
5913
|
|
|
5914
|
+
.dark\:disabled\:bg-muted:is(.dark *):disabled {
|
|
5915
|
+
background-color: var(--muted);
|
|
5916
|
+
}
|
|
5917
|
+
|
|
5837
5918
|
.dark\:disabled\:bg-transparent:is(.dark *):disabled {
|
|
5838
5919
|
background-color: #0000;
|
|
5839
5920
|
}
|
|
@@ -5878,6 +5959,14 @@
|
|
|
5878
5959
|
}
|
|
5879
5960
|
}
|
|
5880
5961
|
|
|
5962
|
+
.dark\:aria-disabled\:border-transparent:is(.dark *)[aria-disabled="true"] {
|
|
5963
|
+
border-color: #0000;
|
|
5964
|
+
}
|
|
5965
|
+
|
|
5966
|
+
.dark\:aria-disabled\:bg-muted:is(.dark *)[aria-disabled="true"] {
|
|
5967
|
+
background-color: var(--muted);
|
|
5968
|
+
}
|
|
5969
|
+
|
|
5881
5970
|
.dark\:aria-invalid\:border-destructive\/50:is(.dark *)[aria-invalid="true"] {
|
|
5882
5971
|
border-color: var(--destructive);
|
|
5883
5972
|
}
|
|
@@ -6163,6 +6252,10 @@
|
|
|
6163
6252
|
cursor: not-allowed;
|
|
6164
6253
|
}
|
|
6165
6254
|
|
|
6255
|
+
.data-disabled\:border-transparent:where([data-disabled="true"]), .data-disabled\:border-transparent:where([data-disabled]:not([data-disabled="false"])) {
|
|
6256
|
+
border-color: #0000;
|
|
6257
|
+
}
|
|
6258
|
+
|
|
6166
6259
|
.data-disabled\:bg-input\/50:where([data-disabled="true"]), .data-disabled\:bg-input\/50:where([data-disabled]:not([data-disabled="false"])) {
|
|
6167
6260
|
background-color: var(--input);
|
|
6168
6261
|
}
|
|
@@ -6173,10 +6266,38 @@
|
|
|
6173
6266
|
}
|
|
6174
6267
|
}
|
|
6175
6268
|
|
|
6269
|
+
.data-disabled\:bg-muted:where([data-disabled="true"]), .data-disabled\:bg-muted:where([data-disabled]:not([data-disabled="false"])) {
|
|
6270
|
+
background-color: var(--muted);
|
|
6271
|
+
}
|
|
6272
|
+
|
|
6273
|
+
.data-disabled\:text-foreground\/60:where([data-disabled="true"]), .data-disabled\:text-foreground\/60:where([data-disabled]:not([data-disabled="false"])) {
|
|
6274
|
+
color: var(--foreground);
|
|
6275
|
+
}
|
|
6276
|
+
|
|
6277
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
6278
|
+
.data-disabled\:text-foreground\/60:where([data-disabled="true"]), .data-disabled\:text-foreground\/60:where([data-disabled]:not([data-disabled="false"])) {
|
|
6279
|
+
color: color-mix(in oklab, var(--foreground) 60%, transparent);
|
|
6280
|
+
}
|
|
6281
|
+
}
|
|
6282
|
+
|
|
6176
6283
|
.data-disabled\:opacity-50:where([data-disabled="true"]), .data-disabled\:opacity-50:where([data-disabled]:not([data-disabled="false"])) {
|
|
6177
6284
|
opacity: .5;
|
|
6178
6285
|
}
|
|
6179
6286
|
|
|
6287
|
+
.data-disabled\:shadow-none:where([data-disabled="true"]), .data-disabled\:shadow-none:where([data-disabled]:not([data-disabled="false"])) {
|
|
6288
|
+
--tw-shadow: 0 0 #0000;
|
|
6289
|
+
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
6290
|
+
}
|
|
6291
|
+
|
|
6292
|
+
:is(.data-disabled\:focus-visible\:ring-0:where([data-disabled="true"]), .data-disabled\:focus-visible\:ring-0:where([data-disabled]:not([data-disabled="false"]))):focus-visible {
|
|
6293
|
+
--tw-ring-shadow: var(--tw-ring-inset, ) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);
|
|
6294
|
+
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
6295
|
+
}
|
|
6296
|
+
|
|
6297
|
+
.dark\:data-disabled\:border-transparent:is(.dark *):where([data-disabled="true"]), .dark\:data-disabled\:border-transparent:is(.dark *):where([data-disabled]:not([data-disabled="false"])) {
|
|
6298
|
+
border-color: #0000;
|
|
6299
|
+
}
|
|
6300
|
+
|
|
6180
6301
|
.dark\:data-disabled\:bg-input\/80:is(.dark *):where([data-disabled="true"]), .dark\:data-disabled\:bg-input\/80:is(.dark *):where([data-disabled]:not([data-disabled="false"])) {
|
|
6181
6302
|
background-color: var(--input);
|
|
6182
6303
|
}
|
|
@@ -6187,6 +6308,10 @@
|
|
|
6187
6308
|
}
|
|
6188
6309
|
}
|
|
6189
6310
|
|
|
6311
|
+
.dark\:data-disabled\:bg-muted:is(.dark *):where([data-disabled="true"]), .dark\:data-disabled\:bg-muted:is(.dark *):where([data-disabled]:not([data-disabled="false"])) {
|
|
6312
|
+
background-color: var(--muted);
|
|
6313
|
+
}
|
|
6314
|
+
|
|
6190
6315
|
.data-active\:bg-background:where([data-state="active"]), .data-active\:bg-background:where([data-active]:not([data-active="false"])) {
|
|
6191
6316
|
background-color: var(--background);
|
|
6192
6317
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RefObject } from 'react';
|
|
1
|
+
import { ComponentPropsWithoutRef, RefObject } from 'react';
|
|
2
2
|
/** Thousands separated, rounded to a whole number: the default way a count reads. */
|
|
3
3
|
export declare const formatCount: (value: number) => string;
|
|
4
4
|
/**
|
|
@@ -7,7 +7,7 @@ export declare const formatCount: (value: number) => string;
|
|
|
7
7
|
* been on screen.
|
|
8
8
|
*/
|
|
9
9
|
export declare const useAnimatedValues: (targets: number[], element: RefObject<Element | null>) => number[];
|
|
10
|
-
export interface IAnimatedNumberProps {
|
|
10
|
+
export interface IAnimatedNumberProps extends Omit<ComponentPropsWithoutRef<'span'>, 'children' | 'className'> {
|
|
11
11
|
value: number;
|
|
12
12
|
/** What it shows while it moves and once there (formatCount by default; a percentage formatter for shares). */
|
|
13
13
|
format?: (value: number) => string;
|
|
@@ -18,8 +18,8 @@ export interface IAnimatedNumberProps {
|
|
|
18
18
|
* and where it lands, in tabular figures, so nothing beside it moves while the digits
|
|
19
19
|
* change. Assistive technology reads only the final value.
|
|
20
20
|
*/
|
|
21
|
-
export declare const AnimatedNumber: ({ value, format, className }: IAnimatedNumberProps) => import('react').JSX.Element;
|
|
22
|
-
export interface INumberTextProps {
|
|
21
|
+
export declare const AnimatedNumber: ({ value, format, className, ...props }: IAnimatedNumberProps) => import('react').JSX.Element;
|
|
22
|
+
export interface INumberTextProps extends Omit<ComponentPropsWithoutRef<'span'>, 'children' | 'className'> {
|
|
23
23
|
element?: RefObject<HTMLSpanElement | null>;
|
|
24
24
|
shown: number;
|
|
25
25
|
value: number;
|
|
@@ -27,4 +27,4 @@ export interface INumberTextProps {
|
|
|
27
27
|
className?: string;
|
|
28
28
|
}
|
|
29
29
|
/** The text of a moving number: what it shows now, held at its widest, with the final value for assistive technology. */
|
|
30
|
-
export declare const NumberText: ({ element, shown, value, format, className }: INumberTextProps) => import('react').JSX.Element;
|
|
30
|
+
export declare const NumberText: ({ element, shown, value, format, className, ...props }: INumberTextProps) => import('react').JSX.Element;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { TCssLength } from '../../../lib/utils';
|
|
2
|
-
|
|
2
|
+
import { ComponentPropsWithoutRef } from 'react';
|
|
3
|
+
export interface IAudioPlayerProps extends Omit<ComponentPropsWithoutRef<'div'>, 'children' | 'className' | 'onPlay' | 'onPause' | 'onEnded' | 'onTimeUpdate' | 'role'> {
|
|
3
4
|
/** Audio source URL. */
|
|
4
5
|
src?: string;
|
|
5
6
|
/** Start muted. The volume control still works from here. */
|
|
@@ -26,4 +27,4 @@ export interface IAudioPlayerProps {
|
|
|
26
27
|
* time, a seekable timeline, and volume. Four elements in one rounded row, per
|
|
27
28
|
* the design-system anatomy.
|
|
28
29
|
*/
|
|
29
|
-
export declare const AudioPlayer: ({ src, muted, loop, disabled, width, className, "aria-label": ariaLabel, onPlay, onPause, onEnded, onTimeUpdate, }: IAudioPlayerProps) => import('react').JSX.Element;
|
|
30
|
+
export declare const AudioPlayer: ({ src, muted, loop, disabled, width, className, "aria-label": ariaLabel, style, onPlay, onPause, onEnded, onTimeUpdate, ...props }: IAudioPlayerProps) => import('react').JSX.Element;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { Locale } from 'react-day-picker';
|
|
2
|
+
import { TDisabledDays } from './date-text';
|
|
3
|
+
/** Every word the component prints, so a product can translate it. */
|
|
4
|
+
export interface IDatePickerLabels {
|
|
5
|
+
/** The calendar button's accessible name. */
|
|
6
|
+
choose: string;
|
|
7
|
+
/** Said when the text is not a date; `pattern` is what to type, written the locale's way (`DD/MM/YYYY`). */
|
|
8
|
+
format: (pattern: string) => string;
|
|
9
|
+
notReal: string;
|
|
10
|
+
/** `min` and `max` are written the locale's way. */
|
|
11
|
+
beforeMin: (min: string) => string;
|
|
12
|
+
afterMax: (max: string) => string;
|
|
13
|
+
unavailable: string;
|
|
14
|
+
}
|
|
15
|
+
export declare const DEFAULT_DATE_PICKER_LABELS: IDatePickerLabels;
|
|
16
|
+
export interface IDatePickerProps {
|
|
17
|
+
/** For a Label's htmlFor; inside a Field the Field's label is already wired. */
|
|
18
|
+
id?: string;
|
|
19
|
+
/**
|
|
20
|
+
* The chosen day as `yyyy-mm-dd`, or `undefined` for none (an empty string counts as none, so a value kept for an
|
|
21
|
+
* `<input type="date">` drops in). A string and not a Date, on purpose: a Date is an instant, and the instant for
|
|
22
|
+
* "5 March" is another calendar day in another time zone, so a Date serialised for an API drifts a day. The text is
|
|
23
|
+
* what `<input type="date">`, JSON and a .NET `DateOnly` use, and it compares as a day.
|
|
24
|
+
*/
|
|
25
|
+
value: string | undefined;
|
|
26
|
+
/** Called with a valid day, or with `undefined` when the field is emptied or its text is not a usable day. */
|
|
27
|
+
onValueChange: (value: string | undefined) => void;
|
|
28
|
+
/** The earliest and latest day that can be chosen, as `yyyy-mm-dd`, both included. */
|
|
29
|
+
min?: string;
|
|
30
|
+
max?: string;
|
|
31
|
+
/** Days that cannot be chosen: a list of `yyyy-mm-dd`, or a function that says so for one (weekends, say). */
|
|
32
|
+
disabledDates?: TDisabledDays;
|
|
33
|
+
disabled?: boolean;
|
|
34
|
+
/** How a day is written and in which order it is typed (BCP 47); en-GB reads 05/03/2026. */
|
|
35
|
+
locale?: string;
|
|
36
|
+
/** The calendar's own words (month and weekday names), as a date-fns locale; English by default. The first weekday follows `locale`. */
|
|
37
|
+
calendarLocale?: Locale;
|
|
38
|
+
/** What the empty field shows; the pattern for the locale (`DD/MM/YYYY`) by default. */
|
|
39
|
+
placeholder?: string;
|
|
40
|
+
/** An accessible name, when there is no visible label to point at. */
|
|
41
|
+
'aria-label'?: string;
|
|
42
|
+
/** Marks the field invalid (the kit's destructive border), as a Field's invalid state does. */
|
|
43
|
+
'aria-invalid'?: boolean | 'true' | 'false';
|
|
44
|
+
/** The id of the text that explains it. Added to what a Field names already, and to the picker's own error. */
|
|
45
|
+
'aria-describedby'?: string;
|
|
46
|
+
labels?: Partial<IDatePickerLabels>;
|
|
47
|
+
/** Layout only (a width); the look is the kit's. */
|
|
48
|
+
className?: string;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* One calendar day, typed or picked. The field takes the day in the locale's order (05/03/2026 in en-GB) and reads it
|
|
52
|
+
* when it loses focus, saying inline what is wrong with it; the button, or Alt+ArrowDown in the field, opens a calendar.
|
|
53
|
+
*/
|
|
54
|
+
export declare const DatePicker: ({ id, value, onValueChange, min, max, disabledDates, disabled, locale, calendarLocale, placeholder, "aria-label": ariaLabel, "aria-invalid": ariaInvalid, "aria-describedby": ariaDescribedBy, labels: labelOverrides, className, }: IDatePickerProps) => import('react').JSX.Element;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reading and writing a calendar day as the text a person types.
|
|
3
|
+
*
|
|
4
|
+
* A day is the string `yyyy-mm-dd` everywhere here, never a Date: a Date is an instant, and the instant for "5 March" is a
|
|
5
|
+
* different calendar day in another time zone (local midnight serialised as UTC lands on the 4th east of Greenwich). The
|
|
6
|
+
* string is also what `<input type="date">`, JSON and a .NET `DateOnly` use. Strings of that shape sort and compare as
|
|
7
|
+
* days, so min, max and disabled days are compared as plain strings with no Date involved.
|
|
8
|
+
*/
|
|
9
|
+
export type TDatePart = 'day' | 'month' | 'year';
|
|
10
|
+
/** Why a typed text is not a day the picker can use. */
|
|
11
|
+
export type TDateProblem = 'format' | 'notReal' | 'beforeMin' | 'afterMax' | 'unavailable';
|
|
12
|
+
export type TParsedDay = {
|
|
13
|
+
kind: 'empty';
|
|
14
|
+
} | {
|
|
15
|
+
kind: 'day';
|
|
16
|
+
day: string;
|
|
17
|
+
} | {
|
|
18
|
+
kind: 'problem';
|
|
19
|
+
problem: 'format' | 'notReal';
|
|
20
|
+
};
|
|
21
|
+
/** The order a locale writes day, month and year in: en-GB is day, month, year; en-US month, day, year; sv year first. */
|
|
22
|
+
export declare const datePartsOf: (locale: string) => TDatePart[];
|
|
23
|
+
/** What to type, written the locale's way: `DD/MM/YYYY` for en-GB. */
|
|
24
|
+
export declare const datePatternOf: (locale: string) => string;
|
|
25
|
+
/** A day written the locale's way: `05/03/2026` for en-GB. */
|
|
26
|
+
export declare const formatDay: (day: string, locale: string) => string;
|
|
27
|
+
/**
|
|
28
|
+
* Reads typed text as a day. The locale's order decides which number is the day; a first number of four digits is always
|
|
29
|
+
* a year (so `2026-03-05` is read the same everywhere); the separator can be anything that is not a digit, and eight
|
|
30
|
+
* digits with none (`05032026`) are split by the order. A year must have four digits: `5/3/26` is refused, not guessed.
|
|
31
|
+
*/
|
|
32
|
+
export declare const parseDateText: (text: string, locale: string) => TParsedDay;
|
|
33
|
+
export type TDisabledDays = readonly string[] | ((day: string) => boolean);
|
|
34
|
+
export interface IDayLimits {
|
|
35
|
+
min?: string;
|
|
36
|
+
max?: string;
|
|
37
|
+
disabledDates?: TDisabledDays;
|
|
38
|
+
}
|
|
39
|
+
/** Whether a day is allowed, and if not, which limit it breaks. */
|
|
40
|
+
export declare const dayProblem: (day: string, { min, max, disabledDates }: IDayLimits) => TDateProblem | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef } from 'react';
|
|
1
2
|
/** A range of calendar days as yyyy-mm-dd, either end optional. */
|
|
2
3
|
export type TDateRange = {
|
|
3
4
|
from?: string;
|
|
@@ -5,7 +6,8 @@ export type TDateRange = {
|
|
|
5
6
|
};
|
|
6
7
|
export declare const dayToDate: (value: string | undefined) => Date | undefined;
|
|
7
8
|
export declare const dateToDay: (date: Date | undefined) => string | undefined;
|
|
8
|
-
|
|
9
|
+
/** Anything else a button takes (data-*, aria-*, title) goes to the trigger. */
|
|
10
|
+
export interface IDateRangePickerProps extends Omit<ComponentPropsWithoutRef<'button'>, 'value' | 'defaultValue' | 'placeholder' | 'id' | 'className' | 'children' | 'onChange' | 'type'> {
|
|
9
11
|
id?: string;
|
|
10
12
|
value: TDateRange;
|
|
11
13
|
onValueChange: (value: TDateRange) => void;
|
|
@@ -16,11 +18,11 @@ export interface IDateRangePickerProps {
|
|
|
16
18
|
* `data-set` while either end is set, for a look of its own.
|
|
17
19
|
*/
|
|
18
20
|
summary?: 'range' | 'label';
|
|
19
|
-
/** How the ends are written on the trigger (BCP 47); en-GB reads 05 Mar 2026. */
|
|
21
|
+
/** How the ends are written on the trigger, and which weekday the calendar starts on (BCP 47); en-GB reads 05 Mar 2026 and starts on Monday. */
|
|
20
22
|
locale?: string;
|
|
21
23
|
/** An accessible name for the trigger, when there is no visible label to point at. */
|
|
22
24
|
'aria-label'?: string;
|
|
23
25
|
className?: string;
|
|
24
26
|
}
|
|
25
27
|
/** A range of calendar days, either end optional; two months side by side, one on a phone. */
|
|
26
|
-
export declare const DateRangePicker: ({ id, value, onValueChange, placeholder, locale, summary, "aria-label": ariaLabel, className, }: IDateRangePickerProps) => import('react').JSX.Element;
|
|
28
|
+
export declare const DateRangePicker: ({ id, value, onValueChange, placeholder, locale, summary, "aria-label": ariaLabel, className, ...props }: IDateRangePickerProps) => import('react').JSX.Element;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef } from 'react';
|
|
1
2
|
/** How many colour pairs the theme defines (--avatar-1-bg, --avatar-1-fg ... in @edyn/theme tokens.css). */
|
|
2
3
|
export declare const AVATAR_TONES = 12;
|
|
3
4
|
/**
|
|
@@ -34,7 +35,7 @@ declare const SIZES: {
|
|
|
34
35
|
};
|
|
35
36
|
};
|
|
36
37
|
export type TInitialsAvatarSize = keyof typeof SIZES;
|
|
37
|
-
export interface IInitialsAvatarProps {
|
|
38
|
+
export interface IInitialsAvatarProps extends Omit<ComponentPropsWithoutRef<'span'>, 'children' | 'className' | 'role'> {
|
|
38
39
|
name: string;
|
|
39
40
|
photoUrl?: string | null;
|
|
40
41
|
/** xs 20px, sm 24px in table rows, md 32px in a sidebar, lg 40px in a menu's header. */
|
|
@@ -49,5 +50,5 @@ export interface IInitialsAvatarProps {
|
|
|
49
50
|
label?: string;
|
|
50
51
|
}
|
|
51
52
|
/** A person's photo, or their initials on a circle in the palette colour they pick; both themes switch by themselves. */
|
|
52
|
-
export declare const InitialsAvatar: ({ name, photoUrl, size, className, autoColor, label }: IInitialsAvatarProps) => import('react').JSX.Element;
|
|
53
|
+
export declare const InitialsAvatar: ({ name, photoUrl, size, className, autoColor, label, "aria-label": ariaLabel, ...props }: IInitialsAvatarProps) => import('react').JSX.Element;
|
|
53
54
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
2
|
/** An option: `leading` goes before its label (an avatar, a status dot), `count` after it (how many it would show). */
|
|
3
3
|
export type TMultiSelectOption = {
|
|
4
4
|
value: string;
|
|
@@ -21,7 +21,8 @@ export interface IMultiSelectLabels {
|
|
|
21
21
|
export declare const DEFAULT_MULTI_SELECT_LABELS: IMultiSelectLabels;
|
|
22
22
|
/** Above this many options a list draws only the rows on screen. */
|
|
23
23
|
export declare const VIRTUALIZE_FROM = 100;
|
|
24
|
-
|
|
24
|
+
/** Anything else a button takes (data-*, aria-*, title) goes to the trigger. */
|
|
25
|
+
export interface IMultiSelectProps extends Omit<ComponentPropsWithoutRef<'button'>, 'placeholder' | 'value' | 'defaultValue' | 'id' | 'disabled' | 'className' | 'children' | 'onChange'> {
|
|
25
26
|
/** The trigger's text with nothing picked, which means no filter ("All dealer groups"). */
|
|
26
27
|
placeholder: string;
|
|
27
28
|
/** The search field's prompt ("Search dealer groups…"). */
|
|
@@ -39,6 +40,15 @@ export interface IMultiSelectProps {
|
|
|
39
40
|
/** For a Label's htmlFor. */
|
|
40
41
|
id?: string;
|
|
41
42
|
'aria-label'?: string;
|
|
43
|
+
/**
|
|
44
|
+
* Marks the trigger invalid: the kit's destructive border, and a screen reader says so. For a form that does not use
|
|
45
|
+
* Field; inside one, its invalid state already does this.
|
|
46
|
+
*/
|
|
47
|
+
'aria-invalid'?: boolean | 'true' | 'false';
|
|
48
|
+
/**
|
|
49
|
+
* The id of the text that explains it (the error). Added to what a Field names already, never replacing it.
|
|
50
|
+
*/
|
|
51
|
+
'aria-describedby'?: string;
|
|
42
52
|
/** Shown but not changeable (a read-only form). */
|
|
43
53
|
disabled?: boolean;
|
|
44
54
|
/** Layout only (a width); the look is the kit's. */
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { CSSProperties } from 'react';
|
|
1
|
+
import { ComponentPropsWithoutRef, CSSProperties } from 'react';
|
|
2
2
|
/**
|
|
3
3
|
* The line's colour: an app sets --progress-line (on :root, or on any element above the
|
|
4
4
|
* line) to match its accent. The fallback is read where the line is, so it follows the
|
|
5
5
|
* theme, which a default declared once on :root would not.
|
|
6
6
|
*/
|
|
7
7
|
export declare const PROGRESS_LINE_COLOR = "var(--progress-line, var(--primary))";
|
|
8
|
-
export interface IProgressLineProps {
|
|
8
|
+
export interface IProgressLineProps extends Omit<ComponentPropsWithoutRef<'div'>, 'children' | 'className' | 'style' | 'role'> {
|
|
9
9
|
/** Work is under way. */
|
|
10
10
|
active: boolean;
|
|
11
11
|
label?: string;
|
|
@@ -20,4 +20,4 @@ export interface IProgressLineProps {
|
|
|
20
20
|
* before it has gone carries on from where it is. With reduced motion it is a
|
|
21
21
|
* full-width line that fades.
|
|
22
22
|
*/
|
|
23
|
-
export declare const ProgressLine: ({ active, label, className, style }: IProgressLineProps) => import('react').JSX.Element;
|
|
23
|
+
export declare const ProgressLine: ({ active, label, className, style, ...props }: IProgressLineProps) => import('react').JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Editor } from '@tiptap/core';
|
|
2
|
+
/**
|
|
3
|
+
* Whether commands may be called on the editor. TipTap builds an editor during the render, mounts its view later, and
|
|
4
|
+
* destroys one that has not been mounted within a moment (useEditor then makes a new one), so an effect can be handed an
|
|
5
|
+
* editor that is not there yet or no longer is. `isDestroyed` is true for both: it reads true until the view exists. A
|
|
6
|
+
* destroyed editor has no command manager, so `editor.commands` throws on it.
|
|
7
|
+
*/
|
|
8
|
+
export declare const isLive: (editor: Editor) => boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Brings the editor to a value the parent passed in, if it is one the editor did not just report itself.
|
|
11
|
+
* `known` is the last HTML the editor and the parent agree on (the starting value, then whatever the editor emitted or was
|
|
12
|
+
* given). The caret stays where it was, kept inside the new content, so a value changed from outside while the writer is
|
|
13
|
+
* typing does not throw the caret to the start.
|
|
14
|
+
*/
|
|
15
|
+
export declare const syncValue: (editor: Editor, value: string | undefined, known: {
|
|
16
|
+
current: string | undefined;
|
|
17
|
+
}) => void;
|
|
18
|
+
/** Sets whether the editor can be edited without telling the app something changed (TipTap emits an update by default). */
|
|
19
|
+
export declare const syncEditable: (editor: Editor, editable: boolean) => void;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Keeping the editor in step with the parent's value without ever touching an editor that is not there. A controlled
|
|
3
|
+
* RichTextEditor crashed on mount in rc.7 ("Cannot read properties of null (reading 'commands')"): TipTap makes the editor
|
|
4
|
+
* during the render, mounts its view later and destroys one that is not mounted in time, and the value effect ran at the
|
|
5
|
+
* first commit for every controlled value and called a command on whatever editor it was handed.
|
|
6
|
+
*
|
|
7
|
+
* PATH TAKEN: the destroyed editor is reproduced as the state TipTap leaves it in (no command manager, so `commands`
|
|
8
|
+
* throws), because the timing that produces it in an app cannot be driven from a test. The real behaviour in a browser,
|
|
9
|
+
* mount order included, is e2e/rich-text-editor-lifecycle.spec.ts.
|
|
10
|
+
*/
|
|
11
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TCssLength } from '../../../lib/utils';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
export interface IVideoPlayerProps {
|
|
3
|
+
export interface IVideoPlayerProps extends Omit<React.ComponentPropsWithoutRef<'div'>, 'children' | 'className' | 'title' | 'onPlay' | 'onPause' | 'onEnded' | 'onTimeUpdate'> {
|
|
4
4
|
/** Video source URL. */
|
|
5
5
|
src?: string;
|
|
6
6
|
/** Still frame shown before playback starts. */
|
|
@@ -52,4 +52,4 @@ export interface IVideoPlayerProps {
|
|
|
52
52
|
* both themes. Video is dark, so the letterbox and controls must stay dark and
|
|
53
53
|
* light-on-dark; this re-scopes existing tokens rather than hardcoding a colour.
|
|
54
54
|
*/
|
|
55
|
-
export declare const VideoPlayer: ({ src, poster, title, description, muted, loop, disabled, width, height, ratio, className, "aria-label": ariaLabel, onPlay, onPause, onEnded, onTimeUpdate, }: IVideoPlayerProps) => React.JSX.Element;
|
|
55
|
+
export declare const VideoPlayer: ({ src, poster, title, description, muted, loop, disabled, width, height, ratio, className, "aria-label": ariaLabel, style, onPlay, onPause, onEnded, onTimeUpdate, ...props }: IVideoPlayerProps) => React.JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Every exported component hands `aria-label`, `id` and `data-testid` to the element it documents as its root or main part.
|
|
3
|
+
* A component that took a closed list of props dropped the rest (Tabs' tablist had no accessible name even though the app
|
|
4
|
+
* passed `aria-label`), so this renders each one with the three and finds them again.
|
|
5
|
+
*
|
|
6
|
+
* Components that are not covered here, and why, are listed in INTENTIONAL_DROPS.
|
|
7
|
+
*/
|
|
8
|
+
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { Accordion as BaseAccordion } from '@base-ui/react/accordion';
|
|
1
2
|
import type * as React from 'react';
|
|
2
|
-
export interface IAccordionProps {
|
|
3
|
+
export interface IAccordionProps extends Omit<BaseAccordion.Root.Props, 'value' | 'defaultValue' | 'onValueChange' | 'multiple' | 'className' | 'children'> {
|
|
3
4
|
value?: string[];
|
|
4
5
|
defaultValue?: string[];
|
|
5
6
|
onValueChange?: (value: string[]) => void;
|
|
@@ -7,21 +8,21 @@ export interface IAccordionProps {
|
|
|
7
8
|
className?: string;
|
|
8
9
|
children: React.ReactNode;
|
|
9
10
|
}
|
|
10
|
-
export declare const Accordion: ({ value, defaultValue, onValueChange, multiple, className, children }: IAccordionProps) => React.JSX.Element;
|
|
11
|
-
export interface IAccordionItemProps {
|
|
11
|
+
export declare const Accordion: ({ value, defaultValue, onValueChange, multiple, className, children, ...props }: IAccordionProps) => React.JSX.Element;
|
|
12
|
+
export interface IAccordionItemProps extends Omit<BaseAccordion.Item.Props, 'value' | 'disabled' | 'className' | 'children'> {
|
|
12
13
|
value: string;
|
|
13
14
|
disabled?: boolean;
|
|
14
15
|
className?: string;
|
|
15
16
|
children: React.ReactNode;
|
|
16
17
|
}
|
|
17
|
-
export declare const AccordionItem: ({ value, disabled, className, children }: IAccordionItemProps) => React.JSX.Element;
|
|
18
|
-
export interface IAccordionTriggerProps {
|
|
18
|
+
export declare const AccordionItem: ({ value, disabled, className, children, ...props }: IAccordionItemProps) => React.JSX.Element;
|
|
19
|
+
export interface IAccordionTriggerProps extends Omit<BaseAccordion.Trigger.Props, 'className' | 'children'> {
|
|
19
20
|
className?: string;
|
|
20
21
|
children: React.ReactNode;
|
|
21
22
|
}
|
|
22
|
-
export declare const AccordionTrigger: ({ className, children }: IAccordionTriggerProps) => React.JSX.Element;
|
|
23
|
-
export interface IAccordionContentProps {
|
|
23
|
+
export declare const AccordionTrigger: ({ className, children, ...props }: IAccordionTriggerProps) => React.JSX.Element;
|
|
24
|
+
export interface IAccordionContentProps extends Omit<BaseAccordion.Panel.Props, 'className' | 'children'> {
|
|
24
25
|
className?: string;
|
|
25
26
|
children: React.ReactNode;
|
|
26
27
|
}
|
|
27
|
-
export declare const AccordionContent: ({ className, children }: IAccordionContentProps) => React.JSX.Element;
|
|
28
|
+
export declare const AccordionContent: ({ className, children, ...props }: IAccordionContentProps) => React.JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useRender } from '@base-ui/react/use-render';
|
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
|
3
3
|
export declare const badgeVariants: (props?: ({
|
|
4
|
-
variant?: "
|
|
4
|
+
variant?: "default" | "outline" | "secondary" | "ghost" | "destructive" | "link" | "success" | "warning" | "info" | null | undefined;
|
|
5
5
|
size?: "default" | "lg" | null | undefined;
|
|
6
6
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
7
|
export declare const Badge: ({ className, variant, size, render, ...props }: useRender.ComponentProps<"span"> & VariantProps<typeof badgeVariants>) => import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Button as ButtonPrimitive } from '@base-ui/react/button';
|
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
|
3
3
|
export declare const buttonVariants: (props?: ({
|
|
4
|
-
variant?: "
|
|
4
|
+
variant?: "default" | "outline" | "secondary" | "ghost" | "destructive" | "link" | null | undefined;
|
|
5
5
|
size?: "default" | "xs" | "sm" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
|
|
6
6
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
7
|
export declare const Button: ({ className, variant, size, ...props }: ButtonPrimitive.Props & VariantProps<typeof buttonVariants>) => import('react').JSX.Element;
|
|
@@ -6,7 +6,7 @@ export interface IInputGroupProps extends React.ComponentProps<'div'> {
|
|
|
6
6
|
export declare const InputGroup: ({ className, ...props }: IInputGroupProps) => React.JSX.Element;
|
|
7
7
|
export type TInputGroupAddonAlign = 'inline-start' | 'inline-end' | 'block-start' | 'block-end';
|
|
8
8
|
declare const inputGroupAddonVariants: (props?: ({
|
|
9
|
-
align?: "inline-end" | "inline-start" | "block-
|
|
9
|
+
align?: "inline-end" | "inline-start" | "block-end" | "block-start" | null | undefined;
|
|
10
10
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
11
11
|
export interface IInputGroupAddonProps extends React.ComponentProps<'div'>, VariantProps<typeof inputGroupAddonVariants> {
|
|
12
12
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
1
2
|
export type TPaginationRangeItem = number | 'ellipsis';
|
|
2
3
|
/**
|
|
3
4
|
* Compute the ordered list of page numbers and ellipsis markers to render.
|
|
@@ -7,11 +8,11 @@ export type TPaginationRangeItem = number | 'ellipsis';
|
|
|
7
8
|
export declare const getPaginationRange: (page: number, count: number, siblingCount?: number) => TPaginationRangeItem[];
|
|
8
9
|
/** Clamp a page number to the valid [1, count] range (count <= 0 yields 1). */
|
|
9
10
|
export declare const clampPage: (page: number, count: number) => number;
|
|
10
|
-
export interface IPaginationProps {
|
|
11
|
+
export interface IPaginationProps extends Omit<React.ComponentPropsWithoutRef<'nav'>, 'className' | 'children'> {
|
|
11
12
|
page: number;
|
|
12
13
|
count: number;
|
|
13
14
|
onPageChange: (page: number) => void;
|
|
14
15
|
siblingCount?: number;
|
|
15
16
|
className?: string;
|
|
16
17
|
}
|
|
17
|
-
export declare const Pagination: ({ page, count, onPageChange, siblingCount, className }: IPaginationProps) =>
|
|
18
|
+
export declare const Pagination: ({ page, count, onPageChange, siblingCount, className, ...props }: IPaginationProps) => React.JSX.Element;
|