tandd-ui 0.2.4 → 0.2.7
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 +40 -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/list/DTListGroup.vue.d.ts +35 -0
- 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 +2 -1
- package/dist/tandd-ui.css +357 -1
- package/dist/tandd-ui.js +6465 -6107
- package/package.json +4 -2
- package/src/components/list/DTList.scss +79 -0
- package/src/components/navigation-drawer/DTNavigationDrawer.scss +109 -1
- package/src/components/select/DTSelect.scss +7 -0
- package/src/components/toast/DTToast.scss +219 -0
- package/src/components/tree-select/DTTreeSelect.scss +23 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tandd-ui",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.7",
|
|
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)",
|
|
@@ -53,6 +53,7 @@
|
|
|
53
53
|
"playground:preview": "vite preview --config vite.playground.config.mjs --host 127.0.0.1 --port 4174 --strictPort",
|
|
54
54
|
"docs:dev": "vitepress dev docs --host 127.0.0.1 --port 5175 --strictPort",
|
|
55
55
|
"docs:build": "vitepress build docs",
|
|
56
|
+
"docs:build:release": "npm run playground:build && TANDD_UI_SOURCE=npm vitepress build docs",
|
|
56
57
|
"docs:test": "npm run build:styles && node tests/docs-vitepress.test.js",
|
|
57
58
|
"docs:preview": "vitepress preview docs --host 127.0.0.1 --port 4175 --strictPort",
|
|
58
59
|
"test:e2e": "npm run test:sites && npm run test:a11y",
|
|
@@ -100,6 +101,7 @@
|
|
|
100
101
|
"monaco-editor": "^0.55.1",
|
|
101
102
|
"playwright": "1.57.0",
|
|
102
103
|
"sass": "^1.89.0",
|
|
104
|
+
"tandd-ui-release": "npm:tandd-ui@^0.2.6",
|
|
103
105
|
"typescript": "^5.9.3",
|
|
104
106
|
"vite": "^7.0.6",
|
|
105
107
|
"vite-plugin-dts": "^5.0.3",
|
|
@@ -109,6 +111,6 @@
|
|
|
109
111
|
"vue-tsc": "^3.3.9"
|
|
110
112
|
},
|
|
111
113
|
"dependencies": {
|
|
112
|
-
"tandd-icon": "
|
|
114
|
+
"tandd-icon": "1.1.0"
|
|
113
115
|
}
|
|
114
116
|
}
|
|
@@ -176,6 +176,85 @@
|
|
|
176
176
|
font-weight: var(--dt-font-weight-semibold);
|
|
177
177
|
}
|
|
178
178
|
|
|
179
|
+
// Group (DTListGroup, owner 2026-11-29): a header row that opens a nested list. The panel animates
|
|
180
|
+
// its height with a 0fr -> 1fr grid row, so no height is measured; closed rows are inert. Nested
|
|
181
|
+
// rows indent by one icon column, so their titles line up under the header's title.
|
|
182
|
+
.dt-list-group {
|
|
183
|
+
--dt-list-group-indent: calc(var(--dt-list-pad-x) + 16px + var(--dt-list-gap) - var(--dt-list-pad-x));
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.dt-list-group__header {
|
|
187
|
+
width: 100%;
|
|
188
|
+
cursor: pointer;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
// The chevron flips about its horizontal axis, exactly like DTAccordion's (and the select and menu
|
|
192
|
+
// chevrons), so every disclosure in the system turns the same way (owner 2026-11-29: "phải giống
|
|
193
|
+
// Accordion"). The flip is on the icon, not its wrapper, as in DTAccordion.
|
|
194
|
+
.dt-list-group__chevron .dt-icon {
|
|
195
|
+
transition: transform var(--dt-duration-slow) var(--dt-ease-standard);
|
|
196
|
+
transform: perspective(100px) rotateX(0deg);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.dt-list-group__header[aria-expanded="true"] .dt-list-group__chevron .dt-icon {
|
|
200
|
+
transform: perspective(100px) rotateX(180deg);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
// The current page is inside: the header takes the accent text (not the fill, which marks the page).
|
|
204
|
+
.dt-list-group__header.is-active-parent {
|
|
205
|
+
color: var(--dt-color-primary);
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.dt-list-group__header.is-active-parent .dt-list-item__prepend {
|
|
209
|
+
color: inherit;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
// Closed, the panel is also visibility: hidden once it has finished closing (the delay keeps its
|
|
213
|
+
// rows visible while they slide shut), so a closed submenu's rows are hidden from everyone, not
|
|
214
|
+
// only clipped; inert on the panel keeps them out of focus during the close as well.
|
|
215
|
+
.dt-list-group__panel {
|
|
216
|
+
display: grid;
|
|
217
|
+
grid-template-rows: 0fr;
|
|
218
|
+
visibility: hidden;
|
|
219
|
+
transition:
|
|
220
|
+
grid-template-rows var(--dt-duration-base) var(--dt-ease-emphasized),
|
|
221
|
+
visibility 0s linear var(--dt-duration-base);
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.dt-list-group.is-open > .dt-list-group__panel {
|
|
225
|
+
grid-template-rows: 1fr;
|
|
226
|
+
visibility: visible;
|
|
227
|
+
transition:
|
|
228
|
+
grid-template-rows var(--dt-duration-base) var(--dt-ease-emphasized),
|
|
229
|
+
visibility 0s;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.dt-list-group__items {
|
|
233
|
+
display: flex;
|
|
234
|
+
flex-direction: column;
|
|
235
|
+
min-height: 0;
|
|
236
|
+
margin: 0;
|
|
237
|
+
padding: 0;
|
|
238
|
+
padding-inline-start: var(--dt-list-group-indent);
|
|
239
|
+
overflow: hidden;
|
|
240
|
+
list-style: none;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
.dt-list--nav .dt-list-group__items {
|
|
244
|
+
gap: 2px;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.dt-list--nav .dt-list-group.is-open > .dt-list-group__panel > .dt-list-group__items {
|
|
248
|
+
padding-block-start: 2px;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
@media (prefers-reduced-motion: reduce) {
|
|
252
|
+
.dt-list-group__panel,
|
|
253
|
+
.dt-list-group__chevron .dt-icon {
|
|
254
|
+
transition: none;
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
|
|
179
258
|
// Selectable: the selected option keeps the accent tint; the check marks it without colour alone.
|
|
180
259
|
.dt-list--selectable {
|
|
181
260
|
outline: none;
|
|
@@ -55,6 +55,12 @@
|
|
|
55
55
|
padding-inline-start: 12px;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
+
// A submenu header is a <button>, which does not stretch at width: auto like the link rows do:
|
|
59
|
+
// it fills the row explicitly, so its chevron sits at the end and its hover covers the whole row.
|
|
60
|
+
.dt-navigation-drawer__inner .dt-list--nav .dt-list-group__header {
|
|
61
|
+
width: calc(100% - 2 * var(--dt-drawer-row-inset));
|
|
62
|
+
}
|
|
63
|
+
|
|
58
64
|
// Other content in prepend/append (a logo, a toggle button) lines up with the rows, and is centred
|
|
59
65
|
// in the collapsed rail.
|
|
60
66
|
.dt-navigation-drawer__prepend > :not(.dt-list-nav),
|
|
@@ -108,6 +114,20 @@
|
|
|
108
114
|
@include dt-visually-hidden($reset-box: false);
|
|
109
115
|
}
|
|
110
116
|
|
|
117
|
+
// A submenu in the collapsed rail shows only its header icon (a 40 px square like the other rows):
|
|
118
|
+
// the nested rows and the chevron are hidden, since there is no room for labels. Opening the rail
|
|
119
|
+
// (expand-on-hover, or toggling rail off) shows the submenu again as it was.
|
|
120
|
+
.dt-navigation-drawer.is-rail:not(.is-expanded) .dt-list-group__panel,
|
|
121
|
+
.dt-navigation-drawer.is-rail:not(.is-expanded) .dt-list-group__chevron {
|
|
122
|
+
display: none;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
// In the rail the header of a group holding the current page is filled, as the page's row would
|
|
126
|
+
// be, since that row is hidden.
|
|
127
|
+
.dt-navigation-drawer.is-rail:not(.is-expanded) .dt-list-group__header.is-active-parent {
|
|
128
|
+
background: var(--dt-color-primary-subtle);
|
|
129
|
+
}
|
|
130
|
+
|
|
111
131
|
.dt-navigation-drawer.is-rail:not(.is-expanded) .dt-list-subheader {
|
|
112
132
|
visibility: hidden;
|
|
113
133
|
height: 0;
|
|
@@ -135,6 +155,86 @@
|
|
|
135
155
|
inset-inline: auto 0;
|
|
136
156
|
}
|
|
137
157
|
|
|
158
|
+
// Rail magnification (owner 2026-11-26): the script sets --dt-rail-zoom on each row's prepend
|
|
159
|
+
// around the pointer, dock style, easing every frame. Only the icon or avatar scales, from its
|
|
160
|
+
// centre inside the row's 40 px square; a badge marker beside it keeps its size and place.
|
|
161
|
+
.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 *) {
|
|
162
|
+
transform: scale(var(--dt-rail-zoom, 1));
|
|
163
|
+
transform-origin: center;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
// Hover glide (owner 2026-11-26): one shared fill behind the rows moves to the hovered row, so the
|
|
167
|
+
// hover slides from row to row. It comes before the sections in the inner column and the rows are
|
|
168
|
+
// positioned, so it paints under them. Rows drop their own hover tint only once the glide is
|
|
169
|
+
// mounted (`has-glide`); the current row keeps its tint and darker hover. Press still tints.
|
|
170
|
+
.dt-navigation-drawer__inner {
|
|
171
|
+
position: relative;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.dt-navigation-drawer__glide {
|
|
175
|
+
position: absolute;
|
|
176
|
+
top: 0;
|
|
177
|
+
left: 0;
|
|
178
|
+
pointer-events: none;
|
|
179
|
+
background: var(--dt-color-surface-hover);
|
|
180
|
+
opacity: 0;
|
|
181
|
+
transition:
|
|
182
|
+
transform var(--dt-duration-base) var(--dt-ease-emphasized),
|
|
183
|
+
width var(--dt-duration-base) var(--dt-ease-emphasized),
|
|
184
|
+
height var(--dt-duration-base) var(--dt-ease-emphasized),
|
|
185
|
+
opacity var(--dt-duration-fast) var(--dt-ease-standard);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.dt-navigation-drawer__glide.is-visible {
|
|
189
|
+
opacity: 1;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.dt-navigation-drawer__glide.is-instant {
|
|
193
|
+
transition: opacity var(--dt-duration-fast) var(--dt-ease-standard);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.dt-navigation-drawer__inner.has-glide .dt-list--nav .dt-list-item.is-interactive:not(.is-active, .is-disabled):hover {
|
|
197
|
+
background: transparent;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
// Active glide (owner 2026-11-26): the current row's tint is one shared indicator, drawn after the
|
|
201
|
+
// hover fill so it covers it, that slides to the new current row. Rows drop their own tint only
|
|
202
|
+
// while the indicator is drawn (`has-marker`: exactly one current row, in view).
|
|
203
|
+
.dt-navigation-drawer__marker {
|
|
204
|
+
position: absolute;
|
|
205
|
+
top: 0;
|
|
206
|
+
left: 0;
|
|
207
|
+
pointer-events: none;
|
|
208
|
+
background: var(--dt-color-primary-subtle);
|
|
209
|
+
opacity: 0;
|
|
210
|
+
transition:
|
|
211
|
+
transform var(--dt-duration-base) var(--dt-ease-emphasized),
|
|
212
|
+
width var(--dt-duration-base) var(--dt-ease-emphasized),
|
|
213
|
+
height var(--dt-duration-base) var(--dt-ease-emphasized),
|
|
214
|
+
background-color var(--dt-duration-fast) var(--dt-ease-standard),
|
|
215
|
+
opacity var(--dt-duration-fast) var(--dt-ease-standard);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.dt-navigation-drawer__marker.is-visible {
|
|
219
|
+
opacity: 1;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.dt-navigation-drawer__marker.is-hovered {
|
|
223
|
+
background: color-mix(in srgb, var(--dt-color-primary) 18%, var(--dt-color-surface));
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.dt-navigation-drawer__marker.is-instant {
|
|
227
|
+
transition: none;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
// Not in forced colors: there the indicator is hidden and the row keeps DTList's Highlight fill.
|
|
231
|
+
@media not (forced-colors: active) {
|
|
232
|
+
.dt-navigation-drawer__inner.has-marker .dt-list--nav .dt-list-item.is-interactive.is-active,
|
|
233
|
+
.dt-navigation-drawer__inner.has-marker .dt-list--nav .dt-list-item.is-interactive.is-active:hover:not(.is-disabled) {
|
|
234
|
+
background: transparent;
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
|
|
138
238
|
// Temporary: inside DTSheet (the class and the width variable land on its scrim); the sheet takes
|
|
139
239
|
// the drawer width and supplies the surface, so its body padding goes.
|
|
140
240
|
.dt-navigation-drawer-sheet .dt-sheet {
|
|
@@ -152,7 +252,9 @@
|
|
|
152
252
|
@media (prefers-reduced-motion: reduce) {
|
|
153
253
|
.dt-navigation-drawer,
|
|
154
254
|
.dt-navigation-drawer__inner,
|
|
155
|
-
.dt-navigation-drawer :is(.dt-list-item__content, .dt-list-item__append, .dt-list-subheader)
|
|
255
|
+
.dt-navigation-drawer :is(.dt-list-item__content, .dt-list-item__append, .dt-list-subheader),
|
|
256
|
+
.dt-navigation-drawer__glide,
|
|
257
|
+
.dt-navigation-drawer__marker {
|
|
156
258
|
transition: none !important;
|
|
157
259
|
}
|
|
158
260
|
}
|
|
@@ -161,6 +263,12 @@
|
|
|
161
263
|
// colors drop; a border on its inner edge keeps it apart from the page. The nav rows' active
|
|
162
264
|
// state comes from DTList's own forced-colors rules.
|
|
163
265
|
@media (forced-colors: active) {
|
|
266
|
+
// Backgrounds are dropped in forced colors, so the glide would be an empty box.
|
|
267
|
+
.dt-navigation-drawer__glide,
|
|
268
|
+
.dt-navigation-drawer__marker {
|
|
269
|
+
display: none;
|
|
270
|
+
}
|
|
271
|
+
|
|
164
272
|
.dt-navigation-drawer.is-rail.is-expanded .dt-navigation-drawer__inner {
|
|
165
273
|
border-inline-end: 1px solid CanvasText;
|
|
166
274
|
}
|
|
@@ -77,6 +77,13 @@
|
|
|
77
77
|
border-color: var(--dt-color-danger);
|
|
78
78
|
}
|
|
79
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
|
+
|
|
80
87
|
.dt-select__helper {
|
|
81
88
|
color: var(--dt-color-text-subtle);
|
|
82
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
|
+
}
|