@dumiflex/wp-kit 0.9.0 → 0.10.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.
- package/CHANGELOG.md +12 -0
- package/package.json +1 -1
- package/src/Chip.vue +42 -1
- package/src/Combobox.vue +9 -0
- package/src/tokens.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.10.0](https://github.com/DumiFlex/wp-kit/compare/v0.9.0...v0.10.0) (2026-11-03)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* Combobox mono, for variable names and ids ([e9ddc4f](https://github.com/DumiFlex/wp-kit/commit/e9ddc4f7a5c78e1a2f2adfe8d69046f771d95840))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* Chip carries its own base styles, so it is styled on the ComfyUI canvas ([5d81a79](https://github.com/DumiFlex/wp-kit/commit/5d81a791010a9a72c5491dfc08cc1ed44af1b25f))
|
|
14
|
+
|
|
3
15
|
## [0.9.0](https://github.com/DumiFlex/wp-kit/compare/v0.8.0...v0.9.0) (2026-11-03)
|
|
4
16
|
|
|
5
17
|
|
package/package.json
CHANGED
package/src/Chip.vue
CHANGED
|
@@ -129,6 +129,47 @@ function onRemove(e: MouseEvent) {
|
|
|
129
129
|
</template>
|
|
130
130
|
|
|
131
131
|
<style scoped>
|
|
132
|
+
/* The base pill, its tones, dot and ✕ live here too, not only in the page
|
|
133
|
+
theme (theme/tokens.css), so a Chip on the ComfyUI canvas, which never
|
|
134
|
+
loads that sheet, is styled the same. Shared tokens only. */
|
|
135
|
+
.wp-chip {
|
|
136
|
+
display: inline-flex; align-items: center; gap: 4px;
|
|
137
|
+
padding: 1px 7px;
|
|
138
|
+
border: 1px solid var(--wp-border);
|
|
139
|
+
border-radius: var(--wp-radius-cap, 999px);
|
|
140
|
+
background: var(--wp-bg-3);
|
|
141
|
+
color: var(--wp-text-muted);
|
|
142
|
+
font-family: var(--wp-font-sans);
|
|
143
|
+
font-size: 10.5px;
|
|
144
|
+
font-weight: 500;
|
|
145
|
+
white-space: nowrap;
|
|
146
|
+
}
|
|
147
|
+
.wp-chip--accent {
|
|
148
|
+
color: var(--wp-accent-text-strong);
|
|
149
|
+
background: color-mix(in oklab, var(--wp-accent-500) 16%, transparent);
|
|
150
|
+
border-color: color-mix(in oklab, var(--wp-accent-500) 38%, transparent);
|
|
151
|
+
}
|
|
152
|
+
.wp-chip--success { color: var(--wp-success); background: color-mix(in oklab, var(--wp-success) 14%, transparent); border-color: color-mix(in oklab, var(--wp-success) 36%, transparent); }
|
|
153
|
+
.wp-chip--warn { color: var(--wp-warn); background: color-mix(in oklab, var(--wp-warn) 14%, transparent); border-color: color-mix(in oklab, var(--wp-warn) 36%, transparent); }
|
|
154
|
+
.wp-chip--danger { color: var(--wp-danger); background: color-mix(in oklab, var(--wp-danger) 14%, transparent); border-color: color-mix(in oklab, var(--wp-danger) 36%, transparent); }
|
|
155
|
+
.wp-chip--info { color: var(--wp-info); background: color-mix(in oklab, var(--wp-info) 14%, transparent); border-color: color-mix(in oklab, var(--wp-info) 36%, transparent); }
|
|
156
|
+
.wp-chip__dot { width: 7px; height: 7px; border-radius: var(--wp-radius-cap, 999px); background: currentColor; }
|
|
157
|
+
.wp-chip__close {
|
|
158
|
+
position: relative; display: inline-grid; place-items: center;
|
|
159
|
+
width: 12px; height: 12px; margin: 0 -2px 0 1px; padding: 0;
|
|
160
|
+
border: none; border-radius: 0; background: none;
|
|
161
|
+
color: inherit; opacity: 0.65; cursor: pointer; line-height: 0;
|
|
162
|
+
transition: opacity var(--wp-motion-quick) ease;
|
|
163
|
+
}
|
|
164
|
+
.wp-chip__close::after { content: ""; position: absolute; inset: -4px; }
|
|
165
|
+
.wp-chip__close:hover { opacity: 1; }
|
|
166
|
+
.wp-chip__close:focus-visible { outline: 2px solid var(--wp-accent-500); outline-offset: 1px; border-radius: min(2px, var(--wp-radius-cap, 999px)); opacity: 1; }
|
|
167
|
+
.wp-chip--color { font-weight: 500; }
|
|
168
|
+
/* A bordered pill on the canvas: a radius a hair under half its height, so
|
|
169
|
+
Firefox draws it in one piece at ComfyUI's zooms (0.64, 0.8). */
|
|
170
|
+
.wp-chip--xs { border-radius: min(9px, var(--wp-radius-cap, 999px)); }
|
|
171
|
+
.wp-chip--sm { border-radius: min(calc(var(--wp-control-h-sm) / 2 - 1px), var(--wp-radius-cap, 999px)); }
|
|
172
|
+
.wp-chip--md { border-radius: min(calc(var(--wp-control-h-md) / 2 - 1px), var(--wp-radius-cap, 999px)); }
|
|
132
173
|
/* xs is the base `.wp-chip` in theme/tokens.css, held at 20px here: its
|
|
133
174
|
content height was 19.2px, which put every icon half a pixel off. */
|
|
134
175
|
.wp-chip--xs { box-sizing: border-box; height: 20px; }
|
|
@@ -207,7 +248,7 @@ function onRemove(e: MouseEvent) {
|
|
|
207
248
|
}
|
|
208
249
|
.wp-chip__stat-n {
|
|
209
250
|
font-size: var(--wp-text-xl);
|
|
210
|
-
font-weight:
|
|
251
|
+
font-weight: 600;
|
|
211
252
|
font-variant-numeric: tabular-nums;
|
|
212
253
|
line-height: 1.2;
|
|
213
254
|
}
|
package/src/Combobox.vue
CHANGED
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
* <Combobox v-model="model" :options="models" aria-label="Model" />
|
|
11
11
|
* <Combobox v-model="cats" multiple :options="categories" aria-label="Categories" />
|
|
12
12
|
*
|
|
13
|
+
* `mono` sets the box and the options in the mono font (variable names, ids).
|
|
14
|
+
*
|
|
13
15
|
* APG "combobox with list autocomplete": focus stays in the text field and
|
|
14
16
|
* the lit option is named by aria-activedescendant.
|
|
15
17
|
*/
|
|
@@ -33,6 +35,8 @@ const props = withDefaults(defineProps<{
|
|
|
33
35
|
emptyText?: string | undefined;
|
|
34
36
|
/** How many options the list shows at once (it scrolls past that). */
|
|
35
37
|
limit?: number | undefined;
|
|
38
|
+
/** The box and the options in the mono font (variable names, ids). */
|
|
39
|
+
mono?: boolean | undefined;
|
|
36
40
|
}>(), {
|
|
37
41
|
multiple: false, placeholder: "Choose…", size: "md", ariaLabel: "Choose",
|
|
38
42
|
clearable: false, emptyText: "No matches", limit: 50,
|
|
@@ -186,6 +190,7 @@ function setOpen(v: boolean): void {
|
|
|
186
190
|
:data-multiple="multiple || undefined"
|
|
187
191
|
:data-disabled="disabled || undefined"
|
|
188
192
|
:data-invalid="invalid || undefined"
|
|
193
|
+
:data-mono="mono || undefined"
|
|
189
194
|
@click="inputEl?.focus(); wanted = true"
|
|
190
195
|
>
|
|
191
196
|
<template v-if="multiple">
|
|
@@ -238,6 +243,7 @@ function setOpen(v: boolean): void {
|
|
|
238
243
|
role="listbox"
|
|
239
244
|
:aria-label="`${ariaLabel} choices`"
|
|
240
245
|
:aria-multiselectable="multiple || undefined"
|
|
246
|
+
:data-mono="mono || undefined"
|
|
241
247
|
>
|
|
242
248
|
<!-- Options are lit with aria-activedescendant; the text field keeps focus and the keys. -->
|
|
243
249
|
<!-- eslint-disable-next-line vuejs-accessibility/click-events-have-key-events, vuejs-accessibility/interactive-supports-focus -->
|
|
@@ -324,4 +330,7 @@ function setOpen(v: boolean): void {
|
|
|
324
330
|
@media (prefers-reduced-motion: reduce) {
|
|
325
331
|
.wp-combo { transition: none; }
|
|
326
332
|
}
|
|
333
|
+
/* mono: names and ids read in the mono font, in the box and the list. */
|
|
334
|
+
.wp-combo[data-mono] .wp-combo__field, .wp-combo[data-mono] .wp-combo__chip-text,
|
|
335
|
+
.wp-combo__list[data-mono] .wp-combo__opt-text { font-family: var(--wp-font-mono); }
|
|
327
336
|
</style>
|
package/src/tokens.ts
CHANGED
|
@@ -57,7 +57,7 @@ export const LOCAL_TOKENS = ["--wp-hsv-hue", "--wp-lm-o", "--wp-select-line-h",
|
|
|
57
57
|
/** Pieces that need a page with src/theme/ loaded (not the canvas). */
|
|
58
58
|
export const PAGE_PIECES = [
|
|
59
59
|
"axis-color.ts", "kind-colour.ts", "matrix-axis.ts", "BundleMeta.vue", "ConstraintMatrixPreview.vue", "PostCard.vue", "TokenizedValue.vue",
|
|
60
|
-
"Card.vue", "
|
|
60
|
+
"Card.vue", "ChoiceCards.vue",
|
|
61
61
|
"DataTable.vue", "Drawer.vue", "EmptyState.vue", "Field.vue", "Icon.vue", "Input.vue",
|
|
62
62
|
"ListFilter.vue", "RelativeDate.vue", "Select.vue", "Textarea.vue", "ToastHost.vue",
|
|
63
63
|
// The payload previews and post loading shapes (community post pages).
|