@type-dom/ui 0.0.10 → 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 (307) hide show
  1. package/package.json +3 -4
  2. package/src/aria.d.ts +2 -2
  3. package/src/components/basic/td-button/td-button.abstract.d.ts +5 -5
  4. package/src/components/basic/td-button/td-button.abstract.js +46 -42
  5. package/src/components/basic/td-button/td-button.interface.d.ts +3 -6
  6. package/src/components/basic/td-button/td-button.style.d.ts +16 -5
  7. package/src/components/basic/td-button/td-button.style.js +43 -17
  8. package/src/components/basic/td-button-group/td-button-group.class.d.ts +3 -2
  9. package/src/components/basic/td-button-group/td-button-group.class.js +34 -37
  10. package/src/components/basic/td-button-group/td-button-group.interface.d.ts +3 -3
  11. package/src/components/basic/td-container/td-aside/td-aside.class.d.ts +2 -2
  12. package/src/components/basic/td-container/td-aside/td-aside.class.js +6 -5
  13. package/src/components/basic/td-container/td-aside/td-aside.interface.d.ts +3 -3
  14. package/src/components/basic/td-container/td-container.class.d.ts +2 -3
  15. package/src/components/basic/td-container/td-container.class.js +9 -7
  16. package/src/components/basic/td-container/td-container.interface.d.ts +3 -4
  17. package/src/components/basic/td-container/td-container.js +3 -2
  18. package/src/components/basic/td-container/td-footer/td-footer.class.d.ts +2 -2
  19. package/src/components/basic/td-container/td-footer/td-footer.class.js +4 -3
  20. package/src/components/basic/td-container/td-footer/td-footer.interface.d.ts +3 -3
  21. package/src/components/basic/td-container/td-header/td-header.class.d.ts +2 -2
  22. package/src/components/basic/td-container/td-header/td-header.class.js +3 -3
  23. package/src/components/basic/td-container/td-header/td-header.interface.d.ts +3 -3
  24. package/src/components/basic/td-container/td-main/td-main.class.d.ts +4 -2
  25. package/src/components/basic/td-container/td-main/td-main.class.js +8 -5
  26. package/src/components/basic/td-container/td-main/td-main.interface.d.ts +3 -3
  27. package/src/components/basic/td-icon/td-icon.class.d.ts +4 -6
  28. package/src/components/basic/td-icon/td-icon.class.js +21 -18
  29. package/src/components/basic/td-icon/td-icon.interface.d.ts +3 -4
  30. package/src/components/basic/td-layout/td-col/td-col.class.d.ts +2 -3
  31. package/src/components/basic/td-layout/td-col/td-col.class.js +4 -4
  32. package/src/components/basic/td-layout/td-col/td-col.interface.d.ts +3 -3
  33. package/src/components/basic/td-layout/td-row/td-row.class.d.ts +2 -2
  34. package/src/components/basic/td-layout/td-row/td-row.class.js +5 -4
  35. package/src/components/basic/td-layout/td-row/td-row.interface.d.ts +3 -3
  36. package/src/components/basic/td-link/td-link.class.d.ts +2 -2
  37. package/src/components/basic/td-link/td-link.class.js +6 -10
  38. package/src/components/basic/td-link/td-link.interface.d.ts +3 -3
  39. package/src/components/basic/td-link/td-link.style.js +1 -1
  40. package/src/components/basic/td-scrollbar/bar/bar.class.d.ts +2 -2
  41. package/src/components/basic/td-scrollbar/bar/bar.class.js +4 -4
  42. package/src/components/basic/td-scrollbar/bar/bar.interface.d.ts +3 -3
  43. package/src/components/basic/td-scrollbar/td-scrollbar.class.d.ts +4 -2
  44. package/src/components/basic/td-scrollbar/td-scrollbar.class.js +4 -3
  45. package/src/components/basic/td-scrollbar/td-scrollbar.interface.d.ts +3 -4
  46. package/src/components/basic/td-scrollbar/td-scrollbar.interface.js +1 -1
  47. package/src/components/basic/td-scrollbar/thumb/thumb.class.d.ts +2 -2
  48. package/src/components/basic/td-scrollbar/thumb/thumb.class.js +2 -3
  49. package/src/components/basic/td-scrollbar/thumb/thumb.interface.d.ts +3 -3
  50. package/src/components/basic/td-space/td-space.class.d.ts +2 -2
  51. package/src/components/basic/td-space/td-space.class.js +11 -5
  52. package/src/components/basic/td-space/td-space.interface.d.ts +3 -4
  53. package/src/components/basic/td-text/td-text.class.d.ts +4 -2
  54. package/src/components/basic/td-text/td-text.class.js +6 -4
  55. package/src/components/basic/td-text/td-text.interface.d.ts +3 -3
  56. package/src/components/data/td-avatar/td-avatar.class.d.ts +2 -2
  57. package/src/components/data/td-avatar/td-avatar.class.js +19 -25
  58. package/src/components/data/td-avatar/td-avatar.interface.d.ts +3 -3
  59. package/src/components/data/td-avatar/td-avatar.style.d.ts +2 -0
  60. package/src/components/data/td-avatar/td-avatar.style.js +19 -1
  61. package/src/components/data/td-badge/td-badge.class.d.ts +2 -2
  62. package/src/components/data/td-badge/td-badge.class.js +4 -4
  63. package/src/components/data/td-badge/td-badge.interface.d.ts +3 -3
  64. package/src/components/data/td-card/td-card.class.d.ts +4 -5
  65. package/src/components/data/td-card/td-card.class.js +16 -30
  66. package/src/components/data/td-card/td-card.interface.d.ts +3 -3
  67. package/src/components/data/td-card/td-card.style.d.ts +3 -2
  68. package/src/components/data/td-card/td-card.style.js +17 -3
  69. package/src/components/data/td-check-tag/td-check-tag.class.d.ts +2 -2
  70. package/src/components/data/td-check-tag/td-check-tag.class.js +5 -5
  71. package/src/components/data/td-check-tag/td-check-tag.interface.d.ts +3 -3
  72. package/src/components/data/td-check-tag/td-check-tag.style.d.ts +2 -2
  73. package/src/components/data/td-check-tag/td-check-tag.style.js +3 -3
  74. package/src/components/data/td-collapse/td-collapse.class.d.ts +2 -2
  75. package/src/components/data/td-collapse/td-collapse.class.js +20 -20
  76. package/src/components/data/td-collapse/td-collapse.interface.d.ts +3 -3
  77. package/src/components/data/td-collapse/td-collapse.style.d.ts +2 -0
  78. package/src/components/data/td-collapse/td-collapse.style.js +9 -1
  79. package/src/components/data/td-collapse-item/td-collapse-item.class.d.ts +4 -5
  80. package/src/components/data/td-collapse-item/td-collapse-item.class.js +8 -7
  81. package/src/components/data/td-collapse-item/td-collapse-item.interface.d.ts +3 -3
  82. package/src/components/data/td-count-down/td-count-down.class.d.ts +1 -1
  83. package/src/components/data/td-count-down/td-count-down.class.js +1 -1
  84. package/src/components/data/td-descriptions/td-descriptions-row.d.ts +4 -5
  85. package/src/components/data/td-descriptions/td-descriptions-row.js +1 -1
  86. package/src/components/data/td-descriptions/td-descriptions.class.d.ts +3 -3
  87. package/src/components/data/td-descriptions/td-descriptions.class.js +2 -3
  88. package/src/components/data/td-descriptions/td-descriptions.interface.d.ts +3 -4
  89. package/src/components/data/td-descriptions/td-descritions-cell.d.ts +6 -5
  90. package/src/components/data/td-descriptions/td-descritions-cell.js +5 -4
  91. package/src/components/data/td-descriptions-item/td-descriptions-item.class.d.ts +2 -3
  92. package/src/components/data/td-descriptions-item/td-descriptions-item.class.js +5 -4
  93. package/src/components/data/td-descriptions-item/td-descriptions-item.interface.d.ts +3 -4
  94. package/src/components/data/td-empty/td-empty.class.d.ts +2 -2
  95. package/src/components/data/td-empty/td-empty.class.js +2 -3
  96. package/src/components/data/td-empty/td-empty.interface.d.ts +3 -4
  97. package/src/components/data/td-image/td-image.class.d.ts +2 -3
  98. package/src/components/data/td-image/td-image.class.js +4 -22
  99. package/src/components/data/td-image/td-image.interface.d.ts +3 -3
  100. package/src/components/data/td-image/td-image.style.d.ts +2 -0
  101. package/src/components/data/td-image/td-image.style.js +19 -1
  102. package/src/components/data/td-image-viewer/td-image-viewer.class.d.ts +3 -5
  103. package/src/components/data/td-image-viewer/td-image-viewer.class.js +20 -17
  104. package/src/components/data/td-image-viewer/td-image-viewer.interface.d.ts +3 -3
  105. package/src/components/data/td-result/td-result.class.d.ts +2 -2
  106. package/src/components/data/td-result/td-result.class.js +4 -3
  107. package/src/components/data/td-result/td-result.interface.d.ts +3 -4
  108. package/src/components/data/td-segmented/td-segmented.class.d.ts +2 -3
  109. package/src/components/data/td-segmented/td-segmented.class.js +7 -8
  110. package/src/components/data/td-segmented/td-segmented.interface.d.ts +2 -3
  111. package/src/components/data/td-statistic/td-statistic.abstract.d.ts +3 -4
  112. package/src/components/data/td-statistic/td-statistic.abstract.js +15 -14
  113. package/src/components/data/td-statistic/td-statistic.class.js +1 -0
  114. package/src/components/data/td-statistic/td-statistic.interface.d.ts +3 -4
  115. package/src/components/data/td-tag/td-tag.class.d.ts +3 -4
  116. package/src/components/data/td-tag/td-tag.class.js +13 -13
  117. package/src/components/data/td-tag/td-tag.interface.d.ts +3 -3
  118. package/src/components/feedback/index.d.ts +2 -0
  119. package/src/components/feedback/index.js +3 -1
  120. package/src/components/feedback/td-alert/td-alert.class.d.ts +2 -3
  121. package/src/components/feedback/td-alert/td-alert.class.js +19 -17
  122. package/src/components/feedback/td-alert/td-alert.interface.d.ts +3 -3
  123. package/src/components/feedback/td-dialog/td-dialog.class.d.ts +3 -3
  124. package/src/components/feedback/td-dialog/td-dialog.class.js +25 -29
  125. package/src/components/feedback/td-dialog/td-dialog.interface.d.ts +3 -3
  126. package/src/components/feedback/td-dialog/td-dialog.interface.js +1 -1
  127. package/src/components/feedback/td-dialog-content/td-dialog-content.class.d.ts +2 -3
  128. package/src/components/feedback/td-dialog-content/td-dialog-content.class.js +10 -7
  129. package/src/components/feedback/td-dialog-content/td-dialog-content.interface.d.ts +3 -4
  130. package/src/components/feedback/td-drawer/td-drawer.class.d.ts +3 -3
  131. package/src/components/feedback/td-drawer/td-drawer.class.js +5 -5
  132. package/src/components/feedback/td-drawer/td-drawer.interface.d.ts +2 -2
  133. package/src/components/feedback/td-focus-trap/focus-trap.d.ts +15 -0
  134. package/src/components/feedback/td-focus-trap/focus-trap.js +71 -0
  135. package/src/components/feedback/td-focus-trap/td-focus-trap.class.d.ts +8 -7
  136. package/src/components/feedback/td-focus-trap/td-focus-trap.class.js +129 -129
  137. package/src/components/feedback/td-focus-trap/td-focus-trap.interface.d.ts +3 -3
  138. package/src/components/feedback/td-loading/td-loading.class.d.ts +2 -3
  139. package/src/components/feedback/td-loading/td-loading.class.js +21 -17
  140. package/src/components/feedback/td-loading/td-loading.interface.d.ts +3 -4
  141. package/src/components/feedback/td-message/td-message.class.d.ts +4 -4
  142. package/src/components/feedback/td-message/td-message.class.js +31 -31
  143. package/src/components/feedback/td-message/td-message.interface.d.ts +3 -4
  144. package/src/components/feedback/td-message-box/td-message-box.class.d.ts +10 -12
  145. package/src/components/feedback/td-message-box/td-message-box.class.js +30 -52
  146. package/src/components/feedback/td-message-box/td-message-box.interface.d.ts +4 -5
  147. package/src/components/feedback/td-notification/td-notification.class.d.ts +4 -5
  148. package/src/components/feedback/td-notification/td-notification.class.js +17 -18
  149. package/src/components/feedback/td-notification/td-notification.interface.d.ts +3 -4
  150. package/src/components/feedback/td-only-child/td-only-child.class.d.ts +3 -3
  151. package/src/components/feedback/td-only-child/td-only-child.class.js +3 -3
  152. package/src/components/feedback/td-overlay/td-overlay.class.d.ts +2 -3
  153. package/src/components/feedback/td-overlay/td-overlay.class.js +6 -5
  154. package/src/components/feedback/td-overlay/td-overlay.interface.d.ts +3 -3
  155. package/src/components/feedback/td-popper/arrow/arrow.class.d.ts +2 -2
  156. package/src/components/feedback/td-popper/arrow/arrow.class.js +7 -6
  157. package/src/components/feedback/td-popper/arrow/arrow.const.d.ts +3 -0
  158. package/src/components/feedback/td-popper/arrow/arrow.const.js +6 -0
  159. package/src/components/feedback/td-popper/arrow/arrow.interface.d.ts +3 -4
  160. package/src/components/feedback/td-popper/constants.d.ts +25 -0
  161. package/src/components/feedback/td-popper/constants.js +5 -0
  162. package/src/components/feedback/td-popper/content/content.class.d.ts +2 -2
  163. package/src/components/feedback/td-popper/content/content.class.js +7 -13
  164. package/src/components/feedback/td-popper/content/content.const.d.ts +2 -2
  165. package/src/components/feedback/td-popper/content/content.const.js +3 -4
  166. package/src/components/feedback/td-popper/content/content.interface.d.ts +24 -11
  167. package/src/components/feedback/td-popper/content/content.interface.js +4 -0
  168. package/src/components/feedback/td-popper/td-popper.class.d.ts +3 -2
  169. package/src/components/feedback/td-popper/td-popper.class.js +9 -7
  170. package/src/components/feedback/td-popper/td-popper.const.d.ts +5 -20
  171. package/src/components/feedback/td-popper/td-popper.const.js +8 -3
  172. package/src/components/feedback/td-popper/td-popper.interface.d.ts +6 -4
  173. package/src/components/feedback/td-popper/trigger/trigger.class.d.ts +2 -2
  174. package/src/components/feedback/td-popper/trigger/trigger.class.js +6 -6
  175. package/src/components/feedback/td-popper/trigger/trigger.const.d.ts +1 -0
  176. package/src/components/feedback/td-popper/trigger/trigger.const.js +4 -1
  177. package/src/components/feedback/td-popper/trigger/trigger.interface.d.ts +3 -3
  178. package/src/components/feedback/td-tooltip/content/content.class.d.ts +2 -2
  179. package/src/components/feedback/td-tooltip/content/content.class.js +4 -3
  180. package/src/components/feedback/td-tooltip/content/content.const.d.ts +55 -0
  181. package/src/components/feedback/td-tooltip/content/content.const.js +6 -0
  182. package/src/components/feedback/td-tooltip/content/content.interface.d.ts +19 -3
  183. package/src/components/feedback/td-tooltip/td-tooltip.class.d.ts +5 -3
  184. package/src/components/feedback/td-tooltip/td-tooltip.class.js +84 -9
  185. package/src/components/feedback/td-tooltip/td-tooltip.const.d.ts +77 -0
  186. package/src/components/feedback/td-tooltip/td-tooltip.const.js +9 -0
  187. package/src/components/feedback/td-tooltip/td-tooltip.interface.d.ts +6 -3
  188. package/src/components/feedback/td-tooltip/trigger/trigger.class.d.ts +3 -2
  189. package/src/components/feedback/td-tooltip/trigger/trigger.class.js +56 -3
  190. package/src/components/feedback/td-tooltip/trigger/trigger.const.d.ts +4 -0
  191. package/src/components/feedback/td-tooltip/trigger/trigger.const.js +6 -0
  192. package/src/components/feedback/td-tooltip/trigger/trigger.interface.d.ts +7 -2
  193. package/src/components/form/index.d.ts +17 -16
  194. package/src/components/form/index.js +19 -17
  195. package/src/components/form/td-checkbox/composables/use-checkbox-status.js +1 -1
  196. package/src/components/form/td-checkbox/composables/use-checkbox.js +1 -1
  197. package/src/components/form/td-checkbox/td-checkbox.class.d.ts +18 -3
  198. package/src/components/form/td-checkbox/td-checkbox.class.js +231 -9
  199. package/src/components/form/td-checkbox/td-checkbox.const.d.ts +63 -0
  200. package/src/components/form/td-checkbox/td-checkbox.const.js +88 -0
  201. package/src/components/form/td-checkbox/td-checkbox.interface.d.ts +5 -5
  202. package/src/components/form/td-checkbox/td-checkbox.style.d.ts +9 -0
  203. package/src/components/form/td-checkbox/td-checkbox.style.js +165 -12
  204. package/src/components/form/td-checkbox-button/td-checkbox-button.class.d.ts +9 -3
  205. package/src/components/form/td-checkbox-button/td-checkbox-button.class.js +114 -26
  206. package/src/components/form/td-checkbox-button/td-checkbox-button.interface.d.ts +2 -4
  207. package/src/components/form/td-checkbox-button/td-checkbox-button.style.d.ts +8 -1
  208. package/src/components/form/td-checkbox-button/td-checkbox-button.style.js +89 -12
  209. package/src/components/form/td-checkbox-group/td-checkbox-group.class.d.ts +11 -3
  210. package/src/components/form/td-checkbox-group/td-checkbox-group.class.js +118 -5
  211. package/src/components/form/td-checkbox-group/td-checkbox-group.interface.d.ts +8 -5
  212. package/src/components/form/td-form/td-form.class.d.ts +4 -2
  213. package/src/components/form/td-form/td-form.class.js +9 -5
  214. package/src/components/form/td-form/td-form.interface.d.ts +7 -4
  215. package/src/components/form/td-form-item/td-form-item.class.d.ts +4 -5
  216. package/src/components/form/td-form-item/td-form-item.class.js +34 -27
  217. package/src/components/form/td-form-item/td-form-item.interface.d.ts +3 -3
  218. package/src/components/form/td-input/td-input.class.d.ts +3 -4
  219. package/src/components/form/td-input/td-input.class.js +30 -26
  220. package/src/components/form/td-input/td-input.interface.d.ts +3 -4
  221. package/src/components/form/td-input/widget/suffix.d.ts +1 -0
  222. package/src/components/form/td-input/widget/suffix.js +6 -1
  223. package/src/components/form/td-input/widget/td-input-wrapper.class.js +5 -5
  224. package/src/components/form/td-option/td-option.class.d.ts +2 -2
  225. package/src/components/form/td-option/td-option.class.js +3 -3
  226. package/src/components/form/td-option/td-option.interface.d.ts +3 -3
  227. package/src/components/form/td-option-group/td-option-group.class.d.ts +2 -2
  228. package/src/components/form/td-option-group/td-option-group.class.js +2 -3
  229. package/src/components/form/td-option-group/td-option-group.interface.d.ts +3 -3
  230. package/src/components/form/td-radio/td-radio.class.d.ts +2 -3
  231. package/src/components/form/td-radio/td-radio.class.js +8 -5
  232. package/src/components/form/td-radio/td-radio.interface.d.ts +3 -3
  233. package/src/components/form/td-radio-button/td-radio-button.class.d.ts +2 -3
  234. package/src/components/form/td-radio-button/td-radio-button.class.js +9 -9
  235. package/src/components/form/td-radio-button/td-radio-button.interface.d.ts +3 -3
  236. package/src/components/form/td-radio-group/td-radio-group.class.d.ts +2 -5
  237. package/src/components/form/td-radio-group/td-radio-group.class.js +14 -11
  238. package/src/components/form/td-radio-group/td-radio-group.interface.d.ts +3 -4
  239. package/src/components/form/td-select/dropdown/dropdown.class.d.ts +2 -2
  240. package/src/components/form/td-select/dropdown/dropdown.class.js +2 -3
  241. package/src/components/form/td-select/dropdown/dropdown.interface.d.ts +3 -4
  242. package/src/components/form/td-select/td-select.class.d.ts +4 -6
  243. package/src/components/form/td-select/td-select.class.js +4 -6
  244. package/src/components/form/td-select/td-select.interface.d.ts +13 -5
  245. package/src/components/form/td-select/td-select.style.d.ts +23 -0
  246. package/src/components/form/td-select/td-select.style.js +170 -1
  247. package/src/components/form/td-switch/td-switch.class.d.ts +2 -3
  248. package/src/components/form/td-switch/td-switch.class.js +2 -3
  249. package/src/components/form/td-switch/td-switch.interface.d.ts +3 -4
  250. package/src/components/navigation/td-affix/td-affix.class.d.ts +2 -3
  251. package/src/components/navigation/td-affix/td-affix.class.js +2 -3
  252. package/src/components/navigation/td-affix/td-affix.interface.d.ts +3 -4
  253. package/src/components/navigation/td-anchor/td-anchor-link/td-anchor-link.class.d.ts +2 -2
  254. package/src/components/navigation/td-anchor/td-anchor-link/td-anchor-link.class.js +2 -3
  255. package/src/components/navigation/td-anchor/td-anchor-link/td-anchor-link.interface.d.ts +3 -4
  256. package/src/components/navigation/td-anchor/td-anchor.class.d.ts +2 -2
  257. package/src/components/navigation/td-anchor/td-anchor.class.js +6 -4
  258. package/src/components/navigation/td-anchor/td-anchor.function.js +1 -1
  259. package/src/components/navigation/td-anchor/td-anchor.interface.d.ts +3 -3
  260. package/src/components/navigation/td-backtop/td-backtop.class.d.ts +5 -6
  261. package/src/components/navigation/td-backtop/td-backtop.class.js +36 -59
  262. package/src/components/navigation/td-backtop/td-backtop.const.d.ts +18 -0
  263. package/src/components/navigation/td-backtop/td-backtop.const.js +21 -0
  264. package/src/components/navigation/td-backtop/td-backtop.interface.d.ts +3 -3
  265. package/src/components/navigation/td-backtop/td-backtop.style.d.ts +2 -0
  266. package/src/components/navigation/td-backtop/td-backtop.style.js +19 -1
  267. package/src/components/navigation/td-backtop/use-backtop.d.ts +2 -3
  268. package/src/components/navigation/td-backtop/use-backtop.js +2 -2
  269. package/src/components/navigation/td-breadcrumb/td-breadcrumb.class.d.ts +3 -3
  270. package/src/components/navigation/td-breadcrumb/td-breadcrumb.class.js +12 -8
  271. package/src/components/navigation/td-breadcrumb/td-breadcrumb.interface.d.ts +3 -4
  272. package/src/components/navigation/td-breadcrumb-item/td-breadcrumb-item.class.d.ts +2 -2
  273. package/src/components/navigation/td-breadcrumb-item/td-breadcrumb-item.class.js +2 -3
  274. package/src/components/navigation/td-breadcrumb-item/td-breadcrumb-item.interface.d.ts +3 -4
  275. package/src/components/navigation/td-menu/td-menu.class.d.ts +2 -2
  276. package/src/components/navigation/td-menu/td-menu.class.js +4 -3
  277. package/src/components/navigation/td-menu/td-menu.interface.d.ts +3 -4
  278. package/src/components/navigation/td-tabs/td-tab-bar.class.d.ts +2 -2
  279. package/src/components/navigation/td-tabs/td-tab-bar.class.js +3 -3
  280. package/src/components/navigation/td-tabs/td-tab-bar.interface.d.ts +3 -3
  281. package/src/components/navigation/td-tabs/td-tab-nav.class.d.ts +2 -3
  282. package/src/components/navigation/td-tabs/td-tab-nav.class.js +3 -4
  283. package/src/components/navigation/td-tabs/td-tab-nav.interface.d.ts +3 -3
  284. package/src/components/navigation/td-tabs/td-tab-pane.class.d.ts +2 -3
  285. package/src/components/navigation/td-tabs/td-tab-pane.class.js +12 -16
  286. package/src/components/navigation/td-tabs/td-tab-pane.interface.d.ts +3 -4
  287. package/src/components/navigation/td-tabs/td-tabs.class.d.ts +2 -2
  288. package/src/components/navigation/td-tabs/td-tabs.class.js +6 -4
  289. package/src/components/navigation/td-tabs/td-tabs.interface.d.ts +3 -3
  290. package/src/components/others/example/example-source-wrapper.js +2 -1
  291. package/src/components/others/td-divider/td-divider.class.d.ts +2 -2
  292. package/src/components/others/td-divider/td-divider.class.js +2 -3
  293. package/src/components/others/td-divider/td-divider.interface.d.ts +3 -3
  294. package/src/constants/aria.d.ts +17 -0
  295. package/src/constants/aria.js +20 -0
  296. package/src/hooks/index.d.ts +1 -0
  297. package/src/hooks/index.js +1 -0
  298. package/src/hooks/use-delayed-toggle.d.ts +23 -0
  299. package/src/hooks/use-delayed-toggle.js +52 -0
  300. package/src/styles/var.d.ts +1 -15
  301. package/src/styles/var.js +6 -16
  302. package/src/utils/dom/event.d.ts +6 -0
  303. package/src/utils/dom/event.js +17 -0
  304. package/src/ui/ui.abstract.d.ts +0 -18
  305. package/src/ui/ui.abstract.js +0 -50
  306. package/src/ui/ui.interface.d.ts +0 -12
  307. package/src/ui/ui.interface.js +0 -2
@@ -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
  })
@@ -1,10 +1,11 @@
1
- import { IUI, IUIConfig } from '../../../ui/ui.interface';
2
- import { IJsonData, IPrimitive, XProxy } from '@type-dom/framework';
1
+ import { AnyFn, IJsonData, IPrimitive, ITypeConfig, ITypeDiv, XProxy } from '@type-dom/framework';
3
2
  import { ISize } from '../../../styles/size';
4
- export interface ITdSelect extends IUI {
3
+ import { TdIcon } from '../../basic';
4
+ import { CheckboxValueType } from '../td-checkbox/td-checkbox.interface';
5
+ export interface ITdSelect extends ITypeDiv {
5
6
  className: 'TdSelect';
6
7
  }
7
- export interface ITdSelectConfig extends IUIConfig {
8
+ export interface ITdSelectConfig extends ITypeConfig {
8
9
  /**
9
10
  * @description the name attribute of select input
10
11
  */
@@ -17,7 +18,7 @@ export interface ITdSelectConfig extends IUIConfig {
17
18
  * @description binding value
18
19
  * default: undefined,
19
20
  */
20
- modelValue?: IPrimitive | XProxy<IJsonData>;
21
+ modelValue?: IPrimitive | object | CheckboxValueType[] | XProxy<IJsonData>;
21
22
  /**
22
23
  * @description the autocomplete attribute of select input
23
24
  * default: 'off',
@@ -83,9 +84,11 @@ export interface ITdSelectConfig extends IUIConfig {
83
84
  /**
84
85
  * @description custom remote search method
85
86
  */
87
+ remoteMethod?: AnyFn;
86
88
  /**
87
89
  * @description custom filter method
88
90
  */
91
+ filterMethod?: AnyFn;
89
92
  /**
90
93
  * @description whether multiple-select is activated
91
94
  */
@@ -136,18 +139,23 @@ export interface ITdSelectConfig extends IUIConfig {
136
139
  persistent?: boolean;
137
140
  /**
138
141
  * @description custom clear icon component
142
+ * default: CircleClose,
139
143
  */
144
+ clearIcon?: TdIcon;
140
145
  /**
141
146
  * @description whether the width of the dropdown is the same as the input
142
147
  */
143
148
  fitInputWidth?: boolean;
144
149
  /**
145
150
  * @description custom suffix icon component
151
+ * default: ArrowDown,
146
152
  */
153
+ suffixIcon?: TdIcon;
147
154
  /**
148
155
  * @description tag type
149
156
  * default: 'info'
150
157
  */
158
+ tagType?: string;
151
159
  /**
152
160
  * @description whether to trigger form validation
153
161
  * default: true,
@@ -1,3 +1,5 @@
1
+ import { IStyle } from '@type-dom/css-type';
2
+ import { ITdSelectConfig } from './td-select.interface';
1
3
  export declare const $select: {
2
4
  borderColorHover: string;
3
5
  disabledColor: string;
@@ -5,6 +7,8 @@ export declare const $select: {
5
7
  fontSize: string;
6
8
  closeHoverColor: string;
7
9
  inputColor: string;
10
+ multipleInputColor: string;
11
+ inputFocusBorderColor: string;
8
12
  inputFontSize: string;
9
13
  width: string;
10
14
  };
@@ -51,3 +55,22 @@ export declare const $selectItemHeight: {
51
55
  default: string;
52
56
  small: string;
53
57
  };
58
+ export declare const $selectStyle: IStyle;
59
+ export declare function mixInputBorder($color: string): {
60
+ boxShadow: string;
61
+ };
62
+ export declare const $selectWrapperStyle: IStyle;
63
+ export declare const $selectPrefixStyle: IStyle;
64
+ export declare const $selectSuffixStyle: IStyle;
65
+ export declare const $selectCaretStyle: IStyle;
66
+ export declare const $selectSelectionStyle: IStyle;
67
+ export declare const $selectedItemStyle: IStyle;
68
+ export declare const $selectTagTextStyle: IStyle;
69
+ export declare const $selectPlaceholderStyle: IStyle;
70
+ export declare const $selectPopperStyle: IStyle;
71
+ export declare const $selectInputWrapperStyle: IStyle;
72
+ export declare const $selectInputStyle: IStyle;
73
+ export declare const $selectInputCalculatorStyle: IStyle;
74
+ export declare function useSelectStyle(params: ITdSelectConfig): void;
75
+ export declare function useDisabled(params: ITdSelectConfig): void;
76
+ export declare function useSize(params: ITdSelectConfig): void;
@@ -1,8 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.$selectItemHeight = exports.$selectItemGap = exports.$selectNearMarginLeft = exports.$selectWrapperPadding = exports.$selectDropdown = exports.$selectGroup = exports.$selectOption = exports.$select = void 0;
3
+ exports.$selectInputCalculatorStyle = exports.$selectInputStyle = exports.$selectInputWrapperStyle = exports.$selectPopperStyle = exports.$selectPlaceholderStyle = exports.$selectTagTextStyle = exports.$selectedItemStyle = exports.$selectSelectionStyle = exports.$selectCaretStyle = exports.$selectSuffixStyle = exports.$selectPrefixStyle = exports.$selectWrapperStyle = exports.$selectStyle = exports.$selectItemHeight = exports.$selectItemGap = exports.$selectNearMarginLeft = exports.$selectWrapperPadding = exports.$selectDropdown = exports.$selectGroup = exports.$selectOption = exports.$select = void 0;
4
+ exports.mixInputBorder = mixInputBorder;
5
+ exports.useSelectStyle = useSelectStyle;
6
+ exports.useDisabled = useDisabled;
7
+ exports.useSize = useSize;
4
8
  // Select
5
9
  const var_1 = require("../../../styles/var");
10
+ const td_input_style_1 = require("../td-input/td-input.style");
11
+ const transition_1 = require("../../../styles/transition");
6
12
  exports.$select = {
7
13
  // borderColorHover: getCssVar('border-color-hover'),
8
14
  borderColorHover: var_1.$borderColorHover,
@@ -17,7 +23,9 @@ exports.$select = {
17
23
  // inputColor: getCssVar('text-color-placeholder'),
18
24
  inputColor: var_1.$textColor.placeholder,
19
25
  // multipleInputColor: getCssVar('text-color-regular'),
26
+ multipleInputColor: var_1.$textColor.regular,
20
27
  // inputFocusBorderColor: getCssVar('color-primary'),
28
+ inputFocusBorderColor: var_1.$colorPrimary,
21
29
  inputFontSize: '14px',
22
30
  width: '100%'
23
31
  };
@@ -74,3 +82,164 @@ exports.$selectItemHeight = {
74
82
  default: '24px',
75
83
  small: '20px'
76
84
  };
85
+ exports.$selectStyle = {
86
+ display: 'inline-block',
87
+ position: 'relative',
88
+ verticalAlign: 'middle',
89
+ // width: getCssVar('select-width'),
90
+ width: exports.$select.width
91
+ };
92
+ function mixInputBorder($color) {
93
+ return {
94
+ boxShadow: '0 0 0 1px ' + $color + 'inset'
95
+ };
96
+ }
97
+ exports.$selectWrapperStyle = Object.assign({ display: 'flex', alignItems: 'center', position: 'relative', boxSizing: 'border-box', cursor: 'pointer', textAlign: 'left',
98
+ // font-size: map.get($input-font-size, 'default'),
99
+ fontSize: td_input_style_1.$inputFontSize.default,
100
+ // padding: map.get($select-wrapper-padding, 'default'),
101
+ padding: exports.$selectWrapperPadding.default,
102
+ // gap: map.get($select-item-gap, 'default'),
103
+ gap: exports.$selectItemGap.default,
104
+ // min-height: map.get($input-height, 'default'),
105
+ minHeight: td_input_style_1.$inputHeight.default,
106
+ // line-height: map.get($select-item-height, 'default'),
107
+ lineHeight: exports.$selectItemHeight.default,
108
+ // border-radius: getCssVar('border-radius-base'),
109
+ borderRadius: var_1.$borderRadius.base,
110
+ // background-color: getCssVar('fill-color', 'blank'),
111
+ backgroundColor: var_1.$fillColor.blank,
112
+ // transition: getCssVar('transition', 'duration'),
113
+ transition: transition_1.$transitionDuration.default, transform: 'translate3d(0, 0, 0)' }, mixInputBorder(var_1.$borderColor.base));
114
+ exports.$selectPrefixStyle = {
115
+ display: 'flex',
116
+ alignItems: 'center',
117
+ flexShrink: 0,
118
+ // gap: map.get($select-item-gap, 'default'),
119
+ gap: exports.$selectItemGap.default,
120
+ // color: var(
121
+ // #{getCssVarName('input-icon-color')},
122
+ // map.get($input, 'icon-color')
123
+ // );
124
+ color: td_input_style_1.$input.iconColor
125
+ };
126
+ exports.$selectSuffixStyle = {
127
+ display: 'flex',
128
+ alignItems: 'center',
129
+ flexShrink: 0,
130
+ // gap: map.get($select-item-gap, 'default'),
131
+ gap: exports.$selectItemGap.default,
132
+ // color: var(
133
+ // #{getCssVarName('input-icon-color')},
134
+ // map.get($input, 'icon-color')
135
+ // );
136
+ color: td_input_style_1.$input.iconColor
137
+ };
138
+ exports.$selectCaretStyle = {
139
+ // color: getCssVar('select-input-color'),
140
+ color: exports.$select.inputColor,
141
+ // font-size: getCssVar('select-input-font-size'),
142
+ fontSize: exports.$select.inputFontSize,
143
+ // transition: getCssVar('transition', 'duration'),
144
+ transition: transition_1.$transitionDuration.default,
145
+ transform: 'rotateZ(0deg)',
146
+ cursor: 'pointer'
147
+ };
148
+ exports.$selectSelectionStyle = {
149
+ position: 'relative',
150
+ display: 'flex',
151
+ flexWrap: 'wrap',
152
+ alignItems: 'center',
153
+ flex: 1,
154
+ minWidth: 0,
155
+ // gap: map.get($select-item-gap, 'default'),
156
+ gap: exports.$selectItemGap.default
157
+ };
158
+ exports.$selectedItemStyle = {
159
+ display: 'flex',
160
+ flexWrap: 'wrap',
161
+ userSelect: 'none'
162
+ };
163
+ exports.$selectTagTextStyle = {
164
+ display: 'block',
165
+ lineHeight: 'normal',
166
+ // @include utils-ellipsis,
167
+ overflow: 'hidden',
168
+ textOverflow: 'ellipsis',
169
+ whiteSpace: 'nowrap'
170
+ };
171
+ exports.$selectPlaceholderStyle = {
172
+ position: 'absolute',
173
+ display: 'block',
174
+ top: '50%',
175
+ transform: 'translateY(-50%)',
176
+ width: '100%',
177
+ // @include utils-ellipsis;
178
+ overflow: 'hidden',
179
+ textOverflow: 'ellipsis',
180
+ whiteSpace: 'nowrap',
181
+ // color: var(
182
+ // #{getCssVarName('input-text-color')},
183
+ // map.get($input, 'text-color')
184
+ // );
185
+ color: td_input_style_1.$input.textColor
186
+ };
187
+ exports.$selectPopperStyle = {
188
+ // @include picker-popper(
189
+ // map.get($select-dropdown, 'bg-color'),
190
+ // map.get($select-dropdown, 'border'),
191
+ // map.get($select-dropdown, 'shadow')
192
+ // );
193
+ backgroundColor: exports.$selectDropdown.bgColor,
194
+ border: exports.$selectDropdown.border,
195
+ boxShadow: exports.$selectDropdown.shadow
196
+ };
197
+ exports.$selectInputWrapperStyle = {
198
+ maxWidth: '100%'
199
+ };
200
+ exports.$selectInputStyle = {
201
+ border: 'none',
202
+ outline: 'none',
203
+ padding: 0,
204
+ // color: getCssVar('select-multiple-input-color'),
205
+ color: exports.$select.multipleInputColor,
206
+ fontSize: 'inherit',
207
+ fontFamily: 'inherit',
208
+ appearance: 'none',
209
+ // height: map.get($select-item-height, 'default'),
210
+ height: exports.$selectItemHeight.default,
211
+ maxWidth: '100%',
212
+ backgroundColor: 'transparent'
213
+ };
214
+ exports.$selectInputCalculatorStyle = {
215
+ position: 'absolute',
216
+ left: 0,
217
+ top: 0,
218
+ maxWidth: '100%',
219
+ visibility: 'hidden',
220
+ whiteSpace: 'pre',
221
+ overflow: 'hidden'
222
+ };
223
+ function useSelectStyle(params) {
224
+ useSize(params);
225
+ useDisabled(params);
226
+ }
227
+ function useDisabled(params) {
228
+ const disabled = params.disabled;
229
+ if (disabled) {
230
+ }
231
+ else {
232
+ }
233
+ }
234
+ function useSize(params) {
235
+ const size = params.size || 'default';
236
+ exports.$selectWrapperStyle.gap = exports.$selectItemGap[size];
237
+ exports.$selectWrapperStyle.padding = exports.$selectWrapperPadding[size];
238
+ exports.$selectWrapperStyle.minHeight = exports.$selectItemHeight[size];
239
+ exports.$selectWrapperStyle.lineHeight = exports.$selectItemHeight[size];
240
+ exports.$selectWrapperStyle.fontSize = td_input_style_1.$inputFontSize[size];
241
+ exports.$selectSelectionStyle.gap = exports.$selectItemGap[size];
242
+ exports.$selectPrefixStyle.gap = exports.$selectItemGap[size];
243
+ exports.$selectSuffixStyle.gap = exports.$selectItemGap[size];
244
+ exports.$selectInputStyle.height = exports.$selectItemHeight[size];
245
+ }