@veeqo/ui 0.0.1 → 0.0.3

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 (802) hide show
  1. package/.eslintrc.json +105 -0
  2. package/.storybook/Intro.mdx +22 -0
  3. package/.storybook/main.ts +1 -1
  4. package/.storybook/preview.ts +7 -0
  5. package/CHANGELOG.md +21 -0
  6. package/README.md +77 -0
  7. package/jest.config.js +16 -0
  8. package/lib/components/Accordion/Accordion.d.ts +12 -0
  9. package/lib/components/Accordion/index.d.ts +1 -0
  10. package/lib/components/Accordion/styled.d.ts +12 -0
  11. package/lib/components/ActionList/ActionList.d.ts +3 -0
  12. package/lib/components/ActionList/index.d.ts +1 -0
  13. package/lib/components/ActionList/styled.d.ts +15 -0
  14. package/lib/components/ActionList/types.d.ts +19 -0
  15. package/lib/components/Anchor/Anchor.d.ts +9 -0
  16. package/lib/components/Anchor/index.d.ts +1 -0
  17. package/lib/components/Anchor/styled.d.ts +1 -0
  18. package/lib/components/AnimatedDropdown/AnimatedDropdown.d.ts +3 -0
  19. package/lib/components/AnimatedDropdown/components/BasicDropdown.d.ts +5 -0
  20. package/lib/components/AnimatedDropdown/components/styled.d.ts +1 -0
  21. package/lib/components/AnimatedDropdown/index.d.ts +1 -0
  22. package/lib/components/AnimatedDropdown/styled.d.ts +10 -0
  23. package/lib/components/AnimatedDropdown/types.d.ts +14 -0
  24. package/lib/components/Avatar/Avatar.d.ts +3 -0
  25. package/lib/components/Avatar/index.d.ts +1 -0
  26. package/lib/components/Avatar/styled.d.ts +2 -0
  27. package/lib/components/Avatar/types.d.ts +11 -0
  28. package/lib/components/Badge/Badge.d.ts +3 -0
  29. package/lib/components/Badge/index.d.ts +1 -0
  30. package/lib/components/Badge/styled.d.ts +7 -0
  31. package/lib/components/Badge/types.d.ts +35 -0
  32. package/lib/components/Banner/Banner.d.ts +6 -0
  33. package/lib/components/Banner/index.d.ts +1 -0
  34. package/lib/components/Banner/styled.d.ts +7 -0
  35. package/lib/components/Banner/types.d.ts +20 -0
  36. package/lib/components/BaseContainer/BaseContainer.d.ts +1 -0
  37. package/lib/components/BaseContainer/index.d.ts +1 -0
  38. package/lib/components/Breadcrumbs/Breadcrumbs.d.ts +3 -0
  39. package/lib/components/Breadcrumbs/components/Breadcrumb.d.ts +3 -0
  40. package/lib/components/Breadcrumbs/components/styled.d.ts +2 -0
  41. package/lib/components/Breadcrumbs/index.d.ts +1 -0
  42. package/lib/components/Breadcrumbs/types.d.ts +22 -0
  43. package/lib/components/Button/Button.d.ts +3 -0
  44. package/lib/components/Button/components/DropdownIcon.d.ts +2 -0
  45. package/lib/components/Button/components/styled.d.ts +20 -0
  46. package/lib/components/Button/index.d.ts +1 -0
  47. package/lib/components/Button/types.d.ts +18 -0
  48. package/lib/components/Card/Card.d.ts +28 -0
  49. package/lib/components/Card/index.d.ts +1 -0
  50. package/lib/components/Card/styled.d.ts +16 -0
  51. package/lib/components/CardHeader/CardHeader.d.ts +19 -0
  52. package/lib/components/CardHeader/icons/Cross.d.ts +2 -0
  53. package/lib/components/CardHeader/icons/DownArrow.d.ts +2 -0
  54. package/lib/components/CardHeader/icons/UpArrow.d.ts +2 -0
  55. package/lib/components/CardHeader/index.d.ts +1 -0
  56. package/lib/components/CardHeader/styled.d.ts +2 -0
  57. package/lib/components/Checkbox/Checkbox.d.ts +13 -0
  58. package/lib/components/Checkbox/index.d.ts +1 -0
  59. package/lib/components/Checkbox/styled.d.ts +1 -0
  60. package/lib/components/Choice/Choice.d.ts +17 -0
  61. package/lib/components/Choice/components/HelpIcon.d.ts +2 -0
  62. package/lib/components/Choice/components/styled.d.ts +17 -0
  63. package/lib/components/Choice/index.d.ts +1 -0
  64. package/lib/components/ChoiceList/ChoiceList.d.ts +29 -0
  65. package/lib/components/ChoiceList/index.d.ts +1 -0
  66. package/lib/components/ChoiceList/styled.d.ts +2 -0
  67. package/lib/components/CopyToClipboard/CopyToClipboard.d.ts +10 -0
  68. package/lib/components/CopyToClipboard/index.d.ts +1 -0
  69. package/lib/components/DataTable/DataTable.d.ts +21 -0
  70. package/lib/components/DataTable/SkeletonContent/SkeletonContent.d.ts +7 -0
  71. package/lib/components/DataTable/SkeletonContent/index.d.ts +1 -0
  72. package/lib/components/DataTable/SpecificState/SpecificState.d.ts +7 -0
  73. package/lib/components/DataTable/SpecificState/index.d.ts +1 -0
  74. package/lib/components/DataTable/SpecificState/styled.d.ts +8 -0
  75. package/lib/components/DataTable/StickyHeader.d.ts +10 -0
  76. package/lib/components/DataTable/cells/ClickableCell.d.ts +7 -0
  77. package/lib/components/DataTable/cells/EditableCell.d.ts +7 -0
  78. package/lib/components/DataTable/cells/SkeletonCell.d.ts +11 -0
  79. package/lib/components/DataTable/cells/SkeletonHeaderCell.d.ts +8 -0
  80. package/lib/components/DataTable/cells/index.d.ts +3 -0
  81. package/lib/components/DataTable/cells/styled.d.ts +1 -0
  82. package/lib/components/DataTable/icons/DoubleArrowAsc.d.ts +2 -0
  83. package/lib/components/DataTable/icons/DoubleArrowDesc.d.ts +2 -0
  84. package/lib/components/DataTable/icons/DoubleArrowIcon.d.ts +2 -0
  85. package/lib/components/DataTable/index.d.ts +1 -0
  86. package/lib/components/DataTable/styled.d.ts +46 -0
  87. package/lib/components/DataTable/utils/constants.d.ts +9 -0
  88. package/lib/components/DataTable/utils/hooks.d.ts +4 -0
  89. package/lib/components/DataTable/utils/index.d.ts +2 -0
  90. package/lib/components/DataTable/utils/types.d.ts +106 -0
  91. package/lib/components/DataTableExp/DataTable.d.ts +22 -0
  92. package/lib/components/DataTableExp/components/ActionBar.d.ts +9 -0
  93. package/lib/components/DataTableExp/components/Cell.d.ts +7 -0
  94. package/lib/components/DataTableExp/components/ColumnHeader.d.ts +6 -0
  95. package/lib/components/DataTableExp/components/ColumnMenu.d.ts +8 -0
  96. package/lib/components/DataTableExp/components/EmptyBodyContent.d.ts +5 -0
  97. package/lib/components/DataTableExp/components/Header.d.ts +2 -0
  98. package/lib/components/DataTableExp/components/LoadingCellContent.d.ts +1 -0
  99. package/lib/components/DataTableExp/components/NoWrap.d.ts +1 -0
  100. package/lib/components/DataTableExp/components/Row.d.ts +7 -0
  101. package/lib/components/DataTableExp/components/ScrollContainer.d.ts +1 -0
  102. package/lib/components/DataTableExp/components/SelectionCell.d.ts +11 -0
  103. package/lib/components/DataTableExp/components/SelectionHeader.d.ts +3 -0
  104. package/lib/components/DataTableExp/components/StickyHead.d.ts +9 -0
  105. package/lib/components/DataTableExp/components/TableGrid.d.ts +4 -0
  106. package/lib/components/DataTableExp/components/Truncate.d.ts +1 -0
  107. package/lib/components/DataTableExp/components/Wrapper.d.ts +5 -0
  108. package/lib/components/DataTableExp/components/icons/ArrowDown.d.ts +2 -0
  109. package/lib/components/DataTableExp/components/icons/ArrowUp.d.ts +2 -0
  110. package/lib/components/DataTableExp/components/icons/DoubleArrow.d.ts +2 -0
  111. package/lib/components/DataTableExp/components/icons/InfoIcon.d.ts +2 -0
  112. package/lib/components/DataTableExp/components/icons/Reorder.d.ts +2 -0
  113. package/lib/components/DataTableExp/components/icons/Visibility.d.ts +2 -0
  114. package/lib/components/DataTableExp/components/icons/VisibilityOff.d.ts +2 -0
  115. package/lib/components/DataTableExp/constants.d.ts +3 -0
  116. package/lib/components/DataTableExp/hooks/index.d.ts +6 -0
  117. package/lib/components/DataTableExp/hooks/useCellWidths.d.ts +2 -0
  118. package/lib/components/DataTableExp/hooks/useColumns.d.ts +6 -0
  119. package/lib/components/DataTableExp/hooks/useDragToScroll.d.ts +2 -0
  120. package/lib/components/DataTableExp/hooks/useNested.d.ts +7 -0
  121. package/lib/components/DataTableExp/hooks/useScrollPosition.d.ts +6 -0
  122. package/lib/components/DataTableExp/hooks/useSelection.d.ts +12 -0
  123. package/lib/components/DataTableExp/index.d.ts +1 -0
  124. package/lib/components/DataTableExp/renderers/index.d.ts +5 -0
  125. package/lib/components/DataTableExp/renderers/renderCell.d.ts +10 -0
  126. package/lib/components/DataTableExp/renderers/renderFooter.d.ts +13 -0
  127. package/lib/components/DataTableExp/renderers/renderHeader.d.ts +15 -0
  128. package/lib/components/DataTableExp/renderers/renderLoadingCell.d.ts +9 -0
  129. package/lib/components/DataTableExp/renderers/renderNestedCell.d.ts +10 -0
  130. package/lib/components/DataTableExp/types.d.ts +116 -0
  131. package/lib/components/DataTableExp/utils/GetSortIcon.d.ts +9 -0
  132. package/lib/components/DataTableExp/utils/alignmentToFlex.d.ts +2 -0
  133. package/lib/components/DataTableExp/utils/generateTableCss.d.ts +10 -0
  134. package/lib/components/DataTableExp/utils/getNextSortState.d.ts +7 -0
  135. package/lib/components/DataTableExp/utils/getRowState.d.ts +10 -0
  136. package/lib/components/DataTableExp/utils/index.d.ts +6 -0
  137. package/lib/components/DataTableExp/utils/parseWidth.d.ts +1 -0
  138. package/lib/components/DataTableExp/utils/sumAll.d.ts +2 -0
  139. package/lib/components/DescriptionList/DescriptionList.d.ts +11 -0
  140. package/lib/components/DescriptionList/index.d.ts +1 -0
  141. package/lib/components/DetailPage/DetailPage.d.ts +6 -0
  142. package/lib/components/DetailPage/index.d.ts +1 -0
  143. package/lib/components/DetailPage/styled.d.ts +2 -0
  144. package/lib/components/DimensionsInput/DimensionsInput.d.ts +3 -0
  145. package/lib/components/DimensionsInput/index.d.ts +1 -0
  146. package/lib/components/DimensionsInput/styled.d.ts +27 -0
  147. package/lib/components/DimensionsInput/types.d.ts +15 -0
  148. package/lib/components/FilterTag/FilterTag.d.ts +8 -0
  149. package/lib/components/FilterTag/index.d.ts +1 -0
  150. package/lib/components/FilterTag/styled.d.ts +12 -0
  151. package/lib/components/FilterTag/types.d.ts +14 -0
  152. package/lib/components/Grid/index.d.ts +2 -0
  153. package/lib/components/Grid/types.d.ts +8 -0
  154. package/lib/components/Image/Image.d.ts +20 -0
  155. package/lib/components/Image/components/PlaceholderImage.d.ts +2 -0
  156. package/lib/components/Image/components/styled.d.ts +6 -0
  157. package/lib/components/Image/index.d.ts +1 -0
  158. package/lib/components/Image/types.d.ts +6 -0
  159. package/lib/components/Image/utils.d.ts +2 -0
  160. package/lib/components/InputGroup/index.d.ts +1 -0
  161. package/lib/components/Loader/Grid.d.ts +1 -2
  162. package/lib/components/Loader/TailSpin.d.ts +1 -2
  163. package/lib/components/Loader/ThreeDots.d.ts +1 -2
  164. package/lib/components/LoginWithAmazonButton/LoginWithAmazonButton.d.ts +7 -0
  165. package/lib/components/LoginWithAmazonButton/index.d.ts +1 -0
  166. package/lib/components/LoginWithAmazonButton/styled.d.ts +1 -0
  167. package/lib/components/Modal/Modal.d.ts +3 -0
  168. package/lib/components/Modal/components/Dialog/Dialog.d.ts +8 -0
  169. package/lib/components/Modal/components/Dialog/constants.d.ts +44 -0
  170. package/lib/components/Modal/components/Dialog/styled.d.ts +24 -0
  171. package/lib/components/Modal/components/styled.d.ts +5 -0
  172. package/lib/components/Modal/index.d.ts +1 -0
  173. package/lib/components/Modal/types.d.ts +40 -0
  174. package/lib/components/PageHeader/PageHeader.d.ts +29 -0
  175. package/lib/components/PageHeader/index.d.ts +1 -0
  176. package/lib/components/PageHeader/styled.d.ts +16 -0
  177. package/lib/components/Pagination/Pagination.d.ts +3 -0
  178. package/lib/components/Pagination/components/EndArrow.d.ts +2 -0
  179. package/lib/components/Pagination/components/LeftArrow.d.ts +2 -0
  180. package/lib/components/Pagination/components/RightArrow.d.ts +2 -0
  181. package/lib/components/Pagination/components/StartArrow.d.ts +2 -0
  182. package/lib/components/Pagination/components.d.ts +4 -0
  183. package/lib/components/Pagination/hooks/usePagination.d.ts +13 -0
  184. package/lib/components/Pagination/index.d.ts +1 -0
  185. package/lib/components/Pagination/styled.d.ts +22 -0
  186. package/lib/components/Pagination/types.d.ts +8 -0
  187. package/lib/components/PaginationRange/Items/Item/Item.d.ts +3 -0
  188. package/lib/components/PaginationRange/Items/Item/index.d.ts +1 -0
  189. package/lib/components/PaginationRange/Items/Item/styled.d.ts +3 -0
  190. package/lib/components/PaginationRange/Items/Item/types.d.ts +5 -0
  191. package/lib/components/PaginationRange/Items/Items.d.ts +7 -0
  192. package/lib/components/PaginationRange/Items/index.d.ts +1 -0
  193. package/lib/components/PaginationRange/PaginationRange.d.ts +9 -0
  194. package/lib/components/PaginationRange/index.d.ts +1 -0
  195. package/lib/components/PaginationRange/styled.d.ts +6 -0
  196. package/lib/components/PaginationRange/types.d.ts +15 -0
  197. package/lib/components/Popover/Popover.d.ts +15 -0
  198. package/lib/components/Popover/PopoverDemo.d.ts +3 -0
  199. package/lib/components/Popover/index.d.ts +1 -0
  200. package/lib/components/Portal/Portal.d.ts +20 -0
  201. package/lib/components/Portal/index.d.ts +1 -0
  202. package/lib/components/PriceInput/PriceInput.d.ts +3 -0
  203. package/lib/components/PriceInput/index.d.ts +1 -0
  204. package/lib/components/PriceInput/styled.d.ts +29 -0
  205. package/lib/components/PriceInput/types.d.ts +12 -0
  206. package/lib/components/Radio/Radio.d.ts +12 -0
  207. package/lib/components/Radio/index.d.ts +1 -0
  208. package/lib/components/Radio/styled.d.ts +1 -0
  209. package/lib/components/Search/Search.d.ts +3 -0
  210. package/lib/components/Search/index.d.ts +1 -0
  211. package/lib/components/Search/styled.d.ts +26 -0
  212. package/lib/components/Search/types.d.ts +9 -0
  213. package/lib/components/SegmentedControl/SegmentedControl.d.ts +3 -0
  214. package/lib/components/SegmentedControl/index.d.ts +1 -0
  215. package/lib/components/SegmentedControl/styled.d.ts +1 -0
  216. package/lib/components/SegmentedControl/types.d.ts +13 -0
  217. package/lib/components/Select/Select.d.ts +17 -0
  218. package/lib/components/Select/index.d.ts +1 -0
  219. package/lib/components/Select/styled.d.ts +1 -0
  220. package/lib/components/SimpleTable/SimpleTable.d.ts +15 -0
  221. package/lib/components/SimpleTable/index.d.ts +1 -0
  222. package/lib/components/SimpleTable/styled.d.ts +15 -0
  223. package/lib/components/SimpleTable/types.d.ts +6 -0
  224. package/lib/components/Slider/Slider.d.ts +3 -0
  225. package/lib/components/Slider/index.d.ts +1 -0
  226. package/lib/components/Slider/styled.d.ts +8 -0
  227. package/lib/components/Slider/types.d.ts +26 -0
  228. package/lib/components/Stack/Alignments.d.ts +1 -2
  229. package/lib/components/Stack/Stack.d.ts +1 -2
  230. package/lib/components/Stack/types.d.ts +1 -1
  231. package/lib/components/Stepper/Stepper.d.ts +9 -0
  232. package/lib/components/Stepper/index.d.ts +1 -0
  233. package/lib/components/Stepper/styled.d.ts +5 -0
  234. package/lib/components/Tag/Tag.d.ts +5 -0
  235. package/lib/components/Tag/index.d.ts +1 -0
  236. package/lib/components/Text/Text.d.ts +2 -0
  237. package/lib/components/Text/index.d.ts +1 -0
  238. package/lib/components/Text/textVariants.d.ts +4 -0
  239. package/lib/components/Text/types.d.ts +14 -0
  240. package/lib/components/Text/utils.d.ts +2 -0
  241. package/lib/components/TextField/TextField.d.ts +3 -0
  242. package/lib/components/TextField/index.d.ts +20 -0
  243. package/lib/components/TextField/styled.d.ts +2 -0
  244. package/lib/components/TextField/types.d.ts +26 -0
  245. package/lib/components/ToastsLayout/ToastsLayout.d.ts +3 -0
  246. package/lib/components/ToastsLayout/components/Toast.d.ts +3 -0
  247. package/lib/components/ToastsLayout/components/styled.d.ts +10 -0
  248. package/lib/components/ToastsLayout/index.d.ts +1 -0
  249. package/lib/components/ToastsLayout/types.d.ts +38 -0
  250. package/lib/components/Toggle/Toggle.d.ts +6 -0
  251. package/lib/components/Toggle/index.d.ts +1 -0
  252. package/lib/components/Toggle/styled.d.ts +11 -0
  253. package/lib/components/Toggle/types.d.ts +9 -0
  254. package/lib/components/ToggleButton/ToggleButton.d.ts +9 -0
  255. package/lib/components/ToggleButton/index.d.ts +1 -0
  256. package/lib/components/ToggleButton/styled.d.ts +1 -0
  257. package/lib/components/Tooltip/Tooltip.d.ts +2 -0
  258. package/lib/components/Tooltip/index.d.ts +1 -0
  259. package/lib/components/Tooltip/styled.d.ts +8 -0
  260. package/lib/components/Tooltip/types.d.ts +36 -0
  261. package/lib/components/VideoModal/VideoModal.d.ts +3 -0
  262. package/lib/components/VideoModal/VideoModalDemo.d.ts +2 -0
  263. package/lib/components/VideoModal/components/Popup.d.ts +8 -0
  264. package/lib/components/VideoModal/components/styled.d.ts +7 -0
  265. package/lib/components/VideoModal/index.d.ts +1 -0
  266. package/lib/components/VideoModal/styled.d.ts +4 -0
  267. package/lib/components/VideoModal/types.d.ts +9 -0
  268. package/lib/components/View/View.d.ts +11 -0
  269. package/lib/components/View/index.d.ts +1 -0
  270. package/lib/components/View/styled.d.ts +13 -0
  271. package/lib/components/View/types.d.ts +30 -0
  272. package/lib/components/WeightInput/WeightInput.d.ts +3 -0
  273. package/lib/components/WeightInput/index.d.ts +1 -0
  274. package/lib/components/WeightInput/styled.d.ts +26 -0
  275. package/lib/components/WeightInput/types.d.ts +21 -0
  276. package/lib/components/index.d.ts +50 -0
  277. package/lib/components/types.d.ts +20 -0
  278. package/lib/hoc/index.d.ts +2 -0
  279. package/lib/hoc/withDeprecated.d.ts +2 -0
  280. package/lib/hoc/withLabels/HelpIcon.d.ts +2 -0
  281. package/lib/hoc/withLabels/index.d.ts +1 -0
  282. package/lib/hoc/withLabels/styled.d.ts +5 -0
  283. package/lib/hoc/withLabels/withLabels.d.ts +8 -0
  284. package/lib/hooks/index.d.ts +7 -0
  285. package/lib/hooks/useClickOutside.d.ts +5 -0
  286. package/lib/hooks/useDebounce.d.ts +1 -0
  287. package/lib/hooks/useDropdown.d.ts +6 -0
  288. package/lib/hooks/useFocusVisible.d.ts +11 -0
  289. package/lib/hooks/useHover.d.ts +1 -0
  290. package/lib/hooks/useIsOverflowing.d.ts +9 -0
  291. package/lib/hooks/useTabs.d.ts +6 -0
  292. package/lib/index.d.ts +1200 -18
  293. package/lib/index.esm.js +1 -1
  294. package/lib/index.esm.js.map +1 -1
  295. package/lib/index.js +1 -1
  296. package/lib/index.js.map +1 -1
  297. package/lib/tempIcons/ArrowDownIcon.d.ts +2 -0
  298. package/lib/tempIcons/ArrowUpIcon.d.ts +2 -0
  299. package/lib/tempIcons/AttentionIcon.d.ts +2 -0
  300. package/lib/tempIcons/CalendarIcon.d.ts +2 -0
  301. package/lib/tempIcons/ClipboardIcon.d.ts +2 -0
  302. package/lib/tempIcons/CrossIcon.d.ts +2 -0
  303. package/lib/tempIcons/DoubleArrowAscIcon.d.ts +2 -0
  304. package/lib/tempIcons/DoubleArrowDescIcon.d.ts +2 -0
  305. package/lib/tempIcons/DoubleArrowIcon.d.ts +2 -0
  306. package/lib/tempIcons/DoubleArrowIconIcon.d.ts +2 -0
  307. package/lib/tempIcons/DownArrowIcon.d.ts +2 -0
  308. package/lib/tempIcons/DropdownIcon.d.ts +2 -0
  309. package/lib/tempIcons/EditIcon.d.ts +2 -0
  310. package/lib/tempIcons/EndArrowIcon.d.ts +2 -0
  311. package/lib/tempIcons/FailIcon.d.ts +2 -0
  312. package/lib/tempIcons/HelpIcon.d.ts +2 -0
  313. package/lib/tempIcons/InfoIcon.d.ts +2 -0
  314. package/lib/tempIcons/LeftArrowIcon.d.ts +2 -0
  315. package/lib/tempIcons/MergeIcon.d.ts +2 -0
  316. package/lib/tempIcons/MoreHorizIcon.d.ts +2 -0
  317. package/lib/tempIcons/ReorderIcon.d.ts +2 -0
  318. package/lib/tempIcons/RightArrowIcon.d.ts +2 -0
  319. package/lib/tempIcons/SearchIcon.d.ts +2 -0
  320. package/lib/tempIcons/StartArrowIcon.d.ts +2 -0
  321. package/lib/tempIcons/SuccessIcon.d.ts +2 -0
  322. package/lib/tempIcons/UpArrowIcon.d.ts +2 -0
  323. package/lib/tempIcons/VisibilityIcon.d.ts +2 -0
  324. package/lib/tempIcons/VisibilityOffIcon.d.ts +2 -0
  325. package/lib/theme/index.d.ts +2 -2
  326. package/lib/theme/modules/shadows.d.ts +1 -1
  327. package/lib/theme/utils/buildClassnames.d.ts +1 -0
  328. package/lib/theme/utils/color.d.ts +13 -0
  329. package/lib/theme/utils/generateId.d.ts +1 -0
  330. package/lib/theme/utils/index.d.ts +3 -0
  331. package/lib/theme/utils/paginationList.d.ts +4 -0
  332. package/lib/theme/utils/setupIntersectionObserverMock.d.ts +18 -0
  333. package/lib/utils/buildClassnames.d.ts +1 -0
  334. package/lib/utils/color.d.ts +13 -0
  335. package/lib/utils/generateId.d.ts +1 -0
  336. package/lib/utils/index.d.ts +3 -0
  337. package/lib/utils/paginationList.d.ts +4 -0
  338. package/lib/utils/setupIntersectionObserverMock.d.ts +18 -0
  339. package/lib/utils/toMap.d.ts +5 -0
  340. package/package.json +68 -14
  341. package/setupJestMock.js +5 -0
  342. package/setupTests.js +6 -0
  343. package/src/components/Accordion/Accordion.stories.mdx +41 -0
  344. package/src/components/Accordion/Accordion.stories.tsx +29 -0
  345. package/src/components/Accordion/Accordion.test.tsx +34 -0
  346. package/src/components/Accordion/Accordion.tsx +62 -0
  347. package/src/components/Accordion/__snapshots__/Accordion.test.tsx.snap +152 -0
  348. package/src/components/Accordion/index.ts +1 -0
  349. package/src/components/Accordion/styled.ts +102 -0
  350. package/src/components/ActionList/ActionList.stories.tsx +23 -0
  351. package/src/components/ActionList/ActionList.test.tsx +39 -0
  352. package/src/components/ActionList/ActionList.tsx +72 -0
  353. package/src/components/ActionList/__snapshots__/ActionList.test.tsx.snap +247 -0
  354. package/src/components/ActionList/index.ts +1 -0
  355. package/src/components/ActionList/styled.ts +62 -0
  356. package/src/components/ActionList/types.ts +22 -0
  357. package/src/components/Anchor/Anchor.stories.tsx +35 -0
  358. package/src/components/Anchor/Anchor.test.tsx +10 -0
  359. package/src/components/Anchor/Anchor.tsx +17 -0
  360. package/src/components/Anchor/__snapshots__/Anchor.test.tsx.snap +34 -0
  361. package/src/components/Anchor/index.ts +1 -0
  362. package/src/components/Anchor/styled.ts +22 -0
  363. package/src/components/AnimatedDropdown/AnimatedDropdown.stories.tsx +44 -0
  364. package/src/components/AnimatedDropdown/AnimatedDropdown.test.tsx +14 -0
  365. package/src/components/AnimatedDropdown/AnimatedDropdown.tsx +54 -0
  366. package/src/components/AnimatedDropdown/__snapshots__/AnimatedDropdown.test.tsx.snap +117 -0
  367. package/src/components/AnimatedDropdown/components/BasicDropdown.test.tsx +14 -0
  368. package/src/components/AnimatedDropdown/components/BasicDropdown.tsx +17 -0
  369. package/src/components/AnimatedDropdown/components/__snapshots__/BasicDropdown.test.tsx.snap +31 -0
  370. package/src/components/AnimatedDropdown/components/styled.ts +11 -0
  371. package/src/components/AnimatedDropdown/index.ts +1 -0
  372. package/src/components/AnimatedDropdown/styled.ts +51 -0
  373. package/src/components/AnimatedDropdown/types.ts +16 -0
  374. package/src/components/Avatar/Avatar.stories.tsx +30 -0
  375. package/src/components/Avatar/Avatar.test.tsx +10 -0
  376. package/src/components/Avatar/Avatar.tsx +23 -0
  377. package/src/components/Avatar/__snapshots__/Avatar.test.tsx.snap +47 -0
  378. package/src/components/Avatar/index.ts +1 -0
  379. package/src/components/Avatar/styled.ts +24 -0
  380. package/src/components/Avatar/types.ts +12 -0
  381. package/src/components/Badge/Badge.stories.tsx +29 -0
  382. package/src/components/Badge/Badge.test.tsx +15 -0
  383. package/src/components/Badge/Badge.tsx +33 -0
  384. package/src/components/Badge/__snapshots__/Badge.test.tsx.snap +78 -0
  385. package/src/components/Badge/index.ts +1 -0
  386. package/src/components/Badge/styled.ts +50 -0
  387. package/src/components/Badge/types.ts +43 -0
  388. package/src/components/Banner/Banner.stories.tsx +30 -0
  389. package/src/components/Banner/Banner.test.tsx +10 -0
  390. package/src/components/Banner/Banner.tsx +45 -0
  391. package/src/components/Banner/__snapshots__/Banner.test.tsx.snap +124 -0
  392. package/src/components/Banner/index.ts +1 -0
  393. package/src/components/Banner/styled.ts +49 -0
  394. package/src/components/Banner/types.ts +23 -0
  395. package/src/components/BaseContainer/BaseContainer.test.tsx +10 -0
  396. package/src/components/BaseContainer/BaseContainer.ts +8 -0
  397. package/src/components/BaseContainer/__snapshots__/BaseContainer.test.tsx.snap +18 -0
  398. package/src/components/BaseContainer/index.ts +1 -0
  399. package/src/components/Breadcrumbs/Breadcrumbs.stories.tsx +43 -0
  400. package/src/components/Breadcrumbs/Breadcrumbs.test.tsx +21 -0
  401. package/src/components/Breadcrumbs/Breadcrumbs.tsx +31 -0
  402. package/src/components/Breadcrumbs/__snapshots__/Breadcrumbs.test.tsx.snap +91 -0
  403. package/src/components/Breadcrumbs/components/Breadcrumb.tsx +20 -0
  404. package/src/components/Breadcrumbs/components/styled.ts +31 -0
  405. package/src/components/Breadcrumbs/index.ts +1 -0
  406. package/src/components/Breadcrumbs/types.ts +23 -0
  407. package/src/components/Button/Button.stories.tsx +111 -0
  408. package/src/components/Button/Button.test.tsx +101 -0
  409. package/src/components/Button/Button.tsx +82 -0
  410. package/src/components/Button/Docs.mdx +19 -0
  411. package/src/components/Button/__snapshots__/Button.test.tsx.snap +1570 -0
  412. package/src/components/Button/components/styled.ts +271 -0
  413. package/src/components/Button/index.ts +1 -0
  414. package/src/components/Button/types.ts +27 -0
  415. package/src/components/Card/Card.stories.tsx +85 -0
  416. package/src/components/Card/Card.test.tsx +26 -0
  417. package/src/components/Card/Card.tsx +88 -0
  418. package/src/components/Card/Docs.mdx +134 -0
  419. package/src/components/Card/__snapshots__/Card.test.tsx.snap +390 -0
  420. package/src/components/Card/index.ts +1 -0
  421. package/src/components/Card/styled.ts +93 -0
  422. package/src/components/CardHeader/CardHeader.stories.tsx +38 -0
  423. package/src/components/CardHeader/CardHeader.test.tsx +12 -0
  424. package/src/components/CardHeader/CardHeader.tsx +63 -0
  425. package/src/components/CardHeader/__snapshots__/CardHeader.test.tsx.snap +218 -0
  426. package/src/components/CardHeader/index.ts +1 -0
  427. package/src/components/CardHeader/styled.ts +30 -0
  428. package/src/components/Checkbox/Checkbox.stories.tsx +64 -0
  429. package/src/components/Checkbox/Checkbox.test.tsx +57 -0
  430. package/src/components/Checkbox/Checkbox.tsx +62 -0
  431. package/src/components/Checkbox/__snapshots__/Checkbox.test.tsx.snap +129 -0
  432. package/src/components/Checkbox/index.ts +1 -0
  433. package/src/components/Checkbox/styled.ts +67 -0
  434. package/src/components/Choice/Choice.tsx +89 -0
  435. package/src/components/Choice/components/styled.ts +98 -0
  436. package/src/components/Choice/index.ts +1 -0
  437. package/src/components/ChoiceList/ChoiceList.stories.tsx +23 -0
  438. package/src/components/ChoiceList/ChoiceList.test.tsx +39 -0
  439. package/src/components/ChoiceList/ChoiceList.tsx +86 -0
  440. package/src/components/ChoiceList/__snapshots__/ChoiceList.test.tsx.snap +352 -0
  441. package/src/components/ChoiceList/index.ts +1 -0
  442. package/src/components/ChoiceList/styled.ts +23 -0
  443. package/src/components/CopyToClipboard/CopyToClipboard.stories.tsx +18 -0
  444. package/src/components/CopyToClipboard/CopyToClipboard.test.tsx +10 -0
  445. package/src/components/CopyToClipboard/CopyToClipboard.tsx +53 -0
  446. package/src/components/CopyToClipboard/__snapshots__/CopyToClipboard.test.tsx.snap +129 -0
  447. package/src/components/CopyToClipboard/index.ts +1 -0
  448. package/src/components/DataTable/DataTable.stories.tsx +99 -0
  449. package/src/components/DataTable/DataTable.test.tsx +104 -0
  450. package/src/components/DataTable/DataTable.tsx +634 -0
  451. package/src/components/DataTable/DataTableDocs.mdx +625 -0
  452. package/src/components/DataTable/SkeletonContent/SkeletonContent.tsx +46 -0
  453. package/src/components/DataTable/SkeletonContent/index.ts +1 -0
  454. package/src/components/DataTable/SpecificState/SpecificState.tsx +17 -0
  455. package/src/components/DataTable/SpecificState/index.ts +1 -0
  456. package/src/components/DataTable/SpecificState/styled.ts +42 -0
  457. package/src/components/DataTable/StickyHeader.tsx +64 -0
  458. package/src/components/DataTable/__snapshots__/DataTable.test.tsx.snap +439 -0
  459. package/src/components/DataTable/cells/ClickableCell.tsx +21 -0
  460. package/src/components/DataTable/cells/EditableCell.tsx +22 -0
  461. package/src/components/DataTable/cells/SkeletonCell.tsx +17 -0
  462. package/src/components/DataTable/cells/SkeletonHeaderCell.tsx +20 -0
  463. package/src/components/DataTable/cells/index.ts +3 -0
  464. package/src/components/DataTable/cells/styled.ts +25 -0
  465. package/src/components/DataTable/index.ts +1 -0
  466. package/src/components/DataTable/styled.ts +291 -0
  467. package/src/components/DataTable/utils/constants.tsx +25 -0
  468. package/src/components/DataTable/utils/hooks.ts +38 -0
  469. package/src/components/DataTable/utils/index.ts +23 -0
  470. package/src/components/DataTable/utils/types.ts +117 -0
  471. package/src/components/DataTableExp/DataTable.test.tsx +214 -0
  472. package/src/components/DataTableExp/DataTable.tsx +291 -0
  473. package/src/components/DataTableExp/DataTableExp.stories.tsx +329 -0
  474. package/src/components/DataTableExp/Docs.mdx +74 -0
  475. package/src/components/DataTableExp/components/ActionBar.tsx +87 -0
  476. package/src/components/DataTableExp/components/Cell.ts +41 -0
  477. package/src/components/DataTableExp/components/ColumnHeader.tsx +52 -0
  478. package/src/components/DataTableExp/components/ColumnMenu.tsx +96 -0
  479. package/src/components/DataTableExp/components/EmptyBodyContent.ts +23 -0
  480. package/src/components/DataTableExp/components/Header.ts +20 -0
  481. package/src/components/DataTableExp/components/LoadingCellContent.ts +39 -0
  482. package/src/components/DataTableExp/components/NoWrap.ts +5 -0
  483. package/src/components/DataTableExp/components/Row.ts +39 -0
  484. package/src/components/DataTableExp/components/ScrollContainer.ts +8 -0
  485. package/src/components/DataTableExp/components/SelectionCell.tsx +36 -0
  486. package/src/components/DataTableExp/components/SelectionHeader.tsx +20 -0
  487. package/src/components/DataTableExp/components/StickyHead.tsx +134 -0
  488. package/src/components/DataTableExp/components/TableGrid.ts +28 -0
  489. package/src/components/DataTableExp/components/Truncate.ts +7 -0
  490. package/src/components/DataTableExp/components/Wrapper.ts +26 -0
  491. package/src/components/DataTableExp/constants.ts +4 -0
  492. package/src/components/DataTableExp/hooks/index.tsx +6 -0
  493. package/src/components/DataTableExp/hooks/useCellWidths.ts +34 -0
  494. package/src/components/DataTableExp/hooks/useColumns.ts +14 -0
  495. package/src/components/DataTableExp/hooks/useDragToScroll.ts +48 -0
  496. package/src/components/DataTableExp/hooks/useNested.ts +31 -0
  497. package/src/components/DataTableExp/hooks/useScrollPosition.ts +45 -0
  498. package/src/components/DataTableExp/hooks/useSelection.tsx +92 -0
  499. package/src/components/DataTableExp/index.tsx +1 -0
  500. package/src/components/DataTableExp/renderers/index.tsx +5 -0
  501. package/src/components/DataTableExp/renderers/renderCell.ts +31 -0
  502. package/src/components/DataTableExp/renderers/renderFooter.tsx +33 -0
  503. package/src/components/DataTableExp/renderers/renderHeader.tsx +83 -0
  504. package/src/components/DataTableExp/renderers/renderLoadingCell.tsx +29 -0
  505. package/src/components/DataTableExp/renderers/renderNestedCell.tsx +33 -0
  506. package/src/components/DataTableExp/types.ts +168 -0
  507. package/src/components/DataTableExp/utils/GetSortIcon.tsx +24 -0
  508. package/src/components/DataTableExp/utils/alignmentToFlex.ts +14 -0
  509. package/src/components/DataTableExp/utils/generateTableCss.ts +114 -0
  510. package/src/components/DataTableExp/utils/getNextSortState.ts +18 -0
  511. package/src/components/DataTableExp/utils/getRowState.test.ts +33 -0
  512. package/src/components/DataTableExp/utils/getRowState.ts +17 -0
  513. package/src/components/DataTableExp/utils/index.ts +6 -0
  514. package/src/components/DataTableExp/utils/parseWidth.ts +12 -0
  515. package/src/components/DataTableExp/utils/sumAll.ts +7 -0
  516. package/src/components/DescriptionList/DescriptionList.stories.tsx +24 -0
  517. package/src/components/DescriptionList/DescriptionList.test.tsx +16 -0
  518. package/src/components/DescriptionList/DescriptionList.tsx +90 -0
  519. package/src/components/DescriptionList/__snapshots__/DescriptionList.test.tsx.snap +86 -0
  520. package/src/components/DescriptionList/index.ts +1 -0
  521. package/src/components/DetailPage/DetailPage.stories.tsx +45 -0
  522. package/src/components/DetailPage/DetailPage.test.tsx +15 -0
  523. package/src/components/DetailPage/DetailPage.tsx +23 -0
  524. package/src/components/DetailPage/__snapshots__/DetailPage.test.tsx.snap +52 -0
  525. package/src/components/DetailPage/index.ts +1 -0
  526. package/src/components/DetailPage/styled.ts +27 -0
  527. package/src/components/DimensionsInput/DimensionsInput.stories.tsx +33 -0
  528. package/src/components/DimensionsInput/DimensionsInput.test.tsx +98 -0
  529. package/src/components/DimensionsInput/DimensionsInput.tsx +63 -0
  530. package/src/components/DimensionsInput/__snapshots__/DimensionsInput.test.tsx.snap +303 -0
  531. package/src/components/DimensionsInput/index.ts +1 -0
  532. package/src/components/DimensionsInput/styled.ts +66 -0
  533. package/src/components/DimensionsInput/types.ts +16 -0
  534. package/src/components/FilterTag/FilterTag.stories.tsx +32 -0
  535. package/src/components/FilterTag/FilterTag.test.tsx +10 -0
  536. package/src/components/FilterTag/FilterTag.tsx +111 -0
  537. package/src/components/FilterTag/__snapshots__/FilterTag.test.tsx.snap +117 -0
  538. package/src/components/FilterTag/index.ts +1 -0
  539. package/src/components/FilterTag/styled.ts +77 -0
  540. package/src/components/FilterTag/types.ts +15 -0
  541. package/src/components/Grid/Grid.stories.mdx +34 -0
  542. package/src/components/Grid/Grid.test.tsx +14 -0
  543. package/src/components/Grid/__snapshots__/Grid.test.tsx.snap +32 -0
  544. package/src/components/Grid/index.ts +12 -0
  545. package/src/components/Grid/types.ts +10 -0
  546. package/src/components/Image/Image.stories.tsx +20 -0
  547. package/src/components/Image/Image.test.tsx +10 -0
  548. package/src/components/Image/Image.tsx +122 -0
  549. package/src/components/Image/__snapshots__/Image.test.tsx.snap +34 -0
  550. package/src/components/Image/components/PlaceholderImage.tsx +19 -0
  551. package/src/components/Image/components/styled.ts +17 -0
  552. package/src/components/Image/index.ts +1 -0
  553. package/src/components/Image/types.ts +6 -0
  554. package/src/components/Image/utils.ts +8 -0
  555. package/src/components/InputGroup/InputGroup.stories.tsx +33 -0
  556. package/src/components/InputGroup/InputGroup.test.tsx +15 -0
  557. package/src/components/InputGroup/__snapshots__/InputGroup.test.tsx.snap +182 -0
  558. package/src/components/InputGroup/index.ts +46 -0
  559. package/src/components/Loader/Docs.mdx +1 -1
  560. package/src/components/Loader/Grid.tsx +1 -3
  561. package/src/components/Loader/Loader.stories.tsx +1 -1
  562. package/src/components/Loader/Loader.test.tsx +14 -0
  563. package/src/components/Loader/Loader.tsx +5 -5
  564. package/src/components/Loader/TailSpin.tsx +1 -3
  565. package/src/components/Loader/ThreeDots.tsx +1 -3
  566. package/src/components/Loader/__snapshots__/Loader.test.tsx.snap +315 -13
  567. package/src/components/LoginWithAmazonButton/LoginWithAmazonButton.stories.tsx +14 -0
  568. package/src/components/LoginWithAmazonButton/LoginWithAmazonButton.test.tsx +19 -0
  569. package/src/components/LoginWithAmazonButton/LoginWithAmazonButton.tsx +38 -0
  570. package/src/components/LoginWithAmazonButton/index.tsx +1 -0
  571. package/src/components/LoginWithAmazonButton/styled.ts +14 -0
  572. package/src/components/Modal/Modal.stories.tsx +455 -0
  573. package/src/components/Modal/Modal.test.tsx +211 -0
  574. package/src/components/Modal/Modal.tsx +110 -0
  575. package/src/components/Modal/__snapshots__/Modal.test.tsx.snap +1940 -0
  576. package/src/components/Modal/components/Dialog/Dialog.tsx +11 -0
  577. package/src/components/Modal/components/Dialog/constants.ts +48 -0
  578. package/src/components/Modal/components/Dialog/styled.ts +104 -0
  579. package/src/components/Modal/components/styled.ts +24 -0
  580. package/src/components/Modal/index.tsx +1 -0
  581. package/src/components/Modal/types.ts +61 -0
  582. package/src/components/PageHeader/PageHeader.test.tsx +40 -0
  583. package/src/components/PageHeader/PageHeader.tsx +119 -0
  584. package/src/components/PageHeader/PageHeaderDocs.mdx +69 -0
  585. package/src/components/PageHeader/__snapshots__/PageHeader.test.tsx.snap +906 -0
  586. package/src/components/PageHeader/index.ts +1 -0
  587. package/src/components/PageHeader/styled.ts +81 -0
  588. package/src/components/Pagination/Docs.mdx +61 -0
  589. package/src/components/Pagination/Pagination.stories.tsx +27 -0
  590. package/src/components/Pagination/Pagination.test.tsx +102 -0
  591. package/src/components/Pagination/Pagination.tsx +105 -0
  592. package/src/components/Pagination/__snapshots__/Pagination.test.tsx.snap +395 -0
  593. package/src/components/Pagination/components.tsx +16 -0
  594. package/src/components/Pagination/hooks/usePagination.ts +88 -0
  595. package/src/components/Pagination/index.ts +1 -0
  596. package/src/components/Pagination/styled.ts +31 -0
  597. package/src/components/Pagination/types.ts +9 -0
  598. package/src/components/PaginationRange/Items/Item/Item.tsx +14 -0
  599. package/src/components/PaginationRange/Items/Item/index.ts +1 -0
  600. package/src/components/PaginationRange/Items/Item/styled.ts +26 -0
  601. package/src/components/PaginationRange/Items/Item/types.ts +6 -0
  602. package/src/components/PaginationRange/Items/Items.tsx +27 -0
  603. package/src/components/PaginationRange/Items/index.ts +1 -0
  604. package/src/components/PaginationRange/PaginationRange.stories.tsx +14 -0
  605. package/src/components/PaginationRange/PaginationRange.test.tsx +10 -0
  606. package/src/components/PaginationRange/PaginationRange.tsx +69 -0
  607. package/src/components/PaginationRange/__snapshots__/PaginationRange.test.tsx.snap +155 -0
  608. package/src/components/PaginationRange/index.ts +1 -0
  609. package/src/components/PaginationRange/styled.ts +39 -0
  610. package/src/components/PaginationRange/types.ts +17 -0
  611. package/src/components/Popover/Popover.test.tsx +87 -0
  612. package/src/components/Popover/Popover.tsx +82 -0
  613. package/src/components/Popover/PopoverDemo.tsx +53 -0
  614. package/src/components/Popover/PopoverDocs.mdx +64 -0
  615. package/src/components/Popover/__snapshots__/Popover.test.tsx.snap +35 -0
  616. package/src/components/Popover/index.ts +1 -0
  617. package/src/components/Portal/Portal.stories.tsx +18 -0
  618. package/src/components/Portal/Portal.tsx +62 -0
  619. package/src/components/Portal/index.ts +1 -0
  620. package/src/components/PriceInput/PriceInput.stories.tsx +36 -0
  621. package/src/components/PriceInput/PriceInput.test.tsx +22 -0
  622. package/src/components/PriceInput/PriceInput.tsx +101 -0
  623. package/src/components/PriceInput/index.tsx +1 -0
  624. package/src/components/PriceInput/styled.ts +116 -0
  625. package/src/components/PriceInput/types.ts +13 -0
  626. package/src/components/Radio/Radio.stories.tsx +57 -0
  627. package/src/components/Radio/Radio.test.tsx +8 -0
  628. package/src/components/Radio/Radio.tsx +39 -0
  629. package/src/components/Radio/__snapshots__/Radio.test.tsx.snap +128 -0
  630. package/src/components/Radio/index.ts +1 -0
  631. package/src/components/Radio/styled.ts +58 -0
  632. package/src/components/Search/Search.stories.mdx +23 -0
  633. package/src/components/Search/Search.stories.tsx +31 -0
  634. package/src/components/Search/Search.test.tsx +12 -0
  635. package/src/components/Search/Search.tsx +87 -0
  636. package/src/components/Search/__snapshots__/Search.test.tsx.snap +162 -0
  637. package/src/components/Search/index.ts +1 -0
  638. package/src/components/Search/styled.ts +46 -0
  639. package/src/components/Search/types.ts +10 -0
  640. package/src/components/SegmentedControl/SegmentedControl.stories.tsx +43 -0
  641. package/src/components/SegmentedControl/SegmentedControl.test.tsx +67 -0
  642. package/src/components/SegmentedControl/SegmentedControl.tsx +27 -0
  643. package/src/components/SegmentedControl/__snapshots__/SegmentedControl.test.tsx.snap +825 -0
  644. package/src/components/SegmentedControl/index.ts +1 -0
  645. package/src/components/SegmentedControl/styled.ts +50 -0
  646. package/src/components/SegmentedControl/types.ts +13 -0
  647. package/src/components/Select/Select.stories.tsx +37 -0
  648. package/src/components/Select/Select.test.tsx +37 -0
  649. package/src/components/Select/Select.tsx +58 -0
  650. package/src/components/Select/__snapshots__/Select.test.tsx.snap +199 -0
  651. package/src/components/Select/index.ts +1 -0
  652. package/src/components/Select/styled.ts +53 -0
  653. package/src/components/SimpleTable/SimpleTable.stories.tsx +60 -0
  654. package/src/components/SimpleTable/SimpleTable.test.tsx +28 -0
  655. package/src/components/SimpleTable/SimpleTable.tsx +18 -0
  656. package/src/components/SimpleTable/__snapshots__/SimpleTable.test.tsx.snap +87 -0
  657. package/src/components/SimpleTable/index.ts +1 -0
  658. package/src/components/SimpleTable/styled.ts +68 -0
  659. package/src/components/SimpleTable/types.ts +7 -0
  660. package/src/components/Slider/Select.stories.tsx +43 -0
  661. package/src/components/Slider/Slider.test.tsx +19 -0
  662. package/src/components/Slider/Slider.tsx +197 -0
  663. package/src/components/Slider/__snapshots__/Slider.test.tsx.snap +109 -0
  664. package/src/components/Slider/index.ts +1 -0
  665. package/src/components/Slider/styled.ts +53 -0
  666. package/src/components/Slider/types.ts +30 -0
  667. package/src/components/Stack/Alignments.ts +1 -3
  668. package/src/components/Stack/Stack.test.tsx +46 -0
  669. package/src/components/Stack/Stack.tsx +1 -2
  670. package/src/components/Stack/__snapshots__/Stack.test.tsx.snap +240 -10
  671. package/src/components/Stack/types.ts +1 -1
  672. package/src/components/Stepper/Stepper.stories.tsx +14 -0
  673. package/src/components/Stepper/Stepper.test.tsx +8 -0
  674. package/src/components/Stepper/Stepper.tsx +33 -0
  675. package/src/components/Stepper/__snapshots__/Stepper.test.tsx.snap +142 -0
  676. package/src/components/Stepper/index.ts +1 -0
  677. package/src/components/Stepper/styled.ts +83 -0
  678. package/src/components/Tag/Tag.stories.tsx +43 -0
  679. package/src/components/Tag/Tag.test.tsx +18 -0
  680. package/src/components/Tag/Tag.ts +23 -0
  681. package/src/components/Tag/__snapshots__/Tag.test.tsx.snap +78 -0
  682. package/src/components/Tag/index.ts +1 -0
  683. package/src/components/Text/Docs.mdx +112 -0
  684. package/src/components/Text/Text.stories.tsx +27 -0
  685. package/src/components/Text/Text.test.tsx +38 -0
  686. package/src/components/Text/Text.ts +44 -0
  687. package/src/components/Text/__snapshots__/Text.test.tsx.snap +1158 -0
  688. package/src/components/Text/index.ts +1 -0
  689. package/src/components/Text/textVariants.ts +41 -0
  690. package/src/components/Text/types.ts +33 -0
  691. package/src/components/Text/utils.ts +23 -0
  692. package/src/components/TextField/Docs.mdx +14 -0
  693. package/src/components/TextField/TextField.stories.tsx +38 -0
  694. package/src/components/TextField/TextField.test.tsx +27 -0
  695. package/src/components/TextField/TextField.tsx +92 -0
  696. package/src/components/TextField/__snapshots__/TextField.test.tsx.snap +205 -0
  697. package/src/components/TextField/index.ts +4 -0
  698. package/src/components/TextField/styled.ts +95 -0
  699. package/src/components/TextField/types.ts +41 -0
  700. package/src/components/ToastsLayout/ToastsLayout.stories.tsx +88 -0
  701. package/src/components/ToastsLayout/ToastsLayout.tsx +39 -0
  702. package/src/components/ToastsLayout/components/Toast.tsx +78 -0
  703. package/src/components/ToastsLayout/components/styled.ts +76 -0
  704. package/src/components/ToastsLayout/index.ts +1 -0
  705. package/src/components/ToastsLayout/types.ts +41 -0
  706. package/src/components/Toggle/Toggle.stories.tsx +41 -0
  707. package/src/components/Toggle/Toggle.test.tsx +57 -0
  708. package/src/components/Toggle/Toggle.tsx +31 -0
  709. package/src/components/Toggle/__snapshots__/Toggle.test.tsx.snap +219 -0
  710. package/src/components/Toggle/index.ts +1 -0
  711. package/src/components/Toggle/styled.ts +84 -0
  712. package/src/components/Toggle/types.ts +10 -0
  713. package/src/components/ToggleButton/ToggleButton.stories.tsx +19 -0
  714. package/src/components/ToggleButton/ToggleButton.test.tsx +12 -0
  715. package/src/components/ToggleButton/ToggleButton.tsx +31 -0
  716. package/src/components/ToggleButton/__snapshots__/ToggleButton.test.tsx.snap +83 -0
  717. package/src/components/ToggleButton/index.ts +1 -0
  718. package/src/components/ToggleButton/styled.ts +92 -0
  719. package/src/components/Tooltip/Docs.mdx +14 -0
  720. package/src/components/Tooltip/Tooltip.stories.tsx +26 -0
  721. package/src/components/Tooltip/Tooltip.test.tsx +25 -0
  722. package/src/components/Tooltip/Tooltip.tsx +95 -0
  723. package/src/components/Tooltip/__snapshots__/Tooltip.test.tsx.snap +17 -0
  724. package/src/components/Tooltip/index.ts +1 -0
  725. package/src/components/Tooltip/styled.ts +74 -0
  726. package/src/components/Tooltip/types.ts +44 -0
  727. package/src/components/VideoModal/VideoModal.stories.tsx +36 -0
  728. package/src/components/VideoModal/VideoModal.test.tsx +36 -0
  729. package/src/components/VideoModal/VideoModal.tsx +40 -0
  730. package/src/components/VideoModal/VideoModalDemo.tsx +19 -0
  731. package/src/components/VideoModal/__snapshots__/VideoModal.test.tsx.snap +165 -0
  732. package/src/components/VideoModal/components/Popup.tsx +44 -0
  733. package/src/components/VideoModal/components/styled.ts +34 -0
  734. package/src/components/VideoModal/index.ts +1 -0
  735. package/src/components/VideoModal/styled.ts +24 -0
  736. package/src/components/VideoModal/types.ts +9 -0
  737. package/src/components/View/View.stories.tsx +26 -0
  738. package/src/components/View/View.test.tsx +10 -0
  739. package/src/components/View/View.tsx +120 -0
  740. package/src/components/View/__snapshots__/View.test.tsx.snap +80 -0
  741. package/src/components/View/index.ts +1 -0
  742. package/src/components/View/styled.ts +82 -0
  743. package/src/components/View/types.ts +42 -0
  744. package/src/components/WeightInput/WeightInput.stories.tsx +26 -0
  745. package/src/components/WeightInput/WeightInput.test.tsx +11 -0
  746. package/src/components/WeightInput/WeightInput.tsx +66 -0
  747. package/src/components/WeightInput/__snapshots__/WeightInput.test.tsx.snap +272 -0
  748. package/src/components/WeightInput/index.ts +1 -0
  749. package/src/components/WeightInput/styled.ts +39 -0
  750. package/src/components/WeightInput/types.ts +31 -0
  751. package/src/components/index.ts +50 -0
  752. package/src/components/types.ts +23 -0
  753. package/src/hoc/index.ts +2 -0
  754. package/src/hoc/withDeprecated.tsx +11 -0
  755. package/src/hoc/withLabels/index.ts +1 -0
  756. package/src/hoc/withLabels/styled.ts +54 -0
  757. package/src/hoc/withLabels/withLabels.tsx +46 -0
  758. package/src/hooks/index.ts +7 -0
  759. package/src/hooks/useClickOutside.ts +40 -0
  760. package/src/hooks/useDebounce.ts +15 -0
  761. package/src/hooks/useDropdown.ts +22 -0
  762. package/src/hooks/useFocusVisible.tsx +157 -0
  763. package/src/hooks/useHover.ts +9 -0
  764. package/src/hooks/useIsOverflowing.ts +32 -0
  765. package/src/hooks/useTabs.ts +24 -0
  766. package/src/index.ts +3 -0
  767. package/src/tempIcons/ArrowDownIcon.tsx +12 -0
  768. package/src/tempIcons/ArrowUpIcon.tsx +12 -0
  769. package/src/tempIcons/AttentionIcon.tsx +12 -0
  770. package/src/tempIcons/CalendarIcon.tsx +12 -0
  771. package/src/tempIcons/ClipboardIcon.tsx +10 -0
  772. package/src/tempIcons/CrossIcon.tsx +20 -0
  773. package/src/tempIcons/DoubleArrowAscIcon.tsx +8 -0
  774. package/src/tempIcons/DoubleArrowDescIcon.tsx +8 -0
  775. package/src/tempIcons/DoubleArrowIcon.tsx +8 -0
  776. package/src/tempIcons/DoubleArrowIconIcon.tsx +8 -0
  777. package/src/tempIcons/DownArrowIcon.tsx +20 -0
  778. package/src/tempIcons/DropdownIcon.tsx +14 -0
  779. package/src/tempIcons/EditIcon.tsx +12 -0
  780. package/src/tempIcons/EndArrowIcon.tsx +18 -0
  781. package/src/tempIcons/FailIcon.tsx +12 -0
  782. package/src/tempIcons/HelpIcon.tsx +12 -0
  783. package/src/tempIcons/InfoIcon.tsx +14 -0
  784. package/src/tempIcons/LeftArrowIcon.tsx +12 -0
  785. package/src/tempIcons/MergeIcon.tsx +12 -0
  786. package/src/tempIcons/MoreHorizIcon.tsx +10 -0
  787. package/src/tempIcons/ReorderIcon.tsx +10 -0
  788. package/src/tempIcons/RightArrowIcon.tsx +12 -0
  789. package/src/tempIcons/SearchIcon.tsx +12 -0
  790. package/src/tempIcons/StartArrowIcon.tsx +16 -0
  791. package/src/tempIcons/SuccessIcon.tsx +12 -0
  792. package/src/tempIcons/UpArrowIcon.tsx +20 -0
  793. package/src/tempIcons/VisibilityIcon.tsx +10 -0
  794. package/src/tempIcons/VisibilityOffIcon.tsx +10 -0
  795. package/src/theme/index.ts +2 -2
  796. package/src/theme/modules/shadows.ts +1 -1
  797. package/src/utils/buildClassnames.ts +2 -0
  798. package/src/utils/color.ts +27 -0
  799. package/src/utils/generateId.ts +4 -0
  800. package/src/utils/index.ts +3 -0
  801. package/src/utils/paginationList.ts +6 -0
  802. package/src/utils/setupIntersectionObserverMock.ts +46 -0
package/lib/index.d.ts CHANGED
@@ -1,19 +1,462 @@
1
1
  /// <reference types="react" />
2
- import * as react from 'react';
3
- import react__default, { ReactNode } from 'react';
2
+ import * as React$1 from 'react';
3
+ import React__default, { FC, ReactNode, ButtonHTMLAttributes, SyntheticEvent, ReactEventHandler, Component, CSSProperties, PureComponent } from 'react';
4
4
  import * as styled_components from 'styled-components';
5
- import * as styled_components_dist_types from 'styled-components/dist/types';
5
+ import { Placement } from '@popperjs/core';
6
6
 
7
- type LoaderType = 'Grid' | 'TailSpin' | 'ThreeDots';
8
- interface LoaderProps {
7
+ interface AccordionProps {
8
+ children: ReactNode;
9
+ label: string;
10
+ iconSlot?: ReactNode;
9
11
  className?: string;
10
- height?: number;
11
- width?: number;
12
- color?: string;
13
- type?: LoaderType;
12
+ timeout?: number;
13
+ transitionClassnames?: string;
14
+ description?: string;
15
+ shouldOpenOnMount?: boolean;
16
+ }
17
+ declare const Accordion: FC<AccordionProps>;
18
+
19
+ type ButtonVariant = 'default' | 'destructive' | 'primary' | 'primaryDestructive' | 'flat' | 'link' | 'unstyled';
20
+ /**
21
+ * Button properties.
22
+ */
23
+ interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
24
+ children?: ReactNode;
25
+ /** Variant styles */
26
+ variant?: ButtonVariant;
27
+ /** Button sizes */
28
+ size?: 'sm' | 'base';
29
+ /** Icon */
30
+ icon?: ReactNode;
31
+ /** Renders a dropdown indicator inside the button */
32
+ dropdown?: boolean;
33
+ /** Renders a loading indicator inside the button */
34
+ loading?: boolean;
35
+ }
36
+
37
+ type ActionListItem = {
38
+ title: string;
39
+ icon?: Omit<ReactNode, string>;
40
+ variant?: 'item' | 'action' | 'link';
41
+ onClick: () => void;
42
+ };
43
+ type ActionListSection = {
44
+ title?: string;
45
+ items: ActionListItem[];
46
+ };
47
+ interface ActionListProps {
48
+ title: string;
49
+ items?: ActionListItem[];
50
+ sections?: ActionListSection[];
51
+ buttonVariant?: ButtonVariant;
52
+ buttonSize?: 'sm' | 'base';
53
+ }
54
+
55
+ declare const ActionList: ({ title, items, sections, buttonVariant, buttonSize, }: ActionListProps) => React__default.JSX.Element;
56
+
57
+ interface AnchorProps {
58
+ children?: ReactNode;
59
+ href: string;
60
+ text?: string;
61
+ className?: string;
62
+ target?: string;
63
+ }
64
+ declare const Anchor: ({ children, className, text, href, target }: AnchorProps) => React__default.JSX.Element;
65
+
66
+ declare enum ComponentSize {
67
+ base = "base",
68
+ sm = "sm"
69
+ }
70
+ declare enum WeightUnit {
71
+ g = "g",
72
+ lb = "lb"
73
+ }
74
+ type EventHandlerProps = {
75
+ onClick?: (event: SyntheticEvent) => void;
76
+ onKeyUp?: (event: SyntheticEvent) => void;
77
+ onKeyDown?: (event: SyntheticEvent) => void;
78
+ onKeyPress?: (event: SyntheticEvent) => void;
79
+ onMouseEnter?: (event: SyntheticEvent) => void;
80
+ onMouseLeave?: (event: SyntheticEvent) => void;
81
+ onChange?: (event: SyntheticEvent) => void;
82
+ onBlur?: (event: SyntheticEvent) => void;
83
+ onFocus?: (event: SyntheticEvent) => void;
84
+ };
85
+
86
+ type BasicDropdownProps = EventHandlerProps & {
87
+ className?: string;
88
+ children: ReactNode;
89
+ };
90
+ type AnimatedDropdownProps = BasicDropdownProps & {
91
+ cta?: ReactNode;
92
+ shouldShowDropdown: boolean;
93
+ timeout?: number;
94
+ transitionClassnames?: string;
95
+ onClickAway?: (event: Event) => void;
96
+ reversed?: boolean;
97
+ };
98
+
99
+ declare const AnimatedDropdown: ({ cta, shouldShowDropdown, children, className, reversed, onClickAway, timeout, transitionClassnames, onClick, onMouseEnter, onMouseLeave, }: AnimatedDropdownProps) => React__default.JSX.Element;
100
+
101
+ interface AvatarProps {
102
+ name: string;
103
+ width?: string;
104
+ bgColor?: string;
105
+ textColor?: string;
106
+ }
107
+
108
+ declare const Avatar: ({ width, name, bgColor, textColor, }: AvatarProps) => React__default.JSX.Element;
109
+
110
+ type BadgeVariant = 'default' | 'primary' | 'warning';
111
+ /**
112
+ * Badge properties.
113
+ */
114
+ type BadgeProps = {
115
+ /**
116
+ * Specifies the Badge variant.
117
+ */
118
+ variant?: BadgeVariant;
119
+ /**
120
+ * Renders an optional icon inside the Badge.
121
+ */
122
+ iconSlot?: Omit<ReactNode, string>;
123
+ /**
124
+ * Specifies tooltip text to display on hover.
125
+ */
126
+ tooltip?: string;
127
+ /**
128
+ * Specifies whether or not to hide the Badge border.
129
+ */
130
+ hideBorder?: boolean;
131
+ /**
132
+ * Specifies an optional class name.
133
+ */
134
+ className?: string;
135
+ /**
136
+ * Specifies an optional class name for E2E testing.
137
+ */
138
+ e2eClassName?: string;
139
+ /**
140
+ * Children.
141
+ */
142
+ children: React__default.ReactNode;
143
+ };
144
+
145
+ declare const Badge: ({ variant, hideBorder, iconSlot, tooltip, className, e2eClassName, children, }: BadgeProps) => React__default.JSX.Element;
146
+
147
+ declare enum BannerTypes {
148
+ help = "help",
149
+ info = "info",
150
+ error = "error",
151
+ success = "success"
152
+ }
153
+ type BannerProps = {
154
+ type?: keyof typeof BannerTypes | string;
155
+ text?: string;
156
+ icon?: Omit<ReactNode, string>;
157
+ onClose?: ReactEventHandler;
158
+ className?: string;
159
+ header?: ReactNode;
160
+ };
161
+
162
+ /**
163
+ * The `Banner` component was previously called `Alert` (and similarly `Pill`).
164
+ */
165
+ declare const Banner: ({ type, text, icon, onClose, className, header, }: BannerProps) => React__default.JSX.Element;
166
+
167
+ declare const BaseContainer: styled_components.StyledComponent<"div", any, {}, never>;
168
+
169
+ type Item = {
170
+ pathname: string;
171
+ title: string;
172
+ };
173
+ type LinkComponentProps = false | React.ComponentType<any>;
174
+ interface BreadcrumbsProps {
175
+ items: Item[];
176
+ Separator?: string | React.ReactNode;
177
+ LinkComponent?: LinkComponentProps;
178
+ }
179
+
180
+ declare const Breadcrumbs: ({ items, Separator, LinkComponent, }: BreadcrumbsProps) => React__default.JSX.Element;
181
+
182
+ declare const Button: React__default.ForwardRefExoticComponent<ButtonProps & React__default.RefAttributes<HTMLButtonElement>>;
183
+
184
+ type CardElevation = 0 | 1 | 2 | 3 | 4;
185
+ declare const accents: {
186
+ info: string;
187
+ success: string;
188
+ error: string;
189
+ };
190
+ interface SurfaceProps {
191
+ elevation?: CardElevation;
192
+ accent?: keyof typeof accents;
193
+ }
194
+
195
+ type CardAction = {
196
+ title: string;
197
+ onClick: () => void;
198
+ };
199
+ type CardProps = {
200
+ className?: string;
201
+ style?: React__default.CSSProperties;
202
+ title?: string;
203
+ subtitle?: string;
204
+ HeaderActionSlot?: React__default.ReactNode;
205
+ action?: CardAction;
206
+ collapsable?: boolean;
207
+ elevation?: CardElevation;
208
+ accent?: 'info' | 'success' | 'error';
209
+ children: ReactNode;
210
+ onClose?: () => void;
211
+ renderFooter?: () => ReactNode;
212
+ };
213
+ declare const Card: {
214
+ ({ className, style, title, subtitle, HeaderActionSlot, action, collapsable, elevation, accent, children, onClose, renderFooter, }: CardProps): React__default.JSX.Element;
215
+ Surface: styled_components.StyledComponent<"div", any, SurfaceProps, never>;
216
+ Section: styled_components.StyledComponent<"section", any, {}, never>;
217
+ FullBleed: styled_components.StyledComponent<"div", any, {}, never>;
218
+ Footer: styled_components.StyledComponent<"footer", any, {}, never>;
219
+ };
220
+
221
+ declare const headerVariants: readonly ["headingXXL", "headingXL", "headingLarge", "headingMedium", "headingSmall"];
222
+ declare const textVariants: readonly ["headingXXL", "headingXL", "headingLarge", "headingMedium", "headingSmall", "headingTable", "subheadingLarge", "subheadingMedium", "subheadingSmall", "subheadingSmallBold", "body", "bodySmall", "bodyBold", "bodyBoldDark", "bodySmallBold", "inputLabel", "inputLabelSmall", "hintText", "placeholder", "placeholderSmall", "placeholderCode", "placeholderCodeSmall", "error", "errorSmall", "successSmall"];
223
+ /** @deprecated do not use me */
224
+ declare const deprecatedTextVariants: readonly ["button", "buttonSmall", "linkLarge", "linkMedium", "link", "linkSmall"];
225
+
226
+ type HeaderVariant = (typeof headerVariants)[number];
227
+ type TextVariant = (typeof textVariants)[number];
228
+ type DeprecatedTextVariants = (typeof deprecatedTextVariants)[number];
229
+ type ValidTextTag = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'span' | 'label' | 'li' | 'ol' | 'ul' | 'blockquote' | 'code';
230
+ type TextProps = {
231
+ as?: ValidTextTag;
232
+ muted?: boolean;
233
+ } & ({
234
+ variant: TextVariant;
235
+ } | {
236
+ /** @deprecated to be removed, bad for accessibility. Use `Button` or `Anchor` */
237
+ variant?: DeprecatedTextVariants;
238
+ });
239
+
240
+ type CardHeaderAction = {
241
+ title: string;
242
+ onClick: () => void;
243
+ };
244
+ interface CardHeaderProps {
245
+ id?: string;
246
+ title?: string;
247
+ subtitle?: string;
248
+ headerVariant?: HeaderVariant;
249
+ action?: CardHeaderAction;
250
+ ActionSlot?: React__default.ReactNode;
251
+ isCollapsed?: boolean;
252
+ onClickCollapse?: () => void;
253
+ onClickClose?: () => void;
254
+ }
255
+ declare const CardHeader: ({ id, title, subtitle, headerVariant, action, ActionSlot, isCollapsed, onClickCollapse, onClickClose, }: CardHeaderProps) => React__default.JSX.Element;
256
+
257
+ interface ForwardedChoiceProps {
258
+ disabled?: boolean;
259
+ label?: string;
260
+ hint?: string;
261
+ tooltip?: string;
262
+ error?: string;
263
+ bordered?: boolean;
264
+ Badge?: ReactNode;
265
+ Accessory?: ReactNode;
266
+ Footer?: ReactNode;
267
+ }
268
+ interface ChoiceProps extends ForwardedChoiceProps {
269
+ id: string;
270
+ children: ReactNode;
271
+ }
272
+ declare const Choice: ({ id, label, hint, tooltip, error, bordered, Badge, Accessory, Footer, children, disabled, }: ChoiceProps) => React__default.JSX.Element;
273
+
274
+ type CheckboxValue = string | number;
275
+ interface CheckboxProps extends ForwardedChoiceProps {
276
+ checked: boolean;
277
+ indeterminate?: boolean;
278
+ value?: CheckboxValue;
279
+ name?: string;
280
+ disabled?: boolean;
281
+ ariaLabel?: string;
282
+ onChange: (checked: boolean, value?: CheckboxValue) => void;
283
+ }
284
+ declare const Checkbox: ({ checked, indeterminate, value, name, disabled, ariaLabel, onChange, ...otherProps }: CheckboxProps) => React__default.JSX.Element;
285
+
286
+ type ChoiceListOptionValue = string | number;
287
+ interface ChoiceListOption {
288
+ value: ChoiceListOptionValue;
289
+ name?: string;
290
+ label: string;
291
+ hint?: string;
292
+ disabled?: boolean;
293
+ Badge?: ReactNode;
294
+ Accessory?: ReactNode;
295
+ Footer?: ReactNode;
296
+ }
297
+ interface ChoiceListProps {
298
+ options: ChoiceListOption[];
299
+ selected: ChoiceListOptionValue[];
300
+ title?: string;
301
+ allowMultiple?: boolean;
302
+ disabled?: boolean;
303
+ bordered?: boolean;
304
+ error?: string;
305
+ onChange: (selected: ChoiceListOptionValue[]) => void;
306
+ }
307
+ declare class ChoiceList extends Component<ChoiceListProps> {
308
+ handleChange: (value: ChoiceListOptionValue, checked: boolean) => void;
309
+ handleChangeSingle: (value: ChoiceListOptionValue, checked: boolean) => void;
310
+ handleChangeMultiple: (value: ChoiceListOptionValue, checked: boolean) => void;
311
+ render(): React__default.JSX.Element;
312
+ }
313
+
314
+ interface CopyToClipboardProps {
315
+ className?: string;
316
+ text: string;
317
+ onCopy?: () => void;
318
+ }
319
+ /**
320
+ * A dynamic button to facilitate copying text to a users' keyboard when clicked.
321
+ */
322
+ declare const CopyToClipboard: ({ className, text, onCopy }: CopyToClipboardProps) => React__default.JSX.Element;
323
+
324
+ type DataTableId = string | number;
325
+ type RowData = any;
326
+ type DataTableHeader = {
327
+ id: DataTableId;
328
+ title?: string;
329
+ icon?: ReactNode;
330
+ tooltip?: string;
331
+ align?: 'left' | 'center' | 'right';
332
+ sortable?: boolean;
333
+ grow?: boolean;
334
+ width?: number | string;
335
+ skeleton?: string;
336
+ skeletonStyle?: CSSProperties;
337
+ };
338
+ type DataTableRow = {
339
+ id: DataTableId;
340
+ data: RowData;
341
+ nestedRows?: DataTableNestedRow[];
342
+ accentColor?: string;
343
+ };
344
+ type DataTableNestedRow = {
345
+ id: DataTableId;
346
+ data: RowData;
347
+ };
348
+ type DataTableSortDirection = 'ascending' | 'descending';
349
+ type DataTableSelectionMode = 'multiple' | 'single';
350
+ type SpecificStateType = {
351
+ icon: ReactNode;
352
+ title: string;
353
+ subTitle?: string;
354
+ };
355
+ type StripedType = boolean;
356
+ type NoWrapType = boolean;
357
+ type ShowScrollbarType = boolean;
358
+ /**
359
+ * DataTable properties.
360
+ */
361
+ interface DataTableProps$1 {
362
+ /** Removes the outer border */
363
+ borderless?: boolean;
364
+ /** Enables row zebra striping */
365
+ striped?: StripedType;
366
+ /** Disables text wrapping in header cells */
367
+ noWrap?: NoWrapType;
368
+ /** Forces OSX to render scrollbars */
369
+ showScrollbar?: ShowScrollbarType;
370
+ /** Configure column headers */
371
+ headers?: DataTableHeader[];
372
+ /** Configure content rows */
373
+ rows: DataTableRow[];
374
+ /** Render a content row */
375
+ renderRow: (row: DataTableRow) => ReactNode;
376
+ /** Render a nested content row */
377
+ renderNestedRow?: (nestedRow: DataTableNestedRow) => ReactNode;
378
+ /** List of row IDs that are expanded - their nested rows will be rendered */
379
+ expandedRowIds?: DataTableId[];
380
+ /** Render a content row when in the LOADING state */
381
+ renderLoadingRow?: () => ReactNode;
382
+ /** Render a footer row */
383
+ renderFooterRow?: (rows: DataTableRow[]) => ReactNode;
384
+ /** Render a footer row when in the LOADING state */
385
+ renderFooterLoadingRow?: () => ReactNode;
386
+ /** Hides the extra first cell added to the footer when row selection is enabled */
387
+ omitFooterSelectionCell?: boolean;
388
+ /** List of selected row IDs */
389
+ selectedRowIds?: Array<DataTableId>;
390
+ /** Sets the mode of row selection */
391
+ selectionMode?: DataTableSelectionMode;
392
+ /** Disable ability to select specified rows */
393
+ disabledSelectionInputRowIds?: DataTableId[];
394
+ /** Event triggered when rows are selected/deselected */
395
+ onChangeSelectedRowIds?: (selectedRowIds: Array<DataTableId>) => void;
396
+ /** Current sorted column ID (see headers config) */
397
+ sortColumnId?: DataTableId;
398
+ /** Current sort direction */
399
+ sortDirection?: DataTableSortDirection;
400
+ /** Event triggered when sortable column headers are clicked */
401
+ onChangeSort?: (columnId: DataTableId, direction: DataTableSortDirection) => void;
402
+ /** Shows the ERROR state */
403
+ isError: boolean;
404
+ /** Shows the LOADING state */
405
+ isLoading: boolean;
406
+ /** Default number of rows shown in LOADING state */
407
+ skeletonRowsNumber?: number;
408
+ /** Enables sticky headers row */
409
+ isHeaderSticky?: boolean;
410
+ /** Custom styles for stick header container - e.g. adding `top` offset */
411
+ stickyHeaderStyle?: CSSProperties;
412
+ /**
413
+ * Config object to show custom content when in ERROR or EMPTY states.
414
+ * Accepts `title`, `subTitle` and `icon`.
415
+ * */
416
+ customSpecificState?: SpecificStateType;
417
+ /** Override the table content height when using customSpecificState */
418
+ bodyHeightInSpecificStates?: number;
419
+ /** Number of fixed columns at the start of the table */
420
+ startFixedColumnsNumber?: number;
421
+ /** Number of fixed columns at the end of the table */
422
+ endFixedColumnsNumber?: number;
423
+ }
424
+
425
+ interface CellProps$1 {
426
+ align?: 'left' | 'center' | 'right';
427
+ grow?: boolean;
428
+ }
429
+
430
+ interface SkeletonCellProps extends CellProps$1 {
431
+ style?: CSSProperties;
432
+ }
433
+
434
+ interface EditableCellProps extends CellProps$1 {
435
+ onClick: React__default.MouseEventHandler<HTMLButtonElement>;
436
+ children: React__default.ReactNode;
437
+ }
438
+
439
+ interface ClickableCellProps extends CellProps$1 {
440
+ onClick: React__default.MouseEventHandler<HTMLButtonElement>;
441
+ children: React__default.ReactNode;
14
442
  }
15
443
 
16
- declare const Loader: ({ className, height, width, color, type, }: LoaderProps) => react__default.JSX.Element;
444
+ declare const DataTable: {
445
+ ({ borderless, striped, noWrap, showScrollbar, headers, rows, renderRow, renderNestedRow, expandedRowIds, renderLoadingRow, renderFooterRow, renderFooterLoadingRow, omitFooterSelectionCell, selectedRowIds, disabledSelectionInputRowIds, selectionMode, onChangeSelectedRowIds, sortColumnId, sortDirection, onChangeSort, isError, isLoading, skeletonRowsNumber, isHeaderSticky, stickyHeaderStyle, customSpecificState, bodyHeightInSpecificStates, startFixedColumnsNumber, endFixedColumnsNumber, }: DataTableProps$1): React__default.JSX.Element;
446
+ Cell: styled_components.StyledComponent<"td", any, CellProps$1, never>;
447
+ ClickableCell: ({ onClick, children, ...otherProps }: ClickableCellProps) => React__default.JSX.Element;
448
+ EditableCell: ({ onClick, children, ...otherProps }: EditableCellProps) => React__default.JSX.Element;
449
+ SkeletonCell: {
450
+ ({ style, ...otherProps }: SkeletonCellProps): React__default.JSX.Element;
451
+ defaultProps: {
452
+ style: {};
453
+ };
454
+ };
455
+ SkeletonContent: ({ isLoading, style }: {
456
+ isLoading?: boolean | undefined;
457
+ style?: React__default.CSSProperties | undefined;
458
+ }) => React__default.JSX.Element;
459
+ };
17
460
 
18
461
  declare enum Alignments {
19
462
  start = "flex-start",
@@ -46,23 +489,762 @@ type StackProps = {
46
489
  spacing?: Size;
47
490
  };
48
491
 
492
+ type RowState = {
493
+ selected: boolean;
494
+ expanded: boolean;
495
+ disabled: boolean;
496
+ };
497
+ type ColumnId = string | number;
498
+ type ColumnAlignment = 'left' | 'center' | 'right';
499
+ type ColumnPinned = 'left' | 'right' | 'none';
500
+ type ColumnSpacing = Size;
501
+ type ColumnWidth = number | string;
502
+ type ColumnWidthFixed = ColumnWidth;
503
+ type ColumnWidthBounded = {
504
+ min?: ColumnWidth;
505
+ max?: ColumnWidth;
506
+ };
507
+ type ColumnConfig = {
508
+ id: ColumnId;
509
+ align?: ColumnAlignment;
510
+ hidden?: boolean;
511
+ icon?: Omit<ReactNode, string>;
512
+ pinned?: ColumnPinned;
513
+ sortable?: boolean;
514
+ spacing?: ColumnSpacing;
515
+ span?: number;
516
+ title?: string;
517
+ tooltip?: string;
518
+ width?: ColumnWidthFixed | ColumnWidthBounded;
519
+ renderCell: CellRenderer;
520
+ renderFooter?: FooterRenderer;
521
+ renderHeader?: HeaderRenderer;
522
+ renderNestedCell?: NestedCellRenderer;
523
+ };
524
+ type ColumnConfigs = Array<ColumnConfig>;
525
+ declare enum SortDirection {
526
+ ascending = "ascending",
527
+ descending = "descending"
528
+ }
529
+ type SortState = {
530
+ columnId: ColumnId;
531
+ direction: SortDirection;
532
+ };
533
+ type SortChangeHandler = (sortState: SortState) => void;
534
+ type RowId = number | string;
535
+ interface NestedTableRow {
536
+ id: RowId;
537
+ data: any;
538
+ }
539
+ type NestedTableRows = Array<NestedTableRow>;
540
+ interface TableRow {
541
+ id: RowId;
542
+ data: any;
543
+ nestedRows?: NestedTableRows;
544
+ accentColor?: string;
545
+ e2eClassName?: string;
546
+ }
547
+ type TableRows = Array<TableRow>;
548
+ interface HeaderProps extends React.HtmlHTMLAttributes<HTMLTableCellElement> {
549
+ id: string;
550
+ align?: ColumnAlignment;
551
+ spacing?: ColumnSpacing;
552
+ span?: number;
553
+ }
554
+ interface RendererHeaderProps extends HeaderProps {
555
+ key: string;
556
+ }
557
+ interface SelectionHeaderProps extends Omit<HeaderProps, 'onChange'> {
558
+ selected: boolean;
559
+ indeterminate: boolean;
560
+ onChange: (selected: boolean, value: RowId | undefined) => void;
561
+ selectionMode: SelectionMode;
562
+ }
563
+ type HeaderRenderer = (column: ColumnConfig, headerProps: RendererHeaderProps) => ReactNode;
564
+ type FooterRenderer = (column: ColumnConfig, footerProps: object) => ReactNode;
565
+ type CellRenderer = (row: TableRow, cellProps: object, actions: TableActions, rowState: RowState) => ReactNode;
566
+ type ParentRowState = RowState;
567
+ type NestedCellRenderer = (nestedRow: NestedTableRow, cellProps: object, parentRowState: ParentRowState) => ReactNode;
568
+ type SetSelectedAction = (selected: boolean, rowId: RowId | undefined) => void;
569
+ type SetExpandedAction = (expanded: boolean, rowId: RowId | undefined) => void;
570
+ type TableActions = {
571
+ setSelected: SetSelectedAction;
572
+ setExpanded: SetExpandedAction;
573
+ };
574
+ type BorderMode = 'full' | 'vertical' | 'none';
575
+ type CustomState = {
576
+ icon: ReactNode;
577
+ heading: string;
578
+ subheading?: string;
579
+ };
580
+ type SelectionMode = 'single' | 'multiple';
581
+ type SelectionState = [RowId[], (rowIds: RowId[]) => void];
582
+ type StripingMode = 'row' | 'nested';
583
+ interface DataTableProps {
584
+ ActionBarSlot?: ReactNode;
585
+ borderMode?: BorderMode;
586
+ columns: ColumnConfigs;
587
+ disabledRowIds?: Array<RowId>;
588
+ enableStickyHeader?: boolean;
589
+ emptyState?: CustomState;
590
+ expandedRowIds?: Array<RowId>;
591
+ loading?: boolean;
592
+ loadingRowCount?: number;
593
+ onChangeSort?: SortChangeHandler;
594
+ rows: TableRows;
595
+ selectionMode?: SelectionMode;
596
+ selectionState?: SelectionState;
597
+ setExpanded?: SetExpandedAction;
598
+ sortState?: SortState;
599
+ stripingMode?: StripingMode;
600
+ }
601
+
602
+ interface CellProps {
603
+ align?: ColumnAlignment;
604
+ spacing?: ColumnSpacing;
605
+ span?: number;
606
+ }
607
+
608
+ interface ColumnMenuProps {
609
+ columns: ColumnConfigs;
610
+ columnGroups: ColumnId[][];
611
+ setColumns: (columns: ColumnConfigs) => void;
612
+ }
613
+ declare function ColumnMenu({ columns, columnGroups, setColumns }: ColumnMenuProps): React__default.JSX.Element;
614
+
615
+ interface SelectionCellProps extends CellProps {
616
+ rowId: RowId;
617
+ selected: boolean;
618
+ onChange: (selected: boolean, value: RowId | undefined) => void;
619
+ selectionMode: SelectionMode;
620
+ disabled: boolean;
621
+ }
622
+ declare function SelectionCell({ selected, rowId, onChange, selectionMode, disabled, ...cellProps }: SelectionCellProps): React__default.JSX.Element;
623
+
624
+ declare function SelectionHeader({ selected, indeterminate, onChange, selectionMode, ...headerProps }: SelectionHeaderProps): React__default.JSX.Element;
625
+
626
+ declare const DataTableExp: {
627
+ ({ ActionBarSlot, borderMode, columns, emptyState, expandedRowIds, loading, loadingRowCount, onChangeSort, rows, disabledRowIds, selectionMode, selectionState, setExpanded, sortState, stripingMode, enableStickyHeader, }: DataTableProps): React__default.JSX.Element;
628
+ defaultProps: {
629
+ loading: boolean;
630
+ loadingRowCount: number;
631
+ selectionMode: string;
632
+ stripingMode: string;
633
+ enableStickyHeader: boolean;
634
+ };
635
+ Cell: styled_components.StyledComponent<"td", any, CellProps, never>;
636
+ ColumnMenu: typeof ColumnMenu;
637
+ SelectionCell: typeof SelectionCell;
638
+ SelectionHeader: typeof SelectionHeader;
639
+ Header: styled_components.StyledComponent<"th", any, HeaderProps, never>;
640
+ Truncate: styled_components.StyledComponent<"div", any, {}, never>;
641
+ NoWrap: styled_components.StyledComponent<"div", any, {}, never>;
642
+ };
643
+
644
+ type DescriptionListItem = {
645
+ term: string;
646
+ description: string | string[];
647
+ };
648
+ interface DescriptionListProps {
649
+ items: DescriptionListItem[];
650
+ horizontal?: boolean;
651
+ }
652
+ declare const DescriptionList: ({ items, horizontal }: DescriptionListProps) => React__default.JSX.Element;
653
+
654
+ interface PageHeaderProps$1 {
655
+ renderHeader: (toggleSidebar: () => void, shouldShowSidebar?: boolean) => ReactNode;
656
+ children: ReactNode;
657
+ }
658
+ declare const DetailPage: ({ renderHeader, children }: PageHeaderProps$1) => React__default.JSX.Element;
659
+
660
+ interface DimensionsProps {
661
+ size?: ComponentSize;
662
+ handleChangeHeight: (value: string) => void;
663
+ handleChangeWidth: (value: string) => void;
664
+ handleChangeLength: (value: string) => void;
665
+ label?: string;
666
+ hint?: string;
667
+ error?: string;
668
+ height: string;
669
+ width: string;
670
+ length: string;
671
+ unit?: string;
672
+ className?: string;
673
+ }
674
+
675
+ declare const DimensionsInput: FC<DimensionsProps>;
676
+
677
+ interface FilterTagProps {
678
+ className?: string;
679
+ e2eClassName?: string;
680
+ iconSlot?: Omit<ReactNode, string>;
681
+ label?: string;
682
+ text: string;
683
+ fill?: string;
684
+ content?: ReactNode;
685
+ footer?: ReactNode;
686
+ onClickAway?: (event: Event, closeDropdown?: () => void) => void;
687
+ onClick?: () => void;
688
+ shouldCloseOnClickAway?: boolean;
689
+ }
690
+
691
+ declare const FilterTag: ({ className, e2eClassName, label, text, iconSlot, fill, content, footer, onClickAway, onClick, shouldCloseOnClickAway, }: FilterTagProps) => React__default.JSX.Element;
692
+
693
+ type GridProps = {
694
+ children: ReactNode;
695
+ className?: string;
696
+ columns: number;
697
+ spacing?: Size;
698
+ };
699
+
700
+ declare const Grid: styled_components.StyledComponent<"div", any, GridProps, never>;
701
+
702
+ type ImageProps = {
703
+ src: string;
704
+ alt?: string;
705
+ className?: string;
706
+ e2eClassName?: string;
707
+ width?: string;
708
+ height?: string;
709
+ previewWidth?: string;
710
+ previewHeight?: string;
711
+ previewPlacement?: Placement;
712
+ previewEnabled?: boolean;
713
+ placeholder?: React__default.ReactNode;
714
+ placeholderWidth?: string;
715
+ placeholderHeight?: string;
716
+ disablePlaceholder?: boolean;
717
+ };
718
+ declare const Image: ({ src, alt, className, e2eClassName, width, height, previewWidth, previewHeight, previewPlacement, previewEnabled, placeholder, placeholderWidth, placeholderHeight, disablePlaceholder, }: ImageProps) => React__default.JSX.Element;
719
+
720
+ declare const InputGroup: styled_components.StyledComponent<"div", any, {}, never>;
721
+
722
+ type LoaderType = 'Grid' | 'TailSpin' | 'ThreeDots';
723
+ interface LoaderProps {
724
+ className?: string;
725
+ height?: number;
726
+ width?: number;
727
+ color?: string;
728
+ type?: LoaderType;
729
+ }
730
+
731
+ declare const Loader: ({ className, height, width, color, type, }: LoaderProps) => React__default.JSX.Element;
732
+
49
733
  /**
50
- * Layout component.
734
+ * Image used in this button is to comply with official
735
+ * Amazon button guidelines (https://developer.amazon.com/docs/login-with-amazon/button.html#android-images).
51
736
  */
52
- declare const Stack: styled_components.IStyledComponent<"web", styled_components_dist_types.Substitute<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, StackProps>>;
737
+ declare const LoginWithAmazonButton: React__default.FC<React__default.ButtonHTMLAttributes<HTMLButtonElement>>;
53
738
 
54
- type SizeScale = {
55
- [index: number]: string;
56
- [index: string]: string;
739
+ type ModalVariants = 'xs' | 'sm' | 'base' | 'lg';
740
+ type BaseModalProps = {
741
+ shouldShow: boolean;
742
+ showHeaderCloseButton?: boolean;
743
+ fullBleed?: boolean;
744
+ variant?: ModalVariants;
745
+ onClose: () => void;
746
+ children: React.ReactNode;
747
+ };
748
+ type WithHeaderSlot = {
749
+ headerSlot: React.ReactNode;
750
+ };
751
+ type WithFooterSlot = {
752
+ footerSlot: React.ReactNode;
753
+ };
754
+ type DefaultHeaderOptions = {
755
+ headerTitle: string;
756
+ headerSubtitle?: string;
757
+ };
758
+ type ModalAction = {
759
+ label: string;
760
+ } & ButtonProps;
761
+ type DefaultFooterOptions = {
762
+ leftActions?: ModalAction[];
763
+ rightActions?: ModalAction[];
57
764
  };
765
+ type HeaderOptions = WithHeaderSlot | DefaultHeaderOptions;
766
+ type FooterOptions = WithFooterSlot | DefaultFooterOptions;
767
+ type ModalProps = BaseModalProps & HeaderOptions & FooterOptions;
58
768
 
59
- declare enum shadows {
769
+ declare const Modal: (props: ModalProps) => React__default.JSX.Element;
770
+
771
+ declare enum Shadows {
60
772
  sm = "0px 1px 3px rgba(55, 66, 77, 0.15)",
61
773
  base = "0px 4px 6px rgba(27, 33, 38, 0.2)",
62
774
  md = "0px 10px 15px rgba(27, 33, 38, 0.2)",
63
775
  lg = "0px 20px 25px rgba(27, 33, 38, 0.2)"
64
776
  }
65
777
 
778
+ declare const shadows: typeof Shadows;
779
+ type ShadowPropType = keyof typeof shadows | 'none';
780
+
781
+ type QuickAction = {
782
+ title: string;
783
+ icon: Omit<ReactNode, string>;
784
+ variant: ButtonVariant;
785
+ onClick: () => void;
786
+ };
787
+ type BackAction = {
788
+ title: string;
789
+ onClick: () => void;
790
+ };
791
+ type PageHeaderProps = {
792
+ title: string;
793
+ subtitle?: string;
794
+ imageSrc?: string;
795
+ actions?: ActionListSection[];
796
+ quickActions?: QuickAction[];
797
+ backAction?: BackAction;
798
+ Accessory?: ReactNode;
799
+ shadow?: ShadowPropType;
800
+ onClickPrevious?: () => void;
801
+ onClickNext?: () => void;
802
+ onClickToggleSidebar?: () => void;
803
+ };
804
+ declare const PageHeader: ({ title, subtitle, imageSrc, actions, quickActions, backAction, Accessory, shadow, onClickPrevious, onClickNext, onClickToggleSidebar, }: PageHeaderProps) => React__default.JSX.Element;
805
+
806
+ type PaginationProps = {
807
+ testId?: string;
808
+ e2eClassName?: string;
809
+ currentPage: number;
810
+ totalPagesCount: number;
811
+ handleChangePage: (newPageIndex: number) => void;
812
+ };
813
+
814
+ declare const Pagination: ({ testId, e2eClassName, currentPage, totalPagesCount, handleChangePage, }: PaginationProps) => React__default.JSX.Element;
815
+
816
+ interface PaginationRangeOption {
817
+ label: string;
818
+ value: number;
819
+ }
820
+ interface PaginationRangeProps {
821
+ className?: string;
822
+ dropdownValue?: PaginationRangeOption;
823
+ paginationRange?: PaginationRangeOption[];
824
+ reversedDropdown?: boolean;
825
+ onPaginationRangeChange: (currentItem: PaginationRangeOption) => void;
826
+ }
827
+ interface PaginationRangeState {
828
+ dropdownValue: PaginationRangeOption;
829
+ shouldShowDropdown: boolean;
830
+ }
831
+
832
+ declare class PaginationRange extends Component<PaginationRangeProps, PaginationRangeState> {
833
+ constructor(props: PaginationRangeProps);
834
+ handleRangeListChange: (item: PaginationRangeOption) => void;
835
+ setDropdownValue: (currentValue: PaginationRangeOption) => void;
836
+ toggleShouldShow: () => void;
837
+ render(): React__default.JSX.Element;
838
+ }
839
+
840
+ type PopoverProps = {
841
+ children: ReactNode;
842
+ className?: string;
843
+ anchorElement: HTMLElement | null;
844
+ rootElementRef?: HTMLElement;
845
+ placement?: Placement;
846
+ onShouldClose?: () => void;
847
+ zIndex?: number;
848
+ };
849
+ declare const Popover: ({ children, className, anchorElement, rootElementRef, placement, onShouldClose, zIndex, }: PopoverProps) => React__default.JSX.Element;
850
+
851
+ type PortalProps = {
852
+ children: ReactNode;
853
+ rootElementRef?: HTMLElement;
854
+ };
855
+ type PortalState = {
856
+ isMounted: boolean;
857
+ };
858
+ /**
859
+ * The portal component renders content on the document `body` unless `rootElementRef` is passed.
860
+ */
861
+ declare class Portal extends PureComponent<PortalProps, PortalState> {
862
+ id: string;
863
+ portalNode: HTMLElement | null;
864
+ constructor(props: PortalProps);
865
+ componentDidMount(): void;
866
+ componentWillUnmount(): void;
867
+ render(): React.ReactPortal | null;
868
+ }
869
+
870
+ interface WithLabelsProps {
871
+ label?: string;
872
+ hint?: string | React__default.ReactNode;
873
+ error?: string;
874
+ tooltip?: string;
875
+ }
876
+ declare const withLabels: <P extends object>(Component: React__default.ComponentType<P>) => React__default.FC<P & WithLabelsProps>;
877
+
878
+ interface CurrencyProps {
879
+ className?: string;
880
+ disabled?: boolean;
881
+ size?: ComponentSize;
882
+ currency: string;
883
+ step?: string;
884
+ hasError?: boolean;
885
+ priceValue: string;
886
+ onChange: (value: string) => void;
887
+ onPriceChange: (value: string) => void;
888
+ }
889
+
890
+ declare const PriceInput: React__default.FC<CurrencyProps & WithLabelsProps>;
891
+
892
+ type RadioValue = string | number;
893
+ interface RadioProps extends ForwardedChoiceProps {
894
+ checked: boolean;
895
+ value?: RadioValue;
896
+ disabled?: boolean;
897
+ name?: string;
898
+ onChange: (checked: boolean, value?: RadioValue) => void;
899
+ }
900
+ declare const Radio: ({ checked, value, name, disabled, onChange, ...otherProps }: RadioProps) => React__default.JSX.Element;
901
+
902
+ type TextFieldType = 'text' | 'email' | 'number' | 'password' | 'search' | 'tel' | 'url' | 'date' | 'datetime-local' | 'month' | 'time' | 'week' | 'currency';
903
+ /**
904
+ * TextField properties.
905
+ */
906
+ type TextFieldProps = Omit<EventHandlerProps, 'onChange' | 'onKeyDown'> & Pick<React.InputHTMLAttributes<HTMLInputElement>, 'autoComplete' | 'onKeyDown'> & {
907
+ className?: string;
908
+ /** Input element type */
909
+ type?: TextFieldType;
910
+ value: string;
911
+ onChange: (value: string) => void;
912
+ placeholder?: string;
913
+ step?: string;
914
+ name?: string;
915
+ min?: string;
916
+ max?: string;
917
+ pattern?: string;
918
+ hasError?: boolean;
919
+ size?: ComponentSize;
920
+ multiline?: boolean;
921
+ rows?: string;
922
+ invalid?: boolean;
923
+ disabled?: boolean;
924
+ spellCheck?: boolean;
925
+ };
926
+
927
+ type SearchProps = TextFieldProps & {
928
+ isLoading?: boolean;
929
+ fill?: string;
930
+ onClearClick?: (event: SyntheticEvent) => void;
931
+ reversed?: boolean;
932
+ error?: string;
933
+ };
934
+
935
+ declare const Search: ({ type, disabled, onClearClick, onChange, onBlur, onFocus, onKeyUp, onKeyDown, onKeyPress, value, error, placeholder, className, name, isLoading, fill, reversed, autoComplete, }: SearchProps) => React__default.JSX.Element;
936
+
937
+ type Option = {
938
+ key: string;
939
+ label: string;
940
+ value: string;
941
+ disabled?: boolean;
942
+ };
943
+ type SegmentedControlProps = {
944
+ options: Option[];
945
+ selected: string;
946
+ className?: string;
947
+ onChange: (selectedButton: string) => void;
948
+ };
949
+
950
+ declare const SegmentedControl: ({ options, selected, className, onChange, }: SegmentedControlProps) => React__default.JSX.Element;
951
+
952
+ type SelectOption = {
953
+ label: string;
954
+ value: string;
955
+ disabled?: boolean;
956
+ };
957
+ interface SelectProps {
958
+ className?: string;
959
+ options: Array<SelectOption>;
960
+ value: string;
961
+ size?: 'sm' | 'base';
962
+ disabled?: boolean;
963
+ hasError?: boolean;
964
+ onChange: (value: string) => void;
965
+ }
966
+ declare const Select: React__default.FC<SelectProps & WithLabelsProps>;
967
+
968
+ type TableCellProps = {
969
+ align?: 'left' | 'right' | 'center';
970
+ };
971
+
972
+ type SimpleTableProps = {
973
+ striped?: boolean;
974
+ className?: string;
975
+ children?: ReactNode;
976
+ };
977
+
978
+ /**
979
+ * A simple table component which provides flexible, pre-styled table elements.
980
+ */
981
+ declare const SimpleTable: {
982
+ ({ striped, className, children }: SimpleTableProps): React__default.JSX.Element;
983
+ Header: styled_components.StyledComponent<"thead", any, {}, never>;
984
+ Body: styled_components.StyledComponent<"tbody", any, {}, never>;
985
+ Row: styled_components.StyledComponent<"tr", any, {}, never>;
986
+ HeaderCell: styled_components.StyledComponent<"td", any, TableCellProps & {
987
+ as: string;
988
+ }, "as">;
989
+ Cell: styled_components.StyledComponent<"td", any, TableCellProps, never>;
990
+ };
991
+
992
+ type SliderComponentPropTypes = {
993
+ id?: string;
994
+ value: number | number[];
995
+ min: number;
996
+ max: number;
997
+ step?: number;
998
+ className?: string;
999
+ e2eClassName?: string;
1000
+ onChange: (value: number | number[]) => void;
1001
+ onSlideStart?: () => void;
1002
+ onSlideEnd?: () => void;
1003
+ };
1004
+
1005
+ declare const Slider: ({ id, value, min, max, step, onChange, className, e2eClassName, onSlideStart, onSlideEnd, }: SliderComponentPropTypes) => React__default.JSX.Element;
1006
+
1007
+ /**
1008
+ * Layout component.
1009
+ */
1010
+ declare const Stack: styled_components.StyledComponent<"div", any, StackProps, never>;
1011
+
1012
+ interface StepperProps {
1013
+ onIncrement: () => void;
1014
+ onDecrement: () => void;
1015
+ disabled?: boolean;
1016
+ size?: ComponentSize;
1017
+ }
1018
+ declare const Stepper: ({ onIncrement, onDecrement, disabled, size }: StepperProps) => React__default.JSX.Element;
1019
+
1020
+ interface TagProps {
1021
+ backgroundColor?: string;
1022
+ color?: string;
1023
+ }
1024
+ declare const Tag: styled_components.StyledComponent<"div", any, TagProps, never>;
1025
+
1026
+ declare const Text: styled_components.StyledComponent<"span", any, {} & TextProps, never>;
1027
+
1028
+ declare const TextField: React$1.FC<Omit<EventHandlerProps, "onChange" | "onKeyDown"> & Pick<React$1.InputHTMLAttributes<HTMLInputElement>, "onKeyDown" | "autoComplete"> & {
1029
+ className?: string | undefined;
1030
+ type?: TextFieldType | undefined;
1031
+ value: string;
1032
+ onChange: (value: string) => void;
1033
+ placeholder?: string | undefined;
1034
+ step?: string | undefined;
1035
+ name?: string | undefined;
1036
+ min?: string | undefined;
1037
+ max?: string | undefined;
1038
+ pattern?: string | undefined;
1039
+ hasError?: boolean | undefined;
1040
+ size?: ComponentSize | undefined;
1041
+ multiline?: boolean | undefined;
1042
+ rows?: string | undefined;
1043
+ invalid?: boolean | undefined;
1044
+ disabled?: boolean | undefined;
1045
+ spellCheck?: boolean | undefined;
1046
+ } & WithLabelsProps>;
1047
+
1048
+ declare enum ToastTypes {
1049
+ info = "info",
1050
+ error = "error",
1051
+ success = "success",
1052
+ merge = "merge"
1053
+ }
1054
+ type ToastsLayoutPropTypes = {
1055
+ className?: string;
1056
+ e2eClassName?: string;
1057
+ toasts: Notification[];
1058
+ minWidth?: number | string;
1059
+ max?: number | null;
1060
+ onClose: (key: string) => void;
1061
+ };
1062
+ type Notification = {
1063
+ key: string;
1064
+ type: keyof typeof ToastTypes;
1065
+ iconSlot?: Omit<ReactNode, string>;
1066
+ text: string;
1067
+ cta?: React.ReactNode;
1068
+ };
1069
+
1070
+ declare const ToastsLayout: FC<ToastsLayoutPropTypes>;
1071
+
1072
+ interface ToggleProps extends EventHandlerProps {
1073
+ switched?: boolean;
1074
+ name?: string;
1075
+ small?: boolean;
1076
+ className?: string;
1077
+ disabled?: boolean;
1078
+ ariaLabel?: string;
1079
+ }
1080
+
1081
+ /**
1082
+ * A toggle switch component, use-cases should wrap with a label or
1083
+ */
1084
+ declare const Toggle: FC<ToggleProps>;
1085
+
1086
+ interface ToggleButtonProps {
1087
+ children: ReactNode;
1088
+ checked: boolean;
1089
+ size?: 'sm' | 'base';
1090
+ disabled?: boolean;
1091
+ onChange: (checked: boolean) => void;
1092
+ }
1093
+ declare const ToggleButton: ({ children, checked, size, disabled, onChange, }: ToggleButtonProps) => React__default.JSX.Element;
1094
+
1095
+ interface IConfig {
1096
+ duration: number;
1097
+ side: Sides.TOP | Sides.BOTTOM;
1098
+ triangleOffset: number;
1099
+ tipMinWidth: number;
1100
+ tipMaxWidth: number;
1101
+ tipOffset?: number;
1102
+ }
1103
+ interface TooltipProps {
1104
+ children?: any;
1105
+ text?: string;
1106
+ content?: ReactNode;
1107
+ config?: IConfig;
1108
+ reversed?: boolean;
1109
+ additionalOffset?: number;
1110
+ className?: string;
1111
+ withTriangle?: boolean;
1112
+ unmountOnExit?: boolean;
1113
+ initialShouldShow?: boolean;
1114
+ useReactPortal?: boolean;
1115
+ }
1116
+ declare enum Sides {
1117
+ BOTTOM = "bottom",
1118
+ TOP = "top"
1119
+ }
1120
+
1121
+ declare const Tooltip: ({ children, text, content, config, reversed, className, withTriangle, initialShouldShow, useReactPortal, }: TooltipProps) => JSX.Element | null;
1122
+
1123
+ interface VideoModalProps {
1124
+ id: string;
1125
+ youtubeVideoId: string;
1126
+ showVideoModal: boolean;
1127
+ handleCloseClick: () => void;
1128
+ }
1129
+
1130
+ declare const VideoModal: ({ id, youtubeVideoId, showVideoModal, handleCloseClick, }: VideoModalProps) => React__default.JSX.Element;
1131
+
1132
+ type ViewId = string;
1133
+ declare enum ViewTypes {
1134
+ saved = "saved",
1135
+ fixed = "fixed",
1136
+ draft = "draft"
1137
+ }
1138
+ interface ViewProps {
1139
+ /** ClassName to override styles on outer root element */
1140
+ className?: string;
1141
+ /** Flag to toggle active state styles on the Tab */
1142
+ active?: boolean;
1143
+ /** View name, eg.: Jade's view */
1144
+ name: string;
1145
+ /** View's unique identifier */
1146
+ id: ViewId;
1147
+ /** View type */
1148
+ type?: keyof typeof ViewTypes;
1149
+ /** Number or string value to show near view label */
1150
+ count?: number | string;
1151
+ /** Event handler for when View component is clicked (should get activated) */
1152
+ onClick: (id: ViewId) => void;
1153
+ /** Event handler for when user clicks the delete/cross icon */
1154
+ onDelete?: (id: ViewId) => void;
1155
+ /** Event handler for when user clicks to edit the view */
1156
+ onEdit?: (id: ViewId) => void;
1157
+ /** Event handler for when user clicks to show options for FIXED view */
1158
+ onOptions?: (id: ViewId) => void;
1159
+ /** Class name for e2e testing */
1160
+ e2eClassName?: string;
1161
+ }
1162
+
1163
+ declare const View: ({ id, name, type, className, count, active, onClick, onDelete, onEdit, onOptions, e2eClassName, }: ViewProps) => React__default.JSX.Element;
1164
+
1165
+ interface BaseWeightProps {
1166
+ hasError?: boolean;
1167
+ size?: ComponentSize;
1168
+ className?: string;
1169
+ }
1170
+ interface GramWeightProps extends BaseWeightProps {
1171
+ weightUnit: WeightUnit.g;
1172
+ gram: string;
1173
+ handleChangeGram: (value: string) => void;
1174
+ }
1175
+ interface LbWeightProps extends BaseWeightProps {
1176
+ weightUnit: WeightUnit.lb;
1177
+ ounce: string;
1178
+ pound: string;
1179
+ handleChangeOunce: (value: string) => void;
1180
+ handleChangePound: (value: string) => void;
1181
+ }
1182
+ type WeightProps = GramWeightProps | LbWeightProps;
1183
+
1184
+ declare const WeightInput: FC<WeightProps>;
1185
+
1186
+ /**
1187
+ * Close a menu or modal by clicking out of it
1188
+ */
1189
+ declare const useClickOutside: (isOpen: boolean, onClose: () => void) => React$1.MutableRefObject<null>;
1190
+
1191
+ declare const useDebounce: (value: any, timeout: number) => any;
1192
+
1193
+ declare function useDropdown(): {
1194
+ shouldShowDropdown: boolean;
1195
+ toggleShouldShowDropdown: () => void;
1196
+ setShouldShowDropdown: (state: boolean) => void;
1197
+ closeDropdown: () => void;
1198
+ };
1199
+
1200
+ declare function useFocusVisible(): {
1201
+ focusVisible: boolean;
1202
+ onFocus: () => void;
1203
+ onBlur: () => void;
1204
+ };
1205
+
1206
+ declare const useHover: (initialState?: boolean) => readonly [boolean, () => void, () => void];
1207
+
1208
+ /**
1209
+ * A hook to check if a component's contents are overflowing from its boundaries
1210
+ * (scrollbar is visible).
1211
+ */
1212
+ declare const useIsOverflowing: (ref: HTMLElement | null) => {
1213
+ isOverflowing: boolean;
1214
+ onScroll: React$1.UIEventHandler<HTMLElement>;
1215
+ };
1216
+
1217
+ interface TabsConfig {
1218
+ defaultActiveIndex?: number;
1219
+ }
1220
+ type ITab = any;
1221
+ declare const useTabs: (tabs: ITab[], config?: TabsConfig) => readonly [any, (key: string) => void];
1222
+
1223
+ declare const withDeprecated: <P extends object>(Component: React__default.ComponentType<P>) => React__default.FC<P>;
1224
+
1225
+ declare const buildClassnames: (names: (string | undefined)[]) => string;
1226
+
1227
+ /**
1228
+ * A function to convert hex color to rgb.
1229
+ */
1230
+ declare const hexToRgb: (hex: string) => {
1231
+ r: number;
1232
+ g: number;
1233
+ b: number;
1234
+ } | null;
1235
+ /**
1236
+ * A function to get a hex color with opacity, after converting to `rgba`.
1237
+ * @param hex color in hex format
1238
+ */
1239
+ declare const getOpaqueHexColor: (hex: string, opacity: number) => string;
1240
+
1241
+ declare const generateId: (prefix: string) => string;
1242
+
1243
+ type SizeScale = {
1244
+ [index: number]: string;
1245
+ [index: string]: string;
1246
+ };
1247
+
66
1248
  declare const theme: {
67
1249
  breakpoints: {
68
1250
  readonly mobile: "640px";
@@ -200,7 +1382,7 @@ declare const theme: {
200
1382
  lg: string;
201
1383
  full: string;
202
1384
  };
203
- shadows: typeof shadows;
1385
+ shadows: typeof Shadows;
204
1386
  sizes: SizeScale;
205
1387
  text: {
206
1388
  headingXXL: {
@@ -517,4 +1699,4 @@ declare const theme: {
517
1699
  fontFamily: string;
518
1700
  };
519
1701
 
520
- export { Loader, Stack, theme };
1702
+ export { Accordion, ActionList, Anchor, AnimatedDropdown, Avatar, Badge, Banner, BaseContainer, Breadcrumbs, Button, Card, CardHeader, Checkbox, Choice, ChoiceList, CopyToClipboard, DataTable, DataTableExp, DescriptionList, DetailPage, DimensionsInput, FilterTag, Grid, Image, InputGroup, Loader, LoginWithAmazonButton, Modal, PageHeader, Pagination, PaginationRange, Popover, Portal, PriceInput, Radio, Search, SegmentedControl, Select, SimpleTable, Slider, Stack, Stepper, Tag, Text, TextField, ToastsLayout, Toggle, ToggleButton, Tooltip, VideoModal, View, WeightInput, buildClassnames, generateId, getOpaqueHexColor, hexToRgb, theme, useClickOutside, useDebounce, useDropdown, useFocusVisible, useHover, useIsOverflowing, useTabs, withDeprecated, withLabels };