@zeyos/zx 5.0.0 → 5.2.0

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 (154) hide show
  1. package/CHANGELOG.md +164 -0
  2. package/README.md +2 -1
  3. package/dist/types/components/account-menu/account-menu.d.ts +8 -0
  4. package/dist/types/components/activity-list/activity-list.d.ts +9 -1
  5. package/dist/types/components/app-icon/app-icon.d.ts +14 -2
  6. package/dist/types/components/app-sidebar/app-sidebar.d.ts +288 -14
  7. package/dist/types/components/calendar/calendar.d.ts +67 -5
  8. package/dist/types/components/card-view/card-view.d.ts +7 -4
  9. package/dist/types/components/card-view/record-card.d.ts +11 -0
  10. package/dist/types/components/context-menu/context-menu.d.ts +6 -2
  11. package/dist/types/components/data-filter/data-filter.d.ts +4 -4
  12. package/dist/types/components/dropdown/dropdown.d.ts +22 -7
  13. package/dist/types/components/field/field.d.ts +30 -0
  14. package/dist/types/components/fieldset/external-adapter.d.ts +83 -0
  15. package/dist/types/components/fieldset/fieldset.d.ts +7 -0
  16. package/dist/types/components/file-list/file-list.d.ts +35 -3
  17. package/dist/types/components/filter/filter.d.ts +127 -3
  18. package/dist/types/components/filter-panel/filter-panel.d.ts +36 -7
  19. package/dist/types/components/launcher/launcher.d.ts +8 -0
  20. package/dist/types/components/list-toolbar/list-toolbar.d.ts +15 -6
  21. package/dist/types/components/menu-button/menu-button.d.ts +6 -0
  22. package/dist/types/components/message/message.d.ts +14 -1
  23. package/dist/types/components/modal/modal.d.ts +30 -0
  24. package/dist/types/components/module-bar/module-bar.d.ts +395 -0
  25. package/dist/types/components/pagination/pagination.d.ts +17 -3
  26. package/dist/types/components/select/select.d.ts +6 -0
  27. package/dist/types/components/sheet/sheet.d.ts +15 -0
  28. package/dist/types/components/table/table.d.ts +265 -17
  29. package/dist/types/components/view/record-view.d.ts +59 -2
  30. package/dist/types/components/view-settings/view-settings.d.ts +879 -0
  31. package/dist/types/components/workspace-switcher/workspace-switcher.d.ts +327 -0
  32. package/dist/types/core/component.d.ts +12 -2
  33. package/dist/types/core/i18n.d.ts +27 -3
  34. package/dist/types/core/keyboard.d.ts +98 -1
  35. package/dist/types/core/messages.d.ts +382 -0
  36. package/dist/types/core/overlay-host.d.ts +28 -1
  37. package/dist/types/core/overlay-stack.d.ts +260 -0
  38. package/dist/types/index.d.ts +5 -2
  39. package/dist/types/internal/app-rail.d.ts +38 -0
  40. package/dist/types/internal/menu-items.d.ts +71 -3
  41. package/dist/types/zeyos/index.d.ts +1 -0
  42. package/dist/types/zeyos/launcher.d.ts +9 -0
  43. package/dist/types/zeyos/module-bar.d.ts +176 -0
  44. package/dist/types/zeyos/query.d.ts +31 -5
  45. package/dist/types/zeyos/table.d.ts +245 -8
  46. package/dist/types/zeyos/view.d.ts +16 -2
  47. package/dist/zx-zeyos.esm.js +4422 -430
  48. package/dist/zx-zeyos.esm.min.js +5 -5
  49. package/dist/zx.css +1417 -134
  50. package/dist/zx.esm.js +6986 -830
  51. package/dist/zx.esm.min.js +8 -8
  52. package/dist/zx.global.js +6986 -830
  53. package/dist/zx.global.min.js +8 -8
  54. package/dist/zx.min.css +1 -1
  55. package/docs/api.json +794 -17
  56. package/docs/llms.md +503 -63
  57. package/docs/llms.txt +6 -2
  58. package/package.json +1 -1
  59. package/src/components/account-menu/account-menu.js +12 -0
  60. package/src/components/activity-list/activity-list.js +27 -1
  61. package/src/components/app-icon/app-icon.css +13 -2
  62. package/src/components/app-icon/app-icon.js +11 -1
  63. package/src/components/app-rail/app-rail.css +19 -0
  64. package/src/components/app-sidebar/app-sidebar.css +204 -3
  65. package/src/components/app-sidebar/app-sidebar.js +646 -40
  66. package/src/components/breadcrumb/breadcrumb.css +1 -1
  67. package/src/components/calendar/calendar.css +1 -1
  68. package/src/components/calendar/calendar.js +26 -52
  69. package/src/components/card/card.css +2 -2
  70. package/src/components/card-view/card-view.css +5 -5
  71. package/src/components/card-view/card-view.js +13 -9
  72. package/src/components/card-view/record-card.js +14 -3
  73. package/src/components/code-editor/code-editor.css +1 -1
  74. package/src/components/code-editor/field-adapter.js +9 -2
  75. package/src/components/context-menu/context-menu.js +8 -2
  76. package/src/components/copy/copy-input.css +1 -1
  77. package/src/components/data-filter/data-filter.js +2 -2
  78. package/src/components/date-picker/time-picker.css +2 -2
  79. package/src/components/dock/dock.css +5 -4
  80. package/src/components/dropdown/dropdown.js +157 -72
  81. package/src/components/field/field.js +33 -3
  82. package/src/components/fieldset/external-adapter.js +363 -0
  83. package/src/components/fieldset/fieldset.js +10 -59
  84. package/src/components/file-list/file-list.js +144 -21
  85. package/src/components/filter/filter.css +86 -2
  86. package/src/components/filter/filter.js +300 -8
  87. package/src/components/filter-panel/filter-panel.js +149 -32
  88. package/src/components/finder/finder.css +1 -1
  89. package/src/components/kanban-view/kanban-view.css +3 -3
  90. package/src/components/kanban-view/kanban-view.js +5 -2
  91. package/src/components/launcher/launcher.css +1 -1
  92. package/src/components/launcher/launcher.js +29 -3
  93. package/src/components/list-toolbar/list-toolbar.js +39 -13
  94. package/src/components/master-panel/master-panel.js +0 -1
  95. package/src/components/menu-button/menu-button.css +63 -0
  96. package/src/components/menu-button/menu-button.js +97 -11
  97. package/src/components/message/message.js +60 -20
  98. package/src/components/modal/modal.css +1 -1
  99. package/src/components/modal/modal.js +66 -13
  100. package/src/components/module-bar/module-bar.css +486 -0
  101. package/src/components/module-bar/module-bar.js +1074 -0
  102. package/src/components/multi-value-editor/multi-value-editor.css +1 -1
  103. package/src/components/number-field/field-adapter.js +2 -1
  104. package/src/components/pagination/pagination.css +5 -5
  105. package/src/components/pagination/pagination.js +20 -4
  106. package/src/components/panel/panel.css +3 -2
  107. package/src/components/questionnaire/questionnaire.css +4 -4
  108. package/src/components/rating/field-adapter.js +2 -1
  109. package/src/components/rating/rating.css +1 -1
  110. package/src/components/search/search.css +4 -1
  111. package/src/components/select/select.js +9 -0
  112. package/src/components/sheet/sheet.css +1 -1
  113. package/src/components/sheet/sheet.js +74 -32
  114. package/src/components/slider/field-adapter.js +6 -1
  115. package/src/components/slider/slider.css +2 -2
  116. package/src/components/split-view/split-view.css +1 -1
  117. package/src/components/stat-tile/stat-tile.css +1 -1
  118. package/src/components/stepper/stepper.css +1 -1
  119. package/src/components/tabbox/tabbox.css +9 -5
  120. package/src/components/table/table.css +86 -11
  121. package/src/components/table/table.js +628 -57
  122. package/src/components/tag-picker/field-adapter.js +2 -1
  123. package/src/components/tooltip/tooltip.js +35 -17
  124. package/src/components/tree/tree.css +1 -1
  125. package/src/components/view/record-view.css +1 -1
  126. package/src/components/view/record-view.js +178 -18
  127. package/src/components/view-settings/view-settings.css +285 -0
  128. package/src/components/view-settings/view-settings.js +1830 -0
  129. package/src/components/workspace-switcher/workspace-switcher.css +188 -0
  130. package/src/components/workspace-switcher/workspace-switcher.js +463 -0
  131. package/src/core/component.js +88 -17
  132. package/src/core/fontawesome.js +5 -1
  133. package/src/core/i18n.js +47 -4
  134. package/src/core/icons.js +12 -2
  135. package/src/core/keyboard.js +206 -11
  136. package/src/core/messages.js +427 -0
  137. package/src/core/overlay-host.js +64 -9
  138. package/src/core/overlay-stack.js +487 -0
  139. package/src/core/position.js +22 -3
  140. package/src/index.js +5 -2
  141. package/src/internal/app-rail.js +134 -53
  142. package/src/internal/menu-items.js +61 -3
  143. package/src/zeyos/form.js +5 -3
  144. package/src/zeyos/index.js +3 -0
  145. package/src/zeyos/launcher.js +8 -3
  146. package/src/zeyos/module-bar.js +181 -0
  147. package/src/zeyos/query.js +44 -13
  148. package/src/zeyos/table.js +220 -80
  149. package/src/zeyos/view.js +43 -93
  150. package/styles/base.css +16 -1
  151. package/styles/print.css +1 -1
  152. package/styles/tokens/dark.css +4 -0
  153. package/styles/tokens/semantic.css +56 -28
  154. package/styles/zx.css +3 -0
package/CHANGELOG.md CHANGED
@@ -8,6 +8,170 @@ and friends remain the complete record.
8
8
 
9
9
  ## Unreleased
10
10
 
11
+ ## 5.2.0 — 2026-10-29
12
+
13
+ A record collection pattern with a five-way view switch and filter chips, two components to go
14
+ with it, and the sixteen defects a library-wide consistency audit found, fixed.
15
+
16
+ ### Added
17
+
18
+ - **`WorkspaceSwitcher`** — the account or workspace switcher at the head of a module menu: the
19
+ open workspace's tile, name and secondary line with a chevron, opening a menu of the user's
20
+ workspaces as `menuitemradio` rows followed by workspace actions; `compact` shows the tile
21
+ alone. `select` is cancelable, `setActive()`, `setWorkspaces()`, `setCompact()`. The layout
22
+ kit's `suiteNav()` takes a `workspace` option that puts it in place of the brand.
23
+ - **`ViewSettings`** — the content of a "View settings" drawer: search the hidden fields and add
24
+ one with an explicit button, see every field's type glyph, arrange the shown fields by pointer
25
+ or keyboard (announced, auto-scrolling), hide them, choose the grouping, and set a board's
26
+ columns, swim lanes and empty-column rule. `bind(view)` keeps it in step with a record view; a
27
+ `locked` field is offered neither to hide nor to move; the panel's own `fields` act as the
28
+ allow-list when bound.
29
+ - `ListToolbar` view presets `table | list | cards | gallery | board`, with bundled glyphs
30
+ `table`, `image`, `columns`, and `type`, `hash`, `mail`, `link-2`, `circle-chevron-down` for
31
+ field types.
32
+ - `Filter`: fields take an `icon` shown in the searchable picker; choice icons are drawn; a
33
+ many-valued operator on fixed choices uses a `TagPicker`; compact rows show their group's
34
+ and/or as a pill that switches the logic; `withinLast` / `withinNext` take an amount and a unit.
35
+ - A default English message catalogue in core (`defaultMessages`): `msg(key)` resolves the
36
+ instance table, the host translator, the class defaults, then the catalogue, so no raw key
37
+ reaches the screen without a translator. A test keeps it complete against every key in `src/`.
38
+ - `src/core/overlay-stack.js` — one registry of open overlays with the z-order, Escape routing
39
+ to the topmost layer, and the outside-press test along the opener chain; `Modal`, `Sheet`,
40
+ `Dropdown`, `MenuButton`, `ContextMenu`, `Tooltip`, `Message`, `Launcher` and the rail flyouts
41
+ use it.
42
+ - `Table`: the APG grid and treegrid keyboard model — arrows, Home/End, Page keys, Enter to
43
+ activate, Space and Shift+Arrow to select, Ctrl/Cmd+A — on tables that are `selectable`,
44
+ editable, hierarchical, listen for `rowclick`, or set `interactive: true`; focus kept by row id
45
+ across data changes; `label` / `labelledBy` for the grid's name; row controls named by the row's
46
+ first text cell; 24px targets on checkboxes and sort buttons.
47
+ - `RecordView.getFieldControls()` and `mountFieldControls(target)`; `KanbanView` honours
48
+ `fieldControls.target`; `ListToolbar.bind()` mounts the chooser through them.
49
+ - `MenuButton.toggle()`; `Select.get()`; `Field` `readonly` and `setReadonly()`;
50
+ `FilterPanel` `timeZone`; `dataFilterStateToFilters(state, defs, { timeZone })`; the ZeyOS
51
+ bindings' `load({ replace, pageSize })` and `pageSize` getter; `rovingTabindex` `rtl: 'auto'`;
52
+ `--zx-surface-shadow`.
53
+ - `Pagination` and `Search`: the summary and page size sit at the start of the bar, the pager at
54
+ the end; the search input fills a stretched field so the submit glyph stays on its trailing
55
+ edge.
56
+
57
+ ### Changed
58
+
59
+ - Geometry tokens (control sizes, blur, filters) are declared on `:root` only; the theme blocks
60
+ carry colours. A nested light region no longer resets an application's `--zx-control-height`.
61
+ - Every `outline: 0` in the stylesheets became `outline-color: transparent`, and `base.css` draws a
62
+ solid `Highlight` outline on `:focus-visible` under forced colors.
63
+ - The token lint covers `icons.css`, flags tier-1 accent, module and shadow names in component and
64
+ layout CSS, modern colour functions, raw colours in `var()` fallbacks, and outline suppression.
65
+ - A host translator now takes precedence over a class's own `defaults.msg`, which makes `Field`,
66
+ `Form` and `Questionnaire` translatable; a translator that returns the key counts as no answer.
67
+ - `Calendar` message keys are namespaced (`calendar.next`, `calendar.today`, …); the bare keys are
68
+ still honoured for one version.
69
+ - Light dismiss stops at the first overlay that contains the press: a press in the upper of two
70
+ light-dismiss sheets no longer closes the lower one. Anchored popups and toast regions are hosted
71
+ inside the open dialog their anchor sits in.
72
+ - The ZeyOS `zeyosTable` / `zeyosView` bindings share one loader; an invalid page or page size
73
+ throws a `RangeError` and non-object filters a `TypeError` where they used to clamp, and a
74
+ rejected call changes nothing. `Pagination`'s documentation shows the real mapping
75
+ (`offset = (page - 1) * pageSize`, `load({ page: page - 1, replace: true })`).
76
+ - `Field`'s `code` type reports `change` on commit and `input` on every keystroke.
77
+ - `Fieldset.addField()` writes with the caller's options; a component's own `change` listeners
78
+ hear a non-silent `setValues()`.
79
+
80
+ ### Fixed
81
+
82
+ - Menus, dropdowns, context menus, rail flyouts and toasts were inert while a modal `Dialog` or
83
+ `Sheet` was open; a non-modal `Sheet` closed itself when an item was chosen in a menu inside it,
84
+ and Escape closed the sheet while leaving its dropdown open; an Escape another control handled is
85
+ ignored; a `Dropdown` panel is reachable with Tab, and Tab out of a panel holding a `Select` or a
86
+ roving toolbar lands after the trigger.
87
+ - `AccountMenu.toggle()` threw.
88
+ - `Table`, `CardView` and `DataFilter` showed raw message keys without a translator.
89
+ - `Table` rows were not focusable, so `rowclick` and single selection were mouse-only; re-rendering
90
+ a table scrolled the page back to it.
91
+ - `Fieldset.addField()` could not read, write or disable `get()/set()` components.
92
+ - `Field` emitted `change` twice for `slider` and `code`.
93
+ - Focus dropped to `<body>` after moving a field in the record-view chooser and after every
94
+ `FileList.updateItem()`; `ActivityList` had the same fault. The move is announced and Escape
95
+ closes the chooser.
96
+ - `rovingTabindex` took ArrowLeft/Right/Home/End from text fields inside a `Toolbar`, and missed a
97
+ disabled `<fieldset>` around its items.
98
+ - `FilterPanel` and the ZeyOS query conversion used the browser's local midnight for dates; both
99
+ take the instance time zone.
100
+ - `--zx-shadow-1`, a tier-1 token, was used by three components; `MasterPanel` wrote a module
101
+ accent property nothing read.
102
+ - The layout icon pack no longer shadows bundled glyphs.
103
+
104
+ ### Website
105
+
106
+ - **Record collection**, a new screen pattern: one toolbar over the same records as a table, a
107
+ list, cards, a gallery and a board; dynamic filters as editable chips with all/any matching and
108
+ a Filters drawer holding the expression editor, kept in step both ways; a View settings drawer
109
+ bound to the current presentation, with the board's axes resolved so columns and swim lanes
110
+ never share a field; grouping, saved views, a stage facet, bulk actions, a workspace switcher at
111
+ the head of the module strip, and the pager. Keys: 1–5 views, F and V for the drawers, / for
112
+ search, N for a new record, ? for the sheet.
113
+ - The contributor notes gain a library consistency review, repository-only, with the defects above
114
+ and a staged programme for the remaining redundancies and inconsistencies.
115
+
116
+ ## 5.1.0 — 2026-10-22
117
+
118
+ ### Added
119
+
120
+ - **`ModuleBar`** — the module level of an application: one colour-coded tile per module in a
121
+ vertical strip or a horizontal bar. Modules take a theme `tone` or any CSS `color`, and draw as
122
+ `tint` (default), `solid` (the classic identity tile), or `plain`; `labels: 'below'` prints names
123
+ under the tiles, `labels: 'beside'` beside them as a navigation column of its own, and
124
+ `setLabels()` switches between the two; a section of modules is a heading over them, or a rule
125
+ between groups on an icon strip. A module's children open as a flyout menu, or (`menus: 'none'`) are left to a
126
+ panel the application owns, with `setExpanded()`, `aria-expanded`, and `aria-controls`. Modules
127
+ that do not fit, or are not `pinned`, are under an "All modules" catalogue — grouped, filterable,
128
+ arrow-navigable — while the current module stays on the bar. One Tab stop, arrow keys, Home/End,
129
+ and type-ahead; `setBadge()` updates a count in place; `partitionModules()` and
130
+ `resolveModuleColor()` are exported.
131
+ - **`AppSidebar` sections** — `{ section: true, label, actions, children }` is a quiet heading over
132
+ rows at its own level, so one sidebar replaces several stacked ones: one landmark, one keyboard
133
+ sequence, and on a rail a separator.
134
+ - **`AppSidebar` `layout: 'modules'`** — the top level becomes a `ModuleBar` strip beside a panel
135
+ with one module's menu, plus that module's own `header` and `content`. Choosing a module fires a
136
+ cancelable `modulechange`; `setModule()`, `getModule()`, `setBadge()`, `setModuleLabels()`, and
137
+ `moduleBar` presentation options. Three presentations — both menus expanded, the module menu
138
+ collapsed to icons beside the side menu, or both collapsed with every menu as a flyout — and a
139
+ small three-way switch at the foot of the strip to choose between them (`presentations`,
140
+ `presentation`, `getPresentation()`, `setPresentation()`, `togglePresentation()`,
141
+ `presentationchange`).
142
+ - **ZeyOS module bar** — `zeyosModuleItems()`, `buildZeyosModuleBarConfig()`,
143
+ `buildZeyosAppSidebarConfig()`, and `zeyosModuleBar()` build both from the launcher's shell
144
+ state plus each module's menu and badges, in the ZeyOS identity colours.
145
+ - `AccountMenu.setCompact()` switches between the avatar alone and the avatar with name and role.
146
+ - **Menu choices** — a `{type: 'choice', label, value, options, onselect}` entry in `MenuButton`
147
+ and `AccountMenu` items: a setting chosen in place as a small segmented group of
148
+ `menuitemradio` options, the menu staying open. `AppSidebar`'s `presentationChoice()` returns
149
+ its layout switch as one, `presentationGlyph()` draws its pictograms, and
150
+ `presentationSwitch: false` takes the switch off the strip.
151
+ - `--zx-color-tone-{blue,…,slate}-solid`, solid identity fills the white icon glyph reads on in
152
+ both themes, and `AppIcon`'s `tone` option that uses them.
153
+ - A `grid` (`table-cells-large`) icon in the bundled set.
154
+
155
+ ### Fixed
156
+
157
+ - `position()` adds its name to the anchor's `anchor-name` list and removes only its own, so a
158
+ tooltip and a menu on one trigger no longer overwrite each other — a keyboard-opened rail flyout
159
+ appeared at the page origin.
160
+ - `AppRail`: a tile's tooltip stays quiet while its flyout is open, so the first Escape closes the
161
+ flyout, and on a vertical rail ArrowLeft leaves a top-level flyout for its tile.
162
+
163
+ ### Website
164
+
165
+ - Every layout with a navigation column now shares one suite navigation: the Zx mark, the ACME
166
+ modules under their headings, the signed-in user, and the layout's own menu. The account menu
167
+ opens above the account and holds the layout — both menus expanded, the module menu collapsed,
168
+ or both collapsed — and the theme — light, dark, or system — each a three-way choice; Mod+B
169
+ steps through the layouts, and the choice is remembered. Below 1440px the module menu keeps
170
+ its labels off, between 860 and 1180px both menus start collapsed, and below that the navigation
171
+ is a drawer; choosing another module's screen opens that layout, and each layout's menu ends with
172
+ a "More in <module>" section leading to its sibling layouts.
173
+ - The fictional company the layouts share is now called ACME.
174
+
11
175
  ## 5.0.0 — 2026-10-09
12
176
 
13
177
  Xenon now has one geometry and a quieter finish. The cozy and compact view modes are gone; in their
package/README.md CHANGED
@@ -177,7 +177,8 @@ ZeyOS binding — see `src/zeyos/modules.js`.
177
177
  | `MasterPanel` | Full-height application panel with fixed header actions and footer. |
178
178
  | `Tabbox` | APG tabs in four appearances, with lazy content, closing, badges, and disabled states. |
179
179
  | `NavigationBar` | Responsive application navigation with optional tab panels and overflow. |
180
- | `AppSidebar` | Expanded or minimized vertical application navigation plus horizontal rails; descendants are inline only while expanded. |
180
+ | `AppSidebar` | Expanded or minimized vertical application navigation plus horizontal rails; descendants are inline only while expanded. Sections group a tree; `layout: 'modules'` puts a module strip beside one module's menu. |
181
+ | `ModuleBar` | Colour-coded module tiles in a strip or bar: flyout menus, live badges, one Tab stop, and an "All modules" catalogue for what does not fit. |
181
182
  | `Toolbar` | APG toolbar: one tab stop, arrow-key movement, and overflow into a menu. |
182
183
  | `SplitView` | Resizable two-pane split with a keyboard-operable separator. |
183
184
  | `Stepper` | Linear multi-step progress with completed, active, and error states. |
@@ -126,6 +126,14 @@ export declare class AccountMenu extends Component<AccountMenuOptions> {
126
126
  isOpen(): boolean;
127
127
  /** Replaces account presentation without touching session state. @param {AccountIdentity} account @returns {this} */
128
128
  setAccount(account: AccountIdentity): this;
129
+ /**
130
+ * Shows the avatar alone or the avatar with the name and secondary line — for a navigation
131
+ * column that narrows to icons and widens again. The trigger keeps its full accessible name
132
+ * either way.
133
+ * @param {boolean} compact
134
+ * @returns {this}
135
+ */
136
+ setCompact(compact: boolean): this;
129
137
  /** Replaces account actions. @param {MenuButtonItem[]} items @returns {this} */
130
138
  setItems(items: MenuButtonItem[]): this;
131
139
  /** Focuses the account trigger. @returns {this} */
@@ -178,8 +178,16 @@ export declare class ActivityList extends Component<ActivityListOptions> {
178
178
  setLoading(loading: boolean): this;
179
179
  /** Restores an enhanced target exactly, or removes an owned list. @returns {void} */
180
180
  destroy(): void;
181
- /** @private @returns {void} */
181
+ /**
182
+ * Rebuilds the list. Items are regrouped on every mutation, so the rows are new; focus that sat
183
+ * on an item's control is put back on the same control of the same activity (matched by `id`,
184
+ * else by position), so a live feed prepending entries does not throw the reader to `<body>`.
185
+ * @private
186
+ * @returns {void}
187
+ */
182
188
  private _renderList;
189
+ /** @private @returns {void} */
190
+ private _renderItems;
183
191
  /** @private @param {ActivityGroup} group @param {boolean} grouped @returns {HTMLElement} */
184
192
  private _createGroup;
185
193
  /** @private @param {boolean} placeholders @returns {HTMLElement} */
@@ -1,13 +1,22 @@
1
1
  import { Component } from '../../core/component.js';
2
+ export type AppIconTone = 'blue' | 'teal' | 'green' | 'amber' | 'orange' | 'red' | 'pink' | 'violet' | 'slate';
3
+ /** @typedef {'blue'|'teal'|'green'|'amber'|'orange'|'red'|'pink'|'violet'|'slate'} AppIconTone */
4
+ /** The categorical tones a `tone` option accepts. @type {ReadonlyArray<AppIconTone>} */
5
+ export declare const APP_ICON_TONES: ReadonlyArray<AppIconTone>;
2
6
  export type AppIconOptions = {
3
7
  /**
4
8
  * Icon name, node, or lazy renderer.
5
9
  */
6
10
  icon?: string | Node | (() => string | Node) | null;
7
11
  /**
8
- * Identity colour; falls back to the accent colour.
12
+ * Identity colour, any CSS colour; takes precedence over `tone`.
9
13
  */
10
14
  color?: string | null;
15
+ /**
16
+ * Categorical identity colour from the theme's tone palette,
17
+ * drawn with its `--zx-color-tone-<tone>-solid` fill. Without `color` or `tone` the icon takes the accent.
18
+ */
19
+ tone?: AppIconTone | null;
11
20
  /**
12
21
  * Edge length in pixels or any CSS length.
13
22
  */
@@ -44,7 +53,9 @@ export type AppIconOptions = {
44
53
  /**
45
54
  * @typedef {Object} AppIconOptions
46
55
  * @property {string|Node|(()=>string|Node)|null} [icon=null] Icon name, node, or lazy renderer.
47
- * @property {string|null} [color=null] Identity colour; falls back to the accent colour.
56
+ * @property {string|null} [color=null] Identity colour, any CSS colour; takes precedence over `tone`.
57
+ * @property {AppIconTone|null} [tone=null] Categorical identity colour from the theme's tone palette,
58
+ * drawn with its `--zx-color-tone-<tone>-solid` fill. Without `color` or `tone` the icon takes the accent.
48
59
  * @property {number|string} [size=36] Edge length in pixels or any CSS length.
49
60
  * @property {number|string} [iconSize='52%'] Glyph size.
50
61
  * @property {string|null} [label=null] Accessible image label; null makes the icon decorative.
@@ -65,6 +76,7 @@ export declare class AppIcon extends Component<AppIconOptions> {
65
76
  _state: {
66
77
  icon?: string | Node | (() => string | Node) | null;
67
78
  color?: string | null;
79
+ tone?: AppIconTone | null;
68
80
  size?: number | string;
69
81
  iconSize?: number | string;
70
82
  label?: string | null;