Skip to content

Commit 7c66d73

Browse files
committed
feat(core): ListInput moves to Core
ListInput, its types, and its four blocks move from Lab to Core: @astryxdesign/core/ListInput, the package root, and Core's component blocks. The Lab entry re-exports the Core component and its types. In Core, ListInput takes Field's shared styling rule and the component translator, and imports its modules by relative path. Its stories move to Core/ListInput, and its draft record joins the component records.
1 parent a04fc85 commit 7c66d73

44 files changed

Lines changed: 599 additions & 352 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@astryxdesign/cli': patch
3+
---
4+
5+
[docs] `astryx template` lists ListInput's blocks among Core's component blocks: the "Tag options" showcase and the "Mailing list", "Budget allocation", and "Family member declaration" examples, which import ListInput from `@astryxdesign/core/ListInput`.
6+
7+
@ernestt
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@astryxdesign/core': patch
3+
---
4+
5+
[feat] Promote `ListInput` to Core, imported from `@astryxdesign/core/ListInput` or the package root, with its types `ListInputProps`, `ListInputChange`, `ListInputColumn`, `ListInputRenderContext`, and `ListInputValueContext`. ListInput edits a short, ordered collection of simple records: each record renders one Astryx input per column, Add appends a record from `createItem`, Remove deletes one, and `onChange` reports each change with an `add`, `update`, or `remove` descriptor. An add or a removal is announced, and moves focus, once the controlled value applies it. Pass `reorderable={createReorderable({onReorder})}` to give each record a reorder handle; a move goes to `onReorder`, never to `onChange`. As every component that composes Field does, it takes no root `xstyle`, `className`, or `style`: `containerXstyle`, `containerClassName`, and `containerStyle` style the Field box, and `controlXstyle`, `controlClassName`, and `controlStyle` style the `role="group"` element that holds the records.
6+
7+
@ernestt

‎.github/scripts/a11y-pr-contracts.test.mjs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1274,7 +1274,7 @@ describe('repository specs', () => {
12741274
title: '',
12751275
}).length > 0;
12761276
for (const changed of [
1277-
'packages/lab/src/ListInput/ListInput.tsx',
1277+
'packages/core/src/ListInput/ListInput.tsx',
12781278
'packages/lab/src/TransferList/TransferList.tsx',
12791279
'packages/core/src/List/listReorderEngine.tsx',
12801280
'packages/core/src/internal/reorder.ts',

‎apps/sandbox/scripts/next-export-routes.json‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,10 @@
425425
"/templates/LinksWithTooltips/",
426426
"/templates/ListBasicList/",
427427
"/templates/ListBulletedFeatures/",
428+
"/templates/ListInputBudgetAllocation/",
429+
"/templates/ListInputFamilyMembers/",
430+
"/templates/ListInputMailingList/",
431+
"/templates/ListInputShowcase/",
428432
"/templates/ListItemBasicItem/",
429433
"/templates/ListItemShowcase/",
430434
"/templates/ListItemWithMedia/",

‎apps/sandbox/src/app/(sandbox)/pages/motion-lab/previewPlan.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1182,7 +1182,7 @@ export const PREVIEW_PLAN: ReadonlyArray<PreviewRow> = [
11821182
},
11831183
{
11841184
id: 'listinput',
1185-
component: 'ListInput (lab)',
1185+
component: 'ListInput',
11861186
group: 'Content & data',
11871187
verdict: 'GOOD',
11881188
motionCost: 'idle',

‎apps/storybook/rtl-audit/verified-not-applicable.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@
220220
"reason": "Toolbar start, center, and end slots use CSS flex/grid flow, margin-inline-start, and logical container padding, so visual placement follows document direction without component branching. Its horizontal ArrowLeft/ArrowRight handling means previous/next control in the ARIA toolbar pattern rather than locale-specific content direction; owned glyphs are caller content."
221221
},
222222
{
223-
"component": "lab/ListInput",
223+
"component": "core/ListInput",
224224
"reason": "ListInput is a vertical record editor. Keyboard reordering uses ArrowUp/ArrowDown/Home/End, pointer dragging follows the physical pointer while preserving source direction in the preview, and add/remove motion is block-axis. Its grid and controls follow CSS direction with no component-owned horizontal semantic to mirror."
225225
},
226226
{

‎apps/storybook/stories/ListInput.stories.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import {TextInput} from '@astryxdesign/core/TextInput';
3030
import {Theme} from '@astryxdesign/core';
3131
import {colorVars} from '@astryxdesign/core/theme/tokens.stylex';
3232
import {neutralTheme} from '@astryxdesign/theme-neutral';
33-
import {ListInput, type ListInputColumn} from '@astryxdesign/lab';
33+
import {ListInput, type ListInputColumn} from '@astryxdesign/core/ListInput';
3434
const storyStyles = stylex.create({
3535
canvas: {
3636
width: 680,
@@ -63,7 +63,7 @@ const storyStyles = stylex.create({
6363
});
6464

6565
const meta: Meta<typeof ListInput> = {
66-
title: 'Lab/ListInput',
66+
title: 'Core/ListInput',
6767
component: ListInput,
6868
tags: ['autodocs'],
6969
parameters: {

‎apps/storybook/stories/ListInputA11y.stories.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {useMemo, useState} from 'react';
1414
import type {Meta, StoryObj} from '@storybook/react';
1515
import {createReorderable} from '@astryxdesign/core';
1616
import {TextInput} from '@astryxdesign/core/TextInput';
17-
import {ListInput, type ListInputColumn} from '@astryxdesign/lab';
17+
import {ListInput, type ListInputColumn} from '@astryxdesign/core/ListInput';
1818

1919
const meta: Meta = {
2020
title: 'A11y/ListInput',

‎docs/design/ordered-collection-reordering.md‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,11 @@ deciding_specs: [spec:AST-103]
2424

2525
```json
2626
{
27-
"paths": ["packages/lab/src/ListInput/**", "packages/lab/src/TransferList/**"]
27+
"paths": [
28+
"packages/core/src/ListInput/**",
29+
"packages/lab/src/ListInput/**",
30+
"packages/lab/src/TransferList/**"
31+
]
2832
}
2933
```
3034

0 commit comments

Comments
 (0)