tandd-ui 0.2.6 → 0.2.8
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 +38 -1
- package/README.md +5 -1
- package/dist/components/_shared/nextFrame.d.ts +11 -0
- package/dist/components/_shared/useFieldValidation.d.ts +2 -1
- package/dist/components/alert/DTAlert.vue.d.ts +2 -2
- package/dist/components/autocomplete/DTAutocomplete.vue.d.ts +4 -0
- package/dist/components/card/DTCard.vue.d.ts +1 -1
- package/dist/components/card/DTCardMedia.vue.d.ts +1 -1
- package/dist/components/checkbox/DTCheckbox.vue.d.ts +11 -2
- package/dist/components/date-picker/DTDateInput.vue.d.ts +7 -0
- package/dist/components/date-picker/DTDatePicker.vue.d.ts +7 -4
- package/dist/components/date-time-picker/DTDateTimeInput.vue.d.ts +4 -0
- package/dist/components/file-input/DTFileInput.vue.d.ts +4 -0
- package/dist/components/form/DTForm.vue.d.ts +67 -0
- package/dist/components/form/formContext.d.ts +24 -0
- package/dist/components/form/useFormField.d.ts +42 -0
- package/dist/components/list/DTListGroup.vue.d.ts +35 -0
- package/dist/components/mention/DTMention.vue.d.ts +4 -0
- package/dist/components/modal/modalStack.d.ts +6 -0
- package/dist/components/number-input/DTNumberInput.vue.d.ts +4 -0
- package/dist/components/radio/DTRadioGroup.vue.d.ts +11 -2
- package/dist/components/select/DTSelect.vue.d.ts +8 -0
- package/dist/components/sortable/DTSortable.vue.d.ts +70 -0
- package/dist/components/sortable/sortableGroups.d.ts +41 -0
- package/dist/components/splitter/DTSplitter.vue.d.ts +48 -0
- package/dist/components/switch/DTSwitch.vue.d.ts +11 -0
- package/dist/components/text-field/DTInput.vue.d.ts +6 -2
- package/dist/components/text-field/fieldShared.d.ts +18 -3
- package/dist/components/textarea/DTTextarea.vue.d.ts +6 -2
- package/dist/components/time-picker/DTTimeInput.vue.d.ts +4 -0
- package/dist/components/toast/toastStore.d.ts +1 -1
- package/dist/components/virtual-scroll/DTVirtualScroll.vue.d.ts +58 -0
- package/dist/index.d.ts +10 -0
- package/dist/locale/en.d.ts +17 -0
- package/dist/locale/en.js +3 -0
- package/dist/locale/messages.d.ts +17 -0
- package/dist/locale/vi.d.ts +17 -0
- package/dist/locale/vi.js +3 -0
- package/dist/styles/accordion.css +177 -0
- package/dist/styles/alert.css +750 -0
- package/dist/styles/anchor.css +120 -0
- package/dist/styles/app-bar.css +1333 -0
- package/dist/styles/autocomplete.css +2100 -0
- package/dist/styles/avatar.css +153 -0
- package/dist/styles/badge.css +862 -0
- package/dist/styles/base.css +383 -0
- package/dist/styles/border-beam.css +57 -0
- package/dist/styles/breadcrumb.css +120 -0
- package/dist/styles/button-group.css +517 -0
- package/dist/styles/button.css +517 -0
- package/dist/styles/card.css +365 -0
- package/dist/styles/carousel.css +272 -0
- package/dist/styles/checkbox.css +457 -0
- package/dist/styles/chip.css +784 -0
- package/dist/styles/code.css +10 -0
- package/dist/styles/col.css +128 -0
- package/dist/styles/color-input.css +1818 -0
- package/dist/styles/color-picker.css +1818 -0
- package/dist/styles/combobox.css +2100 -0
- package/dist/styles/container.css +20 -0
- package/dist/styles/data-table.css +2692 -0
- package/dist/styles/date-picker.css +1309 -0
- package/dist/styles/date-time-picker.css +1574 -0
- package/dist/styles/divider.css +61 -0
- package/dist/styles/empty-state.css +183 -0
- package/dist/styles/field-control.css +293 -0
- package/dist/styles/field.css +69 -0
- package/dist/styles/file-input.css +1427 -0
- package/dist/styles/file-upload.css +1794 -0
- package/dist/styles/form.css +62 -0
- package/dist/styles/grid.css +330 -0
- package/dist/styles/heading.css +9 -0
- package/dist/styles/icon.css +62 -0
- package/dist/styles/infinite-scroll.css +589 -0
- package/dist/styles/inline.css +17 -0
- package/dist/styles/kbd.css +17 -0
- package/dist/styles/layout-app.css +56 -0
- package/dist/styles/link.css +34 -0
- package/dist/styles/list.css +369 -0
- package/dist/styles/manifest.json +350 -0
- package/dist/styles/mention.css +2041 -0
- package/dist/styles/menu.css +305 -0
- package/dist/styles/modal.css +275 -0
- package/dist/styles/navigation-drawer.css +2006 -0
- package/dist/styles/number-input.css +709 -0
- package/dist/styles/otp-input.css +187 -0
- package/dist/styles/pagination.css +165 -0
- package/dist/styles/popover.css +419 -0
- package/dist/styles/progress.css +196 -0
- package/dist/styles/pull-refresh.css +674 -0
- package/dist/styles/radio.css +457 -0
- package/dist/styles/rating.css +211 -0
- package/dist/styles/row.css +71 -0
- package/dist/styles/select.css +1540 -0
- package/dist/styles/sheet.css +601 -0
- package/dist/styles/skeleton.css +65 -0
- package/dist/styles/skip-link.css +131 -0
- package/dist/styles/slider.css +633 -0
- package/dist/styles/sortable.css +249 -0
- package/dist/styles/spinner.css +115 -0
- package/dist/styles/splitter.css +127 -0
- package/dist/styles/stack.css +8 -0
- package/dist/styles/statistic.css +49 -0
- package/dist/styles/stepper.css +324 -0
- package/dist/styles/surface.css +95 -0
- package/dist/styles/switch.css +857 -0
- package/dist/styles/table.css +260 -0
- package/dist/styles/tabs.css +663 -0
- package/dist/styles/text-field.css +602 -0
- package/dist/styles/text.css +9 -0
- package/dist/styles/textarea.css +602 -0
- package/dist/styles/time-picker.css +1446 -0
- package/dist/styles/timeline.css +376 -0
- package/dist/styles/toast.css +542 -0
- package/dist/styles/tooltip.css +179 -0
- package/dist/styles/tour.css +1130 -0
- package/dist/styles/tree-select.css +1803 -0
- package/dist/styles/treeview.css +365 -0
- package/dist/styles/virtual-scroll.css +33 -0
- package/dist/styles/watermark.css +3 -0
- package/dist/tandd-ui.css +684 -91
- package/dist/tandd-ui.js +7517 -6407
- package/package.json +20 -7
- package/src/components/_index.scss +4 -0
- package/src/components/alert/DTAlert.scss +29 -45
- package/src/components/border-beam/DTBorderBeam.scss +4 -3
- package/src/components/card/DTCard.scss +6 -5
- package/src/components/checkbox/DTChoice.scss +28 -0
- package/src/components/date-picker/DTDatePicker.scss +30 -0
- package/src/components/date-time-picker/DTDateTimePicker.scss +2 -1
- package/src/components/form/DTForm.scss +66 -0
- package/src/components/list/DTList.scss +79 -0
- package/src/components/menu/DTMenu.scss +0 -15
- package/src/components/modal/DTModal.scss +11 -1
- package/src/components/navigation-drawer/DTNavigationDrawer.scss +20 -0
- package/src/components/sheet/DTSheet.scss +12 -1
- package/src/components/sortable/DTSortable.scss +196 -0
- package/src/components/splitter/DTSplitter.scss +133 -0
- package/src/components/switch/DTSwitch.scss +19 -0
- package/src/components/time-picker/DTTimePicker.scss +37 -6
- package/src/components/toast/DTToast.scss +35 -22
- package/src/components/tour/DTTour.scss +2 -1
- package/src/components/virtual-scroll/DTVirtualScroll.scss +35 -0
- package/src/styles/foundation/_motion.scss +19 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tandd-ui",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.8",
|
|
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)",
|
|
@@ -41,7 +41,10 @@
|
|
|
41
41
|
"dev": "sh -c 'npm run watch:lib & npm run watch:styles & wait'",
|
|
42
42
|
"build": "npm run build:lib",
|
|
43
43
|
"test": "npm run build:styles && npm run test:static && npm run test:runtime && npm run build:lib && npm run test:types",
|
|
44
|
-
"
|
|
44
|
+
"lint": "npm run lint:js && npm run lint:css",
|
|
45
|
+
"lint:js": "eslint . --max-warnings=0",
|
|
46
|
+
"lint:css": "stylelint \"src/**/*.scss\" \"docs/.vitepress/theme/**/*.css\"",
|
|
47
|
+
"check": "npm run lint && npm run typecheck && npm run build && npm run test && npm run playground:build && npm run docs:build",
|
|
45
48
|
"typecheck": "vue-tsc --noEmit -p tsconfig.json",
|
|
46
49
|
"test:types": "vue-tsc --noEmit -p tests/types/tsconfig.json",
|
|
47
50
|
"pretest:static": "npm run build:styles",
|
|
@@ -53,6 +56,7 @@
|
|
|
53
56
|
"playground:preview": "vite preview --config vite.playground.config.mjs --host 127.0.0.1 --port 4174 --strictPort",
|
|
54
57
|
"docs:dev": "vitepress dev docs --host 127.0.0.1 --port 5175 --strictPort",
|
|
55
58
|
"docs:build": "vitepress build docs",
|
|
59
|
+
"docs:build:release": "npm run playground:build && TANDD_UI_SOURCE=npm vitepress build docs",
|
|
56
60
|
"docs:test": "npm run build:styles && node tests/docs-vitepress.test.js",
|
|
57
61
|
"docs:preview": "vitepress preview docs --host 127.0.0.1 --port 4175 --strictPort",
|
|
58
62
|
"test:e2e": "npm run test:sites && npm run test:a11y",
|
|
@@ -63,7 +67,7 @@
|
|
|
63
67
|
"test:anatomy": "node tests/e2e/anatomy.e2e.mjs",
|
|
64
68
|
"test:visual": "node tests/e2e/visual-parity.e2e.mjs",
|
|
65
69
|
"build:lib": "vite build && npm run build:styles",
|
|
66
|
-
"build:styles": "sass src/styles/index.scss dist/tandd-ui.css --style=expanded --no-source-map",
|
|
70
|
+
"build:styles": "sass src/styles/index.scss dist/tandd-ui.css --style=expanded --no-source-map && node tools/build-styles.mjs",
|
|
67
71
|
"watch:lib": "vite build --watch",
|
|
68
72
|
"watch:styles": "sass --watch src/styles/index.scss:dist/tandd-ui.css --style=expanded --no-source-map"
|
|
69
73
|
},
|
|
@@ -85,30 +89,39 @@
|
|
|
85
89
|
"default": "./dist/locale/vi.js"
|
|
86
90
|
},
|
|
87
91
|
"./styles.css": "./dist/tandd-ui.css",
|
|
92
|
+
"./styles/*.css": "./dist/styles/*.css",
|
|
88
93
|
"./styles.scss": "./src/styles/index.scss"
|
|
89
94
|
},
|
|
90
95
|
"peerDependencies": {
|
|
91
96
|
"vue": "^3.5.0"
|
|
92
97
|
},
|
|
93
98
|
"devDependencies": {
|
|
99
|
+
"@eslint/js": "9.39.5",
|
|
94
100
|
"@types/node": "^24.10.1",
|
|
95
101
|
"@vitejs/plugin-vue": "^6.0.1",
|
|
96
|
-
"@vue/compiler-dom": "^3.5.
|
|
97
|
-
"@vue/compiler-sfc": "^3.5.
|
|
102
|
+
"@vue/compiler-dom": "^3.5.46",
|
|
103
|
+
"@vue/compiler-sfc": "^3.5.46",
|
|
98
104
|
"@vue/test-utils": "^2.4.6",
|
|
105
|
+
"eslint": "10.15.0",
|
|
106
|
+
"eslint-plugin-vue": "10.12.1",
|
|
99
107
|
"jsdom": "^26.1.0",
|
|
100
108
|
"monaco-editor": "^0.55.1",
|
|
101
109
|
"playwright": "1.57.0",
|
|
102
110
|
"sass": "^1.89.0",
|
|
111
|
+
"stylelint": "18.0.0",
|
|
112
|
+
"stylelint-config-standard-scss": "18.0.0",
|
|
113
|
+
"tandd-ui-release": "npm:tandd-ui@^0.2.7",
|
|
103
114
|
"typescript": "^5.9.3",
|
|
115
|
+
"typescript-eslint": "8.73.0",
|
|
104
116
|
"vite": "^7.0.6",
|
|
105
117
|
"vite-plugin-dts": "^5.0.3",
|
|
106
118
|
"vitepress": "^1.6.4",
|
|
107
119
|
"vitest": "^3.2.4",
|
|
108
|
-
"vue": "^3.5.
|
|
120
|
+
"vue": "^3.5.46",
|
|
121
|
+
"vue-eslint-parser": "10.4.2",
|
|
109
122
|
"vue-tsc": "^3.3.9"
|
|
110
123
|
},
|
|
111
124
|
"dependencies": {
|
|
112
|
-
"tandd-icon": "
|
|
125
|
+
"tandd-icon": "1.1.0"
|
|
113
126
|
}
|
|
114
127
|
}
|
|
@@ -63,6 +63,10 @@
|
|
|
63
63
|
@use "border-beam/DTBorderBeam";
|
|
64
64
|
@use "data-table/DTDataTable";
|
|
65
65
|
@use "tour/DTTour";
|
|
66
|
+
@use "form/DTForm";
|
|
67
|
+
@use "sortable/DTSortable";
|
|
68
|
+
@use "virtual-scroll/DTVirtualScroll";
|
|
69
|
+
@use "splitter/DTSplitter";
|
|
66
70
|
@use "watermark/DTWatermark";
|
|
67
71
|
@use "infinite-scroll/DTInfiniteScroll";
|
|
68
72
|
@use "pull-refresh/DTPullRefresh";
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
// Alert (HTML reference .dt-alert)
|
|
1
|
+
// Alert (HTML reference .dt-alert). Tonal (owner 2026-12-03, same direction as the toast, reference
|
|
2
|
+
// ui/toast.png): a flat tint of the tone with the text in the tone's readable shade, and the icon
|
|
3
|
+
// bare beside the title. It replaces the reference's gradient card and icon tile.
|
|
2
4
|
.dt-alert {
|
|
3
5
|
--dt-alert-tone: var(--dt-color-info);
|
|
4
6
|
--dt-alert-subtle: var(--dt-color-info-subtle);
|
|
@@ -8,8 +10,8 @@
|
|
|
8
10
|
--dt-alert-padding-y: 16px;
|
|
9
11
|
--dt-alert-padding-x: 16px;
|
|
10
12
|
--dt-alert-gap: 13px;
|
|
11
|
-
--dt-alert-tile: 38px;
|
|
12
13
|
--dt-alert-tile-icon: 20px;
|
|
14
|
+
--dt-alert-line: 22px;
|
|
13
15
|
--dt-alert-edge: var(--dt-alert-tone);
|
|
14
16
|
|
|
15
17
|
position: relative;
|
|
@@ -17,11 +19,10 @@
|
|
|
17
19
|
align-items: flex-start;
|
|
18
20
|
gap: var(--dt-alert-gap);
|
|
19
21
|
padding: var(--dt-alert-padding-y) var(--dt-alert-padding-x);
|
|
20
|
-
border: 1px solid color-mix(in srgb, var(--dt-alert-tone)
|
|
22
|
+
border: 1px solid color-mix(in srgb, var(--dt-alert-tone) 18%, transparent);
|
|
21
23
|
border-radius: var(--dt-radius-lg);
|
|
22
|
-
color: var(--dt-
|
|
23
|
-
background:
|
|
24
|
-
box-shadow: var(--dt-shadow-xs);
|
|
24
|
+
color: var(--dt-alert-ink);
|
|
25
|
+
background: var(--dt-alert-subtle);
|
|
25
26
|
}
|
|
26
27
|
|
|
27
28
|
@each $tone in (success, warning, danger) {
|
|
@@ -37,28 +38,25 @@
|
|
|
37
38
|
display: grid;
|
|
38
39
|
flex: none;
|
|
39
40
|
place-items: center;
|
|
40
|
-
width: var(--dt-alert-tile);
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
color:
|
|
44
|
-
background: var(--dt-alert-subtle);
|
|
41
|
+
width: var(--dt-alert-tile-icon);
|
|
42
|
+
// As tall as the title's first line, so the bare icon sits centred on it.
|
|
43
|
+
height: var(--dt-alert-line);
|
|
44
|
+
color: inherit;
|
|
45
45
|
font-size: var(--dt-alert-tile-icon);
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
.dt-alert__content {
|
|
49
49
|
flex: 1;
|
|
50
50
|
min-width: 0;
|
|
51
|
-
padding-top: 1px;
|
|
52
51
|
}
|
|
53
52
|
|
|
54
53
|
.dt-alert__title {
|
|
55
|
-
margin-bottom:
|
|
56
|
-
font-weight: var(--dt-font-weight-
|
|
57
|
-
letter-spacing: -0.01em;
|
|
54
|
+
margin-bottom: 2px;
|
|
55
|
+
font-weight: var(--dt-font-weight-semibold);
|
|
58
56
|
}
|
|
59
57
|
|
|
60
58
|
.dt-alert__text {
|
|
61
|
-
color:
|
|
59
|
+
color: inherit;
|
|
62
60
|
font-size: 13px;
|
|
63
61
|
line-height: 1.55;
|
|
64
62
|
|
|
@@ -72,17 +70,14 @@
|
|
|
72
70
|
flex-wrap: wrap;
|
|
73
71
|
gap: var(--dt-space-2);
|
|
74
72
|
margin-top: 9px;
|
|
75
|
-
color:
|
|
76
|
-
font-size:
|
|
77
|
-
font-weight: var(--dt-font-weight-
|
|
73
|
+
color: inherit;
|
|
74
|
+
font-size: 13px;
|
|
75
|
+
font-weight: var(--dt-font-weight-semibold);
|
|
78
76
|
|
|
79
77
|
a {
|
|
80
78
|
color: inherit;
|
|
81
|
-
text-decoration: none;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
a:hover {
|
|
85
79
|
text-decoration: underline;
|
|
80
|
+
text-underline-offset: 2px;
|
|
86
81
|
}
|
|
87
82
|
}
|
|
88
83
|
|
|
@@ -96,14 +91,13 @@
|
|
|
96
91
|
padding: 0;
|
|
97
92
|
border: 0;
|
|
98
93
|
border-radius: var(--dt-radius-md);
|
|
99
|
-
color:
|
|
94
|
+
color: inherit;
|
|
100
95
|
background: transparent;
|
|
101
96
|
cursor: pointer;
|
|
102
97
|
}
|
|
103
98
|
|
|
104
99
|
.dt-alert__close:hover {
|
|
105
|
-
|
|
106
|
-
background: var(--dt-color-overlay);
|
|
100
|
+
background: color-mix(in srgb, var(--dt-alert-tone) 12%, transparent);
|
|
107
101
|
}
|
|
108
102
|
|
|
109
103
|
.dt-alert__close:focus-visible {
|
|
@@ -114,8 +108,13 @@
|
|
|
114
108
|
// Variants. Tonal (no class) is the reference look.
|
|
115
109
|
.dt-alert--outlined {
|
|
116
110
|
border-color: var(--dt-alert-tone);
|
|
111
|
+
color: var(--dt-color-text);
|
|
117
112
|
background: var(--dt-color-surface);
|
|
118
|
-
|
|
113
|
+
|
|
114
|
+
.dt-alert__icon { color: var(--dt-alert-tone); }
|
|
115
|
+
.dt-alert__text { color: var(--dt-color-text-muted); }
|
|
116
|
+
.dt-alert__action { color: var(--dt-alert-ink); }
|
|
117
|
+
.dt-alert__close { color: var(--dt-color-text-muted); }
|
|
119
118
|
}
|
|
120
119
|
|
|
121
120
|
// Solid: the tone fill with its -on color. Every text part uses -on at full strength (the muted
|
|
@@ -130,11 +129,7 @@
|
|
|
130
129
|
color: var(--dt-alert-on);
|
|
131
130
|
background: var(--dt-alert-tone);
|
|
132
131
|
|
|
133
|
-
.dt-alert__icon
|
|
134
|
-
color: var(--dt-alert-on);
|
|
135
|
-
background: color-mix(in srgb, var(--dt-alert-on) 18%, transparent);
|
|
136
|
-
}
|
|
137
|
-
|
|
132
|
+
.dt-alert__icon,
|
|
138
133
|
.dt-alert__text,
|
|
139
134
|
.dt-alert__action,
|
|
140
135
|
.dt-alert__action .dt-link,
|
|
@@ -162,7 +157,6 @@
|
|
|
162
157
|
--dt-alert-padding-y: 12px;
|
|
163
158
|
--dt-alert-padding-x: 14px;
|
|
164
159
|
--dt-alert-gap: 11px;
|
|
165
|
-
--dt-alert-tile: 34px;
|
|
166
160
|
--dt-alert-tile-icon: 18px;
|
|
167
161
|
}
|
|
168
162
|
|
|
@@ -170,14 +164,8 @@
|
|
|
170
164
|
--dt-alert-padding-y: 8px;
|
|
171
165
|
--dt-alert-padding-x: 12px;
|
|
172
166
|
--dt-alert-gap: 9px;
|
|
173
|
-
--dt-alert-tile: 28px;
|
|
174
167
|
--dt-alert-tile-icon: 16px;
|
|
175
168
|
|
|
176
|
-
.dt-alert__content {
|
|
177
|
-
padding-top: 0;
|
|
178
|
-
align-self: center;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
169
|
.dt-alert__close {
|
|
182
170
|
width: 28px;
|
|
183
171
|
height: 28px;
|
|
@@ -187,16 +175,12 @@
|
|
|
187
175
|
|
|
188
176
|
// Prominent: a larger tile, title, and padding; it composes with density.
|
|
189
177
|
.dt-alert--prominent {
|
|
190
|
-
--dt-alert-tile:
|
|
191
|
-
--dt-alert-
|
|
178
|
+
--dt-alert-tile-icon: 24px;
|
|
179
|
+
--dt-alert-line: 27px;
|
|
192
180
|
|
|
193
181
|
padding: calc(var(--dt-alert-padding-y) + 6px) calc(var(--dt-alert-padding-x) + 6px);
|
|
194
182
|
gap: calc(var(--dt-alert-gap) + 3px);
|
|
195
183
|
|
|
196
|
-
.dt-alert__content {
|
|
197
|
-
padding-top: 2px;
|
|
198
|
-
}
|
|
199
|
-
|
|
200
184
|
.dt-alert__title {
|
|
201
185
|
font-size: var(--dt-font-size-lg);
|
|
202
186
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
// Border beam (HTML reference .dt-border-beam): a
|
|
2
|
-
//
|
|
3
|
-
//
|
|
1
|
+
// Border beam (HTML reference .dt-border-beam): a decorative effect (owner 2026-12-03), not a
|
|
2
|
+
// status indicator. A comet of light runs along the host's edge at a constant speed.
|
|
3
|
+
// The component measures the host and builds the layered <rect> dashes; the motion itself is a
|
|
4
|
+
// CSS animation on stroke-dashoffset (units = % of the perimeter).
|
|
4
5
|
.dt-border-beam {
|
|
5
6
|
--dt-beam-color: var(--dt-color-primary);
|
|
6
7
|
--dt-beam-width: 2px;
|
|
@@ -19,7 +19,9 @@
|
|
|
19
19
|
width: 100%;
|
|
20
20
|
height: 120px;
|
|
21
21
|
object-fit: cover;
|
|
22
|
-
|
|
22
|
+
// A plain muted fill while an image loads or when the slot holds no image (owner 2026-12-03:
|
|
23
|
+
// was a decorative primary-to-grey gradient).
|
|
24
|
+
background: var(--dt-color-surface-muted);
|
|
23
25
|
}
|
|
24
26
|
|
|
25
27
|
.dt-card__body {
|
|
@@ -57,13 +59,13 @@
|
|
|
57
59
|
// Interactive: the title link is the single focusable target; its ::after covers the card.
|
|
58
60
|
.dt-card--interactive {
|
|
59
61
|
position: relative;
|
|
60
|
-
transition: border-color var(--dt-duration-fast),
|
|
62
|
+
transition: border-color var(--dt-duration-fast), background-color var(--dt-duration-fast);
|
|
61
63
|
}
|
|
62
64
|
|
|
65
|
+
// Hover: a stronger border and a faint fill. The card stays in place (owner 2026-12-03: no lift).
|
|
63
66
|
.dt-card--interactive:not(.dt-card--disabled):hover {
|
|
64
67
|
border-color: var(--dt-color-border-strong);
|
|
65
|
-
|
|
66
|
-
transform: translateY(-2px);
|
|
68
|
+
background: var(--dt-color-surface-hover);
|
|
67
69
|
}
|
|
68
70
|
|
|
69
71
|
.dt-card__link {
|
|
@@ -97,7 +99,6 @@
|
|
|
97
99
|
.dt-card--interactive,
|
|
98
100
|
.dt-card--interactive:not(.dt-card--disabled):hover {
|
|
99
101
|
transition: none;
|
|
100
|
-
transform: none;
|
|
101
102
|
}
|
|
102
103
|
}
|
|
103
104
|
|
|
@@ -49,6 +49,22 @@
|
|
|
49
49
|
z-index: 1;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
+
// Validation message (owner 2026-12-02 audit): a row of its own under the label text, lined up with
|
|
53
|
+
// it (16 px visual + 10 px gap). The label wraps only when there is a message.
|
|
54
|
+
.dt-choice:has(> .dt-choice__message) {
|
|
55
|
+
flex-wrap: wrap;
|
|
56
|
+
row-gap: 0;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.dt-choice__message {
|
|
60
|
+
flex: 1 0 100%;
|
|
61
|
+
padding-inline-start: 26px;
|
|
62
|
+
color: var(--dt-color-danger);
|
|
63
|
+
font-size: 12px;
|
|
64
|
+
line-height: 1.4;
|
|
65
|
+
cursor: default;
|
|
66
|
+
}
|
|
67
|
+
|
|
52
68
|
.dt-choice:not(.is-disabled):hover .dt-choice__visual,
|
|
53
69
|
.dt-choice__control:focus-visible + .dt-choice__visual {
|
|
54
70
|
border-color: var(--dt-choice-accent);
|
|
@@ -202,6 +218,18 @@
|
|
|
202
218
|
gap: 4px 24px;
|
|
203
219
|
}
|
|
204
220
|
|
|
221
|
+
// Validation message (owner 2026-12-02 audit), under the options. The group itself only takes
|
|
222
|
+
// focus from the form's error summary, which then moves on to a radio.
|
|
223
|
+
.dt-radio-group__message {
|
|
224
|
+
color: var(--dt-color-danger);
|
|
225
|
+
font-size: 12px;
|
|
226
|
+
line-height: 1.4;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.dt-radio-group:focus {
|
|
230
|
+
outline: none;
|
|
231
|
+
}
|
|
232
|
+
|
|
205
233
|
// A custom indeterminate icon inside the drawn box (not icon mode): same size and colour as the minus.
|
|
206
234
|
.dt-checkbox__minusmark--custom {
|
|
207
235
|
--dt-icon-size: 12px;
|
|
@@ -83,6 +83,32 @@
|
|
|
83
83
|
text-transform: uppercase;
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
+
// Months (owner 2026-12-01: date range picker): one or more month blocks side by side, each with
|
|
87
|
+
// its header and grid. Too narrow for them all, they wrap one under the other.
|
|
88
|
+
.dt-date-picker__months {
|
|
89
|
+
display: flex;
|
|
90
|
+
flex-wrap: wrap;
|
|
91
|
+
gap: 12px 24px;
|
|
92
|
+
max-width: 100%;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.dt-date-picker__month {
|
|
96
|
+
display: flex;
|
|
97
|
+
flex: 0 0 auto;
|
|
98
|
+
flex-direction: column;
|
|
99
|
+
gap: 8px;
|
|
100
|
+
max-width: 100%;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
// The second and later months: their name, aligned with the first month's view toggle.
|
|
104
|
+
.dt-date-picker__month-label {
|
|
105
|
+
display: inline-flex;
|
|
106
|
+
align-items: center;
|
|
107
|
+
min-height: 32px;
|
|
108
|
+
padding: 0 8px;
|
|
109
|
+
font-weight: var(--dt-font-weight-semibold);
|
|
110
|
+
}
|
|
111
|
+
|
|
86
112
|
.dt-date-picker__header {
|
|
87
113
|
display: flex;
|
|
88
114
|
align-items: center;
|
|
@@ -430,6 +456,10 @@
|
|
|
430
456
|
|
|
431
457
|
.dt-date-input__dialog {
|
|
432
458
|
z-index: var(--dt-z-index-dropdown);
|
|
459
|
+
// Never wider than the viewport less a 16 px gutter: a picker with shortcuts or two months then
|
|
460
|
+
// wraps (shortcuts above, months stacked) instead of running off a phone screen. The shared
|
|
461
|
+
// popover clamps a panel to the viewport edge; the input moves it in by the gutter (DTDateInput).
|
|
462
|
+
max-width: calc(100vw - 32px);
|
|
433
463
|
animation: dt-menu-in var(--dt-duration-base) var(--dt-ease-standard);
|
|
434
464
|
}
|
|
435
465
|
|
|
@@ -88,10 +88,11 @@
|
|
|
88
88
|
border-top: 1px solid var(--dt-color-border);
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
+
// The picker keeps its own width, centred, so the glass band spans its columns, not the panel.
|
|
91
92
|
.dt-date-time-picker .dt-time-picker {
|
|
92
93
|
--dt-time-rows: 5;
|
|
93
94
|
|
|
94
|
-
|
|
95
|
+
align-self: center;
|
|
95
96
|
}
|
|
96
97
|
}
|
|
97
98
|
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
// Form (owner 2026-12-02 audit). The form adds no layout of its own: fields keep the page's stack
|
|
2
|
+
// or grid. The fieldset only carries `disabled` to every native control inside.
|
|
3
|
+
.dt-form__fields {
|
|
4
|
+
min-width: 0;
|
|
5
|
+
margin: 0;
|
|
6
|
+
padding: 0;
|
|
7
|
+
border: 0;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
// Error summary: a bordered panel in the danger tone, focused after a failed submit.
|
|
11
|
+
.dt-form__summary {
|
|
12
|
+
display: flex;
|
|
13
|
+
flex-direction: column;
|
|
14
|
+
gap: 6px;
|
|
15
|
+
margin-block-end: 16px;
|
|
16
|
+
padding: 12px 16px;
|
|
17
|
+
border: 1px solid var(--dt-color-danger);
|
|
18
|
+
border-radius: var(--dt-radius-md);
|
|
19
|
+
color: var(--dt-color-text);
|
|
20
|
+
background: var(--dt-color-danger-subtle);
|
|
21
|
+
font-size: var(--dt-font-size-sm);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.dt-form__summary:focus-visible {
|
|
25
|
+
outline: var(--dt-focus-ring-width) solid var(--dt-focus-ring-color);
|
|
26
|
+
outline-offset: 2px;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.dt-form__summary-title {
|
|
30
|
+
margin: 0;
|
|
31
|
+
font-weight: var(--dt-font-weight-semibold);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.dt-form__summary-list {
|
|
35
|
+
display: flex;
|
|
36
|
+
flex-direction: column;
|
|
37
|
+
gap: 4px;
|
|
38
|
+
margin: 0;
|
|
39
|
+
padding-inline-start: 18px;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.dt-form__summary-link {
|
|
43
|
+
color: var(--dt-color-danger-on-subtle, var(--dt-color-danger));
|
|
44
|
+
text-decoration: underline;
|
|
45
|
+
text-underline-offset: 2px;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.dt-form__summary-link:focus-visible {
|
|
49
|
+
border-radius: 2px;
|
|
50
|
+
outline: var(--dt-focus-ring-width) solid var(--dt-focus-ring-color);
|
|
51
|
+
outline-offset: 2px;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.dt-form__summary-label {
|
|
55
|
+
font-weight: var(--dt-font-weight-semibold);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
@media (forced-colors: active) {
|
|
59
|
+
.dt-form__summary {
|
|
60
|
+
border-color: CanvasText;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.dt-form__summary-link {
|
|
64
|
+
color: LinkText;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
@@ -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;
|
|
@@ -159,25 +159,10 @@
|
|
|
159
159
|
color: var(--dt-color-primary);
|
|
160
160
|
}
|
|
161
161
|
|
|
162
|
-
// Chevron flips in 3D when its trigger opens.
|
|
163
|
-
.dt-chevron {
|
|
164
|
-
flex: none;
|
|
165
|
-
transition: transform var(--dt-duration-slow) var(--dt-ease-standard);
|
|
166
|
-
transform: perspective(100px) rotateX(0deg);
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
[aria-expanded="true"] .dt-chevron {
|
|
170
|
-
transform: perspective(100px) rotateX(180deg);
|
|
171
|
-
}
|
|
172
|
-
|
|
173
162
|
@media (prefers-reduced-motion: reduce) {
|
|
174
163
|
.dt-menu__panel {
|
|
175
164
|
animation: none;
|
|
176
165
|
}
|
|
177
|
-
|
|
178
|
-
.dt-chevron {
|
|
179
|
-
transition: none;
|
|
180
|
-
}
|
|
181
166
|
}
|
|
182
167
|
|
|
183
168
|
// Context-menu target area (DTMenu `context`): a block, so the whole region takes right-clicks.
|
|
@@ -8,12 +8,21 @@
|
|
|
8
8
|
|
|
9
9
|
.dt-modal-backdrop {
|
|
10
10
|
position: fixed;
|
|
11
|
-
|
|
11
|
+
// Opening order among open modals, sheets, and tours (modalStack sets --dt-modal-layer).
|
|
12
|
+
z-index: calc(var(--dt-z-index-modal) + var(--dt-modal-layer, 0));
|
|
12
13
|
inset: 0;
|
|
13
14
|
display: grid;
|
|
14
15
|
place-items: center;
|
|
15
16
|
padding: var(--dt-space-4);
|
|
16
17
|
background: var(--dt-color-backdrop);
|
|
18
|
+
// Crossfades with the newest layer's tint when one opens or closes above it (see below).
|
|
19
|
+
transition: background-color var(--dt-duration-base) var(--dt-ease-standard);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// A dialog under a newer modal, sheet, or tour: no tint of its own, so stacked dialogs do not darken
|
|
23
|
+
// the page step by step; the newest layer's tint covers it (modalStack sets the attribute).
|
|
24
|
+
.dt-modal-backdrop[data-dt-modal-covered] {
|
|
25
|
+
background-color: transparent;
|
|
17
26
|
}
|
|
18
27
|
|
|
19
28
|
.dt-modal {
|
|
@@ -169,6 +178,7 @@
|
|
|
169
178
|
}
|
|
170
179
|
|
|
171
180
|
@media (prefers-reduced-motion: reduce) {
|
|
181
|
+
.dt-modal-backdrop,
|
|
172
182
|
.dt-modal-enter-active,
|
|
173
183
|
.dt-modal-leave-active,
|
|
174
184
|
.dt-modal-enter-active .dt-modal,
|
|
@@ -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;
|