@astryxdesign/core 0.7.5-canary.7cb897b → 0.7.5-canary.bc40b80

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.
@@ -1 +1 @@
1
- {"version":3,"file":"Step.d.ts","sourceRoot":"","sources":["../../src/Stepper/Step.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,OAAO,EAAkB,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAsBtD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAM5C,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;;;;OAIG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB;;;;;;;;;;;;;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,CA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AE,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;AA2yBD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,IAAI,CAAC,EACnB,IAAI,EACJ,KAAK,EACL,WAAW,EACX,QAAQ,EACR,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,+BAq1BX;yBAt2Be,IAAI"}
@@ -872,7 +872,7 @@ export function Step({
872
872
  ...{
873
873
  className: "x78zum5 x1q0g3np x6s0dn4 x1txdalj xeuugli"
874
874
  },
875
- children: [(!isCompact || indicatorPosition !== 'on-track') && indicatorNode, /*#__PURE__*/_jsx("span", {
875
+ children: [(!isCompact || indicatorPosition !== 'on-track') && indicatorNode, ' ', /*#__PURE__*/_jsx("span", {
876
876
  ...mergeProps(labelThemeProps, stylex.props(styles.label, labelColorStyle)),
877
877
  children: label
878
878
  }), statusTextNode, isOptional && /*#__PURE__*/_jsxs(_Fragment, {
@@ -1063,7 +1063,7 @@ export function Step({
1063
1063
  "aria-hidden": "true",
1064
1064
  ...mergeProps(themeProps('step-connector'), stylex.props(styles.otSegBaseV, styles.otSegFlexV, styles.connectorTrack, hasIndicator && styles.otSegGapRailV, afterSegStyle, railTiming, styles.otSegHiddenIfLast))
1065
1065
  })]
1066
- }), /*#__PURE__*/_jsxs("div", {
1066
+ }), ' ', /*#__PURE__*/_jsxs("div", {
1067
1067
  ...{
1068
1068
  className: "x78zum5 xdt5ytf x1nhvcw1 x98rzlu x1lsbc85 xeuugli"
1069
1069
  },
@@ -1103,7 +1103,7 @@ export function Step({
1103
1103
  "aria-hidden": "true",
1104
1104
  ...mergeProps(themeProps('step-connector'), stylex.props(styles.otSegH, styles.connectorTrack, hasIndicator && styles.otSegGapRailH, afterSegStyle, railTiming, styles.otSegHiddenIfLast))
1105
1105
  })]
1106
- }), !isCompact && /*#__PURE__*/_jsxs("div", {
1106
+ }), ' ', !isCompact && /*#__PURE__*/_jsxs("div", {
1107
1107
  ...stylex.props(styles.otLabelWrapH, styles.otMarginTop(densitySpace)),
1108
1108
  children: [labelLineNode, otDescriptionNode]
1109
1109
  })]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astryxdesign/core",
3
- "version": "0.7.5-canary.7cb897b",
3
+ "version": "0.7.5-canary.bc40b80",
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",
@@ -792,8 +792,8 @@
792
792
  "react-dom": ">=19.0.0"
793
793
  },
794
794
  "devDependencies": {
795
- "@astryxdesign/a11y-spec": "0.7.5-canary.7cb897b",
796
- "@astryxdesign/cli": "0.7.5-canary.7cb897b",
795
+ "@astryxdesign/a11y-spec": "0.7.5-canary.bc40b80",
796
+ "@astryxdesign/cli": "0.7.5-canary.bc40b80",
797
797
  "@babel/cli": "^7.29.7",
798
798
  "@babel/core": "^7.29.7",
799
799
  "@babel/preset-react": "^7.29.7",
@@ -1316,6 +1316,10 @@ export function Step({
1316
1316
  const iconLabelNode = (
1317
1317
  <div {...stylex.props(styles.iconLabelRow)}>
1318
1318
  {(!isCompact || indicatorPosition !== 'on-track') && indicatorNode}
1319
+ {/* A space between the indicator and the label: the row is a flex
1320
+ container, which drops whitespace-only text, so nothing changes on
1321
+ screen, but a text reading of the button then keeps "1 Account" as two
1322
+ words instead of "1Account". */}{' '}
1319
1323
  <span
1320
1324
  {...mergeProps(
1321
1325
  labelThemeProps,
@@ -1576,6 +1580,8 @@ export function Step({
1576
1580
  )}
1577
1581
  />
1578
1582
  </div>
1583
+ {/* Whitespace between the indicator column and the label, as in
1584
+ iconLabelNode. */}{' '}
1579
1585
  <div {...stylex.props(styles.otBodyV)}>
1580
1586
  {labelLineNode}
1581
1587
  {otDescriptionNode}
@@ -1658,6 +1664,7 @@ export function Step({
1658
1664
  )}
1659
1665
  />
1660
1666
  </div>
1667
+ {/* Whitespace between the rail and the label, as in iconLabelNode. */}{' '}
1661
1668
  {/* The on-track indicator remains visible as a node on the rail at
1662
1669
  compact widths, but the wrapper becomes presentational with its
1663
1670
  label. Navigation moves to the named controls in the summary row. */}
@@ -2016,3 +2016,36 @@ describe('step-label and step-description theme targets', () => {
2016
2016
  );
2017
2017
  });
2018
2018
  });
2019
+
2020
+ describe('clickable step text reading', () => {
2021
+ // axe-core's Label in Name rule joins a button's text nodes with nothing
2022
+ // between them, aria-hidden ones included, so a number badge next to a label
2023
+ // reads as one word ("1Account") that the step's name does not contain.
2024
+ // Whitespace between them changes nothing on screen (the rows are flex
2025
+ // containers) and keeps the two words apart.
2026
+ it.each([
2027
+ ['vertical', 'separated'],
2028
+ ['horizontal', 'separated'],
2029
+ ['vertical', 'on-track'],
2030
+ ['horizontal', 'on-track'],
2031
+ ] as const)(
2032
+ 'keeps the number and label apart in a %s %s step',
2033
+ (orientation, indicatorPosition) => {
2034
+ render(
2035
+ <Stepper
2036
+ orientation={orientation}
2037
+ indicatorPosition={indicatorPosition}
2038
+ activeStep={0}
2039
+ label="Steps"
2040
+ onStepClick={() => {}}>
2041
+ <Step step={0} label="Account" indicator="number" />
2042
+ <Step step={1} label="Payment" indicator="number" />
2043
+ </Stepper>,
2044
+ );
2045
+
2046
+ const button = screen.getByRole('button', {name: /Account/});
2047
+ expect(button.textContent).toMatch(/1\s+Account/);
2048
+ expect(button.textContent).not.toMatch(/1Account/);
2049
+ },
2050
+ );
2051
+ });