Skip to content

Commit d5ec70f

Browse files
committed
Merge b30de7f (#8195) as a dependency
2 parents 5955618 + b30de7f commit d5ec70f

102 files changed

Lines changed: 5415 additions & 364 deletions

File tree

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/core': patch
3+
---
4+
5+
[fix] CommandPaletteEmpty wraps a long unbroken word, such as a file path or URL in an empty-search message, inside the palette instead of spilling it past both edges where its start and end could not be read.
6+
7+
@cixzhang
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+
[fix] ComplexSelector: a caller's `aria-label` or `aria-labelledby` now names the built-in trigger, replacing the field label, as it already did for a `renderTrigger` control. Before, the built-in trigger always took its name from the label, so a name passed to the selector was never announced.
6+
7+
@cixzhang

‎.changeset/dropdownmenu-touch-selection.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
'@astryxdesign/core': patch
33
---
44

5-
[feature] Under a finger, on every touch device, DropdownMenu tracks a finger that lands in its open menu as the list of an iOS menu does: the row under a resting finger lights after UIKit's content-touch delay (150 ms), a tap picks at the lift, and a quick drag scrolls a menu that scrolls and slides the highlight in one that fits. A mouse, and `presentation="popover"`, keep the pointer model. It runs on the gesture system and the shared action-group tracker; `useMenuPress` itself is unchanged.
5+
[feature] Under a finger, on every touch device, DropdownMenu tracks a finger that lands in its open menu as the list of an iOS menu does: the row under a resting finger lights at once in a menu that fits and, in a menu that scrolls, after UIKit's content-touch delay (150 ms), a tap picks at the lift, and a quick drag scrolls a menu that scrolls and slides the highlight in one that fits. A mouse, and `presentation="popover"`, keep the pointer model. It runs on the gesture system and the shared action-group tracker; `useMenuPress` itself is unchanged.
66

77
@vjeux

‎.changeset/gesture-host-fixes.md‎

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+
[chore] Internal: gesture host fixes from review. A page scroll under a still finger keeps the press and its click; watchers and touches nothing can claim get passive listeners only; a claimed pen holds only its own stylus touches; an element's own `touch-action` is never widened; slotted content scrolls with its shadow-tree scroller. Not exported from the package entry point.
6+
7+
@vjeux
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+
[perf] useLayer: placing a context layer no longer re-renders its host. The hook still resolves where the layer goes from its inert marker once the marker is in the DOM, but it now hands that mount to an internal slot that renders the marker and the layer, so the render that places the layer is the slot's alone. A Tooltip, Selector or ComplexSelector that mounts closed renders once; a Popover or DropdownMenu keeps only the renders its own state costs. The host still renders when a resolved mount is replaced by a render call that moved to another host. The DOM, server markup, hydration and `lazyMount` are unchanged.
6+
7+
@vjeux

‎.github/a11y-audit-axe.json‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,16 @@
1111
"ChatMessageList": {"evidence": null},
1212
"ChatMessageMetadata": {"evidence": null},
1313
"ChatTokenizedText": {
14-
"env": {"ASTRYX_AUDIT_BASELINE_HEAD": "a7c6c7ecdf6b422df331124e8f6fc6d33cf1bd63"}
14+
"env": {
15+
"ASTRYX_AUDIT_BASELINE_HEAD": "a7c6c7ecdf6b422df331124e8f6fc6d33cf1bd63"
16+
}
17+
},
18+
"CommandPaletteEmpty": {
19+
"components": ["CommandPaletteEmpty", "CommandPalette"],
20+
"stories": [
21+
"core-commandpaletteempty--content-matrix",
22+
"core-commandpalette--audit-matrix"
23+
]
1524
},
1625
"ContextMenuItem": {"readySelector": "[role=\"menu\"]", "evidence": null},
1726
"DateInput": {

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,15 @@
350350
"packages/core/src/CommandPalette/index.ts": "sha256:ba38845bbde6d73172df2c0791ca513c9f2b7baab17440e066e783ff6cfc7558"
351351
}
352352
},
353+
{
354+
"component": "core/CommandPaletteEmpty",
355+
"reason": "CommandPaletteEmpty owns one message container that centers caller content on both axes with symmetric logical inline padding, block padding, and centered text, and wraps an unbroken token inside the host. It renders no directional glyph, physical inline positioning, reordered controls, horizontal scrolling or dragging, side-placed overlay, or horizontal keyboard behavior; caller text follows the document direction. The content fixture and the CommandPalette audit matrix exercise translated, long, standalone, and in-palette content in RTL without adding a component-owned RTL dimension.",
356+
"evidence": {
357+
"apps/storybook/stories/CommandPaletteEmpty.stories.tsx": "sha256:35e5e5da27d4440fec7f45d62c9db503210f37c042afd01fd17365ca59c6b2e7",
358+
"packages/core/src/CommandPalette/CommandPaletteEmpty.tsx": "sha256:721c495b144ca2e0ccc1f869a44d8be1350d880d17f9a08eb025e7941421bc0e",
359+
"packages/core/src/CommandPalette/index.ts": "sha256:ba38845bbde6d73172df2c0791ca513c9f2b7baab17440e066e783ff6cfc7558"
360+
}
361+
},
353362
{
354363
"component": "core/CommandPaletteList",
355364
"reason": "CommandPaletteList owns one vertically stacked results container that scrolls on the block axis, with symmetric padding and block-axis gaps. It renders no directional glyph, physical inline positioning, reordered controls, horizontal scrolling or dragging, side-placed overlay, or horizontal keyboard behavior; item and group content follow normal document direction, and CommandPalette owns arrow-key navigation. The dedicated fixtures exercise the standalone listbox and the scrolling palette composition without adding a component-owned RTL dimension.",
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
// Copyright (c) Meta Platforms, Inc. and affiliates.
2+
3+
/**
4+
* @file CommandPaletteEmpty.stories.tsx
5+
* @input Uses CommandPalette, CommandPaletteEmpty, Link, InternationalizationProvider
6+
* @output Storybook fixture for empty-state content the CommandPalette stories do not reach
7+
* @position Component-owned fixture; the CommandPalette audit matrix covers the
8+
* default built-in empty branch, this covers expanded, long, and standalone content
9+
*/
10+
11+
import {useMemo} from 'react';
12+
import type {Meta, StoryObj} from '@storybook/react';
13+
import {
14+
CommandPalette,
15+
CommandPaletteEmpty,
16+
} from '@astryxdesign/core/CommandPalette';
17+
import {Link} from '@astryxdesign/core/Link';
18+
import {InternationalizationProvider} from '@astryxdesign/core/i18n';
19+
import {createStaticSource} from '@astryxdesign/core/Typeahead';
20+
21+
const meta: Meta<typeof CommandPaletteEmpty> = {
22+
title: 'Core/CommandPaletteEmpty',
23+
component: CommandPaletteEmpty,
24+
tags: ['autodocs'],
25+
};
26+
27+
export default meta;
28+
type Story = StoryObj<typeof meta>;
29+
30+
const panelStyle = {flex: '1 1 280px', minWidth: 0} as const;
31+
const headingStyle = {
32+
marginBlock: '0 8px',
33+
font: 'inherit',
34+
fontWeight: 600,
35+
} as const;
36+
37+
/**
38+
* Empty content the built-in branch must hold without breaking layout: catalog
39+
* text expanded by translation, a long unbroken path echoed into the message,
40+
* and the standalone composition with caller-provided rich content.
41+
*/
42+
export const ContentMatrix: Story = {
43+
render: function Render() {
44+
const emptySource = useMemo(() => createStaticSource([]), []);
45+
return (
46+
<div
47+
style={{
48+
display: 'flex',
49+
flexWrap: 'wrap',
50+
alignItems: 'flex-start',
51+
gap: 16,
52+
width: '100%',
53+
padding: 16,
54+
boxSizing: 'border-box',
55+
}}>
56+
<section style={panelStyle}>
57+
<h2 style={headingStyle}>Translated built-in text</h2>
58+
<InternationalizationProvider
59+
locale="fr"
60+
overrides={{
61+
fr: {
62+
'@astryx.commandPalette.emptyBootstrap':
63+
'Commencez à saisir pour rechercher parmi les commandes disponibles',
64+
'@astryx.commandPalette.emptySearch':
65+
'Aucune commande ne correspond à votre recherche',
66+
},
67+
}}>
68+
<CommandPalette
69+
isOpen
70+
isInline
71+
role="region"
72+
label="Translated empty command palette"
73+
onOpenChange={() => {}}
74+
searchSource={emptySource}
75+
width="100%"
76+
maxHeight={320}
77+
/>
78+
</InternationalizationProvider>
79+
</section>
80+
<section style={panelStyle}>
81+
<h2 style={headingStyle}>Long unbroken text</h2>
82+
<CommandPalette
83+
isOpen
84+
isInline
85+
role="region"
86+
label="Long empty command palette"
87+
onOpenChange={() => {}}
88+
searchSource={emptySource}
89+
emptyBootstrapText="No files in /workspace/design-system/packages/core/src/CommandPalette/__fixtures__/empty-results/"
90+
emptySearchText="No files match /workspace/design-system/packages/core/src/CommandPalette/__fixtures__/empty-results/"
91+
width="100%"
92+
maxHeight={320}
93+
/>
94+
</section>
95+
<section style={panelStyle}>
96+
<h2 style={headingStyle}>Standalone rich content</h2>
97+
<CommandPaletteEmpty>
98+
<span>
99+
No saved searches yet.{' '}
100+
<Link href="#create-saved-search">Create a saved search</Link>
101+
</span>
102+
</CommandPaletteEmpty>
103+
</section>
104+
</div>
105+
);
106+
},
107+
};

‎docs/families/input-fields.md‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,6 @@ DEC-6 does not require unrelated components to add a new floor.
362362
| Component | Root styling reaches | Base props reach | Primary semantic control | Root styling migrates to |
363363
| ---------------------------------- | -------------------- | -------------------------------------- | --------------------------- | ------------------------ |
364364
| TextArea | control box | native textarea | native textarea | `control*` |
365-
| NumberInput | control box | native input | native input | `control*` |
366365
| FileInput | control box | native file input | native file input | `control*` |
367366
| DateInput (pointer, native, touch) | control box | control box | date input | `control*` |
368367
| DateRangeInput | control box | control box; `ref` on a trigger button | range trigger | `control*` |

0 commit comments

Comments
 (0)