tandd-ui 0.2.1 → 0.2.3
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 +12 -0
- package/README.md +73 -59
- package/dist/tandd-ui.css +2 -2
- package/package.json +1 -1
- package/src/components/data-table/DTDataTable.scss +2 -1
- package/src/components/table/DTTable.scss +6 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.2.3 (2026-11-14)
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- **DTTable and DTDataTable scrolling:** a table with a scroll height (`max-height`, `height`, `virtual`, `body-scroll`) no longer traps the page. Once the table reaches its top or bottom, the wheel or a touch swipe scrolls the page, as any scroll box does. Only sideways scrolling stays inside the table, so a swipe on a wide table does not trigger the browser's back gesture.
|
|
8
|
+
|
|
9
|
+
## 0.2.2 (2026-11-12)
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
|
|
13
|
+
- **README:** rewritten for people installing the package (install, set up, configure, components, accessibility). Repository development notes moved to `CONTRIBUTING.md`, which is not published.
|
|
14
|
+
|
|
3
15
|
## 0.2.1 (2026-11-11)
|
|
4
16
|
|
|
5
17
|
### Added
|
package/README.md
CHANGED
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
# TanDD UI
|
|
2
2
|
|
|
3
|
-
Vue 3 component library
|
|
3
|
+
Vue 3 component library: more than 60 accessible components with light and dark themes, localization (English and Vietnamese packs), and right-to-left support.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
4
6
|
|
|
5
7
|
```sh
|
|
6
8
|
npm install tandd-ui
|
|
7
9
|
```
|
|
8
10
|
|
|
9
|
-
Requires Vue 3.5 or later.
|
|
11
|
+
Requires Vue 3.5 or later. Icons come from [`tandd-icon`](https://www.npmjs.com/package/tandd-icon), installed with it.
|
|
12
|
+
|
|
13
|
+
## Set up
|
|
14
|
+
|
|
15
|
+
Register the plugin once and import the stylesheet:
|
|
10
16
|
|
|
11
17
|
```ts
|
|
12
18
|
import { createApp } from "vue";
|
|
@@ -17,81 +23,89 @@ import App from "./App.vue";
|
|
|
17
23
|
createApp(App).use(createTanDDUI()).mount("#app");
|
|
18
24
|
```
|
|
19
25
|
|
|
20
|
-
|
|
21
|
-
|---|---|
|
|
22
|
-
| Layout | DTContainer, DTRow, DTCol, DTGrid, DTGridItem, DTStack, DTInline, DTAppBar, DTLayout, DTMain, DTSurface, DTDivider |
|
|
23
|
-
| Actions | DTButton, DTButtonGroup, DTMenu (+ DTMenuItem, DTMenuLabel, DTMenuSeparator), DTChip, DTChipGroup |
|
|
24
|
-
| Forms | DTInput, DTNumberInput, DTOtpInput, DTTextarea, DTSelect, DTTreeSelect, DTAutocomplete, DTCombobox, DTMention, DTCheckbox, DTRadio, DTRadioGroup, DTSwitch, DTSlider, DTFileInput, DTFileUpload, DTDatePicker, DTDateInput, DTTimePicker, DTTimeInput, DTDateTimePicker, DTDateTimeInput, DTColorInput, DTColorPicker, DTRating |
|
|
25
|
-
| Display | DTIcon, DTBadge, DTAvatar, DTAvatarGroup, DTCard (+ parts), DTList (+ DTListItem, DTListSubheader), DTTable, DTDataTable, DTAccordion, DTAccordionItem, DTCarousel (+ DTCarouselItem), DTTimeline (+ DTTimelineItem), DTBorderBeam, DTEmptyState, DTStatistic (+ DTCountdown), DTInfiniteScroll, DTPullRefresh, DTWatermark |
|
|
26
|
-
| Feedback | DTAlert, DTToastRegion + `useToast()`, DTModal, DTSheet, DTPopover, DTTooltip, DTTour (+ DTTourStep), DTProgress, DTSpinner, DTSkeleton |
|
|
27
|
-
| Navigation | DTNavigationDrawer, DTTabs, DTTab, DTStepper (+ DTStep), DTTreeview, DTBreadcrumb, DTPagination, DTAnchor (+ DTAnchorLink), DTSkipLink |
|
|
28
|
-
| Foundations | DTText, DTHeading, DTLink, DTCode, DTKbd (one Typography page), DTField |
|
|
29
|
-
|
|
30
|
-
See [CHANGELOG.md](CHANGELOG.md) for breaking changes from the earlier components.
|
|
26
|
+
Then import the components you use:
|
|
31
27
|
|
|
32
|
-
|
|
28
|
+
```vue
|
|
29
|
+
<script setup lang="ts">
|
|
30
|
+
import { ref } from "vue";
|
|
31
|
+
import { DTButton, DTInput, DTSelect } from "tandd-ui";
|
|
33
32
|
|
|
34
|
-
|
|
33
|
+
const name = ref("");
|
|
34
|
+
const plan = ref("pro");
|
|
35
|
+
</script>
|
|
35
36
|
|
|
36
|
-
|
|
37
|
+
<template>
|
|
38
|
+
<DTInput v-model="name" label="Project name" />
|
|
39
|
+
<DTSelect v-model="plan" label="Plan" :items="['free', 'pro', 'team']" />
|
|
40
|
+
<DTButton variant="primary">Create</DTButton>
|
|
41
|
+
</template>
|
|
42
|
+
```
|
|
37
43
|
|
|
38
|
-
|
|
44
|
+
Toasts from `useToast()` need one `<DTToastRegion />` in your app, usually in the root component.
|
|
39
45
|
|
|
40
|
-
|
|
41
|
-
- `docs/standards/COMPONENT-ENGINEERING-STANDARDS.md`
|
|
42
|
-
- `docs/migration/COMPONENT-REBUILD-CONTRACT.md`
|
|
43
|
-
- `docs/migration/COMPONENT-REBUILD-EXECUTION-PLAN.md`
|
|
44
|
-
- `docs/ai/AI-PIPELINE-OPERATING-RULES.md`
|
|
45
|
-
- `CLAUDE.md`
|
|
46
|
+
## Configure
|
|
46
47
|
|
|
47
|
-
|
|
48
|
+
Everything app-wide is set in `createTanDDUI()`:
|
|
48
49
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
50
|
+
```ts
|
|
51
|
+
import { vi } from "tandd-ui/locale/vi";
|
|
52
|
+
|
|
53
|
+
createTanDDUI({
|
|
54
|
+
theme: {
|
|
55
|
+
defaultTheme: "light",
|
|
56
|
+
themes: {
|
|
57
|
+
light: { dark: false, colors: { /* primary, surface, foreground, … */ } },
|
|
58
|
+
dark: { extends: "light", dark: true, colors: { /* … */ } }
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
global: {
|
|
62
|
+
locale: "vi-VN", // dates and numbers
|
|
63
|
+
messages: vi, // built-in text in Vietnamese
|
|
64
|
+
ripple: true,
|
|
65
|
+
defaults: {
|
|
66
|
+
DTButton: { size: "sm" },
|
|
67
|
+
DTInput: { variant: "outlined", size: "sm" } // inputs, selects, date and time fields
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
```
|
|
54
72
|
|
|
55
|
-
|
|
73
|
+
- **Theme:** switch at runtime with `useTheme().setTheme("dark")`. Without a `theme` option you get one light theme.
|
|
74
|
+
- **Language:** switch at runtime with `useLocale().setLocale("en-US", en)`. A component's own text prop always wins.
|
|
75
|
+
- **Defaults:** a prop set on one component always wins over `defaults`.
|
|
56
76
|
|
|
57
|
-
|
|
58
|
-
2. Merge the content of `CLAUDE.md` with any existing project-level Claude instructions instead of blindly overwriting existing instructions.
|
|
59
|
-
3. Preserve existing unrelated working-tree changes. Do not reset, restore, clean, commit, or push as part of installing these documents.
|
|
60
|
-
4. The 86 staged deletions previously identified as intentional cleanup remain intentional; do not restore them merely to make the worktree clean.
|
|
61
|
-
5. Do not start component implementation or a pipeline run until the owner approves the baseline contract and execution plan.
|
|
62
|
-
6. Before any destructive cleanup, inspect the actual repository and the HTML reference repository. Retain useful infrastructure and remove/rebuild old public components, old demo code, and old Playground content according to the approved contract.
|
|
77
|
+
### Sass
|
|
63
78
|
|
|
64
|
-
|
|
79
|
+
To build from the Sass source instead of `styles.css`, use Sass's package importer (Dart Sass 1.71+):
|
|
65
80
|
|
|
66
|
-
|
|
81
|
+
```scss
|
|
82
|
+
@use "pkg:tandd-ui/styles.scss";
|
|
83
|
+
```
|
|
67
84
|
|
|
68
|
-
|
|
69
|
-
npm install
|
|
70
|
-
npm run build # library + stylesheet into dist/
|
|
85
|
+
## Components
|
|
71
86
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
87
|
+
| Group | Components |
|
|
88
|
+
|---|---|
|
|
89
|
+
| Layout | DTContainer, DTRow, DTCol, DTGrid, DTGridItem, DTStack, DTInline, DTAppBar, DTLayout, DTMain, DTSurface, DTDivider |
|
|
90
|
+
| Actions | DTButton, DTButtonGroup, DTMenu (+ DTMenuItem, DTMenuLabel, DTMenuSeparator), DTChip, DTChipGroup |
|
|
91
|
+
| Forms | DTInput, DTNumberInput, DTOtpInput, DTTextarea, DTSelect, DTTreeSelect, DTAutocomplete, DTCombobox, DTMention, DTCheckbox, DTRadio, DTRadioGroup, DTSwitch, DTSlider, DTFileInput, DTFileUpload, DTDatePicker, DTDateInput, DTTimePicker, DTTimeInput, DTDateTimePicker, DTDateTimeInput, DTColorInput, DTColorPicker, DTRating |
|
|
92
|
+
| Display | DTIcon, DTBadge, DTAvatar, DTAvatarGroup, DTCard (+ parts), DTList (+ DTListItem, DTListSubheader), DTTable, DTDataTable, DTAccordion, DTAccordionItem, DTCarousel (+ DTCarouselItem), DTTimeline (+ DTTimelineItem), DTBorderBeam, DTEmptyState, DTStatistic (+ DTCountdown), DTInfiniteScroll, DTPullRefresh, DTWatermark |
|
|
93
|
+
| Feedback | DTAlert, DTToastRegion + `useToast()`, DTModal, DTSheet, DTPopover, DTTooltip, DTTour (+ DTTourStep), DTProgress, DTSpinner, DTSkeleton |
|
|
94
|
+
| Navigation | DTNavigationDrawer, DTTabs, DTTab, DTStepper (+ DTStep), DTTreeview, DTBreadcrumb, DTPagination, DTAnchor (+ DTAnchorLink), DTSkipLink |
|
|
95
|
+
| Typography | DTText, DTHeading, DTLink, DTCode, DTKbd, DTField |
|
|
76
96
|
|
|
77
|
-
|
|
97
|
+
## Accessibility
|
|
78
98
|
|
|
79
|
-
|
|
80
|
-
npm run docs:build && npm run docs:preview # dist-docs/ → :4175
|
|
81
|
-
npm run playground:build && npm run playground:preview # dist-playground/ → :4174
|
|
82
|
-
```
|
|
99
|
+
Components follow the WAI-ARIA Authoring Practices: keyboard support, focus management, screen-reader names, reduced motion, forced colors (Windows High Contrast), right-to-left layouts, and 24 × 24 px touch targets. Every built-in string is a prop, so it can be translated.
|
|
83
100
|
|
|
84
|
-
|
|
101
|
+
## TypeScript
|
|
85
102
|
|
|
86
|
-
|
|
103
|
+
Types ship with the package. Props, events, slots, theme options, and message packs (`TanDDMessages`) are typed.
|
|
87
104
|
|
|
88
|
-
|
|
105
|
+
## Changelog
|
|
89
106
|
|
|
90
|
-
|
|
91
|
-
|---|---|---|
|
|
92
|
-
| `.env.development` | `http://127.0.0.1:5174/` | `docs:dev`; run `playground:dev` beside it |
|
|
93
|
-
| `.env.production` | `/playground/` | `docs:build`, which copies `dist-playground/` into `dist-docs/playground/` (build the Playground first; `check` does) |
|
|
107
|
+
See [CHANGELOG.md](CHANGELOG.md).
|
|
94
108
|
|
|
95
|
-
|
|
109
|
+
## License
|
|
96
110
|
|
|
97
|
-
|
|
111
|
+
[MIT](LICENSE)
|
package/dist/tandd-ui.css
CHANGED
|
@@ -10361,7 +10361,7 @@ button.dt-stepper__header[aria-disabled=true] {
|
|
|
10361
10361
|
width: 100%;
|
|
10362
10362
|
max-height: var(--dt-table-max-height, none);
|
|
10363
10363
|
overflow: auto;
|
|
10364
|
-
overscroll-behavior: contain;
|
|
10364
|
+
overscroll-behavior-x: contain;
|
|
10365
10365
|
border: 1px solid var(--dt-color-border);
|
|
10366
10366
|
border-radius: var(--dt-radius-md);
|
|
10367
10367
|
background: var(--dt-color-surface);
|
|
@@ -10690,7 +10690,7 @@ span.dt-border-beam {
|
|
|
10690
10690
|
|
|
10691
10691
|
.dt-data-table__wrap {
|
|
10692
10692
|
max-width: 100%;
|
|
10693
|
-
overscroll-behavior: contain;
|
|
10693
|
+
overscroll-behavior-x: contain;
|
|
10694
10694
|
}
|
|
10695
10695
|
|
|
10696
10696
|
.dt-data-table__caption,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tandd-ui",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
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)",
|
|
@@ -19,7 +19,8 @@
|
|
|
19
19
|
// The scroll box: wide tables scroll inside it, never the page.
|
|
20
20
|
.dt-data-table__wrap {
|
|
21
21
|
max-width: 100%;
|
|
22
|
-
|
|
22
|
+
// As DTTable: vertical scroll chains to the page at the table's edges; only sideways is contained.
|
|
23
|
+
overscroll-behavior-x: contain;
|
|
23
24
|
}
|
|
24
25
|
|
|
25
26
|
.dt-data-table__caption,
|
|
@@ -4,7 +4,12 @@
|
|
|
4
4
|
width: 100%;
|
|
5
5
|
max-height: var(--dt-table-max-height, none);
|
|
6
6
|
overflow: auto;
|
|
7
|
-
|
|
7
|
+
// Vertical scroll chains to the page once the table reaches its top or bottom, as any scroll box
|
|
8
|
+
// does: a table taller than the screen must never trap the wheel or a touch swipe (user report
|
|
9
|
+
// 2026-11-14, "khi dài thì chặn scroll"). `contain` was set here and stopped the page. Only the
|
|
10
|
+
// horizontal axis is contained, so a sideways swipe on a wide table does not trigger the browser's
|
|
11
|
+
// back/forward gesture.
|
|
12
|
+
overscroll-behavior-x: contain;
|
|
8
13
|
border: 1px solid var(--dt-color-border);
|
|
9
14
|
border-radius: var(--dt-radius-md);
|
|
10
15
|
background: var(--dt-color-surface);
|