dsh-better-ask-user 0.1.7 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +202 -674
- package/NOTICE +23 -1
- package/README.md +23 -4
- package/lib/client.js +772 -360
- package/package.json +14 -13
- package/src/ask-tool.js +7 -1
- package/src/client/AskHistoryRow.module.css +21 -45
- package/src/client/AskHistoryRow.tsx +25 -19
- package/src/client/PlanReviewPanel.module.css +198 -68
- package/src/client/PlanReviewPanel.tsx +69 -13
- package/src/client/QuestionComposer.module.css +289 -357
- package/src/client/QuestionComposer.tsx +92 -85
- package/src/client/QuestionReplyView.module.css +79 -171
- package/src/client/QuestionReplyView.tsx +36 -17
- package/src/client/QuestionWaitBar.module.css +50 -0
- package/src/client/QuestionWaitBar.tsx +39 -0
- package/src/client/contract/slots.ts +19 -4
- package/src/client/index.ts +6 -6
- package/src/client/locales.ts +10 -2
- package/src/client/settings-locales.ts +44 -28
- package/src/client/settings.module.css +119 -0
- package/src/client/settings.tsx +120 -84
- package/src/index.js +2 -14
|
@@ -1,36 +1,39 @@
|
|
|
1
|
-
/*
|
|
2
|
-
axis at the shared content width (input card - 32): sides = clearance +
|
|
3
|
-
16px so the relation also holds on narrow viewports. */
|
|
1
|
+
/* Keep both takeovers on the host composer's content axis. */
|
|
4
2
|
.frame {
|
|
3
|
+
--cfg-line: var(--dsw-alias-border-l2);
|
|
4
|
+
--cfg-line-strong: var(--dsw-alias-border-l3);
|
|
5
|
+
--cfg-surface: var(--dsw-alias-bg-layer-2);
|
|
6
|
+
--cfg-sunken: color-mix(in srgb, var(--dsw-alias-label-primary) 4%, var(--dsw-alias-bg-layer-1));
|
|
7
|
+
--cfg-ink: var(--dsw-alias-label-primary);
|
|
8
|
+
--cfg-muted: var(--dsw-alias-label-secondary);
|
|
9
|
+
--cfg-accent: #3388bb;
|
|
10
|
+
--cfg-accent-text: #14587f;
|
|
11
|
+
--cfg-hover: var(--dsw-alias-interactive-bg-hover);
|
|
12
|
+
--cfg-danger: var(--dsw-alias-state-error-primary);
|
|
13
|
+
--cfg-solid: #20709e;
|
|
14
|
+
--cfg-solid-hover: #1c638d;
|
|
15
|
+
--cfg-on-solid: #fff;
|
|
5
16
|
display: flex;
|
|
6
17
|
justify-content: center;
|
|
7
|
-
padding: 6px calc(var(--dsh-composer-side-clearance) + 16px) 10px;
|
|
18
|
+
padding: 6px calc(var(--dsh-composer-side-clearance) + 16px) calc(10px + env(safe-area-inset-bottom));
|
|
8
19
|
}
|
|
9
20
|
|
|
10
|
-
/* Figma Input 973:36348 body over the 1019:36938 header: no banner strip —
|
|
11
|
-
the card keeps zero padding and sections carry their own insets. */
|
|
12
21
|
.card {
|
|
13
22
|
display: flex;
|
|
14
23
|
flex-direction: column;
|
|
15
24
|
width: 100%;
|
|
25
|
+
min-width: 0;
|
|
16
26
|
max-width: var(--dsh-chat-content-width);
|
|
17
|
-
/*
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
max-height: min(60vh, 520px);
|
|
21
|
-
padding: 0 0 10px;
|
|
22
|
-
border: 0;
|
|
23
|
-
--dsw-elevation-stroke-color: var(--dsw-alias-border-l2-darkmode-thin);
|
|
24
|
-
border-radius: var(--dsw-radius-xl);
|
|
25
|
-
background: var(--dsw-specific-input-major);
|
|
26
|
-
box-shadow: var(--dsw-elevation-panel);
|
|
27
|
-
color: var(--dsw-alias-label-primary);
|
|
27
|
+
/* Only the answer body scrolls; navigation remains reachable. */
|
|
28
|
+
max-height: min(75vh, 640px);
|
|
29
|
+
max-height: min(75dvh, 640px);
|
|
28
30
|
overflow: hidden;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
border: 1px solid var(--cfg-line);
|
|
32
|
+
border-top-color: var(--cfg-accent);
|
|
33
|
+
border-radius: 12px;
|
|
34
|
+
background: var(--cfg-surface);
|
|
35
|
+
color: var(--cfg-ink);
|
|
36
|
+
font-size: inherit;
|
|
34
37
|
--dsh-scrollbar-thumb: var(--dsw-alias-scrollbar-bg-l2);
|
|
35
38
|
--dsh-scrollbar-thumb-hover: var(--dsw-alias-scrollbar-hover-l2);
|
|
36
39
|
}
|
|
@@ -40,122 +43,151 @@
|
|
|
40
43
|
box-sizing: border-box;
|
|
41
44
|
}
|
|
42
45
|
|
|
43
|
-
/* Collapsed to the header strip: drop the height cap and the inner scroll
|
|
44
|
-
seat so the card hugs the title row, freeing the viewport for the
|
|
45
|
-
conversation above while the question stays pending. */
|
|
46
46
|
.cardMinimized {
|
|
47
47
|
max-height: none;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
/* The header strip is the whole card when collapsed: the title row needs
|
|
51
|
-
bottom padding once the body that normally carries it is hidden. */
|
|
52
|
-
.cardMinimized .header {
|
|
53
|
-
padding-bottom: 14px;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
/* Header button group: minimize sits next to the close action, both on the
|
|
57
|
-
same 24px icon-button grid. */
|
|
58
|
-
.headerActions {
|
|
59
|
-
display: flex;
|
|
60
|
-
align-items: center;
|
|
61
|
-
gap: 4px;
|
|
62
|
-
flex-shrink: 0;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
.waitButton {
|
|
66
|
-
white-space: nowrap;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.waitStatus {
|
|
70
|
-
color: var(--dsw-alias-label-secondary);
|
|
71
|
-
font-size: 12px;
|
|
72
|
-
line-height: 24px;
|
|
73
|
-
white-space: nowrap;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
/* Figma 1019:36938 header, user-tuned: heading block left, close right; the
|
|
77
|
-
pager sits in the footer to balance the card. */
|
|
78
50
|
.header {
|
|
79
51
|
display: flex;
|
|
80
52
|
align-items: flex-start;
|
|
81
53
|
justify-content: space-between;
|
|
82
|
-
gap: 16px;
|
|
83
54
|
flex-shrink: 0;
|
|
84
|
-
|
|
55
|
+
gap: 12px;
|
|
56
|
+
padding: 12px 12px 8px 16px;
|
|
85
57
|
}
|
|
86
58
|
|
|
87
59
|
.headingBlock {
|
|
60
|
+
flex: 1;
|
|
88
61
|
min-width: 0;
|
|
89
62
|
}
|
|
90
63
|
|
|
91
|
-
.
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
64
|
+
.titleRow {
|
|
65
|
+
display: flex;
|
|
66
|
+
align-items: flex-start;
|
|
67
|
+
flex-wrap: wrap;
|
|
68
|
+
gap: 6px;
|
|
69
|
+
min-width: 0;
|
|
97
70
|
}
|
|
98
71
|
|
|
99
72
|
.title {
|
|
73
|
+
flex: 1 1 auto;
|
|
100
74
|
margin: 0;
|
|
101
|
-
|
|
102
|
-
|
|
75
|
+
max-height: 24vh;
|
|
76
|
+
max-height: 24dvh;
|
|
77
|
+
overflow-y: auto;
|
|
78
|
+
font-size: 14px;
|
|
79
|
+
line-height: 20px;
|
|
103
80
|
font-weight: 500;
|
|
104
81
|
}
|
|
105
82
|
|
|
83
|
+
.headerChip,
|
|
84
|
+
.statusChip {
|
|
85
|
+
display: inline-flex;
|
|
86
|
+
align-items: center;
|
|
87
|
+
flex: none;
|
|
88
|
+
height: 20px;
|
|
89
|
+
max-width: 200px;
|
|
90
|
+
padding: 0 7px;
|
|
91
|
+
overflow: hidden;
|
|
92
|
+
border: 1px solid var(--cfg-line);
|
|
93
|
+
border-radius: 999px;
|
|
94
|
+
background: var(--cfg-sunken);
|
|
95
|
+
color: var(--cfg-muted);
|
|
96
|
+
font-size: 11px;
|
|
97
|
+
line-height: 18px;
|
|
98
|
+
white-space: nowrap;
|
|
99
|
+
text-overflow: ellipsis;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.statusChip {
|
|
103
|
+
border-color: color-mix(in srgb, var(--cfg-accent) 30%, var(--cfg-line));
|
|
104
|
+
background: color-mix(in srgb, var(--cfg-accent) 10%, transparent);
|
|
105
|
+
color: var(--cfg-accent-text);
|
|
106
|
+
font-weight: 500;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.title,
|
|
110
|
+
.headerChip,
|
|
111
|
+
.statusChip,
|
|
112
|
+
.optionLabel,
|
|
113
|
+
.description,
|
|
106
114
|
.detail {
|
|
107
|
-
|
|
115
|
+
min-width: 0;
|
|
116
|
+
overflow-wrap: anywhere;
|
|
117
|
+
word-break: break-word;
|
|
108
118
|
}
|
|
109
119
|
|
|
110
|
-
.
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
120
|
+
.title > div,
|
|
121
|
+
.headerChip > div,
|
|
122
|
+
.statusChip > div,
|
|
123
|
+
.optionLabel > div,
|
|
124
|
+
.description > div {
|
|
125
|
+
margin: 0;
|
|
115
126
|
}
|
|
116
127
|
|
|
128
|
+
/* Compact Markdown should retain the primary label's typography. */
|
|
129
|
+
.title > [data-markdown-variant='compact'],
|
|
130
|
+
.headerChip > [data-markdown-variant='compact'],
|
|
131
|
+
.optionLabel > [data-markdown-variant='compact'],
|
|
132
|
+
.title > [data-markdown-variant='compact'] > p,
|
|
133
|
+
.headerChip > [data-markdown-variant='compact'] > p,
|
|
134
|
+
.optionLabel > [data-markdown-variant='compact'] > p {
|
|
135
|
+
color: inherit;
|
|
136
|
+
font: inherit;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.headerActions,
|
|
140
|
+
.footerActions,
|
|
117
141
|
.pager {
|
|
118
142
|
display: flex;
|
|
119
143
|
align-items: center;
|
|
120
|
-
gap: 6px;
|
|
121
144
|
flex-shrink: 0;
|
|
145
|
+
gap: 4px;
|
|
122
146
|
}
|
|
123
147
|
|
|
124
|
-
.
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
font-size: 14px;
|
|
128
|
-
line-height: 24px;
|
|
129
|
-
font-weight: 500;
|
|
130
|
-
white-space: nowrap;
|
|
131
|
-
/* Narrow the plain spaces around the slash without touching glyph tracking. */
|
|
132
|
-
word-spacing: -2px;
|
|
148
|
+
.footerActions {
|
|
149
|
+
margin-left: auto;
|
|
150
|
+
gap: 8px;
|
|
133
151
|
}
|
|
134
152
|
|
|
135
153
|
.iconButton {
|
|
136
154
|
display: grid;
|
|
137
155
|
place-items: center;
|
|
138
|
-
width:
|
|
139
|
-
height:
|
|
156
|
+
width: 28px;
|
|
157
|
+
height: 28px;
|
|
140
158
|
padding: 0;
|
|
141
|
-
border:
|
|
142
|
-
border-radius:
|
|
143
|
-
corner-shape: round;
|
|
159
|
+
border: 0;
|
|
160
|
+
border-radius: 6px;
|
|
144
161
|
background: transparent;
|
|
145
|
-
color: var(--
|
|
162
|
+
color: var(--cfg-muted);
|
|
146
163
|
cursor: pointer;
|
|
147
164
|
}
|
|
148
165
|
|
|
149
166
|
.iconButton:hover:not(:disabled) {
|
|
150
|
-
background: var(--
|
|
151
|
-
color: var(--
|
|
167
|
+
background: var(--cfg-hover);
|
|
168
|
+
color: var(--cfg-ink);
|
|
152
169
|
}
|
|
153
170
|
|
|
154
|
-
.
|
|
155
|
-
|
|
171
|
+
.card button:focus-visible {
|
|
172
|
+
outline: 2px solid var(--cfg-accent);
|
|
173
|
+
outline-offset: -2px;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.card button:disabled {
|
|
156
177
|
cursor: default;
|
|
157
178
|
}
|
|
158
179
|
|
|
180
|
+
.iconButton:disabled,
|
|
181
|
+
.footerActions > button:disabled,
|
|
182
|
+
.card[aria-busy='true'] .option {
|
|
183
|
+
opacity: 0.4;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.iconButton:active:not(:disabled),
|
|
187
|
+
.option:active:not(:disabled) {
|
|
188
|
+
background: var(--cfg-hover);
|
|
189
|
+
}
|
|
190
|
+
|
|
159
191
|
.body {
|
|
160
192
|
display: flex;
|
|
161
193
|
flex: 1 1 auto;
|
|
@@ -163,113 +195,84 @@
|
|
|
163
195
|
min-height: 0;
|
|
164
196
|
overflow-y: auto;
|
|
165
197
|
overscroll-behavior: contain;
|
|
198
|
+
scrollbar-gutter: stable;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.detail {
|
|
202
|
+
margin: 0 16px 8px;
|
|
203
|
+
color: var(--cfg-muted);
|
|
166
204
|
}
|
|
167
205
|
|
|
168
206
|
.options {
|
|
169
207
|
display: flex;
|
|
170
208
|
flex-direction: column;
|
|
171
|
-
gap:
|
|
172
|
-
|
|
173
|
-
padding: 4px 12px;
|
|
209
|
+
gap: 2px;
|
|
210
|
+
padding: 0 8px 8px;
|
|
174
211
|
}
|
|
175
212
|
|
|
176
|
-
.option
|
|
213
|
+
.option,
|
|
214
|
+
.customRow {
|
|
177
215
|
display: flex;
|
|
178
|
-
/* flex-start, not center: with a wrapped description the indicator must
|
|
179
|
-
stay on the FIRST line (centering drifts it down the taller copy block).
|
|
180
|
-
The 8px padding makes a single-line row 40px exactly, so nothing reads
|
|
181
|
-
as top-heavy; .number/.checkbox re-center against the first line box. */
|
|
182
216
|
align-items: flex-start;
|
|
217
|
+
flex-shrink: 0;
|
|
183
218
|
gap: 8px;
|
|
184
219
|
width: 100%;
|
|
185
|
-
min-height:
|
|
186
|
-
|
|
187
|
-
collapses to min-height while its wrapped copy keeps the taller
|
|
188
|
-
intrinsic height, and centered content then paints outside the row box —
|
|
189
|
-
over the title and the next row. Overflow belongs to .options. */
|
|
190
|
-
flex-shrink: 0;
|
|
191
|
-
padding: 8px 12px 8px 8px;
|
|
220
|
+
min-height: 36px;
|
|
221
|
+
padding: 7px 8px;
|
|
192
222
|
border: 1px solid transparent;
|
|
193
|
-
border-radius:
|
|
223
|
+
border-radius: 8px;
|
|
224
|
+
transition: background-color 140ms ease, border-color 140ms ease;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.option {
|
|
194
228
|
background: transparent;
|
|
195
229
|
color: inherit;
|
|
196
230
|
text-align: left;
|
|
197
231
|
cursor: pointer;
|
|
198
|
-
|
|
232
|
+
font: inherit;
|
|
199
233
|
}
|
|
200
234
|
|
|
201
235
|
.option:hover:not(:disabled),
|
|
202
|
-
.
|
|
203
|
-
background: var(--
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
.optionSelected {
|
|
207
|
-
border-color: var(--dsw-alias-border-l2);
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
.option:disabled {
|
|
211
|
-
cursor: default;
|
|
236
|
+
.customRow:hover {
|
|
237
|
+
background: var(--cfg-hover);
|
|
212
238
|
}
|
|
213
239
|
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
place-items: center;
|
|
220
|
-
flex: 0 0 20px;
|
|
221
|
-
width: 20px;
|
|
222
|
-
height: 20px;
|
|
223
|
-
/* (24px first-line box − 20px indicator) / 2: centers the indicator against
|
|
224
|
-
the first text line under the row's flex-start alignment. */
|
|
225
|
-
margin-top: 2px;
|
|
226
|
-
border-radius: var(--dsw-radius-xs);
|
|
227
|
-
background: var(--dsw-alias-bg-overlay);
|
|
228
|
-
color: var(--dsw-alias-label-secondary);
|
|
229
|
-
font-size: 12px;
|
|
230
|
-
font-weight: 500;
|
|
231
|
-
line-height: 18px;
|
|
240
|
+
.optionSelected,
|
|
241
|
+
.optionSelected:hover:not(:disabled),
|
|
242
|
+
.customRowActive {
|
|
243
|
+
border-color: var(--cfg-accent);
|
|
244
|
+
background: color-mix(in srgb, var(--cfg-accent) 8%, transparent);
|
|
232
245
|
}
|
|
233
246
|
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
.checkbox {
|
|
247
|
+
.radio,
|
|
248
|
+
.checkbox,
|
|
249
|
+
.customIcon {
|
|
238
250
|
display: grid;
|
|
239
251
|
place-items: center;
|
|
240
252
|
flex: 0 0 20px;
|
|
241
253
|
width: 20px;
|
|
242
254
|
height: 20px;
|
|
243
|
-
|
|
244
|
-
margin-top: 2px;
|
|
255
|
+
color: var(--cfg-muted);
|
|
245
256
|
}
|
|
246
257
|
|
|
247
|
-
.checkbox::before {
|
|
258
|
+
.radio::before, .checkbox::before {
|
|
248
259
|
content: '';
|
|
260
|
+
box-sizing: border-box;
|
|
249
261
|
grid-area: 1 / 1;
|
|
250
|
-
width:
|
|
251
|
-
height:
|
|
252
|
-
border:
|
|
253
|
-
border-radius: var(--dsw-radius-xs);
|
|
254
|
-
transition: background-color 120ms ease, border-color 120ms ease;
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
.checkbox > svg {
|
|
258
|
-
grid-area: 1 / 1;
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
/* Checked: label-primary fill with a primary-foreground check — the pair
|
|
262
|
-
inverts with the theme (dark fill in light mode, light fill in dark mode). */
|
|
263
|
-
.checkboxChecked {
|
|
264
|
-
color: var(--dsw-alias-label-primary-foreground);
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
.checkboxChecked::before {
|
|
268
|
-
border-color: var(--dsw-alias-label-primary);
|
|
269
|
-
background: var(--dsw-alias-label-primary);
|
|
262
|
+
width: 16px;
|
|
263
|
+
height: 16px;
|
|
264
|
+
border: 1px solid var(--dsw-alias-border-l4);
|
|
270
265
|
}
|
|
266
|
+
.radio::before { border-radius: 50%; }
|
|
267
|
+
.radioChecked::before { border: 5px solid var(--cfg-accent); }
|
|
268
|
+
.checkbox::before { border-radius: 4px; }
|
|
269
|
+
.checkbox > svg { grid-area: 1 / 1; }
|
|
270
|
+
.checkboxChecked { color: var(--cfg-accent); }
|
|
271
|
+
.checkboxChecked::before { border-color: currentColor; background: color-mix(in srgb, var(--cfg-accent) 10%, transparent); }
|
|
271
272
|
|
|
272
273
|
.optionCopy {
|
|
274
|
+
display: grid;
|
|
275
|
+
gap: 2px;
|
|
273
276
|
min-width: 0;
|
|
274
277
|
flex: 1;
|
|
275
278
|
}
|
|
@@ -282,74 +285,56 @@
|
|
|
282
285
|
}
|
|
283
286
|
|
|
284
287
|
.optionLabel {
|
|
285
|
-
|
|
286
|
-
|
|
288
|
+
display: block;
|
|
289
|
+
font-size: inherit;
|
|
287
290
|
font-weight: 500;
|
|
291
|
+
line-height: 20px;
|
|
288
292
|
}
|
|
289
293
|
|
|
290
294
|
.badge {
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
+
display: inline-flex;
|
|
296
|
+
align-items: center;
|
|
297
|
+
height: 20px;
|
|
298
|
+
padding: 0 6px;
|
|
299
|
+
border: 1px solid color-mix(in srgb, var(--cfg-accent) 30%, var(--cfg-line));
|
|
300
|
+
border-radius: 999px;
|
|
301
|
+
background: color-mix(in srgb, var(--cfg-accent) 10%, transparent);
|
|
302
|
+
color: var(--cfg-accent-text);
|
|
295
303
|
font-size: 11px;
|
|
304
|
+
font-weight: 500;
|
|
296
305
|
line-height: 18px;
|
|
297
|
-
font-weight: 600;
|
|
298
306
|
}
|
|
299
307
|
|
|
300
308
|
.description {
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
309
|
+
display: block;
|
|
310
|
+
color: var(--cfg-muted);
|
|
311
|
+
font-size: 12px;
|
|
312
|
+
line-height: 18px;
|
|
304
313
|
font-weight: 400;
|
|
305
314
|
}
|
|
306
315
|
|
|
307
|
-
/* Read-only note standing in for a question the user skipped: it takes the
|
|
308
|
-
option rows' horizontal padding so it lines up with the choices above it. */
|
|
309
316
|
.reviewNote {
|
|
310
317
|
margin: 0;
|
|
311
|
-
padding: 8px
|
|
312
|
-
color: var(--
|
|
313
|
-
font-size:
|
|
314
|
-
line-height:
|
|
318
|
+
padding: 6px 8px;
|
|
319
|
+
color: var(--cfg-muted);
|
|
320
|
+
font-size: 12px;
|
|
321
|
+
line-height: 20px;
|
|
315
322
|
}
|
|
316
323
|
|
|
317
|
-
/* Custom answer row (figma 973:36427): an option-shaped row whose copy is an
|
|
318
|
-
inline text input; focus or a typed draft gives it the selected look.
|
|
319
|
-
While a single-select option is chosen, focus alone does not apply that
|
|
320
|
-
look, so the radio group shows one selection; typing clears the option. */
|
|
321
324
|
.customRow {
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
align-items: flex-start;
|
|
326
|
-
gap: 8px;
|
|
327
|
-
width: 100%;
|
|
328
|
-
min-height: 40px;
|
|
329
|
-
/* Same reason as .option: the custom row is scroll content, and shrinking
|
|
330
|
-
it pushes the inline input past the footer. */
|
|
331
|
-
flex-shrink: 0;
|
|
332
|
-
padding: 8px 12px 8px 8px;
|
|
333
|
-
border: 1px solid transparent;
|
|
334
|
-
border-radius: var(--dsw-radius-md);
|
|
335
|
-
transition: background-color 120ms ease, border-color 120ms ease;
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
.customRow:hover,
|
|
339
|
-
.customRow:focus-within:not(.customRowYielded),
|
|
340
|
-
.customRowActive {
|
|
341
|
-
background: var(--dsw-alias-interactive-bg-hover);
|
|
325
|
+
margin-top: 8px;
|
|
326
|
+
border-color: var(--cfg-line);
|
|
327
|
+
background: var(--cfg-surface);
|
|
342
328
|
}
|
|
343
329
|
|
|
344
|
-
.customRow:focus-
|
|
345
|
-
.
|
|
346
|
-
|
|
330
|
+
.customRow:has(.fieldInput:focus-visible),
|
|
331
|
+
.customBlock:has(.fieldInput:focus-visible) {
|
|
332
|
+
outline: 2px solid var(--cfg-accent);
|
|
333
|
+
outline-offset: -2px;
|
|
347
334
|
}
|
|
348
335
|
|
|
349
|
-
/*
|
|
350
|
-
|
|
351
|
-
two layers MUST keep identical type, padding and wrapping — a mismatch
|
|
352
|
-
makes the box the wrong height for the text the user is typing. */
|
|
336
|
+
/* The hidden mirror and textarea must share typography and padding so soft
|
|
337
|
+
wraps determine height. Only the textarea scrolls after six lines. */
|
|
353
338
|
.field {
|
|
354
339
|
display: grid;
|
|
355
340
|
min-width: 0;
|
|
@@ -361,234 +346,181 @@
|
|
|
361
346
|
min-width: 0;
|
|
362
347
|
padding: var(--dsh-answer-field-padding);
|
|
363
348
|
font: inherit;
|
|
364
|
-
font-size:
|
|
365
|
-
line-height:
|
|
349
|
+
font-size: inherit;
|
|
350
|
+
line-height: 20px;
|
|
366
351
|
white-space: pre-wrap;
|
|
367
352
|
word-break: break-word;
|
|
368
353
|
overflow-wrap: anywhere;
|
|
369
354
|
}
|
|
370
355
|
|
|
371
|
-
/* The height ruler, never painted. Growth stops at 6 lines: the card body is
|
|
372
|
-
capped at 520px and still owes that budget to the title, the option rows and
|
|
373
|
-
the footer actions, so a long answer scrolls in the textarea instead of
|
|
374
|
-
pushing the choices it belongs to out of view.
|
|
375
|
-
content-box overrides the card-wide border-box so the cap counts TEXT lines
|
|
376
|
-
in both variants: under border-box the block variant's 16px of vertical
|
|
377
|
-
padding eats two thirds of a line and the sixth one arrives as an 8px sliver.
|
|
378
|
-
Width is unaffected — a stretched grid item's used width comes from the
|
|
379
|
-
track, not from this box-sizing. */
|
|
380
356
|
.fieldMirror {
|
|
381
357
|
box-sizing: content-box;
|
|
382
|
-
max-height:
|
|
358
|
+
max-height: 120px;
|
|
383
359
|
overflow: hidden;
|
|
384
360
|
visibility: hidden;
|
|
385
361
|
}
|
|
386
362
|
|
|
387
363
|
.fieldInput {
|
|
388
364
|
resize: none;
|
|
389
|
-
/* The stack's only scrollport: past the mirror's cap the field stops growing
|
|
390
|
-
and this scrolls. */
|
|
391
365
|
overflow-y: auto;
|
|
392
|
-
border:
|
|
366
|
+
border: 0;
|
|
393
367
|
outline: none;
|
|
394
368
|
background: transparent;
|
|
395
|
-
color: var(--
|
|
396
|
-
caret-color: var(--
|
|
369
|
+
color: var(--cfg-ink);
|
|
370
|
+
caret-color: var(--cfg-accent);
|
|
397
371
|
}
|
|
398
372
|
|
|
399
373
|
.fieldInput::placeholder {
|
|
400
|
-
color: var(--dsw-alias-label-
|
|
374
|
+
color: var(--dsw-alias-label-tertiary);
|
|
401
375
|
}
|
|
402
376
|
|
|
403
|
-
/* Inline variant: the custom row's copy column, borrowing the row's chrome. */
|
|
404
377
|
.customInline {
|
|
405
378
|
flex: 1;
|
|
406
379
|
}
|
|
407
380
|
|
|
408
|
-
/* Optionless question: the free-form answer is the whole body, so it carries
|
|
409
|
-
its own frame. The 12px side margins add to the .options 12px padding so both
|
|
410
|
-
edges align with the title's 24px inset; two lines are reserved before the
|
|
411
|
-
answer starts growing. */
|
|
412
381
|
.customBlock {
|
|
413
|
-
min-height:
|
|
382
|
+
min-height: 60px;
|
|
414
383
|
flex-shrink: 0;
|
|
415
|
-
margin: 0
|
|
416
|
-
border:
|
|
417
|
-
border-radius:
|
|
418
|
-
background: var(--
|
|
384
|
+
margin: 0 8px;
|
|
385
|
+
border: 1px solid var(--cfg-line);
|
|
386
|
+
border-radius: 8px;
|
|
387
|
+
background: var(--cfg-surface);
|
|
419
388
|
--dsh-answer-field-padding: 8px 12px;
|
|
420
389
|
}
|
|
421
390
|
|
|
422
|
-
.customBlock:focus-within {
|
|
423
|
-
border-color: var(--dsw-alias-state-business-primary);
|
|
424
|
-
}
|
|
425
|
-
|
|
426
391
|
.footer {
|
|
427
392
|
display: flex;
|
|
428
393
|
align-items: center;
|
|
429
394
|
justify-content: space-between;
|
|
430
|
-
gap: 12px;
|
|
431
395
|
flex-shrink: 0;
|
|
432
|
-
|
|
433
|
-
padding:
|
|
396
|
+
gap: 8px;
|
|
397
|
+
padding: 8px 12px;
|
|
398
|
+
border-top: 1px solid var(--cfg-line);
|
|
434
399
|
}
|
|
435
400
|
|
|
436
|
-
.
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
color: var(--dsw-alias-state-error-primary);
|
|
401
|
+
.progress {
|
|
402
|
+
padding: 0 4px;
|
|
403
|
+
color: var(--cfg-muted);
|
|
440
404
|
font-size: 11px;
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
@media (max-width: 720px) {
|
|
446
|
-
.card {
|
|
447
|
-
border-radius: var(--dsw-radius-xl);
|
|
448
|
-
}
|
|
449
|
-
|
|
450
|
-
.header {
|
|
451
|
-
padding: 10px 12px 0 18px;
|
|
452
|
-
}
|
|
453
|
-
|
|
454
|
-
.options {
|
|
455
|
-
padding: 4px 8px;
|
|
456
|
-
}
|
|
457
|
-
|
|
458
|
-
.title {
|
|
459
|
-
font-size: 15px;
|
|
460
|
-
line-height: 21px;
|
|
461
|
-
}
|
|
462
|
-
|
|
463
|
-
.option,
|
|
464
|
-
.customRow {
|
|
465
|
-
padding: 8px 6px;
|
|
466
|
-
}
|
|
467
|
-
|
|
468
|
-
.footer {
|
|
469
|
-
align-items: flex-end;
|
|
470
|
-
padding: 0 10px;
|
|
471
|
-
}
|
|
472
|
-
|
|
473
|
-
.footerActions {
|
|
474
|
-
flex-shrink: 0;
|
|
475
|
-
}
|
|
476
|
-
}
|
|
477
|
-
|
|
478
|
-
@media (prefers-reduced-motion: reduce) {
|
|
479
|
-
.option,
|
|
480
|
-
.customRow {
|
|
481
|
-
transition: none;
|
|
482
|
-
}
|
|
405
|
+
font-variant-numeric: tabular-nums;
|
|
406
|
+
line-height: 20px;
|
|
407
|
+
white-space: nowrap;
|
|
483
408
|
}
|
|
484
409
|
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
.eyebrow,
|
|
488
|
-
.optionLabel,
|
|
489
|
-
.description {
|
|
410
|
+
.feedback {
|
|
411
|
+
flex: 1;
|
|
490
412
|
min-width: 0;
|
|
413
|
+
color: var(--cfg-muted);
|
|
414
|
+
font-size: 12px;
|
|
415
|
+
line-height: 18px;
|
|
491
416
|
overflow-wrap: anywhere;
|
|
492
|
-
|
|
493
|
-
}
|
|
494
|
-
|
|
495
|
-
.title {
|
|
496
|
-
max-height: 30vh;
|
|
497
|
-
overflow-y: auto;
|
|
498
|
-
}
|
|
499
|
-
|
|
500
|
-
.title > div,
|
|
501
|
-
.eyebrow > div,
|
|
502
|
-
.optionLabel > div,
|
|
503
|
-
.description > div {
|
|
504
|
-
margin: 0;
|
|
505
|
-
}
|
|
506
|
-
|
|
507
|
-
.optionLabel {
|
|
508
|
-
display: block;
|
|
417
|
+
text-align: right;
|
|
509
418
|
}
|
|
510
419
|
|
|
511
|
-
.
|
|
512
|
-
display: block;
|
|
513
|
-
}
|
|
420
|
+
.feedback[data-error] { color: var(--cfg-danger); }
|
|
514
421
|
|
|
515
|
-
.
|
|
516
|
-
|
|
517
|
-
|
|
422
|
+
.button, .primary {
|
|
423
|
+
appearance: none;
|
|
424
|
+
display: inline-flex;
|
|
425
|
+
align-items: center;
|
|
426
|
+
justify-content: center;
|
|
427
|
+
gap: 6px;
|
|
428
|
+
height: 32px;
|
|
429
|
+
padding: 0 12px;
|
|
430
|
+
border: 1px solid var(--cfg-line);
|
|
431
|
+
border-radius: 8px;
|
|
432
|
+
box-shadow: none;
|
|
433
|
+
background: var(--cfg-surface);
|
|
434
|
+
color: var(--cfg-ink);
|
|
435
|
+
font: inherit;
|
|
436
|
+
font-size: 13px;
|
|
437
|
+
font-weight: 500;
|
|
438
|
+
cursor: pointer;
|
|
439
|
+
transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
|
|
518
440
|
}
|
|
441
|
+
.button:hover:not(:disabled) { background: var(--cfg-hover); }
|
|
442
|
+
.primary { min-width: 128px; border-color: transparent; background: var(--cfg-solid); color: var(--cfg-on-solid); }
|
|
443
|
+
.primary:hover:not(:disabled) { background: var(--cfg-solid-hover); }
|
|
444
|
+
.button:active:not(:disabled), .primary:active:not(:disabled) { background: color-mix(in srgb, var(--cfg-accent) 12%, var(--cfg-surface)); }
|
|
445
|
+
.iconButton, .option { appearance: none; box-shadow: none; }
|
|
446
|
+
.spinner { width: 12px; height: 12px; border: 1px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin 800ms linear infinite; }
|
|
447
|
+
@keyframes spin { to { transform: rotate(360deg); } }
|
|
519
448
|
|
|
520
|
-
.
|
|
521
|
-
|
|
449
|
+
.feedback:empty {
|
|
450
|
+
display: none;
|
|
522
451
|
}
|
|
523
452
|
|
|
524
453
|
@media (max-width: 720px) {
|
|
525
|
-
.
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
.headingBlock {
|
|
530
|
-
flex: 1 1 100%;
|
|
531
|
-
}
|
|
532
|
-
|
|
533
|
-
.headerActions {
|
|
534
|
-
flex-wrap: wrap;
|
|
535
|
-
justify-content: flex-end;
|
|
536
|
-
margin-left: auto;
|
|
454
|
+
.card {
|
|
455
|
+
max-height: calc(100vh - 160px);
|
|
456
|
+
max-height: calc(100dvh - 160px);
|
|
537
457
|
}
|
|
538
458
|
|
|
539
|
-
.
|
|
540
|
-
|
|
459
|
+
.header {
|
|
460
|
+
gap: 8px;
|
|
461
|
+
padding: 10px 8px 8px 12px;
|
|
541
462
|
}
|
|
542
463
|
|
|
543
|
-
.
|
|
544
|
-
|
|
545
|
-
|
|
464
|
+
.field > * {
|
|
465
|
+
font-size: 16px;
|
|
466
|
+
line-height: 24px;
|
|
546
467
|
}
|
|
547
468
|
|
|
548
|
-
.
|
|
549
|
-
max-height:
|
|
550
|
-
max-height: 24dvh;
|
|
551
|
-
font-size: 15px;
|
|
552
|
-
line-height: 21px;
|
|
469
|
+
.fieldMirror {
|
|
470
|
+
max-height: 144px;
|
|
553
471
|
}
|
|
554
472
|
|
|
555
473
|
.footer {
|
|
556
474
|
flex-wrap: wrap;
|
|
475
|
+
padding: 8px;
|
|
557
476
|
}
|
|
558
477
|
|
|
559
478
|
.feedback {
|
|
560
479
|
flex: 1 1 100%;
|
|
480
|
+
order: 1;
|
|
561
481
|
text-align: left;
|
|
562
482
|
}
|
|
563
483
|
|
|
564
484
|
.footerActions {
|
|
565
|
-
|
|
566
|
-
justify-content: flex-end;
|
|
567
|
-
flex-wrap: wrap;
|
|
568
|
-
}
|
|
569
|
-
|
|
570
|
-
.option,
|
|
571
|
-
.customRow {
|
|
572
|
-
min-height: 44px;
|
|
485
|
+
margin-left: auto;
|
|
573
486
|
}
|
|
574
487
|
}
|
|
575
488
|
|
|
576
489
|
@media (max-width: 420px) {
|
|
577
|
-
.
|
|
578
|
-
|
|
579
|
-
flex-direction: column;
|
|
490
|
+
.header {
|
|
491
|
+
flex-wrap: wrap;
|
|
580
492
|
}
|
|
581
493
|
|
|
582
|
-
.
|
|
583
|
-
|
|
584
|
-
width: 100%;
|
|
494
|
+
.headingBlock {
|
|
495
|
+
flex-basis: calc(100% - 104px);
|
|
585
496
|
}
|
|
586
497
|
|
|
587
498
|
.footerActions {
|
|
588
|
-
|
|
499
|
+
flex: 1 1 100%;
|
|
589
500
|
}
|
|
590
501
|
|
|
591
502
|
.footerActions > button {
|
|
592
|
-
flex: 1
|
|
503
|
+
flex: 1;
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
@media (pointer: coarse) {
|
|
508
|
+
.option, .customRow, .card button { min-height: 44px; }
|
|
509
|
+
.iconButton { width: 44px; height: 44px; }
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
@media (prefers-reduced-motion: reduce) {
|
|
513
|
+
.spinner { animation: none; }
|
|
514
|
+
.option,
|
|
515
|
+
.customRow {
|
|
516
|
+
transition: none;
|
|
593
517
|
}
|
|
594
518
|
}
|
|
519
|
+
|
|
520
|
+
[data-ds-dark-theme] .frame {
|
|
521
|
+
--cfg-accent: #4eb0e8;
|
|
522
|
+
--cfg-accent-text: #6fc0ee;
|
|
523
|
+
--cfg-solid: #4eb0e8;
|
|
524
|
+
--cfg-solid-hover: #6fc0ee;
|
|
525
|
+
--cfg-on-solid: #0e1014;
|
|
526
|
+
}
|