@type-dom/ui 0.0.9 → 0.1.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 (311) hide show
  1. package/README.md +44 -44
  2. package/package.json +4 -10
  3. package/src/aria.d.ts +2 -2
  4. package/src/components/basic/td-button/td-button.abstract.d.ts +5 -5
  5. package/src/components/basic/td-button/td-button.abstract.js +46 -42
  6. package/src/components/basic/td-button/td-button.interface.d.ts +3 -6
  7. package/src/components/basic/td-button/td-button.style.d.ts +16 -5
  8. package/src/components/basic/td-button/td-button.style.js +43 -17
  9. package/src/components/basic/td-button-group/td-button-group.class.d.ts +3 -2
  10. package/src/components/basic/td-button-group/td-button-group.class.js +34 -37
  11. package/src/components/basic/td-button-group/td-button-group.interface.d.ts +3 -3
  12. package/src/components/basic/td-container/td-aside/td-aside.class.d.ts +2 -2
  13. package/src/components/basic/td-container/td-aside/td-aside.class.js +6 -5
  14. package/src/components/basic/td-container/td-aside/td-aside.interface.d.ts +3 -3
  15. package/src/components/basic/td-container/td-container.class.d.ts +2 -3
  16. package/src/components/basic/td-container/td-container.class.js +9 -7
  17. package/src/components/basic/td-container/td-container.interface.d.ts +3 -4
  18. package/src/components/basic/td-container/td-container.js +3 -2
  19. package/src/components/basic/td-container/td-footer/td-footer.class.d.ts +2 -2
  20. package/src/components/basic/td-container/td-footer/td-footer.class.js +4 -3
  21. package/src/components/basic/td-container/td-footer/td-footer.interface.d.ts +3 -3
  22. package/src/components/basic/td-container/td-header/td-header.class.d.ts +2 -2
  23. package/src/components/basic/td-container/td-header/td-header.class.js +3 -3
  24. package/src/components/basic/td-container/td-header/td-header.interface.d.ts +3 -3
  25. package/src/components/basic/td-container/td-main/td-main.class.d.ts +4 -2
  26. package/src/components/basic/td-container/td-main/td-main.class.js +8 -5
  27. package/src/components/basic/td-container/td-main/td-main.interface.d.ts +3 -3
  28. package/src/components/basic/td-icon/td-icon.class.d.ts +4 -6
  29. package/src/components/basic/td-icon/td-icon.class.js +32 -29
  30. package/src/components/basic/td-icon/td-icon.interface.d.ts +3 -4
  31. package/src/components/basic/td-layout/td-col/td-col.class.d.ts +2 -3
  32. package/src/components/basic/td-layout/td-col/td-col.class.js +4 -4
  33. package/src/components/basic/td-layout/td-col/td-col.interface.d.ts +3 -3
  34. package/src/components/basic/td-layout/td-row/td-row.class.d.ts +2 -2
  35. package/src/components/basic/td-layout/td-row/td-row.class.js +5 -4
  36. package/src/components/basic/td-layout/td-row/td-row.interface.d.ts +3 -3
  37. package/src/components/basic/td-link/td-link.class.d.ts +2 -2
  38. package/src/components/basic/td-link/td-link.class.js +6 -10
  39. package/src/components/basic/td-link/td-link.interface.d.ts +3 -3
  40. package/src/components/basic/td-link/td-link.style.js +1 -1
  41. package/src/components/basic/td-scrollbar/bar/bar.class.d.ts +2 -2
  42. package/src/components/basic/td-scrollbar/bar/bar.class.js +4 -4
  43. package/src/components/basic/td-scrollbar/bar/bar.interface.d.ts +3 -3
  44. package/src/components/basic/td-scrollbar/td-scrollbar.class.d.ts +4 -2
  45. package/src/components/basic/td-scrollbar/td-scrollbar.class.js +4 -3
  46. package/src/components/basic/td-scrollbar/td-scrollbar.interface.d.ts +3 -4
  47. package/src/components/basic/td-scrollbar/td-scrollbar.interface.js +1 -1
  48. package/src/components/basic/td-scrollbar/thumb/thumb.class.d.ts +2 -2
  49. package/src/components/basic/td-scrollbar/thumb/thumb.class.js +2 -3
  50. package/src/components/basic/td-scrollbar/thumb/thumb.interface.d.ts +3 -3
  51. package/src/components/basic/td-space/td-space.class.d.ts +2 -2
  52. package/src/components/basic/td-space/td-space.class.js +11 -5
  53. package/src/components/basic/td-space/td-space.interface.d.ts +3 -4
  54. package/src/components/basic/td-text/td-text.class.d.ts +4 -2
  55. package/src/components/basic/td-text/td-text.class.js +6 -4
  56. package/src/components/basic/td-text/td-text.interface.d.ts +3 -3
  57. package/src/components/data/td-avatar/td-avatar.class.d.ts +2 -2
  58. package/src/components/data/td-avatar/td-avatar.class.js +19 -25
  59. package/src/components/data/td-avatar/td-avatar.interface.d.ts +3 -3
  60. package/src/components/data/td-avatar/td-avatar.style.d.ts +2 -0
  61. package/src/components/data/td-avatar/td-avatar.style.js +19 -1
  62. package/src/components/data/td-badge/td-badge.class.d.ts +2 -2
  63. package/src/components/data/td-badge/td-badge.class.js +4 -4
  64. package/src/components/data/td-badge/td-badge.interface.d.ts +3 -3
  65. package/src/components/data/td-card/td-card.class.d.ts +4 -5
  66. package/src/components/data/td-card/td-card.class.js +16 -30
  67. package/src/components/data/td-card/td-card.interface.d.ts +3 -3
  68. package/src/components/data/td-card/td-card.style.d.ts +3 -2
  69. package/src/components/data/td-card/td-card.style.js +17 -3
  70. package/src/components/data/td-check-tag/td-check-tag.class.d.ts +2 -2
  71. package/src/components/data/td-check-tag/td-check-tag.class.js +5 -5
  72. package/src/components/data/td-check-tag/td-check-tag.interface.d.ts +3 -3
  73. package/src/components/data/td-check-tag/td-check-tag.style.d.ts +2 -2
  74. package/src/components/data/td-check-tag/td-check-tag.style.js +3 -3
  75. package/src/components/data/td-collapse/td-collapse.class.d.ts +2 -2
  76. package/src/components/data/td-collapse/td-collapse.class.js +20 -20
  77. package/src/components/data/td-collapse/td-collapse.interface.d.ts +3 -3
  78. package/src/components/data/td-collapse/td-collapse.style.d.ts +2 -0
  79. package/src/components/data/td-collapse/td-collapse.style.js +9 -1
  80. package/src/components/data/td-collapse-item/td-collapse-item.class.d.ts +4 -5
  81. package/src/components/data/td-collapse-item/td-collapse-item.class.js +16 -16
  82. package/src/components/data/td-collapse-item/td-collapse-item.interface.d.ts +3 -3
  83. package/src/components/data/td-count-down/td-count-down.class.d.ts +1 -1
  84. package/src/components/data/td-count-down/td-count-down.class.js +1 -1
  85. package/src/components/data/td-descriptions/td-descriptions-row.d.ts +4 -5
  86. package/src/components/data/td-descriptions/td-descriptions-row.js +1 -1
  87. package/src/components/data/td-descriptions/td-descriptions.class.d.ts +3 -3
  88. package/src/components/data/td-descriptions/td-descriptions.class.js +2 -3
  89. package/src/components/data/td-descriptions/td-descriptions.interface.d.ts +3 -4
  90. package/src/components/data/td-descriptions/td-descritions-cell.d.ts +6 -5
  91. package/src/components/data/td-descriptions/td-descritions-cell.js +5 -4
  92. package/src/components/data/td-descriptions-item/td-descriptions-item.class.d.ts +2 -3
  93. package/src/components/data/td-descriptions-item/td-descriptions-item.class.js +5 -4
  94. package/src/components/data/td-descriptions-item/td-descriptions-item.interface.d.ts +3 -4
  95. package/src/components/data/td-empty/td-empty.class.d.ts +2 -2
  96. package/src/components/data/td-empty/td-empty.class.js +2 -3
  97. package/src/components/data/td-empty/td-empty.interface.d.ts +3 -4
  98. package/src/components/data/td-image/td-image.class.d.ts +2 -3
  99. package/src/components/data/td-image/td-image.class.js +4 -22
  100. package/src/components/data/td-image/td-image.interface.d.ts +3 -3
  101. package/src/components/data/td-image/td-image.style.d.ts +2 -0
  102. package/src/components/data/td-image/td-image.style.js +19 -1
  103. package/src/components/data/td-image-viewer/td-image-viewer.class.d.ts +3 -5
  104. package/src/components/data/td-image-viewer/td-image-viewer.class.js +20 -17
  105. package/src/components/data/td-image-viewer/td-image-viewer.interface.d.ts +3 -3
  106. package/src/components/data/td-result/td-result.class.d.ts +2 -2
  107. package/src/components/data/td-result/td-result.class.js +4 -3
  108. package/src/components/data/td-result/td-result.interface.d.ts +3 -4
  109. package/src/components/data/td-segmented/td-segmented.class.d.ts +2 -3
  110. package/src/components/data/td-segmented/td-segmented.class.js +7 -8
  111. package/src/components/data/td-segmented/td-segmented.interface.d.ts +2 -3
  112. package/src/components/data/td-statistic/td-statistic.abstract.d.ts +3 -4
  113. package/src/components/data/td-statistic/td-statistic.abstract.js +15 -14
  114. package/src/components/data/td-statistic/td-statistic.class.js +1 -0
  115. package/src/components/data/td-statistic/td-statistic.interface.d.ts +3 -4
  116. package/src/components/data/td-tag/td-tag.class.d.ts +3 -4
  117. package/src/components/data/td-tag/td-tag.class.js +13 -13
  118. package/src/components/data/td-tag/td-tag.interface.d.ts +3 -3
  119. package/src/components/feedback/index.d.ts +4 -0
  120. package/src/components/feedback/index.js +5 -2
  121. package/src/components/feedback/td-alert/td-alert.class.d.ts +2 -3
  122. package/src/components/feedback/td-alert/td-alert.class.js +19 -17
  123. package/src/components/feedback/td-alert/td-alert.interface.d.ts +3 -3
  124. package/src/components/feedback/td-dialog/td-dialog.class.d.ts +3 -3
  125. package/src/components/feedback/td-dialog/td-dialog.class.js +25 -29
  126. package/src/components/feedback/td-dialog/td-dialog.interface.d.ts +3 -3
  127. package/src/components/feedback/td-dialog/td-dialog.interface.js +1 -1
  128. package/src/components/feedback/td-dialog-content/td-dialog-content.class.d.ts +2 -3
  129. package/src/components/feedback/td-dialog-content/td-dialog-content.class.js +10 -7
  130. package/src/components/feedback/td-dialog-content/td-dialog-content.interface.d.ts +3 -4
  131. package/src/components/feedback/td-drawer/td-drawer.class.d.ts +3 -3
  132. package/src/components/feedback/td-drawer/td-drawer.class.js +5 -5
  133. package/src/components/feedback/td-drawer/td-drawer.interface.d.ts +2 -2
  134. package/src/components/feedback/td-focus-trap/focus-trap.d.ts +15 -0
  135. package/src/components/feedback/td-focus-trap/focus-trap.js +71 -0
  136. package/src/components/feedback/td-focus-trap/td-focus-trap.class.d.ts +8 -7
  137. package/src/components/feedback/td-focus-trap/td-focus-trap.class.js +129 -129
  138. package/src/components/feedback/td-focus-trap/td-focus-trap.interface.d.ts +3 -3
  139. package/src/components/feedback/td-loading/td-loading.class.d.ts +4 -3
  140. package/src/components/feedback/td-loading/td-loading.class.js +27 -17
  141. package/src/components/feedback/td-loading/td-loading.interface.d.ts +3 -4
  142. package/src/components/feedback/td-message/td-message.class.d.ts +4 -4
  143. package/src/components/feedback/td-message/td-message.class.js +31 -31
  144. package/src/components/feedback/td-message/td-message.interface.d.ts +3 -4
  145. package/src/components/feedback/td-message-box/td-message-box.class.d.ts +10 -12
  146. package/src/components/feedback/td-message-box/td-message-box.class.js +30 -52
  147. package/src/components/feedback/td-message-box/td-message-box.interface.d.ts +4 -5
  148. package/src/components/feedback/td-notification/td-notification.class.d.ts +4 -5
  149. package/src/components/feedback/td-notification/td-notification.class.js +17 -18
  150. package/src/components/feedback/td-notification/td-notification.interface.d.ts +3 -4
  151. package/src/components/feedback/td-notification/td-notification.style.js +6 -6
  152. package/src/components/feedback/td-only-child/td-only-child.class.d.ts +3 -3
  153. package/src/components/feedback/td-only-child/td-only-child.class.js +3 -3
  154. package/src/components/feedback/td-overlay/td-overlay.class.d.ts +2 -3
  155. package/src/components/feedback/td-overlay/td-overlay.class.js +6 -5
  156. package/src/components/feedback/td-overlay/td-overlay.interface.d.ts +3 -3
  157. package/src/components/feedback/td-popper/arrow/arrow.class.d.ts +2 -2
  158. package/src/components/feedback/td-popper/arrow/arrow.class.js +7 -6
  159. package/src/components/feedback/td-popper/arrow/arrow.const.d.ts +3 -0
  160. package/src/components/feedback/td-popper/arrow/arrow.const.js +6 -0
  161. package/src/components/feedback/td-popper/arrow/arrow.interface.d.ts +3 -4
  162. package/src/components/feedback/td-popper/constants.d.ts +25 -0
  163. package/src/components/feedback/td-popper/constants.js +5 -0
  164. package/src/components/feedback/td-popper/content/content.class.d.ts +2 -2
  165. package/src/components/feedback/td-popper/content/content.class.js +7 -13
  166. package/src/components/feedback/td-popper/content/content.const.d.ts +2 -2
  167. package/src/components/feedback/td-popper/content/content.const.js +3 -4
  168. package/src/components/feedback/td-popper/content/content.interface.d.ts +24 -11
  169. package/src/components/feedback/td-popper/content/content.interface.js +4 -0
  170. package/src/components/feedback/td-popper/td-popper.class.d.ts +3 -2
  171. package/src/components/feedback/td-popper/td-popper.class.js +9 -7
  172. package/src/components/feedback/td-popper/td-popper.const.d.ts +5 -20
  173. package/src/components/feedback/td-popper/td-popper.const.js +8 -3
  174. package/src/components/feedback/td-popper/td-popper.interface.d.ts +6 -4
  175. package/src/components/feedback/td-popper/trigger/trigger.class.d.ts +2 -2
  176. package/src/components/feedback/td-popper/trigger/trigger.class.js +6 -6
  177. package/src/components/feedback/td-popper/trigger/trigger.const.d.ts +1 -0
  178. package/src/components/feedback/td-popper/trigger/trigger.const.js +4 -1
  179. package/src/components/feedback/td-popper/trigger/trigger.interface.d.ts +3 -3
  180. package/src/components/feedback/td-tooltip/content/content.class.d.ts +2 -2
  181. package/src/components/feedback/td-tooltip/content/content.class.js +4 -3
  182. package/src/components/feedback/td-tooltip/content/content.const.d.ts +55 -0
  183. package/src/components/feedback/td-tooltip/content/content.const.js +6 -0
  184. package/src/components/feedback/td-tooltip/content/content.interface.d.ts +19 -3
  185. package/src/components/feedback/td-tooltip/td-tooltip.class.d.ts +5 -3
  186. package/src/components/feedback/td-tooltip/td-tooltip.class.js +84 -9
  187. package/src/components/feedback/td-tooltip/td-tooltip.const.d.ts +77 -0
  188. package/src/components/feedback/td-tooltip/td-tooltip.const.js +9 -0
  189. package/src/components/feedback/td-tooltip/td-tooltip.interface.d.ts +6 -3
  190. package/src/components/feedback/td-tooltip/trigger/trigger.class.d.ts +3 -2
  191. package/src/components/feedback/td-tooltip/trigger/trigger.class.js +56 -3
  192. package/src/components/feedback/td-tooltip/trigger/trigger.const.d.ts +4 -0
  193. package/src/components/feedback/td-tooltip/trigger/trigger.const.js +6 -0
  194. package/src/components/feedback/td-tooltip/trigger/trigger.interface.d.ts +7 -2
  195. package/src/components/form/index.d.ts +17 -16
  196. package/src/components/form/index.js +19 -17
  197. package/src/components/form/td-checkbox/composables/use-checkbox-status.js +1 -1
  198. package/src/components/form/td-checkbox/composables/use-checkbox.js +1 -1
  199. package/src/components/form/td-checkbox/td-checkbox.class.d.ts +18 -3
  200. package/src/components/form/td-checkbox/td-checkbox.class.js +231 -9
  201. package/src/components/form/td-checkbox/td-checkbox.const.d.ts +63 -0
  202. package/src/components/form/td-checkbox/td-checkbox.const.js +88 -0
  203. package/src/components/form/td-checkbox/td-checkbox.interface.d.ts +5 -5
  204. package/src/components/form/td-checkbox/td-checkbox.style.d.ts +9 -0
  205. package/src/components/form/td-checkbox/td-checkbox.style.js +167 -14
  206. package/src/components/form/td-checkbox-button/td-checkbox-button.class.d.ts +9 -3
  207. package/src/components/form/td-checkbox-button/td-checkbox-button.class.js +114 -26
  208. package/src/components/form/td-checkbox-button/td-checkbox-button.interface.d.ts +2 -4
  209. package/src/components/form/td-checkbox-button/td-checkbox-button.style.d.ts +8 -1
  210. package/src/components/form/td-checkbox-button/td-checkbox-button.style.js +89 -12
  211. package/src/components/form/td-checkbox-group/td-checkbox-group.class.d.ts +11 -3
  212. package/src/components/form/td-checkbox-group/td-checkbox-group.class.js +118 -5
  213. package/src/components/form/td-checkbox-group/td-checkbox-group.interface.d.ts +8 -5
  214. package/src/components/form/td-form/td-form.class.d.ts +4 -2
  215. package/src/components/form/td-form/td-form.class.js +9 -5
  216. package/src/components/form/td-form/td-form.interface.d.ts +7 -4
  217. package/src/components/form/td-form-item/td-form-item.class.d.ts +4 -5
  218. package/src/components/form/td-form-item/td-form-item.class.js +34 -27
  219. package/src/components/form/td-form-item/td-form-item.interface.d.ts +3 -3
  220. package/src/components/form/td-input/td-input.class.d.ts +3 -4
  221. package/src/components/form/td-input/td-input.class.js +30 -26
  222. package/src/components/form/td-input/td-input.interface.d.ts +3 -4
  223. package/src/components/form/td-input/widget/suffix.d.ts +1 -0
  224. package/src/components/form/td-input/widget/suffix.js +6 -1
  225. package/src/components/form/td-input/widget/td-input-wrapper.class.js +5 -5
  226. package/src/components/form/td-input/widget/utils.js +8 -8
  227. package/src/components/form/td-option/td-option.class.d.ts +2 -2
  228. package/src/components/form/td-option/td-option.class.js +3 -3
  229. package/src/components/form/td-option/td-option.interface.d.ts +3 -3
  230. package/src/components/form/td-option-group/td-option-group.class.d.ts +2 -2
  231. package/src/components/form/td-option-group/td-option-group.class.js +2 -3
  232. package/src/components/form/td-option-group/td-option-group.interface.d.ts +3 -3
  233. package/src/components/form/td-radio/td-radio.class.d.ts +2 -3
  234. package/src/components/form/td-radio/td-radio.class.js +8 -5
  235. package/src/components/form/td-radio/td-radio.interface.d.ts +3 -3
  236. package/src/components/form/td-radio-button/td-radio-button.class.d.ts +2 -3
  237. package/src/components/form/td-radio-button/td-radio-button.class.js +9 -9
  238. package/src/components/form/td-radio-button/td-radio-button.interface.d.ts +3 -3
  239. package/src/components/form/td-radio-group/td-radio-group.class.d.ts +2 -5
  240. package/src/components/form/td-radio-group/td-radio-group.class.js +14 -11
  241. package/src/components/form/td-radio-group/td-radio-group.interface.d.ts +3 -4
  242. package/src/components/form/td-select/dropdown/dropdown.class.d.ts +2 -2
  243. package/src/components/form/td-select/dropdown/dropdown.class.js +2 -3
  244. package/src/components/form/td-select/dropdown/dropdown.interface.d.ts +3 -4
  245. package/src/components/form/td-select/td-select.class.d.ts +4 -6
  246. package/src/components/form/td-select/td-select.class.js +4 -6
  247. package/src/components/form/td-select/td-select.interface.d.ts +13 -5
  248. package/src/components/form/td-select/td-select.style.d.ts +23 -0
  249. package/src/components/form/td-select/td-select.style.js +170 -1
  250. package/src/components/form/td-switch/td-switch.class.d.ts +2 -3
  251. package/src/components/form/td-switch/td-switch.class.js +2 -3
  252. package/src/components/form/td-switch/td-switch.interface.d.ts +3 -4
  253. package/src/components/form/td-switch/widget/td-switch-core.js +4 -4
  254. package/src/components/navigation/td-affix/td-affix.class.d.ts +2 -3
  255. package/src/components/navigation/td-affix/td-affix.class.js +2 -3
  256. package/src/components/navigation/td-affix/td-affix.interface.d.ts +3 -4
  257. package/src/components/navigation/td-anchor/td-anchor-link/td-anchor-link.class.d.ts +2 -2
  258. package/src/components/navigation/td-anchor/td-anchor-link/td-anchor-link.class.js +2 -3
  259. package/src/components/navigation/td-anchor/td-anchor-link/td-anchor-link.interface.d.ts +3 -4
  260. package/src/components/navigation/td-anchor/td-anchor.class.d.ts +2 -2
  261. package/src/components/navigation/td-anchor/td-anchor.class.js +6 -4
  262. package/src/components/navigation/td-anchor/td-anchor.function.js +1 -1
  263. package/src/components/navigation/td-anchor/td-anchor.interface.d.ts +3 -3
  264. package/src/components/navigation/td-backtop/td-backtop.class.d.ts +5 -6
  265. package/src/components/navigation/td-backtop/td-backtop.class.js +36 -59
  266. package/src/components/navigation/td-backtop/td-backtop.const.d.ts +18 -0
  267. package/src/components/navigation/td-backtop/td-backtop.const.js +21 -0
  268. package/src/components/navigation/td-backtop/td-backtop.interface.d.ts +3 -3
  269. package/src/components/navigation/td-backtop/td-backtop.style.d.ts +2 -0
  270. package/src/components/navigation/td-backtop/td-backtop.style.js +19 -1
  271. package/src/components/navigation/td-backtop/use-backtop.d.ts +2 -3
  272. package/src/components/navigation/td-backtop/use-backtop.js +2 -2
  273. package/src/components/navigation/td-breadcrumb/td-breadcrumb.class.d.ts +3 -3
  274. package/src/components/navigation/td-breadcrumb/td-breadcrumb.class.js +12 -8
  275. package/src/components/navigation/td-breadcrumb/td-breadcrumb.interface.d.ts +3 -4
  276. package/src/components/navigation/td-breadcrumb-item/td-breadcrumb-item.class.d.ts +2 -2
  277. package/src/components/navigation/td-breadcrumb-item/td-breadcrumb-item.class.js +2 -3
  278. package/src/components/navigation/td-breadcrumb-item/td-breadcrumb-item.interface.d.ts +3 -4
  279. package/src/components/navigation/td-menu/td-menu.class.d.ts +2 -2
  280. package/src/components/navigation/td-menu/td-menu.class.js +4 -3
  281. package/src/components/navigation/td-menu/td-menu.interface.d.ts +3 -4
  282. package/src/components/navigation/td-tabs/td-tab-bar.class.d.ts +2 -2
  283. package/src/components/navigation/td-tabs/td-tab-bar.class.js +3 -3
  284. package/src/components/navigation/td-tabs/td-tab-bar.interface.d.ts +3 -3
  285. package/src/components/navigation/td-tabs/td-tab-nav.class.d.ts +2 -3
  286. package/src/components/navigation/td-tabs/td-tab-nav.class.js +3 -4
  287. package/src/components/navigation/td-tabs/td-tab-nav.interface.d.ts +3 -3
  288. package/src/components/navigation/td-tabs/td-tab-pane.class.d.ts +2 -3
  289. package/src/components/navigation/td-tabs/td-tab-pane.class.js +12 -16
  290. package/src/components/navigation/td-tabs/td-tab-pane.interface.d.ts +3 -4
  291. package/src/components/navigation/td-tabs/td-tabs.class.d.ts +2 -2
  292. package/src/components/navigation/td-tabs/td-tabs.class.js +6 -4
  293. package/src/components/navigation/td-tabs/td-tabs.interface.d.ts +3 -3
  294. package/src/components/others/example/example-source-wrapper.js +2 -1
  295. package/src/components/others/td-divider/td-divider.class.d.ts +2 -2
  296. package/src/components/others/td-divider/td-divider.class.js +2 -3
  297. package/src/components/others/td-divider/td-divider.interface.d.ts +3 -3
  298. package/src/constants/aria.d.ts +17 -0
  299. package/src/constants/aria.js +20 -0
  300. package/src/hooks/index.d.ts +1 -0
  301. package/src/hooks/index.js +1 -0
  302. package/src/hooks/use-delayed-toggle.d.ts +23 -0
  303. package/src/hooks/use-delayed-toggle.js +52 -0
  304. package/src/styles/var.d.ts +2 -16
  305. package/src/styles/var.js +7 -17
  306. package/src/utils/dom/event.d.ts +6 -0
  307. package/src/utils/dom/event.js +17 -0
  308. package/src/ui/ui.abstract.d.ts +0 -18
  309. package/src/ui/ui.abstract.js +0 -50
  310. package/src/ui/ui.interface.d.ts +0 -12
  311. package/src/ui/ui.interface.js +0 -2
@@ -2,12 +2,13 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TdScrollbar = void 0;
4
4
  const framework_1 = require("@type-dom/framework");
5
- const ui_abstract_1 = require("../../../ui/ui.abstract");
6
5
  const bar_class_1 = require("./bar/bar.class");
7
- class TdScrollbar extends ui_abstract_1.UI {
6
+ class TdScrollbar extends framework_1.TypeHtml {
8
7
  constructor(params = {}) {
9
- super(params, params === null || params === void 0 ? void 0 : params.tag);
8
+ super();
10
9
  this.className = 'TdScrollbar';
10
+ this.nodeName = params.tag || 'div';
11
+ this.dom = document.createElement(this.nodeName);
11
12
  this.attr.addName('td-scrollbar');
12
13
  this.style.addObj({
13
14
  overflow: 'hidden',
@@ -1,10 +1,9 @@
1
- import { TypeElement } from '@type-dom/framework';
2
1
  import { IStyle } from '@type-dom/css-type';
3
- import { IUI, IUIConfig } from '../../../ui/ui.interface';
4
- export interface ITdScrollbar extends IUI {
2
+ import { ITypeConfig, ITypeHtml, TypeElement } from '@type-dom/framework';
3
+ export interface ITdScrollbar extends ITypeHtml {
5
4
  className: 'TdScrollbar';
6
5
  }
7
- export interface ITdScrollbarConfig extends IUIConfig {
6
+ export interface ITdScrollbarConfig extends ITypeConfig {
8
7
  /**
9
8
  * @description height of scrollbar
10
9
  */
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- // export const scrollbarProps = buildProps({
3
+ // export const scrollbarProps = ({
4
4
  //
5
5
  // } as const)
@@ -1,6 +1,6 @@
1
- import { UI } from '../../../../ui/ui.abstract';
1
+ import { TypeDiv } from '@type-dom/framework';
2
2
  import { ITdScrollbarThumb, ITdScrollbarThumbConfig } from './thumb.interface';
3
- export declare class TdScrollbarThumb extends UI implements ITdScrollbarThumb {
3
+ export declare class TdScrollbarThumb extends TypeDiv implements ITdScrollbarThumb {
4
4
  className: 'TdScrollbarThumb';
5
5
  props: ITdScrollbarThumbConfig;
6
6
  private thumb;
@@ -2,11 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TdScrollbarThumb = void 0;
4
4
  const framework_1 = require("@type-dom/framework");
5
- const ui_abstract_1 = require("../../../../ui/ui.abstract");
6
5
  const var_1 = require("../../../../styles/var");
7
- class TdScrollbarThumb extends ui_abstract_1.UI {
6
+ class TdScrollbarThumb extends framework_1.TypeDiv {
8
7
  constructor(params = {}) {
9
- super(params);
8
+ super();
10
9
  this.className = 'TdScrollbarThumb';
11
10
  this.attr.addName('td-scrollbar-thumb');
12
11
  this.style.addObj({
@@ -1,8 +1,8 @@
1
- import { IUI, IUIConfig } from '../../../../ui/ui.interface';
2
- export interface ITdScrollbarThumb extends IUI {
1
+ import { ITypeConfig, ITypeDiv } from '@type-dom/framework';
2
+ export interface ITdScrollbarThumb extends ITypeDiv {
3
3
  className: 'TdScrollbarThumb';
4
4
  }
5
- export interface ITdScrollbarThumbConfig extends IUIConfig {
5
+ export interface ITdScrollbarThumbConfig extends ITypeConfig {
6
6
  vertical?: boolean;
7
7
  size?: string;
8
8
  move?: number;
@@ -1,6 +1,6 @@
1
- import { UI } from '../../../ui/ui.abstract';
1
+ import { TypeDiv } from '@type-dom/framework';
2
2
  import { ITdSpace, ITdSpaceConfig } from './td-space.interface';
3
- export declare class TdSpace extends UI implements ITdSpace {
3
+ export declare class TdSpace extends TypeDiv implements ITdSpace {
4
4
  className: 'TdSpace';
5
5
  props: ITdSpaceConfig;
6
6
  horizontalSize?: number;
@@ -3,27 +3,33 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TdSpace = void 0;
4
4
  const utils_1 = require("@type-dom/utils");
5
5
  const framework_1 = require("@type-dom/framework");
6
- const ui_abstract_1 = require("../../../ui/ui.abstract");
7
6
  const td_space_const_1 = require("./td-space.const");
8
- class TdSpace extends ui_abstract_1.UI {
7
+ class TdSpace extends framework_1.TypeDiv {
9
8
  constructor(params = {}) {
10
- super(params);
9
+ super();
11
10
  this.className = 'TdSpace';
11
+ this.attr.addName('td-space');
12
12
  this.style.addObj({
13
13
  display: 'inline-flex',
14
14
  verticalAlign: 'top'
15
15
  });
16
- this.addChild(this.getSlotNode());
16
+ this.slotChild(params.slot);
17
17
  this.props = this.useParams(params);
18
18
  }
19
19
  setup() {
20
20
  this.children.forEach((item) => {
21
- if (item instanceof framework_1.TypeElement) {
21
+ if (item instanceof framework_1.TypeHtml) {
22
22
  item.style.addObj({
23
23
  display: 'flex',
24
24
  flexWrap: 'wrap'
25
25
  });
26
26
  }
27
+ else if (item instanceof framework_1.TypeFragment) {
28
+ item.addStyleObj({
29
+ display: 'flex',
30
+ flexWrap: 'wrap'
31
+ });
32
+ }
27
33
  });
28
34
  const props = this.props;
29
35
  this.useSize(props === null || props === void 0 ? void 0 : props.size);
@@ -1,11 +1,10 @@
1
- import { StyleAlignItems, TypeSvgSvg } from '@type-dom/framework';
2
- import { IUI, IUIConfig } from '../../../ui/ui.interface';
3
- export interface ITdSpace extends IUI {
1
+ import { ITypeConfig, ITypeDiv, StyleAlignItems, TypeSvgSvg } from '@type-dom/framework';
2
+ export interface ITdSpace extends ITypeDiv {
4
3
  className: 'TdSpace';
5
4
  horizontalSize?: number;
6
5
  verticalSize?: number;
7
6
  }
8
- export interface ITdSpaceConfig extends IUIConfig {
7
+ export interface ITdSpaceConfig extends ITypeConfig {
9
8
  /**
10
9
  * @description Placement direction 排列的方向
11
10
  */
@@ -1,8 +1,10 @@
1
- import { UI } from '../../../ui/ui.abstract';
1
+ import { TypeHtml } from '@type-dom/framework';
2
2
  import { TdIcon } from '../td-icon/td-icon.class';
3
3
  import { ITdText, ITdTextConfig } from './td-text.interface';
4
- export declare class TdText extends UI implements ITdText {
4
+ export declare class TdText extends TypeHtml implements ITdText {
5
5
  className: 'TdText';
6
+ nodeName: string;
7
+ dom: HTMLElement;
6
8
  props: ITdTextConfig;
7
9
  icon?: TdIcon;
8
10
  constructor(params?: ITdTextConfig);
@@ -1,18 +1,20 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TdText = void 0;
4
- const ui_abstract_1 = require("../../../ui/ui.abstract");
4
+ const framework_1 = require("@type-dom/framework");
5
5
  const td_text_style_1 = require("./td-text.style");
6
- class TdText extends ui_abstract_1.UI {
6
+ class TdText extends framework_1.TypeHtml {
7
7
  constructor(params = {}) {
8
- super(params, (params === null || params === void 0 ? void 0 : params.tag) || 'span');
8
+ super();
9
9
  this.className = 'TdText';
10
+ this.nodeName = params.tag || 'span';
11
+ this.dom = document.createElement(this.nodeName);
10
12
  this.style.addObj(td_text_style_1.$baseText);
11
- this.props = this.useParams(params);
12
13
  // this.addChild(this.getSlotNode());
13
14
  if (params.slot) {
14
15
  this.slotChild(params.slot);
15
16
  }
17
+ this.props = this.useParams(params);
16
18
  }
17
19
  setup() {
18
20
  const props = this.props;
@@ -1,10 +1,10 @@
1
- import { IUI, IUIConfig } from '../../../ui/ui.interface';
1
+ import { ITypeConfig, ITypeHtml } from '@type-dom/framework';
2
2
  import { IType } from '../../../styles';
3
3
  import { ISize } from '../../../styles/size';
4
- export interface ITdText extends IUI {
4
+ export interface ITdText extends ITypeHtml {
5
5
  className: 'TdText';
6
6
  }
7
- export interface ITdTextConfig extends IUIConfig {
7
+ export interface ITdTextConfig extends ITypeConfig {
8
8
  type?: IType;
9
9
  size?: ISize;
10
10
  /**
@@ -1,6 +1,6 @@
1
- import { UI } from '../../../ui/ui.abstract';
1
+ import { TypeSpan } from '@type-dom/framework';
2
2
  import { ITdAvatar, ITdAvatarConfig } from './td-avatar.interface';
3
- export declare class TdAvatar extends UI implements ITdAvatar {
3
+ export declare class TdAvatar extends TypeSpan implements ITdAvatar {
4
4
  className: 'TdAvatar';
5
5
  props: ITdAvatarConfig;
6
6
  private img?;
@@ -1,38 +1,20 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TdAvatar = void 0;
4
- const ui_abstract_1 = require("../../../ui/ui.abstract");
4
+ const utils_1 = require("@type-dom/utils");
5
5
  const framework_1 = require("@type-dom/framework");
6
6
  const td_avatar_style_1 = require("./td-avatar.style");
7
- const utils_1 = require("@type-dom/utils");
8
- class TdAvatar extends ui_abstract_1.UI {
7
+ class TdAvatar extends framework_1.TypeSpan {
9
8
  constructor(params = {}) {
10
- super(params, 'span');
9
+ super();
11
10
  this.className = 'TdAvatar';
12
11
  this.attr.addName('td-avatar');
13
- this.style.addObj({
14
- display: 'inline-flex',
15
- justifyContent: 'center',
16
- alignItems: 'center',
17
- boxSizing: 'border-box',
18
- textAlign: 'center',
19
- overflow: 'hidden',
20
- // color: getCssVar('avatar', 'text-color'),
21
- color: td_avatar_style_1.$avatar.textColor,
22
- // background: getCssVar('avatar', 'bg-color'),
23
- background: td_avatar_style_1.$avatar.bgColor,
24
- // width: getCssVar('avatar', 'size'),
25
- width: td_avatar_style_1.$avatarSize.default,
26
- // height: getCssVar('avatar', 'size'),
27
- height: td_avatar_style_1.$avatarSize.default,
28
- // font-size: getCssVar('avatar', 'text-size'),
29
- fontSize: td_avatar_style_1.$avatar.textSize
30
- });
12
+ this.style.addObj(td_avatar_style_1.$avatarStyle);
31
13
  this.hasLoadError = false;
32
14
  this.props = this.useParams(params);
33
15
  }
34
16
  setup() {
35
- var _a, _b, _c;
17
+ var _a, _b, _c, _d;
36
18
  const props = this.props;
37
19
  if (((props === null || props === void 0 ? void 0 : props.src) || (props === null || props === void 0 ? void 0 : props.srcSet)) && !this.hasLoadError) {
38
20
  this.img = new framework_1.Img({
@@ -77,12 +59,18 @@ class TdAvatar extends ui_abstract_1.UI {
77
59
  width: (0, utils_1.addUnit)(size),
78
60
  height: (0, utils_1.addUnit)(size)
79
61
  });
80
- if ((props === null || props === void 0 ? void 0 : props.slot) instanceof framework_1.TypeElement) {
62
+ if ((props === null || props === void 0 ? void 0 : props.slot) instanceof framework_1.TypeHtml) {
81
63
  props.slot.style.addObj({
82
64
  width: (0, utils_1.addUnit)(size),
83
65
  height: (0, utils_1.addUnit)(size)
84
66
  });
85
67
  }
68
+ else if ((props === null || props === void 0 ? void 0 : props.slot) instanceof framework_1.TypeFragment) {
69
+ props.slot.addStyleObj({
70
+ width: (0, utils_1.addUnit)(size),
71
+ height: (0, utils_1.addUnit)(size)
72
+ });
73
+ }
86
74
  }
87
75
  else {
88
76
  this.style.addObj({
@@ -93,12 +81,18 @@ class TdAvatar extends ui_abstract_1.UI {
93
81
  width: td_avatar_style_1.$avatarSize[size],
94
82
  height: td_avatar_style_1.$avatarSize[size]
95
83
  });
96
- if ((props === null || props === void 0 ? void 0 : props.slot) instanceof framework_1.TypeElement) {
84
+ if ((props === null || props === void 0 ? void 0 : props.slot) instanceof framework_1.TypeHtml) {
97
85
  props.slot.style.addObj({
98
86
  width: td_avatar_style_1.$avatarSize[size],
99
87
  height: td_avatar_style_1.$avatarSize[size]
100
88
  });
101
89
  }
90
+ else if ((props === null || props === void 0 ? void 0 : props.slot) instanceof framework_1.TypeFragment) {
91
+ (_d = props.slot) === null || _d === void 0 ? void 0 : _d.addStyleObj({
92
+ width: td_avatar_style_1.$avatarSize[size],
93
+ height: td_avatar_style_1.$avatarSize[size]
94
+ });
95
+ }
102
96
  }
103
97
  }
104
98
  // todo 监听 src 改变
@@ -1,11 +1,11 @@
1
1
  import { Globals } from '@type-dom/css-type';
2
- import { IUI, IUIConfig } from '../../../ui/ui.interface';
2
+ import { ITypeConfig, ITypeSpan } from '@type-dom/framework';
3
3
  import { ISize } from '../../../styles/size';
4
4
  import { TdIcon } from '../../basic/td-icon/td-icon.class';
5
- export interface ITdAvatar extends IUI {
5
+ export interface ITdAvatar extends ITypeSpan {
6
6
  className: 'TdAvatar';
7
7
  }
8
- export interface ITdAvatarConfig extends IUIConfig {
8
+ export interface ITdAvatarConfig extends ITypeConfig {
9
9
  /**
10
10
  * @description avatar size.
11
11
  * default: '',
@@ -1,3 +1,4 @@
1
+ import { IStyle } from '@type-dom/css-type';
1
2
  export declare const $avatar: {
2
3
  textColor: string;
3
4
  bgColor: string;
@@ -10,4 +11,5 @@ export declare const $avatarSize: {
10
11
  default: string;
11
12
  small: string;
12
13
  };
14
+ export declare const $avatarStyle: IStyle;
13
15
  export declare const $avatarSizeDefault: string;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.$avatarSizeDefault = exports.$avatarSize = exports.$avatar = void 0;
3
+ exports.$avatarSizeDefault = exports.$avatarStyle = exports.$avatarSize = exports.$avatar = void 0;
4
4
  const var_1 = require("../../../styles/var");
5
5
  exports.$avatar = {
6
6
  // 'text-color': getCssVar('color-white'),
@@ -17,4 +17,22 @@ exports.$avatarSize = {
17
17
  default: '40px',
18
18
  small: '24px'
19
19
  };
20
+ exports.$avatarStyle = {
21
+ display: 'inline-flex',
22
+ justifyContent: 'center',
23
+ alignItems: 'center',
24
+ boxSizing: 'border-box',
25
+ textAlign: 'center',
26
+ overflow: 'hidden',
27
+ // color: getCssVar('avatar', 'text-color'),
28
+ color: exports.$avatar.textColor,
29
+ // background: getCssVar('avatar', 'bg-color'),
30
+ background: exports.$avatar.bgColor,
31
+ // width: getCssVar('avatar', 'size'),
32
+ width: exports.$avatarSize.default,
33
+ // height: getCssVar('avatar', 'size'),
34
+ height: exports.$avatarSize.default,
35
+ // font-size: getCssVar('avatar', 'text-size'),
36
+ fontSize: exports.$avatar.textSize
37
+ };
20
38
  exports.$avatarSizeDefault = exports.$avatarSize.default;
@@ -1,6 +1,6 @@
1
- import { UI } from '../../../ui/ui.abstract';
1
+ import { TypeDiv } from '@type-dom/framework';
2
2
  import type { ITdBadge, ITdBadgeConfig } from './td-badge.interface';
3
- export declare class TdBadge extends UI implements ITdBadge {
3
+ export declare class TdBadge extends TypeDiv implements ITdBadge {
4
4
  className: 'TdBadge';
5
5
  props: ITdBadgeConfig;
6
6
  private sup;
@@ -3,13 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TdBadge = void 0;
4
4
  const utils_1 = require("@type-dom/utils");
5
5
  const framework_1 = require("@type-dom/framework");
6
- const ui_abstract_1 = require("../../../ui/ui.abstract");
7
6
  const var_1 = require("../../../styles/var");
8
7
  const td_badge_style_1 = require("./td-badge.style");
9
- class TdBadge extends ui_abstract_1.UI {
8
+ class TdBadge extends framework_1.TypeDiv {
10
9
  constructor(params = {}) {
11
10
  var _a, _b, _c, _d;
12
- super(params);
11
+ super();
13
12
  console.log('TdBadge constructor . ');
14
13
  this.className = 'TdBadge';
15
14
  this.attr.addName('td-badge');
@@ -44,7 +43,8 @@ class TdBadge extends ui_abstract_1.UI {
44
43
  marginTop: (0, utils_1.addUnit)((_d = (_c = params === null || params === void 0 ? void 0 : params.offset) === null || _c === void 0 ? void 0 : _c[1]) !== null && _d !== void 0 ? _d : 0)
45
44
  }
46
45
  });
47
- this.addChild(this.getSlotNode());
46
+ // this.addChild(this.getSlotNode());
47
+ this.slotChild(params.slot);
48
48
  this.addChild(new framework_1.Transition({
49
49
  name: 'td-badge',
50
50
  parent: this,
@@ -1,9 +1,9 @@
1
- import type { IUI, IUIConfig } from '../../../ui/ui.interface';
2
1
  import { IStyle } from '@type-dom/css-type';
3
- export interface ITdBadge extends IUI {
2
+ import { ITypeConfig, ITypeDiv } from '@type-dom/framework';
3
+ export interface ITdBadge extends ITypeDiv {
4
4
  className: 'TdBadge';
5
5
  }
6
- export interface ITdBadgeConfig extends IUIConfig {
6
+ export interface ITdBadgeConfig extends ITypeConfig {
7
7
  /**
8
8
  * @description display value.
9
9
  * default: '',
@@ -1,14 +1,13 @@
1
- import { Div } from '@type-dom/framework';
2
- import { UI } from '../../../ui/ui.abstract';
1
+ import { Div, TypeDiv } from '@type-dom/framework';
3
2
  import { ITdCard, ITdCardConfig } from './td-card.interface';
4
- export declare class TdCard extends UI implements ITdCard {
3
+ export declare class TdCard extends TypeDiv implements ITdCard {
5
4
  className: 'TdCard';
6
5
  props: ITdCardConfig;
7
6
  body: Div;
8
7
  header?: Div;
9
8
  footer?: Div;
10
9
  constructor(params?: ITdCardConfig);
11
- addShadow(params?: ITdCardConfig): void;
10
+ addShadow(params: ITdCardConfig): void;
12
11
  addHeader(params?: ITdCardConfig): void;
13
- addFooter(params?: ITdCardConfig): void;
12
+ addFooter(params: ITdCardConfig): void;
14
13
  }
@@ -2,28 +2,14 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TdCard = void 0;
4
4
  const framework_1 = require("@type-dom/framework");
5
- const ui_abstract_1 = require("../../../ui/ui.abstract");
6
- const transition_1 = require("../../../styles/transition");
7
5
  const var_1 = require("../../../styles/var");
8
6
  const td_card_style_1 = require("./td-card.style");
9
- class TdCard extends ui_abstract_1.UI {
7
+ class TdCard extends framework_1.TypeDiv {
10
8
  constructor(params = {}) {
11
- super(params);
9
+ super();
12
10
  this.className = 'TdCard';
13
11
  this.attr.addName('td-card');
14
- this.style.addObj({
15
- // border-radius: getCssVar('card', 'border-radius'),
16
- borderRadius: td_card_style_1.$card.borderRadius,
17
- // border: 1px solid getCssVar('card', 'border-color'),
18
- border: '1px solid ' + td_card_style_1.$card.borderColor,
19
- // background-color: getCssVar('card', 'bg-color'),
20
- backgroundColor: td_card_style_1.$card.bgColor,
21
- overflow: 'hidden',
22
- // color: getCssVar('text-color', 'primary'),
23
- color: var_1.$textColor.primary,
24
- // transition: getCssVar('transition-duration'),
25
- transition: transition_1.$transitionDuration.default
26
- });
12
+ this.style.addObj(td_card_style_1.$cardStyle);
27
13
  this.addShadow(params);
28
14
  this.addHeader(params);
29
15
  this.body = new framework_1.Div({
@@ -32,13 +18,13 @@ class TdCard extends ui_abstract_1.UI {
32
18
  padding: td_card_style_1.$card.padding
33
19
  }
34
20
  });
35
- if (params === null || params === void 0 ? void 0 : params.bodyStyle) {
21
+ if (params.bodyStyle) {
36
22
  this.body.style.addObj(params.bodyStyle);
37
23
  }
38
- if (params === null || params === void 0 ? void 0 : params.bodyClass) {
24
+ if (params.bodyClass) {
39
25
  this.body.attr.addClass(params.bodyClass);
40
26
  }
41
- if (params === null || params === void 0 ? void 0 : params.slot) {
27
+ if (params.slot) {
42
28
  this.body.slotChild(params.slot);
43
29
  }
44
30
  this.addChild(this.body);
@@ -46,7 +32,7 @@ class TdCard extends ui_abstract_1.UI {
46
32
  this.props = this.useParams(params);
47
33
  }
48
34
  addShadow(params) {
49
- const shadow = (params === null || params === void 0 ? void 0 : params.shadow) || 'always';
35
+ const shadow = params.shadow || 'always';
50
36
  if (shadow === 'always') {
51
37
  this.style.addObj({
52
38
  boxShadow: var_1.$boxShadow.light
@@ -67,33 +53,33 @@ class TdCard extends ui_abstract_1.UI {
67
53
  var _a;
68
54
  if ((_a = params === null || params === void 0 ? void 0 : params.slots) === null || _a === void 0 ? void 0 : _a.header) {
69
55
  this.header = new framework_1.Div({
70
- styleObj: td_card_style_1.$cardHeader,
71
- childNodes: [params.slots.header]
56
+ styleObj: td_card_style_1.$cardHeaderStyle
72
57
  });
58
+ this.header.slotChild(params.slots.header);
73
59
  this.addChild(this.header);
74
60
  }
75
61
  else if (params === null || params === void 0 ? void 0 : params.header) {
76
62
  // 文本
77
63
  this.header = new framework_1.Div({
78
64
  text: params.header,
79
- styleObj: td_card_style_1.$cardHeader
65
+ styleObj: td_card_style_1.$cardHeaderStyle
80
66
  });
81
67
  this.addChild(this.header);
82
68
  }
83
69
  }
84
70
  addFooter(params) {
85
71
  var _a;
86
- if ((_a = params === null || params === void 0 ? void 0 : params.slots) === null || _a === void 0 ? void 0 : _a.footer) {
72
+ if ((_a = params.slots) === null || _a === void 0 ? void 0 : _a.footer) {
87
73
  this.footer = new framework_1.Div({
88
- styleObj: td_card_style_1.$cardFooter,
89
- childNodes: [params.slots.footer]
74
+ styleObj: td_card_style_1.$cardFooterStyle
90
75
  });
76
+ this.footer.slotChild(params.slots.footer);
91
77
  this.addChild(this.footer);
92
78
  }
93
- else if (params === null || params === void 0 ? void 0 : params.footer) {
79
+ else if (params.footer) {
94
80
  this.footer = new framework_1.Div({
95
- text: params.footer,
96
- styleObj: td_card_style_1.$cardFooter
81
+ slot: params.footer,
82
+ styleObj: td_card_style_1.$cardFooterStyle
97
83
  });
98
84
  this.addChild(this.footer);
99
85
  }
@@ -1,9 +1,9 @@
1
- import { IUI, IUIConfig } from '../../../ui/ui.interface';
2
1
  import { IStyle } from '@type-dom/css-type';
3
- export interface ITdCard extends IUI {
2
+ import { ITypeConfig, ITypeDiv } from '@type-dom/framework';
3
+ export interface ITdCard extends ITypeDiv {
4
4
  className: 'TdCard';
5
5
  }
6
- export interface ITdCardConfig extends IUIConfig {
6
+ export interface ITdCardConfig extends ITypeConfig {
7
7
  /**
8
8
  * @description title of the card. Also accepts a DOM passed by `slot#header`
9
9
  * default: '',
@@ -5,5 +5,6 @@ export declare const $card: {
5
5
  padding: string;
6
6
  bgColor: string;
7
7
  };
8
- export declare const $cardHeader: IStyle;
9
- export declare const $cardFooter: IStyle;
8
+ export declare const $cardStyle: IStyle;
9
+ export declare const $cardHeaderStyle: IStyle;
10
+ export declare const $cardFooterStyle: IStyle;
@@ -1,7 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.$cardFooter = exports.$cardHeader = exports.$card = void 0;
3
+ exports.$cardFooterStyle = exports.$cardHeaderStyle = exports.$cardStyle = exports.$card = void 0;
4
4
  const var_1 = require("../../../styles/var");
5
+ const transition_1 = require("../../../styles/transition");
5
6
  exports.$card = {
6
7
  // 'border-color': getCssVar('border-color', 'light'),
7
8
  borderColor: var_1.$borderColor.light,
@@ -10,7 +11,20 @@ exports.$card = {
10
11
  // 'bg-color': getCssVar('fill-color', 'blank'),
11
12
  bgColor: var_1.$fillColor.blank
12
13
  };
13
- exports.$cardHeader = {
14
+ exports.$cardStyle = {
15
+ // border-radius: getCssVar('card', 'border-radius'),
16
+ borderRadius: exports.$card.borderRadius,
17
+ // border: 1px solid getCssVar('card', 'border-color'),
18
+ border: '1px solid ' + exports.$card.borderColor,
19
+ // background-color: getCssVar('card', 'bg-color'),
20
+ backgroundColor: exports.$card.bgColor,
21
+ overflow: 'hidden',
22
+ // color: getCssVar('text-color', 'primary'),
23
+ color: var_1.$textColor.primary,
24
+ // transition: getCssVar('transition-duration'),
25
+ transition: transition_1.$transitionDuration.default
26
+ };
27
+ exports.$cardHeaderStyle = {
14
28
  // padding: calc(#{getCssVar('card', 'padding')} - 2px) getCssVar('card', 'padding'),
15
29
  padding: `calc(${exports.$card.padding} - 2px) ${exports.$card.padding}`,
16
30
  // border-bottom: 1px solid getCssVar('card', 'border-color'),
@@ -18,7 +32,7 @@ exports.$cardHeader = {
18
32
  // box-sizing: border-box,
19
33
  boxSizing: 'border-box'
20
34
  };
21
- exports.$cardFooter = {
35
+ exports.$cardFooterStyle = {
22
36
  // padding: calc(#{getCssVar('card', 'padding')} - 2px)
23
37
  // getCssVar('card', 'padding'),
24
38
  padding: `calc(${exports.$card.padding} - 2px) ${exports.$card.padding}`,
@@ -1,6 +1,6 @@
1
- import { UI } from '../../../ui/ui.abstract';
1
+ import { TypeSpan } from '@type-dom/framework';
2
2
  import { ITdCheckTag, ITdCheckTagConfig } from './td-check-tag.interface';
3
- export declare class TdCheckTag extends UI implements ITdCheckTag {
3
+ export declare class TdCheckTag extends TypeSpan implements ITdCheckTag {
4
4
  className: 'TdCheckTag';
5
5
  props: ITdCheckTagConfig;
6
6
  checked?: boolean;
@@ -1,18 +1,18 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TdCheckTag = void 0;
4
+ const framework_1 = require("@type-dom/framework");
4
5
  const var_1 = require("../../../styles/var");
5
- const ui_abstract_1 = require("../../../ui/ui.abstract");
6
6
  const event_1 = require("../../../constants/event");
7
7
  const td_check_tag_style_1 = require("./td-check-tag.style");
8
- class TdCheckTag extends ui_abstract_1.UI {
8
+ class TdCheckTag extends framework_1.TypeSpan {
9
9
  constructor(params = {}) {
10
- super(params, 'span');
10
+ super();
11
11
  this.className = 'TdCheckTag';
12
- this.attr.addName('td-check-tag');
13
12
  this.type = (params === null || params === void 0 ? void 0 : params.type) || 'primary';
14
13
  (0, td_check_tag_style_1.useType)();
15
- this.style.addObj(td_check_tag_style_1.$checkTag);
14
+ this.attr.addName('td-check-tag');
15
+ this.style.addObj(td_check_tag_style_1.$checkTagStyle);
16
16
  this.setChecked(params === null || params === void 0 ? void 0 : params.checked);
17
17
  this.props = this.useParams(params);
18
18
  this.addEvents({
@@ -1,10 +1,10 @@
1
+ import { ITypeConfig, ITypeSpan } from '@type-dom/framework';
1
2
  import { IType } from '../../../styles/var';
2
- import { IUI, IUIConfig } from '../../../ui/ui.interface';
3
3
  import { CHANGE_EVENT } from '../../../constants/event';
4
- export interface ITdCheckTag extends IUI {
4
+ export interface ITdCheckTag extends ITypeSpan {
5
5
  className: 'TdCheckTag';
6
6
  }
7
- export interface ITdCheckTagConfig extends IUIConfig {
7
+ export interface ITdCheckTagConfig extends ITypeConfig {
8
8
  /**
9
9
  * @description is checked
10
10
  * default: false,