@indico-data/design-system 2.43.0 → 2.44.0

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 (429) hide show
  1. package/lib/assets/fonts/noto/a.woff2 +0 -0
  2. package/lib/assets/fonts/noto/b.woff2 +0 -0
  3. package/lib/assets/fonts/noto/c.woff2 +0 -0
  4. package/lib/assets/fonts/noto/d.woff2 +0 -0
  5. package/lib/assets/fonts/noto/e.woff2 +0 -0
  6. package/lib/assets/fonts/noto/f.woff2 +0 -0
  7. package/lib/assets/fonts/noto/g.woff2 +0 -0
  8. package/lib/assets/fonts/noto/h.woff2 +0 -0
  9. package/lib/assets/fonts/noto/notosans.css +79 -0
  10. package/lib/components/button/Button.stories.d.ts +11 -13
  11. package/lib/components/button/enums.d.ts +2 -4
  12. package/lib/components/button/types.d.ts +6 -7
  13. package/lib/components/forms/date/iconTriggerDatePicker/IconTriggerDatePicker.d.ts +1 -1
  14. package/lib/components/forms/date/inputDatePicker/SingleInputDatePicker.d.ts +1 -1
  15. package/lib/components/forms/input/Input.d.ts +1 -1
  16. package/lib/index.css +1775 -1017
  17. package/lib/index.d.ts +148 -885
  18. package/lib/index.esm.css +1775 -1017
  19. package/lib/index.esm.js +17829 -24248
  20. package/lib/index.esm.js.map +1 -1
  21. package/lib/index.js +16041 -22502
  22. package/lib/index.js.map +1 -1
  23. package/lib/legacy/components/Tooltip/Tooltip.d.ts +1 -1
  24. package/lib/legacy/components/index.d.ts +1 -12
  25. package/lib/legacy/components/loading-indicators/BarSpinner/BarSpinner.d.ts +1 -1
  26. package/lib/legacy/components/loading-indicators/CirclePulse/CirclePulse.d.ts +1 -1
  27. package/lib/legacy/components/loading-indicators/CircleSpinner/CircleSpinner.d.ts +1 -1
  28. package/lib/legacy/components/loading-indicators/index.d.ts +0 -4
  29. package/lib/legacy/components/modals/ConfirmModal/ConfirmModal.d.ts +1 -1
  30. package/lib/legacy/components/modals/ModalBase/ModalBase.d.ts +1 -1
  31. package/lib/stylesAndAnimations/colors/constants.d.ts +0 -1
  32. package/lib/types.d.ts +1 -3
  33. package/package.json +1 -1
  34. package/src/components/button/Button.mdx +28 -78
  35. package/src/components/button/Button.stories.tsx +312 -176
  36. package/src/components/button/Button.tsx +23 -16
  37. package/src/components/button/__tests__/Button.test.tsx +66 -58
  38. package/src/components/button/enums.ts +2 -6
  39. package/src/components/button/styles/Button.scss +119 -137
  40. package/src/components/button/styles/_variables.scss +115 -148
  41. package/src/components/button/types.ts +6 -8
  42. package/src/components/card/Card.stories.tsx +1 -1
  43. package/src/components/card/styles/Card.scss +11 -11
  44. package/src/components/floatUI/FloatUI.mdx +5 -5
  45. package/src/components/floatUI/FloatUI.stories.tsx +8 -8
  46. package/src/components/floatUI/__tests__/FloatUI.test.tsx +3 -3
  47. package/src/components/floatUI/styles/FloatUI.scss +1 -2
  48. package/src/components/floatUI/styles/_variables.scss +11 -7
  49. package/src/components/forms/checkbox/styles/Checkbox.scss +8 -14
  50. package/src/components/forms/date/datePicker/__tests__/DatePicker.test.tsx +23 -3
  51. package/src/components/forms/date/datePicker/styles/DatePicker.scss +9 -5
  52. package/src/components/forms/date/iconTriggerDatePicker/IconTriggerDatePicker.tsx +4 -4
  53. package/src/components/forms/date/inputDatePicker/SingleInputDatePicker.tsx +1 -1
  54. package/src/components/forms/form/styles/Form.scss +84 -2
  55. package/src/components/forms/input/Input.tsx +2 -2
  56. package/src/components/forms/input/styles/Input.scss +3 -67
  57. package/src/components/forms/numberInput/NumberInput.tsx +1 -1
  58. package/src/components/forms/numberInput/styles/NumberInput.scss +4 -67
  59. package/src/components/forms/passwordInput/PasswordInput.tsx +1 -1
  60. package/src/components/forms/passwordInput/styles/PasswordInput.scss +3 -67
  61. package/src/components/forms/radio/styles/Radio.scss +6 -10
  62. package/src/components/forms/select/styles/Select.scss +30 -44
  63. package/src/components/forms/textarea/styles/Textarea.scss +1 -49
  64. package/src/components/forms/toggle/styles/Toggle.scss +13 -12
  65. package/src/components/grid/styles/Grid.scss +3 -3
  66. package/src/components/icons/__tests__/Icon.test.tsx +1 -1
  67. package/src/components/menu/Menu.stories.tsx +3 -3
  68. package/src/components/menu/Menu.test.tsx +9 -9
  69. package/src/components/menu/styles/Menu.scss +5 -0
  70. package/src/components/menu/styles/_variables.scss +11 -6
  71. package/src/components/pill/styles/Pill.scss +4 -5
  72. package/src/components/skeleton/styles/Skeleton.scss +2 -2
  73. package/src/components/table/LoadingComponent.tsx +0 -2
  74. package/src/components/table/styles/Table.scss +6 -0
  75. package/src/components/table/styles/_variables.scss +9 -8
  76. package/src/index.ts +0 -45
  77. package/src/legacy/components/Tooltip/Tooltip.styles.ts +0 -12
  78. package/src/legacy/components/Tooltip/Tooltip.tsx +2 -4
  79. package/src/legacy/components/index.ts +1 -30
  80. package/src/legacy/components/loading-indicators/BarSpinner/BarSpinner.styles.ts +0 -3
  81. package/src/legacy/components/loading-indicators/BarSpinner/BarSpinner.tsx +1 -1
  82. package/src/legacy/components/loading-indicators/CirclePulse/CirclePulse.styles.ts +0 -4
  83. package/src/legacy/components/loading-indicators/CirclePulse/CirclePulse.tsx +1 -6
  84. package/src/legacy/components/loading-indicators/CircleSpinner/CircleSpinner.tsx +2 -2
  85. package/src/legacy/components/loading-indicators/index.ts +0 -4
  86. package/src/legacy/components/modals/ConfirmModal/ConfirmModal.styles.ts +1 -4
  87. package/src/legacy/components/modals/ConfirmModal/ConfirmModal.tsx +12 -19
  88. package/src/legacy/components/modals/ModalBase/ModalBase.styles.tsx +0 -7
  89. package/src/legacy/components/modals/ModalBase/ModalBase.tsx +1 -1
  90. package/src/storybookDocs/Permafrost.mdx +92 -0
  91. package/src/styles/_colors.scss +7 -3
  92. package/src/styles/_sheets.scss +3 -3
  93. package/src/styles/assets/fonts/noto/a.woff2 +0 -0
  94. package/src/styles/assets/fonts/noto/b.woff2 +0 -0
  95. package/src/styles/assets/fonts/noto/c.woff2 +0 -0
  96. package/src/styles/assets/fonts/noto/d.woff2 +0 -0
  97. package/src/styles/assets/fonts/noto/e.woff2 +0 -0
  98. package/src/styles/assets/fonts/noto/f.woff2 +0 -0
  99. package/src/styles/assets/fonts/noto/g.woff2 +0 -0
  100. package/src/styles/assets/fonts/noto/h.woff2 +0 -0
  101. package/src/styles/assets/fonts/noto/notosans.css +79 -0
  102. package/src/styles/globals.scss +5 -16
  103. package/src/styles/index.scss +1 -2
  104. package/src/styles/storybook.scss +1 -1
  105. package/src/styles/variables/_borders.scss +6 -6
  106. package/src/styles/variables/_dropshadows.scss +2 -0
  107. package/src/styles/variables/_padding.scss +5 -1
  108. package/src/styles/variables/_typography.scss +7 -1
  109. package/src/styles/variables/themes/dark.scss +147 -83
  110. package/src/styles/variables/themes/light.scss +1 -2
  111. package/src/stylesAndAnimations/colors/Colors.tsx +5 -9
  112. package/src/stylesAndAnimations/colors/UtilityClasses.tsx +23 -14
  113. package/src/stylesAndAnimations/colors/constants.ts +183 -114
  114. package/src/stylesAndAnimations/sizing/Sizing.tsx +2 -2
  115. package/src/types.ts +1 -7
  116. package/lib/assets/fonts/mulish/a.woff2 +0 -0
  117. package/lib/assets/fonts/mulish/b.woff2 +0 -0
  118. package/lib/assets/fonts/mulish/c.woff2 +0 -0
  119. package/lib/assets/fonts/mulish/d.woff2 +0 -0
  120. package/lib/assets/fonts/mulish/mulish.css +0 -98
  121. package/lib/legacy/components/Accordion/Accordion.d.ts +0 -9
  122. package/lib/legacy/components/Accordion/Accordion.stories.d.ts +0 -25
  123. package/lib/legacy/components/Accordion/Accordion.styles.d.ts +0 -1
  124. package/lib/legacy/components/Accordion/index.d.ts +0 -1
  125. package/lib/legacy/components/ListTable/Header/Header.d.ts +0 -21
  126. package/lib/legacy/components/ListTable/Header/Header.styles.d.ts +0 -1
  127. package/lib/legacy/components/ListTable/Header/index.d.ts +0 -1
  128. package/lib/legacy/components/ListTable/ListTable.d.ts +0 -41
  129. package/lib/legacy/components/ListTable/ListTable.stories.d.ts +0 -54
  130. package/lib/legacy/components/ListTable/ListTable.styles.d.ts +0 -1
  131. package/lib/legacy/components/ListTable/index.d.ts +0 -1
  132. package/lib/legacy/components/ListTable/mock-data/index.d.ts +0 -1
  133. package/lib/legacy/components/ListTable/mock-data/mock-data.d.ts +0 -54
  134. package/lib/legacy/components/LoadingAwareContainer/LoadingAwareContainer.d.ts +0 -15
  135. package/lib/legacy/components/LoadingAwareContainer/LoadingAwareContainer.stories.d.ts +0 -22
  136. package/lib/legacy/components/LoadingAwareContainer/LoadingAwareContainer.styles.d.ts +0 -2
  137. package/lib/legacy/components/LoadingAwareContainer/index.d.ts +0 -1
  138. package/lib/legacy/components/Pagination/Pagination.d.ts +0 -18
  139. package/lib/legacy/components/Pagination/Pagination.stories.d.ts +0 -18
  140. package/lib/legacy/components/Pagination/Pagination.styles.d.ts +0 -1
  141. package/lib/legacy/components/Pagination/index.d.ts +0 -1
  142. package/lib/legacy/components/Toggle/Toggle.d.ts +0 -12
  143. package/lib/legacy/components/Toggle/Toggle.stories.d.ts +0 -21
  144. package/lib/legacy/components/Toggle/Toggle.styles.d.ts +0 -1
  145. package/lib/legacy/components/Toggle/index.d.ts +0 -1
  146. package/lib/legacy/components/basic-section/Section/Section.d.ts +0 -8
  147. package/lib/legacy/components/basic-section/Section/Section.stories.d.ts +0 -13
  148. package/lib/legacy/components/basic-section/Section/Section.styles.d.ts +0 -1
  149. package/lib/legacy/components/basic-section/Section/index.d.ts +0 -1
  150. package/lib/legacy/components/basic-section/SectionBlock/SectionBlock.d.ts +0 -9
  151. package/lib/legacy/components/basic-section/SectionBlock/SectionBlock.styles.d.ts +0 -1
  152. package/lib/legacy/components/basic-section/SectionBlock/index.d.ts +0 -1
  153. package/lib/legacy/components/basic-section/SectionBody/SectionBody.d.ts +0 -7
  154. package/lib/legacy/components/basic-section/SectionBody/SectionBody.stories.d.ts +0 -10
  155. package/lib/legacy/components/basic-section/SectionBody/SectionBody.styles.d.ts +0 -1
  156. package/lib/legacy/components/basic-section/SectionBody/index.d.ts +0 -1
  157. package/lib/legacy/components/basic-section/SectionHeader/SectionHeader.d.ts +0 -8
  158. package/lib/legacy/components/basic-section/SectionHeader/SectionHeader.stories.d.ts +0 -14
  159. package/lib/legacy/components/basic-section/SectionHeader/SectionHeader.styles.d.ts +0 -1
  160. package/lib/legacy/components/basic-section/SectionHeader/index.d.ts +0 -1
  161. package/lib/legacy/components/basic-section/SectionTable/SectionTable.d.ts +0 -1
  162. package/lib/legacy/components/basic-section/SectionTable/SectionTable.styles.d.ts +0 -1
  163. package/lib/legacy/components/basic-section/SectionTable/index.d.ts +0 -1
  164. package/lib/legacy/components/basic-section/index.d.ts +0 -5
  165. package/lib/legacy/components/buttons/Button/Button.d.ts +0 -21
  166. package/lib/legacy/components/buttons/Button/Button.stories.d.ts +0 -25
  167. package/lib/legacy/components/buttons/Button/Button.styles.d.ts +0 -1
  168. package/lib/legacy/components/buttons/Button/index.d.ts +0 -1
  169. package/lib/legacy/components/buttons/IconButton/IconButton.d.ts +0 -32
  170. package/lib/legacy/components/buttons/IconButton/IconButton.stories.d.ts +0 -43
  171. package/lib/legacy/components/buttons/IconButton/IconButton.styles.d.ts +0 -5
  172. package/lib/legacy/components/buttons/IconButton/index.d.ts +0 -1
  173. package/lib/legacy/components/buttons/commonStyles.d.ts +0 -9
  174. package/lib/legacy/components/buttons/index.d.ts +0 -2
  175. package/lib/legacy/components/buttons/types.d.ts +0 -3
  176. package/lib/legacy/components/dropdowns/BorderSelect/BorderSelect.d.ts +0 -19
  177. package/lib/legacy/components/dropdowns/BorderSelect/BorderSelect.stories.d.ts +0 -31
  178. package/lib/legacy/components/dropdowns/BorderSelect/BorderSelect.styles.d.ts +0 -2
  179. package/lib/legacy/components/dropdowns/BorderSelect/index.d.ts +0 -1
  180. package/lib/legacy/components/dropdowns/MultiCombobox/MultiCombobox.d.ts +0 -23
  181. package/lib/legacy/components/dropdowns/MultiCombobox/MultiCombobox.stories.d.ts +0 -46
  182. package/lib/legacy/components/dropdowns/MultiCombobox/MultiCombobox.styles.d.ts +0 -4
  183. package/lib/legacy/components/dropdowns/MultiCombobox/index.d.ts +0 -1
  184. package/lib/legacy/components/dropdowns/Select/Select.d.ts +0 -19
  185. package/lib/legacy/components/dropdowns/Select/Select.stories.d.ts +0 -34
  186. package/lib/legacy/components/dropdowns/Select/Select.styles.d.ts +0 -1
  187. package/lib/legacy/components/dropdowns/Select/index.d.ts +0 -1
  188. package/lib/legacy/components/dropdowns/SingleCombobox/SingleCombobox.d.ts +0 -20
  189. package/lib/legacy/components/dropdowns/SingleCombobox/SingleCombobox.stories.d.ts +0 -31
  190. package/lib/legacy/components/dropdowns/SingleCombobox/SingleCombobox.styles.d.ts +0 -4
  191. package/lib/legacy/components/dropdowns/SingleCombobox/index.d.ts +0 -1
  192. package/lib/legacy/components/dropdowns/commonStyles.d.ts +0 -1
  193. package/lib/legacy/components/dropdowns/index.d.ts +0 -4
  194. package/lib/legacy/components/dropdowns/types.d.ts +0 -45
  195. package/lib/legacy/components/dropdowns/useCombobox.d.ts +0 -25
  196. package/lib/legacy/components/dropdowns/utils.d.ts +0 -20
  197. package/lib/legacy/components/inputs/EditableInput/EditableInput.d.ts +0 -13
  198. package/lib/legacy/components/inputs/EditableInput/EditableInput.stories.d.ts +0 -14
  199. package/lib/legacy/components/inputs/EditableInput/EditableInput.styles.d.ts +0 -1
  200. package/lib/legacy/components/inputs/EditableInput/index.d.ts +0 -1
  201. package/lib/legacy/components/inputs/NumberInput/NumberInput.d.ts +0 -23
  202. package/lib/legacy/components/inputs/NumberInput/NumberInput.stories.d.ts +0 -28
  203. package/lib/legacy/components/inputs/NumberInput/NumberInput.styles.d.ts +0 -1
  204. package/lib/legacy/components/inputs/NumberInput/index.d.ts +0 -1
  205. package/lib/legacy/components/inputs/RadioButtons/RadioButtons.d.ts +0 -25
  206. package/lib/legacy/components/inputs/RadioButtons/RadioButtons.stories.d.ts +0 -15
  207. package/lib/legacy/components/inputs/RadioButtons/RadioButtons.styles.d.ts +0 -13
  208. package/lib/legacy/components/inputs/RadioButtons/index.d.ts +0 -1
  209. package/lib/legacy/components/inputs/RadioGroup/RadioGroup.d.ts +0 -27
  210. package/lib/legacy/components/inputs/RadioGroup/RadioGroup.stories.d.ts +0 -16
  211. package/lib/legacy/components/inputs/RadioGroup/RadioGroup.styles.d.ts +0 -1
  212. package/lib/legacy/components/inputs/RadioGroup/index.d.ts +0 -1
  213. package/lib/legacy/components/inputs/SearchInput/SearchInput.d.ts +0 -17
  214. package/lib/legacy/components/inputs/SearchInput/SearchInput.stories.d.ts +0 -30
  215. package/lib/legacy/components/inputs/SearchInput/SearchInput.styles.d.ts +0 -1
  216. package/lib/legacy/components/inputs/SearchInput/index.d.ts +0 -1
  217. package/lib/legacy/components/inputs/TextInput/TextInput.d.ts +0 -24
  218. package/lib/legacy/components/inputs/TextInput/TextInput.stories.d.ts +0 -62
  219. package/lib/legacy/components/inputs/TextInput/TextInput.styles.d.ts +0 -2
  220. package/lib/legacy/components/inputs/TextInput/index.d.ts +0 -1
  221. package/lib/legacy/components/inputs/index.d.ts +0 -6
  222. package/lib/legacy/components/inputs/inputsCommon.styles.d.ts +0 -4
  223. package/lib/legacy/components/loading-indicators/LoadingIndicator/LoadingIndicator.d.ts +0 -10
  224. package/lib/legacy/components/loading-indicators/LoadingIndicator/LoadingIndicator.stories.d.ts +0 -11
  225. package/lib/legacy/components/loading-indicators/LoadingIndicator/LoadingIndicator.styles.d.ts +0 -7
  226. package/lib/legacy/components/loading-indicators/LoadingIndicator/index.d.ts +0 -1
  227. package/lib/legacy/components/loading-indicators/LoadingList/LoadingList.d.ts +0 -1
  228. package/lib/legacy/components/loading-indicators/LoadingList/LoadingList.stories.d.ts +0 -10
  229. package/lib/legacy/components/loading-indicators/LoadingList/LoadingList.styles.d.ts +0 -1
  230. package/lib/legacy/components/loading-indicators/LoadingList/index.d.ts +0 -1
  231. package/lib/legacy/components/loading-indicators/PercentageRing/PercentageRing.d.ts +0 -12
  232. package/lib/legacy/components/loading-indicators/PercentageRing/PercentageRing.stories.d.ts +0 -10
  233. package/lib/legacy/components/loading-indicators/PercentageRing/PercentageRing.styles.d.ts +0 -1
  234. package/lib/legacy/components/loading-indicators/PercentageRing/index.d.ts +0 -1
  235. package/lib/legacy/components/loading-indicators/RandomLoadingMessage/RandomLoadingMessage.d.ts +0 -1
  236. package/lib/legacy/components/loading-indicators/RandomLoadingMessage/RandomLoadingMessage.stories.d.ts +0 -10
  237. package/lib/legacy/components/loading-indicators/RandomLoadingMessage/index.d.ts +0 -1
  238. package/lib/legacy/components/loading-indicators/RandomLoadingMessage/random-messages.d.ts +0 -2
  239. package/lib/legacy/components/text-truncate/TextTruncate.d.ts +0 -8
  240. package/lib/legacy/components/text-truncate/TextTruncate.stories.d.ts +0 -6
  241. package/lib/legacy/components/text-truncate/TextTruncate.styles.d.ts +0 -1
  242. package/lib/legacy/components/text-truncate/TextTruncate.test.d.ts +0 -1
  243. package/lib/legacy/components/text-truncate/index.d.ts +0 -1
  244. package/lib/legacy/components/user-feedback/Shrug/Shrug.d.ts +0 -14
  245. package/lib/legacy/components/user-feedback/Shrug/Shrug.stories.d.ts +0 -31
  246. package/lib/legacy/components/user-feedback/Shrug/Shrug.styles.d.ts +0 -1
  247. package/lib/legacy/components/user-feedback/Shrug/index.d.ts +0 -1
  248. package/lib/legacy/components/user-feedback/index.d.ts +0 -1
  249. package/lib/legacy/styles/globals/buttons.d.ts +0 -1
  250. package/lib/legacy/styles/globals/forms.d.ts +0 -1
  251. package/lib/legacy/styles/globals/index.d.ts +0 -1
  252. package/lib/legacy/styles/globals/layout.d.ts +0 -1
  253. package/lib/legacy/styles/globals/lists.d.ts +0 -1
  254. package/lib/legacy/styles/globals/margin-padding.d.ts +0 -1
  255. package/lib/legacy/styles/globals/media.d.ts +0 -1
  256. package/lib/legacy/styles/globals/tables.d.ts +0 -1
  257. package/lib/legacy/styles/globals/typography.d.ts +0 -1
  258. package/lib/legacy/styles/globals/utility-classes.d.ts +0 -1
  259. package/lib/legacy/styles/index.d.ts +0 -1
  260. package/lib/legacy/tokens/animation.d.ts +0 -4
  261. package/lib/legacy/tokens/breakpoints.d.ts +0 -10
  262. package/lib/legacy/tokens/colors.d.ts +0 -144
  263. package/lib/legacy/tokens/index.d.ts +0 -8
  264. package/lib/legacy/tokens/margin.d.ts +0 -4
  265. package/lib/legacy/tokens/numbers.d.ts +0 -10
  266. package/lib/legacy/tokens/padding.d.ts +0 -4
  267. package/lib/legacy/tokens/spacings.d.ts +0 -5
  268. package/lib/legacy/tokens/typography.d.ts +0 -61
  269. package/lib/legacy/utils/color.d.ts +0 -21
  270. package/lib/legacy/utils/index.d.ts +0 -4
  271. package/lib/legacy/utils/number.d.ts +0 -21
  272. package/lib/legacy/utils/string.d.ts +0 -12
  273. package/src/legacy/components/Accordion/Accordion.stories.tsx +0 -47
  274. package/src/legacy/components/Accordion/Accordion.styles.ts +0 -35
  275. package/src/legacy/components/Accordion/Accordion.tsx +0 -30
  276. package/src/legacy/components/Accordion/index.ts +0 -1
  277. package/src/legacy/components/ListTable/Header/Header.styles.ts +0 -62
  278. package/src/legacy/components/ListTable/Header/Header.tsx +0 -66
  279. package/src/legacy/components/ListTable/Header/index.ts +0 -1
  280. package/src/legacy/components/ListTable/ListTable.stories.tsx +0 -302
  281. package/src/legacy/components/ListTable/ListTable.styles.ts +0 -76
  282. package/src/legacy/components/ListTable/ListTable.tsx +0 -140
  283. package/src/legacy/components/ListTable/index.ts +0 -1
  284. package/src/legacy/components/ListTable/mock-data/index.ts +0 -1
  285. package/src/legacy/components/ListTable/mock-data/mock-data.ts +0 -291
  286. package/src/legacy/components/LoadingAwareContainer/LoadingAwareContainer.stories.tsx +0 -45
  287. package/src/legacy/components/LoadingAwareContainer/LoadingAwareContainer.styles.ts +0 -16
  288. package/src/legacy/components/LoadingAwareContainer/LoadingAwareContainer.tsx +0 -36
  289. package/src/legacy/components/LoadingAwareContainer/index.ts +0 -1
  290. package/src/legacy/components/Pagination/Pagination.stories.tsx +0 -45
  291. package/src/legacy/components/Pagination/Pagination.styles.ts +0 -51
  292. package/src/legacy/components/Pagination/Pagination.tsx +0 -118
  293. package/src/legacy/components/Pagination/index.ts +0 -1
  294. package/src/legacy/components/Toggle/Toggle.stories.tsx +0 -56
  295. package/src/legacy/components/Toggle/Toggle.styles.ts +0 -86
  296. package/src/legacy/components/Toggle/Toggle.tsx +0 -69
  297. package/src/legacy/components/Toggle/index.ts +0 -1
  298. package/src/legacy/components/basic-section/Section/Section.stories.tsx +0 -14
  299. package/src/legacy/components/basic-section/Section/Section.styles.ts +0 -8
  300. package/src/legacy/components/basic-section/Section/Section.tsx +0 -30
  301. package/src/legacy/components/basic-section/Section/index.ts +0 -1
  302. package/src/legacy/components/basic-section/SectionBlock/SectionBlock.styles.ts +0 -15
  303. package/src/legacy/components/basic-section/SectionBlock/SectionBlock.tsx +0 -37
  304. package/src/legacy/components/basic-section/SectionBlock/index.ts +0 -1
  305. package/src/legacy/components/basic-section/SectionBody/SectionBody.stories.tsx +0 -16
  306. package/src/legacy/components/basic-section/SectionBody/SectionBody.styles.ts +0 -18
  307. package/src/legacy/components/basic-section/SectionBody/SectionBody.tsx +0 -30
  308. package/src/legacy/components/basic-section/SectionBody/index.ts +0 -1
  309. package/src/legacy/components/basic-section/SectionHeader/SectionHeader.stories.tsx +0 -17
  310. package/src/legacy/components/basic-section/SectionHeader/SectionHeader.styles.ts +0 -5
  311. package/src/legacy/components/basic-section/SectionHeader/SectionHeader.tsx +0 -30
  312. package/src/legacy/components/basic-section/SectionHeader/index.ts +0 -1
  313. package/src/legacy/components/basic-section/SectionTable/SectionTable.styles.ts +0 -236
  314. package/src/legacy/components/basic-section/SectionTable/SectionTable.tsx +0 -233
  315. package/src/legacy/components/basic-section/SectionTable/index.ts +0 -1
  316. package/src/legacy/components/basic-section/index.ts +0 -5
  317. package/src/legacy/components/buttons/Button/Button.stories.tsx +0 -80
  318. package/src/legacy/components/buttons/Button/Button.styles.ts +0 -99
  319. package/src/legacy/components/buttons/Button/Button.tsx +0 -74
  320. package/src/legacy/components/buttons/Button/index.ts +0 -1
  321. package/src/legacy/components/buttons/IconButton/IconButton.stories.tsx +0 -96
  322. package/src/legacy/components/buttons/IconButton/IconButton.styles.ts +0 -109
  323. package/src/legacy/components/buttons/IconButton/IconButton.tsx +0 -114
  324. package/src/legacy/components/buttons/IconButton/index.ts +0 -1
  325. package/src/legacy/components/buttons/commonStyles.ts +0 -104
  326. package/src/legacy/components/buttons/index.ts +0 -2
  327. package/src/legacy/components/buttons/types.ts +0 -3
  328. package/src/legacy/components/dropdowns/BorderSelect/BorderSelect.stories.tsx +0 -22
  329. package/src/legacy/components/dropdowns/BorderSelect/BorderSelect.styles.ts +0 -73
  330. package/src/legacy/components/dropdowns/BorderSelect/BorderSelect.tsx +0 -85
  331. package/src/legacy/components/dropdowns/BorderSelect/index.ts +0 -1
  332. package/src/legacy/components/dropdowns/MultiCombobox/MultiCombobox.stories.tsx +0 -147
  333. package/src/legacy/components/dropdowns/MultiCombobox/MultiCombobox.styles.ts +0 -91
  334. package/src/legacy/components/dropdowns/MultiCombobox/MultiCombobox.tsx +0 -123
  335. package/src/legacy/components/dropdowns/MultiCombobox/index.ts +0 -1
  336. package/src/legacy/components/dropdowns/Select/Select.stories.tsx +0 -54
  337. package/src/legacy/components/dropdowns/Select/Select.styles.ts +0 -73
  338. package/src/legacy/components/dropdowns/Select/Select.tsx +0 -69
  339. package/src/legacy/components/dropdowns/Select/index.ts +0 -1
  340. package/src/legacy/components/dropdowns/SingleCombobox/SingleCombobox.stories.tsx +0 -61
  341. package/src/legacy/components/dropdowns/SingleCombobox/SingleCombobox.styles.ts +0 -56
  342. package/src/legacy/components/dropdowns/SingleCombobox/SingleCombobox.tsx +0 -103
  343. package/src/legacy/components/dropdowns/SingleCombobox/index.ts +0 -1
  344. package/src/legacy/components/dropdowns/commonStyles.ts +0 -65
  345. package/src/legacy/components/dropdowns/index.ts +0 -4
  346. package/src/legacy/components/dropdowns/types.ts +0 -45
  347. package/src/legacy/components/dropdowns/useCombobox.ts +0 -32
  348. package/src/legacy/components/dropdowns/utils.tsx +0 -25
  349. package/src/legacy/components/inputs/EditableInput/EditableInput.stories.tsx +0 -26
  350. package/src/legacy/components/inputs/EditableInput/EditableInput.styles.ts +0 -21
  351. package/src/legacy/components/inputs/EditableInput/EditableInput.tsx +0 -103
  352. package/src/legacy/components/inputs/EditableInput/index.ts +0 -1
  353. package/src/legacy/components/inputs/NumberInput/NumberInput.stories.tsx +0 -72
  354. package/src/legacy/components/inputs/NumberInput/NumberInput.styles.ts +0 -66
  355. package/src/legacy/components/inputs/NumberInput/NumberInput.tsx +0 -154
  356. package/src/legacy/components/inputs/NumberInput/index.ts +0 -1
  357. package/src/legacy/components/inputs/RadioButtons/RadioButtons.stories.tsx +0 -84
  358. package/src/legacy/components/inputs/RadioButtons/RadioButtons.styles.ts +0 -82
  359. package/src/legacy/components/inputs/RadioButtons/RadioButtons.tsx +0 -63
  360. package/src/legacy/components/inputs/RadioButtons/index.tsx +0 -1
  361. package/src/legacy/components/inputs/RadioGroup/RadioGroup.stories.tsx +0 -66
  362. package/src/legacy/components/inputs/RadioGroup/RadioGroup.styles.ts +0 -11
  363. package/src/legacy/components/inputs/RadioGroup/RadioGroup.tsx +0 -119
  364. package/src/legacy/components/inputs/RadioGroup/index.ts +0 -1
  365. package/src/legacy/components/inputs/SearchInput/SearchInput.stories.tsx +0 -37
  366. package/src/legacy/components/inputs/SearchInput/SearchInput.styles.ts +0 -51
  367. package/src/legacy/components/inputs/SearchInput/SearchInput.tsx +0 -73
  368. package/src/legacy/components/inputs/SearchInput/index.ts +0 -1
  369. package/src/legacy/components/inputs/TextInput/TextInput.stories.tsx +0 -104
  370. package/src/legacy/components/inputs/TextInput/TextInput.styles.ts +0 -74
  371. package/src/legacy/components/inputs/TextInput/TextInput.tsx +0 -116
  372. package/src/legacy/components/inputs/TextInput/index.ts +0 -1
  373. package/src/legacy/components/inputs/index.ts +0 -6
  374. package/src/legacy/components/inputs/inputsCommon.styles.ts +0 -57
  375. package/src/legacy/components/loading-indicators/LoadingIndicator/LoadingIndicator.stories.tsx +0 -22
  376. package/src/legacy/components/loading-indicators/LoadingIndicator/LoadingIndicator.styles.ts +0 -81
  377. package/src/legacy/components/loading-indicators/LoadingIndicator/LoadingIndicator.tsx +0 -61
  378. package/src/legacy/components/loading-indicators/LoadingIndicator/index.ts +0 -1
  379. package/src/legacy/components/loading-indicators/LoadingList/LoadingList.stories.tsx +0 -14
  380. package/src/legacy/components/loading-indicators/LoadingList/LoadingList.styles.ts +0 -42
  381. package/src/legacy/components/loading-indicators/LoadingList/LoadingList.tsx +0 -9
  382. package/src/legacy/components/loading-indicators/LoadingList/index.ts +0 -1
  383. package/src/legacy/components/loading-indicators/PercentageRing/PercentageRing.stories.tsx +0 -18
  384. package/src/legacy/components/loading-indicators/PercentageRing/PercentageRing.styles.ts +0 -27
  385. package/src/legacy/components/loading-indicators/PercentageRing/PercentageRing.tsx +0 -76
  386. package/src/legacy/components/loading-indicators/PercentageRing/index.ts +0 -1
  387. package/src/legacy/components/loading-indicators/RandomLoadingMessage/RandomLoadingMessage.stories.tsx +0 -16
  388. package/src/legacy/components/loading-indicators/RandomLoadingMessage/RandomLoadingMessage.tsx +0 -18
  389. package/src/legacy/components/loading-indicators/RandomLoadingMessage/index.ts +0 -1
  390. package/src/legacy/components/loading-indicators/RandomLoadingMessage/random-messages.js +0 -67
  391. package/src/legacy/components/text-truncate/TextTruncate.stories.tsx +0 -19
  392. package/src/legacy/components/text-truncate/TextTruncate.styles.ts +0 -3
  393. package/src/legacy/components/text-truncate/TextTruncate.test.tsx +0 -17
  394. package/src/legacy/components/text-truncate/TextTruncate.tsx +0 -23
  395. package/src/legacy/components/text-truncate/index.ts +0 -1
  396. package/src/legacy/components/user-feedback/Shrug/Shrug.stories.tsx +0 -38
  397. package/src/legacy/components/user-feedback/Shrug/Shrug.styles.ts +0 -25
  398. package/src/legacy/components/user-feedback/Shrug/Shrug.tsx +0 -45
  399. package/src/legacy/components/user-feedback/Shrug/index.ts +0 -1
  400. package/src/legacy/components/user-feedback/index.ts +0 -1
  401. package/src/legacy/styles/globals/buttons.ts +0 -154
  402. package/src/legacy/styles/globals/forms.ts +0 -53
  403. package/src/legacy/styles/globals/index.tsx +0 -22
  404. package/src/legacy/styles/globals/layout.ts +0 -22
  405. package/src/legacy/styles/globals/lists.ts +0 -23
  406. package/src/legacy/styles/globals/margin-padding.ts +0 -33
  407. package/src/legacy/styles/globals/media.ts +0 -13
  408. package/src/legacy/styles/globals/tables.ts +0 -30
  409. package/src/legacy/styles/globals/typography.ts +0 -82
  410. package/src/legacy/styles/globals/utility-classes.ts +0 -76
  411. package/src/legacy/styles/index.ts +0 -1
  412. package/src/legacy/tokens/animation.ts +0 -6
  413. package/src/legacy/tokens/breakpoints.ts +0 -11
  414. package/src/legacy/tokens/colors.ts +0 -293
  415. package/src/legacy/tokens/index.ts +0 -20
  416. package/src/legacy/tokens/margin.ts +0 -5
  417. package/src/legacy/tokens/numbers.js +0 -41
  418. package/src/legacy/tokens/padding.ts +0 -5
  419. package/src/legacy/tokens/spacings.ts +0 -5
  420. package/src/legacy/tokens/typography.ts +0 -43
  421. package/src/legacy/utils/color.ts +0 -139
  422. package/src/legacy/utils/index.ts +0 -5
  423. package/src/legacy/utils/number.ts +0 -29
  424. package/src/legacy/utils/string.ts +0 -87
  425. package/src/styles/assets/fonts/mulish/a.woff2 +0 -0
  426. package/src/styles/assets/fonts/mulish/b.woff2 +0 -0
  427. package/src/styles/assets/fonts/mulish/c.woff2 +0 -0
  428. package/src/styles/assets/fonts/mulish/d.woff2 +0 -0
  429. package/src/styles/assets/fonts/mulish/mulish.css +0 -98
@@ -1,291 +0,0 @@
1
- export const mockUserHeaders = [
2
- { name: 'ID', value: 'ID' },
3
- { name: 'Name', value: 'NAME' },
4
- { name: 'Email', value: 'EMAIL' },
5
- { name: 'Created', value: 'REGISTERED_AT' },
6
- ];
7
-
8
- export const mockDocProcHeaders = [
9
- { name: 'Date', value: 'CREATED_ON' },
10
- { name: 'Name', value: 'NAME' },
11
- { name: 'Status', value: 'STATUS' },
12
- ];
13
-
14
- export const mockAllUsers = {
15
- users: [
16
- {
17
- id: 240,
18
- name: 'other user@email.com',
19
- email: 'other user@email.com',
20
- registeredAt: '1612905437.021334',
21
- active: true,
22
- scopes: [{ scope: 'APP_ACCESS', __typename: 'ScopeAccess' }],
23
- __typename: 'User',
24
- },
25
- {
26
- id: 239,
27
- name: 'jay',
28
- email: 'jay@email.com',
29
- registeredAt: '1612385431.071407',
30
- active: true,
31
- scopes: [
32
- { scope: 'CELERY_FLOWER', __typename: 'ScopeAccess' },
33
- { scope: 'MANAGE_USERS', __typename: 'ScopeAccess' },
34
- { scope: 'APP_ACCESS', __typename: 'ScopeAccess' },
35
- { scope: 'GRAPHIQL', __typename: 'ScopeAccess' },
36
- ],
37
- __typename: 'User',
38
- },
39
- {
40
- id: 238,
41
- name: 'ryan no accesss',
42
- email: 'ryan+123@email.com',
43
- registeredAt: '1611954642.254328',
44
- active: true,
45
- scopes: [{ scope: 'APP_ACCESS', __typename: 'ScopeAccess' }],
46
- __typename: 'User',
47
- },
48
- {
49
- id: 237,
50
- name: 'Kazmer Test',
51
- email: 'mike+123@email.com',
52
- registeredAt: '1611883365.793202',
53
- active: true,
54
- scopes: [{ scope: 'APP_ACCESS', __typename: 'ScopeAccess' }],
55
- __typename: 'User',
56
- },
57
- {
58
- id: 236,
59
- name: 'andy+012621a@email.com',
60
- email: 'andy+012621a@email.com',
61
- registeredAt: '1611708023.136021',
62
- active: true,
63
- scopes: [],
64
- __typename: 'User',
65
- },
66
- {
67
- id: 235,
68
- name: 'other_user@email.com',
69
- email: 'other_user@email.com',
70
- registeredAt: '1611588266.058129',
71
- active: true,
72
- scopes: [{ scope: 'APP_ACCESS', __typename: 'ScopeAccess' }],
73
- __typename: 'User',
74
- },
75
- {
76
- id: 234,
77
- name: 'Matthew',
78
- email: 'matthew@bayers.org',
79
- registeredAt: '1611267047.427759',
80
- active: true,
81
- scopes: [
82
- { scope: 'CELERY_FLOWER', __typename: 'ScopeAccess' },
83
- { scope: 'APP_ACCESS', __typename: 'ScopeAccess' },
84
- { scope: 'GRAPHIQL', __typename: 'ScopeAccess' },
85
- ],
86
- __typename: 'User',
87
- },
88
- {
89
- id: 233,
90
- name: 'Kazmer Test',
91
- email: 'mike.test@email.com',
92
- registeredAt: '1611256056.678655',
93
- active: null,
94
- scopes: [],
95
- __typename: 'User',
96
- },
97
- {
98
- id: 232,
99
- name: 'meg',
100
- email: 'meg@email.com',
101
- registeredAt: '1611157563.220335',
102
- active: true,
103
- scopes: [
104
- { scope: 'MANAGE_USERS', __typename: 'ScopeAccess' },
105
- { scope: 'APP_ACCESS', __typename: 'ScopeAccess' },
106
- { scope: 'GRAPHIQL', __typename: 'ScopeAccess' },
107
- ],
108
- __typename: 'User',
109
- },
110
- {
111
- id: 231,
112
- name: 'Ryan',
113
- email: 'ryan@email.com',
114
- registeredAt: '1611069234.797305',
115
- active: true,
116
- scopes: [
117
- { scope: 'CELERY_FLOWER', __typename: 'ScopeAccess' },
118
- { scope: 'MANAGE_USERS', __typename: 'ScopeAccess' },
119
- { scope: 'APP_ACCESS', __typename: 'ScopeAccess' },
120
- { scope: 'GRAPHIQL', __typename: 'ScopeAccess' },
121
- ],
122
- __typename: 'User',
123
- },
124
- {
125
- id: 230,
126
- name: 'dataset2_permissions@email.com',
127
- email: 'dataset2_permissions@email.com',
128
- registeredAt: '1611009197.841298',
129
- active: true,
130
- scopes: [{ scope: 'APP_ACCESS', __typename: 'ScopeAccess' }],
131
- __typename: 'User',
132
- },
133
- {
134
- id: 229,
135
- name: 'dataset1_permissions@email.com',
136
- email: 'dataset1_permissions@email.com',
137
- registeredAt: '1611009196.388319',
138
- active: true,
139
- scopes: [{ scope: 'APP_ACCESS', __typename: 'ScopeAccess' }],
140
- __typename: 'User',
141
- },
142
- {
143
- id: 228,
144
- name: 'rafal@email.com',
145
- email: 'rafal@email.com',
146
- registeredAt: '1610614811.580037',
147
- active: true,
148
- scopes: [],
149
- __typename: 'User',
150
- },
151
- {
152
- id: 227,
153
- name: 'Jonas',
154
- email: 'jonas@email.com',
155
- registeredAt: '1610544934.971219',
156
- active: true,
157
- scopes: [
158
- { scope: 'CELERY_FLOWER', __typename: 'ScopeAccess' },
159
- { scope: 'APP_ACCESS', __typename: 'ScopeAccess' },
160
- { scope: 'GRAPHIQL', __typename: 'ScopeAccess' },
161
- ],
162
- __typename: 'User',
163
- },
164
- {
165
- id: 226,
166
- name: 'Elias',
167
- email: 'elias@email.com',
168
- registeredAt: '1610378674.648602',
169
- active: true,
170
- scopes: [
171
- { scope: 'CELERY_FLOWER', __typename: 'ScopeAccess' },
172
- { scope: 'MANAGE_USERS', __typename: 'ScopeAccess' },
173
- { scope: 'APP_ACCESS', __typename: 'ScopeAccess' },
174
- { scope: 'GRAPHIQL', __typename: 'ScopeAccess' },
175
- ],
176
- __typename: 'User',
177
- },
178
- {
179
- id: 225,
180
- name: 'Michael',
181
- email: 'michael@email.com',
182
- registeredAt: '1610377784.876469',
183
- active: true,
184
- scopes: [
185
- { scope: 'CELERY_FLOWER', __typename: 'ScopeAccess' },
186
- { scope: 'MANAGE_USERS', __typename: 'ScopeAccess' },
187
- { scope: 'APP_ACCESS', __typename: 'ScopeAccess' },
188
- { scope: 'GRAPHIQL', __typename: 'ScopeAccess' },
189
- ],
190
- __typename: 'User',
191
- },
192
- {
193
- id: 224,
194
- name: 'Automated Testing',
195
- email: 'test+platform@email.com',
196
- registeredAt: '1609428969.611241',
197
- active: true,
198
- scopes: [
199
- { scope: 'CELERY_FLOWER', __typename: 'ScopeAccess' },
200
- { scope: 'MANAGE_USERS', __typename: 'ScopeAccess' },
201
- { scope: 'APP_ACCESS', __typename: 'ScopeAccess' },
202
- { scope: 'GRAPHIQL', __typename: 'ScopeAccess' },
203
- ],
204
- __typename: 'User',
205
- },
206
- {
207
- id: 223,
208
- name: 'admin_permissions2@email.com',
209
- email: 'admin_permissions2@email.com',
210
- registeredAt: '1609428428.431605',
211
- active: true,
212
- scopes: [
213
- { scope: 'APP_ACCESS', __typename: 'ScopeAccess' },
214
- { scope: 'GRAPHIQL', __typename: 'ScopeAccess' },
215
- ],
216
- __typename: 'User',
217
- },
218
- {
219
- id: 222,
220
- name: 'admin_permissions@email.com',
221
- email: 'admin_permissions@email.com',
222
- registeredAt: '1609428416.321584',
223
- active: true,
224
- scopes: [{ scope: 'APP_ACCESS', __typename: 'ScopeAccess' }],
225
- __typename: 'User',
226
- },
227
- {
228
- id: 221,
229
- name: 'test+small3@email.com',
230
- email: 'test+small3@email.com',
231
- registeredAt: '1607885687.72808',
232
- active: true,
233
- scopes: [
234
- { scope: 'APP_ACCESS', __typename: 'ScopeAccess' },
235
- { scope: 'GRAPHIQL', __typename: 'ScopeAccess' },
236
- ],
237
- __typename: 'User',
238
- },
239
- ],
240
- pageInfo: {
241
- startCursor: 240,
242
- endCursor: 221,
243
- hasNextPage: true,
244
- aggregateCount: 149,
245
- __typename: 'PageInfo',
246
- },
247
- __typename: 'UserPage',
248
- };
249
-
250
- export const mockDocProcReport = {
251
- reports: [
252
- {
253
- id: 1,
254
- name: 'Doc_Processing_Report1_01_02_2021',
255
- status: 'Complete',
256
- createdOn: '1607885687.72808',
257
- },
258
- {
259
- id: 2,
260
- name: 'Doc_Processing_Report2_01_02_2021',
261
- status: 'Complete',
262
- createdOn: '1607885687.72808',
263
- },
264
- {
265
- id: 3,
266
- name: 'Doc_Processing_Report3_01_02_2021',
267
- status: 'Complete',
268
- createdOn: '1607885687.72808',
269
- },
270
- {
271
- id: 4,
272
- name: 'Doc_Processing_Report4_01_02_2021',
273
- status: 'Complete',
274
- createdOn: '1607885687.72808',
275
- },
276
- {
277
- id: 5,
278
- name: 'Doc_Processing_Report5_01_02_2021',
279
- status: 'Complete',
280
- createdOn: '1607885687.72808',
281
- },
282
- ],
283
- pageInfo: {
284
- startCursor: 240,
285
- endCursor: 221,
286
- hasNextPage: true,
287
- aggregateCount: 15,
288
- __typename: 'PageInfo',
289
- },
290
- __typename: 'UserPage',
291
- };
@@ -1,45 +0,0 @@
1
- import React from 'react';
2
- import type { Meta, StoryObj } from '@storybook/react';
3
-
4
- import { LoadingAwareContainer } from './LoadingAwareContainer';
5
-
6
- const meta = {
7
- component: LoadingAwareContainer,
8
- title: 'legacy/LoadingAwareContainer',
9
- argTypes: {
10
- className: { control: { disable: true } },
11
- style: { control: { disable: true } },
12
- },
13
- } satisfies Meta<typeof LoadingAwareContainer>;
14
-
15
- export default meta;
16
- type Story = StoryObj<typeof LoadingAwareContainer>;
17
-
18
- function StoryRender(props: any) {
19
- return (
20
- <LoadingAwareContainer
21
- isLoading={props.isLoading}
22
- style={{ width: '50vw', height: '50vh', border: '1px solid white' }}
23
- >
24
- <p>Some basic content.</p>
25
- </LoadingAwareContainer>
26
- );
27
- }
28
-
29
- export const Loading: Story = {
30
- args: {
31
- isLoading: true,
32
- },
33
- render: (args) => {
34
- return <StoryRender {...args} />;
35
- },
36
- };
37
-
38
- export const Complete: Story = {
39
- args: {
40
- isLoading: false,
41
- },
42
- render: (args) => {
43
- return <StoryRender {...args} />;
44
- },
45
- };
@@ -1,16 +0,0 @@
1
- import styled from 'styled-components';
2
-
3
- export const StyledStatusContainer = styled.div`
4
- position: absolute;
5
- height: 0;
6
- width: 0;
7
- opacity: 0;
8
- `;
9
-
10
- export const StyledLoadingAwareContainer = styled.div`
11
- &.loading {
12
- display: flex;
13
- align-items: center;
14
- justify-content: center;
15
- }
16
- `;
@@ -1,36 +0,0 @@
1
- // TODO: This component's migration was fast-tracked for Insights. Assess for potential refactor and documentation.
2
-
3
- import React from 'react';
4
- import classNames from 'classnames';
5
-
6
- import { LoadingIndicator } from '@/legacy/components';
7
-
8
- import { StyledLoadingAwareContainer, StyledStatusContainer } from './LoadingAwareContainer.styles';
9
-
10
- type Props = {
11
- children: React.ReactNode | React.ReactNode[];
12
- className?: string;
13
- isLoading?: boolean;
14
- style?: React.CSSProperties;
15
- };
16
-
17
- /**
18
- * A functional container for content that is yet to load or will change; displays a loading indicator and announces
19
- * to Assistive Technology as needed.
20
- *
21
- * todo: this is an extremely simple version of this component; as I get more familiar with LoadingIndicator use cases, this will be refactored. - jm 9/1/2020
22
- */
23
- export function LoadingAwareContainer(props: Props): React.ReactElement {
24
- const { children, className, isLoading, style } = props;
25
-
26
- return (
27
- <StyledLoadingAwareContainer
28
- className={classNames({ loading: isLoading }, className)}
29
- style={style}
30
- >
31
- <StyledStatusContainer role="status">{isLoading && 'Loading'}</StyledStatusContainer>
32
-
33
- {isLoading ? <LoadingIndicator /> : <>{children}</>}
34
- </StyledLoadingAwareContainer>
35
- );
36
- }
@@ -1 +0,0 @@
1
- export { LoadingAwareContainer } from './LoadingAwareContainer';
@@ -1,45 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
-
3
- import { Pagination } from './Pagination';
4
-
5
- const meta = {
6
- component: Pagination,
7
- title: 'legacy/Pagination',
8
- argTypes: {},
9
- args: {
10
- skip: 0,
11
- limit: 10,
12
- getPage: () => {},
13
- getNextPage: () => {},
14
- getPreviousPage: () => {},
15
- },
16
- } satisfies Meta<typeof Pagination>;
17
-
18
- export default meta;
19
- type Story = StoryObj<typeof Pagination>;
20
-
21
- export const Normal: Story = {
22
- args: {
23
- currentPage: 3,
24
- pageInfo: {
25
- aggregateCount: 60,
26
- endCursor: 51,
27
- hasNextPage: true,
28
- startCursor: 60,
29
- },
30
- quantity: 10,
31
- },
32
- };
33
-
34
- export const WithoutPages: Story = {
35
- args: {
36
- currentPage: 1,
37
- pageInfo: {
38
- aggregateCount: 9,
39
- endCursor: 1,
40
- hasNextPage: false,
41
- startCursor: 9,
42
- },
43
- quantity: 9,
44
- },
45
- };
@@ -1,51 +0,0 @@
1
- import styled from 'styled-components';
2
-
3
- import { COLORS } from '@/legacy/tokens';
4
-
5
- const paddingRight = '30px';
6
-
7
- export const StyledPagination = styled.div`
8
- width: 100%;
9
- position: relative;
10
-
11
- .Pagination--stats {
12
- display: inline-block;
13
- padding: 10px 0;
14
- line-height: 1.6;
15
- }
16
-
17
- .Pagination--button-group {
18
- display: flex;
19
- justify-content: flex-end;
20
- width: calc(25% + ${paddingRight});
21
- padding: 10px ${paddingRight} 10px 0;
22
- position: absolute;
23
- top: 0;
24
- right: 0;
25
-
26
- > * {
27
- display: inline-block;
28
- font-size: 18px;
29
- vertical-align: middle;
30
- margin-right: 8px;
31
- }
32
-
33
- button {
34
- width: auto;
35
- padding: 0;
36
- display: inline-block;
37
- background: none;
38
- box-shadow: none;
39
- text-decoration: underline;
40
- color: ${COLORS.midFontColor};
41
-
42
- &:hover {
43
- color: ${COLORS.defaultFontColor};
44
- }
45
-
46
- &.Pagination--non-click {
47
- text-decoration: none;
48
- }
49
- }
50
- }
51
- `;
@@ -1,118 +0,0 @@
1
- // TODO: This component's migration was fast-tracked for Insights. Assess for potential refactor and documentation.
2
-
3
- import React from 'react';
4
-
5
- import { numberUtils } from '@/legacy/utils';
6
-
7
- import { PermafrostComponent } from '@/types';
8
-
9
- import { StyledPagination } from './Pagination.styles';
10
-
11
- type Props = PermafrostComponent & {
12
- currentPage: number;
13
- limit: number;
14
- pageInfo: {
15
- aggregateCount: number;
16
- endCursor: number;
17
- hasNextPage: boolean;
18
- startCursor: number;
19
- };
20
- quantity: number;
21
- skip?: number;
22
- getPage(startCursor: number, endCursor: number): void;
23
- getNextPage(cursor: number): void;
24
- getPreviousPage(cursor: number): void;
25
- };
26
-
27
- export function Pagination(props: Props) {
28
- // renderPreviousPages = (currentPage, lastPage) => {
29
- // if (currentPage === lastPage - 2) {
30
- // return null
31
- // }
32
- // // this.props.getPage(endCursor, 1)
33
- // if (currentPage === lastPage - 1) {
34
- // return <>{lastPage - 2 >= 1 && <button onClick={() => this.props.getBeforePage(startCursor, )}>{lastPage - 2}</button>}</>
35
- // }
36
-
37
- // if (currentPage === lastPage) {
38
- // return (
39
- // <>
40
- // {lastPage - 2 >= 1 && <button>{lastPage - 2}</button>}
41
- // {lastPage - 1 >= 1 && <button>{lastPage - 1}</button>}
42
- // </>
43
- // )
44
- // }
45
- // }
46
-
47
- const { aggregateCount, hasNextPage, endCursor, startCursor } = props.pageInfo;
48
- const { currentPage, limit, quantity } = props;
49
- const lastPage = Math.ceil(aggregateCount / limit);
50
- const currentItemNumber = (currentPage - 1) * limit + 1;
51
-
52
- return (
53
- <StyledPagination className={props.className} data-cy={props['data-cy']} id={props.id}>
54
- <div className="Pagination--stats">
55
- <p>
56
- Showing{' '}
57
- {aggregateCount === 0 ? (
58
- <></>
59
- ) : (
60
- <>
61
- {currentItemNumber} - {currentItemNumber + quantity - 1} of{' '}
62
- </>
63
- )}
64
- {numberUtils.numberWithCommas(aggregateCount)} entries
65
- </p>
66
- </div>
67
- {aggregateCount > limit && (
68
- <div className="Pagination--button-group" data-cy="Pagination--button-group">
69
- <p data-cy="pagination--label">Page:&nbsp;</p>
70
- {currentPage > 1 && (
71
- <button onClick={() => props.getPreviousPage(startCursor)}>Prev</button>
72
- )}
73
- {/* {currentPage >= lastPage - 2 && this.renderPreviousPages(currentPage, lastPage)} */}
74
- <p data-cy="pagination--current-page">{currentPage}</p>
75
- {lastPage > currentPage + 1 && (
76
- <button
77
- onClick={() => props.getPage(endCursor, 1)}
78
- data-cy="pagination--second-page-number"
79
- >
80
- {currentPage + 1}
81
- </button>
82
- )}
83
- {lastPage > currentPage + 2 && (
84
- <button
85
- onClick={() => props.getPage(endCursor, 2)}
86
- data-cy="pagination--third-page-number"
87
- >
88
- {currentPage + 2}
89
- </button>
90
- )}
91
- {lastPage > currentPage + 3 && (
92
- <button onClick={() => props.getPage(endCursor, 3)}>{currentPage + 3}</button>
93
- )}
94
- {lastPage - (currentPage + 2) === 3 && (
95
- <button onClick={() => props.getPage(endCursor, 4)}>{currentPage + 4}</button>
96
- )}
97
- {lastPage - (currentPage + 2) > 2 && lastPage - (currentPage + 2) !== 3 && <p>...</p>}
98
- {lastPage !== currentPage && (
99
- <button
100
- onClick={() => props.getPage(endCursor, lastPage - currentPage)}
101
- data-cy="pagination--last-page"
102
- >
103
- {lastPage}
104
- </button>
105
- )}
106
- {hasNextPage && (
107
- <button
108
- onClick={() => props.getNextPage(endCursor)}
109
- data-cy="pagination--next-page-number"
110
- >
111
- Next
112
- </button>
113
- )}
114
- </div>
115
- )}
116
- </StyledPagination>
117
- );
118
- }
@@ -1 +0,0 @@
1
- export { Pagination } from './Pagination';
@@ -1,56 +0,0 @@
1
- import React, { useState } from 'react';
2
- import type { Meta, StoryObj } from '@storybook/react';
3
-
4
- import { Toggle } from './Toggle';
5
-
6
- const meta = {
7
- component: Toggle,
8
- title: 'legacy/Toggle',
9
- argTypes: {},
10
- args: {},
11
- } satisfies Meta<typeof Toggle>;
12
-
13
- export default meta;
14
- type Story = StoryObj<typeof Toggle>;
15
-
16
- function StoryRender(props: any) {
17
- const [isPressed, setIsPressed] = useState(false);
18
-
19
- return (
20
- <Toggle
21
- {...props}
22
- value={isPressed}
23
- onChange={() => {
24
- console.log(isPressed);
25
- setIsPressed(!isPressed);
26
- }}
27
- disabled={props.disabled}
28
- />
29
- );
30
- }
31
-
32
- export const Normal: Story = {
33
- args: {},
34
- render: (args) => {
35
- return <StoryRender {...args} />;
36
- },
37
- };
38
-
39
- export const Disabled: Story = {
40
- args: {
41
- disabled: true,
42
- },
43
- render: (args) => {
44
- return <StoryRender {...args} />;
45
- },
46
- };
47
-
48
- export const Icons: Story = {
49
- args: {
50
- checkedIconName: 'fa-check',
51
- notCheckedIconName: 'x-close',
52
- },
53
- render: (args) => {
54
- return <StoryRender {...args} />;
55
- },
56
- };