@keenmate/web-multiselect 2.0.0-rc11 → 2.0.0-rc12
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 +13 -15
- package/custom-elements.json +28 -1
- package/dist/index.d.ts +8 -0
- package/dist/multiselect.js +870 -826
- package/dist/multiselect.umd.js +11 -11
- package/dist/style.css +1 -1
- package/docs/usage.md +1 -0
- package/package.json +104 -104
- package/src/css/controls.css +11 -5
- package/src/css/floating.css +15 -4
- package/src/css/variables.css +44 -14
- package/vscode.html-custom-data.json +5 -0
- package/web-types.json +11 -1
package/src/css/variables.css
CHANGED
|
@@ -124,6 +124,12 @@
|
|
|
124
124
|
--ms-toggle-icon-color: var(--ms-text-color-3);
|
|
125
125
|
--ms-toggle-icon-color-open: var(--ms-text-color-3);
|
|
126
126
|
--ms-toggle-icon-size: calc(1.6 * var(--ms-rem));
|
|
127
|
+
/* Toggle chevron rotation, closed vs open. Defaults orient the directional right-pointing
|
|
128
|
+
--base-icon-chevron (90° → points down when closed, -90° → up when open). Override BOTH
|
|
129
|
+
when a theme supplies a PRE-ORIENTED chevron glyph: `0deg` / `0deg` for a static glyph,
|
|
130
|
+
or `0deg` / `180deg` for a down-glyph that flips up on open. */
|
|
131
|
+
--ms-toggle-rotate-closed: 90deg;
|
|
132
|
+
--ms-toggle-rotate-open: -90deg;
|
|
127
133
|
|
|
128
134
|
/* Counter Badge (in Input) Semantic Variables */
|
|
129
135
|
--ms-counter-badge-bg: var(--ms-accent-color);
|
|
@@ -244,7 +250,9 @@
|
|
|
244
250
|
--ms-input-border-width: 1px;
|
|
245
251
|
--ms-input-border-radius: var(--ms-border-radius-md);
|
|
246
252
|
--ms-input-text: var(--ms-text-color-1);
|
|
247
|
-
--
|
|
253
|
+
/* Prefers the shared --base token (light-dark aware, so it adapts on dark themes);
|
|
254
|
+
the flat gray is the standalone fallback. */
|
|
255
|
+
--ms-input-bg-disabled: var(--base-input-bg-disabled, rgba(107, 114, 128, 0.05));
|
|
248
256
|
|
|
249
257
|
/* ==========================================================================
|
|
250
258
|
INPUT SIZE VARIANTS — currently unused (commented out)
|
|
@@ -294,8 +302,8 @@
|
|
|
294
302
|
========================================================================== */
|
|
295
303
|
--ms-input-clear-size: calc(2.4 * var(--ms-rem));
|
|
296
304
|
--ms-input-clear-icon-size: calc(1.4 * var(--ms-rem));
|
|
297
|
-
--ms-input-clear-color: var(--ms-text-secondary);
|
|
298
|
-
--ms-input-clear-bg-hover: var(--ms-option-bg-matched, transparent);
|
|
305
|
+
--ms-input-clear-color: var(--base-input-clear-color, var(--ms-text-secondary));
|
|
306
|
+
--ms-input-clear-bg-hover: var(--base-input-clear-bg-hover, var(--ms-option-bg-matched, transparent));
|
|
299
307
|
--ms-input-clear-border-radius: var(--ms-border-radius); /* matches the input; square when radius is 0 */
|
|
300
308
|
|
|
301
309
|
/* ==========================================================================
|
|
@@ -331,7 +339,9 @@
|
|
|
331
339
|
default 1px --ms-dropdown-border; if you theme a thicker border, override this to
|
|
332
340
|
match (panel radius − border width). Clamped at 0 so a squared panel stays square. */
|
|
333
341
|
--ms-dropdown-inner-border-radius: max(0px, calc(var(--ms-dropdown-border-radius) - 1px));
|
|
334
|
-
|
|
342
|
+
/* Prefers the shared --base token (light-dark aware — deepens on dark themes); the
|
|
343
|
+
flat two-layer shadow is the standalone fallback. */
|
|
344
|
+
--ms-dropdown-box-shadow: var(--base-dropdown-box-shadow, 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1));
|
|
335
345
|
/* Live input width, published by JS each positioning frame. It's the only panel
|
|
336
346
|
dimension CSS can't measure itself, so panels that "match the input" read it. */
|
|
337
347
|
--ms-input-current-width: auto;
|
|
@@ -449,9 +459,21 @@
|
|
|
449
459
|
--base-* colors but not color-scheme (e.g. the neon example), producing a jarring near-white
|
|
450
460
|
chip. Stays fully themeable via this variable. */
|
|
451
461
|
--ms-fullscreen-nav-btn-bg-hover: color-mix(in srgb, var(--ms-accent-color) 22%, transparent);
|
|
452
|
-
/*
|
|
453
|
-
|
|
454
|
-
|
|
462
|
+
/* Pager match-navigator glyph (the prev/next ^ ⌄ buttons). Defaults to the shared
|
|
463
|
+
--ms-icon-chevron, so it follows the base chevron out of the box. The pager rotates this
|
|
464
|
+
source -90° (prev → up) / 90° (next → down), so it expects a RIGHT-pointing glyph — override
|
|
465
|
+
it here if a theme points --base-icon-chevron somewhere else (e.g. a pre-oriented toggle
|
|
466
|
+
caret) and you don't want that leaking into the pager. */
|
|
467
|
+
--ms-fullscreen-nav-btn-icon: var(--ms-icon-chevron);
|
|
468
|
+
/* Chevron glyph — the dropdown toggle's affordance, and the default source for the pager
|
|
469
|
+
(via --ms-fullscreen-nav-btn-icon above). Wired to the --base-icon contract
|
|
470
|
+
(--base-icon-chevron, a Lucide angle that fills its viewBox, so it renders at full optical
|
|
471
|
+
size — unlike the small solid caret) with an inline right-pointing chevron as the standalone
|
|
472
|
+
fallback. It points RIGHT at rest; consumers rotate it into place (toggle: 90° closed → down,
|
|
473
|
+
-90° open → up — themeable via --ms-toggle-rotate-*; pager: -90° → up, 90° → down). Override
|
|
474
|
+
--ms-icon-chevron (or --base-icon-chevron globally) to re-skin both at once, or override
|
|
475
|
+
--ms-fullscreen-nav-btn-icon alone to diverge the pager. */
|
|
476
|
+
--ms-icon-chevron: var(--base-icon-chevron, url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='m9 18 6-6-6-6'/></svg>"));
|
|
455
477
|
/* SVG "i-in-a-circle" glyph — rendered via mask so it inherits the info color via
|
|
456
478
|
currentColor. Override with any mask-friendly url() SVG. */
|
|
457
479
|
--ms-icon-info: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><circle cx='12' cy='12' r='9' fill='none' stroke='black' stroke-width='2'/><circle cx='12' cy='7.5' r='1.3' fill='black'/><path d='M12 11v6' stroke='black' stroke-width='2' stroke-linecap='round' fill='none'/></svg>");
|
|
@@ -655,10 +677,11 @@
|
|
|
655
677
|
--ms-badge-remove-box-shadow-focus: 0 0 0 2px color-mix(in srgb, var(--ms-accent-color) 50%, transparent);
|
|
656
678
|
--ms-badge-remove-icon-size: calc(1.0 * var(--ms-rem));
|
|
657
679
|
/* SVG X glyph (Lucide `x`) — rendered via mask so it inherits --ms-badge-remove-color via
|
|
658
|
-
currentColor. Drives the badge remove (×) and the fullscreen/popover close (✕).
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
680
|
+
currentColor. Drives the badge remove (×) and the fullscreen/popover close (✕). Follows the
|
|
681
|
+
shared --base-icon contract: prefers --base-icon-remove, then --base-icon-close, so a theme
|
|
682
|
+
re-skinning its close/remove glyph re-skins these too; the inline Lucide `x` is the standalone
|
|
683
|
+
fallback (no base layer loaded). Override --ms-icon-remove to diverge from the base contract. */
|
|
684
|
+
--ms-icon-remove: var(--base-icon-remove, var(--base-icon-close, url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M18 6 6 18'/><path d='m6 6 12 12'/></svg>")));
|
|
662
685
|
/* SVG "clear search" glyph (Lucide `search-x`: a magnifier with an x) used by the
|
|
663
686
|
fullscreen search field's clear button. Deliberately NOT the bare X of
|
|
664
687
|
--ms-icon-remove so it doesn't read as a second close button beside the overlay
|
|
@@ -669,7 +692,7 @@
|
|
|
669
692
|
CURRENT mode: a plain magnifier (Lucide `search`) for navigate, a funnel (Lucide
|
|
670
693
|
`filter`) for filter. Rendered via mask (inherit color via currentColor); override
|
|
671
694
|
with any mask-friendly SVG url(). */
|
|
672
|
-
--ms-icon-search: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='8'/><path d='m21 21-4.3-4.3'/></svg>");
|
|
695
|
+
--ms-icon-search: var(--base-icon-search, url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='8'/><path d='m21 21-4.3-4.3'/></svg>"));
|
|
673
696
|
--ms-icon-filter: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polygon points='22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3'/></svg>");
|
|
674
697
|
|
|
675
698
|
/* Badge Counter Indicator (layout-only properties, colors come from semantic section) */
|
|
@@ -719,7 +742,11 @@
|
|
|
719
742
|
--ms-count-clear-bg-hover: color-mix(in srgb, var(--ms-accent-color) 20%, transparent);
|
|
720
743
|
--ms-count-clear-color-hover: var(--ms-accent-color);
|
|
721
744
|
--ms-count-clear-icon-size: calc(1.4 * var(--ms-rem));
|
|
722
|
-
|
|
745
|
+
/* Field-clear ✕ (input clear + count clear). Its own knob in the --base-icon contract:
|
|
746
|
+
prefers --base-icon-clear so a theme can diverge field-clear from close/remove, then falls
|
|
747
|
+
through to --ms-icon-remove (which itself resolves --base-icon-remove → --base-icon-close →
|
|
748
|
+
inline ✕). Same glyph as remove by default; override --base-icon-clear alone to split them. */
|
|
749
|
+
--ms-icon-clear: var(--base-icon-clear, var(--ms-icon-remove));
|
|
723
750
|
|
|
724
751
|
/* ==========================================================================
|
|
725
752
|
TOOLTIPS
|
|
@@ -853,9 +880,12 @@
|
|
|
853
880
|
/* ==========================================================================
|
|
854
881
|
TRANSITIONS & EFFECTS
|
|
855
882
|
========================================================================== */
|
|
883
|
+
/* Durations stay local: the --ms scale (150/200ms) doesn't line up with --base-duration-*
|
|
884
|
+
(fast 100ms / normal 150ms / medium 250ms), so wiring would silently change timings. */
|
|
856
885
|
--ms-transition-fast: 150ms;
|
|
857
886
|
--ms-transition-normal: 200ms;
|
|
858
|
-
--
|
|
887
|
+
/* Easing is an exact match for --base-ease-standard, so it flows from the shared token. */
|
|
888
|
+
--ms-easing-snappy: var(--base-ease-standard, cubic-bezier(0.4, 0, 0.2, 1));
|
|
859
889
|
|
|
860
890
|
/* ==========================================================================
|
|
861
891
|
OPACITY VALUES
|
|
@@ -195,6 +195,11 @@
|
|
|
195
195
|
"description": "Whether typing filters the list or navigates it.",
|
|
196
196
|
"values": [{ "name": "filter" }, { "name": "navigate" }]
|
|
197
197
|
},
|
|
198
|
+
{
|
|
199
|
+
"name": "overlay-group",
|
|
200
|
+
"description": "Scope the \"one overlay open at a time\" coordination to a named group. Overlays (multiselects, datepickers, external popovers) sharing a group dismiss each other when one opens; different groups are independent. Unset = the default (ungrouped) group.",
|
|
201
|
+
"values": []
|
|
202
|
+
},
|
|
198
203
|
{
|
|
199
204
|
"name": "actions-layout",
|
|
200
205
|
"description": "Whether the action bar wraps or stays on one line.",
|
package/web-types.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
3
3
|
"name": "@keenmate/web-multiselect",
|
|
4
|
-
"version": "2.0.0-
|
|
4
|
+
"version": "2.0.0-rc12",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -199,6 +199,11 @@
|
|
|
199
199
|
"default": "'filter'"
|
|
200
200
|
}
|
|
201
201
|
},
|
|
202
|
+
{
|
|
203
|
+
"name": "overlay-group",
|
|
204
|
+
"description": "Scope the \"one overlay open at a time\" coordination to a named group. Overlays (multiselects, datepickers, external popovers) sharing a group dismiss each other when one opens; different groups are independent. Unset = the default (ungrouped) group.",
|
|
205
|
+
"value": { "type": "string | null" }
|
|
206
|
+
},
|
|
202
207
|
{
|
|
203
208
|
"name": "actions-layout",
|
|
204
209
|
"description": "Whether the action bar wraps or stays on one line.",
|
|
@@ -674,6 +679,11 @@
|
|
|
674
679
|
"description": "Whether typing filters the list or navigates it.",
|
|
675
680
|
"type": "'filter' | 'navigate'"
|
|
676
681
|
},
|
|
682
|
+
{
|
|
683
|
+
"name": "overlayGroup",
|
|
684
|
+
"description": "Scope the \"one overlay open at a time\" coordination to a named group. Overlays (multiselects, datepickers, external popovers) sharing a group dismiss each other when one opens; different groups are independent. Unset = the default (ungrouped) group.",
|
|
685
|
+
"type": "string | null"
|
|
686
|
+
},
|
|
677
687
|
{
|
|
678
688
|
"name": "actionsLayout",
|
|
679
689
|
"description": "Whether the action bar wraps or stays on one line.",
|