tandd-ui 0.2.6 → 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tandd-ui",
3
- "version": "0.2.6",
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": "0.2.0"
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;