@clickhouse/click-ui 0.0.3 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (427) hide show
  1. package/dist/{index.js → click-ui.es.js} +4553 -5052
  2. package/dist/click-ui.umd.js +442 -0
  3. package/package.json +14 -6
  4. package/.eslintrc.cjs +0 -33
  5. package/.github/workflows/deployment.yml +0 -34
  6. package/.prettierrc +0 -14
  7. package/.storybook/main.ts +0 -19
  8. package/.storybook/manager.ts +0 -11
  9. package/.storybook/preview-head.html +0 -2
  10. package/.storybook/preview.tsx +0 -76
  11. package/.storybook/theme.ts +0 -16
  12. package/build-tokens.js +0 -131
  13. package/dist/App.d.ts +0 -2
  14. package/dist/assets/RightArrow/RightArrow.d.ts +0 -1
  15. package/dist/assets/S3Logo/S3Logo.d.ts +0 -1
  16. package/dist/components/Accordion/Accordion.d.ts +0 -27
  17. package/dist/components/Accordion/Accordion.stories.d.ts +0 -21
  18. package/dist/components/Accordion/Accordion.test.d.ts +0 -1
  19. package/dist/components/Alert/Alert.d.ts +0 -16
  20. package/dist/components/Alert/Alert.stories.d.ts +0 -12
  21. package/dist/components/Alert/Alert.test.d.ts +0 -1
  22. package/dist/components/Avatar/Avatar.d.ts +0 -7
  23. package/dist/components/Avatar/Avatar.stories.d.ts +0 -11
  24. package/dist/components/Badge/Badge.d.ts +0 -16
  25. package/dist/components/Badge/Badge.stories.d.ts +0 -34
  26. package/dist/components/Badge/Badge.test.d.ts +0 -1
  27. package/dist/components/BigStat/BigStat.d.ts +0 -10
  28. package/dist/components/BigStat/BigStat.stories.d.ts +0 -20
  29. package/dist/components/Button/Button.d.ts +0 -23
  30. package/dist/components/Button/Button.stories.d.ts +0 -28
  31. package/dist/components/Button/Button.test.d.ts +0 -1
  32. package/dist/components/ButtonGroup/ButtonGroup.d.ts +0 -6
  33. package/dist/components/ButtonGroup/ButtonGroup.stories.d.ts +0 -12
  34. package/dist/components/Card/Card.d.ts +0 -10
  35. package/dist/components/Card/Card.stories.d.ts +0 -16
  36. package/dist/components/Checkbox/Checkbox.d.ts +0 -5
  37. package/dist/components/Checkbox/Checkbox.stories.d.ts +0 -29
  38. package/dist/components/Checkbox/Checkbox.test.d.ts +0 -1
  39. package/dist/components/ContextMenu/ContextMenu.d.ts +0 -38
  40. package/dist/components/ContextMenu/ContextMenu.stories.d.ts +0 -30
  41. package/dist/components/ContextMenu/ContextMenu.test.d.ts +0 -1
  42. package/dist/components/Dropdown/Dropdown.d.ts +0 -38
  43. package/dist/components/Dropdown/Dropdown.stories.d.ts +0 -36
  44. package/dist/components/Dropdown/Dropdown.test.d.ts +0 -1
  45. package/dist/components/FormField/Label.d.ts +0 -7
  46. package/dist/components/FormField/Label.stories.d.ts +0 -28
  47. package/dist/components/FormField/Select.d.ts +0 -43
  48. package/dist/components/FormField/Select.stories.d.ts +0 -54
  49. package/dist/components/FormField/Select.test.d.ts +0 -0
  50. package/dist/components/FormField/SelectContext.d.ts +0 -24
  51. package/dist/components/FormField/commonElement.d.ts +0 -1100
  52. package/dist/components/GenericMenu.d.ts +0 -764
  53. package/dist/components/HoverCard/HoverCard.d.ts +0 -20
  54. package/dist/components/HoverCard/HoverCard.stories.d.ts +0 -36
  55. package/dist/components/HoverCard/HoverCard.test.d.ts +0 -0
  56. package/dist/components/Icon/Icon.d.ts +0 -571
  57. package/dist/components/Icon/Icon.stories.d.ts +0 -495
  58. package/dist/components/Icon/types.d.ts +0 -8
  59. package/dist/components/IconButton/IconButton.d.ts +0 -15
  60. package/dist/components/IconButton/IconButton.stories.d.ts +0 -30
  61. package/dist/components/IconButton/IconButton.test.d.ts +0 -1
  62. package/dist/components/Panel/Panel.d.ts +0 -11
  63. package/dist/components/Panel/Panel.stories.d.ts +0 -23
  64. package/dist/components/Popover/Popover.d.ts +0 -23
  65. package/dist/components/Popover/Popover.stories.d.ts +0 -43
  66. package/dist/components/Popover/Popover.test.d.ts +0 -1
  67. package/dist/components/RadioGroup/RadioGroup.d.ts +0 -17
  68. package/dist/components/RadioGroup/RadioGroup.stories.d.ts +0 -39
  69. package/dist/components/RadioGroup/RadioGroup.test.d.ts +0 -1
  70. package/dist/components/Separator/Separator.d.ts +0 -6
  71. package/dist/components/SidebarNavigationItem/SidebarNavigationItem.d.ts +0 -17
  72. package/dist/components/SidebarNavigationItem/SidebarNavigationItem.stories.d.ts +0 -20
  73. package/dist/components/Spacer/Spacer.d.ts +0 -4
  74. package/dist/components/Spacer/Spacer.stories.d.ts +0 -19
  75. package/dist/components/Switch/Switch.d.ts +0 -7
  76. package/dist/components/Switch/Switch.stories.d.ts +0 -13
  77. package/dist/components/Table/Table.d.ts +0 -568
  78. package/dist/components/Table/Table.stories.d.ts +0 -575
  79. package/dist/components/Tabs/Tabs.d.ts +0 -848
  80. package/dist/components/Tabs/Tabs.stories.d.ts +0 -845
  81. package/dist/components/Tabs/Tabs.test.d.ts +0 -1
  82. package/dist/components/Tooltip/Tooltip.d.ts +0 -17
  83. package/dist/components/Tooltip/Tooltip.stories.d.ts +0 -45
  84. package/dist/components/Tooltip/Tooltip.test.d.ts +0 -1
  85. package/dist/components/Typography/Text/Text.d.ts +0 -12
  86. package/dist/components/Typography/Text/Text.stories.d.ts +0 -22
  87. package/dist/components/Typography/Text/Text.test.d.ts +0 -1
  88. package/dist/components/Typography/Title/Title.d.ts +0 -14
  89. package/dist/components/Typography/Title/Title.stories.d.ts +0 -35
  90. package/dist/components/Typography/Title/Title.test.d.ts +0 -1
  91. package/dist/components/icons/Activity.d.ts +0 -3
  92. package/dist/components/icons/ArrowDown.d.ts +0 -3
  93. package/dist/components/icons/ArrowRight.d.ts +0 -3
  94. package/dist/components/icons/ArrowTriangle.d.ts +0 -3
  95. package/dist/components/icons/ArrowUp.d.ts +0 -3
  96. package/dist/components/icons/Backups.d.ts +0 -3
  97. package/dist/components/icons/Blog.d.ts +0 -3
  98. package/dist/components/icons/Book.d.ts +0 -3
  99. package/dist/components/icons/Brackets.d.ts +0 -3
  100. package/dist/components/icons/Briefcase.d.ts +0 -3
  101. package/dist/components/icons/Building.d.ts +0 -3
  102. package/dist/components/icons/BurgerMenu.d.ts +0 -3
  103. package/dist/components/icons/Cards.d.ts +0 -3
  104. package/dist/components/icons/CellTower.d.ts +0 -3
  105. package/dist/components/icons/ChatIcon.d.ts +0 -3
  106. package/dist/components/icons/CheckIcon.d.ts +0 -3
  107. package/dist/components/icons/CheckInCircle.d.ts +0 -3
  108. package/dist/components/icons/ChevronDown.d.ts +0 -2
  109. package/dist/components/icons/ChevronLeft.d.ts +0 -3
  110. package/dist/components/icons/ChevronRight.d.ts +0 -2
  111. package/dist/components/icons/ChevronUp.d.ts +0 -3
  112. package/dist/components/icons/Clock.d.ts +0 -3
  113. package/dist/components/icons/Cloud.d.ts +0 -3
  114. package/dist/components/icons/Code.d.ts +0 -3
  115. package/dist/components/icons/CodeInSquare.d.ts +0 -3
  116. package/dist/components/icons/Connect.d.ts +0 -3
  117. package/dist/components/icons/ConnectAlt.d.ts +0 -3
  118. package/dist/components/icons/Console.d.ts +0 -3
  119. package/dist/components/icons/Copy.d.ts +0 -3
  120. package/dist/components/icons/CrossIcon.d.ts +0 -3
  121. package/dist/components/icons/Data.d.ts +0 -3
  122. package/dist/components/icons/DatabaseIcon.d.ts +0 -3
  123. package/dist/components/icons/Disk.d.ts +0 -3
  124. package/dist/components/icons/Display.d.ts +0 -3
  125. package/dist/components/icons/Document.d.ts +0 -3
  126. package/dist/components/icons/DotsHorizontal.d.ts +0 -3
  127. package/dist/components/icons/DotsVertical.d.ts +0 -3
  128. package/dist/components/icons/Email.d.ts +0 -3
  129. package/dist/components/icons/Empty.d.ts +0 -3
  130. package/dist/components/icons/FilterIcon.d.ts +0 -3
  131. package/dist/components/icons/Fire.d.ts +0 -3
  132. package/dist/components/icons/Flags/EuropeanUnion.d.ts +0 -3
  133. package/dist/components/icons/Flags/Germany.d.ts +0 -3
  134. package/dist/components/icons/Flags/India.d.ts +0 -3
  135. package/dist/components/icons/Flags/Ireland.d.ts +0 -3
  136. package/dist/components/icons/Flags/Netherlands.d.ts +0 -3
  137. package/dist/components/icons/Flags/Singapore.d.ts +0 -2
  138. package/dist/components/icons/Flags/UnitedKingdom.d.ts +0 -3
  139. package/dist/components/icons/Flags/UnitedStates.d.ts +0 -3
  140. package/dist/components/icons/Flags/index.d.ts +0 -6
  141. package/dist/components/icons/Folder.d.ts +0 -3
  142. package/dist/components/icons/Gift.d.ts +0 -3
  143. package/dist/components/icons/HistoryIcon.d.ts +0 -3
  144. package/dist/components/icons/Home.d.ts +0 -3
  145. package/dist/components/icons/Http.d.ts +0 -3
  146. package/dist/components/icons/InfoInCircleIcon.d.ts +0 -3
  147. package/dist/components/icons/InformationIcon.d.ts +0 -3
  148. package/dist/components/icons/InsertRowIcon.d.ts +0 -3
  149. package/dist/components/icons/Integrations.d.ts +0 -3
  150. package/dist/components/icons/LightBulb.d.ts +0 -3
  151. package/dist/components/icons/Lightening.d.ts +0 -3
  152. package/dist/components/icons/Loading.d.ts +0 -3
  153. package/dist/components/icons/Metrics.d.ts +0 -3
  154. package/dist/components/icons/MetricsAlt.d.ts +0 -3
  155. package/dist/components/icons/Payment.d.ts +0 -3
  156. package/dist/components/icons/Payments/Amex.d.ts +0 -3
  157. package/dist/components/icons/Payments/MasterCard.d.ts +0 -3
  158. package/dist/components/icons/Payments/Paypal.d.ts +0 -3
  159. package/dist/components/icons/Payments/Visa.d.ts +0 -3
  160. package/dist/components/icons/Payments/index.d.ts +0 -6
  161. package/dist/components/icons/Pencil.d.ts +0 -3
  162. package/dist/components/icons/PieChart.d.ts +0 -3
  163. package/dist/components/icons/Play.d.ts +0 -3
  164. package/dist/components/icons/Plus.d.ts +0 -3
  165. package/dist/components/icons/Popout.d.ts +0 -3
  166. package/dist/components/icons/PopoverArrow.d.ts +0 -3
  167. package/dist/components/icons/Question.d.ts +0 -3
  168. package/dist/components/icons/Refresh.d.ts +0 -3
  169. package/dist/components/icons/Search.d.ts +0 -3
  170. package/dist/components/icons/Secure.d.ts +0 -3
  171. package/dist/components/icons/Services.d.ts +0 -3
  172. package/dist/components/icons/Settings.d.ts +0 -3
  173. package/dist/components/icons/Share.d.ts +0 -3
  174. package/dist/components/icons/SlideIn.d.ts +0 -3
  175. package/dist/components/icons/SlideOut.d.ts +0 -3
  176. package/dist/components/icons/SortAltIcon.d.ts +0 -3
  177. package/dist/components/icons/SortIcon.d.ts +0 -3
  178. package/dist/components/icons/Sparkle.d.ts +0 -3
  179. package/dist/components/icons/Speaker.d.ts +0 -3
  180. package/dist/components/icons/Speed.d.ts +0 -3
  181. package/dist/components/icons/Star.d.ts +0 -3
  182. package/dist/components/icons/Support.d.ts +0 -3
  183. package/dist/components/icons/Table.d.ts +0 -3
  184. package/dist/components/icons/Taxi.d.ts +0 -3
  185. package/dist/components/icons/Trash.d.ts +0 -3
  186. package/dist/components/icons/Upload.d.ts +0 -3
  187. package/dist/components/icons/Url.d.ts +0 -3
  188. package/dist/components/icons/UserIcon.d.ts +0 -2
  189. package/dist/components/icons/UsersIcon.d.ts +0 -2
  190. package/dist/components/icons/WarningIcon.d.ts +0 -3
  191. package/dist/components/index.d.ts +0 -24
  192. package/dist/components/types.d.ts +0 -1
  193. package/dist/index.cjs +0 -442
  194. package/dist/index.d.ts +0 -2
  195. package/dist/main.d.ts +0 -0
  196. package/dist/styles/types.d.ts +0 -2087
  197. package/dist/styles/variables.classic.json.d.ts +0 -204
  198. package/dist/styles/variables.dark.json.d.ts +0 -896
  199. package/dist/styles/variables.json.d.ts +0 -2089
  200. package/dist/styles/variables.light.json.d.ts +0 -951
  201. package/dist/theme/index.d.ts +0 -10
  202. package/dist/theme/theme.d.ts +0 -6
  203. package/index.html +0 -17
  204. package/jest.config.ts +0 -11
  205. package/public/favicon.ico +0 -0
  206. package/public/logo.svg +0 -17
  207. package/public/vite.svg +0 -1
  208. package/src/App.css +0 -1
  209. package/src/App.module.css +0 -235
  210. package/src/App.tsx +0 -217
  211. package/src/assets/RightArrow/RightArrow.tsx +0 -17
  212. package/src/assets/S3Logo/S3Logo.tsx +0 -31
  213. package/src/assets/react.svg +0 -1
  214. package/src/components/Accordion/Accordion.stories.tsx +0 -28
  215. package/src/components/Accordion/Accordion.test.tsx +0 -46
  216. package/src/components/Accordion/Accordion.tsx +0 -119
  217. package/src/components/Alert/Alert.stories.tsx +0 -14
  218. package/src/components/Alert/Alert.test.tsx +0 -27
  219. package/src/components/Alert/Alert.tsx +0 -130
  220. package/src/components/Avatar/Avatar.stories.tsx +0 -13
  221. package/src/components/Avatar/Avatar.tsx +0 -64
  222. package/src/components/Badge/Badge.stories.ts +0 -30
  223. package/src/components/Badge/Badge.test.tsx +0 -16
  224. package/src/components/Badge/Badge.tsx +0 -78
  225. package/src/components/BigStat/BigStat.stories.ts +0 -20
  226. package/src/components/BigStat/BigStat.tsx +0 -49
  227. package/src/components/Button/Button.stories.ts +0 -26
  228. package/src/components/Button/Button.test.tsx +0 -32
  229. package/src/components/Button/Button.tsx +0 -115
  230. package/src/components/ButtonGroup/ButtonGroup.stories.ts +0 -14
  231. package/src/components/ButtonGroup/ButtonGroup.tsx +0 -78
  232. package/src/components/Card/Card.stories.ts +0 -19
  233. package/src/components/Card/Card.tsx +0 -107
  234. package/src/components/Checkbox/Checkbox.stories.tsx +0 -35
  235. package/src/components/Checkbox/Checkbox.test.tsx +0 -41
  236. package/src/components/Checkbox/Checkbox.tsx +0 -89
  237. package/src/components/ContextMenu/ContextMenu.stories.tsx +0 -73
  238. package/src/components/ContextMenu/ContextMenu.test.tsx +0 -152
  239. package/src/components/ContextMenu/ContextMenu.tsx +0 -155
  240. package/src/components/Dropdown/Dropdown.stories.tsx +0 -64
  241. package/src/components/Dropdown/Dropdown.test.tsx +0 -141
  242. package/src/components/Dropdown/Dropdown.tsx +0 -149
  243. package/src/components/FormField/Label.stories.tsx +0 -39
  244. package/src/components/FormField/Label.tsx +0 -47
  245. package/src/components/FormField/Select.stories.tsx +0 -48
  246. package/src/components/FormField/Select.test.tsx +0 -216
  247. package/src/components/FormField/Select.tsx +0 -574
  248. package/src/components/FormField/SelectContext.tsx +0 -101
  249. package/src/components/FormField/commonElement.tsx +0 -42
  250. package/src/components/GenericMenu.tsx +0 -114
  251. package/src/components/HoverCard/HoverCard.stories.tsx +0 -64
  252. package/src/components/HoverCard/HoverCard.test.tsx +0 -85
  253. package/src/components/HoverCard/HoverCard.tsx +0 -65
  254. package/src/components/Icon/Icon.stories.ts +0 -15
  255. package/src/components/Icon/Icon.tsx +0 -238
  256. package/src/components/Icon/types.ts +0 -95
  257. package/src/components/IconButton/IconButton.stories.ts +0 -34
  258. package/src/components/IconButton/IconButton.test.tsx +0 -32
  259. package/src/components/IconButton/IconButton.tsx +0 -83
  260. package/src/components/Panel/Panel.stories.tsx +0 -25
  261. package/src/components/Panel/Panel.tsx +0 -33
  262. package/src/components/Popover/Popover.stories.tsx +0 -67
  263. package/src/components/Popover/Popover.test.tsx +0 -46
  264. package/src/components/Popover/Popover.tsx +0 -115
  265. package/src/components/RadioGroup/RadioGroup.stories.tsx +0 -43
  266. package/src/components/RadioGroup/RadioGroup.test.tsx +0 -59
  267. package/src/components/RadioGroup/RadioGroup.tsx +0 -149
  268. package/src/components/Separator/Separator.stories.tsx +0 -24
  269. package/src/components/Separator/Separator.tsx +0 -29
  270. package/src/components/SidebarNavigationItem/SidebarNavigationItem.stories.tsx +0 -28
  271. package/src/components/SidebarNavigationItem/SidebarNavigationItem.tsx +0 -112
  272. package/src/components/Spacer/Spacer.stories.tsx +0 -20
  273. package/src/components/Spacer/Spacer.tsx +0 -15
  274. package/src/components/Switch/Switch.stories.ts +0 -14
  275. package/src/components/Switch/Switch.tsx +0 -107
  276. package/src/components/Table/Table.stories.tsx +0 -29
  277. package/src/components/Table/Table.tsx +0 -109
  278. package/src/components/Tabs/Tabs.stories.tsx +0 -36
  279. package/src/components/Tabs/Tabs.test.tsx +0 -86
  280. package/src/components/Tabs/Tabs.tsx +0 -82
  281. package/src/components/Tooltip/Tooltip.stories.tsx +0 -68
  282. package/src/components/Tooltip/Tooltip.test.tsx +0 -44
  283. package/src/components/Tooltip/Tooltip.tsx +0 -67
  284. package/src/components/Typography/Text/Text.stories.tsx +0 -22
  285. package/src/components/Typography/Text/Text.test.tsx +0 -16
  286. package/src/components/Typography/Text/Text.tsx +0 -30
  287. package/src/components/Typography/Title/Title.stories.tsx +0 -31
  288. package/src/components/Typography/Title/Title.test.tsx +0 -16
  289. package/src/components/Typography/Title/Title.tsx +0 -36
  290. package/src/components/icons/Activity.tsx +0 -30
  291. package/src/components/icons/ArrowDown.tsx +0 -22
  292. package/src/components/icons/ArrowRight.tsx +0 -22
  293. package/src/components/icons/ArrowTriangle.tsx +0 -36
  294. package/src/components/icons/ArrowUp.tsx +0 -22
  295. package/src/components/icons/Backups.tsx +0 -29
  296. package/src/components/icons/Blog.tsx +0 -38
  297. package/src/components/icons/Book.tsx +0 -30
  298. package/src/components/icons/Brackets.tsx +0 -22
  299. package/src/components/icons/Briefcase.tsx +0 -30
  300. package/src/components/icons/Building.tsx +0 -30
  301. package/src/components/icons/BurgerMenu.tsx +0 -22
  302. package/src/components/icons/Cards.tsx +0 -30
  303. package/src/components/icons/CellTower.tsx +0 -21
  304. package/src/components/icons/ChatIcon.tsx +0 -22
  305. package/src/components/icons/CheckIcon.tsx +0 -21
  306. package/src/components/icons/CheckInCircle.tsx +0 -39
  307. package/src/components/icons/ChevronDown.tsx +0 -20
  308. package/src/components/icons/ChevronLeft.tsx +0 -22
  309. package/src/components/icons/ChevronRight.tsx +0 -20
  310. package/src/components/icons/ChevronUp.tsx +0 -22
  311. package/src/components/icons/Clock.tsx +0 -37
  312. package/src/components/icons/Cloud.tsx +0 -23
  313. package/src/components/icons/Code.tsx +0 -22
  314. package/src/components/icons/CodeInSquare.tsx +0 -30
  315. package/src/components/icons/Connect.tsx +0 -22
  316. package/src/components/icons/ConnectAlt.tsx +0 -30
  317. package/src/components/icons/Console.tsx +0 -30
  318. package/src/components/icons/Copy.tsx +0 -33
  319. package/src/components/icons/CrossIcon.tsx +0 -29
  320. package/src/components/icons/Data.tsx +0 -36
  321. package/src/components/icons/DatabaseIcon.tsx +0 -31
  322. package/src/components/icons/Disk.tsx +0 -30
  323. package/src/components/icons/Display.tsx +0 -30
  324. package/src/components/icons/Document.tsx +0 -30
  325. package/src/components/icons/DotsHorizontal.tsx +0 -36
  326. package/src/components/icons/DotsVertical.tsx +0 -33
  327. package/src/components/icons/Email.tsx +0 -33
  328. package/src/components/icons/Empty.tsx +0 -14
  329. package/src/components/icons/FilterIcon.tsx +0 -37
  330. package/src/components/icons/Fire.tsx +0 -23
  331. package/src/components/icons/Flags/EuropeanUnion.tsx +0 -174
  332. package/src/components/icons/Flags/Germany.tsx +0 -25
  333. package/src/components/icons/Flags/India.tsx +0 -48
  334. package/src/components/icons/Flags/Ireland.tsx +0 -32
  335. package/src/components/icons/Flags/Netherlands.tsx +0 -29
  336. package/src/components/icons/Flags/Singapore.tsx +0 -43
  337. package/src/components/icons/Flags/UnitedKingdom.tsx +0 -32
  338. package/src/components/icons/Flags/UnitedStates.tsx +0 -26
  339. package/src/components/icons/Flags/index.tsx +0 -46
  340. package/src/components/icons/Folder.tsx +0 -20
  341. package/src/components/icons/Gift.tsx +0 -21
  342. package/src/components/icons/HistoryIcon.tsx +0 -28
  343. package/src/components/icons/Home.tsx +0 -29
  344. package/src/components/icons/Http.tsx +0 -22
  345. package/src/components/icons/Icons.mdx +0 -39
  346. package/src/components/icons/InfoInCircleIcon.tsx +0 -37
  347. package/src/components/icons/InformationIcon.tsx +0 -34
  348. package/src/components/icons/InsertRowIcon.tsx +0 -34
  349. package/src/components/icons/Integrations.tsx +0 -29
  350. package/src/components/icons/LightBulb.tsx +0 -40
  351. package/src/components/icons/Lightening.tsx +0 -30
  352. package/src/components/icons/Loading.tsx +0 -57
  353. package/src/components/icons/Metrics.tsx +0 -38
  354. package/src/components/icons/MetricsAlt.tsx +0 -30
  355. package/src/components/icons/Payment.tsx +0 -23
  356. package/src/components/icons/Payments/Amex.tsx +0 -44
  357. package/src/components/icons/Payments/MasterCard.tsx +0 -48
  358. package/src/components/icons/Payments/Paypal.tsx +0 -41
  359. package/src/components/icons/Payments/Visa.tsx +0 -36
  360. package/src/components/icons/Payments/index.tsx +0 -30
  361. package/src/components/icons/Pencil.tsx +0 -30
  362. package/src/components/icons/PieChart.tsx +0 -30
  363. package/src/components/icons/Play.tsx +0 -30
  364. package/src/components/icons/Plus.tsx +0 -22
  365. package/src/components/icons/Popout.tsx +0 -22
  366. package/src/components/icons/PopoverArrow.tsx +0 -22
  367. package/src/components/icons/Question.tsx +0 -30
  368. package/src/components/icons/Refresh.tsx +0 -29
  369. package/src/components/icons/Search.tsx +0 -22
  370. package/src/components/icons/Secure.tsx +0 -30
  371. package/src/components/icons/Services.tsx +0 -23
  372. package/src/components/icons/Settings.tsx +0 -22
  373. package/src/components/icons/Share.tsx +0 -29
  374. package/src/components/icons/SlideIn.tsx +0 -28
  375. package/src/components/icons/SlideOut.tsx +0 -28
  376. package/src/components/icons/SortAltIcon.tsx +0 -22
  377. package/src/components/icons/SortIcon.tsx +0 -24
  378. package/src/components/icons/Sparkle.tsx +0 -23
  379. package/src/components/icons/Speaker.tsx +0 -30
  380. package/src/components/icons/Speed.tsx +0 -29
  381. package/src/components/icons/Star.tsx +0 -23
  382. package/src/components/icons/Support.tsx +0 -37
  383. package/src/components/icons/Table.tsx +0 -30
  384. package/src/components/icons/Taxi.tsx +0 -120
  385. package/src/components/icons/Trash.tsx +0 -22
  386. package/src/components/icons/Upload.tsx +0 -29
  387. package/src/components/icons/Url.tsx +0 -22
  388. package/src/components/icons/UserIcon.tsx +0 -17
  389. package/src/components/icons/UsersIcon.tsx +0 -43
  390. package/src/components/icons/WarningIcon.tsx +0 -30
  391. package/src/components/index.ts +0 -35
  392. package/src/components/types.ts +0 -1
  393. package/src/index.css +0 -9
  394. package/src/index.ts +0 -2
  395. package/src/main.tsx +0 -11
  396. package/src/stories/assets/code-brackets.svg +0 -1
  397. package/src/stories/assets/colors.svg +0 -1
  398. package/src/stories/assets/comments.svg +0 -1
  399. package/src/stories/assets/direction.svg +0 -1
  400. package/src/stories/assets/flow.svg +0 -1
  401. package/src/stories/assets/plugin.svg +0 -1
  402. package/src/stories/assets/repo.svg +0 -1
  403. package/src/stories/assets/stackalt.svg +0 -1
  404. package/src/styles/Home.module.css +0 -235
  405. package/src/styles/globals.css +0 -111
  406. package/src/styles/types.ts +0 -2089
  407. package/src/styles/variables.classic.css +0 -16
  408. package/src/styles/variables.classic.json +0 -202
  409. package/src/styles/variables.css +0 -763
  410. package/src/styles/variables.dark.css +0 -135
  411. package/src/styles/variables.dark.json +0 -894
  412. package/src/styles/variables.json +0 -2087
  413. package/src/styles/variables.light.css +0 -203
  414. package/src/styles/variables.light.json +0 -949
  415. package/src/theme/index.ts +0 -22
  416. package/src/theme/theme.tsx +0 -28
  417. package/src/vite-env.d.ts +0 -1
  418. package/tokens/themes/$metadata.json +0 -9
  419. package/tokens/themes/$themes.json +0 -3657
  420. package/tokens/themes/classic.json +0 -550
  421. package/tokens/themes/component.json +0 -2252
  422. package/tokens/themes/dark.json +0 -2563
  423. package/tokens/themes/light.json +0 -2645
  424. package/tokens/themes/primitives.json +0 -947
  425. package/tsconfig.json +0 -27
  426. package/tsconfig.node.json +0 -10
  427. package/vite.config.ts +0 -40
@@ -1,24 +0,0 @@
1
- import Separator from "./Separator";
2
-
3
- export default {
4
- component: Separator,
5
- title: "Display/Separator",
6
- tags: ["separator","autodocs"],
7
- argTypes: {
8
- size: {
9
- options: ["xs", "sm", "md", "lg", "xl", "xxl"],
10
- control: { type: "radio" },
11
- },
12
- orientation: {
13
- options: ["horizontal", "vertical"],
14
- control: { type: "radio" },
15
- },
16
- },
17
- };
18
-
19
- export const Playground = {
20
- args: {
21
- size: "xs",
22
- orientation: "horizontal",
23
- },
24
- };
@@ -1,29 +0,0 @@
1
- import styled from "styled-components";
2
- import * as RadixSeparator from "@radix-ui/react-separator";
3
- interface Props extends RadixSeparator.SeparatorProps {
4
- size: "xs" | "sm" | "md" | "lg" | "xl" | "xxl";
5
- }
6
- const CUISeparator = styled(RadixSeparator.Root)<Props>`
7
- &[data-orientation="horizontal"] {
8
- height: 0.0625rem;
9
- width: 100%;
10
- }
11
- &[data-orientation="vertical"] {
12
- height: 100%;
13
- width: 0.0625rem;
14
- }
15
- ${({ theme, size, orientation }) => `
16
- background: ${theme.click.separator.color.stroke.default};
17
- margin: ${
18
- orientation === "horizontal"
19
- ? `${theme.click.separator.horizontal.space.y[size]} ${theme.click.separator.horizontal.space.x.all}`
20
- : `${theme.click.separator.vertical.space.y.all} ${theme.click.separator.vertical.space.x[size]}`
21
- }
22
- `}
23
- `;
24
-
25
- const Separator = ({ orientation = "horizontal", ...props }: Props) => (
26
- <CUISeparator orientation={orientation} {...props} />
27
- );
28
-
29
- export default Separator;
@@ -1,28 +0,0 @@
1
- import { SidebarNavigationItem } from "@/components";
2
-
3
- export default {
4
- component: SidebarNavigationItem,
5
- title: "Display/SidebarNavigationItem",
6
- tags: ["sidebar", "navigation-item", "autodocs"],
7
- };
8
-
9
- export const Default = {
10
- args: {
11
- icon: "user",
12
- children: <a href="/profile">Profile</a>,
13
- },
14
- };
15
-
16
- export const Collapsible = {
17
- args: {
18
- icon: "user",
19
- collapsible: true,
20
- label: "Profile",
21
- children: (
22
- <>
23
- <h2>Content</h2>
24
- <p>SomeText</p>
25
- </>
26
- ),
27
- },
28
- };
@@ -1,112 +0,0 @@
1
- import { Icon } from "@/components";
2
- import { SidebarAccordion } from "@/components/Accordion/Accordion";
3
- import { IconName } from "@/components/Icon/types";
4
-
5
- import styled from "styled-components";
6
-
7
- interface DefaultSidebarNavigationItemProps
8
- extends React.HTMLAttributes<HTMLButtonElement> {
9
- collapsible?: false | undefined | null;
10
- label?: undefined;
11
- icon?: IconName;
12
- children: React.ReactNode;
13
- }
14
-
15
- interface CollapsibleSidebarNavigationItemProps
16
- extends React.HTMLAttributes<HTMLButtonElement> {
17
- collapsible: true;
18
- label: string;
19
- icon?: IconName;
20
- children: React.ReactNode;
21
- }
22
-
23
- export type SidebarNavigationItemProps =
24
- | DefaultSidebarNavigationItemProps
25
- | CollapsibleSidebarNavigationItemProps;
26
-
27
- const SidebarNavigationItem = ({
28
- icon,
29
- collapsible,
30
- children,
31
- label,
32
- }: SidebarNavigationItemProps) => (
33
- <>
34
- {collapsible ? (
35
- <CollapsibleNavigationItem
36
- collapsible={collapsible}
37
- label={label}
38
- icon={icon}
39
- children={children}
40
- />
41
- ) : (
42
- <Wrapper>
43
- <IconsWrapper>
44
- {/* This icon is only used as a place holder */}
45
- <Icon name="chevron-right" size="small" visibility="hidden" />
46
- {icon && <Icon name={icon || "user"} size="small" />}
47
- </IconsWrapper>
48
- {children}
49
- </Wrapper>
50
- )}
51
- </>
52
- );
53
- const Wrapper = styled.div`
54
- display: flex;
55
- align-items: center;
56
- gap: ${props => props.theme.click.sidebar.navigation.item.default.space.gap};
57
-
58
- padding: ${props =>
59
- `${props.theme.click.sidebar.navigation.item.default.space.y} 0`};
60
-
61
- border-radius: ${props =>
62
- props.theme.click.sidebar.navigation.item.radii.all};
63
- font: ${props =>
64
- props.theme.click.sidebar.navigation.item.typography.default};
65
- background-color: ${props =>
66
- props.theme.click.sidebar.navigation.item.color.background.default};
67
-
68
- &:hover {
69
- font: ${props =>
70
- props.theme.click.sidebar.navigation.item.typography.hover};
71
- background-color: ${props =>
72
- props.theme.click.sidebar.navigation.item.color.background.hover};
73
- }
74
-
75
- &:active {
76
- font: ${props =>
77
- props.theme.click.sidebar.navigation.item.typography.active};
78
- background-color: ${props =>
79
- props.theme.click.sidebar.navigation.item.color.background.active};
80
- }
81
-
82
- a {
83
- color: inherit;
84
- text-decoration: none;
85
-
86
- &:active {
87
- color: inherit;
88
- }
89
- }
90
- `;
91
- const IconsWrapper = styled.div`
92
- display: flex;
93
- `;
94
- const CollapsibleNavigationItem = ({
95
- collapsible,
96
- icon,
97
- label,
98
- children,
99
- }: CollapsibleSidebarNavigationItemProps) => (
100
- <CollapsibleWrapper>
101
- {label && collapsible && (
102
- <SidebarAccordion title={label} icon={icon} iconSize="small">
103
- {children}
104
- </SidebarAccordion>
105
- )}
106
- </CollapsibleWrapper>
107
- );
108
-
109
- const CollapsibleWrapper = styled(Wrapper)`
110
- padding-left: 0;
111
- `;
112
- export { SidebarNavigationItem };
@@ -1,20 +0,0 @@
1
- import { Spacer } from "./Spacer";
2
-
3
- export default {
4
- component: Spacer,
5
- title: "Display/Spacer",
6
- tags: ["spacer","autodocs"],
7
- argTypes: {
8
- size: {
9
- options: ["xs", "sm", "md", "lg", "xl", "xxl"],
10
- control: { type: "radio" },
11
- },
12
- },
13
- };
14
-
15
- export const Playground = {
16
- args: {
17
- size: "xxl",
18
- },
19
- };
20
-
@@ -1,15 +0,0 @@
1
- import styled from "styled-components";
2
-
3
- export interface SpacerProps {
4
- size?: "xs" | "sm" | "md" | "lg" | "xl" | "xxl";
5
- }
6
-
7
- const CUISpacer = styled.div<SpacerProps>`
8
- background: transparent;
9
- display: flex;
10
- padding: ${({ theme, size = "md" }) => `${theme.click.spacer.horizontal.space.y[size]} ${theme.click.spacer.horizontal.space.x.all}`};
11
- `
12
-
13
- export const Spacer = ({ size }: SpacerProps) => (
14
- <CUISpacer size={size} />
15
- );
@@ -1,14 +0,0 @@
1
- import { Switch } from "./Switch";
2
-
3
- export default {
4
- component: Switch,
5
- title: "Forms/Switch",
6
- tags: ["switch", "autodocs"],
7
- };
8
-
9
- export const Playground = {
10
- args: {
11
- checked: true,
12
- disabled: false,
13
- },
14
- };
@@ -1,107 +0,0 @@
1
- import * as RadixSwitch from "@radix-ui/react-switch";
2
- import styled, { DefaultTheme } from "styled-components";
3
-
4
- interface SwitchProps extends RadixSwitch.SwitchProps {
5
- checked: boolean;
6
- disabled?: boolean;
7
- }
8
-
9
- interface RootProps {
10
- checked: boolean;
11
- disabled?: boolean;
12
- }
13
-
14
- interface ThumbProps {
15
- checked: boolean;
16
- disabled?: boolean;
17
- }
18
-
19
- export function Switch({ checked, disabled, ...props }: SwitchProps) {
20
- return (
21
- <SwitchRoot disabled={disabled} checked={checked} {...props}>
22
- <SwitchThumb checked={checked} />
23
- </SwitchRoot>
24
- );
25
- }
26
-
27
- function getRootVars(
28
- theme: any,
29
- disabled: boolean | undefined,
30
- checked: boolean
31
- ) {
32
- const baseVars = {};
33
-
34
- if (disabled) {
35
- return {
36
- ...baseVars,
37
- backgroundColor: theme.click.switch.color.background.disabled,
38
- border: `1px solid ${theme.click.switch.color.stroke.disabled}`,
39
- };
40
- } else if (checked) {
41
- return {
42
- ...baseVars,
43
- backgroundColor: theme.click.switch.color.background.active,
44
- border: `1px solid ${theme.click.switch.color.stroke.active}`,
45
- };
46
- } else {
47
- return {
48
- ...baseVars,
49
- backgroundColor: theme.click.switch.color.background.default,
50
- border: `1px solid ${theme.click.switch.color.stroke.default}`,
51
- };
52
- }
53
- }
54
-
55
- function getThumbVars(
56
- theme: DefaultTheme,
57
- disabled: boolean | undefined,
58
- checked: boolean
59
- ) {
60
- const baseVars = {};
61
-
62
- if (disabled) {
63
- return {
64
- ...baseVars,
65
- backgroundColor: theme.click.switch.color.indicator.disabled,
66
- };
67
- } else if (checked) {
68
- return {
69
- ...baseVars,
70
- backgroundColor: theme.click.switch.color.indicator.active,
71
- };
72
- } else {
73
- return {
74
- ...baseVars,
75
- backgroundColor: theme.click.switch.color.indicator.default,
76
- };
77
- }
78
- }
79
-
80
- const SwitchRoot = styled(RadixSwitch.Root)<RootProps>((props) => {
81
- const vars = getRootVars(props.theme, props.disabled, props.checked);
82
-
83
- return {
84
- width: props.theme.click.switch.size.width,
85
- height: props.theme.click.switch.size.height,
86
- backgroundColor: vars.backgroundColor,
87
- border: vars.border,
88
- borderRadius: props.theme.click.switch.radii.all,
89
- position: "relative",
90
- padding: 0,
91
- };
92
- });
93
-
94
- const SwitchThumb = styled(RadixSwitch.Thumb)<ThumbProps>((props) => {
95
- const vars = getThumbVars(props.theme, props.disabled, props.checked);
96
-
97
- return {
98
- display: "block",
99
- width: "12px",
100
- height: "12px",
101
- backgroundColor: vars.backgroundColor,
102
- borderRadius: props.theme.click.switch.radii.all,
103
- transition: "transform 100ms",
104
- transform: props.checked ? "translateX(15px)" : "translateX(2px)",
105
- willChange: "transform",
106
- };
107
- });
@@ -1,29 +0,0 @@
1
- import { Table } from "./Table";
2
-
3
- export default {
4
- component: Table,
5
- title: "Display/Table",
6
- tags: ["table", "autodocs"],
7
- };
8
-
9
- export const Playground = {
10
- args: {
11
- children: [
12
- <Table.Tr>
13
- <Table.Th>Company</Table.Th>
14
- <Table.Th>Contact</Table.Th>
15
- <Table.Th>Country</Table.Th>
16
- </Table.Tr>,
17
- <Table.Tr>
18
- <Table.Td>Alfreds Futterkiste</Table.Td>
19
- <Table.Td>Maria Anders</Table.Td>
20
- <Table.Td>Germany</Table.Td>
21
- </Table.Tr>,
22
- <Table.Tr>
23
- <Table.Td>Centro comercial Moctezuma</Table.Td>
24
- <Table.Td>Francisco Chang</Table.Td>
25
- <Table.Td>Mexico</Table.Td>
26
- </Table.Tr>,
27
- ],
28
- },
29
- };
@@ -1,109 +0,0 @@
1
- import { Icon } from "@/components";
2
- import { IconName } from "@/components/Icon/types";
3
- import styled from "styled-components";
4
-
5
- type TableHeaderProps = {
6
- children: React.ReactNode;
7
- leftIcon?: IconName;
8
- rightIcon?: IconName;
9
- };
10
- const StyledHeader = styled.th`
11
- padding: 8px 16px;
12
- background-color: ${props =>
13
- props.theme.click.table.header.color.background.default};
14
- font: ${props => props.theme.click.table.header.title.default};
15
- color: ${props => props.theme.click.table.header.color.title.default};
16
- gap: 4px;
17
- text-align: left;
18
-
19
- &:first-of-type {
20
- border-top-left-radius: ${props => props.theme.click.table.radii.all};
21
- }
22
- &:last-of-type {
23
- border-top-right-radius: ${props => props.theme.click.table.radii.all};
24
- }
25
- `;
26
-
27
- const HeaderContentWrapper = styled.div`
28
- display: flex;
29
- align-items: center;
30
- justify-content: start;
31
- gap: 4px;
32
- `;
33
-
34
- const TableHeader = ({
35
- leftIcon,
36
- rightIcon,
37
- children,
38
- ...delegated
39
- }: TableHeaderProps) => (
40
- <StyledHeader {...delegated}>
41
- <HeaderContentWrapper>
42
- {leftIcon && <Icon name={leftIcon} width="12px" height="12px" />}
43
- {children}
44
- {rightIcon && <Icon name={rightIcon} width="12px" height="12px" />}
45
- </HeaderContentWrapper>
46
- </StyledHeader>
47
- );
48
-
49
- const TableRow = styled.tr`
50
- background-color: ${props =>
51
- props.theme.click.table.row.color.background.default};
52
- border-bottom: 1px solid
53
- ${props => props.theme.click.table.row.color.stroke.default};
54
-
55
- &:has(${StyledHeader}) {
56
- border-bottom: revert;
57
- }
58
-
59
- &:active {
60
- background-color: ${props =>
61
- props.theme.click.table.row.color.background.active};
62
- }
63
-
64
- &:hover {
65
- background-color: ${props =>
66
- props.theme.click.table.row.color.background.hover};
67
- }
68
- `;
69
-
70
- const TableData = styled.td`
71
- font: ${props => props.theme.click.table.cell.label.default};
72
- padding: 16px;
73
- border: 1px solid
74
- ${props => props.theme.click.table.global.color.stroke.default};
75
- border-top: none;
76
-
77
- :not(:last-of-type) {
78
- border-right: none;
79
- }
80
- :not(:first-of-type) {
81
- border-left: none;
82
- }
83
-
84
- ${TableRow}:last-of-type &:first-of-type {
85
- border-bottom-left-radius: ${props => props.theme.click.table.radii.all};
86
- }
87
- ${TableRow}:last-of-type &:last-of-type {
88
- border-bottom-right-radius: ${props => props.theme.click.table.radii.all};
89
- }
90
- `;
91
-
92
- const Table = (props: React.HTMLAttributes<HTMLTableElement>) => (
93
- <StyledTable {...props} />
94
- );
95
-
96
- const StyledTable = styled.table`
97
- border-spacing: 0;
98
- `;
99
-
100
- TableHeader.displayName = "Table.Th";
101
- Table.Th = TableHeader;
102
-
103
- TableData.displayName = "Table.Td";
104
- Table.Td = TableData;
105
-
106
- TableRow.displayName = "Table.Tr";
107
- Table.Tr = TableRow;
108
-
109
- export { Table };
@@ -1,36 +0,0 @@
1
- import { Tabs } from "@/components";
2
- import type { StoryObj } from "@storybook/react";
3
-
4
- export default {
5
- component: Tabs,
6
- title: "Display/Tabs",
7
- tags: ["tabs", "autodocs"],
8
- };
9
-
10
- type Story = StoryObj<typeof Tabs>;
11
-
12
- export const Default: Story = {
13
- args: {
14
- defaultValue: "tab2",
15
- onValueChange: s => console.log(s),
16
- ariaLabel: "a simple tab component",
17
- children: (
18
- <>
19
- <Tabs.TriggersList>
20
- <Tabs.Trigger value="tab1" key="tab1">
21
- tab1
22
- </Tabs.Trigger>
23
- <Tabs.Trigger value="tab2" key="tab2">
24
- tab2
25
- </Tabs.Trigger>
26
- <Tabs.Trigger value="tab3" key="tab3">
27
- tab3
28
- </Tabs.Trigger>
29
- </Tabs.TriggersList>
30
- <Tabs.Content value="tab1">Tab 1 content</Tabs.Content>
31
- <Tabs.Content value="tab2">Tab 2 content</Tabs.Content>
32
- <Tabs.Content value="tab3">Tab 3 content</Tabs.Content>
33
- </>
34
- ),
35
- },
36
- };
@@ -1,86 +0,0 @@
1
- import { ThemeProvider } from "../../theme";
2
- import { render, waitFor } from "@testing-library/react";
3
- import userEvent from "@testing-library/user-event";
4
- import { Tabs } from "./Tabs";
5
- import { TabsProps } from "@/components/Tabs/Tabs";
6
-
7
- describe("Tabs", () => {
8
- const renderTabs = (props: TabsProps) =>
9
- render(
10
- <ThemeProvider theme="dark">
11
- <Tabs {...props} />
12
- </ThemeProvider>
13
- );
14
-
15
- it("should render the Tabs", () => {
16
- const { getByText } = renderTabs({
17
- children: <p>Common text</p>,
18
- defaultValue: "1",
19
- });
20
- expect(getByText("Common text").textContent).toBe("Common text");
21
- });
22
-
23
- it("should switch between tabs", () => {
24
- const { getByText } = renderTabs({
25
- defaultValue: "tab1",
26
- ariaLabel: "Tabs",
27
- children: (
28
- <>
29
- <Tabs.TriggersList>
30
- <Tabs.Trigger value="tab1" key="tab1">
31
- tab1
32
- </Tabs.Trigger>
33
- <Tabs.Trigger value="tab2" key="tab2">
34
- tab2
35
- </Tabs.Trigger>
36
- <Tabs.Trigger value="tab3" key="tab3">
37
- tab3
38
- </Tabs.Trigger>
39
- </Tabs.TriggersList>
40
- <Tabs.Content value="tab1">Tab 1 content</Tabs.Content>
41
- <Tabs.Content value="tab2">Tab 2 content</Tabs.Content>
42
- <Tabs.Content value="tab3">Tab 3 content</Tabs.Content>
43
- </>
44
- ),
45
- });
46
- [1, 2, 3].forEach(async n => {
47
- const tab = getByText(`tab${n}`);
48
- userEvent.click(tab);
49
- await waitFor(() => {
50
- const content = getByText(`Tab ${n} content`);
51
- expect(content.textContent).toEqual(`Tab ${n} content`);
52
- });
53
- });
54
- });
55
-
56
- it("should execute callback on value change", async () => {
57
- let counter = 0;
58
- const { getByText } = renderTabs({
59
- onValueChange: () => counter++,
60
- children: (
61
- <>
62
- <Tabs.TriggersList>
63
- <Tabs.Trigger value="tab1" key="tab1">
64
- tab1
65
- </Tabs.Trigger>
66
- <Tabs.Trigger value="tab2" key="tab2">
67
- tab2
68
- </Tabs.Trigger>
69
- <Tabs.Trigger value="tab3" key="tab3">
70
- tab3
71
- </Tabs.Trigger>
72
- </Tabs.TriggersList>
73
- <Tabs.Content value="tab1">Tab 1 content</Tabs.Content>
74
- <Tabs.Content value="tab2">Tab 2 content</Tabs.Content>
75
- <Tabs.Content value="tab3">Tab 3 content</Tabs.Content>
76
- </>
77
- ),
78
- defaultValue: "tab1",
79
- });
80
- const tab = getByText("tab2");
81
- userEvent.click(tab);
82
- await waitFor(() => {
83
- expect(counter).toEqual(1);
84
- });
85
- });
86
- });
@@ -1,82 +0,0 @@
1
- import * as RadixTabs from "@radix-ui/react-tabs";
2
- import styled from "styled-components";
3
-
4
- export type TabProps = {
5
- label: React.ReactNode;
6
- value: string;
7
- children?: React.ReactNode;
8
- };
9
-
10
- export type TabsProps = {
11
- defaultValue?: string;
12
- ariaLabel?: string;
13
- onValueChange?: (s: string) => unknown;
14
- children: React.ReactElement<TabProps>[] | React.ReactElement<TabProps>;
15
- };
16
-
17
- const Trigger = styled(RadixTabs.Trigger)`
18
- border: none;
19
- padding: ${props =>
20
- `${props.theme.click.tabs.space.y} ${props.theme.click.tabs.space.x}`};
21
-
22
- border-top-left-radius: ${props => props.theme.click.tabs.radii.all};
23
- border-top-right-radius: ${props => props.theme.click.tabs.radii.all};
24
-
25
- border-bottom: ${props => props.theme.click.tabs.basic.stroke.default};
26
- background-color: ${props =>
27
- props.theme.click.tabs.basic.color.background.default};
28
- color: ${props => props.theme.click.tabs.basic.color.text.default};
29
- font: ${props => props.theme.click.tabs.typography.label.default};
30
- cursor: pointer;
31
-
32
- &[data-state="active"] {
33
- border-bottom: ${props => props.theme.click.tabs.basic.stroke.active};
34
- background-color: ${props =>
35
- props.theme.click.tabs.basic.color.background.active};
36
- color: ${props => props.theme.click.tabs.basic.color.text.active};
37
- font: ${props => props.theme.click.tabs.typography.label.active};
38
- }
39
-
40
- &:hover {
41
- border-bottom: ${props => props.theme.click.tabs.basic.stroke.hover};
42
- background-color: ${props =>
43
- props.theme.click.tabs.basic.color.background.hover};
44
- color: ${props => props.theme.click.tabs.basic.color.text.hover};
45
- font: ${props => props.theme.click.tabs.typography.label.hover};
46
- }
47
-
48
- &:hover[data-state="active"] {
49
- border-bottom: ${props => props.theme.click.tabs.basic.stroke.active};
50
- }
51
- `;
52
-
53
- const Content = styled(RadixTabs.Content)``;
54
-
55
- const TriggersList = styled(RadixTabs.List)`
56
- border-bottom: ${props => props.theme.click.tabs.basic.stroke.global};
57
- `;
58
-
59
- const Tabs = ({
60
- defaultValue,
61
- children,
62
- ariaLabel,
63
- onValueChange,
64
- ...delegated
65
- }: TabsProps) => {
66
- return (
67
- <RadixTabs.Root
68
- aria-label={ariaLabel}
69
- defaultValue={defaultValue}
70
- onValueChange={onValueChange}
71
- {...delegated}
72
- >
73
- {children}
74
- </RadixTabs.Root>
75
- );
76
- };
77
-
78
- Tabs.TriggersList = TriggersList;
79
- Tabs.Trigger = Trigger;
80
- Tabs.Content = Content;
81
-
82
- export { Tabs };