@seeqdev/qomponents 0.0.171 → 0.0.172

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 (387) hide show
  1. package/README.md +135 -135
  2. package/dist/example/.eslintrc.cjs +14 -14
  3. package/dist/example/README.md +33 -33
  4. package/dist/example/index.html +13 -13
  5. package/dist/example/package.json +32 -32
  6. package/dist/example/src/ComplexSelectExample.tsx +81 -81
  7. package/dist/example/src/Example.tsx +638 -638
  8. package/dist/example/src/index.css +103 -103
  9. package/dist/example/src/main.tsx +10 -10
  10. package/dist/example/src/vite-env.d.ts +1 -1
  11. package/dist/example/tsconfig.json +33 -33
  12. package/dist/example/tsconfig.node.json +12 -12
  13. package/dist/example/vite.config.ts +13 -13
  14. package/dist/index.esm.js +14 -14
  15. package/dist/index.esm.js.map +1 -1
  16. package/dist/index.js +14 -14
  17. package/dist/index.js.map +1 -1
  18. package/dist/src/Tabs/Tabs.types.d.ts +5 -0
  19. package/dist/styles.css +3868 -3868
  20. package/package.json +89 -89
  21. package/dist/Accordion/Accordion.d.ts +0 -4
  22. package/dist/Accordion/Accordion.js +0 -7
  23. package/dist/Accordion/Accordion.js.map +0 -1
  24. package/dist/Accordion/Accordion.stories.d.ts +0 -5
  25. package/dist/Accordion/Accordion.stories.js +0 -75
  26. package/dist/Accordion/Accordion.stories.js.map +0 -1
  27. package/dist/Accordion/Accordion.test.d.ts +0 -1
  28. package/dist/Accordion/Accordion.test.js +0 -55
  29. package/dist/Accordion/Accordion.test.js.map +0 -1
  30. package/dist/Accordion/Accordion.types.d.ts +0 -86
  31. package/dist/Accordion/Accordion.types.js +0 -2
  32. package/dist/Accordion/Accordion.types.js.map +0 -1
  33. package/dist/Accordion/index.d.ts +0 -1
  34. package/dist/Accordion/index.js +0 -2
  35. package/dist/Accordion/index.js.map +0 -1
  36. package/dist/Alert/Alert.d.ts +0 -7
  37. package/dist/Alert/Alert.js +0 -32
  38. package/dist/Alert/Alert.js.map +0 -1
  39. package/dist/Alert/Alert.stories.d.ts +0 -5
  40. package/dist/Alert/Alert.stories.js +0 -57
  41. package/dist/Alert/Alert.stories.js.map +0 -1
  42. package/dist/Alert/Alert.test.d.ts +0 -1
  43. package/dist/Alert/Alert.test.js +0 -50
  44. package/dist/Alert/Alert.test.js.map +0 -1
  45. package/dist/Alert/Alert.types.d.ts +0 -63
  46. package/dist/Alert/Alert.types.js +0 -2
  47. package/dist/Alert/Alert.types.js.map +0 -1
  48. package/dist/Alert/index.d.ts +0 -1
  49. package/dist/Alert/index.js +0 -2
  50. package/dist/Alert/index.js.map +0 -1
  51. package/dist/Button/Button.d.ts +0 -10
  52. package/dist/Button/Button.js +0 -90
  53. package/dist/Button/Button.js.map +0 -1
  54. package/dist/Button/Button.stories.d.ts +0 -9
  55. package/dist/Button/Button.stories.js +0 -29
  56. package/dist/Button/Button.stories.js.map +0 -1
  57. package/dist/Button/Button.test.d.ts +0 -1
  58. package/dist/Button/Button.test.js +0 -47
  59. package/dist/Button/Button.test.js.map +0 -1
  60. package/dist/Button/Button.types.d.ts +0 -148
  61. package/dist/Button/Button.types.js +0 -5
  62. package/dist/Button/Button.types.js.map +0 -1
  63. package/dist/Button/index.d.ts +0 -1
  64. package/dist/Button/index.js +0 -2
  65. package/dist/Button/index.js.map +0 -1
  66. package/dist/ButtonGroup/ButtonGroup.d.ts +0 -7
  67. package/dist/ButtonGroup/ButtonGroup.js +0 -35
  68. package/dist/ButtonGroup/ButtonGroup.js.map +0 -1
  69. package/dist/ButtonGroup/ButtonGroup.stories.d.ts +0 -5
  70. package/dist/ButtonGroup/ButtonGroup.stories.js +0 -317
  71. package/dist/ButtonGroup/ButtonGroup.stories.js.map +0 -1
  72. package/dist/ButtonGroup/ButtonGroup.test.d.ts +0 -1
  73. package/dist/ButtonGroup/ButtonGroup.test.js +0 -66
  74. package/dist/ButtonGroup/ButtonGroup.test.js.map +0 -1
  75. package/dist/ButtonGroup/ButtonGroup.types.d.ts +0 -81
  76. package/dist/ButtonGroup/ButtonGroup.types.js +0 -2
  77. package/dist/ButtonGroup/ButtonGroup.types.js.map +0 -1
  78. package/dist/ButtonGroup/index.d.ts +0 -1
  79. package/dist/ButtonGroup/index.js +0 -2
  80. package/dist/ButtonGroup/index.js.map +0 -1
  81. package/dist/ButtonWithDropdown/ButtonWithDropdown.d.ts +0 -4
  82. package/dist/ButtonWithDropdown/ButtonWithDropdown.js +0 -36
  83. package/dist/ButtonWithDropdown/ButtonWithDropdown.js.map +0 -1
  84. package/dist/ButtonWithDropdown/ButtonWithDropdown.stories.d.ts +0 -5
  85. package/dist/ButtonWithDropdown/ButtonWithDropdown.stories.js +0 -104
  86. package/dist/ButtonWithDropdown/ButtonWithDropdown.stories.js.map +0 -1
  87. package/dist/ButtonWithDropdown/ButtonWithDropdown.test.d.ts +0 -1
  88. package/dist/ButtonWithDropdown/ButtonWithDropdown.test.js +0 -93
  89. package/dist/ButtonWithDropdown/ButtonWithDropdown.test.js.map +0 -1
  90. package/dist/ButtonWithDropdown/ButtonWithDropdown.types.d.ts +0 -233
  91. package/dist/ButtonWithDropdown/ButtonWithDropdown.types.js +0 -2
  92. package/dist/ButtonWithDropdown/ButtonWithDropdown.types.js.map +0 -1
  93. package/dist/ButtonWithDropdown/index.d.ts +0 -1
  94. package/dist/ButtonWithDropdown/index.js +0 -2
  95. package/dist/ButtonWithDropdown/index.js.map +0 -1
  96. package/dist/ButtonWithPopover/ButtonWithPopover.d.ts +0 -4
  97. package/dist/ButtonWithPopover/ButtonWithPopover.js +0 -55
  98. package/dist/ButtonWithPopover/ButtonWithPopover.js.map +0 -1
  99. package/dist/ButtonWithPopover/ButtonWithPopover.stories.d.ts +0 -5
  100. package/dist/ButtonWithPopover/ButtonWithPopover.stories.js +0 -25
  101. package/dist/ButtonWithPopover/ButtonWithPopover.stories.js.map +0 -1
  102. package/dist/ButtonWithPopover/ButtonWithPopover.test.d.ts +0 -1
  103. package/dist/ButtonWithPopover/ButtonWithPopover.test.js +0 -81
  104. package/dist/ButtonWithPopover/ButtonWithPopover.test.js.map +0 -1
  105. package/dist/ButtonWithPopover/ButtonWithPopover.types.d.ts +0 -134
  106. package/dist/ButtonWithPopover/ButtonWithPopover.types.js +0 -2
  107. package/dist/ButtonWithPopover/ButtonWithPopover.types.js.map +0 -1
  108. package/dist/ButtonWithPopover/index.d.ts +0 -1
  109. package/dist/ButtonWithPopover/index.js +0 -2
  110. package/dist/ButtonWithPopover/index.js.map +0 -1
  111. package/dist/Carousel/Carousel.d.ts +0 -9
  112. package/dist/Carousel/Carousel.js +0 -75
  113. package/dist/Carousel/Carousel.js.map +0 -1
  114. package/dist/Carousel/Carousel.stories.d.ts +0 -5
  115. package/dist/Carousel/Carousel.stories.js +0 -63
  116. package/dist/Carousel/Carousel.stories.js.map +0 -1
  117. package/dist/Carousel/Carousel.test.d.ts +0 -1
  118. package/dist/Carousel/Carousel.test.js +0 -48
  119. package/dist/Carousel/Carousel.test.js.map +0 -1
  120. package/dist/Carousel/Carousel.types.d.ts +0 -86
  121. package/dist/Carousel/Carousel.types.js +0 -2
  122. package/dist/Carousel/Carousel.types.js.map +0 -1
  123. package/dist/Carousel/index.d.ts +0 -1
  124. package/dist/Carousel/index.js +0 -2
  125. package/dist/Carousel/index.js.map +0 -1
  126. package/dist/Checkbox/Checkbox.d.ts +0 -7
  127. package/dist/Checkbox/Checkbox.js +0 -25
  128. package/dist/Checkbox/Checkbox.js.map +0 -1
  129. package/dist/Checkbox/Checkbox.stories.d.ts +0 -5
  130. package/dist/Checkbox/Checkbox.stories.js +0 -12
  131. package/dist/Checkbox/Checkbox.stories.js.map +0 -1
  132. package/dist/Checkbox/Checkbox.test.d.ts +0 -1
  133. package/dist/Checkbox/Checkbox.test.js +0 -94
  134. package/dist/Checkbox/Checkbox.test.js.map +0 -1
  135. package/dist/Checkbox/Checkbox.types.d.ts +0 -92
  136. package/dist/Checkbox/Checkbox.types.js +0 -2
  137. package/dist/Checkbox/Checkbox.types.js.map +0 -1
  138. package/dist/Checkbox/index.d.ts +0 -1
  139. package/dist/Checkbox/index.js +0 -2
  140. package/dist/Checkbox/index.js.map +0 -1
  141. package/dist/Collapse/Collapse.d.ts +0 -4
  142. package/dist/Collapse/Collapse.js +0 -17
  143. package/dist/Collapse/Collapse.js.map +0 -1
  144. package/dist/Collapse/Collapse.stories.d.ts +0 -5
  145. package/dist/Collapse/Collapse.stories.js +0 -15
  146. package/dist/Collapse/Collapse.stories.js.map +0 -1
  147. package/dist/Collapse/Collapse.test.d.ts +0 -1
  148. package/dist/Collapse/Collapse.test.js +0 -17
  149. package/dist/Collapse/Collapse.test.js.map +0 -1
  150. package/dist/Collapse/Collapse.types.d.ts +0 -19
  151. package/dist/Collapse/Collapse.types.js +0 -2
  152. package/dist/Collapse/Collapse.types.js.map +0 -1
  153. package/dist/Collapse/index.d.ts +0 -1
  154. package/dist/Collapse/index.js +0 -2
  155. package/dist/Collapse/index.js.map +0 -1
  156. package/dist/Icon/Icon.d.ts +0 -10
  157. package/dist/Icon/Icon.js +0 -56
  158. package/dist/Icon/Icon.js.map +0 -1
  159. package/dist/Icon/Icon.stories.d.ts +0 -5
  160. package/dist/Icon/Icon.stories.js +0 -15
  161. package/dist/Icon/Icon.stories.js.map +0 -1
  162. package/dist/Icon/Icon.test.d.ts +0 -1
  163. package/dist/Icon/Icon.test.js +0 -55
  164. package/dist/Icon/Icon.test.js.map +0 -1
  165. package/dist/Icon/Icon.types.d.ts +0 -91
  166. package/dist/Icon/Icon.types.js +0 -16
  167. package/dist/Icon/Icon.types.js.map +0 -1
  168. package/dist/Icon/index.d.ts +0 -1
  169. package/dist/Icon/index.js +0 -2
  170. package/dist/Icon/index.js.map +0 -1
  171. package/dist/InputGroup/InputGroup.d.ts +0 -7
  172. package/dist/InputGroup/InputGroup.js +0 -34
  173. package/dist/InputGroup/InputGroup.js.map +0 -1
  174. package/dist/InputGroup/InputGroup.stories.d.ts +0 -5
  175. package/dist/InputGroup/InputGroup.stories.js +0 -129
  176. package/dist/InputGroup/InputGroup.stories.js.map +0 -1
  177. package/dist/InputGroup/InputGroup.test.d.ts +0 -1
  178. package/dist/InputGroup/InputGroup.test.js +0 -42
  179. package/dist/InputGroup/InputGroup.test.js.map +0 -1
  180. package/dist/InputGroup/InputGroup.types.d.ts +0 -62
  181. package/dist/InputGroup/InputGroup.types.js +0 -2
  182. package/dist/InputGroup/InputGroup.types.js.map +0 -1
  183. package/dist/InputGroup/index.d.ts +0 -2
  184. package/dist/InputGroup/index.js +0 -2
  185. package/dist/InputGroup/index.js.map +0 -1
  186. package/dist/Modal/Modal.d.ts +0 -5
  187. package/dist/Modal/Modal.js +0 -76
  188. package/dist/Modal/Modal.js.map +0 -1
  189. package/dist/Modal/Modal.stories.d.ts +0 -10
  190. package/dist/Modal/Modal.stories.js +0 -44
  191. package/dist/Modal/Modal.stories.js.map +0 -1
  192. package/dist/Modal/Modal.test.d.ts +0 -1
  193. package/dist/Modal/Modal.test.js +0 -108
  194. package/dist/Modal/Modal.test.js.map +0 -1
  195. package/dist/Modal/Modal.types.d.ts +0 -244
  196. package/dist/Modal/Modal.types.js +0 -2
  197. package/dist/Modal/Modal.types.js.map +0 -1
  198. package/dist/Modal/index.d.ts +0 -1
  199. package/dist/Modal/index.js +0 -2
  200. package/dist/Modal/index.js.map +0 -1
  201. package/dist/ProgressBar/ProgressBar.d.ts +0 -4
  202. package/dist/ProgressBar/ProgressBar.js +0 -72
  203. package/dist/ProgressBar/ProgressBar.js.map +0 -1
  204. package/dist/ProgressBar/ProgressBar.stories.d.ts +0 -5
  205. package/dist/ProgressBar/ProgressBar.stories.js +0 -35
  206. package/dist/ProgressBar/ProgressBar.stories.js.map +0 -1
  207. package/dist/ProgressBar/ProgressBar.test.d.ts +0 -1
  208. package/dist/ProgressBar/ProgressBar.test.js +0 -43
  209. package/dist/ProgressBar/ProgressBar.test.js.map +0 -1
  210. package/dist/ProgressBar/ProgressBar.types.d.ts +0 -77
  211. package/dist/ProgressBar/ProgressBar.types.js +0 -2
  212. package/dist/ProgressBar/ProgressBar.types.js.map +0 -1
  213. package/dist/ProgressBar/index.d.ts +0 -1
  214. package/dist/ProgressBar/index.js +0 -2
  215. package/dist/ProgressBar/index.js.map +0 -1
  216. package/dist/SeeqActionDropdown/SeeqActionDropdown.d.ts +0 -4
  217. package/dist/SeeqActionDropdown/SeeqActionDropdown.js +0 -39
  218. package/dist/SeeqActionDropdown/SeeqActionDropdown.js.map +0 -1
  219. package/dist/SeeqActionDropdown/SeeqActionDropdown.stories.d.ts +0 -5
  220. package/dist/SeeqActionDropdown/SeeqActionDropdown.stories.js +0 -56
  221. package/dist/SeeqActionDropdown/SeeqActionDropdown.stories.js.map +0 -1
  222. package/dist/SeeqActionDropdown/SeeqActionDropdown.test.d.ts +0 -1
  223. package/dist/SeeqActionDropdown/SeeqActionDropdown.test.js +0 -73
  224. package/dist/SeeqActionDropdown/SeeqActionDropdown.test.js.map +0 -1
  225. package/dist/SeeqActionDropdown/SeeqActionDropdown.types.d.ts +0 -160
  226. package/dist/SeeqActionDropdown/SeeqActionDropdown.types.js +0 -2
  227. package/dist/SeeqActionDropdown/SeeqActionDropdown.types.js.map +0 -1
  228. package/dist/SeeqActionDropdown/index.d.ts +0 -1
  229. package/dist/SeeqActionDropdown/index.js +0 -2
  230. package/dist/SeeqActionDropdown/index.js.map +0 -1
  231. package/dist/SeeqActionDropdown/variants.d.ts +0 -5
  232. package/dist/SeeqActionDropdown/variants.js +0 -29
  233. package/dist/SeeqActionDropdown/variants.js.map +0 -1
  234. package/dist/Select/Select.d.ts +0 -15
  235. package/dist/Select/Select.js +0 -177
  236. package/dist/Select/Select.js.map +0 -1
  237. package/dist/Select/Select.stories.d.ts +0 -5
  238. package/dist/Select/Select.stories.js +0 -40
  239. package/dist/Select/Select.stories.js.map +0 -1
  240. package/dist/Select/Select.test.d.ts +0 -1
  241. package/dist/Select/Select.test.js +0 -175
  242. package/dist/Select/Select.test.js.map +0 -1
  243. package/dist/Select/Select.types.d.ts +0 -220
  244. package/dist/Select/Select.types.js +0 -2
  245. package/dist/Select/Select.types.js.map +0 -1
  246. package/dist/Select/index.d.ts +0 -2
  247. package/dist/Select/index.js +0 -3
  248. package/dist/Select/index.js.map +0 -1
  249. package/dist/Slider/Slider.d.ts +0 -6
  250. package/dist/Slider/Slider.js +0 -10
  251. package/dist/Slider/Slider.js.map +0 -1
  252. package/dist/Slider/Slider.stories.d.ts +0 -5
  253. package/dist/Slider/Slider.stories.js +0 -14
  254. package/dist/Slider/Slider.stories.js.map +0 -1
  255. package/dist/Slider/Slider.test.d.ts +0 -1
  256. package/dist/Slider/Slider.test.js +0 -32
  257. package/dist/Slider/Slider.test.js.map +0 -1
  258. package/dist/Slider/Slider.types.d.ts +0 -85
  259. package/dist/Slider/Slider.types.js +0 -2
  260. package/dist/Slider/Slider.types.js.map +0 -1
  261. package/dist/Slider/index.d.ts +0 -1
  262. package/dist/Slider/index.js +0 -2
  263. package/dist/Slider/index.js.map +0 -1
  264. package/dist/SvgIcon/SvgIcon.d.ts +0 -20
  265. package/dist/SvgIcon/SvgIcon.js +0 -28
  266. package/dist/SvgIcon/SvgIcon.js.map +0 -1
  267. package/dist/SvgIcon/SvgIcon.stories.d.ts +0 -5
  268. package/dist/SvgIcon/SvgIcon.stories.js +0 -18
  269. package/dist/SvgIcon/SvgIcon.stories.js.map +0 -1
  270. package/dist/SvgIcon/SvgIcon.test.d.ts +0 -1
  271. package/dist/SvgIcon/SvgIcon.test.js +0 -41
  272. package/dist/SvgIcon/SvgIcon.test.js.map +0 -1
  273. package/dist/SvgIcon/SvgIcon.types.d.ts +0 -76
  274. package/dist/SvgIcon/SvgIcon.types.js +0 -3
  275. package/dist/SvgIcon/SvgIcon.types.js.map +0 -1
  276. package/dist/SvgIcon/index.d.ts +0 -1
  277. package/dist/SvgIcon/index.js +0 -2
  278. package/dist/SvgIcon/index.js.map +0 -1
  279. package/dist/Tabs/Tabs.d.ts +0 -4
  280. package/dist/Tabs/Tabs.js +0 -17
  281. package/dist/Tabs/Tabs.js.map +0 -1
  282. package/dist/Tabs/Tabs.stories.d.ts +0 -5
  283. package/dist/Tabs/Tabs.stories.js +0 -73
  284. package/dist/Tabs/Tabs.stories.js.map +0 -1
  285. package/dist/Tabs/Tabs.test.d.ts +0 -1
  286. package/dist/Tabs/Tabs.test.js +0 -86
  287. package/dist/Tabs/Tabs.test.js.map +0 -1
  288. package/dist/Tabs/Tabs.types.d.ts +0 -95
  289. package/dist/Tabs/Tabs.types.js +0 -2
  290. package/dist/Tabs/Tabs.types.js.map +0 -1
  291. package/dist/Tabs/index.d.ts +0 -1
  292. package/dist/Tabs/index.js +0 -2
  293. package/dist/Tabs/index.js.map +0 -1
  294. package/dist/TextArea/TextArea.d.ts +0 -7
  295. package/dist/TextArea/TextArea.js +0 -55
  296. package/dist/TextArea/TextArea.js.map +0 -1
  297. package/dist/TextArea/TextArea.stories.d.ts +0 -5
  298. package/dist/TextArea/TextArea.stories.js +0 -10
  299. package/dist/TextArea/TextArea.stories.js.map +0 -1
  300. package/dist/TextArea/TextArea.test.d.ts +0 -1
  301. package/dist/TextArea/TextArea.test.js +0 -130
  302. package/dist/TextArea/TextArea.test.js.map +0 -1
  303. package/dist/TextArea/TextArea.types.d.ts +0 -116
  304. package/dist/TextArea/TextArea.types.js +0 -2
  305. package/dist/TextArea/TextArea.types.js.map +0 -1
  306. package/dist/TextArea/index.d.ts +0 -1
  307. package/dist/TextArea/index.js +0 -2
  308. package/dist/TextArea/index.js.map +0 -1
  309. package/dist/TextField/TextField.d.ts +0 -7
  310. package/dist/TextField/TextField.js +0 -85
  311. package/dist/TextField/TextField.js.map +0 -1
  312. package/dist/TextField/TextField.stories.d.ts +0 -5
  313. package/dist/TextField/TextField.stories.js +0 -11
  314. package/dist/TextField/TextField.stories.js.map +0 -1
  315. package/dist/TextField/TextField.test.d.ts +0 -1
  316. package/dist/TextField/TextField.test.js +0 -41
  317. package/dist/TextField/TextField.test.js.map +0 -1
  318. package/dist/TextField/TextField.types.d.ts +0 -199
  319. package/dist/TextField/TextField.types.js +0 -2
  320. package/dist/TextField/TextField.types.js.map +0 -1
  321. package/dist/TextField/index.d.ts +0 -1
  322. package/dist/TextField/index.js +0 -2
  323. package/dist/TextField/index.js.map +0 -1
  324. package/dist/ToolbarButton/ToolbarButton.d.ts +0 -3
  325. package/dist/ToolbarButton/ToolbarButton.js +0 -57
  326. package/dist/ToolbarButton/ToolbarButton.js.map +0 -1
  327. package/dist/ToolbarButton/ToolbarButton.stories.d.ts +0 -5
  328. package/dist/ToolbarButton/ToolbarButton.stories.js +0 -28
  329. package/dist/ToolbarButton/ToolbarButton.stories.js.map +0 -1
  330. package/dist/ToolbarButton/ToolbarButton.test.d.ts +0 -1
  331. package/dist/ToolbarButton/ToolbarButton.test.js +0 -85
  332. package/dist/ToolbarButton/ToolbarButton.test.js.map +0 -1
  333. package/dist/ToolbarButton/ToolbarButton.types.d.ts +0 -122
  334. package/dist/ToolbarButton/ToolbarButton.types.js +0 -2
  335. package/dist/ToolbarButton/ToolbarButton.types.js.map +0 -1
  336. package/dist/ToolbarButton/index.d.ts +0 -1
  337. package/dist/ToolbarButton/index.js +0 -2
  338. package/dist/ToolbarButton/index.js.map +0 -1
  339. package/dist/Tooltip/QTip.stories.d.ts +0 -5
  340. package/dist/Tooltip/QTip.stories.js +0 -19
  341. package/dist/Tooltip/QTip.stories.js.map +0 -1
  342. package/dist/Tooltip/QTip.types.d.ts +0 -13
  343. package/dist/Tooltip/QTip.types.js +0 -2
  344. package/dist/Tooltip/QTip.types.js.map +0 -1
  345. package/dist/Tooltip/QTipPerformance.stories.d.ts +0 -5
  346. package/dist/Tooltip/QTipPerformance.stories.js +0 -26
  347. package/dist/Tooltip/QTipPerformance.stories.js.map +0 -1
  348. package/dist/Tooltip/Qtip.d.ts +0 -26
  349. package/dist/Tooltip/Qtip.js +0 -168
  350. package/dist/Tooltip/Qtip.js.map +0 -1
  351. package/dist/Tooltip/Tooltip.d.ts +0 -13
  352. package/dist/Tooltip/Tooltip.js +0 -34
  353. package/dist/Tooltip/Tooltip.js.map +0 -1
  354. package/dist/Tooltip/Tooltip.stories.d.ts +0 -5
  355. package/dist/Tooltip/Tooltip.stories.js +0 -15
  356. package/dist/Tooltip/Tooltip.stories.js.map +0 -1
  357. package/dist/Tooltip/Tooltip.types.d.ts +0 -22
  358. package/dist/Tooltip/Tooltip.types.js +0 -3
  359. package/dist/Tooltip/Tooltip.types.js.map +0 -1
  360. package/dist/Tooltip/TooltipPerformance.stories.d.ts +0 -5
  361. package/dist/Tooltip/TooltipPerformance.stories.js +0 -26
  362. package/dist/Tooltip/TooltipPerformance.stories.js.map +0 -1
  363. package/dist/Tooltip/index.d.ts +0 -2
  364. package/dist/Tooltip/index.js +0 -3
  365. package/dist/Tooltip/index.js.map +0 -1
  366. package/dist/Tooltip/qTip.utilities.d.ts +0 -3
  367. package/dist/Tooltip/qTip.utilities.js +0 -11
  368. package/dist/Tooltip/qTip.utilities.js.map +0 -1
  369. package/dist/index.d.ts +0 -46
  370. package/dist/setupTests.d.ts +0 -1
  371. package/dist/setupTests.js +0 -6
  372. package/dist/setupTests.js.map +0 -1
  373. package/dist/types.d.ts +0 -27
  374. package/dist/types.js +0 -26
  375. package/dist/types.js.map +0 -1
  376. package/dist/utils/browserId.d.ts +0 -9
  377. package/dist/utils/browserId.js +0 -29
  378. package/dist/utils/browserId.js.map +0 -1
  379. package/dist/utils/svg.d.ts +0 -15
  380. package/dist/utils/svg.js +0 -20
  381. package/dist/utils/svg.js.map +0 -1
  382. package/dist/utils/validateStyleDimension.d.ts +0 -2
  383. package/dist/utils/validateStyleDimension.js +0 -14
  384. package/dist/utils/validateStyleDimension.js.map +0 -1
  385. package/dist/utils/validateStyleDimension.test.d.ts +0 -1
  386. package/dist/utils/validateStyleDimension.test.js +0 -20
  387. package/dist/utils/validateStyleDimension.test.js.map +0 -1
@@ -1,638 +1,638 @@
1
- import React from 'react';
2
- import {
3
- Button,
4
- ButtonWithDropdown,
5
- ButtonWithPopover,
6
- Checkbox,
7
- Icon,
8
- Modal,
9
- QTip,
10
- Select,
11
- Tabs,
12
- TextArea,
13
- TextField,
14
- ToolbarButton,
15
- Accordion,
16
- Alert,
17
- ButtonGroup,
18
- Carousel,
19
- Collapse,
20
- InputGroup,
21
- ProgressBar,
22
- SeeqActionDropdown,
23
- Slider,
24
- } from '@seeqdev/qomponents';
25
- import ComplexSelectExample, { SelectOption } from './ComplexSelectExample';
26
-
27
- const availableThemes = [
28
- { display: 'Analysis', value: 'color_analysis' },
29
- { display: 'Topic', value: 'color_topic' },
30
- { display: 'DataLab', value: 'color_datalab' },
31
- ];
32
-
33
- const options = [
34
- { value: '1', label: 'Beginner' },
35
- { value: '2', label: 'Advanced' },
36
- { value: '3', label: 'Expert' },
37
- ];
38
-
39
- const Trigger = ({ label }: { label: string }) => (
40
- <div className="flex justify-start items-center border-b px-2 tw-text-sq-color-dark">
41
- <Icon icon="fc-arrow-dropdown" extraClassNames="tw-text-sq-color-dark mr-[0.5rem] text-[0.75rem]" type="text" />
42
- {label}
43
- </div>
44
- );
45
-
46
- const accordionItems = [
47
- {
48
- value: 'phone',
49
- id: 'phone',
50
- itemTestId: 'phonecall',
51
- trigger: <Trigger label="Phone" />,
52
- content: (
53
- <div className="p-2 text-[0.8125rem] dark:tw-text-sq-white">
54
- If you need to reach us, please call us at 555-555-5555.
55
- </div>
56
- ),
57
- },
58
- {
59
- value: 'email',
60
- id: 'email',
61
- itemTestId: 'email',
62
- trigger: <Trigger label="Email" />,
63
- content: (
64
- <div className="p-2 text-[0.8125rem] dark:text-sq-white">
65
- If you need to reach us, please mail example@seeqtest.com
66
- </div>
67
- ),
68
- },
69
- {
70
- value: 'address',
71
- id: 'address',
72
- itemTestId: 'address',
73
- trigger: <Trigger label="Address" />,
74
- content: (
75
- <div className="p-2 text-[0.8125rem] dark:tw-text-sq-white">
76
- If you need to reach us, please visit us at 1234 Main St., Anytown, USA.
77
- </div>
78
- ),
79
- },
80
- ];
81
-
82
- const renderData = (text: string) => (
83
- <div className="tw-text-sq-color-gray dark:tw-text-sq-white p-6">
84
- <p className="mb-5 text-[0.9375rem] leading-normal">{text}</p>
85
- </div>
86
- );
87
-
88
- const tabsList = [
89
- {
90
- id: 'plugins',
91
- label: 'Plugins',
92
- icon: 'fc-data',
93
- content: renderData("Here's where you can find all the plugins you need. Enjoy!"),
94
- },
95
- {
96
- id: 'addons',
97
- label: 'Addons',
98
- icon: 'fc-gears-2',
99
- content: renderData("Here's where you can find all the addons you need. Enjoy!"),
100
- },
101
- {
102
- id: 'shelf',
103
- label: 'Shelf',
104
- icon: 'fc-workbook-lock',
105
- content: renderData("Here's where you can find all the private documents you need. Enjoy!"),
106
- },
107
- ];
108
-
109
- function Example() {
110
- /**
111
- * Theming is supported "out of the box". To apply a theme wrap your addOn in a div and assign the class that
112
- * matched the desired theme:
113
- * - color_analysis for Analysis styled qomponents (green)
114
- * - color_topic for Topic styled qomponents (blue)
115
- * - DataLab for DataLab styled qomponents (orange)
116
- */
117
- const [theme, setTheme] = React.useState('color_analysis');
118
- /**
119
- * qomponents also support tw-dark. To render qomponents using tw-dark wrap your addOn in a div and assign the
120
- * class "tw-dark" for dark-mode or "tw-light" for light mode.
121
- */
122
- const [mode, setMode] = React.useState('tw-light');
123
-
124
- const [btGroupType, setBtGroupType] = React.useState('left');
125
-
126
- /**
127
- * This example uses controlled inputs (https://blog.logrocket.com/controlled-vs-uncontrolled-components-in-react/)
128
- */
129
- const [textFieldValue, setTextFieldValue] = React.useState('');
130
- const [textAreaValue, setTextAreaValue] = React.useState('');
131
- const [selectValue, setSelectValue] = React.useState();
132
- const [complexSelectedValue, setComplexSelectedValue] = React.useState<SelectOption>();
133
- const [alertDisplay, setAlertDisplay] = React.useState('success');
134
- const [easeOfUse, setEaseOfUse] = React.useState(false);
135
- const [lookAndFeel, setLookAndFeel] = React.useState(false);
136
- const [speed, setSpeed] = React.useState(false);
137
- const [help, setHelp] = React.useState('phone');
138
- const [openDropdown, setOpenDropdown] = React.useState('');
139
- const [openPopver, setOpenPopover] = React.useState('');
140
- const [modalOpen, setModalOpen] = React.useState(false);
141
- const [modalTitle, setModalTitle] = React.useState('Modal Title');
142
- const [activeTab, setActiveTab] = React.useState('plugins');
143
- const [collapseVisible, setCollapseVisible] = React.useState(false);
144
- const [inputGroupValue, setInputGroupValue] = React.useState('');
145
- const [sliderValue, setSliderValue] = React.useState<number>(50);
146
-
147
- return (
148
- // outer-wrapper div that assigns the mode (tw-dark or light) as well as the theme
149
- <div className={`backdrop ${mode} ${theme}`}>
150
- {/*add the QTip component at the very top level or your application to ensure your tooltips display as expected!*/}
151
- <QTip />
152
- <div className="flex-container">
153
- <div className="scroll-container">
154
- <div className="header">qomponents - form example</div>
155
- <div>Use this example to see qomponents in actions.</div>
156
- No libraries other than Seeq's qomponents (and of course React) are used to create this example, however
157
- minimal CSS is used to create an appealing form - you can find all that CSS in index.css.
158
- <p className="mb-10">
159
- <b>A note on CSS:</b> Seeq's qomponents come fully styled and ready to use. While it is tempting to use the
160
- available <i>extraClassNames</i> property to provide yet additional styling we strongly advise you to use
161
- this property to provide only width, margins and padding. This will ensure for a smooth upgrade experience
162
- when Seeq's look and feel changes. <br />
163
- Tip: to indicate missing or wrong user input use the <i>showError</i> property available on TextField,
164
- TextArea, as well as Select.
165
- </p>
166
- <p className="mb-10">
167
- Using FontAwesome? You can pass FontAwesome Icons to the qomponent Icon component
168
- <Icon icon="fa-regular fa-face-smile" extraClassNames="ml-10" />
169
- </p>
170
- <div className="mb-10">
171
- <a
172
- href="#"
173
- onClick={() => setMode(mode === 'tw-light' ? 'tw-dark' : 'tw-light')}
174
- // this is how you display a q-tip for an element that doesn't come with an "out-of the box" tooltip
175
- // property:
176
- data-qtip-text="Toggle Dark/Light Mode."
177
- // the position is optional and defaults to top
178
- data-qtip-position="bottom">
179
- <Icon icon="fc-sun" extraClassNames="mr-10" />
180
- Click to toggle to {mode === 'tw-light' ? 'Dark Mode' : 'Light Mode'}
181
- </a>
182
- </div>
183
- <div className="formRow">
184
- <div className="labelWidth">Select theme:</div>
185
- {availableThemes.map((t) => (
186
- <Checkbox
187
- key={t.value}
188
- type="radio"
189
- checked={theme === t.value}
190
- value={t.value}
191
- label={t.display}
192
- onChange={(e) => setTheme(e.target.value)}
193
- extraClassNames="mr-10"
194
- />
195
- ))}
196
- </div>
197
- <div className="formRow">
198
- <div className="labelWidth">AddOn Name</div>
199
- <TextField
200
- placeholder="you must enter a name"
201
- extraClassNames="formElementWidth"
202
- value={textFieldValue}
203
- showError={textFieldValue === ''}
204
- onChange={(e: React.ChangeEvent<HTMLInputElement>) => setTextFieldValue(e.target.value)}
205
- />
206
- </div>
207
- <div className="formRow">
208
- <div className="labelWidth">Description</div>
209
- <TextArea
210
- value={textAreaValue}
211
- onChange={(e: React.ChangeEvent<HTMLInputElement>) => setTextAreaValue(e.target.value)}
212
- extraClassNames="formElementWidth"
213
- placeholder="provide some text here"
214
- />
215
- </div>
216
- <div className="formRow">
217
- <div className="labelWidth">Goals</div>
218
- <div className="formColumn">
219
- <div>
220
- <Checkbox checked={easeOfUse} label="Ease of Use" onChange={() => setEaseOfUse(!easeOfUse)} />
221
- <Checkbox
222
- checked={lookAndFeel}
223
- label="Improved Look & Feel"
224
- onChange={() => setLookAndFeel(!lookAndFeel)}
225
- />
226
- <Checkbox checked={speed} label="Speedy Development" onChange={() => setSpeed(!speed)} />
227
- </div>
228
- </div>
229
- </div>
230
- <div className="formRow">
231
- <div className="labelWidth">Level</div>
232
- <Select
233
- value={selectValue}
234
- extraClassNames="formElementWidth"
235
- onChange={(selectValue) => setSelectValue(selectValue)}
236
- options={options}
237
- placeholder="please choose"
238
- />
239
- </div>
240
- <div className="formRow">
241
- <div className="labelWidth">Advanced</div>
242
- <ComplexSelectExample
243
- value={complexSelectedValue}
244
- onChange={(selectedOption: SelectOption) => setComplexSelectedValue(selectedOption)}
245
- />
246
- </div>
247
- <div className="formRow">
248
- <div className="labelWidth">Website tools</div>
249
- <div className="formElementWidth border rounded-sm">
250
- <Tabs
251
- stretchTabs={true}
252
- activeTab={activeTab}
253
- onTabSelect={setActiveTab}
254
- defaultActiveTab="data"
255
- tabs={tabsList}
256
- />
257
- </div>
258
- </div>
259
- <div className="formRow">
260
- <div className="labelWidth">Get help</div>
261
- <div className="formElementWidth border rounded-sm">
262
- <Accordion
263
- accordionItems={accordionItems}
264
- value={help}
265
- testId="basic-accordion1"
266
- onItemSelect={(value) => setHelp(value)}
267
- />
268
- </div>
269
- </div>
270
- <div className="formRow">
271
- <div className="labelWidth">Tools</div>
272
- <div className="formElementWidth formRow border rounded-sm p-4 flex justify-center">
273
- <ToolbarButton
274
- icon="fc-y-axis"
275
- label="Analyzer"
276
- testId="basic-analyzer"
277
- tooltipText="Analize data from any csv document"
278
- hasArrow
279
- tooltipOptions={{ position: 'top', delay: 0 }}
280
- isHtmlTooltip={false}
281
- popoverContent={
282
- <div className="text-sm dark:text-white">
283
- <p className="p-2">Select file from your computer or google drive</p>
284
- <Button type="button" label="Click to select file" />
285
- </div>
286
- }
287
- />
288
- <ToolbarButton
289
- icon="fc-sun"
290
- label={mode === 'light' ? 'Dark Mode' : 'Light Mode'}
291
- testId="basic-toggler"
292
- isActive={mode === 'tw-light'}
293
- tooltipText="Toggle light and dark modes"
294
- onClick={() => setMode(mode === 'tw-light' ? 'tw-dark' : 'tw-light')}
295
- tooltipOptions={{ position: 'top', delay: 0 }}
296
- isHtmlTooltip={false}
297
- />
298
- <ToolbarButton
299
- icon="fc-marker"
300
- label="Language"
301
- testId="basic-language-changer"
302
- tooltipText="Disabled toolbar to change website language"
303
- tooltipOptions={{ position: 'top', delay: 0 }}
304
- disabled
305
- />
306
- </div>
307
- </div>
308
- <div className="formRow">
309
- <div className="labelWidth">Take action</div>
310
- <div className="formElementWidth">
311
- <ButtonWithDropdown
312
- onOpenChange={(isOpen) => setOpenDropdown(isOpen ? 'dropdown-1' : '')}
313
- isOpen={openDropdown === 'dropdown-1'}
314
- triggerIcon={
315
- <Icon
316
- icon="fc-more"
317
- type="text"
318
- extraClassNames="tw-text-sq-text-color dark:tw-text-sq-white w-[18px]"
319
- />
320
- }
321
- containerTestId="basic-dropdown1"
322
- tooltip="See actions to take for plugins"
323
- tooltipDelay={0}
324
- hasArrow
325
- tooltipPlacement="top"
326
- dropdownItems={[
327
- { label: 'Create', icon: 'fc-add-row', onClick: () => setOpenDropdown('') },
328
- { label: 'Update', icon: 'fc-asset-tree', onClick: () => setOpenDropdown(''), hasDivider: true },
329
- {
330
- label: 'Sort',
331
- icon: 'fc-search-power',
332
- onClick: () => setOpenDropdown(''),
333
- subMenuItems: [
334
- { label: 'Ascending', iconClass: 'fc-arrow_up', onClick: () => setOpenDropdown('') },
335
- { label: 'Descending', iconClass: 'fc-arrow_down', onClick: () => setOpenDropdown('') },
336
- ],
337
- },
338
- { label: 'Delete', icon: 'fc-delete', onClick: () => setOpenDropdown('') },
339
- ]}
340
- />
341
- </div>
342
- </div>
343
- <div className="formRow mt-4">
344
- <div className="labelWidth">More information</div>
345
- <div className="formElementWidth">
346
- <ButtonWithPopover
347
- trigger={<Icon type="text" icon="fc-circle_info" />}
348
- containerTestId="basic-popover-1"
349
- isOpen={openPopver === 'basic-popover-1'}
350
- onOpenChange={(isOpen) => setOpenPopover(isOpen ? 'basic-popover-1' : '')}
351
- isHoverEnabled={false}
352
- align="start"
353
- tooltipPlacement="top"
354
- hasArrow
355
- isHtmlTooltip={false}>
356
- <div className="text-sm dark:text-white w-72 p-4">
357
- <p className="font-bold">What are plugins?</p>
358
- Plugins are modular software components that extend the functionality of an application. They allow
359
- users to add new features or customize existing ones. Plugins can be easily integrated into an
360
- application and provide a way to enhance its capabilities without modifying the core codebase.Plugins
361
- are modular software components that extend the functionality of an application.
362
- </div>
363
- </ButtonWithPopover>
364
- </div>
365
- </div>
366
- <div className="formRow mt-4">
367
- <div className="labelWidth">Accept terms</div>
368
- <div className="formElementWidth">
369
- <Button
370
- onClick={() => {
371
- setModalOpen(true);
372
- }}
373
- label="View terms of use"
374
- />
375
- <Modal
376
- open={modalOpen}
377
- onClose={() => setModalOpen(false)}
378
- title="Terms of use"
379
- titleIcon="fc-circle_info"
380
- isTitleEditable
381
- onTitleChanged={(event) => setModalTitle(event.target.value)}
382
- hideCloseIcon={false}
383
- size="lg"
384
- customButton={true}
385
- customButtonLabel="Back">
386
- <div>
387
- <p>
388
- By using this website, you agree to the following terms of use: Lorem ipsum dolor sit amet,
389
- consectetur adipiscing elit. Sed euismod, justo id aliquet aliquam, elit enim tincidunt mauris, nec
390
- aliquam nunc elit vitae nunc. Sed vitae fringilla mauris. Nulla facilisi. Sed auctor, nunc vel
391
- aliquet luctus, nisl nunc tincidunt nunc, id lacinia mauris metus id nunc. Sed auctor, nunc vel
392
- aliquet luctus, nisl nunc tincidunt nunc, id lacinia mauris metus id nunc.
393
- </p>
394
- </div>
395
- </Modal>
396
- </div>
397
- </div>
398
- <div className="formRow mt-8">
399
- <div className="labelWidth">Button example</div>
400
- <div className="formElementWidth">
401
- <div className="flex gap-2 mb-4">
402
- <Button label="Show Success" onClick={() => setAlertDisplay('success')} variant="theme" />
403
- <Button label="Show Cancel" onClick={() => setAlertDisplay('cancel')} variant="danger" />
404
- <Button label="Show Info" onClick={() => setAlertDisplay('info')} variant="outline" />
405
- </div>
406
- </div>
407
- </div>
408
- {/* Alert Example: Show info, success, or warning based on form submission */}
409
- <div className="formRow mt-8">
410
- <div className="labelWidth">Alert example</div>
411
- <div className="formElementWidth">
412
- {alertDisplay === 'success' && (
413
- <Alert variant="theme" testId="alert-success" dismissible>
414
- <div className="font-bold">Submission Successful</div>
415
- <div>
416
- Your add-on details have been submitted successfully. Thank you for contributing to the Seeq Add-on
417
- ecosystem!
418
- </div>
419
- </Alert>
420
- )}
421
- {alertDisplay === 'cancel' && (
422
- <Alert variant="warning" testId="alert-cancel" dismissible>
423
- <div className="font-bold">Submission Cancelled</div>
424
- <div>You have cancelled the submission. No changes were saved.</div>
425
- </Alert>
426
- )}
427
- {alertDisplay === 'info' && (
428
- <Alert variant="gray" testId="alert-info" dismissible>
429
- <div className="font-bold">Ready to Submit</div>
430
- <div>Fill out the form and click Submit to add your new add-on to Seeq.</div>
431
- </Alert>
432
- )}
433
- </div>
434
- </div>
435
- {/* ButtonGroup Example: Show and select a display type */}
436
- <div className="formRow mt-8">
437
- <div className="labelWidth">ButtonGroup example</div>
438
- <div className="formElementWidth">
439
- <ButtonGroup
440
- buttons={[
441
- {
442
- variant: 'button',
443
- buttonProps: {
444
- label: 'Left',
445
- value: 'left',
446
- variant: 'outline',
447
- isActive: btGroupType === 'left',
448
- },
449
- },
450
- {
451
- variant: 'button',
452
- buttonProps: {
453
- label: 'Center',
454
- value: 'center',
455
- variant: 'outline',
456
- isActive: btGroupType === 'center',
457
- },
458
- },
459
- {
460
- variant: 'button',
461
- buttonProps: {
462
- label: 'Right',
463
- value: 'right',
464
- variant: 'outline',
465
- isActive: btGroupType === 'right',
466
- },
467
- },
468
- ]}
469
- onChange={(type) => setBtGroupType(type)}
470
- extraClassNames="mb-4"
471
- />
472
- </div>
473
- </div>
474
- {/* Carousel Example: Show a set of images with captions, allow navigation */}
475
- <div className="formRow mt-8 h-60">
476
- <div className="labelWidth">Carousel example</div>
477
- <div className="formElementWidth">
478
- <Carousel
479
- carouselItems={[
480
- <div className="flex flex-col items-center justify-center p-4" key="slide1">
481
- <img
482
- src="https://images.unsplash.com/photo-1506744038136-46273834b3fb?auto=format&fit=crop&w=400&h=250&q=80"
483
- alt="Mountains"
484
- className="w-48 h-32 object-cover rounded-md mb-2"
485
- />
486
- <div className="font-bold">Explore the Mountains</div>
487
- <div className="text-xs tw-text-sq-color-gray">Find peace in nature's beauty.</div>
488
- </div>,
489
- <div className="flex flex-col items-center justify-center p-4" key="slide2">
490
- <img
491
- src="https://images.unsplash.com/photo-1465101046530-73398c7f28ca?auto=format&fit=crop&w=400&h=250&q=80"
492
- alt="City"
493
- className="w-48 h-32 object-cover rounded-md mb-2"
494
- />
495
- <div className="font-bold">City Lights</div>
496
- <div className="text-xs tw-text-sq-color-gray">Experience the energy of the city.</div>
497
- </div>,
498
- <div className="flex flex-col items-center justify-center p-4" key="slide3">
499
- <img
500
- src="https://images.unsplash.com/photo-1500534314209-a25ddb2bd429?auto=format&fit=crop&w=400&h=250&q=80"
501
- alt="Beach"
502
- className="w-48 h-32 object-cover rounded-md mb-2"
503
- />
504
- <div className="font-bold">Relax at the Beach</div>
505
- <div className="text-xs tw-text-sq-color-gray">Soak up the sun and surf.</div>
506
- </div>,
507
- ]}
508
- showArrows={false}
509
- continuous={true}
510
- showIndicators
511
- autoSlide={false}
512
- testId="carousel-example"
513
- extraClassNames="rounded-md shadow-sm mb-4"
514
- />
515
- </div>
516
- </div>
517
- {/* Collapse Example: Expand/collapse a section for additional details */}
518
- <div className="formRow mt-8">
519
- <div className="labelWidth">Collapse example</div>
520
- <div className="formElementWidth">
521
- <Button
522
- label={collapseVisible ? 'Hide advanced options' : 'Show advanced options'}
523
- variant="outline"
524
- onClick={() => setCollapseVisible((v) => !v)}
525
- extraClassNames="mb-2"
526
- />
527
- <Collapse isVisible={collapseVisible}>
528
- <div className="p-4 mt-2 bg-transparent rounded-md">
529
- <div className="font-bold">Advanced Settings</div>
530
- <div className="text-xs tw-text-sq-color-gray">Configure rarely used options here.</div>
531
- <Checkbox label="Enable beta features" />
532
- <Checkbox label="Show debug info" />
533
- </div>
534
- </Collapse>
535
- </div>
536
- </div>
537
- {/* SeeqActionDropdown Example: Contextual actions for a document */}
538
- <div className="formRow mt-8">
539
- <div className="labelWidth">SeeqActionDropdown example</div>
540
- <div className="formElementWidth">
541
- <SeeqActionDropdown
542
- seeqActionDropdownItems={[
543
- {
544
- display: 'Edit Document',
545
- icon: 'fc-edit',
546
- action: () => alert('Edit action triggered!'),
547
- text: 'Edit the selected document',
548
- enabled: true,
549
- },
550
- {
551
- display: 'Share',
552
- icon: 'fc-share',
553
- action: () => alert('Share action triggered!'),
554
- text: 'Share the selected document',
555
- enabled: true,
556
- },
557
- {
558
- display: 'Delete',
559
- icon: 'fc-delete',
560
- action: () => alert('Delete action triggered!'),
561
- text: 'Delete the selected document',
562
- enabled: true,
563
- },
564
- ]}
565
- trigger={<Button label="Actions" icon="fc-more" variant="outline" extraClassNames="w-32" />}
566
- variant="create-workbench"
567
- id="seeq-action-dropdown-example"
568
- />
569
- </div>
570
- </div>
571
- {/* InputGroup Example: Input with edit and delete icon buttons */}
572
- <div className="formRow mt-8">
573
- <div className="labelWidth">InputGroup example</div>
574
- <div className="formElementWidth">
575
- <InputGroup
576
- value={inputGroupValue}
577
- onChange={(e) => setInputGroupValue(e.target.value)}
578
- placeholder="Enter item name"
579
- append={[
580
- {
581
- variant: 'button',
582
- buttonProps: {
583
- icon: 'fc-edit',
584
- variant: 'outline',
585
- onClick: () => setInputGroupValue('Edit clicked'),
586
- },
587
- },
588
- {
589
- variant: 'button',
590
- buttonProps: {
591
- icon: 'fc-delete',
592
- variant: 'outline',
593
- onClick: () => setInputGroupValue('Delete clicked'),
594
- },
595
- },
596
- ]}
597
- extraClassNames="flex-1"
598
- />
599
- </div>
600
- </div>
601
- {/* ProgressBar Example: Show progress of a task */}
602
- <div className="formRow mt-8">
603
- <div className="labelWidth">ProgressBar example</div>
604
- <div className="formElementWidth flex flex-col items-start gap-1">
605
- <ProgressBar
606
- values={[
607
- { value: 85, label: 'Uploading orders', color: '#0491c2' },
608
- { value: 90, label: 'Processing invoices', color: '#f59e42' },
609
- ]}
610
- max={200}
611
- containerExtraClasses="w-full"
612
- />
613
- <span className="text-xs text-[#0491c2]">Uploading orders... 85%</span>
614
- <span className="text-xs text-[#f59e42]">Processing invoices... 90%</span>
615
- </div>
616
- </div>
617
- {/* Slider Example: Adjust a value with immediate feedback */}
618
- <div className="formRow mt-8">
619
- <div className="labelWidth">Slider example</div>
620
- <div className="formElementWidth flex items-center gap-4">
621
- <Slider
622
- min={0}
623
- max={100}
624
- step={5}
625
- value={sliderValue}
626
- onValueChange={(val: number[]) => setSliderValue(val[0])}
627
- rootExtraClassNames="w-64"
628
- />
629
- <span className="text-xs text-sq-color-gray">Current value: {sliderValue}</span>
630
- </div>
631
- </div>
632
- </div>
633
- </div>
634
- </div>
635
- );
636
- }
637
-
638
- export default Example;
1
+ import React from 'react';
2
+ import {
3
+ Button,
4
+ ButtonWithDropdown,
5
+ ButtonWithPopover,
6
+ Checkbox,
7
+ Icon,
8
+ Modal,
9
+ QTip,
10
+ Select,
11
+ Tabs,
12
+ TextArea,
13
+ TextField,
14
+ ToolbarButton,
15
+ Accordion,
16
+ Alert,
17
+ ButtonGroup,
18
+ Carousel,
19
+ Collapse,
20
+ InputGroup,
21
+ ProgressBar,
22
+ SeeqActionDropdown,
23
+ Slider,
24
+ } from '@seeqdev/qomponents';
25
+ import ComplexSelectExample, { SelectOption } from './ComplexSelectExample';
26
+
27
+ const availableThemes = [
28
+ { display: 'Analysis', value: 'color_analysis' },
29
+ { display: 'Topic', value: 'color_topic' },
30
+ { display: 'DataLab', value: 'color_datalab' },
31
+ ];
32
+
33
+ const options = [
34
+ { value: '1', label: 'Beginner' },
35
+ { value: '2', label: 'Advanced' },
36
+ { value: '3', label: 'Expert' },
37
+ ];
38
+
39
+ const Trigger = ({ label }: { label: string }) => (
40
+ <div className="flex justify-start items-center border-b px-2 tw-text-sq-color-dark">
41
+ <Icon icon="fc-arrow-dropdown" extraClassNames="tw-text-sq-color-dark mr-[0.5rem] text-[0.75rem]" type="text" />
42
+ {label}
43
+ </div>
44
+ );
45
+
46
+ const accordionItems = [
47
+ {
48
+ value: 'phone',
49
+ id: 'phone',
50
+ itemTestId: 'phonecall',
51
+ trigger: <Trigger label="Phone" />,
52
+ content: (
53
+ <div className="p-2 text-[0.8125rem] dark:tw-text-sq-white">
54
+ If you need to reach us, please call us at 555-555-5555.
55
+ </div>
56
+ ),
57
+ },
58
+ {
59
+ value: 'email',
60
+ id: 'email',
61
+ itemTestId: 'email',
62
+ trigger: <Trigger label="Email" />,
63
+ content: (
64
+ <div className="p-2 text-[0.8125rem] dark:text-sq-white">
65
+ If you need to reach us, please mail example@seeqtest.com
66
+ </div>
67
+ ),
68
+ },
69
+ {
70
+ value: 'address',
71
+ id: 'address',
72
+ itemTestId: 'address',
73
+ trigger: <Trigger label="Address" />,
74
+ content: (
75
+ <div className="p-2 text-[0.8125rem] dark:tw-text-sq-white">
76
+ If you need to reach us, please visit us at 1234 Main St., Anytown, USA.
77
+ </div>
78
+ ),
79
+ },
80
+ ];
81
+
82
+ const renderData = (text: string) => (
83
+ <div className="tw-text-sq-color-gray dark:tw-text-sq-white p-6">
84
+ <p className="mb-5 text-[0.9375rem] leading-normal">{text}</p>
85
+ </div>
86
+ );
87
+
88
+ const tabsList = [
89
+ {
90
+ id: 'plugins',
91
+ label: 'Plugins',
92
+ icon: 'fc-data',
93
+ content: renderData("Here's where you can find all the plugins you need. Enjoy!"),
94
+ },
95
+ {
96
+ id: 'addons',
97
+ label: 'Addons',
98
+ icon: 'fc-gears-2',
99
+ content: renderData("Here's where you can find all the addons you need. Enjoy!"),
100
+ },
101
+ {
102
+ id: 'shelf',
103
+ label: 'Shelf',
104
+ icon: 'fc-workbook-lock',
105
+ content: renderData("Here's where you can find all the private documents you need. Enjoy!"),
106
+ },
107
+ ];
108
+
109
+ function Example() {
110
+ /**
111
+ * Theming is supported "out of the box". To apply a theme wrap your addOn in a div and assign the class that
112
+ * matched the desired theme:
113
+ * - color_analysis for Analysis styled qomponents (green)
114
+ * - color_topic for Topic styled qomponents (blue)
115
+ * - DataLab for DataLab styled qomponents (orange)
116
+ */
117
+ const [theme, setTheme] = React.useState('color_analysis');
118
+ /**
119
+ * qomponents also support tw-dark. To render qomponents using tw-dark wrap your addOn in a div and assign the
120
+ * class "tw-dark" for dark-mode or "tw-light" for light mode.
121
+ */
122
+ const [mode, setMode] = React.useState('tw-light');
123
+
124
+ const [btGroupType, setBtGroupType] = React.useState('left');
125
+
126
+ /**
127
+ * This example uses controlled inputs (https://blog.logrocket.com/controlled-vs-uncontrolled-components-in-react/)
128
+ */
129
+ const [textFieldValue, setTextFieldValue] = React.useState('');
130
+ const [textAreaValue, setTextAreaValue] = React.useState('');
131
+ const [selectValue, setSelectValue] = React.useState();
132
+ const [complexSelectedValue, setComplexSelectedValue] = React.useState<SelectOption>();
133
+ const [alertDisplay, setAlertDisplay] = React.useState('success');
134
+ const [easeOfUse, setEaseOfUse] = React.useState(false);
135
+ const [lookAndFeel, setLookAndFeel] = React.useState(false);
136
+ const [speed, setSpeed] = React.useState(false);
137
+ const [help, setHelp] = React.useState('phone');
138
+ const [openDropdown, setOpenDropdown] = React.useState('');
139
+ const [openPopver, setOpenPopover] = React.useState('');
140
+ const [modalOpen, setModalOpen] = React.useState(false);
141
+ const [modalTitle, setModalTitle] = React.useState('Modal Title');
142
+ const [activeTab, setActiveTab] = React.useState('plugins');
143
+ const [collapseVisible, setCollapseVisible] = React.useState(false);
144
+ const [inputGroupValue, setInputGroupValue] = React.useState('');
145
+ const [sliderValue, setSliderValue] = React.useState<number>(50);
146
+
147
+ return (
148
+ // outer-wrapper div that assigns the mode (tw-dark or light) as well as the theme
149
+ <div className={`backdrop ${mode} ${theme}`}>
150
+ {/*add the QTip component at the very top level or your application to ensure your tooltips display as expected!*/}
151
+ <QTip />
152
+ <div className="flex-container">
153
+ <div className="scroll-container">
154
+ <div className="header">qomponents - form example</div>
155
+ <div>Use this example to see qomponents in actions.</div>
156
+ No libraries other than Seeq's qomponents (and of course React) are used to create this example, however
157
+ minimal CSS is used to create an appealing form - you can find all that CSS in index.css.
158
+ <p className="mb-10">
159
+ <b>A note on CSS:</b> Seeq's qomponents come fully styled and ready to use. While it is tempting to use the
160
+ available <i>extraClassNames</i> property to provide yet additional styling we strongly advise you to use
161
+ this property to provide only width, margins and padding. This will ensure for a smooth upgrade experience
162
+ when Seeq's look and feel changes. <br />
163
+ Tip: to indicate missing or wrong user input use the <i>showError</i> property available on TextField,
164
+ TextArea, as well as Select.
165
+ </p>
166
+ <p className="mb-10">
167
+ Using FontAwesome? You can pass FontAwesome Icons to the qomponent Icon component
168
+ <Icon icon="fa-regular fa-face-smile" extraClassNames="ml-10" />
169
+ </p>
170
+ <div className="mb-10">
171
+ <a
172
+ href="#"
173
+ onClick={() => setMode(mode === 'tw-light' ? 'tw-dark' : 'tw-light')}
174
+ // this is how you display a q-tip for an element that doesn't come with an "out-of the box" tooltip
175
+ // property:
176
+ data-qtip-text="Toggle Dark/Light Mode."
177
+ // the position is optional and defaults to top
178
+ data-qtip-position="bottom">
179
+ <Icon icon="fc-sun" extraClassNames="mr-10" />
180
+ Click to toggle to {mode === 'tw-light' ? 'Dark Mode' : 'Light Mode'}
181
+ </a>
182
+ </div>
183
+ <div className="formRow">
184
+ <div className="labelWidth">Select theme:</div>
185
+ {availableThemes.map((t) => (
186
+ <Checkbox
187
+ key={t.value}
188
+ type="radio"
189
+ checked={theme === t.value}
190
+ value={t.value}
191
+ label={t.display}
192
+ onChange={(e) => setTheme(e.target.value)}
193
+ extraClassNames="mr-10"
194
+ />
195
+ ))}
196
+ </div>
197
+ <div className="formRow">
198
+ <div className="labelWidth">AddOn Name</div>
199
+ <TextField
200
+ placeholder="you must enter a name"
201
+ extraClassNames="formElementWidth"
202
+ value={textFieldValue}
203
+ showError={textFieldValue === ''}
204
+ onChange={(e: React.ChangeEvent<HTMLInputElement>) => setTextFieldValue(e.target.value)}
205
+ />
206
+ </div>
207
+ <div className="formRow">
208
+ <div className="labelWidth">Description</div>
209
+ <TextArea
210
+ value={textAreaValue}
211
+ onChange={(e: React.ChangeEvent<HTMLInputElement>) => setTextAreaValue(e.target.value)}
212
+ extraClassNames="formElementWidth"
213
+ placeholder="provide some text here"
214
+ />
215
+ </div>
216
+ <div className="formRow">
217
+ <div className="labelWidth">Goals</div>
218
+ <div className="formColumn">
219
+ <div>
220
+ <Checkbox checked={easeOfUse} label="Ease of Use" onChange={() => setEaseOfUse(!easeOfUse)} />
221
+ <Checkbox
222
+ checked={lookAndFeel}
223
+ label="Improved Look & Feel"
224
+ onChange={() => setLookAndFeel(!lookAndFeel)}
225
+ />
226
+ <Checkbox checked={speed} label="Speedy Development" onChange={() => setSpeed(!speed)} />
227
+ </div>
228
+ </div>
229
+ </div>
230
+ <div className="formRow">
231
+ <div className="labelWidth">Level</div>
232
+ <Select
233
+ value={selectValue}
234
+ extraClassNames="formElementWidth"
235
+ onChange={(selectValue) => setSelectValue(selectValue)}
236
+ options={options}
237
+ placeholder="please choose"
238
+ />
239
+ </div>
240
+ <div className="formRow">
241
+ <div className="labelWidth">Advanced</div>
242
+ <ComplexSelectExample
243
+ value={complexSelectedValue}
244
+ onChange={(selectedOption: SelectOption) => setComplexSelectedValue(selectedOption)}
245
+ />
246
+ </div>
247
+ <div className="formRow">
248
+ <div className="labelWidth">Website tools</div>
249
+ <div className="formElementWidth border rounded-sm">
250
+ <Tabs
251
+ stretchTabs={true}
252
+ activeTab={activeTab}
253
+ onTabSelect={setActiveTab}
254
+ defaultActiveTab="data"
255
+ tabs={tabsList}
256
+ />
257
+ </div>
258
+ </div>
259
+ <div className="formRow">
260
+ <div className="labelWidth">Get help</div>
261
+ <div className="formElementWidth border rounded-sm">
262
+ <Accordion
263
+ accordionItems={accordionItems}
264
+ value={help}
265
+ testId="basic-accordion1"
266
+ onItemSelect={(value) => setHelp(value)}
267
+ />
268
+ </div>
269
+ </div>
270
+ <div className="formRow">
271
+ <div className="labelWidth">Tools</div>
272
+ <div className="formElementWidth formRow border rounded-sm p-4 flex justify-center">
273
+ <ToolbarButton
274
+ icon="fc-y-axis"
275
+ label="Analyzer"
276
+ testId="basic-analyzer"
277
+ tooltipText="Analize data from any csv document"
278
+ hasArrow
279
+ tooltipOptions={{ position: 'top', delay: 0 }}
280
+ isHtmlTooltip={false}
281
+ popoverContent={
282
+ <div className="text-sm dark:text-white">
283
+ <p className="p-2">Select file from your computer or google drive</p>
284
+ <Button type="button" label="Click to select file" />
285
+ </div>
286
+ }
287
+ />
288
+ <ToolbarButton
289
+ icon="fc-sun"
290
+ label={mode === 'light' ? 'Dark Mode' : 'Light Mode'}
291
+ testId="basic-toggler"
292
+ isActive={mode === 'tw-light'}
293
+ tooltipText="Toggle light and dark modes"
294
+ onClick={() => setMode(mode === 'tw-light' ? 'tw-dark' : 'tw-light')}
295
+ tooltipOptions={{ position: 'top', delay: 0 }}
296
+ isHtmlTooltip={false}
297
+ />
298
+ <ToolbarButton
299
+ icon="fc-marker"
300
+ label="Language"
301
+ testId="basic-language-changer"
302
+ tooltipText="Disabled toolbar to change website language"
303
+ tooltipOptions={{ position: 'top', delay: 0 }}
304
+ disabled
305
+ />
306
+ </div>
307
+ </div>
308
+ <div className="formRow">
309
+ <div className="labelWidth">Take action</div>
310
+ <div className="formElementWidth">
311
+ <ButtonWithDropdown
312
+ onOpenChange={(isOpen) => setOpenDropdown(isOpen ? 'dropdown-1' : '')}
313
+ isOpen={openDropdown === 'dropdown-1'}
314
+ triggerIcon={
315
+ <Icon
316
+ icon="fc-more"
317
+ type="text"
318
+ extraClassNames="tw-text-sq-text-color dark:tw-text-sq-white w-[18px]"
319
+ />
320
+ }
321
+ containerTestId="basic-dropdown1"
322
+ tooltip="See actions to take for plugins"
323
+ tooltipDelay={0}
324
+ hasArrow
325
+ tooltipPlacement="top"
326
+ dropdownItems={[
327
+ { label: 'Create', icon: 'fc-add-row', onClick: () => setOpenDropdown('') },
328
+ { label: 'Update', icon: 'fc-asset-tree', onClick: () => setOpenDropdown(''), hasDivider: true },
329
+ {
330
+ label: 'Sort',
331
+ icon: 'fc-search-power',
332
+ onClick: () => setOpenDropdown(''),
333
+ subMenuItems: [
334
+ { label: 'Ascending', iconClass: 'fc-arrow_up', onClick: () => setOpenDropdown('') },
335
+ { label: 'Descending', iconClass: 'fc-arrow_down', onClick: () => setOpenDropdown('') },
336
+ ],
337
+ },
338
+ { label: 'Delete', icon: 'fc-delete', onClick: () => setOpenDropdown('') },
339
+ ]}
340
+ />
341
+ </div>
342
+ </div>
343
+ <div className="formRow mt-4">
344
+ <div className="labelWidth">More information</div>
345
+ <div className="formElementWidth">
346
+ <ButtonWithPopover
347
+ trigger={<Icon type="text" icon="fc-circle_info" />}
348
+ containerTestId="basic-popover-1"
349
+ isOpen={openPopver === 'basic-popover-1'}
350
+ onOpenChange={(isOpen) => setOpenPopover(isOpen ? 'basic-popover-1' : '')}
351
+ isHoverEnabled={false}
352
+ align="start"
353
+ tooltipPlacement="top"
354
+ hasArrow
355
+ isHtmlTooltip={false}>
356
+ <div className="text-sm dark:text-white w-72 p-4">
357
+ <p className="font-bold">What are plugins?</p>
358
+ Plugins are modular software components that extend the functionality of an application. They allow
359
+ users to add new features or customize existing ones. Plugins can be easily integrated into an
360
+ application and provide a way to enhance its capabilities without modifying the core codebase.Plugins
361
+ are modular software components that extend the functionality of an application.
362
+ </div>
363
+ </ButtonWithPopover>
364
+ </div>
365
+ </div>
366
+ <div className="formRow mt-4">
367
+ <div className="labelWidth">Accept terms</div>
368
+ <div className="formElementWidth">
369
+ <Button
370
+ onClick={() => {
371
+ setModalOpen(true);
372
+ }}
373
+ label="View terms of use"
374
+ />
375
+ <Modal
376
+ open={modalOpen}
377
+ onClose={() => setModalOpen(false)}
378
+ title="Terms of use"
379
+ titleIcon="fc-circle_info"
380
+ isTitleEditable
381
+ onTitleChanged={(event) => setModalTitle(event.target.value)}
382
+ hideCloseIcon={false}
383
+ size="lg"
384
+ customButton={true}
385
+ customButtonLabel="Back">
386
+ <div>
387
+ <p>
388
+ By using this website, you agree to the following terms of use: Lorem ipsum dolor sit amet,
389
+ consectetur adipiscing elit. Sed euismod, justo id aliquet aliquam, elit enim tincidunt mauris, nec
390
+ aliquam nunc elit vitae nunc. Sed vitae fringilla mauris. Nulla facilisi. Sed auctor, nunc vel
391
+ aliquet luctus, nisl nunc tincidunt nunc, id lacinia mauris metus id nunc. Sed auctor, nunc vel
392
+ aliquet luctus, nisl nunc tincidunt nunc, id lacinia mauris metus id nunc.
393
+ </p>
394
+ </div>
395
+ </Modal>
396
+ </div>
397
+ </div>
398
+ <div className="formRow mt-8">
399
+ <div className="labelWidth">Button example</div>
400
+ <div className="formElementWidth">
401
+ <div className="flex gap-2 mb-4">
402
+ <Button label="Show Success" onClick={() => setAlertDisplay('success')} variant="theme" />
403
+ <Button label="Show Cancel" onClick={() => setAlertDisplay('cancel')} variant="danger" />
404
+ <Button label="Show Info" onClick={() => setAlertDisplay('info')} variant="outline" />
405
+ </div>
406
+ </div>
407
+ </div>
408
+ {/* Alert Example: Show info, success, or warning based on form submission */}
409
+ <div className="formRow mt-8">
410
+ <div className="labelWidth">Alert example</div>
411
+ <div className="formElementWidth">
412
+ {alertDisplay === 'success' && (
413
+ <Alert variant="theme" testId="alert-success" dismissible>
414
+ <div className="font-bold">Submission Successful</div>
415
+ <div>
416
+ Your add-on details have been submitted successfully. Thank you for contributing to the Seeq Add-on
417
+ ecosystem!
418
+ </div>
419
+ </Alert>
420
+ )}
421
+ {alertDisplay === 'cancel' && (
422
+ <Alert variant="warning" testId="alert-cancel" dismissible>
423
+ <div className="font-bold">Submission Cancelled</div>
424
+ <div>You have cancelled the submission. No changes were saved.</div>
425
+ </Alert>
426
+ )}
427
+ {alertDisplay === 'info' && (
428
+ <Alert variant="gray" testId="alert-info" dismissible>
429
+ <div className="font-bold">Ready to Submit</div>
430
+ <div>Fill out the form and click Submit to add your new add-on to Seeq.</div>
431
+ </Alert>
432
+ )}
433
+ </div>
434
+ </div>
435
+ {/* ButtonGroup Example: Show and select a display type */}
436
+ <div className="formRow mt-8">
437
+ <div className="labelWidth">ButtonGroup example</div>
438
+ <div className="formElementWidth">
439
+ <ButtonGroup
440
+ buttons={[
441
+ {
442
+ variant: 'button',
443
+ buttonProps: {
444
+ label: 'Left',
445
+ value: 'left',
446
+ variant: 'outline',
447
+ isActive: btGroupType === 'left',
448
+ },
449
+ },
450
+ {
451
+ variant: 'button',
452
+ buttonProps: {
453
+ label: 'Center',
454
+ value: 'center',
455
+ variant: 'outline',
456
+ isActive: btGroupType === 'center',
457
+ },
458
+ },
459
+ {
460
+ variant: 'button',
461
+ buttonProps: {
462
+ label: 'Right',
463
+ value: 'right',
464
+ variant: 'outline',
465
+ isActive: btGroupType === 'right',
466
+ },
467
+ },
468
+ ]}
469
+ onChange={(type) => setBtGroupType(type)}
470
+ extraClassNames="mb-4"
471
+ />
472
+ </div>
473
+ </div>
474
+ {/* Carousel Example: Show a set of images with captions, allow navigation */}
475
+ <div className="formRow mt-8 h-60">
476
+ <div className="labelWidth">Carousel example</div>
477
+ <div className="formElementWidth">
478
+ <Carousel
479
+ carouselItems={[
480
+ <div className="flex flex-col items-center justify-center p-4" key="slide1">
481
+ <img
482
+ src="https://images.unsplash.com/photo-1506744038136-46273834b3fb?auto=format&fit=crop&w=400&h=250&q=80"
483
+ alt="Mountains"
484
+ className="w-48 h-32 object-cover rounded-md mb-2"
485
+ />
486
+ <div className="font-bold">Explore the Mountains</div>
487
+ <div className="text-xs tw-text-sq-color-gray">Find peace in nature's beauty.</div>
488
+ </div>,
489
+ <div className="flex flex-col items-center justify-center p-4" key="slide2">
490
+ <img
491
+ src="https://images.unsplash.com/photo-1465101046530-73398c7f28ca?auto=format&fit=crop&w=400&h=250&q=80"
492
+ alt="City"
493
+ className="w-48 h-32 object-cover rounded-md mb-2"
494
+ />
495
+ <div className="font-bold">City Lights</div>
496
+ <div className="text-xs tw-text-sq-color-gray">Experience the energy of the city.</div>
497
+ </div>,
498
+ <div className="flex flex-col items-center justify-center p-4" key="slide3">
499
+ <img
500
+ src="https://images.unsplash.com/photo-1500534314209-a25ddb2bd429?auto=format&fit=crop&w=400&h=250&q=80"
501
+ alt="Beach"
502
+ className="w-48 h-32 object-cover rounded-md mb-2"
503
+ />
504
+ <div className="font-bold">Relax at the Beach</div>
505
+ <div className="text-xs tw-text-sq-color-gray">Soak up the sun and surf.</div>
506
+ </div>,
507
+ ]}
508
+ showArrows={false}
509
+ continuous={true}
510
+ showIndicators
511
+ autoSlide={false}
512
+ testId="carousel-example"
513
+ extraClassNames="rounded-md shadow-sm mb-4"
514
+ />
515
+ </div>
516
+ </div>
517
+ {/* Collapse Example: Expand/collapse a section for additional details */}
518
+ <div className="formRow mt-8">
519
+ <div className="labelWidth">Collapse example</div>
520
+ <div className="formElementWidth">
521
+ <Button
522
+ label={collapseVisible ? 'Hide advanced options' : 'Show advanced options'}
523
+ variant="outline"
524
+ onClick={() => setCollapseVisible((v) => !v)}
525
+ extraClassNames="mb-2"
526
+ />
527
+ <Collapse isVisible={collapseVisible}>
528
+ <div className="p-4 mt-2 bg-transparent rounded-md">
529
+ <div className="font-bold">Advanced Settings</div>
530
+ <div className="text-xs tw-text-sq-color-gray">Configure rarely used options here.</div>
531
+ <Checkbox label="Enable beta features" />
532
+ <Checkbox label="Show debug info" />
533
+ </div>
534
+ </Collapse>
535
+ </div>
536
+ </div>
537
+ {/* SeeqActionDropdown Example: Contextual actions for a document */}
538
+ <div className="formRow mt-8">
539
+ <div className="labelWidth">SeeqActionDropdown example</div>
540
+ <div className="formElementWidth">
541
+ <SeeqActionDropdown
542
+ seeqActionDropdownItems={[
543
+ {
544
+ display: 'Edit Document',
545
+ icon: 'fc-edit',
546
+ action: () => alert('Edit action triggered!'),
547
+ text: 'Edit the selected document',
548
+ enabled: true,
549
+ },
550
+ {
551
+ display: 'Share',
552
+ icon: 'fc-share',
553
+ action: () => alert('Share action triggered!'),
554
+ text: 'Share the selected document',
555
+ enabled: true,
556
+ },
557
+ {
558
+ display: 'Delete',
559
+ icon: 'fc-delete',
560
+ action: () => alert('Delete action triggered!'),
561
+ text: 'Delete the selected document',
562
+ enabled: true,
563
+ },
564
+ ]}
565
+ trigger={<Button label="Actions" icon="fc-more" variant="outline" extraClassNames="w-32" />}
566
+ variant="create-workbench"
567
+ id="seeq-action-dropdown-example"
568
+ />
569
+ </div>
570
+ </div>
571
+ {/* InputGroup Example: Input with edit and delete icon buttons */}
572
+ <div className="formRow mt-8">
573
+ <div className="labelWidth">InputGroup example</div>
574
+ <div className="formElementWidth">
575
+ <InputGroup
576
+ value={inputGroupValue}
577
+ onChange={(e) => setInputGroupValue(e.target.value)}
578
+ placeholder="Enter item name"
579
+ append={[
580
+ {
581
+ variant: 'button',
582
+ buttonProps: {
583
+ icon: 'fc-edit',
584
+ variant: 'outline',
585
+ onClick: () => setInputGroupValue('Edit clicked'),
586
+ },
587
+ },
588
+ {
589
+ variant: 'button',
590
+ buttonProps: {
591
+ icon: 'fc-delete',
592
+ variant: 'outline',
593
+ onClick: () => setInputGroupValue('Delete clicked'),
594
+ },
595
+ },
596
+ ]}
597
+ extraClassNames="flex-1"
598
+ />
599
+ </div>
600
+ </div>
601
+ {/* ProgressBar Example: Show progress of a task */}
602
+ <div className="formRow mt-8">
603
+ <div className="labelWidth">ProgressBar example</div>
604
+ <div className="formElementWidth flex flex-col items-start gap-1">
605
+ <ProgressBar
606
+ values={[
607
+ { value: 85, label: 'Uploading orders', color: '#0491c2' },
608
+ { value: 90, label: 'Processing invoices', color: '#f59e42' },
609
+ ]}
610
+ max={200}
611
+ containerExtraClasses="w-full"
612
+ />
613
+ <span className="text-xs text-[#0491c2]">Uploading orders... 85%</span>
614
+ <span className="text-xs text-[#f59e42]">Processing invoices... 90%</span>
615
+ </div>
616
+ </div>
617
+ {/* Slider Example: Adjust a value with immediate feedback */}
618
+ <div className="formRow mt-8">
619
+ <div className="labelWidth">Slider example</div>
620
+ <div className="formElementWidth flex items-center gap-4">
621
+ <Slider
622
+ min={0}
623
+ max={100}
624
+ step={5}
625
+ value={sliderValue}
626
+ onValueChange={(val: number[]) => setSliderValue(val[0])}
627
+ rootExtraClassNames="w-64"
628
+ />
629
+ <span className="text-xs text-sq-color-gray">Current value: {sliderValue}</span>
630
+ </div>
631
+ </div>
632
+ </div>
633
+ </div>
634
+ </div>
635
+ );
636
+ }
637
+
638
+ export default Example;