@astryxdesign/core 0.1.4-canary.360fc9c → 0.1.4-canary.37c19d3

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.
@@ -21,10 +21,8 @@ import type { BaseProps } from '../BaseProps';
21
21
  * - Non-semantic palette: `blue | cyan | gray | green | orange | pink | purple | red | teal | yellow`
22
22
  * Each uses the corresponding `--color-background-<name>` token (20% opacity tint).
23
23
  *
24
- * Only `default` draws a visible border. Its border width is subtracted from
25
- * the padding so the total inset (border + padding) equals the padding token —
26
- * keeping content geometry faithful to the spacing scale and identical to the
27
- * borderless variants. Themes can override borderWidth/borderColor.
24
+ * All variants include a transparent border to prevent layout jitter
25
+ * when switching variants. Themes can override borderWidth/borderColor.
28
26
  */
29
27
  export type CardVariant = 'default' | 'transparent' | 'muted' | 'blue' | 'cyan' | 'gray' | 'green' | 'orange' | 'pink' | 'purple' | 'red' | 'teal' | 'yellow';
30
28
  export type { SizeValue } from '../utils/types';
@@ -1 +1 @@
1
- {"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../src/Card/Card.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AAYrC,OAAO,KAAK,EAAC,SAAS,EAAE,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAE3D,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAO5C;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,WAAW,GACnB,SAAS,GACT,aAAa,GACb,OAAO,GACP,MAAM,GACN,MAAM,GACN,MAAM,GACN,OAAO,GACP,QAAQ,GACR,MAAM,GACN,QAAQ,GACR,KAAK,GACL,MAAM,GACN,QAAQ,CAAC;AAwFb,YAAY,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAE9C,MAAM,WAAW,SAAU,SAAQ,SAAS,CAAC,cAAc,CAAC;IAC1D,GAAG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K,GACL,MAAM,GACN,QAAQ,CAAC;AAkFb,YAAY,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAE9C,MAAM,WAAW,SAAU,SAAQ,SAAS,CAAC,cAAc,CAAC;IAC1D,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAChC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAElB;;;OAGG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IAEnB;;;OAGG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB;;;OAGG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IAEtB;;;OAGG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB;;;;OAIG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC;IAEtB;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC;CACvB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,wBAAgB,IAAI,CAAC,EACnB,KAAK,EACL,MAAM,EACN,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,OAAO,EACP,OAAmB,EACnB,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,EACH,GAAG,KAAK,EACT,EAAE,SAAS,+BAwDX;yBArEe,IAAI"}
package/dist/Card/Card.js CHANGED
@@ -34,10 +34,8 @@ import { themeProps } from "../utils/themeProps.js";
34
34
  * - Non-semantic palette: `blue | cyan | gray | green | orange | pink | purple | red | teal | yellow`
35
35
  * Each uses the corresponding `--color-background-<name>` token (20% opacity tint).
36
36
  *
37
- * Only `default` draws a visible border. Its border width is subtracted from
38
- * the padding so the total inset (border + padding) equals the padding token —
39
- * keeping content geometry faithful to the spacing scale and identical to the
40
- * borderless variants. Themes can override borderWidth/borderColor.
37
+ * All variants include a transparent border to prevent layout jitter
38
+ * when switching variants. Themes can override borderWidth/borderColor.
41
39
  */
42
40
  import { jsx as _jsx } from "react/jsx-runtime";
43
41
  // =============================================================================
@@ -49,16 +47,13 @@ const styles = {
49
47
  "--_card-radius": "x2kkz0m",
50
48
  kaIpWk: "x153u1i6",
51
49
  kVQacm: "x7giv3",
50
+ kMzoRj: "x1litavf",
51
+ ksu8eU: "x1y0btm7",
52
+ kVAM5u: "x9r1u3d",
52
53
  $$css: true
53
54
  },
54
55
  withBorder: {
55
- kMzoRj: "x1litavf",
56
- ksu8eU: "x1y0btm7",
57
56
  kVAM5u: "xvy26l8",
58
- kZCmMZ: "xs19ii7",
59
- kwRFfy: "x12frdag",
60
- kLKAdn: "x1nex4ik",
61
- kGO01o: "xbv1mwh",
62
57
  $$css: true
63
58
  },
64
59
  scrollable: {
@@ -197,17 +192,14 @@ export function Card({
197
192
  ref: ref,
198
193
  ...mergeProps(themeProps('card', {
199
194
  variant
200
- }), stylex.props(styles.card, variantStyles[variant], hasFixedHeight && styles.scrollable, dynamicStyles.sizing(width ?? null, height ?? null, maxWidth ?? null, minHeight ?? null), ...container(useThemeDefault ? {
195
+ }), stylex.props(styles.card, variantStyles[variant], variant === 'default' && styles.withBorder, hasFixedHeight && styles.scrollable, dynamicStyles.sizing(width ?? null, height ?? null, maxWidth ?? null, minHeight ?? null), ...container(useThemeDefault ? {
201
196
  useThemeDefault: 'card'
202
197
  } : {
203
198
  paddingInnerX: paddingToken,
204
199
  paddingInnerY: paddingToken,
205
200
  paddingOuterX: paddingToken,
206
201
  paddingOuterY: paddingToken
207
- }), !useThemeDefault && effectivePadding !== 4 && paddingStyles[effectivePadding], !useThemeDefault && effectivePadding !== 4 && containerPaddingInlineVarStyles[effectivePadding], !useThemeDefault && effectivePadding !== 4 && containerPaddingBlockStartVarStyles[effectivePadding], !useThemeDefault && effectivePadding !== 4 && containerPaddingBlockEndVarStyles[effectivePadding],
208
- // Applied after the container padding so the border-inset calc wins;
209
- // it reads the --container-padding-* vars set above.
210
- variant === 'default' && styles.withBorder, xstyle), className, style),
202
+ }), !useThemeDefault && effectivePadding !== 4 && paddingStyles[effectivePadding], !useThemeDefault && effectivePadding !== 4 && containerPaddingInlineVarStyles[effectivePadding], !useThemeDefault && effectivePadding !== 4 && containerPaddingBlockStartVarStyles[effectivePadding], !useThemeDefault && effectivePadding !== 4 && containerPaddingBlockEndVarStyles[effectivePadding], xstyle), className, style),
211
203
  ...props,
212
204
  children: children
213
205
  });
@@ -122,11 +122,11 @@ export function InputGroup({
122
122
  labelTooltip: labelTooltip,
123
123
  children: /*#__PURE__*/_jsx("div", {
124
124
  ref: ref,
125
- "data-testid": testId,
126
- ...rest,
127
125
  role: "group",
128
126
  "aria-labelledby": labelID,
129
127
  "aria-describedby": describedByIDs,
128
+ "data-testid": testId,
129
+ ...rest,
130
130
  ...mergeProps(themeProps('input-group', {
131
131
  size,
132
132
  status: status?.type ?? null
package/dist/Item/Item.js CHANGED
@@ -280,9 +280,9 @@ export function Item({
280
280
  });
281
281
  return /*#__PURE__*/_jsx(Component, {
282
282
  ref: ref,
283
- ...restProps,
284
283
  "aria-selected": isSelected || undefined,
285
284
  "aria-disabled": isDisabled || undefined,
285
+ ...restProps,
286
286
  ...mergeProps(themeProps('item', {
287
287
  density,
288
288
  align
@@ -1 +1 @@
1
- {"version":3,"file":"BaseTable.d.ts","sourceRoot":"","sources":["../../src/Table/BaseTable.tsx"],"names":[],"mappings":"AAGA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAe,KAAK,YAAY,EAAkB,KAAK,GAAG,EAAC,MAAM,OAAO,CAAC;AAGhF,OAAO,KAAK,EACV,cAAc,EAYf,MAAM,SAAS,CAAC;AA0iBjB;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,SAAS,EAAqB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC3E,KAAK,EAAE,cAAc,CAAC,CAAC,CAAC,GAAG;IAAC,GAAG,CAAC,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAA;CAAC,KACrD,YAAY,CAAC"}
1
+ {"version":3,"file":"BaseTable.d.ts","sourceRoot":"","sources":["../../src/Table/BaseTable.tsx"],"names":[],"mappings":"AAGA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAe,KAAK,YAAY,EAAkB,KAAK,GAAG,EAAC,MAAM,OAAO,CAAC;AAGhF,OAAO,KAAK,EACV,cAAc,EAYf,MAAM,SAAS,CAAC;AAyiBjB;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,SAAS,EAAqB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC3E,KAAK,EAAE,cAAc,CAAC,CAAC,CAAC,GAAG;IAAC,GAAG,CAAC,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAA;CAAC,KACrD,YAAY,CAAC"}
@@ -199,8 +199,7 @@ function areRowPropsEqual(prevProps, nextProps) {
199
199
  return true;
200
200
  }
201
201
 
202
- // Different object reference - compare values. This is intentionally a
203
- // one-level shallow compare: nested fields rely on reference identity.
202
+ // Different object reference - compare values
204
203
  const prevItem = prevProps.item;
205
204
  const nextItem = nextProps.item;
206
205
  const keys = Object.keys(nextItem);