@kenlo/sds-design-system 0.9.9
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 +129 -0
- package/components/Accordion/Accordion.css +186 -0
- package/components/Accordion/accordion-variants.js +17 -0
- package/components/Accordion/accordion.marko +264 -0
- package/components/AccordionGroup/AccordionGroup.css +35 -0
- package/components/AccordionGroup/accordion-group.marko +17 -0
- package/components/Alert/Alert.css +104 -0
- package/components/Alert/alert-variants.js +35 -0
- package/components/Alert/alert.marko +94 -0
- package/components/AttachmentList/AttachmentList.css +92 -0
- package/components/AttachmentList/attachment-list.marko +51 -0
- package/components/AttachmentList/attachment-row.marko +167 -0
- package/components/Avatar/Avatar.css +110 -0
- package/components/Avatar/avatar-variants.js +12 -0
- package/components/Avatar/avatar.marko +71 -0
- package/components/Badge/Badge.css +381 -0
- package/components/Badge/badge-dismissible.marko +143 -0
- package/components/Badge/badge-variants.js +35 -0
- package/components/Badge/badge.marko +134 -0
- package/components/BottomSheet/BottomSheet.css +300 -0
- package/components/BottomSheet/bottom-sheet.marko +340 -0
- package/components/BulkActionBar/BulkActionBar.css +88 -0
- package/components/BulkActionBar/bulk-action-bar.marko +186 -0
- package/components/Button/Button.css +340 -0
- package/components/Button/button-variants.js +25 -0
- package/components/Button/button.marko +139 -0
- package/components/Card/Card.css +391 -0
- package/components/Card/card-body.marko +5 -0
- package/components/Card/card-collapsible.marko +94 -0
- package/components/Card/card-footer.marko +12 -0
- package/components/Card/card-header.marko +30 -0
- package/components/Card/card-info-pair.marko +17 -0
- package/components/Card/card-info-row.marko +12 -0
- package/components/Card/card-section.marko +14 -0
- package/components/Card/card-variants.js +24 -0
- package/components/Card/card.marko +124 -0
- package/components/Checkbox/Checkbox.css +249 -0
- package/components/Checkbox/checkbox-variants.js +21 -0
- package/components/Checkbox/checkbox.marko +128 -0
- package/components/ColorPicker/ColorPicker.css +253 -0
- package/components/ColorPicker/color-maths.js +104 -0
- package/components/ColorPicker/color-picker.marko +474 -0
- package/components/DatePicker/DatePicker.css +429 -0
- package/components/DatePicker/date-logic.js +225 -0
- package/components/DatePicker/date-picker.marko +492 -0
- package/components/Drawer/Drawer.css +174 -0
- package/components/Drawer/drawer.marko +262 -0
- package/components/Floating/Floating.css +28 -0
- package/components/Floating/floating-position.js +251 -0
- package/components/Floating/floating.marko +291 -0
- package/components/Form/Form.css +15 -0
- package/components/Form/form-context.js +69 -0
- package/components/Form/form.marko +73 -0
- package/components/GradientPicker/GradientPicker.css +179 -0
- package/components/GradientPicker/gradient-picker.marko +398 -0
- package/components/Grid/Grid.css +161 -0
- package/components/Grid/col.marko +36 -0
- package/components/Grid/grid-variants.js +43 -0
- package/components/Grid/grid.marko +25 -0
- package/components/Header/Header.css +457 -0
- package/components/Header/header.marko +523 -0
- package/components/Icon/Icon.css +44 -0
- package/components/Icon/icon-colors.js +31 -0
- package/components/Icon/icon.marko +56 -0
- package/components/IconButton/IconButton.css +85 -0
- package/components/IconButton/icon-button-variants.js +18 -0
- package/components/IconButton/icon-button.marko +103 -0
- package/components/Incrementer/Incrementer.css +94 -0
- package/components/Incrementer/incrementer.marko +70 -0
- package/components/Input/Input.css +547 -0
- package/components/Input/input-countries.js +109 -0
- package/components/Input/input-masks.js +218 -0
- package/components/Input/input-types.js +194 -0
- package/components/Input/input.marko +530 -0
- package/components/Menu/Menu.css +651 -0
- package/components/Menu/menu-variants.js +89 -0
- package/components/Menu/menu.marko +560 -0
- package/components/Modal/Modal.css +160 -0
- package/components/Modal/modal.marko +296 -0
- package/components/Nav/Nav.css +298 -0
- package/components/Nav/nav-variants.js +23 -0
- package/components/Nav/nav.marko +164 -0
- package/components/Notification/Notification.css +78 -0
- package/components/Notification/notification-variants.js +30 -0
- package/components/Notification/notification.marko +55 -0
- package/components/Pagination/Pagination.css +78 -0
- package/components/Pagination/pagination-pages.js +66 -0
- package/components/Pagination/pagination.marko +141 -0
- package/components/Pill/Pill.css +193 -0
- package/components/Pill/pill-variants.js +16 -0
- package/components/Pill/pill.marko +165 -0
- package/components/Popover/Popover.css +121 -0
- package/components/Popover/popover.marko +96 -0
- package/components/Radio/Radio.css +230 -0
- package/components/Radio/radio-variants.js +16 -0
- package/components/Radio/radio.marko +93 -0
- package/components/RadioGroup/RadioGroup.css +32 -0
- package/components/RadioGroup/radio-group.marko +93 -0
- package/components/SearchBar/SearchBar.css +181 -0
- package/components/SearchBar/search-bar-variants.js +24 -0
- package/components/SearchBar/search-bar.marko +157 -0
- package/components/Select/Select.css +427 -0
- package/components/Select/select-options.js +163 -0
- package/components/Select/select.marko +449 -0
- package/components/Separator/Separator.css +22 -0
- package/components/Separator/separator.marko +14 -0
- package/components/Skeleton/Skeleton.css +100 -0
- package/components/Skeleton/skeleton-avatar.marko +28 -0
- package/components/Skeleton/skeleton-button.marko +22 -0
- package/components/Skeleton/skeleton-image.marko +20 -0
- package/components/Skeleton/skeleton-input.marko +22 -0
- package/components/Skeleton/skeleton-variants.js +16 -0
- package/components/Skeleton/skeleton.marko +53 -0
- package/components/Spinner/Spinner.css +173 -0
- package/components/Spinner/spinner-geometry.js +39 -0
- package/components/Spinner/spinner-overlay.marko +97 -0
- package/components/Spinner/spinner.marko +88 -0
- package/components/StatCard/StatCard.css +90 -0
- package/components/StatCard/stat-card-group.marko +5 -0
- package/components/StatCard/stat-card.marko +57 -0
- package/components/Switch/Switch.css +209 -0
- package/components/Switch/switch.marko +99 -0
- package/components/Table/Table.css +270 -0
- package/components/Table/table-cell.marko +28 -0
- package/components/Table/table-header.marko +27 -0
- package/components/Table/table-logic.js +129 -0
- package/components/Table/table.marko +372 -0
- package/components/Text/Text.css +79 -0
- package/components/Text/text-variants.js +25 -0
- package/components/Text/text.marko +48 -0
- package/components/TextEditor/TextEditor.css +78 -0
- package/components/TextEditor/safe-url.js +50 -0
- package/components/TextEditor/text-editor-commands.js +22 -0
- package/components/TextEditor/text-editor.marko +253 -0
- package/components/Toast/Toast.css +88 -0
- package/components/Toast/toast-api.js +19 -0
- package/components/Toast/toast-store.js +118 -0
- package/components/Toast/toast-variants.js +16 -0
- package/components/Toast/toast.marko +93 -0
- package/components/Toast/toaster.marko +70 -0
- package/components/Toggle/Toggle.css +169 -0
- package/components/Toggle/toggle.marko +93 -0
- package/components/Tooltip/Tooltip.css +115 -0
- package/components/Tooltip/tooltip.marko +77 -0
- package/components/Uploader/Uploader.css +180 -0
- package/components/Uploader/crop-geometry.js +161 -0
- package/components/Uploader/uploader.marko +269 -0
- package/foundations/Scrollbar/Scrollbar.css +26 -0
- package/foundations/attrs.js +27 -0
- package/foundations/breakpoints.js +27 -0
- package/foundations/contrast.js +74 -0
- package/foundations/custom-scheme.js +222 -0
- package/foundations/overlay.js +108 -0
- package/foundations/styles.css +284 -0
- package/foundations/text.js +22 -0
- package/foundations/theme-server.js +81 -0
- package/foundations/theme.js +42 -0
- package/foundations/tokens.css +1656 -0
- package/icons/custom/custom-video-horizontal-filled.marko +6 -0
- package/icons/custom/custom-video-horizontal-regular.marko +6 -0
- package/icons/custom/custom-video-tour-3d-filled.marko +7 -0
- package/icons/custom/custom-video-tour-3d-regular.marko +9 -0
- package/icons/custom/custom-video-vertical-filled.marko +6 -0
- package/icons/custom/custom-video-vertical-regular.marko +6 -0
- package/icons/generated/fluent-add-regular.marko +3 -0
- package/icons/generated/fluent-alert-regular.marko +3 -0
- package/icons/generated/fluent-apps-regular.marko +3 -0
- package/icons/generated/fluent-arrow-download-regular.marko +3 -0
- package/icons/generated/fluent-arrow-left-regular.marko +3 -0
- package/icons/generated/fluent-arrow-right-regular.marko +3 -0
- package/icons/generated/fluent-arrow-rotate-clockwise-regular.marko +3 -0
- package/icons/generated/fluent-arrow-rotate-counterclockwise-regular.marko +3 -0
- package/icons/generated/fluent-border-all-regular.marko +3 -0
- package/icons/generated/fluent-calendar-regular.marko +3 -0
- package/icons/generated/fluent-checkmark-circle-filled.marko +3 -0
- package/icons/generated/fluent-checkmark-regular.marko +3 -0
- package/icons/generated/fluent-chevron-down-regular.marko +3 -0
- package/icons/generated/fluent-chevron-left-regular.marko +3 -0
- package/icons/generated/fluent-chevron-right-regular.marko +3 -0
- package/icons/generated/fluent-chevron-up-regular.marko +3 -0
- package/icons/generated/fluent-circle-half-fill-regular.marko +3 -0
- package/icons/generated/fluent-clock-regular.marko +3 -0
- package/icons/generated/fluent-color-regular.marko +3 -0
- package/icons/generated/fluent-crop-regular.marko +3 -0
- package/icons/generated/fluent-dark-theme-regular.marko +3 -0
- package/icons/generated/fluent-delete-regular.marko +3 -0
- package/icons/generated/fluent-desktop-regular.marko +3 -0
- package/icons/generated/fluent-dismiss-circle-filled.marko +3 -0
- package/icons/generated/fluent-dismiss-regular.marko +3 -0
- package/icons/generated/fluent-document-pdf-regular.marko +3 -0
- package/icons/generated/fluent-document-regular.marko +3 -0
- package/icons/generated/fluent-eye-off-regular.marko +3 -0
- package/icons/generated/fluent-eye-regular.marko +3 -0
- package/icons/generated/fluent-eyedropper-regular.marko +3 -0
- package/icons/generated/fluent-grid-regular.marko +3 -0
- package/icons/generated/fluent-history-regular.marko +3 -0
- package/icons/generated/fluent-home-regular.marko +3 -0
- package/icons/generated/fluent-image-regular.marko +3 -0
- package/icons/generated/fluent-info-regular.marko +3 -0
- package/icons/generated/fluent-link-regular.marko +3 -0
- package/icons/generated/fluent-more-horizontal-regular.marko +3 -0
- package/icons/generated/fluent-navigation-regular.marko +3 -0
- package/icons/generated/fluent-paint-brush-regular.marko +3 -0
- package/icons/generated/fluent-question-circle-regular.marko +3 -0
- package/icons/generated/fluent-search-regular.marko +3 -0
- package/icons/generated/fluent-settings-regular.marko +3 -0
- package/icons/generated/fluent-square-hint-regular.marko +3 -0
- package/icons/generated/fluent-subtract-regular.marko +3 -0
- package/icons/generated/fluent-text-align-center-regular.marko +3 -0
- package/icons/generated/fluent-text-align-left-regular.marko +3 -0
- package/icons/generated/fluent-text-align-right-regular.marko +3 -0
- package/icons/generated/fluent-text-bold-regular.marko +3 -0
- package/icons/generated/fluent-text-bullet-list-regular.marko +3 -0
- package/icons/generated/fluent-text-font-regular.marko +3 -0
- package/icons/generated/fluent-text-font-size-regular.marko +3 -0
- package/icons/generated/fluent-text-italic-regular.marko +3 -0
- package/icons/generated/fluent-text-number-list-ltr-regular.marko +3 -0
- package/icons/generated/fluent-video-regular.marko +3 -0
- package/icons/generated/fluent-warning-filled.marko +3 -0
- package/icons/generated/fluent-weather-moon-regular.marko +3 -0
- package/icons/generated/fluent-weather-sunny-regular.marko +3 -0
- package/icons/generated/fluent-zoom-in-regular.marko +3 -0
- package/icons/generated/fluent-zoom-out-regular.marko +3 -0
- package/icons/manifest.json +61 -0
- package/icons/social/social-facebook-color.marko +7 -0
- package/icons/social/social-facebook.marko +6 -0
- package/icons/social/social-google-color.marko +20 -0
- package/icons/social/social-google.marko +6 -0
- package/icons/social/social-instagram-color.marko +16 -0
- package/icons/social/social-instagram.marko +6 -0
- package/icons/social/social-linkedin-color.marko +8 -0
- package/icons/social/social-linkedin.marko +8 -0
- package/icons/social/social-messenger-color.marko +15 -0
- package/icons/social/social-messenger.marko +6 -0
- package/icons/social/social-pinterest-color.marko +6 -0
- package/icons/social/social-pinterest.marko +6 -0
- package/icons/social/social-telegram-color.marko +7 -0
- package/icons/social/social-telegram.marko +6 -0
- package/icons/social/social-whatsapp-color.marko +8 -0
- package/icons/social/social-whatsapp.marko +7 -0
- package/icons/social/social-x-color.marko +7 -0
- package/icons/social/social-x.marko +6 -0
- package/icons/social/social-youtube-color.marko +7 -0
- package/icons/social/social-youtube.marko +6 -0
- package/marko.json +203 -0
- package/package.json +55 -0
|
@@ -0,0 +1,651 @@
|
|
|
1
|
+
/* SDS Menu.
|
|
2
|
+
Ported from kdls-design-system v2.5.1 (0f3edf8) components/Menu/Menu.css
|
|
3
|
+
by scripts/port-css.mjs. Divergences beyond the mechanical rename are noted inline.
|
|
4
|
+
*//* ============================================================
|
|
5
|
+
SDS Menu
|
|
6
|
+
Floating panel anchored to any trigger — compound component
|
|
7
|
+
Variants: list, sections, searchable, icons, intent, submenu, items-api
|
|
8
|
+
============================================================ */
|
|
9
|
+
|
|
10
|
+
/* ── Wrapper ── */
|
|
11
|
+
.sds-menu {
|
|
12
|
+
position: relative;
|
|
13
|
+
display: inline-flex;
|
|
14
|
+
flex-direction: column;
|
|
15
|
+
/* The row height, named rather than written twice. A caller that wants a panel "seven
|
|
16
|
+
rows tall" can only say so in terms of this — and a pixel count copied out of here
|
|
17
|
+
would go stale the moment the row changed. */
|
|
18
|
+
--sds-menu-item-height: 40px;
|
|
19
|
+
}
|
|
20
|
+
/* ── Built-in trigger button ── */
|
|
21
|
+
.sds-menu__btn {
|
|
22
|
+
display: inline-flex;
|
|
23
|
+
align-items: center;
|
|
24
|
+
gap: var(--spacing-1);
|
|
25
|
+
cursor: pointer;
|
|
26
|
+
border: none;
|
|
27
|
+
background: transparent;
|
|
28
|
+
font-family: var(--font-family-base);
|
|
29
|
+
font-size: var(--font-size-body-md);
|
|
30
|
+
font-weight: var(--font-weight-medium);
|
|
31
|
+
line-height: var(--lh-body-md);
|
|
32
|
+
color: var(--color-neutral-80);
|
|
33
|
+
transition: background-color 120ms ease, color 120ms ease;
|
|
34
|
+
user-select: none;
|
|
35
|
+
box-sizing: border-box;
|
|
36
|
+
white-space: nowrap;
|
|
37
|
+
}
|
|
38
|
+
.sds-menu__btn:focus-visible {
|
|
39
|
+
outline: none;
|
|
40
|
+
box-shadow: var(--focus-ring);
|
|
41
|
+
border-radius: var(--radius-sm);
|
|
42
|
+
}
|
|
43
|
+
/* navButton variant — nav-tab ghost */
|
|
44
|
+
.sds-menu__btn--navButton {
|
|
45
|
+
height: 40px;
|
|
46
|
+
padding: var(--spacing-2) var(--spacing-4);
|
|
47
|
+
gap: var(--spacing-3);
|
|
48
|
+
border-radius: 11px; /* soft, the install default */
|
|
49
|
+
}
|
|
50
|
+
.sds-menu__btn--navButton:hover {
|
|
51
|
+
background-color: var(--color-opacity-05);
|
|
52
|
+
}
|
|
53
|
+
.sds-menu__btn--navButton:active {
|
|
54
|
+
background-color: var(--color-opacity-10);
|
|
55
|
+
}
|
|
56
|
+
/* Divergence: opening does not change the weight; only being the active item does.
|
|
57
|
+
|
|
58
|
+
KDLS bolds this on open. Bold is wider, so opening a menu widened its own button —
|
|
59
|
+
measured, 178.6px to 179.7px, with the label itself gaining 2.5px — and every item after
|
|
60
|
+
it on the row shifted while the panel was appearing underneath. A control that moves as
|
|
61
|
+
you press it is the thing you were aiming at a moment ago.
|
|
62
|
+
|
|
63
|
+
Reserving the bold width with an invisible copy of the label was tried first and did not
|
|
64
|
+
hold: the pseudo-element reported weight 700 and the grid column stayed at the regular
|
|
65
|
+
width. Not changing the metric is the fix that cannot fail, and open is already said
|
|
66
|
+
twice over — the chevron turns and a panel appears.
|
|
67
|
+
|
|
68
|
+
`--active` keeps its weight, because which item you are on does not change while you
|
|
69
|
+
are pressing it. */
|
|
70
|
+
.sds-menu__btn--navButton.sds-menu__btn--open {
|
|
71
|
+
color: var(--color-neutral-90);
|
|
72
|
+
}
|
|
73
|
+
.sds-menu__btn--navButton.sds-menu__btn--active {
|
|
74
|
+
color: var(--color-neutral-90);
|
|
75
|
+
font-weight: var(--font-weight-bold);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/* ── Nav vertical overrides ── */
|
|
79
|
+
.sds-nav--vertical .sds-menu {
|
|
80
|
+
display: flex;
|
|
81
|
+
width: calc(100% - var(--spacing-2));
|
|
82
|
+
margin: 0 var(--spacing-1);
|
|
83
|
+
}
|
|
84
|
+
.sds-nav--vertical .sds-menu__btn--navButton {
|
|
85
|
+
width: 100%;
|
|
86
|
+
text-align: left;
|
|
87
|
+
}
|
|
88
|
+
.sds-menu__panel--inline .sds-menu__panel-body {
|
|
89
|
+
overflow-y: hidden;
|
|
90
|
+
}
|
|
91
|
+
.sds-nav--vertical .sds-menu__panel--inline .sds-menu__item {
|
|
92
|
+
padding-left: var(--spacing-8);
|
|
93
|
+
}
|
|
94
|
+
.sds-nav--vertical .sds-menu__panel--inline .sds-menu__submenu-accordion-body .sds-menu__item {
|
|
95
|
+
padding-left: var(--spacing-12);
|
|
96
|
+
}
|
|
97
|
+
/* pill trigger — chevron rotation when open */
|
|
98
|
+
.sds-menu .sds-pill__icon-right:not(.sds-pill__icon-right--clickable) {
|
|
99
|
+
transition: transform 200ms ease;
|
|
100
|
+
}
|
|
101
|
+
.sds-menu--open .sds-pill__icon-right:not(.sds-pill__icon-right--clickable) {
|
|
102
|
+
transform: rotate(180deg);
|
|
103
|
+
}
|
|
104
|
+
/* chevron */
|
|
105
|
+
.sds-menu__btn-chevron {
|
|
106
|
+
display: inline-flex;
|
|
107
|
+
align-items: center;
|
|
108
|
+
flex-shrink: 0;
|
|
109
|
+
width: 16px;
|
|
110
|
+
height: 16px;
|
|
111
|
+
transition: transform 120ms ease;
|
|
112
|
+
}
|
|
113
|
+
.sds-menu__btn--open .sds-menu__btn-chevron {
|
|
114
|
+
transform: rotate(180deg);
|
|
115
|
+
}
|
|
116
|
+
.sds-menu__btn--navButton .sds-menu__btn-chevron {
|
|
117
|
+
margin-left: calc(var(--spacing-1) - var(--spacing-3));
|
|
118
|
+
}
|
|
119
|
+
/* icon slot */
|
|
120
|
+
.sds-menu__btn-icon {
|
|
121
|
+
display: inline-flex;
|
|
122
|
+
align-items: center;
|
|
123
|
+
flex-shrink: 0;
|
|
124
|
+
}
|
|
125
|
+
/* ── Profile header (avatar trigger) ── */
|
|
126
|
+
.sds-menu__profile-header {
|
|
127
|
+
display: flex;
|
|
128
|
+
align-items: center;
|
|
129
|
+
gap: var(--spacing-3);
|
|
130
|
+
padding: var(--spacing-4);
|
|
131
|
+
border-bottom: 1px solid var(--border-static-color);
|
|
132
|
+
}
|
|
133
|
+
.sds-menu__profile-info {
|
|
134
|
+
display: flex;
|
|
135
|
+
flex-direction: column;
|
|
136
|
+
gap: var(--spacing-0-5);
|
|
137
|
+
min-width: 0;
|
|
138
|
+
}
|
|
139
|
+
.sds-menu__profile-name {
|
|
140
|
+
white-space: nowrap;
|
|
141
|
+
overflow: hidden;
|
|
142
|
+
text-overflow: ellipsis;
|
|
143
|
+
}
|
|
144
|
+
.sds-menu__profile-code,
|
|
145
|
+
.sds-menu__profile-agency {
|
|
146
|
+
white-space: nowrap;
|
|
147
|
+
overflow: hidden;
|
|
148
|
+
text-overflow: ellipsis;
|
|
149
|
+
}
|
|
150
|
+
/* ── Generic header slot ── */
|
|
151
|
+
/* 12px all round, set by Rafael reading the anchor menu, and set HERE rather than in each
|
|
152
|
+
caller: a search box in a menu header is the only thing this slot has ever held, and
|
|
153
|
+
three callers each padding their own wrapper is three chances to disagree. What goes in
|
|
154
|
+
gets the full width — a box narrower than the panel it heads reads as floating in it. */
|
|
155
|
+
.sds-menu__header {
|
|
156
|
+
padding: var(--spacing-3);
|
|
157
|
+
border-bottom: 1px solid var(--border-static-color);
|
|
158
|
+
}
|
|
159
|
+
.sds-menu__header > * {
|
|
160
|
+
width: 100%;
|
|
161
|
+
}
|
|
162
|
+
/* ── Panel ── */
|
|
163
|
+
.sds-menu__panel {
|
|
164
|
+
z-index: var(--z-floating);
|
|
165
|
+
min-width: 200px;
|
|
166
|
+
max-width: 380px;
|
|
167
|
+
max-height: 480px;
|
|
168
|
+
overflow: hidden;
|
|
169
|
+
display: flex;
|
|
170
|
+
flex-direction: column;
|
|
171
|
+
background: var(--component-bg-color);
|
|
172
|
+
border: 1px solid var(--border-static-color);
|
|
173
|
+
border-radius: var(--radius-md);
|
|
174
|
+
box-shadow: var(--shadow-drop-md);
|
|
175
|
+
}
|
|
176
|
+
.sds-menu__inline-wrap {
|
|
177
|
+
display: grid;
|
|
178
|
+
grid-template-rows: 0fr;
|
|
179
|
+
transition: grid-template-rows 200ms ease;
|
|
180
|
+
overflow: hidden;
|
|
181
|
+
}
|
|
182
|
+
.sds-menu__inline-wrap--open {
|
|
183
|
+
grid-template-rows: 1fr;
|
|
184
|
+
}
|
|
185
|
+
.sds-menu__panel--inline {
|
|
186
|
+
z-index: auto;
|
|
187
|
+
position: static;
|
|
188
|
+
overflow: visible;
|
|
189
|
+
min-height: 0;
|
|
190
|
+
min-width: 0;
|
|
191
|
+
max-width: none;
|
|
192
|
+
max-height: none;
|
|
193
|
+
width: 100%;
|
|
194
|
+
background: transparent;
|
|
195
|
+
border: none;
|
|
196
|
+
border-radius: 0;
|
|
197
|
+
box-shadow: none;
|
|
198
|
+
}
|
|
199
|
+
/* The inset follows the radius scheme, or the corners clip.
|
|
200
|
+
|
|
201
|
+
A rounded rectangle of radius R has no material within about 0.29R of its corner along
|
|
202
|
+
the diagonal. A row inset by a flat 4px therefore has its top corners cut off by the
|
|
203
|
+
panel's own curve, and the more rounded the scheme the worse it gets: at `rounded` the
|
|
204
|
+
panel's radius is 32px and 4px of inset leaves the first and last rows visibly clipped.
|
|
205
|
+
|
|
206
|
+
0.3 of --radius-md is the smallest inset that clears it, and the max() keeps the flat and
|
|
207
|
+
soft schemes at the 4px they were designed with. */
|
|
208
|
+
.sds-menu__panel-body {
|
|
209
|
+
flex: 1;
|
|
210
|
+
min-height: 0;
|
|
211
|
+
overflow-y: auto;
|
|
212
|
+
padding: max(var(--spacing-1), calc(var(--radius-md) * 0.3)) 0;
|
|
213
|
+
}
|
|
214
|
+
.sds-menu__panel-footer {
|
|
215
|
+
flex-shrink: 0;
|
|
216
|
+
padding: var(--spacing-2) var(--spacing-5);
|
|
217
|
+
border-top: 1px solid var(--border-static-color);
|
|
218
|
+
}
|
|
219
|
+
/* Bare panel — positioning only, no visual styling (child provides own card) */
|
|
220
|
+
.sds-menu__panel-bare {
|
|
221
|
+
z-index: var(--z-floating);
|
|
222
|
+
}
|
|
223
|
+
.sds-menu__panel-bare .sds-menu__panel-body {
|
|
224
|
+
overflow: visible;
|
|
225
|
+
padding: 0;
|
|
226
|
+
}
|
|
227
|
+
/* ── SubMenu panel — one layer above main panel ── */
|
|
228
|
+
.sds-menu__submenu-panel {
|
|
229
|
+
z-index: calc(var(--z-floating) + 1);
|
|
230
|
+
max-height: 480px;
|
|
231
|
+
}
|
|
232
|
+
/* ── Search (fixed header — does not scroll with list) ── */
|
|
233
|
+
.sds-menu__search {
|
|
234
|
+
flex-shrink: 0;
|
|
235
|
+
padding: var(--spacing-2) var(--spacing-5);
|
|
236
|
+
border-bottom: 1px solid var(--border-static-color);
|
|
237
|
+
}
|
|
238
|
+
/* ── Group ── */
|
|
239
|
+
.sds-menu__group + .sds-menu__group {
|
|
240
|
+
border-top: 1px solid var(--border-static-color);
|
|
241
|
+
margin-top: var(--spacing-1);
|
|
242
|
+
padding-top: var(--spacing-1);
|
|
243
|
+
}
|
|
244
|
+
.sds-menu__group-title {
|
|
245
|
+
/* 20px = the item's 4px margin plus its 16px padding. KDLS used 12px here, which put
|
|
246
|
+
the section title 8px to the left of every label underneath it. */
|
|
247
|
+
padding: var(--spacing-2) var(--spacing-5) var(--spacing-1);
|
|
248
|
+
font-family: var(--font-family-base);
|
|
249
|
+
font-size: var(--font-size-label-sm);
|
|
250
|
+
font-weight: var(--font-weight-bold);
|
|
251
|
+
line-height: var(--lh-label-sm);
|
|
252
|
+
color: var(--color-neutral-50);
|
|
253
|
+
}
|
|
254
|
+
/* ── List ── */
|
|
255
|
+
/* The list takes focus so the arrows work, and shows nothing for it: a ring around forty
|
|
256
|
+
rows says "these" where the reader needs "this one". Without saying so it got the
|
|
257
|
+
browser's own outline, which is the orange box around the whole group.
|
|
258
|
+
|
|
259
|
+
The highlight goes on the active row instead, and only while the list holds focus —
|
|
260
|
+
a highlight left behind on a list nobody is in is a lie about where the keyboard is. */
|
|
261
|
+
.sds-menu__list {
|
|
262
|
+
list-style: none;
|
|
263
|
+
margin: 0;
|
|
264
|
+
padding: 0;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
.sds-menu__list:focus,
|
|
268
|
+
.sds-menu__list:focus-visible {
|
|
269
|
+
outline: none;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
/* `:focus`, not `:focus-visible`. The list carries `tabindex="-1"`, so it never takes
|
|
273
|
+
focus by tab or by click — clicking a row focuses that row's own button. The only way
|
|
274
|
+
the list holds focus is the component putting it there, which happens when the menu is
|
|
275
|
+
opened from the keyboard and when an arrow hands the caret over from the search box.
|
|
276
|
+
`:focus-visible` does not match a programmatic focus, so the highlight never drew. */
|
|
277
|
+
.sds-menu__list:focus .sds-menu__item[data-active="true"] {
|
|
278
|
+
box-shadow: var(--focus-ring-inset);
|
|
279
|
+
}
|
|
280
|
+
/* ── Item ── */
|
|
281
|
+
a.sds-menu__item {
|
|
282
|
+
text-decoration: none;
|
|
283
|
+
}
|
|
284
|
+
.sds-menu__item {
|
|
285
|
+
display: flex;
|
|
286
|
+
align-items: center;
|
|
287
|
+
gap: var(--spacing-3);
|
|
288
|
+
padding: var(--spacing-2) var(--spacing-4);
|
|
289
|
+
min-height: var(--sds-menu-item-height);
|
|
290
|
+
cursor: pointer;
|
|
291
|
+
color: var(--color-neutral-80);
|
|
292
|
+
font-family: var(--font-family-base);
|
|
293
|
+
font-size: var(--font-size-body-md);
|
|
294
|
+
font-weight: var(--font-weight-regular);
|
|
295
|
+
line-height: var(--lh-body-md);
|
|
296
|
+
border-radius: 11px; /* soft, the install default — schemes at the end */
|
|
297
|
+
/* Horizontal counterpart of the panel-body's vertical inset — same reason, same rule. */
|
|
298
|
+
margin: 0 max(var(--spacing-1), calc(var(--radius-md) * 0.3));
|
|
299
|
+
transition: background-color 120ms ease, color 120ms ease;
|
|
300
|
+
user-select: none;
|
|
301
|
+
box-sizing: border-box;
|
|
302
|
+
}
|
|
303
|
+
.sds-menu__item:hover {
|
|
304
|
+
background-color: var(--color-opacity-05);
|
|
305
|
+
}
|
|
306
|
+
.sds-menu__item:focus {
|
|
307
|
+
outline: none;
|
|
308
|
+
}
|
|
309
|
+
.sds-menu__item:focus-visible {
|
|
310
|
+
outline: none;
|
|
311
|
+
background-color: var(--color-opacity-05);
|
|
312
|
+
box-shadow: var(--focus-ring-inset);
|
|
313
|
+
}
|
|
314
|
+
.sds-menu__item:active {
|
|
315
|
+
background-color: var(--color-opacity-10);
|
|
316
|
+
}
|
|
317
|
+
.sds-menu__item--active {
|
|
318
|
+
background-color: transparent;
|
|
319
|
+
color: var(--color-neutral-90);
|
|
320
|
+
font-weight: var(--font-weight-bold);
|
|
321
|
+
}
|
|
322
|
+
.sds-menu__item--active:hover {
|
|
323
|
+
background-color: var(--color-opacity-05);
|
|
324
|
+
}
|
|
325
|
+
.sds-menu__item--disabled {
|
|
326
|
+
opacity: 0.4;
|
|
327
|
+
cursor: not-allowed;
|
|
328
|
+
}
|
|
329
|
+
/* ── Intent items ── */
|
|
330
|
+
.sds-menu__item--primary:hover {
|
|
331
|
+
background: var(--color-primary-10);
|
|
332
|
+
color: var(--color-primary-90-solid);
|
|
333
|
+
}
|
|
334
|
+
.sds-menu__item--primary:focus-visible {
|
|
335
|
+
background: var(--color-primary-10);
|
|
336
|
+
color: var(--color-primary-90-solid);
|
|
337
|
+
box-shadow: var(--focus-ring-inset);
|
|
338
|
+
}
|
|
339
|
+
.sds-menu__item--primary:active {
|
|
340
|
+
background: var(--color-primary-30);
|
|
341
|
+
color: var(--color-primary-90-solid);
|
|
342
|
+
}
|
|
343
|
+
.sds-menu__item--error:hover {
|
|
344
|
+
background-color: var(--color-error-10);
|
|
345
|
+
color: var(--color-error-10-on);
|
|
346
|
+
}
|
|
347
|
+
.sds-menu__item--error:focus-visible {
|
|
348
|
+
background-color: var(--color-error-10);
|
|
349
|
+
color: var(--color-error-10-on);
|
|
350
|
+
box-shadow: var(--focus-ring-inset);
|
|
351
|
+
}
|
|
352
|
+
.sds-menu__item--error:active {
|
|
353
|
+
background-color: var(--color-error-30);
|
|
354
|
+
color: var(--color-error-30-on);
|
|
355
|
+
}
|
|
356
|
+
.sds-menu__item--success:hover {
|
|
357
|
+
background-color: var(--color-success-10);
|
|
358
|
+
color: var(--color-success-10-on);
|
|
359
|
+
}
|
|
360
|
+
.sds-menu__item--success:focus-visible {
|
|
361
|
+
background-color: var(--color-success-10);
|
|
362
|
+
color: var(--color-success-10-on);
|
|
363
|
+
box-shadow: var(--focus-ring-inset);
|
|
364
|
+
}
|
|
365
|
+
.sds-menu__item--success:active {
|
|
366
|
+
background-color: var(--color-success-30);
|
|
367
|
+
color: var(--color-success-30-on);
|
|
368
|
+
}
|
|
369
|
+
.sds-menu__item--alert:hover {
|
|
370
|
+
background-color: var(--color-alert-10);
|
|
371
|
+
color: var(--color-alert-10-on);
|
|
372
|
+
}
|
|
373
|
+
.sds-menu__item--alert:focus-visible {
|
|
374
|
+
background-color: var(--color-alert-10);
|
|
375
|
+
color: var(--color-alert-10-on);
|
|
376
|
+
box-shadow: var(--focus-ring-inset);
|
|
377
|
+
}
|
|
378
|
+
.sds-menu__item--alert:active {
|
|
379
|
+
background-color: var(--color-alert-30);
|
|
380
|
+
color: var(--color-alert-30-on);
|
|
381
|
+
}
|
|
382
|
+
/* ── SubMenu trigger ── */
|
|
383
|
+
.sds-menu__submenu--open {
|
|
384
|
+
background-color: var(--color-opacity-05);
|
|
385
|
+
}
|
|
386
|
+
/* ── Item slots ── */
|
|
387
|
+
.sds-menu__item-label {
|
|
388
|
+
flex: 1;
|
|
389
|
+
white-space: nowrap;
|
|
390
|
+
}
|
|
391
|
+
.sds-menu__item-icon {
|
|
392
|
+
display: inline-flex;
|
|
393
|
+
align-items: center;
|
|
394
|
+
flex-shrink: 0;
|
|
395
|
+
color: inherit;
|
|
396
|
+
}
|
|
397
|
+
.sds-menu__item-tooltip-icon {
|
|
398
|
+
display: inline-flex;
|
|
399
|
+
align-items: center;
|
|
400
|
+
flex-shrink: 0;
|
|
401
|
+
}
|
|
402
|
+
.sds-menu__item-check {
|
|
403
|
+
display: inline-flex;
|
|
404
|
+
align-items: center;
|
|
405
|
+
flex-shrink: 0;
|
|
406
|
+
color: var(--color-neutral-90);
|
|
407
|
+
margin-left: auto;
|
|
408
|
+
}
|
|
409
|
+
/* ── SubMenu accordion ── */
|
|
410
|
+
.sds-menu__submenu-accordion {
|
|
411
|
+
display: block;
|
|
412
|
+
}
|
|
413
|
+
.sds-menu__submenu-accordion-body {
|
|
414
|
+
display: grid;
|
|
415
|
+
grid-template-rows: 0fr;
|
|
416
|
+
transition: grid-template-rows 200ms ease, padding-bottom 200ms ease;
|
|
417
|
+
padding-bottom: 0;
|
|
418
|
+
}
|
|
419
|
+
.sds-menu__submenu-accordion-body--open {
|
|
420
|
+
grid-template-rows: 1fr;
|
|
421
|
+
padding-bottom: var(--spacing-1);
|
|
422
|
+
}
|
|
423
|
+
.sds-menu__submenu-accordion-body > ul {
|
|
424
|
+
overflow: hidden;
|
|
425
|
+
}
|
|
426
|
+
.sds-menu__submenu-accordion-body .sds-menu__item {
|
|
427
|
+
padding-left: var(--spacing-8);
|
|
428
|
+
font-size: var(--font-size-body-sm);
|
|
429
|
+
line-height: var(--lh-body-sm);
|
|
430
|
+
}
|
|
431
|
+
.sds-menu__submenu-panel .sds-menu__item {
|
|
432
|
+
font-size: var(--font-size-body-sm);
|
|
433
|
+
line-height: var(--lh-body-sm);
|
|
434
|
+
}
|
|
435
|
+
.sds-menu__submenu-chevron,
|
|
436
|
+
.sds-menu__submenu-chevron-accordion {
|
|
437
|
+
display: inline-flex;
|
|
438
|
+
align-items: center;
|
|
439
|
+
flex-shrink: 0;
|
|
440
|
+
}
|
|
441
|
+
.sds-menu__submenu-chevron-accordion {
|
|
442
|
+
transition: transform 120ms ease;
|
|
443
|
+
}
|
|
444
|
+
.sds-menu__submenu--open .sds-menu__submenu-chevron-accordion {
|
|
445
|
+
transform: rotate(180deg);
|
|
446
|
+
}
|
|
447
|
+
/* ── Empty state ── */
|
|
448
|
+
.sds-menu__empty {
|
|
449
|
+
padding: var(--spacing-2) var(--spacing-5);
|
|
450
|
+
font-family: var(--font-family-base);
|
|
451
|
+
font-size: var(--font-size-body-md);
|
|
452
|
+
line-height: var(--lh-body-md);
|
|
453
|
+
color: var(--color-neutral-50);
|
|
454
|
+
list-style: none;
|
|
455
|
+
box-sizing: border-box;
|
|
456
|
+
}
|
|
457
|
+
/* ── Separator ── */
|
|
458
|
+
.sds-menu__separator {
|
|
459
|
+
height: 1px;
|
|
460
|
+
background: var(--border-static-color);
|
|
461
|
+
margin: var(--spacing-1) var(--spacing-3);
|
|
462
|
+
}
|
|
463
|
+
/* ── Dark mode ── */
|
|
464
|
+
[data-theme="dark"] .sds-menu__profile-header {
|
|
465
|
+
border-bottom-color: var(--border-interactive-color);
|
|
466
|
+
}
|
|
467
|
+
[data-theme="dark"] .sds-menu__header {
|
|
468
|
+
border-bottom-color: var(--border-interactive-color);
|
|
469
|
+
}
|
|
470
|
+
[data-theme="dark"] .sds-menu__panel {
|
|
471
|
+
border-color: var(--border-interactive-color);
|
|
472
|
+
}
|
|
473
|
+
[data-theme="dark"] .sds-menu__search {
|
|
474
|
+
border-bottom-color: var(--border-interactive-color);
|
|
475
|
+
}
|
|
476
|
+
[data-theme="dark"] .sds-menu__group + .sds-menu__group {
|
|
477
|
+
border-top-color: var(--border-interactive-color);
|
|
478
|
+
}
|
|
479
|
+
[data-theme="dark"] .sds-menu__panel-footer {
|
|
480
|
+
border-top-color: var(--border-interactive-color);
|
|
481
|
+
}
|
|
482
|
+
[data-theme="dark"] .sds-menu__separator {
|
|
483
|
+
background: var(--border-interactive-color);
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
/* ── Placement ─────────────────────────────────────────────────────────────────
|
|
487
|
+
KDLS measured the trigger and positioned the panel from JavaScript. On a page that
|
|
488
|
+
renders on the server, a panel that only learns where to sit after hydration is a
|
|
489
|
+
panel that jumps — so SDS anchors it in CSS instead.
|
|
490
|
+
|
|
491
|
+
All three placements KDLS offers are below the trigger, which is what makes this
|
|
492
|
+
possible. When Popover arrives with real collision detection — flipping above when
|
|
493
|
+
there is no room below — this grows into it rather than being replaced. */
|
|
494
|
+
.sds-menu {
|
|
495
|
+
position: relative;
|
|
496
|
+
display: inline-flex;
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
.sds-menu__panel {
|
|
500
|
+
position: absolute;
|
|
501
|
+
top: calc(100% + var(--spacing-1));
|
|
502
|
+
/* The floating layer, like every other anchored panel. An earlier draft put this at 20,
|
|
503
|
+
which is below the sticky header at 100 — a menu opened from a header would have
|
|
504
|
+
rendered behind it. */
|
|
505
|
+
z-index: var(--z-floating);
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
.sds-menu--bottom .sds-menu__panel,
|
|
509
|
+
.sds-menu--bottomLeft .sds-menu__panel {
|
|
510
|
+
left: 0;
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
.sds-menu--bottomRight .sds-menu__panel {
|
|
514
|
+
right: 0;
|
|
515
|
+
left: auto;
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
.sds-menu__list {
|
|
519
|
+
margin: 0;
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
.sds-menu__separator {
|
|
523
|
+
border: 0;
|
|
524
|
+
height: 1px;
|
|
525
|
+
background: var(--border-static-color);
|
|
526
|
+
/* Inset to the item box, not to the panel: the items draw a rounded background in from
|
|
527
|
+
the edge, and a rule running past it reads as a seam. Follows the same inset. */
|
|
528
|
+
margin: var(--spacing-1) max(var(--spacing-1), calc(var(--radius-md) * 0.3));
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
/* Native chrome reset.
|
|
532
|
+
SDS renders these rows as real <button> and <a> elements, which KDLS did not — it used
|
|
533
|
+
bare <div>s with click handlers. A button brings keyboard activation, focus and the
|
|
534
|
+
disabled state from the browser, and these four lines are the whole price: without them
|
|
535
|
+
the browser's own button border and background show through the design. */
|
|
536
|
+
.sds-menu__item {
|
|
537
|
+
appearance: none;
|
|
538
|
+
border: 0;
|
|
539
|
+
background: none;
|
|
540
|
+
text-align: left;
|
|
541
|
+
text-decoration: none;
|
|
542
|
+
/* A <button> sizes to fit-content even at display:flex, so `auto` leaves a short label
|
|
543
|
+
in a 75px row that only highlights under the text. `100%` is the other trap: it
|
|
544
|
+
resolves against the row and the 4px margins are added *outside* it, so every item
|
|
545
|
+
overflowed the panel by 8px and was clipped at the border. The margins have to come
|
|
546
|
+
out of the width. */
|
|
547
|
+
width: calc(100% - var(--spacing-2));
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
/* A caller-supplied trigger. KDLS cloned the element and injected props into it; Marko
|
|
551
|
+
renders it as tag content instead, which needs a host to carry the ARIA and the click.
|
|
552
|
+
The host must not impose a shape of its own — the trigger is whatever the caller sent. */
|
|
553
|
+
.sds-menu__trigger-custom {
|
|
554
|
+
display: inline-flex;
|
|
555
|
+
align-items: center;
|
|
556
|
+
cursor: pointer;
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
.sds-menu__trigger-custom:focus-visible {
|
|
560
|
+
outline: var(--focus-ring-width) solid var(--focus-stroke-color);
|
|
561
|
+
outline-offset: 2px;
|
|
562
|
+
border-radius: var(--radius-xs);
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
/* A row that holds markup rather than a choice — KDLS's `ds-scheme-custom-row`, which is
|
|
566
|
+
how a ColorPicker ends up inside a Menu.Group. It gets the panel's own horizontal
|
|
567
|
+
padding and nothing else: it is not a target, so it must not look like one. */
|
|
568
|
+
.sds-menu__custom {
|
|
569
|
+
padding: var(--spacing-1) var(--spacing-2);
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
/* The avatar trigger. The button is chrome around the face: it carries the focus ring and
|
|
573
|
+
the hit area, and states only what the design is silent about. */
|
|
574
|
+
.sds-menu__avatar-btn {
|
|
575
|
+
display: inline-flex;
|
|
576
|
+
padding: 0;
|
|
577
|
+
border: 0;
|
|
578
|
+
background: none;
|
|
579
|
+
border-radius: var(--radius-full);
|
|
580
|
+
cursor: pointer;
|
|
581
|
+
line-height: 0;
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
.sds-menu__avatar-btn:focus-visible {
|
|
585
|
+
outline: var(--focus-ring-width) solid var(--focus-stroke-color);
|
|
586
|
+
outline-offset: 2px;
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
/* ── A row that opens the rows under it ───────────────────────────────────────
|
|
590
|
+
The accordion form: the children expand inside the panel, pushing what is below them
|
|
591
|
+
down. KDLS's default is a floating fly-out that opens to the right of the row, and on a
|
|
592
|
+
phone there is no right to open into — KDLS knows that and forces this form inside a
|
|
593
|
+
vertical Nav. Only this one is ported.
|
|
594
|
+
|
|
595
|
+
The chevron turns rather than being swapped for a second icon, which is one rule
|
|
596
|
+
instead of a branch. */
|
|
597
|
+
.sds-menu__item--expandable {
|
|
598
|
+
justify-content: space-between;
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
.sds-menu__item-chevron {
|
|
602
|
+
display: inline-flex;
|
|
603
|
+
flex-shrink: 0;
|
|
604
|
+
margin-left: auto;
|
|
605
|
+
transition: transform 160ms var(--ease-standard);
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
.sds-menu__item--expandable[aria-expanded="true"] .sds-menu__item-chevron {
|
|
609
|
+
transform: rotate(180deg);
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
/* The children. Indented so the relationship is visible without a line, and with the
|
|
613
|
+
panel's own horizontal padding still applying to the row itself. */
|
|
614
|
+
.sds-menu__child > .sds-menu__item {
|
|
615
|
+
padding-left: var(--spacing-8);
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
@media (prefers-reduced-motion: reduce) {
|
|
619
|
+
.sds-menu__item-chevron { transition: none; }
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
/* 40px tall, so the Pill's ladder: 0 / 11 / 15 / capsule. See Pill.css for the arithmetic
|
|
623
|
+
— the numbers are a fraction of the control's own height, which is what keeps every
|
|
624
|
+
40px control in the system reading as one family. `--radius-sm` stopped at 16px here,
|
|
625
|
+
so `rounded` was a rounded rectangle instead of a capsule. The bare value is `soft`'s,
|
|
626
|
+
because an install that never picks a scheme has no attribute to match on. */
|
|
627
|
+
[data-radius="flat"] .sds-menu__btn--navButton { border-radius: 0; }
|
|
628
|
+
[data-radius="soft"] .sds-menu__btn--navButton { border-radius: 11px; }
|
|
629
|
+
[data-radius="medium"] .sds-menu__btn--navButton { border-radius: 15px; }
|
|
630
|
+
[data-radius="rounded"] .sds-menu__btn--navButton { border-radius: var(--radius-full); }
|
|
631
|
+
|
|
632
|
+
/* ── Corner radius: the 40px family ───────────────────────────────────────────
|
|
633
|
+
A row in a menu, a select or a dropdown is 40px tall, which makes it the same control
|
|
634
|
+
as the Pill and the navButton — so it takes the same four values. Rafael, pointing at
|
|
635
|
+
the theme bar's own menu: these are reactive, but not in the right way; they should be
|
|
636
|
+
40px like the navButton and have the radius resolved here.
|
|
637
|
+
|
|
638
|
+
height 40px flat 0 soft 11px medium 15px rounded 20px (a capsule)
|
|
639
|
+
as a fraction 0 0.275 0.375 0.5
|
|
640
|
+
|
|
641
|
+
`--radius-sm` was what they had, and it tops out at 16px — so `rounded` drew a rounded
|
|
642
|
+
rectangle where every other 40px control in the system drew a capsule. See Pill.css for
|
|
643
|
+
the arithmetic; the numbers are a fraction of the control's own height, which is what
|
|
644
|
+
keeps the family reading as one thing.
|
|
645
|
+
|
|
646
|
+
The bare value is `soft`'s, because an install that never picks a scheme has no
|
|
647
|
+
attribute at all and falls through to it. */
|
|
648
|
+
[data-radius="flat"] .sds-menu__item { border-radius: 0; }
|
|
649
|
+
[data-radius="soft"] .sds-menu__item { border-radius: 11px; }
|
|
650
|
+
[data-radius="medium"] .sds-menu__item { border-radius: 15px; }
|
|
651
|
+
[data-radius="rounded"] .sds-menu__item { border-radius: var(--radius-full); }
|