@deepseek-ai/dsh-client-ui-primitives 0.2.2-rc.5 → 0.2.3-alpha.2
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.i18n.yaml +12 -12
- package/README.md +21 -10
- package/README.zh.md +21 -10
- package/lib/index.js +2961 -868
- package/lib/index.js.map +1 -1
- package/lib/types/Checkbox.d.ts.map +1 -1
- package/lib/types/Checkbox.js.map +1 -1
- package/lib/types/HoverCard.d.ts +5 -3
- package/lib/types/HoverCard.d.ts.map +1 -1
- package/lib/types/HoverCard.js.map +1 -1
- package/lib/types/ImageLightbox.d.ts.map +1 -1
- package/lib/types/ImageLightbox.js.map +1 -1
- package/lib/types/LinkIcon.js.map +1 -1
- package/lib/types/Marquee.d.ts +35 -0
- package/lib/types/Marquee.d.ts.map +1 -0
- package/lib/types/Marquee.js.map +1 -0
- package/lib/types/Menu.d.ts +24 -5
- package/lib/types/Menu.d.ts.map +1 -1
- package/lib/types/Menu.js.map +1 -1
- package/lib/types/PermissionIcon.d.ts.map +1 -1
- package/lib/types/PermissionIcon.js.map +1 -1
- package/lib/types/SearchField.d.ts +18 -0
- package/lib/types/SearchField.d.ts.map +1 -0
- package/lib/types/SearchField.js.map +1 -0
- package/lib/types/Switch.d.ts +5 -1
- package/lib/types/Switch.d.ts.map +1 -1
- package/lib/types/Switch.js.map +1 -1
- package/lib/types/TerminalBlock.js.map +1 -1
- package/lib/types/clipboard.d.ts +4 -2
- package/lib/types/clipboard.d.ts.map +1 -1
- package/lib/types/clipboard.js.map +1 -1
- package/lib/types/icons/artwork.d.ts +16 -0
- package/lib/types/icons/artwork.d.ts.map +1 -1
- package/lib/types/icons/artwork.js.map +1 -1
- package/lib/types/icons/index.d.ts +21 -5
- package/lib/types/icons/index.d.ts.map +1 -1
- package/lib/types/icons/index.js.map +1 -1
- package/lib/types/icons/props.d.ts +1 -1
- package/lib/types/icons/props.d.ts.map +1 -1
- package/lib/types/icons/shared-artwork.js.map +1 -1
- package/lib/types/index.d.ts +2 -1
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/index.js.map +1 -1
- package/lib/types/input-modality.d.ts +5 -0
- package/lib/types/input-modality.d.ts.map +1 -1
- package/lib/types/input-modality.js.map +1 -1
- package/lib/types/markdown/cjkFriendlyStrong.d.ts +4 -1
- package/lib/types/markdown/cjkFriendlyStrong.d.ts.map +1 -1
- package/lib/types/markdown/cjkFriendlyStrong.js.map +1 -1
- package/lib/types/useMenuSubmenu.d.ts +1 -0
- package/lib/types/useMenuSubmenu.d.ts.map +1 -1
- package/lib/types/useMenuSubmenu.js.map +1 -1
- package/lib/types/useModalLayer.d.ts +3 -1
- package/lib/types/useModalLayer.d.ts.map +1 -1
- package/lib/types/useModalLayer.js.map +1 -1
- package/package.json +8 -8
- package/src/Checkbox.module.css +43 -2
- package/src/Checkbox.tsx +7 -3
- package/src/HoverCard.module.css +42 -0
- package/src/HoverCard.tsx +53 -49
- package/src/ImageLightbox.tsx +2 -1
- package/src/Input.module.css +7 -1
- package/src/LinkIcon.tsx +9 -9
- package/src/Marquee.module.css +47 -0
- package/src/Marquee.tsx +109 -0
- package/src/Menu.module.css +34 -4
- package/src/Menu.tsx +138 -35
- package/src/Modal.module.css +8 -4
- package/src/PermissionIcon.tsx +10 -12
- package/src/Pill.module.css +11 -1
- package/src/RiskConfirmation.module.css +6 -1
- package/src/SearchField.module.css +74 -0
- package/src/SearchField.tsx +37 -0
- package/src/SegmentedTabs.module.css +4 -10
- package/src/Switch.tsx +7 -1
- package/src/TerminalBlock.tsx +4 -4
- package/src/clipboard.ts +29 -15
- package/src/icons/artwork.ts +89 -85
- package/src/icons/index.tsx +29 -5
- package/src/icons/props.ts +1 -1
- package/src/icons/shared-artwork.tsx +14 -14
- package/src/index.ts +2 -1
- package/src/input-modality.ts +13 -5
- package/src/markdown/MarkdownText.module.css +21 -10
- package/src/markdown/cjkFriendlyStrong.ts +9 -2
- package/src/useMenuSubmenu.ts +6 -3
- package/src/useModalLayer.ts +5 -2
- package/lib/AnimatedRows.module.css +0 -7
- package/lib/Button.module.css +0 -84
- package/lib/Checkbox.module.css +0 -28
- package/lib/CodeCard.module.css +0 -85
- package/lib/CommandText.module.css +0 -12
- package/lib/ConnectionIndicator.module.css +0 -120
- package/lib/DetailDocument.module.css +0 -67
- package/lib/DiffBlock.module.css +0 -82
- package/lib/DisclosureRow.module.css +0 -115
- package/lib/FileTypeIcon.module.css +0 -50
- package/lib/HoverCard.module.css +0 -108
- package/lib/ImageLightbox.module.css +0 -54
- package/lib/ImagePreview.module.css +0 -24
- package/lib/InlineEditor.module.css +0 -23
- package/lib/Input.module.css +0 -38
- package/lib/JsonTree.module.css +0 -371
- package/lib/Menu.module.css +0 -443
- package/lib/MenuGroup.module.css +0 -37
- package/lib/MenuSurface.module.css +0 -65
- package/lib/Modal.module.css +0 -147
- package/lib/PathLabel.module.css +0 -28
- package/lib/Pill.module.css +0 -30
- package/lib/QuotePreview.module.css +0 -138
- package/lib/ReadBlock.module.css +0 -45
- package/lib/RiskConfirmation.module.css +0 -47
- package/lib/RowDragPreview.module.css +0 -12
- package/lib/SearchBlock.module.css +0 -114
- package/lib/SegmentedControl.module.css +0 -81
- package/lib/SegmentedTabs.module.css +0 -77
- package/lib/ShortcutKeys.module.css +0 -33
- package/lib/StateDot.module.css +0 -100
- package/lib/Switch.module.css +0 -49
- package/lib/Tag.module.css +0 -57
- package/lib/TerminalBlock.module.css +0 -207
- package/lib/TextShimmer.module.css +0 -88
- package/lib/Toast.module.css +0 -102
- package/lib/Tooltip.module.css +0 -68
- package/lib/UserMessageBubble.module.css +0 -11
- package/lib/WebBlock.module.css +0 -153
- package/lib/ZoomControls.module.css +0 -54
- package/lib/markdown/CodeBlock.module.css +0 -209
- package/lib/markdown/JsonBlock.module.css +0 -34
- package/lib/markdown/MarkdownText.module.css +0 -511
- package/lib/settings-form/SettingsForm.module.css +0 -53
- package/lib/settings-form/fields.module.css +0 -153
- package/lib/types/rank-by-name.d.ts +0 -22
- package/lib/types/rank-by-name.d.ts.map +0 -1
- package/lib/types/rank-by-name.js.map +0 -1
- package/lib/user-text.module.css +0 -46
- package/src/rank-by-name.ts +0 -93
package/lib/Menu.module.css
DELETED
|
@@ -1,443 +0,0 @@
|
|
|
1
|
-
.root {
|
|
2
|
-
position: relative;
|
|
3
|
-
display: inline-flex;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
/* Compact translucent dropdown card shared by feature menus. */
|
|
7
|
-
.list,
|
|
8
|
-
.submenu {
|
|
9
|
-
/* min-widths below are the design's outer card widths — include the pad. */
|
|
10
|
-
box-sizing: border-box;
|
|
11
|
-
padding: 4px;
|
|
12
|
-
display: flex;
|
|
13
|
-
flex-direction: column;
|
|
14
|
-
gap: 0;
|
|
15
|
-
border: 0;
|
|
16
|
-
--dsw-elevation-stroke-color: var(--dsw-alias-border-l1);
|
|
17
|
-
box-shadow: var(--dsw-elevation-prominent);
|
|
18
|
-
/* Elevated surface: the scrollbar thumb takes the l2 elevation tokens. The
|
|
19
|
-
declaration sits on the card rather than on `.scrollable .viewport`
|
|
20
|
-
because the elevation is a property of this surface, and the custom
|
|
21
|
-
properties inherit down to whichever descendant actually scrolls (see
|
|
22
|
-
ui-theme styles/scrollbar.css for the rebinding contract). */
|
|
23
|
-
--dsh-scrollbar-thumb: var(--dsw-alias-scrollbar-bg-l2);
|
|
24
|
-
--dsh-scrollbar-thumb-hover: var(--dsw-alias-scrollbar-hover-l2);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
/* Primary cards grow with their content between compact and readable bounds. */
|
|
28
|
-
.list {
|
|
29
|
-
position: absolute;
|
|
30
|
-
top: calc(100% + 4px);
|
|
31
|
-
left: 0;
|
|
32
|
-
z-index: 100;
|
|
33
|
-
min-width: min(144px, calc(100vw - 24px));
|
|
34
|
-
max-width: min(360px, calc(100vw - 24px));
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
/* Legacy slots can render no rows; keep empty context popups out of layout. */
|
|
38
|
-
.list[data-context-menu]:not(:has([role='menuitem'])) {
|
|
39
|
-
display: none;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
/* Every candidate reserves layout-window margins while browser zoom moves the page. */
|
|
43
|
-
.portal {
|
|
44
|
-
--dsh-menu-window-top: max(12px, var(--dsh-frame-overlay-top, 12px));
|
|
45
|
-
position: fixed;
|
|
46
|
-
position-area: none;
|
|
47
|
-
top: max(var(--dsh-menu-window-top), calc(anchor(bottom) + 4px));
|
|
48
|
-
bottom: 12px;
|
|
49
|
-
left: max(12px, anchor(left));
|
|
50
|
-
right: 12px;
|
|
51
|
-
justify-self: start;
|
|
52
|
-
align-self: start;
|
|
53
|
-
margin: 0;
|
|
54
|
-
position-try-fallbacks: --dsh-menu-wide-below, --dsh-menu-above, --dsh-menu-wide-above, --dsh-menu-window, --dsh-menu-wide-window;
|
|
55
|
-
width: max-content;
|
|
56
|
-
height: fit-content;
|
|
57
|
-
z-index: 1100;
|
|
58
|
-
}
|
|
59
|
-
.portal[data-anchor-side='top'] {
|
|
60
|
-
top: var(--dsh-menu-window-top);
|
|
61
|
-
bottom: max(12px, calc(anchor(top) + 4px));
|
|
62
|
-
align-self: end;
|
|
63
|
-
position-try-fallbacks: --dsh-menu-wide-above, --dsh-menu-below, --dsh-menu-wide-below, --dsh-menu-window, --dsh-menu-wide-window;
|
|
64
|
-
}
|
|
65
|
-
.portal[data-anchor-side='right'] {
|
|
66
|
-
top: max(var(--dsh-menu-window-top), anchor(top));
|
|
67
|
-
bottom: 12px;
|
|
68
|
-
left: max(12px, calc(anchor(right) + 4px));
|
|
69
|
-
right: 12px;
|
|
70
|
-
position-try-fallbacks: --dsh-menu-left, --dsh-menu-wide-below, --dsh-menu-window, --dsh-menu-wide-window;
|
|
71
|
-
}
|
|
72
|
-
.portal[data-anchor-align='end']:not([data-anchor-side='right']) {
|
|
73
|
-
left: 12px;
|
|
74
|
-
right: max(12px, anchor(right));
|
|
75
|
-
justify-self: end;
|
|
76
|
-
--dsh-menu-wide-align: start;
|
|
77
|
-
}
|
|
78
|
-
.portal[data-match-anchor-width] { min-width: min(anchor-size(width), calc(100vw - 24px)); }
|
|
79
|
-
.portal[data-context-menu] { --dsh-menu-window-top: 12px; }
|
|
80
|
-
|
|
81
|
-
@position-try --dsh-menu-below {
|
|
82
|
-
top: max(var(--dsh-menu-window-top), calc(anchor(bottom) + 4px));
|
|
83
|
-
bottom: 12px;
|
|
84
|
-
align-self: start;
|
|
85
|
-
}
|
|
86
|
-
@position-try --dsh-menu-above {
|
|
87
|
-
top: var(--dsh-menu-window-top);
|
|
88
|
-
bottom: max(12px, calc(anchor(top) + 4px));
|
|
89
|
-
align-self: end;
|
|
90
|
-
}
|
|
91
|
-
@position-try --dsh-menu-wide-below {
|
|
92
|
-
top: max(var(--dsh-menu-window-top), calc(anchor(bottom) + 4px));
|
|
93
|
-
bottom: 12px;
|
|
94
|
-
left: 12px;
|
|
95
|
-
right: 12px;
|
|
96
|
-
align-self: start;
|
|
97
|
-
justify-self: safe var(--dsh-menu-wide-align, end);
|
|
98
|
-
}
|
|
99
|
-
@position-try --dsh-menu-wide-above {
|
|
100
|
-
top: var(--dsh-menu-window-top);
|
|
101
|
-
bottom: max(12px, calc(anchor(top) + 4px));
|
|
102
|
-
left: 12px;
|
|
103
|
-
right: 12px;
|
|
104
|
-
align-self: end;
|
|
105
|
-
justify-self: safe var(--dsh-menu-wide-align, end);
|
|
106
|
-
}
|
|
107
|
-
@position-try --dsh-menu-left {
|
|
108
|
-
left: 12px;
|
|
109
|
-
right: max(12px, calc(anchor(left) + 4px));
|
|
110
|
-
justify-self: end;
|
|
111
|
-
}
|
|
112
|
-
/* A tall card keeps its trigger alignment before horizontal clamping is needed. */
|
|
113
|
-
@position-try --dsh-menu-window {
|
|
114
|
-
top: var(--dsh-menu-window-top);
|
|
115
|
-
bottom: 12px;
|
|
116
|
-
align-self: safe start;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
@position-try --dsh-menu-wide-window {
|
|
120
|
-
top: var(--dsh-menu-window-top);
|
|
121
|
-
left: 12px;
|
|
122
|
-
right: 12px;
|
|
123
|
-
bottom: 12px;
|
|
124
|
-
align-self: safe start;
|
|
125
|
-
justify-self: safe var(--dsh-menu-wide-align, end);
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
/* Open above the anchor (empty-state workspace chip: figma 122:9481). */
|
|
129
|
-
.sideTop {
|
|
130
|
-
top: auto;
|
|
131
|
-
bottom: calc(100% + 4px);
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
.alignEnd {
|
|
135
|
-
left: auto;
|
|
136
|
-
right: 0;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
/* Tall lists scroll within the layout viewport, independently of pinch zoom.
|
|
140
|
-
* Child cards use their own body portal, so a scrolling parent never clips them. */
|
|
141
|
-
.scrollable {
|
|
142
|
-
max-height: calc(100vh - 12px - max(12px, var(--dsh-frame-overlay-top, 12px)));
|
|
143
|
-
max-height: calc(100dvh - 12px - max(12px, var(--dsh-frame-overlay-top, 12px)));
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
.viewport {
|
|
147
|
-
display: flex;
|
|
148
|
-
flex-direction: column;
|
|
149
|
-
min-height: 0;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
.scrollable .viewport {
|
|
153
|
-
overflow-y: auto;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
/* Pinned rows below the scroll region; l2 hairline (l1 is near-invisible on
|
|
157
|
-
* the menu surface) mirrors the .separator spacing. */
|
|
158
|
-
.footer {
|
|
159
|
-
flex: none;
|
|
160
|
-
display: flex;
|
|
161
|
-
flex-direction: column;
|
|
162
|
-
margin-top: 3px;
|
|
163
|
-
padding-top: 3px;
|
|
164
|
-
border-top: 0.5px solid var(--dsw-alias-border-l2);
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
.list[data-context-menu] .footer:has(> .separator:first-child) {
|
|
168
|
-
margin-top: 0;
|
|
169
|
-
padding-top: 0;
|
|
170
|
-
border-top: none;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
.itemWrap {
|
|
174
|
-
position: relative;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
/* Menu cell: compact text, icon, and selection spacing. */
|
|
178
|
-
.item {
|
|
179
|
-
display: flex;
|
|
180
|
-
align-items: center;
|
|
181
|
-
gap: 6px;
|
|
182
|
-
width: 100%;
|
|
183
|
-
min-height: 34px;
|
|
184
|
-
padding: 6px 8px;
|
|
185
|
-
border: none;
|
|
186
|
-
border-radius: var(--dsw-radius-md);
|
|
187
|
-
background: transparent;
|
|
188
|
-
cursor: pointer;
|
|
189
|
-
font-size: 13px;
|
|
190
|
-
line-height: 20px;
|
|
191
|
-
color: var(--dsw-alias-label-primary);
|
|
192
|
-
text-align: left;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
@media (hover: hover) {
|
|
196
|
-
.item:hover:not(:disabled):not([aria-disabled='true']) {
|
|
197
|
-
background: var(--dsw-alias-interactive-bg-hover);
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
/* Arrow navigation moves real focus, so the row the keyboard is on carries the
|
|
202
|
-
same fill the pointer gets: the fill is the row's focus indication, and the
|
|
203
|
-
browser's default ring would double it. */
|
|
204
|
-
.item:focus-visible:not(:disabled) {
|
|
205
|
-
background: var(--dsw-alias-interactive-bg-hover);
|
|
206
|
-
outline: none;
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
.denseList .item {
|
|
210
|
-
min-height: 30px;
|
|
211
|
-
padding-block: 4px;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
.denseList .label {
|
|
215
|
-
padding-block: 3px;
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
.list.compactList,
|
|
219
|
-
.submenu.compactList {
|
|
220
|
-
min-width: min(156px, calc(100vw - 24px));
|
|
221
|
-
padding: 4px;
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
.compactList .item {
|
|
225
|
-
min-height: 24px;
|
|
226
|
-
gap: 5px;
|
|
227
|
-
padding: 2px 6px;
|
|
228
|
-
border-radius: var(--dsw-radius-sm);
|
|
229
|
-
font-size: 11px;
|
|
230
|
-
line-height: 17px;
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
.compactList .itemIcon {
|
|
234
|
-
width: 12px;
|
|
235
|
-
height: 12px;
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
.compactList .separator {
|
|
239
|
-
margin: 2px 6px;
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
.compactList .label {
|
|
243
|
-
padding: 3px 6px;
|
|
244
|
-
font-size: 10px;
|
|
245
|
-
line-height: 15px;
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
.item:disabled,
|
|
249
|
-
.item[aria-disabled='true'] {
|
|
250
|
-
opacity: 0.4;
|
|
251
|
-
cursor: not-allowed;
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
.itemIcon {
|
|
255
|
-
display: inline-flex;
|
|
256
|
-
flex: none;
|
|
257
|
-
width: 14px;
|
|
258
|
-
height: 14px;
|
|
259
|
-
align-items: center;
|
|
260
|
-
justify-content: center;
|
|
261
|
-
color: var(--dsw-alias-menu-icon);
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
.itemIcon svg,
|
|
265
|
-
.check {
|
|
266
|
-
width: 14px;
|
|
267
|
-
height: 14px;
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
.compactList .itemIcon svg,
|
|
271
|
-
.compactList .check {
|
|
272
|
-
width: 12px;
|
|
273
|
-
height: 12px;
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
.itemLabel {
|
|
277
|
-
flex: 1;
|
|
278
|
-
min-width: 0;
|
|
279
|
-
overflow: hidden;
|
|
280
|
-
text-overflow: ellipsis;
|
|
281
|
-
white-space: nowrap;
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
.shortcut {
|
|
285
|
-
flex: none;
|
|
286
|
-
margin-inline-start: auto;
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
.shortcut .shortcutKeys {
|
|
290
|
-
color: var(--dsw-alias-label-caption);
|
|
291
|
-
font-size: 11px;
|
|
292
|
-
line-height: 16px;
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
@media (pointer: coarse) {
|
|
296
|
-
:global(html:not([data-input-modality='keyboard'])) .shortcut {
|
|
297
|
-
display: none;
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
.check {
|
|
302
|
-
flex: none;
|
|
303
|
-
color: var(--dsw-alias-label-primary);
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
/* Selected cell keeps the plain fill (marker is the trailing check); the
|
|
307
|
-
* class remains as a hook for owner-side emphasis. */
|
|
308
|
-
.selected {
|
|
309
|
-
background: transparent;
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
/* Fill-mode selection: the row holds the hover fill instead of a check. */
|
|
313
|
-
.selectedFill {
|
|
314
|
-
background: var(--dsw-alias-interactive-bg-hover);
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
/* Destructive row: error text/icon, danger hover fill. */
|
|
318
|
-
.danger {
|
|
319
|
-
color: var(--dsw-alias-state-error-primary);
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
.danger .itemIcon {
|
|
323
|
-
color: var(--dsw-alias-state-error-primary);
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
@media (hover: hover) {
|
|
327
|
-
.danger:hover:not(:disabled):not([aria-disabled='true']) {
|
|
328
|
-
background: var(--dsw-alias-interactive-bg-hover-danger);
|
|
329
|
-
}
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
.danger:focus-visible:not(:disabled) {
|
|
333
|
-
background: var(--dsw-alias-interactive-bg-hover-danger);
|
|
334
|
-
outline: none;
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
/* Heading row: non-interactive small grey text, padding aligned with items. */
|
|
338
|
-
.label {
|
|
339
|
-
padding: 6px 8px;
|
|
340
|
-
font-size: 11px;
|
|
341
|
-
line-height: 15px;
|
|
342
|
-
color: var(--dsw-alias-label-tertiary);
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
/* Separator endpoints align with the row content. The l2 stroke stays visible
|
|
346
|
-
* on the menu surface. */
|
|
347
|
-
.separator {
|
|
348
|
-
height: 0.5px;
|
|
349
|
-
margin: 3px 8px;
|
|
350
|
-
background: var(--dsw-alias-border-l2);
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
/* A data separator directly followed by a row that starts a group draws one
|
|
354
|
-
* line, not two; a group start on the list's first row draws none. */
|
|
355
|
-
.separator + .separator,
|
|
356
|
-
.separator + .itemWrap > .separator:first-child,
|
|
357
|
-
.itemWrap:first-child > .separator:first-child {
|
|
358
|
-
display: none;
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
/* A legacy outlet following structured rows is not the beginning of the menu. */
|
|
362
|
-
.list[data-context-menu] .viewport > .itemWrap ~ [data-slot] .itemWrap:first-child > .separator:first-child {
|
|
363
|
-
display: block;
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
/* The parent card's anchor for an open child card: an unscrolled box matching the
|
|
367
|
-
* card. WebKit does not re-resolve anchors on the anchor-positioned card itself
|
|
368
|
-
* after it settles, and resolves rows inside the scrolling list without their
|
|
369
|
-
* scroll offset; a descendant box avoids both. */
|
|
370
|
-
.submenuAnchor {
|
|
371
|
-
position: absolute;
|
|
372
|
-
inset: 0;
|
|
373
|
-
pointer-events: none;
|
|
374
|
-
}
|
|
375
|
-
|
|
376
|
-
/* Child cards stay mounted while switching between side and single-panel layouts.
|
|
377
|
-
* Both layouts use the parent card's anchor box as the default anchor, which
|
|
378
|
-
* browsers track through movement and zoom. JavaScript selects the layout and
|
|
379
|
-
* supplies the active row's offset within the parent card and the child card's
|
|
380
|
-
* natural height. */
|
|
381
|
-
.submenu {
|
|
382
|
-
--dsh-menu-window-top: max(12px, var(--dsh-frame-overlay-top, 12px));
|
|
383
|
-
position: fixed;
|
|
384
|
-
position-anchor: var(--dsh-submenu-parent);
|
|
385
|
-
position-visibility: always;
|
|
386
|
-
margin: 0;
|
|
387
|
-
z-index: 1101;
|
|
388
|
-
width: max-content;
|
|
389
|
-
min-width: min(163px, calc(100vw - 24px));
|
|
390
|
-
max-width: min(360px, calc(100vw - 24px));
|
|
391
|
-
max-height: calc(100dvh - 12px - var(--dsh-menu-window-top));
|
|
392
|
-
}
|
|
393
|
-
.submenu[data-contextual] { --dsh-menu-window-top: 12px; }
|
|
394
|
-
|
|
395
|
-
/* Side card: beside the parent card with a 4px gap, top edge on the active row,
|
|
396
|
-
* moved up when its height does not fit below the row. The only placement
|
|
397
|
-
* fallback is the left side. */
|
|
398
|
-
.submenu[data-submenu-layout='side'] {
|
|
399
|
-
top: max(var(--dsh-menu-window-top), min(
|
|
400
|
-
calc(anchor(top) + var(--dsh-submenu-row-offset, 0px)),
|
|
401
|
-
calc(100dvh - 12px - var(--dsh-submenu-height, 0px))
|
|
402
|
-
));
|
|
403
|
-
left: calc(anchor(right) + 4px);
|
|
404
|
-
right: 12px;
|
|
405
|
-
justify-self: start;
|
|
406
|
-
height: max-content;
|
|
407
|
-
position-try-fallbacks: --dsh-submenu-left;
|
|
408
|
-
}
|
|
409
|
-
@position-try --dsh-submenu-left {
|
|
410
|
-
left: 12px;
|
|
411
|
-
right: calc(anchor(left) + 4px);
|
|
412
|
-
justify-self: end;
|
|
413
|
-
}
|
|
414
|
-
|
|
415
|
-
/* Single-panel page: the child takes the parent card's place and at least its width. */
|
|
416
|
-
.submenu[data-submenu-layout='page'] {
|
|
417
|
-
top: max(var(--dsh-menu-window-top), anchor(top));
|
|
418
|
-
bottom: 12px;
|
|
419
|
-
left: max(12px, anchor(left));
|
|
420
|
-
right: 12px;
|
|
421
|
-
align-self: start;
|
|
422
|
-
justify-self: start;
|
|
423
|
-
height: fit-content;
|
|
424
|
-
min-width: min(anchor-size(width), calc(100vw - 24px));
|
|
425
|
-
max-width: calc(100vw - 24px);
|
|
426
|
-
}
|
|
427
|
-
|
|
428
|
-
/* Retain the parent's geometry and rows for placement and focus restoration. */
|
|
429
|
-
.parentPage {
|
|
430
|
-
visibility: hidden;
|
|
431
|
-
pointer-events: none;
|
|
432
|
-
}
|
|
433
|
-
|
|
434
|
-
.submenu > .item {
|
|
435
|
-
flex: none;
|
|
436
|
-
}
|
|
437
|
-
|
|
438
|
-
.list[data-menu-phase='dismiss'],
|
|
439
|
-
.list[data-menu-phase='replace'] { pointer-events: none; }
|
|
440
|
-
.list[data-context-menu].scrollable {
|
|
441
|
-
max-height: calc(100vh - 24px);
|
|
442
|
-
max-height: calc(100dvh - 24px);
|
|
443
|
-
}
|
package/lib/MenuGroup.module.css
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
.group {
|
|
2
|
-
position: relative;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.start {
|
|
6
|
-
position: absolute;
|
|
7
|
-
top: 0;
|
|
8
|
-
left: 0;
|
|
9
|
-
width: 1px;
|
|
10
|
-
height: 1px;
|
|
11
|
-
opacity: 0;
|
|
12
|
-
pointer-events: none;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.group + .group {
|
|
16
|
-
margin-top: 3px;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.heading {
|
|
20
|
-
position: sticky;
|
|
21
|
-
top: 0;
|
|
22
|
-
z-index: 1;
|
|
23
|
-
padding: 4px 7px 2px;
|
|
24
|
-
background: transparent;
|
|
25
|
-
color: var(--dsw-alias-label-tertiary);
|
|
26
|
-
font-size: 11px;
|
|
27
|
-
line-height: 16px;
|
|
28
|
-
font-weight: 500;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.heading[data-stuck] {
|
|
32
|
-
background: var(--dsw-alias-menu-group-header-fill);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
:global(html:not([data-platform='darwin'])) .heading {
|
|
36
|
-
border-radius: var(--dsw-radius-md);
|
|
37
|
-
}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
.surface,
|
|
2
|
-
.backing {
|
|
3
|
-
border-radius: var(--dsw-radius-lg);
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.compact {
|
|
7
|
-
border-radius: var(--dsw-radius-md);
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
:where(.surface) {
|
|
11
|
-
position: relative;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.surface {
|
|
15
|
-
anchor-name: var(--dsh-menu-anchor);
|
|
16
|
-
isolation: isolate;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
/* Filtering only the background keeps nested menus and fixed overlays free of
|
|
20
|
-
* an ancestor backdrop root or a new fixed-position containing block. */
|
|
21
|
-
.material {
|
|
22
|
-
position: absolute;
|
|
23
|
-
inset: 0;
|
|
24
|
-
z-index: -1;
|
|
25
|
-
border-radius: inherit;
|
|
26
|
-
background: var(--dsw-menu-surface-fill);
|
|
27
|
-
backdrop-filter: var(--dsw-menu-backdrop-filter);
|
|
28
|
-
pointer-events: none;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.backing {
|
|
32
|
-
display: none;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/* Chromium needs opaque pixels behind the page content to blur it over native
|
|
36
|
-
* vibrancy. Body isolation keeps this backing above the native window and below
|
|
37
|
-
* the page; CSS anchors limit it to this menu without a layout observer. */
|
|
38
|
-
:global(html[data-platform='darwin']) .backing {
|
|
39
|
-
display: block;
|
|
40
|
-
position: fixed;
|
|
41
|
-
position-anchor: var(--dsh-menu-anchor);
|
|
42
|
-
top: anchor(top);
|
|
43
|
-
left: anchor(left);
|
|
44
|
-
width: anchor-size(width, 0px);
|
|
45
|
-
height: anchor-size(height, 0px);
|
|
46
|
-
z-index: -1;
|
|
47
|
-
background: var(--dsw-alias-bg-base);
|
|
48
|
-
pointer-events: none;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
/* Opacity on the container would prevent its material from blurring the page.
|
|
52
|
-
* Enter animations release their compositing layers so nested menus can blur too. */
|
|
53
|
-
.surface[data-menu-phase='enter'] > *,
|
|
54
|
-
.backing[data-menu-phase='enter'] { animation: dsh-context-menu-in var(--dsh-menu-enter) ease-out; }
|
|
55
|
-
.surface[data-menu-phase='dismiss'] > *,
|
|
56
|
-
.backing[data-menu-phase='dismiss'],
|
|
57
|
-
.surface[data-menu-phase='replace'] > *,
|
|
58
|
-
.backing[data-menu-phase='replace'] { animation: dsh-context-menu-out var(--dsh-menu-dismiss) ease-in both; }
|
|
59
|
-
.surface[data-menu-phase='replace'] > *,
|
|
60
|
-
.backing[data-menu-phase='replace'] { animation-duration: var(--dsh-menu-replace); }
|
|
61
|
-
@keyframes dsh-context-menu-in { from { opacity: 0; } to { opacity: 1; } }
|
|
62
|
-
@keyframes dsh-context-menu-out { from { opacity: 1; } to { opacity: 0; } }
|
|
63
|
-
@media (prefers-reduced-motion: reduce) {
|
|
64
|
-
.surface[data-menu-phase] > *, .backing[data-menu-phase] { animation-duration: 0ms; }
|
|
65
|
-
}
|
package/lib/Modal.module.css
DELETED
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
/* Full-viewport layer (figma Mask + Dialog 451:18655): mask + centered card.
|
|
2
|
-
24px of air on every side; the top/bottom widen to the frame's published
|
|
3
|
-
overlay inset so a tall card stays clear of it.
|
|
4
|
-
Cards size against this padding box: consumers cap growth with
|
|
5
|
-
`max-height: 100%`, never their own viewport calc. */
|
|
6
|
-
.root {
|
|
7
|
-
pointer-events: auto;
|
|
8
|
-
position: fixed;
|
|
9
|
-
inset: 0;
|
|
10
|
-
z-index: 1000;
|
|
11
|
-
display: flex;
|
|
12
|
-
align-items: center;
|
|
13
|
-
justify-content: center;
|
|
14
|
-
padding: max(24px, var(--dsh-frame-overlay-top, 24px)) 24px;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
/* Only paint excludes the native caption; the root still blocks background clicks. */
|
|
18
|
-
.mask {
|
|
19
|
-
position: absolute;
|
|
20
|
-
inset: var(--dsh-frame-chrome-top, 0px) 0 0;
|
|
21
|
-
backdrop-filter: var(--dsw-mask-blur);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.mask::after {
|
|
25
|
-
content: '';
|
|
26
|
-
position: absolute;
|
|
27
|
-
inset: 0;
|
|
28
|
-
background: var(--dsw-alias-bg-mask-1);
|
|
29
|
-
animation: modalEnter var(--ds-transition-duration) var(--ds-ease-in-out);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/* Dialogs use the prominent elevation on the secondary layer. */
|
|
33
|
-
.dialog {
|
|
34
|
-
box-sizing: border-box;
|
|
35
|
-
position: relative;
|
|
36
|
-
z-index: 1;
|
|
37
|
-
display: flex;
|
|
38
|
-
flex-direction: column;
|
|
39
|
-
gap: 20px;
|
|
40
|
-
width: min(380px, 100%);
|
|
41
|
-
padding: 0 0 24px;
|
|
42
|
-
overflow: hidden;
|
|
43
|
-
border: 0;
|
|
44
|
-
border-radius: var(--dsw-radius-panel);
|
|
45
|
-
background: var(--dsw-alias-bg-layer-2);
|
|
46
|
-
box-shadow: var(--dsw-elevation-prominent);
|
|
47
|
-
animation: modalEnter var(--ds-transition-duration) var(--ds-ease-in-out);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
@keyframes modalEnter {
|
|
51
|
-
from { opacity: 0; }
|
|
52
|
-
to { opacity: 1; }
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
@media (prefers-reduced-motion: reduce) {
|
|
56
|
-
.mask::after, .dialog { animation: none; }
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.dialog:focus {
|
|
60
|
-
outline: none;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.content {
|
|
64
|
-
display: flex;
|
|
65
|
-
flex-direction: column;
|
|
66
|
-
width: 100%;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
/* Header row (figma Title row): pad l24/t22/r14/b12, SPACE_BETWEEN —
|
|
70
|
-
* title left, close button right. */
|
|
71
|
-
.header {
|
|
72
|
-
display: flex;
|
|
73
|
-
align-items: center;
|
|
74
|
-
justify-content: space-between;
|
|
75
|
-
gap: 8px;
|
|
76
|
-
padding: 22px 14px 12px 24px;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
.title {
|
|
80
|
-
margin: 0;
|
|
81
|
-
font-size: 16px;
|
|
82
|
-
line-height: 24px;
|
|
83
|
-
font-weight: 500; /* figma wt510, rendered 500 */
|
|
84
|
-
color: var(--dsw-alias-label-primary);
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.warning .title {
|
|
88
|
-
display: flex;
|
|
89
|
-
align-items: flex-start;
|
|
90
|
-
gap: 8px;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
.warningIcon {
|
|
94
|
-
flex: none;
|
|
95
|
-
margin-top: 3px;
|
|
96
|
-
color: var(--dsw-alias-state-warn-primary);
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
.warning .body {
|
|
100
|
-
margin-top: 0;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
.close {
|
|
104
|
-
flex: none;
|
|
105
|
-
display: inline-flex;
|
|
106
|
-
align-items: center;
|
|
107
|
-
justify-content: center;
|
|
108
|
-
width: 28px;
|
|
109
|
-
height: 28px;
|
|
110
|
-
border: none;
|
|
111
|
-
border-radius: var(--dsw-radius-sm);
|
|
112
|
-
background: transparent;
|
|
113
|
-
cursor: pointer;
|
|
114
|
-
color: var(--dsw-alias-label-secondary);
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
@media (hover: hover) {
|
|
118
|
-
.close:hover {
|
|
119
|
-
background: var(--dsw-alias-interactive-bg-hover);
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
/* Description and body share the 332px content column (24px side pads). */
|
|
124
|
-
.description {
|
|
125
|
-
margin: 0;
|
|
126
|
-
padding: 0 24px;
|
|
127
|
-
font-size: 14px;
|
|
128
|
-
line-height: 22px;
|
|
129
|
-
font-weight: 400;
|
|
130
|
-
color: var(--dsw-alias-label-primary);
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
.body {
|
|
134
|
-
display: flex;
|
|
135
|
-
flex-direction: column;
|
|
136
|
-
min-width: 0;
|
|
137
|
-
margin-top: 20px;
|
|
138
|
-
padding: 0 24px;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
.footer {
|
|
142
|
-
display: flex;
|
|
143
|
-
align-items: center;
|
|
144
|
-
justify-content: flex-end;
|
|
145
|
-
gap: 8px;
|
|
146
|
-
padding: 0 24px;
|
|
147
|
-
}
|
package/lib/PathLabel.module.css
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/* Auto margin keeps fitting text at the left. On overflow it becomes zero,
|
|
2
|
-
so flex-end preserves the filename suffix at the right edge. */
|
|
3
|
-
.path {
|
|
4
|
-
display: flex;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
justify-content: flex-end;
|
|
7
|
-
min-width: 0;
|
|
8
|
-
overflow: hidden;
|
|
9
|
-
font-size: 12px;
|
|
10
|
-
white-space: nowrap;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.path[data-path-clipped] {
|
|
14
|
-
mask-image: linear-gradient(to right, transparent, black 28px);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.text {
|
|
18
|
-
flex: none;
|
|
19
|
-
margin-right: auto;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.directory {
|
|
23
|
-
color: var(--dsw-alias-label-tertiary);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.name {
|
|
27
|
-
color: var(--dsw-alias-label-primary);
|
|
28
|
-
}
|