@astryxdesign/core 0.7.2-canary.fe2c655 → 0.7.2
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.
- package/CHANGELOG.md +156 -2
- package/README.md +4 -4
- package/dist/AppShell/AppShell.d.ts.map +1 -1
- package/dist/AppShell/AppShell.js +40 -1
- package/dist/AspectRatio/AspectRatio.d.ts +6 -8
- package/dist/AspectRatio/AspectRatio.d.ts.map +1 -1
- package/dist/AspectRatio/AspectRatio.js +44 -3
- package/dist/Avatar/Avatar.d.ts.map +1 -1
- package/dist/Avatar/Avatar.js +8 -1
- package/dist/AvatarGroup/AvatarGroupOverflow.d.ts.map +1 -1
- package/dist/AvatarGroup/AvatarGroupOverflow.js +4 -1
- package/dist/Breadcrumbs/BreadcrumbItem.d.ts.map +1 -1
- package/dist/Breadcrumbs/BreadcrumbItem.js +5 -2
- package/dist/Chat/ChatLayoutScrollButton.d.ts.map +1 -1
- package/dist/Chat/ChatLayoutScrollButton.js +1 -0
- package/dist/CheckboxInput/CheckboxInput.d.ts +1 -1
- package/dist/CheckboxInput/CheckboxInput.d.ts.map +1 -1
- package/dist/CheckboxInput/CheckboxInput.js +3 -1
- package/dist/CheckboxList/CheckboxList.d.ts +1 -1
- package/dist/CheckboxList/CheckboxList.d.ts.map +1 -1
- package/dist/CheckboxList/CheckboxList.js +6 -2
- package/dist/CheckboxList/CheckboxListItem.d.ts +9 -1
- package/dist/CheckboxList/CheckboxListItem.d.ts.map +1 -1
- package/dist/CheckboxList/CheckboxListItem.js +4 -2
- package/dist/CommandPalette/CommandPaletteInput.d.ts +1 -1
- package/dist/CommandPalette/CommandPaletteInput.d.ts.map +1 -1
- package/dist/CommandPalette/CommandPaletteInput.js +37 -5
- package/dist/ContextMenu/ContextMenu.d.ts.map +1 -1
- package/dist/ContextMenu/ContextMenu.js +5 -2
- package/dist/Dialog/Dialog.d.ts.map +1 -1
- package/dist/Dialog/Dialog.js +20 -8
- package/dist/DropdownMenu/DropdownMenu.d.ts +1 -1
- package/dist/DropdownMenu/DropdownMenu.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenu.js +84 -113
- package/dist/DropdownMenu/DropdownMenuCheckboxItem.d.ts +1 -1
- package/dist/DropdownMenu/DropdownMenuContext.d.ts +17 -0
- package/dist/DropdownMenu/DropdownMenuContext.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuContext.js +21 -0
- package/dist/DropdownMenu/DropdownMenuDivider.d.ts +5 -3
- package/dist/DropdownMenu/DropdownMenuDivider.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuDivider.js +7 -3
- package/dist/DropdownMenu/DropdownMenuGroup.d.ts +6 -4
- package/dist/DropdownMenu/DropdownMenuGroup.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuGroup.js +4 -3
- package/dist/DropdownMenu/DropdownMenuRadioItem.d.ts +1 -1
- package/dist/DropdownMenu/DropdownMenuSubMenu.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuSubMenu.js +15 -4
- package/dist/DropdownMenu/lazyMenuBottomSheet.d.ts +24 -0
- package/dist/DropdownMenu/lazyMenuBottomSheet.d.ts.map +1 -0
- package/dist/DropdownMenu/lazyMenuBottomSheet.js +46 -0
- package/dist/DropdownMenu/menuRegionStops.d.ts +38 -0
- package/dist/DropdownMenu/menuRegionStops.d.ts.map +1 -0
- package/dist/DropdownMenu/menuRegionStops.js +131 -0
- package/dist/EmptyState/EmptyState.d.ts.map +1 -1
- package/dist/EmptyState/EmptyState.js +4 -10
- package/dist/Field/Field.d.ts +1 -1
- package/dist/Field/Field.d.ts.map +1 -1
- package/dist/Field/Field.js +8 -4
- package/dist/FormLayout/FormLayout.d.ts +5 -4
- package/dist/FormLayout/FormLayout.d.ts.map +1 -1
- package/dist/FormLayout/FormLayout.js +1 -1
- package/dist/FormLayout/FormLayoutContext.d.ts +3 -3
- package/dist/FormLayout/FormLayoutContext.js +3 -3
- package/dist/Grid/Grid.d.ts +8 -7
- package/dist/Grid/Grid.d.ts.map +1 -1
- package/dist/Grid/Grid.js +5 -4
- package/dist/Grid/GridSpan.d.ts +1 -1
- package/dist/Grid/GridSpan.d.ts.map +1 -1
- package/dist/Grid/GridSpan.js +1 -0
- package/dist/Heading/Heading.d.ts.map +1 -1
- package/dist/Heading/Heading.js +4 -2
- package/dist/Item/Item.d.ts +6 -2
- package/dist/Item/Item.d.ts.map +1 -1
- package/dist/Item/Item.js +19 -4
- package/dist/List/List.d.ts +46 -19
- package/dist/List/List.d.ts.map +1 -1
- package/dist/List/List.js +28 -10
- package/dist/List/ListContext.d.ts +8 -3
- package/dist/List/ListContext.d.ts.map +1 -1
- package/dist/List/ListContext.js +7 -2
- package/dist/List/ListItem.d.ts +13 -5
- package/dist/List/ListItem.d.ts.map +1 -1
- package/dist/List/ListItem.js +21 -8
- package/dist/List/index.d.ts +1 -1
- package/dist/List/index.d.ts.map +1 -1
- package/dist/Markdown/Markdown.d.ts.map +1 -1
- package/dist/Markdown/Markdown.js +8 -1
- package/dist/Markdown/parser.d.ts.map +1 -1
- package/dist/Markdown/parser.js +8 -2
- package/dist/Markdown/plugins/headingLinks.d.ts.map +1 -1
- package/dist/Markdown/plugins/headingLinks.js +9 -1
- package/dist/MetadataList/MetadataList.d.ts.map +1 -1
- package/dist/MetadataList/MetadataList.js +5 -1
- package/dist/MetadataList/MetadataListContext.d.ts +1 -1
- package/dist/MetadataList/MetadataListContext.d.ts.map +1 -1
- package/dist/MobileNav/MobileNav.d.ts +9 -0
- package/dist/MobileNav/MobileNav.d.ts.map +1 -1
- package/dist/MobileNav/MobileNav.js +30 -3
- package/dist/PowerSearch/PowerSearch.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearch.js +5 -0
- package/dist/PowerSearch/PowerSearchValueEditor.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearchValueEditor.js +45 -11
- package/dist/RadioList/RadioList.d.ts +1 -1
- package/dist/RadioList/RadioList.d.ts.map +1 -1
- package/dist/RadioList/RadioList.js +6 -2
- package/dist/RadioList/RadioListItem.d.ts +9 -1
- package/dist/RadioList/RadioListItem.d.ts.map +1 -1
- package/dist/RadioList/RadioListItem.js +2 -0
- package/dist/SideNav/SideNavItem.d.ts +8 -1
- package/dist/SideNav/SideNavItem.d.ts.map +1 -1
- package/dist/SideNav/SideNavItem.js +76 -10
- package/dist/Text/Text.d.ts.map +1 -1
- package/dist/Text/Text.js +4 -2
- package/dist/ToggleButton/ToggleButton.d.ts +3 -2
- package/dist/ToggleButton/ToggleButton.d.ts.map +1 -1
- package/dist/ToggleButton/ToggleButton.js +12 -1
- package/dist/Token/Token.js +1 -1
- package/dist/TopNav/TopNavMegaMenu.d.ts.map +1 -1
- package/dist/TopNav/TopNavMegaMenu.js +5 -3
- package/dist/TopNav/TopNavMenu.d.ts.map +1 -1
- package/dist/TopNav/TopNavMenu.js +5 -3
- package/dist/TreeList/TreeList.d.ts.map +1 -1
- package/dist/TreeList/TreeList.js +1 -0
- package/dist/TreeList/TreeListBranches.d.ts.map +1 -1
- package/dist/TreeList/TreeListBranches.js +2 -2
- package/dist/TreeList/TreeListItem.d.ts.map +1 -1
- package/dist/TreeList/TreeListItem.js +57 -9
- package/dist/astryx.css +27 -4
- package/dist/hooks/useMenuHover.d.ts.map +1 -1
- package/dist/hooks/useMenuHover.js +18 -13
- package/dist/reset.a11y.chromium.spec.js +50 -1
- package/dist/utils/plainDate.d.ts.map +1 -1
- package/dist/utils/plainDate.js +15 -9
- package/docs.mjs +4 -4
- package/package.json +4 -4
- package/scripts/agent-doc-state.mjs +66 -6
- package/scripts/postinstall.mjs +44 -3
- package/src/AppShell/AppShell.tsx +45 -1
- package/src/AspectRatio/AspectRatio.test.tsx +44 -43
- package/src/AspectRatio/AspectRatio.tsx +38 -18
- package/src/AspectRatio/__tests__/AspectRatioFitLayers.a11y.browser.spec.ts +157 -0
- package/src/Avatar/Avatar.doc.mjs +5 -3
- package/src/Avatar/Avatar.tsx +11 -2
- package/src/AvatarGroup/AvatarGroup.doc.mjs +3 -2
- package/src/AvatarGroup/AvatarGroupOverflow.test.tsx +24 -1
- package/src/AvatarGroup/AvatarGroupOverflow.tsx +2 -0
- package/src/Breadcrumbs/BreadcrumbItem.tsx +4 -1
- package/src/Breadcrumbs/Breadcrumbs.test.tsx +30 -1
- package/src/Card/Card.doc.mjs +1 -1
- package/src/Chat/ChatLayoutScrollButton.test.tsx +13 -0
- package/src/Chat/ChatLayoutScrollButton.tsx +4 -2
- package/src/Chat/__tests__/ChatLayoutScrollButton.a11y.chromium.spec.ts +64 -19
- package/src/Chat/__tests__/ChatMessageMetadata.a11y.chromium.spec.ts +3 -1
- package/src/CheckboxInput/CheckboxInput.test.tsx +34 -0
- package/src/CheckboxInput/CheckboxInput.tsx +3 -1
- package/src/CheckboxList/CheckboxList.fr10.test.tsx +29 -2
- package/src/CheckboxList/CheckboxList.test.tsx +22 -0
- package/src/CheckboxList/CheckboxList.tsx +4 -1
- package/src/CheckboxList/CheckboxListItem.doc.mjs +16 -0
- package/src/CheckboxList/CheckboxListItem.tsx +10 -0
- package/src/Code/Code.doc.mjs +1 -0
- package/src/CommandPalette/CommandPalette.doc.mjs +2 -0
- package/src/CommandPalette/CommandPaletteInput.test.tsx +53 -4
- package/src/CommandPalette/CommandPaletteInput.tsx +33 -3
- package/src/CommandPalette/__tests__/CommandPaletteInputAudit.a11y.chromium.spec.ts +335 -0
- package/src/CommandPalette/__tests__/CommandPaletteItemAudit.a11y.chromium.spec.ts +292 -0
- package/src/ContextMenu/ContextMenu.doc.mjs +2 -3
- package/src/ContextMenu/ContextMenu.test.tsx +12 -2
- package/src/ContextMenu/ContextMenu.tsx +4 -1
- package/src/ContextMenu/__tests__/ContextMenuAudit.a11y.chromium.spec.ts +438 -0
- package/src/Dialog/Dialog.test.tsx +46 -0
- package/src/Dialog/Dialog.tsx +20 -7
- package/src/Dialog/__tests__/Dialog.a11y.known-failures.ts +0 -14
- package/src/Drawer/Drawer.doc.mjs +1 -0
- package/src/DropdownMenu/DropdownMenu.ssr.test.tsx +57 -0
- package/src/DropdownMenu/DropdownMenu.test.tsx +79 -6
- package/src/DropdownMenu/DropdownMenu.tsx +88 -144
- package/src/DropdownMenu/DropdownMenuCheckboxItem.doc.mjs +1 -1
- package/src/DropdownMenu/DropdownMenuCheckboxItem.tsx +1 -1
- package/src/DropdownMenu/DropdownMenuContext.tsx +24 -0
- package/src/DropdownMenu/DropdownMenuDivider.doc.mjs +2 -2
- package/src/DropdownMenu/DropdownMenuDivider.spec.md +192 -0
- package/src/DropdownMenu/DropdownMenuDivider.tsx +9 -5
- package/src/DropdownMenu/DropdownMenuGroup.doc.mjs +169 -10
- package/src/DropdownMenu/DropdownMenuGroup.tsx +6 -4
- package/src/DropdownMenu/DropdownMenuLazySheet.test.tsx +126 -0
- package/src/DropdownMenu/DropdownMenuRadioItem.doc.mjs +1 -1
- package/src/DropdownMenu/DropdownMenuRadioItem.tsx +1 -1
- package/src/DropdownMenu/DropdownMenuSubMenu.test.tsx +185 -0
- package/src/DropdownMenu/DropdownMenuSubMenu.tsx +17 -3
- package/src/DropdownMenu/__tests__/DropdownMenuDividerAudit.a11y.chromium.spec.ts +280 -0
- package/src/DropdownMenu/__tests__/DropdownMenuGroupAudit.a11y.chromium.spec.ts +334 -0
- package/src/DropdownMenu/__tests__/warmMenuBottomSheet.tsx +43 -0
- package/src/DropdownMenu/lazyMenuBottomSheet.ts +71 -0
- package/src/DropdownMenu/menuRegionStops.ts +167 -0
- package/src/EmptyState/EmptyState.doc.mjs +3 -2
- package/src/EmptyState/EmptyState.spec.md +189 -0
- package/src/EmptyState/EmptyState.test.tsx +74 -3
- package/src/EmptyState/EmptyState.tsx +4 -8
- package/src/Field/Field.doc.mjs +14 -8
- package/src/Field/Field.spec.md +217 -0
- package/src/Field/Field.test.tsx +60 -2
- package/src/Field/Field.tsx +17 -8
- package/src/Field/FieldLabel.doc.mjs +133 -26
- package/src/Field/FieldLabel.spec.md +172 -0
- package/src/Field/__tests__/FieldLabelAudit.a11y.chromium.spec.ts +296 -0
- package/src/FormLayout/FormLayout.doc.mjs +6 -3
- package/src/FormLayout/FormLayout.spec.md +192 -0
- package/src/FormLayout/FormLayout.test.tsx +15 -0
- package/src/FormLayout/FormLayout.tsx +7 -6
- package/src/FormLayout/FormLayoutContext.ts +3 -3
- package/src/Grid/Grid.doc.mjs +7 -1
- package/src/Grid/Grid.spec.md +93 -113
- package/src/Grid/Grid.test.tsx +22 -0
- package/src/Grid/Grid.tsx +10 -9
- package/src/Grid/GridSpan.doc.mjs +3 -3
- package/src/Grid/GridSpan.tsx +4 -1
- package/src/Heading/Heading.test.tsx +57 -0
- package/src/Heading/Heading.tsx +6 -2
- package/src/Icon/Icon.doc.mjs +36 -0
- package/src/Indicator/Indicator.doc.mjs +3 -3
- package/src/Item/Item.doc.mjs +12 -8
- package/src/Item/Item.test.tsx +61 -0
- package/src/Item/Item.tsx +40 -4
- package/src/Layout/LayoutHeader.doc.mjs +5 -0
- package/src/List/List.doc.mjs +14 -1
- package/src/List/List.spec.md +129 -77
- package/src/List/List.test.tsx +163 -94
- package/src/List/List.tsx +74 -18
- package/src/List/ListContext.tsx +9 -3
- package/src/List/ListItem.doc.mjs +16 -0
- package/src/List/ListItem.tsx +56 -27
- package/src/List/index.ts +1 -1
- package/src/Markdown/Markdown.tsx +14 -1
- package/src/Markdown/parser.ts +8 -2
- package/src/Markdown/plugins/headingLinks.ts +9 -1
- package/src/MetadataList/MetadataList.doc.mjs +3 -3
- package/src/MetadataList/MetadataList.test.tsx +38 -0
- package/src/MetadataList/MetadataList.tsx +8 -1
- package/src/MetadataList/MetadataListContext.tsx +1 -1
- package/src/MobileNav/MobileNav.tsx +30 -3
- package/src/MobileNav/MobileNavCloseEdgeCases.test.tsx +173 -15
- package/src/MoreMenu/MoreMenu.test.tsx +5 -1
- package/src/PowerSearch/PowerSearch.test.tsx +62 -0
- package/src/PowerSearch/PowerSearch.tsx +9 -0
- package/src/PowerSearch/PowerSearchValueEditor.test.tsx +71 -0
- package/src/PowerSearch/PowerSearchValueEditor.tsx +45 -0
- package/src/ProgressBar/ProgressBar.doc.mjs +1 -0
- package/src/RadioList/RadioList.fr10.test.tsx +45 -2
- package/src/RadioList/RadioList.test.tsx +22 -0
- package/src/RadioList/RadioList.tsx +4 -1
- package/src/RadioList/RadioListItem.doc.mjs +16 -0
- package/src/RadioList/RadioListItem.tsx +10 -1
- package/src/Resizable/useResizable.doc.mjs +2 -0
- package/src/ScrollableArea/ScrollableArea.doc.mjs +1 -1
- package/src/SideNav/SideNav.spec.md +227 -0
- package/src/SideNav/SideNav.test.tsx +220 -0
- package/src/SideNav/SideNavItem.doc.mjs +2 -2
- package/src/SideNav/SideNavItem.tsx +99 -17
- package/src/Slider/Slider.spec.md +39 -18
- package/src/Spinner/Spinner.doc.mjs +1 -1
- package/src/TabList/TabList.spec.md +57 -44
- package/src/Table/Table.spec.md +6 -1
- package/src/Table/plugins/activation/useTableActivation.spec.md +254 -0
- package/src/Text/Text.test.tsx +57 -0
- package/src/Text/Text.tsx +6 -2
- package/src/TimeInput/TimeInput.fr10.test.tsx +15 -0
- package/src/Timestamp/Timestamp.doc.mjs +1 -1
- package/src/ToggleButton/ToggleButton.test.tsx +95 -0
- package/src/ToggleButton/ToggleButton.tsx +12 -1
- package/src/ToggleButton/ToggleButtonGroup.doc.mjs +4 -0
- package/src/Token/Token.tsx +1 -1
- package/src/Token/__tests__/TokenRemoveTarget.a11y.chromium.spec.ts +86 -0
- package/src/Toolbar/Toolbar.test.tsx +0 -8
- package/src/Toolbar/__tests__/Toolbar.a11y.chromium.spec.ts +163 -0
- package/src/Toolbar/__tests__/Toolbar.a11y.renders.tsx +63 -0
- package/src/Toolbar/__tests__/Toolbar.a11y.states.ts +142 -0
- package/src/Toolbar/__tests__/Toolbar.a11y.test.tsx +126 -0
- package/src/TopNav/TopNavMegaMenu.test.tsx +47 -0
- package/src/TopNav/TopNavMegaMenu.tsx +9 -3
- package/src/TopNav/TopNavMenu.test.tsx +46 -1
- package/src/TopNav/TopNavMenu.tsx +13 -3
- package/src/TreeList/TreeList.doc.mjs +1 -0
- package/src/TreeList/TreeList.test.tsx +327 -6
- package/src/TreeList/TreeList.tsx +5 -1
- package/src/TreeList/TreeListBranches.tsx +6 -0
- package/src/TreeList/TreeListItem.tsx +88 -13
- package/src/docPropLiterals.test.ts +36 -10
- package/src/hooks/useMenuHover.ts +18 -13
- package/src/postinstall.test.mjs +79 -0
- package/src/reset.a11y.chromium.spec.ts +52 -1
- package/src/reset.css +9 -29
- package/src/reset.test.ts +11 -0
- package/src/theme/derivedVarRegistry.test.ts +7 -0
- package/src/unicodePropertyEscapes.source-build.test.mjs +69 -0
- package/src/utils/plainDate.test.ts +37 -1
- package/src/utils/plainDate.ts +15 -5
|
@@ -19,9 +19,9 @@ import { createLayerScopedContext as createContext } from "../Layer/layerScopedC
|
|
|
19
19
|
* Direction of form field arrangement.
|
|
20
20
|
*
|
|
21
21
|
* - `'vertical'` — Fields stack top-to-bottom (default). Most common.
|
|
22
|
-
* - `'horizontal'` — Fields
|
|
23
|
-
* - `'horizontal-labels'` — Fields stack vertically
|
|
24
|
-
*
|
|
22
|
+
* - `'horizontal'` — Fields occupy one `1fr` grid track per child in logical inline order.
|
|
23
|
+
* - `'horizontal-labels'` — Fields stack vertically while labels sit beside
|
|
24
|
+
* their inputs on the inline-start side (settings/admin panel pattern).
|
|
25
25
|
*/
|
|
26
26
|
|
|
27
27
|
/**
|
package/dist/Grid/Grid.d.ts
CHANGED
|
@@ -21,13 +21,14 @@ export type GridAlignment = 'start' | 'center' | 'end' | 'stretch';
|
|
|
21
21
|
/**
|
|
22
22
|
* Column configuration for Grid.
|
|
23
23
|
*
|
|
24
|
-
* A number means exactly N
|
|
25
|
-
* `columns={4}` on a phone renders four narrow tracks.
|
|
24
|
+
* A number means exactly N `1fr` tracks at every width; it never reflows, so
|
|
25
|
+
* `columns={4}` on a phone renders four narrow tracks. A child's minimum
|
|
26
|
+
* content can widen its track beyond an equal fraction. For columns that reflow
|
|
26
27
|
* on small screens, use the object form: `{minWidth: 240, max: 4}` renders at
|
|
27
28
|
* most four columns, each at least 240px, and fewer when the container is
|
|
28
29
|
* narrower.
|
|
29
30
|
*
|
|
30
|
-
* - `number` — exactly N
|
|
31
|
+
* - `number` — exactly N `1fr` tracks (e.g. `columns={3}`); never reflows
|
|
31
32
|
* - `object` — responsive columns based on minimum child width:
|
|
32
33
|
* - `minWidth` — minimum width (px) for each column track
|
|
33
34
|
* - `repeat` — `'fill'` (default) preserves empty tracks for consistent widths;
|
|
@@ -46,10 +47,10 @@ export interface GridProps extends BaseProps<HTMLDivElement> {
|
|
|
46
47
|
/** Ref forwarded to the root element */
|
|
47
48
|
ref?: React.Ref<HTMLDivElement>;
|
|
48
49
|
/**
|
|
49
|
-
* Column configuration. A number
|
|
50
|
-
* reflows;
|
|
51
|
-
* `{minWidth, max}`.
|
|
52
|
-
* - `number` — exactly N
|
|
50
|
+
* Column configuration. A number creates exactly N `1fr` tracks and never
|
|
51
|
+
* reflows; a child's minimum content may widen its track. For columns that
|
|
52
|
+
* reflow on small screens, use `{minWidth, max}`.
|
|
53
|
+
* - `number` — exactly N `1fr` tracks at every width
|
|
53
54
|
* - `{minWidth, max?, repeat?}` — responsive columns with a px floor and an
|
|
54
55
|
* optional cap
|
|
55
56
|
*
|
package/dist/Grid/Grid.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Grid.d.ts","sourceRoot":"","sources":["../../src/Grid/Grid.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AACrC,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAG5C,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAI9C;;GAEG;AAEH,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AAE,WAAW,CAAC;IAExB;;;;;;;;;;;;OAYG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,KAAK,CAAC,EAAE,aAAa,CAAC;IAEtB;;;OAGG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC;IAExB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AA2ND;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,IAAI,CAAC,EACnB,OAAO,EACP,SAAS,EACT,KAAK,EACL,MAAM,EACN,QAAQ,EACR,SAAS,EACT,GAAG,EACH,MAAM,EACN,SAAS,EACT,KAAK,EACL,OAAO,EACP,MAAM,EACN,SAAS,EACT,KAAK,EACL,QAAQ,EACR,GAAG,EACH,GAAG,KAAK,EACT,EAAE,SAAS,+BA6EX;yBA/Fe,IAAI"}
|
package/dist/Grid/Grid.js
CHANGED
|
@@ -26,13 +26,14 @@ import { themeProps } from "../utils/themeProps.js";
|
|
|
26
26
|
/**
|
|
27
27
|
* Column configuration for Grid.
|
|
28
28
|
*
|
|
29
|
-
* A number means exactly N
|
|
30
|
-
* `columns={4}` on a phone renders four narrow tracks.
|
|
29
|
+
* A number means exactly N `1fr` tracks at every width; it never reflows, so
|
|
30
|
+
* `columns={4}` on a phone renders four narrow tracks. A child's minimum
|
|
31
|
+
* content can widen its track beyond an equal fraction. For columns that reflow
|
|
31
32
|
* on small screens, use the object form: `{minWidth: 240, max: 4}` renders at
|
|
32
33
|
* most four columns, each at least 240px, and fewer when the container is
|
|
33
34
|
* narrower.
|
|
34
35
|
*
|
|
35
|
-
* - `number` — exactly N
|
|
36
|
+
* - `number` — exactly N `1fr` tracks (e.g. `columns={3}`); never reflows
|
|
36
37
|
* - `object` — responsive columns based on minimum child width:
|
|
37
38
|
* - `minWidth` — minimum width (px) for each column track
|
|
38
39
|
* - `repeat` — `'fill'` (default) preserves empty tracks for consistent widths;
|
|
@@ -368,6 +369,7 @@ export function Grid({
|
|
|
368
369
|
const columnsVariant = typeof columns === 'number' ? columns : typeof columns === 'object' ? undefined : undefined;
|
|
369
370
|
return /*#__PURE__*/_jsx("div", {
|
|
370
371
|
ref: ref,
|
|
372
|
+
...props,
|
|
371
373
|
...mergeProps(themeProps('grid', {
|
|
372
374
|
columns: columnsVariant,
|
|
373
375
|
gap,
|
|
@@ -377,7 +379,6 @@ export function Grid({
|
|
|
377
379
|
...style,
|
|
378
380
|
...inlineStyle
|
|
379
381
|
}),
|
|
380
|
-
...props,
|
|
381
382
|
children: children
|
|
382
383
|
});
|
|
383
384
|
}
|
package/dist/Grid/GridSpan.d.ts
CHANGED
|
@@ -18,7 +18,7 @@ export interface GridSpanProps extends BaseProps<HTMLDivElement> {
|
|
|
18
18
|
/**
|
|
19
19
|
* Number of columns to span, or 'full' to span all columns.
|
|
20
20
|
* - Number: `grid-column: span N`
|
|
21
|
-
* - 'full': `grid-column: 1 / -1` (spans
|
|
21
|
+
* - 'full': `grid-column: 1 / -1` (spans all explicit columns)
|
|
22
22
|
*/
|
|
23
23
|
columns?: number | 'full';
|
|
24
24
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GridSpan.d.ts","sourceRoot":"","sources":["../../src/Grid/GridSpan.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AACrC,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAK5C,MAAM,WAAW,aAAc,SAAQ,SAAS,CAAC,cAAc,CAAC;IAC9D,wCAAwC;IACxC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAChC;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAE1B;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;
|
|
1
|
+
{"version":3,"file":"GridSpan.d.ts","sourceRoot":"","sources":["../../src/Grid/GridSpan.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AACrC,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAK5C,MAAM,WAAW,aAAc,SAAQ,SAAS,CAAC,cAAc,CAAC;IAC9D,wCAAwC;IACxC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAChC;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAE1B;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAeD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,QAAQ,CAAC,EACvB,OAAO,EACP,IAAI,EACJ,MAAM,EACN,SAAS,EACT,KAAK,EACL,QAAQ,EACR,GAAG,EACH,GAAG,KAAK,EACT,EAAE,aAAa,+BAwBf;yBAjCe,QAAQ"}
|
package/dist/Grid/GridSpan.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Heading.d.ts","sourceRoot":"","sources":["../../src/Heading/Heading.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAyB,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAE7D,OAAO,KAAK,EACV,SAAS,EACT,WAAW,EACX,WAAW,EACX,SAAS,EACT,QAAQ,EACR,UAAU,EACX,MAAM,gBAAgB,CAAC;AAkBxB,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,UAAU,CAAC;AAG7C,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAE5C,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,SAAS,CAAC;AAM5C;;GAEG;AACH,MAAM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;IACH,OAAO,CAAC,EAAE,WAAW,CAAC;IAEtB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;;;;OAMG;IACH,kBAAkB,CAAC,EAAE,OAAO,GAAG,cAAc,CAAC;IAE9C;;;OAGG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IAEtB;;OAEG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAC;IAEpB;;;;OAIG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC;IAEtB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;CACrB;AAWD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,OAAO,CAAC,EACtB,KAAK,EACL,IAAI,EACJ,MAAM,EACN,kBAAkB,EAClB,KAAiB,EACjB,OAAiB,EACjB,QAAY,EACZ,kBAAyB,EACzB,SAAS,EACT,QAAQ,EACR,OAAiB,EACjB,UAAkB,EAClB,gBAAwB,EACxB,MAAM,EACN,SAAS,EACT,KAAK,EACL,QAAQ,EACR,GAAG,EACH,GAAG,KAAK,EACT,EAAE,YAAY,+BAsGd;yBA1He,OAAO"}
|
package/dist/Heading/Heading.js
CHANGED
|
@@ -105,9 +105,11 @@ export function Heading({
|
|
|
105
105
|
// the closed built-in StyleX maps with an unknown name.
|
|
106
106
|
const builtinType = type && isBuiltinHeadingType(type) ? type : undefined;
|
|
107
107
|
|
|
108
|
-
// Truncation detection
|
|
108
|
+
// Truncation detection. Only the tooltip reads the measured overflow, so
|
|
109
|
+
// with the tooltip off the text is clipped by CSS alone and nothing is
|
|
110
|
+
// measured or observed.
|
|
109
111
|
const truncation = useTruncation({
|
|
110
|
-
maxLines
|
|
112
|
+
maxLines: hasTruncateTooltip === false ? 0 : maxLines
|
|
111
113
|
});
|
|
112
114
|
|
|
113
115
|
// Tooltip for truncated text
|
package/dist/Item/Item.d.ts
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
*/
|
|
23
23
|
import { type ReactNode } from 'react';
|
|
24
24
|
import type { BaseProps } from '../BaseProps';
|
|
25
|
-
export type ItemAlign = 'center' | 'start';
|
|
25
|
+
export type ItemAlign = 'center' | 'start' | 'first-line';
|
|
26
26
|
export type ItemDensity = 'compact' | 'balanced' | 'spacious';
|
|
27
27
|
/**
|
|
28
28
|
* How a swipe action looks: ordinary, the one you mean, the dangerous one.
|
|
@@ -111,7 +111,11 @@ export interface ItemProps extends BaseProps<HTMLElement> {
|
|
|
111
111
|
*/
|
|
112
112
|
endContent?: ReactNode;
|
|
113
113
|
/**
|
|
114
|
-
* Vertical alignment of the start/end content slots.
|
|
114
|
+
* Vertical alignment of the start/end content slots. `center` centers each
|
|
115
|
+
* slot on the whole text block; `start` lines up slot tops with the text's
|
|
116
|
+
* top; `first-line` centers each slot on the label's first line, so a small
|
|
117
|
+
* mark (a status dot, a radio, a timestamp) stays level with the first line
|
|
118
|
+
* of a wrapped label. A slot taller than that line moves the text down.
|
|
115
119
|
* @default 'center'
|
|
116
120
|
*/
|
|
117
121
|
align?: ItemAlign;
|
package/dist/Item/Item.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Item.d.ts","sourceRoot":"","sources":["../../src/Item/Item.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAML,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAUf,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAyB5C,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Item.d.ts","sourceRoot":"","sources":["../../src/Item/Item.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAML,KAAK,SAAS,EACf,MAAM,OA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AAY,EACZ,KAAK,EACL,WAAW,EACX,UAAU,EACV,KAAgB,EAChB,OAAoB,EACpB,UAAU,EACV,gBAAgB,EAChB,MAAkB,EAClB,OAAO,EACP,cAAc,EACd,IAAI,EACJ,MAAM,EAAE,eAAe,EACvB,GAAG,EAAE,YAAY,EACjB,aAAqB,EACrB,UAAkB,EAClB,UAAkB,EAClB,YAAY,EACZ,aAAwB,EACxB,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,EACH,IAAI,EACJ,GAAG,SAAS,EACb,EAAE,SAAS,+BA8UX;yBA1We,IAAI"}
|
package/dist/Item/Item.js
CHANGED
|
@@ -108,6 +108,10 @@ const styles = {
|
|
|
108
108
|
kGNEyG: "x1cy8zhl",
|
|
109
109
|
$$css: true
|
|
110
110
|
},
|
|
111
|
+
alignFirstLine: {
|
|
112
|
+
kGNEyG: "x1pha0wt",
|
|
113
|
+
$$css: true
|
|
114
|
+
},
|
|
111
115
|
interactive: {
|
|
112
116
|
kkrTdU: "x1ypdohk x16khyan",
|
|
113
117
|
k1ekBW: "x15406qy",
|
|
@@ -359,8 +363,13 @@ export function Item({
|
|
|
359
363
|
const innerContent = /*#__PURE__*/_jsxs(_Fragment, {
|
|
360
364
|
children: [marker, startContent != null && /*#__PURE__*/_jsx("span", {
|
|
361
365
|
...{
|
|
362
|
-
|
|
363
|
-
|
|
366
|
+
0: {
|
|
367
|
+
className: "x3psx0u x78zum5"
|
|
368
|
+
},
|
|
369
|
+
1: {
|
|
370
|
+
className: "x3psx0u x78zum5 x6s0dn4 x4jt1l0 xk9ib7f x1xb3ux x1899uy6 x1xcinxp"
|
|
371
|
+
}
|
|
372
|
+
}[!!(align === 'first-line') << 0],
|
|
364
373
|
children: startContent
|
|
365
374
|
}), hasParentRole || isDelegate ?
|
|
366
375
|
/*#__PURE__*/
|
|
@@ -444,10 +453,16 @@ export function Item({
|
|
|
444
453
|
0: {
|
|
445
454
|
className: "x3psx0u x78zum5 xvc5jky"
|
|
446
455
|
},
|
|
456
|
+
2: {
|
|
457
|
+
className: "x3psx0u x78zum5 xvc5jky x6s0dn4 x4jt1l0 xk9ib7f x1xb3ux x1899uy6 x1xcinxp"
|
|
458
|
+
},
|
|
447
459
|
1: {
|
|
448
460
|
className: "x3psx0u x78zum5 xvc5jky xbyyjgo"
|
|
461
|
+
},
|
|
462
|
+
3: {
|
|
463
|
+
className: "x3psx0u x78zum5 xvc5jky x6s0dn4 x4jt1l0 xk9ib7f x1xb3ux x1899uy6 x1xcinxp xbyyjgo"
|
|
449
464
|
}
|
|
450
|
-
}[!!isDisabled << 0],
|
|
465
|
+
}[!!(align === 'first-line') << 1 | !!isDisabled << 0],
|
|
451
466
|
children: endContent
|
|
452
467
|
})]
|
|
453
468
|
});
|
|
@@ -494,7 +509,7 @@ export function Item({
|
|
|
494
509
|
...mergeProps(themeProps('item', {
|
|
495
510
|
density,
|
|
496
511
|
align
|
|
497
|
-
}), focusOutlineProps.focusWithin(styles.root, densityStyles[density], align === 'start' && styles.alignStart, isInteractive && styles.interactive, isInteractive && interactionOverlayStyles.backgroundColor, isLinkRoot && styles.linkRoot, isHighlighted && styles.highlighted, isSelected && styles.selected, isDisabled && !hasParentRole && styles.disabled, hasSwipe && styles.swipeRoot, xstyle), className, style),
|
|
512
|
+
}), focusOutlineProps.focusWithin(styles.root, densityStyles[density], align === 'start' && styles.alignStart, align === 'first-line' && styles.alignFirstLine, isInteractive && styles.interactive, isInteractive && interactionOverlayStyles.backgroundColor, isLinkRoot && styles.linkRoot, isHighlighted && styles.highlighted, isSelected && styles.selected, isDisabled && !hasParentRole && styles.disabled, hasSwipe && styles.swipeRoot, xstyle), className, style),
|
|
498
513
|
role: role,
|
|
499
514
|
onClick: rootOnClick,
|
|
500
515
|
children: [/*#__PURE__*/_jsx(ItemDescriptionContext, {
|
package/dist/List/List.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file List.tsx
|
|
3
|
-
* @input Uses React, ReactNode, StyleXStyles, theme tokens,
|
|
4
|
-
* with
|
|
5
|
-
* @output Exports List component, ListProps, ListDensity, ListStyle
|
|
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
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
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 `
|
|
81
|
-
*
|
|
82
|
-
*
|
|
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
|
}
|
package/dist/List/List.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"List.d.ts","sourceRoot":"","sources":["../../src/List/List.tsx"],"names":[],"mappings":"AAIA
|
|
1
|
+
{"version":3,"file":"List.d.ts","sourceRoot":"","sources":["../../src/List/List.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;GAcG;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,QAAQ,EACb,KAAK,eAAe,EACrB,M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ens,
|
|
8
|
-
* with
|
|
9
|
-
* @output Exports List component, ListProps, ListDensity, ListStyle
|
|
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 `
|
|
72
|
-
*
|
|
73
|
-
*
|
|
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
|
-
|
|
109
|
-
|
|
110
|
-
}), [density, hasDividers,
|
|
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,
|
|
5
|
-
* 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,
|
|
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,QAAQ,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AAE/D;;;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,IAAI,EAAE,QAAQ,CAAC;IACf,SAAS,EAAE,eAAe,CAAC;IAC3B;;;OAGG;IACH,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB;;;;OAIG;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"}
|
package/dist/List/ListContext.js
CHANGED
|
@@ -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,
|
|
9
|
-
* 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).
|
package/dist/List/ListItem.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file ListItem.tsx
|
|
3
|
-
* @input Uses React, ReactNode, StyleXStyles, theme tokens, List edge
|
|
4
|
-
* CheckboxInput, and the marker or task checkbox a
|
|
5
|
-
* (Markdown's nested lists and the task items of mixed
|
|
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
|
*
|
|
@@ -18,10 +19,17 @@
|
|
|
18
19
|
*/
|
|
19
20
|
import { type ReactNode } from 'react';
|
|
20
21
|
import type { BaseProps } from '../BaseProps';
|
|
21
|
-
import type { ItemSwipeActions, ItemSwipeBehavior } from '../Item';
|
|
22
|
+
import type { ItemAlign, ItemSwipeActions, ItemSwipeBehavior } from '../Item';
|
|
22
23
|
export interface ListItemProps extends BaseProps<HTMLLIElement> {
|
|
23
24
|
/** Ref forwarded to the root element */
|
|
24
25
|
ref?: React.Ref<HTMLLIElement>;
|
|
26
|
+
/**
|
|
27
|
+
* Vertical alignment of the start and end content against the label,
|
|
28
|
+
* forwarded to Item. Use `first-line` to keep the start and end content level with the
|
|
29
|
+
* first line of a wrapped label.
|
|
30
|
+
* @default 'center'
|
|
31
|
+
*/
|
|
32
|
+
align?: ItemAlign;
|
|
25
33
|
/**
|
|
26
34
|
* Primary text label for the item.
|
|
27
35
|
*
|
|
@@ -113,7 +121,7 @@ export interface ListItemProps extends BaseProps<HTMLLIElement> {
|
|
|
113
121
|
* <ListItem label="Docs" href="/docs" target="_blank" rel="noreferrer" />
|
|
114
122
|
* ```
|
|
115
123
|
*/
|
|
116
|
-
export declare function ListItem({ label, description, startContent, endContent, onClick, interactiveRef, href, target, rel, isDisabled, isSelected, xstyle, className, style, ref, ...restProps }: ListItemProps): import("react").JSX.Element;
|
|
124
|
+
export declare function ListItem({ label, description, startContent, endContent, onClick, interactiveRef, href, target, rel, isDisabled, isSelected, align, xstyle, className, style, ref, ...restProps }: ListItemProps): import("react").JSX.Element;
|
|
117
125
|
export declare namespace ListItem {
|
|
118
126
|
var displayName: string;
|
|
119
127
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListItem.d.ts","sourceRoot":"","sources":["../../src/List/ListItem.tsx"],"names":[],"mappings":"AAIA
|
|
1
|
+
{"version":3,"file":"ListItem.d.ts","sourceRoot":"","sources":["../../src/List/ListItem.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAM,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAS1C,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,KAA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file ListItem.tsx
|
|
7
|
-
* @input Uses React, ReactNode, StyleXStyles, theme tokens, List edge
|
|
8
|
-
* CheckboxInput, and the marker or task checkbox a
|
|
9
|
-
* (Markdown's nested lists and the task items of mixed
|
|
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
|
-
|
|
47
|
-
|
|
48
|
-
|
|
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: {
|
|
@@ -155,6 +166,7 @@ export function ListItem({
|
|
|
155
166
|
rel,
|
|
156
167
|
isDisabled = false,
|
|
157
168
|
isSelected = false,
|
|
169
|
+
align,
|
|
158
170
|
xstyle,
|
|
159
171
|
className,
|
|
160
172
|
style,
|
|
@@ -164,8 +176,8 @@ export function ListItem({
|
|
|
164
176
|
const ctx = use(ListContext);
|
|
165
177
|
const density = ctx?.density ?? 'balanced';
|
|
166
178
|
const hasDividers = ctx?.hasDividers ?? false;
|
|
179
|
+
const edge = ctx?.edge ?? 'padded';
|
|
167
180
|
const listStyle = ctx?.listStyle ?? 'none';
|
|
168
|
-
const edgeCompensation = ctx?.edgeCompensation;
|
|
169
181
|
const hasMarkers = listStyle !== 'none';
|
|
170
182
|
// ListMarkerScope may name another marker for this item.
|
|
171
183
|
const markerKind = listStyle === 'none' ? null : ctx?.marker ?? listStyle;
|
|
@@ -208,8 +220,9 @@ export function ListItem({
|
|
|
208
220
|
rel: rel,
|
|
209
221
|
isDisabled: isDisabled,
|
|
210
222
|
isSelected: isSelected,
|
|
223
|
+
align: align,
|
|
211
224
|
density: density,
|
|
212
|
-
xstyle: [hasMarkers && styles.withCounter, hasDividers && styles.withDivider, hasDividers && embeddedStyles.noRadius,
|
|
225
|
+
xstyle: [hasMarkers && styles.withCounter, hasDividers && styles.withDivider, hasDividers && embeddedStyles.noRadius, edge === 'flush' && styles.edgeFlush, edge === 'outset' && styles.edgeOutset, edge === 'bleed' && styles.edgeBleed, xstyle],
|
|
213
226
|
...mergeProps(themeProps('list-item'), {
|
|
214
227
|
className,
|
|
215
228
|
style
|