@astryxdesign/lab 0.7.5-canary.dbcfc30 → 0.7.5-canary.dc5a8cf
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/dist/Comments/icons.d.ts.map +1 -1
- package/dist/Comments/icons.js +9 -2
- package/dist/EmojiPicker/EmojiPicker.js +5 -8
- package/dist/MobilePowerSearch/MobilePowerSearch.d.ts +41 -18
- package/dist/MobilePowerSearch/MobilePowerSearch.d.ts.map +1 -1
- package/dist/MobilePowerSearch/MobilePowerSearch.js +801 -506
- package/dist/MobilePowerSearch/MobilePowerSearchValueEditor.d.ts +2 -3
- package/dist/MobilePowerSearch/MobilePowerSearchValueEditor.d.ts.map +1 -1
- package/dist/MobilePowerSearch/MobilePowerSearchValueEditor.js +14 -33
- 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 +688 -299
- package/dist/lab.css +1 -0
- package/package.json +4 -4
- package/src/Comments/icons.test.tsx +76 -0
- package/src/Comments/icons.tsx +9 -2
- package/src/EmojiPicker/EmojiPicker.test.tsx +21 -0
- package/src/EmojiPicker/EmojiPicker.tsx +8 -8
- package/src/MobilePowerSearch/MobilePowerSearch.doc.mjs +4 -4
- package/src/MobilePowerSearch/MobilePowerSearch.test.tsx +823 -70
- package/src/MobilePowerSearch/MobilePowerSearch.tsx +965 -580
- package/src/MobilePowerSearch/MobilePowerSearchValueEditor.tsx +13 -37
- package/src/MobilePowerSearch/mobilePowerSearchUtils.ts +68 -1
- package/src/MobileTokenizer/MobileTokenizer.doc.mjs +8 -4
- package/src/MobileTokenizer/MobileTokenizer.test.tsx +531 -0
- package/src/MobileTokenizer/MobileTokenizer.tsx +859 -339
|
@@ -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,
|
|
@@ -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,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
11
|
* tokens, a Filters sheet with chevron rows, Add filter and sticky
|
|
11
12
|
* Clear all / Done, and a field → operator → value drill-down whose edit
|
|
12
|
-
* sheet holds Cancel / Apply / Remove
|
|
13
|
+
* sheet holds Cancel / Apply / Remove; the steps are sibling BottomSheets
|
|
14
|
+
* that replace one another on a same-update switch (one scrim, the
|
|
15
|
+
* entering step above the leaving one)
|
|
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,36 @@
|
|
|
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. Empty-result and
|
|
34
|
+
* unavailable messages are spoken from their rendered element, once per
|
|
35
|
+
* occasion; Clear all's outcome and a result count that changes during
|
|
36
|
+
* the flow's exit are spoken once focus is back on the trigger;
|
|
32
37
|
* - no theming contract: no `power-search` theme target or selectors;
|
|
33
|
-
* - `components[type].Token` overrides receive Core's PowerSearchTokenProps
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
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; `timezoneID` is accepted for API parity and
|
|
41
|
+
* changes no date value (dates follow Core's semantics, below);
|
|
37
42
|
* - fields whose every operator is `nested` are left out with a development
|
|
38
|
-
* warning; `nested` has no sheet editor yet
|
|
39
|
-
*
|
|
40
|
-
*
|
|
43
|
+
* warning; `nested` has no sheet editor yet (Core's built-in nested editor
|
|
44
|
+
* is not exported);
|
|
45
|
+
* - dates follow Core PowerSearch's semantics (`component:PowerSearch`
|
|
46
|
+
* DEC-3, FR11, FR12): a `date_absolute` is the UTC midnight of the chosen
|
|
47
|
+
* day, which the date editor reads and writes as that UTC day; the token
|
|
48
|
+
* and the Filters row show it as the Core token does (the day in the
|
|
49
|
+
* browser's zone, no time); `isDateOnly: false` gets the same date-only
|
|
50
|
+
* editor, and `date_relative` is a row list rather than a Selector;
|
|
51
|
+
* - Clear all removes every filter, read-only ones included, reported as one
|
|
52
|
+
* `remove` at the last index, as the Core field's clear control does;
|
|
53
|
+
* - a filter whose field or operator the config no longer knows lists by its
|
|
54
|
+
* raw keys and its step is the unavailable state, whose Remove is the way
|
|
55
|
+
* out; rows and tokens are keyed by filter identity, so a controlled
|
|
56
|
+
* reorder or a removal above the focused row keeps focus where it was, and
|
|
57
|
+
* a removed focused control hands focus to the nearest remaining button
|
|
58
|
+
* row, else the sheet's first control;
|
|
41
59
|
* - the sheets pad their own content (`padding={0}` on BottomSheet); each
|
|
42
60
|
* sheet body publishes that padding as container padding so its
|
|
43
61
|
* `edge="bleed"` lists run edge to edge with row text on the body's inset.
|
|
@@ -100,7 +118,12 @@ export interface MobilePowerSearchProps extends Omit<BaseProps<HTMLElement>, 'on
|
|
|
100
118
|
maxSearchResults?: number;
|
|
101
119
|
/** Label for the edit sheet's save action. @default 'Apply' when editing, 'Add filter' when creating */
|
|
102
120
|
popoverSaveButtonLabel?: string;
|
|
103
|
-
/**
|
|
121
|
+
/**
|
|
122
|
+
* Accepted for API parity with Core PowerSearch. Dates follow Core's
|
|
123
|
+
* semantics: tokens and rows show a `date_absolute` as the Core token does
|
|
124
|
+
* (its day in the browser's zone) and the date editors read and write the
|
|
125
|
+
* UTC day, so this prop does not change a date value today.
|
|
126
|
+
*/
|
|
104
127
|
timezoneID?: string;
|
|
105
128
|
/** Content at the end of the field row. */
|
|
106
129
|
endContent?: ReactNode;
|
|
@@ -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"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