@astryxdesign/lab 0.7.5-canary.dcdb356 → 0.7.5-canary.e4b225e
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/README.md +2 -2
- package/astryx.integration.mjs +1 -1
- package/dist/Comments/icons.d.ts.map +1 -1
- package/dist/Comments/icons.js +9 -2
- package/dist/InfoTip/InfoTip.d.ts +1 -1
- package/dist/InfoTip/InfoTip.js +1 -1
- package/dist/ListInput/ListInput.d.ts +1 -1
- package/dist/ListInput/ListInput.js +1 -1
- package/dist/MobilePowerSearch/MobilePowerSearch.d.ts +30 -27
- package/dist/MobilePowerSearch/MobilePowerSearch.d.ts.map +1 -1
- package/dist/MobilePowerSearch/MobilePowerSearch.js +535 -347
- package/dist/MobilePowerSearch/MobilePowerSearchValueEditor.d.ts +13 -18
- package/dist/MobilePowerSearch/MobilePowerSearchValueEditor.d.ts.map +1 -1
- package/dist/MobilePowerSearch/MobilePowerSearchValueEditor.js +248 -124
- package/dist/MobileTokenizer/MobileTokenizer.d.ts.map +1 -1
- package/dist/MobileTokenizer/MobileTokenizer.js +64 -16
- package/dist/Tour/Tour.d.ts +1 -1
- package/dist/Tour/Tour.js +1 -1
- package/dist/Tour/TourStep.d.ts +1 -1
- package/dist/Tour/TourStep.js +1 -1
- package/dist/index.js +3 -3
- package/dist/lab.css +5 -0
- package/package.json +7 -7
- package/src/Comments/icons.test.tsx +76 -0
- package/src/Comments/icons.tsx +9 -2
- package/src/InfoTip/InfoTip.tsx +1 -1
- package/src/ListInput/ListInput.tsx +1 -1
- package/src/MobilePowerSearch/MobilePowerSearch.doc.mjs +6 -6
- package/src/MobilePowerSearch/MobilePowerSearch.test.tsx +403 -308
- package/src/MobilePowerSearch/MobilePowerSearch.tsx +639 -391
- package/src/MobilePowerSearch/MobilePowerSearchValueEditor.tsx +338 -131
- package/src/MobileTokenizer/MobileTokenizer.doc.mjs +1 -1
- package/src/MobileTokenizer/MobileTokenizer.test.tsx +91 -2
- package/src/MobileTokenizer/MobileTokenizer.tsx +70 -21
- package/src/Tour/Tour.doc.mjs +1 -1
- package/src/Tour/Tour.tsx +1 -1
- package/src/Tour/TourStep.tsx +1 -1
- package/src/index.ts +3 -3
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@ Components in lab:
|
|
|
12
12
|
- Compose with `@astryxdesign/core` components (use the theme, follow naming conventions)
|
|
13
13
|
- Graduate to `@astryxdesign/core` after thorough engineering review
|
|
14
14
|
|
|
15
|
-
See the **[Component Lifecycle](https://github.com/
|
|
15
|
+
See the **[Component Lifecycle](https://github.com/meta/astryx/wiki/Component-Lifecycle)** wiki for how a component moves from lab → core (and the promotion gates), and the **[Component Hardening Protocol](https://github.com/meta/astryx/wiki/Component-Hardening-Protocol)** for the bar a component must clear to graduate.
|
|
16
16
|
|
|
17
17
|
## What's here vs what's in core
|
|
18
18
|
|
|
@@ -22,7 +22,7 @@ See the **[Component Lifecycle](https://github.com/facebook/astryx/wiki/Componen
|
|
|
22
22
|
|
|
23
23
|
## Promotion gate: accessibility
|
|
24
24
|
|
|
25
|
-
The [Accessibility Checklist](https://github.com/
|
|
25
|
+
The [Accessibility Checklist](https://github.com/meta/astryx/wiki/Accessibility-Checklist) is a hard requirement for graduating to core — every item, verified in the promotion PR, alongside the hardening bar linked above.
|
|
26
26
|
|
|
27
27
|
Lab components get the same scan coverage as core (the `pr-a11y` axe audit and the weekly full scan run against lab too), but a11y findings on a lab component do not block lab merges — they block **promotion**. Iterate freely in lab; clear the checklist to graduate.
|
|
28
28
|
|
package/astryx.integration.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../../src/Comments/icons.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAAwB,KAAK,SAAS,EAAC,MAAM,yBAAyB,CAAC;AAG9E,kEAAkE;AAClE,eAAO,MAAM,iBAAiB;;;;;;;;;;CAUpB,CAAC;AAEX,MAAM,MAAM,eAAe,GAAG,MAAM,OAAO,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../../src/Comments/icons.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAAwB,KAAK,SAAS,EAAC,MAAM,yBAAyB,CAAC;AAG9E,kEAAkE;AAClE,eAAO,MAAM,iBAAiB;;;;;;;;;;CAUpB,CAAC;AAEX,MAAM,MAAM,eAAe,GAAG,MAAM,OAAO,iBAAiB,CAAC;AAkF7D;;;GAGG;AACH,wBAAgB,WAAW,CAAC,EAC1B,IAAI,EACJ,KAAmB,EACnB,IAAW,GACZ,EAAE;IACD,IAAI,EAAE,eAAe,CAAC;IACtB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,IAAI,CAAC,EAAE,KAAK,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;CACnC,+BASA"}
|
package/dist/Comments/icons.js
CHANGED
|
@@ -16,7 +16,7 @@ import { getExtendedIcon, Icon } from '@astryxdesign/core/Icon';
|
|
|
16
16
|
import { useThemeName } from '@astryxdesign/core/theme';
|
|
17
17
|
|
|
18
18
|
/** Stable icon-registry keys for the Comments family's glyphs. */
|
|
19
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
19
|
+
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
20
20
|
export const COMMENT_ICON_KEYS = {
|
|
21
21
|
addReaction: 'comment:addReaction',
|
|
22
22
|
reply: 'comment:reply',
|
|
@@ -72,6 +72,13 @@ const FALLBACK_GLYPHS = {
|
|
|
72
72
|
event: glyph(['M12 3v5.5M12 15.5V21', 'M12 15.5a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7z'])
|
|
73
73
|
};
|
|
74
74
|
|
|
75
|
+
/**
|
|
76
|
+
* The fallback `getExtendedIcon` returns only when no theme, registered, or
|
|
77
|
+
* built-in entry answers a key. A function entry that returns `null` still
|
|
78
|
+
* answers it: its result is final, so the glyph draws nothing.
|
|
79
|
+
*/
|
|
80
|
+
const NO_ENTRY = /*#__PURE__*/_jsx(_Fragment, {});
|
|
81
|
+
|
|
75
82
|
/**
|
|
76
83
|
* A comment glyph at the icon slot's size: the active theme's icon for its
|
|
77
84
|
* `comment:*` key when one is registered, else the bundled default.
|
|
@@ -83,7 +90,7 @@ export function CommentIcon({
|
|
|
83
90
|
}) {
|
|
84
91
|
const themeName = useThemeName();
|
|
85
92
|
const key = COMMENT_ICON_KEYS[name];
|
|
86
|
-
const hasOverride = getExtendedIcon(key,
|
|
93
|
+
const hasOverride = getExtendedIcon(key, NO_ENTRY, themeName) !== NO_ENTRY;
|
|
87
94
|
const fallback = name in REGISTRY_FALLBACKS ? REGISTRY_FALLBACKS[name] : FALLBACK_GLYPHS[name];
|
|
88
95
|
return /*#__PURE__*/_jsx(Icon, {
|
|
89
96
|
icon: hasOverride ? key : fallback,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @file InfoTip.tsx
|
|
3
3
|
* @input Uses React, stylex, Tooltip + Icon from @astryxdesign/core, color/spacing/radius/duration/ease tokens
|
|
4
4
|
* @output Exports InfoTip component, InfoTipProps, InfoTipSize types
|
|
5
|
-
* @position Lab experiment (RFC
|
|
5
|
+
* @position Lab experiment (RFC meta/astryx#3349); core implementation consumed by index.ts
|
|
6
6
|
*
|
|
7
7
|
* SYNC: When modified, update these files to stay in sync:
|
|
8
8
|
* - /packages/lab/src/InfoTip/InfoTip.doc.mjs (props table, features)
|
package/dist/InfoTip/InfoTip.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* @file InfoTip.tsx
|
|
7
7
|
* @input Uses React, stylex, Tooltip + Icon from @astryxdesign/core, color/spacing/radius/duration/ease tokens
|
|
8
8
|
* @output Exports InfoTip component, InfoTipProps, InfoTipSize types
|
|
9
|
-
* @position Lab experiment (RFC
|
|
9
|
+
* @position Lab experiment (RFC meta/astryx#3349); core implementation consumed by index.ts
|
|
10
10
|
*
|
|
11
11
|
* SYNC: When modified, update these files to stay in sync:
|
|
12
12
|
* - /packages/lab/src/InfoTip/InfoTip.doc.mjs (props table, features)
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @file ListInput.tsx
|
|
3
3
|
* @input React, StyleX, Astryx field/list/button/icon/layer/empty-state primitives, the container-reveal hook, compact size context, browser scroll geometry, programmatic theme tokens, and shared Lab reorder styles
|
|
4
4
|
* @output Exports ListInput and its controlled data, column, renderer, and change types
|
|
5
|
-
* @position Lab experiment (RFC
|
|
5
|
+
* @position Lab experiment (RFC meta/astryx#4531) for editing compact repeated records
|
|
6
6
|
*
|
|
7
7
|
* SYNC: When modified, update these files to stay in sync:
|
|
8
8
|
* - /packages/lab/src/ListInput/ListInput.doc.mjs
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* @file ListInput.tsx
|
|
7
7
|
* @input React, StyleX, Astryx field/list/button/icon/layer/empty-state primitives, the container-reveal hook, compact size context, browser scroll geometry, programmatic theme tokens, and shared Lab reorder styles
|
|
8
8
|
* @output Exports ListInput and its controlled data, column, renderer, and change types
|
|
9
|
-
* @position Lab experiment (RFC
|
|
9
|
+
* @position Lab experiment (RFC meta/astryx#4531) for editing compact repeated records
|
|
10
10
|
*
|
|
11
11
|
* SYNC: When modified, update these files to stay in sync:
|
|
12
12
|
* - /packages/lab/src/ListInput/ListInput.doc.mjs
|
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
* styles)
|
|
9
9
|
* @output Exports MobilePowerSearch — Lab prototype of the touch PowerSearch
|
|
10
10
|
* flow: the whole field is one "Manage filters" trigger with display-only
|
|
11
|
-
* tokens, a Filters sheet with
|
|
12
|
-
* Clear all / Done, and a field → operator → value
|
|
13
|
-
* sheet holds Cancel / Apply
|
|
14
|
-
*
|
|
15
|
-
*
|
|
11
|
+
* tokens, a Filters sheet with editable rows and direct remove actions, Add
|
|
12
|
+
* filter and sticky Clear all / Done, and a field → operator → value
|
|
13
|
+
* drill-down whose edit sheet holds Cancel / Apply; forward navigation stacks each step
|
|
14
|
+
* above the one that opened it, and dismissing the current sheet reveals the
|
|
15
|
+
* retained previous step
|
|
16
16
|
* @position Lab (canary) stack layer 1: validates the touch design before any
|
|
17
17
|
* Core promotion. The caller chooses it explicitly
|
|
18
18
|
* (`isTouch ? MobilePowerSearch : PowerSearch`); there is no pointer
|
|
@@ -30,32 +30,35 @@
|
|
|
30
30
|
* - announcements made while a sheet is open are delivered inside that
|
|
31
31
|
* sheet's dialog by `useAnnounce`, called from a `SheetAnnouncer` rendered
|
|
32
32
|
* in each step (spec AST-086 FR14): the shared page-body channel is not
|
|
33
|
-
* exposed while a native modal dialog is open.
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
33
|
+
* exposed while a native modal dialog is open. Visual EmptyStates mount only
|
|
34
|
+
* while their step is open; empty-result and unavailable messages are spoken
|
|
35
|
+
* from their rendered element, once per occasion; Clear all announces after
|
|
36
|
+
* its confirmation closes inside the still-open Filters sheet;
|
|
37
37
|
* - no theming contract: no `power-search` theme target or selectors;
|
|
38
38
|
* - `components[type].Token` overrides receive Core's PowerSearchTokenProps;
|
|
39
39
|
* the built-in token renders Core `Token` directly, with the value text
|
|
40
|
-
* the Filters rows share
|
|
41
|
-
* changes no date value (dates follow Core's semantics, below);
|
|
40
|
+
* the Filters rows share and date values formatted in `timezoneID`;
|
|
42
41
|
* - fields whose every operator is `nested` are left out with a development
|
|
43
42
|
* warning; `nested` has no sheet editor yet (Core's built-in nested editor
|
|
44
43
|
* is not exported);
|
|
45
|
-
* -
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
44
|
+
* - date-only and date-range values use inline Calendars in `timezoneID`,
|
|
45
|
+
* `isDateOnly: false` uses a large date-and-time input, and `date_relative`
|
|
46
|
+
* remains a row list;
|
|
47
|
+
* - Clear all asks for confirmation, removes editable filters while preserving
|
|
48
|
+
* read-only ones, and keeps the Filters sheet open for continued editing;
|
|
49
|
+
* - every removable Filters row, including one-tap boolean filters, uses the
|
|
50
|
+
* same trailing remove button instead of a selected-state indicator; when
|
|
51
|
+
* no filters exist, the centered Add filter is the only visible action;
|
|
52
|
+
* - Add filter leaves its search input unfocused until the user chooses it, so
|
|
53
|
+
* opening the sheet does not summon the software keyboard;
|
|
54
|
+
* - a value editor that is the sheet's only section sits directly on the sheet
|
|
55
|
+
* surface; muted section containers distinguish only multi-section editors;
|
|
53
56
|
* - a filter whose field or operator the config no longer knows lists by its
|
|
54
|
-
* raw keys and
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
57
|
+
* raw keys and remains directly removable from the Filters row; rows and
|
|
58
|
+
* tokens are keyed by filter identity, so controlled reorder and removal
|
|
59
|
+
* keep focus stable or move it to the nearest remaining action;
|
|
60
|
+
* - the scroll viewport reaches the sheet edge so its scrollbar does too;
|
|
61
|
+
* padded inner content keeps list text aligned with the fixed header;
|
|
59
62
|
* - the sheets pad their own content (`padding={0}` on BottomSheet); each
|
|
60
63
|
* sheet body publishes that padding as container padding so its
|
|
61
64
|
* `edge="bleed"` lists run edge to edge with row text on the body's inset.
|
|
@@ -141,9 +144,9 @@ export interface MobilePowerSearchProps extends Omit<BaseProps<HTMLElement>, 'on
|
|
|
141
144
|
/**
|
|
142
145
|
* Lab prototype of the touch PowerSearch flow. The outer field keeps active
|
|
143
146
|
* filters as display-only tokens and acts as one sheet trigger. The Filters
|
|
144
|
-
* sheet lists selected filters as
|
|
145
|
-
* and Clear all plus Done in its sticky footer;
|
|
146
|
-
* filter in a sheet with Cancel
|
|
147
|
+
* sheet lists selected filters as editable rows with direct remove actions,
|
|
148
|
+
* Add filter in its header, and Clear all plus Done in its sticky footer;
|
|
149
|
+
* opening a row edits that filter in a sheet with Cancel and Apply. Add filter
|
|
147
150
|
* when no filter exists and, when the config names a content-search field,
|
|
148
151
|
* carries that search with inline suggestions.
|
|
149
152
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MobilePowerSearch.d.ts","sourceRoot":"","sources":["../../src/MobilePowerSearch/MobilePowerSearch.tsx"],"names":[],"mappings":"AAIA
|
|
1
|
+
{"version":3,"file":"MobilePowerSearch.d.ts","sourceRoot":"","sources":["../../src/MobilePowerSearch/MobilePowerSearch.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyEG;AAEH,OAAO,KAAK,EAAE,EASZ,KAAK,SAAS,EAEf,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,oBAAoB,CAAC;AAKlD,OAAO,EAML,KAAK,kBAAkB,EACvB,KAAK,WAAW,EACjB,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAuB,KAAK,QAAQ,EAAC,MAAM,yBAAyB,CAAC;AAM5E,OAAO,KAAK,EAEV,qBAAqB,EACrB,qBAAqB,EACrB,iBAAiB,EAEjB,iBAAiB,EACjB,iBAAiB,EAEjB,eAAe,EAChB,MAAM,gCAAgC,CAAC;AA4CxC,MAAM,WAAW,sBAAuB,SAAQ,IAAI,CAClD,SAAS,CAAC,WAAW,CAAC,EACtB,UAAU,CACX;IACC,yEAAyE;IACzE,MAAM,EAAE,iBAAiB,CAAC;IAC1B,gCAAgC;IAChC,OAAO,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAC;IAC1C,8EAA8E;IAC9E,QAAQ,EAAE,CACR,OAAO,EAAE,aAAa,CAAC,iBAAiB,CAAC,EACzC,UAAU,EAAE,qBAAqB,EACjC,KAAK,EAAE,MAAM,KACV,IAAI,CAAC;IACV,gFAAgF;IAChF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,6CAA6C;IAC7C,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,mFAAmF;IACnF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,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