@astryxdesign/core 0.6.1-canary.f48d468 → 0.6.2-canary.a4bcbeb

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.
Files changed (33) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/dist/DateRangeInput/DateRangeInput.d.ts +3 -0
  3. package/dist/DateRangeInput/DateRangeInput.d.ts.map +1 -1
  4. package/dist/DateRangeInput/DateRangeInput.js +16 -9
  5. package/dist/Dialog/DialogHeader.d.ts +1 -1
  6. package/dist/Dialog/DialogHeader.d.ts.map +1 -1
  7. package/dist/Dialog/DialogHeader.js +10 -7
  8. package/dist/FileInput/FileInput.d.ts.map +1 -1
  9. package/dist/FileInput/FileInput.js +9 -3
  10. package/dist/Spinner/Spinner.d.ts +1 -1
  11. package/dist/Spinner/Spinner.d.ts.map +1 -1
  12. package/dist/Spinner/Spinner.js +7 -3
  13. package/locales/en.json +16 -0
  14. package/locales/pseudo.json +12 -0
  15. package/package.json +3 -3
  16. package/scripts/agent-doc-state.mjs +1 -1
  17. package/src/DateRangeInput/DateRangeInput.doc.mjs +35 -7
  18. package/src/DateRangeInput/DateRangeInput.spec.md +203 -0
  19. package/src/DateRangeInput/DateRangeInput.test.tsx +100 -4
  20. package/src/DateRangeInput/DateRangeInput.tsx +29 -20
  21. package/src/Dialog/Dialog.doc.mjs +3 -0
  22. package/src/Dialog/Dialog.spec.md +1 -1
  23. package/src/Dialog/DialogHeader.doc.mjs +38 -0
  24. package/src/Dialog/DialogHeader.test.tsx +49 -0
  25. package/src/Dialog/DialogHeader.tsx +23 -4
  26. package/src/Dialog/modules/DialogHeader.spec.md +152 -0
  27. package/src/FileInput/FileInput.doc.mjs +2 -0
  28. package/src/FileInput/FileInput.spec.md +199 -0
  29. package/src/FileInput/FileInput.test.tsx +14 -0
  30. package/src/FileInput/FileInput.tsx +13 -3
  31. package/src/Spinner/Spinner.doc.mjs +4 -3
  32. package/src/Spinner/Spinner.test.tsx +29 -0
  33. package/src/Spinner/Spinner.tsx +9 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,38 @@
1
1
  # @xds/core
2
2
 
3
+ # 0.6.2
4
+
5
+ #### New Features
6
+
7
+ - Markdown: add an opt-in math renderer (#6312)
8
+ Supply `components.math` to parse `$…$` inline math and `$$…$$` display math. The renderer receives the delimiter-free expression as `value` and its placement as `display: 'inline' | 'block'`, so applications can connect their preferred math typesetter without preprocessing Markdown or accepting raw HTML.
9
+
10
+ Math is off unless the renderer is present. Direct parser callers can opt in with `MathParseOptions` (`{math: true}`) and incremental callers create `IncrementalParseState<true>` via `createIncrementalState<true>()`. Those overloads return `InlineNodeWithMath` or `BlockNodeWithMath`; default, legacy-set, `math: false`, and `ParseOptions`- annotated calls retain the existing `InlineNode` and `BlockNode` unions, so exhaustive consumers do not gain a case unless they opt in. Existing Markdown parsing and rendering stay unchanged by default; code stays opaque, escaped and unmatched delimiters stay literal, and inline plugins skip math. Incremental parsing preserves full-parse results when display math is nested in ordinary or task lists and blockquotes, including quote-depth transitions, with LF or CRLF and with source ranges enabled.
11
+
12
+ - DialogHeader exposes theme targets for its header gap, title/subtitle gap, and close-icon size. (#6240)
13
+ - Expose DateRangeInput preset theming targets (#6223)
14
+ - Expose the Slider interactive control as a theme target (#6225)
15
+ - Expose FileInput's upload icon as a mode-aware theme target (#5417)
16
+ - Add a `--spinner-arc-fraction` public var to Spinner, so a theme can change how much of the ring the moving arc covers (defaults to 0.375, a 135deg sweep), the same way it already retheme diameter, stroke width, and color. (#5845)
17
+
18
+ #### Fixes
19
+
20
+ - Adds the `@astryx.chatTypingIndicator.*` catalog keys so the lab ChatTypingIndicator can build its typing status from the translation runtime instead of English literals, joining names with `Intl.ListFormat` for the active locale. English output is unchanged. (#6220)
21
+ - Spinner: the default assistive label now comes from the translation catalog (`@astryx.spinner.loading`) instead of a literal `"Loading"` in component source, so a localized app translates the status. An explicit `aria-label` and a visible string label still take precedence, in that order. (#6217)
22
+
23
+ #### Contributors
24
+
25
+ Thanks to everyone who contributed to this release:
26
+
27
+ - @athz
28
+ - @cixzhang
29
+ - @freddymeta
30
+ - @HelloOjasMutreja
31
+ - @ksying
32
+ - @Kyujenius
33
+
34
+ ---
35
+
3
36
  # 0.6.1
4
37
 
5
38
  #### New Features
@@ -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;AAIrB,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;AAED,MAAM,MAAM,kBAAkB,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAEpD,YAAY,EACV,WAAW,IAAI,oBAAoB,EACnC,eAAe,IAAI,wBAAwB,GAC5C,MAAM,UAAU,CAAC;AAsKlB,MAAM,WAAW,mBAAoB,SAAQ,IAAI,CAC/C,SAAS,EACT,UAAU,GAAG,c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AC,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,IAAI,CAAC,EAAE,kBAAkB,CAAC;IAE1B;;OAEG;IACH,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB;;;;;;OAMG;IACH,aAAa,CAAC,EAAE,kBAAkB,CAAC;IAEnC;;;;OAIG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;OAGG;IACH,cAAc,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;IAEvB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,SAAS,GAAG,aAAa,CAAC;CAC1C;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,cAAc,CAAC,EAC7B,KAAK,EACL,aAAqB,EACrB,WAAW,EACX,UAAkB,EAClB,UAAkB,EAClB,UAAkB,EAClB,eAAe,EACf,KAAK,EACL,QAAQ,EACR,YAAY,EACZ,SAAiB,EACjB,GAAG,EACH,GAAG,EACH,eAAe,EACf,YAAY,EACZ,YAAY,EACZ,OAAO,EACP,QAAe,EACf,WAAW,EAAE,oBAAoB,EACjC,IAAI,EAAE,QAAQ,EACd,MAAM,EACN,aAA0B,EAC1B,YAAY,EACZ,cAAkB,EAClB,YAAY,EACZ,KAAK,EACL,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,EACH,GAAG,IAAI,EACR,EAAE,mBAAmB,+BA0RrB;yBA1Te,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,cAA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ClB,YAAY,EACZ,KAAK,EACL,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,EACH,GAAG,IAAI,EACR,EAAE,mBAAmB,+BA+RrB;yBA/Te,cAAc"}
@@ -24,6 +24,7 @@ import { Field, InputClearButton, inputWrapperStyles, inputStatusBorderStyles, i
24
24
  import { Icon } 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: () => handlePresetClick(preset),
383
- ...stylex.props(focusOutlineStyles.focusVisible, styles.presetButton, isActive && styles.presetButtonActive, isPresetDisabled && styles.presetButtonDisabled),
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, useEffect, useRef, LayoutHeader, Button, Icon, Heading, Text, DialogContext
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;AAoC5C,MAAM,WAAW,iBAAkB,SAAQ,SAA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Y,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, useEffect, useRef, LayoutHeader, Button, Icon, Heading, Text, DialogContext
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,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,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,+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, FileInputProps, FileInputStatus
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,6 +1,6 @@
1
1
  /**
2
2
  * @file Spinner.tsx
3
- * @input Uses React, StyleX, SVG rendering
3
+ * @input Uses React, i18n (useTranslator), StyleX, SVG rendering
4
4
  * @output Exports Spinner component, SpinnerProps, SpinnerSize, SpinnerShade types
5
5
  * @position Core implementation of spinner loading indicator
6
6
  *
@@ -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;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,YA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AC;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,+BAyHd;yBApIe,OAAO"}
@@ -4,7 +4,7 @@
4
4
 
5
5
  /**
6
6
  * @file Spinner.tsx
7
- * @input Uses React, StyleX, SVG rendering
7
+ * @input Uses React, i18n (useTranslator), StyleX, SVG rendering
8
8
  * @output Exports Spinner component, SpinnerProps, SpinnerSize, SpinnerShade types
9
9
  * @position Core implementation of spinner loading indicator
10
10
  *
@@ -21,6 +21,7 @@ import "../theme/tokens.stylex.js";
21
21
  import { colorVars, durationVars, spacingVars } from "../theme/tokens.stylex.js";
22
22
  import { Text } from "../Text/Text.js";
23
23
  import { mergeProps } from "../utils/index.js";
24
+ import { useTranslator } from "../i18n/index.js";
24
25
  import { themeProps } from "../utils/themeProps.js";
25
26
 
26
27
  // =============================================================================
@@ -381,6 +382,7 @@ export function Spinner({
381
382
  const arcLength = circumference * ARC_FRACTION;
382
383
  const hasLabel = label != null;
383
384
  const labelId = useId();
385
+ const t = useTranslator();
384
386
 
385
387
  // When a visible string label renders (and no explicit aria-label is set),
386
388
  // name the status element from the visible Text via aria-labelledby instead
@@ -388,8 +390,10 @@ export function Spinner({
388
390
  // announced twice by screen readers (WCAG 4.1.2).
389
391
  const namedByVisibleLabel = hasLabel && typeof label === 'string' && ariaLabel == null;
390
392
 
391
- // Resolve accessible name: explicit aria-label > string label > "Loading"
392
- const resolvedAriaLabel = ariaLabel ?? (typeof label === 'string' ? label : undefined) ?? 'Loading';
393
+ // Resolve accessible name: explicit aria-label > string label > the
394
+ // localized default. The fallback is AT-facing text, so it goes through the
395
+ // translation runtime like visible text does.
396
+ const resolvedAriaLabel = ariaLabel ?? (typeof label === 'string' ? label : undefined) ?? t('@astryx.spinner.loading');
393
397
  const spinner = /*#__PURE__*/_jsx("span", {
394
398
  ref: hasLabel ? undefined : ref,
395
399
  role: "status",
package/locales/en.json CHANGED
@@ -447,6 +447,18 @@
447
447
  "defaultMessage": "Next",
448
448
  "description": "Screen-reader-only label on the right-arrow button in a Lightbox (navigates to next media item). Pairs with `lightbox.previous`."
449
449
  },
450
+ "@astryx.chatTypingIndicator.one": {
451
+ "defaultMessage": "{name} is typing…",
452
+ "description": "Politely announced status naming the single person currently typing in a chat. `name` is a display name supplied by the app. Present-progressive form; the trailing ellipsis is the single … character."
453
+ },
454
+ "@astryx.chatTypingIndicator.many": {
455
+ "defaultMessage": "{names} are typing…",
456
+ "description": "Politely announced status when more than one person is typing in a chat. `names` is already joined for the locale by Intl.ListFormat, so translations must not add their own conjunction — place `{names}` where the joined list belongs."
457
+ },
458
+ "@astryx.chatTypingIndicator.others": {
459
+ "defaultMessage": "{count, number} {count, plural, one {other} other {others}}",
460
+ "description": "Overflow element for the chat typing status when three or more people type: the first name is shown and the rest collapse into this phrase, which is then joined to the name by Intl.ListFormat. Renders as the last list item, e.g. \"Ana and 2 others\"."
461
+ },
450
462
  "@astryx.listInput.emptyTitle": {
451
463
  "defaultMessage": "No {itemName}s yet",
452
464
  "description": "EmptyState title shown inside a lab ListInput when its collection has no records. `{itemName}` is the consumer's singular noun for one record (e.g. \"guest\"); the source appends a literal \"s\" to pluralize it, which only works for regular English plurals. If your language cannot pluralize an interpolated noun this way, rephrase around `{itemName}` instead (e.g. \"No {itemName} added yet\")."
@@ -935,6 +947,10 @@
935
947
  "defaultMessage": "Loading",
936
948
  "description": "Screen-reader-only live-region announcement while a Button is in its loading state (spinner shown, action in flight). Progressive sense (\"work in progress\"), not a noun. Kept separate from `typeahead.loading` — translations may diverge."
937
949
  },
950
+ "@astryx.spinner.loading": {
951
+ "defaultMessage": "Loading",
952
+ "description": "Screen-reader-only default name for a standalone Spinner's role=\"status\" element, used when the consumer supplies neither `aria-label` nor a visible string label. Present-progressive form. Kept separate from `button.loading` and `typeahead.loading` — translations may diverge."
953
+ },
938
954
  "@astryx.chatComposerDrawer.expand": {
939
955
  "defaultMessage": "Expand {label}",
940
956
  "description": "Screen-reader-only label on the ChatComposerDrawer toggle when the drawer is collapsed. `{label}` is the drawer's visible name — example: `Expand Attachments`. Pairs with `collapse`."
@@ -335,6 +335,15 @@
335
335
  "@astryx.lightbox.next": {
336
336
  "defaultMessage": "⟦Ñéẋţ⟧"
337
337
  },
338
+ "@astryx.chatTypingIndicator.one": {
339
+ "defaultMessage": "⟦{name} íš ţýþíñĝ…⟧"
340
+ },
341
+ "@astryx.chatTypingIndicator.many": {
342
+ "defaultMessage": "⟦{names} àřé ţýþíñĝ…⟧"
343
+ },
344
+ "@astryx.chatTypingIndicator.others": {
345
+ "defaultMessage": "⟦{count, number} {count, plural, one {other} other {others}}⟧"
346
+ },
338
347
  "@astryx.listInput.emptyTitle": {
339
348
  "defaultMessage": "⟦Ñó {itemName}š ýéţ⟧"
340
349
  },
@@ -701,6 +710,9 @@
701
710
  "@astryx.button.loading": {
702
711
  "defaultMessage": "⟦Łóàðíñĝ⟧"
703
712
  },
713
+ "@astryx.spinner.loading": {
714
+ "defaultMessage": "⟦Łóàðíñĝ⟧"
715
+ },
704
716
  "@astryx.chatComposerDrawer.expand": {
705
717
  "defaultMessage": "⟦Éẋþàñð {label}⟧"
706
718
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astryxdesign/core",
3
- "version": "0.6.1-canary.f48d468",
3
+ "version": "0.6.2-canary.a4bcbeb",
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.f48d468",
676
- "@astryxdesign/cli": "0.6.1-canary.f48d468",
675
+ "@astryxdesign/a11y-spec": "0.6.2-canary.a4bcbeb",
676
+ "@astryxdesign/cli": "0.6.2-canary.a4bcbeb",
677
677
  "@babel/cli": "^7.29.7",
678
678
  "@babel/core": "^7.29.7",
679
679
  "@babel/preset-react": "^7.29.7",
@@ -57,7 +57,7 @@ export const LEGACY_MARKER_END = '<!-- XDS:END -->';
57
57
  * targets are user-chosen and not enumerable here.)
58
58
  */
59
59
  export const AGENT_DOC_PATHS = [
60
- AGENTS_MD, // Codex / ChatGPT / generic
60
+ AGENTS_MD, // Codex / ChatGPT / Muse / generic
61
61
  CLAUDE_MD, // Claude Code (root)
62
62
  CLAUDE_DIR_MD, // Claude Code (.claude/CLAUDE.md)
63
63
  CURSOR_RULES, // Cursor
@@ -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
- {className: 'astryx-date-range-input', visualProps: ['size', 'status'], states: ['disabled']},
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
- {className: 'astryx-date-range-input-clear-icon', deprecatedFor: 'input-clear-icon'},
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: 'selected range {start, end} or null; import DateRange type from @astryxdesign/core/DateRangeInput (do not redeclare)',
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: 'preset ranges as quick-select options',
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: '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.',
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: 'first day of week in calendar (0=Sunday, or name e.g. "mon")',
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',