@rovula/ui 0.0.21 → 0.0.22

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 (299) hide show
  1. package/dist/cjs/bundle.css +155 -495
  2. package/dist/cjs/bundle.js +3 -3
  3. package/dist/cjs/bundle.js.map +1 -1
  4. package/dist/cjs/types/components/ActionButton/ActionButton.stories.d.ts +7 -7
  5. package/dist/cjs/types/components/Button/Button.d.ts +1 -1
  6. package/dist/cjs/types/components/Button/Button.styles.d.ts +1 -1
  7. package/dist/cjs/types/components/Button/Buttons.stories.d.ts +13 -13
  8. package/dist/cjs/types/components/Checkbox/Checkbox.stories.d.ts +60 -60
  9. package/dist/cjs/types/components/Dropdown/Dropdown.stories.d.ts +64 -64
  10. package/dist/cjs/types/components/Icon/Icon.d.ts +11 -0
  11. package/dist/cjs/types/components/Icon/Icon.stories.d.ts +508 -0
  12. package/dist/cjs/types/components/Icon/Icon.styles.d.ts +4 -0
  13. package/dist/cjs/types/components/Input/Input.stories.d.ts +115 -115
  14. package/dist/cjs/types/components/Label/Label.stories.d.ts +51 -51
  15. package/dist/cjs/types/components/RadioGroup/RadioGroup.stories.d.ts +54 -54
  16. package/dist/cjs/types/components/Search/Search.stories.d.ts +64 -64
  17. package/dist/cjs/types/components/Slider/Slider.d.ts +5 -0
  18. package/dist/cjs/types/components/Slider/Slider.stories.d.ts +303 -0
  19. package/dist/cjs/types/components/Switch/Switch.d.ts +4 -0
  20. package/dist/cjs/types/components/Switch/Switch.stories.d.ts +305 -0
  21. package/dist/cjs/types/components/Table/Table.stories.d.ts +7 -7
  22. package/dist/cjs/types/components/Tabs/Tabs.d.ts +12 -3
  23. package/dist/cjs/types/components/Tabs/Tabs.stories.d.ts +18 -0
  24. package/dist/cjs/types/components/TextInput/TextInput.stories.d.ts +62 -62
  25. package/dist/cjs/types/components/TextInput/TextInput.styles.d.ts +1 -1
  26. package/dist/cjs/types/icons/heroIconConfig.d.ts +1 -0
  27. package/dist/cjs/types/icons/iconConfig.d.ts +2 -0
  28. package/dist/cjs/types/icons/iconRegistry.d.ts +19 -0
  29. package/dist/cjs/types/icons/index.d.ts +1 -0
  30. package/dist/cjs/types/icons/material-icon/outline/ChevronDownIcon.d.ts +3 -0
  31. package/dist/cjs/types/icons/material-icon/outline/CollapseContentIcon.d.ts +3 -0
  32. package/dist/cjs/types/icons/material-icon/outline/ContentCopyIcon.d.ts +3 -0
  33. package/dist/cjs/types/icons/material-icon/outline/ContentPasteIcon.d.ts +3 -0
  34. package/dist/cjs/types/icons/material-icon/outline/DataTableIcon.d.ts +3 -0
  35. package/dist/cjs/types/icons/material-icon/outline/ExpandCircleDownIcon.d.ts +3 -0
  36. package/dist/cjs/types/icons/material-icon/outline/ExpandCircleRightIcon.d.ts +3 -0
  37. package/dist/cjs/types/icons/material-icon/outline/ExpandCircleUpIcon.d.ts +3 -0
  38. package/dist/cjs/types/icons/material-icon/outline/ExpandContentIcon.d.ts +3 -0
  39. package/dist/cjs/types/icons/material-icon/outline/InterestsIcon.d.ts +3 -0
  40. package/dist/cjs/types/icons/material-icon/outline/SaveIcon.d.ts +3 -0
  41. package/dist/cjs/types/icons/material-icon/outline/TableChartIcon.d.ts +3 -0
  42. package/dist/cjs/types/icons/material-icon/outline/index.d.ts +12 -0
  43. package/dist/cjs/types/icons/material-icon/solid/ChevronDownIcon.d.ts +3 -0
  44. package/dist/cjs/types/icons/material-icon/solid/CollapseContentIcon.d.ts +3 -0
  45. package/dist/cjs/types/icons/material-icon/solid/ContentCopyIcon.d.ts +3 -0
  46. package/dist/cjs/types/icons/material-icon/solid/ContentPasteIcon.d.ts +3 -0
  47. package/dist/cjs/types/icons/material-icon/solid/DataTableIcon.d.ts +3 -0
  48. package/dist/cjs/types/icons/material-icon/solid/ExpandCircleDownIcon.d.ts +3 -0
  49. package/dist/cjs/types/icons/material-icon/solid/ExpandCircleRightIcon.d.ts +3 -0
  50. package/dist/cjs/types/icons/material-icon/solid/ExpandCircleUpIcon.d.ts +3 -0
  51. package/dist/cjs/types/icons/material-icon/solid/ExpandContentIcon.d.ts +3 -0
  52. package/dist/cjs/types/icons/material-icon/solid/InterestsIcon.d.ts +3 -0
  53. package/dist/cjs/types/icons/material-icon/solid/SaveIcon.d.ts +3 -0
  54. package/dist/cjs/types/icons/material-icon/solid/TableChartIcon.d.ts +3 -0
  55. package/dist/cjs/types/icons/material-icon/solid/index.d.ts +12 -0
  56. package/dist/cjs/types/icons/materialIconConfig.d.ts +1 -0
  57. package/dist/cjs/types/icons/type.d.ts +8 -0
  58. package/dist/cjs/types/icons/utils.d.ts +1 -0
  59. package/dist/cjs/types/index.d.ts +4 -0
  60. package/dist/components/ActionButton/ActionButton.js +8 -19
  61. package/dist/components/ActionButton/ActionButton.stories.js +12 -22
  62. package/dist/components/ActionButton/ActionButton.styles.js +33 -8
  63. package/dist/components/AlertDialog/Alert.stories.js +5 -16
  64. package/dist/components/AlertDialog/AlertDialog.js +27 -38
  65. package/dist/components/Avatar/Avatar.js +7 -8
  66. package/dist/components/Avatar/Avatar.stories.js +11 -22
  67. package/dist/components/Avatar/Avatar.styles.js +1 -1
  68. package/dist/components/Avatar/AvatarBase.js +9 -20
  69. package/dist/components/Avatar/AvatarGroup.js +9 -10
  70. package/dist/components/Avatar/AvatarGroup.stories.js +9 -20
  71. package/dist/components/Button/Button.js +4 -15
  72. package/dist/components/Button/Button.styles.js +1 -1
  73. package/dist/components/Button/Buttons.stories.js +18 -29
  74. package/dist/components/Calendar/Calendar.js +3 -14
  75. package/dist/components/Calendar/Calendar.stories.js +6 -17
  76. package/dist/components/Checkbox/Checkbox.js +3 -14
  77. package/dist/components/Checkbox/Checkbox.stories.js +12 -23
  78. package/dist/components/Collapsible/Collapsible.js +14 -17
  79. package/dist/components/Collapsible/Collapsible.stories.js +9 -20
  80. package/dist/components/Collapsible/Collapsible.styles.js +4 -4
  81. package/dist/components/Collapsible/CollapsibleContext.js +9 -10
  82. package/dist/components/DataTable/DataTable.js +25 -26
  83. package/dist/components/DataTable/DataTable.stories.js +10 -21
  84. package/dist/components/DatePicker/DatePicker.js +4 -20
  85. package/dist/components/DatePicker/DatePicker.stories.js +6 -17
  86. package/dist/components/Dialog/Dialog.js +22 -33
  87. package/dist/components/Dialog/Dialog.stories.js +8 -19
  88. package/dist/components/Dropdown/Dropdown.js +26 -37
  89. package/dist/components/Dropdown/Dropdown.stories.js +36 -55
  90. package/dist/components/Dropdown/Dropdown.styles.js +3 -3
  91. package/dist/components/Form/Form.js +26 -87
  92. package/dist/components/Form/Text.js +2 -3
  93. package/dist/components/Form/TextInput.js +2 -3
  94. package/dist/components/Icon/Icon.js +37 -0
  95. package/dist/components/Icon/Icon.stories.js +356 -0
  96. package/dist/components/Icon/Icon.styles.js +25 -0
  97. package/dist/components/Input/Input.js +9 -20
  98. package/dist/components/Input/Input.stories.js +6 -17
  99. package/dist/components/Input/Input.styles.js +1 -1
  100. package/dist/components/Label/Label.js +3 -14
  101. package/dist/components/Label/Label.stories.js +5 -16
  102. package/dist/components/Label/Label.styles.js +1 -1
  103. package/dist/components/Loading/Loading.js +5 -17
  104. package/dist/components/Loading/Loading.stories.js +6 -17
  105. package/dist/components/Navbar/Navbar.js +3 -4
  106. package/dist/components/Navbar/Navbar.stories.js +8 -19
  107. package/dist/components/Popover/Popover.js +5 -16
  108. package/dist/components/Popover/Popover.stories.js +5 -16
  109. package/dist/components/ProgressBar/ProgressBar.js +8 -9
  110. package/dist/components/ProgressBar/ProgressBar.stories.js +14 -27
  111. package/dist/components/RadioGroup/RadioGroup.js +6 -17
  112. package/dist/components/RadioGroup/RadioGroup.stories.js +9 -20
  113. package/dist/components/Search/Search.js +2 -13
  114. package/dist/components/Search/Search.stories.js +10 -21
  115. package/dist/components/Slider/Slider.js +22 -0
  116. package/dist/components/Slider/Slider.stories.js +33 -0
  117. package/dist/components/Switch/Switch.js +22 -0
  118. package/dist/components/Switch/Switch.stories.js +32 -0
  119. package/dist/components/Table/Datagrid.js +2 -3
  120. package/dist/components/Table/Table.js +24 -35
  121. package/dist/components/Table/Table.stories.js +5 -16
  122. package/dist/components/Tabs/Tabs.js +56 -9
  123. package/dist/components/Tabs/Tabs.stories.js +13 -24
  124. package/dist/components/Text/Text.js +3 -4
  125. package/dist/components/Text/Text.stories.js +12 -23
  126. package/dist/components/TextInput/TextInput.js +30 -41
  127. package/dist/components/TextInput/TextInput.stories.js +17 -28
  128. package/dist/components/TextInput/TextInput.styles.js +7 -7
  129. package/dist/components/ThemeToggle.js +3 -3
  130. package/dist/esm/bundle.css +155 -495
  131. package/dist/esm/bundle.js +3 -3
  132. package/dist/esm/bundle.js.map +1 -1
  133. package/dist/esm/types/components/ActionButton/ActionButton.stories.d.ts +7 -7
  134. package/dist/esm/types/components/Button/Button.d.ts +1 -1
  135. package/dist/esm/types/components/Button/Button.styles.d.ts +1 -1
  136. package/dist/esm/types/components/Button/Buttons.stories.d.ts +13 -13
  137. package/dist/esm/types/components/Checkbox/Checkbox.stories.d.ts +60 -60
  138. package/dist/esm/types/components/Dropdown/Dropdown.stories.d.ts +64 -64
  139. package/dist/esm/types/components/Icon/Icon.d.ts +11 -0
  140. package/dist/esm/types/components/Icon/Icon.stories.d.ts +508 -0
  141. package/dist/esm/types/components/Icon/Icon.styles.d.ts +4 -0
  142. package/dist/esm/types/components/Input/Input.stories.d.ts +115 -115
  143. package/dist/esm/types/components/Label/Label.stories.d.ts +51 -51
  144. package/dist/esm/types/components/RadioGroup/RadioGroup.stories.d.ts +54 -54
  145. package/dist/esm/types/components/Search/Search.stories.d.ts +64 -64
  146. package/dist/esm/types/components/Slider/Slider.d.ts +5 -0
  147. package/dist/esm/types/components/Slider/Slider.stories.d.ts +303 -0
  148. package/dist/esm/types/components/Switch/Switch.d.ts +4 -0
  149. package/dist/esm/types/components/Switch/Switch.stories.d.ts +305 -0
  150. package/dist/esm/types/components/Table/Table.stories.d.ts +7 -7
  151. package/dist/esm/types/components/Tabs/Tabs.d.ts +12 -3
  152. package/dist/esm/types/components/Tabs/Tabs.stories.d.ts +18 -0
  153. package/dist/esm/types/components/TextInput/TextInput.stories.d.ts +62 -62
  154. package/dist/esm/types/components/TextInput/TextInput.styles.d.ts +1 -1
  155. package/dist/esm/types/icons/heroIconConfig.d.ts +1 -0
  156. package/dist/esm/types/icons/iconConfig.d.ts +2 -0
  157. package/dist/esm/types/icons/iconRegistry.d.ts +19 -0
  158. package/dist/esm/types/icons/index.d.ts +1 -0
  159. package/dist/esm/types/icons/material-icon/outline/ChevronDownIcon.d.ts +3 -0
  160. package/dist/esm/types/icons/material-icon/outline/CollapseContentIcon.d.ts +3 -0
  161. package/dist/esm/types/icons/material-icon/outline/ContentCopyIcon.d.ts +3 -0
  162. package/dist/esm/types/icons/material-icon/outline/ContentPasteIcon.d.ts +3 -0
  163. package/dist/esm/types/icons/material-icon/outline/DataTableIcon.d.ts +3 -0
  164. package/dist/esm/types/icons/material-icon/outline/ExpandCircleDownIcon.d.ts +3 -0
  165. package/dist/esm/types/icons/material-icon/outline/ExpandCircleRightIcon.d.ts +3 -0
  166. package/dist/esm/types/icons/material-icon/outline/ExpandCircleUpIcon.d.ts +3 -0
  167. package/dist/esm/types/icons/material-icon/outline/ExpandContentIcon.d.ts +3 -0
  168. package/dist/esm/types/icons/material-icon/outline/InterestsIcon.d.ts +3 -0
  169. package/dist/esm/types/icons/material-icon/outline/SaveIcon.d.ts +3 -0
  170. package/dist/esm/types/icons/material-icon/outline/TableChartIcon.d.ts +3 -0
  171. package/dist/esm/types/icons/material-icon/outline/index.d.ts +12 -0
  172. package/dist/esm/types/icons/material-icon/solid/ChevronDownIcon.d.ts +3 -0
  173. package/dist/esm/types/icons/material-icon/solid/CollapseContentIcon.d.ts +3 -0
  174. package/dist/esm/types/icons/material-icon/solid/ContentCopyIcon.d.ts +3 -0
  175. package/dist/esm/types/icons/material-icon/solid/ContentPasteIcon.d.ts +3 -0
  176. package/dist/esm/types/icons/material-icon/solid/DataTableIcon.d.ts +3 -0
  177. package/dist/esm/types/icons/material-icon/solid/ExpandCircleDownIcon.d.ts +3 -0
  178. package/dist/esm/types/icons/material-icon/solid/ExpandCircleRightIcon.d.ts +3 -0
  179. package/dist/esm/types/icons/material-icon/solid/ExpandCircleUpIcon.d.ts +3 -0
  180. package/dist/esm/types/icons/material-icon/solid/ExpandContentIcon.d.ts +3 -0
  181. package/dist/esm/types/icons/material-icon/solid/InterestsIcon.d.ts +3 -0
  182. package/dist/esm/types/icons/material-icon/solid/SaveIcon.d.ts +3 -0
  183. package/dist/esm/types/icons/material-icon/solid/TableChartIcon.d.ts +3 -0
  184. package/dist/esm/types/icons/material-icon/solid/index.d.ts +12 -0
  185. package/dist/esm/types/icons/materialIconConfig.d.ts +1 -0
  186. package/dist/esm/types/icons/type.d.ts +8 -0
  187. package/dist/esm/types/icons/utils.d.ts +1 -0
  188. package/dist/esm/types/index.d.ts +4 -0
  189. package/dist/icons/heroIconConfig.js +13 -0
  190. package/dist/icons/iconConfig.js +2 -0
  191. package/dist/icons/iconRegistry.js +47 -0
  192. package/dist/icons/index.js +1 -0
  193. package/dist/icons/material-icon/outline/ChevronDownIcon.js +3 -0
  194. package/dist/icons/material-icon/outline/CollapseContentIcon.js +3 -0
  195. package/dist/icons/material-icon/outline/ContentCopyIcon.js +3 -0
  196. package/dist/icons/material-icon/outline/ContentPasteIcon.js +3 -0
  197. package/dist/icons/material-icon/outline/DataTableIcon.js +3 -0
  198. package/dist/icons/material-icon/outline/ExpandCircleDownIcon.js +3 -0
  199. package/dist/icons/material-icon/outline/ExpandCircleRightIcon.js +3 -0
  200. package/dist/icons/material-icon/outline/ExpandCircleUpIcon.js +3 -0
  201. package/dist/icons/material-icon/outline/ExpandContentIcon.js +3 -0
  202. package/dist/icons/material-icon/outline/InterestsIcon.js +3 -0
  203. package/dist/icons/material-icon/outline/SaveIcon.js +3 -0
  204. package/dist/icons/material-icon/outline/TableChartIcon.js +3 -0
  205. package/dist/icons/material-icon/outline/index.js +12 -0
  206. package/dist/icons/material-icon/solid/ChevronDownIcon.js +3 -0
  207. package/dist/icons/material-icon/solid/CollapseContentIcon.js +3 -0
  208. package/dist/icons/material-icon/solid/ContentCopyIcon.js +3 -0
  209. package/dist/icons/material-icon/solid/ContentPasteIcon.js +3 -0
  210. package/dist/icons/material-icon/solid/DataTableIcon.js +3 -0
  211. package/dist/icons/material-icon/solid/ExpandCircleDownIcon.js +3 -0
  212. package/dist/icons/material-icon/solid/ExpandCircleRightIcon.js +3 -0
  213. package/dist/icons/material-icon/solid/ExpandCircleUpIcon.js +3 -0
  214. package/dist/icons/material-icon/solid/ExpandContentIcon.js +3 -0
  215. package/dist/icons/material-icon/solid/InterestsIcon.js +3 -0
  216. package/dist/icons/material-icon/solid/SaveIcon.js +3 -0
  217. package/dist/icons/material-icon/solid/TableChartIcon.js +3 -0
  218. package/dist/icons/material-icon/solid/index.js +12 -0
  219. package/dist/icons/materialIconConfig.js +13 -0
  220. package/dist/icons/type.js +1 -0
  221. package/dist/icons/utils.js +6 -0
  222. package/dist/index.d.ts +30 -4
  223. package/dist/index.js +4 -0
  224. package/dist/src/theme/global.css +187 -619
  225. package/dist/stories/ColorGroupPreview.js +6 -9
  226. package/dist/stories/ColorPreview.js +1 -2
  227. package/dist/theme/presets/colors.js +2 -1
  228. package/dist/utils/cn.js +1 -5
  229. package/dist/utils/datetime.js +12 -12
  230. package/package.json +3 -1
  231. package/src/components/ActionButton/ActionButton.stories.tsx +32 -13
  232. package/src/components/ActionButton/ActionButton.styles.ts +33 -8
  233. package/src/components/DataTable/DataTable.tsx +2 -2
  234. package/src/components/Icon/Icon.stories.tsx +450 -0
  235. package/src/components/Icon/Icon.styles.ts +26 -0
  236. package/src/components/Icon/Icon.tsx +67 -0
  237. package/src/components/Slider/Slider.stories.tsx +47 -0
  238. package/src/components/Slider/Slider.tsx +32 -0
  239. package/src/components/Switch/Switch.stories.tsx +46 -0
  240. package/src/components/Switch/Switch.tsx +32 -0
  241. package/src/components/Table/Table.tsx +2 -2
  242. package/src/components/Tabs/Tabs.tsx +99 -12
  243. package/src/icons/heroIconConfig.ts +23 -0
  244. package/src/icons/iconConfig.ts +2 -0
  245. package/src/icons/iconRegistry.ts +76 -0
  246. package/src/icons/index.ts +1 -0
  247. package/src/icons/material-icon/outline/ChevronDownIcon.tsx +22 -0
  248. package/src/icons/material-icon/outline/CollapseContentIcon.tsx +20 -0
  249. package/src/icons/material-icon/outline/ContentCopyIcon.tsx +20 -0
  250. package/src/icons/material-icon/outline/ContentPasteIcon.tsx +20 -0
  251. package/src/icons/material-icon/outline/DataTableIcon.tsx +20 -0
  252. package/src/icons/material-icon/outline/ExpandCircleDownIcon.tsx +20 -0
  253. package/src/icons/material-icon/outline/ExpandCircleRightIcon.tsx +20 -0
  254. package/src/icons/material-icon/outline/ExpandCircleUpIcon.tsx +20 -0
  255. package/src/icons/material-icon/outline/ExpandContentIcon.tsx +20 -0
  256. package/src/icons/material-icon/outline/InterestsIcon.tsx +20 -0
  257. package/src/icons/material-icon/outline/SaveIcon.tsx +20 -0
  258. package/src/icons/material-icon/outline/TableChartIcon.tsx +20 -0
  259. package/src/icons/material-icon/outline/index.ts +12 -0
  260. package/src/icons/material-icon/solid/ChevronDownIcon.tsx +22 -0
  261. package/src/icons/material-icon/solid/CollapseContentIcon.tsx +20 -0
  262. package/src/icons/material-icon/solid/ContentCopyIcon.tsx +20 -0
  263. package/src/icons/material-icon/solid/ContentPasteIcon.tsx +20 -0
  264. package/src/icons/material-icon/solid/DataTableIcon.tsx +20 -0
  265. package/src/icons/material-icon/solid/ExpandCircleDownIcon.tsx +20 -0
  266. package/src/icons/material-icon/solid/ExpandCircleRightIcon.tsx +20 -0
  267. package/src/icons/material-icon/solid/ExpandCircleUpIcon.tsx +20 -0
  268. package/src/icons/material-icon/solid/ExpandContentIcon.tsx +20 -0
  269. package/src/icons/material-icon/solid/InterestsIcon.tsx +20 -0
  270. package/src/icons/material-icon/solid/SaveIcon.tsx +20 -0
  271. package/src/icons/material-icon/solid/TableChartIcon.tsx +20 -0
  272. package/src/icons/material-icon/solid/index.ts +12 -0
  273. package/src/icons/materialIconConfig.tsx +23 -0
  274. package/src/icons/type.ts +11 -0
  275. package/src/icons/utils.ts +6 -0
  276. package/src/index.ts +5 -0
  277. package/src/theme/presets/colors.js +2 -1
  278. package/dist/cjs/types/components/ActionButton/ActionButton.styles copy.d.ts +0 -6
  279. package/dist/cjs/types/components/Button/Button.styles copy.d.ts +0 -7
  280. package/dist/components/ActionButton/ActionButton.styles copy.js +0 -90
  281. package/dist/components/Button/Button.styles copy.js +0 -210
  282. package/dist/esm/types/components/ActionButton/ActionButton.styles copy.d.ts +0 -6
  283. package/dist/esm/types/components/Button/Button.styles copy.d.ts +0 -7
  284. package/src/_theme/global copy.css +0 -761
  285. package/src/_theme/global.css +0 -39
  286. package/src/_theme/main-preset.js +0 -239
  287. package/src/_theme/plugins/utilities/typography.js +0 -81
  288. package/src/_theme/presets/colors copy 2.js +0 -319
  289. package/src/_theme/presets/colors copy.js +0 -229
  290. package/src/_theme/presets/colors.js +0 -94
  291. package/src/_theme/theme.d.ts +0 -69
  292. package/src/_theme/variables/base/button.css +0 -334
  293. package/src/_theme/variables/base/components copy.css +0 -19
  294. package/src/_theme/variables/default/colors.css +0 -292
  295. package/src/_theme/variables/default/typography.css +0 -178
  296. package/src/_theme/variables/xspector/colors.css +0 -468
  297. package/src/_theme/variables/xspector/typography.css +0 -178
  298. package/src/components/ActionButton/ActionButton.styles copy.ts +0 -95
  299. package/src/components/Button/Button.styles copy.ts +0 -214
@@ -1,55 +1,8 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
13
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
14
- return new (P || (P = Promise))(function (resolve, reject) {
15
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
16
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
17
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
18
- step((generator = generator.apply(thisArg, _arguments || [])).next());
19
- });
20
- };
21
- var __generator = (this && this.__generator) || function (thisArg, body) {
22
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
23
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
24
- function verb(n) { return function (v) { return step([n, v]); }; }
25
- function step(op) {
26
- if (f) throw new TypeError("Generator is already executing.");
27
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
28
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
29
- if (y = 0, t) op = [op[0] & 2, t.value];
30
- switch (op[0]) {
31
- case 0: case 1: t = op; break;
32
- case 4: _.label++; return { value: op[1], done: false };
33
- case 5: _.label++; y = op[1]; op = [0]; continue;
34
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
35
- default:
36
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
37
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
38
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
39
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
40
- if (t[2]) _.ops.pop();
41
- _.trys.pop(); continue;
42
- }
43
- op = body.call(thisArg, _);
44
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
45
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
46
- }
47
- };
48
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
49
2
  // src/Form.tsx
50
3
  import { useState } from "react";
51
4
  import * as yup from "yup";
52
- var schema = yup.object().shape({
5
+ const schema = yup.object().shape({
53
6
  name: yup.string().required("Name is required"),
54
7
  email: yup.string().email("Invalid email").required("Email is required"),
55
8
  password: yup
@@ -57,50 +10,36 @@ var schema = yup.object().shape({
57
10
  .min(6, "Password must be at least 6 characters")
58
11
  .required("Password is required"),
59
12
  });
60
- var Form = function (_a) {
61
- var onSubmit = _a.onSubmit, _b = _a.className, className = _b === void 0 ? "" : _b;
62
- var _c = useState({
13
+ const Form = ({ onSubmit, className = "" }) => {
14
+ const [values, setValues] = useState({
63
15
  name: "",
64
16
  email: "",
65
17
  password: "",
66
- }), values = _c[0], setValues = _c[1];
67
- var _d = useState({}), errors = _d[0], setErrors = _d[1];
68
- var handleChange = function (e) {
69
- var _a;
70
- var _b = e.target, name = _b.name, value = _b.value;
71
- setValues(__assign(__assign({}, values), (_a = {}, _a[name] = value, _a)));
18
+ });
19
+ const [errors, setErrors] = useState({});
20
+ const handleChange = (e) => {
21
+ const { name, value } = e.target;
22
+ setValues(Object.assign(Object.assign({}, values), { [name]: value }));
72
23
  };
73
- var handleSubmit = function (e) { return __awaiter(void 0, void 0, void 0, function () {
74
- var err_1, validationErrors_1;
75
- return __generator(this, function (_a) {
76
- switch (_a.label) {
77
- case 0:
78
- e.preventDefault();
79
- _a.label = 1;
80
- case 1:
81
- _a.trys.push([1, 3, , 4]);
82
- return [4 /*yield*/, schema.validate(values, { abortEarly: false })];
83
- case 2:
84
- _a.sent();
85
- setErrors({});
86
- onSubmit(values);
87
- return [3 /*break*/, 4];
88
- case 3:
89
- err_1 = _a.sent();
90
- if (err_1 instanceof yup.ValidationError) {
91
- validationErrors_1 = {};
92
- err_1.inner.forEach(function (error) {
93
- if (error.path) {
94
- validationErrors_1[error.path] = error.message;
95
- }
96
- });
97
- setErrors(validationErrors_1);
24
+ const handleSubmit = async (e) => {
25
+ e.preventDefault();
26
+ try {
27
+ await schema.validate(values, { abortEarly: false });
28
+ setErrors({});
29
+ onSubmit(values);
30
+ }
31
+ catch (err) {
32
+ if (err instanceof yup.ValidationError) {
33
+ const validationErrors = {};
34
+ err.inner.forEach((error) => {
35
+ if (error.path) {
36
+ validationErrors[error.path] = error.message;
98
37
  }
99
- return [3 /*break*/, 4];
100
- case 4: return [2 /*return*/];
38
+ });
39
+ setErrors(validationErrors);
101
40
  }
102
- });
103
- }); };
104
- return (_jsxs("form", { className: "form ".concat(className), onSubmit: handleSubmit, children: [_jsxs("div", { className: "form-group", children: [_jsx("label", { htmlFor: "name", children: "Name" }), _jsx("input", { id: "name", name: "name", type: "text", value: values.name, onChange: handleChange }), errors.name && _jsx("span", { className: "error", children: errors.name })] }), _jsxs("div", { className: "form-group", children: [_jsx("label", { htmlFor: "email", children: "Email" }), _jsx("input", { id: "email", name: "email", type: "email", value: values.email, onChange: handleChange }), errors.email && _jsx("span", { className: "error", children: errors.email })] }), _jsxs("div", { className: "form-group", children: [_jsx("label", { htmlFor: "password", children: "Password" }), _jsx("input", { id: "password", name: "password", type: "password", value: values.password, onChange: handleChange }), errors.password && _jsx("span", { className: "error", children: errors.password })] }), _jsx("button", { type: "submit", children: "Submit" })] }));
41
+ }
42
+ };
43
+ return (_jsxs("form", { className: `form ${className}`, onSubmit: handleSubmit, children: [_jsxs("div", { className: "form-group", children: [_jsx("label", { htmlFor: "name", children: "Name" }), _jsx("input", { id: "name", name: "name", type: "text", value: values.name, onChange: handleChange }), errors.name && _jsx("span", { className: "error", children: errors.name })] }), _jsxs("div", { className: "form-group", children: [_jsx("label", { htmlFor: "email", children: "Email" }), _jsx("input", { id: "email", name: "email", type: "email", value: values.email, onChange: handleChange }), errors.email && _jsx("span", { className: "error", children: errors.email })] }), _jsxs("div", { className: "form-group", children: [_jsx("label", { htmlFor: "password", children: "Password" }), _jsx("input", { id: "password", name: "password", type: "password", value: values.password, onChange: handleChange }), errors.password && _jsx("span", { className: "error", children: errors.password })] }), _jsx("button", { type: "submit", children: "Submit" })] }));
105
44
  };
106
45
  export default Form;
@@ -1,6 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- var Text = function (_a) {
3
- var children = _a.children, _b = _a.size, size = _b === void 0 ? "medium" : _b, _c = _a.color, color = _c === void 0 ? "black" : _c, _d = _a.className, className = _d === void 0 ? "" : _d;
4
- return (_jsx("span", { className: "text ".concat(size, " ").concat(className), style: { color: color }, children: children }));
2
+ const Text = ({ children, size = "medium", color = "black", className = "", }) => {
3
+ return (_jsx("span", { className: `text ${size} ${className}`, style: { color }, children: children }));
5
4
  };
6
5
  export default Text;
@@ -1,6 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- var TextInput = function (_a) {
3
- var value = _a.value, onChange = _a.onChange, _b = _a.placeholder, placeholder = _b === void 0 ? '' : _b, _c = _a.type, type = _c === void 0 ? 'text' : _c, _d = _a.disabled, disabled = _d === void 0 ? false : _d, _e = _a.className, className = _e === void 0 ? '' : _e;
4
- return (_jsx("input", { className: "text-input ".concat(className), type: type, value: value, onChange: onChange, placeholder: placeholder, disabled: disabled }));
2
+ const TextInput = ({ value, onChange, placeholder = '', type = 'text', disabled = false, className = '', }) => {
3
+ return (_jsx("input", { className: `text-input ${className}`, type: type, value: value, onChange: onChange, placeholder: placeholder, disabled: disabled }));
5
4
  };
6
5
  export default TextInput;
@@ -0,0 +1,37 @@
1
+ "use client";
2
+ var __rest = (this && this.__rest) || function (s, e) {
3
+ var t = {};
4
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
+ t[p] = s[p];
6
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
+ t[p[i]] = s[p[i]];
10
+ }
11
+ return t;
12
+ };
13
+ import { jsx as _jsx } from "react/jsx-runtime";
14
+ import { getIcon } from "@/icons";
15
+ import { cn } from "@/utils/cn";
16
+ import React from "react";
17
+ import { iconVariants } from "./Icon.styles";
18
+ const Icon = (_a) => {
19
+ var { name, type = "heroicons", color = "inherit", variant = "solid", size = "md", className } = _a, props = __rest(_a, ["name", "type", "color", "variant", "size", "className"]);
20
+ const [IconComponent, setIconComponent] = React.useState(null);
21
+ React.useEffect(() => {
22
+ const loadIcon = async () => {
23
+ const icon = getIcon(type, name, variant);
24
+ if (icon) {
25
+ setIconComponent(() => icon);
26
+ }
27
+ else {
28
+ console.warn(`Icon "${name}" from "${type}" not found.`);
29
+ }
30
+ };
31
+ loadIcon();
32
+ }, [name, type, variant]);
33
+ if (!IconComponent)
34
+ return (_jsx("svg", Object.assign({ className: cn(iconVariants({ color, size }), className) }, props)));
35
+ return (_jsx(IconComponent, Object.assign({ className: cn(iconVariants({ color, size }), className) }, props)));
36
+ };
37
+ export default Icon;
@@ -0,0 +1,356 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import Icon from "./Icon";
3
+ const meta = {
4
+ title: "Components/Icon",
5
+ component: Icon,
6
+ tags: ["autodocs"],
7
+ parameters: {
8
+ layout: "fullscreen",
9
+ },
10
+ decorators: [
11
+ (Story) => (_jsx("div", { className: "p-5 flex w-full h-full", children: _jsx(Story, {}) })),
12
+ ],
13
+ };
14
+ export default meta;
15
+ export const Default = {
16
+ args: {
17
+ variant: "outline",
18
+ name: "home",
19
+ },
20
+ render: (args) => {
21
+ const props = Object.assign({}, args);
22
+ return (_jsx("div", { className: "flex flex-row gap-4 w-full", children: _jsx(Icon, Object.assign({ name: "home" }, props)) }));
23
+ },
24
+ };
25
+ export const PreviewHeroIcon = {
26
+ args: {
27
+ // variant: "outline",
28
+ },
29
+ render: (args) => {
30
+ const props = Object.assign({}, args);
31
+ const heroIcons = [
32
+ "arrow-left",
33
+ "arrow-small-left",
34
+ "academic-cap",
35
+ "adjustments-horizontal",
36
+ "adjustments-vertical",
37
+ "archive-box-arrow-down",
38
+ "archive-box",
39
+ "archive-box-xmark",
40
+ "arrow-down-circle",
41
+ "arrow-down",
42
+ "arrow-down-left",
43
+ "arrow-down-on-square",
44
+ "arrow-down-on-square-stack",
45
+ "arrow-down-right",
46
+ "arrow-down-tray",
47
+ "arrow-left-circle",
48
+ "arrow-left-end-on-rectangle",
49
+ "arrow-left",
50
+ "arrow-left-on-rectangle",
51
+ "arrow-left-start-on-rectangle",
52
+ "arrow-long-down",
53
+ "arrow-long-left",
54
+ "arrow-long-right",
55
+ "arrow-long-up",
56
+ "arrow-path",
57
+ "arrow-path-rounded-square",
58
+ "arrow-right-circle",
59
+ "arrow-right-end-on-rectangle",
60
+ "arrow-right",
61
+ "arrow-right-on-rectangle",
62
+ "arrow-right-start-on-rectangle",
63
+ "arrow-small-down",
64
+ "arrow-small-left",
65
+ "arrow-small-right",
66
+ "arrow-small-up",
67
+ "arrow-top-right-on-square",
68
+ "arrow-trending-down",
69
+ "arrow-trending-up",
70
+ "arrow-up-circle",
71
+ "arrow-up",
72
+ "arrow-up-left",
73
+ "arrow-up-on-square",
74
+ "arrow-up-on-square-stack",
75
+ "arrow-up-right",
76
+ "arrow-up-tray",
77
+ "arrow-uturn-down",
78
+ "arrow-uturn-left",
79
+ "arrow-uturn-right",
80
+ "arrow-uturn-up",
81
+ "arrows-pointing-in",
82
+ "arrows-pointing-out",
83
+ "arrows-right-left",
84
+ "arrows-up-down",
85
+ "at-symbol",
86
+ "backspace",
87
+ "backward",
88
+ "banknotes",
89
+ "bars2",
90
+ "bars3-bottom-left",
91
+ "bars3-bottom-right",
92
+ "bars3-center-left",
93
+ "bars3",
94
+ "bars4",
95
+ "bars-arrow-down",
96
+ "bars-arrow-up",
97
+ "battery0",
98
+ "battery100",
99
+ "battery50",
100
+ "beaker",
101
+ "bell-alert",
102
+ "bell",
103
+ "bell-slash",
104
+ "bell-snooze",
105
+ "bolt",
106
+ "bolt-slash",
107
+ "book-open",
108
+ "bookmark",
109
+ "bookmark-slash",
110
+ "bookmark-square",
111
+ "briefcase",
112
+ "bug-ant",
113
+ "building-library",
114
+ "building-office2",
115
+ "building-office",
116
+ "building-storefront",
117
+ "cake",
118
+ "calculator",
119
+ "calendar-days",
120
+ "calendar",
121
+ "camera",
122
+ "chart-bar",
123
+ "chart-bar-square",
124
+ "chart-pie",
125
+ "chat-bubble-bottom-center",
126
+ "chat-bubble-bottom-center-text",
127
+ "chat-bubble-left-ellipsis",
128
+ "chat-bubble-left",
129
+ "chat-bubble-left-right",
130
+ "chat-bubble-oval-left-ellipsis",
131
+ "chat-bubble-oval-left",
132
+ "check-badge",
133
+ "check-circle",
134
+ "check",
135
+ "chevron-double-down",
136
+ "chevron-double-left",
137
+ "chevron-double-right",
138
+ "chevron-double-up",
139
+ "chevron-down",
140
+ "chevron-left",
141
+ "chevron-right",
142
+ "chevron-up-down",
143
+ "chevron-up",
144
+ "circle-stack",
145
+ "clipboard-document-check",
146
+ "clipboard-document",
147
+ "clipboard-document-list",
148
+ "clipboard",
149
+ "clock",
150
+ "cloud-arrow-down",
151
+ "cloud-arrow-up",
152
+ "cloud",
153
+ "code-bracket",
154
+ "code-bracket-square",
155
+ "cog6-tooth",
156
+ "cog8-tooth",
157
+ "cog",
158
+ "command-line",
159
+ "computer-desktop",
160
+ "cpu-chip",
161
+ "credit-card",
162
+ "cube",
163
+ "cube-transparent",
164
+ "currency-bangladeshi",
165
+ "currency-dollar",
166
+ "currency-euro",
167
+ "currency-pound",
168
+ "currency-rupee",
169
+ "currency-yen",
170
+ "cursor-arrow-rays",
171
+ "cursor-arrow-ripple",
172
+ "device-phone-mobile",
173
+ "device-tablet",
174
+ "document-arrow-down",
175
+ "document-arrow-up",
176
+ "document-chart-bar",
177
+ "document-check",
178
+ "document-duplicate",
179
+ "document",
180
+ "document-magnifying-glass",
181
+ "document-minus",
182
+ "document-plus",
183
+ "document-text",
184
+ "ellipsis-horizontal-circle",
185
+ "ellipsis-horizontal",
186
+ "ellipsis-vertical",
187
+ "envelope",
188
+ "envelope-open",
189
+ "exclamation-circle",
190
+ "exclamation-triangle",
191
+ "eye-dropper",
192
+ "eye",
193
+ "eye-slash",
194
+ "face-frown",
195
+ "face-smile",
196
+ "film",
197
+ "finger-print",
198
+ "fire",
199
+ "flag",
200
+ "folder-arrow-down",
201
+ "folder",
202
+ "folder-minus",
203
+ "folder-open",
204
+ "folder-plus",
205
+ "forward",
206
+ "funnel",
207
+ "gif",
208
+ "gift",
209
+ "gift-top",
210
+ "globe-alt",
211
+ "globe-americas",
212
+ "globe-asia-australia",
213
+ "globe-europe-africa",
214
+ "hand-raised",
215
+ "hand-thumb-down",
216
+ "hand-thumb-up",
217
+ "hashtag",
218
+ "heart",
219
+ "home",
220
+ "home-modern",
221
+ "identification",
222
+ "inbox-arrow-down",
223
+ "inbox",
224
+ "inbox-stack",
225
+ "information-circle",
226
+ "key",
227
+ "language",
228
+ "lifebuoy",
229
+ "light-bulb",
230
+ "link",
231
+ "list-bullet",
232
+ "lock-closed",
233
+ "lock-open",
234
+ "magnifying-glass-circle",
235
+ "magnifying-glass",
236
+ "magnifying-glass-minus",
237
+ "magnifying-glass-plus",
238
+ "map",
239
+ "map-pin",
240
+ "megaphone",
241
+ "microphone",
242
+ "minus-circle",
243
+ "minus",
244
+ "minus-small",
245
+ "moon",
246
+ "musical-note",
247
+ "newspaper",
248
+ "no-symbol",
249
+ "paint-brush",
250
+ "paper-airplane",
251
+ "paper-clip",
252
+ "pause-circle",
253
+ "pause",
254
+ "pencil",
255
+ "pencil-square",
256
+ "phone-arrow-down-left",
257
+ "phone-arrow-up-right",
258
+ "phone",
259
+ "phone-xmark",
260
+ "photo",
261
+ "play-circle",
262
+ "play",
263
+ "play-pause",
264
+ "plus-circle",
265
+ "plus",
266
+ "plus-small",
267
+ "power",
268
+ "presentation-chart-bar",
269
+ "presentation-chart-line",
270
+ "printer",
271
+ "puzzle-piece",
272
+ "qr-code",
273
+ "question-mark-circle",
274
+ "queue-list",
275
+ "radio",
276
+ "receipt-percent",
277
+ "receipt-refund",
278
+ "rectangle-group",
279
+ "rectangle-stack",
280
+ "rocket-launch",
281
+ "rss",
282
+ "scale",
283
+ "scissors",
284
+ "server",
285
+ "server-stack",
286
+ "share",
287
+ "shield-check",
288
+ "shield-exclamation",
289
+ "shopping-bag",
290
+ "shopping-cart",
291
+ "signal",
292
+ "signal-slash",
293
+ "sparkles",
294
+ "speaker-wave",
295
+ "speaker-xmark",
296
+ "square2-stack",
297
+ "square3-stack3-dicon",
298
+ "squares2-x2",
299
+ "squares-plus",
300
+ "star",
301
+ "stop-circle",
302
+ "stop",
303
+ "sun",
304
+ "swatch",
305
+ "table-cells",
306
+ "tag",
307
+ "ticket",
308
+ "trash",
309
+ "trophy",
310
+ "truck",
311
+ "tv",
312
+ "user-circle",
313
+ "user-group",
314
+ "user",
315
+ "user-minus",
316
+ "user-plus",
317
+ "users",
318
+ "variable",
319
+ "video-camera",
320
+ "video-camera-slash",
321
+ "view-columns",
322
+ "viewfinder-circle",
323
+ "wallet",
324
+ "wifi",
325
+ "window",
326
+ "wrench",
327
+ "wrench-screwdriver",
328
+ "xcircle",
329
+ "xmark",
330
+ ];
331
+ return (_jsx("div", { className: "grid grid-cols-1 gap-4 w-full h-full", children: _jsxs("div", { className: "flex flex-col justify-start gap-4 w-full h-full", children: [_jsx("h4", { children: "Hero icons" }), heroIcons.map((iconName) => (_jsxs("div", { className: "flex flex-row gap-6 items-center", children: [_jsx(Icon, Object.assign({}, props, { name: iconName, variant: "solid", size: "sm" })), _jsx(Icon, Object.assign({}, props, { name: iconName, variant: "outline", size: "sm" })), _jsx(Icon, Object.assign({}, props, { name: iconName, variant: "outline", size: "md" })), _jsx(Icon, Object.assign({}, props, { name: iconName, variant: "solid", size: "md" })), _jsx(Icon, Object.assign({}, props, { name: iconName, variant: "outline", size: "lg" })), _jsx(Icon, Object.assign({}, props, { name: iconName, variant: "solid", size: "lg" })), _jsx("p", { className: "ml-4", children: iconName })] }, iconName)))] }) }));
332
+ },
333
+ };
334
+ export const PreviewMaterialIcon = {
335
+ args: {
336
+ // variant: "outline",
337
+ },
338
+ render: (args) => {
339
+ const props = Object.assign({}, args);
340
+ const materialIcon = [
341
+ "chevron-down",
342
+ "save",
343
+ "data-table",
344
+ "table-chart",
345
+ "interests",
346
+ "collapse-content",
347
+ "expand-content",
348
+ "expand-circle-right",
349
+ "expand-circle-down",
350
+ "expand-circle-up",
351
+ "content-copy",
352
+ "content-paste",
353
+ ];
354
+ return (_jsx("div", { className: "grid grid-cols-1 gap-4 w-full h-full", children: _jsxs("div", { className: "flex flex-col justify-start gap-4 w-full h-full", children: [_jsx("h4", { children: "Material icons" }), materialIcon.map((iconName) => (_jsxs("div", { className: "flex flex-row gap-6 items-center", children: [_jsx(Icon, Object.assign({}, props, { type: "material", name: iconName, variant: "solid", size: "sm" })), _jsx(Icon, Object.assign({}, props, { type: "material", name: iconName, variant: "outline", size: "sm" })), _jsx(Icon, Object.assign({}, props, { type: "material", name: iconName, variant: "outline", size: "md" })), _jsx(Icon, Object.assign({}, props, { type: "material", name: iconName, variant: "solid", size: "md" })), _jsx(Icon, Object.assign({}, props, { type: "material", name: iconName, variant: "outline", size: "lg" })), _jsx(Icon, Object.assign({}, props, { type: "material", name: iconName, variant: "solid", size: "lg" })), _jsx("p", { className: "ml-4", children: iconName })] }, iconName)))] }) }));
355
+ },
356
+ };
@@ -0,0 +1,25 @@
1
+ import { cva } from "class-variance-authority";
2
+ export const iconVariants = cva(["text-inherit"], {
3
+ variants: {
4
+ color: {
5
+ primary: "text-primary",
6
+ secondary: "text-secondary",
7
+ tertiary: "text-tertiary",
8
+ success: "text-success",
9
+ info: "text-info",
10
+ warning: "text-warning",
11
+ error: "text-error",
12
+ inherit: "text-inherit",
13
+ },
14
+ size: {
15
+ sm: "size-4",
16
+ md: "size-6",
17
+ lg: "size-8",
18
+ inherit: "",
19
+ },
20
+ },
21
+ defaultVariants: {
22
+ size: "inherit",
23
+ color: "inherit",
24
+ },
25
+ });
@@ -1,14 +1,3 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
1
  var __rest = (this && this.__rest) || function (s, e) {
13
2
  var t = {};
14
3
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
@@ -24,15 +13,15 @@ import { jsx as _jsx } from "react/jsx-runtime";
24
13
  import { forwardRef } from "react";
25
14
  import { cn } from "@/utils/cn";
26
15
  import { inputVariants } from "./Input.styles";
27
- var Input = forwardRef(function (_a, ref) {
28
- var className = _a.className, _b = _a.type, type = _b === void 0 ? "text" : _b, _c = _a.size, size = _c === void 0 ? "md" : _c, _d = _a.variant, variant = _d === void 0 ? "outline" : _d, _e = _a.fullwidth, fullwidth = _e === void 0 ? false : _e, _f = _a.disabled, disabled = _f === void 0 ? false : _f, _g = _a.error, error = _g === void 0 ? false : _g, _h = _a.required, required = _h === void 0 ? false : _h, _j = _a.hiddenPlaceholder, hiddenPlaceholder = _j === void 0 ? false : _j, props = __rest(_a, ["className", "type", "size", "variant", "fullwidth", "disabled", "error", "required", "hiddenPlaceholder"]);
29
- return (_jsx("input", __assign({ type: type, className: cn(inputVariants({
30
- size: size,
31
- variant: variant,
32
- fullwidth: fullwidth,
33
- error: error,
34
- hiddenPlaceholder: hiddenPlaceholder,
35
- disabled: disabled,
16
+ const Input = forwardRef((_a, ref) => {
17
+ var { className, type = "text", size = "md", variant = "outline", fullwidth = false, disabled = false, error = false, required = false, hiddenPlaceholder = false } = _a, props = __rest(_a, ["className", "type", "size", "variant", "fullwidth", "disabled", "error", "required", "hiddenPlaceholder"]);
18
+ return (_jsx("input", Object.assign({ type: type, className: cn(inputVariants({
19
+ size,
20
+ variant,
21
+ fullwidth,
22
+ error,
23
+ hiddenPlaceholder,
24
+ disabled,
36
25
  }), className), ref: ref, disabled: disabled }, props)));
37
26
  });
38
27
  Input.displayName = "Input";
@@ -1,17 +1,6 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
2
  import { Input } from "./Input";
14
- var meta = {
3
+ const meta = {
15
4
  title: "Components/Input",
16
5
  component: Input,
17
6
  tags: ["autodocs"],
@@ -19,18 +8,18 @@ var meta = {
19
8
  layout: "fullscreen",
20
9
  },
21
10
  decorators: [
22
- function (Story) { return (_jsx("div", { className: "p-5 flex w-full ", children: _jsx(Story, {}) })); },
11
+ (Story) => (_jsx("div", { className: "p-5 flex w-full ", children: _jsx(Story, {}) })),
23
12
  ],
24
13
  };
25
14
  export default meta;
26
- export var Default = {
15
+ export const Default = {
27
16
  args: {
28
17
  // disabled: true,
29
18
  // value: "Aaaaa",
30
19
  },
31
- render: function (args) {
20
+ render: (args) => {
32
21
  console.log("args ", args);
33
- var props = __assign({}, args);
34
- return (_jsxs("div", { className: "flex flex-row gap-4", children: [_jsx(Input, __assign({ id: "1", size: "lg", placeholder: "Email" }, args)), _jsx(Input, __assign({ id: "2", size: "md", placeholder: "Email" }, args)), _jsx(Input, __assign({ id: "3", size: "sm", placeholder: "Email" }, args))] }));
22
+ const props = Object.assign({}, args);
23
+ return (_jsxs("div", { className: "flex flex-row gap-4", children: [_jsx(Input, Object.assign({ id: "1", size: "lg", placeholder: "Email" }, args)), _jsx(Input, Object.assign({ id: "2", size: "md", placeholder: "Email" }, args)), _jsx(Input, Object.assign({ id: "3", size: "sm", placeholder: "Email" }, args))] }));
35
24
  },
36
25
  };