@astryxdesign/lab 0.7.5-canary.cdd75ae → 0.7.5-canary.d48bca5
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/Chat/ChatUnreadDivider.js +1 -1
- package/dist/CircularProgress/CircularProgress.js +3 -3
- package/dist/Comments/icons.d.ts.map +1 -1
- package/dist/Comments/icons.js +9 -2
- package/dist/DiffViewer/DiffViewer.d.ts +15 -4
- package/dist/DiffViewer/DiffViewer.d.ts.map +1 -1
- package/dist/DiffViewer/DiffViewer.js +31 -6
- package/dist/EmojiPicker/EmojiPicker.js +5 -8
- 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/LogStream/LogStream.d.ts.map +1 -1
- package/dist/LogStream/LogStream.js +2 -2
- package/dist/MobilePowerSearch/MobilePowerSearch.d.ts +49 -23
- package/dist/MobilePowerSearch/MobilePowerSearch.d.ts.map +1 -1
- package/dist/MobilePowerSearch/MobilePowerSearch.js +920 -445
- package/dist/MobilePowerSearch/MobilePowerSearchValueEditor.d.ts +10 -16
- package/dist/MobilePowerSearch/MobilePowerSearchValueEditor.d.ts.map +1 -1
- package/dist/MobilePowerSearch/MobilePowerSearchValueEditor.js +218 -113
- package/dist/MobilePowerSearch/mobilePowerSearchUtils.d.ts +23 -1
- package/dist/MobilePowerSearch/mobilePowerSearchUtils.d.ts.map +1 -1
- package/dist/MobilePowerSearch/mobilePowerSearchUtils.js +62 -2
- package/dist/MobileTokenizer/MobileTokenizer.d.ts +35 -10
- package/dist/MobileTokenizer/MobileTokenizer.d.ts.map +1 -1
- package/dist/MobileTokenizer/MobileTokenizer.js +714 -305
- package/dist/SVGIcon/SVGIcon.js +3 -3
- package/dist/Stat/Stat.js +2 -2
- 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 +15 -8
- package/package.json +7 -7
- package/src/Chat/ChatUnreadDivider.tsx +1 -1
- package/src/CircularProgress/CircularProgress.tsx +3 -3
- package/src/Comments/icons.test.tsx +76 -0
- package/src/Comments/icons.tsx +9 -2
- package/src/DiffViewer/DiffViewer.doc.mjs +8 -2
- package/src/DiffViewer/DiffViewer.test.tsx +71 -0
- package/src/DiffViewer/DiffViewer.tsx +52 -9
- package/src/EmojiPicker/EmojiPicker.test.tsx +21 -0
- package/src/EmojiPicker/EmojiPicker.tsx +8 -8
- package/src/InfoTip/InfoTip.tsx +1 -1
- package/src/ListInput/ListInput.tsx +1 -1
- package/src/LogStream/LogStream.doc.mjs +1 -1
- package/src/LogStream/LogStream.tsx +3 -5
- package/src/MobilePowerSearch/MobilePowerSearch.doc.mjs +5 -5
- package/src/MobilePowerSearch/MobilePowerSearch.test.tsx +957 -192
- package/src/MobilePowerSearch/MobilePowerSearch.tsx +1074 -456
- package/src/MobilePowerSearch/MobilePowerSearchValueEditor.tsx +303 -120
- package/src/MobilePowerSearch/mobilePowerSearchUtils.ts +68 -1
- package/src/MobileTokenizer/MobileTokenizer.doc.mjs +9 -5
- package/src/MobileTokenizer/MobileTokenizer.test.tsx +577 -2
- package/src/MobileTokenizer/MobileTokenizer.tsx +889 -350
- package/src/SVGIcon/SVGIcon.tsx +3 -3
- package/src/Stat/Stat.tsx +2 -2
- 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
|
@@ -106,15 +106,15 @@ const variantStyles = {
|
|
|
106
106
|
$$css: true
|
|
107
107
|
},
|
|
108
108
|
success: {
|
|
109
|
-
kjVXCG: "
|
|
109
|
+
kjVXCG: "x88o7k4",
|
|
110
110
|
$$css: true
|
|
111
111
|
},
|
|
112
112
|
warning: {
|
|
113
|
-
kjVXCG: "
|
|
113
|
+
kjVXCG: "x16d96h5",
|
|
114
114
|
$$css: true
|
|
115
115
|
},
|
|
116
116
|
error: {
|
|
117
|
-
kjVXCG: "
|
|
117
|
+
kjVXCG: "xqb94c9",
|
|
118
118
|
$$css: true
|
|
119
119
|
},
|
|
120
120
|
neutral: {
|
|
@@ -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,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type MouseEvent, type ReactNode, type Ref } from 'react';
|
|
2
2
|
import type { BaseProps } from '@astryxdesign/core';
|
|
3
|
+
import { type CodeLanguage } from '@astryxdesign/core/CodeBlock';
|
|
3
4
|
import { type SyntaxThemeDefinition } from '@astryxdesign/core/theme/syntax';
|
|
4
5
|
import type { DiffViewerFile, DiffViewerLineRef } from './diffTypes.js';
|
|
5
6
|
/** How hunks are laid out: one column, or old and new side by side. */
|
|
@@ -34,10 +35,20 @@ export interface DiffViewerProps extends BaseProps<HTMLDivElement> {
|
|
|
34
35
|
*/
|
|
35
36
|
viewMode?: DiffViewerViewMode;
|
|
36
37
|
/**
|
|
37
|
-
* Syntax-highlighting language
|
|
38
|
-
*
|
|
38
|
+
* Syntax-highlighting language: a built-in identifier such as `'rust'`, or
|
|
39
|
+
* a language value — a module imported on its own, such as `graphql` from
|
|
40
|
+
* `@astryxdesign/core/CodeBlock/languages/graphql`, or one made with
|
|
41
|
+
* `createCodeLanguage`. Defaults to one inferred from the file's name or
|
|
42
|
+
* extension among the built-ins and `codeLanguages`; an unmatched file
|
|
43
|
+
* renders as plain text.
|
|
39
44
|
*/
|
|
40
|
-
language?: string;
|
|
45
|
+
language?: string | CodeLanguage;
|
|
46
|
+
/**
|
|
47
|
+
* Language values the file's name or extension may infer, such as
|
|
48
|
+
* `[graphql, dockerfile]`; a later entry wins. Pass the same list to every
|
|
49
|
+
* DiffViewer on a review page.
|
|
50
|
+
*/
|
|
51
|
+
codeLanguages?: ReadonlyArray<CodeLanguage>;
|
|
41
52
|
/**
|
|
42
53
|
* Show the old and new line-number gutters.
|
|
43
54
|
* @default true
|
|
@@ -125,7 +136,7 @@ export interface DiffViewerProps extends BaseProps<HTMLDivElement> {
|
|
|
125
136
|
* <DiffViewer file={file} viewMode="split" />
|
|
126
137
|
* ```
|
|
127
138
|
*/
|
|
128
|
-
export declare function DiffViewer({ ref, file, viewMode, language: languageProp, hasLineNumbers, isWrapped, changeIndicator, inlineHighlight, hasChangeBackground, isCollapsible, isCollapsed: isCollapsedProp, defaultIsCollapsed, onCollapsedChange, headerEnd, renderLineAnnotation, onLineNumberClick, maxHeight, syntaxTheme, xstyle, className, style, ...props }: DiffViewerProps): import("react").JSX.Element;
|
|
139
|
+
export declare function DiffViewer({ ref, file, viewMode, language: languageProp, codeLanguages, hasLineNumbers, isWrapped, changeIndicator, inlineHighlight, hasChangeBackground, isCollapsible, isCollapsed: isCollapsedProp, defaultIsCollapsed, onCollapsedChange, headerEnd, renderLineAnnotation, onLineNumberClick, maxHeight, syntaxTheme, xstyle, className, style, ...props }: DiffViewerProps): import("react").JSX.Element;
|
|
129
140
|
export declare namespace DiffViewer {
|
|
130
141
|
var displayName: string;
|
|
131
142
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DiffViewer.d.ts","sourceRoot":"","sources":["../../src/DiffViewer/DiffViewer.tsx"],"names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AAE,eAAe,+BAopBjB;yBA5qBe,UAAU"}
|
|
@@ -92,18 +92,42 @@ const EXTENSION_LANGUAGES = {
|
|
|
92
92
|
yaml: 'yaml',
|
|
93
93
|
yml: 'yaml',
|
|
94
94
|
md: 'markdown',
|
|
95
|
-
markdown: 'markdown'
|
|
95
|
+
markdown: 'markdown',
|
|
96
|
+
c: 'c',
|
|
97
|
+
h: 'c',
|
|
98
|
+
cpp: 'cpp',
|
|
99
|
+
cc: 'cpp',
|
|
100
|
+
cxx: 'cpp',
|
|
101
|
+
hpp: 'cpp',
|
|
102
|
+
hh: 'cpp',
|
|
103
|
+
sql: 'sql',
|
|
104
|
+
rs: 'rust',
|
|
105
|
+
kt: 'kotlin',
|
|
106
|
+
kts: 'kotlin',
|
|
107
|
+
swift: 'swift',
|
|
108
|
+
go: 'go'
|
|
96
109
|
};
|
|
97
|
-
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* The language a file's name or extension infers: a listed value first (a
|
|
113
|
+
* later entry wins), then a built-in, else plain text (CodeBlock FR13).
|
|
114
|
+
*/
|
|
115
|
+
function inferLanguage(path, codeLanguages) {
|
|
98
116
|
if (path == null) {
|
|
99
117
|
return 'plaintext';
|
|
100
118
|
}
|
|
101
119
|
const base = path.slice(path.lastIndexOf('/') + 1);
|
|
102
120
|
const dot = base.lastIndexOf('.');
|
|
103
|
-
|
|
104
|
-
|
|
121
|
+
const extension = dot > 0 ? base.slice(dot + 1).toLowerCase() : null;
|
|
122
|
+
if (codeLanguages != null) {
|
|
123
|
+
for (let i = codeLanguages.length - 1; i >= 0; i--) {
|
|
124
|
+
const language = codeLanguages[i];
|
|
125
|
+
if (language.fileNames.includes(base) || extension != null && language.fileExtensions.includes(extension)) {
|
|
126
|
+
return language;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
105
129
|
}
|
|
106
|
-
return EXTENSION_LANGUAGES[
|
|
130
|
+
return extension == null ? 'plaintext' : EXTENSION_LANGUAGES[extension] ?? 'plaintext';
|
|
107
131
|
}
|
|
108
132
|
|
|
109
133
|
// ---------------------------------------------------------------------------
|
|
@@ -698,6 +722,7 @@ export function DiffViewer({
|
|
|
698
722
|
file,
|
|
699
723
|
viewMode = 'unified',
|
|
700
724
|
language: languageProp,
|
|
725
|
+
codeLanguages,
|
|
701
726
|
hasLineNumbers = true,
|
|
702
727
|
isWrapped = false,
|
|
703
728
|
changeIndicator = 'classic',
|
|
@@ -723,7 +748,7 @@ export function DiffViewer({
|
|
|
723
748
|
ensureHighlightStyles();
|
|
724
749
|
}, []);
|
|
725
750
|
const path = file.newPath ?? file.oldPath;
|
|
726
|
-
const language = languageProp ?? inferLanguage(path);
|
|
751
|
+
const language = languageProp ?? inferLanguage(path, codeLanguages);
|
|
727
752
|
const displayPath = file.status === 'renamed' && file.oldPath != null && file.newPath != null ? t('@astryx.diffViewer.renamedPath', {
|
|
728
753
|
oldPath: file.oldPath,
|
|
729
754
|
newPath: file.newPath
|
|
@@ -399,19 +399,16 @@ export function EmojiPicker({
|
|
|
399
399
|
size: "sm",
|
|
400
400
|
label: t('@astryx.emojiPicker.loading')
|
|
401
401
|
})
|
|
402
|
-
}) : queryWords.length === 0 && categories === 'failed' ? /*#__PURE__*/_jsx(HStack, {
|
|
403
|
-
paddingInline: 3,
|
|
404
|
-
children: /*#__PURE__*/_jsx(Text, {
|
|
405
|
-
type: "supporting",
|
|
406
|
-
color: "secondary",
|
|
407
|
-
children: t('@astryx.emojiPicker.loadFailed')
|
|
408
|
-
})
|
|
409
402
|
}) : null, /*#__PURE__*/_jsx(HStack, {
|
|
410
403
|
role: "status",
|
|
411
404
|
"aria-atomic": "true",
|
|
412
405
|
paddingInline: 3,
|
|
413
406
|
"data-emoji-picker-search-status": "true",
|
|
414
|
-
children:
|
|
407
|
+
children: queryWords.length === 0 && categories === 'failed' ? /*#__PURE__*/_jsx(Text, {
|
|
408
|
+
type: "supporting",
|
|
409
|
+
color: "secondary",
|
|
410
|
+
children: t('@astryx.emojiPicker.loadFailed')
|
|
411
|
+
}) : noResultsMessage != null && /*#__PURE__*/_jsx(Text, {
|
|
415
412
|
type: "supporting",
|
|
416
413
|
color: "secondary",
|
|
417
414
|
children: noResultsMessage
|
|
@@ -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
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LogStream.d.ts","sourceRoot":"","sources":["../../src/LogStream/LogStream.tsx"],"names":[],"mappings":"AAyBA,OAAO,EAML,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAGf,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,oBAAoB,CAAC;AAkBlD,iCAAiC;AACjC,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,CAAC;AAEjE,0EAA0E;AAC1E,MAAM,WAAW,QAAQ;IACvB,4CAA4C;IAC5C,EAAE,EAAE,MAAM,CAAC;IACX,qEAAqE;IACrE,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,cAAc,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,wDAAwD;IACxD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,oEAAoE;IACpE,MAAM,CAAC,EAAE,SAAS,CAAC;CACpB;AAED,MAAM,WAAW,cAAe,SAAQ,IAAI,CAC1C,SAAS,CAAC,cAAc,CAAC,EACzB,UAAU,CACX;IACC,wCAAwC;IACxC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAChC,6DAA6D;IAC7D,OAAO,EAAE,QAAQ,EA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AC7D,OAAO,EAAE,QAAQ,EAAE,CAAC;IACpB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC;IACjC;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,+EAA+E;IAC/E,cAAc,CAAC,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;IAC9C,uDAAuD;IACvD,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5B,+CAA+C;IAC/C,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,iEAAiE;IACjE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gEAAgE;IAChE,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,QAAQ,KAAK,SAAS,CAAC;CAC9C;AAsOD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,SAAS,CAAC,EACxB,OAAO,EACP,OAAmB,EACnB,WAAW,EACX,cAAc,EACd,SAAS,EACT,aAAoB,EACpB,KAAoB,EACpB,WAAW,EACX,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,EACH,GAAG,IAAI,EACR,EAAE,cAAc,+BAqNhB;yBAnOe,SAAS"}
|
|
@@ -164,11 +164,11 @@ const styles = {
|
|
|
164
164
|
$$css: true
|
|
165
165
|
},
|
|
166
166
|
levelWarn: {
|
|
167
|
-
kMwMTN: "
|
|
167
|
+
kMwMTN: "x10h9ou4",
|
|
168
168
|
$$css: true
|
|
169
169
|
},
|
|
170
170
|
levelError: {
|
|
171
|
-
kMwMTN: "
|
|
171
|
+
kMwMTN: "x1wj83wy",
|
|
172
172
|
$$css: true
|
|
173
173
|
},
|
|
174
174
|
levelInfoTerminal: {
|
|
@@ -2,14 +2,17 @@
|
|
|
2
2
|
* @file MobilePowerSearch.tsx
|
|
3
3
|
* @input Core PowerSearch config, filters and onChange (the same props as
|
|
4
4
|
* @astryxdesign/core PowerSearch); public @astryxdesign/core components only
|
|
5
|
-
* (BottomSheet,
|
|
6
|
-
* RadioList, Text, TextInput, Token, Tooltip hooks, i18n, hooks
|
|
7
|
-
* Layout container-padding
|
|
5
|
+
* (BottomSheet, Button, Field, Heading, Icon, List,
|
|
6
|
+
* RadioList, Text, TextInput, Token, Tooltip hooks, i18n, hooks —
|
|
7
|
+
* useAnnounce for every announcement — utils, Layout container-padding
|
|
8
|
+
* styles)
|
|
8
9
|
* @output Exports MobilePowerSearch — Lab prototype of the touch PowerSearch
|
|
9
10
|
* flow: the whole field is one "Manage filters" trigger with display-only
|
|
10
|
-
* tokens, a Filters sheet with
|
|
11
|
-
* Clear all / Done, and a field → operator → value
|
|
12
|
-
* sheet holds Cancel / Apply
|
|
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
|
|
13
16
|
* @position Lab (canary) stack layer 1: validates the touch design before any
|
|
14
17
|
* Core promotion. The caller chooses it explicitly
|
|
15
18
|
* (`isTouch ? MobilePowerSearch : PowerSearch`); there is no pointer
|
|
@@ -23,21 +26,39 @@
|
|
|
23
26
|
* - no `menuWidth` or `tokenOverflowBehavior`: there is no typeahead popover
|
|
24
27
|
* and tokens wrap inside the trigger;
|
|
25
28
|
* - strings are literals (no new i18n keys; existing Core keys are reused
|
|
26
|
-
*
|
|
27
|
-
* - announcements made while a sheet is open
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
* native modal dialog is open
|
|
31
|
-
*
|
|
29
|
+
* for the result count, the add and the removal announcements);
|
|
30
|
+
* - announcements made while a sheet is open are delivered inside that
|
|
31
|
+
* sheet's dialog by `useAnnounce`, called from a `SheetAnnouncer` rendered
|
|
32
|
+
* in each step (spec AST-086 FR14): the shared page-body channel is not
|
|
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;
|
|
32
37
|
* - no theming contract: no `power-search` theme target or selectors;
|
|
33
|
-
* - `components[type].Token` overrides receive Core's PowerSearchTokenProps
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
* through the same formatter;
|
|
38
|
+
* - `components[type].Token` overrides receive Core's PowerSearchTokenProps;
|
|
39
|
+
* the built-in token renders Core `Token` directly, with the value text
|
|
40
|
+
* the Filters rows share and date values formatted in `timezoneID`;
|
|
37
41
|
* - fields whose every operator is `nested` are left out with a development
|
|
38
|
-
* warning; `nested` has no sheet editor yet
|
|
39
|
-
*
|
|
40
|
-
*
|
|
42
|
+
* warning; `nested` has no sheet editor yet (Core's built-in nested editor
|
|
43
|
+
* is not exported);
|
|
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;
|
|
56
|
+
* - a filter whose field or operator the config no longer knows lists by its
|
|
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;
|
|
41
62
|
* - the sheets pad their own content (`padding={0}` on BottomSheet); each
|
|
42
63
|
* sheet body publishes that padding as container padding so its
|
|
43
64
|
* `edge="bleed"` lists run edge to edge with row text on the body's inset.
|
|
@@ -100,7 +121,12 @@ export interface MobilePowerSearchProps extends Omit<BaseProps<HTMLElement>, 'on
|
|
|
100
121
|
maxSearchResults?: number;
|
|
101
122
|
/** Label for the edit sheet's save action. @default 'Apply' when editing, 'Add filter' when creating */
|
|
102
123
|
popoverSaveButtonLabel?: string;
|
|
103
|
-
/**
|
|
124
|
+
/**
|
|
125
|
+
* Accepted for API parity with Core PowerSearch. Dates follow Core's
|
|
126
|
+
* semantics: tokens and rows show a `date_absolute` as the Core token does
|
|
127
|
+
* (its day in the browser's zone) and the date editors read and write the
|
|
128
|
+
* UTC day, so this prop does not change a date value today.
|
|
129
|
+
*/
|
|
104
130
|
timezoneID?: string;
|
|
105
131
|
/** Content at the end of the field row. */
|
|
106
132
|
endContent?: ReactNode;
|
|
@@ -118,9 +144,9 @@ export interface MobilePowerSearchProps extends Omit<BaseProps<HTMLElement>, 'on
|
|
|
118
144
|
/**
|
|
119
145
|
* Lab prototype of the touch PowerSearch flow. The outer field keeps active
|
|
120
146
|
* filters as display-only tokens and acts as one sheet trigger. The Filters
|
|
121
|
-
* sheet lists selected filters as
|
|
122
|
-
* and Clear all plus Done in its sticky footer;
|
|
123
|
-
* 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
|
|
124
150
|
* when no filter exists and, when the config names a content-search field,
|
|
125
151
|
* carries that search with inline suggestions.
|
|
126
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,sDAAsD;IACtD,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,yDAAyD;IACzD,QAAQ,CAAC,EAAE,OAA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