@astryxdesign/core 0.7.2-canary.caec7ca → 0.7.2-canary.d52db36

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,8 +1,9 @@
1
1
  /**
2
2
  * @file List.tsx
3
- * @input Uses React, ReactNode, StyleXStyles, theme tokens, ListContext
4
- * with optional inline edge compensation
5
- * @output Exports List component, ListProps, ListDensity, ListStyle types
3
+ * @input Uses React, ReactNode, StyleXStyles, theme tokens, useDevWarning,
4
+ * and ListContext with the row edge treatment
5
+ * @output Exports List component, ListProps, ListDensity, ListEdge, ListStyle
6
+ * types
6
7
  * @position Core implementation; consumed by index.ts, tested by List.test.tsx
7
8
  *
8
9
  * SYNC: When modified, update these files to stay in sync:
@@ -14,8 +15,8 @@
14
15
  */
15
16
  import { type ReactNode } from 'react';
16
17
  import type { BaseProps } from '../BaseProps';
17
- import { type ListDensity, type ListMarkerStyle } from './ListContext';
18
- export { type ListDensity, type ListMarkerStyle as ListStyle, } from './ListContext';
18
+ import { type ListDensity, type ListEdge, type ListMarkerStyle } from './ListContext';
19
+ export { type ListDensity, type ListEdge, type ListMarkerStyle as ListStyle, } from './ListContext';
19
20
  export interface ListProps extends BaseProps<HTMLUListElement | HTMLOListElement> {
20
21
  /** Ref forwarded to the root element */
21
22
  ref?: React.Ref<HTMLUListElement | HTMLOListElement>;
@@ -37,16 +38,38 @@ export interface ListProps extends BaseProps<HTMLUListElement | HTMLOListElement
37
38
  */
38
39
  hasDividers?: boolean;
39
40
  /**
40
- * Compensates for each item's built-in inline inset, up to the container
41
- * padding available on each edge. Use "inline" to bring row content toward
42
- * sibling content such as a section heading. Content aligns when the
43
- * container padding is at least the item inset; smaller padding leaves
44
- * some inset uncompensated.
45
- * The cancelling margin reads the same variable the items derive their
46
- * inline padding from, so it tracks density and theme padding overrides
47
- * automatically. Hover and selection backgrounds still extend past the
48
- * text by the inset.
49
- * Omit to leave item positions unchanged.
41
+ * Where each row's text, dividers, and hover and selection backgrounds sit,
42
+ * relative to the list's edges and the container around it.
43
+ * - 'padded': text sits inside each row's padding, so it starts a little in
44
+ * from a heading above the list and backgrounds have room around it
45
+ * - 'flush': rows drop their side padding, so text starts on the heading's
46
+ * line and dividers and backgrounds stop at the row's content, with no
47
+ * room beyond it on either side. Works anywhere. Suits static rows
48
+ * - 'outset': text sits on the heading's line, and dividers and backgrounds
49
+ * reach a little past it into the container's padding. Suits interactive
50
+ * rows in a container
51
+ * - 'bleed': text sits on the heading's line, and dividers and backgrounds
52
+ * reach the container's edges with square corners, like Table rows in a
53
+ * Card
54
+ *
55
+ * A row's first content is what lines up with the heading: its marker,
56
+ * icon, or avatar when it has one, otherwise its label. 'outset' and
57
+ * 'bleed' reach into the padding of the nearest container that shares its
58
+ * padding: a Card, Section, Dialog, or BottomSheet, or a transparent
59
+ * container such as a Layout region with explicit padding or a padded
60
+ * ScrollableArea. Place the List directly in that container's padding:
61
+ * padding that Stack, Center, or your own styles add in between is not
62
+ * counted. Drawers and the automatic padding of LayoutContent and
63
+ * LayoutPanel aren't supported yet. With no such container, including in a Popover, they look
64
+ * like 'padded'. In a container with less padding than the rows' own, text
65
+ * starts a little after the heading's line. A theme's inline padding on `item` replaces the row
66
+ * padding of every value, including the zero padding of 'flush'.
67
+ * @default 'padded'
68
+ */
69
+ edge?: ListEdge;
70
+ /**
71
+ * @deprecated Use `edge="outset"`, which this sets. Still works; `edge`
72
+ * wins when both are set. `astryx upgrade` rewrites existing usage.
50
73
  */
51
74
  edgeCompensation?: 'inline';
52
75
  /**
@@ -77,9 +100,10 @@ export interface ListProps extends BaseProps<HTMLUListElement | HTMLOListElement
77
100
  * Renders semantic `<ul>` or `<ol>` elements with configurable density,
78
101
  * dividers, marker styles, and an optional header.
79
102
  *
80
- * Set `edgeCompensation="inline"` to compensate for the items' inline inset
81
- * up to the container padding available on each edge, for alignment with
82
- * sibling content such as a section heading.
103
+ * Set `edge` to choose where row text, dividers, and backgrounds sit: inside
104
+ * each row's padding (`padded`, the default), at the list's edges (`flush`),
105
+ * on a heading's line with backgrounds reaching into the container's padding
106
+ * (`outset`), or reaching the container's edges like Table rows (`bleed`).
83
107
  *
84
108
  * @example
85
109
  * ```
@@ -91,9 +115,12 @@ export interface ListProps extends BaseProps<HTMLUListElement | HTMLOListElement
91
115
  * <ListItem label="First step" />
92
116
  * <ListItem label="Second step" />
93
117
  * </List>
118
+ * <List edge="flush" hasDividers>
119
+ * <ListItem label="Solstice Mug" description="Ceramic, 12 oz" />
120
+ * </List>
94
121
  * ```
95
122
  */
96
- export declare function List({ children, density, hasDividers, edgeCompensation, header, listStyle, start, xstyle, className, style, 'data-testid': testId, ref, ...props }: ListProps): import("react").JSX.Element;
123
+ export declare function List({ children, density, hasDividers, edge: edgeProp, edgeCompensation, header, listStyle, start, xstyle, className, style, 'data-testid': testId, ref, ...props }: ListProps): import("react").JSX.Element;
97
124
  export declare namespace List {
98
125
  var displayName: string;
99
126
  }
@@ -1 +1 @@
1
- {"version":3,"file":"List.d.ts","sourceRoot":"","sources":["../../src/List/List.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAiB,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAGrD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAC5C,OAAO,EAEL,KAAK,WAAW,EAChB,KAAK,eAAe,EACrB,MAAM,eAAe,CAAC;AAIvB,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,eAAe,IAAI,SAAS,GAClC,MAAM,eAAe,CAAC;AAEvB,MAAM,WAAW,SAAU,SAAQ,SAAS,CAC1C,gBAAgB,GAAG,gBAAgB,CACpC;IACC,wCAAwC;IACxC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,gBAAgB,GAAG,gBAAgB,CAAC,CAAC;IACrD;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IAEpB;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,WAAW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;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC;IAEtB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;IACH,IAAI,CAAC,EAAE,QAAQ,CAAC;IAEhB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,QAAQ,CAAC;IAE5B;;;OAGG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IAEnB;;;;OAIG;IACH,SAAS,CAAC,EAAE,eAAe,CAAC;IAE5B;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAyDD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,IAAI,CAAC,EACnB,QAAQ,EACR,OAAoB,EACpB,WAAmB,EACnB,IAAI,EAAE,QAAQ,EACd,gBAAgB,EAChB,MAAM,EACN,SAAkB,EAClB,KAAK,EACL,MAAM,EACN,SAAS,EACT,KAAK,EACL,aAAa,EAAE,MAAM,EACrB,GAAG,EACH,GAAG,KAAK,EACT,EAAE,SAAS,+BAwEX;yBAvFe,IAAI"}
package/dist/List/List.js CHANGED
@@ -4,9 +4,10 @@
4
4
 
5
5
  /**
6
6
  * @file List.tsx
7
- * @input Uses React, ReactNode, StyleXStyles, theme tokens, ListContext
8
- * with optional inline edge compensation
9
- * @output Exports List component, ListProps, ListDensity, ListStyle types
7
+ * @input Uses React, ReactNode, StyleXStyles, theme tokens, useDevWarning,
8
+ * and ListContext with the row edge treatment
9
+ * @output Exports List component, ListProps, ListDensity, ListEdge, ListStyle
10
+ * types
10
11
  * @position Core implementation; consumed by index.ts, tested by List.test.tsx
11
12
  *
12
13
  * SYNC: When modified, update these files to stay in sync:
@@ -23,6 +24,7 @@ import { spacingVars } from "../theme/tokens.stylex.js";
23
24
  import { ListContext } from "./ListContext.js";
24
25
  import { mergeProps } from "../utils/index.js";
25
26
  import { themeProps } from "../utils/themeProps.js";
27
+ import { useDevWarning } from "../hooks/useDevWarning.js";
26
28
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
27
29
  // =============================================================================
28
30
  // Styles
@@ -39,6 +41,12 @@ const styles = {
39
41
  kXHlph: "x101abm8",
40
42
  $$css: true
41
43
  },
44
+ reachesContainerPadding: {
45
+ keTefX: "xojxgvx",
46
+ k71WvV: "x1fcf3bl",
47
+ kzqmXN: "xx6qvi6",
48
+ $$css: true
49
+ },
42
50
  withDividers: {
43
51
  kOIVth: "xxhr3t",
44
52
  $$css: true
@@ -68,9 +76,10 @@ const dynamicStyles = {
68
76
  * Renders semantic `<ul>` or `<ol>` elements with configurable density,
69
77
  * dividers, marker styles, and an optional header.
70
78
  *
71
- * Set `edgeCompensation="inline"` to compensate for the items' inline inset
72
- * up to the container padding available on each edge, for alignment with
73
- * sibling content such as a section heading.
79
+ * Set `edge` to choose where row text, dividers, and backgrounds sit: inside
80
+ * each row's padding (`padded`, the default), at the list's edges (`flush`),
81
+ * on a heading's line with backgrounds reaching into the container's padding
82
+ * (`outset`), or reaching the container's edges like Table rows (`bleed`).
74
83
  *
75
84
  * @example
76
85
  * ```
@@ -82,12 +91,16 @@ const dynamicStyles = {
82
91
  * <ListItem label="First step" />
83
92
  * <ListItem label="Second step" />
84
93
  * </List>
94
+ * <List edge="flush" hasDividers>
95
+ * <ListItem label="Solstice Mug" description="Ceramic, 12 oz" />
96
+ * </List>
85
97
  * ```
86
98
  */
87
99
  export function List({
88
100
  children,
89
101
  density = 'balanced',
90
102
  hasDividers = false,
103
+ edge: edgeProp,
91
104
  edgeCompensation,
92
105
  header,
93
106
  listStyle = 'none',
@@ -102,12 +115,17 @@ export function List({
102
115
  const headerId = useId();
103
116
  const isOrdered = listStyle === 'decimal';
104
117
  const Tag = isOrdered ? 'ol' : 'ul';
118
+ // Plain use of the deprecated prop is reported by its @deprecated type;
119
+ // development warns only when the two names conflict (spec:AST-017 FR29).
120
+ useDevWarning('List', '`edge` and the deprecated `edgeCompensation` are both set; `edge` wins. ' + 'Remove `edgeCompensation`. `astryx upgrade` rewrites existing usage.', edgeProp != null && edgeCompensation != null);
121
+ const edge = edgeProp ?? (edgeCompensation === 'inline' ? 'outset' : 'padded');
122
+ const reachesContainerPadding = edge === 'outset' || edge === 'bleed';
105
123
  const contextValue = useMemo(() => ({
106
124
  density,
107
125
  hasDividers,
108
- listStyle,
109
- edgeCompensation
110
- }), [density, hasDividers, listStyle, edgeCompensation]);
126
+ edge,
127
+ listStyle
128
+ }), [density, hasDividers, edge, listStyle]);
111
129
  const listElement = /*#__PURE__*/_jsx(Tag, {
112
130
  ref: ref
113
131
  // Consumer props first: everything the component sets for itself below
@@ -134,7 +152,7 @@ export function List({
134
152
  ...mergeProps(themeProps('list', {
135
153
  density,
136
154
  listStyle
137
- }), stylex.props(styles.list, hasDividers && styles.withDividers, listStyle !== 'none' && (start != null && start !== 1 ? dynamicStyles.counterStart(start - 1) : styles.withCounter), xstyle), className, style),
155
+ }), stylex.props(styles.list, hasDividers && styles.withDividers, reachesContainerPadding && styles.reachesContainerPadding, listStyle !== 'none' && (start != null && start !== 1 ? dynamicStyles.counterStart(start - 1) : styles.withCounter), xstyle), className, style),
138
156
  children: children
139
157
  });
140
158
  if (header == null) {
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @file ListContext.tsx
3
3
  * @input Layer-scoped React context
4
- * @output Exports ListContext for sharing density, dividers, marker style,
5
- * and optional inline edge compensation between List and ListItem, and
4
+ * @output Exports ListContext for sharing density, dividers, the row edge
5
+ * treatment, and marker style between List and ListItem, and
6
6
  * ListMarkerScope, which sets the marker for the items inside it, or a
7
7
  * task item's checkbox in its place
8
8
  * @position Internal context; consumed by List.tsx and ListItem.tsx
@@ -10,6 +10,11 @@
10
10
  import { type ReactNode } from 'react';
11
11
  export type ListDensity = 'compact' | 'balanced' | 'spacious';
12
12
  export type ListMarkerStyle = 'none' | 'disc' | 'decimal' | 'circle';
13
+ /**
14
+ * Where each row's content and its lines and backgrounds sit relative to the
15
+ * list's edges and the padding of the container around the list.
16
+ */
17
+ export type ListEdge = 'padded' | 'flush' | 'outset' | 'bleed';
13
18
  /**
14
19
  * Every marker ListItem draws: the public styles, and the square, letter,
15
20
  * and roman markers Markdown's nested lists use (spec:AST-061 DEC-6).
@@ -24,8 +29,8 @@ export interface ListTaskMarker {
24
29
  export interface ListContextValue {
25
30
  density: ListDensity;
26
31
  hasDividers: boolean;
32
+ edge: ListEdge;
27
33
  listStyle: ListMarkerStyle;
28
- edgeCompensation?: 'inline';
29
34
  /**
30
35
  * The marker items draw instead of the one `listStyle` names, set by
31
36
  * ListMarkerScope; internal. Ignored when `listStyle` is `'none'`.
@@ -1 +1 @@
1
- {"version":3,"file":"ListContext.d.ts","sourceRoot":"","sources":["../../src/List/ListContext.tsx"],"names":[],"mappings":"AAIA;;;;;;;;GAQG;AAEH,OAAO,EAAe,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAGnD,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,UAAU,GAAG,UAAU,CAAC;AAC9D,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,CAAC;AAErE;;;GAGG;AACH,MAAM,MAAM,UAAU,GACpB,MAAM,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,aAAa,GAAG,aAAa,CAAC;AAE3E,gFAAgF;AAChF,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,uDAAuD;IACvD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,WAAW,CAAC;IACrB,WAAW,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE,eAAe,CAAC;IAC3B,gBAAgB,CAAC,EAAE,QAAQ,CAAC;IAC5B;;;OAGG;IACH,MAAM,CAAC,EAAE,UAAU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IG;IACH,IAAI,CAAC,EAAE,cAAc,CAAC;CACvB;AAED,eAAO,MAAM,WAAW,kDAA+C,CAAC;AAGxE;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,EAC9B,MAAM,EACN,IAAI,EACJ,QAAQ,GACT,EAAE;IACD,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;IAC5B,QAAQ,CAAC,IAAI,CAAC,EAAE,cAAc,CAAC;IAC/B,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC;CAC9B,GAAG,SAAS,CAWZ"}
@@ -5,8 +5,8 @@
5
5
  /**
6
6
  * @file ListContext.tsx
7
7
  * @input Layer-scoped React context
8
- * @output Exports ListContext for sharing density, dividers, marker style,
9
- * and optional inline edge compensation between List and ListItem, and
8
+ * @output Exports ListContext for sharing density, dividers, the row edge
9
+ * treatment, and marker style between List and ListItem, and
10
10
  * ListMarkerScope, which sets the marker for the items inside it, or a
11
11
  * task item's checkbox in its place
12
12
  * @position Internal context; consumed by List.tsx and ListItem.tsx
@@ -14,6 +14,11 @@
14
14
  import { use, useMemo } from 'react';
15
15
  import { createLayerScopedContext as createContext } from "../Layer/layerScopedContext.js";
16
16
 
17
+ /**
18
+ * Where each row's content and its lines and backgrounds sit relative to the
19
+ * list's edges and the padding of the container around the list.
20
+ */
21
+
17
22
  /**
18
23
  * Every marker ListItem draws: the public styles, and the square, letter,
19
24
  * and roman markers Markdown's nested lists use (spec:AST-061 DEC-6).
@@ -1,8 +1,9 @@
1
1
  /**
2
2
  * @file ListItem.tsx
3
- * @input Uses React, ReactNode, StyleXStyles, theme tokens, List edge compensation,
4
- * CheckboxInput, and the marker or task checkbox a ListMarkerScope sets
5
- * (Markdown's nested lists and the task items of mixed lists)
3
+ * @input Uses React, ReactNode, StyleXStyles, theme tokens, the List row edge
4
+ * treatment, CheckboxInput, and the marker or task checkbox a
5
+ * ListMarkerScope sets (Markdown's nested lists and the task items of mixed
6
+ * lists)
6
7
  * @output Exports ListItem component, ListItemProps type
7
8
  * @position Core implementation; consumed by List, index.ts, tested by List.test.tsx
8
9
  *
@@ -1 +1 @@
1
- {"version":3,"file":"ListItem.d.ts","sourceRoot":"","sources":["../../src/List/ListItem.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAM,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAQ1C,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAK5C,OAAO,KAAK,EAAC,SAAS,EAAE,gBAAgB,EAAE,iBAAiB,EAAC,MAAM,SAAS,CAAC;AAO5E,MAAM,WAAW,aAAc,SAAQ,SAAS,CAAC,aAAa,CAAC;IAC7D,wCAAwC;IACxC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;IAC/B;;;;;OAKG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;;;;OAMG;IACH,KAAK,EAAE,SAAS,CAAC;IAEjB;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;IAExB;;;OAGG;IACH,YAAY,CAAC,EAAE,SAAS,CAAC;IAEzB;;OAEG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC;IAEvB;;;OAGG;IACH,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IAExC;;;;;;;;OAQG;IACH,cAAc,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IAErD;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;;;OAIG;IACH,YAAY,CAAC,EAA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AW,GAAG,IAAI,CAAC,CAAC;IAErD;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;;;OAIG;IACH,YAAY,CAAC,EAAE,gBAAgB,CAAC;IAEhC;;;;OAIG;IACH,aAAa,CAAC,EAAE,iBAAiB,CAAC;CACnC;AAwJD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,QAAQ,CAAC,EACvB,KAAK,EACL,WAAW,EACX,YAAY,EACZ,UAAU,EACV,OAAO,EACP,cAAc,EACd,IAAI,EACJ,MAAM,EACN,GAAG,EACH,UAAkB,EAClB,UAAkB,EAClB,KAAK,EACL,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,EACH,GAAG,SAAS,EACb,EAAE,aAAa,+BA4Ef;yBA9Fe,QAAQ"}
@@ -4,9 +4,10 @@
4
4
 
5
5
  /**
6
6
  * @file ListItem.tsx
7
- * @input Uses React, ReactNode, StyleXStyles, theme tokens, List edge compensation,
8
- * CheckboxInput, and the marker or task checkbox a ListMarkerScope sets
9
- * (Markdown's nested lists and the task items of mixed lists)
7
+ * @input Uses React, ReactNode, StyleXStyles, theme tokens, the List row edge
8
+ * treatment, CheckboxInput, and the marker or task checkbox a
9
+ * ListMarkerScope sets (Markdown's nested lists and the task items of mixed
10
+ * lists)
10
11
  * @output Exports ListItem component, ListItemProps type
11
12
  * @position Core implementation; consumed by List, index.ts, tested by List.test.tsx
12
13
  *
@@ -43,9 +44,19 @@ const styles = {
43
44
  kAmcRD: "xfrknyr",
44
45
  $$css: true
45
46
  },
46
- inlineEdgeCompensation: {
47
- keTefX: "x1t1czy8",
48
- k71WvV: "x1cphv78",
47
+ edgeFlush: {
48
+ "--_item-inset-inline": "x1nwg5ib",
49
+ $$css: true
50
+ },
51
+ edgeOutset: {
52
+ keTefX: "xch736x",
53
+ k71WvV: "x2gtn1o",
54
+ $$css: true
55
+ },
56
+ edgeBleed: {
57
+ kZCmMZ: "xua885n",
58
+ kwRFfy: "x1pyz5s7",
59
+ kaIpWk: "x2u8bby",
49
60
  $$css: true
50
61
  },
51
62
  withDivider: {
@@ -165,8 +176,8 @@ export function ListItem({
165
176
  const ctx = use(ListContext);
166
177
  const density = ctx?.density ?? 'balanced';
167
178
  const hasDividers = ctx?.hasDividers ?? false;
179
+ const edge = ctx?.edge ?? 'padded';
168
180
  const listStyle = ctx?.listStyle ?? 'none';
169
- const edgeCompensation = ctx?.edgeCompensation;
170
181
  const hasMarkers = listStyle !== 'none';
171
182
  // ListMarkerScope may name another marker for this item.
172
183
  const markerKind = listStyle === 'none' ? null : ctx?.marker ?? listStyle;
@@ -211,7 +222,7 @@ export function ListItem({
211
222
  isSelected: isSelected,
212
223
  align: align,
213
224
  density: density,
214
- xstyle: [hasMarkers && styles.withCounter, hasDividers && styles.withDivider, hasDividers && embeddedStyles.noRadius, edgeCompensation === 'inline' && styles.inlineEdgeCompensation, xstyle],
225
+ xstyle: [hasMarkers && styles.withCounter, hasDividers && styles.withDivider, hasDividers && embeddedStyles.noRadius, edge === 'flush' && styles.edgeFlush, edge === 'outset' && styles.edgeOutset, edge === 'bleed' && styles.edgeBleed, xstyle],
215
226
  ...mergeProps(themeProps('list-item'), {
216
227
  className,
217
228
  style
@@ -7,7 +7,7 @@
7
7
  * SYNC: When modified, update /packages/core/src/List/List.doc.mjs
8
8
  */
9
9
  export { List } from './List';
10
- export type { ListProps, ListStyle, ListDensity } from './List';
10
+ export type { ListProps, ListStyle, ListDensity, ListEdge } from './List';
11
11
  export { ListItem } from './ListItem';
12
12
  export type { ListItemProps } from './ListItem';
13
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/List/index.ts"],"names":[],"mappings":"AAIA;;;;;;;GAOG;AAEH,OAAO,EAAC,IAAI,EAAC,MAAM,QAAQ,CAAC;AAC5B,YAAY,EAAC,SAAS,EAAE,SAAS,EAAE,WAAW,EAAC,MAAM,QAAQ,CAAC;AAC9D,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAC;AACpC,YAAY,EAAC,aAAa,EAAC,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/List/index.ts"],"names":[],"mappings":"AAIA;;;;;;;GAOG;AAEH,OAAO,EAAC,IAAI,EAAC,MAAM,QAAQ,CAAC;AAC5B,YAAY,EAAC,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAC,MAAM,QAAQ,CAAC;AACxE,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAC;AACpC,YAAY,EAAC,aAAa,EAAC,MAAM,YAAY,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Markdown.d.ts","sourceRoot":"","sources":["../../src/Markdown/Markdown.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAe/B,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAkBhD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAG5C,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,sBAAsB,CAAC;AA8BzD,OAAO,KAAK,EAEV,mBAAmB,EAEpB,MAAM,oBAAoB,CAAC;AAoC5B;;;;;;;;;GASG;AACH,MAAM,WAAW,oBAAoB;IACnC,+DAA+D;IAC/D,OAAO,EAAE,MAAM,CAAC;IAEhB;;;;OAIG;IACH,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,gBAAgB,KAAK,MAAM,GAAG,KAAK,CAAC;IAExE,2CAA2C;IAC3C,MAAM,EAAE,CAAC,KAA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;GAUG;AACH,wBAAgB,QAAQ,CACtB,KAAK,CAAC,OAAO,SAAS,aAAa,CAAC,mBAAmB,CAAC,GAAG,SAAS,EAAE,EACtE,EACA,GAAG,EACH,QAAQ,EACR,OAAiB,EACjB,OAAmB,EACnB,iBAAqB,EACrB,WAAmB,EACnB,WAAW,EACX,OAAO,EACP,aAAuB,EACvB,YAAkB,EAClB,YAAsB,EACtB,UAAU,EACV,OAAO,EACP,aAAa,EACb,QAAQ,EACR,MAAM,EACN,SAAS,EACT,KAAK,EACL,EAAE,EAAE,MAAM,EACV,aAAa,EAAE,MAAM,EACrB,GAAG,KAAK,EACT,EAAE,aAAa,CAAC,OAAO,CAAC,GAAG,KAAK,CAAC,YAAY,CAkT7C;yBA1Ue,QAAQ"}
@@ -194,6 +194,12 @@ const markdownTableCellStyles = {
194
194
  code: {
195
195
  kTgw9: "x1lldw8n",
196
196
  $$css: true
197
+ },
198
+ tableOuterEdge: {
199
+ kMzoRj: "x1litavf",
200
+ ksu8eU: "x1y0btm7",
201
+ kVAM5u: "x14i3s5s",
202
+ $$css: true
197
203
  }
198
204
  };
199
205
 
@@ -1222,8 +1228,9 @@ listDepth = 0) {
1222
1228
  }), stylex.props(styles.tableWrapper, spacing, contentWidthValue != null ? dynamicStyles.blockWidth(contentWidthValue) : null, BLOCK_ALIGN_MARGIN[contentAlign] != null ? dynamicStyles.blockAlign(BLOCK_ALIGN_MARGIN[contentAlign]) : null, isFirst && styles.noMarginBlockStart, isLast && styles.noMarginBlockEnd)),
1223
1229
  ...lineStamps,
1224
1230
  children: /*#__PURE__*/_jsxs(Table, {
1225
- dividers: "rows",
1231
+ dividers: "grid",
1226
1232
  textOverflow: "wrap",
1233
+ xstyle: markdownTableCellStyles.tableOuterEdge,
1227
1234
  children: [/*#__PURE__*/_jsx(TableHeader, {
1228
1235
  children: /*#__PURE__*/_jsx(TableRow, {
1229
1236
  children: header?.children.map((h, i) => /*#__PURE__*/_jsx(TableHeaderCell
package/dist/astryx.css CHANGED
@@ -134,6 +134,7 @@
134
134
  .xqxtgf4{--_input-clear-hit-content:none}
135
135
  .xtoycft{--_input-clear-hit-inset:0px}
136
136
  .xqlix59{--_item-description-color:var(--color-error)}
137
+ .x1nwg5ib{--_item-inset-inline:0px}
137
138
  .xw1s368{--_item-inset-inline:var(--spacing-2)}
138
139
  .x1ytau7y{--_item-inset-inline:var(--spacing-3)}
139
140
  .xufyqxy{--_item-label-color:var(--color-error)}
@@ -1112,13 +1113,13 @@
1112
1113
  .x3ct3a4:not(#\#):not(#\#):not(#\#){list-style-type:none}
1113
1114
  .x14z9mp:not(#\#):not(#\#):not(#\#){margin-inline-end:0}
1114
1115
  .x11t971q:not(#\#):not(#\#):not(#\#){margin-inline-end:auto}
1115
- .x1cphv78:not(#\#):not(#\#):not(#\#){margin-inline-end:calc(-1 * min(var(--_item-inset-inline),var(--container-padding-inline-end,0px)))}
1116
1116
  .x1fcf3bl:not(#\#):not(#\#):not(#\#){margin-inline-end:calc(-1 * var(--container-padding-inline-end,0px))}
1117
1117
  .x1kpg4um:not(#\#):not(#\#):not(#\#){margin-inline-end:calc(-1 * var(--layout-padding-inner-x,var(--spacing-4)))}
1118
1118
  .xkd40ry:not(#\#):not(#\#):not(#\#){margin-inline-end:calc(-1 * var(--spacing-1))}
1119
1119
  .x3kzqx6:not(#\#):not(#\#):not(#\#){margin-inline-end:calc(-1 * var(--spacing-2))}
1120
1120
  .xmequkd:not(#\#):not(#\#):not(#\#){margin-inline-end:calc(var(--spacing-1) * -1)}
1121
1121
  .x144kxal:not(#\#):not(#\#):not(#\#){margin-inline-end:calc(calc(var(--spacing-4) + max(var(--astryx-layer-inset-inline-start, 0px), var(--astryx-layer-inset-inline-end, 0px))));margin-inline-end:calc(calc(max(var(--spacing-4), env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px)) + max(var(--astryx-layer-inset-inline-start, 0px), var(--astryx-layer-inset-inline-end, 0px))))}
1122
+ .x2gtn1o:not(#\#):not(#\#):not(#\#){margin-inline-end:max(var(--container-padding-inline-end,0px) - var(--_item-inset-inline),0px)}
1122
1123
  .xnur1sd:not(#\#):not(#\#):not(#\#){margin-inline-end:var(--spacing-1)}
1123
1124
  .x1pezmd8:not(#\#):not(#\#):not(#\#){margin-inline-end:var(--spacing-2)}
1124
1125
  .x1c9tiao:not(#\#):not(#\#):not(#\#){margin-inline-end:var(--x-marginInlineEnd)}
@@ -1126,7 +1127,6 @@
1126
1127
  .x1qfufaz:not(#\#):not(#\#):not(#\#){margin-inline-start:-8px}
1127
1128
  .x1lziwak:not(#\#):not(#\#):not(#\#){margin-inline-start:0}
1128
1129
  .xvc5jky:not(#\#):not(#\#):not(#\#){margin-inline-start:auto}
1129
- .x1t1czy8:not(#\#):not(#\#):not(#\#){margin-inline-start:calc(-1 * min(var(--_item-inset-inline),var(--container-padding-inline-start,0px)))}
1130
1130
  .xd10s4z:not(#\#):not(#\#):not(#\#){margin-inline-start:calc(-1 * var(--border-width))}
1131
1131
  .xojxgvx:not(#\#):not(#\#):not(#\#){margin-inline-start:calc(-1 * var(--container-padding-inline-start,0px))}
1132
1132
  .x1wim8z0:not(#\#):not(#\#):not(#\#){margin-inline-start:calc(-1 * var(--layout-padding-inner-x,var(--spacing-4)))}
@@ -1138,6 +1138,7 @@
1138
1138
  .x1xrm450:not(#\#):not(#\#):not(#\#){margin-inline-start:calc(var(--spacing-2) - var(--spacing-1) + 1px)}
1139
1139
  .x6w1cxl:not(#\#):not(#\#):not(#\#){margin-inline-start:calc(var(--spacing-3) + var(--border-width) + var(--spacing-4))}
1140
1140
  .xpdk1p0:not(#\#):not(#\#):not(#\#){margin-inline-start:calc(calc(var(--spacing-4) + max(var(--astryx-layer-inset-inline-start, 0px), var(--astryx-layer-inset-inline-end, 0px))));margin-inline-start:calc(calc(max(var(--spacing-4), env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px)) + max(var(--astryx-layer-inset-inline-start, 0px), var(--astryx-layer-inset-inline-end, 0px))))}
1141
+ .xch736x:not(#\#):not(#\#):not(#\#){margin-inline-start:max(var(--container-padding-inline-start,0px) - var(--_item-inset-inline),0px)}
1141
1142
  .x13hpdyo:not(#\#):not(#\#):not(#\#){margin-inline-start:var(--_avatar-group-overlap)}
1142
1143
  .x12vn87o:not(#\#):not(#\#):not(#\#){margin-inline-start:var(--_tree-indent,0px)}
1143
1144
  .xladpz9:not(#\#):not(#\#):not(#\#){margin-inline-start:var(--spacing-0-5)}
@@ -1192,6 +1193,7 @@
1192
1193
  .x12frdag:not(#\#):not(#\#):not(#\#){padding-inline-end:calc(var(--container-padding-inline-end) - var(--border-width))}
1193
1194
  .x1ahicqp:not(#\#):not(#\#):not(#\#){padding-inline-end:max(var(--container-padding-inline-end,0px),calc((100cqi - var(--layout-alignment-width)) / 2 + var(--container-padding-inline-end,0px)))}
1194
1195
  .xy07wb4:not(#\#):not(#\#):not(#\#){padding-inline-end:max(var(--container-padding-inline-end,0px),calc(100cqi - var(--layout-alignment-width) + var(--container-padding-inline-end,0px)))}
1196
+ .x1pyz5s7:not(#\#):not(#\#):not(#\#){padding-inline-end:max(var(--container-padding-inline-end,0px),var(--_item-inset-inline))}
1195
1197
  .x1g0rcpp:not(#\#):not(#\#):not(#\#){padding-inline-end:max(var(--spacing-4),env(safe-area-inset-right,0px))}
1196
1198
  .x1p6hqjl:not(#\#):not(#\#):not(#\#){padding-inline-end:var(--_tokenizer-end-lane-reserve,0px)}
1197
1199
  .x1by8st6:not(#\#):not(#\#):not(#\#){padding-inline-end:var(--astryx-dialog-padding-inline-end,var(--astryx-dialog-padding-inline,var(--astryx-dialog-padding,max(var(--spacing-4),env(safe-area-inset-right,0px)))))}
@@ -1223,6 +1225,7 @@
1223
1225
  .x2a0j69:not(#\#):not(#\#):not(#\#){padding-inline-start:calc(var(--spacing-2) - var(--spacing-1) + 1px)}
1224
1226
  .xhlv5e7:not(#\#):not(#\#):not(#\#){padding-inline-start:max(var(--container-padding-inline-start,0px),calc((100cqi - var(--layout-alignment-width)) / 2 + var(--container-padding-inline-start,0px)))}
1225
1227
  .xxjme2g:not(#\#):not(#\#):not(#\#){padding-inline-start:max(var(--container-padding-inline-start,0px),calc(100cqi - var(--layout-alignment-width) + var(--container-padding-inline-start,0px)))}
1228
+ .xua885n:not(#\#):not(#\#):not(#\#){padding-inline-start:max(var(--container-padding-inline-start,0px),var(--_item-inset-inline))}
1226
1229
  .xf4btlh:not(#\#):not(#\#):not(#\#){padding-inline-start:max(var(--spacing-4),env(safe-area-inset-left,0px))}
1227
1230
  .xqmdmw:not(#\#):not(#\#):not(#\#){padding-inline-start:var(--astryx-dialog-padding-inline-start,var(--astryx-dialog-padding-inline,var(--astryx-dialog-padding,max(var(--spacing-4),env(safe-area-inset-left,0px)))))}
1228
1231
  .x1jni19p:not(#\#):not(#\#):not(#\#){padding-inline-start:var(--astryx-number-input-padding-inline-start,var(--astryx-number-input-padding-inline,var(--astryx-number-input-padding,var(--spacing-2))))}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astryxdesign/core",
3
- "version": "0.7.2-canary.caec7ca",
3
+ "version": "0.7.2-canary.d52db36",
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.2-canary.caec7ca",
796
- "@astryxdesign/cli": "0.7.2-canary.caec7ca",
795
+ "@astryxdesign/a11y-spec": "0.7.2-canary.d52db36",
796
+ "@astryxdesign/cli": "0.7.2-canary.d52db36",
797
797
  "@babel/cli": "^7.29.7",
798
798
  "@babel/core": "^7.29.7",
799
799
  "@babel/preset-react": "^7.29.7",
@@ -49,7 +49,7 @@ export const docs = {
49
49
  {
50
50
  name: '--_item-inset-inline',
51
51
  description:
52
- 'Inline inset of the row. Item derives its paddingInline from this variable, and List reads it to cancel the inset when edgeCompensation="inline". Set paddingInline on `item` in a theme and both stay in sync.',
52
+ 'Inline inset of the row. Item derives its paddingInline from this variable, and List reads it to place rows for its edge treatments (edge="flush", "outset", and "bleed"). Set paddingInline on `item` in a theme and both stay in sync.',
53
53
  default: 'var(--spacing-2) (var(--spacing-3) for density="spacious")',
54
54
  private: true,
55
55
  },
package/src/Item/Item.tsx CHANGED
@@ -342,7 +342,7 @@ const styles = stylex.create({
342
342
  gap: spacingVars['--spacing-2'],
343
343
  // The inline inset is published as --_item-inset-inline and the padding
344
344
  // derives from it, so consumers that need to compensate for the inset
345
- // (List's edgeCompensation) read the var instead of mirroring the values.
345
+ // (List's edge treatments) read the var instead of mirroring the values.
346
346
  // Themes that set paddingInline on `item` also feed this var via the
347
347
  // derived var registry, keeping padding and compensation in sync.
348
348
  '--_item-inset-inline': spacingVars['--spacing-2'],
@@ -41,11 +41,18 @@ export const docs = {
41
41
  description: 'Show dividers between items.',
42
42
  default: 'false',
43
43
  },
44
+ {
45
+ name: 'edge',
46
+ type: "'padded' | 'flush' | 'outset' | 'bleed'",
47
+ description:
48
+ "Where each row's text, dividers, and hover and selection backgrounds sit, relative to the list's edges and the container around it. 'padded' keeps text inside each row's padding, so it starts a little in from a heading above the list and backgrounds have room around it. 'flush' drops the rows' side padding: text starts on the heading's line, and dividers and backgrounds stop at the row's content, with no room beyond it on either side. It works anywhere and suits static rows. 'outset' puts text on the heading's line and reaches dividers and backgrounds a little past it into the container's padding; it suits interactive rows in a container. 'bleed' puts text on the heading's line and reaches dividers and backgrounds to the container's edges with square corners, like Table rows in a Card. A row's first content is what lines up with the heading: its marker, icon, or avatar when it has one, otherwise its label. 'outset' and 'bleed' reach into the padding of the nearest container that shares its padding: a Card, Section, Dialog, or BottomSheet, or a transparent container such as a Layout region with explicit padding or a padded ScrollableArea. Place the List directly in that container's padding: padding that Stack, Center, or your own styles add in between is not counted. Drawers and the automatic padding of LayoutContent and LayoutPanel aren't supported yet. With no such container, including in a Popover, they look like 'padded'. In a container with less padding than the rows' own, text starts a little after the heading's line. A theme's inline padding on `item` replaces the row padding of every value, including the zero padding of flush.",
49
+ default: "'padded'",
50
+ },
44
51
  {
45
52
  name: 'edgeCompensation',
46
53
  type: "'inline'",
47
54
  description:
48
- "Compensate for item content inset on each inline edge by cancelling the smaller of each item's built-in horizontal inset and the container's published inline padding. The margin reads the same variable the items derive their inline padding from, so it tracks density and theme padding overrides automatically without pulling rows outside zero-padding or full-bleed surfaces. Use under a section heading to bring row text toward the heading text. Content aligns when container padding is at least the item inset; smaller padding leaves some inset uncompensated. Omit to leave item positions unchanged.",
55
+ "Deprecated: use edge=\"outset\", which this sets. Still works; edge wins when both are set. `astryx upgrade` rewrites existing usage.",
49
56
  },
50
57
  {
51
58
  name: 'header',
@@ -89,6 +96,8 @@ export const docs = {
89
96
  bestPractices: [
90
97
  { guidance: true, description: 'Provide a header to label the list and give context to screen readers.' },
91
98
  { guidance: true, description: 'Use start and end content slots to add icons, avatars, or badges to each item.' },
99
+ { guidance: true, description: 'Set edge to line row text up with a heading above the list: flush for static rows, outset or bleed for rows in a Card, Section, or Dialog.' },
100
+ { guidance: true, description: 'To line text up with a heading and keep room around the highlight where there is no Card, such as a sidebar, put the heading and the list in a Section with variant="transparent" and set edge="outset".' },
92
101
  { guidance: false, description: 'Place interactive elements inside an interactive list item; it creates nested click targets and confusing focus behavior.' },
93
102
  { guidance: false, description: 'Use a list for a single item or for laying out unrelated content; lists imply a meaningful collection.' },
94
103
  { guidance: false, description: 'Mix clickable and non-clickable items in the same list without clear visual distinction.' },
@@ -109,6 +118,8 @@ export const docsZh = {
109
118
  bestPractices: [
110
119
  { guidance: true, description: 'Provide a header to label the list and give context to screen readers.' },
111
120
  { guidance: true, description: 'Use start and end content slots to add icons, avatars, or badges to each item.' },
121
+ { guidance: true, description: 'Set edge to line row text up with a heading above the list: flush for static rows, outset or bleed for rows in a Card, Section, or Dialog.' },
122
+ { guidance: true, description: 'To line text up with a heading and keep room around the highlight where there is no Card, such as a sidebar, put the heading and the list in a Section with variant="transparent" and set edge="outset".' },
112
123
  { guidance: false, description: 'Place interactive elements inside an interactive list item; it creates nested click targets and confusing focus behavior.' },
113
124
  { guidance: false, description: 'Use a list for a single item or for laying out unrelated content; lists imply a meaningful collection.' },
114
125
  { guidance: false, description: 'Mix clickable and non-clickable items in the same list without clear visual distinction.' },
@@ -132,6 +143,8 @@ export const docsDense = {
132
143
  bestPractices: [
133
144
  { guidance: true, description: 'Provide a header to label the list and give context to screen readers.' },
134
145
  { guidance: true, description: 'Use start and end content slots to add icons, avatars, or badges to each item.' },
146
+ { guidance: true, description: 'Set edge to line row text up with a heading above the list: flush for static rows, outset or bleed for rows in a Card, Section, or Dialog.' },
147
+ { guidance: true, description: 'To line text up with a heading and keep room around the highlight where there is no Card, such as a sidebar, put the heading and the list in a Section with variant="transparent" and set edge="outset".' },
135
148
  { guidance: false, description: 'Place interactive elements inside an interactive list item; it creates nested click targets and confusing focus behavior.' },
136
149
  { guidance: false, description: 'Use a list for a single item or for laying out unrelated content; lists imply a meaningful collection.' },
137
150
  { guidance: false, description: 'Mix clickable and non-clickable items in the same list without clear visual distinction.' },