@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
@@ -3,24 +3,24 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TdInput = 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_input_wrapper_class_1 = require("./widget/td-input-wrapper.class");
9
8
  const td_input_style_1 = require("./td-input.style");
10
9
  const td_textarea_wrapper_1 = require("./widget/td-textarea-wrapper");
11
- class TdInput extends ui_abstract_1.UI {
10
+ class TdInput extends framework_1.TypeDiv {
12
11
  constructor(params = {}) {
13
- super(params);
12
+ super();
14
13
  console.log('TdInput constructor . ');
15
14
  this.className = 'TdInput';
16
- this.attr.addName('td-input');
17
15
  this.attr.addObj({
16
+ name: 'td-input',
18
17
  tabIndex: 0
19
18
  });
20
19
  this.style.addObj({
21
20
  position: 'relative',
22
21
  display: 'inline-flex',
23
22
  width: '100%',
23
+ // width: '95%',
24
24
  boxSizing: 'border-box',
25
25
  verticalAlign: 'middle',
26
26
  // fontSize: var(--el-font-size-base),
@@ -33,35 +33,27 @@ class TdInput extends ui_abstract_1.UI {
33
33
  if (params === null || params === void 0 ? void 0 : params.modelValue) {
34
34
  this.modelValue = params.modelValue;
35
35
  }
36
- this.props = this.useParams(params);
37
- }
38
- get value() {
39
- return this.panel.inner.value;
40
- }
41
- setup() {
42
- const props = this.props;
43
- if (props === null || props === void 0 ? void 0 : props.width) {
44
- this.style.addWidth(props.width);
45
- }
46
36
  // todo
47
- if ((props === null || props === void 0 ? void 0 : props.type) === 'textarea') {
48
- props.parent = this;
49
- this.panel = new td_textarea_wrapper_1.TdTextareaWrapper(props);
37
+ if ((params === null || params === void 0 ? void 0 : params.type) === 'textarea') {
38
+ params.parent = this;
39
+ this.panel = new td_textarea_wrapper_1.TdTextareaWrapper(params);
50
40
  // this.textareaWrapper = new TdTextareaWrapper(props);
51
41
  }
52
42
  else {
53
- this.panel = new td_input_wrapper_class_1.TdInputWrapper(props);
43
+ this.panel = new td_input_wrapper_class_1.TdInputWrapper(params);
54
44
  }
55
- if (props === null || props === void 0 ? void 0 : props.placeholder) {
56
- this.placeholder = props.placeholder;
45
+ if (params === null || params === void 0 ? void 0 : params.placeholder) {
46
+ this.placeholder = params.placeholder;
57
47
  }
58
- this.panel.setParent(this);
59
48
  this.addChild(this.panel);
60
- if (!(props === null || props === void 0 ? void 0 : props.formatter) && (props === null || props === void 0 ? void 0 : props.parser)) {
49
+ if (params === null || params === void 0 ? void 0 : params.width) {
50
+ this.style.addWidth(params.width);
51
+ }
52
+ if (!(params === null || params === void 0 ? void 0 : params.formatter) && (params === null || params === void 0 ? void 0 : params.parser)) {
61
53
  throw new Error('If you set the parser, you also need to set the formatter');
62
54
  }
63
- if (this.props.disabled) {
64
- return;
55
+ if (params.disabled) {
56
+ // this.panel.setDisabled(true);
65
57
  }
66
58
  this.addEvents({
67
59
  mouseleave: (evt) => {
@@ -138,9 +130,13 @@ class TdInput extends ui_abstract_1.UI {
138
130
  this.emit('keydown', evt, element);
139
131
  }
140
132
  });
141
- if (this.props.type === 'textarea') {
142
- return; // ????
133
+ if (params.type === 'textarea') {
134
+ // ????
143
135
  }
136
+ this.props = this.useParams(params);
137
+ }
138
+ get value() {
139
+ return this.panel.inner.value;
144
140
  }
145
141
  setModelValue(value) {
146
142
  console.log('setModelValue . value is ', value);
@@ -197,6 +193,14 @@ class TdInput extends ui_abstract_1.UI {
197
193
  });
198
194
  }
199
195
  }
196
+ setShow(show, display = 'inline-flex') {
197
+ this.style.setObj({
198
+ display: show ? display : 'none'
199
+ });
200
+ this.panel.style.setObj({
201
+ display: show ? display : 'none'
202
+ });
203
+ }
200
204
  created() {
201
205
  // 注: 绑定变量要渲染前处理,而不是创建对象时处理
202
206
  if (this.props.modelValue) {
@@ -1,11 +1,10 @@
1
- import { IJsonDataProp, InputEnum, IObDataProp, Span, TypeSvgSvg } from '@type-dom/framework';
1
+ import { IJsonDataProp, InputEnum, IObDataProp, ITypeConfig, ITypeDiv, Span, TypeSvgSvg } from '@type-dom/framework';
2
2
  import { ISize } from '../../../styles/size';
3
- import { IUI, IUIConfig } from '../../../ui/ui.interface';
4
3
  import { TdInput } from './td-input.class';
5
- export interface ITdInput extends IUI {
4
+ export interface ITdInput extends ITypeDiv {
6
5
  className: 'TdInput';
7
6
  }
8
- export interface ITdInputConfig extends IUIConfig {
7
+ export interface ITdInputConfig extends ITypeConfig {
9
8
  parent?: TdInput;
10
9
  /**
11
10
  * @description native input id
@@ -10,4 +10,5 @@ export declare class TdInputSuffix extends TypeSpan {
10
10
  clearIcon?: TdIcon;
11
11
  passwordIcon?: TdIcon;
12
12
  constructor(parent: TdInputWrapper, config?: ITdInputConfig);
13
+ setup(): void;
13
14
  }
@@ -11,7 +11,7 @@ class TdInputSuffix extends framework_1.TypeSpan {
11
11
  this.parent = parent;
12
12
  this.className = 'TdInputSuffix';
13
13
  this.style.addObj({
14
- display: this.parent.suffixVisible ? 'inline-flex' : 'none',
14
+ display: 'inline-flex',
15
15
  whiteSpace: 'nowrap',
16
16
  flexShrink: 0,
17
17
  flexWrap: 'nowrap',
@@ -116,5 +116,10 @@ class TdInputSuffix extends framework_1.TypeSpan {
116
116
  this.suffixInner.addChild(this.suffixIcon);
117
117
  }
118
118
  }
119
+ setup() {
120
+ this.style.addObj({
121
+ display: this.parent.suffixVisible ? 'inline-flex' : 'none' // constructor 中this.parent.suffixVisible是undefined
122
+ });
123
+ }
119
124
  }
120
125
  exports.TdInputSuffix = TdInputSuffix;
@@ -182,7 +182,7 @@ class TdInputWrapper extends framework_1.TypeDiv {
182
182
  color: var_1.$textColor.disabled,
183
183
  // -webkit-text-fill-color: var(--el-disabled-text-color),
184
184
  WebkitTextFillColor: var_1.$textColor.disabled,
185
- cursor: 'notAllowed'
185
+ cursor: 'not-allowed'
186
186
  });
187
187
  }
188
188
  else {
@@ -226,14 +226,14 @@ class TdInputWrapper extends framework_1.TypeDiv {
226
226
  // }
227
227
  // }
228
228
  setShowClear(showClear) {
229
- var _a;
229
+ var _a, _b, _c;
230
230
  console.log('setShowClear . showClear is ', showClear);
231
231
  this.suffix.style.show(this.suffixVisible ? 'inline-flex' : 'none');
232
- (_a = this.suffix.clearIcon) === null || _a === void 0 ? void 0 : _a.style.show(showClear ? 'inline-flex' : 'none');
232
+ (_c = (_b = (_a = this.suffix) === null || _a === void 0 ? void 0 : _a.clearIcon) === null || _b === void 0 ? void 0 : _b.style) === null || _c === void 0 ? void 0 : _c.show(showClear ? 'inline-flex' : 'none');
233
233
  }
234
234
  setShowPassword(showPassword) {
235
- var _a;
236
- (_a = this.suffix.passwordIcon) === null || _a === void 0 ? void 0 : _a.style.show(showPassword ? 'inline-flex' : 'none');
235
+ var _a, _b;
236
+ (_b = (_a = this.suffix.passwordIcon) === null || _a === void 0 ? void 0 : _a.style) === null || _b === void 0 ? void 0 : _b.show(showPassword ? 'inline-flex' : 'none');
237
237
  }
238
238
  setNativeInputValue() {
239
239
  console.log('setNativeInputValue . ');
@@ -3,14 +3,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.calcTextareaHeight = calcTextareaHeight;
4
4
  const utils_1 = require("@type-dom/utils");
5
5
  let hiddenTextarea = undefined;
6
- const HIDDEN_STYLE = `
7
- height:0 !important;
8
- visibility:hidden !important;
9
- ${utils_1.isFireFox ? '' : 'overflow:hidden !important;'}
10
- position:absolute !important;
11
- z-index:-1000 !important;
12
- top:0 !important;
13
- right:0 !important;
6
+ const HIDDEN_STYLE = `
7
+ height:0 !important;
8
+ visibility:hidden !important;
9
+ ${utils_1.isFireFox ? '' : 'overflow:hidden !important;'}
10
+ position:absolute !important;
11
+ z-index:-1000 !important;
12
+ top:0 !important;
13
+ right:0 !important;
14
14
  `;
15
15
  const CONTEXT_STYLE = [
16
16
  'letter-spacing',
@@ -1,6 +1,6 @@
1
- import { UI } from '../../../ui/ui.abstract';
2
1
  import { ITdOption, ITdOptionConfig } from './td-option.interface';
3
- export declare class TdOption extends UI implements ITdOption {
2
+ import { TypeLI } from '@type-dom/framework';
3
+ export declare class TdOption extends TypeLI implements ITdOption {
4
4
  className: 'TdOption';
5
5
  props: ITdOptionConfig;
6
6
  constructor(params?: ITdOptionConfig);
@@ -1,11 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TdOption = void 0;
4
- const ui_abstract_1 = require("../../../ui/ui.abstract");
5
4
  const td_select_style_1 = require("../td-select/td-select.style");
6
- class TdOption extends ui_abstract_1.UI {
5
+ const framework_1 = require("@type-dom/framework");
6
+ class TdOption extends framework_1.TypeLI {
7
7
  constructor(params = {}) {
8
- super(params, 'li');
8
+ super();
9
9
  this.className = 'TdOption';
10
10
  this.attr.addObj({
11
11
  name: 'td-option',
@@ -1,8 +1,8 @@
1
- import { IUI, IUIConfig } from '../../../ui/ui.interface';
2
- export interface ITdOption extends IUI {
1
+ import { ITypeConfig, ITypeLI } from '@type-dom/framework';
2
+ export interface ITdOption extends ITypeLI {
3
3
  className: 'TdOption';
4
4
  }
5
- export interface ITdOptionConfig extends IUIConfig {
5
+ export interface ITdOptionConfig extends ITypeConfig {
6
6
  /**
7
7
  * @description value of option
8
8
  * required: true,
@@ -1,6 +1,6 @@
1
- import { UI } from '../../../ui/ui.abstract';
1
+ import { TypeUL } from '@type-dom/framework';
2
2
  import { ITdOptionGroup, ITdOptionGroupConfig } from './td-option-group.interface';
3
- export declare class TdOptionGroup extends UI implements ITdOptionGroup {
3
+ export declare class TdOptionGroup extends TypeUL implements ITdOptionGroup {
4
4
  className: 'TdOptionGroup';
5
5
  props: ITdOptionGroupConfig;
6
6
  constructor(params?: ITdOptionGroupConfig);
@@ -2,11 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TdOptionGroup = void 0;
4
4
  const framework_1 = require("@type-dom/framework");
5
- const ui_abstract_1 = require("../../../ui/ui.abstract");
6
5
  const td_select_style_1 = require("../td-select/td-select.style");
7
- class TdOptionGroup extends ui_abstract_1.UI {
6
+ class TdOptionGroup extends framework_1.TypeUL {
8
7
  constructor(params = {}) {
9
- super(params, 'ul');
8
+ super();
10
9
  this.className = 'TdOptionGroup';
11
10
  this.attr.addObj({
12
11
  name: 'option-group-wrap'
@@ -1,8 +1,8 @@
1
- import { IUI, IUIConfig } from '../../../ui/ui.interface';
2
- export interface ITdOptionGroup extends IUI {
1
+ import { ITypeConfig, ITypeUL } from '@type-dom/framework';
2
+ export interface ITdOptionGroup extends ITypeUL {
3
3
  className: 'TdOptionGroup';
4
4
  }
5
- export interface ITdOptionGroupConfig extends IUIConfig {
5
+ export interface ITdOptionGroupConfig extends ITypeConfig {
6
6
  /**
7
7
  * @description name of the group
8
8
  */
@@ -1,7 +1,6 @@
1
- import { Input, Span } from '@type-dom/framework';
2
- import { UI } from '../../../ui/ui.abstract';
1
+ import { Input, Span, TypeLabel } from '@type-dom/framework';
3
2
  import { ITdRadio, ITdRadioConfig } from './td-radio.interface';
4
- export declare class TdRadio extends UI implements ITdRadio {
3
+ export declare class TdRadio extends TypeLabel implements ITdRadio {
5
4
  className: 'TdRadio';
6
5
  props: ITdRadioConfig;
7
6
  inputOriginal: Input;
@@ -2,13 +2,16 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TdRadio = 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
6
  const td_radio_group_class_1 = require("../td-radio-group/td-radio-group.class");
8
- class TdRadio extends ui_abstract_1.UI {
7
+ class TdRadio extends framework_1.TypeLabel {
9
8
  constructor(params = {}) {
10
- super(params, 'label');
9
+ super();
10
+ // this.useTag('label');
11
11
  this.className = 'TdRadio';
12
+ this.attr.addObj({
13
+ name: 'td-radio'
14
+ });
12
15
  this.style.addObj({
13
16
  color: var_1.$textColor.regular,
14
17
  fontWeight: var_1.$fontWeightPrimary,
@@ -160,7 +163,7 @@ class TdRadio extends ui_abstract_1.UI {
160
163
  this.disabled = disabled;
161
164
  if (disabled) {
162
165
  this.style.setObj({
163
- cursor: 'notAllowed',
166
+ cursor: 'not-allowed',
164
167
  opacity: 0.5
165
168
  // 禁用事件
166
169
  // pointerEvents: 'none',
@@ -170,7 +173,7 @@ class TdRadio extends ui_abstract_1.UI {
170
173
  });
171
174
  this.inputOriginal.attr.setObj({ disabled: true });
172
175
  this.inputInner.style.setObj({
173
- cursor: 'notAllowed',
176
+ cursor: 'not-allowed',
174
177
  // color: $colors.default.base,
175
178
  // borderWidth: '1px',
176
179
  // borderStyle: 'solid',
@@ -1,9 +1,9 @@
1
+ import { ITypeConfig, ITypeLabel } from '@type-dom/framework';
1
2
  import { ISize } from '../../../styles/size';
2
- import { IUI, IUIConfig } from '../../../ui/ui.interface';
3
- export interface ITdRadio extends IUI {
3
+ export interface ITdRadio extends ITypeLabel {
4
4
  className: 'TdRadio';
5
5
  }
6
- export interface ITdRadioConfig extends IUIConfig {
6
+ export interface ITdRadioConfig extends ITypeConfig {
7
7
  /**
8
8
  * @description binding value
9
9
  */
@@ -1,7 +1,6 @@
1
- import { Input, Span } from '@type-dom/framework';
2
- import { UI } from '../../../ui/ui.abstract';
1
+ import { Input, Span, TypeLabel } from '@type-dom/framework';
3
2
  import { ITdRadioButton, ITdRadioButtonConfig } from './td-radio-button.interface';
4
- export declare class TdRadioButton extends UI implements ITdRadioButton {
3
+ export declare class TdRadioButton extends TypeLabel implements ITdRadioButton {
5
4
  className: 'TdRadioButton';
6
5
  inputOriginal: Input;
7
6
  radioLabel: Span;
@@ -3,11 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TdRadioButton = void 0;
4
4
  const framework_1 = require("@type-dom/framework");
5
5
  const var_1 = require("../../../styles/var");
6
- const ui_abstract_1 = require("../../../ui/ui.abstract");
6
+ const td_button_style_1 = require("../../basic/td-button/td-button.style");
7
7
  const td_radio_group_class_1 = require("../td-radio-group/td-radio-group.class");
8
- class TdRadioButton extends ui_abstract_1.UI {
8
+ class TdRadioButton extends framework_1.TypeLabel {
9
9
  constructor(params = {}) {
10
- super(params, 'label');
10
+ super();
11
11
  this.className = 'TdRadioButton';
12
12
  this.attr.addName('radio-button');
13
13
  this.style.addObj({
@@ -61,7 +61,7 @@ class TdRadioButton extends ui_abstract_1.UI {
61
61
  // color: $buttonTextColor.default,
62
62
  // transition: getCssVar('transition-all'),
63
63
  fontSize: var_1.$fontSizes.base,
64
- padding: var_1.$paddingVerticalMap.default + ' ' + var_1.$paddingHorizontalMap.default
64
+ padding: td_button_style_1.$buttonPaddingVertical.default + ' ' + td_button_style_1.$buttonPaddingHorizontal.default
65
65
  }
66
66
  });
67
67
  this.addChildren(this.inputOriginal, this.radioLabel);
@@ -93,11 +93,11 @@ class TdRadioButton extends ui_abstract_1.UI {
93
93
  height: var_1.$commonComponentSize[size]
94
94
  });
95
95
  this.radioLabel.style.addObj({
96
- padding: var_1.$paddingVerticalMap[size] + ' ' + var_1.$paddingHorizontalMap[size],
96
+ padding: td_button_style_1.$buttonPaddingVertical[size] + ' ' + td_button_style_1.$buttonPaddingHorizontal[size],
97
97
  fontSize: var_1.$fontSizes[size]
98
98
  });
99
99
  if (props === null || props === void 0 ? void 0 : props.isFirst) {
100
- const radius = var_1.$borderRadiusMap[size];
100
+ const radius = td_button_style_1.$buttonBorderRadius[size];
101
101
  this.radioLabel.style.addObj({
102
102
  borderRadius: radius + ' 0 0 ' + radius
103
103
  });
@@ -108,13 +108,13 @@ class TdRadioButton extends ui_abstract_1.UI {
108
108
  });
109
109
  }
110
110
  if (props === null || props === void 0 ? void 0 : props.isLast) {
111
- const radius = var_1.$borderRadiusMap[size];
111
+ const radius = td_button_style_1.$buttonBorderRadius[size];
112
112
  this.radioLabel.style.addObj({
113
113
  borderRadius: '0 ' + radius + ' ' + radius + ' 0'
114
114
  });
115
115
  }
116
116
  if (props === null || props === void 0 ? void 0 : props.checked) {
117
- this.setChecked(props === null || props === void 0 ? void 0 : props.checked);
117
+ this.setChecked(!!(props === null || props === void 0 ? void 0 : props.checked));
118
118
  }
119
119
  if (props === null || props === void 0 ? void 0 : props.disabled) {
120
120
  this.setDisabled(props === null || props === void 0 ? void 0 : props.disabled);
@@ -149,7 +149,7 @@ class TdRadioButton extends ui_abstract_1.UI {
149
149
  this.disabled = disabled;
150
150
  if (disabled) {
151
151
  this.style.setObj({
152
- cursor: 'notAllowed',
152
+ cursor: 'not-allowed',
153
153
  opacity: 0.5
154
154
  // 禁用事件
155
155
  // pointerEvents: 'none',
@@ -1,9 +1,9 @@
1
+ import { ITypeConfig, ITypeLabel } from '@type-dom/framework';
1
2
  import { ISize } from '../../../styles/size';
2
- import { IUI, IUIConfig } from '../../../ui/ui.interface';
3
- export interface ITdRadioButton extends IUI {
3
+ export interface ITdRadioButton extends ITypeLabel {
4
4
  className: 'TdRadioButton';
5
5
  }
6
- export interface ITdRadioButtonConfig extends IUIConfig {
6
+ export interface ITdRadioButtonConfig extends ITypeConfig {
7
7
  /**
8
8
  * @description binding value
9
9
  */
@@ -1,12 +1,9 @@
1
- import { IJsonData, IJsonDataProp, IPrimitive } from '@type-dom/framework';
2
- import { UI } from '../../../ui/ui.abstract';
3
- import { TdRadio } from '../td-radio/td-radio.class';
1
+ import { IJsonData, IJsonDataProp, IPrimitive, TypeDiv } from '@type-dom/framework';
4
2
  import { ITdRadioConfig } from '../td-radio/td-radio.interface';
5
3
  import { ITdRadioGroup, ITdRadioGroupConfig } from './td-radio-group.interface';
6
- export declare class TdRadioGroup extends UI implements ITdRadioGroup {
4
+ export declare class TdRadioGroup extends TypeDiv implements ITdRadioGroup {
7
5
  className: 'TdRadioGroup';
8
6
  disabled?: boolean;
9
- childNodes: TdRadio[];
10
7
  props: ITdRadioGroupConfig;
11
8
  constructor(params?: ITdRadioGroupConfig);
12
9
  get resultValue(): IPrimitive | IJsonData | IJsonDataProp[];
@@ -2,13 +2,15 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TdRadioGroup = void 0;
4
4
  const framework_1 = require("@type-dom/framework");
5
- const ui_abstract_1 = require("../../../ui/ui.abstract");
6
5
  const td_radio_class_1 = require("../td-radio/td-radio.class");
7
6
  const td_radio_button_class_1 = require("../td-radio-button/td-radio-button.class");
8
- class TdRadioGroup extends ui_abstract_1.UI {
7
+ class TdRadioGroup extends framework_1.TypeDiv {
9
8
  constructor(params = {}) {
10
- super(params);
9
+ super();
11
10
  this.className = 'TdRadioGroup';
11
+ this.attr.addObj({
12
+ name: 'td-radio-group'
13
+ });
12
14
  this.style.addObj({
13
15
  display: 'inline-flex',
14
16
  alignItems: 'center',
@@ -16,7 +18,6 @@ class TdRadioGroup extends ui_abstract_1.UI {
16
18
  fontSize: '0',
17
19
  marginRight: '12px',
18
20
  });
19
- this.childNodes = [];
20
21
  this.props = this.useParams(params);
21
22
  }
22
23
  get resultValue() {
@@ -92,13 +93,15 @@ class TdRadioGroup extends ui_abstract_1.UI {
92
93
  }
93
94
  // console.error('value is ', value);
94
95
  this.childNodes.forEach((opt) => {
95
- if (String(opt.inputOriginal.attr.get('value')) === String(value)) {
96
- // 设置选中样式
97
- opt.setChecked(true);
98
- }
99
- else {
100
- // 设置非选中样式
101
- opt.setChecked(false);
96
+ if (opt instanceof td_radio_class_1.TdRadio) {
97
+ if (String(opt.inputOriginal.attr.get('value')) === String(value)) {
98
+ // 设置选中样式
99
+ opt.setChecked(true);
100
+ }
101
+ else {
102
+ // 设置非选中样式
103
+ opt.setChecked(false);
104
+ }
102
105
  }
103
106
  });
104
107
  }
@@ -1,11 +1,10 @@
1
+ import { IJsonData, IPrimitive, ITypeConfig, ITypeDiv, XProxy } from '@type-dom/framework';
1
2
  import { ISize } from '../../../styles/size';
2
- import { IUI, IUIConfig } from '../../../ui/ui.interface';
3
3
  import { ITdRadioConfig } from '../td-radio/td-radio.interface';
4
- import { IJsonData, IPrimitive, XProxy } from '@type-dom/framework';
5
- export interface ITdRadioGroup extends IUI {
4
+ export interface ITdRadioGroup extends ITypeDiv {
6
5
  className: 'TdRadioGroup';
7
6
  }
8
- export interface ITdRadioGroupConfig extends IUIConfig {
7
+ export interface ITdRadioGroupConfig extends ITypeConfig {
9
8
  isButton?: boolean;
10
9
  options?: ITdRadioConfig[];
11
10
  /**
@@ -1,6 +1,6 @@
1
- import { UI } from '../../../../ui/ui.abstract';
2
1
  import { ITdSelectDropdown, ITdSelectDropdownConfig } from './dropdown.interface';
3
- export declare class TdSelectDropDown extends UI implements ITdSelectDropdown {
2
+ import { TypeDiv } from '@type-dom/framework';
3
+ export declare class TdSelectDropDown extends TypeDiv implements ITdSelectDropdown {
4
4
  className: 'TdSelectDropdown';
5
5
  props: ITdSelectDropdownConfig;
6
6
  private header?;
@@ -2,12 +2,11 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TdSelectDropDown = void 0;
4
4
  const var_1 = require("../../../../styles/var");
5
- const ui_abstract_1 = require("../../../../ui/ui.abstract");
6
5
  const framework_1 = require("@type-dom/framework");
7
6
  const td_select_style_1 = require("../td-select.style");
8
- class TdSelectDropDown extends ui_abstract_1.UI {
7
+ class TdSelectDropDown extends framework_1.TypeDiv {
9
8
  constructor(params = {}) {
10
- super(params);
9
+ super();
11
10
  this.className = 'TdSelectDropdown';
12
11
  this.style.addObj({
13
12
  // z-index: calc(#{getCssVar('index-top')} + 1);
@@ -1,9 +1,8 @@
1
- import { IUI, IUIConfig } from '../../../../ui/ui.interface';
2
- import { TypeElement } from '@type-dom/framework';
3
- export interface ITdSelectDropdown extends IUI {
1
+ import { ITypeConfig, ITypeDiv, TypeElement } from '@type-dom/framework';
2
+ export interface ITdSelectDropdown extends ITypeDiv {
4
3
  className: 'TdSelectDropdown';
5
4
  }
6
- export interface ITdSelectDropdownConfig extends IUIConfig {
5
+ export interface ITdSelectDropdownConfig extends ITypeConfig {
7
6
  header?: TypeElement;
8
7
  footer?: TypeElement;
9
8
  }
@@ -1,8 +1,6 @@
1
- import { UI } from '../../../ui/ui.abstract';
2
- import { IUIConfig } from '../../../ui/ui.interface';
3
- import { ITdSelect } from './td-select.interface';
4
- export declare class TdSelect extends UI implements ITdSelect {
1
+ import { TypeDiv } from '@type-dom/framework';
2
+ import { ITdSelect, ITdSelectConfig } from './td-select.interface';
3
+ export declare class TdSelect extends TypeDiv implements ITdSelect {
5
4
  className: 'TdSelect';
6
- props: IUIConfig;
7
- constructor(params?: IUIConfig);
5
+ constructor(params?: ITdSelectConfig);
8
6
  }
@@ -2,15 +2,13 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TdSelect = void 0;
4
4
  const framework_1 = require("@type-dom/framework");
5
- const ui_abstract_1 = require("../../../ui/ui.abstract");
6
5
  const td_tooltip_class_1 = require("../../feedback/td-tooltip/td-tooltip.class");
7
6
  const dropdown_class_1 = require("./dropdown/dropdown.class");
8
- const td_select_style_1 = require("./td-select.style");
9
- class TdSelect extends ui_abstract_1.UI {
7
+ class TdSelect extends framework_1.TypeDiv {
10
8
  constructor(params = {}) {
11
- super(params);
9
+ super();
12
10
  this.className = 'TdSelect';
13
- this.style.addObj(td_select_style_1.$select);
11
+ // this.style.addObj($select); // todo 应该是 $selectStyle
14
12
  this.addChild(new td_tooltip_class_1.TdTooltip({
15
13
  slot: [
16
14
  new framework_1.Div({
@@ -20,7 +18,7 @@ class TdSelect extends ui_abstract_1.UI {
20
18
  name: 'content',
21
19
  childNodes: [
22
20
  new dropdown_class_1.TdSelectDropDown({
23
- name: 'content-inner',
21
+ name: 'content-inner'
24
22
  })
25
23
  ]
26
24
  })