@zoobzio/nuxt 0.1.1 → 0.1.2
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 +8 -5
- package/app/app.d.ts +6 -2
- package/app/components/autocomplete.ts +9 -8
- package/package.json +10 -10
package/README.md
CHANGED
|
@@ -141,15 +141,17 @@ 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 and before
|
|
145
|
-
|
|
144
|
+
before a command's filter and before an autocomplete literal option that
|
|
145
|
+
names no icon of its own (the text literal, the one that opens the quote
|
|
146
|
+
free text is typed in); `remove` on a tag's and a file's remove
|
|
146
147
|
button and after an autocomplete chip's label; `close` on a toast's; `top` on a scroller's back-to-top; `check`
|
|
147
148
|
in a checkbox; the editor's and rich text's tools by key (`bold`,
|
|
148
149
|
`heading`, `bullet-list`, `undo`, …, see `EDITOR_TOOL_ICONS`); and on
|
|
149
150
|
the table and browser, `refresh`, `columns`, `actions`, `drag`,
|
|
150
151
|
`sort-asc` or `sort-desc` after a sorted header, `folder` before a
|
|
151
152
|
folder, `magic` before the table's search, `next` after an autocomplete
|
|
152
|
-
option that enters a stage (a field
|
|
153
|
+
option that enters a stage (a field or an operator; a literal option is
|
|
154
|
+
terminal and draws none) and
|
|
153
155
|
`expand` after the active trail option whose stage is open, and the pagination's `first`,
|
|
154
156
|
`prev`, `next`, and `last`. The table's search renders through the
|
|
155
157
|
layer's `TableSearch`: its Autocomplete with the `magic` icon in
|
|
@@ -166,7 +168,7 @@ An item draws its own `icon`. The vue item types (`Option`, which the
|
|
|
166
168
|
tabs, segmented control, accordion, select, and command options extend,
|
|
167
169
|
plus `MenuItem`, `BreadcrumbItem`, `DirectoryItem`, and `FacetItem`), the
|
|
168
170
|
action descriptors of `@zoobzio/table` and `@zoobzio/browser`, and the
|
|
169
|
-
`Field` and `Option` of `@zoobzio/query` are
|
|
171
|
+
`Field`, `Literal`, and `Option` of `@zoobzio/query` are
|
|
170
172
|
interfaces, and `app/app.d.ts` widens each with an optional
|
|
171
173
|
`icon: IconAlias` by declaration merging, so the one type the package,
|
|
172
174
|
the layer, and the app share carries the field, and the wrapper draws it
|
|
@@ -174,7 +176,8 @@ in the item's `prepend` slot. A row, file, folder, or bulk action given to
|
|
|
174
176
|
`createTable` or `createBrowser` with an `icon` draws it the same way,
|
|
175
177
|
since the layer's `Menu` renders those actions. A query field with an
|
|
176
178
|
`icon` draws it before its option in the autocomplete's panel and trail,
|
|
177
|
-
|
|
179
|
+
and a literal with one before its option in the panel, since the query
|
|
180
|
+
service carries it onto the option.
|
|
178
181
|
|
|
179
182
|
```vue
|
|
180
183
|
<script setup lang="ts">
|
package/app/app.d.ts
CHANGED
|
@@ -56,12 +56,16 @@ declare module "@zoobzio/table" {
|
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
// A query field's `icon` is carried onto its option by the
|
|
60
|
-
// autocomplete draws it before the
|
|
59
|
+
// A query field's or literal's `icon` is carried onto its option by the
|
|
60
|
+
// service, so the autocomplete draws it before the label in the panel, and
|
|
61
|
+
// a field's in the trail. A literal that names none draws `search`.
|
|
61
62
|
declare module "@zoobzio/query" {
|
|
62
63
|
interface Field {
|
|
63
64
|
icon?: IconAlias;
|
|
64
65
|
}
|
|
66
|
+
interface Literal {
|
|
67
|
+
icon?: IconAlias;
|
|
68
|
+
}
|
|
65
69
|
interface Option {
|
|
66
70
|
icon?: IconAlias;
|
|
67
71
|
}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
// The vue autocomplete with the layer's Scroller as the viewport of its
|
|
2
2
|
// first panel (the active panel renders with no scroller once a group has
|
|
3
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,
|
|
5
|
-
// `search`
|
|
6
|
-
//
|
|
7
|
-
//
|
|
8
|
-
//
|
|
9
|
-
// option
|
|
4
|
+
// button that removes its entry), an option's `icon` before its label, with
|
|
5
|
+
// `search` before a literal option that names none (a literal is a value
|
|
6
|
+
// typed between its own characters, free text in quotes by default), and
|
|
7
|
+
// an arrow after an option that branches: `next` on a field or operator
|
|
8
|
+
// option, as selecting it enters a stage, and `expand` on an active trail
|
|
9
|
+
// option, as its stage is the one open. A value option commits and a
|
|
10
|
+
// literal option is terminal, so neither draws an arrow.
|
|
10
11
|
import type { QueryOption } from "@zoobzio/vue/types/components/autocomplete";
|
|
11
12
|
import type { VNode } from "vue";
|
|
12
13
|
|
|
@@ -17,10 +18,10 @@ import { wrap } from "@zoobzio/vue/utils/wrap";
|
|
|
17
18
|
import Scroller from "./scroller";
|
|
18
19
|
|
|
19
20
|
const lead = (option: QueryOption): VNode[] =>
|
|
20
|
-
option.stage === "
|
|
21
|
+
iconOf(option.icon ?? (option.stage === "literal" ? "search" : undefined));
|
|
21
22
|
|
|
22
23
|
const arrow = (option: QueryOption): VNode[] => {
|
|
23
|
-
if (option.stage === "value") return [];
|
|
24
|
+
if (option.stage === "value" || option.stage === "literal") return [];
|
|
24
25
|
return [icon(option.active ? "expand" : "next")];
|
|
25
26
|
};
|
|
26
27
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zoobzio/nuxt",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
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.1.
|
|
48
|
-
"@zoobzio/
|
|
49
|
-
"@zoobzio/
|
|
50
|
-
"@zoobzio/
|
|
51
|
-
"@zoobzio/icons": "0.1.
|
|
52
|
-
"@zoobzio/
|
|
53
|
-
"@zoobzio/
|
|
54
|
-
"@zoobzio/vue": "0.1.
|
|
55
|
-
"@zoobzio/
|
|
47
|
+
"@zoobzio/browser": "0.1.2",
|
|
48
|
+
"@zoobzio/editor": "0.1.2",
|
|
49
|
+
"@zoobzio/form": "0.1.2",
|
|
50
|
+
"@zoobzio/code": "0.1.2",
|
|
51
|
+
"@zoobzio/icons": "0.1.2",
|
|
52
|
+
"@zoobzio/query": "0.1.2",
|
|
53
|
+
"@zoobzio/theme": "0.1.2",
|
|
54
|
+
"@zoobzio/vue": "0.1.2",
|
|
55
|
+
"@zoobzio/table": "0.1.2"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@codemirror/state": "^6.7.6",
|