@zoobzio/nuxt 0.0.15 → 0.1.1

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 CHANGED
@@ -141,20 +141,22 @@ one, and the wrapper's default fills in while it does not. A fixed role
141
141
  draws its alias: `expand` after a select's, multi select's, or
142
142
  accordion's trigger and as a tree branch's toggle; `prev` and `next` on
143
143
  the calendars and pickers and `calendar` on a picker's trigger; `search`
144
- before a command's filter; `remove` on a tag's and a file's remove
144
+ before a command's filter and before the autocomplete's text option, the
145
+ one that opens the quote free text is typed in; `remove` on a tag's and a file's remove
145
146
  button and after an autocomplete chip's label; `close` on a toast's; `top` on a scroller's back-to-top; `check`
146
147
  in a checkbox; the editor's and rich text's tools by key (`bold`,
147
148
  `heading`, `bullet-list`, `undo`, …, see `EDITOR_TOOL_ICONS`); and on
148
149
  the table and browser, `refresh`, `columns`, `actions`, `drag`,
149
150
  `sort-asc` or `sort-desc` after a sorted header, `folder` before a
150
151
  folder, `magic` before the table's search, `next` after an autocomplete
151
- option that enters a stage (a field or an operator) and `expand` after the
152
- active trail option whose stage is open, and the pagination's `first`,
152
+ option that enters a stage (a field, an operator or the text option) and
153
+ `expand` after the active trail option whose stage is open, and the pagination's `first`,
153
154
  `prev`, `next`, and `last`. The table's search renders through the
154
155
  layer's `TableSearch`: its Autocomplete with the `magic` icon in
155
- `inputPrepend`, the search key (`TABLE_SEARCH_KEY`, `/`) as a `kbd` in
156
- `inputAppend`, and that key focusing the input from anywhere on the page
157
- the user is not already typing, through `useFocusKey`. A slot
156
+ `inputPrepend` at the front of the field, before its chips, the search
157
+ key (`TABLE_SEARCH_KEY`, `/`) as a `kbd` in `inputAppend`, and that key
158
+ focusing the input from anywhere on the page the user is not already
159
+ typing, through `useFocusKey`. A slot
158
160
  that replaces a Fab renders the part with the icon as its content, so the
159
161
  label stays the button's `aria-label` and the visible text goes. The
160
162
  facets', keywords', and date filters' triggers draw `filter`, `keywords`,
package/app/app.d.ts CHANGED
@@ -44,10 +44,16 @@ declare module "@zoobzio/vue/types/components/facets" {
44
44
  }
45
45
  }
46
46
 
47
+ // A column's `icon` is drawn before its header, and carried onto its query
48
+ // field by the table and onto its column-manager option by the vue table,
49
+ // so the search and the manager draw it beside the column's label.
47
50
  declare module "@zoobzio/table" {
48
51
  interface ActionDescriptor {
49
52
  icon?: IconAlias;
50
53
  }
54
+ interface DataTableColumn<T> {
55
+ icon?: IconAlias;
56
+ }
51
57
  }
52
58
 
53
59
  // A query field's `icon` is carried onto its option by the service, so the
@@ -1,10 +1,12 @@
1
1
  // The vue autocomplete with the layer's Scroller as the viewport of its
2
- // active panel, the `remove` icon after each chip's label (the chip is the
3
- // button that removes its entry), an option's `icon` before its label, and
4
- // an arrow after an option that branches: `next` on a field or operator
5
- // option, as selecting it enters a stage, and `expand` on an active trail
6
- // option, as its stage is the one open. A value option commits, so it
7
- // draws no arrow.
2
+ // first panel (the active panel renders with no scroller once a group has
3
+ // an option set), the `remove` icon after each chip's label (the chip is the
4
+ // button that removes its entry), an option's `icon` before its label, the
5
+ // `search` icon before the text option (the one that opens the quote free
6
+ // text is typed in), and an arrow after an option that branches: `next` on
7
+ // a field, operator or text option, as selecting it enters a stage, and
8
+ // `expand` on an active trail option, as its stage is the one open. A value
9
+ // option commits, so it draws no arrow.
8
10
  import type { QueryOption } from "@zoobzio/vue/types/components/autocomplete";
9
11
  import type { VNode } from "vue";
10
12
 
@@ -14,6 +16,9 @@ import { icon, iconOf } from "./icon";
14
16
  import { wrap } from "@zoobzio/vue/utils/wrap";
15
17
  import Scroller from "./scroller";
16
18
 
19
+ const lead = (option: QueryOption): VNode[] =>
20
+ option.stage === "text" ? [icon("search")] : iconOf(option.icon);
21
+
17
22
  const arrow = (option: QueryOption): VNode[] => {
18
23
  if (option.stage === "value") return [];
19
24
  return [icon(option.active ? "expand" : "next")];
@@ -23,7 +28,7 @@ export default wrap(Core, {
23
28
  pt: { viewport: { as: Scroller } },
24
29
  slots: {
25
30
  chipAppend: () => [icon("remove")],
26
- itemPrepend: ({ option }) => iconOf(option.icon),
31
+ itemPrepend: ({ option }) => lead(option),
27
32
  itemArrow: ({ option }) => arrow(option),
28
33
  },
29
34
  });
@@ -5,8 +5,9 @@
5
5
  // Autocomplete with the `magic` icon, the `/` key hint, and the `/` key
6
6
  // focusing it) as the search, and the layer's Pagination.
7
7
  // Its Fab slots draw the `refresh`, `columns`, and `actions` icons; the
8
- // head draws `drag` on each handle and `sort-asc` or `sort-desc` after a
9
- // sorted header; a bulk action draws its own `icon`.
8
+ // head draws `drag` on each handle, a column's own `icon` before its
9
+ // header, and `sort-asc` or `sort-desc` after a sorted header; a bulk action
10
+ // draws its own `icon`.
10
11
  import type { TableBodyPassthrough } from "@zoobzio/vue/types/components/table-body";
11
12
  import type { TableColumnsPassthrough } from "@zoobzio/vue/types/components/table-columns";
12
13
  import type { TableHeadPassthrough } from "@zoobzio/vue/types/components/table-head";
@@ -45,6 +46,7 @@ export default wrap(Core, {
45
46
  columns: ({ settings }) => iconPart(settings.trigger, "columns"),
46
47
  actions: ({ settings }) => iconPart(settings.actionsTrigger, "actions"),
47
48
  dragPrepend: () => [icon("drag")],
49
+ headerPrepend: ({ column }) => iconOf(column.icon),
48
50
  headerAppend: ({ table, column }) =>
49
51
  table.isSorted(column)
50
52
  ? [icon(table.sortDirection === "asc" ? "sort-asc" : "sort-desc")]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zoobzio/nuxt",
3
- "version": "0.0.15",
3
+ "version": "0.1.1",
4
4
  "description": "Nuxt layer for the foundation design system: the Nuxt wiring over @zoobzio/vue and the headless services (useState stores, hook-bus factories, app shell).",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -44,15 +44,15 @@
44
44
  "objectively": "^0.3.0",
45
45
  "reka-ui": "^2.6.0",
46
46
  "untheme": "^0.6.1",
47
- "@zoobzio/browser": "0.0.15",
48
- "@zoobzio/editor": "0.0.15",
49
- "@zoobzio/form": "0.0.15",
50
- "@zoobzio/icons": "0.0.15",
51
- "@zoobzio/code": "0.0.15",
52
- "@zoobzio/query": "0.0.15",
53
- "@zoobzio/table": "0.0.15",
54
- "@zoobzio/theme": "0.0.15",
55
- "@zoobzio/vue": "0.0.15"
47
+ "@zoobzio/browser": "0.1.1",
48
+ "@zoobzio/code": "0.1.1",
49
+ "@zoobzio/editor": "0.1.1",
50
+ "@zoobzio/form": "0.1.1",
51
+ "@zoobzio/icons": "0.1.1",
52
+ "@zoobzio/table": "0.1.1",
53
+ "@zoobzio/query": "0.1.1",
54
+ "@zoobzio/vue": "0.1.1",
55
+ "@zoobzio/theme": "0.1.1"
56
56
  },
57
57
  "devDependencies": {
58
58
  "@codemirror/state": "^6.7.6",