tandd-ui 0.0.0-stage → 0.2.0

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.
Files changed (269) hide show
  1. package/CHANGELOG.md +96 -0
  2. package/LICENSE +21 -0
  3. package/README.md +96 -2
  4. package/dist/components/_shared/direction.d.ts +6 -0
  5. package/dist/components/_shared/escapeLayers.d.ts +21 -0
  6. package/dist/components/_shared/formatLabel.d.ts +5 -0
  7. package/dist/components/_shared/useDismissiblePopup.d.ts +4 -0
  8. package/dist/components/_shared/useFieldValidation.d.ts +34 -0
  9. package/dist/components/_shared/useFocusTrap.d.ts +16 -0
  10. package/dist/components/_shared/useMessages.d.ts +18 -0
  11. package/dist/components/_shared/usePopover.d.ts +122 -0
  12. package/dist/components/_shared/useRipple.d.ts +37 -0
  13. package/dist/components/_shared/useRovingFocus.d.ts +25 -0
  14. package/dist/components/accordion/DTAccordion.vue.d.ts +42 -0
  15. package/dist/components/accordion/DTAccordionItem.vue.d.ts +34 -0
  16. package/dist/components/accordion/accordionContext.d.ts +13 -0
  17. package/dist/components/alert/DTAlert.vue.d.ts +57 -0
  18. package/dist/components/anchor/DTAnchor.vue.d.ts +48 -0
  19. package/dist/components/anchor/DTAnchorLink.vue.d.ts +21 -0
  20. package/dist/components/anchor/anchorContext.d.ts +10 -0
  21. package/dist/components/app-bar/DTAppBar.vue.d.ts +56 -0
  22. package/dist/components/autocomplete/DTAutocomplete.vue.d.ts +131 -0
  23. package/dist/components/avatar/DTAvatar.vue.d.ts +37 -0
  24. package/dist/components/avatar/DTAvatarGroup.vue.d.ts +18 -0
  25. package/dist/components/badge/DTBadge.vue.d.ts +47 -0
  26. package/dist/components/badge/index.d.ts +2 -0
  27. package/dist/components/border-beam/DTBorderBeam.vue.d.ts +47 -0
  28. package/dist/components/breadcrumb/DTBreadcrumb.vue.d.ts +46 -0
  29. package/dist/components/button/DTButton.vue.d.ts +60 -0
  30. package/dist/components/button-group/DTButtonGroup.vue.d.ts +56 -0
  31. package/dist/components/button-group/buttonGroupContext.d.ts +16 -0
  32. package/dist/components/card/DTCard.vue.d.ts +38 -0
  33. package/dist/components/card/DTCardBody.vue.d.ts +13 -0
  34. package/dist/components/card/DTCardFooter.vue.d.ts +13 -0
  35. package/dist/components/card/DTCardHeader.vue.d.ts +17 -0
  36. package/dist/components/card/DTCardMedia.vue.d.ts +24 -0
  37. package/dist/components/card/DTCardSubtitle.vue.d.ts +13 -0
  38. package/dist/components/card/DTCardText.vue.d.ts +13 -0
  39. package/dist/components/card/DTCardTitle.vue.d.ts +24 -0
  40. package/dist/components/card/context.d.ts +6 -0
  41. package/dist/components/card/index.d.ts +2 -0
  42. package/dist/components/carousel/DTCarousel.vue.d.ts +69 -0
  43. package/dist/components/carousel/DTCarouselItem.vue.d.ts +21 -0
  44. package/dist/components/carousel/carouselContext.d.ts +22 -0
  45. package/dist/components/checkbox/DTCheckbox.vue.d.ts +50 -0
  46. package/dist/components/chip/DTChip.vue.d.ts +62 -0
  47. package/dist/components/chip/DTChipGroup.vue.d.ts +36 -0
  48. package/dist/components/chip/chipGroupContext.d.ts +9 -0
  49. package/dist/components/code/DTCode.vue.d.ts +13 -0
  50. package/dist/components/col/DTCol.vue.d.ts +55 -0
  51. package/dist/components/color-input/DTColorInput.vue.d.ts +89 -0
  52. package/dist/components/color-input/colorMath.d.ts +36 -0
  53. package/dist/components/color-picker/DTColorPicker.vue.d.ts +66 -0
  54. package/dist/components/color-picker/context.d.ts +9 -0
  55. package/dist/components/combobox/DTCombobox.vue.d.ts +106 -0
  56. package/dist/components/container/DTContainer.vue.d.ts +29 -0
  57. package/dist/components/data-table/DTDataTable.vue.d.ts +112 -0
  58. package/dist/components/data-table/types.d.ts +70 -0
  59. package/dist/components/date-picker/DTDateInput.vue.d.ts +98 -0
  60. package/dist/components/date-picker/DTDatePicker.vue.d.ts +106 -0
  61. package/dist/components/date-picker/DTDateShortcuts.vue.d.ts +15 -0
  62. package/dist/components/date-picker/isoDate.d.ts +38 -0
  63. package/dist/components/date-picker/shortcuts.d.ts +11 -0
  64. package/dist/components/date-time-picker/DTDateTimeInput.vue.d.ts +107 -0
  65. package/dist/components/date-time-picker/DTDateTimePicker.vue.d.ts +94 -0
  66. package/dist/components/date-time-picker/isoDateTime.d.ts +30 -0
  67. package/dist/components/divider/DTDivider.vue.d.ts +19 -0
  68. package/dist/components/empty-state/DTEmptyState.vue.d.ts +51 -0
  69. package/dist/components/field/DTField.vue.d.ts +36 -0
  70. package/dist/components/field/fieldContext.d.ts +14 -0
  71. package/dist/components/field-control/DTFieldControl.vue.d.ts +135 -0
  72. package/dist/components/field-control/index.d.ts +1 -0
  73. package/dist/components/file-input/DTFileInput.vue.d.ts +142 -0
  74. package/dist/components/file-upload/DTFileUpload.vue.d.ts +132 -0
  75. package/dist/components/file-upload/icons.d.ts +1 -0
  76. package/dist/components/file-upload/types.d.ts +47 -0
  77. package/dist/components/grid/DTGrid.vue.d.ts +44 -0
  78. package/dist/components/grid/DTGridItem.vue.d.ts +42 -0
  79. package/dist/components/heading/DTHeading.vue.d.ts +31 -0
  80. package/dist/components/icon/DTIcon.vue.d.ts +43 -0
  81. package/dist/components/icon/play.d.ts +6 -0
  82. package/dist/components/icon/registry.d.ts +16 -0
  83. package/dist/components/infinite-scroll/DTInfiniteScroll.vue.d.ts +67 -0
  84. package/dist/components/infinite-scroll/icons.d.ts +1 -0
  85. package/dist/components/inline/DTInline.vue.d.ts +26 -0
  86. package/dist/components/kbd/DTKbd.vue.d.ts +13 -0
  87. package/dist/components/layout-app/DTLayout.vue.d.ts +18 -0
  88. package/dist/components/layout-app/DTMain.vue.d.ts +21 -0
  89. package/dist/components/layout-app/layoutContext.d.ts +33 -0
  90. package/dist/components/link/DTLink.vue.d.ts +26 -0
  91. package/dist/components/list/DTList.vue.d.ts +53 -0
  92. package/dist/components/list/DTListItem.vue.d.ts +61 -0
  93. package/dist/components/list/DTListSubheader.vue.d.ts +24 -0
  94. package/dist/components/list/listContext.d.ts +16 -0
  95. package/dist/components/mention/DTMention.vue.d.ts +93 -0
  96. package/dist/components/mention/caret.d.ts +7 -0
  97. package/dist/components/menu/DTMenu.vue.d.ts +66 -0
  98. package/dist/components/menu/DTMenuItem.vue.d.ts +45 -0
  99. package/dist/components/menu/DTMenuLabel.vue.d.ts +13 -0
  100. package/dist/components/menu/DTMenuSeparator.vue.d.ts +3 -0
  101. package/dist/components/menu/menuContext.d.ts +38 -0
  102. package/dist/components/modal/DTModal.vue.d.ts +52 -0
  103. package/dist/components/modal/modalStack.d.ts +20 -0
  104. package/dist/components/navigation-drawer/DTNavigationDrawer.vue.d.ts +93 -0
  105. package/dist/components/number-input/DTNumberInput.vue.d.ts +66 -0
  106. package/dist/components/otp-input/DTOtpInput.vue.d.ts +71 -0
  107. package/dist/components/pagination/DTPagination.vue.d.ts +55 -0
  108. package/dist/components/popover/DTPopover.vue.d.ts +67 -0
  109. package/dist/components/progress/DTProgress.vue.d.ts +48 -0
  110. package/dist/components/pull-refresh/DTPullRefresh.vue.d.ts +69 -0
  111. package/dist/components/radio/DTRadio.vue.d.ts +41 -0
  112. package/dist/components/radio/DTRadioGroup.vue.d.ts +35 -0
  113. package/dist/components/radio/radioGroupContext.d.ts +12 -0
  114. package/dist/components/rating/DTRating.vue.d.ts +65 -0
  115. package/dist/components/row/DTRow.vue.d.ts +38 -0
  116. package/dist/components/select/DTSelect.vue.d.ts +140 -0
  117. package/dist/components/sheet/DTSheet.vue.d.ts +57 -0
  118. package/dist/components/skeleton/DTSkeleton.vue.d.ts +34 -0
  119. package/dist/components/skip-link/DTSkipLink.vue.d.ts +33 -0
  120. package/dist/components/slider/DTSlider.vue.d.ts +88 -0
  121. package/dist/components/spinner/DTSpinner.vue.d.ts +34 -0
  122. package/dist/components/stack/DTStack.vue.d.ts +24 -0
  123. package/dist/components/statistic/DTCountdown.vue.d.ts +49 -0
  124. package/dist/components/statistic/DTStatistic.vue.d.ts +49 -0
  125. package/dist/components/statistic/format.d.ts +39 -0
  126. package/dist/components/stepper/DTStep.vue.d.ts +41 -0
  127. package/dist/components/stepper/DTStepHeader.vue.d.ts +8 -0
  128. package/dist/components/stepper/DTStepper.vue.d.ts +46 -0
  129. package/dist/components/stepper/stepperContext.d.ts +39 -0
  130. package/dist/components/surface/DTSurface.vue.d.ts +43 -0
  131. package/dist/components/surface/index.d.ts +2 -0
  132. package/dist/components/switch/DTSwitch.vue.d.ts +59 -0
  133. package/dist/components/table/DTTable.vue.d.ts +55 -0
  134. package/dist/components/table/DTTableScrollbars.vue.d.ts +9 -0
  135. package/dist/components/tabs/DTTab.vue.d.ts +23 -0
  136. package/dist/components/tabs/DTTabs.vue.d.ts +45 -0
  137. package/dist/components/tabs/tabsContext.d.ts +19 -0
  138. package/dist/components/text/DTText.vue.d.ts +32 -0
  139. package/dist/components/text-field/DTFieldShell.vue.d.ts +59 -0
  140. package/dist/components/text-field/DTInput.vue.d.ts +70 -0
  141. package/dist/components/text-field/fieldShared.d.ts +87 -0
  142. package/dist/components/textarea/DTTextarea.vue.d.ts +56 -0
  143. package/dist/components/time-picker/DTTimeInput.vue.d.ts +71 -0
  144. package/dist/components/time-picker/DTTimePicker.vue.d.ts +52 -0
  145. package/dist/components/time-picker/isoTime.d.ts +21 -0
  146. package/dist/components/timeline/DTTimeline.vue.d.ts +36 -0
  147. package/dist/components/timeline/DTTimelineItem.vue.d.ts +46 -0
  148. package/dist/components/timeline/timelineContext.d.ts +13 -0
  149. package/dist/components/toast/DTToastRegion.vue.d.ts +18 -0
  150. package/dist/components/toast/toastStore.d.ts +77 -0
  151. package/dist/components/tooltip/DTTooltip.vue.d.ts +45 -0
  152. package/dist/components/tour/DTTour.vue.d.ts +62 -0
  153. package/dist/components/tour/DTTourStep.vue.d.ts +31 -0
  154. package/dist/components/tour/tourContext.d.ts +20 -0
  155. package/dist/components/tree-select/DTTreeSelect.vue.d.ts +86 -0
  156. package/dist/components/treeview/DTTreeview.vue.d.ts +92 -0
  157. package/dist/components/watermark/DTWatermark.vue.d.ts +48 -0
  158. package/dist/config.d.ts +58 -0
  159. package/dist/index.d.ts +183 -0
  160. package/dist/locale/en.d.ts +311 -0
  161. package/dist/locale/en.js +192 -0
  162. package/dist/locale/messages.d.ts +295 -0
  163. package/dist/locale/vi.d.ts +309 -0
  164. package/dist/locale/vi.js +192 -0
  165. package/dist/plugin.d.ts +26 -0
  166. package/dist/tandd-ui.css +11585 -0
  167. package/dist/tandd-ui.js +13039 -0
  168. package/dist/theme/cssVariables.d.ts +14 -0
  169. package/dist/theme/defaultTheme.d.ts +5 -0
  170. package/dist/theme/index.d.ts +34 -0
  171. package/dist/useLocale.d.ts +15 -0
  172. package/dist/useTheme.d.ts +9 -0
  173. package/package.json +112 -4
  174. package/src/components/_index.scss +73 -0
  175. package/src/components/accordion/DTAccordion.scss +123 -0
  176. package/src/components/alert/DTAlert.scss +222 -0
  177. package/src/components/anchor/DTAnchor.scss +137 -0
  178. package/src/components/app-bar/DTAppBar.scss +151 -0
  179. package/src/components/autocomplete/DTAutocomplete.scss +89 -0
  180. package/src/components/avatar/DTAvatar.scss +67 -0
  181. package/src/components/badge/DTBadge.scss +218 -0
  182. package/src/components/border-beam/DTBorderBeam.scss +67 -0
  183. package/src/components/breadcrumb/DTBreadcrumb.scss +58 -0
  184. package/src/components/button/DTButton.scss +252 -0
  185. package/src/components/button-group/DTButtonGroup.scss +103 -0
  186. package/src/components/card/DTCard.scss +183 -0
  187. package/src/components/carousel/DTCarousel.scss +228 -0
  188. package/src/components/checkbox/DTChoice.scss +351 -0
  189. package/src/components/chip/DTChip.scss +280 -0
  190. package/src/components/code/DTCode.scss +10 -0
  191. package/src/components/col/DTCol.scss +124 -0
  192. package/src/components/color-input/DTColorInput.scss +118 -0
  193. package/src/components/color-picker/DTColorPicker.scss +334 -0
  194. package/src/components/container/DTContainer.scss +24 -0
  195. package/src/components/data-table/DTDataTable.scss +274 -0
  196. package/src/components/date-picker/DTDatePicker.scss +474 -0
  197. package/src/components/date-time-picker/DTDateTimePicker.scss +144 -0
  198. package/src/components/divider/DTDivider.scss +67 -0
  199. package/src/components/empty-state/DTEmptyState.scss +106 -0
  200. package/src/components/field/DTField.scss +69 -0
  201. package/src/components/field-control/DTFieldControl.scss +221 -0
  202. package/src/components/file-input/DTFileInput.scss +98 -0
  203. package/src/components/file-upload/DTFileUpload.scss +185 -0
  204. package/src/components/grid/DTGrid.scss +135 -0
  205. package/src/components/heading/DTHeading.scss +9 -0
  206. package/src/components/icon/DTIcon.scss +64 -0
  207. package/src/components/infinite-scroll/DTInfiniteScroll.scss +67 -0
  208. package/src/components/inline/DTInline.scss +19 -0
  209. package/src/components/kbd/DTKbd.scss +17 -0
  210. package/src/components/layout-app/DTLayout.scss +69 -0
  211. package/src/components/link/DTLink.scss +35 -0
  212. package/src/components/list/DTList.scss +261 -0
  213. package/src/components/mention/DTMention.scss +24 -0
  214. package/src/components/menu/DTMenu.scss +282 -0
  215. package/src/components/modal/DTModal.scss +178 -0
  216. package/src/components/navigation-drawer/DTNavigationDrawer.scss +172 -0
  217. package/src/components/number-input/DTNumberInput.scss +124 -0
  218. package/src/components/otp-input/DTOtpInput.scss +121 -0
  219. package/src/components/pagination/DTPagination.scss +115 -0
  220. package/src/components/popover/DTPopover.scss +119 -0
  221. package/src/components/progress/DTProgress.scss +227 -0
  222. package/src/components/pull-refresh/DTPullRefresh.scss +83 -0
  223. package/src/components/rating/DTRating.scss +153 -0
  224. package/src/components/row/DTRow.scss +73 -0
  225. package/src/components/select/DTSelect.scss +347 -0
  226. package/src/components/sheet/DTSheet.scss +256 -0
  227. package/src/components/skeleton/DTSkeleton.scss +74 -0
  228. package/src/components/skip-link/DTSkipLink.scss +76 -0
  229. package/src/components/slider/DTSlider.scss +652 -0
  230. package/src/components/spinner/DTSpinner.scss +123 -0
  231. package/src/components/stack/DTStack.scss +8 -0
  232. package/src/components/statistic/DTStatistic.scss +44 -0
  233. package/src/components/stepper/DTStepper.scss +268 -0
  234. package/src/components/surface/DTSurface.scss +99 -0
  235. package/src/components/switch/DTSwitch.scss +306 -0
  236. package/src/components/table/DTTable.scss +287 -0
  237. package/src/components/tabs/DTTabs.scss +402 -0
  238. package/src/components/text/DTText.scss +9 -0
  239. package/src/components/text-field/DTTextField.scss +452 -0
  240. package/src/components/time-picker/DTTimePicker.scss +131 -0
  241. package/src/components/timeline/DTTimeline.scss +322 -0
  242. package/src/components/toast/DTToast.scss +297 -0
  243. package/src/components/tooltip/DTTooltip.scss +168 -0
  244. package/src/components/tour/DTTour.scss +173 -0
  245. package/src/components/tree-select/DTTreeSelect.scss +60 -0
  246. package/src/components/treeview/DTTreeview.scss +205 -0
  247. package/src/components/watermark/DTWatermark.scss +8 -0
  248. package/src/styles/foundation/_direction.scss +6 -0
  249. package/src/styles/foundation/_focus.scss +12 -0
  250. package/src/styles/foundation/_forced-colors.scss +9 -0
  251. package/src/styles/foundation/_motion.scss +10 -0
  252. package/src/styles/foundation/_reset.scss +39 -0
  253. package/src/styles/foundation/_root.scss +112 -0
  254. package/src/styles/foundation/_state.scss +29 -0
  255. package/src/styles/foundation/_typography.scss +81 -0
  256. package/src/styles/foundation/_visually-hidden.scss +21 -0
  257. package/src/styles/index.scss +9 -0
  258. package/src/styles/tokens/_border.scss +2 -0
  259. package/src/styles/tokens/_breakpoint.scss +15 -0
  260. package/src/styles/tokens/_color.scss +56 -0
  261. package/src/styles/tokens/_index.scss +11 -0
  262. package/src/styles/tokens/_motion.scss +13 -0
  263. package/src/styles/tokens/_radius.scss +13 -0
  264. package/src/styles/tokens/_shadow.scss +18 -0
  265. package/src/styles/tokens/_spacing.scss +21 -0
  266. package/src/styles/tokens/_state.scss +30 -0
  267. package/src/styles/tokens/_surface.scss +33 -0
  268. package/src/styles/tokens/_typography.scss +40 -0
  269. package/src/styles/tokens/_z-index.scss +11 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,96 @@
1
+ # Changelog
2
+
3
+ ## 0.2.0 (2026-11-11): component rebuild (0.x, breaking)
4
+
5
+ First release on npm (`npm install tandd-ui`), under the MIT license.
6
+
7
+ All public components were rebuilt against the TanDD-UI HTML design reference. Version 0.x allows breaking changes; this entry lists them. Per-component details and migration tables are in `docs/contracts/`.
8
+
9
+ ### Breaking changes
10
+
11
+ - **DTButton:** variants are now `primary | secondary | outline | ghost | danger`; sizes are `sm | md | lg`. Removed the Vuetify-style `color`, `outlined`, and `text` props. Icons use `icon`, `prependIcon`, and `appendIcon`; `href` renders a link. (`density` was removed and later re-added with new values; see Added.)
12
+ - **DTBadge:** one component with two modes. Text in the slot gives a label badge; an element-only slot gives a marker on that element. Removed `mode`, `offsetX/Y`, `bordered`, and `decorative`. Markers default to the danger tone.
13
+ - **DTInput:** variants are `soft` (default) `| outlined | filled | underlined | plain`; sizes are `sm | md | lg`. `invalid` is now `error` (boolean or message), and the hint is now `helper`. Removed `density`, `block` (fields are always full width), `rounded`, `valid`, min/max width, and the action labels. (`clearable` and `loading` were re-added with a new design; see Added.) `DTInputDefaults` is now `{ variant, size }` and also applies to `DTTextarea`.
14
+ - **DTSurface:** tones are `plain | default | muted | raised | overlay | sunken | accent | outline | flat`. `subtle` is now `muted`; `inverse` was removed.
15
+ - **DTCard:** rebuilt as a bordered card with parts (`DTCardMedia`, `DTCardBody`, `DTCardTitle`, `DTCardText`, `DTCardFooter`). Removed `inset`, `insetX`, `insetY`, the surface-tone `variant`, `border`, `radius`, and the `floating` elevation; padding now comes from the parts. (A card-specific `variant` was added later; see Added.)
16
+ - **DTRow / DTCol:** moved to the reference 12-column flex model (`gap`/`gapX`/`gapY`, `reverse`, `offset`, `auto`/`fill`, `xl`).
17
+ - **Theme palette:** default light and dark colors now match the reference (text `#202936`, border `#dfe4ea`, danger `#c43c20`, and so on).
18
+
19
+ ### Added
20
+
21
+ - **Primitives:** DTSpinner, DTAvatar, DTAvatarGroup, DTSkeleton, DTProgress.
22
+ - **Forms:** DTTextarea, DTCheckbox, DTRadio, DTRadioGroup, DTSwitch, DTSlider, DTSelect.
23
+ - **Overlays and feedback:** DTTooltip, DTMenu (+ DTMenuItem, DTMenuLabel, DTMenuSeparator), DTModal, DTToastRegion + `useToast()`, DTAlert.
24
+ - **Composite and navigation:** DTChip, DTChipGroup, DTAccordion, DTAccordionItem, DTTabs, DTTab, DTBreadcrumb, DTPagination, DTTable, DTBorderBeam.
25
+ - **Options on retained components:** DTContainer `size`/`flush`; DTGrid `minItemWidth`/`xl`; DTIcon `size` and reference icon aliases; DTDivider label slot.
26
+ - **New components:** DTDataTable (sort, search, selection, pagination, server mode, expandable rows, virtual scroll), DTButtonGroup (`v-model`, `multiple`, `mandatory`), DTCardHeader, DTCardSubtitle, DTPopover (non-modal panel for forms, filters, confirmations and details; D20).
27
+ - **Options added after the rebuild (D26–D29):** custom icons on DTCheckbox (`true-icon`, `false-icon`, `indeterminate-icon`), DTRadio, and DTSwitch (`true-icon`, `false-icon`); DTTable `height`, `fixed-header`, `fixed-footer`, `fixed-column`; `body-scroll` on DTTable and DTDataTable (a scrollbar beside the body rows only); an animated DataTable sort icon; a shorter DTModal header and footer.
28
+ - **Grid system (D33):** new `DTGridItem` for children of `DTGrid`: `span` (`1`–`12` or `"full"`), optional `start` (`1`–`12` or `"auto"`), each also per breakpoint (`{ base, sm, md, lg, xl }`), plus `as`. DTGrid gains `gapX` and `gapY`, and `gap` now also takes a space step (`4` = `--dt-space-4`), as DTRow does. Defaults are unchanged. The Layout page gains a DTGrid Usage configurator and the reference grid demos (12-track spans, responsive columns, auto-fill, gaps per axis, page layout).
29
+ - **DTList (D30):** DTList, DTListItem, and DTListSubheader: plain, clickable, and link rows, side navigation (`nav`), and single or multiple selection as a listbox (`selectable`, `v-model:selected`).
30
+ - **DTAutocomplete (D30):** a text field that filters options as you type (case- and accent-insensitive, highlighted matches), single or multiple with chips, `filter-keys`, `custom-filter`, `no-filter` + `debounce` for server search, `auto-select-first`, `hide-selected`; APG editable combobox.
31
+ - **DTDatePicker and DTDateInput (D30):** an inline calendar (single date, `range`, `multiple`; `min`/`max`, `allowed-dates`, week numbers, adjacent months, year and month views) and a field that takes typed dates in the locale's order with a calendar dialog; values are ISO `YYYY-MM-DD` strings; APG date picker dialog.
32
+ - **Global locale (D30):** `createTanDDUI({ global: { locale } })` sets the default locale for date components (else the browser's language).
33
+ - **Icon hover effects (tandd-icon 0.2.0):** `tandd-icon` upgraded from 0.1.0 to 0.2.0. DTIcon gains `play` (`"hover"`, `"click"`, `"focus"`, or several), `effect`, and `part`: the icon moves when the button, link, or label around it is used, and never under reduced motion. The part data loads on demand the first time an icon plays. DTNavigationDrawer turns this on for its row icons (`icon-play`, default `"hover focus"`), and its icons now sit on one column centred in the rail, collapsed or expanded.
34
+ - **DTTreeview (D31):** nested items with the APG tree keyboard, `activatable` (one highlighted item), `selectable` single or multiple with tri-state check boxes that cascade through branches, `load-children` for lazy branches, `open-all`, compact density, and `title`/`prepend`/`append` slots.
35
+ - **DTFileUpload (D33):** a controlled upload list on top of DTFileInput (the drop zone and picker). `v-model` holds `DTFileUploadItem[]` (`id`, `file`, `status`, `progress`, `result`, `error`); a required `upload({ id, file, signal, reportProgress })` function sends each file, so any backend works. Uploads start automatically, first in, first out, `concurrency` at a time (default 1). Rows show the name, size, a DTProgress bar (determinate only from reported bytes), a status text and icon, and Cancel / Retry / Remove buttons named after the file; Remove aborts an upload in progress, and a late result is ignored. `accept`, `max-size`, and `max-files` (counting list items) filter intake, with `rejected` forwarded. A polite live region announces each file's end once. `item` and `empty` slots; every built-in string is a prop. Supersedes the October `DTFileUpload` contracts.
36
+ - **DTCarousel (D31):** `DTCarousel` and `DTCarouselItem`. APG carousel with a tablist of dots, Previous/Next buttons (`show-arrows`: always, `"hover"`, or off), `continuous` wrapping, `v-model` on the current slide, and swipe with touch or pen (Pointer Events). Autoplay (`cycle`) is off by default; when on, a visible Pause button comes first in the Tab order, and the slides stop on hover, on focus, and under reduced motion. Hidden slides are `inert`. Built-in icons gain `pause` and `play`.
37
+ - **DTMention (D34):** a text field, or a textarea with `multiline`, where typing a `prefix` (`"@"`, or several such as `["@", "#"]`) opens suggestions filtered by the text after it, at the caret. `options` are `{ value, label, disabled }`; choosing one inserts the prefix, the value, and `split`. `filter-option` replaces the matching, or `false` leaves it to a server search in the `search(pattern, prefix)` event, with `loading`. `whole` makes Backspace delete a mention as a unit (`check-is-whole` decides what counts). `select(option, prefix)` reports each insert. APG editable combobox on the text control; the number of suggestions is announced; every built-in string is a prop.
38
+ - **DTSelect `virtual` (D34):** renders only the options in view, at a fixed `item-height` (default 36 px), so lists of 10 000+ items open at once. Keyboard, type-ahead, `multiple`, and chips behave as without it, and each rendered option reports `aria-setsize` and `aria-posinset`. Off by default.
39
+ - **DTTreeSelect (D34):** a DTSelect field whose list is a DTTreeview: one leaf, or `multiple` with the tree's tri-state check boxes (the value holds leaves); `check-strictly` lets any item be chosen on its own; `filterable` filters the tree and keeps the ancestors of matches; `load-children` loads branches lazily; `chips` and `clearable`. The field opens the tree and moves focus into it, the tree keeps its APG keys, and Escape closes and returns focus to the field. DTTreeview gains an internal `check-strictly` for this (not part of its public API).
40
+ - **DTInfiniteScroll (D34):** loads the next page as people scroll near the end of a scroll box (`height`) or the page (`container="window"`): an IntersectionObserver sentinel within `distance` px calls `load()` (a promise, one call at a time, repeated until the box is filled), with `disabled`, `finished`, `immediate`, and `loading`/`finished`/`error` slots. A polite status announces "Loading more" and "No more items". A "Load more" button follows the items (visible on keyboard focus, always with `show-button`); a failed load stops loading and shows the error with Try again.
41
+ - **Global Configuration (D34.27):** DTSelect and DTTreeSelect take their size from `global.defaults.DTInput.size`, like the text fields. The Global Configuration page documents `locale` and which components read each option.
42
+ - **Docs logo (D34.26):** the docs header shows the logo with white "UI" letters in light and dark.
43
+ - **DTPullRefresh (D34):** pull down at the top of a scroll box with touch, pen, or mouse (Pointer Events; mouse added by D34.25) past `threshold` to refresh, with `v-model:loading`, `refresh` and `change` events, and texts per state ("Pull to refresh", "Release to refresh", "Refreshing…", "Refreshed") as props. A visible Refresh button (`show-button`, default on) does the same; a mouse pull clears the text selection and swallows its ending click, and there is no bounce under reduced motion.
44
+ - **DTAnchor and DTAnchorLink (D34):** an "on this page" navigation whose active link follows the scroll of the page or a `container` (selector or element), with `offset`, `bound`, `direction` vertical or horizontal, a moving `marker`, nested links (`sub-link` slot), `aria-current="location"`, smooth scrolling except under reduced motion, `v-model` (active href), and `change`/`click` events.
45
+ - **DTStatistic and DTCountdown (D34):** a title over a number formatted for the locale (Intl.NumberFormat) with `precision`, `prefix`/`suffix` (props and slots), `group-separator`/`decimal-separator` overrides, and `formatter`. DTCountdown counts down to an end time in `format` (`D`, `HH`, `mm`, `ss`, `SSS`, `[text]`), emits `change` and `finish`, and exposes the time left in words through a `role="timer"` that is `aria-live="off"` by default; it keeps running under reduced motion.
46
+ - **DTColorInput (D33):** a text field for a hex colour (`v-model` is `"#rrggbb"`, `"#rrggbbaa"` with `alpha`, or `null`) that reads typed hex in 3, 4, 6, or 8 digits with or without `#`, and a swatch button (or Alt+Down) that opens a non-modal picker: a saturation and brightness area (a 2D `role="slider"`: arrows, Shift+arrows, Home/End, pointer drag), hue and alpha DTSliders, channel fields per `mode` (`hex`, `rgb`, `hsl`; the model stays hex), an eyedropper where the browser has `EyeDropper`, and preset `swatches` as a radio group (`swatches-only` for a fixed palette). Every built-in string is a prop; colour samples keep their colour in forced colors.
47
+ - **DTColorPicker (D34):** the colour panel on its own, inline: saturation and brightness area, hue and alpha sliders, channel fields in hex, RGB, or HSL, an eyedropper where the browser has one, and preset `swatches` (or `swatches-only`). `v-model` is hex; a `change` event fires once per finished change (the end of a drag, a slider release, a swatch). DTColorInput now opens this component; its API and behaviour are unchanged. Swatches in both now sit 5 px apart (was 6 px), so eight fit on one row of the panel.
48
+ - **Date shortcuts (D34):** `shortcuts` on DTDatePicker and DTDateInput: a named list of buttons beside the calendar (above it when there is no room), each applying a date, a `[start, end]` range, or a function returning one ("Today", "Last 7 days"). A shortcut outside `min`/`max` or refused by `allowed-dates` is disabled. New type `DTDateShortcut`.
49
+ - **DTDateTimePicker and DTDateTimeInput (D34):** a date and a time together: the DTDatePicker calendar beside the DTTimePicker columns, with `min`/`max` (date-times or dates), minute `step`, `seconds`, the locale's clock or `format`, `default-time`, and `shortcuts`. The value is an ISO local date-time without a time zone (`"2026-11-18T09:30"`). DTDateTimeInput takes a typed date and time in the locale's order and opens the picker in a dialog with a Done button.
50
+ - **DTTimePicker and DTTimeInput (D31):** time-of-day columns (hour, minute, optional seconds, AM/PM in 12-hour locales) with `min`/`max`, minute `step`, and `allowed-times`, and a field that reads typed times ("2:30 pm", "1430", the locale's AM/PM words) with a picker dialog; values are 24-hour `HH:mm` strings.
51
+ - **DTNavigationDrawer (D31):** a side drawer for an app's navigation: `permanent`, `rail` (icons only, `expand-on-hover`, `v-model:rail`), or `temporary` (a modal DTSheet), switching to temporary below a `breakpoint`; `prepend`/`append` slots. DTSheet now forwards attributes to its scrim.
52
+ - **DTSheet (D31):** a modal panel that slides in from an edge (`location` start, end, top, bottom; `size` sm to full): side drawers and bottom sheets with a drag-to-close handle. Shares DTModal's stack, focus trap, scroll lock, inert background, and Escape layer, so sheets and modals nest.
53
+ - **DTStepper (D31):** DTStepper and DTStep: numbered steps, horizontal (labels beside or under markers) or vertical, `linear` gating with `optional` steps, `complete`/`error`/icon states, per-step `actions` slot with `next`/`prev`, and a progress-only mode (`editable=false`); roving-focus step buttons with `aria-current="step"`.
54
+ - **DTTimeline (D31):** DTTimeline and DTTimelineItem: events on a line, vertical or horizontal, on one side or alternating, with `opposite` content (dates), icon or hollow dots in six tones, compact density, dashed or truncated lines; folds to one side on narrow screens.
55
+ - **DTCombobox (D31):** DTAutocomplete with free text: typed text is the value, or with `multiple` Enter and `delimiters` turn it into chips (tags, email recipients); suggestions are optional and a typed title picks its item. DTAutocomplete itself is unchanged.
56
+ - **DTOtpInput (D31):** a one-time code in separate boxes: typing moves forward, Backspace back, paste and SMS autofill (`autocomplete="one-time-code"`) fill every box, `finish` when complete; `type` number or text, `mask`, `group-size`, `name` for forms.
57
+ - **DTNumberInput (D31):** a spinbutton field (arrows, Page keys, Home/End) with − / + buttons that repeat while held (`control-variant` split, stacked, or hidden), `min`/`max`/`step`/`precision`, `clamp-on-blur`, locale-aware typing and display with `format` (currency, percent, units), `prefix`/`suffix`.
58
+ - **DTRating (D31):** stars (or any closed icon) on native radios: `half-increments`, `clearable`, hover preview, `item-labels` with a caption, `readonly` fractional display as one image, `name` for forms; `size`, `color`.
59
+ - **DTEmptyState (D31):** an icon or image, a heading (`heading-level` h2–h6), text, and actions for empty lists, searches with no results, and errors; `size`, `tone`, `align`. The `magnifier`, `calendar`, and `paperclip` icons used by DTAutocomplete, DTDateInput, and DTFileInput are now built in. The `pipette` icon used by DTColorInput's eyedropper is built in too (D33).
60
+ - **DTFileInput (D30):** pick or drop files onto a field (DTInput styles), with `accept`, `max-size`, `max-files`, chips, a counter, sizes, and a `rejected` event.
61
+ - **Docs:** a Foundations group with a Typography page (DTText, DTHeading, DTLink, DTCode, DTKbd) and a Field page (DTField).
62
+ - **Icons (breaking):** the `tandd-icons` font is replaced by the `tandd-icon` package (SVG, Solar names such as `magnifier` and `alt-arrow-down`). The library registers the icons its components use; register others with `createTanDDUI({ icons })` or `tandd-icon/all`.
63
+ - **DTButton:** `dashed` variant, `rounded`, tonal `secondary`, `density`, `readonly`, `loader` slot, `value` inside DTButtonGroup.
64
+ - **DTMenu:** `closeOnSelect` (menu and item), submenus via the `submenu` slot, side placements, `openOnHover`, `context` (right-click menu).
65
+ - **DTSelect:** `multiple`, `chips`, `clearable`, `size`, `readonly`, item and selection slots; Home/End open the list.
66
+ - **DTInput / DTTextarea:** `clearable` + `click:clear`, `loading`, `label` slot.
67
+ - **DTModal:** `fullscreen`; nested modals (the background, including an outer modal, becomes inert).
68
+ - **Toast:** `action`, `icon`, `variant`, `progress`; DTToastRegion `location` and `max`; `useToast().promise()`.
69
+ - **DTTooltip:** `v-model:open`, `openOnClick`, `interactive`.
70
+ - **DTSlider:** `range`, `direction="vertical"`, `ticks`, `minGap`, `thumbLabels`, `readonly`, `helper`/`error`.
71
+ - **Display and navigation:** DTTabs `prependIcon`, stacked, grow, align, vertical; DTAlert variants; DTCard `variant`, `loading`, `disabled`; DTPagination icons; DTAccordion `readonly`, `variant`, icons; DTSpinner determinate value and centre slot; DTProgress `bufferValue`, `chunks`, `stream`; DTDivider `inset`; DTAvatar, DTSkeleton, and DTCol options.
72
+ - **DTTour and DTTourStep (D34):** a step-by-step guide. `v-model:open`, `v-model:current`; each step has a `target` (selector, element, or function; none centres it), `title`, `description` or a default slot, `placement`, and `mask`. With `mask` (the default) the tour is modal, sharing DTModal's modal stack (scroll lock, inert page), Tab trap, and Escape layers, and the page is dimmed with the target cut out; `:mask="false"` makes it a non-modal hint. Previous / Next / Finish and the "Step {0} of {1}" indicator are string props. Focus moves to each step and back to the opener on close; `change`, `finish`, and `close` events; targets scroll into view (instantly under reduced motion).
73
+ - **DTWatermark (D34):** repeats a text (`content`, one line or several) or `image` mark over its slot, drawn to a canvas and tiled on an `aria-hidden`, pointer-transparent layer. `width`, `height`, `rotate` (-22), `gap`, `offset`, `font`, `z-index`; the default colour is the text colour at 15%, so it follows dark themes. A MutationObserver puts the layer back if it is removed or restyled. Documented as a deterrent, not security.
74
+ - **DTAppBar, DTLayout, DTMain (D35):** an application top bar and app layout. DTAppBar: `title`, `density` (64 / 56 / 48 px), `color` (`surface` | `primary`), `flat`, `border`, `position` (`sticky` by default outside a layout), `scroll-behavior` (`elevate` shadows once the target scrolls; `hide` slides away while scrolling down and returns on scroll up or when focus enters it; instant under reduced motion), `scroll-target`, `extended` + `extension-height`, `as`; slots `prepend`, default, `append`, `extension`; renders `<header>`. DTLayout places its DTAppBar and DTNavigationDrawer in template order (earlier items span, later ones fit inside) and exposes `--dt-layout-top/-bottom/-start/-end`; `full-height` fixes them for an app. DTMain (`<main>`, or `as="div"`) is padded by those offsets; `scrollable` makes it the scroll box and the default scroll target of the bar. DTNavigationDrawer registers with a DTLayout through an internal injection: no API change, unchanged outside a layout; a rail with expand-on-hover keeps its rail width and a drawer turned temporary takes no room.
75
+ - **DTSkipLink (D37):** a skip link for WCAG 2.4.1 Bypass Blocks. A real `<a href="#id">`, visually hidden until it has keyboard focus, then shown in the top inline-start corner (`position="center"` for the top centre) above the layout's bars and drawers. Enter or click moves keyboard focus to the `target` (a selector, an element, or a function; default: the surrounding DTLayout's DTMain, else the page's `<main>`), setting `tabindex="-1"` on a target that cannot take focus, scrolling it into view (instantly under reduced motion), and emitting `skip`; the URL hash does not change. No target: nothing is rendered and a development warning names the selector. `text` ("Skip to main content") is a `global.messages` key (`DTSkipLink.text`; `vi`: "Bỏ qua, đến nội dung chính"). DTMain hands its element to the link through the internal layout context and draws no focus ring when focused as a skip target; no public API change on DTLayout or DTMain. Every docs app shell (the seven Wireframes, the App bar page, the Inbox, Dashboard, and Orders examples) starts with a DTSkipLink. Internal: the visually-hidden rule duplicated in 14 component stylesheets is a shared Sass mixin (no change in computed styles).
76
+ - **Docs site (D34):** the TanDD logo in the header (light and dark versions), VitePress local search ("/" or Ctrl/Cmd+K), and a sidebar whose scrollbar no longer runs over the group carets and link text.
77
+ - **Tokens:** reference spacing, type, radius, shadow, motion, breakpoint, and z-index scales; derived `surface-hover/active/raised`, `overlay`, `backdrop`, and intent `-subtle/-on-subtle/-on` roles.
78
+
79
+ - **DTBadge usage (D33):** the Badge page's Usage configurator switches between a label badge and a marker on an icon or an avatar, with `location`, `content`, and screen-reader `label` controls; new demos show all eight locations on icons and avatars, the `--dt-badge-offset` and `--dt-badge-offset-edge` adjustments, and `start`/`end` in a right-to-left row.
80
+
81
+ ### Fixed
82
+
83
+ - **Focus:** menus and selects move focus only after the panel renders (reference defect REF-1), and dialogs always move focus inside on open (REF-2).
84
+ - **Tabs at 375 px:** tabs overflow into a "More" menu instead of scrolling (REF-3).
85
+ - **DTFileUpload / DTProgress (D34):** when an upload started, its progress bar jumped forward, snapped back, then ran. The bar element was reused from the indeterminate state (40% wide, mid-slide), so its width transition ran from 40% down to the first value. DTProgress now starts a fresh bar when it turns determinate; later values still animate.
86
+ - **DTDivider:** fixed an SSR hydration mismatch caused by `<hr>` children.
87
+ - **DTIcon:** `refresh` mapped to a missing glyph.
88
+ - **Iframes:** popover, focus-trap, and roving-focus helpers now work inside iframes, such as the Playground preview.
89
+ - **DTDivider:** a label passed through the slot now updates when it changes.
90
+ - **DTCheckbox / DTRadio / DTSwitch:** `ripple: false` (prop or global) also removes the hover halo; the HTML reference kept it.
91
+ - **DTBadge:** a badge whose slot switches between text and an element now switches between label and marker form (it kept its first form; D33.7).
92
+ - **Accessibility hardening (D32):** every component now works under Windows forced colours (High Contrast): checked, selected, current, and focused states use system colours (`Highlight`, `CanvasText`, `GrayText`) with `forced-color-adjust: none` where a fill must keep its label readable, and lines, connectors, and borders no longer disappear. Right to left: DTTabs, DTSlider, DTSwitch, DTCarousel, DTStepper, and DTTreeview mirror keys, fills, thumbs, and panels; direction icons in DTPagination, DTBreadcrumb, DTDataTable, DTDatePicker, and DTCarousel flip with `.dt-flip-rtl`; the nearest `dir` wins, so an LTR island inside an RTL page stays LTR; the field clear button's gap is logical. Built-in English strings are now props with today's text as the default (DTPagination, DTInput, DTDateInput, DTTimeInput, DTSelect, DTAutocomplete/DTCombobox, DTFieldControl, DTDatePicker, DTFileInput, DTDataTable, DTCarousel). Small icon buttons, chip close buttons, the slider thumb, the xs switch, number-input step buttons, and small rating stars have 24 × 24 hit areas with their visible size unchanged. The a11y gate gains forced-colors, right-to-left, and hit-target checks and a DTDataTable keyboard check.
93
+
94
+ ### Unchanged
95
+
96
+ - `DTField`, `DTFieldControl`, `DTStack`, `DTInline`, `DTText`, `DTHeading`, `DTLink`, `DTCode`, `DTKbd`, and the theme runtime API.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 TanDD
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,97 @@
1
- # Temporary Holding Version
1
+ # TanDD UI
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Vue 3 component library built from the TanDD-UI HTML design reference: layout and typography primitives and more than 60 components, in light and dark themes, with localization (`en` and `vi` packs) and right-to-left support. Icons come from the `tandd-icon` package (SVG).
4
+
5
+ ```sh
6
+ npm install tandd-ui
7
+ ```
8
+
9
+ Requires Vue 3.5 or later. For the Sass source instead of the built CSS, use Sass's package importer: `@use "pkg:tandd-ui/styles.scss";` (Dart Sass 1.71+, `--pkg-importer=node` or the `NodePackageImporter`).
10
+
11
+ ```ts
12
+ import { createApp } from "vue";
13
+ import { createTanDDUI } from "tandd-ui";
14
+ import "tandd-ui/styles.css";
15
+ import App from "./App.vue";
16
+
17
+ createApp(App).use(createTanDDUI()).mount("#app");
18
+ ```
19
+
20
+ | Group | Components |
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.
31
+
32
+ ## Governance pack
33
+
34
+ This pack separates reusable product standards from the current rebuild contract and from AI execution instructions.
35
+
36
+ ## Target repository layout
37
+
38
+ Copy these files into the TanDD-UI repository using the paths below:
39
+
40
+ - `docs/standards/COMPONENT-DOCUMENTATION-AND-DEMO-STANDARDS.md`
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
+
47
+ ## Responsibility boundaries
48
+
49
+ - **Standards** apply to every component and future change, not just migration.
50
+ - **Rebuild contract** defines the scope and acceptance conditions for this rebuild.
51
+ - **Execution plan** defines the approved order of work and gates.
52
+ - **AI Pipeline operating rules** define how pipeline runs are requested, executed, recorded, and reviewed.
53
+ - **CLAUDE.md** is the Claude Code entry point. It routes work to the standards and governance documents; it does not authorize bypassing the pipeline.
54
+
55
+ ## Important installation notes
56
+
57
+ 1. This is a proposed governance pack, not a claim that files have already been installed in the local repository.
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.
63
+
64
+ ## Development
65
+
66
+ The library, documentation site, and Playground are separate apps that consume the built package in `dist/`.
67
+
68
+ ```sh
69
+ npm install
70
+ npm run build # library + stylesheet into dist/
71
+
72
+ npm run dev # watch library and styles
73
+ npm run docs:dev # documentation site → http://127.0.0.1:5175
74
+ npm run playground:dev # Playground → http://127.0.0.1:5174
75
+ ```
76
+
77
+ Build and preview each site independently:
78
+
79
+ ```sh
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
+ ```
83
+
84
+ `npm run check` runs typecheck, library build, tests, Playground build, and Docs build.
85
+
86
+ ### Docs and Playground links
87
+
88
+ Every Playground link on the docs site (the nav, the home page, and each demo's "Edit in TanDD Playground") opens in a new tab at the URL in `VITE_TANDD_PLAYGROUND_URL`:
89
+
90
+ | File | Value | Used by |
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) |
94
+
95
+ A site served under a sub-path, or a Playground on another host, sets the full URL in `.env.production.local` (not committed).
96
+
97
+ A demo link is `<url>?component=<starter-key>&project=<demo files>[&theme=dark]`: the Playground opens the demo's own files, in the docs' current theme. Starter keys are `playgroundStarterKeys` in `examples/playground-contract.ts`, one folder each in `playground/starters/`; an unknown key opens the default starter. `npm run test:playground-links` opens every demo's link and checks the Playground renders what the docs render.
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Whether an element lays out right to left (D32). The nearest `dir="rtl"` or `dir="ltr"`
3
+ * attribute wins, so a left-to-right island inside a right-to-left page reads as LTR; without
4
+ * one (or with `dir="auto"`), the computed CSS `direction` decides.
5
+ */
6
+ export declare function isRtl(element: Element | null | undefined): boolean;
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Dismissible layers (modal, popover, menu, select listbox), oldest first, sharing one Escape
3
+ * listener per document. Only the most recently opened layer that is still open answers Escape,
4
+ * and it consumes the key, so one press closes exactly one layer: a menu inside a popover inside a
5
+ * modal closes in that order (WAI-ARIA APG: Escape closes the innermost popup).
6
+ *
7
+ * A layer that handles Escape itself on a focused element (a submenu level, a select button)
8
+ * calls `preventDefault()`; such presses are skipped here, so they are never handled twice.
9
+ */
10
+ export interface EscapeLayer {
11
+ /** Closes the layer. `focusInside` says whether focus was inside it when Escape was pressed. */
12
+ close: (focusInside: boolean) => void;
13
+ /** The layer's own elements; focus inside any of them counts as "inside the layer". */
14
+ contains: (node: Node | null) => boolean;
15
+ /** Swallow Escape without closing (a persistent modal). The layer still blocks those below. */
16
+ ignoresEscape?: () => boolean;
17
+ }
18
+ /** Registers an open layer on top of the stack; call the returned function when it closes. */
19
+ export declare const pushEscapeLayer: (doc: Document, layer: EscapeLayer) => () => void;
20
+ /** True when `layer` is the most recently opened layer in its document. */
21
+ export declare const isTopEscapeLayer: (layer: EscapeLayer) => boolean;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Fills `{0}`, `{1}`, … in a label template (D32). Built-in strings are props with English
3
+ * defaults such as "Page {0}" or "{0}–{1} of {2}", so apps can translate them.
4
+ */
5
+ export declare function formatLabel(template: string, ...values: (string | number)[]): string;
@@ -0,0 +1,4 @@
1
+ import { Ref } from 'vue';
2
+ export declare function useDismissiblePopup(open: Ref<boolean>, close: () => void, returnFocus?: () => void): {
3
+ root: Ref<HTMLElement | null, HTMLElement | null>;
4
+ };
@@ -0,0 +1,34 @@
1
+ import { ComputedRef, MaybeRefOrGetter, Ref } from 'vue';
2
+ export type FieldRuleResult = true | string;
3
+ export type FieldRule = (value: unknown) => FieldRuleResult | PromiseLike<FieldRuleResult>;
4
+ export type ValidationTrigger = "input" | "blur" | "submit" | "manual";
5
+ export type ValidateOn = ValidationTrigger | readonly ValidationTrigger[];
6
+ export interface ValidationResult {
7
+ valid: boolean;
8
+ errors: readonly string[];
9
+ }
10
+ export interface UseFieldValidationOptions {
11
+ rules?: readonly FieldRule[];
12
+ validationValue: MaybeRefOrGetter<unknown>;
13
+ maxErrors?: MaybeRefOrGetter<number | string>;
14
+ validateOn?: MaybeRefOrGetter<ValidateOn>;
15
+ externalError?: MaybeRefOrGetter<boolean | string | undefined>;
16
+ externalErrorMessages?: MaybeRefOrGetter<string | readonly string[] | undefined>;
17
+ }
18
+ export interface FieldValidation {
19
+ errors: ComputedRef<readonly string[]>;
20
+ isValid: ComputedRef<boolean>;
21
+ isInvalid: ComputedRef<boolean>;
22
+ isValidating: Ref<boolean>;
23
+ isDirty: Ref<boolean>;
24
+ isPristine: ComputedRef<boolean>;
25
+ validate: () => Promise<ValidationResult>;
26
+ resetValidation: () => void;
27
+ handleInput: () => void;
28
+ handleBlur: () => void;
29
+ }
30
+ /**
31
+ * Shared validation state only. It intentionally does not render UI, alter a
32
+ * consumer value, or assume the value's domain type.
33
+ */
34
+ export declare const useFieldValidation: (options: UseFieldValidationOptions) => FieldValidation;
@@ -0,0 +1,16 @@
1
+ import { MaybeRefOrGetter, Ref } from 'vue';
2
+ export interface UseFocusTrapOptions {
3
+ /** Element to focus on activation; defaults to the first tabbable, then the container. */
4
+ initialFocus?: () => HTMLElement | null | undefined;
5
+ /** Return focus to the element that was focused before activation. */
6
+ restoreFocus?: boolean;
7
+ }
8
+ export declare const getTabbable: (container: HTMLElement) => HTMLElement[];
9
+ /**
10
+ * Keeps Tab/Shift+Tab inside `container` while `active` is true, moves focus in on
11
+ * activation regardless of input modality (reference defect REF-2), and restores it after.
12
+ */
13
+ export declare function useFocusTrap(container: Ref<HTMLElement | null | undefined>, active: MaybeRefOrGetter<boolean>, options?: UseFocusTrapOptions): {
14
+ activate: () => Promise<void>;
15
+ deactivate: () => void;
16
+ };
@@ -0,0 +1,18 @@
1
+ import { TanDDMessageComponent, TanDDMessages } from '../../locale/messages';
2
+ /** The message keys of a component: its string prop names (D36.3). */
3
+ export type TanDDMessageKey<C extends TanDDMessageComponent> = keyof NonNullable<TanDDMessages[C]>;
4
+ /**
5
+ * The built-in strings of a component, resolved per key (D36, LOCALIZATION-CONTRACT §2):
6
+ *
7
+ * 1. the component's prop, when the parent set it (to a value other than `undefined`);
8
+ * 2. `global.messages[component][key]`;
9
+ * 3. the prop's English default.
10
+ *
11
+ * The prop defaults stay in each component's `withDefaults`, so "was the prop set" is read from the
12
+ * vnode, as `useTextField` does for `disabled` and `error`. Each read goes through the prop first,
13
+ * so it depends on it; `global.messages` is reactive, so `useLocale().setLocale` re-renders.
14
+ *
15
+ * Object-valued keys (DTStepper `stateLabels`) are merged key by key: default ← global ← prop.
16
+ * Arrays (DTSlider `thumbLabels`) are replaced whole.
17
+ */
18
+ export declare function useMessages<C extends TanDDMessageComponent, P extends object>(component: C, props: P): Readonly<Pick<P, TanDDMessageKey<C> & keyof P>>;
@@ -0,0 +1,122 @@
1
+ import { MaybeRefOrGetter, Ref } from 'vue';
2
+ /** `start`/`end` follow the writing direction; `left`/`right` are physical and never mirror. */
3
+ export type DTPopoverSide = "top" | "bottom" | "start" | "end" | "left" | "right";
4
+ export type DTPopoverAlign = "start" | "center" | "end";
5
+ export type DTPopoverPlacement = DTPopoverSide | `${DTPopoverSide}-${Exclude<DTPopoverAlign, "center">}`;
6
+ export interface UsePopoverOptions {
7
+ placement?: MaybeRefOrGetter<DTPopoverPlacement>;
8
+ /** Gap between anchor and panel in px. */
9
+ offset?: MaybeRefOrGetter<number>;
10
+ /** Flip to the opposite side when the preferred side does not fit the viewport. */
11
+ flip?: boolean;
12
+ /** Close on outside pointerdown and Escape. */
13
+ dismissible?: boolean;
14
+ /** Return focus to the anchor when closed with Escape. */
15
+ restoreFocus?: boolean;
16
+ /** Element that receives focus on Escape when the anchor itself is not focusable (e.g. a wrapper). */
17
+ focusTarget?: () => HTMLElement | null | undefined;
18
+ /**
19
+ * A virtual anchor in viewport coordinates, used instead of the anchor's own box when it returns
20
+ * a rect (e.g. the pointer position of a context menu). The anchor element still scopes
21
+ * outside-press detection.
22
+ */
23
+ anchorRect?: () => DTPopoverRect | null | undefined;
24
+ /**
25
+ * The element to position against, when it is not the anchor itself (e.g. the trigger button
26
+ * inside a wrapper span: a fixed-position trigger leaves the wrapper as a 0×0 box). The anchor
27
+ * still scopes outside-press detection.
28
+ */
29
+ reference?: () => HTMLElement | null | undefined;
30
+ /** Allow left/right placements to fall back to bottom/top. Submenus turn it off. Default true. */
31
+ crossAxisFallback?: boolean;
32
+ }
33
+ export type DTPopoverRect = Pick<DOMRect, "top" | "bottom" | "left" | "right" | "width" | "height">;
34
+ export interface DTPopoverPosition {
35
+ top: number;
36
+ left: number;
37
+ side: DTPopoverSide;
38
+ /** Set when the panel does not fit on any side: cap its height so its content scrolls. */
39
+ maxHeight?: number;
40
+ /** Set when a left/right panel does not fit: cap its width. */
41
+ maxWidth?: number;
42
+ /** The anchor is scrolled out of a clipping ancestor (a scroll box): hide the panel until it returns. */
43
+ referenceHidden?: boolean;
44
+ }
45
+ /**
46
+ * True when `rect` lies entirely outside the visible area left by `clips` (the client rects of its
47
+ * scrolling or clipping ancestors). Partly visible anchors count as visible. Pure, for unit tests.
48
+ */
49
+ export declare function isRectClipped(rect: DTPopoverRect, clips: readonly DTPopoverRect[]): boolean;
50
+ export declare const parsePlacement: (placement: DTPopoverPlacement) => {
51
+ side: DTPopoverSide;
52
+ align: DTPopoverAlign;
53
+ };
54
+ /**
55
+ * Computes a fixed-position panel location from anchor and panel rects. Pure so it can be
56
+ * unit tested without layout. Logical sides: start/end follow the writing direction.
57
+ *
58
+ * Side choice (round 7, T7-1): the preferred side, then its opposite, then — for left/right
59
+ * placements unless `crossAxisFallback` is off (submenus) — bottom and top. When no side fits, the
60
+ * panel keeps the side with the most room and `maxWidth`/`maxHeight` cap it there so its content
61
+ * scrolls; it never slides back over its own anchor.
62
+ *
63
+ * Only the cross axis is clamped into the viewport (T7-5): on the main axis the panel stays
64
+ * attached to its anchor, so when the anchor scrolls out of view the panel goes with it instead of
65
+ * sticking to the viewport edge.
66
+ */
67
+ export declare function computePopoverPosition(anchor: DTPopoverRect, panel: {
68
+ width: number;
69
+ height: number;
70
+ }, viewport: {
71
+ width: number;
72
+ height: number;
73
+ }, placement: DTPopoverPlacement, { offset, flip, rtl, crossAxisFallback, margin }?: {
74
+ offset?: number | undefined;
75
+ flip?: boolean | undefined;
76
+ rtl?: boolean | undefined;
77
+ crossAxisFallback?: boolean | undefined;
78
+ margin?: number | undefined;
79
+ }): DTPopoverPosition;
80
+ /**
81
+ * Open state, positioning, and dismissal for an anchored panel (menu, select, tooltip).
82
+ * Supersedes the single-purpose useDismissiblePopup for new components.
83
+ */
84
+ export declare function usePopover(anchor: Ref<HTMLElement | null | undefined>, panel: Ref<HTMLElement | null | undefined>, options?: UsePopoverOptions): {
85
+ open: Ref<boolean, boolean>;
86
+ position: Ref<{
87
+ top: number;
88
+ left: number;
89
+ side: DTPopoverSide;
90
+ maxHeight?: number | undefined;
91
+ maxWidth?: number | undefined;
92
+ referenceHidden?: boolean | undefined;
93
+ } | null, DTPopoverPosition | {
94
+ top: number;
95
+ left: number;
96
+ side: DTPopoverSide;
97
+ maxHeight?: number | undefined;
98
+ maxWidth?: number | undefined;
99
+ referenceHidden?: boolean | undefined;
100
+ } | null>;
101
+ panelStyle: import('vue').ComputedRef<{
102
+ opacity?: string | undefined;
103
+ pointerEvents?: "none" | undefined;
104
+ maxWidth?: string | undefined;
105
+ minWidth?: string | undefined;
106
+ maxHeight?: string | undefined;
107
+ minHeight?: string | undefined;
108
+ position: "fixed";
109
+ top: string;
110
+ left: string;
111
+ visibility?: undefined;
112
+ } | {
113
+ position: "fixed";
114
+ visibility: "hidden";
115
+ }>;
116
+ show: () => Promise<void>;
117
+ hide: ({ restoreFocus }?: {
118
+ restoreFocus?: boolean | undefined;
119
+ }) => void;
120
+ toggle: () => void | Promise<void>;
121
+ update: () => void;
122
+ };
@@ -0,0 +1,37 @@
1
+ import { MaybeRefOrGetter } from 'vue';
2
+ export interface DTRipple {
3
+ id: number;
4
+ x: number;
5
+ y: number;
6
+ size: number;
7
+ }
8
+ export interface UseRippleOptions {
9
+ /** Local override; falls back to the global `ripple` option. */
10
+ enabled?: MaybeRefOrGetter<boolean | undefined>;
11
+ /** Start every wave at the element centre (keyboard activation always does). */
12
+ centered?: MaybeRefOrGetter<boolean>;
13
+ /** Wave lifetime in ms; matches the reference `.dt-ripple-wave` animation. */
14
+ duration?: number;
15
+ }
16
+ /**
17
+ * Pointer and keyboard ripple waves for a component root. The component renders `ripples`
18
+ * inside an aria-hidden layer; each wave removes itself after `duration`.
19
+ */
20
+ export declare function useRipple(options?: UseRippleOptions): {
21
+ ripples: import('vue').Ref<{
22
+ id: number;
23
+ x: number;
24
+ y: number;
25
+ size: number;
26
+ }[], DTRipple[] | {
27
+ id: number;
28
+ x: number;
29
+ y: number;
30
+ size: number;
31
+ }[]>;
32
+ add: (element: HTMLElement, clientX?: number, clientY?: number) => void;
33
+ onPointerDown: (event: PointerEvent) => void;
34
+ onKeyDown: (event: KeyboardEvent) => void;
35
+ clear: () => void;
36
+ rippleSetting: () => boolean;
37
+ };
@@ -0,0 +1,25 @@
1
+ import { Ref } from 'vue';
2
+ export type DTRovingOrientation = "vertical" | "horizontal" | "both";
3
+ export interface UseRovingFocusOptions {
4
+ /** Selector for the items inside the container, in DOM order. */
5
+ itemSelector: string;
6
+ orientation?: DTRovingOrientation;
7
+ /** Wrap from the last item to the first and back. */
8
+ loop?: boolean;
9
+ /** PageUp/PageDown move this many items and are consumed, so a scrolling panel follows focus. Off by default. */
10
+ pageSize?: number;
11
+ /** APG type-ahead: printable keys move to the next item whose text starts with what was typed. Off by default. */
12
+ typeahead?: boolean;
13
+ }
14
+ /**
15
+ * Arrow/Home/End navigation between items of a composite widget (menu, listbox, tablist,
16
+ * radio group). Disabled items are skipped. Only the container owns the keydown handler.
17
+ */
18
+ export declare function useRovingFocus(container: Ref<HTMLElement | null | undefined>, options: UseRovingFocusOptions): {
19
+ items: () => HTMLElement[];
20
+ focusAt: (index: number) => HTMLElement | undefined;
21
+ focusFirst: () => HTMLElement | undefined;
22
+ focusLast: () => HTMLElement | undefined;
23
+ focusAfterRender: (target?: "first" | "last" | HTMLElement) => Promise<HTMLElement | undefined>;
24
+ onKeyDown: (event: KeyboardEvent) => void;
25
+ };
@@ -0,0 +1,42 @@
1
+ export type DTAccordionVariant = "default" | "outlined" | "flat" | "separated";
2
+ type __VLS_Props = {
3
+ /** Open item values (array with `multiple`, else a single value or `null`). */
4
+ modelValue?: unknown;
5
+ /** Allow several items open at once. */
6
+ multiple?: boolean;
7
+ /** Heading level wrapping each trigger, 2–6. */
8
+ headingLevel?: 2 | 3 | 4 | 5 | 6;
9
+ /** Items keep their open state but cannot be toggled. Triggers stay focusable. */
10
+ readonly?: boolean;
11
+ /** `default` bordered box, `outlined` no fill, `flat` no outer border, `separated` one card per item. */
12
+ variant?: DTAccordionVariant;
13
+ /** Icon of a closed item. Without `collapse-icon` it rotates on open like the default chevron. */
14
+ expandIcon?: string;
15
+ /** Icon of an open item. Set it to swap icons instead of rotating one. */
16
+ collapseIcon?: string;
17
+ };
18
+ declare var __VLS_1: {};
19
+ type __VLS_Slots = {} & {
20
+ default?: (props: typeof __VLS_1) => any;
21
+ };
22
+ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
23
+ "update:modelValue": (value: unknown) => any;
24
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
25
+ "onUpdate:modelValue"?: ((value: unknown) => any) | undefined;
26
+ }>, {
27
+ variant: DTAccordionVariant;
28
+ readonly: boolean;
29
+ modelValue: undefined;
30
+ multiple: boolean;
31
+ headingLevel: 2 | 3 | 4 | 5 | 6;
32
+ expandIcon: string;
33
+ collapseIcon: string;
34
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
35
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
36
+ declare const _default: typeof __VLS_export;
37
+ export default _default;
38
+ type __VLS_WithSlots<T, S> = T & {
39
+ new (): {
40
+ $slots: S;
41
+ };
42
+ };
@@ -0,0 +1,34 @@
1
+ type __VLS_Props = {
2
+ title?: string;
3
+ /** Identifies the item in the accordion model; defaults to its position. */
4
+ value?: unknown;
5
+ disabled?: boolean;
6
+ /** Overrides the accordion's `readonly` for this item. */
7
+ readonly?: boolean;
8
+ /** Overrides the accordion's `expand-icon`. */
9
+ expandIcon?: string;
10
+ /** Overrides the accordion's `collapse-icon`. */
11
+ collapseIcon?: string;
12
+ };
13
+ declare var __VLS_7: {}, __VLS_14: {};
14
+ type __VLS_Slots = {} & {
15
+ title?: (props: typeof __VLS_7) => any;
16
+ } & {
17
+ default?: (props: typeof __VLS_14) => any;
18
+ };
19
+ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
20
+ value: undefined;
21
+ title: string;
22
+ disabled: boolean;
23
+ readonly: boolean;
24
+ expandIcon: string;
25
+ collapseIcon: string;
26
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
27
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
28
+ declare const _default: typeof __VLS_export;
29
+ export default _default;
30
+ type __VLS_WithSlots<T, S> = T & {
31
+ new (): {
32
+ $slots: S;
33
+ };
34
+ };