@scaleflex/ui-tw 0.0.2 → 0.0.5

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 (365) hide show
  1. package/LICENSE +1 -33
  2. package/README.md +2 -16
  3. package/{core/button → button}/button.component.d.ts +2 -3
  4. package/{core/button → button}/button.component.js +8 -9
  5. package/{core/button → button}/button.const.d.ts +0 -2
  6. package/{core/button → button}/button.const.js +2 -2
  7. package/{core/button → button}/button.types.d.ts +3 -5
  8. package/{core/button → button}/button.types.js +2 -4
  9. package/{core/button → button}/button.utils.d.ts +1 -1
  10. package/{core/button → button}/button.utils.js +1 -1
  11. package/{core/button → button}/components/end-icon.d.ts +1 -1
  12. package/{core/button → button}/components/end-icon.js +3 -3
  13. package/{core/button → button}/components/start-icon.d.ts +2 -2
  14. package/{core/button → button}/components/start-icon.js +3 -3
  15. package/button/index.d.ts +3 -0
  16. package/button/index.js +2 -0
  17. package/card/card.component.d.ts +9 -0
  18. package/card/card.component.js +59 -0
  19. package/card/index.d.ts +1 -0
  20. package/card/index.js +1 -0
  21. package/form/components/form-field-group.component.d.ts +19 -0
  22. package/form/components/form-field-group.component.js +41 -0
  23. package/form/form.component.d.ts +30 -0
  24. package/form/form.component.js +123 -0
  25. package/form/form.types.d.ts +7 -0
  26. package/{core/switcher/switcher-size.js → form/form.types.js} +1 -1
  27. package/form/index.d.ts +2 -0
  28. package/form/index.js +2 -0
  29. package/input/index.d.ts +3 -0
  30. package/input/index.js +2 -0
  31. package/input/input.component.d.ts +7 -0
  32. package/input/input.component.js +42 -0
  33. package/input/input.types.d.ts +17 -0
  34. package/input/input.types.js +10 -0
  35. package/label/components/info-outline-icon.d.ts +3 -0
  36. package/label/components/info-outline-icon.js +30 -0
  37. package/label/components/label-icon.d.ts +7 -0
  38. package/label/components/label-icon.js +43 -0
  39. package/label/index.d.ts +1 -0
  40. package/label/index.js +1 -0
  41. package/label/label.component.d.ts +4 -0
  42. package/label/label.component.js +44 -0
  43. package/label/label.types.d.ts +14 -0
  44. package/{core/tab/types/size.js → label/label.types.js} +1 -1
  45. package/label/label.utils.d.ts +2 -0
  46. package/label/label.utils.js +16 -0
  47. package/package.json +8 -4
  48. package/{theme/theme.css → theme.css} +4 -4
  49. package/tooltip/index.d.ts +1 -0
  50. package/tooltip/index.js +1 -0
  51. package/tooltip/tooltip.component.d.ts +10 -0
  52. package/tooltip/tooltip.component.js +51 -0
  53. package/tooltip/tooltip.types.d.ts +5 -0
  54. package/core/accordion/accordion.component.d.ts +0 -3
  55. package/core/accordion/accordion.component.js +0 -50
  56. package/core/accordion/accordion.props.d.ts +0 -13
  57. package/core/accordion/accordion.props.js +0 -1
  58. package/core/accordion/index.d.ts +0 -2
  59. package/core/accordion/index.js +0 -1
  60. package/core/accordion-details/accordion-details.component.d.ts +0 -3
  61. package/core/accordion-details/accordion-details.component.js +0 -16
  62. package/core/accordion-details/accordion-details.props.d.ts +0 -4
  63. package/core/accordion-details/index.d.ts +0 -2
  64. package/core/accordion-details/index.js +0 -1
  65. package/core/accordion-header/accordion-header.component.d.ts +0 -3
  66. package/core/accordion-header/accordion-header.component.js +0 -48
  67. package/core/accordion-header/accordion-header.props.d.ts +0 -11
  68. package/core/accordion-header/accordion-header.props.js +0 -1
  69. package/core/accordion-header/index.d.ts +0 -2
  70. package/core/accordion-header/index.js +0 -1
  71. package/core/arrow/arrow.component.d.ts +0 -3
  72. package/core/arrow/arrow.component.js +0 -22
  73. package/core/arrow/arrow.props.d.ts +0 -14
  74. package/core/arrow/arrow.props.js +0 -6
  75. package/core/arrow/index.d.ts +0 -2
  76. package/core/arrow/index.js +0 -1
  77. package/core/arrow-tick/arrow-tick.component.d.ts +0 -3
  78. package/core/arrow-tick/arrow-tick.component.js +0 -21
  79. package/core/arrow-tick/arrow-tick.props.d.ts +0 -14
  80. package/core/arrow-tick/arrow-tick.props.js +0 -6
  81. package/core/arrow-tick/index.d.ts +0 -2
  82. package/core/arrow-tick/index.js +0 -1
  83. package/core/button/index.d.ts +0 -4
  84. package/core/button/index.js +0 -3
  85. package/core/check-box/check-box.component.d.ts +0 -0
  86. package/core/check-box/check-box.component.js +0 -77
  87. package/core/check-box/check-box.props.d.ts +0 -15
  88. package/core/check-box/check-box.props.js +0 -1
  89. package/core/check-box/check-box.utils.d.ts +0 -3
  90. package/core/check-box/check-box.utils.js +0 -21
  91. package/core/check-box/index.d.ts +0 -0
  92. package/core/check-box/index.js +0 -2
  93. package/core/check-box/types/index.d.ts +0 -2
  94. package/core/check-box/types/index.js +0 -2
  95. package/core/check-box/types/size.d.ts +0 -4
  96. package/core/check-box/types/size.js +0 -4
  97. package/core/check-box/types/type.d.ts +0 -4
  98. package/core/check-box/types/type.js +0 -4
  99. package/core/check-box-group/check-box-group.component.d.ts +0 -0
  100. package/core/check-box-group/check-box-group.component.js +0 -75
  101. package/core/check-box-group/check-box-group.props.d.ts +0 -0
  102. package/core/check-box-group/check-box-group.props.js +0 -23
  103. package/core/check-box-group/index.d.ts +0 -0
  104. package/core/check-box-group/index.js +0 -2
  105. package/core/check-box-group/types/index.d.ts +0 -1
  106. package/core/check-box-group/types/index.js +0 -1
  107. package/core/check-box-group/types/label-position.d.ts +0 -4
  108. package/core/check-box-group/types/label-position.js +0 -4
  109. package/core/cross-button/cross-button.component.d.ts +0 -3
  110. package/core/cross-button/cross-button.component.js +0 -37
  111. package/core/cross-button/cross-button.props.d.ts +0 -8
  112. package/core/cross-button/cross-button.props.js +0 -1
  113. package/core/cross-button/index.d.ts +0 -2
  114. package/core/cross-button/index.js +0 -1
  115. package/core/cross-button/types/index.d.ts +0 -1
  116. package/core/cross-button/types/index.js +0 -1
  117. package/core/cross-button/types/size.d.ts +0 -6
  118. package/core/cross-button/types/size.js +0 -6
  119. package/core/dot/dot.component.d.ts +0 -3
  120. package/core/dot/dot.component.js +0 -15
  121. package/core/dot/dot.props.d.ts +0 -4
  122. package/core/dot/dot.props.js +0 -1
  123. package/core/dot/index.d.ts +0 -2
  124. package/core/dot/index.js +0 -1
  125. package/core/dots-navigation/dots-navigation.component.d.ts +0 -3
  126. package/core/dots-navigation/dots-navigation.component.js +0 -24
  127. package/core/dots-navigation/dots-navigation.props.d.ts +0 -5
  128. package/core/dots-navigation/dots-navigation.props.js +0 -1
  129. package/core/dots-navigation/index.d.ts +0 -2
  130. package/core/dots-navigation/index.js +0 -1
  131. package/core/input/components/clear-icon.d.ts +0 -6
  132. package/core/input/components/clear-icon.js +0 -12
  133. package/core/input/components/copy-icon.d.ts +0 -6
  134. package/core/input/components/copy-icon.js +0 -13
  135. package/core/input/components/password-icon.d.ts +0 -7
  136. package/core/input/components/password-icon.js +0 -24
  137. package/core/input/components/render-icon.d.ts +0 -7
  138. package/core/input/components/render-icon.js +0 -26
  139. package/core/input/index.d.ts +0 -2
  140. package/core/input/index.js +0 -1
  141. package/core/input/input.component.d.ts +0 -3
  142. package/core/input/input.component.js +0 -233
  143. package/core/input/input.const.d.ts +0 -6
  144. package/core/input/input.const.js +0 -6
  145. package/core/input/input.types.d.ts +0 -56
  146. package/core/input/input.types.js +0 -16
  147. package/core/input/input.utils.d.ts +0 -2
  148. package/core/input/input.utils.js +0 -13
  149. package/core/modal/index.d.ts +0 -2
  150. package/core/modal/index.js +0 -1
  151. package/core/modal/modal-menu-context.d.ts +0 -5
  152. package/core/modal/modal-menu-context.js +0 -10
  153. package/core/modal/modal.component.d.ts +0 -3
  154. package/core/modal/modal.component.js +0 -97
  155. package/core/modal/modal.props.d.ts +0 -16
  156. package/core/modal/modal.props.js +0 -1
  157. package/core/modal/modal.utils.d.ts +0 -1
  158. package/core/modal/modal.utils.js +0 -4
  159. package/core/modal/types/index.d.ts +0 -1
  160. package/core/modal/types/index.js +0 -1
  161. package/core/modal/types/size.d.ts +0 -7
  162. package/core/modal/types/size.js +0 -7
  163. package/core/modal-actions/index.d.ts +0 -2
  164. package/core/modal-actions/index.js +0 -1
  165. package/core/modal-actions/modal-actions.component.d.ts +0 -3
  166. package/core/modal-actions/modal-actions.component.js +0 -18
  167. package/core/modal-actions/modal-actions.props.d.ts +0 -8
  168. package/core/modal-actions/modal-actions.props.js +0 -1
  169. package/core/modal-actions/types/align.d.ts +0 -5
  170. package/core/modal-actions/types/align.js +0 -5
  171. package/core/modal-actions/types/index.d.ts +0 -1
  172. package/core/modal-actions/types/index.js +0 -1
  173. package/core/modal-content/index.d.ts +0 -2
  174. package/core/modal-content/index.js +0 -1
  175. package/core/modal-content/modal-content.component.d.ts +0 -3
  176. package/core/modal-content/modal-content.component.js +0 -15
  177. package/core/modal-content/modal-content.props.d.ts +0 -4
  178. package/core/modal-content/modal-content.props.js +0 -1
  179. package/core/modal-title/index.d.ts +0 -2
  180. package/core/modal-title/index.js +0 -1
  181. package/core/modal-title/modal-title.component.d.ts +0 -6
  182. package/core/modal-title/modal-title.component.js +0 -37
  183. package/core/modal-title/modal-title.props.d.ts +0 -14
  184. package/core/modal-title/modal-title.props.js +0 -1
  185. package/core/modal-title/types/index.d.ts +0 -1
  186. package/core/modal-title/types/index.js +0 -1
  187. package/core/modal-title/types/variant.d.ts +0 -4
  188. package/core/modal-title/types/variant.js +0 -4
  189. package/core/pagination/index.d.ts +0 -2
  190. package/core/pagination/index.js +0 -1
  191. package/core/pagination/pagination.component.d.ts +0 -3
  192. package/core/pagination/pagination.component.js +0 -81
  193. package/core/pagination/pagination.props.d.ts +0 -11
  194. package/core/pagination/pagination.props.js +0 -1
  195. package/core/popper/index.d.ts +0 -2
  196. package/core/popper/index.js +0 -1
  197. package/core/popper/popper.component.d.ts +0 -3
  198. package/core/popper/popper.component.js +0 -113
  199. package/core/popper/popper.props.d.ts +0 -41
  200. package/core/popper/popper.props.js +0 -1
  201. package/core/popper/popper.utils.d.ts +0 -1
  202. package/core/popper/popper.utils.js +0 -10
  203. package/core/popper/types/index.d.ts +0 -3
  204. package/core/popper/types/index.js +0 -3
  205. package/core/popper/types/phases.d.ts +0 -11
  206. package/core/popper/types/phases.js +0 -11
  207. package/core/popper/types/position.d.ts +0 -17
  208. package/core/popper/types/position.js +0 -17
  209. package/core/popper/types/strategy.d.ts +0 -4
  210. package/core/popper/types/strategy.js +0 -4
  211. package/core/radio/index.d.ts +0 -3
  212. package/core/radio/index.js +0 -2
  213. package/core/radio/radio.component.d.ts +0 -3
  214. package/core/radio/radio.component.js +0 -38
  215. package/core/radio/radio.props.d.ts +0 -13
  216. package/core/radio/radio.props.js +0 -1
  217. package/core/radio/size.d.ts +0 -4
  218. package/core/radio/size.js +0 -4
  219. package/core/radio-group/index.d.ts +0 -2
  220. package/core/radio-group/index.js +0 -1
  221. package/core/radio-group/radio-group.component.d.ts +0 -3
  222. package/core/radio-group/radio-group.component.js +0 -48
  223. package/core/radio-group/radio-group.props.d.ts +0 -15
  224. package/core/radio-group/radio-group.props.js +0 -1
  225. package/core/switcher/index.d.ts +0 -3
  226. package/core/switcher/index.js +0 -2
  227. package/core/switcher/switcher-size.d.ts +0 -5
  228. package/core/switcher/switcher.component.d.ts +0 -3
  229. package/core/switcher/switcher.component.js +0 -54
  230. package/core/switcher/switcher.props.d.ts +0 -14
  231. package/core/switcher/switcher.props.js +0 -1
  232. package/core/switcher/switcher.utils.d.ts +0 -4
  233. package/core/switcher/switcher.utils.js +0 -37
  234. package/core/switcher-group/index.d.ts +0 -2
  235. package/core/switcher-group/index.js +0 -1
  236. package/core/switcher-group/switcher-group.component.d.ts +0 -3
  237. package/core/switcher-group/switcher-group.component.js +0 -41
  238. package/core/switcher-group/switcher-group.props.d.ts +0 -13
  239. package/core/switcher-group/switcher-group.props.js +0 -1
  240. package/core/tab/index.d.ts +0 -2
  241. package/core/tab/index.js +0 -1
  242. package/core/tab/tab.component.d.ts +0 -6
  243. package/core/tab/tab.component.js +0 -52
  244. package/core/tab/tab.props.d.ts +0 -15
  245. package/core/tab/tab.props.js +0 -1
  246. package/core/tab/types/index.d.ts +0 -1
  247. package/core/tab/types/index.js +0 -1
  248. package/core/tab/types/size.d.ts +0 -5
  249. package/core/tab-panel/index.d.ts +0 -2
  250. package/core/tab-panel/index.js +0 -1
  251. package/core/tab-panel/tab-panel.component.d.ts +0 -3
  252. package/core/tab-panel/tab-panel.component.js +0 -18
  253. package/core/tab-panel/tab-panel.props.d.ts +0 -6
  254. package/core/tab-panel/tab-panel.props.js +0 -1
  255. package/core/upload-input/index.d.ts +0 -2
  256. package/core/upload-input/index.js +0 -1
  257. package/core/upload-input/upload-input.component.d.ts +0 -3
  258. package/core/upload-input/upload-input.component.js +0 -68
  259. package/core/upload-input/upload-input.props.d.ts +0 -9
  260. package/core/upload-input/upload-input.props.js +0 -1
  261. package/hooks/README.md +0 -26
  262. package/hooks/use-controlled.d.ts +0 -1
  263. package/hooks/use-controlled.js +0 -20
  264. package/hooks/use-debounce.d.ts +0 -2
  265. package/hooks/use-debounce.js +0 -19
  266. package/hooks/use-drag.d.ts +0 -5
  267. package/hooks/use-drag.js +0 -37
  268. package/hooks/use-enhanced-effect.d.ts +0 -3
  269. package/hooks/use-enhanced-effect.js +0 -3
  270. package/hooks/use-event-callback.d.ts +0 -4
  271. package/hooks/use-event-callback.js +0 -19
  272. package/hooks/use-pagination.d.ts +0 -3
  273. package/hooks/use-pagination.js +0 -106
  274. package/hooks/use-portal.d.ts +0 -14
  275. package/hooks/use-portal.js +0 -75
  276. package/theme/README.md +0 -9
  277. package/utils/README.md +0 -11
  278. package/utils/functions/apply-display-names.d.ts +0 -6
  279. package/utils/functions/apply-display-names.js +0 -12
  280. package/utils/functions/apply-polymorphic-function-prop.d.ts +0 -6
  281. package/utils/functions/apply-polymorphic-function-prop.js +0 -11
  282. package/utils/functions/color-picker/color-converters.d.ts +0 -11
  283. package/utils/functions/color-picker/color-converters.js +0 -159
  284. package/utils/functions/convert-to-string.d.ts +0 -1
  285. package/utils/functions/convert-to-string.js +0 -3
  286. package/utils/functions/escape-regexp.d.ts +0 -1
  287. package/utils/functions/escape-regexp.js +0 -3
  288. package/utils/functions/generate-class-names.d.ts +0 -1
  289. package/utils/functions/generate-class-names.js +0 -22
  290. package/utils/functions/get-elem-document-coords.d.ts +0 -6
  291. package/utils/functions/get-elem-document-coords.js +0 -21
  292. package/utils/functions/ignore-event.d.ts +0 -1
  293. package/utils/functions/ignore-event.js +0 -9
  294. package/utils/functions/index.d.ts +0 -11
  295. package/utils/functions/index.js +0 -12
  296. package/utils/functions/intrinsic-component.d.ts +0 -0
  297. package/utils/functions/intrinsic-component.js +0 -28
  298. package/utils/functions/object-keys.d.ts +0 -6
  299. package/utils/functions/object-keys.js +0 -6
  300. package/utils/functions/object-values.d.ts +0 -7
  301. package/utils/functions/object-values.js +0 -6
  302. package/utils/functions/on-click-by-mouse-down.d.ts +0 -2
  303. package/utils/functions/on-click-by-mouse-down.js +0 -9
  304. package/utils/functions/set-ref.d.ts +0 -8
  305. package/utils/functions/set-ref.js +0 -13
  306. package/utils/functions/slider/utils.d.ts +0 -47
  307. package/utils/functions/slider/utils.js +0 -124
  308. package/utils/functions/use-fork-ref.d.ts +0 -2
  309. package/utils/functions/use-fork-ref.js +0 -18
  310. package/utils/types/color/icon-button-color.d.ts +0 -5
  311. package/utils/types/color/icon-button-color.js +0 -5
  312. package/utils/types/color/index.d.ts +0 -0
  313. package/utils/types/color/index.js +0 -2
  314. package/utils/types/color/input-background-color.d.ts +0 -4
  315. package/utils/types/color/input-background-color.js +0 -4
  316. package/utils/types/css/align.d.ts +0 -11
  317. package/utils/types/css/align.js +0 -11
  318. package/utils/types/css/breakpoint.d.ts +0 -18
  319. package/utils/types/css/breakpoint.js +0 -18
  320. package/utils/types/css/direction.d.ts +0 -8
  321. package/utils/types/css/direction.js +0 -4
  322. package/utils/types/css/index.d.ts +0 -4
  323. package/utils/types/css/index.js +0 -4
  324. package/utils/types/css/position.d.ts +0 -6
  325. package/utils/types/css/position.js +0 -6
  326. package/utils/types/index.d.ts +0 -6
  327. package/utils/types/index.js +0 -3
  328. package/utils/types/intrinsic-component.d.ts +0 -1
  329. package/utils/types/keys.d.ts +0 -4
  330. package/utils/types/palette/color.d.ts +0 -133
  331. package/utils/types/palette/color.js +0 -133
  332. package/utils/types/palette/index.d.ts +0 -1
  333. package/utils/types/palette/index.js +0 -1
  334. package/utils/types/position/index.d.ts +0 -1
  335. package/utils/types/position/index.js +0 -1
  336. package/utils/types/position/position.d.ts +0 -6
  337. package/utils/types/position/position.js +0 -6
  338. package/utils/types/prop-types/index.d.ts +0 -1
  339. package/utils/types/prop-types/index.js +0 -1
  340. package/utils/types/prop-types/record.d.ts +0 -1
  341. package/utils/types/prop-types/record.js +0 -6
  342. package/utils/types/shadows/index.d.ts +0 -1
  343. package/utils/types/shadows/index.js +0 -1
  344. package/utils/types/shadows/shadows.d.ts +0 -14
  345. package/utils/types/shadows/shadows.js +0 -14
  346. package/utils/types/shape/border-radius-size.d.ts +0 -5
  347. package/utils/types/shape/border-radius-size.js +0 -5
  348. package/utils/types/shape/index.d.ts +0 -1
  349. package/utils/types/shape/index.js +0 -1
  350. package/utils/types/stylable-component.d.ts +0 -7
  351. package/utils/types/typography/font-variant.d.ts +0 -58
  352. package/utils/types/typography/font-variant.js +0 -58
  353. package/utils/types/typography/font-weight.d.ts +0 -11
  354. package/utils/types/typography/font-weight.js +0 -11
  355. package/utils/types/typography/index.d.ts +0 -4
  356. package/utils/types/typography/index.js +0 -4
  357. package/utils/types/typography/text-align.d.ts +0 -5
  358. package/utils/types/typography/text-align.js +0 -5
  359. package/utils/types/typography/text-decoration.d.ts +0 -5
  360. package/utils/types/typography/text-decoration.js +0 -5
  361. package/utils/types/with.d.ts +0 -4
  362. /package/{core/accordion-details/accordion-details.props.js → tooltip/tooltip.types.js} +0 -0
  363. /package/{utils/types → types}/values.d.ts +0 -0
  364. /package/utils/{functions/shadcn-utils.d.ts → cn.d.ts} +0 -0
  365. /package/utils/{functions/shadcn-utils.js → cn.js} +0 -0
@@ -1,21 +0,0 @@
1
- import _extends from "@babel/runtime/helpers/extends";
2
- import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
- import _defineProperty from "@babel/runtime/helpers/defineProperty";
4
- var _excluded = ["type", "IconProps", "ref"];
5
- import ArrowBottom from '@scaleflex/icons-tw/arrow-bottom';
6
- import React from 'react';
7
- import { Position } from '../../utils/types';
8
- var arrowTickDirection = _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, Position.Bottom, ''), Position.Left, 'rotate-90'), Position.Right, '-rotate-90'), Position.Top, 'rotate-180');
9
- var ArrowTick = function ArrowTick(_ref) {
10
- var _ref$type = _ref.type,
11
- type = _ref$type === void 0 ? Position.Bottom : _ref$type,
12
- IconPropsData = _ref.IconProps,
13
- ref = _ref.ref,
14
- rest = _objectWithoutProperties(_ref, _excluded);
15
- return /*#__PURE__*/React.createElement("span", _extends({}, rest, {
16
- ref: ref
17
- }), /*#__PURE__*/React.createElement(ArrowBottom, _extends({
18
- className: arrowTickDirection[type]
19
- }, IconPropsData)));
20
- };
21
- export default ArrowTick;
@@ -1,14 +0,0 @@
1
- import type { IconProps } from '@scaleflex/icons-tw/icon.props';
2
- import type { Values } from '../../utils/types';
3
- export declare const Type: {
4
- readonly Left: "left";
5
- readonly Right: "right";
6
- readonly Top: "top";
7
- readonly Bottom: "bottom";
8
- };
9
- export type ArrowTickTypesType = Values<typeof Type>;
10
- export interface ArrowTickProps extends React.HTMLAttributes<HTMLSpanElement> {
11
- type?: ArrowTickTypesType;
12
- IconProps?: IconProps;
13
- ref?: React.Ref<HTMLSpanElement>;
14
- }
@@ -1,6 +0,0 @@
1
- export var Type = {
2
- Left: 'left',
3
- Right: 'right',
4
- Top: 'top',
5
- Bottom: 'bottom'
6
- };
@@ -1,2 +0,0 @@
1
- export { default } from './arrow-tick.component';
2
- export type { ArrowTickProps } from './arrow-tick.props';
@@ -1 +0,0 @@
1
- export { default } from './arrow-tick.component';
@@ -1,4 +0,0 @@
1
- export { default } from './button.component';
2
- export type { ButtonProps } from './button.types';
3
- export { ButtonVariant } from '@scaleflex/ui-tw/core/button/button.types';
4
- export { ButtonSize } from '@scaleflex/ui-tw/core/button/button.types';
@@ -1,3 +0,0 @@
1
- export { default } from './button.component';
2
- export { ButtonVariant } from '@scaleflex/ui-tw/core/button/button.types';
3
- export { ButtonSize } from '@scaleflex/ui-tw/core/button/button.types';
File without changes
@@ -1,77 +0,0 @@
1
- // import Intermediate from '@scaleflex/icons-tw/intermediate'
2
- // import Tick from '@scaleflex/icons-tw/tick'
3
- // import React from 'react'
4
- //
5
- // import { lightPalette } from '../../theme/roots/palette'
6
- // import { ignoreEvent } from '../../utils/functions'
7
- // import { cn } from '../../utils/functions/shadcn-utils'
8
- // import { Color } from '../../utils/types/palette'
9
- //
10
- // import type { CheckBoxProps } from './check-box.props'
11
- // import { getCheckboxIconSize } from './check-box.utils'
12
- // import { Size, Type } from './types'
13
- //
14
- // const CheckBox = ({
15
- // size = Size.Md,
16
- // type = Type.Checkbox,
17
- // checked = false,
18
- // onChange,
19
- // checkBoxProps,
20
- // readOnly = false,
21
- // disabled = false,
22
- // ref,
23
- // ...rest
24
- // }: CheckBoxProps): JSX.Element => {
25
- // const getIcon = (props: any) => {
26
- // switch (type) {
27
- // case Type.Checkbox:
28
- // return <Tick {...props} />
29
- // case Type.Intermediate:
30
- // return <Intermediate {...props} />
31
- // default:
32
- // return <Tick {...props} />
33
- // }
34
- // }
35
- //
36
- // const cursorStyleClasses = disabled ? 'cursor-default' : 'cursor-pointer'
37
- //
38
- // const ownTransitionClasses = 'transition-all duration-100 ease-out'
39
- //
40
- // const checkBoxWrapperClasses = cn(
41
- // 'relative flex items-center justify-center border-1 border-solid border-borders-secondary',
42
- // `${checked ? 'bg-accent-primary border-accent-primary' : 'bg-background-stateless border-borders-primary-stateless'}`,
43
- // `${size === Size.Sm ? 'min-h-4 max-h-4 min-w-4 max-w-4' : ''}`,
44
- // `${size === Size.Md ? 'min-h-5 max-h-5 min-w-5 max-w-5' : ''}`,
45
- // `${disabled ? 'border-1 border-solid' : ''}`,
46
- // `${disabled ? (checked ? 'bg-accent-2-8-Opacity border-transparent' : 'bg-background-active border-borders-secondary') : ''}`,
47
- // cursorStyleClasses,
48
- // ownTransitionClasses,
49
- // )
50
- //
51
- // const inputClasses = cn('peer absolute top-0 left-0 z-1 m-0 h-full w-full p-0 opacity-0', cursorStyleClasses)
52
- //
53
- // const unCheckedIconClasses = cn('flex opacity-0', `${disabled ? '' : 'peer-hover:opacity-100'}`, ownTransitionClasses)
54
- //
55
- // return (
56
- // <span className={checkBoxWrapperClasses} ref={ref} {...rest}>
57
- // <input
58
- // type='checkbox'
59
- // className={inputClasses}
60
- // checked={checked}
61
- // disabled={disabled}
62
- // onChange={readOnly || disabled ? ignoreEvent : onChange}
63
- // {...checkBoxProps}
64
- // />
65
- //
66
- // {checked ? (
67
- // getIcon({ size: getCheckboxIconSize(size), color: lightPalette[Color.ButtonPrimaryText] })
68
- // ) : (
69
- // <span className={unCheckedIconClasses}>
70
- // {getIcon({ size: getCheckboxIconSize(size), color: lightPalette[Color.Accent_4_0_Opacity] })}
71
- // </span>
72
- // )}
73
- // </span>
74
- // )
75
- // }
76
- //
77
- // export default CheckBox
@@ -1,15 +0,0 @@
1
- import { ChangeEvent, Ref } from 'react';
2
- import type { Values } from '../../utils/types';
3
- import { Size, Type } from './types';
4
- export type CheckBoxSizeType = Values<typeof Size>;
5
- export type CheckBoxType = Values<typeof Type>;
6
- export interface CheckBoxProps extends React.HTMLAttributes<HTMLSpanElement> {
7
- checked?: boolean;
8
- onChange?: (event: ChangeEvent<HTMLInputElement>) => void;
9
- checkBoxProps?: React.InputHTMLAttributes<HTMLInputElement>;
10
- readOnly?: boolean;
11
- disabled?: boolean;
12
- size?: CheckBoxSizeType;
13
- type?: CheckBoxType;
14
- ref?: Ref<HTMLSpanElement>;
15
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,3 +0,0 @@
1
- import { CheckBoxSizeType } from './check-box.props';
2
- export declare const getCheckboxIconSize: (size?: CheckBoxSizeType) => number;
3
- export declare const getCheckboxInfoIconSize: (size?: CheckBoxSizeType) => number;
@@ -1,21 +0,0 @@
1
- import { Size } from './types';
2
- export var getCheckboxIconSize = function getCheckboxIconSize(size) {
3
- switch (size) {
4
- case Size.Md:
5
- return 14;
6
- case Size.Sm:
7
- return 10;
8
- default:
9
- return 10;
10
- }
11
- };
12
- export var getCheckboxInfoIconSize = function getCheckboxInfoIconSize(size) {
13
- switch (size) {
14
- case Size.Md:
15
- return 14;
16
- case Size.Sm:
17
- return 12;
18
- default:
19
- return 12;
20
- }
21
- };
File without changes
@@ -1,2 +0,0 @@
1
- // export { default } from './check-box.component'
2
- // export type { CheckBoxProps } from './check-box.props'
@@ -1,2 +0,0 @@
1
- export * from './size';
2
- export * from './type';
@@ -1,2 +0,0 @@
1
- export * from './size';
2
- export * from './type';
@@ -1,4 +0,0 @@
1
- export declare const Size: {
2
- readonly Sm: "sm";
3
- readonly Md: "md";
4
- };
@@ -1,4 +0,0 @@
1
- export var Size = {
2
- Sm: 'sm',
3
- Md: 'md'
4
- };
@@ -1,4 +0,0 @@
1
- export declare const Type: {
2
- readonly Checkbox: "checkbox";
3
- readonly Intermediate: "intermediate";
4
- };
@@ -1,4 +0,0 @@
1
- export var Type = {
2
- Checkbox: 'checkbox',
3
- Intermediate: 'intermediate'
4
- };
@@ -1,75 +0,0 @@
1
- // import React, { useRef, useState } from 'react'
2
- //
3
- // import { lightPalette } from '../../theme/roots/palette'
4
- // import { cn } from '../../utils/functions/shadcn-utils'
5
- // import { Color } from '../../utils/types/palette'
6
- // import CheckBox from '../check-box'
7
- // import { getCheckboxInfoIconSize } from '../check-box/check-box.utils'
8
- // import { Size } from '../check-box/types'
9
- //
10
- // import type { CheckBoxGroupProps } from './check-box-group.props'
11
- // import { LabelPosition } from './types'
12
- //
13
- // const CheckBoxGroup = ({
14
- // size = Size.Sm,
15
- // label,
16
- // checkBoxProps,
17
- // checkBoxGroupProps,
18
- // readOnly = false,
19
- // disabled = false,
20
- // labelPosition = LabelPosition.After,
21
- // icon,
22
- // checked = false,
23
- // ref,
24
- // ...rest
25
- // }: CheckBoxGroupProps): JSX.Element => {
26
- // const textRef = useRef<HTMLLabelElement | null>(null)
27
- // const [isEllipsisActive, setIsEllipsisActive] = useState(false)
28
- //
29
- // const getTextTooltip = (): string | undefined => {
30
- // if (typeof label === 'string' && isEllipsisActive) {
31
- // return label
32
- // }
33
- // }
34
- //
35
- // const handleTextTooltip = (): void => {
36
- // if (textRef.current !== null && textRef.current) {
37
- // setIsEllipsisActive(textRef?.current?.offsetWidth < textRef?.current?.scrollWidth)
38
- // }
39
- // }
40
- //
41
- // const cursorStyleClasses = disabled ? 'cursor-default' : 'cursor-pointer'
42
- //
43
- // const checkBoxGroupClasses = cn('relative inline-flex max-w-full items-center gap-1', cursorStyleClasses)
44
- //
45
- // const labelWrapClasses = cn(
46
- // 'inline-block flex gap-2 items-center overflow-hidden text-ellipsis whitespace-nowrap text-textprimary',
47
- //
48
- // //TODO: add data about fonts from ${sizeCheckboxGroupMixin[size]}
49
- // cursorStyleClasses,
50
- // )
51
- //
52
- // const labelTextClasses = `label-text ${labelPosition === 'before' ? '-order-1' : ''}`
53
- //
54
- // return (
55
- // <span className={checkBoxGroupClasses} ref={ref} {...checkBoxGroupProps} {...rest}>
56
- // <label
57
- // key='label'
58
- // title={getTextTooltip()}
59
- // onMouseOver={handleTextTooltip}
60
- // ref={textRef}
61
- // className={labelWrapClasses}
62
- // >
63
- // <CheckBox checkBoxProps={checkBoxProps} readOnly={readOnly} disabled={disabled} checked={checked} size={size} />
64
- //
65
- // <span className={labelTextClasses}>{label}</span>
66
- // </label>
67
- //
68
- // {typeof icon === 'function'
69
- // ? icon({ size: getCheckboxInfoIconSize(size), color: lightPalette[Color.IconsSecondary] })
70
- // : icon}
71
- // </span>
72
- // )
73
- // }
74
- //
75
- // export default CheckBoxGroup
File without changes
@@ -1,23 +0,0 @@
1
- // import { IconProps } from '@scaleflex/icons-tw/icon.props'
2
- // import { Ref } from 'react'
3
- //
4
- // import type { Values } from '../../utils/types'
5
- // import type { CheckBoxProps } from '../check-box'
6
- // import { CheckBoxSizeType, CheckBoxType } from '../check-box/check-box.props'
7
- //
8
- // import { LabelPosition } from './types'
9
- //
10
- // export type LabelPositionType = Values<typeof LabelPosition>
11
- //
12
- // export interface CheckBoxGroupProps extends CheckBoxProps {
13
- // label?: string
14
- // checkBoxProps?: React.InputHTMLAttributes<HTMLInputElement>
15
- // checkBoxGroupProps?: React.LabelHTMLAttributes<HTMLLabelElement>
16
- // readOnly?: boolean
17
- // disabled?: boolean
18
- // labelPosition?: LabelPositionType
19
- // size?: CheckBoxSizeType
20
- // type?: CheckBoxType
21
- // icon?: React.ReactNode | ((props: IconProps) => React.ReactNode)
22
- // ref?: Ref<HTMLLabelElement>
23
- // }
File without changes
@@ -1,2 +0,0 @@
1
- // export { default } from './check-box-group.component'
2
- // export type { CheckBoxGroupProps } from './check-box-group.props'
@@ -1 +0,0 @@
1
- export * from './label-position';
@@ -1 +0,0 @@
1
- export * from './label-position';
@@ -1,4 +0,0 @@
1
- export declare const LabelPosition: {
2
- readonly Before: "before";
3
- readonly After: "after";
4
- };
@@ -1,4 +0,0 @@
1
- export var LabelPosition = {
2
- Before: 'before',
3
- After: 'after'
4
- };
@@ -1,3 +0,0 @@
1
- import type { CrossButtonProps } from './cross-button.props';
2
- declare const CrossButton: ({ size, ref, className, ...rest }: CrossButtonProps) => JSX.Element;
3
- export default CrossButton;
@@ -1,37 +0,0 @@
1
- import _extends from "@babel/runtime/helpers/extends";
2
- import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
- var _excluded = ["size", "ref", "className"];
4
- // import CrossOutline from '@scaleflex/icons-tw/cross-outline'
5
- import { cn } from '@scaleflex/ui-tw/utils/functions/shadcn-utils';
6
- import React from 'react';
7
- import { Size } from './types';
8
-
9
- // const getIconSize = (sizeName: CrossButtonSizeType | undefined): number => {
10
- // switch (sizeName) {
11
- // case Size.Lg:
12
- // return 16
13
- //
14
- // case Size.Xs:
15
- // return 10
16
- //
17
- // case Size.Sm:
18
- // default:
19
- // return 12
20
- // }
21
- // }
22
-
23
- var CrossButton = function CrossButton(_ref) {
24
- var _ref$size = _ref.size,
25
- size = _ref$size === void 0 ? Size.Lg : _ref$size,
26
- ref = _ref.ref,
27
- className = _ref.className,
28
- rest = _objectWithoutProperties(_ref, _excluded);
29
- var crossButtonClasses = cn('flex box-content justify-center items-center cursor-pointer rounded-sm text-icons-secondary', 'hover:text-icons-primary hover:bg-background-hover', 'active:text-icons-primary-hover active:bg-background-active', size === Size.Lg ? 'p-3' : '', size === Size.Md ? 'p-2' : '', size === Size.Sm ? 'p-1.5' : '', size === Size.Xs ? 'p-1' : '', className);
30
- return /*#__PURE__*/React.createElement("button", _extends({
31
- className: crossButtonClasses,
32
- type: "button"
33
- }, rest, {
34
- ref: ref
35
- }));
36
- };
37
- export default CrossButton;
@@ -1,8 +0,0 @@
1
- import type { Values } from '../../utils/types';
2
- import { Size } from './types';
3
- export type CrossButtonSizeType = Values<typeof Size>;
4
- export interface CrossButtonProps extends React.HTMLAttributes<HTMLButtonElement> {
5
- className?: string;
6
- size?: CrossButtonSizeType;
7
- ref?: React.Ref<HTMLButtonElement>;
8
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,2 +0,0 @@
1
- export { default } from './cross-button.component';
2
- export type { CrossButtonProps } from './cross-button.props';
@@ -1 +0,0 @@
1
- export { default } from './cross-button.component';
@@ -1 +0,0 @@
1
- export * from './size';
@@ -1 +0,0 @@
1
- export * from './size';
@@ -1,6 +0,0 @@
1
- export declare const Size: {
2
- readonly Xs: "xs";
3
- readonly Sm: "sm";
4
- readonly Md: "md";
5
- readonly Lg: "lg";
6
- };
@@ -1,6 +0,0 @@
1
- export var Size = {
2
- Xs: 'xs',
3
- Sm: 'sm',
4
- Md: 'md',
5
- Lg: 'lg'
6
- };
@@ -1,3 +0,0 @@
1
- import type { DotProps } from './dot.props';
2
- declare const Dot: ({ active, ref, ...rest }: DotProps) => JSX.Element;
3
- export default Dot;
@@ -1,15 +0,0 @@
1
- import _extends from "@babel/runtime/helpers/extends";
2
- import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
- var _excluded = ["active", "ref"];
4
- import React from 'react';
5
- var Dot = function Dot(_ref) {
6
- var _ref$active = _ref.active,
7
- active = _ref$active === void 0 ? false : _ref$active,
8
- ref = _ref.ref,
9
- rest = _objectWithoutProperties(_ref, _excluded);
10
- return /*#__PURE__*/React.createElement("span", _extends({
11
- className: "relative inline-flex h-1.5 w-1.5 items-center justify-center rounded-full border-1 border-solid border-transparent transition-colors duration-100 ease-out ".concat(active ? 'bg-accent-primary' : 'bg-borders-primary-stateless'),
12
- ref: ref
13
- }, rest));
14
- };
15
- export default Dot;
@@ -1,4 +0,0 @@
1
- export interface DotProps extends React.HTMLAttributes<HTMLSpanElement> {
2
- active?: boolean;
3
- ref?: React.Ref<HTMLSpanElement>;
4
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,2 +0,0 @@
1
- export { default } from './dot.component';
2
- export type { DotProps } from './dot.props';
package/core/dot/index.js DELETED
@@ -1 +0,0 @@
1
- export { default } from './dot.component';
@@ -1,3 +0,0 @@
1
- import type { DotsNavigationProps } from './dots-navigation.props';
2
- declare const DotsNavigation: ({ activeItem, size, ref, ...rest }: DotsNavigationProps) => JSX.Element;
3
- export default DotsNavigation;
@@ -1,24 +0,0 @@
1
- import _extends from "@babel/runtime/helpers/extends";
2
- import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
- var _excluded = ["activeItem", "size", "ref"];
4
- import React from 'react';
5
- import Dot from '../dot';
6
- var DotsNavigation = function DotsNavigation(_ref) {
7
- var _ref$activeItem = _ref.activeItem,
8
- activeItem = _ref$activeItem === void 0 ? 0 : _ref$activeItem,
9
- size = _ref.size,
10
- ref = _ref.ref,
11
- rest = _objectWithoutProperties(_ref, _excluded);
12
- var finalDots = [];
13
- for (var i = 0; i < size; i++) {
14
- finalDots.push(/*#__PURE__*/React.createElement(Dot, {
15
- key: i,
16
- active: activeItem > -1 && i <= activeItem
17
- }));
18
- }
19
- return /*#__PURE__*/React.createElement("div", _extends({
20
- className: "flex gap-3",
21
- ref: ref
22
- }, rest), finalDots);
23
- };
24
- export default DotsNavigation;
@@ -1,5 +0,0 @@
1
- export interface DotsNavigationProps extends React.HTMLAttributes<HTMLDivElement> {
2
- activeItem?: number;
3
- size: number;
4
- ref?: React.Ref<HTMLDivElement>;
5
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,2 +0,0 @@
1
- export { default } from './dots-navigation.component';
2
- export type { DotsNavigationProps } from './dots-navigation.props';
@@ -1 +0,0 @@
1
- export { default } from './dots-navigation.component';
@@ -1,6 +0,0 @@
1
- import React, { ComponentProps } from 'react';
2
- interface ClearIconProps extends ComponentProps<'span'> {
3
- children: React.ReactNode;
4
- }
5
- declare const ClearIcon: (props: ClearIconProps) => React.JSX.Element;
6
- export default ClearIcon;
@@ -1,12 +0,0 @@
1
- import _extends from "@babel/runtime/helpers/extends";
2
- import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
- var _excluded = ["children"];
4
- import React from 'react';
5
- var ClearIcon = function ClearIcon(props) {
6
- var children = props.children,
7
- rest = _objectWithoutProperties(props, _excluded);
8
- return /*#__PURE__*/React.createElement("span", _extends({
9
- className: "renderClearIcon text-icons-primary flex cursor-pointer"
10
- }, rest), children);
11
- };
12
- export default ClearIcon;
@@ -1,6 +0,0 @@
1
- import React, { ComponentProps } from 'react';
2
- interface CopyIconProps extends ComponentProps<'span'> {
3
- icon: React.ReactNode;
4
- }
5
- declare const CopyIcon: (props: CopyIconProps) => React.JSX.Element;
6
- export default CopyIcon;
@@ -1,13 +0,0 @@
1
- import _extends from "@babel/runtime/helpers/extends";
2
- import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
- var _excluded = ["icon"];
4
- import React from 'react';
5
- import { copyIconClasses } from '../input.const';
6
- var CopyIcon = function CopyIcon(props) {
7
- var icon = props.icon,
8
- rest = _objectWithoutProperties(props, _excluded);
9
- return /*#__PURE__*/React.createElement("span", _extends({
10
- className: copyIconClasses
11
- }, rest), icon);
12
- };
13
- export default CopyIcon;
@@ -1,7 +0,0 @@
1
- import React, { ComponentProps } from 'react';
2
- import { InputProps } from '../input.types';
3
- interface PasswordIconProps extends ComponentProps<'span'>, Pick<InputProps, 'size'> {
4
- isVisible: boolean;
5
- }
6
- declare const PasswordIcon: (props: PasswordIconProps) => React.JSX.Element | null;
7
- export default PasswordIcon;
@@ -1,24 +0,0 @@
1
- import _extends from "@babel/runtime/helpers/extends";
2
- import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
- import _defineProperty from "@babel/runtime/helpers/defineProperty";
4
- var _excluded = ["isVisible", "size"];
5
- import EyeClosed from '@scaleflex/icons-tw/eye-closed';
6
- import EyeOpen from '@scaleflex/icons-tw/eye-open';
7
- import React from 'react';
8
- import { copyIconClasses as passwordIconClasses } from '../input.const';
9
- import { InputSize } from '../input.types';
10
- var passwordIconSize = _defineProperty(_defineProperty({}, InputSize.Sm, '0.875rem'), InputSize.Md, '1rem');
11
- var PasswordIcon = function PasswordIcon(props) {
12
- var isVisible = props.isVisible,
13
- size = props.size,
14
- rest = _objectWithoutProperties(props, _excluded);
15
- if (!size) return null;
16
- return /*#__PURE__*/React.createElement("span", _extends({
17
- className: passwordIconClasses
18
- }, rest), isVisible ? /*#__PURE__*/React.createElement(EyeClosed, {
19
- size: passwordIconSize[size]
20
- }) : /*#__PURE__*/React.createElement(EyeOpen, {
21
- size: passwordIconSize[size]
22
- }));
23
- };
24
- export default PasswordIcon;
@@ -1,7 +0,0 @@
1
- import React, { ComponentProps } from 'react';
2
- import { IconFuncType, InputProps } from '../input.types';
3
- interface RenderIconProps extends ComponentProps<'span'>, Pick<InputProps, 'size' | 'iconClickStart' | 'iconClickEnd' | 'disabled' | 'readOnly' | 'type'> {
4
- _icon: React.ReactNode | IconFuncType;
5
- }
6
- declare const RenderIcon: (props: RenderIconProps) => React.JSX.Element | null;
7
- export default RenderIcon;