@keenmate/web-multiselect 1.2.0 → 1.4.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/README.md +90 -0
- package/dist/multiselect.js +968 -968
- package/dist/multiselect.umd.js +25 -25
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/scss/_badges-display.scss +19 -2
- package/src/scss/_base.scss +1 -1
- package/src/scss/_css-variables.scss +54 -3
- package/src/scss/_input-dropdown.scss +26 -0
- package/src/scss/_options.scss +147 -3
- package/src/scss/_rtl.scss +6 -4
- package/src/scss/_tooltips-popover.scss +21 -0
- package/src/scss/_variables.scss +103 -66
package/README.md
CHANGED
|
@@ -1504,6 +1504,64 @@ interface MultiSelectOption {
|
|
|
1504
1504
|
|
|
1505
1505
|
The component uses Shadow DOM for style encapsulation, but exposes CSS custom properties (CSS variables) that you can override to customize the appearance.
|
|
1506
1506
|
|
|
1507
|
+
### Theme Designer
|
|
1508
|
+
|
|
1509
|
+
The easiest way to customize the appearance of this component is using the **KeenMate Theme Designer** at:
|
|
1510
|
+
|
|
1511
|
+
**[theme-designer.keenmate.dev](https://theme-designer.keenmate.dev)**
|
|
1512
|
+
|
|
1513
|
+
#### How It Works
|
|
1514
|
+
|
|
1515
|
+
1. **Choose 3 base colors** - background, text, and accent
|
|
1516
|
+
2. **Preview changes live** - see your theme applied instantly
|
|
1517
|
+
3. **Fine-tune individual variables** - lock specific values while adjusting others
|
|
1518
|
+
4. **Export your theme** - copy CSS, JSON, or SCSS to your project
|
|
1519
|
+
|
|
1520
|
+
#### CSS Variable Layers
|
|
1521
|
+
|
|
1522
|
+
KeenMate components support a **two-layer theming architecture**:
|
|
1523
|
+
|
|
1524
|
+
**Standalone Mode (Simple)** - Just override the component-specific variables you need:
|
|
1525
|
+
|
|
1526
|
+
```css
|
|
1527
|
+
:root {
|
|
1528
|
+
--ms-accent-color: #your-brand-color;
|
|
1529
|
+
--ms-primary-bg: #your-background;
|
|
1530
|
+
--ms-text-primary: #your-text-color;
|
|
1531
|
+
}
|
|
1532
|
+
```
|
|
1533
|
+
|
|
1534
|
+
**Cascading Mode (Multi-Component)** - When using multiple KeenMate components, you can define a shared base layer:
|
|
1535
|
+
|
|
1536
|
+
```css
|
|
1537
|
+
:root {
|
|
1538
|
+
/* Base layer - single source of truth */
|
|
1539
|
+
--base-accent-color: #3b82f6;
|
|
1540
|
+
--base-primary-bg: #ffffff;
|
|
1541
|
+
--base-text-primary: #111827;
|
|
1542
|
+
|
|
1543
|
+
/* Components reference base layer */
|
|
1544
|
+
--ms-accent-color: var(--base-accent-color);
|
|
1545
|
+
--drp-accent-color: var(--base-accent-color);
|
|
1546
|
+
}
|
|
1547
|
+
```
|
|
1548
|
+
|
|
1549
|
+
Change `--base-accent-color` once → all components update automatically.
|
|
1550
|
+
|
|
1551
|
+
#### Unified Variable Naming
|
|
1552
|
+
|
|
1553
|
+
All KeenMate components follow a consistent naming convention for **Tier 1 variables** (core theming):
|
|
1554
|
+
|
|
1555
|
+
| Purpose | web-multiselect | web-daterangepicker |
|
|
1556
|
+
|---------|-----------------|---------------------|
|
|
1557
|
+
| Brand color | `--ms-accent-color` | `--drp-accent-color` |
|
|
1558
|
+
| Background | `--ms-primary-bg` | `--drp-primary-bg` |
|
|
1559
|
+
| Text color | `--ms-text-primary` | `--drp-text-primary` |
|
|
1560
|
+
| Text on accent | `--ms-text-on-accent` | `--drp-text-on-accent` |
|
|
1561
|
+
| Border color | `--ms-border-color` | `--drp-border-color` |
|
|
1562
|
+
|
|
1563
|
+
Learn the pattern once, apply it across all components.
|
|
1564
|
+
|
|
1507
1565
|
### CSS Variables (No Build System Required)
|
|
1508
1566
|
|
|
1509
1567
|
You can customize the component using CSS variables even with just a `<script>` tag:
|
|
@@ -1602,7 +1660,14 @@ For the complete list of all available CSS variables, see:
|
|
|
1602
1660
|
| `--ms-option-padding-v` | `0.5rem` | Option vertical padding |
|
|
1603
1661
|
| `--ms-option-padding-h` | `0.75rem` | Option horizontal padding |
|
|
1604
1662
|
| `--ms-option-hover-bg` | `#f9fafb` | Option background on hover |
|
|
1663
|
+
| `--ms-option-color-hover` | `inherit` | Option text color on hover |
|
|
1605
1664
|
| `--ms-option-bg-selected` | (rgba accent) | Selected option background |
|
|
1665
|
+
| `--ms-option-color-selected` | `inherit` | Selected option text color |
|
|
1666
|
+
| `--ms-option-color-selected-hover` | (inherits selected) | Text color when hovering selected option |
|
|
1667
|
+
| `--ms-option-bg-focused` | `#f9fafb` | Focused option background (keyboard) |
|
|
1668
|
+
| `--ms-option-color-focused` | `inherit` | Focused option text color |
|
|
1669
|
+
| `--ms-option-bg-matched` | (accent 8%) | Matched option background (navigate mode) |
|
|
1670
|
+
| `--ms-option-color-matched` | `inherit` | Matched option text color |
|
|
1606
1671
|
|
|
1607
1672
|
#### Badges
|
|
1608
1673
|
|
|
@@ -1621,6 +1686,31 @@ For the complete list of all available CSS variables, see:
|
|
|
1621
1686
|
| `--ms-badge-counter-remove-bg` | `#6b7280` | BadgeCounter remove button background |
|
|
1622
1687
|
| `--ms-badge-counter-remove-color` | `#ffffff` | BadgeCounter remove button color |
|
|
1623
1688
|
| `--ms-badge-counter-border` | `1px solid #e5e7eb` | BadgeCounter border |
|
|
1689
|
+
| `--ms-badge-border` | `none` | Badge border (e.g., `1px solid #3b82f6`) |
|
|
1690
|
+
|
|
1691
|
+
#### Checkboxes
|
|
1692
|
+
|
|
1693
|
+
| Variable | Default | Description |
|
|
1694
|
+
|----------|---------|-------------|
|
|
1695
|
+
| `--ms-checkbox-bg` | `#ffffff` | Checkbox background |
|
|
1696
|
+
| `--ms-checkbox-border` | `1px solid #d1d5db` | Checkbox border |
|
|
1697
|
+
| `--ms-checkbox-border-radius` | `0.3rem` | Checkbox border radius |
|
|
1698
|
+
| `--ms-checkbox-checked-bg` | (accent color) | Background when checked |
|
|
1699
|
+
| `--ms-checkbox-checked-border` | `1px solid (accent)` | Border when checked |
|
|
1700
|
+
| `--ms-checkbox-checkmark-color` | `#ffffff` | Checkmark color |
|
|
1701
|
+
| `--ms-checkbox-hover-border-color` | (accent color) | Border on hover |
|
|
1702
|
+
| `--ms-checkbox-disabled-bg` | `#f3f4f6` | Disabled background |
|
|
1703
|
+
| `--ms-checkbox-disabled-border` | `1px solid #e5e7eb` | Disabled border |
|
|
1704
|
+
|
|
1705
|
+
#### Scrollbar
|
|
1706
|
+
|
|
1707
|
+
| Variable | Default | Description |
|
|
1708
|
+
|----------|---------|-------------|
|
|
1709
|
+
| `--ms-scrollbar-width` | `8px` | Scrollbar width |
|
|
1710
|
+
| `--ms-scrollbar-track-bg` | `transparent` | Track background |
|
|
1711
|
+
| `--ms-scrollbar-thumb-bg` | `#d1d5db` | Thumb color |
|
|
1712
|
+
| `--ms-scrollbar-thumb-bg-hover` | `#6b7280` | Thumb hover color |
|
|
1713
|
+
| `--ms-scrollbar-thumb-border-radius` | `4px` | Thumb border radius |
|
|
1624
1714
|
|
|
1625
1715
|
#### Counter (in input)
|
|
1626
1716
|
|