@astryxdesign/lab 0.7.5-canary.dbcfc30 → 0.7.5-canary.dcdb356

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.
Files changed (25) hide show
  1. package/dist/EmojiPicker/EmojiPicker.js +5 -8
  2. package/dist/MobilePowerSearch/MobilePowerSearch.d.ts +41 -18
  3. package/dist/MobilePowerSearch/MobilePowerSearch.d.ts.map +1 -1
  4. package/dist/MobilePowerSearch/MobilePowerSearch.js +793 -506
  5. package/dist/MobilePowerSearch/MobilePowerSearchValueEditor.d.ts +2 -3
  6. package/dist/MobilePowerSearch/MobilePowerSearchValueEditor.d.ts.map +1 -1
  7. package/dist/MobilePowerSearch/MobilePowerSearchValueEditor.js +14 -33
  8. package/dist/MobilePowerSearch/mobilePowerSearchUtils.d.ts +23 -1
  9. package/dist/MobilePowerSearch/mobilePowerSearchUtils.d.ts.map +1 -1
  10. package/dist/MobilePowerSearch/mobilePowerSearchUtils.js +62 -2
  11. package/dist/MobileTokenizer/MobileTokenizer.d.ts +35 -10
  12. package/dist/MobileTokenizer/MobileTokenizer.d.ts.map +1 -1
  13. package/dist/MobileTokenizer/MobileTokenizer.js +660 -299
  14. package/dist/lab.css +1 -0
  15. package/package.json +4 -4
  16. package/src/EmojiPicker/EmojiPicker.test.tsx +21 -0
  17. package/src/EmojiPicker/EmojiPicker.tsx +8 -8
  18. package/src/MobilePowerSearch/MobilePowerSearch.doc.mjs +4 -4
  19. package/src/MobilePowerSearch/MobilePowerSearch.test.tsx +740 -70
  20. package/src/MobilePowerSearch/MobilePowerSearch.tsx +950 -580
  21. package/src/MobilePowerSearch/MobilePowerSearchValueEditor.tsx +13 -37
  22. package/src/MobilePowerSearch/mobilePowerSearchUtils.ts +68 -1
  23. package/src/MobileTokenizer/MobileTokenizer.doc.mjs +8 -4
  24. package/src/MobileTokenizer/MobileTokenizer.test.tsx +486 -0
  25. package/src/MobileTokenizer/MobileTokenizer.tsx +828 -338
@@ -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: noResultsMessage != null && /*#__PURE__*/_jsx(Text, {
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, BottomSheetSwitcher, Button, Field, Heading, Icon, List,
6
- * RadioList, Text, TextInput, Token, Tooltip hooks, i18n, hooks, utils,
7
- * Layout container-padding styles)
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
- * only for the result count and the add announcement);
27
- * - announcements made while a sheet is open go to a persistent polite
28
- * region inside each sheet, created empty and kept mounted (spec AST-086
29
- * FR3), because the shared page-body channel is not exposed while a
30
- * native modal dialog is open (its Platform support section); the closed
31
- * field still uses the shared channel;
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
- * which carry no `timezoneID`; the built-in token renders Core `Token`
35
- * directly so the configured timezone reaches tokens and row summaries
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; `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
- * - `date_absolute` honors `isDateOnly: false` with a DateTimeInput, and
40
- * `date_relative` is a row list rather than a Selector;
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
- /** Timezone ID for date formatting in tokens, row summaries, and date editors. */
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AAEH,OAAO,KAAK,EAAE,EAQZ,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAC,S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