@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/Switch.module.css
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
/* The on/off appearance keys off aria-checked rather than a parallel class, so
|
|
2
|
-
* the visual state cannot disagree with the state assistive technology reads.
|
|
3
|
-
*
|
|
4
|
-
* The capsule track and circular thumb opt out of the global superellipse. */
|
|
5
|
-
.switch {
|
|
6
|
-
box-sizing: border-box;
|
|
7
|
-
position: relative;
|
|
8
|
-
flex: 0 0 auto;
|
|
9
|
-
width: 36px;
|
|
10
|
-
height: 20px;
|
|
11
|
-
padding: 2px;
|
|
12
|
-
border: 0;
|
|
13
|
-
border-radius: 999px;
|
|
14
|
-
corner-shape: round;
|
|
15
|
-
background: var(--dsw-alias-border-l3);
|
|
16
|
-
cursor: pointer;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.switch[aria-checked='true'] {
|
|
20
|
-
background: var(--dsw-alias-brand-primary);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.switch:disabled {
|
|
24
|
-
cursor: default;
|
|
25
|
-
opacity: 0.5;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.switch:focus-visible {
|
|
29
|
-
outline: var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color, var(--dsw-alias-state-business-primary));
|
|
30
|
-
outline-offset: 2px;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.thumb {
|
|
34
|
-
display: block;
|
|
35
|
-
width: 16px;
|
|
36
|
-
height: 16px;
|
|
37
|
-
border-radius: 50%;
|
|
38
|
-
corner-shape: round;
|
|
39
|
-
background: var(--dsw-alias-label-primary-foreground);
|
|
40
|
-
transition: transform 120ms ease;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.switch[aria-checked='false'] .thumb {
|
|
44
|
-
background: var(--dsw-alias-switch-thumb);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.switch[aria-checked='true'] .thumb {
|
|
48
|
-
transform: translateX(16px);
|
|
49
|
-
}
|
package/lib/Tag.module.css
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
/* Capsule geometry is fixed: a tag reads as one size everywhere, and only its
|
|
2
|
-
* palette varies. Tone colors ride background/border/color so a render site can
|
|
3
|
-
* still position the tag with its own class without touching the palette. */
|
|
4
|
-
.tag {
|
|
5
|
-
display: inline-flex;
|
|
6
|
-
align-items: center;
|
|
7
|
-
border-radius: 999px;
|
|
8
|
-
corner-shape: round;
|
|
9
|
-
padding: 1px 8px;
|
|
10
|
-
font-size: 11px;
|
|
11
|
-
line-height: 17px;
|
|
12
|
-
font-weight: 500;
|
|
13
|
-
white-space: nowrap;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.tag[data-tone='outline'] {
|
|
17
|
-
border: 0.5px solid var(--dsw-alias-border-l4);
|
|
18
|
-
color: var(--dsw-alias-label-tertiary);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.tag[data-tone='solid'] {
|
|
22
|
-
background: var(--dsw-alias-label-primary);
|
|
23
|
-
color: var(--dsw-alias-bg-layer-3);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.tag[data-tone='neutral'] {
|
|
27
|
-
background: var(--dsw-alias-bg-module-platform);
|
|
28
|
-
color: var(--dsw-alias-label-secondary);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.tag[data-tone='quiet'] {
|
|
32
|
-
color: var(--dsw-alias-label-tertiary);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/* Status tones tint their own color for the fill, so a palette change moves
|
|
36
|
-
* fill and text together and neither needs a second token. The tint is 10%,
|
|
37
|
-
* except `warning`, which keeps the 12% the plugin inventory's conditional
|
|
38
|
-
* tag shipped with — matching it is what makes this a pure consolidation. */
|
|
39
|
-
.tag[data-tone='success'] {
|
|
40
|
-
background: color-mix(in srgb, var(--dsw-alias-state-success-primary) 10%, transparent);
|
|
41
|
-
color: var(--dsw-alias-state-success-primary);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.tag[data-tone='info'] {
|
|
45
|
-
background: color-mix(in srgb, var(--dsw-alias-state-business-primary) 10%, transparent);
|
|
46
|
-
color: var(--dsw-alias-state-business-primary);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.tag[data-tone='warning'] {
|
|
50
|
-
background: color-mix(in srgb, var(--dsw-alias-state-warn-primary) 12%, transparent);
|
|
51
|
-
color: var(--dsw-alias-state-warn-primary);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.tag[data-tone='danger'] {
|
|
55
|
-
background: color-mix(in srgb, var(--dsw-alias-state-error-primary) 10%, transparent);
|
|
56
|
-
color: var(--dsw-alias-state-error-primary);
|
|
57
|
-
}
|
|
@@ -1,207 +0,0 @@
|
|
|
1
|
-
.block {
|
|
2
|
-
--dsl-terminal-radius: var(--dsw-radius-lg);
|
|
3
|
-
--dsl-terminal-line-height: 22px;
|
|
4
|
-
/* Rebindable by consumers (CodeBlock's --dsl-code-block-content-font
|
|
5
|
-
pattern): a surface wanting the smaller code size rebinds this together
|
|
6
|
-
with --dsl-terminal-line-height on its own container. */
|
|
7
|
-
--dsl-terminal-font: var(--dsw-font-markdown-code-block);
|
|
8
|
-
/* The card's own left inset, holding the run-state dot in a column of its own
|
|
9
|
-
so it never competes with the commands for horizontal space. */
|
|
10
|
-
--dsl-terminal-gutter: 30px;
|
|
11
|
-
|
|
12
|
-
position: relative;
|
|
13
|
-
margin: 16px 0;
|
|
14
|
-
/* The gutter is the card's OWN padding, not a margin: every consumer rewrites
|
|
15
|
-
`margin` wholesale (each render site sets its own indent), which silently
|
|
16
|
-
cancelled the reservation and let the dot fall outside the card into a
|
|
17
|
-
container that clips it. Owning the reservation here keeps the invariant
|
|
18
|
-
with the component that depends on it. */
|
|
19
|
-
padding-left: var(--dsl-terminal-gutter);
|
|
20
|
-
color: var(--dsw-alias-label-primary);
|
|
21
|
-
background: var(--dsw-alias-markdown-code-block);
|
|
22
|
-
border-radius: var(--dsl-terminal-radius);
|
|
23
|
-
/* Clip the banner to the card's own radius: when a consumer adds a border,
|
|
24
|
-
the banner's equal corner radius no longer nests inside it and leaves a
|
|
25
|
-
notch at the corner. Nothing inside renders out of the box. */
|
|
26
|
-
overflow: hidden;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
/* The status pill and copy control top-align to the FIRST prompt row (their
|
|
30
|
-
heights are capped to the prompt line, so on a multi-line command they sit
|
|
31
|
-
with the first command instead of floating mid-banner). */
|
|
32
|
-
.header {
|
|
33
|
-
display: flex;
|
|
34
|
-
align-items: flex-start;
|
|
35
|
-
gap: 12px;
|
|
36
|
-
/* Pulled back across the card's gutter padding so the banner spans the FULL
|
|
37
|
-
surface, then re-inset by the same amount so the prompt text and the dot
|
|
38
|
-
keep their positions. The banner shares the card's own surface (no banner
|
|
39
|
-
token): the l2 divider below is the section boundary. */
|
|
40
|
-
margin-left: calc(-1 * var(--dsl-terminal-gutter));
|
|
41
|
-
padding: 9px 14px 9px var(--dsl-terminal-gutter);
|
|
42
|
-
border-top-left-radius: var(--dsl-terminal-radius);
|
|
43
|
-
border-top-right-radius: var(--dsl-terminal-radius);
|
|
44
|
-
/* A long multi-line command scrolls inside the banner (same cap as the
|
|
45
|
-
IN/OUT card's sections) instead of pushing the output off screen. */
|
|
46
|
-
max-height: 150px;
|
|
47
|
-
overflow-y: auto;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
/* Banner scrollbar floats off the card edge like the output's. */
|
|
51
|
-
.header::-webkit-scrollbar-thumb {
|
|
52
|
-
border: 2px solid transparent;
|
|
53
|
-
background-clip: padding-box;
|
|
54
|
-
border-radius: var(--dsw-radius-sm);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.header::-webkit-scrollbar-track {
|
|
58
|
-
margin: 6px;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
/* Full-width l2 hairline between the command banner and the body — the same
|
|
62
|
-
divider the IN/OUT card draws between its sections. A banner-only card (a
|
|
63
|
-
running command that has printed nothing yet) draws none. */
|
|
64
|
-
.block[data-body] .header {
|
|
65
|
-
border-bottom: 0.5px solid var(--dsw-alias-border-l2);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
/* One row per command line. The prompt column is the only element allowed to
|
|
69
|
-
shrink; the status pill and the copy control keep their intrinsic width. */
|
|
70
|
-
.prompt {
|
|
71
|
-
display: flex;
|
|
72
|
-
flex-direction: column;
|
|
73
|
-
min-width: 0;
|
|
74
|
-
flex: 1;
|
|
75
|
-
font: var(--dsl-terminal-font);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
.promptLine {
|
|
79
|
-
position: relative;
|
|
80
|
-
display: flex;
|
|
81
|
-
align-items: baseline;
|
|
82
|
-
gap: 8px;
|
|
83
|
-
min-width: 0;
|
|
84
|
-
line-height: var(--dsl-terminal-line-height);
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
/* Out of flow inside the card's own gutter padding, so the reservation and the
|
|
88
|
-
dot move together and no consumer margin can pull them apart; the dot neither
|
|
89
|
-
indents its command nor depends on the command's text metrics to line up.
|
|
90
|
-
Centered against the first visual line box, not the code font's baseline. */
|
|
91
|
-
.runState {
|
|
92
|
-
position: absolute;
|
|
93
|
-
left: calc(-1 * var(--dsl-terminal-gutter) + 8px);
|
|
94
|
-
top: calc(var(--dsl-terminal-line-height) / 2);
|
|
95
|
-
transform: translateY(-50%);
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
/* The dot is aria-hidden; this is its text label for assistive technology. */
|
|
99
|
-
.runStateLabel {
|
|
100
|
-
position: absolute;
|
|
101
|
-
width: 1px;
|
|
102
|
-
height: 1px;
|
|
103
|
-
overflow: hidden;
|
|
104
|
-
clip-path: inset(50%);
|
|
105
|
-
white-space: nowrap;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
.cwd {
|
|
109
|
-
flex: none;
|
|
110
|
-
color: var(--dsw-alias-label-tertiary);
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
/* Each authored command line scrolls independently of its prompt and status.
|
|
114
|
-
`pre` preserves whitespace; hosts can opt into wrapping with `pre-wrap`. */
|
|
115
|
-
.command {
|
|
116
|
-
--dsl-command-whitespace: var(--dsl-terminal-command-whitespace, pre);
|
|
117
|
-
color: var(--dsw-alias-label-primary);
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
/* Capped to the prompt's line height (Pill's own 24px height would exceed a
|
|
121
|
-
smaller-font prompt row and stretch the banner). Sticky against the
|
|
122
|
-
banner's own scroll so the pill and the copy control stay in reach while a
|
|
123
|
-
long command scrolls underneath. */
|
|
124
|
-
.status {
|
|
125
|
-
flex: none;
|
|
126
|
-
position: sticky;
|
|
127
|
-
top: 0;
|
|
128
|
-
height: var(--dsl-terminal-line-height);
|
|
129
|
-
color: var(--dsw-alias-state-error-primary);
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
.copyButton {
|
|
133
|
-
flex: none;
|
|
134
|
-
position: sticky;
|
|
135
|
-
top: 0;
|
|
136
|
-
/* Card surface, not transparent: the control is sticky over the banner's
|
|
137
|
-
own scroll, so scrolled command text must not bleed through it. */
|
|
138
|
-
background-color: var(--dsw-alias-markdown-code-block);
|
|
139
|
-
border: none;
|
|
140
|
-
padding: 0;
|
|
141
|
-
margin: 0;
|
|
142
|
-
color: var(--dsw-alias-label-secondary);
|
|
143
|
-
cursor: pointer;
|
|
144
|
-
font: var(--dsw-font-xs-13);
|
|
145
|
-
line-height: var(--dsl-terminal-line-height);
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
/* Vertical scrolling lives on the OUTPUT, not the card root: a root scroller
|
|
149
|
-
would run its scrollbar over the banner (and the copy control), while here
|
|
150
|
-
the banner stays pinned and the bar sits inside the output's right padding.
|
|
151
|
-
Unset, the max-height is none and the auto overflow never engages. */
|
|
152
|
-
.output {
|
|
153
|
-
max-height: var(--dsl-terminal-output-max-height, none);
|
|
154
|
-
padding: 12px 14px 12px 0;
|
|
155
|
-
font: var(--dsl-terminal-font);
|
|
156
|
-
overflow-x: auto;
|
|
157
|
-
overflow-y: auto;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
/* Both output scrollbars (vertical cap, horizontal pre overflow) float 2px
|
|
161
|
-
off the card edge: a transparent border clips the thumb inward so it never
|
|
162
|
-
hugs the rounded corner. */
|
|
163
|
-
.output::-webkit-scrollbar-thumb {
|
|
164
|
-
border: 2px solid transparent;
|
|
165
|
-
background-clip: padding-box;
|
|
166
|
-
border-radius: var(--dsw-radius-sm);
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
/* Track end-margins keep the thumb's travel out of the card's rounded
|
|
170
|
-
corners in both directions. */
|
|
171
|
-
.output::-webkit-scrollbar-track {
|
|
172
|
-
margin: 6px;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
/* Default `pre`: alignment is the payload of terminal output. Hosts opt
|
|
176
|
-
into wrapping long lines by rebinding the variable to `pre-wrap`, which
|
|
177
|
-
also keeps the output region from ever scrolling sideways; overflow-wrap
|
|
178
|
-
is inert while white-space stays `pre`. */
|
|
179
|
-
.line {
|
|
180
|
-
min-height: var(--dsl-terminal-line-height);
|
|
181
|
-
white-space: var(--dsl-terminal-line-whitespace, pre);
|
|
182
|
-
overflow-wrap: anywhere;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
.expand {
|
|
186
|
-
display: block;
|
|
187
|
-
width: 100%;
|
|
188
|
-
padding: 0;
|
|
189
|
-
border: none;
|
|
190
|
-
background-color: transparent;
|
|
191
|
-
color: var(--dsw-alias-label-tertiary);
|
|
192
|
-
cursor: pointer;
|
|
193
|
-
font: inherit;
|
|
194
|
-
text-align: left;
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
@media (hover: hover) {
|
|
198
|
-
.expand:hover {
|
|
199
|
-
color: var(--dsw-alias-label-secondary);
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
.empty {
|
|
204
|
-
padding: 12px 14px 12px 0;
|
|
205
|
-
font: var(--dsl-terminal-font);
|
|
206
|
-
color: var(--dsw-alias-label-tertiary);
|
|
207
|
-
}
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
.root {
|
|
2
|
-
position: relative;
|
|
3
|
-
display: inline-grid;
|
|
4
|
-
width: max-content;
|
|
5
|
-
max-width: 100%;
|
|
6
|
-
min-width: 0;
|
|
7
|
-
vertical-align: top;
|
|
8
|
-
color: inherit;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.content {
|
|
12
|
-
display: flex;
|
|
13
|
-
align-items: center;
|
|
14
|
-
min-width: 0;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.text {
|
|
18
|
-
color: inherit;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.text[data-shimmer-text]::after {
|
|
22
|
-
content: attr(data-shimmer-text);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.decoration {
|
|
26
|
-
position: absolute;
|
|
27
|
-
inset: 0;
|
|
28
|
-
/* The moving mask must not enlarge any ancestor's scrollable area. */
|
|
29
|
-
overflow: clip;
|
|
30
|
-
pointer-events: none;
|
|
31
|
-
user-select: none;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.sweep {
|
|
35
|
-
position: absolute;
|
|
36
|
-
inset: 0;
|
|
37
|
-
overflow: hidden;
|
|
38
|
-
color: var(--dsw-alias-label-shimmer);
|
|
39
|
-
mask-image: linear-gradient(105deg, transparent 0%, black 40% 60%, transparent 100%);
|
|
40
|
-
transform: translateX(-100%);
|
|
41
|
-
animation-name: dsh-row-shimmer-sweep;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
/* Semantic base colors stay on the real content; the overlay supplies one tint. */
|
|
45
|
-
.sweep * {
|
|
46
|
-
color: inherit !important;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.sweep [data-shimmer-decoration] {
|
|
50
|
-
background: currentColor;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
/* Opposite transforms keep every glyph aligned while their shared mask moves. */
|
|
54
|
-
.highlight {
|
|
55
|
-
width: 100%;
|
|
56
|
-
height: 100%;
|
|
57
|
-
transform: translateX(100%);
|
|
58
|
-
animation-name: dsh-row-shimmer-highlight;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.sweep,
|
|
62
|
-
.highlight {
|
|
63
|
-
animation-duration: 1.5s;
|
|
64
|
-
animation-delay: 0.3s;
|
|
65
|
-
animation-timing-function: steps(48, end);
|
|
66
|
-
animation-iteration-count: infinite;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
@keyframes dsh-row-shimmer-sweep {
|
|
70
|
-
0% { transform: translateX(-100%); }
|
|
71
|
-
66.6667%, 100% { transform: translateX(100%); }
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
@keyframes dsh-row-shimmer-highlight {
|
|
75
|
-
0% { transform: translateX(100%); }
|
|
76
|
-
66.6667%, 100% { transform: translateX(-100%); }
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
@media (prefers-reduced-motion: reduce) {
|
|
80
|
-
.decoration {
|
|
81
|
-
display: none;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.sweep,
|
|
85
|
-
.highlight {
|
|
86
|
-
animation: none;
|
|
87
|
-
}
|
|
88
|
-
}
|
package/lib/Toast.module.css
DELETED
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
/* The fade delay comes from the component as `--dsh-toast-hold`, so one value
|
|
2
|
-
drives both the unmount timer and this animation; the fallback matches the
|
|
3
|
-
component's own default. The fade DURATION still has to agree with FADE_MS
|
|
4
|
-
in Toast.tsx, which no owner varies. */
|
|
5
|
-
|
|
6
|
-
.toast {
|
|
7
|
-
position: fixed;
|
|
8
|
-
top: 40px;
|
|
9
|
-
left: 50%;
|
|
10
|
-
/* Above the 1000 the image lightbox backdrop uses: a failure reported while
|
|
11
|
-
a preview is open must stay readable. */
|
|
12
|
-
z-index: 1100;
|
|
13
|
-
/* Announcements never intercept clicks. */
|
|
14
|
-
pointer-events: none;
|
|
15
|
-
display: flex;
|
|
16
|
-
align-items: center;
|
|
17
|
-
gap: 10px;
|
|
18
|
-
/* Fixed boxes with `left` set shrink-to-fit against the space RIGHT of
|
|
19
|
-
`left` (the -50% translate happens after sizing), so an anchored banner
|
|
20
|
-
near the window edge would wrap early. max-content sizes the box from
|
|
21
|
-
its text alone, capped by the max-width below. */
|
|
22
|
-
width: max-content;
|
|
23
|
-
max-width: min(640px, calc(100vw - 48px));
|
|
24
|
-
padding: 12px 16px;
|
|
25
|
-
border-radius: var(--dsw-radius-lg);
|
|
26
|
-
/* The design platform's toast surface is dark in BOTH themes (bluish-800
|
|
27
|
-
light / bluish-750 dark), so the label and the action text below stay
|
|
28
|
-
fixed instead of flipping with the theme. */
|
|
29
|
-
background: var(--dsw-alias-toast-bg);
|
|
30
|
-
color: var(--dsw-alias-toast-label);
|
|
31
|
-
font-size: 14px;
|
|
32
|
-
line-height: 22px;
|
|
33
|
-
box-shadow: var(--dsw-shadow-lv3);
|
|
34
|
-
transform: translateX(-50%);
|
|
35
|
-
animation:
|
|
36
|
-
dsh-toast-in 160ms ease-out,
|
|
37
|
-
dsh-toast-fade 1000ms ease var(--dsh-toast-hold, 3000ms) forwards;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.icon {
|
|
41
|
-
display: grid;
|
|
42
|
-
place-items: center;
|
|
43
|
-
flex: none;
|
|
44
|
-
color: var(--dsw-alias-state-warn-label);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.icon.success {
|
|
48
|
-
color: var(--dsw-alias-state-success-primary);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.text {
|
|
52
|
-
min-width: 0;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.action {
|
|
56
|
-
display: inline;
|
|
57
|
-
padding: 0;
|
|
58
|
-
border: 0;
|
|
59
|
-
background: none;
|
|
60
|
-
/* Reads as the action against the always-dark toast surface without an underline. */
|
|
61
|
-
color: var(--dsw-alias-toast-action);
|
|
62
|
-
font: inherit;
|
|
63
|
-
cursor: pointer;
|
|
64
|
-
/* Breathing room where the action text meets the surrounding copy. */
|
|
65
|
-
margin-inline: 3px;
|
|
66
|
-
/* The banner surface stays click-through (`pointer-events: none` above);
|
|
67
|
-
only its action text takes the pointer. */
|
|
68
|
-
pointer-events: auto;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
@media (hover: hover) {
|
|
72
|
-
.action:hover {
|
|
73
|
-
opacity: 0.8;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
@keyframes dsh-toast-in {
|
|
78
|
-
from {
|
|
79
|
-
opacity: 0;
|
|
80
|
-
transform: translate(-50%, -6px);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
to {
|
|
84
|
-
opacity: 1;
|
|
85
|
-
transform: translate(-50%, 0);
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
@keyframes dsh-toast-fade {
|
|
90
|
-
to {
|
|
91
|
-
opacity: 0;
|
|
92
|
-
visibility: hidden;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
/* Reduced motion drops the slide-in; the delayed fade (an opacity change,
|
|
97
|
-
not movement) still ends the banner before the timed unmount. */
|
|
98
|
-
@media (prefers-reduced-motion: reduce) {
|
|
99
|
-
.toast {
|
|
100
|
-
animation: dsh-toast-fade 1000ms ease var(--dsh-toast-hold, 3000ms) forwards;
|
|
101
|
-
}
|
|
102
|
-
}
|
package/lib/Tooltip.module.css
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
.bubble {
|
|
2
|
-
display: inline-flex;
|
|
3
|
-
align-items: safe center;
|
|
4
|
-
gap: 8px;
|
|
5
|
-
position: fixed;
|
|
6
|
-
z-index: 100;
|
|
7
|
-
/* Fixed-position shrink-to-fit measures only the space from `left` to the
|
|
8
|
-
viewport edge, so anchors near the right edge would wrap early;
|
|
9
|
-
max-content sizes by the label alone, capped at half the viewport. */
|
|
10
|
-
width: max-content;
|
|
11
|
-
box-sizing: border-box;
|
|
12
|
-
max-width: min(50vw, calc(100vw - 24px));
|
|
13
|
-
max-height: calc(100vh - 24px);
|
|
14
|
-
overflow: auto;
|
|
15
|
-
padding: 3px 7px;
|
|
16
|
-
border-radius: var(--dsw-radius-sm);
|
|
17
|
-
background: var(--dsw-alias-tooltip-bg);
|
|
18
|
-
color: var(--dsw-alias-tooltip-label);
|
|
19
|
-
font-size: 13px;
|
|
20
|
-
line-height: 20px;
|
|
21
|
-
white-space: pre-line;
|
|
22
|
-
/* Unbreakable tokens (URLs, paths) must not push past max-width. */
|
|
23
|
-
overflow-wrap: break-word;
|
|
24
|
-
pointer-events: none;
|
|
25
|
-
animation: tooltip-in 150ms var(--ds-ease-in-out);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.bubble[data-portal] { z-index: 1100; }
|
|
29
|
-
:global(:where(html[data-platform='darwin'])) .bubble { -webkit-app-region: no-drag; }
|
|
30
|
-
.bubble[data-pinned] { pointer-events: auto; }
|
|
31
|
-
.label { min-width: 0; }
|
|
32
|
-
|
|
33
|
-
/* A 16px keycap centered beside a 20px label has 5px of vertical clearance. */
|
|
34
|
-
.bubble[data-has-shortcut] { padding-inline-end: 5px; }
|
|
35
|
-
.bubble[data-has-shortcut]:not(:has(.label)) { padding: 3px; }
|
|
36
|
-
|
|
37
|
-
.bubble[data-side='right'],
|
|
38
|
-
.bubble[data-side='left'] {
|
|
39
|
-
transform: translateY(-50%);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.bubble[data-side='bottom'] {
|
|
43
|
-
transform: translateX(-50%);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.bubble[data-side='top'] {
|
|
47
|
-
transform: translate(-50%, -100%);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
/* End alignment: `left` carries the anchor's right edge, so the bubble sits
|
|
51
|
-
fully left of it instead of centering. */
|
|
52
|
-
.bubble[data-side='bottom'][data-align='end'] {
|
|
53
|
-
transform: translateX(-100%);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.bubble[data-side='top'][data-align='end'] {
|
|
57
|
-
transform: translate(-100%, -100%);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
@keyframes tooltip-in {
|
|
61
|
-
from { opacity: 0; }
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
@media (prefers-reduced-motion: reduce) {
|
|
65
|
-
.bubble {
|
|
66
|
-
animation: none;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
.bubble {
|
|
2
|
-
max-width: 100%;
|
|
3
|
-
background: var(--dsw-specific-bubble);
|
|
4
|
-
border-radius: var(--dsw-radius-xl);
|
|
5
|
-
padding: 10px 16px;
|
|
6
|
-
font-size: var(--dsh-content-font-size, 14px);
|
|
7
|
-
line-height: calc(22px + var(--dsh-content-font-delta, 0px));
|
|
8
|
-
color: var(--dsw-alias-label-primary);
|
|
9
|
-
white-space: pre-wrap;
|
|
10
|
-
word-break: break-word;
|
|
11
|
-
}
|