@keenmate/web-multiselect 1.1.0 → 1.2.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 +166 -110
- package/dist/multiselect.js +726 -704
- package/dist/multiselect.umd.js +5 -5
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/scss/_css-variables.scss +29 -0
- package/src/scss/_input-dropdown.scss +30 -0
- package/src/scss/_variables.scss +29 -0
package/README.md
CHANGED
|
@@ -261,6 +261,11 @@ multiselect.getGroupCallback = (item) => item.category;
|
|
|
261
261
|
multiselect.getDisabledCallback = (item) => item.stock === 0;
|
|
262
262
|
|
|
263
263
|
// Custom rendering - Full HTML control
|
|
264
|
+
multiselect.renderGroupLabelContentCallback = (groupName) => {
|
|
265
|
+
// Customize group header display (HTML string or HTMLElement)
|
|
266
|
+
return `<strong>📦 ${groupName.toUpperCase()}</strong>`;
|
|
267
|
+
};
|
|
268
|
+
|
|
264
269
|
multiselect.renderOptionContentCallback = (item, context) => {
|
|
265
270
|
// Customize option content (HTML string or HTMLElement)
|
|
266
271
|
return `<strong>${item.name}</strong> <span class="badge">${item.status}</span>`;
|
|
@@ -650,7 +655,7 @@ Perfect for different use cases and space constraints:
|
|
|
650
655
|
**Badge Styling:**
|
|
651
656
|
- **Data badges** (selected items like "JavaScript", "Python"): Blue styling by default
|
|
652
657
|
- **BadgeCounters** ("+3 more", "5 selected", compact mode display): Gray styling to distinguish from data
|
|
653
|
-
- Both can be customized via CSS variables (see `--
|
|
658
|
+
- Both can be customized via CSS variables (see `--ms-badge-*` and `--ms-badge-counter-*`)
|
|
654
659
|
|
|
655
660
|
**Counter (`show-counter="true"`)**: Independent feature showing `[X]` next to toggle icon. Works with all display modes. Not affected by callbacks.
|
|
656
661
|
|
|
@@ -829,7 +834,7 @@ select.renderBadgeContentCallback = (item, context) => {
|
|
|
829
834
|
};
|
|
830
835
|
|
|
831
836
|
// Custom rendering for selected items popover (separate callback)
|
|
832
|
-
select.
|
|
837
|
+
select.renderSelectedItemContentCallback = (item) => {
|
|
833
838
|
// Full details in popover - has more space
|
|
834
839
|
return `
|
|
835
840
|
<div style="display: flex; align-items: center; gap: 0.5rem;">
|
|
@@ -845,14 +850,57 @@ select.renderSelectionBadgeContentCallback = (item) => {
|
|
|
845
850
|
|
|
846
851
|
**Separate Callbacks for Badges vs. Popover:**
|
|
847
852
|
- `renderBadgeContentCallback` - Renders badges in the main badges area (compact display)
|
|
848
|
-
- `
|
|
849
|
-
- If `
|
|
853
|
+
- `renderSelectedItemContentCallback` - Renders items in the selected items popover (can be more detailed)
|
|
854
|
+
- If `renderSelectedItemContentCallback` is not defined, falls back to `renderBadgeContentCallback`
|
|
850
855
|
- Users can assign the same function to both if identical rendering is desired
|
|
851
856
|
|
|
852
857
|
**Context object** (`BadgeContentRenderContext` for `renderBadgeContentCallback`):
|
|
853
858
|
- `displayMode: BadgesDisplayMode` - Current badges display mode ('pills', 'count', 'compact', 'partial', 'none')
|
|
854
859
|
- `isInPopover: boolean` - Whether the badge is being rendered in the selected items popover (always false for this callback)
|
|
855
860
|
|
|
861
|
+
#### Custom Group Label Rendering
|
|
862
|
+
|
|
863
|
+
Customize how group headers are displayed using `renderGroupLabelContentCallback`:
|
|
864
|
+
|
|
865
|
+
```javascript
|
|
866
|
+
const select = document.querySelector('web-multiselect');
|
|
867
|
+
|
|
868
|
+
select.options = [
|
|
869
|
+
{ value: 'react', label: 'React', group: 'frontend' },
|
|
870
|
+
{ value: 'vue', label: 'Vue', group: 'frontend' },
|
|
871
|
+
{ value: 'nodejs', label: 'Node.js', group: 'backend' },
|
|
872
|
+
{ value: 'postgres', label: 'PostgreSQL', group: 'database' }
|
|
873
|
+
];
|
|
874
|
+
|
|
875
|
+
select.isGroupsAllowed = true;
|
|
876
|
+
select.groupMember = 'group';
|
|
877
|
+
|
|
878
|
+
// Customize group label display
|
|
879
|
+
select.renderGroupLabelContentCallback = (groupName) => {
|
|
880
|
+
const emojis = {
|
|
881
|
+
'frontend': '🎨',
|
|
882
|
+
'backend': '🔧',
|
|
883
|
+
'database': '🗄️'
|
|
884
|
+
};
|
|
885
|
+
const emoji = emojis[groupName] || '📦';
|
|
886
|
+
return `<strong>${emoji} ${groupName.toUpperCase()}</strong>`;
|
|
887
|
+
};
|
|
888
|
+
```
|
|
889
|
+
|
|
890
|
+
**Signature:** `(groupName: string) => string | HTMLElement`
|
|
891
|
+
|
|
892
|
+
**Use cases:**
|
|
893
|
+
- Capitalize or format group names
|
|
894
|
+
- Add icons, emojis, or badges to group headers
|
|
895
|
+
- Apply HTML formatting (bold, colors, etc.)
|
|
896
|
+
- Internationalization (i18n) - translate group names
|
|
897
|
+
- Add group-specific metadata or counts
|
|
898
|
+
|
|
899
|
+
**Notes:**
|
|
900
|
+
- Keeps standard `.ms__group-label` wrapper for consistent styling
|
|
901
|
+
- Can return HTML string or HTMLElement
|
|
902
|
+
- Group name is passed as a string parameter
|
|
903
|
+
|
|
856
904
|
#### Custom Badge Styling with CSS Classes
|
|
857
905
|
|
|
858
906
|
Add custom CSS classes to badges based on item data for semantic styling:
|
|
@@ -884,21 +932,21 @@ Then style with CSS:
|
|
|
884
932
|
```css
|
|
885
933
|
/* Target specific badges with custom classes */
|
|
886
934
|
.badge-urgent {
|
|
887
|
-
--
|
|
888
|
-
--
|
|
889
|
-
--
|
|
935
|
+
--ms-badge-text-bg: #fee2e2;
|
|
936
|
+
--ms-badge-text-color: #dc2626;
|
|
937
|
+
--ms-badge-remove-bg: #dc2626;
|
|
890
938
|
}
|
|
891
939
|
|
|
892
940
|
.badge-normal {
|
|
893
|
-
--
|
|
894
|
-
--
|
|
895
|
-
--
|
|
941
|
+
--ms-badge-text-bg: #dbeafe;
|
|
942
|
+
--ms-badge-text-color: #2563eb;
|
|
943
|
+
--ms-badge-remove-bg: #2563eb;
|
|
896
944
|
}
|
|
897
945
|
|
|
898
946
|
.badge-low {
|
|
899
|
-
--
|
|
900
|
-
--
|
|
901
|
-
--
|
|
947
|
+
--ms-badge-text-bg: #d1fae5;
|
|
948
|
+
--ms-badge-text-color: #059669;
|
|
949
|
+
--ms-badge-remove-bg: #059669;
|
|
902
950
|
}
|
|
903
951
|
```
|
|
904
952
|
|
|
@@ -919,15 +967,15 @@ select.getBadgeClassCallback = (item) => {
|
|
|
919
967
|
};
|
|
920
968
|
|
|
921
969
|
// Add different/additional classes to selected items in popover
|
|
922
|
-
select.
|
|
970
|
+
select.getSelectedItemClassCallback = (item) => {
|
|
923
971
|
// Could add more detailed classes for popover items
|
|
924
972
|
return [`badge-${item.priority}`, 'badge-detailed'];
|
|
925
973
|
};
|
|
926
974
|
```
|
|
927
975
|
|
|
928
976
|
- `getBadgeClassCallback` - Adds classes to badges in the main badges area
|
|
929
|
-
- `
|
|
930
|
-
- If `
|
|
977
|
+
- `getSelectedItemClassCallback` - Adds classes to items in the selected items popover
|
|
978
|
+
- If `getSelectedItemClassCallback` is not defined, falls back to `getBadgeClassCallback`
|
|
931
979
|
- Users can assign the same function to both if identical styling is desired
|
|
932
980
|
|
|
933
981
|
**Shadow DOM CSS Injection:**
|
|
@@ -945,21 +993,21 @@ select.getBadgeClassCallback = (item) => {
|
|
|
945
993
|
// Inject CSS into Shadow DOM to style those classes
|
|
946
994
|
select.customStylesCallback = () => `
|
|
947
995
|
.badge-urgent {
|
|
948
|
-
--
|
|
949
|
-
--
|
|
950
|
-
--
|
|
996
|
+
--ms-badge-text-bg: #fee2e2;
|
|
997
|
+
--ms-badge-text-color: #dc2626;
|
|
998
|
+
--ms-badge-remove-bg: #dc2626;
|
|
951
999
|
}
|
|
952
1000
|
|
|
953
1001
|
.badge-normal {
|
|
954
|
-
--
|
|
955
|
-
--
|
|
956
|
-
--
|
|
1002
|
+
--ms-badge-text-bg: #dbeafe;
|
|
1003
|
+
--ms-badge-text-color: #2563eb;
|
|
1004
|
+
--ms-badge-remove-bg: #2563eb;
|
|
957
1005
|
}
|
|
958
1006
|
|
|
959
1007
|
.badge-low {
|
|
960
|
-
--
|
|
961
|
-
--
|
|
962
|
-
--
|
|
1008
|
+
--ms-badge-text-bg: #d1fae5;
|
|
1009
|
+
--ms-badge-text-color: #059669;
|
|
1010
|
+
--ms-badge-remove-bg: #059669;
|
|
963
1011
|
}
|
|
964
1012
|
`;
|
|
965
1013
|
```
|
|
@@ -1106,17 +1154,20 @@ Control checkbox appearance and alignment with CSS variables and attributes:
|
|
|
1106
1154
|
<style>
|
|
1107
1155
|
/* Change checkbox size */
|
|
1108
1156
|
web-multiselect {
|
|
1109
|
-
--
|
|
1157
|
+
--ms-checkbox-size: 20px; /* Width and height (default: 16px) */
|
|
1110
1158
|
}
|
|
1111
1159
|
|
|
1112
1160
|
/* Scale checkbox */
|
|
1113
1161
|
web-multiselect {
|
|
1114
|
-
--
|
|
1162
|
+
--ms-checkbox-scale: 1.5; /* Scale multiplier (default: 1) */
|
|
1115
1163
|
}
|
|
1116
1164
|
|
|
1117
|
-
/* Fine-tune
|
|
1165
|
+
/* Fine-tune checkbox positioning */
|
|
1118
1166
|
web-multiselect {
|
|
1119
|
-
--
|
|
1167
|
+
--ms-checkbox-margin-top: 0.5rem; /* Vertical alignment (default: 0.125rem) */
|
|
1168
|
+
--ms-checkbox-margin-right: 0; /* Right spacing (default: 0) */
|
|
1169
|
+
--ms-checkbox-margin-bottom: 0; /* Bottom spacing (default: 0) */
|
|
1170
|
+
--ms-checkbox-margin-left: 0; /* Left spacing (default: 0) */
|
|
1120
1171
|
}
|
|
1121
1172
|
</style>
|
|
1122
1173
|
```
|
|
@@ -1156,11 +1207,16 @@ multiselect.renderOptionContentCallback = (item, context) => {
|
|
|
1156
1207
|
```
|
|
1157
1208
|
|
|
1158
1209
|
**Available CSS Variables:**
|
|
1159
|
-
- `--
|
|
1160
|
-
- `--
|
|
1161
|
-
- `--
|
|
1162
|
-
- `--
|
|
1163
|
-
- `--
|
|
1210
|
+
- `--ms-checkbox-size`: Checkbox width/height (default: `16px`)
|
|
1211
|
+
- `--ms-checkbox-scale`: Scale multiplier (default: `1`)
|
|
1212
|
+
- `--ms-checkbox-margin-top`: Top margin for vertical alignment (default: `0.125rem`)
|
|
1213
|
+
- `--ms-checkbox-margin-right`: Right margin (default: `0`)
|
|
1214
|
+
- `--ms-checkbox-margin-bottom`: Bottom margin (default: `0`)
|
|
1215
|
+
- `--ms-checkbox-margin-left`: Left margin (default: `0`)
|
|
1216
|
+
- `--ms-checkbox-align`: Alignment value (default: `flex-start`)
|
|
1217
|
+
- `--ms-option-gap`: Gap between checkbox and content (default: `0.5rem`)
|
|
1218
|
+
|
|
1219
|
+
**Note:** Horizontal and bottom margins default to `0` since spacing is handled by flexbox gap. Override for custom layouts.
|
|
1164
1220
|
|
|
1165
1221
|
### Flexible Data Handling
|
|
1166
1222
|
|
|
@@ -1455,26 +1511,26 @@ You can customize the component using CSS variables even with just a `<script>`
|
|
|
1455
1511
|
```html
|
|
1456
1512
|
<style>
|
|
1457
1513
|
/* Override tooltip appearance */
|
|
1458
|
-
|
|
1459
|
-
--
|
|
1460
|
-
--
|
|
1461
|
-
--
|
|
1462
|
-
--
|
|
1463
|
-
--
|
|
1464
|
-
--
|
|
1465
|
-
--
|
|
1466
|
-
--
|
|
1514
|
+
web-multiselect {
|
|
1515
|
+
--ms-tooltip-bg: #1f2937;
|
|
1516
|
+
--ms-tooltip-color: #f9fafb;
|
|
1517
|
+
--ms-tooltip-padding: 0.625rem 0.875rem;
|
|
1518
|
+
--ms-tooltip-border-radius: 0.5rem;
|
|
1519
|
+
--ms-tooltip-font-size: 0.8125rem;
|
|
1520
|
+
--ms-tooltip-max-width: 24rem;
|
|
1521
|
+
--ms-tooltip-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
|
|
1522
|
+
--ms-tooltip-z-index: 10000;
|
|
1467
1523
|
}
|
|
1468
1524
|
|
|
1469
1525
|
/* Override "+X more" badge colors */
|
|
1470
|
-
|
|
1471
|
-
--
|
|
1472
|
-
--
|
|
1473
|
-
--
|
|
1526
|
+
web-multiselect {
|
|
1527
|
+
--ms-more-badge-bg: #dbeafe;
|
|
1528
|
+
--ms-more-badge-hover-bg: #bfdbfe;
|
|
1529
|
+
--ms-more-badge-active-bg: #93c5fd;
|
|
1474
1530
|
}
|
|
1475
1531
|
|
|
1476
1532
|
/* Size the component */
|
|
1477
|
-
|
|
1533
|
+
web-multiselect {
|
|
1478
1534
|
width: 100%;
|
|
1479
1535
|
max-width: 400px;
|
|
1480
1536
|
}
|
|
@@ -1499,9 +1555,9 @@ All CSS custom properties are now defined at the `:host` level in the compiled C
|
|
|
1499
1555
|
```html
|
|
1500
1556
|
<style>
|
|
1501
1557
|
/* These variables will penetrate into the Shadow DOM */
|
|
1502
|
-
|
|
1503
|
-
--
|
|
1504
|
-
--
|
|
1558
|
+
web-multiselect {
|
|
1559
|
+
--ms-accent-color: #10b981; /* Changes primary color */
|
|
1560
|
+
--ms-input-border-radius: 0.5rem; /* Rounds input corners */
|
|
1505
1561
|
}
|
|
1506
1562
|
</style>
|
|
1507
1563
|
```
|
|
@@ -1514,100 +1570,100 @@ For the complete list of all available CSS variables, see:
|
|
|
1514
1570
|
|
|
1515
1571
|
| Variable | Default | Description |
|
|
1516
1572
|
|----------|---------|-------------|
|
|
1517
|
-
| `--
|
|
1518
|
-
| `--
|
|
1519
|
-
| `--
|
|
1520
|
-
| `--
|
|
1521
|
-
| `--
|
|
1522
|
-
| `--
|
|
1573
|
+
| `--ms-accent-color` | `#3b82f6` | Primary accent color (blue) |
|
|
1574
|
+
| `--ms-accent-color-hover` | `#2563eb` | Accent color on hover |
|
|
1575
|
+
| `--ms-accent-color-active` | `#1d4ed8` | Accent color when active |
|
|
1576
|
+
| `--ms-text-primary` | `#111827` | Primary text color |
|
|
1577
|
+
| `--ms-text-secondary` | `#6b7280` | Secondary/muted text color |
|
|
1578
|
+
| `--ms-border-color` | `#e5e7eb` | Default border color |
|
|
1523
1579
|
|
|
1524
1580
|
#### Input Component
|
|
1525
1581
|
|
|
1526
1582
|
| Variable | Default | Description |
|
|
1527
1583
|
|----------|---------|-------------|
|
|
1528
|
-
| `--
|
|
1529
|
-
| `--
|
|
1530
|
-
| `--
|
|
1531
|
-
| `--
|
|
1532
|
-
| `--
|
|
1533
|
-
| `--
|
|
1534
|
-
| `--
|
|
1535
|
-
| `--
|
|
1536
|
-
| `--
|
|
1584
|
+
| `--ms-input-bg` | `#ffffff` | Input background |
|
|
1585
|
+
| `--ms-input-text` | `#111827` | Input text color |
|
|
1586
|
+
| `--ms-input-border` | `#d1d5db` | Input border color |
|
|
1587
|
+
| `--ms-input-focus-border-color` | `#3b82f6` | Border color when focused |
|
|
1588
|
+
| `--ms-input-padding-v` | `0.5rem` | Input vertical padding |
|
|
1589
|
+
| `--ms-input-padding-h` | `0.75rem` | Input horizontal padding |
|
|
1590
|
+
| `--ms-input-font-size` | `0.875rem` | Input font size |
|
|
1591
|
+
| `--ms-input-border-radius` | `0.375rem` | Input border radius |
|
|
1592
|
+
| `--ms-input-placeholder-color` | `#6b7280` | Placeholder text color |
|
|
1537
1593
|
|
|
1538
1594
|
#### Dropdown & Options
|
|
1539
1595
|
|
|
1540
1596
|
| Variable | Default | Description |
|
|
1541
1597
|
|----------|---------|-------------|
|
|
1542
|
-
| `--
|
|
1543
|
-
| `--
|
|
1544
|
-
| `--
|
|
1545
|
-
| `--
|
|
1546
|
-
| `--
|
|
1547
|
-
| `--
|
|
1548
|
-
| `--
|
|
1549
|
-
| `--
|
|
1598
|
+
| `--ms-dropdown-bg` | `#ffffff` | Dropdown background |
|
|
1599
|
+
| `--ms-dropdown-border` | `#e5e7eb` | Dropdown border color |
|
|
1600
|
+
| `--ms-dropdown-shadow` | (box shadow) | Dropdown shadow |
|
|
1601
|
+
| `--ms-dropdown-max-height` | `20rem` | Max height of dropdown |
|
|
1602
|
+
| `--ms-option-padding-v` | `0.5rem` | Option vertical padding |
|
|
1603
|
+
| `--ms-option-padding-h` | `0.75rem` | Option horizontal padding |
|
|
1604
|
+
| `--ms-option-hover-bg` | `#f9fafb` | Option background on hover |
|
|
1605
|
+
| `--ms-option-bg-selected` | (rgba accent) | Selected option background |
|
|
1550
1606
|
|
|
1551
1607
|
#### Badges
|
|
1552
1608
|
|
|
1553
1609
|
| Variable | Default | Description |
|
|
1554
1610
|
|----------|---------|-------------|
|
|
1555
|
-
| `--
|
|
1556
|
-
| `--
|
|
1557
|
-
| `--
|
|
1558
|
-
| `--
|
|
1559
|
-
| `--
|
|
1560
|
-
| `--
|
|
1561
|
-
| `--
|
|
1562
|
-
| `--
|
|
1563
|
-
| `--
|
|
1564
|
-
| `--
|
|
1565
|
-
| `--
|
|
1566
|
-
| `--
|
|
1567
|
-
| `--
|
|
1611
|
+
| `--ms-badge-text-bg` | `#eff6ff` | Badge background color |
|
|
1612
|
+
| `--ms-badge-text-color` | `#3b82f6` | Badge text color |
|
|
1613
|
+
| `--ms-badge-gap` | `0.5rem` | Gap between badges |
|
|
1614
|
+
| `--ms-badge-height` | `1.5rem` | Height of badges |
|
|
1615
|
+
| `--ms-badge-font-size` | `0.75rem` | Badge font size |
|
|
1616
|
+
| `--ms-badge-border-radius` | `0.375rem` | Badge border radius |
|
|
1617
|
+
| `--ms-badge-remove-bg` | `#3b82f6` | Remove button background |
|
|
1618
|
+
| `--ms-badge-remove-color` | `#ffffff` | Remove button color |
|
|
1619
|
+
| `--ms-badge-counter-text-bg` | `#d1d5db` | BadgeCounter text background ("+X more") |
|
|
1620
|
+
| `--ms-badge-counter-text-color` | `#6b7280` | BadgeCounter text color |
|
|
1621
|
+
| `--ms-badge-counter-remove-bg` | `#6b7280` | BadgeCounter remove button background |
|
|
1622
|
+
| `--ms-badge-counter-remove-color` | `#ffffff` | BadgeCounter remove button color |
|
|
1623
|
+
| `--ms-badge-counter-border` | `1px solid #e5e7eb` | BadgeCounter border |
|
|
1568
1624
|
|
|
1569
1625
|
#### Counter (in input)
|
|
1570
1626
|
|
|
1571
1627
|
| Variable | Default | Description |
|
|
1572
1628
|
|----------|---------|-------------|
|
|
1573
|
-
| `--
|
|
1574
|
-
| `--
|
|
1575
|
-
| `--
|
|
1576
|
-
| `--
|
|
1629
|
+
| `--ms-counter-bg` | `#3b82f6` | Counter background |
|
|
1630
|
+
| `--ms-counter-color` | `#ffffff` | Counter text color |
|
|
1631
|
+
| `--ms-counter-font-size` | `0.75rem` | Counter font size |
|
|
1632
|
+
| `--ms-counter-bg-hover` | `#2563eb` | Hover background color |
|
|
1577
1633
|
|
|
1578
1634
|
#### Tooltips
|
|
1579
1635
|
|
|
1580
1636
|
| Variable | Default | Description |
|
|
1581
1637
|
|----------|---------|-------------|
|
|
1582
|
-
| `--
|
|
1583
|
-
| `--
|
|
1584
|
-
| `--
|
|
1585
|
-
| `--
|
|
1586
|
-
| `--
|
|
1587
|
-
| `--
|
|
1588
|
-
| `--
|
|
1589
|
-
| `--
|
|
1638
|
+
| `--ms-tooltip-bg` | `#333` | Tooltip background color |
|
|
1639
|
+
| `--ms-tooltip-color` | `#fff` | Tooltip text color |
|
|
1640
|
+
| `--ms-tooltip-padding` | `0.5rem 0.75rem` | Tooltip padding |
|
|
1641
|
+
| `--ms-tooltip-border-radius` | `0.375rem` | Tooltip border radius |
|
|
1642
|
+
| `--ms-tooltip-font-size` | `0.875rem` | Tooltip font size |
|
|
1643
|
+
| `--ms-tooltip-max-width` | `20rem` | Tooltip maximum width |
|
|
1644
|
+
| `--ms-tooltip-shadow` | (box shadow) | Tooltip box shadow |
|
|
1645
|
+
| `--ms-tooltip-z-index` | `10000` | Tooltip z-index |
|
|
1590
1646
|
|
|
1591
1647
|
#### Typography
|
|
1592
1648
|
|
|
1593
1649
|
| Variable | Default | Description |
|
|
1594
1650
|
|----------|---------|-------------|
|
|
1595
|
-
| `--
|
|
1596
|
-
| `--
|
|
1597
|
-
| `--
|
|
1598
|
-
| `--
|
|
1599
|
-
| `--
|
|
1651
|
+
| `--ms-font-size-xs` | `0.75rem` | Extra small font size |
|
|
1652
|
+
| `--ms-font-size-sm` | `0.875rem` | Small font size |
|
|
1653
|
+
| `--ms-font-size-base` | `1rem` | Base font size |
|
|
1654
|
+
| `--ms-font-weight-medium` | `500` | Medium font weight |
|
|
1655
|
+
| `--ms-font-weight-semibold` | `600` | Semibold font weight |
|
|
1600
1656
|
|
|
1601
1657
|
#### Effects & Transitions
|
|
1602
1658
|
|
|
1603
1659
|
| Variable | Default | Description |
|
|
1604
1660
|
|----------|---------|-------------|
|
|
1605
|
-
| `--
|
|
1606
|
-
| `--
|
|
1607
|
-
| `--
|
|
1608
|
-
| `--
|
|
1609
|
-
| `--
|
|
1610
|
-
| `--
|
|
1661
|
+
| `--ms-transition-fast` | `150ms` | Fast transition duration |
|
|
1662
|
+
| `--ms-transition-normal` | `200ms` | Normal transition duration |
|
|
1663
|
+
| `--ms-easing-snappy` | (cubic-bezier) | Snappy easing function |
|
|
1664
|
+
| `--ms-shadow-md` | (box shadow) | Medium shadow |
|
|
1665
|
+
| `--ms-shadow-xl` | (box shadow) | Extra large shadow |
|
|
1666
|
+
| `--ms-disabled-opacity` | `0.5` | Opacity for disabled state |
|
|
1611
1667
|
|
|
1612
1668
|
### Advanced: Custom SCSS
|
|
1613
1669
|
|