@keenmate/web-multiselect 1.12.0-rc07 → 2.0.0-rc01
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 +38 -16
- package/component-variables.manifest.json +1 -0
- package/custom-elements.json +6591 -0
- package/dist/index.d.ts +220 -298
- package/dist/multiselect.js +2597 -2248
- package/dist/multiselect.umd.js +28 -24
- package/dist/style.css +1 -1
- package/docs/examples.md +2 -2
- package/docs/usage.md +396 -339
- package/package.json +16 -4
- package/src/css/controls.css +10 -2
- package/src/css/floating.css +1 -0
- package/src/css/variables.css +29 -10
- package/vscode.css-custom-data.json +1615 -0
- package/vscode.html-custom-data.json +443 -0
- package/web-types.json +2113 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@keenmate/web-multiselect",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0-rc01",
|
|
4
4
|
"description": "Lightweight multiselect web component with typeahead search, rich content support, and excellent keyboard navigation",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/multiselect.umd.js",
|
|
@@ -22,6 +22,8 @@
|
|
|
22
22
|
"./manifest": "./component-variables.manifest.json",
|
|
23
23
|
"./component-variables.manifest.json": "./component-variables.manifest.json"
|
|
24
24
|
},
|
|
25
|
+
"customElements": "custom-elements.json",
|
|
26
|
+
"web-types": "web-types.json",
|
|
25
27
|
"sideEffects": [
|
|
26
28
|
"./dist/multiselect.js",
|
|
27
29
|
"./dist/multiselect.umd.js",
|
|
@@ -34,11 +36,16 @@
|
|
|
34
36
|
"docs/theming.md",
|
|
35
37
|
"docs/examples.md",
|
|
36
38
|
"docs/accessibility.md",
|
|
37
|
-
"component-variables.manifest.json"
|
|
39
|
+
"component-variables.manifest.json",
|
|
40
|
+
"custom-elements.json",
|
|
41
|
+
"web-types.json",
|
|
42
|
+
"vscode.html-custom-data.json",
|
|
43
|
+
"vscode.css-custom-data.json"
|
|
38
44
|
],
|
|
39
45
|
"scripts": {
|
|
40
46
|
"dev": "vite --port 12200",
|
|
41
|
-
"
|
|
47
|
+
"analyze": "cem analyze",
|
|
48
|
+
"build": "npm run clean:dist && npm run analyze && vite build",
|
|
42
49
|
"build:types": "tsc",
|
|
43
50
|
"build:full": "npm run build",
|
|
44
51
|
"preview": "vite preview",
|
|
@@ -61,7 +68,9 @@
|
|
|
61
68
|
"typeahead",
|
|
62
69
|
"autocomplete",
|
|
63
70
|
"web-component",
|
|
71
|
+
"web-components",
|
|
64
72
|
"custom-element",
|
|
73
|
+
"custom-elements",
|
|
65
74
|
"search",
|
|
66
75
|
"filter",
|
|
67
76
|
"keenmate"
|
|
@@ -77,7 +86,10 @@
|
|
|
77
86
|
"url": "https://github.com/keenmate/web-multiselect/issues"
|
|
78
87
|
},
|
|
79
88
|
"devDependencies": {
|
|
89
|
+
"@custom-elements-manifest/analyzer": "^0.11.0",
|
|
80
90
|
"@playwright/test": "^1.60.0",
|
|
91
|
+
"custom-element-jet-brains-integration": "^1.7.0",
|
|
92
|
+
"custom-element-vs-code-integration": "^1.5.0",
|
|
81
93
|
"flexsearch": "^0.8.212",
|
|
82
94
|
"happy-dom": "^15.11.7",
|
|
83
95
|
"rimraf": "^5.0.5",
|
|
@@ -87,6 +99,6 @@
|
|
|
87
99
|
"vitest": "^2.1.9"
|
|
88
100
|
},
|
|
89
101
|
"dependencies": {
|
|
90
|
-
"@
|
|
102
|
+
"@keenmate/web-components-core": "1.0.0-rc01"
|
|
91
103
|
}
|
|
92
104
|
}
|
package/src/css/controls.css
CHANGED
|
@@ -54,8 +54,15 @@
|
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
/* ==============================================================================
|
|
57
|
-
INPUT SIZE VARIANTS
|
|
58
|
-
==============================================================================
|
|
57
|
+
INPUT SIZE VARIANTS — currently unused (commented out)
|
|
58
|
+
==============================================================================
|
|
59
|
+
Preset size tiers for the input. Nothing toggles these .ms__input--* classes
|
|
60
|
+
(no `size` attribute is wired up), so they're inert. Commented out for now to
|
|
61
|
+
avoid dead theming surface — but kept, not deleted, because a future `size`
|
|
62
|
+
attribute could activate them as a named-preset API. We just haven't hit a case
|
|
63
|
+
that needs it yet. Until then, size via --ms-rem (global scale) or the individual
|
|
64
|
+
--ms-input-* vars (targeted overrides). Paired with the --ms-input-size-* var
|
|
65
|
+
chain in variables.css (also commented out).
|
|
59
66
|
|
|
60
67
|
.ms__input.ms__input--xs {
|
|
61
68
|
font-size: var(--ms-input-size-xs-font);
|
|
@@ -84,6 +91,7 @@
|
|
|
84
91
|
padding-right: calc(var(--ms-input-size-xl-padding-h) * 2.5);
|
|
85
92
|
height: var(--ms-input-size-xl-height);
|
|
86
93
|
}
|
|
94
|
+
*/
|
|
87
95
|
|
|
88
96
|
/* ==============================================================================
|
|
89
97
|
TOGGLE ICON
|
package/src/css/floating.css
CHANGED
|
@@ -43,6 +43,7 @@
|
|
|
43
43
|
border: var(--ms-dropdown-border);
|
|
44
44
|
border-radius: var(--ms-dropdown-border-radius);
|
|
45
45
|
box-shadow: var(--ms-dropdown-box-shadow);
|
|
46
|
+
width: var(--ms-dropdown-width); /* defaults to the live input width; themeable/attribute-overridable */
|
|
46
47
|
max-height: var(--ms-options-max-height);
|
|
47
48
|
overflow: hidden; /* Clips content to border-radius, inner container handles scrolling */
|
|
48
49
|
color: var(--ms-dropdown-text-color);
|
package/src/css/variables.css
CHANGED
|
@@ -176,13 +176,15 @@
|
|
|
176
176
|
|
|
177
177
|
/* Badge Semantic Variables */
|
|
178
178
|
--ms-badge-bg: var(--ms-accent-color-light);
|
|
179
|
-
|
|
179
|
+
/* Hover deepens the accent tint (dark-mode aware). Using --ms-input-bg here
|
|
180
|
+
made a light-blue badge go WHITE on hover — reading as "background lost". */
|
|
181
|
+
--ms-badge-bg-hover: var(--base-hover-bg, var(--ms-accent-color-light-hover));
|
|
180
182
|
--ms-badge-bg-active: var(--ms-accent-color-light-hover);
|
|
181
183
|
|
|
182
184
|
/* Badge Text Semantic Variables */
|
|
183
185
|
--ms-badge-text-bg: var(--ms-accent-color-light);
|
|
184
186
|
--ms-badge-text-color: var(--ms-accent-color);
|
|
185
|
-
--ms-badge-text-bg-hover: var(--base-hover-bg, var(--ms-
|
|
187
|
+
--ms-badge-text-bg-hover: var(--base-hover-bg, var(--ms-accent-color-light-hover));
|
|
186
188
|
--ms-badge-text-color-hover: var(--ms-badge-text-color);
|
|
187
189
|
|
|
188
190
|
/* Badge Remove Button Semantic Variables */
|
|
@@ -241,34 +243,41 @@
|
|
|
241
243
|
--ms-input-bg-disabled: rgba(107, 114, 128, 0.05);
|
|
242
244
|
|
|
243
245
|
/* ==========================================================================
|
|
244
|
-
INPUT SIZE VARIANTS
|
|
246
|
+
INPUT SIZE VARIANTS — currently unused (commented out)
|
|
245
247
|
==========================================================================
|
|
246
|
-
|
|
247
|
-
|
|
248
|
+
Preset size tiers (xs/sm/md/lg/xl) for the input. Read only by the
|
|
249
|
+
.ms__input--* classes in controls.css, which nothing toggles (no `size`
|
|
250
|
+
attribute), so this whole chain is inert. Commented out to drop dead theming
|
|
251
|
+
surface — kept, not deleted, in case a future `size` attribute turns it into a
|
|
252
|
+
named-preset API; no case has needed it yet. Size via --ms-rem (global) or the
|
|
253
|
+
individual --ms-input-* vars (targeted) instead. Heights reference
|
|
254
|
+
--base-input-size-*-height for cross-component consistency (px in parens):
|
|
255
|
+
|
|
248
256
|
--ms-input-size-xs-font: calc(var(--base-font-size-xs, 1.2) * var(--ms-rem));
|
|
249
257
|
--ms-input-size-xs-padding-v: calc(0.4 * var(--ms-rem));
|
|
250
258
|
--ms-input-size-xs-padding-h: calc(0.8 * var(--ms-rem));
|
|
251
|
-
--ms-input-size-xs-height: calc(var(--base-input-size-xs-height, 3.1) * var(--ms-rem));
|
|
259
|
+
--ms-input-size-xs-height: calc(var(--base-input-size-xs-height, 3.1) * var(--ms-rem)); (31px)
|
|
252
260
|
|
|
253
261
|
--ms-input-size-sm-font: calc(var(--base-font-size-sm, 1.4) * var(--ms-rem));
|
|
254
262
|
--ms-input-size-sm-padding-v: calc(0.5 * var(--ms-rem));
|
|
255
263
|
--ms-input-size-sm-padding-h: calc(1.0 * var(--ms-rem));
|
|
256
|
-
--ms-input-size-sm-height: calc(var(--base-input-size-sm-height, 3.3) * var(--ms-rem));
|
|
264
|
+
--ms-input-size-sm-height: calc(var(--base-input-size-sm-height, 3.3) * var(--ms-rem)); (33px)
|
|
257
265
|
|
|
258
266
|
--ms-input-size-md-font: calc(var(--base-font-size-sm, 1.4) * var(--ms-rem));
|
|
259
267
|
--ms-input-size-md-padding-v: calc(0.8 * var(--ms-rem));
|
|
260
268
|
--ms-input-size-md-padding-h: calc(1.2 * var(--ms-rem));
|
|
261
|
-
--ms-input-size-md-height: calc(var(--base-input-size-md-height, 3.5) * var(--ms-rem));
|
|
269
|
+
--ms-input-size-md-height: calc(var(--base-input-size-md-height, 3.5) * var(--ms-rem)); (35px)
|
|
262
270
|
|
|
263
271
|
--ms-input-size-lg-font: calc(var(--base-font-size-base, 1.6) * var(--ms-rem));
|
|
264
272
|
--ms-input-size-lg-padding-v: calc(1.0 * var(--ms-rem));
|
|
265
273
|
--ms-input-size-lg-padding-h: calc(1.4 * var(--ms-rem));
|
|
266
|
-
--ms-input-size-lg-height: calc(var(--base-input-size-lg-height, 3.8) * var(--ms-rem));
|
|
274
|
+
--ms-input-size-lg-height: calc(var(--base-input-size-lg-height, 3.8) * var(--ms-rem)); (38px)
|
|
267
275
|
|
|
268
276
|
--ms-input-size-xl-font: calc(var(--base-font-size-lg, 1.8) * var(--ms-rem));
|
|
269
277
|
--ms-input-size-xl-padding-v: calc(1.2 * var(--ms-rem));
|
|
270
278
|
--ms-input-size-xl-padding-h: calc(1.6 * var(--ms-rem));
|
|
271
|
-
--ms-input-size-xl-height: calc(var(--base-input-size-xl-height, 4.1) * var(--ms-rem));
|
|
279
|
+
--ms-input-size-xl-height: calc(var(--base-input-size-xl-height, 4.1) * var(--ms-rem)); (41px)
|
|
280
|
+
*/
|
|
272
281
|
|
|
273
282
|
/* ==========================================================================
|
|
274
283
|
TOGGLE ICON
|
|
@@ -306,6 +315,13 @@
|
|
|
306
315
|
--ms-dropdown-border: var(--base-dropdown-border, 1px solid var(--ms-dropdown-border-color));
|
|
307
316
|
--ms-dropdown-border-radius: var(--ms-border-radius-lg);
|
|
308
317
|
--ms-dropdown-box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
|
|
318
|
+
/* Live input width, published by JS each positioning frame. It's the only panel
|
|
319
|
+
dimension CSS can't measure itself, so panels that "match the input" read it. */
|
|
320
|
+
--ms-input-current-width: auto;
|
|
321
|
+
/* Options dropdown width. Defaults to the input width; override at app/theme level
|
|
322
|
+
(web-multiselect { --ms-dropdown-width: 60rem }) or per-instance via the
|
|
323
|
+
dropdown-width attribute. dropdown-min-width / dropdown-max-width still clamp it. */
|
|
324
|
+
--ms-dropdown-width: var(--ms-input-current-width);
|
|
309
325
|
--ms-options-max-height: calc(32 * var(--ms-rem));
|
|
310
326
|
--ms-option-color: var(--ms-text-color-1);
|
|
311
327
|
--ms-z-index-dropdown: 9999;
|
|
@@ -576,6 +592,9 @@
|
|
|
576
592
|
SELECTED POPOVER
|
|
577
593
|
========================================================================== */
|
|
578
594
|
--ms-z-index-popover: 10000;
|
|
595
|
+
/* Selected-items ("badges") popover width — intrinsic 32rem default, independent of the
|
|
596
|
+
input. Override at app/theme level or per-instance via the selected-popover-width
|
|
597
|
+
attribute. Set to var(--ms-input-current-width) to make it track the input instead. */
|
|
579
598
|
--ms-selected-popover-width: calc(32 * var(--ms-rem));
|
|
580
599
|
--ms-selected-popover-max-height: calc(32 * var(--ms-rem));
|
|
581
600
|
--ms-selected-popover-border: 1px solid var(--ms-selected-popover-border-color);
|