@gobolt/genesis 0.3.25 → 0.3.27

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 (365) hide show
  1. package/dist/bundle.css +1205 -0
  2. package/dist/components/Avatar/Avatar.d.ts +16 -0
  3. package/dist/components/Avatar/index.d.ts +2 -0
  4. package/dist/components/{TableWithControls/components/Tooltip → Avatar}/styles.d.ts +1 -1
  5. package/dist/components/Badge/index.d.ts +2 -2
  6. package/dist/components/Badge/styles.d.ts +3 -12
  7. package/dist/components/Breadcrumb/Breadcrumb.d.ts +7 -0
  8. package/dist/components/Breadcrumb/index.d.ts +4 -0
  9. package/dist/components/Breadcrumb/styles.d.ts +5 -0
  10. package/dist/components/Button/Button.d.ts +3 -3
  11. package/dist/components/Button/IconButton.d.ts +1 -1
  12. package/dist/components/Button/icon-button-styles.d.ts +1 -12
  13. package/dist/components/Button/index.d.ts +4 -4
  14. package/dist/components/Button/styles.d.ts +1 -16
  15. package/dist/components/Card/Card.d.ts +9 -0
  16. package/dist/components/Card/index.d.ts +2 -0
  17. package/dist/components/Card/styles.d.ts +6 -0
  18. package/dist/components/Chat/Chat.d.ts +18 -0
  19. package/dist/components/Chat/Message.d.ts +8 -0
  20. package/dist/components/Chat/index.d.ts +2 -0
  21. package/dist/components/Checkbox/Checkbox.d.ts +9 -0
  22. package/dist/components/Checkbox/index.d.ts +2 -0
  23. package/dist/components/Checkbox/styles.d.ts +10 -0
  24. package/dist/components/DatePicker/DatePicker.d.ts +4 -0
  25. package/dist/components/DatePicker/index.d.ts +2 -0
  26. package/dist/components/DateRangePicker/DateRangePicker.d.ts +4 -0
  27. package/dist/components/DateRangePicker/index.d.ts +2 -0
  28. package/dist/components/ErrorBoundary/ErrorBoundary.d.ts +19 -0
  29. package/dist/components/ErrorBoundary/index.d.ts +2 -0
  30. package/dist/components/ErrorBoundaryFallback/ErrorBoundaryFallback.d.ts +8 -0
  31. package/dist/components/ErrorBoundaryFallback/index.d.ts +2 -0
  32. package/dist/components/ErrorBoundaryFallback/styles.d.ts +1 -0
  33. package/dist/components/Form/Form.d.ts +25 -0
  34. package/dist/components/Form/index.d.ts +2 -0
  35. package/dist/components/Form/styles.d.ts +2 -0
  36. package/dist/components/Glyph/custom/UnitNumber.d.ts +5 -0
  37. package/dist/components/Input/Input.d.ts +4 -4
  38. package/dist/components/Input/index.d.ts +2 -2
  39. package/dist/components/Input/styles.d.ts +1 -18
  40. package/dist/components/Insights/BarChart/BarChart.d.ts +30 -0
  41. package/dist/components/Insights/BarChart/index.d.ts +2 -0
  42. package/dist/components/Insights/BarChart/styles.d.ts +2 -0
  43. package/dist/components/Insights/DonutChart/DonutChart.d.ts +19 -0
  44. package/dist/components/Insights/DonutChart/index.d.ts +2 -0
  45. package/dist/components/Insights/DonutChart/styles.d.ts +2 -0
  46. package/dist/components/Insights/LineChart/LineChart.d.ts +23 -0
  47. package/dist/components/Insights/LineChart/index.d.ts +2 -0
  48. package/dist/components/Insights/LineChart/styles.d.ts +2 -0
  49. package/dist/components/Insights/index.d.ts +6 -0
  50. package/dist/components/Layout/Content/Content.d.ts +10 -0
  51. package/dist/components/Layout/Content/index.d.ts +2 -0
  52. package/dist/components/Layout/Content/styles.d.ts +4 -0
  53. package/dist/components/Layout/Layout.d.ts +8 -0
  54. package/dist/components/Layout/index.d.ts +2 -0
  55. package/dist/components/Message/Message.d.ts +14 -0
  56. package/dist/components/Message/index.d.ts +2 -0
  57. package/dist/components/Message/styles.d.ts +3 -0
  58. package/dist/components/Notification/Notification.d.ts +17 -0
  59. package/dist/components/Notification/NotificationBadge/NotificationBadge.d.ts +6 -0
  60. package/dist/components/Notification/NotificationBadge/icons/ASN.d.ts +2 -0
  61. package/dist/components/Notification/NotificationBadge/icons/Appointment.d.ts +2 -0
  62. package/dist/components/Notification/NotificationBadge/icons/Inventory.d.ts +2 -0
  63. package/dist/components/Notification/NotificationBadge/icons/Parcel.d.ts +2 -0
  64. package/dist/components/Notification/NotificationBadge/icons/Product.d.ts +2 -0
  65. package/dist/components/Notification/NotificationBadge/icons/Route.d.ts +2 -0
  66. package/dist/components/Notification/NotificationBadge/icons/Shipment.d.ts +2 -0
  67. package/dist/components/Notification/NotificationBadge/icons/ShoppingCart.d.ts +2 -0
  68. package/dist/components/Notification/NotificationBadge/icons/System.d.ts +2 -0
  69. package/dist/components/Notification/NotificationBadge/styles.d.ts +3 -0
  70. package/dist/components/Notification/NotificationRightChevron.d.ts +2 -0
  71. package/dist/components/Notification/index.d.ts +2 -0
  72. package/dist/components/Notification/styles.d.ts +5 -0
  73. package/dist/components/Popover/Popover.d.ts +10 -0
  74. package/dist/components/Popover/index.d.ts +2 -0
  75. package/dist/components/Popover/styles.d.ts +2 -0
  76. package/dist/components/Progress/Progress.d.ts +18 -0
  77. package/dist/components/Progress/Progress.util.d.ts +3 -0
  78. package/dist/components/Progress/ProgressText.d.ts +10 -0
  79. package/dist/components/Progress/index.d.ts +2 -0
  80. package/dist/components/Progress/styles.d.ts +4 -0
  81. package/dist/components/Radio/Radio.d.ts +10 -0
  82. package/dist/components/Radio/RadioGroup.d.ts +12 -0
  83. package/dist/components/Radio/index.d.ts +4 -0
  84. package/dist/components/Radio/states/RadioChecked.d.ts +2 -0
  85. package/dist/components/Radio/states/RadioCheckedDisabled.d.ts +2 -0
  86. package/dist/components/Radio/states/RadioCheckedFocussed.d.ts +2 -0
  87. package/dist/components/Radio/states/RadioCheckedHover.d.ts +2 -0
  88. package/dist/components/Radio/states/RadioUnchecked.d.ts +2 -0
  89. package/dist/components/Radio/states/RadioUncheckedDisabled.d.ts +2 -0
  90. package/dist/components/Radio/states/RadioUncheckedFocussed.d.ts +2 -0
  91. package/dist/components/Radio/states/RadioUncheckedHover.d.ts +2 -0
  92. package/dist/components/Row/Row.d.ts +13 -0
  93. package/dist/components/Row/RowActions/RowActions.d.ts +9 -0
  94. package/dist/components/Row/RowActions/styles.d.ts +1 -0
  95. package/dist/components/Row/RowLabelValue/RowLabelValue.d.ts +10 -0
  96. package/dist/components/Row/RowLabelValue/RowSkeleton.d.ts +3 -0
  97. package/dist/components/Row/RowLabelValue/styles.d.ts +5 -0
  98. package/dist/components/Row/index.d.ts +2 -0
  99. package/dist/components/Row/styles.d.ts +6 -0
  100. package/dist/components/SegmentedControls/SegmentedControls.d.ts +12 -0
  101. package/dist/components/SegmentedControls/index.d.ts +2 -0
  102. package/dist/components/SegmentedControls/styles.d.ts +3 -0
  103. package/dist/components/Select/Select.d.ts +4 -4
  104. package/dist/components/Select/SelectTrigger.d.ts +3 -3
  105. package/dist/components/Select/index.d.ts +2 -2
  106. package/dist/components/Shapes/Shapes.d.ts +6 -0
  107. package/dist/components/Shapes/index.d.ts +2 -0
  108. package/dist/components/Shapes/variants/Circle.d.ts +5 -0
  109. package/dist/components/Shapes/variants/Rectangle.d.ts +5 -0
  110. package/dist/components/Shapes/variants/Triangle.d.ts +5 -0
  111. package/dist/components/Switch/Switch.d.ts +9 -0
  112. package/dist/components/Switch/index.d.ts +2 -0
  113. package/dist/components/Switch/styles.d.ts +2 -0
  114. package/dist/components/Table/Table.d.ts +3 -4
  115. package/dist/components/Table/TableControls/CustomPagination.d.ts +2 -2
  116. package/dist/components/Table/TableControls/PaginationNumber.d.ts +1 -1
  117. package/dist/components/Table/TableControls/PrimaryTableControlsRow.d.ts +1 -1
  118. package/dist/components/Table/TableControls/SecondaryTableControlsRow.d.ts +1 -1
  119. package/dist/components/Table/TableControls/TableControls.d.ts +3 -3
  120. package/dist/components/Table/TableControls/index.d.ts +2 -2
  121. package/dist/components/Table/TablePagination.d.ts +2 -2
  122. package/dist/components/Table/__mocks__/table-mocks.d.ts +1 -1
  123. package/dist/components/Table/index.d.ts +6 -6
  124. package/dist/components/Table/styles.d.ts +3 -17
  125. package/dist/components/Table/useTable.d.ts +2 -2
  126. package/dist/components/TableWithControls/TableWithControls.d.ts +2 -2
  127. package/dist/components/TableWithControls/index.d.ts +3 -3
  128. package/dist/components/TableWithControls/useTableWithControls.d.ts +4 -4
  129. package/dist/components/Tabs/Tabs.d.ts +50 -0
  130. package/dist/components/Tabs/index.d.ts +2 -0
  131. package/dist/components/Tabs/styles.d.ts +3 -0
  132. package/dist/components/Tile/Tile.d.ts +10 -0
  133. package/dist/components/Tile/index.d.ts +2 -0
  134. package/dist/components/Tile/styles.d.ts +4 -0
  135. package/dist/components/Toast/Toast.d.ts +13 -0
  136. package/dist/components/Toast/index.d.ts +2 -0
  137. package/dist/components/Toast/styles.d.ts +3 -0
  138. package/dist/components/Tooltip/index.d.ts +2 -2
  139. package/dist/components/Tooltip/styles.d.ts +1 -14
  140. package/dist/components/Typography/Typography.d.ts +2 -2
  141. package/dist/components/Typography/index.d.ts +2 -2
  142. package/dist/components/Typography/styles.d.ts +3 -21
  143. package/dist/components/UtilityButton/UtilityButton.d.ts +1 -1
  144. package/dist/components/UtilityButton/index.d.ts +2 -2
  145. package/dist/components/index.d.ts +74 -7
  146. package/dist/index.cjs +84476 -0
  147. package/dist/index.d.ts +6 -10
  148. package/dist/index.js +84459 -9
  149. package/dist/providers/BreakpointProvider.d.ts +7 -0
  150. package/dist/providers/GenesisProvider.d.ts +7 -0
  151. package/dist/providers/ToastProvider.d.ts +12 -0
  152. package/dist/providers/index.d.ts +2 -0
  153. package/dist/providers/useGenesis.d.ts +7 -0
  154. package/dist/styles/global-styles.d.ts +1 -0
  155. package/dist/styles/theme/genesis-theme.d.ts +1 -1
  156. package/dist/styles/theme/index.d.ts +2 -2
  157. package/dist/types/index.d.ts +1 -0
  158. package/package.json +17 -18
  159. package/dist/components/Badge/Badge.js +0 -51
  160. package/dist/components/Badge/index.js +0 -1
  161. package/dist/components/Badge/styles.js +0 -21
  162. package/dist/components/Button/Button.js +0 -36
  163. package/dist/components/Button/IconButton.js +0 -32
  164. package/dist/components/Button/__stories__/Button.stories.d.ts +0 -12
  165. package/dist/components/Button/__stories__/Button.stories.js +0 -154
  166. package/dist/components/Button/__stories__/IconButton.stories.d.ts +0 -8
  167. package/dist/components/Button/__stories__/IconButton.stories.js +0 -133
  168. package/dist/components/Button/__stories__/UtilityButton.stories.d.ts +0 -8
  169. package/dist/components/Button/__stories__/UtilityButton.stories.js +0 -71
  170. package/dist/components/Button/__tests__/Button.test.js +0 -19
  171. package/dist/components/Button/components/Button/Button.d.ts +0 -16
  172. package/dist/components/Button/components/Button/Button.js +0 -13
  173. package/dist/components/Button/components/Button/styles.d.ts +0 -1
  174. package/dist/components/Button/components/Button/styles.js +0 -118
  175. package/dist/components/Button/constants/index.d.ts +0 -163
  176. package/dist/components/Button/constants/index.js +0 -89
  177. package/dist/components/Button/icon-button-styles.js +0 -23
  178. package/dist/components/Button/index.js +0 -2
  179. package/dist/components/Button/styles.js +0 -60
  180. package/dist/components/Button/styles.ts +0 -176
  181. package/dist/components/Input/Input.js +0 -57
  182. package/dist/components/Input/index.js +0 -1
  183. package/dist/components/Input/styles.js +0 -76
  184. package/dist/components/Select/Select.js +0 -199
  185. package/dist/components/Select/SelectTrigger.js +0 -89
  186. package/dist/components/Select/index.js +0 -1
  187. package/dist/components/Table/Table/Table.d.ts +0 -51
  188. package/dist/components/Table/Table/Table.js +0 -14
  189. package/dist/components/Table/Table/TableControls/CustomPagination.d.ts +0 -13
  190. package/dist/components/Table/Table/TableControls/CustomPagination.js +0 -158
  191. package/dist/components/Table/Table/TableControls/PaginationNumber.d.ts +0 -7
  192. package/dist/components/Table/Table/TableControls/PaginationNumber.js +0 -30
  193. package/dist/components/Table/Table/styles.d.ts +0 -14
  194. package/dist/components/Table/Table/styles.js +0 -64
  195. package/dist/components/Table/Table/useTable.d.ts +0 -26
  196. package/dist/components/Table/Table/useTable.js +0 -141
  197. package/dist/components/Table/Table.js +0 -33
  198. package/dist/components/Table/TableControls/CustomPagination.js +0 -174
  199. package/dist/components/Table/TableControls/PaginationNumber.js +0 -46
  200. package/dist/components/Table/TableControls/PrimaryTableControlsRow.js +0 -78
  201. package/dist/components/Table/TableControls/SecondaryTableControlsRow.js +0 -65
  202. package/dist/components/Table/TableControls/TableControls.js +0 -14
  203. package/dist/components/Table/TableControls/TableControls.tsx +0 -51
  204. package/dist/components/Table/TableControls/__stories__/CustomPaginationStandalone.stories.d.ts +0 -9
  205. package/dist/components/Table/TableControls/__stories__/CustomPaginationStandalone.stories.js +0 -58
  206. package/dist/components/Table/TableControls/__stories__/PaginationNumber.stories.d.ts +0 -7
  207. package/dist/components/Table/TableControls/__stories__/PaginationNumber.stories.js +0 -37
  208. package/dist/components/Table/TableControls/__stories__/TableControls.stories.d.ts +0 -6
  209. package/dist/components/Table/TableControls/__stories__/TableControls.stories.js +0 -106
  210. package/dist/components/Table/TableControls/__tests__/CustomPagination.test.d.ts +0 -1
  211. package/dist/components/Table/TableControls/__tests__/CustomPagination.test.js +0 -82
  212. package/dist/components/Table/TableControls/__tests__/TableControls.test.d.ts +0 -1
  213. package/dist/components/Table/TableControls/__tests__/TableControls.test.js +0 -74
  214. package/dist/components/Table/TableControls/index.js +0 -1
  215. package/dist/components/Table/TableControls/styles.d.ts +0 -13
  216. package/dist/components/Table/TableControls/styles.js +0 -16
  217. package/dist/components/Table/TablePagination.js +0 -28
  218. package/dist/components/Table/Typography/Typography.d.ts +0 -17
  219. package/dist/components/Table/Typography/Typography.js +0 -16
  220. package/dist/components/Table/Typography/index.d.ts +0 -2
  221. package/dist/components/Table/Typography/index.js +0 -1
  222. package/dist/components/Table/Typography/styles.d.ts +0 -3
  223. package/dist/components/Table/Typography/styles.js +0 -54
  224. package/dist/components/Table/__mocks__/table-mocks.js +0 -310
  225. package/dist/components/Table/__stories__/GenesisTable.stories.d.ts +0 -5
  226. package/dist/components/Table/__stories__/GenesisTable.stories.js +0 -23
  227. package/dist/components/Table/__stories__/Table.stories.d.ts +0 -8
  228. package/dist/components/Table/__stories__/Table.stories.js +0 -188
  229. package/dist/components/Table/__tests__/table.test.d.ts +0 -1
  230. package/dist/components/Table/__tests__/table.test.js +0 -47
  231. package/dist/components/Table/index.js +0 -3
  232. package/dist/components/Table/styles.js +0 -20
  233. package/dist/components/Table/useTable.js +0 -238
  234. package/dist/components/TableWithControls/TableWithControls.js +0 -21
  235. package/dist/components/TableWithControls/__stories__/TableWithControls.stories.d.ts +0 -6
  236. package/dist/components/TableWithControls/__stories__/TableWithControls.stories.js +0 -178
  237. package/dist/components/TableWithControls/__stories__/TableWithControlsStory.d.ts +0 -1
  238. package/dist/components/TableWithControls/__stories__/TableWithControlsStory.js +0 -55
  239. package/dist/components/TableWithControls/__tests__/TableWithControls.test.d.ts +0 -1
  240. package/dist/components/TableWithControls/__tests__/TableWithControls.test.js +0 -41
  241. package/dist/components/TableWithControls/components/Badge/Badge.d.ts +0 -16
  242. package/dist/components/TableWithControls/components/Badge/Badge.js +0 -28
  243. package/dist/components/TableWithControls/components/Badge/index.d.ts +0 -2
  244. package/dist/components/TableWithControls/components/Badge/index.js +0 -1
  245. package/dist/components/TableWithControls/components/Badge/styles.d.ts +0 -4
  246. package/dist/components/TableWithControls/components/Badge/styles.js +0 -46
  247. package/dist/components/TableWithControls/components/Button/Button.d.ts +0 -16
  248. package/dist/components/TableWithControls/components/Button/Button.js +0 -13
  249. package/dist/components/TableWithControls/components/Button/IconButton.d.ts +0 -8
  250. package/dist/components/TableWithControls/components/Button/IconButton.js +0 -9
  251. package/dist/components/TableWithControls/components/Button/icon-button-styles.d.ts +0 -1
  252. package/dist/components/TableWithControls/components/Button/icon-button-styles.js +0 -76
  253. package/dist/components/TableWithControls/components/Button/index.d.ts +0 -4
  254. package/dist/components/TableWithControls/components/Button/index.js +0 -2
  255. package/dist/components/TableWithControls/components/Button/styles.d.ts +0 -1
  256. package/dist/components/TableWithControls/components/Button/styles.js +0 -118
  257. package/dist/components/TableWithControls/components/Input/Input.d.ts +0 -13
  258. package/dist/components/TableWithControls/components/Input/Input.js +0 -34
  259. package/dist/components/TableWithControls/components/Input/index.d.ts +0 -2
  260. package/dist/components/TableWithControls/components/Input/index.js +0 -1
  261. package/dist/components/TableWithControls/components/Input/styles.d.ts +0 -1
  262. package/dist/components/TableWithControls/components/Input/styles.js +0 -180
  263. package/dist/components/TableWithControls/components/Select/Select.d.ts +0 -26
  264. package/dist/components/TableWithControls/components/Select/Select.js +0 -175
  265. package/dist/components/TableWithControls/components/Select/SelectTrigger.d.ts +0 -23
  266. package/dist/components/TableWithControls/components/Select/SelectTrigger.js +0 -103
  267. package/dist/components/TableWithControls/components/Select/index.d.ts +0 -2
  268. package/dist/components/TableWithControls/components/Select/index.js +0 -1
  269. package/dist/components/TableWithControls/components/Table/Table.d.ts +0 -51
  270. package/dist/components/TableWithControls/components/Table/Table.js +0 -14
  271. package/dist/components/TableWithControls/components/Table/TableControls/CustomPagination.d.ts +0 -13
  272. package/dist/components/TableWithControls/components/Table/TableControls/CustomPagination.js +0 -158
  273. package/dist/components/TableWithControls/components/Table/TableControls/PaginationNumber.d.ts +0 -7
  274. package/dist/components/TableWithControls/components/Table/TableControls/PaginationNumber.js +0 -30
  275. package/dist/components/TableWithControls/components/Table/TableControls/PrimaryTableControlsRow.d.ts +0 -18
  276. package/dist/components/TableWithControls/components/Table/TableControls/PrimaryTableControlsRow.js +0 -77
  277. package/dist/components/TableWithControls/components/Table/TableControls/SecondaryTableControlsRow.d.ts +0 -11
  278. package/dist/components/TableWithControls/components/Table/TableControls/SecondaryTableControlsRow.js +0 -43
  279. package/dist/components/TableWithControls/components/Table/TableControls/TableControls.d.ts +0 -14
  280. package/dist/components/TableWithControls/components/Table/TableControls/TableControls.js +0 -13
  281. package/dist/components/TableWithControls/components/Table/TableControls/index.d.ts +0 -2
  282. package/dist/components/TableWithControls/components/Table/TableControls/index.js +0 -1
  283. package/dist/components/TableWithControls/components/Table/TablePagination.d.ts +0 -13
  284. package/dist/components/TableWithControls/components/Table/TablePagination.js +0 -11
  285. package/dist/components/TableWithControls/components/Table/__mocks__/table-mocks.d.ts +0 -20
  286. package/dist/components/TableWithControls/components/Table/__mocks__/table-mocks.js +0 -301
  287. package/dist/components/TableWithControls/components/Table/index.d.ts +0 -6
  288. package/dist/components/TableWithControls/components/Table/index.js +0 -3
  289. package/dist/components/TableWithControls/components/Table/styles.d.ts +0 -14
  290. package/dist/components/TableWithControls/components/Table/styles.js +0 -64
  291. package/dist/components/TableWithControls/components/Table/useTable.d.ts +0 -26
  292. package/dist/components/TableWithControls/components/Table/useTable.js +0 -141
  293. package/dist/components/TableWithControls/components/TableWithControls/TableWithControls.d.ts +0 -12
  294. package/dist/components/TableWithControls/components/TableWithControls/TableWithControls.js +0 -20
  295. package/dist/components/TableWithControls/components/TableWithControls/useTableWithControls.d.ts +0 -29
  296. package/dist/components/TableWithControls/components/TableWithControls/useTableWithControls.js +0 -136
  297. package/dist/components/TableWithControls/components/Tooltip/Tooltip.d.ts +0 -7
  298. package/dist/components/TableWithControls/components/Tooltip/Tooltip.js +0 -8
  299. package/dist/components/TableWithControls/components/Tooltip/index.d.ts +0 -2
  300. package/dist/components/TableWithControls/components/Tooltip/index.js +0 -1
  301. package/dist/components/TableWithControls/components/Tooltip/styles.js +0 -26
  302. package/dist/components/TableWithControls/components/Typography/Typography.d.ts +0 -17
  303. package/dist/components/TableWithControls/components/Typography/Typography.js +0 -16
  304. package/dist/components/TableWithControls/components/Typography/index.d.ts +0 -2
  305. package/dist/components/TableWithControls/components/Typography/index.js +0 -1
  306. package/dist/components/TableWithControls/components/Typography/styles.d.ts +0 -3
  307. package/dist/components/TableWithControls/components/Typography/styles.js +0 -54
  308. package/dist/components/TableWithControls/components/UtilityButton/UtilityButton.d.ts +0 -5
  309. package/dist/components/TableWithControls/components/UtilityButton/UtilityButton.js +0 -9
  310. package/dist/components/TableWithControls/components/UtilityButton/index.d.ts +0 -2
  311. package/dist/components/TableWithControls/components/UtilityButton/index.js +0 -1
  312. package/dist/components/TableWithControls/components/shared/DropdownChevron.d.ts +0 -2
  313. package/dist/components/TableWithControls/components/shared/DropdownChevron.js +0 -7
  314. package/dist/components/TableWithControls/constants/index.d.ts +0 -163
  315. package/dist/components/TableWithControls/constants/index.js +0 -89
  316. package/dist/components/TableWithControls/index.js +0 -2
  317. package/dist/components/TableWithControls/types/events.d.ts +0 -22
  318. package/dist/components/TableWithControls/types/events.js +0 -1
  319. package/dist/components/TableWithControls/useTableWithControls.js +0 -117
  320. package/dist/components/TableWithControls/utils/icon-util.d.ts +0 -3
  321. package/dist/components/TableWithControls/utils/icon-util.js +0 -116
  322. package/dist/components/Tooltip/Tooltip.js +0 -9
  323. package/dist/components/Tooltip/index.js +0 -1
  324. package/dist/components/Tooltip/styles.js +0 -17
  325. package/dist/components/Typography/Typography.js +0 -39
  326. package/dist/components/Typography/index.js +0 -1
  327. package/dist/components/Typography/styles.js +0 -37
  328. package/dist/components/UtilityButton/UtilityButton.js +0 -32
  329. package/dist/components/UtilityButton/components/Button/Button.d.ts +0 -16
  330. package/dist/components/UtilityButton/components/Button/Button.js +0 -13
  331. package/dist/components/UtilityButton/components/Button/IconButton.d.ts +0 -8
  332. package/dist/components/UtilityButton/components/Button/IconButton.js +0 -9
  333. package/dist/components/UtilityButton/components/Button/icon-button-styles.d.ts +0 -1
  334. package/dist/components/UtilityButton/components/Button/icon-button-styles.js +0 -76
  335. package/dist/components/UtilityButton/components/Button/index.d.ts +0 -4
  336. package/dist/components/UtilityButton/components/Button/index.js +0 -2
  337. package/dist/components/UtilityButton/components/Button/styles.d.ts +0 -1
  338. package/dist/components/UtilityButton/components/Button/styles.js +0 -118
  339. package/dist/components/UtilityButton/components/UtilityButton/UtilityButton.d.ts +0 -5
  340. package/dist/components/UtilityButton/components/UtilityButton/UtilityButton.js +0 -9
  341. package/dist/components/UtilityButton/constants/index.d.ts +0 -163
  342. package/dist/components/UtilityButton/constants/index.js +0 -89
  343. package/dist/components/UtilityButton/index.js +0 -1
  344. package/dist/components/index.js +0 -7
  345. package/dist/components/shared/DropdownChevron.js +0 -18
  346. package/dist/constants/index.js +0 -89
  347. package/dist/interface/address.d.ts +0 -10
  348. package/dist/interface/address.js +0 -1
  349. package/dist/interface/appointment.d.ts +0 -56
  350. package/dist/interface/appointment.js +0 -23
  351. package/dist/styles/design-tokens/variables.js +0 -707
  352. package/dist/styles/theme/genesis-theme.js +0 -1512
  353. package/dist/styles/theme/genesis-theme.types.d.ts +0 -263
  354. package/dist/styles/theme/genesis-theme.types.js +0 -6
  355. package/dist/styles/theme/index.js +0 -1
  356. package/dist/test/setup.d.ts +0 -6
  357. package/dist/test/setup.js +0 -53
  358. package/dist/test/setup.types.d.ts +0 -7
  359. package/dist/test/setup.types.js +0 -1
  360. package/dist/types/events.d.ts +0 -22
  361. package/dist/types/events.js +0 -1
  362. package/dist/utils/icon-util.js +0 -119
  363. package/dist/utils/styled.d.ts +0 -1
  364. package/dist/utils/styled.js +0 -44
  365. /package/dist/{components/Button/__tests__/Button.test.d.ts → styles/theme/genesis-theme.test.d.ts} +0 -0
@@ -0,0 +1,7 @@
1
+ import { default as React } from 'react';
2
+ interface BreakpointProviderProperties {
3
+ children: React.ReactNode;
4
+ }
5
+ export declare const BreakpointProvider: ({ children, }: BreakpointProviderProperties) => import("react/jsx-runtime").JSX.Element;
6
+ export declare const useBreakpoint: () => string | number | symbol;
7
+ export {};
@@ -0,0 +1,7 @@
1
+ import { default as React } from 'react';
2
+ interface GenesisProviderProperties {
3
+ children: React.ReactNode;
4
+ isDarkMode?: boolean;
5
+ }
6
+ export declare const GenesisProvider: React.FC<GenesisProviderProperties>;
7
+ export default GenesisProvider;
@@ -0,0 +1,12 @@
1
+ import { default as React } from 'react';
2
+ export interface ToastContextType {
3
+ show: (message: string, state: string, action?: {
4
+ label: string;
5
+ onClick: unknown;
6
+ }) => void;
7
+ }
8
+ export declare const ToastContext: React.Context<ToastContextType | undefined>;
9
+ export declare const ToastProvider: ({ children }: {
10
+ children: any;
11
+ }) => import("react/jsx-runtime").JSX.Element;
12
+ export declare const useToast: () => ToastContextType;
@@ -0,0 +1,2 @@
1
+ export { default as GenesisProvider } from './GenesisProvider';
2
+ export { useGenesis } from './useGenesis';
@@ -0,0 +1,7 @@
1
+ import { ToastContextType } from './ToastProvider';
2
+ import { BREAKPOINTS } from '../constants';
3
+ export declare const useGenesis: () => {
4
+ theme: any;
5
+ breakpoint: keyof typeof BREAKPOINTS;
6
+ toast: ToastContextType;
7
+ };
@@ -0,0 +1 @@
1
+ export declare const GlobalStyles: any;
@@ -1,4 +1,4 @@
1
- import type { GenesisTheme, BaseTokens } from "./genesis-theme.types";
1
+ import { GenesisTheme, BaseTokens } from './genesis-theme.types';
2
2
  export declare const breakpoints: {
3
3
  wide: number;
4
4
  medium: number;
@@ -1,2 +1,2 @@
1
- export * from "./genesis-theme";
2
- export type { GenesisTheme } from "./genesis-theme.types";
1
+ export * from './genesis-theme';
2
+ export type { GenesisTheme } from './genesis-theme.types';
@@ -0,0 +1 @@
1
+ export type { ActionEvent, BaseEventPayload } from './events';
package/package.json CHANGED
@@ -1,55 +1,55 @@
1
1
  {
2
2
  "name": "@gobolt/genesis",
3
- "version": "0.3.25",
3
+ "version": "0.3.27",
4
4
  "description": "genesis design system",
5
5
  "author": "gobolt",
6
6
  "license": "MIT",
7
7
  "repository": "SecondCloset/genesis",
8
- "main": "dist/index.js",
8
+ "main": "dist/index.cjs",
9
9
  "module": "dist/index.js",
10
10
  "types": "dist/index.d.ts",
11
11
  "exports": {
12
12
  ".": {
13
13
  "types": "./dist/index.d.ts",
14
14
  "import": "./dist/index.js",
15
- "require": "./dist/index.js",
15
+ "require": "./dist/index.cjs",
16
16
  "default": "./dist/index.js"
17
17
  },
18
18
  "./components/*": {
19
19
  "types": "./dist/components/*.d.ts",
20
20
  "import": "./dist/components/*.js",
21
- "require": "./dist/components/*.cjs",
22
- "default": "./dist/components/*.js"
21
+ "default": "./dist/components/*.js",
22
+ "require": "./dist/components/*.cjs"
23
23
  },
24
24
  "./providers/*": {
25
25
  "types": "./dist/providers/*.d.ts",
26
26
  "import": "./dist/providers/*.js",
27
- "require": "./dist/providers/*.cjs",
28
- "default": "./dist/providers/*.js"
27
+ "default": "./dist/providers/*.js",
28
+ "require": "./dist/providers/*.cjs"
29
29
  },
30
30
  "./styles/*": {
31
31
  "types": "./dist/styles/*.d.ts",
32
32
  "import": "./dist/styles/*.js",
33
- "require": "./dist/styles/*.cjs",
34
- "default": "./dist/styles/*.js"
33
+ "default": "./dist/styles/*.js",
34
+ "require": "./dist/styles/*.cjs"
35
35
  },
36
36
  "./constants/*": {
37
37
  "types": "./dist/constants/*.d.ts",
38
38
  "import": "./dist/constants/*.js",
39
- "require": "./dist/constants/*.cjs",
40
- "default": "./dist/constants/*.js"
39
+ "default": "./dist/constants/*.js",
40
+ "require": "./dist/constants/*.cjs"
41
41
  },
42
42
  "./utils/*": {
43
43
  "types": "./dist/utils/*.d.ts",
44
44
  "import": "./dist/utils/*.js",
45
- "require": "./dist/utils/*.cjs",
46
- "default": "./dist/utils/*.js"
45
+ "default": "./dist/utils/*.js",
46
+ "require": "./dist/utils/*.cjs"
47
47
  },
48
48
  "./interface/*": {
49
49
  "types": "./dist/interface/*.d.ts",
50
50
  "import": "./dist/interface/*.js",
51
- "require": "./dist/interface/*.cjs",
52
- "default": "./dist/interface/*.js"
51
+ "default": "./dist/interface/*.js",
52
+ "require": "./dist/interface/*.cjs"
53
53
  }
54
54
  },
55
55
  "files": [
@@ -58,11 +58,10 @@
58
58
  "scripts": {
59
59
  "clean-install": "npm install --no-audit --no-fund",
60
60
  "dev": "vite",
61
- "build": "tsc --extendedDiagnostics --p ./tsconfig-build.json",
62
- "build:minimal": "node build-minimal.js",
61
+ "build": "vite build",
63
62
  "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
64
63
  "preview": "vite preview",
65
- "prepublishOnly": "npm run build:minimal",
64
+ "prepublishOnly": "npm run build",
66
65
  "start": "storybook dev -p 6006",
67
66
  "storybook": "storybook dev -p 6006",
68
67
  "build-storybook": "storybook build",
@@ -1,51 +0,0 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- var __rest = (this && this.__rest) || function (s, e) {
13
- var t = {};
14
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
- t[p] = s[p];
16
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
- t[p[i]] = s[p[i]];
20
- }
21
- return t;
22
- };
23
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
24
- import * as S from "./styles";
25
- import { Typography } from "@gobolt/genesis/components";
26
- import { useGenesis } from "@gobolt/genesis/providers";
27
- import { getBadgeStateIcon } from "@gobolt/genesis/utils/icon-util";
28
- import { HiOutlineX } from "react-icons/hi";
29
- var isBadgeIconFilled = false;
30
- var Badge = function (_a) {
31
- var label = _a.label, _b = _a.state, state = _b === void 0 ? "info" : _b, isDisabled = _a.isDisabled, _c = _a.hasClose, hasClose = _c === void 0 ? false : _c, _d = _a.onClick, onClick = _d === void 0 ? function () { } : _d, _e = _a.size, size = _e === void 0 ? "normal" : _e, _f = _a.hasIcon, hasIcon = _f === void 0 ? true : _f, _g = _a.customIcon, customIcon = _g === void 0 ? null : _g, _h = _a.backgroundColor, backgroundColor = _h === void 0 ? null : _h, _j = _a.textColor, textColor = _j === void 0 ? null : _j, _k = _a.hasHover, hasHover = _k === void 0 ? false : _k, rest = __rest(_a, ["label", "state", "isDisabled", "hasClose", "onClick", "size", "hasIcon", "customIcon", "backgroundColor", "textColor", "hasHover"]);
32
- var theme = useGenesis().theme;
33
- var role = hasClose ? "button" : "badge";
34
- if (!label) {
35
- return (_jsx(S.Badge, __assign({ label: label, role: "badge", state: state, disabled: isDisabled, style: {
36
- padding: "4px 4px",
37
- }, "$hasHover": hasHover }, rest, { children: _jsx("div", { style: {
38
- display: "flex",
39
- justifyContent: "center",
40
- alignItems: "center",
41
- }, children: getBadgeStateIcon(state, backgroundColor || theme.colors.status[state].onsurface, isBadgeIconFilled, hasIcon, customIcon) }) })));
42
- }
43
- return (_jsxs(S.Badge, __assign({ label: label, role: role, onClick: onClick, state: state, disabled: isDisabled, style: { cursor: role === "button" ? "pointer" : "default" }, "$backgroundColor": backgroundColor, "$hasHover": hasHover }, rest, { children: [getBadgeStateIcon(state, isDisabled
44
- ? theme.colors.status.disabled.default
45
- : textColor || theme.colors.status[state].onsurface, isBadgeIconFilled, hasIcon, customIcon), _jsx(Typography, { variant: size === "small" ? "label3" : "label2", color: isDisabled
46
- ? theme.colors.status.disabled.default
47
- : textColor || theme.colors.status[state].onsurface,
48
- // @ts-ignore
49
- isDisabled: isDisabled, children: label }), hasClose ? (_jsx(HiOutlineX, { color: theme.colors.status[state].onsurface })) : null] })));
50
- };
51
- export default Badge;
@@ -1 +0,0 @@
1
- export { default } from "./Badge";
@@ -1,21 +0,0 @@
1
- var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
2
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
- return cooked;
4
- };
5
- import styled from "@gobolt/genesis/utils/styled";
6
- var getBorderColor = function (theme, state) {
7
- if (state === "hollow") {
8
- return theme.colors.inputs.surface.border;
9
- }
10
- return theme.colors.status[state].surface;
11
- };
12
- export var getGenesisClass = function (theme, state, label, disabled, $backgroundColor, $hasHover) { return "\n display: inline-flex; \n align-self: inherit;\n gap: 4px;\n justify-content: center;\n align-items: center;\n position: relative;\n padding-top: ".concat(theme.components.badge["ver-padding"], "px;\n padding-bottom: ").concat(theme.components.badge["ver-padding"], "px;\n padding-left: ").concat(theme.components.badge["left-padding"], "px;\n padding-right: ").concat(theme.components.badge["right-padding"], "px;\n border-radius: ").concat(theme.components.badge.radius, "px;\n border: 1px solid ").concat(getBorderColor(theme, state), ";\n background-color: ").concat($backgroundColor || theme.colors.status[state].surface, ";\n\n &:not(:disabled):hover {\n ").concat($hasHover
13
- ? "background-color: ".concat(theme.colors.status[state]["surface-hover"], ";")
14
- : "", "\n }\n\n ").concat(disabled
15
- ? "\n background-color: ".concat(theme.colors.status.disabled.surface, " !important;\n border-color: ").concat(theme.colors.status.disabled, " !important;\n border: none;\n cursor: not-allowed;\n\n &:hover {\n cursor: not-allowed;\n }\n ")
16
- : "", "\n"); };
17
- export var Badge = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (_a) {
18
- var theme = _a.theme, state = _a.state, label = _a.label, disabled = _a.disabled, $backgroundColor = _a.$backgroundColor, $hasHover = _a.$hasHover;
19
- return getGenesisClass(theme, state, label, disabled, $backgroundColor, $hasHover);
20
- });
21
- var templateObject_1;
@@ -1,36 +0,0 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- var __rest = (this && this.__rest) || function (s, e) {
13
- var t = {};
14
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
- t[p] = s[p];
16
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
- t[p[i]] = s[p[i]];
20
- }
21
- return t;
22
- };
23
- import { jsx as _jsx } from "react/jsx-runtime";
24
- import * as S from "./styles";
25
- var getState = function (state, isSelected) {
26
- if (isSelected) {
27
- return "selected";
28
- }
29
- return state === "active" || state === "disabled" ? state : "active";
30
- };
31
- var Button = function (_a) {
32
- var children = _a.children, onClick = _a.onClick, _b = _a.themeType, themeType = _b === void 0 ? "primary" : _b, _c = _a.state, state = _c === void 0 ? "active" : _c, _d = _a.isIconButton, isIconButton = _d === void 0 ? false : _d, _e = _a.size, size = _e === void 0 ? "normal" : _e, isSelected = _a.isSelected, rest = __rest(_a, ["children", "onClick", "themeType", "state", "isIconButton", "size", "isSelected"]);
33
- var buttonState = getState(state, isSelected);
34
- return (_jsx(S.Button, __assign({ onClick: onClick, "$themeType": themeType, "$state": buttonState, disabled: state === "disabled" || rest.disabled, "$isIconButton": isIconButton, size: size }, rest, { children: children })));
35
- };
36
- export default Button;
@@ -1,32 +0,0 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- var __rest = (this && this.__rest) || function (s, e) {
13
- var t = {};
14
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
- t[p] = s[p];
16
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
- t[p[i]] = s[p[i]];
20
- }
21
- return t;
22
- };
23
- import { jsx as _jsx } from "react/jsx-runtime";
24
- import * as S from "./icon-button-styles";
25
- import { TYPE } from "../../constants";
26
- var IconButton = function (_a) {
27
- var _b = _a.isSelected, isSelected = _b === void 0 ? false : _b, _c = _a.state, state = _c === void 0 ? "active" : _c, onClick = _a.onClick, icon = _a.icon, _d = _a.size, size = _d === void 0 ? "small" : _d, rest = __rest(_a, ["isSelected", "state", "onClick", "icon", "size"]);
28
- var buttonState = state === "active" || state === "disabled" ? state : "active";
29
- var themeType = TYPE.icon;
30
- return (_jsx(S.Button, __assign({ onClick: onClick, "$themeType": themeType, "$state": buttonState, disabled: state === "disabled" || rest.disabled, size: size, "$isSelected": isSelected }, rest, { children: icon })));
31
- };
32
- export default IconButton;
@@ -1,12 +0,0 @@
1
- import type { Meta, StoryObj } from "@storybook/react";
2
- import Button from "../Button";
3
- declare const meta: Meta<typeof Button>;
4
- export default meta;
5
- type Story = StoryObj<typeof Button>;
6
- export declare const Focussed: Story;
7
- export declare const Primary: Story;
8
- export declare const Secondary: Story;
9
- export declare const Tertiary: Story;
10
- export declare const Destructive: Story;
11
- export declare const LeftIcon: Story;
12
- export declare const RightIcon: Story;
@@ -1,154 +0,0 @@
1
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
- return new (P || (P = Promise))(function (resolve, reject) {
4
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
- step((generator = generator.apply(thisArg, _arguments || [])).next());
8
- });
9
- };
10
- var __generator = (this && this.__generator) || function (thisArg, body) {
11
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
12
- return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
13
- function verb(n) { return function (v) { return step([n, v]); }; }
14
- function step(op) {
15
- if (f) throw new TypeError("Generator is already executing.");
16
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
17
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
18
- if (y = 0, t) op = [op[0] & 2, t.value];
19
- switch (op[0]) {
20
- case 0: case 1: t = op; break;
21
- case 4: _.label++; return { value: op[1], done: false };
22
- case 5: _.label++; y = op[1]; op = [0]; continue;
23
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
24
- default:
25
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
26
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
27
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
28
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
29
- if (t[2]) _.ops.pop();
30
- _.trys.pop(); continue;
31
- }
32
- op = body.call(thisArg, _);
33
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
34
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
35
- }
36
- };
37
- var __rest = (this && this.__rest) || function (s, e) {
38
- var t = {};
39
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
40
- t[p] = s[p];
41
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
42
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
43
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
44
- t[p[i]] = s[p[i]];
45
- }
46
- return t;
47
- };
48
- import { jsx as _jsx } from "react/jsx-runtime";
49
- import Button from "../Button";
50
- import { TYPE, STATE } from "../../../constants";
51
- import description from "./ButtonDescription.md?raw";
52
- import { SearchOutlined } from "@ant-design/icons";
53
- // remove the focussed key since we have a separate story for that
54
- var focussed = STATE.focussed, stateWithoutFocussed = __rest(STATE, ["focussed"]);
55
- var meta = {
56
- title: "Components/Buttons/Button",
57
- component: Button,
58
- tags: ["autodocs"],
59
- parameters: {
60
- layout: "centered",
61
- docs: {
62
- description: {
63
- component: description,
64
- },
65
- },
66
- },
67
- argTypes: {
68
- themeType: {
69
- control: "radio",
70
- options: ["primary", "secondary", "tertiary", "destructive"],
71
- },
72
- state: {
73
- control: "radio",
74
- options: Object.keys(stateWithoutFocussed),
75
- },
76
- size: {
77
- control: "radio",
78
- options: ["small", "normal", "large"],
79
- defaultValue: "large",
80
- },
81
- },
82
- };
83
- export default meta;
84
- export var Focussed = {
85
- args: {
86
- children: "Button Label",
87
- themeType: TYPE.primary,
88
- },
89
- play: function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
90
- var button;
91
- var canvasElement = _b.canvasElement;
92
- return __generator(this, function (_c) {
93
- button = canvasElement.querySelector("button");
94
- if (button) {
95
- button.focus();
96
- }
97
- return [2 /*return*/];
98
- });
99
- }); },
100
- };
101
- var onClick = function (e) {
102
- alert("Button Clicked");
103
- };
104
- export var Primary = {
105
- args: {
106
- children: "Button Label",
107
- themeType: TYPE.primary,
108
- size: "large",
109
- onClick: onClick,
110
- },
111
- };
112
- export var Secondary = {
113
- args: {
114
- children: "Button Label",
115
- themeType: TYPE.secondary,
116
- size: "large",
117
- onClick: onClick,
118
- },
119
- };
120
- export var Tertiary = {
121
- args: {
122
- children: "Button Label",
123
- themeType: TYPE.tertiary,
124
- size: "large",
125
- onClick: onClick,
126
- },
127
- };
128
- export var Destructive = {
129
- args: {
130
- children: "Button Label",
131
- themeType: TYPE.destructive,
132
- size: "large",
133
- onClick: onClick,
134
- },
135
- };
136
- export var LeftIcon = {
137
- args: {
138
- children: "Button Label",
139
- themeType: TYPE.primary,
140
- icon: _jsx(SearchOutlined, {}),
141
- iconPosition: "start",
142
- size: "large",
143
- onClick: onClick,
144
- },
145
- };
146
- export var RightIcon = {
147
- args: {
148
- children: "Button Label",
149
- themeType: TYPE.primary,
150
- icon: _jsx(SearchOutlined, {}),
151
- iconPosition: "end",
152
- onClick: onClick,
153
- },
154
- };
@@ -1,8 +0,0 @@
1
- import type { Meta, StoryObj } from "@storybook/react";
2
- import IconButton from "../IconButton";
3
- declare const meta: Meta<typeof IconButton>;
4
- export default meta;
5
- type Story = StoryObj<typeof IconButton>;
6
- export declare const Default: Story;
7
- export declare const Focussed: Story;
8
- export declare const Selected: Story;
@@ -1,133 +0,0 @@
1
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
- return new (P || (P = Promise))(function (resolve, reject) {
4
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
- step((generator = generator.apply(thisArg, _arguments || [])).next());
8
- });
9
- };
10
- var __generator = (this && this.__generator) || function (thisArg, body) {
11
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
12
- return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
13
- function verb(n) { return function (v) { return step([n, v]); }; }
14
- function step(op) {
15
- if (f) throw new TypeError("Generator is already executing.");
16
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
17
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
18
- if (y = 0, t) op = [op[0] & 2, t.value];
19
- switch (op[0]) {
20
- case 0: case 1: t = op; break;
21
- case 4: _.label++; return { value: op[1], done: false };
22
- case 5: _.label++; y = op[1]; op = [0]; continue;
23
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
24
- default:
25
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
26
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
27
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
28
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
29
- if (t[2]) _.ops.pop();
30
- _.trys.pop(); continue;
31
- }
32
- op = body.call(thisArg, _);
33
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
34
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
35
- }
36
- };
37
- var __rest = (this && this.__rest) || function (s, e) {
38
- var t = {};
39
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
40
- t[p] = s[p];
41
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
42
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
43
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
44
- t[p[i]] = s[p[i]];
45
- }
46
- return t;
47
- };
48
- var __read = (this && this.__read) || function (o, n) {
49
- var m = typeof Symbol === "function" && o[Symbol.iterator];
50
- if (!m) return o;
51
- var i = m.call(o), r, ar = [], e;
52
- try {
53
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
54
- }
55
- catch (error) { e = { error: error }; }
56
- finally {
57
- try {
58
- if (r && !r.done && (m = i["return"])) m.call(i);
59
- }
60
- finally { if (e) throw e.error; }
61
- }
62
- return ar;
63
- };
64
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
65
- import { useState } from "react";
66
- import IconButton from "../IconButton";
67
- import { STATE } from "../../../constants";
68
- import description from "./IconButtonDescription.md?raw";
69
- import { HiOutlineDuplicate, HiSearch, HiOutlineLocationMarker, } from "react-icons/hi";
70
- var focussed = STATE.focussed, stateWithoutFocussed = __rest(STATE, ["focussed"]);
71
- var meta = {
72
- title: "Components/Buttons/IconButton",
73
- component: IconButton,
74
- tags: ["autodocs"],
75
- parameters: {
76
- layout: "centered",
77
- docs: {
78
- description: {
79
- component: description,
80
- },
81
- },
82
- },
83
- argTypes: {
84
- state: {
85
- control: "radio",
86
- options: Object.keys(stateWithoutFocussed),
87
- },
88
- },
89
- };
90
- export default meta;
91
- var onClick = function (e) {
92
- alert("Button Clicked");
93
- };
94
- export var Default = {
95
- args: {
96
- children: null,
97
- icon: _jsx(HiOutlineDuplicate, {}),
98
- isIconButton: true,
99
- onClick: onClick,
100
- },
101
- };
102
- export var Focussed = {
103
- args: {
104
- icon: _jsx(HiOutlineDuplicate, {}),
105
- onClick: onClick,
106
- },
107
- play: function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
108
- var button;
109
- var canvasElement = _b.canvasElement;
110
- return __generator(this, function (_c) {
111
- button = canvasElement.querySelector("button");
112
- if (button) {
113
- button.focus();
114
- }
115
- return [2 /*return*/];
116
- });
117
- }); },
118
- };
119
- export var Selected = {
120
- args: {
121
- children: null,
122
- icon: _jsx(HiOutlineDuplicate, {}),
123
- isIconButton: true,
124
- onClick: onClick,
125
- },
126
- render: function () {
127
- var _a = __read(useState(1), 2), selectedId = _a[0], setSelectedId = _a[1];
128
- var onClick = function (newId) {
129
- setSelectedId(newId);
130
- };
131
- return (_jsxs("div", { style: { display: "flex", gap: "1rem" }, children: [_jsx(IconButton, { icon: _jsx(HiOutlineDuplicate, {}), onClick: function () { return onClick(1); }, isSelected: selectedId === 1 }), _jsx(IconButton, { icon: _jsx(HiSearch, {}), onClick: function () { return onClick(2); }, isSelected: selectedId === 2 }), _jsx(IconButton, { icon: _jsx(HiOutlineLocationMarker, {}), onClick: function () { return onClick(3); }, isSelected: selectedId === 3 })] }));
132
- },
133
- };
@@ -1,8 +0,0 @@
1
- import type { Meta, StoryObj } from "@storybook/react";
2
- import UtilityButton from "../../UtilityButton";
3
- declare const meta: Meta<typeof UtilityButton>;
4
- export default meta;
5
- type Story = StoryObj<typeof UtilityButton>;
6
- export declare const Primary: Story;
7
- export declare const AddIcon: Story;
8
- export declare const FilterIcon: Story;