@momo-webplatform/mobase 0.0.43 → 0.0.45

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 (352) hide show
  1. package/dist/cjs/index.cjs +5633 -0
  2. package/dist/cjs/index.cjs.map +1 -0
  3. package/dist/cjs/index.d.cts +659 -0
  4. package/dist/esm/index.d.ts +659 -0
  5. package/dist/esm/index.js +5107 -0
  6. package/dist/esm/index.js.map +1 -0
  7. package/package.json +63 -114
  8. package/LICENSE +0 -21
  9. package/publish/cjs/components/Accordion/Accordion.js +0 -44
  10. package/publish/cjs/components/Accordion/index.js +0 -8
  11. package/publish/cjs/components/AlertDialog/AlertDialog.js +0 -62
  12. package/publish/cjs/components/AlertDialog/index.js +0 -16
  13. package/publish/cjs/components/Badge/Badge.js +0 -24
  14. package/publish/cjs/components/Badge/index.js +0 -6
  15. package/publish/cjs/components/Breadcrumb/Breadcrumb.js +0 -55
  16. package/publish/cjs/components/Breadcrumb/index.js +0 -11
  17. package/publish/cjs/components/Button/Button.js +0 -74
  18. package/publish/cjs/components/Button/index.js +0 -6
  19. package/publish/cjs/components/Callout/Callout.js +0 -46
  20. package/publish/cjs/components/Callout/index.js +0 -5
  21. package/publish/cjs/components/Card/Card.js +0 -47
  22. package/publish/cjs/components/Card/index.js +0 -10
  23. package/publish/cjs/components/Checkbox/Checkbox.js +0 -67
  24. package/publish/cjs/components/Checkbox/index.js +0 -9
  25. package/publish/cjs/components/Choicebox/Choicebox.js +0 -90
  26. package/publish/cjs/components/Choicebox/index.js +0 -6
  27. package/publish/cjs/components/Combobox/Combobox.js +0 -19
  28. package/publish/cjs/components/Combobox/index.js +0 -7
  29. package/publish/cjs/components/Command/Command.js +0 -74
  30. package/publish/cjs/components/Command/index.js +0 -13
  31. package/publish/cjs/components/Dialog/Dialog.js +0 -90
  32. package/publish/cjs/components/Dialog/index.js +0 -15
  33. package/publish/cjs/components/DialogQr/DialogQr.js +0 -98
  34. package/publish/cjs/components/DialogQr/index.js +0 -5
  35. package/publish/cjs/components/Footer/Footer.js +0 -15
  36. package/publish/cjs/components/Footer/FooterContent.js +0 -27
  37. package/publish/cjs/components/Footer/index.js +0 -5
  38. package/publish/cjs/components/Header/Header.js +0 -19
  39. package/publish/cjs/components/Header/ListItem.js +0 -12
  40. package/publish/cjs/components/Header/ListItemMobile.js +0 -15
  41. package/publish/cjs/components/Header/MobileMenu.js +0 -61
  42. package/publish/cjs/components/Header/NavItems.js +0 -26
  43. package/publish/cjs/components/Header/NavItemsMobile.js +0 -35
  44. package/publish/cjs/components/Header/index.js +0 -5
  45. package/publish/cjs/components/IconButton/IconButton.js +0 -67
  46. package/publish/cjs/components/IconButton/index.js +0 -5
  47. package/publish/cjs/components/LightboxGallery/LightboxGallery.js +0 -203
  48. package/publish/cjs/components/LightboxGallery/index.js +0 -7
  49. package/publish/cjs/components/NavigationMenu/NavigationMenu.js +0 -62
  50. package/publish/cjs/components/NavigationMenu/index.js +0 -13
  51. package/publish/cjs/components/Pagination/Pagination.js +0 -31
  52. package/publish/cjs/components/Pagination/index.js +0 -8
  53. package/publish/cjs/components/Popover/Popover.js +0 -37
  54. package/publish/cjs/components/Popover/index.js +0 -7
  55. package/publish/cjs/components/RadioGroup/RadioGroup.js +0 -53
  56. package/publish/cjs/components/RadioGroup/index.js +0 -6
  57. package/publish/cjs/components/SearchBar/SearchBar.js +0 -48
  58. package/publish/cjs/components/SearchBar/index.js +0 -5
  59. package/publish/cjs/components/Select/Select.js +0 -67
  60. package/publish/cjs/components/Select/index.js +0 -14
  61. package/publish/cjs/components/Stepper/Stepper.js +0 -100
  62. package/publish/cjs/components/Stepper/index.js +0 -5
  63. package/publish/cjs/components/Switch/Switch.js +0 -33
  64. package/publish/cjs/components/Switch/index.js +0 -5
  65. package/publish/cjs/components/Tabs/Tabs.js +0 -41
  66. package/publish/cjs/components/Tabs/index.js +0 -8
  67. package/publish/cjs/components/TextArea/TextArea.js +0 -38
  68. package/publish/cjs/components/TextArea/index.js +0 -5
  69. package/publish/cjs/components/TextButton/TextButton.js +0 -63
  70. package/publish/cjs/components/TextButton/index.js +0 -6
  71. package/publish/cjs/components/TextInput/TextInput.js +0 -65
  72. package/publish/cjs/components/TextInput/index.js +0 -5
  73. package/publish/cjs/components/Toast/Toast.js +0 -66
  74. package/publish/cjs/components/Toast/index.js +0 -8
  75. package/publish/cjs/components/Toast/toaster.js +0 -14
  76. package/publish/cjs/components/Toast/useToast.js +0 -157
  77. package/publish/cjs/components/Tooltip/Tooltip.js +0 -44
  78. package/publish/cjs/components/Tooltip/index.js +0 -9
  79. package/publish/cjs/foundation/SpinerIcon.js +0 -7
  80. package/publish/cjs/helpers/SpinerIcon.js +0 -7
  81. package/publish/cjs/helpers/animations.js +0 -18
  82. package/publish/cjs/helpers/clone-deep.js +0 -15
  83. package/publish/cjs/helpers/clone-deep.spec.js +0 -22
  84. package/publish/cjs/helpers/constants.js +0 -204
  85. package/publish/cjs/helpers/generic-forward-ref.js +0 -5
  86. package/publish/cjs/helpers/http.js +0 -10
  87. package/publish/cjs/helpers/is-client.js +0 -7
  88. package/publish/cjs/helpers/is-object.js +0 -12
  89. package/publish/cjs/helpers/is-object.spec.js +0 -24
  90. package/publish/cjs/helpers/merge-deep.js +0 -29
  91. package/publish/cjs/helpers/merge-deep.spec.js +0 -56
  92. package/publish/cjs/helpers/omit.js +0 -16
  93. package/publish/cjs/helpers/omit.spec.js +0 -9
  94. package/publish/cjs/helpers/utils.js +0 -23
  95. package/publish/cjs/index.js +0 -48
  96. package/publish/cjs/mobase-tw-plugin/animations/index.js +0 -25
  97. package/publish/cjs/mobase-tw-plugin/colors/blue.js +0 -16
  98. package/publish/cjs/mobase-tw-plugin/colors/common.js +0 -23
  99. package/publish/cjs/mobase-tw-plugin/colors/gray.js +0 -16
  100. package/publish/cjs/mobase-tw-plugin/colors/green.js +0 -16
  101. package/publish/cjs/mobase-tw-plugin/colors/index.js +0 -9
  102. package/publish/cjs/mobase-tw-plugin/colors/orange.js +0 -16
  103. package/publish/cjs/mobase-tw-plugin/colors/pink.js +0 -16
  104. package/publish/cjs/mobase-tw-plugin/colors/purple.js +0 -16
  105. package/publish/cjs/mobase-tw-plugin/colors/red.js +0 -16
  106. package/publish/cjs/mobase-tw-plugin/colors/yellow.js +0 -16
  107. package/publish/cjs/mobase-tw-plugin/font-sizes.js +0 -98
  108. package/publish/cjs/mobase-tw-plugin/index.js +0 -5
  109. package/publish/cjs/mobase-tw-plugin/layout.js +0 -48
  110. package/publish/cjs/mobase-tw-plugin/plugin.js +0 -201
  111. package/publish/cjs/mobase-tw-plugin/radius.js +0 -16
  112. package/publish/cjs/mobase-tw-plugin/types.js +0 -54
  113. package/publish/cjs/mobase-tw-plugin/utilities/custom.js +0 -25
  114. package/publish/cjs/mobase-tw-plugin/utilities/index.js +0 -14
  115. package/publish/cjs/mobase-tw-plugin/utilities/scrollbar-hide.js +0 -30
  116. package/publish/cjs/mobase-tw-plugin/utilities/transition.js +0 -88
  117. package/publish/cjs/mobase-tw-plugin/utils/index.js +0 -17
  118. package/publish/cjs/mobase-tw-plugin/utils/object.js +0 -53
  119. package/publish/cjs/mobase-tw-plugin/utils/theme.js +0 -70
  120. package/publish/cjs/site/index.js +0 -5
  121. package/publish/cjs/site/meta.js +0 -57
  122. package/publish/cjs/tsconfig.lib.tsbuildinfo +0 -1
  123. package/publish/cjs/types/index.js +0 -2
  124. package/publish/esm/components/Accordion/Accordion.d.ts +0 -20
  125. package/publish/esm/components/Accordion/Accordion.js +0 -15
  126. package/publish/esm/components/Accordion/index.d.ts +0 -2
  127. package/publish/esm/components/Accordion/index.js +0 -1
  128. package/publish/esm/components/AlertDialog/AlertDialog.d.ts +0 -49
  129. package/publish/esm/components/AlertDialog/AlertDialog.js +0 -26
  130. package/publish/esm/components/AlertDialog/index.d.ts +0 -2
  131. package/publish/esm/components/AlertDialog/index.js +0 -5
  132. package/publish/esm/components/Badge/Badge.d.ts +0 -10
  133. package/publish/esm/components/Badge/Badge.js +0 -20
  134. package/publish/esm/components/Badge/index.d.ts +0 -1
  135. package/publish/esm/components/Badge/index.js +0 -1
  136. package/publish/esm/components/Breadcrumb/Breadcrumb.d.ts +0 -20
  137. package/publish/esm/components/Breadcrumb/Breadcrumb.js +0 -23
  138. package/publish/esm/components/Breadcrumb/index.d.ts +0 -2
  139. package/publish/esm/components/Breadcrumb/index.js +0 -2
  140. package/publish/esm/components/Button/Button.d.ts +0 -26
  141. package/publish/esm/components/Button/Button.js +0 -44
  142. package/publish/esm/components/Button/index.d.ts +0 -2
  143. package/publish/esm/components/Button/index.js +0 -1
  144. package/publish/esm/components/Callout/Callout.d.ts +0 -19
  145. package/publish/esm/components/Callout/Callout.js +0 -43
  146. package/publish/esm/components/Callout/index.d.ts +0 -1
  147. package/publish/esm/components/Callout/index.js +0 -1
  148. package/publish/esm/components/Card/Card.d.ts +0 -9
  149. package/publish/esm/components/Card/Card.js +0 -16
  150. package/publish/esm/components/Card/index.d.ts +0 -1
  151. package/publish/esm/components/Card/index.js +0 -1
  152. package/publish/esm/components/Checkbox/Checkbox.d.ts +0 -40
  153. package/publish/esm/components/Checkbox/Checkbox.js +0 -36
  154. package/publish/esm/components/Checkbox/index.d.ts +0 -2
  155. package/publish/esm/components/Checkbox/index.js +0 -1
  156. package/publish/esm/components/Choicebox/Choicebox.d.ts +0 -31
  157. package/publish/esm/components/Choicebox/Choicebox.js +0 -62
  158. package/publish/esm/components/Choicebox/index.d.ts +0 -1
  159. package/publish/esm/components/Choicebox/index.js +0 -1
  160. package/publish/esm/components/Combobox/Combobox.d.ts +0 -19
  161. package/publish/esm/components/Combobox/Combobox.js +0 -13
  162. package/publish/esm/components/Combobox/index.d.ts +0 -1
  163. package/publish/esm/components/Combobox/index.js +0 -1
  164. package/publish/esm/components/Command/Command.d.ts +0 -57
  165. package/publish/esm/components/Command/Command.js +0 -40
  166. package/publish/esm/components/Command/index.d.ts +0 -1
  167. package/publish/esm/components/Command/index.js +0 -1
  168. package/publish/esm/components/Dialog/Dialog.d.ts +0 -51
  169. package/publish/esm/components/Dialog/Dialog.js +0 -54
  170. package/publish/esm/components/Dialog/index.d.ts +0 -1
  171. package/publish/esm/components/Dialog/index.js +0 -1
  172. package/publish/esm/components/DialogQr/DialogQr.d.ts +0 -33
  173. package/publish/esm/components/DialogQr/DialogQr.js +0 -91
  174. package/publish/esm/components/DialogQr/index.d.ts +0 -1
  175. package/publish/esm/components/DialogQr/index.js +0 -1
  176. package/publish/esm/components/Footer/Footer.d.ts +0 -22
  177. package/publish/esm/components/Footer/Footer.js +0 -9
  178. package/publish/esm/components/Footer/FooterContent.d.ts +0 -4
  179. package/publish/esm/components/Footer/FooterContent.js +0 -27
  180. package/publish/esm/components/Footer/index.d.ts +0 -1
  181. package/publish/esm/components/Footer/index.js +0 -1
  182. package/publish/esm/components/Header/Header.d.ts +0 -44
  183. package/publish/esm/components/Header/Header.js +0 -13
  184. package/publish/esm/components/Header/ListItem.d.ts +0 -9
  185. package/publish/esm/components/Header/ListItem.js +0 -10
  186. package/publish/esm/components/Header/ListItemMobile.d.ts +0 -9
  187. package/publish/esm/components/Header/ListItemMobile.js +0 -10
  188. package/publish/esm/components/Header/MobileMenu.d.ts +0 -6
  189. package/publish/esm/components/Header/MobileMenu.js +0 -56
  190. package/publish/esm/components/Header/NavItems.d.ts +0 -2
  191. package/publish/esm/components/Header/NavItems.js +0 -21
  192. package/publish/esm/components/Header/NavItemsMobile.d.ts +0 -2
  193. package/publish/esm/components/Header/NavItemsMobile.js +0 -30
  194. package/publish/esm/components/Header/index.d.ts +0 -1
  195. package/publish/esm/components/Header/index.js +0 -1
  196. package/publish/esm/components/IconButton/IconButton.d.ts +0 -22
  197. package/publish/esm/components/IconButton/IconButton.js +0 -40
  198. package/publish/esm/components/IconButton/index.d.ts +0 -2
  199. package/publish/esm/components/IconButton/index.js +0 -1
  200. package/publish/esm/components/LightboxGallery/LightboxGallery.d.ts +0 -35
  201. package/publish/esm/components/LightboxGallery/LightboxGallery.js +0 -171
  202. package/publish/esm/components/LightboxGallery/index.d.ts +0 -1
  203. package/publish/esm/components/LightboxGallery/index.js +0 -1
  204. package/publish/esm/components/NavigationMenu/NavigationMenu.d.ts +0 -12
  205. package/publish/esm/components/NavigationMenu/NavigationMenu.js +0 -28
  206. package/publish/esm/components/NavigationMenu/index.d.ts +0 -1
  207. package/publish/esm/components/NavigationMenu/index.js +0 -1
  208. package/publish/esm/components/Pagination/Pagination.d.ts +0 -16
  209. package/publish/esm/components/Pagination/Pagination.js +0 -28
  210. package/publish/esm/components/Pagination/index.d.ts +0 -1
  211. package/publish/esm/components/Pagination/index.js +0 -1
  212. package/publish/esm/components/Popover/Popover.d.ts +0 -6
  213. package/publish/esm/components/Popover/Popover.js +0 -9
  214. package/publish/esm/components/Popover/index.d.ts +0 -1
  215. package/publish/esm/components/Popover/index.js +0 -1
  216. package/publish/esm/components/RadioGroup/RadioGroup.d.ts +0 -13
  217. package/publish/esm/components/RadioGroup/RadioGroup.js +0 -26
  218. package/publish/esm/components/RadioGroup/index.d.ts +0 -1
  219. package/publish/esm/components/RadioGroup/index.js +0 -1
  220. package/publish/esm/components/SearchBar/SearchBar.d.ts +0 -7
  221. package/publish/esm/components/SearchBar/SearchBar.js +0 -45
  222. package/publish/esm/components/SearchBar/index.d.ts +0 -1
  223. package/publish/esm/components/SearchBar/index.js +0 -1
  224. package/publish/esm/components/Select/Select.d.ts +0 -19
  225. package/publish/esm/components/Select/Select.js +0 -32
  226. package/publish/esm/components/Select/index.d.ts +0 -1
  227. package/publish/esm/components/Select/index.js +0 -1
  228. package/publish/esm/components/Stepper/Stepper.d.ts +0 -15
  229. package/publish/esm/components/Stepper/Stepper.js +0 -97
  230. package/publish/esm/components/Stepper/index.d.ts +0 -1
  231. package/publish/esm/components/Stepper/index.js +0 -1
  232. package/publish/esm/components/Switch/Switch.d.ts +0 -4
  233. package/publish/esm/components/Switch/Switch.js +0 -7
  234. package/publish/esm/components/Switch/index.d.ts +0 -1
  235. package/publish/esm/components/Switch/index.js +0 -1
  236. package/publish/esm/components/Tabs/Tabs.d.ts +0 -16
  237. package/publish/esm/components/Tabs/Tabs.js +0 -12
  238. package/publish/esm/components/Tabs/index.d.ts +0 -1
  239. package/publish/esm/components/Tabs/index.js +0 -1
  240. package/publish/esm/components/TextArea/TextArea.d.ts +0 -9
  241. package/publish/esm/components/TextArea/TextArea.js +0 -35
  242. package/publish/esm/components/TextArea/index.d.ts +0 -2
  243. package/publish/esm/components/TextArea/index.js +0 -1
  244. package/publish/esm/components/TextButton/TextButton.d.ts +0 -22
  245. package/publish/esm/components/TextButton/TextButton.js +0 -36
  246. package/publish/esm/components/TextButton/index.d.ts +0 -2
  247. package/publish/esm/components/TextButton/index.js +0 -1
  248. package/publish/esm/components/TextInput/TextInput.d.ts +0 -11
  249. package/publish/esm/components/TextInput/TextInput.js +0 -62
  250. package/publish/esm/components/TextInput/index.d.ts +0 -2
  251. package/publish/esm/components/TextInput/index.js +0 -1
  252. package/publish/esm/components/Toast/Toast.d.ts +0 -15
  253. package/publish/esm/components/Toast/Toast.js +0 -34
  254. package/publish/esm/components/Toast/index.d.ts +0 -2
  255. package/publish/esm/components/Toast/index.js +0 -2
  256. package/publish/esm/components/Toast/toaster.d.ts +0 -1
  257. package/publish/esm/components/Toast/toaster.js +0 -10
  258. package/publish/esm/components/Toast/useToast.d.ts +0 -44
  259. package/publish/esm/components/Toast/useToast.js +0 -129
  260. package/publish/esm/components/Tooltip/Tooltip.d.ts +0 -12
  261. package/publish/esm/components/Tooltip/Tooltip.js +0 -14
  262. package/publish/esm/components/Tooltip/index.d.ts +0 -1
  263. package/publish/esm/components/Tooltip/index.js +0 -1
  264. package/publish/esm/foundation/SpinerIcon.d.ts +0 -6
  265. package/publish/esm/foundation/SpinerIcon.js +0 -5
  266. package/publish/esm/helpers/SpinerIcon.d.ts +0 -6
  267. package/publish/esm/helpers/SpinerIcon.js +0 -5
  268. package/publish/esm/helpers/animations.d.ts +0 -26
  269. package/publish/esm/helpers/animations.js +0 -14
  270. package/publish/esm/helpers/clone-deep.d.ts +0 -1
  271. package/publish/esm/helpers/clone-deep.js +0 -11
  272. package/publish/esm/helpers/clone-deep.spec.d.ts +0 -1
  273. package/publish/esm/helpers/clone-deep.spec.js +0 -20
  274. package/publish/esm/helpers/constants.d.ts +0 -69
  275. package/publish/esm/helpers/constants.js +0 -201
  276. package/publish/esm/helpers/generic-forward-ref.d.ts +0 -5
  277. package/publish/esm/helpers/generic-forward-ref.js +0 -3
  278. package/publish/esm/helpers/http.d.ts +0 -1
  279. package/publish/esm/helpers/http.js +0 -6
  280. package/publish/esm/helpers/is-client.d.ts +0 -1
  281. package/publish/esm/helpers/is-client.js +0 -3
  282. package/publish/esm/helpers/is-object.d.ts +0 -6
  283. package/publish/esm/helpers/is-object.js +0 -8
  284. package/publish/esm/helpers/is-object.spec.d.ts +0 -1
  285. package/publish/esm/helpers/is-object.spec.js +0 -22
  286. package/publish/esm/helpers/merge-deep.d.ts +0 -7
  287. package/publish/esm/helpers/merge-deep.js +0 -25
  288. package/publish/esm/helpers/merge-deep.spec.d.ts +0 -1
  289. package/publish/esm/helpers/merge-deep.spec.js +0 -54
  290. package/publish/esm/helpers/omit.d.ts +0 -1
  291. package/publish/esm/helpers/omit.js +0 -12
  292. package/publish/esm/helpers/omit.spec.d.ts +0 -1
  293. package/publish/esm/helpers/omit.spec.js +0 -7
  294. package/publish/esm/helpers/utils.d.ts +0 -8
  295. package/publish/esm/helpers/utils.js +0 -18
  296. package/publish/esm/index.d.ts +0 -32
  297. package/publish/esm/index.js +0 -32
  298. package/publish/esm/mobase-tw-plugin/animations/index.d.ts +0 -34
  299. package/publish/esm/mobase-tw-plugin/animations/index.js +0 -22
  300. package/publish/esm/mobase-tw-plugin/colors/blue.d.ts +0 -13
  301. package/publish/esm/mobase-tw-plugin/colors/blue.js +0 -13
  302. package/publish/esm/mobase-tw-plugin/colors/common.d.ts +0 -109
  303. package/publish/esm/mobase-tw-plugin/colors/common.js +0 -20
  304. package/publish/esm/mobase-tw-plugin/colors/gray.d.ts +0 -13
  305. package/publish/esm/mobase-tw-plugin/colors/gray.js +0 -13
  306. package/publish/esm/mobase-tw-plugin/colors/green.d.ts +0 -13
  307. package/publish/esm/mobase-tw-plugin/colors/green.js +0 -13
  308. package/publish/esm/mobase-tw-plugin/colors/index.d.ts +0 -110
  309. package/publish/esm/mobase-tw-plugin/colors/index.js +0 -5
  310. package/publish/esm/mobase-tw-plugin/colors/orange.d.ts +0 -13
  311. package/publish/esm/mobase-tw-plugin/colors/orange.js +0 -13
  312. package/publish/esm/mobase-tw-plugin/colors/pink.d.ts +0 -13
  313. package/publish/esm/mobase-tw-plugin/colors/pink.js +0 -13
  314. package/publish/esm/mobase-tw-plugin/colors/purple.d.ts +0 -13
  315. package/publish/esm/mobase-tw-plugin/colors/purple.js +0 -13
  316. package/publish/esm/mobase-tw-plugin/colors/red.d.ts +0 -13
  317. package/publish/esm/mobase-tw-plugin/colors/red.js +0 -13
  318. package/publish/esm/mobase-tw-plugin/colors/yellow.d.ts +0 -13
  319. package/publish/esm/mobase-tw-plugin/colors/yellow.js +0 -13
  320. package/publish/esm/mobase-tw-plugin/font-sizes.d.ts +0 -59
  321. package/publish/esm/mobase-tw-plugin/font-sizes.js +0 -94
  322. package/publish/esm/mobase-tw-plugin/index.d.ts +0 -1
  323. package/publish/esm/mobase-tw-plugin/index.js +0 -1
  324. package/publish/esm/mobase-tw-plugin/layout.d.ts +0 -45
  325. package/publish/esm/mobase-tw-plugin/layout.js +0 -45
  326. package/publish/esm/mobase-tw-plugin/plugin.d.ts +0 -10
  327. package/publish/esm/mobase-tw-plugin/plugin.js +0 -194
  328. package/publish/esm/mobase-tw-plugin/radius.d.ts +0 -9
  329. package/publish/esm/mobase-tw-plugin/radius.js +0 -12
  330. package/publish/esm/mobase-tw-plugin/types.d.ts +0 -103
  331. package/publish/esm/mobase-tw-plugin/types.js +0 -51
  332. package/publish/esm/mobase-tw-plugin/utilities/custom.d.ts +0 -24
  333. package/publish/esm/mobase-tw-plugin/utilities/custom.js +0 -23
  334. package/publish/esm/mobase-tw-plugin/utilities/index.d.ts +0 -114
  335. package/publish/esm/mobase-tw-plugin/utilities/index.js +0 -8
  336. package/publish/esm/mobase-tw-plugin/utilities/scrollbar-hide.d.ts +0 -23
  337. package/publish/esm/mobase-tw-plugin/utilities/scrollbar-hide.js +0 -28
  338. package/publish/esm/mobase-tw-plugin/utilities/transition.d.ts +0 -86
  339. package/publish/esm/mobase-tw-plugin/utilities/transition.js +0 -86
  340. package/publish/esm/mobase-tw-plugin/utils/index.d.ts +0 -1
  341. package/publish/esm/mobase-tw-plugin/utils/index.js +0 -1
  342. package/publish/esm/mobase-tw-plugin/utils/object.d.ts +0 -10
  343. package/publish/esm/mobase-tw-plugin/utils/object.js +0 -44
  344. package/publish/esm/mobase-tw-plugin/utils/theme.d.ts +0 -2
  345. package/publish/esm/mobase-tw-plugin/utils/theme.js +0 -65
  346. package/publish/esm/site/index.d.ts +0 -2
  347. package/publish/esm/site/index.js +0 -2
  348. package/publish/esm/site/meta.d.ts +0 -1
  349. package/publish/esm/site/meta.js +0 -53
  350. package/publish/esm/tsconfig.lib.tsbuildinfo +0 -1
  351. package/publish/esm/types/index.d.ts +0 -3
  352. package/publish/esm/types/index.js +0 -1
@@ -1,26 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import * as React from "react";
3
- import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
4
- import { Circle } from "lucide-react";
5
- import { cn } from "../../helpers/utils";
6
- import { cva } from "class-variance-authority";
7
- const radioGroupVariants = cva("grid cursor-pointer gap-2 text-gray-900 text-sm", {
8
- variants: {
9
- orientation: {
10
- horizontal: "grid-cols-2",
11
- vertical: "grid-cols-1",
12
- },
13
- },
14
- defaultVariants: {
15
- orientation: "vertical",
16
- },
17
- });
18
- const RadioGroup = React.forwardRef(({ disabled, orientation, className, ...props }, ref) => {
19
- return (_jsx(RadioGroupPrimitive.Root, { className: cn("", radioGroupVariants({ orientation }), className), ...props, ref: ref }));
20
- });
21
- RadioGroup.displayName = RadioGroupPrimitive.Root.displayName;
22
- const RadioGroupItem = React.forwardRef(({ className, ...props }, ref) => {
23
- return (_jsx(RadioGroupPrimitive.Item, { ref: ref, className: cn("aspect-square h-4 w-4 rounded-full border border-gray-700 disabled:bg-gray-300 disabled:data-[state=checked]:text-gray-500 data-[state=checked]:text-white disabled:data-[state=checked]:bg-gray-300 data-[state=checked]:bg-pink-500 disabled:border-none data-[state=checked]:border-none text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-default disabled:opacity-40", className), ...props, children: _jsx(RadioGroupPrimitive.Indicator, { className: "flex items-center justify-center w-full h-full rounded-full ", children: _jsx(Circle, { className: "h-2 w-2 fill-current text-current" }) }) }));
24
- });
25
- RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;
26
- export { RadioGroup, RadioGroupItem };
@@ -1 +0,0 @@
1
- export { RadioGroup, RadioGroupItem } from "./RadioGroup";
@@ -1 +0,0 @@
1
- export { RadioGroup, RadioGroupItem } from "./RadioGroup";
@@ -1,7 +0,0 @@
1
- import { InputHTMLAttributes } from "react";
2
- export interface SearchBarProps extends InputHTMLAttributes<HTMLInputElement> {
3
- inputClassName?: string;
4
- size?: 1 | 2;
5
- onClickClear?: (inputValue: string) => void;
6
- }
7
- export declare const SearchBar: import("react").ForwardRefExoticComponent<SearchBarProps & import("react").RefAttributes<HTMLInputElement>>;
@@ -1,45 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { forwardRef, useEffect, useRef, useState, } from "react";
3
- import { MagnifyingGlassIcon } from "@heroicons/react/20/solid";
4
- import { XCircleIcon } from "@heroicons/react/24/outline";
5
- import { cn } from "../../helpers/utils";
6
- export const SearchBar = forwardRef(({ disabled, className, inputClassName, size, onChange, onFocus, onClickClear, value, defaultValue, type = "text", ...restProps }, ref) => {
7
- const [clearable, setClearable] = useState(false);
8
- const rootRef = useRef(null);
9
- const handleShowClearButton = (inputValue) => {
10
- if (inputValue && !clearable) {
11
- setClearable(true);
12
- }
13
- if (!inputValue && clearable) {
14
- setClearable(false);
15
- }
16
- };
17
- const onChangeFactory = (event) => {
18
- handleShowClearButton(event.target.value);
19
- onChange?.(event);
20
- };
21
- const onFocusFactory = (event) => {
22
- handleShowClearButton(event.target.value);
23
- onFocus?.(event);
24
- };
25
- const handleClear = () => {
26
- const inputTarget = rootRef.current?.querySelector("input");
27
- if (!inputTarget)
28
- return;
29
- onClickClear?.(inputTarget.value);
30
- inputTarget.value = "";
31
- inputTarget.focus();
32
- setClearable(false);
33
- };
34
- useEffect(() => {
35
- handleShowClearButton(defaultValue || value);
36
- }, [value, defaultValue]);
37
- return (_jsxs("div", { className: cn(className), ref: rootRef, children: [_jsxs("div", { className: "relative flex items-center", children: [_jsx("div", { className: "absolute left-3 top-1/2 -translate-y-1/2 shrink-0 text-gray-500 duration-200 ", children: _jsx(MagnifyingGlassIcon, { className: "w-4 h-4 text-gray-500" }) }), _jsx("input", { disabled: disabled, type: type, ref: ref, className: cn("mobase-text-input-box text-gray-900 h-10 bg-white w-full transition-all text-sm rounded-md border border-gray-400 placeholder:text-gray-500 px-9 focus:border-pink-500 disabled:bg-gray-50 disabled:border-gray-300 disabled:pointer-events-none block disabled:opacity-50", inputClassName), onChange: onChangeFactory, onFocus: onFocusFactory, value: value, defaultValue: defaultValue, ...restProps }), clearable && (_jsx("button", { "aria-label": "button", type: "button", className: "absolute right-3 top-1/2 -translate-y-1/2 shrink-0 cursor-pointer text-gray-500 duration-200 hover:opacity-70 disabled:pointer-events-none", disabled: disabled, onClick: handleClear, children: _jsx(XCircleIcon, { strokeWidth: 2, width: 20, height: 20 }) }))] }), _jsx("style", { children: `
38
- .mobase-text-input-box:hover {
39
- box-shadow: 0px 0px 0px 1px rgb(var(--mobase-gray-400) / 1) inset;
40
- }
41
- .mobase-text-input-box:focus {
42
- box-shadow: 0px 0px 0px 1px rgb(var(--mobase-pink-500) / 1) inset;
43
- }
44
- ` })] }));
45
- });
@@ -1 +0,0 @@
1
- export { SearchBar } from "./SearchBar";
@@ -1 +0,0 @@
1
- export { SearchBar } from "./SearchBar";
@@ -1,19 +0,0 @@
1
- import * as React from "react";
2
- import * as SelectPrimitive from "@radix-ui/react-select";
3
- declare const Select: React.ForwardRefExoticComponent<SelectPrimitive.SelectProps & {
4
- className?: string | undefined;
5
- label?: string | null | undefined;
6
- message?: string | null | undefined;
7
- size?: 2 | 1 | undefined;
8
- isError?: boolean | undefined;
9
- } & React.RefAttributes<never>>;
10
- declare const SelectValue: React.ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & React.RefAttributes<HTMLSpanElement>>;
11
- declare const SelectTrigger: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
12
- declare const SelectScrollUpButton: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollUpButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
13
- declare const SelectScrollDownButton: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollDownButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
14
- declare const SelectContent: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
15
- declare const SelectGroup: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectGroupProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
16
- declare const SelectLabel: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
17
- declare const SelectItem: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
18
- declare const SelectSeparator: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
19
- export { Select, SelectGroup, SelectValue, SelectTrigger, SelectContent, SelectLabel, SelectItem, SelectSeparator, SelectScrollUpButton, SelectScrollDownButton, };
@@ -1,32 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import * as React from "react";
3
- import { ChevronDownIcon, ChevronUpIcon, CheckIcon, XCircleIcon, } from "@heroicons/react/16/solid";
4
- import { QuestionMarkCircleIcon } from "@heroicons/react/24/outline";
5
- import * as SelectPrimitive from "@radix-ui/react-select";
6
- import { cn } from "../../helpers/utils";
7
- const Select = React.forwardRef(({ className, children, label, message, size, isError, disabled, ...props }) => (_jsxs("div", { className: cn("select-mobase relative", className, disabled ? "disabled" : "", isError
8
- ? "[&>.select-mobase-button]:border-red-500 [&>.select-mobase-button]:ring-red-500 [&>.select-mobase-button]:ring-1"
9
- : "", size === 2
10
- ? "[&>.select-mobase-button]:text-base [&>.select-mobase-button]:h-12"
11
- : ""), children: [label && (_jsx("span", { className: cn("mobase-select-label absolute bg-white -top-2 px-1.5 left-2 text-xs text-gray-500 z-[1]", size === 2 && "text-sm -top-2.5", isError && "text-red-500"), children: label })), _jsx(SelectPrimitive.Root, { disabled: disabled, ...props, children: children }), message && (_jsxs("div", { className: cn("mobase-select-message flex space-x-1 items-center mt-1 text-gray-500", isError && "text-red-500"), children: [isError ? (_jsx(XCircleIcon, { width: 16, height: 16 })) : (_jsx(QuestionMarkCircleIcon, { width: 16, height: 16 })), _jsx("span", { className: cn(size === 2 ? "text-sm" : "text-xs"), children: message })] }))] })));
12
- const SelectValue = SelectPrimitive.Value;
13
- const SelectTrigger = React.forwardRef(({ className, children, ...props }, ref) => (_jsxs(SelectPrimitive.Trigger, { ref: ref, className: cn("select-mobase-button bg-white w-full ring-0 transition-all focus-visible:border-pink-500 focus-visible:ring-offset-0 focus-visible:ring-offset-transparent focus-visible:ring-1 focus-visible:!ring-pink-500 rounded-md border border-gray-400 data-[placeholder]:text-gray-500 p-3 disabled:bg-gray-50 disabled:border-gray-300 disabled:pointer-events-none flex items-center justify-between data-[state=open]:border-pink-500 data-[state=open]:ring-1 hover:ring-1 hover:ring-gray-400 data-[state=open]:ring-pink-500 text-gray-900 h-11 ring-inset text-sm", className), ...props, children: [_jsx("div", { className: "line-clamp-1 text-left", children: children }), _jsx(SelectPrimitive.Icon, { asChild: true, children: _jsx(ChevronDownIcon, { className: "h-4 w-4 text-gray-500 flex-none" }) })] })));
14
- SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
15
- const SelectScrollUpButton = React.forwardRef(({ className, ...props }, ref) => (_jsx(SelectPrimitive.ScrollUpButton, { ref: ref, className: cn("flex cursor-default items-center justify-center py-1", className), ...props, children: _jsx(ChevronUpIcon, { className: "h-5 w-5" }) })));
16
- SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
17
- const SelectScrollDownButton = React.forwardRef(({ className, ...props }, ref) => (_jsx(SelectPrimitive.ScrollDownButton, { ref: ref, className: cn("flex cursor-default items-center justify-center py-1 bg-gradient-to-t from-white to-transparent", className), ...props, children: _jsx(ChevronDownIcon, { className: "h-5 w-5" }) })));
18
- SelectScrollDownButton.displayName =
19
- SelectPrimitive.ScrollDownButton.displayName;
20
- const SelectContent = React.forwardRef(({ className, children, position = "popper", ...props }, ref) => (_jsx(SelectPrimitive.Portal, { children: _jsxs(SelectPrimitive.Content, { ref: ref, className: cn("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border border-gray-300 bg-white text-gray-900 shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", position === "popper" &&
21
- "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", className), position: position, ...props, children: [_jsx(SelectScrollUpButton, {}), _jsx(SelectPrimitive.Viewport, { className: cn("p-0", position === "popper" &&
22
- "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"), children: children }), _jsx(SelectScrollDownButton, {})] }) })));
23
- SelectContent.displayName = SelectPrimitive.Content.displayName;
24
- const SelectGroup = React.forwardRef(({ className, children, ...props }, ref) => (_jsx(SelectPrimitive.Group, { ref: ref, className: cn("relative p-1 after:w-full border-b border-gray-200 last:border-0", className), ...props, children: children })));
25
- const SelectLabel = React.forwardRef(({ className, ...props }, ref) => (_jsx(SelectPrimitive.Label, { ref: ref, className: cn("pr-2 pl-8 py-1.5 text-sm font-semibold z-[1]", className), ...props })));
26
- SelectLabel.displayName = SelectPrimitive.Label.displayName;
27
- const SelectItem = React.forwardRef(({ className, children, ...props }, ref) => {
28
- return (_jsxs(SelectPrimitive.Item, { ref: ref, className: cn("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pr-2 pl-8 text-sm outline-none focus:bg-gray-100 focus:text-gray-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50", className), ...props, children: [_jsx("span", { className: "absolute left-2 flex h-4 w-4 items-center justify-center", children: _jsx(SelectPrimitive.ItemIndicator, { children: _jsx(CheckIcon, { className: "h-4 w-4" }) }) }), _jsx(SelectPrimitive.ItemText, { children: children })] }));
29
- });
30
- const SelectSeparator = React.forwardRef(({ className, ...props }, ref) => (_jsx(SelectPrimitive.Separator, { ref: ref, className: cn("-mx-1 my-1 h-px bg-muted", className), ...props })));
31
- SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
32
- export { Select, SelectGroup, SelectValue, SelectTrigger, SelectContent, SelectLabel, SelectItem, SelectSeparator, SelectScrollUpButton, SelectScrollDownButton, };
@@ -1 +0,0 @@
1
- export { Select, SelectGroup, SelectValue, SelectTrigger, SelectContent, SelectLabel, SelectItem, SelectSeparator, SelectScrollUpButton, SelectScrollDownButton, } from "./Select";
@@ -1 +0,0 @@
1
- export { Select, SelectGroup, SelectValue, SelectTrigger, SelectContent, SelectLabel, SelectItem, SelectSeparator, SelectScrollUpButton, SelectScrollDownButton, } from "./Select";
@@ -1,15 +0,0 @@
1
- import { InputHTMLAttributes } from "react";
2
- export interface StepperProps extends InputHTMLAttributes<HTMLInputElement> {
3
- value?: number;
4
- min?: number;
5
- max?: number;
6
- step?: number;
7
- inputClassName?: string;
8
- stepperClassName?: string;
9
- disabledInput?: boolean;
10
- disabled?: boolean;
11
- onChangeInputStepper?: (inputValue: number | string) => void;
12
- onDecrement?: (inputValue: number | string) => void;
13
- onIncrement?: (inputValue: number | string) => void;
14
- }
15
- export declare const Stepper: import("react").ForwardRefExoticComponent<StepperProps & import("react").RefAttributes<HTMLInputElement>>;
@@ -1,97 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { MinusCircleIcon, PlusCircleIcon } from "@heroicons/react/24/outline";
3
- import { IconButton } from "../IconButton";
4
- import { useRef, forwardRef, useState, useEffect, } from "react";
5
- import { cn } from "../../helpers/utils";
6
- export const Stepper = forwardRef(({ value = 0, min = 0, max = 999, disabled = false, disabledInput = false, step = 1, inputClassName = "", stepperClassName = "", className = "", onChange = () => { }, onChangeInputStepper, onDecrement, onIncrement, ...restProps }, ref) => {
7
- const rootRef = useRef(null);
8
- const [isDisablePlus, setIsDisablePlus] = useState(false);
9
- const [isDisableMinus, setIsDisableMinus] = useState(false);
10
- const [inputValue, setInputValue] = useState("");
11
- const spanRef = useRef(null);
12
- const handleDisable = (inputValue) => {
13
- if (Number(inputValue) >= max) {
14
- setIsDisablePlus(true);
15
- }
16
- else {
17
- setIsDisablePlus(false);
18
- }
19
- if (Number(inputValue) > min) {
20
- setIsDisableMinus(false);
21
- }
22
- else {
23
- setIsDisableMinus(true);
24
- }
25
- };
26
- const onIncrementChange = () => {
27
- if (disabled || isDisablePlus)
28
- return;
29
- const inputTarget = rootRef?.current?.querySelector("input");
30
- if (!inputTarget)
31
- return;
32
- let newValue = 0;
33
- newValue = Math.min(Number(inputTarget.value) + step, max);
34
- handleDisable(newValue);
35
- inputTarget.value = String(newValue);
36
- setInputValue(inputTarget.value || "");
37
- onChangeInputStepper?.(inputTarget.value);
38
- onIncrement?.(inputTarget.value);
39
- };
40
- const onDecrementChange = () => {
41
- if (disabled || isDisableMinus)
42
- return;
43
- const inputTarget = rootRef?.current?.querySelector("input");
44
- if (!inputTarget)
45
- return;
46
- let newValue = 0;
47
- newValue = Math.max(Number(inputTarget.value) - step, 0);
48
- handleDisable(newValue);
49
- inputTarget.value = String(newValue);
50
- setInputValue(inputTarget.value || "");
51
- onChangeInputStepper?.(inputTarget.value);
52
- onDecrement?.(inputTarget.value);
53
- };
54
- const onStepperInputChange = (e) => {
55
- if (!e)
56
- return;
57
- let inputValue = e?.target?.value;
58
- if (!inputValue?.match(/^[0-9]*$/)) {
59
- inputValue = inputValue.replace(/[^0-9]/g, "");
60
- }
61
- handleDisable(inputValue);
62
- const numericValue = parseInt(inputValue, 10);
63
- if (Number.isNaN(numericValue) || numericValue < min) {
64
- e.target.value = String(min);
65
- }
66
- else if (numericValue >= max) {
67
- e.target.value = String(max);
68
- }
69
- else {
70
- e.target.value = String(numericValue);
71
- }
72
- setInputValue(e?.target?.value || "");
73
- onChangeInputStepper?.(e.target.value);
74
- onChange?.(e);
75
- };
76
- useEffect(() => {
77
- const inputTarget = rootRef?.current?.querySelector("input");
78
- if (!inputTarget)
79
- return;
80
- handleDisable(inputTarget?.value);
81
- }, []);
82
- useEffect(() => {
83
- const inputTarget = rootRef?.current?.querySelector("input");
84
- if (inputTarget && spanRef?.current) {
85
- inputTarget.style.width = `${spanRef.current.offsetWidth + 10}px`;
86
- }
87
- }, [inputValue]);
88
- return (_jsxs("div", { ref: rootRef, className: "flex items-center space-x-1", children: [_jsx(IconButton, { id: "btn-minus", className: cn(!isDisableMinus && !disabled
89
- ? "cursor-pointer text-pink-500"
90
- : "text-gray-400 cursor-default", stepperClassName), variant: "transparent", onClick: onDecrementChange, children: _jsx(MinusCircleIcon, { className: "w-8 h-8 " }) }), _jsxs("div", { children: [_jsx("input", { pattern: "[0-9]*", inputMode: "numeric", defaultValue: value, ref: ref, min: min, max: max, onChange: (e) => onStepperInputChange(e), id: "numberInput", disabled: disabled || disabledInput, autoComplete: "off", ...restProps, className: cn("text-gray-800 min-w-7 border-gray-400 border transition-width duration-100 focus-visible:outline-none focus-visible:ring-0 focus:ring-0 shadow-none focus-visible:ring-offset-0 w-7 h-7 rounded-md text-center bg-white", inputClassName) }), _jsx("span", { ref: spanRef, style: {
91
- visibility: "hidden",
92
- position: "absolute",
93
- whiteSpace: "pre",
94
- }, children: inputValue || " " })] }), _jsx(IconButton, { id: "btn-plus", className: cn(!isDisablePlus && !disabled
95
- ? "cursor-pointer text-pink-500"
96
- : "text-gray-400 cursor-default", stepperClassName), variant: "transparent", onClick: onIncrementChange, children: _jsx(PlusCircleIcon, { className: "w-8 h-8 " }) })] }));
97
- });
@@ -1 +0,0 @@
1
- export { Stepper } from "./Stepper";
@@ -1 +0,0 @@
1
- export { Stepper } from "./Stepper";
@@ -1,4 +0,0 @@
1
- import * as React from "react";
2
- import * as SwitchPrimitives from "@radix-ui/react-switch";
3
- declare const Switch: React.ForwardRefExoticComponent<Omit<SwitchPrimitives.SwitchProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
4
- export { Switch };
@@ -1,7 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import * as React from "react";
3
- import * as SwitchPrimitives from "@radix-ui/react-switch";
4
- import { cn } from "../../helpers/utils";
5
- const Switch = React.forwardRef(({ className, ...props }, ref) => (_jsx(SwitchPrimitives.Root, { className: cn("peer inline-flex h-5 w-10 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-default disabled:opacity-20 data-[state=checked]:bg-pink-500 data-[state=unchecked]:bg-gray-400", className), ...props, ref: ref, children: _jsx(SwitchPrimitives.Thumb, { className: cn("pointer-events-none relative cik before:content-[''] before:absolute before:w-1.5 before:h-1.5 before:rounded-full before:bg-pink-600 before:-translate-x-1/2 before:translate-y-1 disabled:opacity-20 before:data-[state=unchecked]:bg-gray-400 block h-3.5 w-3.5 bg-white rounded-full shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0.5") }) })));
6
- Switch.displayName = SwitchPrimitives.Root.displayName;
7
- export { Switch };
@@ -1 +0,0 @@
1
- export { Switch } from "./Switch";
@@ -1 +0,0 @@
1
- export { Switch } from "./Switch";
@@ -1,16 +0,0 @@
1
- import * as React from "react";
2
- import * as TabsPrimitive from "@radix-ui/react-tabs";
3
- declare const Tabs: React.ForwardRefExoticComponent<TabsPrimitive.TabsProps & React.RefAttributes<HTMLDivElement>>;
4
- declare const TabsList: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsListProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
5
- /**
6
- * Control the size of the tabs list..
7
- */
8
- size?: "base" | "sm" | undefined;
9
- /**
10
- * The direction of navigation between toolbar items.
11
- */
12
- isDivider?: boolean | undefined;
13
- } & React.RefAttributes<HTMLDivElement>>;
14
- declare const TabsTrigger: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
15
- declare const TabsContent: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
16
- export { Tabs, TabsList, TabsTrigger, TabsContent };
@@ -1,12 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import * as React from "react";
3
- import * as TabsPrimitive from "@radix-ui/react-tabs";
4
- import { cn } from "../../helpers/utils";
5
- const Tabs = TabsPrimitive.Root;
6
- const TabsList = React.forwardRef(({ className, size = "sm", isDivider = false, ...props }, ref) => (_jsx(TabsPrimitive.List, { ref: ref, className: cn("inline-flex w-full flex-row items-center bg-muted text-muted-foreground space-x-5 overflow-x-auto [&::-webkit-scrollbar]:hidden", `text-${size}`, isDivider && "border-b border-gray-200", className), ...props })));
7
- TabsList.displayName = TabsPrimitive.List.displayName;
8
- const TabsTrigger = React.forwardRef(({ className, ...props }, ref) => (_jsx(TabsPrimitive.Trigger, { ref: ref, className: cn("inline-flex items-center justify-center whitespace-nowrap h-8 font-semibold ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 border-b border-transparent data-[state=active]:text-pink-500 data-[state=active]:border-pink-500 text-gray-900 hover:text-pink-500", className), ...props })));
9
- TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
10
- const TabsContent = React.forwardRef(({ className, ...props }, ref) => (_jsx(TabsPrimitive.Content, { ref: ref, className: cn("mt-3 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 text-gray-900", className), ...props })));
11
- TabsContent.displayName = TabsPrimitive.Content.displayName;
12
- export { Tabs, TabsList, TabsTrigger, TabsContent };
@@ -1 +0,0 @@
1
- export { Tabs, TabsList, TabsTrigger, TabsContent } from "./Tabs";
@@ -1 +0,0 @@
1
- export { Tabs, TabsList, TabsTrigger, TabsContent } from "./Tabs";
@@ -1,9 +0,0 @@
1
- import { TextareaHTMLAttributes } from "react";
2
- export interface TextAreaProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {
3
- label?: string;
4
- message?: string;
5
- isError?: boolean;
6
- inputClassName?: string;
7
- size?: 1 | 2;
8
- }
9
- export declare const TextArea: import("react").ForwardRefExoticComponent<TextAreaProps & import("react").RefAttributes<HTMLTextAreaElement>>;
@@ -1,35 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { forwardRef } from "react";
3
- import { QuestionMarkCircleIcon } from "@heroicons/react/24/outline";
4
- import { XCircleIcon } from "@heroicons/react/24/solid";
5
- import { cn } from "../../helpers/utils";
6
- export const TextArea = forwardRef(({ disabled, isError, message, label, className, inputClassName, size, rows = 3, ...restProps }, ref) => {
7
- return (_jsxs("div", { className: cn("relative", className, isError && "mobase-text-area-error"), children: [label && (_jsx("span", { className: cn("mobase-text-area-label absolute bg-white -top-2.5 px-1.5 left-2 text-sm text-gray-500", size === 2 && " -top-2.5 text-sm"), children: label })), _jsx("textarea", { disabled: disabled, ref: ref, className: cn("mobase-text-area-box bg-white w-full text-sm transition-all rounded-md border border-gray-400 placeholder:text-gray-500 p-3 text-gray-900 focus:border-pink-500 disabled:bg-gray-50 disabled:border-gray-300 outline-none block", size === 2 && "text-base", inputClassName), rows: rows, ...restProps }), message && (_jsxs("div", { className: "mobase-text-area-message flex space-x-1 items-center mt-0.5", children: [isError ? (_jsx(XCircleIcon, { width: 16, height: 16, className: "text-red-500" })) : (_jsx(QuestionMarkCircleIcon, { width: 16, height: 16, className: "text-gray-500" })), _jsx("span", { className: cn("text-gray-500 ", size === 2 ? "text-sm" : "text-xs"), children: message })] })), _jsx("style", { children: `
8
- .mobase-text-area-box:hover {
9
- box-shadow: 0px 0px 0px 1px rgb(var(--mobase-gray-400) / 1) inset;
10
- }
11
-
12
- .mobase-text-area-box:focus, .mobase-text-area-box:focus-visible {
13
- box-shadow: 0px 0px 0px 1px rgb(var(--mobase-pink-500) / 1) inset;
14
- }
15
-
16
- .mobase-text-area-box:disabled {
17
- box-shadow: none;
18
- }
19
-
20
- .mobase-text-area-error {
21
- .mobase-text-area-label {
22
- color: rgb(var(--mobase-red-500) / 1);
23
- }
24
-
25
- .mobase-text-area-box {
26
- box-shadow: 0px 0px 0px 1px rgb(var(--mobase-red-500) / 1) inset;
27
- border-color: rgb(var(--mobase-red-500) / 1);
28
- }
29
-
30
- .mobase-text-area-message span {
31
- color: rgb(var(--mobase-red-500) / 1);
32
- }
33
- }
34
- ` })] }));
35
- });
@@ -1,2 +0,0 @@
1
- export { TextArea } from "./TextArea";
2
- export type { TextAreaProps } from "./TextArea";
@@ -1 +0,0 @@
1
- export { TextArea } from "./TextArea";
@@ -1,22 +0,0 @@
1
- import * as React from "react";
2
- import { type VariantProps } from "class-variance-authority";
3
- declare const textButtonVariants: (props?: ({
4
- variant?: "default" | "primary" | "secondary" | null | undefined;
5
- size?: "default" | "lg" | null | undefined;
6
- } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
7
- export interface TextButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof textButtonVariants> {
8
- /**
9
- * CSS class to be appended to the root element.
10
- */
11
- className?: string;
12
- /**
13
- * Change the default rendered element for the one passed as a child, merging their props and behavior.
14
- */
15
- asChild?: boolean;
16
- /**
17
- * Disabled interaction and applies disabled styles
18
- */
19
- isDisabled?: boolean;
20
- }
21
- declare const TextButton: React.ForwardRefExoticComponent<TextButtonProps & React.RefAttributes<HTMLButtonElement>>;
22
- export { TextButton, textButtonVariants };
@@ -1,36 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import * as React from "react";
3
- import { Slot } from "@radix-ui/react-slot";
4
- import { cva } from "class-variance-authority";
5
- import { cn } from "../../helpers/utils";
6
- // /dwd
7
- const textButtonVariants = cva("inline-flex items-center justify-center whitespace-nowrap font-semibold transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed border border-transparent flex-nowrap", {
8
- variants: {
9
- /**
10
- * Determines style variation of Button component.
11
- */
12
- variant: {
13
- default: "text-blue-700 hover:underline hover:bg-blue-50 disabled:bg-transparent disabled:text-gray-400 disabled:no-underline",
14
- primary: "text-pink-500 hover:underline hover:bg-pink-50 disabled:bg-transparent disabled:text-gray-400 disabled:no-underline",
15
- secondary: "text-gray-700 hover:underline hover:text-blue-700 hover:bg-blue-50 disabled:bg-transparent disabled:text-gray-400 disabled:no-underline",
16
- },
17
- /**
18
- * Determines size variation of Button component.
19
- */
20
- size: {
21
- default: "text-sm",
22
- lg: "text-base",
23
- },
24
- },
25
- defaultVariants: {
26
- variant: "default",
27
- size: "default",
28
- },
29
- });
30
- const TextButton = React.forwardRef(({ className, variant = "default", size = "default", asChild = false, isDisabled = false, ...props }, ref) => {
31
- const Comp = asChild ? Slot : "button";
32
- const buttonClassName = cn(textButtonVariants({ variant, size, className }));
33
- return (_jsx(Comp, { className: buttonClassName, disabled: isDisabled, ref: ref, ...props, children: props.children }));
34
- });
35
- TextButton.displayName = "TextButton";
36
- export { TextButton, textButtonVariants };
@@ -1,2 +0,0 @@
1
- export { TextButton, textButtonVariants } from "./TextButton";
2
- export type { TextButtonProps } from "./TextButton";
@@ -1 +0,0 @@
1
- export { TextButton, textButtonVariants } from "./TextButton";
@@ -1,11 +0,0 @@
1
- import { InputHTMLAttributes } from "react";
2
- export interface TextInputProps extends InputHTMLAttributes<HTMLInputElement> {
3
- label?: string;
4
- message?: string;
5
- isError?: boolean;
6
- inputClassName?: string;
7
- withClearButton?: boolean;
8
- size?: 1 | 2;
9
- onClickClear?: (inputValue: string) => void;
10
- }
11
- export declare const TextInput: import("react").ForwardRefExoticComponent<TextInputProps & import("react").RefAttributes<HTMLInputElement>>;
@@ -1,62 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { forwardRef, useEffect, useRef, useState, } from "react";
3
- import { QuestionMarkCircleIcon, XCircleIcon, XCircleIcon as XCircleIconSolid, } from "@heroicons/react/16/solid";
4
- import { cn } from "../../helpers/utils";
5
- export const TextInput = forwardRef(({ disabled, isError, message, label, className, inputClassName, withClearButton, size, onChange, onFocus, onClickClear, value, defaultValue, type = "text", ...restProps }, ref) => {
6
- const [clearable, setClearable] = useState(false);
7
- const rootRef = useRef(null);
8
- const handleShowClearButton = (inputValue) => {
9
- if (inputValue && !clearable) {
10
- setClearable(true);
11
- }
12
- if (!inputValue && clearable) {
13
- setClearable(false);
14
- }
15
- };
16
- const onChangeFactory = (event) => {
17
- if (withClearButton)
18
- handleShowClearButton(event.target.value);
19
- onChange?.(event);
20
- };
21
- const onFocusFactory = (event) => {
22
- if (withClearButton)
23
- handleShowClearButton(event.target.value);
24
- onFocus?.(event);
25
- };
26
- const handleClear = () => {
27
- const inputTarget = rootRef.current?.querySelector("input");
28
- if (!inputTarget)
29
- return;
30
- onClickClear?.(inputTarget.value);
31
- inputTarget.value = "";
32
- inputTarget.focus();
33
- setClearable(false);
34
- };
35
- useEffect(() => {
36
- handleShowClearButton(defaultValue || value);
37
- }, [value, defaultValue]);
38
- return (_jsxs("div", { className: cn(className, isError && "mobase-text-input-error"), ref: rootRef, children: [_jsxs("div", { className: "relative", children: [label && (_jsx("span", { className: cn("mobase-text-input-label absolute bg-white -top-2 px-1.5 left-2 text-xs text-gray-500", size === 2 && " -top-2.5 text-sm"), children: label })), _jsx("input", { disabled: disabled, type: type, ref: ref, className: cn("mobase-text-input-box bg-white w-full transition-all text-sm rounded-md border border-gray-400 placeholder:text-gray-500 p-3 text-gray-900 h-11 focus:border-pink-500 disabled:bg-gray-50 disabled:border-gray-300 disabled:pointer-events-none block outline-none", size === 2 && "h-12 text-base", inputClassName), onChange: onChangeFactory, onFocus: onFocusFactory, value: value, defaultValue: defaultValue, ...restProps }), withClearButton && clearable && (_jsx("button", { "aria-label": "button", type: "button", className: "absolute right-3 top-1/2 -translate-y-1/2 shrink-0 cursor-pointer text-gray-500 duration-200 hover:opacity-70 disabled:pointer-events-none", disabled: disabled, onClick: handleClear, children: _jsx(XCircleIcon, { strokeWidth: 2, width: 20, height: 20 }) }))] }), message && (_jsxs("div", { className: "mobase-text-input-message flex space-x-1 items-center mt-0.5", children: [isError ? (_jsx(XCircleIconSolid, { width: 16, height: 16, className: "text-red-500" })) : (_jsx(QuestionMarkCircleIcon, { width: 16, height: 16, className: "text-gray-500" })), _jsx("span", { className: cn("text-gray-500 ", size === 2 ? "text-sm" : "text-xs"), children: message })] })), _jsx("style", { children: `
39
- .mobase-text-input-box:hover {
40
- box-shadow: 0px 0px 0px 1px rgb(var(--mobase-gray-400) / 1) inset;
41
- }
42
-
43
- .mobase-text-input-box:focus , .mobase-text-input-box:focus-visible {
44
- box-shadow: 0px 0px 0px 1px rgb(var(--mobase-pink-500) / 1) inset;
45
- }
46
-
47
- .mobase-text-input-error {
48
- .mobase-text-input-label {
49
- color: rgb(var(--mobase-red-500) / 1);
50
- }
51
-
52
- .mobase-text-input-box {
53
- box-shadow: 0px 0px 0px 1px rgb(var(--mobase-red-500) / 1) inset;
54
- border-color: rgb(var(--mobase-red-500) / 1);
55
- }
56
-
57
- .mobase-text-input-message span {
58
- color: rgb(var(--mobase-red-500) / 1);
59
- }
60
- }
61
- ` })] }));
62
- });
@@ -1,2 +0,0 @@
1
- export { TextInput } from "./TextInput";
2
- export type { TextInputProps } from "./TextInput";
@@ -1 +0,0 @@
1
- export { TextInput } from "./TextInput";
@@ -1,15 +0,0 @@
1
- import * as React from "react";
2
- import * as ToastPrimitives from "@radix-ui/react-toast";
3
- import { type VariantProps } from "class-variance-authority";
4
- declare const ToastProvider: React.FC<ToastPrimitives.ToastProviderProps>;
5
- declare const ToastViewport: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastViewportProps & React.RefAttributes<HTMLOListElement>, "ref"> & React.RefAttributes<HTMLOListElement>>;
6
- declare const Toast: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastProps & React.RefAttributes<HTMLLIElement>, "ref"> & VariantProps<(props?: ({
7
- variant?: "sucess" | "warning" | "error" | null | undefined;
8
- } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string> & React.RefAttributes<HTMLLIElement>>;
9
- declare const ToastAction: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastActionProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
10
- declare const ToastClose: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastCloseProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
11
- declare const ToastTitle: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastTitleProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
12
- declare const ToastDescription: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastDescriptionProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
13
- type ToastProps = React.ComponentPropsWithoutRef<typeof Toast>;
14
- type ToastActionElement = React.ReactElement<typeof ToastAction>;
15
- export { type ToastProps, type ToastActionElement, ToastProvider, ToastViewport, Toast, ToastTitle, ToastDescription, ToastClose, ToastAction, };
@@ -1,34 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import * as React from "react";
3
- import * as ToastPrimitives from "@radix-ui/react-toast";
4
- import { cva } from "class-variance-authority";
5
- import { cn } from "../../helpers/utils";
6
- import { XMarkIcon, CheckCircleIcon, ExclamationTriangleIcon, InformationCircleIcon, } from "@heroicons/react/20/solid";
7
- const ToastProvider = ToastPrimitives.Provider;
8
- const ToastViewport = React.forwardRef(({ className, ...props }, ref) => (_jsx(ToastPrimitives.Viewport, { ref: ref, className: cn("fixed bottom-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 left-0 sm:right-0 sm:left-auto sm:top-0 sm:bottom-auto sm:flex-col md:max-w-[420px]", className), ...props })));
9
- ToastViewport.displayName = ToastPrimitives.Viewport.displayName;
10
- const toastVariants = cva("group pointer-events-auto relative w-full overflow-hidden rounded-md border py-4 pr-10 pl-10 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-bottom-full data-[state=open]:sm:slide-in-from-top-full bg-white text-gray-900 border border-gray-200 border-l-4", {
11
- variants: {
12
- variant: {
13
- sucess: "border-l-green-500",
14
- warning: "border-l-yellow-500",
15
- error: "border-l-red-500",
16
- },
17
- },
18
- defaultVariants: {
19
- variant: "sucess",
20
- },
21
- });
22
- const Toast = React.forwardRef(({ className, variant = "sucess", children, ...props }, ref) => {
23
- return (_jsxs(ToastPrimitives.Root, { ref: ref, className: cn(toastVariants({ variant }), className), ...props, children: [_jsxs("div", { className: "w-5 h-5 flex items-center justify-center absolute top-4 left-3", children: [variant === "sucess" && (_jsx(CheckCircleIcon, { className: "w-5 h-5 text-green-500" })), variant === "warning" && (_jsx(ExclamationTriangleIcon, { className: "w-5 h-5 text-yellow-500" })), variant === "error" && (_jsx(InformationCircleIcon, { className: "w-5 h-5 text-red-500" }))] }), children] }));
24
- });
25
- Toast.displayName = ToastPrimitives.Root.displayName;
26
- const ToastAction = React.forwardRef(({ className, ...props }, ref) => (_jsx(ToastPrimitives.Action, { ref: ref, className: cn("inline-flex shrink-0 items-center justify-center bg-transparent text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-0 focus:ring-ring focus:ring-offset-0 disabled:pointer-events-none disabled:opacity-50 text-blue-600 hover:underline mt-2", className), ...props })));
27
- ToastAction.displayName = ToastPrimitives.Action.displayName;
28
- const ToastClose = React.forwardRef(({ className, ...props }, ref) => (_jsx(ToastPrimitives.Close, { ref: ref, className: cn("absolute right-2 top-2 rounded-md transition-opacity hover:opacity-70 focus:opacity-100 focus:outline-none focus:ring-2 text-gray-800 w-8 h-8 flex items-center justify-center", className), "toast-close": "", ...props, children: _jsx(XMarkIcon, { className: "h-5 w-5" }) })));
29
- ToastClose.displayName = ToastPrimitives.Close.displayName;
30
- const ToastTitle = React.forwardRef(({ className, ...props }, ref) => (_jsx(ToastPrimitives.Title, { ref: ref, className: cn("text-base font-semibold leading-tight", className), ...props })));
31
- ToastTitle.displayName = ToastPrimitives.Title.displayName;
32
- const ToastDescription = React.forwardRef(({ className, ...props }, ref) => (_jsx(ToastPrimitives.Description, { ref: ref, className: cn("text-sm opacity-90", className), ...props })));
33
- ToastDescription.displayName = ToastPrimitives.Description.displayName;
34
- export { ToastProvider, ToastViewport, Toast, ToastTitle, ToastDescription, ToastClose, ToastAction, };
@@ -1,2 +0,0 @@
1
- export { useToast, toast } from "./useToast";
2
- export { Toaster } from "./toaster";