@astryxdesign/lab 0.3.0-canary.e9fc2bb → 0.3.0-canary.ee705d8

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.
@@ -71,7 +71,6 @@ export interface RichTextEditorAutoLinkPluginProps {
71
71
  * @example
72
72
  * ```
73
73
  * import {RichTextEditor, RichTextEditorAutoLinkPlugin} from '@astryxdesign/lab';
74
- *
75
74
  * <RichTextEditor
76
75
  * label="Notes"
77
76
  * plugins={<RichTextEditorAutoLinkPlugin />}
@@ -1 +1 @@
1
- {"version":3,"file":"RichTextEditorAutoLinkPlugin.d.ts","sourceRoot":"","sources":["../../src/RichTextEditor/RichTextEditorAutoLinkPlugin.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,EAGL,KAAK,WAAW,EACjB,MAAM,sCAAsC,CAAC;AAG9C;;;;GAIG;AACH,eAAO,MAAM,uBAAuB;;;CAG1B,CAAC;AAEX;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,EAAE,WAAW,EAc9C,CAAC;AAEF,MAAM,WAAW,iCAAiC;IAChD;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,WAAW,EAAE,CAAC;IACzB;;;OAGG;IACH,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;CACjE;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,4BAA4B,CAAC,EAC3C,QAAgC,EAChC,QAAQ,GACT,EAAE,iCAAiC,+BAEnC;yBALe,4BAA4B"}
1
+ {"version":3,"file":"RichTextEditorAutoLinkPlugin.d.ts","sourceRoot":"","sources":["../../src/RichTextEditor/RichTextEditorAutoLinkPlugin.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,EAGL,KAAK,WAAW,EACjB,MAAM,sCAAsC,CAAC;AAG9C;;;;GAIG;AACH,eAAO,MAAM,uBAAuB;;;CAG1B,CAAC;AAEX;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,EAAE,WAAW,EAc9C,CAAC;AAEF,MAAM,WAAW,iCAAiC;IAChD;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,WAAW,EAAE,CAAC;IACzB;;;OAGG;IACH,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;CACjE;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,4BAA4B,CAAC,EAC3C,QAAgC,EAChC,QAAQ,GACT,EAAE,iCAAiC,+BAEnC;yBALe,4BAA4B"}
@@ -76,7 +76,6 @@ export const DEFAULT_LINK_MATCHERS = [text => {
76
76
  * @example
77
77
  * ```
78
78
  * import {RichTextEditor, RichTextEditorAutoLinkPlugin} from '@astryxdesign/lab';
79
- *
80
79
  * <RichTextEditor
81
80
  * label="Notes"
82
81
  * plugins={<RichTextEditorAutoLinkPlugin />}
@@ -1 +1 @@
1
- {"version":3,"file":"useCurrentTime.d.ts","sourceRoot":"","sources":["../../src/Schedule/useCurrentTime.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,SAAS,CAAC;AAmCrC,wBAAgB,cAAc,IAAI,OAAO,CAExC"}
1
+ {"version":3,"file":"useCurrentTime.d.ts","sourceRoot":"","sources":["../../src/Schedule/useCurrentTime.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,SAAS,CAAC;AAqCrC,wBAAgB,cAAc,IAAI,OAAO,CAExC"}
@@ -25,6 +25,8 @@ function getServerSnapshot() {
25
25
  function subscribe(listener) {
26
26
  listeners.add(listener);
27
27
  if (interval == null) {
28
+ // The module may have loaded long before Schedule mounted.
29
+ currentTime = Date.now();
28
30
  interval = setInterval(() => {
29
31
  currentTime = Date.now();
30
32
  listeners.forEach(activeListener => activeListener());
@@ -1 +1 @@
1
- {"version":3,"file":"Step.d.ts","sourceRoot":"","sources":["../../src/Stepper/Step.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAC,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAarC,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,oBAAoB,CAAC;AAMlD,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;AAE7C;;;;;;;GAOG;AACH,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,CAAC;AAC7D,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,UAAU,GAAG,UAAU,CAAC;AAE9D,MAAM,WAAW,SAAU,SAAQ,SAAS,CAAC,aAAa,CAAC;IACzD,wCAAwC;IACxC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;IAC/B;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;;;OAIG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB;;;;;;;;OAQG;IACH,SAAS,CAAC,EAAE,mBAAmB,GAAG,SAAS,CAAC;IAC5C;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC;CACvB;AAwdD;;;;;;;;;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C;IACrB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB;;;;;;;;OAQG;IACH,SAAS,CAAC,EAAE,mBAAmB,GAAG,SAAS,CAAC;IAC5C;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC;CACvB;AAsgBD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,IAAI,CAAC,EACnB,IAAI,EACJ,KAAK,EACL,WAAW,EACX,QAAQ,EACR,IAAI,EACJ,MAAM,EACN,UAAkB,EAClB,UAAkB,EAClB,UAAU,EACV,SAAS,EAAE,aAAa,EACxB,OAAO,EAAE,WAAW,EACpB,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,EACH,aAAa,EAAE,UAAU,EACzB,GAAG,IAAI,EACR,EAAE,SAAS,+BA0nBX;yBA5oBe,IAAI"}
@@ -24,6 +24,8 @@ import { VisuallyHidden } from '@astryxdesign/core/VisuallyHidden';
24
24
  import { useTranslator } from '@astryxdesign/core/i18n';
25
25
  import { useStepperContext } from "./StepperContext.js";
26
26
  import { themeProps } from '@astryxdesign/core/utils';
27
+ import "./stepper.stylex.js";
28
+ import { stepMarker } from "./stepper.stylex.js";
27
29
 
28
30
  /**
29
31
  * Built-in indicator presets. Anything other than these strings passed to
@@ -37,10 +39,26 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
37
39
  // --- Default progress icons (16px) ---
38
40
  //
39
41
  // The `completed` progress state and the current-step ring are drawn as local
40
- // glyphs: `completed` is a filled circle-check (a distinct "progress done"
41
- // mark), deliberately different from the semantic `success` status — which
42
- // defers to the themed Icon registry (an outline check). `warning` / `error`
43
- // statuses also defer to the themed registry so they share one visual language.
42
+ // <svg> glyphs rather than sourced from the Icon registry. This is a deliberate
43
+ // exception to the "glyphs come from the registry" convention (audit rule T17),
44
+ // for two reasons:
45
+ //
46
+ // 1. `CurrentIcon` (a dot inside a ring) has no registry equivalent — it is a
47
+ // progress affordance, not a general-purpose icon.
48
+ // 2. `CheckCircleIcon` (a filled circle with a check) is intentionally NOT the
49
+ // registry `success` glyph, even though the two look similar. They mean
50
+ // different things and must stay independently restyleable: `completed`
51
+ // marks *progress through the sequence* (every step you've passed), while
52
+ // the semantic `success` status marks a step's *outcome*. A stepper can
53
+ // show a completed step that also carries a `warning`/`error` status, so
54
+ // collapsing the two glyphs would conflate progress with outcome. The
55
+ // semantic `success`/`warning`/`error` STATUS glyphs DO defer to the themed
56
+ // registry (see the status branch below), so those share one visual
57
+ // language; only the progress marks are local.
58
+ //
59
+ // Both glyphs paint via `currentColor`, so the indicator's color is still
60
+ // controlled by tokens on the wrapper (never hardcoded), and the wrapper
61
+ // carries the `astryx-step-indicator` theme target.
44
62
 
45
63
  /** Filled circle with a check — shown for a completed step in 'auto' mode. */
46
64
  function CheckCircleIcon() {
@@ -163,7 +181,7 @@ const styles = {
163
181
  kzqmXN: "xfyiiit",
164
182
  kZKoxP: "x1grt7ep",
165
183
  kaIpWk: "xjspbzw",
166
- kGuDYH: "x1k6wstc",
184
+ kGuDYH: "x141an7d",
167
185
  kGO01o: "x1j85h84",
168
186
  k63SB2: "x2mo6ok",
169
187
  kLWn49: "xo5v014",
@@ -231,6 +249,10 @@ const styles = {
231
249
  kMwMTN: "xnbbluu",
232
250
  $$css: true
233
251
  },
252
+ labelCollapsible: {
253
+ k1xSpc: "x1lliihq x1wzf6n4",
254
+ $$css: true
255
+ },
234
256
  descriptionRow: {
235
257
  kZCmMZ: "x18gyask",
236
258
  $$css: true
@@ -279,7 +301,7 @@ const styles = {
279
301
  kkrTdU: "x1ypdohk",
280
302
  kaIpWk: "xh6dtrn",
281
303
  k1ekBW: "x15406qy",
282
- kIyJzY: "xkvfbh3",
304
+ kIyJzY: "xkvfbh3 x12w9bfk",
283
305
  kAMwcw: "xlr8y92",
284
306
  kWkggS: "xjbqb8w xe9uy6x xyxi2l3",
285
307
  $$css: true
@@ -332,8 +354,12 @@ const styles = {
332
354
  kaIpWk: "x2u8bby",
333
355
  $$css: true
334
356
  },
335
- otSegHidden: {
336
- k33iCy: "xlshs6z",
357
+ otSegHiddenIfFirst: {
358
+ k33iCy: "xnpuxes x1rmeqbc",
359
+ $$css: true
360
+ },
361
+ otSegHiddenIfLast: {
362
+ k33iCy: "xnpuxes xehs70j",
337
363
  $$css: true
338
364
  },
339
365
  lineFilled: {
@@ -423,7 +449,7 @@ export function Step({
423
449
  onStepClick,
424
450
  density: ctxDensity,
425
451
  indicatorPosition,
426
- stepCount
452
+ hasCollapsibleLabels
427
453
  } = ctx;
428
454
  const density = densityProp ?? ctxDensity;
429
455
 
@@ -436,6 +462,11 @@ export function Step({
436
462
  const progress = step === activeStep ? 'in-progress' : step < activeStep ? 'completed' : 'not-started';
437
463
  const isVertical = orientation === 'vertical';
438
464
  const isActive = progress === 'in-progress';
465
+ // Non-current step labels collapse only when the stepper opted in, the layout
466
+ // is horizontal (width-constrained), and this step is not the current one —
467
+ // the current step always keeps its label. The actual hide is a container
468
+ // query on the label element (styles.labelCollapsible).
469
+ const collapseLabel = hasCollapsibleLabels && !isVertical && !isActive;
439
470
  // Any non-disabled step is navigable when an onStepClick handler is provided,
440
471
  // including not-started steps (free navigation across the flow).
441
472
  const isClickable = !isDisabled && onStepClick != null;
@@ -479,7 +510,10 @@ export function Step({
479
510
  const numberColorStyle = isDisabled ? styles.numberDisabled : isReached && status === 'accent' ? styles.numberAccent : isReached && status === 'success' ? styles.numberSuccess : isReached && status === 'warning' ? styles.numberWarning : isReached && status === 'error' ? styles.numberError : progress === 'completed' ? styles.numberCompleted : progress === 'in-progress' ? styles.numberInProgress : styles.numberNotStarted;
480
511
  indicatorNode = /*#__PURE__*/_jsx("div", {
481
512
  "aria-hidden": "true",
482
- ...stylex.props(styles.numberBadge, numberColorStyle),
513
+ ...mergeProps(themeProps('step-indicator', {
514
+ progress,
515
+ status: status ?? undefined
516
+ }), stylex.props(styles.numberBadge, numberColorStyle)),
483
517
  children: step + 1
484
518
  });
485
519
  } else {
@@ -505,7 +539,10 @@ export function Step({
505
539
  const iconColorStyle = isDisabled ? styles.iconDisabled : customIcon != null ? status === 'accent' ? styles.iconAccent : status === 'success' ? styles.iconSuccess : status === 'warning' ? styles.iconWarning : status === 'error' ? styles.iconError : progress === 'completed' ? styles.iconCompleted : progress === 'in-progress' ? styles.iconInProgress : styles.iconNotStarted : statusGlyph === 'success' ? styles.iconSuccess : statusGlyph === 'warning' ? styles.iconWarning : statusGlyph === 'error' ? styles.iconError : progress === 'completed' ? styles.iconCompleted : progress === 'in-progress' ? styles.iconInProgress : styles.iconNotStarted;
506
540
  indicatorNode = /*#__PURE__*/_jsx("div", {
507
541
  "aria-hidden": "true",
508
- ...stylex.props(styles.icon, iconColorStyle),
542
+ ...mergeProps(themeProps('step-indicator', {
543
+ progress,
544
+ status: status ?? undefined
545
+ }), stylex.props(styles.icon, iconColorStyle)),
509
546
  children: iconContent
510
547
  });
511
548
  }
@@ -544,7 +581,7 @@ export function Step({
544
581
  className: "x78zum5 x1q0g3np x6s0dn4 x1txdalj"
545
582
  },
546
583
  children: [indicatorNode, /*#__PURE__*/_jsx("span", {
547
- ...stylex.props(styles.label, labelColorStyle),
584
+ ...stylex.props(styles.label, labelColorStyle, collapseLabel && styles.labelCollapsible),
548
585
  children: label
549
586
  }), statusTextNode, isOptional && /*#__PURE__*/_jsxs(_Fragment, {
550
587
  children: [/*#__PURE__*/_jsx("span", {
@@ -590,9 +627,10 @@ export function Step({
590
627
  const afterFilled = step < activeStep;
591
628
  const beforeSegStyle = beforeFilled ? styles.lineFilled : styles.lineUnfilled;
592
629
  const afterSegStyle = afterFilled ? styles.lineFilled : styles.lineUnfilled;
593
- const isFirst = step === 0;
594
- // The last step has no next node, so its trailing segment is hidden.
595
- const isLast = step === stepCount - 1;
630
+ // First/last connector visibility is decided structurally from the step's
631
+ // own <li> position (see otSegHiddenIfFirst/Last), not by counting children
632
+ // in the parent — so grouping steps in a fragment can't break it.
633
+
596
634
  const densitySpace = density === 'compact' ? spacingVars['--spacing-1'] : density === 'spacious' ? spacingVars['--spacing-3'] : spacingVars['--spacing-2'];
597
635
  const labelLineNode = /*#__PURE__*/_jsxs("div", {
598
636
  ...{
@@ -604,7 +642,7 @@ export function Step({
604
642
  }
605
643
  }[!!isVertical << 0],
606
644
  children: [/*#__PURE__*/_jsx("span", {
607
- ...stylex.props(styles.label, labelColorStyle),
645
+ ...stylex.props(styles.label, labelColorStyle, collapseLabel && styles.labelCollapsible),
608
646
  children: label
609
647
  }), statusTextNode, isOptional && /*#__PURE__*/_jsxs(_Fragment, {
610
648
  children: [/*#__PURE__*/_jsx("span", {
@@ -643,10 +681,10 @@ export function Step({
643
681
  ...stylex.props(styles.otIndicatorColV, styles.otRailBridgeV(densitySpace)),
644
682
  children: [/*#__PURE__*/_jsx("div", {
645
683
  "aria-hidden": "true",
646
- ...mergeProps(themeProps('step-connector'), stylex.props(styles.otSegBaseV, styles.otSegLeadV(densitySpace), beforeSegStyle, isFirst && styles.otSegHidden))
684
+ ...mergeProps(themeProps('step-connector'), stylex.props(styles.otSegBaseV, styles.otSegLeadV(densitySpace), beforeSegStyle, styles.otSegHiddenIfFirst))
647
685
  }), indicatorNode, /*#__PURE__*/_jsx("div", {
648
686
  "aria-hidden": "true",
649
- ...mergeProps(themeProps('step-connector'), stylex.props(styles.otSegBaseV, styles.otSegFlexV, afterSegStyle, isLast && styles.otSegHidden))
687
+ ...mergeProps(themeProps('step-connector'), stylex.props(styles.otSegBaseV, styles.otSegFlexV, afterSegStyle, styles.otSegHiddenIfLast))
650
688
  })]
651
689
  }), /*#__PURE__*/_jsxs("div", {
652
690
  ...{
@@ -657,7 +695,7 @@ export function Step({
657
695
  });
658
696
  return /*#__PURE__*/_jsxs("li", {
659
697
  ref: ref,
660
- ...mergeProps(stepThemeProps, stylex.props(styles.otVerticalRoot, xstyle), className, style),
698
+ ...mergeProps(stepThemeProps, stylex.props(stepMarker, styles.otVerticalRoot, xstyle), className, style),
661
699
  "aria-current": isActive ? 'step' : undefined,
662
700
  "data-testid": dataTestId,
663
701
  ...rest,
@@ -682,10 +720,10 @@ export function Step({
682
720
  },
683
721
  children: [/*#__PURE__*/_jsx("div", {
684
722
  "aria-hidden": "true",
685
- ...mergeProps(themeProps('step-connector'), stylex.props(styles.otSegH, beforeSegStyle, isFirst && styles.otSegHidden))
723
+ ...mergeProps(themeProps('step-connector'), stylex.props(styles.otSegH, beforeSegStyle, styles.otSegHiddenIfFirst))
686
724
  }), indicatorNode, /*#__PURE__*/_jsx("div", {
687
725
  "aria-hidden": "true",
688
- ...mergeProps(themeProps('step-connector'), stylex.props(styles.otSegH, afterSegStyle, isLast && styles.otSegHidden))
726
+ ...mergeProps(themeProps('step-connector'), stylex.props(styles.otSegH, afterSegStyle, styles.otSegHiddenIfLast))
689
727
  })]
690
728
  }), /*#__PURE__*/_jsxs("div", {
691
729
  ...stylex.props(styles.otLabelWrapH, styles.otMarginTop(densitySpace)),
@@ -694,7 +732,7 @@ export function Step({
694
732
  });
695
733
  return /*#__PURE__*/_jsxs("li", {
696
734
  ref: ref,
697
- ...mergeProps(stepThemeProps, stylex.props(styles.otHorizontalRoot, xstyle), className, style),
735
+ ...mergeProps(stepThemeProps, stylex.props(stepMarker, styles.otHorizontalRoot, xstyle), className, style),
698
736
  "aria-current": isActive ? 'step' : undefined,
699
737
  "data-testid": dataTestId,
700
738
  ...rest,
@@ -715,7 +753,7 @@ export function Step({
715
753
  if (isVertical) {
716
754
  return /*#__PURE__*/_jsxs("li", {
717
755
  ref: ref,
718
- ...mergeProps(stepThemeProps, stylex.props(styles.verticalRoot, xstyle), className, style),
756
+ ...mergeProps(stepThemeProps, stylex.props(stepMarker, styles.verticalRoot, xstyle), className, style),
719
757
  "aria-current": isActive ? 'step' : undefined,
720
758
  "data-testid": dataTestId,
721
759
  ...rest,
@@ -739,28 +777,28 @@ export function Step({
739
777
  "aria-label": stepAriaLabel,
740
778
  ...{
741
779
  0: {
742
- className: "x1yc453h x1qjc9v5 x78zum5 xdt5ytf xh8yej3 x1ypdohk xh6dtrn x15406qy xkvfbh3 xlr8y92 xjbqb8w xe9uy6x xyxi2l3 x1a2a7pz x17nn4n9 x1wfwxd8 x7s97pk"
780
+ className: "x1yc453h x1qjc9v5 x78zum5 xdt5ytf xh8yej3 x1ypdohk xh6dtrn x15406qy xkvfbh3 x12w9bfk xlr8y92 xjbqb8w xe9uy6x xyxi2l3 x1a2a7pz x17nn4n9 x1wfwxd8 x7s97pk"
743
781
  },
744
782
  4: {
745
- className: "x1yc453h x1qjc9v5 x78zum5 xdt5ytf xh8yej3 x1ypdohk xh6dtrn x15406qy xkvfbh3 xlr8y92 xjbqb8w xe9uy6x xyxi2l3 x1a2a7pz x17nn4n9 x1wfwxd8 x7s97pk xu0wf1k xf314gf"
783
+ className: "x1yc453h x1qjc9v5 x78zum5 xdt5ytf xh8yej3 x1ypdohk xh6dtrn x15406qy xkvfbh3 x12w9bfk xlr8y92 xjbqb8w xe9uy6x xyxi2l3 x1a2a7pz x17nn4n9 x1wfwxd8 x7s97pk xu0wf1k xf314gf"
746
784
  },
747
785
  2: {
748
- className: "x1yc453h x1qjc9v5 x78zum5 xdt5ytf xh8yej3 x1ypdohk xh6dtrn x15406qy xkvfbh3 xlr8y92 xjbqb8w xe9uy6x xyxi2l3 x1a2a7pz x17nn4n9 x1wfwxd8 x7s97pk xce4md1 xf314gf"
786
+ className: "x1yc453h x1qjc9v5 x78zum5 xdt5ytf xh8yej3 x1ypdohk xh6dtrn x15406qy xkvfbh3 x12w9bfk xlr8y92 xjbqb8w xe9uy6x xyxi2l3 x1a2a7pz x17nn4n9 x1wfwxd8 x7s97pk xce4md1 xf314gf"
749
787
  },
750
788
  6: {
751
- className: "x1yc453h x1qjc9v5 x78zum5 xdt5ytf xh8yej3 x1ypdohk xh6dtrn x15406qy xkvfbh3 xlr8y92 xjbqb8w xe9uy6x xyxi2l3 x1a2a7pz x17nn4n9 x1wfwxd8 x7s97pk xce4md1 xf314gf"
789
+ className: "x1yc453h x1qjc9v5 x78zum5 xdt5ytf xh8yej3 x1ypdohk xh6dtrn x15406qy xkvfbh3 x12w9bfk xlr8y92 xjbqb8w xe9uy6x xyxi2l3 x1a2a7pz x17nn4n9 x1wfwxd8 x7s97pk xce4md1 xf314gf"
752
790
  },
753
791
  1: {
754
- className: "x1yc453h x1qjc9v5 x78zum5 xdt5ytf xh8yej3 x1ypdohk xh6dtrn x15406qy xkvfbh3 xlr8y92 xjbqb8w xe9uy6x xyxi2l3 x1a2a7pz x17nn4n9 x1wfwxd8 x7s97pk x8o8v82 xrrkdod"
792
+ className: "x1yc453h x1qjc9v5 x78zum5 xdt5ytf xh8yej3 x1ypdohk xh6dtrn x15406qy xkvfbh3 x12w9bfk xlr8y92 xjbqb8w xe9uy6x xyxi2l3 x1a2a7pz x17nn4n9 x1wfwxd8 x7s97pk x8o8v82 xrrkdod"
755
793
  },
756
794
  5: {
757
- className: "x1yc453h x1qjc9v5 x78zum5 xdt5ytf xh8yej3 x1ypdohk xh6dtrn x15406qy xkvfbh3 xlr8y92 xjbqb8w xe9uy6x xyxi2l3 x1a2a7pz x17nn4n9 x1wfwxd8 x7s97pk x8o8v82 xrrkdod"
795
+ className: "x1yc453h x1qjc9v5 x78zum5 xdt5ytf xh8yej3 x1ypdohk xh6dtrn x15406qy xkvfbh3 x12w9bfk xlr8y92 xjbqb8w xe9uy6x xyxi2l3 x1a2a7pz x17nn4n9 x1wfwxd8 x7s97pk x8o8v82 xrrkdod"
758
796
  },
759
797
  3: {
760
- className: "x1yc453h x1qjc9v5 x78zum5 xdt5ytf xh8yej3 x1ypdohk xh6dtrn x15406qy xkvfbh3 xlr8y92 xjbqb8w xe9uy6x xyxi2l3 x1a2a7pz x17nn4n9 x1wfwxd8 x7s97pk x8o8v82 xrrkdod"
798
+ className: "x1yc453h x1qjc9v5 x78zum5 xdt5ytf xh8yej3 x1ypdohk xh6dtrn x15406qy xkvfbh3 x12w9bfk xlr8y92 xjbqb8w xe9uy6x xyxi2l3 x1a2a7pz x17nn4n9 x1wfwxd8 x7s97pk x8o8v82 xrrkdod"
761
799
  },
762
800
  7: {
763
- className: "x1yc453h x1qjc9v5 x78zum5 xdt5ytf xh8yej3 x1ypdohk xh6dtrn x15406qy xkvfbh3 xlr8y92 xjbqb8w xe9uy6x xyxi2l3 x1a2a7pz x17nn4n9 x1wfwxd8 x7s97pk x8o8v82 xrrkdod"
801
+ className: "x1yc453h x1qjc9v5 x78zum5 xdt5ytf xh8yej3 x1ypdohk xh6dtrn x15406qy xkvfbh3 x12w9bfk xlr8y92 xjbqb8w xe9uy6x xyxi2l3 x1a2a7pz x17nn4n9 x1wfwxd8 x7s97pk x8o8v82 xrrkdod"
764
802
  }
765
803
  }[!!(density === 'compact') << 2 | !!(density === 'balanced') << 1 | !!(density === 'spacious') << 0],
766
804
  children: [iconLabelNode, descriptionNode]
@@ -798,7 +836,7 @@ export function Step({
798
836
  // ======= HORIZONTAL =======
799
837
  return /*#__PURE__*/_jsxs("li", {
800
838
  ref: ref,
801
- ...mergeProps(stepThemeProps, stylex.props(styles.horizontalStep, xstyle), className, style),
839
+ ...mergeProps(stepThemeProps, stylex.props(stepMarker, styles.horizontalStep, xstyle), className, style),
802
840
  "aria-current": isActive ? 'step' : undefined,
803
841
  "data-testid": dataTestId,
804
842
  ...rest,
@@ -818,28 +856,28 @@ export function Step({
818
856
  "aria-label": stepAriaLabel,
819
857
  ...{
820
858
  0: {
821
- className: "x1yc453h x1qjc9v5 x78zum5 xdt5ytf xh8yej3 x1ypdohk xh6dtrn x15406qy xkvfbh3 xlr8y92 xjbqb8w xe9uy6x xyxi2l3 x1a2a7pz x17nn4n9 x1wfwxd8 x7s97pk"
859
+ className: "x1yc453h x1qjc9v5 x78zum5 xdt5ytf xh8yej3 x1ypdohk xh6dtrn x15406qy xkvfbh3 x12w9bfk xlr8y92 xjbqb8w xe9uy6x xyxi2l3 x1a2a7pz x17nn4n9 x1wfwxd8 x7s97pk"
822
860
  },
823
861
  4: {
824
- className: "x1yc453h x1qjc9v5 x78zum5 xdt5ytf xh8yej3 x1ypdohk xh6dtrn x15406qy xkvfbh3 xlr8y92 xjbqb8w xe9uy6x xyxi2l3 x1a2a7pz x17nn4n9 x1wfwxd8 x7s97pk xu0wf1k xf314gf"
862
+ className: "x1yc453h x1qjc9v5 x78zum5 xdt5ytf xh8yej3 x1ypdohk xh6dtrn x15406qy xkvfbh3 x12w9bfk xlr8y92 xjbqb8w xe9uy6x xyxi2l3 x1a2a7pz x17nn4n9 x1wfwxd8 x7s97pk xu0wf1k xf314gf"
825
863
  },
826
864
  2: {
827
- className: "x1yc453h x1qjc9v5 x78zum5 xdt5ytf xh8yej3 x1ypdohk xh6dtrn x15406qy xkvfbh3 xlr8y92 xjbqb8w xe9uy6x xyxi2l3 x1a2a7pz x17nn4n9 x1wfwxd8 x7s97pk xce4md1 xf314gf"
865
+ className: "x1yc453h x1qjc9v5 x78zum5 xdt5ytf xh8yej3 x1ypdohk xh6dtrn x15406qy xkvfbh3 x12w9bfk xlr8y92 xjbqb8w xe9uy6x xyxi2l3 x1a2a7pz x17nn4n9 x1wfwxd8 x7s97pk xce4md1 xf314gf"
828
866
  },
829
867
  6: {
830
- className: "x1yc453h x1qjc9v5 x78zum5 xdt5ytf xh8yej3 x1ypdohk xh6dtrn x15406qy xkvfbh3 xlr8y92 xjbqb8w xe9uy6x xyxi2l3 x1a2a7pz x17nn4n9 x1wfwxd8 x7s97pk xce4md1 xf314gf"
868
+ className: "x1yc453h x1qjc9v5 x78zum5 xdt5ytf xh8yej3 x1ypdohk xh6dtrn x15406qy xkvfbh3 x12w9bfk xlr8y92 xjbqb8w xe9uy6x xyxi2l3 x1a2a7pz x17nn4n9 x1wfwxd8 x7s97pk xce4md1 xf314gf"
831
869
  },
832
870
  1: {
833
- className: "x1yc453h x1qjc9v5 x78zum5 xdt5ytf xh8yej3 x1ypdohk xh6dtrn x15406qy xkvfbh3 xlr8y92 xjbqb8w xe9uy6x xyxi2l3 x1a2a7pz x17nn4n9 x1wfwxd8 x7s97pk x8o8v82 xrrkdod"
871
+ className: "x1yc453h x1qjc9v5 x78zum5 xdt5ytf xh8yej3 x1ypdohk xh6dtrn x15406qy xkvfbh3 x12w9bfk xlr8y92 xjbqb8w xe9uy6x xyxi2l3 x1a2a7pz x17nn4n9 x1wfwxd8 x7s97pk x8o8v82 xrrkdod"
834
872
  },
835
873
  5: {
836
- className: "x1yc453h x1qjc9v5 x78zum5 xdt5ytf xh8yej3 x1ypdohk xh6dtrn x15406qy xkvfbh3 xlr8y92 xjbqb8w xe9uy6x xyxi2l3 x1a2a7pz x17nn4n9 x1wfwxd8 x7s97pk x8o8v82 xrrkdod"
874
+ className: "x1yc453h x1qjc9v5 x78zum5 xdt5ytf xh8yej3 x1ypdohk xh6dtrn x15406qy xkvfbh3 x12w9bfk xlr8y92 xjbqb8w xe9uy6x xyxi2l3 x1a2a7pz x17nn4n9 x1wfwxd8 x7s97pk x8o8v82 xrrkdod"
837
875
  },
838
876
  3: {
839
- className: "x1yc453h x1qjc9v5 x78zum5 xdt5ytf xh8yej3 x1ypdohk xh6dtrn x15406qy xkvfbh3 xlr8y92 xjbqb8w xe9uy6x xyxi2l3 x1a2a7pz x17nn4n9 x1wfwxd8 x7s97pk x8o8v82 xrrkdod"
877
+ className: "x1yc453h x1qjc9v5 x78zum5 xdt5ytf xh8yej3 x1ypdohk xh6dtrn x15406qy xkvfbh3 x12w9bfk xlr8y92 xjbqb8w xe9uy6x xyxi2l3 x1a2a7pz x17nn4n9 x1wfwxd8 x7s97pk x8o8v82 xrrkdod"
840
878
  },
841
879
  7: {
842
- className: "x1yc453h x1qjc9v5 x78zum5 xdt5ytf xh8yej3 x1ypdohk xh6dtrn x15406qy xkvfbh3 xlr8y92 xjbqb8w xe9uy6x xyxi2l3 x1a2a7pz x17nn4n9 x1wfwxd8 x7s97pk x8o8v82 xrrkdod"
880
+ className: "x1yc453h x1qjc9v5 x78zum5 xdt5ytf xh8yej3 x1ypdohk xh6dtrn x15406qy xkvfbh3 x12w9bfk xlr8y92 xjbqb8w xe9uy6x xyxi2l3 x1a2a7pz x17nn4n9 x1wfwxd8 x7s97pk x8o8v82 xrrkdod"
843
881
  }
844
882
  }[!!(density === 'compact') << 2 | !!(density === 'balanced') << 1 | !!(density === 'spacious') << 0],
845
883
  children: [iconLabelNode, descriptionNode]
@@ -54,15 +54,26 @@ export interface StepperProps extends BaseProps<HTMLOListElement> {
54
54
  * @default 'separated'
55
55
  */
56
56
  indicatorPosition?: StepperIndicatorPosition;
57
+ /**
58
+ * Horizontal only. When the stepper gets too narrow to fit every label,
59
+ * collapse the labels of non-current steps so the track can shrink — only
60
+ * the current step keeps its visible label (the rest stay reachable via
61
+ * `aria-current` and the accessible names). Uses a container query, so it
62
+ * responds to the stepper's own width, not the viewport. No effect in the
63
+ * vertical orientation, where width is not the constraint.
64
+ * @default false
65
+ */
66
+ hasCollapsibleLabels?: boolean;
57
67
  }
58
68
  /**
59
69
  * A stepper component for multi-step workflows. Displays numbered steps
60
70
  * with visual indicators for completed, active, and upcoming states.
61
71
  *
62
72
  * Each Step child must provide a `step` prop (zero-based index) so it
63
- * can derive its state from the parent's activeStep. The parent supplies
64
- * the total `stepCount` via context so the on-track layout can hide the
65
- * trailing connector on the final step.
73
+ * can derive its state from the parent's activeStep. The on-track layout
74
+ * hides the leading connector on the first step and the trailing connector
75
+ * on the last step structurally, from each step's own `<li>` position, so
76
+ * it works regardless of how the steps are grouped.
66
77
  *
67
78
  * Rendered as an ordered list (`<ol>`/`<li>`) rather than a `nav`
68
79
  * landmark: a stepper communicates *progress through a sequence*, not a
@@ -80,7 +91,7 @@ export interface StepperProps extends BaseProps<HTMLOListElement> {
80
91
  * </Stepper>
81
92
  * ```
82
93
  */
83
- export declare function Stepper({ activeStep, children, orientation, onStepClick, label, density, indicatorPosition, xstyle, className, style, ref, ...rest }: StepperProps): import("react").JSX.Element;
94
+ export declare function Stepper({ activeStep, children, orientation, onStepClick, label, density, indicatorPosition, hasCollapsibleLabels, xstyle, className, style, ref, ...rest }: StepperProps): import("react").JSX.Element;
84
95
  export declare namespace Stepper {
85
96
  var displayName: string;
86
97
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Stepper.d.ts","sourceRoot":"","sources":["../../src/Stepper/Stepper.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAoB,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAKxD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,oBAAoB,CAAC;AAElD,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,wBAAwB,EAE9B,MAAM,kBAAkB,CAAC;AAE1B,MAAM,WAAW,YAAa,SAAQ,SAAS,CAAC,gBAAgB,CAAC;IAC/D,wCAAwC;IACxC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;IAClC;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;;OAGG;IACH,WAAW,CAAC,EAAE,kBAAkB,CAAC;IACjC;;;OAGG;IACH,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,UAAU,CAAC;IAC9C;;;;;;;OAOG;IACH,iBAAiB,CAAC,EAAE,wBAAwB,CAAC;CAC9C;AAgCD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,OAAO,CAAC,EACtB,UAAU,EACV,QAAQ,EACR,WAA0B,EAC1B,WAAW,EACX,KAAkB,EAClB,OAAoB,EACpB,iBAA+B,EAC/B,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,EACH,GAAG,IAAI,EACR,EAAE,YAAY,+BAkD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ps/storybook/stories/Stepper.stories.tsx (storybook stories)
16
16
  * - /packages/cli/assets/templates/blocks/components/Stepper/ (showcase blocks)
17
17
  */
18
- import { Children, useMemo } from 'react';
18
+ import { useMemo } from 'react';
19
19
  import * as stylex from '@stylexjs/stylex';
20
20
  import '@astryxdesign/core/theme/tokens.stylex';
21
21
  import { spacingVars } from '@astryxdesign/core/theme/tokens.stylex';
@@ -53,6 +53,11 @@ const styles = {
53
53
  kXwgrk: "xdt5ytf",
54
54
  kOIVth: "xxhr3t",
55
55
  $$css: true
56
+ },
57
+ labelCollapseContainer: {
58
+ k9g6sI: "x12h1iku",
59
+ kanfag: "x1hppuf3",
60
+ $$css: true
56
61
  }
57
62
  };
58
63
 
@@ -61,9 +66,10 @@ const styles = {
61
66
  * with visual indicators for completed, active, and upcoming states.
62
67
  *
63
68
  * Each Step child must provide a `step` prop (zero-based index) so it
64
- * can derive its state from the parent's activeStep. The parent supplies
65
- * the total `stepCount` via context so the on-track layout can hide the
66
- * trailing connector on the final step.
69
+ * can derive its state from the parent's activeStep. The on-track layout
70
+ * hides the leading connector on the first step and the trailing connector
71
+ * on the last step structurally, from each step's own `<li>` position, so
72
+ * it works regardless of how the steps are grouped.
67
73
  *
68
74
  * Rendered as an ordered list (`<ol>`/`<li>`) rather than a `nav`
69
75
  * landmark: a stepper communicates *progress through a sequence*, not a
@@ -89,13 +95,13 @@ export function Stepper({
89
95
  label = 'Progress',
90
96
  density = 'balanced',
91
97
  indicatorPosition = 'separated',
98
+ hasCollapsibleLabels = false,
92
99
  xstyle,
93
100
  className,
94
101
  style,
95
102
  ref,
96
103
  ...rest
97
104
  }) {
98
- const stepCount = Children.count(children);
99
105
  const ctxValue = useMemo(() => ({
100
106
  activeStep,
101
107
  orientation,
@@ -103,10 +109,14 @@ export function Stepper({
103
109
  onStepClick: onStepClick ?? null,
104
110
  density,
105
111
  indicatorPosition,
106
- stepCount
107
- }), [activeStep, orientation, onStepClick, density, indicatorPosition, stepCount]);
112
+ hasCollapsibleLabels
113
+ }), [activeStep, orientation, onStepClick, density, indicatorPosition, hasCollapsibleLabels]);
108
114
  const isOnTrack = indicatorPosition === 'on-track';
109
115
  const orientationStyle = orientation === 'horizontal' ? isOnTrack ? styles.horizontalOnTrack : styles.horizontal : isOnTrack ? styles.verticalOnTrack : styles.vertical;
116
+
117
+ // Label collapse is a width constraint, so it only applies to the horizontal
118
+ // orientation; vertical steppers are never width-limited this way.
119
+ const isLabelCollapse = hasCollapsibleLabels && orientation === 'horizontal';
110
120
  return /*#__PURE__*/_jsx(StepperContext, {
111
121
  value: ctxValue,
112
122
  children: /*#__PURE__*/_jsx("ol", {
@@ -116,7 +126,7 @@ export function Stepper({
116
126
  ...mergeProps(themeProps('stepper', {
117
127
  orientation,
118
128
  indicatorPosition
119
- }), stylex.props(styles.root, orientationStyle, xstyle), className, style),
129
+ }), stylex.props(styles.root, orientationStyle, isLabelCollapse && styles.labelCollapseContainer, xstyle), className, style),
120
130
  children: children
121
131
  })
122
132
  });
@@ -15,13 +15,13 @@ export interface StepperContextValue {
15
15
  isNonLinear: boolean;
16
16
  onStepClick: ((index: number) => void) | null;
17
17
  density: StepperDensity;
18
+ indicatorPosition: StepperIndicatorPosition;
18
19
  /**
19
- * Total number of Step children. Used by the on-track layout to hide the
20
- * trailing connector segment on the last step (which otherwise has no next
21
- * node to reach toward).
20
+ * Horizontal only. When true, non-current step labels collapse via a
21
+ * container query once the stepper is too narrow to fit them all, so the
22
+ * track can shrink. The current step keeps its label.
22
23
  */
23
- stepCount: number;
24
- indicatorPosition: StepperIndicatorPosition;
24
+ hasCollapsibleLabels: boolean;
25
25
  }
26
26
  export declare const StepperContext: import("react").Context<StepperContextValue | null>;
27
27
  export declare function useStepperContext(): StepperContextValue;
@@ -1 +1 @@
1
- {"version":3,"file":"StepperContext.d.ts","sourceRoot":"","sources":["../../src/Stepper/StepperContext.ts"],"names":[],"mappings":"AAiBA,MAAM,MAAM,kBAAkB,GAAG,YAAY,GAAG,UAAU,CAAC;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B,CASvD"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * @file stepper.stylex.ts
3
+ * @input StyleX marker system
4
+ * @output stepMarker — a scoped marker applied to each Step's <li>
5
+ * @position Shared StyleX marker consumed by Step for structural selectors
6
+ *
7
+ * Applied to each Step's root `<li>` so the on-track connector segments can
8
+ * key their first/last-node visibility off `stylex.when.ancestor(':first-child'
9
+ * | ':last-child', stepMarker)` — matching only the parent step row, never the
10
+ * outer `<ol>`. This replaces counting children in the parent, so steps behave
11
+ * correctly regardless of how the consumer groups them (arrays, fragments).
12
+ */
13
+ import * as stylex from '@stylexjs/stylex';
14
+ export declare const stepMarker: ReturnType<typeof stylex.defineMarker>;
15
+ //# sourceMappingURL=stepper.stylex.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stepper.stylex.d.ts","sourceRoot":"","sources":["../../src/Stepper/stepper.stylex.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,MAAM,MAAM,kBAAkB,CAAC;AAE3C,eAAO,MAAM,UAAU,EAAE,UAAU,CAAC,OAAO,MAAM,CAAC,YAAY,CACvC,CAAC"}
@@ -0,0 +1,20 @@
1
+ // Copyright (c) Meta Platforms, Inc. and affiliates.
2
+
3
+ /**
4
+ * @file stepper.stylex.ts
5
+ * @input StyleX marker system
6
+ * @output stepMarker — a scoped marker applied to each Step's <li>
7
+ * @position Shared StyleX marker consumed by Step for structural selectors
8
+ *
9
+ * Applied to each Step's root `<li>` so the on-track connector segments can
10
+ * key their first/last-node visibility off `stylex.when.ancestor(':first-child'
11
+ * | ':last-child', stepMarker)` — matching only the parent step row, never the
12
+ * outer `<ol>`. This replaces counting children in the parent, so steps behave
13
+ * correctly regardless of how the consumer groups them (arrays, fragments).
14
+ */
15
+
16
+ import * as stylex from '@stylexjs/stylex';
17
+ export const stepMarker = {
18
+ x1fcdk97: "x1fcdk97",
19
+ $$css: true
20
+ };
package/dist/lab.css CHANGED
@@ -321,6 +321,7 @@
321
321
  .xak3so:not(#\#):not(#\#):not(#\#){column-gap:var(--spacing-2)}
322
322
  .xewh9hi:not(#\#):not(#\#):not(#\#){column-gap:var(--spacing-3)}
323
323
  .x1w36mze:not(#\#):not(#\#):not(#\#){contain-intrinsic-height:auto 28px}
324
+ .x1hppuf3:not(#\#):not(#\#):not(#\#){container-name:astryx-stepper}
324
325
  .x63rumg:not(#\#):not(#\#):not(#\#){container-name:list-input}
325
326
  .x12h1iku:not(#\#):not(#\#):not(#\#){container-type:inline-size}
326
327
  .xb5mbof:not(#\#):not(#\#):not(#\#){content-visibility:auto}
@@ -350,7 +351,6 @@
350
351
  .x1c3i2sq:not(#\#):not(#\#):not(#\#){font-size:1.125rem}
351
352
  .x1603h9y:not(#\#):not(#\#):not(#\#){font-size:1.25rem}
352
353
  .xngnso2:not(#\#):not(#\#):not(#\#){font-size:1.5rem}
353
- .x1k6wstc:not(#\#):not(#\#):not(#\#){font-size:10px}
354
354
  .x1jvydc1:not(#\#):not(#\#):not(#\#){font-size:15px}
355
355
  .xosj86m:not(#\#):not(#\#):not(#\#){font-size:18px}
356
356
  .xhs0kqb:not(#\#):not(#\#):not(#\#){font-size:var(--font-size-2xl)}
@@ -511,6 +511,7 @@
511
511
  .xxymvpz:not(#\#):not(#\#):not(#\#){vertical-align:middle}
512
512
  .xqwjeat:not(#\#):not(#\#):not(#\#){view-transition-name:var(--x-viewTransitionName)}
513
513
  .xlshs6z:not(#\#):not(#\#):not(#\#){visibility:hidden}
514
+ .xnpuxes:not(#\#):not(#\#):not(#\#){visibility:visible}
514
515
  .xuxw1ft:not(#\#):not(#\#):not(#\#){white-space:nowrap}
515
516
  .x126k92a:not(#\#):not(#\#):not(#\#){white-space:pre-wrap}
516
517
  .x1sdyfia:not(#\#):not(#\#):not(#\#){white-space:pre}
@@ -521,6 +522,8 @@
521
522
  .xfo81ep:not(#\#):not(#\#):not(#\#){z-index:1000}
522
523
  .x1355qak:not(#\#):not(#\#):not(#\#){z-index:20}
523
524
  .xr3buco:not(#\#):not(#\#):not(#\#){z-index:var(--x-zIndex)}
525
+ .x1rmeqbc.x1rmeqbc:where(.x1fcdk97:first-child *):not(#\#):not(#\#):not(#\#){visibility:hidden}
526
+ .xehs70j.xehs70j:where(.x1fcdk97:last-child *):not(#\#):not(#\#):not(#\#){visibility:hidden}
524
527
  .x7s97pk:focus-visible:not(#\#):not(#\#):not(#\#){outline-offset:2px}
525
528
  .x1df3fe5:is([dir="rtl"] *):not(#\#):not(#\#):not(#\#){transform:translateX(-100%)}
526
529
  .xttggg:is([dir="rtl"] *):not(#\#):not(#\#):not(#\#){transform:translateX(100%)}
@@ -540,6 +543,7 @@
540
543
  @container (max-width: 40rem){.x12eanku.x12eanku:not(#\#):not(#\#):not(#\#){border-inline-start-width:0}}
541
544
  @container list-input (max-width: 640px){.x1jiamoa.x1jiamoa:not(#\#):not(#\#):not(#\#){display:block}}
542
545
  @container list-input (max-width: 640px){.x12gktpv.x12gktpv:not(#\#):not(#\#):not(#\#){display:contents}}
546
+ @container astryx-stepper (max-width: 480px){.x1wzf6n4.x1wzf6n4:not(#\#):not(#\#):not(#\#){display:none}}
543
547
  @container (max-width: 40rem){.x1sp3fdr.x1sp3fdr:not(#\#):not(#\#):not(#\#){grid-template-columns:minmax(0,1fr)}}
544
548
  @container list-input (max-width: 640px){.x540v0d.x540v0d:not(#\#):not(#\#):not(#\#){grid-template-columns:minmax(0,1fr)}}
545
549
  @container list-input (max-width: 640px){.xrs5tkd.xrs5tkd:not(#\#):not(#\#):not(#\#){row-gap:var(--spacing-2)}}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astryxdesign/lab",
3
- "version": "0.3.0-canary.e9fc2bb",
3
+ "version": "0.3.0-canary.ee705d8",
4
4
  "description": "Experimental Astryx components — published to npm only under the @canary dist-tag for early testing; never released as a stable (latest) version.",
5
5
  "author": "Meta Open Source",
6
6
  "license": "MIT",
@@ -45,7 +45,7 @@
45
45
  },
46
46
  "peerDependencies": {
47
47
  "@stylexjs/stylex": ">=0.10.0",
48
- "@astryxdesign/core": "0.3.0-canary.e9fc2bb",
48
+ "@astryxdesign/core": "0.3.0-canary.ee705d8",
49
49
  "react": ">=19.0.0",
50
50
  "react-dom": ">=19.0.0",
51
51
  "lexical": "^0.46.0",
@@ -66,7 +66,7 @@
66
66
  "d3-shape": "^3.2.0"
67
67
  },
68
68
  "devDependencies": {
69
- "@astryxdesign/cli": "0.3.0-canary.e9fc2bb",
69
+ "@astryxdesign/cli": "0.3.0-canary.ee705d8",
70
70
  "@lexical/code": "^0.46.0",
71
71
  "@lexical/headless": "^0.46.0",
72
72
  "@lexical/html": "^0.46.0",
@@ -99,7 +99,6 @@ export interface RichTextEditorAutoLinkPluginProps {
99
99
  * @example
100
100
  * ```
101
101
  * import {RichTextEditor, RichTextEditorAutoLinkPlugin} from '@astryxdesign/lab';
102
- *
103
102
  * <RichTextEditor
104
103
  * label="Notes"
105
104
  * plugins={<RichTextEditorAutoLinkPlugin />}