@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
@@ -0,0 +1,450 @@
1
+ import React from "react";
2
+ import type { Meta, StoryObj } from "@storybook/react";
3
+ import Icon from "./Icon";
4
+
5
+ const meta = {
6
+ title: "Components/Icon",
7
+ component: Icon,
8
+ tags: ["autodocs"],
9
+ parameters: {
10
+ layout: "fullscreen",
11
+ },
12
+ decorators: [
13
+ (Story) => (
14
+ <div className="p-5 flex w-full h-full">
15
+ <Story />
16
+ </div>
17
+ ),
18
+ ],
19
+ } satisfies Meta<typeof Icon>;
20
+
21
+ export default meta;
22
+
23
+ export const Default = {
24
+ args: {
25
+ variant: "outline",
26
+ name: "home",
27
+ },
28
+ render: (args) => {
29
+ const props: typeof args = {
30
+ ...args,
31
+ };
32
+
33
+ return (
34
+ <div className="flex flex-row gap-4 w-full">
35
+ <Icon name="home" {...props} />
36
+ </div>
37
+ );
38
+ },
39
+ } satisfies StoryObj;
40
+
41
+ export const PreviewHeroIcon = {
42
+ args: {
43
+ // variant: "outline",
44
+ },
45
+ render: (args) => {
46
+ const props: typeof args = {
47
+ ...args,
48
+ };
49
+ const heroIcons = [
50
+ "arrow-left",
51
+ "arrow-small-left",
52
+ "academic-cap",
53
+ "adjustments-horizontal",
54
+ "adjustments-vertical",
55
+ "archive-box-arrow-down",
56
+ "archive-box",
57
+ "archive-box-xmark",
58
+ "arrow-down-circle",
59
+ "arrow-down",
60
+ "arrow-down-left",
61
+ "arrow-down-on-square",
62
+ "arrow-down-on-square-stack",
63
+ "arrow-down-right",
64
+ "arrow-down-tray",
65
+ "arrow-left-circle",
66
+ "arrow-left-end-on-rectangle",
67
+ "arrow-left",
68
+ "arrow-left-on-rectangle",
69
+ "arrow-left-start-on-rectangle",
70
+ "arrow-long-down",
71
+ "arrow-long-left",
72
+ "arrow-long-right",
73
+ "arrow-long-up",
74
+ "arrow-path",
75
+ "arrow-path-rounded-square",
76
+ "arrow-right-circle",
77
+ "arrow-right-end-on-rectangle",
78
+ "arrow-right",
79
+ "arrow-right-on-rectangle",
80
+ "arrow-right-start-on-rectangle",
81
+ "arrow-small-down",
82
+ "arrow-small-left",
83
+ "arrow-small-right",
84
+ "arrow-small-up",
85
+ "arrow-top-right-on-square",
86
+ "arrow-trending-down",
87
+ "arrow-trending-up",
88
+ "arrow-up-circle",
89
+ "arrow-up",
90
+ "arrow-up-left",
91
+ "arrow-up-on-square",
92
+ "arrow-up-on-square-stack",
93
+ "arrow-up-right",
94
+ "arrow-up-tray",
95
+ "arrow-uturn-down",
96
+ "arrow-uturn-left",
97
+ "arrow-uturn-right",
98
+ "arrow-uturn-up",
99
+ "arrows-pointing-in",
100
+ "arrows-pointing-out",
101
+ "arrows-right-left",
102
+ "arrows-up-down",
103
+ "at-symbol",
104
+ "backspace",
105
+ "backward",
106
+ "banknotes",
107
+ "bars2",
108
+ "bars3-bottom-left",
109
+ "bars3-bottom-right",
110
+ "bars3-center-left",
111
+ "bars3",
112
+ "bars4",
113
+ "bars-arrow-down",
114
+ "bars-arrow-up",
115
+ "battery0",
116
+ "battery100",
117
+ "battery50",
118
+ "beaker",
119
+ "bell-alert",
120
+ "bell",
121
+ "bell-slash",
122
+ "bell-snooze",
123
+ "bolt",
124
+ "bolt-slash",
125
+ "book-open",
126
+ "bookmark",
127
+ "bookmark-slash",
128
+ "bookmark-square",
129
+ "briefcase",
130
+ "bug-ant",
131
+ "building-library",
132
+ "building-office2",
133
+ "building-office",
134
+ "building-storefront",
135
+ "cake",
136
+ "calculator",
137
+ "calendar-days",
138
+ "calendar",
139
+ "camera",
140
+ "chart-bar",
141
+ "chart-bar-square",
142
+ "chart-pie",
143
+ "chat-bubble-bottom-center",
144
+ "chat-bubble-bottom-center-text",
145
+ "chat-bubble-left-ellipsis",
146
+ "chat-bubble-left",
147
+ "chat-bubble-left-right",
148
+ "chat-bubble-oval-left-ellipsis",
149
+ "chat-bubble-oval-left",
150
+ "check-badge",
151
+ "check-circle",
152
+ "check",
153
+ "chevron-double-down",
154
+ "chevron-double-left",
155
+ "chevron-double-right",
156
+ "chevron-double-up",
157
+ "chevron-down",
158
+ "chevron-left",
159
+ "chevron-right",
160
+ "chevron-up-down",
161
+ "chevron-up",
162
+ "circle-stack",
163
+ "clipboard-document-check",
164
+ "clipboard-document",
165
+ "clipboard-document-list",
166
+ "clipboard",
167
+ "clock",
168
+ "cloud-arrow-down",
169
+ "cloud-arrow-up",
170
+ "cloud",
171
+ "code-bracket",
172
+ "code-bracket-square",
173
+ "cog6-tooth",
174
+ "cog8-tooth",
175
+ "cog",
176
+ "command-line",
177
+ "computer-desktop",
178
+ "cpu-chip",
179
+ "credit-card",
180
+ "cube",
181
+ "cube-transparent",
182
+ "currency-bangladeshi",
183
+ "currency-dollar",
184
+ "currency-euro",
185
+ "currency-pound",
186
+ "currency-rupee",
187
+ "currency-yen",
188
+ "cursor-arrow-rays",
189
+ "cursor-arrow-ripple",
190
+ "device-phone-mobile",
191
+ "device-tablet",
192
+ "document-arrow-down",
193
+ "document-arrow-up",
194
+ "document-chart-bar",
195
+ "document-check",
196
+ "document-duplicate",
197
+ "document",
198
+ "document-magnifying-glass",
199
+ "document-minus",
200
+ "document-plus",
201
+ "document-text",
202
+ "ellipsis-horizontal-circle",
203
+ "ellipsis-horizontal",
204
+ "ellipsis-vertical",
205
+ "envelope",
206
+ "envelope-open",
207
+ "exclamation-circle",
208
+ "exclamation-triangle",
209
+ "eye-dropper",
210
+ "eye",
211
+ "eye-slash",
212
+ "face-frown",
213
+ "face-smile",
214
+ "film",
215
+ "finger-print",
216
+ "fire",
217
+ "flag",
218
+ "folder-arrow-down",
219
+ "folder",
220
+ "folder-minus",
221
+ "folder-open",
222
+ "folder-plus",
223
+ "forward",
224
+ "funnel",
225
+ "gif",
226
+ "gift",
227
+ "gift-top",
228
+ "globe-alt",
229
+ "globe-americas",
230
+ "globe-asia-australia",
231
+ "globe-europe-africa",
232
+ "hand-raised",
233
+ "hand-thumb-down",
234
+ "hand-thumb-up",
235
+ "hashtag",
236
+ "heart",
237
+ "home",
238
+ "home-modern",
239
+ "identification",
240
+ "inbox-arrow-down",
241
+ "inbox",
242
+ "inbox-stack",
243
+ "information-circle",
244
+ "key",
245
+ "language",
246
+ "lifebuoy",
247
+ "light-bulb",
248
+ "link",
249
+ "list-bullet",
250
+ "lock-closed",
251
+ "lock-open",
252
+ "magnifying-glass-circle",
253
+ "magnifying-glass",
254
+ "magnifying-glass-minus",
255
+ "magnifying-glass-plus",
256
+ "map",
257
+ "map-pin",
258
+ "megaphone",
259
+ "microphone",
260
+ "minus-circle",
261
+ "minus",
262
+ "minus-small",
263
+ "moon",
264
+ "musical-note",
265
+ "newspaper",
266
+ "no-symbol",
267
+ "paint-brush",
268
+ "paper-airplane",
269
+ "paper-clip",
270
+ "pause-circle",
271
+ "pause",
272
+ "pencil",
273
+ "pencil-square",
274
+ "phone-arrow-down-left",
275
+ "phone-arrow-up-right",
276
+ "phone",
277
+ "phone-xmark",
278
+ "photo",
279
+ "play-circle",
280
+ "play",
281
+ "play-pause",
282
+ "plus-circle",
283
+ "plus",
284
+ "plus-small",
285
+ "power",
286
+ "presentation-chart-bar",
287
+ "presentation-chart-line",
288
+ "printer",
289
+ "puzzle-piece",
290
+ "qr-code",
291
+ "question-mark-circle",
292
+ "queue-list",
293
+ "radio",
294
+ "receipt-percent",
295
+ "receipt-refund",
296
+ "rectangle-group",
297
+ "rectangle-stack",
298
+ "rocket-launch",
299
+ "rss",
300
+ "scale",
301
+ "scissors",
302
+ "server",
303
+ "server-stack",
304
+ "share",
305
+ "shield-check",
306
+ "shield-exclamation",
307
+ "shopping-bag",
308
+ "shopping-cart",
309
+ "signal",
310
+ "signal-slash",
311
+ "sparkles",
312
+ "speaker-wave",
313
+ "speaker-xmark",
314
+ "square2-stack",
315
+ "square3-stack3-dicon",
316
+ "squares2-x2",
317
+ "squares-plus",
318
+ "star",
319
+ "stop-circle",
320
+ "stop",
321
+ "sun",
322
+ "swatch",
323
+ "table-cells",
324
+ "tag",
325
+ "ticket",
326
+ "trash",
327
+ "trophy",
328
+ "truck",
329
+ "tv",
330
+ "user-circle",
331
+ "user-group",
332
+ "user",
333
+ "user-minus",
334
+ "user-plus",
335
+ "users",
336
+ "variable",
337
+ "video-camera",
338
+ "video-camera-slash",
339
+ "view-columns",
340
+ "viewfinder-circle",
341
+ "wallet",
342
+ "wifi",
343
+ "window",
344
+ "wrench",
345
+ "wrench-screwdriver",
346
+ "xcircle",
347
+ "xmark",
348
+ ];
349
+
350
+ return (
351
+ <div className="grid grid-cols-1 gap-4 w-full h-full">
352
+ <div className="flex flex-col justify-start gap-4 w-full h-full">
353
+ <h4>Hero icons</h4>
354
+ {heroIcons.map((iconName) => (
355
+ <div key={iconName} className="flex flex-row gap-6 items-center">
356
+ <Icon {...props} name={iconName} variant="solid" size="sm" />
357
+ <Icon {...props} name={iconName} variant="outline" size="sm" />
358
+ <Icon {...props} name={iconName} variant="outline" size="md" />
359
+ <Icon {...props} name={iconName} variant="solid" size="md" />
360
+ <Icon {...props} name={iconName} variant="outline" size="lg" />
361
+ <Icon {...props} name={iconName} variant="solid" size="lg" />
362
+ <p className="ml-4">{iconName}</p>
363
+ </div>
364
+ ))}
365
+ </div>
366
+ </div>
367
+ );
368
+ },
369
+ } satisfies StoryObj;
370
+
371
+ export const PreviewMaterialIcon = {
372
+ args: {
373
+ // variant: "outline",
374
+ },
375
+ render: (args) => {
376
+ const props: typeof args = {
377
+ ...args,
378
+ };
379
+
380
+ const materialIcon = [
381
+ "chevron-down",
382
+ "save",
383
+ "data-table",
384
+ "table-chart",
385
+ "interests",
386
+ "collapse-content",
387
+ "expand-content",
388
+ "expand-circle-right",
389
+ "expand-circle-down",
390
+ "expand-circle-up",
391
+ "content-copy",
392
+ "content-paste",
393
+ ];
394
+
395
+ return (
396
+ <div className="grid grid-cols-1 gap-4 w-full h-full">
397
+ <div className="flex flex-col justify-start gap-4 w-full h-full">
398
+ <h4>Material icons</h4>
399
+ {materialIcon.map((iconName) => (
400
+ <div key={iconName} className="flex flex-row gap-6 items-center">
401
+ <Icon
402
+ {...props}
403
+ type="material"
404
+ name={iconName}
405
+ variant="solid"
406
+ size="sm"
407
+ />
408
+ <Icon
409
+ {...props}
410
+ type="material"
411
+ name={iconName}
412
+ variant="outline"
413
+ size="sm"
414
+ />
415
+ <Icon
416
+ {...props}
417
+ type="material"
418
+ name={iconName}
419
+ variant="outline"
420
+ size="md"
421
+ />
422
+ <Icon
423
+ {...props}
424
+ type="material"
425
+ name={iconName}
426
+ variant="solid"
427
+ size="md"
428
+ />
429
+ <Icon
430
+ {...props}
431
+ type="material"
432
+ name={iconName}
433
+ variant="outline"
434
+ size="lg"
435
+ />
436
+ <Icon
437
+ {...props}
438
+ type="material"
439
+ name={iconName}
440
+ variant="solid"
441
+ size="lg"
442
+ />
443
+ <p className="ml-4">{iconName}</p>
444
+ </div>
445
+ ))}
446
+ </div>
447
+ </div>
448
+ );
449
+ },
450
+ } satisfies StoryObj;
@@ -0,0 +1,26 @@
1
+ import { cva } from "class-variance-authority";
2
+
3
+ export const iconVariants = cva(["text-inherit"], {
4
+ variants: {
5
+ color: {
6
+ primary: "text-primary",
7
+ secondary: "text-secondary",
8
+ tertiary: "text-tertiary",
9
+ success: "text-success",
10
+ info: "text-info",
11
+ warning: "text-warning",
12
+ error: "text-error",
13
+ inherit: "text-inherit",
14
+ },
15
+ size: {
16
+ sm: "size-4",
17
+ md: "size-6",
18
+ lg: "size-8",
19
+ inherit: "",
20
+ },
21
+ },
22
+ defaultVariants: {
23
+ size: "inherit",
24
+ color: "inherit",
25
+ },
26
+ });
@@ -0,0 +1,67 @@
1
+ "use client";
2
+
3
+ import { getIcon } from "@/icons";
4
+ import { cn } from "@/utils/cn";
5
+ import React from "react";
6
+ import { iconVariants } from "./Icon.styles";
7
+
8
+ export type IconProps = {
9
+ name: string;
10
+ type?: "heroicons" | "material" | "custom";
11
+ color?:
12
+ | "primary"
13
+ | "secondary"
14
+ | "success"
15
+ | "tertiary"
16
+ | "info"
17
+ | "warning"
18
+ | "error"
19
+ | "inherit";
20
+ variant?: "solid" | "outline";
21
+ size?: "sm" | "md" | "lg" | "inherit";
22
+ className?: string;
23
+ } & React.SVGProps<SVGSVGElement>;
24
+
25
+ const Icon: React.FC<IconProps> = ({
26
+ name,
27
+ type = "heroicons",
28
+ color = "inherit",
29
+ variant = "solid",
30
+ size = "md",
31
+ className,
32
+ ...props
33
+ }) => {
34
+ const [IconComponent, setIconComponent] = React.useState<React.ComponentType<
35
+ React.SVGProps<SVGSVGElement>
36
+ > | null>(null);
37
+
38
+ React.useEffect(() => {
39
+ const loadIcon = async () => {
40
+ const icon = getIcon(type, name, variant);
41
+ if (icon) {
42
+ setIconComponent(() => icon);
43
+ } else {
44
+ console.warn(`Icon "${name}" from "${type}" not found.`);
45
+ }
46
+ };
47
+
48
+ loadIcon();
49
+ }, [name, type, variant]);
50
+
51
+ if (!IconComponent)
52
+ return (
53
+ <svg
54
+ className={cn(iconVariants({ color, size }), className)}
55
+ {...props}
56
+ />
57
+ );
58
+
59
+ return (
60
+ <IconComponent
61
+ className={cn(iconVariants({ color, size }), className)}
62
+ {...props}
63
+ />
64
+ );
65
+ };
66
+
67
+ export default Icon;
@@ -0,0 +1,47 @@
1
+ import React from "react";
2
+ import type { Meta, StoryObj } from "@storybook/react";
3
+ import { Slider } from "./Slider";
4
+
5
+ // More on how to set up stories at: https://storybook.js.org/docs/7.0/react/writing-stories/introduction
6
+ const meta = {
7
+ title: "Components/Slider",
8
+ component: Slider,
9
+ tags: ["autodocs"],
10
+ parameters: {
11
+ // More on how to position stories at: https://storybook.js.org/docs/7.0/react/configure/story-layout
12
+ layout: "fullscreen",
13
+ },
14
+ decorators: [
15
+ (Story) => (
16
+ <div className="p-5 flex w-full">
17
+ <Story />
18
+ </div>
19
+ ),
20
+ ],
21
+ } satisfies Meta<typeof Slider>;
22
+
23
+ export default meta;
24
+
25
+ export const Default = {
26
+ args: {
27
+ defaultValue: [50],
28
+ max: 100,
29
+ step: 1,
30
+ name: "test",
31
+ minStepsBetweenThumbs: 1,
32
+ // orientation: "horizontal", // "horizontal" | "vertical" | undefined,
33
+ disabled: false,
34
+ inverted: false,
35
+ },
36
+ render: (args) => {
37
+ console.log("args ", args);
38
+ const props: typeof args = {
39
+ ...args,
40
+ };
41
+ return (
42
+ <div className="flex flex-row gap-4 w-full">
43
+ <Slider defaultValue={[50]} max={100} step={1} {...props} />
44
+ </div>
45
+ );
46
+ },
47
+ } satisfies StoryObj;
@@ -0,0 +1,32 @@
1
+ "use client";
2
+
3
+ import * as React from "react";
4
+ import * as SliderPrimitive from "@radix-ui/react-slider";
5
+
6
+ import { cn } from "@/utils/cn";
7
+ import ActionButton from "../ActionButton/ActionButton";
8
+
9
+ const Slider = React.forwardRef<
10
+ React.ElementRef<typeof SliderPrimitive.Root>,
11
+ React.ComponentPropsWithoutRef<typeof SliderPrimitive.Root>
12
+ >(({ className, ...props }, ref) => (
13
+ <SliderPrimitive.Root
14
+ ref={ref}
15
+ className={cn(
16
+ "relative flex w-full touch-none select-none items-center",
17
+ className
18
+ )}
19
+ {...props}
20
+ >
21
+ <SliderPrimitive.Track className="relative h-2 w-full grow overflow-hidden rounded-full bg-grey-50">
22
+ <SliderPrimitive.Range className="absolute h-full bg-primary" />
23
+ </SliderPrimitive.Track>
24
+ {/* <SliderPrimitive.Thumb className="block cursor-pointer h-5 w-5 rounded-full border-[3px] border-primary bg-background ring-offset-background ring-primary transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50" /> */}
25
+ <SliderPrimitive.Thumb className="block cursor-pointer h-5 w-5 rounded-full border-[3px] border-primary bg-background ring-0 outline-none disabled:pointer-events-none disabled:opacity-50" />
26
+ </SliderPrimitive.Root>
27
+ ));
28
+ Slider.displayName = SliderPrimitive.Root.displayName;
29
+
30
+ export type SliderProps = React.ComponentProps<typeof Slider>;
31
+
32
+ export { Slider };
@@ -0,0 +1,46 @@
1
+ import React from "react";
2
+ import type { Meta, StoryObj } from "@storybook/react";
3
+ import { Switch } from "./Switch";
4
+
5
+ // More on how to set up stories at: https://storybook.js.org/docs/7.0/react/writing-stories/introduction
6
+ const meta = {
7
+ title: "Components/Switch",
8
+ component: Switch,
9
+ tags: ["autodocs"],
10
+ parameters: {
11
+ // More on how to position stories at: https://storybook.js.org/docs/7.0/react/configure/story-layout
12
+ layout: "fullscreen",
13
+ },
14
+ decorators: [
15
+ (Story) => (
16
+ <div className="p-5 flex w-full">
17
+ <Story />
18
+ </div>
19
+ ),
20
+ ],
21
+ } satisfies Meta<typeof Switch>;
22
+
23
+ export default meta;
24
+
25
+ export const Default = {
26
+ args: {
27
+ defaultValue: [50],
28
+ max: 100,
29
+ step: 1,
30
+ name: "test",
31
+ minStepsBetweenThumbs: 1,
32
+ disabled: false,
33
+ inverted: false,
34
+ },
35
+ render: (args) => {
36
+ console.log("args ", args);
37
+ const props: typeof args = {
38
+ ...args,
39
+ };
40
+ return (
41
+ <div className="flex flex-row gap-4 w-full">
42
+ <Switch {...props} />
43
+ </div>
44
+ );
45
+ },
46
+ } satisfies StoryObj;
@@ -0,0 +1,32 @@
1
+ "use client";
2
+
3
+ import * as React from "react";
4
+ import * as SwitchPrimitives from "@radix-ui/react-switch";
5
+
6
+ import { cn } from "@/utils/cn";
7
+
8
+ const Switch = React.forwardRef<
9
+ React.ElementRef<typeof SwitchPrimitives.Root>,
10
+ React.ComponentPropsWithoutRef<typeof SwitchPrimitives.Root>
11
+ >(({ className, ...props }, ref) => (
12
+ <SwitchPrimitives.Root
13
+ className={cn(
14
+ "peer inline-flex h-3 w-[32px] shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors",
15
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
16
+ "disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-secondary-active/[0.32] data-[state=unchecked]:bg-tertiary-active/[0.32]",
17
+ className
18
+ )}
19
+ {...props}
20
+ ref={ref}
21
+ >
22
+ <SwitchPrimitives.Thumb
23
+ className={cn(
24
+ "pointer-events-none block size-4 rounded-full bg-secondary-active shadow-lg ring-0",
25
+ "transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:-translate-x-[2px] data-[state=unchecked]:bg-tertiary-active"
26
+ )}
27
+ />
28
+ </SwitchPrimitives.Root>
29
+ ));
30
+ Switch.displayName = SwitchPrimitives.Root.displayName;
31
+
32
+ export { Switch };