@astryxdesign/core 0.6.1-canary.bf896f3 → 0.6.1-canary.dd9ec6f
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/dist/DateRangeInput/DateRangeInput.d.ts +3 -0
- package/dist/DateRangeInput/DateRangeInput.d.ts.map +1 -1
- package/dist/DateRangeInput/DateRangeInput.js +16 -9
- package/dist/Dialog/DialogHeader.d.ts +1 -1
- package/dist/Dialog/DialogHeader.d.ts.map +1 -1
- package/dist/Dialog/DialogHeader.js +10 -7
- package/dist/FileInput/FileInput.d.ts.map +1 -1
- package/dist/FileInput/FileInput.js +9 -3
- package/dist/Slider/Slider.d.ts.map +1 -1
- package/dist/Slider/Slider.js +5 -2
- package/dist/Spinner/Spinner.d.ts.map +1 -1
- package/dist/Spinner/Spinner.js +16 -12
- package/dist/astryx.css +2 -1
- package/package.json +3 -3
- package/src/DateRangeInput/DateRangeInput.doc.mjs +35 -7
- package/src/DateRangeInput/DateRangeInput.spec.md +203 -0
- package/src/DateRangeInput/DateRangeInput.test.tsx +100 -4
- package/src/DateRangeInput/DateRangeInput.tsx +29 -20
- package/src/Dialog/Dialog.doc.mjs +3 -0
- package/src/Dialog/Dialog.spec.md +1 -1
- package/src/Dialog/DialogHeader.doc.mjs +38 -0
- package/src/Dialog/DialogHeader.test.tsx +49 -0
- package/src/Dialog/DialogHeader.tsx +23 -4
- package/src/Dialog/modules/DialogHeader.spec.md +152 -0
- package/src/FileInput/FileInput.doc.mjs +2 -0
- package/src/FileInput/FileInput.spec.md +199 -0
- package/src/FileInput/FileInput.test.tsx +14 -0
- package/src/FileInput/FileInput.tsx +13 -3
- package/src/Slider/Slider.doc.mjs +16 -0
- package/src/Slider/Slider.spec.md +61 -47
- package/src/Slider/Slider.test.tsx +18 -0
- package/src/Slider/Slider.tsx +12 -6
- package/src/Spinner/Spinner.doc.mjs +2 -0
- package/src/Spinner/Spinner.test.tsx +8 -0
- package/src/Spinner/Spinner.tsx +22 -11
- package/src/theme/derivedVarRegistry.test.ts +6 -4
|
@@ -119,6 +119,9 @@ export interface DateRangeInputProps extends Omit<BaseProps, 'onChange' | 'defau
|
|
|
119
119
|
minRangeSpan?: number;
|
|
120
120
|
/**
|
|
121
121
|
* Preset date ranges shown as quick-select options beside the calendar.
|
|
122
|
+
* A preset is disabled when either endpoint violates `min`, `max`, or
|
|
123
|
+
* `dateConstraints`, or when its span violates `minRangeSpan` or
|
|
124
|
+
* `maxRangeSpan`.
|
|
122
125
|
*/
|
|
123
126
|
presets?: ReadonlyArray<DateRangePreset>;
|
|
124
127
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateRangeInput.d.ts","sourceRoot":"","sources":["../../src/DateRangeInput/DateRangeInput.tsx"],"names":[],"mappings":"AAqCA,OAAO,EAGL,KAAK,WAAW,EAKhB,KAAK,kBAAkB,EACxB,MAAM,UAAU,CAAC;AAGlB,OAAO,EAEL,KAAK,aAAa,EAClB,KAAK,SAAS,EACd,KAAK,SAAS,EACd,KAAK,aAAa,EACnB,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"DateRangeInput.d.ts","sourceRoot":"","sources":["../../src/DateRangeInput/DateRangeInput.tsx"],"names":[],"mappings":"AAqCA,OAAO,EAGL,KAAK,WAAW,EAKhB,KAAK,kBAAkB,EACxB,MAAM,UAAU,CAAC;AAGlB,OAAO,EAEL,KAAK,aAAa,EAClB,KAAK,SAAS,EACd,KAAK,SAAS,EACd,KAAK,aAAa,EACnB,MAAM,aAAa,CAAC;AAKrB,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAU9C,YAAY,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AAE3C,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,SAAS,CAAC;CAC3B;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} from "../Icon/index.js";
|
|
25
25
|
import { Spinner } from "../Spinner/index.js";
|
|
26
26
|
import { Calendar } from "../Calendar/index.js";
|
|
27
|
+
import { useCalendarConstraints } from "../Calendar/hooks/index.js";
|
|
27
28
|
import { usePopover } from "../Popover/index.js";
|
|
28
29
|
import { useTooltip } from "../Tooltip/index.js";
|
|
29
30
|
import { mergeProps } from "../utils/index.js";
|
|
@@ -232,6 +233,13 @@ export function DateRangeInput({
|
|
|
232
233
|
dialogLabel: t('@astryx.dateRangeInput.dialogLabel'),
|
|
233
234
|
closeButtonLabel: t('@astryx.dateInput.closeCalendar')
|
|
234
235
|
});
|
|
236
|
+
const {
|
|
237
|
+
isDateDisabled
|
|
238
|
+
} = useCalendarConstraints({
|
|
239
|
+
min,
|
|
240
|
+
max,
|
|
241
|
+
dateConstraints
|
|
242
|
+
});
|
|
235
243
|
const fireChange = useCallback(newValue => {
|
|
236
244
|
if (isBusy) {
|
|
237
245
|
return;
|
|
@@ -257,10 +265,6 @@ export function DateRangeInput({
|
|
|
257
265
|
fireChange(range);
|
|
258
266
|
popover.hide();
|
|
259
267
|
}, [fireChange, popover]);
|
|
260
|
-
const handlePresetClick = useCallback(preset => {
|
|
261
|
-
fireChange(preset.getRange());
|
|
262
|
-
popover.hide();
|
|
263
|
-
}, [fireChange, popover]);
|
|
264
268
|
const handleClear = useCallback(e => {
|
|
265
269
|
e.stopPropagation();
|
|
266
270
|
fireChange(null);
|
|
@@ -362,13 +366,13 @@ export function DateRangeInput({
|
|
|
362
366
|
children: [presets && presets.length > 0 && /*#__PURE__*/_jsx("div", {
|
|
363
367
|
role: "group",
|
|
364
368
|
"aria-label": t('@astryx.dateRangeInput.presetDateRanges'),
|
|
365
|
-
...{
|
|
369
|
+
...mergeProps(themeProps('date-range-input-presets'), {
|
|
366
370
|
className: "x78zum5 xdt5ytf xzye2dw x1b2ylru xw8tdv1 x18b5jzi xl0t3rv x1d77m7x"
|
|
367
|
-
},
|
|
371
|
+
}),
|
|
368
372
|
children: presets.map(preset => {
|
|
369
373
|
const presetRange = preset.getRange();
|
|
370
374
|
const isActive = isRangeEqual(value, presetRange);
|
|
371
|
-
const isPresetDisabled = !isRangeWithinSpan(presetRange, maxRangeSpan, minRangeSpan);
|
|
375
|
+
const isPresetDisabled = !isRangeWithinSpan(presetRange, maxRangeSpan, minRangeSpan) || isDateDisabled(plainDateFromISO(presetRange.start)) || isDateDisabled(plainDateFromISO(presetRange.end));
|
|
372
376
|
return /*#__PURE__*/_jsx("button", {
|
|
373
377
|
type: "button"
|
|
374
378
|
// These presets are independent action buttons navigated by
|
|
@@ -379,8 +383,11 @@ export function DateRangeInput({
|
|
|
379
383
|
,
|
|
380
384
|
"aria-current": isActive ? 'true' : undefined,
|
|
381
385
|
disabled: isPresetDisabled,
|
|
382
|
-
onClick: () =>
|
|
383
|
-
...
|
|
386
|
+
onClick: () => handleRangeSelect(presetRange),
|
|
387
|
+
...mergeProps(themeProps('date-range-input-preset', {
|
|
388
|
+
selected: isActive ? 'selected' : null,
|
|
389
|
+
disabled: isPresetDisabled ? 'disabled' : null
|
|
390
|
+
}), stylex.props(focusOutlineStyles.focusVisible, styles.presetButton, isActive && styles.presetButtonActive, isPresetDisabled && styles.presetButtonDisabled)),
|
|
384
391
|
children: preset.label
|
|
385
392
|
}, preset.label);
|
|
386
393
|
})
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file DialogHeader.tsx
|
|
3
|
-
* @input Uses React,
|
|
3
|
+
* @input Uses React, StyleX, LayoutHeader, Button, Icon, Heading, Text, DialogContext, mergeProps, themeProps
|
|
4
4
|
* @output Exports DialogHeader component and DialogHeaderProps
|
|
5
5
|
* @position Dialog header component; used with Dialog and Layout
|
|
6
6
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DialogHeader.d.ts","sourceRoot":"","sources":["../../src/Dialog/DialogHeader.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAoB,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAQxD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"DialogHeader.d.ts","sourceRoot":"","sources":["../../src/Dialog/DialogHeader.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAoB,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAQxD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAyC5C,MAAM,WAAW,iBAAkB,SAAQ,SAAS,CAAC,cAAc,CAAC;IAClE,wCAAwC;IACxC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAChC;;;;;OAKG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;;OAIG;IACH,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,OAAO,CAAC;IAE5C;;OAEG;IACH,YAAY,CAAC,EAAE,SAAS,CAAC;IAEzB;;OAEG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC;IAEvB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,YAAY,CAAC,EAC3B,KAAK,EACL,QAAQ,EACR,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,UAAU,EACV,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,EACH,GAAG,IAAI,EACR,EAAE,iBAAiB,+BAmFnB;yBA/Fe,YAAY"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @file DialogHeader.tsx
|
|
7
|
-
* @input Uses React,
|
|
7
|
+
* @input Uses React, StyleX, LayoutHeader, Button, Icon, Heading, Text, DialogContext, mergeProps, themeProps
|
|
8
8
|
* @output Exports DialogHeader component and DialogHeaderProps
|
|
9
9
|
* @position Dialog header component; used with Dialog and Layout
|
|
10
10
|
*
|
|
@@ -24,6 +24,8 @@ import { Button } from "../Button/index.js";
|
|
|
24
24
|
import { Icon } from "../Icon/index.js";
|
|
25
25
|
import { Heading } from "../Heading/Heading.js";
|
|
26
26
|
import { Text } from "../Text/Text.js";
|
|
27
|
+
import { mergeProps } from "../utils/index.js";
|
|
28
|
+
import { themeProps } from "../utils/themeProps.js";
|
|
27
29
|
import { useDialogContext } from "./DialogContext.js";
|
|
28
30
|
import { useTranslator } from "../i18n/index.js";
|
|
29
31
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -92,18 +94,18 @@ export function DialogHeader({
|
|
|
92
94
|
style: style,
|
|
93
95
|
...rest,
|
|
94
96
|
children: /*#__PURE__*/_jsxs("div", {
|
|
95
|
-
...{
|
|
97
|
+
...mergeProps(themeProps('dialog-header'), {
|
|
96
98
|
className: "x78zum5 x1cy8zhl x1qughib xjcht0a"
|
|
97
|
-
},
|
|
99
|
+
}),
|
|
98
100
|
children: [startContent && /*#__PURE__*/_jsx("div", {
|
|
99
101
|
...{
|
|
100
102
|
className: "x78zum5 x6s0dn4 x1txdalj x2lah0s"
|
|
101
103
|
},
|
|
102
104
|
children: startContent
|
|
103
105
|
}), /*#__PURE__*/_jsxs("div", {
|
|
104
|
-
...{
|
|
105
|
-
className: "x98rzlu xeuugli xqixskq"
|
|
106
|
-
},
|
|
106
|
+
...mergeProps(themeProps('dialog-header-title-block'), {
|
|
107
|
+
className: "x78zum5 xdt5ytf xsn7fz1 x98rzlu xeuugli xqixskq"
|
|
108
|
+
}),
|
|
107
109
|
children: [/*#__PURE__*/_jsx(Heading, {
|
|
108
110
|
ref: titleRef,
|
|
109
111
|
id: titleId,
|
|
@@ -132,7 +134,8 @@ export function DialogHeader({
|
|
|
132
134
|
tooltip: t('@astryx.dialog.close'),
|
|
133
135
|
icon: /*#__PURE__*/_jsx(Icon, {
|
|
134
136
|
icon: "close",
|
|
135
|
-
color: "inherit"
|
|
137
|
+
color: "inherit",
|
|
138
|
+
...themeProps('dialog-header-close-icon')
|
|
136
139
|
}),
|
|
137
140
|
onClick: () => {
|
|
138
141
|
onOpenChange?.(false);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileInput.d.ts","sourceRoot":"","sources":["../../src/FileInput/FileInput.tsx"],"names":[],"mappings":"AAsCA,OAAO,EAGL,KAAK,WAAW,EAChB,KAAK,kBAAkB,EACxB,MAAM,UAAU,CAAC;AASlB,YAAY,EACV,WAAW,IAAI,eAAe,EAC9B,eAAe,IAAI,mBAAmB,GACvC,MAAM,UAAU,CAAC;AAElB,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAgO9C,MAAM,WAAW,cAAe,SAAQ,IAAI,CAC1C,SAAS,EACT,UAAU,GAAG,cAAc,GAAG,OAAO,CACtC;IACC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;IAClC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;OAEG;IACH,KAAK,EAAE,IAAI,GAAG,IAAI,EAAE,GAAG,IAAI,CAAC;IAC5B;;OAEG;IACH,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,GAAG,IAAI,EAAE,GAAG,IAAI,KAAK,IAAI,CAAC;IAChD;;;OAGG;IACH,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,IAAI,GAAG,IAAI,EAAE,GAAG,IAAI,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9D;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;;;;;;;;;;;;;;;;OAmBG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB;;;;;;OAMG;IACH,aAAa,CAAC,EAAE,kBAAkB,CAAC;IACnC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC;IAC5B;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;OAIG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,EACxB,KAAK,EACL,aAAqB,EACrB,KAAK,EACL,QAAQ,EACR,YAAY,EACZ,MAAM,EACN,UAAkB,EAClB,OAAO,EACP,QAAQ,EACR,UAAkB,EAClB,eAAe,EACf,UAAkB,EAClB,SAAiB,EACjB,MAAM,EAAE,UAAU,EAClB,aAA0B,EAC1B,WAAW,EACX,WAAW,EACX,IAAc,EACd,UAAkB,EAClB,YAAY,EACZ,KAAK,EACL,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,EACH,GAAG,IAAI,EACR,EAAE,cAAc,+
|
|
1
|
+
{"version":3,"file":"FileInput.d.ts","sourceRoot":"","sources":["../../src/FileInput/FileInput.tsx"],"names":[],"mappings":"AAsCA,OAAO,EAGL,KAAK,WAAW,EAChB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AM,CAAC,EAAE,WAAW,CAAC;IACrB;;;;;;OAMG;IACH,aAAa,CAAC,EAAE,kBAAkB,CAAC;IACnC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC;IAC5B;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;OAIG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,EACxB,KAAK,EACL,aAAqB,EACrB,KAAK,EACL,QAAQ,EACR,YAAY,EACZ,MAAM,EACN,UAAkB,EAClB,OAAO,EACP,QAAQ,EACR,UAAkB,EAClB,eAAe,EACf,UAAkB,EAClB,SAAiB,EACjB,MAAM,EAAE,UAAU,EAClB,aAA0B,EAC1B,WAAW,EACX,WAAW,EACX,IAAc,EACd,UAAkB,EAClB,YAAY,EACZ,KAAK,EACL,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,EACH,GAAG,IAAI,EACR,EAAE,cAAc,+BAkbhB;yBA7ce,SAAS"}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* @file FileInput.tsx
|
|
7
7
|
* @input Uses React, useId, Field, Icon, Spinner, VisuallyHidden
|
|
8
|
-
* @output Exports FileInput component,
|
|
8
|
+
* @output Exports FileInput component, public types, and its root/icon theme targets
|
|
9
9
|
* @position Core implementation; consumed by index.ts, tested by FileInput.test.tsx
|
|
10
10
|
*
|
|
11
11
|
* SYNC: When modified, update these files to stay in sync:
|
|
@@ -406,7 +406,10 @@ export function FileInput({
|
|
|
406
406
|
children: [/*#__PURE__*/_jsx(Icon, {
|
|
407
407
|
icon: "arrowUp",
|
|
408
408
|
size: "md",
|
|
409
|
-
color: "secondary"
|
|
409
|
+
color: "secondary",
|
|
410
|
+
...themeProps('file-input-icon', {
|
|
411
|
+
mode
|
|
412
|
+
})
|
|
410
413
|
}), /*#__PURE__*/_jsx("span", {
|
|
411
414
|
...{
|
|
412
415
|
className: "x9ynric xjm74w1 x6pjikd xw6l6zx xv1l7n4 x2b8uid x87ps6o"
|
|
@@ -432,7 +435,10 @@ export function FileInput({
|
|
|
432
435
|
children: [/*#__PURE__*/_jsx(Icon, {
|
|
433
436
|
icon: "arrowUp",
|
|
434
437
|
size: "sm",
|
|
435
|
-
color: "secondary"
|
|
438
|
+
color: "secondary",
|
|
439
|
+
...themeProps('file-input-icon', {
|
|
440
|
+
mode
|
|
441
|
+
})
|
|
436
442
|
}), /*#__PURE__*/_jsx("span", {
|
|
437
443
|
...{
|
|
438
444
|
0: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Slider.d.ts","sourceRoot":"","sources":["../../src/Slider/Slider.tsx"],"names":[],"mappings":"AA0CA,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAQhD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAQ9C,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAC3C,SAAS,CAAC,cAAc,CAAC,EACzB,UAAU,CACX;IACC,wCAAwC;IACxC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAChC,qEAAqE;IACrE,KAAK,EAAE,MAAM,CAAC;IACd,8FAA8F;IAC9F,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,kDAAkD;IAClD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qDAAqD;IACrD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;;;;;;;;;;;;;;;;OAmBG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACz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,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,IAAI,CAAC;IAChD,8CAA8C;IAC9C,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC;AAED,MAAM,MAAM,WAAW,GAAG,iBAAiB,GAAG,gBAAgB,CAAC;AAoS/D;;;;;;;;GAQG;AACH,wBAAgB,MAAM,CAAC,EAAC,GAAG,EAAE,GAAG,KAAK,EAAC,EAAE,WAAW,+BA4qBlD;yBA5qBe,MAAM"}
|
package/dist/Slider/Slider.js
CHANGED
|
@@ -660,7 +660,10 @@ export function Slider({
|
|
|
660
660
|
onPointerMove: handlePointerMove,
|
|
661
661
|
onPointerUp: handlePointerUp,
|
|
662
662
|
onPointerCancel: handlePointerUp,
|
|
663
|
-
...{
|
|
663
|
+
...mergeProps(themeProps('slider-control', {
|
|
664
|
+
orientation,
|
|
665
|
+
disabled: isDisabled ? 'disabled' : null
|
|
666
|
+
}), {
|
|
664
667
|
0: {
|
|
665
668
|
className: "x1n2onr6 x78zum5 x6s0dn4 x1iyjqo2 x5ve5x3 x87ps6o xc8icb0 xw4jnvo x1ymw6g xkagaj0 xdt5ytf xl56j7k x1ypdohk x16khyan"
|
|
666
669
|
},
|
|
@@ -673,7 +676,7 @@ export function Slider({
|
|
|
673
676
|
3: {
|
|
674
677
|
className: "x1n2onr6 x78zum5 x6s0dn4 x1iyjqo2 x5ve5x3 x87ps6o xc8icb0 x1qx5ct2 x80b3aj xh8yej3 xbyyjgo xt0e3qv"
|
|
675
678
|
}
|
|
676
|
-
}[!!isHorizontal << 1 | !!isDisabled << 0],
|
|
679
|
+
}[!!isHorizontal << 1 | !!isDisabled << 0]),
|
|
677
680
|
children: [/*#__PURE__*/_jsx("div", {
|
|
678
681
|
"aria-hidden": "true",
|
|
679
682
|
...mergeProps(themeProps('slider-track', {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Spinner.d.ts","sourceRoot":"","sources":["../../src/Spinner/Spinner.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAQ,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAG5C,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"Spinner.d.ts","sourceRoot":"","sources":["../../src/Spinner/Spinner.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAQ,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAG5C,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAsB5C,QAAA,MAAM,KAAK;;;;;;;;;;;;;;;;;CAKV,CAAC;AA6WF,MAAM,MAAM,WAAW,GAAG,MAAM,OAAO,KAAK,CAAC;AAE7C,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAC;AAExE,MAAM,WAAW,YAAa,SAAQ,SAAS,CAAC,eAAe,CAAC;IAC9D,wCAAwC;IACxC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;IACjC;;;;;;;;;OASG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB;;;;;;;;;OASG;IACH,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB;;;;;;;;;;;;;OAaG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAMD;;;;;;;;;;;GAWG;AACH,wBAAgB,OAAO,CAAC,EACtB,IAAW,EACX,KAAiB,EACjB,KAAK,EACL,MAAM,EACN,SAAS,EACT,KAAK,EACL,YAAY,EAAE,SAAS,EACvB,aAAa,EAAE,MAAM,EACrB,GAAG,EACH,GAAG,SAAS,EACb,EAAE,YAAY,+BAoHd;yBA/He,OAAO"}
|
package/dist/Spinner/Spinner.js
CHANGED
|
@@ -28,21 +28,17 @@ import { themeProps } from "../utils/themeProps.js";
|
|
|
28
28
|
// =============================================================================
|
|
29
29
|
|
|
30
30
|
/**
|
|
31
|
-
*
|
|
32
|
-
* swept 135deg, not the 270deg its constant's comment claimed.
|
|
31
|
+
* Default fraction of the ring the moving arc covers. The canvas ring this
|
|
32
|
+
* replaces swept 135deg, not the 270deg its constant's comment claimed.
|
|
33
|
+
*
|
|
34
|
+
* Themeable via `--spinner-arc-fraction`, declared alongside the other public
|
|
35
|
+
* vars in `sizeStyles` below. Only the inline `strokeDasharray` attribute
|
|
36
|
+
* (the pre-stylesheet render — see its own comment) still reads this
|
|
37
|
+
* constant directly; the CSS side composes the dash from the live var.
|
|
33
38
|
*/
|
|
34
39
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
35
40
|
const ARC_FRACTION = 0.375;
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* The dash pattern, per unit of diameter: one arc, then the gap that closes
|
|
39
|
-
* the circle. The circumference is `pi x diameter`, so multiplying the
|
|
40
|
-
* resolved diameter by these two constants gives exactly the lengths the
|
|
41
|
-
* default render has always used, and scales them with a themed diameter.
|
|
42
|
-
*/
|
|
43
41
|
const PI = 3.141592653589793;
|
|
44
|
-
const ARC_DASH = PI * ARC_FRACTION;
|
|
45
|
-
const ARC_GAP = PI * (1 - ARC_FRACTION);
|
|
46
42
|
const SIZES = {
|
|
47
43
|
sm: {
|
|
48
44
|
diameter: 10,
|
|
@@ -269,25 +265,33 @@ const styles = {
|
|
|
269
265
|
// cost of its own — with nothing declaring the var,
|
|
270
266
|
// `theme-var-reachability.js` cannot find an element to check, so a documented
|
|
271
267
|
// var reads as unreachable.
|
|
268
|
+
// Arc fraction is not itself size-dependent, but it declares alongside the
|
|
269
|
+
// two vars that are, on the same per-size condition (`!hasLabel` gate at the
|
|
270
|
+
// call site) — it needs a home on whichever element carries the theme
|
|
271
|
+
// target, and this is the object already wired to be there.
|
|
272
272
|
const sizeStyles = {
|
|
273
273
|
sm: {
|
|
274
274
|
"--spinner-diameter": "x11wm0hx",
|
|
275
275
|
"--spinner-stroke-width": "xls98ul",
|
|
276
|
+
"--spinner-arc-fraction": "x7o5821",
|
|
276
277
|
$$css: true
|
|
277
278
|
},
|
|
278
279
|
md: {
|
|
279
280
|
"--spinner-diameter": "x15pu9g6",
|
|
280
281
|
"--spinner-stroke-width": "xr0wkrm",
|
|
282
|
+
"--spinner-arc-fraction": "x7o5821",
|
|
281
283
|
$$css: true
|
|
282
284
|
},
|
|
283
285
|
lg: {
|
|
284
286
|
"--spinner-diameter": "x1w424tr",
|
|
285
287
|
"--spinner-stroke-width": "xr0wkrm",
|
|
288
|
+
"--spinner-arc-fraction": "x7o5821",
|
|
286
289
|
$$css: true
|
|
287
290
|
},
|
|
288
291
|
xl: {
|
|
289
292
|
"--spinner-diameter": "x1orj1z9",
|
|
290
293
|
"--spinner-stroke-width": "x7y2bof",
|
|
294
|
+
"--spinner-arc-fraction": "x7o5821",
|
|
291
295
|
$$css: true
|
|
292
296
|
}
|
|
293
297
|
};
|
|
@@ -440,7 +444,7 @@ export function Spinner({
|
|
|
440
444
|
,
|
|
441
445
|
strokeDasharray: `${arcLength} ${circumference - arcLength}`,
|
|
442
446
|
...{
|
|
443
|
-
className: "xbh8q5q x1764fhq x1g0ag68 x1owpc8m xio8zfp xgw3ha0 xtve3lm x9tu13d
|
|
447
|
+
className: "xbh8q5q x1764fhq x1g0ag68 x1owpc8m xio8zfp xgw3ha0 xtve3lm x9tu13d xdv9ggb"
|
|
444
448
|
}
|
|
445
449
|
})]
|
|
446
450
|
})
|
package/dist/astryx.css
CHANGED
|
@@ -333,6 +333,7 @@
|
|
|
333
333
|
.xnpej1e{--radius-element:var(--radius-full)}
|
|
334
334
|
.x11rj6l1{--selectable-card-ring-color:var(--color-accent)}
|
|
335
335
|
.xkce8z9{--separator-display:flex}
|
|
336
|
+
.x7o5821{--spinner-arc-fraction:.375}
|
|
336
337
|
.x1uzk0gl{--spinner-color:currentColor}
|
|
337
338
|
.xt1b8mc{--spinner-color:var(--color-accent)}
|
|
338
339
|
.x13u6jys{--spinner-color:var(--color-on-dark)}
|
|
@@ -1173,7 +1174,7 @@
|
|
|
1173
1174
|
.x24f09q:not(#\#):not(#\#):not(#\#){scrollbar-gutter:auto}
|
|
1174
1175
|
.xosa0jh:not(#\#):not(#\#):not(#\#){scrollbar-width:auto}
|
|
1175
1176
|
.x1rohswg:not(#\#):not(#\#):not(#\#){scrollbar-width:none}
|
|
1176
|
-
.
|
|
1177
|
+
.xdv9ggb:not(#\#):not(#\#):not(#\#){stroke-dasharray:calc(var(--_spinner-ring-diameter) * 3.141592653589793 * var(--spinner-arc-fraction)) calc(var(--_spinner-ring-diameter) * 3.141592653589793 * (1 - var(--spinner-arc-fraction)))}
|
|
1177
1178
|
.x1owpc8m:not(#\#):not(#\#):not(#\#){stroke-linecap:round}
|
|
1178
1179
|
.x7bo2k:not(#\#):not(#\#):not(#\#){stroke-opacity:.3}
|
|
1179
1180
|
.x1smxkh6:not(#\#):not(#\#):not(#\#){stroke-opacity:.302}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astryxdesign/core",
|
|
3
|
-
"version": "0.6.1-canary.
|
|
3
|
+
"version": "0.6.1-canary.dd9ec6f",
|
|
4
4
|
"displayName": "Astryx Core",
|
|
5
5
|
"description": "The component library. Accessible, themeable React components with built-in spacing, dark mode, and StyleX styling.",
|
|
6
6
|
"author": "Meta Open Source",
|
|
@@ -672,8 +672,8 @@
|
|
|
672
672
|
"react-dom": ">=19.0.0"
|
|
673
673
|
},
|
|
674
674
|
"devDependencies": {
|
|
675
|
-
"@astryxdesign/a11y-spec": "0.6.1-canary.
|
|
676
|
-
"@astryxdesign/cli": "0.6.1-canary.
|
|
675
|
+
"@astryxdesign/a11y-spec": "0.6.1-canary.dd9ec6f",
|
|
676
|
+
"@astryxdesign/cli": "0.6.1-canary.dd9ec6f",
|
|
677
677
|
"@babel/cli": "^7.29.7",
|
|
678
678
|
"@babel/core": "^7.29.7",
|
|
679
679
|
"@babel/preset-react": "^7.29.7",
|
|
@@ -114,7 +114,7 @@ export const docs = {
|
|
|
114
114
|
name: 'presets',
|
|
115
115
|
type: 'Array<DateRangePreset>',
|
|
116
116
|
description:
|
|
117
|
-
'Preset ranges shown as quick-select options beside the calendar.',
|
|
117
|
+
'Preset ranges shown as quick-select options beside the calendar. A preset is disabled when either endpoint violates min, max, or dateConstraints, or when its span violates minRangeSpan or maxRangeSpan.',
|
|
118
118
|
},
|
|
119
119
|
{
|
|
120
120
|
name: 'hasClear',
|
|
@@ -178,9 +178,21 @@ export const docs = {
|
|
|
178
178
|
],
|
|
179
179
|
theming: {
|
|
180
180
|
targets: [
|
|
181
|
-
{
|
|
181
|
+
{
|
|
182
|
+
className: 'astryx-date-range-input',
|
|
183
|
+
visualProps: ['size', 'status'],
|
|
184
|
+
states: ['disabled'],
|
|
185
|
+
},
|
|
182
186
|
{className: 'astryx-date-range-input-toggle-icon', states: ['state']},
|
|
183
|
-
{
|
|
187
|
+
{
|
|
188
|
+
className: 'astryx-date-range-input-clear-icon',
|
|
189
|
+
deprecatedFor: 'input-clear-icon',
|
|
190
|
+
},
|
|
191
|
+
{className: 'astryx-date-range-input-presets'},
|
|
192
|
+
{
|
|
193
|
+
className: 'astryx-date-range-input-preset',
|
|
194
|
+
states: ['selected', 'disabled'],
|
|
195
|
+
},
|
|
184
196
|
],
|
|
185
197
|
},
|
|
186
198
|
usage: {
|
|
@@ -230,6 +242,12 @@ export const docs = {
|
|
|
230
242
|
description:
|
|
231
243
|
'Text above the trigger describing what date range is expected.',
|
|
232
244
|
},
|
|
245
|
+
{
|
|
246
|
+
name: 'Field surface',
|
|
247
|
+
required: true,
|
|
248
|
+
description:
|
|
249
|
+
'Bordered control containing the calendar toggle, range trigger, and end affordances.',
|
|
250
|
+
},
|
|
233
251
|
{
|
|
234
252
|
name: 'Trigger button',
|
|
235
253
|
required: true,
|
|
@@ -252,6 +270,12 @@ export const docs = {
|
|
|
252
270
|
required: false,
|
|
253
271
|
description: 'A list of preset range options beside the calendar.',
|
|
254
272
|
},
|
|
273
|
+
{
|
|
274
|
+
name: 'Preset button',
|
|
275
|
+
required: false,
|
|
276
|
+
description:
|
|
277
|
+
'A quick-select action for one preset range, reflecting current and disabled states.',
|
|
278
|
+
},
|
|
255
279
|
{
|
|
256
280
|
name: 'Clear button',
|
|
257
281
|
required: false,
|
|
@@ -320,7 +344,8 @@ export const docsDense = {
|
|
|
320
344
|
isDisabled: 'disable trigger+picker',
|
|
321
345
|
disabledMessage:
|
|
322
346
|
'reason shown in a tooltip on hover/focus when disabled; keeps trigger focusable via aria-disabled',
|
|
323
|
-
value:
|
|
347
|
+
value:
|
|
348
|
+
'selected range {start, end} or null; import DateRange type from @astryxdesign/core/DateRangeInput (do not redeclare)',
|
|
324
349
|
onChange: 'callback on range change; null on clear',
|
|
325
350
|
min: 'min selectable date: ISODateString template literal type (YYYY-MM-DD); use string literal or cast `as ISODateString`',
|
|
326
351
|
max: 'max selectable date: ISODateString template literal type (YYYY-MM-DD); use string literal or cast `as ISODateString`',
|
|
@@ -329,15 +354,18 @@ export const docsDense = {
|
|
|
329
354
|
'max days a range may span, both endpoints counted (7 = a 7-day window); caps the window from the picked start. Selection-only; does not rewrite an over-wide value',
|
|
330
355
|
minRangeSpan:
|
|
331
356
|
'min days a range must span, both endpoints counted (2 forbids a single-day range); repeated start click commits one day when allowed, otherwise cancels; default 1',
|
|
332
|
-
presets:
|
|
357
|
+
presets:
|
|
358
|
+
'preset ranges as quick-select options; disabled when an endpoint or span violates the corresponding constraints',
|
|
333
359
|
hasClear: 'clear button when range is set (default true)',
|
|
334
360
|
placeholder: 'placeholder when empty',
|
|
335
361
|
size: 'trigger size',
|
|
336
362
|
status: 'error/warning/success status',
|
|
337
|
-
statusVariant:
|
|
363
|
+
statusVariant:
|
|
364
|
+
'How status message is placed: attached overlaps below input; detached floats below w/ spacing; tooltip hides the box and shows it on the status icon.',
|
|
338
365
|
labelTooltip: 'tooltip via info icon at label end',
|
|
339
366
|
numberOfMonths: 'months in calendar (default 2)',
|
|
340
|
-
weekStartsOn:
|
|
367
|
+
weekStartsOn:
|
|
368
|
+
'first day of week in calendar (0=Sunday, or name e.g. "mon")',
|
|
341
369
|
changeAction:
|
|
342
370
|
'async action fired after onChange; drives optimistic UI updates via useTransition',
|
|
343
371
|
isLoading: 'loading state; disables interaction + shows a spinner',
|