@type-dom/ui 0.0.1 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (356) hide show
  1. package/README.md +45 -11
  2. package/package.json +7 -1
  3. package/src/aria.d.ts +17 -0
  4. package/src/aria.js +20 -0
  5. package/src/{basic → components/basic}/index.d.ts +12 -0
  6. package/src/components/basic/index.js +48 -0
  7. package/src/{basic → components/basic}/td-button/td-button.class.d.ts +7 -6
  8. package/src/components/basic/td-button/td-button.class.js +179 -0
  9. package/src/{basic → components/basic}/td-button/td-button.interface.d.ts +21 -20
  10. package/src/{basic → components/basic}/td-button/td-button.style.d.ts +2 -1
  11. package/src/{basic → components/basic}/td-button/td-button.style.js +40 -36
  12. package/src/components/basic/td-button-group/td-button-group.class.d.ts +11 -0
  13. package/src/components/basic/td-button-group/td-button-group.class.js +105 -0
  14. package/src/components/basic/td-button-group/td-button-group.interface.d.ts +16 -0
  15. package/src/components/basic/td-container/td-aside/td-aside.class.d.ts +6 -0
  16. package/src/components/basic/td-container/td-aside/td-aside.class.js +29 -0
  17. package/src/components/basic/td-container/td-aside/td-aside.interface.d.ts +7 -0
  18. package/src/components/basic/td-container/td-container.class.d.ts +11 -0
  19. package/src/{basic → components/basic}/td-container/td-container.class.js +7 -6
  20. package/src/components/basic/td-container/td-container.interface.d.ts +15 -0
  21. package/src/components/basic/td-container/td-footer/td-footer.class.d.ts +8 -0
  22. package/src/components/basic/td-container/td-footer/td-footer.class.js +24 -0
  23. package/src/components/basic/td-container/td-footer/td-footer.interface.d.ts +8 -0
  24. package/src/{basic → components/basic}/td-container/td-header/td-header.class.d.ts +4 -3
  25. package/src/components/basic/td-container/td-header/td-header.class.js +25 -0
  26. package/src/components/basic/td-container/td-header/td-header.interface.d.ts +8 -0
  27. package/src/components/basic/td-container/td-main/td-main.class.d.ts +6 -0
  28. package/src/{basic → components/basic}/td-container/td-main/td-main.class.js +7 -6
  29. package/src/components/basic/td-container/td-main/td-main.interface.d.ts +7 -0
  30. package/src/components/basic/td-icon/td-icon.class.d.ts +15 -0
  31. package/src/{basic → components/basic}/td-icon/td-icon.class.js +44 -13
  32. package/src/components/basic/td-icon/td-icon.interface.d.ts +13 -0
  33. package/src/{basic → components/basic}/td-icon/td-icon.style.d.ts +1 -0
  34. package/src/{basic → components/basic}/td-icon/td-icon.style.js +5 -4
  35. package/src/components/basic/td-layout/td-col/td-col.class.d.ts +13 -0
  36. package/src/components/basic/td-layout/td-col/td-col.class.js +128 -0
  37. package/src/components/basic/td-layout/td-col/td-col.interface.d.ts +46 -0
  38. package/src/components/basic/td-layout/td-row/td-row.class.d.ts +10 -0
  39. package/src/components/basic/td-layout/td-row/td-row.class.js +101 -0
  40. package/src/components/basic/td-layout/td-row/td-row.interface.d.ts +18 -0
  41. package/src/components/basic/td-layout/td-row/td-row.interface.js +12 -0
  42. package/src/components/basic/td-layout/td-row/td-row.style.d.ts +1 -0
  43. package/src/components/basic/td-layout/td-row/td-row.style.js +8 -0
  44. package/src/components/basic/td-link/td-link.class.d.ts +11 -0
  45. package/src/components/basic/td-link/td-link.class.js +105 -0
  46. package/src/components/basic/td-link/td-link.interface.d.ts +33 -0
  47. package/src/components/basic/td-link/td-link.style.d.ts +5 -0
  48. package/src/components/basic/td-link/td-link.style.js +45 -0
  49. package/src/components/basic/td-scrollbar/bar/bar.class.d.ts +8 -0
  50. package/src/components/basic/td-scrollbar/bar/bar.class.js +31 -0
  51. package/src/components/basic/td-scrollbar/bar/bar.interface.d.ts +8 -0
  52. package/src/components/basic/td-scrollbar/td-scrollbar.class.d.ts +9 -0
  53. package/src/components/basic/td-scrollbar/td-scrollbar.class.js +51 -0
  54. package/src/components/basic/td-scrollbar/td-scrollbar.interface.d.ts +63 -0
  55. package/src/components/basic/td-scrollbar/td-scrollbar.interface.js +5 -0
  56. package/src/components/basic/td-scrollbar/thumb/thumb.class.d.ts +7 -0
  57. package/src/components/basic/td-scrollbar/thumb/thumb.class.js +45 -0
  58. package/src/components/basic/td-scrollbar/thumb/thumb.interface.d.ts +11 -0
  59. package/src/components/basic/td-space/td-space.class.d.ts +12 -0
  60. package/src/components/basic/td-space/td-space.class.js +92 -0
  61. package/src/components/basic/td-space/td-space.const.d.ts +3 -0
  62. package/src/components/basic/td-space/td-space.const.js +8 -0
  63. package/src/components/basic/td-space/td-space.interface.d.ts +39 -0
  64. package/src/components/basic/td-text/td-text.class.d.ts +10 -0
  65. package/src/components/basic/td-text/td-text.class.js +47 -0
  66. package/src/components/basic/td-text/td-text.interface.d.ts +21 -0
  67. package/src/components/basic/td-text/td-text.style.d.ts +6 -0
  68. package/src/components/basic/td-text/td-text.style.js +59 -0
  69. package/src/{feedback/dialog/dialog.d.ts → components/feedback/dialog/dialog.class.d.ts} +2 -3
  70. package/src/{feedback/dialog/dialog.js → components/feedback/dialog/dialog.class.js} +9 -2
  71. package/src/components/feedback/dialog/dialog.interface.d.ts +5 -0
  72. package/src/{feedback → components/feedback}/index.d.ts +1 -1
  73. package/src/{feedback → components/feedback}/index.js +2 -2
  74. package/src/{feedback → components/feedback}/message-box/message-box.d.ts +2 -3
  75. package/src/components/feedback/message-box/message-box.interface.d.ts +4 -0
  76. package/src/{feedback → components/feedback}/message-box/message-box.js +11 -2
  77. package/src/{feedback → components/feedback}/overlay/container/body/body.js +7 -9
  78. package/src/{feedback → components/feedback}/overlay/container/container.js +12 -14
  79. package/src/{feedback → components/feedback}/overlay/container/footer/cancel-button/cancel-button.js +2 -2
  80. package/src/{feedback → components/feedback}/overlay/container/footer/confirm-button/confirm-button.js +9 -11
  81. package/src/{feedback → components/feedback}/overlay/container/footer/footer.js +4 -4
  82. package/src/{feedback → components/feedback}/overlay/container/header/close-button/close-button.js +15 -17
  83. package/src/{feedback → components/feedback}/overlay/container/header/header.js +2 -2
  84. package/src/{feedback → components/feedback}/overlay/container/header/title/title.d.ts +1 -1
  85. package/src/{feedback → components/feedback}/overlay/container/header/title/title.js +9 -11
  86. package/src/{feedback → components/feedback}/overlay/overlay.abstract.d.ts +0 -3
  87. package/src/{feedback → components/feedback}/overlay/overlay.abstract.js +15 -19
  88. package/src/components/feedback/td-focus-trap/td-focus-trap.class.d.ts +8 -0
  89. package/src/components/feedback/td-focus-trap/td-focus-trap.class.js +81 -0
  90. package/src/components/feedback/td-focus-trap/td-focus-trap.interface.d.ts +10 -0
  91. package/src/components/feedback/td-focus-trap/tokens.d.ts +7 -0
  92. package/src/components/feedback/td-focus-trap/tokens.js +23 -0
  93. package/src/components/feedback/td-focus-trap/utils.d.ts +25 -0
  94. package/src/components/feedback/td-focus-trap/utils.js +153 -0
  95. package/src/components/feedback/td-popper/arrow/arrow.class.d.ts +6 -0
  96. package/src/components/feedback/td-popper/arrow/arrow.class.js +32 -0
  97. package/src/components/feedback/td-popper/arrow/arrow.interface.d.ts +11 -0
  98. package/src/components/feedback/td-popper/arrow/arrow.interface.js +2 -0
  99. package/src/components/feedback/td-popper/content/content.class.d.ts +7 -0
  100. package/src/components/feedback/td-popper/content/content.class.js +25 -0
  101. package/src/components/feedback/td-popper/content/content.interface.d.ts +37 -0
  102. package/src/components/feedback/td-popper/content/content.interface.js +2 -0
  103. package/src/components/feedback/td-popper/td-popper.class.d.ts +6 -0
  104. package/src/components/feedback/td-popper/td-popper.class.js +12 -0
  105. package/src/components/feedback/td-popper/td-popper.interface.d.ts +12 -0
  106. package/src/components/feedback/td-popper/td-popper.interface.js +13 -0
  107. package/src/components/feedback/td-popper/trigger/trigger.class.d.ts +6 -0
  108. package/src/components/feedback/td-popper/trigger/trigger.class.js +11 -0
  109. package/src/components/feedback/td-popper/trigger/trigger.interface.d.ts +8 -0
  110. package/src/components/feedback/td-popper/trigger/trigger.interface.js +2 -0
  111. package/src/components/feedback/td-tooltip/content/content.class.d.ts +6 -0
  112. package/src/components/feedback/td-tooltip/content/content.class.js +12 -0
  113. package/src/components/feedback/td-tooltip/content/content.interface.d.ts +42 -0
  114. package/src/components/feedback/td-tooltip/content/content.interface.js +2 -0
  115. package/src/components/feedback/td-tooltip/td-tooltip.class.d.ts +8 -0
  116. package/src/components/feedback/td-tooltip/td-tooltip.class.js +30 -0
  117. package/src/components/feedback/td-tooltip/td-tooltip.interface.d.ts +10 -0
  118. package/src/components/feedback/td-tooltip/td-tooltip.interface.js +2 -0
  119. package/src/components/feedback/td-tooltip/trigger/trigger.class.d.ts +6 -0
  120. package/src/components/feedback/td-tooltip/trigger/trigger.class.js +12 -0
  121. package/src/components/feedback/td-tooltip/trigger/trigger.interface.d.ts +16 -0
  122. package/src/components/feedback/td-tooltip/trigger/trigger.interface.js +2 -0
  123. package/src/{form → components/form}/checkbox-group/checkbox-group.class.d.ts +2 -3
  124. package/src/{form → components/form}/checkbox-group/checkbox-group.class.js +3 -4
  125. package/src/components/form/checkbox-group/checkbox-group.interface.js +2 -0
  126. package/src/{form → components/form}/checkbox-group/checkbox-option/checkbox-option.class.d.ts +2 -2
  127. package/src/{form → components/form}/checkbox-group/checkbox-option/checkbox-option.class.js +8 -8
  128. package/src/{form → components/form}/checkbox-group/checkbox-option/checkbox-option.interface.d.ts +0 -5
  129. package/src/components/form/checkbox-group/checkbox-option/checkbox-option.interface.js +2 -0
  130. package/src/components/form/field-item/cascade/field-cascade.abstract.d.ts +22 -0
  131. package/src/{form → components/form}/field-item/cascade/field-cascade.abstract.js +38 -42
  132. package/src/components/form/field-item/field-item.abstract.d.ts +10 -0
  133. package/src/{form → components/form}/field-item/field-item.abstract.js +7 -12
  134. package/src/components/form/field-item/field-item.interface.d.ts +5 -0
  135. package/src/components/form/field-item/field-item.interface.js +2 -0
  136. package/src/{form → components/form}/field-item/field-item.style.d.ts +1 -1
  137. package/src/{form → components/form}/field-item/field-item.style.js +2 -2
  138. package/src/{form → components/form}/field-item/input/field-input.abstract.js +7 -9
  139. package/src/components/form/field-item/options/field-options.abstract.d.ts +21 -0
  140. package/src/{form → components/form}/field-item/options/field-options.abstract.js +58 -60
  141. package/src/{form → components/form}/field-item/radio/field-radio.abstract.d.ts +6 -7
  142. package/src/{form → components/form}/field-item/radio/field-radio.abstract.js +11 -11
  143. package/src/{form → components/form}/field-item/select/field-select.abstract.js +7 -9
  144. package/src/{form → components/form}/field-item/span/field-span.abstract.d.ts +1 -1
  145. package/src/components/form/field-item/span/field-span.abstract.js +52 -0
  146. package/src/{form → components/form}/field-item/textarea/field-textarea.abstract.js +9 -9
  147. package/src/components/form/field-select/field-select.class.d.ts +12 -0
  148. package/src/{basic/td-select/td-select.class.js → components/form/field-select/field-select.class.js} +8 -9
  149. package/src/{basic/td-select/td-select.interface.d.ts → components/form/field-select/field-select.interface.d.ts} +2 -2
  150. package/src/components/form/field-select/field-select.interface.js +2 -0
  151. package/src/{basic/td-select → components/form/field-select}/option/option.class.d.ts +3 -5
  152. package/src/{basic/td-select → components/form/field-select}/option/option.class.js +3 -5
  153. package/src/components/form/field-select/option/option.interface.js +2 -0
  154. package/src/components/form/index.d.ts +26 -0
  155. package/src/{form → components/form}/index.js +17 -1
  156. package/src/{form → components/form}/radio-group/radio-group.class.d.ts +5 -6
  157. package/src/{form → components/form}/radio-group/radio-group.class.js +12 -6
  158. package/src/components/form/radio-group/radio-group.interface.d.ts +11 -0
  159. package/src/components/form/radio-group/radio-group.interface.js +2 -0
  160. package/src/{form → components/form}/radio-group/radio-option/radio-option.class.d.ts +5 -4
  161. package/src/components/form/radio-group/radio-option/radio-option.class.js +46 -0
  162. package/src/components/form/radio-group/radio-option/radio-option.interface.d.ts +10 -0
  163. package/src/components/form/radio-group/radio-option/radio-option.interface.js +2 -0
  164. package/src/{form → components/form}/select/select.class.d.ts +4 -5
  165. package/src/{form → components/form}/select/select.class.js +7 -8
  166. package/src/components/form/select/select.interface.d.ts +4 -0
  167. package/src/components/form/select/select.interface.js +2 -0
  168. package/src/components/form/td-checkbox/td-checkbox.class.d.ts +7 -0
  169. package/src/components/form/td-checkbox/td-checkbox.class.js +104 -0
  170. package/src/components/form/td-checkbox/td-checkbox.interface.d.ts +78 -0
  171. package/src/components/form/td-checkbox/td-checkbox.interface.js +2 -0
  172. package/src/components/form/td-checkbox/td-checkbox.style.d.ts +14 -0
  173. package/src/components/form/td-checkbox/td-checkbox.style.js +18 -0
  174. package/src/components/form/td-checkbox-button/td-checkbox-button.class.d.ts +7 -0
  175. package/src/components/form/td-checkbox-button/td-checkbox-button.class.js +15 -0
  176. package/src/components/form/td-checkbox-button/td-checkbox-button.interface.d.ts +6 -0
  177. package/src/components/form/td-checkbox-button/td-checkbox-button.interface.js +2 -0
  178. package/src/components/form/td-checkbox-group/td-checkbox-group.class.d.ts +7 -0
  179. package/src/components/form/td-checkbox-group/td-checkbox-group.class.js +20 -0
  180. package/src/components/form/td-checkbox-group/td-checkbox-group.interface.d.ts +50 -0
  181. package/src/components/form/td-checkbox-group/td-checkbox-group.interface.js +2 -0
  182. package/src/components/form/td-form/td-form.class.d.ts +22 -0
  183. package/src/components/form/td-form/td-form.class.js +52 -0
  184. package/src/components/form/td-form/td-form.interface.d.ts +92 -0
  185. package/src/components/form/td-form/td-form.interface.js +2 -0
  186. package/src/components/form/td-form/td-form.style.d.ts +4 -0
  187. package/src/components/form/td-form/td-form.style.js +8 -0
  188. package/src/components/form/td-form-item/td-form-item.class.d.ts +17 -0
  189. package/src/components/form/td-form-item/td-form-item.class.js +145 -0
  190. package/src/components/form/td-form-item/td-form-item.interface.d.ts +57 -0
  191. package/src/components/form/td-form-item/td-form-item.interface.js +9 -0
  192. package/src/components/form/td-form-item/td-form-item.style.d.ts +29 -0
  193. package/src/components/form/td-form-item/td-form-item.style.js +34 -0
  194. package/src/components/form/td-input/td-input-field.class.d.ts +7 -0
  195. package/src/{form/td-input/td-input.class.js → components/form/td-input/td-input-field.class.js} +8 -8
  196. package/src/{form/td-input/td-input.interface.d.ts → components/form/td-input/td-input-field.interface.d.ts} +3 -3
  197. package/src/components/form/td-input/td-input-field.interface.js +2 -0
  198. package/src/components/form/td-input/td-input.class.d.ts +21 -0
  199. package/src/components/form/td-input/td-input.class.js +177 -0
  200. package/src/components/form/td-input/td-input.interface.d.ts +133 -0
  201. package/src/components/form/td-input/td-input.interface.js +2 -0
  202. package/src/components/form/td-input/td-input.style.d.ts +53 -0
  203. package/src/components/form/td-input/td-input.style.js +66 -0
  204. package/src/components/form/td-input/widget/prefix.d.ts +10 -0
  205. package/src/components/form/td-input/widget/prefix.js +63 -0
  206. package/src/components/form/td-input/widget/suffix.d.ts +13 -0
  207. package/src/components/form/td-input/widget/suffix.js +120 -0
  208. package/src/components/form/td-input/widget/td-input-wrapper.class.d.ts +33 -0
  209. package/src/components/form/td-input/widget/td-input-wrapper.class.js +286 -0
  210. package/src/components/form/td-input/widget/td-input-wrapper.interface.d.ts +4 -0
  211. package/src/components/form/td-input/widget/td-input-wrapper.interface.js +2 -0
  212. package/src/components/form/td-input/widget/td-textarea-wrapper.d.ts +13 -0
  213. package/src/components/form/td-input/widget/td-textarea-wrapper.js +123 -0
  214. package/src/components/form/td-input/widget/utils.d.ts +6 -0
  215. package/src/components/form/td-input/widget/utils.js +81 -0
  216. package/src/components/form/td-radio/td-radio.class.d.ts +17 -0
  217. package/src/components/form/td-radio/td-radio.class.js +232 -0
  218. package/src/components/form/td-radio/td-radio.interface.d.ts +38 -0
  219. package/src/components/form/td-radio/td-radio.interface.js +2 -0
  220. package/src/components/form/td-radio-button/td-radio-button.class.d.ts +15 -0
  221. package/src/components/form/td-radio-button/td-radio-button.class.js +195 -0
  222. package/src/components/form/td-radio-button/td-radio-button.interface.d.ts +34 -0
  223. package/src/components/form/td-radio-button/td-radio-button.interface.js +2 -0
  224. package/src/components/form/td-radio-button/td-radio-button.style.d.ts +1 -0
  225. package/src/components/form/td-radio-button/td-radio-button.style.js +9 -0
  226. package/src/components/form/td-radio-group/td-radio-group.class.d.ts +16 -0
  227. package/src/components/form/td-radio-group/td-radio-group.class.js +105 -0
  228. package/src/components/form/td-radio-group/td-radio-group.interface.d.ts +47 -0
  229. package/src/components/form/td-radio-group/td-radio-group.interface.js +2 -0
  230. package/src/components/form/td-select/dropdown/dropdown.class.d.ts +9 -0
  231. package/src/components/form/td-select/dropdown/dropdown.class.js +48 -0
  232. package/src/components/form/td-select/dropdown/dropdown.interface.d.ts +9 -0
  233. package/src/components/form/td-select/dropdown/dropdown.interface.js +2 -0
  234. package/src/components/form/td-select/option/option.class.d.ts +6 -0
  235. package/src/components/form/td-select/option/option.class.js +36 -0
  236. package/src/components/form/td-select/option/option.interface.d.ts +20 -0
  237. package/src/components/form/td-select/option/option.interface.js +2 -0
  238. package/src/components/form/td-select/option-group/option-group.class.d.ts +6 -0
  239. package/src/components/form/td-select/option-group/option-group.class.js +50 -0
  240. package/src/components/form/td-select/option-group/option-group.interface.d.ts +14 -0
  241. package/src/components/form/td-select/option-group/option-group.interface.js +2 -0
  242. package/src/components/form/td-select/td-select.class.d.ts +6 -0
  243. package/src/components/form/td-select/td-select.class.js +32 -0
  244. package/src/components/form/td-select/td-select.interface.d.ts +172 -0
  245. package/src/components/form/td-select/td-select.interface.js +2 -0
  246. package/src/components/form/td-select/td-select.style.d.ts +53 -0
  247. package/src/components/form/td-select/td-select.style.js +76 -0
  248. package/src/components/form/td-switch/td-switch.class.d.ts +20 -0
  249. package/src/components/form/td-switch/td-switch.class.js +225 -0
  250. package/src/components/form/td-switch/td-switch.interface.d.ts +97 -0
  251. package/src/components/form/td-switch/td-switch.interface.js +2 -0
  252. package/src/components/form/td-switch/td-switch.style.d.ts +47 -0
  253. package/src/components/form/td-switch/td-switch.style.js +57 -0
  254. package/src/components/form/td-switch/widget/td-switch-core.d.ts +17 -0
  255. package/src/components/form/td-switch/widget/td-switch-core.js +212 -0
  256. package/src/components/form/td-switch/widget/td-switch-left.d.ts +7 -0
  257. package/src/components/form/td-switch/widget/td-switch-left.js +26 -0
  258. package/src/components/form/td-switch/widget/td-switch-right.d.ts +7 -0
  259. package/src/components/form/td-switch/widget/td-switch-right.js +25 -0
  260. package/src/components/navigation/index.d.ts +2 -0
  261. package/src/components/navigation/index.js +5 -0
  262. package/src/components/navigation/td-menu/td-menu.class.d.ts +7 -0
  263. package/src/components/navigation/td-menu/td-menu.class.js +42 -0
  264. package/src/components/navigation/td-menu/td-menu.interface.d.ts +23 -0
  265. package/src/components/navigation/td-menu/td-menu.interface.js +2 -0
  266. package/src/{others → components/others}/collapsible-box/collapsible-box.js +10 -11
  267. package/src/{others → components/others}/collapsible-box/contents/contents.js +9 -11
  268. package/src/{others → components/others}/collapsible-box/heading/expand-heading.js +28 -26
  269. package/src/{others → components/others}/index.d.ts +2 -0
  270. package/src/{others → components/others}/index.js +3 -1
  271. package/src/components/others/td-divider/td-divider.class.d.ts +6 -0
  272. package/src/components/others/td-divider/td-divider.class.js +80 -0
  273. package/src/components/others/td-divider/td-divider.interface.d.ts +18 -0
  274. package/src/components/others/td-divider/td-divider.interface.js +2 -0
  275. package/src/index.d.ts +6 -4
  276. package/src/index.js +7 -5
  277. package/src/styles/color-scheme.js +12 -12
  278. package/src/styles/index.d.ts +1 -0
  279. package/src/styles/index.js +4 -0
  280. package/src/styles/size.d.ts +7 -0
  281. package/src/styles/size.js +9 -0
  282. package/src/styles/var.d.ts +28 -10
  283. package/src/styles/var.js +62 -31
  284. package/src/ui/ui.abstract.d.ts +8 -0
  285. package/src/ui/ui.abstract.js +22 -0
  286. package/src/ui/ui.interface.d.ts +8 -0
  287. package/src/ui/ui.interface.js +2 -0
  288. package/src/basic/index.js +0 -19
  289. package/src/basic/td-button/td-button.class.js +0 -140
  290. package/src/basic/td-container/td-aside/td-aside.class.d.ts +0 -6
  291. package/src/basic/td-container/td-aside/td-aside.class.js +0 -17
  292. package/src/basic/td-container/td-aside/td-aside.interface.d.ts +0 -7
  293. package/src/basic/td-container/td-container.class.d.ts +0 -7
  294. package/src/basic/td-container/td-container.interface.d.ts +0 -8
  295. package/src/basic/td-container/td-footer/td-footer.class.d.ts +0 -6
  296. package/src/basic/td-container/td-footer/td-footer.class.js +0 -18
  297. package/src/basic/td-container/td-footer/td-footer.interface.d.ts +0 -7
  298. package/src/basic/td-container/td-header/td-header.class.js +0 -18
  299. package/src/basic/td-container/td-header/td-header.interface.d.ts +0 -7
  300. package/src/basic/td-container/td-main/td-main.class.d.ts +0 -6
  301. package/src/basic/td-container/td-main/td-main.interface.d.ts +0 -6
  302. package/src/basic/td-icon/td-icon.class.d.ts +0 -11
  303. package/src/basic/td-icon/td-icon.interface.d.ts +0 -11
  304. package/src/basic/td-select/td-select.class.d.ts +0 -14
  305. package/src/form/field-item/cascade/field-cascade.abstract.d.ts +0 -22
  306. package/src/form/field-item/field-item.abstract.d.ts +0 -11
  307. package/src/form/field-item/field-item.interface.d.ts +0 -12
  308. package/src/form/field-item/options/field-options.abstract.d.ts +0 -22
  309. package/src/form/field-item/span/field-span.abstract.js +0 -54
  310. package/src/form/index.d.ts +0 -11
  311. package/src/form/input-number/td-input-number.class.d.ts +0 -9
  312. package/src/form/input-number/td-input-number.class.js +0 -55
  313. package/src/form/input-number/td-input-number.interface.d.ts +0 -9
  314. package/src/form/radio-group/radio-group.interface.d.ts +0 -6
  315. package/src/form/radio-group/radio-option/radio-option.class.js +0 -33
  316. package/src/form/radio-group/radio-option/radio-option.interface.d.ts +0 -5
  317. package/src/form/select/select.interface.d.ts +0 -10
  318. package/src/form/td-input/td-input.class.d.ts +0 -9
  319. /package/src/{basic/td-container/td-aside/td-aside.interface.js → components/basic/td-button/td-button.interface.js} +0 -0
  320. /package/src/{basic/td-button/td-button.interface.js → components/basic/td-button-group/td-button-group.interface.js} +0 -0
  321. /package/src/{basic/td-container/td-container.interface.js → components/basic/td-container/td-aside/td-aside.interface.js} +0 -0
  322. /package/src/{basic → components/basic}/td-container/td-container.d.ts +0 -0
  323. /package/src/{basic/td-container/td-footer/td-footer.interface.js → components/basic/td-container/td-container.interface.js} +0 -0
  324. /package/src/{basic → components/basic}/td-container/td-container.js +0 -0
  325. /package/src/{basic/td-container/td-header/td-header.interface.js → components/basic/td-container/td-footer/td-footer.interface.js} +0 -0
  326. /package/src/{basic/td-container/td-main/td-main.interface.js → components/basic/td-container/td-header/td-header.interface.js} +0 -0
  327. /package/src/{basic/td-icon/td-icon.interface.js → components/basic/td-container/td-main/td-main.interface.js} +0 -0
  328. /package/src/{basic/td-select/option/option.interface.js → components/basic/td-icon/td-icon.interface.js} +0 -0
  329. /package/src/{basic/td-select/td-select.interface.js → components/basic/td-layout/td-col/td-col.interface.js} +0 -0
  330. /package/src/{form/checkbox-group/checkbox-group.interface.js → components/basic/td-link/td-link.interface.js} +0 -0
  331. /package/src/{form/checkbox-group/checkbox-option/checkbox-option.interface.js → components/basic/td-scrollbar/bar/bar.interface.js} +0 -0
  332. /package/src/{form/field-item/field-item.interface.js → components/basic/td-scrollbar/thumb/thumb.interface.js} +0 -0
  333. /package/src/{form/input-number/td-input-number.interface.js → components/basic/td-space/td-space.interface.js} +0 -0
  334. /package/src/{form/radio-group/radio-group.interface.js → components/basic/td-text/td-text.interface.js} +0 -0
  335. /package/src/{data → components/data}/index.d.ts +0 -0
  336. /package/src/{data → components/data}/index.js +0 -0
  337. /package/src/{form/radio-group/radio-option/radio-option.interface.js → components/feedback/dialog/dialog.interface.js} +0 -0
  338. /package/src/{form/select/select.interface.js → components/feedback/message-box/message-box.interface.js} +0 -0
  339. /package/src/{feedback → components/feedback}/overlay/container/body/body.d.ts +0 -0
  340. /package/src/{feedback → components/feedback}/overlay/container/container.d.ts +0 -0
  341. /package/src/{feedback → components/feedback}/overlay/container/footer/cancel-button/cancel-button.d.ts +0 -0
  342. /package/src/{feedback → components/feedback}/overlay/container/footer/confirm-button/confirm-button.d.ts +0 -0
  343. /package/src/{feedback → components/feedback}/overlay/container/footer/footer.d.ts +0 -0
  344. /package/src/{feedback → components/feedback}/overlay/container/header/close-button/close-button.d.ts +0 -0
  345. /package/src/{feedback → components/feedback}/overlay/container/header/header.d.ts +0 -0
  346. /package/src/{form/td-input/td-input.interface.js → components/feedback/td-focus-trap/td-focus-trap.interface.js} +0 -0
  347. /package/src/{form → components/form}/checkbox-group/checkbox-group.interface.d.ts +0 -0
  348. /package/src/{form → components/form}/field-item/input/field-input.abstract.d.ts +0 -0
  349. /package/src/{form → components/form}/field-item/select/field-select.abstract.d.ts +0 -0
  350. /package/src/{form → components/form}/field-item/textarea/field-textarea.abstract.d.ts +0 -0
  351. /package/src/{basic/td-select → components/form/field-select}/option/option.interface.d.ts +0 -0
  352. /package/src/{navigation/index.d.ts → components/navigation/td-menu/td-menu.style.d.ts} +0 -0
  353. /package/src/{navigation/index.js → components/navigation/td-menu/td-menu.style.js} +0 -0
  354. /package/src/{others → components/others}/collapsible-box/collapsible-box.d.ts +0 -0
  355. /package/src/{others → components/others}/collapsible-box/contents/contents.d.ts +0 -0
  356. /package/src/{others → components/others}/collapsible-box/heading/expand-heading.d.ts +0 -0
@@ -0,0 +1,128 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TdCol = void 0;
4
+ const rxjs_1 = require("rxjs");
5
+ const utils_1 = require("@type-dom/utils");
6
+ const ui_abstract_1 = require("../../../../ui/ui.abstract");
7
+ class TdCol extends ui_abstract_1.UI {
8
+ constructor(config) {
9
+ super();
10
+ this.className = 'TdCol';
11
+ this.config = config;
12
+ this.setConfig(config);
13
+ }
14
+ get screenWidth() {
15
+ return window.innerWidth || document.documentElement.clientWidth;
16
+ }
17
+ setConfig(config) {
18
+ super.setConfig(config);
19
+ if (config === null || config === void 0 ? void 0 : config.span) {
20
+ if (config.span === 0) {
21
+ this.addStyleObj({
22
+ display: 'none'
23
+ });
24
+ }
25
+ else {
26
+ const proportion = (0, utils_1.formatFloat)(config.span / 24) * 100 + '%';
27
+ this.addStyleObj({
28
+ maxWidth: proportion,
29
+ flex: '0 0 ' + proportion
30
+ });
31
+ }
32
+ }
33
+ if (config === null || config === void 0 ? void 0 : config.offset) {
34
+ const proportion = (0, utils_1.formatFloat)(config.offset / 24) * 100 + '%';
35
+ this.addStyleObj({
36
+ marginLeft: proportion
37
+ });
38
+ }
39
+ if (config === null || config === void 0 ? void 0 : config.pull) {
40
+ const proportion = (0, utils_1.formatFloat)(config.pull / 24) * 100 + '%';
41
+ this.addStyleObj({
42
+ position: 'relative',
43
+ right: proportion
44
+ });
45
+ }
46
+ if (config === null || config === void 0 ? void 0 : config.push) {
47
+ const proportion = (0, utils_1.formatFloat)(config.push / 24) * 100 + '%';
48
+ this.addStyleObj({
49
+ position: 'relative',
50
+ left: proportion
51
+ });
52
+ }
53
+ this.resize();
54
+ }
55
+ resize() {
56
+ // console.log('this.screenWidth is ', this.screenWidth);
57
+ const config = this.config;
58
+ if (config === null || config === void 0 ? void 0 : config.xs) {
59
+ if (this.screenWidth < 768) {
60
+ // 超小屏幕(xs)
61
+ // console.log('当前屏幕尺寸小于768px,执行xs断点下的操作');
62
+ const proportion = (0, utils_1.formatFloat)(config.xs / 24) * 100 + '%';
63
+ this.setStyleObj({
64
+ maxWidth: proportion,
65
+ flex: '0 0 ' + proportion
66
+ });
67
+ }
68
+ }
69
+ if (config === null || config === void 0 ? void 0 : config.sm) {
70
+ if (this.screenWidth >= 768 && this.screenWidth < 992) {
71
+ // 小屏幕(sm)
72
+ // console.log('当前屏幕尺寸在768px至991px之间,执行md断点下的操作');
73
+ // 设置你的值或执行相应JS代码
74
+ const proportion = (0, utils_1.formatFloat)(config.sm / 24) * 100 + '%';
75
+ this.setStyleObj({
76
+ maxWidth: proportion,
77
+ flex: '0 0 ' + proportion
78
+ });
79
+ }
80
+ }
81
+ if (config === null || config === void 0 ? void 0 : config.md) {
82
+ if (this.screenWidth >= 992 && this.screenWidth < 1200) {
83
+ // 中屏幕(md)
84
+ // console.log('当前屏幕尺寸在992px至1199px之间,执行lg断点下的操作');
85
+ // 设置你的值或执行相应JS代码
86
+ const proportion = (0, utils_1.formatFloat)(config.md / 24) * 100 + '%';
87
+ this.setStyleObj({
88
+ maxWidth: proportion,
89
+ flex: '0 0 ' + proportion
90
+ });
91
+ }
92
+ }
93
+ if (config === null || config === void 0 ? void 0 : config.lg) {
94
+ if (this.screenWidth >= 1200 && this.screenWidth < 1920) {
95
+ // 大屏幕(lg)
96
+ // console.log('当前屏幕尺寸在1200px至1920px之间,执行lg断点下的操作');
97
+ // 设置你的值或执行相应JS代码
98
+ const proportion = (0, utils_1.formatFloat)(config.lg / 24) * 100 + '%';
99
+ this.setStyleObj({
100
+ maxWidth: proportion,
101
+ flex: '0 0 ' + proportion
102
+ });
103
+ }
104
+ }
105
+ if (config === null || config === void 0 ? void 0 : config.xl) {
106
+ if (this.screenWidth >= 1920) {
107
+ // 超大屏幕(xl及以上)
108
+ // console.log('当前屏幕尺寸等于或大于1920px,执行xl断点下的操作');
109
+ // 设置你的值或执行相应JS代码
110
+ const proportion = (0, utils_1.formatFloat)(config.xl / 24) * 100 + '%';
111
+ this.setStyleObj({
112
+ maxWidth: proportion,
113
+ flex: '0 0 ' + proportion
114
+ });
115
+ }
116
+ }
117
+ }
118
+ initEvents() {
119
+ this.subscriptions.push((0, rxjs_1.fromEvent)(window, 'resize')
120
+ .pipe((0, rxjs_1.debounceTime)(250) // 防抖延时
121
+ // distinctUntilChanged() // 可选,仅在窗口尺寸发生实际变化时才触发
122
+ )
123
+ .subscribe((event) => {
124
+ this.resize();
125
+ }));
126
+ }
127
+ }
128
+ exports.TdCol = TdCol;
@@ -0,0 +1,46 @@
1
+ import { IUI, IUIConfig } from '../../../../ui/ui.interface';
2
+ export interface ITdCol extends IUI {
3
+ className: 'TdCol';
4
+ }
5
+ export interface ITdColConfig extends IUIConfig {
6
+ /**
7
+ * @description custom element tag
8
+ */
9
+ tag?: string;
10
+ /**
11
+ * @description number of column the grid spans
12
+ */
13
+ span?: number;
14
+ /**
15
+ * @description number of spacing on the left side of the grid
16
+ */
17
+ offset?: number;
18
+ /**
19
+ * @description number of columns that grid moves to the left
20
+ */
21
+ pull?: number;
22
+ /**
23
+ * @description number of columns that grid moves to the right
24
+ */
25
+ push?: number;
26
+ /**
27
+ * @description `<768px` Responsive columns or column props object
28
+ */
29
+ xs?: number;
30
+ /**
31
+ * @description `≥768px` Responsive columns or column props object
32
+ */
33
+ sm?: number;
34
+ /**
35
+ * @description `≥992px` Responsive columns or column props object
36
+ */
37
+ md?: number;
38
+ /**
39
+ * @description `≥1200px` Responsive columns or column props object
40
+ */
41
+ lg?: number;
42
+ /**
43
+ * @description `≥1920px` Responsive columns or column props object
44
+ */
45
+ xl?: number;
46
+ }
@@ -0,0 +1,10 @@
1
+ import { ITdRow, ITdRowConfig } from './td-row.interface';
2
+ import { UI } from '../../../../ui/ui.abstract';
3
+ import { TdCol } from '../td-col/td-col.class';
4
+ export declare class TdRow extends UI implements ITdRow {
5
+ className: 'TdRow';
6
+ childNodes: TdCol[];
7
+ gutter?: number;
8
+ constructor(config?: ITdRowConfig);
9
+ setConfig(config?: ITdRowConfig): void;
10
+ }
@@ -0,0 +1,101 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TdRow = void 0;
4
+ const ui_abstract_1 = require("../../../../ui/ui.abstract");
5
+ const td_col_class_1 = require("../td-col/td-col.class");
6
+ class TdRow extends ui_abstract_1.UI {
7
+ // justify: string = 'start';
8
+ // align: string = 'top';
9
+ // tag: string = 'div';
10
+ constructor(config) {
11
+ super();
12
+ this.className = 'TdRow';
13
+ this.addStyleObj({
14
+ display: 'flex',
15
+ flexWrap: 'wrap',
16
+ position: 'relative',
17
+ boxSizing: 'border-box'
18
+ });
19
+ this.childNodes = [];
20
+ this.setConfig(config);
21
+ }
22
+ setConfig(config) {
23
+ super.setConfig(config);
24
+ if (config === null || config === void 0 ? void 0 : config.gutter) {
25
+ this.gutter = config.gutter;
26
+ this.addStyleObj({
27
+ marginLeft: `-${config.gutter / 2}px`,
28
+ marginRight: `-${config.gutter / 2}px`
29
+ });
30
+ this.children.forEach((child) => {
31
+ if (child instanceof td_col_class_1.TdCol) {
32
+ if (config.gutter) {
33
+ child.addStyleObj({
34
+ boxSizing: 'border-box',
35
+ paddingLeft: `${config.gutter / 2}px`,
36
+ paddingRight: `${config.gutter / 2}px`
37
+ });
38
+ }
39
+ }
40
+ });
41
+ }
42
+ if (config === null || config === void 0 ? void 0 : config.justify) {
43
+ // this.setJustify(config.justify);
44
+ switch (config.justify) {
45
+ case 'center':
46
+ this.addStyleObj({
47
+ justifyContent: 'center'
48
+ });
49
+ break;
50
+ case 'end':
51
+ this.addStyleObj({
52
+ justifyContent: 'flex-end'
53
+ });
54
+ break;
55
+ case 'space-between':
56
+ this.addStyleObj({
57
+ justifyContent: 'space-between'
58
+ });
59
+ break;
60
+ case 'space-around':
61
+ this.addStyleObj({
62
+ justifyContent: 'space-around'
63
+ });
64
+ break;
65
+ case 'space-evenly':
66
+ this.addStyleObj({
67
+ justifyContent: 'space-evenly'
68
+ });
69
+ break;
70
+ default:
71
+ break;
72
+ }
73
+ }
74
+ if (config === null || config === void 0 ? void 0 : config.align) {
75
+ // this.setAlign(config.align);
76
+ switch (config.align) {
77
+ case 'top':
78
+ this.addStyleObj({
79
+ alignItems: 'flex-start'
80
+ });
81
+ break;
82
+ case 'middle':
83
+ this.addStyleObj({
84
+ alignItems: 'center'
85
+ });
86
+ break;
87
+ case 'bottom':
88
+ this.addStyleObj({
89
+ alignItems: 'flex-end'
90
+ });
91
+ break;
92
+ case 'stretch':
93
+ this.addStyleObj({
94
+ alignItems: 'stretch'
95
+ });
96
+ break;
97
+ }
98
+ }
99
+ }
100
+ }
101
+ exports.TdRow = TdRow;
@@ -0,0 +1,18 @@
1
+ import { IUI, IUIConfig } from '../../../../ui/ui.interface';
2
+ export interface ITdRow extends IUI {
3
+ className: 'TdRow';
4
+ }
5
+ /**
6
+ * gutter: number = 0;
7
+ * justify: string = 'start';
8
+ * align: string = 'top';
9
+ * tag: string = 'div';
10
+ */
11
+ export interface ITdRowConfig extends IUIConfig {
12
+ gutter?: number;
13
+ justify?: string;
14
+ align?: string;
15
+ tag?: string;
16
+ }
17
+ export declare const RowJustify: readonly ["start", "center", "end", "space-around", "space-between", "space-evenly"];
18
+ export declare const RowAlign: readonly ["top", "middle", "bottom"];
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RowAlign = exports.RowJustify = void 0;
4
+ exports.RowJustify = [
5
+ 'start',
6
+ 'center',
7
+ 'end',
8
+ 'space-around',
9
+ 'space-between',
10
+ 'space-evenly'
11
+ ];
12
+ exports.RowAlign = ['top', 'middle', 'bottom'];
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const $base = {
4
+ display: 'flex',
5
+ flexWrap: 'wrap',
6
+ position: 'relative',
7
+ boxSizing: 'border-box'
8
+ };
@@ -0,0 +1,11 @@
1
+ import { UI } from '../../../ui/ui.abstract';
2
+ import { TdIcon } from '../td-icon/td-icon.class';
3
+ import { ITdLink, ITdLinkConfig } from './td-link.interface';
4
+ export declare class TdLink extends UI implements ITdLink {
5
+ className: 'TdLink';
6
+ config?: ITdLinkConfig;
7
+ icon?: TdIcon;
8
+ constructor(configs: ITdLinkConfig);
9
+ setConfig(config?: Partial<ITdLinkConfig>): void;
10
+ initEvents(): void;
11
+ }
@@ -0,0 +1,105 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TdLink = void 0;
4
+ const framework_1 = require("@type-dom/framework");
5
+ const ui_abstract_1 = require("../../../ui/ui.abstract");
6
+ const td_link_style_1 = require("../td-link/td-link.style");
7
+ class TdLink extends ui_abstract_1.UI {
8
+ constructor(configs) {
9
+ super({ tag: 'a' });
10
+ this.className = 'TdLink';
11
+ this.addStyleObj(td_link_style_1.$baseLink);
12
+ this.setConfig(configs);
13
+ }
14
+ setConfig(config) {
15
+ super.setConfig(config);
16
+ this.config = config;
17
+ if (config === null || config === void 0 ? void 0 : config.href) {
18
+ this.addAttrObj({
19
+ href: config.href
20
+ });
21
+ }
22
+ if (config === null || config === void 0 ? void 0 : config.target) {
23
+ this.addAttrObj({
24
+ target: config.target
25
+ });
26
+ }
27
+ if (config === null || config === void 0 ? void 0 : config.disabled) {
28
+ this.addAttrObj({
29
+ disabled: config.disabled
30
+ });
31
+ }
32
+ if (config === null || config === void 0 ? void 0 : config.type) {
33
+ if (config === null || config === void 0 ? void 0 : config.disabled) {
34
+ this.addStyleObj(td_link_style_1.$linkStateColors[config.type].disabled);
35
+ }
36
+ else {
37
+ this.addStyleObj(td_link_style_1.$linkStateColors[config.type].default);
38
+ }
39
+ }
40
+ else {
41
+ this.addStyleObj(td_link_style_1.$linkStateColors.default.default);
42
+ }
43
+ if (config === null || config === void 0 ? void 0 : config.icon) {
44
+ if ((config === null || config === void 0 ? void 0 : config.iconPosition) === 'left') {
45
+ // 插入到前面
46
+ this.unshiftChild(config.icon);
47
+ }
48
+ else {
49
+ this.addChild(config.icon);
50
+ }
51
+ }
52
+ }
53
+ initEvents() {
54
+ this.addEvents({
55
+ mouseover: () => {
56
+ var _a, _b, _c, _d;
57
+ if ((_a = this.config) === null || _a === void 0 ? void 0 : _a.type) {
58
+ if ((_b = this.config) === null || _b === void 0 ? void 0 : _b.disabled) {
59
+ this.setStyleObj({
60
+ cursor: framework_1.StyleCursor.notAllowed
61
+ });
62
+ }
63
+ else {
64
+ this.setStyleObj(td_link_style_1.$linkStateColors[(_c = this.config) === null || _c === void 0 ? void 0 : _c.type].hover);
65
+ }
66
+ }
67
+ else {
68
+ this.setStyleObj(td_link_style_1.$linkStateColors.default.hover);
69
+ }
70
+ if (((_d = this.config) === null || _d === void 0 ? void 0 : _d.underline) === false) { // 设置 false 的情况下,不显示下划线
71
+ this.setStyleObj({
72
+ textDecoration: 'none'
73
+ });
74
+ }
75
+ else {
76
+ // 1. 默认显示下划线
77
+ // 2. 默认显示下划线,如果设置了 underline 为 true,则显示下划线
78
+ this.setStyleObj({
79
+ textDecoration: 'underline'
80
+ });
81
+ }
82
+ },
83
+ mouseout: (evt) => {
84
+ var _a, _b, _c, _d, _e;
85
+ this.setStyleObj({
86
+ textDecoration: 'none'
87
+ });
88
+ if ((_a = this.config) === null || _a === void 0 ? void 0 : _a.type) {
89
+ this.removeStyleObj(td_link_style_1.$linkStateColors[(_b = this.config) === null || _b === void 0 ? void 0 : _b.type].hover);
90
+ if ((_c = this.config) === null || _c === void 0 ? void 0 : _c.disabled) {
91
+ evt === null || evt === void 0 ? void 0 : evt.preventDefault();
92
+ this.setStyleObj(td_link_style_1.$linkStateColors[(_d = this.config) === null || _d === void 0 ? void 0 : _d.type].disabled);
93
+ }
94
+ else {
95
+ this.setStyleObj(td_link_style_1.$linkStateColors[(_e = this.config) === null || _e === void 0 ? void 0 : _e.type].default);
96
+ }
97
+ }
98
+ else {
99
+ this.removeStyleObj(td_link_style_1.$linkStateColors.default.hover);
100
+ }
101
+ }
102
+ });
103
+ }
104
+ }
105
+ exports.TdLink = TdLink;
@@ -0,0 +1,33 @@
1
+ import { TdIcon } from '@type-dom/ui';
2
+ import { IUI, IUIConfig } from '../../../ui/ui.interface';
3
+ export interface ITdLink extends IUI {
4
+ className: 'TdLink';
5
+ }
6
+ export interface ITdLinkConfig extends IUIConfig {
7
+ title?: string;
8
+ type?: 'primary' | 'success' | 'warning' | 'info' | 'danger' | 'default';
9
+ /**
10
+ * @description whether the component has underline
11
+ */
12
+ underline?: boolean;
13
+ /**
14
+ * @description whether the component is disabled
15
+ */
16
+ disabled?: boolean;
17
+ /**
18
+ * @description same as native hyperlink's `href`
19
+ */
20
+ href?: string;
21
+ /**
22
+ * @description same as native hyperlink's `target`
23
+ */
24
+ target?: '_blank' | '_parent' | '_self' | '_top' | string;
25
+ /**
26
+ * @description icon component
27
+ */
28
+ icon?: TdIcon;
29
+ /**
30
+ * @description icon position 默认 right
31
+ */
32
+ iconPosition?: 'left' | 'right';
33
+ }
@@ -0,0 +1,5 @@
1
+ import { IStyle } from '@type-dom/framework';
2
+ import { IType } from '../../../styles/var';
3
+ export declare const $baseLink: Partial<IStyle>;
4
+ export declare const $linkStateColors: Record<string, any>;
5
+ export declare function buttonVariant($type: IType): void;
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.buttonVariant = exports.$linkStateColors = exports.$baseLink = void 0;
4
+ const framework_1 = require("@type-dom/framework");
5
+ const var_1 = require("../../../styles/var");
6
+ exports.$baseLink = {
7
+ display: 'inline-flex',
8
+ flexDirection: 'row',
9
+ alignItems: 'center',
10
+ justifyContent: 'center',
11
+ verticalAlign: 'middle',
12
+ position: 'relative',
13
+ textDecoration: 'none',
14
+ outline: 'none',
15
+ cursor: framework_1.StyleCursor.pointer,
16
+ padding: '0'
17
+ };
18
+ exports.$linkStateColors = {};
19
+ function buttonVariant($type) {
20
+ exports.$linkStateColors[$type] = {
21
+ default: {
22
+ color: var_1.$colors[$type].base
23
+ },
24
+ hover: {
25
+ color: $type === 'default' ? var_1.$colors['primary'].base : var_1.$colors[$type]['light-3'] // ['color', $type, 'light-3'],
26
+ // content: '',
27
+ // position: 'absolute',
28
+ // left: 0,
29
+ // right: 0,
30
+ // height: 0,
31
+ // bottom: 0,
32
+ // borderBottom: '1px solid ' + ($type === 'default' ? $colors['primary'].base : $colors[$type]['light-3']),
33
+ },
34
+ active: {
35
+ color: var_1.$colors[$type]['dark-2'] // ['color', $type, 'dark-2'],
36
+ },
37
+ disabled: {
38
+ color: var_1.$colors[$type]['light-5'] // ['color', $type, 'light-5'],
39
+ }
40
+ };
41
+ }
42
+ exports.buttonVariant = buttonVariant;
43
+ for (const $type of ['primary', 'success', 'warning', 'info', 'danger', 'default']) {
44
+ buttonVariant($type);
45
+ }
@@ -0,0 +1,8 @@
1
+ import { UI } from '../../../../ui/ui.abstract';
2
+ import { TdScrollbarThumb } from '../thumb/thumb.class';
3
+ import { ITdScrollbarBar, ITdScrollbarBarConfig } from './bar.interface';
4
+ export declare class TdScrollbarBar extends UI implements ITdScrollbarBar {
5
+ className: 'TdScrollbarBar';
6
+ thumbs: [TdScrollbarThumb, TdScrollbarThumb];
7
+ constructor(config?: ITdScrollbarBarConfig);
8
+ }
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TdScrollbarBar = void 0;
4
+ const ui_abstract_1 = require("../../../../ui/ui.abstract");
5
+ const thumb_class_1 = require("../thumb/thumb.class");
6
+ class TdScrollbarBar extends ui_abstract_1.UI {
7
+ constructor(config) {
8
+ super();
9
+ this.className = 'TdScrollbarBar';
10
+ this.addAttrName('td-scrollbar-bar');
11
+ this.addStyleObj({
12
+ position: 'absolute',
13
+ right: '2px',
14
+ bottom: '2px',
15
+ zIndex: 1,
16
+ borderRadius: '4px',
17
+ });
18
+ // config?.minSize 20
19
+ this.thumbs = [
20
+ new thumb_class_1.TdScrollbarThumb({
21
+ vertical: false,
22
+ ratio: 1,
23
+ }),
24
+ new thumb_class_1.TdScrollbarThumb({
25
+ vertical: true,
26
+ ratio: 1,
27
+ })
28
+ ];
29
+ }
30
+ }
31
+ exports.TdScrollbarBar = TdScrollbarBar;
@@ -0,0 +1,8 @@
1
+ import { IUI, IUIConfig } from '../../../../ui/ui.interface';
2
+ export interface ITdScrollbarBar extends IUI {
3
+ className: 'TdScrollbarBar';
4
+ }
5
+ export interface ITdScrollbarBarConfig extends IUIConfig {
6
+ always?: boolean;
7
+ minSize: number;
8
+ }
@@ -0,0 +1,9 @@
1
+ import { ITdScrollbar, ITdScrollbarConfig } from './td-scrollbar.interface';
2
+ import { UI } from '../../../ui/ui.abstract';
3
+ export declare class TdScrollbar extends UI implements ITdScrollbar {
4
+ className: 'TdScrollbar';
5
+ private wrap;
6
+ private view;
7
+ constructor(config?: Partial<ITdScrollbarConfig>);
8
+ setConfig(config?: Partial<ITdScrollbarConfig>): void;
9
+ }
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TdScrollbar = void 0;
4
+ const ui_abstract_1 = require("../../../ui/ui.abstract");
5
+ const framework_1 = require("@type-dom/framework");
6
+ const bar_class_1 = require("./bar/bar.class");
7
+ class TdScrollbar extends ui_abstract_1.UI {
8
+ constructor(config) {
9
+ super(config);
10
+ this.className = 'TdScrollbar';
11
+ this.addAttrName('td-scrollbar');
12
+ this.addStyleObj({
13
+ overflow: 'hidden',
14
+ position: 'relative',
15
+ height: '100%',
16
+ });
17
+ this.wrap = new framework_1.Div({
18
+ name: 'td-scrollbar-wrap',
19
+ styleObj: {
20
+ overflow: 'auto',
21
+ height: (config === null || config === void 0 ? void 0 : config.height) || '100%',
22
+ }
23
+ });
24
+ this.view = new framework_1.Div({
25
+ name: 'td-scrollbar-view'
26
+ });
27
+ if (config === null || config === void 0 ? void 0 : config.viewStyle) {
28
+ this.view.addStyleObj(config.viewStyle);
29
+ }
30
+ this.wrap.addChild(this.view);
31
+ if (config === null || config === void 0 ? void 0 : config.wrapStyle) {
32
+ this.wrap.addStyleObj(config.wrapStyle);
33
+ }
34
+ this.addChild(this.wrap);
35
+ if (!(config === null || config === void 0 ? void 0 : config.native)) {
36
+ const bar = new bar_class_1.TdScrollbarBar({
37
+ always: (config === null || config === void 0 ? void 0 : config.always) || true,
38
+ minSize: (config === null || config === void 0 ? void 0 : config.minSize) || 20,
39
+ });
40
+ this.addChildren(...bar.thumbs);
41
+ }
42
+ if (config === null || config === void 0 ? void 0 : config.contents) {
43
+ this.view.addChildren(...config.contents);
44
+ }
45
+ this.setConfig(config);
46
+ }
47
+ setConfig(config) {
48
+ super.setConfig(config);
49
+ }
50
+ }
51
+ exports.TdScrollbar = TdScrollbar;