tandd-ui 0.2.3 → 0.2.6
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/CHANGELOG.md +37 -0
- package/dist/components/date-picker/DTDateInput.vue.d.ts +7 -3
- package/dist/components/date-picker/isoDate.d.ts +34 -0
- package/dist/components/date-time-picker/DTDateTimeInput.vue.d.ts +7 -3
- package/dist/components/date-time-picker/isoDateTime.d.ts +15 -7
- package/dist/components/navigation-drawer/DTNavigationDrawer.vue.d.ts +6 -0
- package/dist/components/toast/toastStore.d.ts +10 -2
- package/dist/index.d.ts +1 -1
- package/dist/tandd-ui.css +294 -5
- package/dist/tandd-ui.js +6556 -6308
- package/package.json +1 -1
- package/src/components/navigation-drawer/DTNavigationDrawer.scss +89 -1
- package/src/components/select/DTSelect.scss +8 -4
- package/src/components/toast/DTToast.scss +219 -0
- package/src/components/tree-select/DTTreeSelect.scss +23 -0
- package/src/styles/foundation/_focus.scss +12 -0
- package/src/styles/foundation/_forced-colors.scss +11 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tandd-ui",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.6",
|
|
4
4
|
"description": "Vue 3 component library from the TanDD UI design reference: light and dark themes, localization, and accessible components.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "TanDD (https://tandd.dev)",
|
|
@@ -135,6 +135,86 @@
|
|
|
135
135
|
inset-inline: auto 0;
|
|
136
136
|
}
|
|
137
137
|
|
|
138
|
+
// Rail magnification (owner 2026-11-26): the script sets --dt-rail-zoom on each row's prepend
|
|
139
|
+
// around the pointer, dock style, easing every frame. Only the icon or avatar scales, from its
|
|
140
|
+
// centre inside the row's 40 px square; a badge marker beside it keeps its size and place.
|
|
141
|
+
.dt-navigation-drawer.is-rail:not(.expand-on-hover) .dt-list--nav .dt-list-item__prepend :is(.dt-icon, .dt-avatar):not(.dt-badge-marker *) {
|
|
142
|
+
transform: scale(var(--dt-rail-zoom, 1));
|
|
143
|
+
transform-origin: center;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
// Hover glide (owner 2026-11-26): one shared fill behind the rows moves to the hovered row, so the
|
|
147
|
+
// hover slides from row to row. It comes before the sections in the inner column and the rows are
|
|
148
|
+
// positioned, so it paints under them. Rows drop their own hover tint only once the glide is
|
|
149
|
+
// mounted (`has-glide`); the current row keeps its tint and darker hover. Press still tints.
|
|
150
|
+
.dt-navigation-drawer__inner {
|
|
151
|
+
position: relative;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.dt-navigation-drawer__glide {
|
|
155
|
+
position: absolute;
|
|
156
|
+
top: 0;
|
|
157
|
+
left: 0;
|
|
158
|
+
pointer-events: none;
|
|
159
|
+
background: var(--dt-color-surface-hover);
|
|
160
|
+
opacity: 0;
|
|
161
|
+
transition:
|
|
162
|
+
transform var(--dt-duration-base) var(--dt-ease-emphasized),
|
|
163
|
+
width var(--dt-duration-base) var(--dt-ease-emphasized),
|
|
164
|
+
height var(--dt-duration-base) var(--dt-ease-emphasized),
|
|
165
|
+
opacity var(--dt-duration-fast) var(--dt-ease-standard);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.dt-navigation-drawer__glide.is-visible {
|
|
169
|
+
opacity: 1;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.dt-navigation-drawer__glide.is-instant {
|
|
173
|
+
transition: opacity var(--dt-duration-fast) var(--dt-ease-standard);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.dt-navigation-drawer__inner.has-glide .dt-list--nav .dt-list-item.is-interactive:not(.is-active, .is-disabled):hover {
|
|
177
|
+
background: transparent;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
// Active glide (owner 2026-11-26): the current row's tint is one shared indicator, drawn after the
|
|
181
|
+
// hover fill so it covers it, that slides to the new current row. Rows drop their own tint only
|
|
182
|
+
// while the indicator is drawn (`has-marker`: exactly one current row, in view).
|
|
183
|
+
.dt-navigation-drawer__marker {
|
|
184
|
+
position: absolute;
|
|
185
|
+
top: 0;
|
|
186
|
+
left: 0;
|
|
187
|
+
pointer-events: none;
|
|
188
|
+
background: var(--dt-color-primary-subtle);
|
|
189
|
+
opacity: 0;
|
|
190
|
+
transition:
|
|
191
|
+
transform var(--dt-duration-base) var(--dt-ease-emphasized),
|
|
192
|
+
width var(--dt-duration-base) var(--dt-ease-emphasized),
|
|
193
|
+
height var(--dt-duration-base) var(--dt-ease-emphasized),
|
|
194
|
+
background-color var(--dt-duration-fast) var(--dt-ease-standard),
|
|
195
|
+
opacity var(--dt-duration-fast) var(--dt-ease-standard);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.dt-navigation-drawer__marker.is-visible {
|
|
199
|
+
opacity: 1;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.dt-navigation-drawer__marker.is-hovered {
|
|
203
|
+
background: color-mix(in srgb, var(--dt-color-primary) 18%, var(--dt-color-surface));
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.dt-navigation-drawer__marker.is-instant {
|
|
207
|
+
transition: none;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
// Not in forced colors: there the indicator is hidden and the row keeps DTList's Highlight fill.
|
|
211
|
+
@media not (forced-colors: active) {
|
|
212
|
+
.dt-navigation-drawer__inner.has-marker .dt-list--nav .dt-list-item.is-interactive.is-active,
|
|
213
|
+
.dt-navigation-drawer__inner.has-marker .dt-list--nav .dt-list-item.is-interactive.is-active:hover:not(.is-disabled) {
|
|
214
|
+
background: transparent;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
|
|
138
218
|
// Temporary: inside DTSheet (the class and the width variable land on its scrim); the sheet takes
|
|
139
219
|
// the drawer width and supplies the surface, so its body padding goes.
|
|
140
220
|
.dt-navigation-drawer-sheet .dt-sheet {
|
|
@@ -152,7 +232,9 @@
|
|
|
152
232
|
@media (prefers-reduced-motion: reduce) {
|
|
153
233
|
.dt-navigation-drawer,
|
|
154
234
|
.dt-navigation-drawer__inner,
|
|
155
|
-
.dt-navigation-drawer :is(.dt-list-item__content, .dt-list-item__append, .dt-list-subheader)
|
|
235
|
+
.dt-navigation-drawer :is(.dt-list-item__content, .dt-list-item__append, .dt-list-subheader),
|
|
236
|
+
.dt-navigation-drawer__glide,
|
|
237
|
+
.dt-navigation-drawer__marker {
|
|
156
238
|
transition: none !important;
|
|
157
239
|
}
|
|
158
240
|
}
|
|
@@ -161,6 +243,12 @@
|
|
|
161
243
|
// colors drop; a border on its inner edge keeps it apart from the page. The nav rows' active
|
|
162
244
|
// state comes from DTList's own forced-colors rules.
|
|
163
245
|
@media (forced-colors: active) {
|
|
246
|
+
// Backgrounds are dropped in forced colors, so the glide would be an empty box.
|
|
247
|
+
.dt-navigation-drawer__glide,
|
|
248
|
+
.dt-navigation-drawer__marker {
|
|
249
|
+
display: none;
|
|
250
|
+
}
|
|
251
|
+
|
|
164
252
|
.dt-navigation-drawer.is-rail.is-expanded .dt-navigation-drawer__inner {
|
|
165
253
|
border-inline-end: 1px solid CanvasText;
|
|
166
254
|
}
|
|
@@ -44,16 +44,13 @@
|
|
|
44
44
|
background: var(--dt-color-surface-hover);
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
+
// Focus recolours the border only (no ring), like DTInput.
|
|
47
48
|
.dt-select__trigger:focus-visible,
|
|
48
49
|
.dt-select.is-open .dt-select__trigger {
|
|
49
50
|
outline: none;
|
|
50
51
|
border-color: var(--dt-color-primary);
|
|
51
52
|
}
|
|
52
53
|
|
|
53
|
-
.dt-select__trigger:focus-visible {
|
|
54
|
-
box-shadow: 0 0 0 3px color-mix(in srgb, var(--dt-color-focus) 23%, transparent);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
54
|
// Disabled text uses the lighter disabled colour, as DTInput does (round 9, T9-1).
|
|
58
55
|
.dt-select__trigger:disabled {
|
|
59
56
|
border-color: var(--dt-color-border);
|
|
@@ -80,6 +77,13 @@
|
|
|
80
77
|
border-color: var(--dt-color-danger);
|
|
81
78
|
}
|
|
82
79
|
|
|
80
|
+
// An invalid trigger already has the danger border, so focus thickens it with an inset shadow
|
|
81
|
+
// (no outer ring, no layout shift), as DTInput does.
|
|
82
|
+
.dt-select.is-invalid:is(.dt-select--soft, .dt-select--filled) .dt-select__trigger:focus-visible,
|
|
83
|
+
.dt-select.is-invalid:is(.dt-select--soft, .dt-select--filled).is-open .dt-select__trigger {
|
|
84
|
+
box-shadow: inset 0 0 0 1px var(--dt-color-danger);
|
|
85
|
+
}
|
|
86
|
+
|
|
83
87
|
.dt-select__helper {
|
|
84
88
|
color: var(--dt-color-text-subtle);
|
|
85
89
|
font-size: 12px;
|
|
@@ -97,6 +97,25 @@
|
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
+
// Sizes for the tonal, solid, and outlined cards (md is the base above).
|
|
101
|
+
.dt-toast--sm:not(.dt-toast--raised) {
|
|
102
|
+
gap: var(--dt-space-2);
|
|
103
|
+
padding: var(--dt-space-2) var(--dt-space-3);
|
|
104
|
+
|
|
105
|
+
.dt-toast__icon { font-size: 16px; }
|
|
106
|
+
.dt-toast__title { font-size: var(--dt-font-size-xs); }
|
|
107
|
+
.dt-toast__text { font-size: var(--dt-font-size-2xs); }
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.dt-toast--lg:not(.dt-toast--raised) {
|
|
111
|
+
gap: var(--dt-space-4);
|
|
112
|
+
padding: var(--dt-space-4) var(--dt-space-5);
|
|
113
|
+
|
|
114
|
+
.dt-toast__icon { font-size: 22px; }
|
|
115
|
+
.dt-toast__title { font-size: var(--dt-font-size-md); }
|
|
116
|
+
.dt-toast__text { font-size: var(--dt-font-size-sm); }
|
|
117
|
+
}
|
|
118
|
+
|
|
100
119
|
// Outlined: the tone draws the whole border on the plain surface.
|
|
101
120
|
.dt-toast--outlined {
|
|
102
121
|
border-color: var(--dt-toast-tone);
|
|
@@ -141,6 +160,206 @@
|
|
|
141
160
|
}
|
|
142
161
|
}
|
|
143
162
|
|
|
163
|
+
// Raised (owner 2026-11-27, design "TOAST NOTIFICATION UI UPGRADE", premium row): a 3D tone card.
|
|
164
|
+
// The fill, the tile, the circles, and the close button are the design's colours, sampled from it
|
|
165
|
+
// pixel for pixel ("background y chang 100%"): each tone runs from a deeper left to a lighter
|
|
166
|
+
// right, and the same colours are used in light and dark themes. White text on these fills is below
|
|
167
|
+
// 4.5:1 on the light side (success and warning); the owner chose the exact design over AA here, so
|
|
168
|
+
// this variant is a documented exception and the other variants keep AA.
|
|
169
|
+
.dt-toast--raised {
|
|
170
|
+
--dt-toast-from: #47965c;
|
|
171
|
+
--dt-toast-to: #5aaf74;
|
|
172
|
+
--dt-toast-orb: rgba(255, 255, 255, 0.13);
|
|
173
|
+
--dt-focus-ring-color: #ffffff;
|
|
174
|
+
// Size (md here; sm and lg below). lg is the design's full size.
|
|
175
|
+
--dt-toast-raised-pad: 12px 14px 12px 12px;
|
|
176
|
+
--dt-toast-raised-gap: 14px;
|
|
177
|
+
--dt-toast-raised-radius: 12px;
|
|
178
|
+
--dt-toast-raised-tile: 36px;
|
|
179
|
+
--dt-toast-raised-tile-radius: 10px;
|
|
180
|
+
--dt-toast-raised-mark: 18px;
|
|
181
|
+
--dt-toast-raised-title: 14px;
|
|
182
|
+
--dt-toast-raised-text: 13px;
|
|
183
|
+
--dt-toast-raised-close: 28px;
|
|
184
|
+
--dt-toast-raised-orb-small: 21px;
|
|
185
|
+
--dt-toast-raised-orb-large: 72px;
|
|
186
|
+
|
|
187
|
+
isolation: isolate;
|
|
188
|
+
align-items: center;
|
|
189
|
+
gap: var(--dt-toast-raised-gap);
|
|
190
|
+
padding: var(--dt-toast-raised-pad);
|
|
191
|
+
border: 0;
|
|
192
|
+
border-radius: var(--dt-toast-raised-radius);
|
|
193
|
+
color: #ffffff;
|
|
194
|
+
background: linear-gradient(90deg, var(--dt-toast-from), var(--dt-toast-to));
|
|
195
|
+
// The 3D lift: a light top edge, a darker bottom edge, and a soft shadow under the card.
|
|
196
|
+
box-shadow:
|
|
197
|
+
inset 0 1px 0 rgba(255, 255, 255, 0.28),
|
|
198
|
+
inset 0 -2px 0 rgba(0, 0, 0, 0.1),
|
|
199
|
+
0 6px 14px -4px rgba(0, 0, 0, 0.28),
|
|
200
|
+
0 2px 4px rgba(0, 0, 0, 0.12);
|
|
201
|
+
|
|
202
|
+
.dt-toast__content {
|
|
203
|
+
position: relative;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.dt-toast__title {
|
|
207
|
+
font-size: var(--dt-toast-raised-title);
|
|
208
|
+
font-weight: 700;
|
|
209
|
+
line-height: 1.3;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.dt-toast__text {
|
|
213
|
+
margin-top: 2px;
|
|
214
|
+
color: #ffffff;
|
|
215
|
+
font-size: var(--dt-toast-raised-text);
|
|
216
|
+
line-height: 1.35;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.dt-toast__icon {
|
|
220
|
+
margin: 0;
|
|
221
|
+
color: #ffffff;
|
|
222
|
+
font-size: var(--dt-toast-raised-mark);
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.dt-toast__spinner {
|
|
226
|
+
width: var(--dt-toast-raised-mark);
|
|
227
|
+
height: var(--dt-toast-raised-mark);
|
|
228
|
+
margin: calc((var(--dt-toast-raised-tile) - var(--dt-toast-raised-mark)) / 2);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
.dt-toast__action {
|
|
232
|
+
position: relative;
|
|
233
|
+
color: #ffffff;
|
|
234
|
+
text-decoration: underline;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
.dt-toast__action:hover {
|
|
238
|
+
background: rgba(255, 255, 255, 0.16);
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.dt-toast__close {
|
|
242
|
+
position: relative;
|
|
243
|
+
width: var(--dt-toast-raised-close);
|
|
244
|
+
height: var(--dt-toast-raised-close);
|
|
245
|
+
margin: 0;
|
|
246
|
+
border-radius: 50%;
|
|
247
|
+
color: #ffffff;
|
|
248
|
+
background: rgba(255, 255, 255, 0.18);
|
|
249
|
+
// The design's cross is bold.
|
|
250
|
+
--dt-icon-stroke: 2.75;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
.dt-toast__close:hover {
|
|
254
|
+
color: #ffffff;
|
|
255
|
+
background: rgba(255, 255, 255, 0.3);
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
.dt-toast__action:focus-visible,
|
|
259
|
+
.dt-toast__close:focus-visible {
|
|
260
|
+
box-shadow: 0 0 0 2px #ffffff;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
.dt-toast__progress {
|
|
264
|
+
background: #ffffff;
|
|
265
|
+
opacity: 0.55;
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
.dt-toast--raised.dt-toast--info {
|
|
270
|
+
--dt-toast-from: #3457cd;
|
|
271
|
+
--dt-toast-to: #4976e8;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
.dt-toast--raised.dt-toast--warning {
|
|
275
|
+
--dt-toast-from: #b27027;
|
|
276
|
+
--dt-toast-to: #d69838;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
.dt-toast--raised.dt-toast--sm {
|
|
280
|
+
--dt-toast-raised-pad: 8px 10px 8px 8px;
|
|
281
|
+
--dt-toast-raised-gap: 10px;
|
|
282
|
+
--dt-toast-raised-radius: 10px;
|
|
283
|
+
--dt-toast-raised-tile: 28px;
|
|
284
|
+
--dt-toast-raised-tile-radius: 8px;
|
|
285
|
+
--dt-toast-raised-mark: 14px;
|
|
286
|
+
--dt-toast-raised-title: 13px;
|
|
287
|
+
--dt-toast-raised-text: 12px;
|
|
288
|
+
--dt-toast-raised-close: 24px;
|
|
289
|
+
--dt-toast-raised-orb-small: 16px;
|
|
290
|
+
--dt-toast-raised-orb-large: 54px;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
// lg: the design's size (sampled from the 1125 px screenshot at its 1:2.6 scale).
|
|
294
|
+
.dt-toast--raised.dt-toast--lg {
|
|
295
|
+
--dt-toast-raised-pad: 16px 18px 16px 16px;
|
|
296
|
+
--dt-toast-raised-gap: 18px;
|
|
297
|
+
--dt-toast-raised-radius: 14px;
|
|
298
|
+
--dt-toast-raised-tile: 46px;
|
|
299
|
+
--dt-toast-raised-tile-radius: 12px;
|
|
300
|
+
--dt-toast-raised-mark: 22px;
|
|
301
|
+
--dt-toast-raised-title: 16px;
|
|
302
|
+
--dt-toast-raised-text: 15px;
|
|
303
|
+
--dt-toast-raised-close: 32px;
|
|
304
|
+
--dt-toast-raised-orb-small: 27px;
|
|
305
|
+
--dt-toast-raised-orb-large: 92px;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
// The design has no error card; this one follows its error trigger button (#d94457) the way the
|
|
309
|
+
// other tones run from their trigger colour: deeper on the left, lighter on the right.
|
|
310
|
+
.dt-toast--raised.dt-toast--danger {
|
|
311
|
+
--dt-toast-from: #c93a4d;
|
|
312
|
+
--dt-toast-to: #e5586b;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
// The icon tile: a rounded square, lighter than the card, lit from the top, raised by a shadow.
|
|
316
|
+
.dt-toast__tile {
|
|
317
|
+
position: relative;
|
|
318
|
+
display: grid;
|
|
319
|
+
flex: none;
|
|
320
|
+
place-items: center;
|
|
321
|
+
width: var(--dt-toast-raised-tile, 46px);
|
|
322
|
+
height: var(--dt-toast-raised-tile, 46px);
|
|
323
|
+
border-radius: var(--dt-toast-raised-tile-radius, 12px);
|
|
324
|
+
background: linear-gradient(180deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.18));
|
|
325
|
+
box-shadow:
|
|
326
|
+
inset 0 1px 0 rgba(255, 255, 255, 0.35),
|
|
327
|
+
0 3px 8px rgba(0, 0, 0, 0.18);
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
.dt-toast__glyph {
|
|
331
|
+
width: var(--dt-toast-raised-mark, 22px);
|
|
332
|
+
height: var(--dt-toast-raised-mark, 22px);
|
|
333
|
+
fill: none;
|
|
334
|
+
stroke: currentColor;
|
|
335
|
+
stroke-width: 3;
|
|
336
|
+
stroke-linecap: round;
|
|
337
|
+
stroke-linejoin: round;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
// Two soft circles, as in the design: a small one along the top edge right of centre, and a large
|
|
341
|
+
// one rising from the bottom-right corner. Clipped by the card's rounded corners.
|
|
342
|
+
.dt-toast__orbs {
|
|
343
|
+
position: absolute;
|
|
344
|
+
z-index: -1;
|
|
345
|
+
inset: 0;
|
|
346
|
+
pointer-events: none;
|
|
347
|
+
background:
|
|
348
|
+
radial-gradient(circle at calc(100% - 4 * var(--dt-toast-raised-orb-small)) 2px, var(--dt-toast-orb) 0 var(--dt-toast-raised-orb-small), transparent calc(var(--dt-toast-raised-orb-small) + 0.5px)),
|
|
349
|
+
radial-gradient(circle at calc(100% + 10px) calc(100% + 16px), var(--dt-toast-orb) 0 var(--dt-toast-raised-orb-large), transparent calc(var(--dt-toast-raised-orb-large) + 0.5px));
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
@media (forced-colors: active) {
|
|
353
|
+
// Backgrounds and shadows are dropped: the card keeps a border so its edge stays visible.
|
|
354
|
+
.dt-toast--raised {
|
|
355
|
+
border: 1px solid CanvasText;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
.dt-toast__tile {
|
|
359
|
+
border: 1px solid CanvasText;
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
|
|
144
363
|
@keyframes dt-toast-in {
|
|
145
364
|
from {
|
|
146
365
|
opacity: 0;
|
|
@@ -58,3 +58,26 @@
|
|
|
58
58
|
outline-offset: -2px;
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
|
+
|
|
62
|
+
// Tree items in the panel show focus with a fill, not the treeview's outline ring (owner
|
|
63
|
+
// 2026-11-17), like a DTSelect option. A selected or active item already has the primary tint, so
|
|
64
|
+
// focus deepens it. Forced colors drop fills, so they keep a Highlight outline.
|
|
65
|
+
.dt-tree-select__tree .dt-treeview__item:focus-visible {
|
|
66
|
+
outline: none;
|
|
67
|
+
background: var(--dt-color-surface-hover);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.dt-tree-select__tree .dt-treeview__item:focus-visible:is(.is-active, .is-selected) {
|
|
71
|
+
background: color-mix(in srgb, var(--dt-color-primary-subtle) 80%, var(--dt-color-primary));
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.dt-tree-select__tree.is-multiple .dt-treeview__item:focus-visible.is-selected:not(.is-active) {
|
|
75
|
+
background: var(--dt-color-surface-hover);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
@media (forced-colors: active) {
|
|
79
|
+
.dt-tree-select__tree .dt-treeview__item:focus-visible {
|
|
80
|
+
outline: 2px solid Highlight;
|
|
81
|
+
outline-offset: -2px;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
@@ -10,3 +10,15 @@
|
|
|
10
10
|
outline: var(--dt-focus-ring-width) solid var(--dt-focus-ring-color);
|
|
11
11
|
outline-offset: var(--dt-focus-ring-offset);
|
|
12
12
|
}
|
|
13
|
+
|
|
14
|
+
// Plain text inputs, selects, and textareas focus like DTInput: the border turns primary, no ring.
|
|
15
|
+
// :where() keeps the selector at :focus specificity so component rules still win. Checkbox, radio,
|
|
16
|
+
// range, colour, file, and button inputs keep the ring: they have no border to recolour.
|
|
17
|
+
:where(
|
|
18
|
+
input:not([type="checkbox"], [type="radio"], [type="range"], [type="color"], [type="file"], [type="button"], [type="submit"], [type="reset"], [type="image"]),
|
|
19
|
+
textarea,
|
|
20
|
+
select
|
|
21
|
+
):focus {
|
|
22
|
+
outline: none;
|
|
23
|
+
border-color: var(--dt-color-primary);
|
|
24
|
+
}
|
|
@@ -7,3 +7,14 @@
|
|
|
7
7
|
outline-color: Highlight;
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
|
+
|
|
11
|
+
// Plain fields drop the focus ring (foundation/focus); the border carries focus instead.
|
|
12
|
+
@media (forced-colors: active) {
|
|
13
|
+
:where(
|
|
14
|
+
input:not([type="checkbox"], [type="radio"], [type="range"], [type="color"], [type="file"], [type="button"], [type="submit"], [type="reset"], [type="image"]),
|
|
15
|
+
textarea,
|
|
16
|
+
select
|
|
17
|
+
):focus {
|
|
18
|
+
border-color: Highlight;
|
|
19
|
+
}
|
|
20
|
+
}
|