@idea-fragments/react-components-zendesk 0.1.1 → 0.1.2

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 (452) hide show
  1. package/dist/alert.js +2701 -3288
  2. package/dist/alert.js.map +1 -1
  3. package/dist/index.js +1002 -0
  4. package/dist/index.js.map +1 -0
  5. package/dist/types/components/forms/selectors/Dropdown/Item.d.ts +1 -1
  6. package/dist/types/components/tags/Chip.d.ts +1 -1
  7. package/dist/types/index.d.ts +5 -0
  8. package/dist/types/index.d.ts.map +1 -0
  9. package/package.json +14 -3
  10. package/.node-version +0 -1
  11. package/.storybook/ThemeProvider.tsx +0 -15
  12. package/.storybook/main.js +0 -13
  13. package/.storybook/preview.js +0 -20
  14. package/dist/forms.js +0 -101816
  15. package/dist/forms.js.map +0 -1
  16. package/entries/alert.ts +0 -1
  17. package/entries/forms.ts +0 -46
  18. package/entries/hooks.ts +0 -3
  19. package/entries/icon.ts +0 -1
  20. package/entries/layouts.ts +0 -15
  21. package/entries/loaders.ts +0 -3
  22. package/entries/mobx.ts +0 -6
  23. package/entries/modal.ts +0 -1
  24. package/entries/navigation.ts +0 -3
  25. package/entries/notifications.ts +0 -2
  26. package/entries/styles.ts +0 -16
  27. package/entries/tables.ts +0 -4
  28. package/entries/tags.ts +0 -2
  29. package/entries/text.ts +0 -7
  30. package/entries/tooltips.ts +0 -2
  31. package/entries/types.ts +0 -3
  32. package/entries/utils.ts +0 -4
  33. package/react_components_zendesk.iml +0 -9
  34. package/rollup.config.js +0 -40
  35. package/src/GlobalStyle.js +0 -43
  36. package/src/calendarCss.js +0 -2
  37. package/src/components/Alert.tsx +0 -175
  38. package/src/components/Drawer.tsx +0 -244
  39. package/src/components/Icon.tsx +0 -43
  40. package/src/components/Modal.tsx +0 -206
  41. package/src/components/StyledComponentProps.type.ts +0 -3
  42. package/src/components/StyledProps.type.ts +0 -4
  43. package/src/components/calendars/Legendable.type.tsx +0 -4
  44. package/src/components/calendars/TinyCalendar.tsx +0 -185
  45. package/src/components/calendars/TinyMonthYearCalendar.tsx +0 -57
  46. package/src/components/calendars/blocks/Legend.tsx +0 -44
  47. package/src/components/calendars/blocks/MonthPicker.tsx +0 -54
  48. package/src/components/calendars/blocks/MonthYearPicker.tsx +0 -101
  49. package/src/components/calendars/blocks/YearPicker.tsx +0 -44
  50. package/src/components/forms/Button.tsx +0 -214
  51. package/src/components/forms/Checkbox.tsx +0 -99
  52. package/src/components/forms/CycleButton.stories.tsx +0 -23
  53. package/src/components/forms/CycleButton.tsx +0 -52
  54. package/src/components/forms/Form.tsx +0 -43
  55. package/src/components/forms/Hint.tsx +0 -12
  56. package/src/components/forms/IconButton.tsx +0 -29
  57. package/src/components/forms/Label.tsx +0 -9
  58. package/src/components/forms/TaggedToggle.stories.tsx +0 -18
  59. package/src/components/forms/TaggedToggle.tsx +0 -19
  60. package/src/components/forms/Toggle.stories.tsx +0 -30
  61. package/src/components/forms/Toggle.tsx +0 -62
  62. package/src/components/forms/ValidatedFormProps.type.ts +0 -3
  63. package/src/components/forms/Validation.type.ts +0 -10
  64. package/src/components/forms/buttonMixins.ts +0 -74
  65. package/src/components/forms/formField.types.ts +0 -26
  66. package/src/components/forms/selectors/BooleanSelector.tsx +0 -71
  67. package/src/components/forms/selectors/DatePickerSelector.tsx +0 -88
  68. package/src/components/forms/selectors/Dropdown/Item.tsx +0 -34
  69. package/src/components/forms/selectors/Dropdown.tsx +0 -410
  70. package/src/components/forms/selectors/MonthYearSelector.tsx +0 -54
  71. package/src/components/forms/selectors/MultiSelector.tsx +0 -58
  72. package/src/components/forms/selectors/SearchableSelector.tsx +0 -120
  73. package/src/components/forms/selectors/Selector.tsx +0 -55
  74. package/src/components/forms/selectors/SelectorEmptyState.tsx +0 -5
  75. package/src/components/forms/selectors/types.ts +0 -43
  76. package/src/components/forms/textfields/EmailTextField.tsx +0 -7
  77. package/src/components/forms/textfields/NumberTextField.tsx +0 -17
  78. package/src/components/forms/textfields/PasswordTextField.tsx +0 -12
  79. package/src/components/forms/textfields/TextArea.tsx +0 -25
  80. package/src/components/forms/textfields/TextField.tsx +0 -45
  81. package/src/components/forms/textfields/TextFieldWrapper.tsx +0 -120
  82. package/src/components/forms/validationStates.ts +0 -6
  83. package/src/components/layout/AppBar.tsx +0 -137
  84. package/src/components/layout/AppBarLayout.tsx +0 -55
  85. package/src/components/layout/Carousel.tsx +0 -44
  86. package/src/components/layout/Container.tsx +0 -43
  87. package/src/components/layout/FlexBlock.tsx +0 -122
  88. package/src/components/layout/FlexBox.tsx +0 -69
  89. package/src/components/layout/Grid.tsx +0 -23
  90. package/src/components/layout/Line.tsx +0 -13
  91. package/src/components/layout/OpacityTransition.tsx +0 -6
  92. package/src/components/layout/OverflowMenu.tsx +0 -45
  93. package/src/components/layout/Section.tsx +0 -41
  94. package/src/components/layout/Sidebar.tsx +0 -107
  95. package/src/components/layout/SidebarLayout.tsx +0 -32
  96. package/src/components/layout/Tabs.tsx +0 -39
  97. package/src/components/loaders/AsyncLoadable.tsx +0 -57
  98. package/src/components/loaders/Dots.tsx +0 -16
  99. package/src/components/loaders/Loadable.tsx +0 -99
  100. package/src/components/loaders/Loader.tsx +0 -52
  101. package/src/components/loaders/TranslucentLoader.tsx +0 -49
  102. package/src/components/mobx/Alert.tsx +0 -33
  103. package/src/components/mobx/Drawer.tsx +0 -13
  104. package/src/components/mobx/ErrorBoundary.tsx +0 -56
  105. package/src/components/mobx/Modal.tsx +0 -44
  106. package/src/components/navigation/Breadcrumbs.tsx +0 -49
  107. package/src/components/navigation/ButtonLink.tsx +0 -55
  108. package/src/components/navigation/InlineButtonLink.tsx +0 -9
  109. package/src/components/notification/InfoPanel.tsx +0 -70
  110. package/src/components/notification/Notification.tsx +0 -51
  111. package/src/components/tables/MobileTable/Row.tsx +0 -147
  112. package/src/components/tables/MobileTable.tsx +0 -67
  113. package/src/components/tables/NiceTable.tsx +0 -81
  114. package/src/components/tables/Row.tsx +0 -84
  115. package/src/components/tables/SimpleTable.tsx +0 -99
  116. package/src/components/tables/Table.tsx +0 -153
  117. package/src/components/tables/blocks/Header.tsx +0 -119
  118. package/src/components/tables/blocks/HelpText.tsx +0 -9
  119. package/src/components/tables/blocks/Pagination.tsx +0 -85
  120. package/src/components/tables/blocks/TableFilter.tsx +0 -56
  121. package/src/components/tables/blocks/Title.tsx +0 -6
  122. package/src/components/tables/index.tsx +0 -106
  123. package/src/components/tables/utils.ts +0 -1
  124. package/src/components/tags/Chip.tsx +0 -44
  125. package/src/components/tags/Tag.tsx +0 -23
  126. package/src/components/text/Header.js +0 -55
  127. package/src/components/text/Hint.js +0 -25
  128. package/src/components/text/Label.js +0 -18
  129. package/src/components/text/Paragraph.js +0 -35
  130. package/src/components/text/Text.tsx +0 -33
  131. package/src/components/tooltips/IconTooltip.stories.tsx +0 -20
  132. package/src/components/tooltips/IconTooltip.tsx +0 -25
  133. package/src/components/tooltips/Tooltip.tsx +0 -30
  134. package/src/global.d.ts +0 -29
  135. package/src/hooks/useIsMounted.ts +0 -11
  136. package/src/hooks/useLoader.tsx +0 -73
  137. package/src/hooks/useLoaderV2.tsx +0 -51
  138. package/src/index.css +0 -34
  139. package/src/index.js +0 -4
  140. package/src/stores/useStores.tsx +0 -11
  141. package/src/stories/Introduction.stories.mdx +0 -211
  142. package/src/stories/assets/code-brackets.svg +0 -1
  143. package/src/stories/assets/colors.svg +0 -1
  144. package/src/stories/assets/comments.svg +0 -1
  145. package/src/stories/assets/direction.svg +0 -1
  146. package/src/stories/assets/flow.svg +0 -1
  147. package/src/stories/assets/plugin.svg +0 -1
  148. package/src/stories/assets/repo.svg +0 -1
  149. package/src/stories/assets/stackalt.svg +0 -1
  150. package/src/styles/DeviceSizeWatcher.ts +0 -113
  151. package/src/styles/alignments.ts +0 -9
  152. package/src/styles/colors.ts +0 -51
  153. package/src/styles/deviceSizes.ts +0 -28
  154. package/src/styles/mediaQueries.ts +0 -83
  155. package/src/styles/mixins.ts +0 -23
  156. package/src/styles/spacings.ts +0 -16
  157. package/src/styles/theme/Theme.type.ts +0 -76
  158. package/src/styles/theme/base.ts +0 -47
  159. package/src/styles/theme/dark.ts +0 -36
  160. package/src/styles/theme/light.ts +0 -44
  161. package/src/styles/theme/light2.ts +0 -22
  162. package/src/styles/theme/useTheme.ts +0 -5
  163. package/src/styles/types.ts +0 -18
  164. package/src/styles/typography.ts +0 -67
  165. package/src/utils/NavBarScrollWatcher.ts +0 -59
  166. package/src/utils/arrayHelpers.ts +0 -56
  167. package/src/utils/dateTime/DateRange.type.ts +0 -6
  168. package/src/utils/dateTime/calendar.ts +0 -23
  169. package/src/utils/dateTimeHelpers.ts +0 -105
  170. package/src/utils/function.types.ts +0 -1
  171. package/src/utils/functionHelpers.ts +0 -23
  172. package/src/utils/idGenerator.ts +0 -8
  173. package/src/utils/logging/Logger.ts +0 -34
  174. package/src/utils/logging/Logger.type.ts +0 -7
  175. package/src/utils/logging/loggable.tsx +0 -17
  176. package/src/utils/logging/with_module_logging.ts +0 -8
  177. package/src/utils/numberHelpers.ts +0 -4
  178. package/src/utils/typeCheckers.ts +0 -6
  179. package/src/utils/types.d.ts +0 -1
  180. package/src/utils/validateFields.ts +0 -14
  181. package/src/zendeskGardenCss.js +0 -15
  182. package/tsconfig.json +0 -30
  183. package/type_defs/GlobalStyle.d.ts +0 -2
  184. package/type_defs/GlobalStyle.d.ts.map +0 -1
  185. package/type_defs/calendarCss.d.ts +0 -2
  186. package/type_defs/calendarCss.d.ts.map +0 -1
  187. package/type_defs/components/Alert.d.ts +0 -24
  188. package/type_defs/components/Alert.d.ts.map +0 -1
  189. package/type_defs/components/Drawer.d.ts +0 -18
  190. package/type_defs/components/Drawer.d.ts.map +0 -1
  191. package/type_defs/components/Icon.d.ts +0 -15
  192. package/type_defs/components/Icon.d.ts.map +0 -1
  193. package/type_defs/components/Modal.d.ts +0 -31
  194. package/type_defs/components/Modal.d.ts.map +0 -1
  195. package/type_defs/components/StyledComponentProps.type.d.ts +0 -4
  196. package/type_defs/components/StyledComponentProps.type.d.ts.map +0 -1
  197. package/type_defs/components/StyledProps.type.d.ts +0 -4
  198. package/type_defs/components/StyledProps.type.d.ts.map +0 -1
  199. package/type_defs/components/calendars/Legendable.type.d.ts +0 -5
  200. package/type_defs/components/calendars/Legendable.type.d.ts.map +0 -1
  201. package/type_defs/components/calendars/TinyCalendar.d.ts +0 -25
  202. package/type_defs/components/calendars/TinyCalendar.d.ts.map +0 -1
  203. package/type_defs/components/calendars/TinyMonthYearCalendar.d.ts +0 -11
  204. package/type_defs/components/calendars/TinyMonthYearCalendar.d.ts.map +0 -1
  205. package/type_defs/components/calendars/blocks/Legend.d.ts +0 -12
  206. package/type_defs/components/calendars/blocks/Legend.d.ts.map +0 -1
  207. package/type_defs/components/calendars/blocks/MonthPicker.d.ts +0 -8
  208. package/type_defs/components/calendars/blocks/MonthPicker.d.ts.map +0 -1
  209. package/type_defs/components/calendars/blocks/MonthYearPicker.d.ts +0 -16
  210. package/type_defs/components/calendars/blocks/MonthYearPicker.d.ts.map +0 -1
  211. package/type_defs/components/calendars/blocks/YearPicker.d.ts +0 -10
  212. package/type_defs/components/calendars/blocks/YearPicker.d.ts.map +0 -1
  213. package/type_defs/components/forms/Button.d.ts +0 -41
  214. package/type_defs/components/forms/Button.d.ts.map +0 -1
  215. package/type_defs/components/forms/Checkbox.d.ts +0 -10
  216. package/type_defs/components/forms/Checkbox.d.ts.map +0 -1
  217. package/type_defs/components/forms/CycleButton.d.ts +0 -14
  218. package/type_defs/components/forms/CycleButton.d.ts.map +0 -1
  219. package/type_defs/components/forms/CycleButton.stories.d.ts +0 -16
  220. package/type_defs/components/forms/CycleButton.stories.d.ts.map +0 -1
  221. package/type_defs/components/forms/Form.d.ts +0 -9
  222. package/type_defs/components/forms/Form.d.ts.map +0 -1
  223. package/type_defs/components/forms/Hint.d.ts +0 -2
  224. package/type_defs/components/forms/Hint.d.ts.map +0 -1
  225. package/type_defs/components/forms/IconButton.d.ts +0 -6
  226. package/type_defs/components/forms/IconButton.d.ts.map +0 -1
  227. package/type_defs/components/forms/Label.d.ts +0 -2
  228. package/type_defs/components/forms/Label.d.ts.map +0 -1
  229. package/type_defs/components/forms/TaggedToggle.d.ts +0 -8
  230. package/type_defs/components/forms/TaggedToggle.d.ts.map +0 -1
  231. package/type_defs/components/forms/TaggedToggle.stories.d.ts +0 -12
  232. package/type_defs/components/forms/TaggedToggle.stories.d.ts.map +0 -1
  233. package/type_defs/components/forms/Toggle.d.ts +0 -12
  234. package/type_defs/components/forms/Toggle.d.ts.map +0 -1
  235. package/type_defs/components/forms/Toggle.stories.d.ts +0 -18
  236. package/type_defs/components/forms/Toggle.stories.d.ts.map +0 -1
  237. package/type_defs/components/forms/ValidatedFormProps.type.d.ts +0 -6
  238. package/type_defs/components/forms/ValidatedFormProps.type.d.ts.map +0 -1
  239. package/type_defs/components/forms/Validation.type.d.ts +0 -9
  240. package/type_defs/components/forms/Validation.type.d.ts.map +0 -1
  241. package/type_defs/components/forms/buttonMixins.d.ts +0 -23
  242. package/type_defs/components/forms/buttonMixins.d.ts.map +0 -1
  243. package/type_defs/components/forms/formField.types.d.ts +0 -23
  244. package/type_defs/components/forms/formField.types.d.ts.map +0 -1
  245. package/type_defs/components/forms/selectors/BooleanSelector.d.ts +0 -11
  246. package/type_defs/components/forms/selectors/BooleanSelector.d.ts.map +0 -1
  247. package/type_defs/components/forms/selectors/DatePickerSelector.d.ts +0 -19
  248. package/type_defs/components/forms/selectors/DatePickerSelector.d.ts.map +0 -1
  249. package/type_defs/components/forms/selectors/Dropdown/Item.d.ts +0 -19
  250. package/type_defs/components/forms/selectors/Dropdown/Item.d.ts.map +0 -1
  251. package/type_defs/components/forms/selectors/Dropdown.d.ts +0 -28
  252. package/type_defs/components/forms/selectors/Dropdown.d.ts.map +0 -1
  253. package/type_defs/components/forms/selectors/MonthYearSelector.d.ts +0 -9
  254. package/type_defs/components/forms/selectors/MonthYearSelector.d.ts.map +0 -1
  255. package/type_defs/components/forms/selectors/MultiSelector.d.ts +0 -9
  256. package/type_defs/components/forms/selectors/MultiSelector.d.ts.map +0 -1
  257. package/type_defs/components/forms/selectors/SearchableSelector.d.ts +0 -8
  258. package/type_defs/components/forms/selectors/SearchableSelector.d.ts.map +0 -1
  259. package/type_defs/components/forms/selectors/Selector.d.ts +0 -4
  260. package/type_defs/components/forms/selectors/Selector.d.ts.map +0 -1
  261. package/type_defs/components/forms/selectors/SelectorEmptyState.d.ts +0 -2
  262. package/type_defs/components/forms/selectors/SelectorEmptyState.d.ts.map +0 -1
  263. package/type_defs/components/forms/selectors/types.d.ts +0 -41
  264. package/type_defs/components/forms/selectors/types.d.ts.map +0 -1
  265. package/type_defs/components/forms/textfields/EmailTextField.d.ts +0 -4
  266. package/type_defs/components/forms/textfields/EmailTextField.d.ts.map +0 -1
  267. package/type_defs/components/forms/textfields/NumberTextField.d.ts +0 -4
  268. package/type_defs/components/forms/textfields/NumberTextField.d.ts.map +0 -1
  269. package/type_defs/components/forms/textfields/PasswordTextField.d.ts +0 -8
  270. package/type_defs/components/forms/textfields/PasswordTextField.d.ts.map +0 -1
  271. package/type_defs/components/forms/textfields/TextArea.d.ts +0 -9
  272. package/type_defs/components/forms/textfields/TextArea.d.ts.map +0 -1
  273. package/type_defs/components/forms/textfields/TextField.d.ts +0 -14
  274. package/type_defs/components/forms/textfields/TextField.d.ts.map +0 -1
  275. package/type_defs/components/forms/textfields/TextFieldWrapper.d.ts +0 -13
  276. package/type_defs/components/forms/textfields/TextFieldWrapper.d.ts.map +0 -1
  277. package/type_defs/components/forms/validationStates.d.ts +0 -7
  278. package/type_defs/components/forms/validationStates.d.ts.map +0 -1
  279. package/type_defs/components/layout/AppBar.d.ts +0 -14
  280. package/type_defs/components/layout/AppBar.d.ts.map +0 -1
  281. package/type_defs/components/layout/AppBarLayout.d.ts +0 -15
  282. package/type_defs/components/layout/AppBarLayout.d.ts.map +0 -1
  283. package/type_defs/components/layout/Carousel.d.ts +0 -13
  284. package/type_defs/components/layout/Carousel.d.ts.map +0 -1
  285. package/type_defs/components/layout/Container.d.ts +0 -4
  286. package/type_defs/components/layout/Container.d.ts.map +0 -1
  287. package/type_defs/components/layout/FlexBlock.d.ts +0 -19
  288. package/type_defs/components/layout/FlexBlock.d.ts.map +0 -1
  289. package/type_defs/components/layout/FlexBox.d.ts +0 -18
  290. package/type_defs/components/layout/FlexBox.d.ts.map +0 -1
  291. package/type_defs/components/layout/Grid.d.ts +0 -4
  292. package/type_defs/components/layout/Grid.d.ts.map +0 -1
  293. package/type_defs/components/layout/Line.d.ts +0 -6
  294. package/type_defs/components/layout/Line.d.ts.map +0 -1
  295. package/type_defs/components/layout/OpacityTransition.d.ts +0 -4
  296. package/type_defs/components/layout/OpacityTransition.d.ts.map +0 -1
  297. package/type_defs/components/layout/OverflowMenu.d.ts +0 -13
  298. package/type_defs/components/layout/OverflowMenu.d.ts.map +0 -1
  299. package/type_defs/components/layout/Section.d.ts +0 -6
  300. package/type_defs/components/layout/Section.d.ts.map +0 -1
  301. package/type_defs/components/layout/Sidebar.d.ts +0 -12
  302. package/type_defs/components/layout/Sidebar.d.ts.map +0 -1
  303. package/type_defs/components/layout/SidebarLayout.d.ts +0 -5
  304. package/type_defs/components/layout/SidebarLayout.d.ts.map +0 -1
  305. package/type_defs/components/layout/Tabs.d.ts +0 -3
  306. package/type_defs/components/layout/Tabs.d.ts.map +0 -1
  307. package/type_defs/components/loaders/AsyncLoadable.d.ts +0 -13
  308. package/type_defs/components/loaders/AsyncLoadable.d.ts.map +0 -1
  309. package/type_defs/components/loaders/Dots.d.ts +0 -9
  310. package/type_defs/components/loaders/Dots.d.ts.map +0 -1
  311. package/type_defs/components/loaders/Loadable.d.ts +0 -10
  312. package/type_defs/components/loaders/Loadable.d.ts.map +0 -1
  313. package/type_defs/components/loaders/Loader.d.ts +0 -15
  314. package/type_defs/components/loaders/Loader.d.ts.map +0 -1
  315. package/type_defs/components/loaders/TranslucentLoader.d.ts +0 -9
  316. package/type_defs/components/loaders/TranslucentLoader.d.ts.map +0 -1
  317. package/type_defs/components/mobx/Alert.d.ts +0 -4
  318. package/type_defs/components/mobx/Alert.d.ts.map +0 -1
  319. package/type_defs/components/mobx/Drawer.d.ts +0 -5
  320. package/type_defs/components/mobx/Drawer.d.ts.map +0 -1
  321. package/type_defs/components/mobx/ErrorBoundary.d.ts +0 -24
  322. package/type_defs/components/mobx/ErrorBoundary.d.ts.map +0 -1
  323. package/type_defs/components/mobx/Modal.d.ts +0 -4
  324. package/type_defs/components/mobx/Modal.d.ts.map +0 -1
  325. package/type_defs/components/navigation/Breadcrumbs.d.ts +0 -3
  326. package/type_defs/components/navigation/Breadcrumbs.d.ts.map +0 -1
  327. package/type_defs/components/navigation/ButtonLink.d.ts +0 -25
  328. package/type_defs/components/navigation/ButtonLink.d.ts.map +0 -1
  329. package/type_defs/components/navigation/InlineButtonLink.d.ts +0 -3
  330. package/type_defs/components/navigation/InlineButtonLink.d.ts.map +0 -1
  331. package/type_defs/components/notification/InfoPanel.d.ts +0 -18
  332. package/type_defs/components/notification/InfoPanel.d.ts.map +0 -1
  333. package/type_defs/components/notification/Notification.d.ts +0 -14
  334. package/type_defs/components/notification/Notification.d.ts.map +0 -1
  335. package/type_defs/components/tables/MobileTable/Row.d.ts +0 -14
  336. package/type_defs/components/tables/MobileTable/Row.d.ts.map +0 -1
  337. package/type_defs/components/tables/MobileTable.d.ts +0 -9
  338. package/type_defs/components/tables/MobileTable.d.ts.map +0 -1
  339. package/type_defs/components/tables/NiceTable.d.ts +0 -12
  340. package/type_defs/components/tables/NiceTable.d.ts.map +0 -1
  341. package/type_defs/components/tables/Row.d.ts +0 -19
  342. package/type_defs/components/tables/Row.d.ts.map +0 -1
  343. package/type_defs/components/tables/SimpleTable.d.ts +0 -9
  344. package/type_defs/components/tables/SimpleTable.d.ts.map +0 -1
  345. package/type_defs/components/tables/Table.d.ts +0 -73
  346. package/type_defs/components/tables/Table.d.ts.map +0 -1
  347. package/type_defs/components/tables/blocks/Header.d.ts +0 -17
  348. package/type_defs/components/tables/blocks/Header.d.ts.map +0 -1
  349. package/type_defs/components/tables/blocks/HelpText.d.ts +0 -5
  350. package/type_defs/components/tables/blocks/HelpText.d.ts.map +0 -1
  351. package/type_defs/components/tables/blocks/Pagination.d.ts +0 -8
  352. package/type_defs/components/tables/blocks/Pagination.d.ts.map +0 -1
  353. package/type_defs/components/tables/blocks/TableFilter.d.ts +0 -9
  354. package/type_defs/components/tables/blocks/TableFilter.d.ts.map +0 -1
  355. package/type_defs/components/tables/blocks/Title.d.ts +0 -7
  356. package/type_defs/components/tables/blocks/Title.d.ts.map +0 -1
  357. package/type_defs/components/tables/index.d.ts +0 -9
  358. package/type_defs/components/tables/index.d.ts.map +0 -1
  359. package/type_defs/components/tables/utils.d.ts +0 -2
  360. package/type_defs/components/tables/utils.d.ts.map +0 -1
  361. package/type_defs/components/tags/Chip.d.ts +0 -18
  362. package/type_defs/components/tags/Chip.d.ts.map +0 -1
  363. package/type_defs/components/tags/Tag.d.ts +0 -8
  364. package/type_defs/components/tags/Tag.d.ts.map +0 -1
  365. package/type_defs/components/text/Header.d.ts +0 -31
  366. package/type_defs/components/text/Header.d.ts.map +0 -1
  367. package/type_defs/components/text/Hint.d.ts +0 -10
  368. package/type_defs/components/text/Hint.d.ts.map +0 -1
  369. package/type_defs/components/text/Label.d.ts +0 -7
  370. package/type_defs/components/text/Label.d.ts.map +0 -1
  371. package/type_defs/components/text/Paragraph.d.ts +0 -37
  372. package/type_defs/components/text/Paragraph.d.ts.map +0 -1
  373. package/type_defs/components/text/Text.d.ts +0 -7
  374. package/type_defs/components/text/Text.d.ts.map +0 -1
  375. package/type_defs/components/tooltips/IconTooltip.d.ts +0 -10
  376. package/type_defs/components/tooltips/IconTooltip.d.ts.map +0 -1
  377. package/type_defs/components/tooltips/IconTooltip.stories.d.ts +0 -18
  378. package/type_defs/components/tooltips/IconTooltip.stories.d.ts.map +0 -1
  379. package/type_defs/components/tooltips/Tooltip.d.ts +0 -14
  380. package/type_defs/components/tooltips/Tooltip.d.ts.map +0 -1
  381. package/type_defs/hooks/useIsMounted.d.ts +0 -2
  382. package/type_defs/hooks/useIsMounted.d.ts.map +0 -1
  383. package/type_defs/hooks/useLoader.d.ts +0 -10
  384. package/type_defs/hooks/useLoader.d.ts.map +0 -1
  385. package/type_defs/hooks/useLoaderV2.d.ts +0 -15
  386. package/type_defs/hooks/useLoaderV2.d.ts.map +0 -1
  387. package/type_defs/index.d.ts +0 -2
  388. package/type_defs/index.d.ts.map +0 -1
  389. package/type_defs/stores/useStores.d.ts +0 -5
  390. package/type_defs/stores/useStores.d.ts.map +0 -1
  391. package/type_defs/styles/DeviceSizeWatcher.d.ts +0 -21
  392. package/type_defs/styles/DeviceSizeWatcher.d.ts.map +0 -1
  393. package/type_defs/styles/alignments.d.ts +0 -8
  394. package/type_defs/styles/alignments.d.ts.map +0 -1
  395. package/type_defs/styles/colors.d.ts +0 -35
  396. package/type_defs/styles/colors.d.ts.map +0 -1
  397. package/type_defs/styles/deviceSizes.d.ts +0 -9
  398. package/type_defs/styles/deviceSizes.d.ts.map +0 -1
  399. package/type_defs/styles/mediaQueries.d.ts +0 -21
  400. package/type_defs/styles/mediaQueries.d.ts.map +0 -1
  401. package/type_defs/styles/mixins.d.ts +0 -8
  402. package/type_defs/styles/mixins.d.ts.map +0 -1
  403. package/type_defs/styles/spacings.d.ts +0 -15
  404. package/type_defs/styles/spacings.d.ts.map +0 -1
  405. package/type_defs/styles/theme/Theme.type.d.ts +0 -79
  406. package/type_defs/styles/theme/Theme.type.d.ts.map +0 -1
  407. package/type_defs/styles/theme/base.d.ts +0 -3
  408. package/type_defs/styles/theme/base.d.ts.map +0 -1
  409. package/type_defs/styles/theme/dark.d.ts +0 -3
  410. package/type_defs/styles/theme/dark.d.ts.map +0 -1
  411. package/type_defs/styles/theme/light.d.ts +0 -3
  412. package/type_defs/styles/theme/light.d.ts.map +0 -1
  413. package/type_defs/styles/theme/light2.d.ts +0 -3
  414. package/type_defs/styles/theme/light2.d.ts.map +0 -1
  415. package/type_defs/styles/theme/useTheme.d.ts +0 -3
  416. package/type_defs/styles/theme/useTheme.d.ts.map +0 -1
  417. package/type_defs/styles/types.d.ts +0 -17
  418. package/type_defs/styles/types.d.ts.map +0 -1
  419. package/type_defs/styles/typography.d.ts +0 -56
  420. package/type_defs/styles/typography.d.ts.map +0 -1
  421. package/type_defs/utils/NavBarScrollWatcher.d.ts +0 -7
  422. package/type_defs/utils/NavBarScrollWatcher.d.ts.map +0 -1
  423. package/type_defs/utils/arrayHelpers.d.ts +0 -23
  424. package/type_defs/utils/arrayHelpers.d.ts.map +0 -1
  425. package/type_defs/utils/dateTime/DateRange.type.d.ts +0 -6
  426. package/type_defs/utils/dateTime/DateRange.type.d.ts.map +0 -1
  427. package/type_defs/utils/dateTime/calendar.d.ts +0 -18
  428. package/type_defs/utils/dateTime/calendar.d.ts.map +0 -1
  429. package/type_defs/utils/dateTimeHelpers.d.ts +0 -23
  430. package/type_defs/utils/dateTimeHelpers.d.ts.map +0 -1
  431. package/type_defs/utils/function.types.d.ts +0 -2
  432. package/type_defs/utils/function.types.d.ts.map +0 -1
  433. package/type_defs/utils/functionHelpers.d.ts +0 -7
  434. package/type_defs/utils/functionHelpers.d.ts.map +0 -1
  435. package/type_defs/utils/idGenerator.d.ts +0 -3
  436. package/type_defs/utils/idGenerator.d.ts.map +0 -1
  437. package/type_defs/utils/logging/Logger.d.ts +0 -10
  438. package/type_defs/utils/logging/Logger.d.ts.map +0 -1
  439. package/type_defs/utils/logging/Logger.type.d.ts +0 -7
  440. package/type_defs/utils/logging/Logger.type.d.ts.map +0 -1
  441. package/type_defs/utils/logging/loggable.d.ts +0 -7
  442. package/type_defs/utils/logging/loggable.d.ts.map +0 -1
  443. package/type_defs/utils/logging/with_module_logging.d.ts +0 -3
  444. package/type_defs/utils/logging/with_module_logging.d.ts.map +0 -1
  445. package/type_defs/utils/numberHelpers.d.ts +0 -3
  446. package/type_defs/utils/numberHelpers.d.ts.map +0 -1
  447. package/type_defs/utils/typeCheckers.d.ts +0 -5
  448. package/type_defs/utils/typeCheckers.d.ts.map +0 -1
  449. package/type_defs/utils/validateFields.d.ts +0 -13
  450. package/type_defs/utils/validateFields.d.ts.map +0 -1
  451. package/type_defs/zendeskGardenCss.d.ts +0 -2
  452. package/type_defs/zendeskGardenCss.d.ts.map +0 -1
@@ -1,69 +0,0 @@
1
- import styled, { css } from "styled-components"
2
- import { MediaQuery } from "styles/mediaQueries"
3
- import { SPACINGS } from "styles/spacings"
4
-
5
- export type ResponsiveProps<P> = {
6
- mediaQueryFunc: MediaQuery,
7
- props: P
8
- }
9
-
10
- export type Props = {
11
- alignItems?: string,
12
- gap?: string | null | "unset",
13
- fluid?: boolean,
14
- inline?: boolean,
15
- justifyContent?: string,
16
- responsivePropsList?: ResponsiveProps<Props>[]
17
- withRows?: boolean,
18
- wrap?: boolean,
19
- }
20
-
21
- export type FlexBoxProps = Props
22
-
23
- const getFlexDirection = ({ withRows }: Props) => withRows ? "column" : "row"
24
-
25
- export const FlexBox = styled.div<Props>`
26
- align-items: ${({ alignItems }) => alignItems ? alignItems : "initial"};
27
- display: ${(p) => p.inline ? "inline-flex" : "flex"};
28
- flex: ${({ fluid }: Props) => fluid ? 1 : "unset"};
29
- flex-direction: ${getFlexDirection};
30
- gap: ${(p) => p.gap ? p.gap : SPACINGS.SM};
31
- justify-content: ${(p) => p.justifyContent || "initial"};
32
- ${(p: Props) => p.wrap ? wrappedStyling : ""}
33
-
34
- ${(p: Props) => p.responsivePropsList ? responsiveStyles(p) : ""}
35
- `
36
-
37
- FlexBox.defaultProps = { withRows: false }
38
-
39
- const responsiveStyles = ({ responsivePropsList, ...originalProps }: Props) => (
40
- responsivePropsList?.map(({
41
- mediaQueryFunc,
42
- props: rProps,
43
- }): string => {
44
- const props = { ...originalProps, ...rProps }
45
- const {
46
- alignItems,
47
- gap,
48
- inline,
49
- justifyContent,
50
- fluid,
51
- wrap
52
- } = props
53
-
54
- return mediaQueryFunc(css`
55
- align-items: ${alignItems ? alignItems : "initial"};
56
- display: ${inline ? "inline-flex" : "flex"};
57
- flex: ${fluid ? 1 : "unset"};
58
- flex-direction: ${getFlexDirection(props)};
59
- gap: ${gap ? gap : SPACINGS.SM};
60
- justify-content: ${justifyContent || "initial"};
61
- ${wrap ? wrappedStyling : ""}
62
- `).join("")
63
- })
64
- )
65
-
66
-
67
- const wrappedStyling = css`
68
- flex-wrap: wrap;
69
- `
@@ -1,23 +0,0 @@
1
- import {
2
- Grid as ZGrid,
3
- Row as ZRow,
4
- Col as ZCol,
5
- /* @ts-ignore */
6
- } from "@zendeskgarden/react-grid"
7
- import styled from "styled-components"
8
- import { SPACINGS } from "styles/spacings"
9
-
10
- export const Grid = styled(ZGrid)`
11
- && {
12
- padding: 0;
13
- }
14
- `
15
-
16
- export const Row = ZRow
17
-
18
- export const Col = styled(ZCol)`
19
- && {
20
- margin-top: ${SPACINGS.XS};
21
- margin-bottom: ${SPACINGS.XS};
22
- }
23
- `
@@ -1,13 +0,0 @@
1
- import styled from "styled-components"
2
- import { COLORS } from "styles/colors"
3
-
4
- type Props = {
5
- color?: string,
6
- }
7
-
8
- export const Line = styled.hr<Props>`
9
- background: ${({ color }) => color ? color : COLORS.LIGHT_GREY};
10
- height: 2px;
11
- border: none;
12
- margin: unset;
13
- `
@@ -1,6 +0,0 @@
1
- import styled from "styled-components"
2
-
3
- export const OpacityTransition = styled.div`
4
- opacity: ${({ opacity = 1 }: { opacity: number }) => opacity};
5
- transition: opacity .25s ease-in-out;
6
- `
@@ -1,45 +0,0 @@
1
- import { mdiDotsVertical } from "@mdi/js"
2
- import { Button } from "components/forms/Button"
3
- import { MenuPlacement } from "components/forms/selectors/Dropdown"
4
- import { Dropdown } from "components/forms/selectors/Dropdown"
5
- import React from "react"
6
- import styled from "styled-components"
7
- import { COLORS, darker } from "styles/colors"
8
-
9
- const COMPONENT_NAME = "OverflowMenu"
10
-
11
- export type OverflowMenuItem = {
12
- label: string,
13
- action: () => void
14
- }
15
-
16
- type Props = {
17
- placement?: MenuPlacement,
18
- actions: Array<OverflowMenuItem>
19
- }
20
-
21
- const OverflowButton = styled(Button).attrs({
22
- icon: mdiDotsVertical,
23
- "data-component-name": COMPONENT_NAME,
24
- color: darker(COLORS.GREY),
25
- "aria-label": "Row actions",
26
- inline: true,
27
- })`
28
- align-self: flex-start;
29
- display: flex;
30
- flex-direction: column;
31
- justify-content: flex-start;
32
- `
33
-
34
- export const OverflowMenu = ({ actions, placement }: Props) => (
35
- <Dropdown options={actions}
36
- placement={placement}
37
- returnItemOnChange
38
- valueField={"label"}
39
- keyField={"label"}
40
- // @ts-ignore
41
- onChange={({ action }) => { action() }}
42
- // @ts-ignore
43
- trigger={<OverflowButton />}
44
- />
45
- )
@@ -1,41 +0,0 @@
1
- import styled, { css } from "styled-components"
2
- import { textColorForBackground } from "styles/mixins"
3
-
4
- type Props = {
5
- titleHidden? :boolean
6
- }
7
-
8
- const hideTitle = css`
9
- & > h1,
10
- & > h2,
11
- & > h3,
12
- & > h4,
13
- & > h5,
14
- & > h6 {
15
- display: none;
16
- }
17
- `
18
-
19
- export const Section = styled.section`
20
- background: ${({ color, theme }) => color ? color : theme.styles.section.background};
21
- border-radius: ${(p) => p.theme.styles.section.borderRadius};
22
- box-shadow: ${(p) => p.theme.styles.section.shadow};
23
- margin: ${(p) => p.theme.styles.section.margin};
24
- padding: ${(p) => p.theme.styles.section.padding};
25
-
26
- ${({color}) => color ? textColorForBackground : ""}
27
- ${({titleHidden} :Props) => titleHidden ? hideTitle : ""}
28
-
29
- & > :first-child {
30
- margin-top: 0;
31
- padding-top: 0;
32
- }
33
-
34
- & > section {
35
- padding-bottom: 0;
36
- }
37
-
38
- & + section {
39
- //padding-top: 0;
40
- }
41
- `
@@ -1,107 +0,0 @@
1
- // @flow
2
-
3
- // import { Button } from "components/forms/Button"
4
- // import { IconButton } from "components/forms/IconButton"
5
- // import { FlexBlock } from "components/layout/FlexBlock"
6
- // import { H3 } from "components/text/Header"
7
- // import React, { type ElementType } from "react"
8
- // import styled from "styled-components"
9
- // import { mdiArrowLeft } from "@mdi/js"
10
- // import { SPACINGS } from "styles/spacings"
11
- // import { ContainerProps } from "styles/types"
12
- import { DO_NOTHING } from "utils/functionHelpers"
13
- //
14
- // const Container = styled(FlexBlock)`
15
- // height: 100%;
16
- // padding: ${SPACINGS.LG};
17
- // width: ${({ width }) => width};
18
- // `
19
- //
20
- // const Header = styled(H3)`
21
- // color: ${({ theme }) => theme.styles.colorPrimary} !important;
22
- // margin: 0;
23
- // `
24
- //
25
- // const ActionContainer = styled(FlexBlock)`
26
- // flex: 1;
27
- // `
28
- //
29
- // const ActionItem = styled(Button).attrs({
30
- // flat: true, fluid: true,
31
- // })`
32
- // && {
33
- // text-align: left;
34
- // }
35
- // `
36
-
37
- // export type Action = {
38
- // name :string,
39
- // onClick :() => void,
40
- // }
41
-
42
- // type Props = {
43
- // title :string,
44
- // actions :Array<Action>,
45
- // showBackButton :boolean,
46
- // onBackClicked :() => void,
47
- // onLogoClicked :() => void,
48
- // logo? :ElementType,
49
- // width :string,
50
- // } & ContainerProps
51
-
52
- export const Sidebar = () => {
53
- throw new Error("Not Completed Yet")
54
- }
55
-
56
- // export const Sidebar = ({
57
- // title,
58
- // actions,
59
- // showBackButton,
60
- // onBackClicked,
61
- // onLogoClicked,
62
- // logo,
63
- // width,
64
- // } :Props) => {
65
- // throw "Not Completed Yet"
66
- // return <Container
67
- // data-component-name={Sidebar.COMPONENT_NAME}
68
- // spacing={SPACINGS.SM}
69
- // withRows
70
- // width={width}
71
- // >
72
- // <FlexBlock>
73
- // {
74
- // showBackButton
75
- // ? <IconButton icon={mdiArrowLeft}
76
- // flat
77
- // onClick={onBackClicked} />
78
- // : null
79
- // }
80
- //
81
- // <FlexBlock alignItems={"center"}
82
- // onClick={onLogoClicked}
83
- // css={`cursor: pointer;`}>
84
- // {logo ? logo : null}
85
- // <Header>{title}</Header>
86
- // </FlexBlock>
87
- // </FlexBlock>
88
- //
89
- // <ActionContainer withRows>
90
- // {
91
- // actions.map(({ name, onClick } :Action) => {
92
- // return <ActionItem onClick={onClick}>{name}</ActionItem>
93
- // })
94
- // }
95
- // </ActionContainer>
96
- // </Container>
97
- // }
98
-
99
- Sidebar.defaultProps = {
100
- actions : [],
101
- showBackButton: false,
102
- onBackClicked : DO_NOTHING,
103
- onLogoClicked : DO_NOTHING,
104
- width : "250px",
105
- }
106
-
107
- Sidebar.COMPONENT_NAME = "Sidebar"
@@ -1,32 +0,0 @@
1
- // @flow
2
-
3
- // import { FlexBlock } from "components/layout/FlexBlock"
4
- // import * as React from "react"
5
-
6
- // type Props = {
7
- // sidebar :React.Node,
8
- // content :React.Node,
9
- // className? :string,
10
- // }
11
-
12
-
13
- export const SidebarLayout = () => {
14
- throw new Error("Not Completed Yet")
15
- }
16
-
17
- // export const SidebarLayout = ({ className, sidebar, content } :Props) => {
18
- // return (
19
- // <FlexBlock data-component-name={SidebarLayout.COMPONENT_NAME}
20
- // alignSelf={"center"}
21
- // className={className}>
22
- // <FlexBlock withRows css={`height: 100vh`}>
23
- // {sidebar}
24
- // </FlexBlock>
25
- // <FlexBlock withRows fluid>
26
- // {content}
27
- // </FlexBlock>
28
- // </FlexBlock>
29
- // )
30
- // }
31
-
32
- SidebarLayout.COMPONENT_NAME = "SidebarLayout"
@@ -1,39 +0,0 @@
1
- // @ts-ignore
2
- import { TabPanel as ZTabPanel, Tabs as ZTabs } from "@zendeskgarden/react-tabs"
3
- import styled from "styled-components"
4
- import { COLORS } from "styles/colors"
5
- import { FONT_WEIGHTS } from "styles/typography"
6
-
7
- export const Tabs = styled(ZTabs)`
8
- &&& {
9
- //overflow: unset;
10
-
11
- *[data-garden-id="tabs.tab"], *[data-garden-id="tabs.tablist"] {
12
- font-size: inherit;
13
- }
14
-
15
- *[data-garden-id="tabs.tablist"] {
16
- //border-bottom: none;
17
- overflow-x: auto;
18
- }
19
-
20
- *[data-garden-id="tabs.tab"] {
21
- padding: 10px 15px 6px;
22
-
23
- &[aria-selected="true"] {
24
- font-weight: ${FONT_WEIGHTS.BOLD};
25
- }
26
-
27
- :hover:not(&[aria-selected="true"]) {
28
- color: ${({ theme }) => theme.styles.textColorPrimary};
29
- border-bottom: 3px solid ${COLORS.LIGHT_GREY};
30
- }
31
-
32
- :focus, &[aria-selected="true"] {
33
- color: ${({ theme }) => theme.styles.colorPrimary} !important;
34
- }
35
- }
36
- }
37
- `
38
-
39
- export const TabPanel = ZTabPanel
@@ -1,57 +0,0 @@
1
- // @ts-ignore
2
- import { Dots } from "@zendeskgarden/react-loaders"
3
- import { FlexBlock } from "components/layout/FlexBlock"
4
- import { StyledComponentProps } from "components/StyledComponentProps.type"
5
- import React, { FC, useContext, useState } from "react"
6
- import styled, { ThemeContext } from "styled-components"
7
- import { Theme } from "styles/theme/Theme.type"
8
- import { FONT_SIZES } from "styles/typography"
9
- import { returnAfterMinimum } from "utils/dateTimeHelpers"
10
- import { PromiseFunc } from "utils/function.types"
11
-
12
- type AsyncLoadFunc = <T>(f: PromiseFunc<any, T>) => Promise<T>
13
- export type RenderProp = { withLoading: AsyncLoadFunc }
14
-
15
- type Props = {
16
- children: (p: RenderProp) => JSX.Element
17
- } & StyledComponentProps
18
-
19
- export let AsyncLoadable: FC<Props> = ({ children, className }) => {
20
- const theme = useContext<Theme>(ThemeContext)
21
- const [isLoading, setLoadingState] = useState<boolean>(false)
22
-
23
- const withLoading = async <T, >(f: PromiseFunc<any, T>): Promise<T> => {
24
- setLoadingState(true)
25
-
26
- let val: Promise<any>
27
- try {
28
- val = await returnAfterMinimum(500, f)
29
- } finally {
30
- setLoadingState(false)
31
- }
32
-
33
- return val
34
- }
35
-
36
- if (isLoading) {
37
- return <Container justify={"center"}
38
- className={className}
39
- alignItems={"center"}>
40
- <Dots color={theme.styles.colorPrimary}
41
- size={FONT_SIZES.XXL}
42
- delayMS={100}
43
- velocity={-.25} />
44
- </Container>
45
- }
46
-
47
- return children({ withLoading })
48
- }
49
-
50
- AsyncLoadable = styled(AsyncLoadable)``
51
-
52
- const Container = styled(FlexBlock)`
53
- height: 100%;
54
- width: 100%;
55
- min-width: 200px;
56
- min-height: 200px;
57
- `
@@ -1,16 +0,0 @@
1
- // @ts-ignore
2
- import { Dots as ZDots } from "@zendeskgarden/react-loaders"
3
- import React, { FC } from "react"
4
- import { FONT_SIZES, FontSize } from "styles/typography"
5
-
6
- type Props = {
7
- color?: string,
8
- size?: FontSize
9
- }
10
-
11
- export const Dots: FC<Props> = ({ color, size = FONT_SIZES.XXL }) => {
12
- return <ZDots color={color}
13
- size={size}
14
- delayMS={100}
15
- velocity={-.25} />
16
- }
@@ -1,99 +0,0 @@
1
- // @ts-ignore
2
- import { Dots } from "@zendeskgarden/react-loaders"
3
- import { FlexBox } from "components/layout/FlexBox"
4
- import { useIsMounted } from "hooks/useIsMounted"
5
- import React, {
6
- FC,
7
-
8
- PropsWithChildren,
9
- useContext,
10
- useEffect,
11
- useState
12
- } from "react"
13
- import styled, { ThemeContext } from "styled-components"
14
- import { Theme } from "styles/theme/Theme.type"
15
- import { FONT_SIZES } from "styles/typography"
16
- import { Logger } from "utils/logging/Logger"
17
-
18
- const logger = new Logger("Loadable")
19
-
20
- const Container = styled(FlexBox)`
21
- //height: 100%;
22
- width: 100%;
23
- position: relative;
24
- `
25
-
26
- const LoaderContainer = styled(FlexBox)<{ showSpinner :boolean }>`
27
- height: 100%;
28
- width: 100%;
29
- position: absolute;
30
- `
31
-
32
- const ChildrenContainer = styled(FlexBox)<{
33
- showSpinner :boolean, opaqueSpinner :boolean,
34
- }>`
35
- width: 100%;
36
- opacity: ${({ showSpinner, opaqueSpinner }) => {
37
- if (!showSpinner) return "1"
38
- return opaqueSpinner ? "0" : ".3"
39
- }};
40
- `
41
-
42
- type Props = {
43
- className?: string,
44
- debugId?: number,
45
- opaqueSpinner?: boolean,
46
- showSpinner: boolean,
47
- }
48
-
49
- export let Loadable: FC<PropsWithChildren<Props>> = ({
50
- children,
51
- className,
52
- debugId,
53
- opaqueSpinner = false,
54
- showSpinner = false,
55
- }) => {
56
- logger.writeInfo("Rendering id:", debugId, "showSpinner", showSpinner)
57
- const isMounted = useIsMounted()
58
- const theme = useContext<Theme>(ThemeContext)
59
- const [canHideSpinner, setCanHideSpinner] = useState<boolean>(true)
60
-
61
- useEffect(() => {
62
- if (!showSpinner) return
63
- setCanHideSpinner(false)
64
- setTimeout(() => {
65
- logger.writeInfo("setting setCanHideSpinner true id:", debugId)
66
- if (isMounted()) setCanHideSpinner(true)
67
- }, 500)
68
- }, [debugId, isMounted, showSpinner])
69
-
70
- const showingSpinner = showSpinner || !canHideSpinner
71
-
72
-
73
-
74
- return <Container justifyContent={"center"}
75
- gap={"unset"}
76
- alignItems={"center"}>
77
- <ChildrenContainer gap={"unset"}
78
- className={className}
79
- opaqueSpinner={opaqueSpinner}
80
- showSpinner={showingSpinner}
81
- withRows
82
- >
83
- {children}
84
- </ChildrenContainer>
85
-
86
- {showingSpinner
87
- ? <LoaderContainer justifyContent={"center"}
88
- alignItems={"center"}
89
- showSpinner={showingSpinner}>
90
- <Dots color={theme.styles.colorPrimary}
91
- size={FONT_SIZES.XXL}
92
- delayMS={100}
93
- velocity={-.25} />
94
- </LoaderContainer>
95
- : null}
96
- </Container>
97
- }
98
-
99
- Loadable = styled(Loadable)``
@@ -1,52 +0,0 @@
1
- import { FlexBlock } from "components/layout/FlexBlock"
2
- import { useContext } from "react"
3
- import * as React from "react"
4
- import { useObserver } from "mobx-react"
5
- // @ts-ignore
6
- import { Dots } from "@zendeskgarden/react-loaders"
7
- import { useStores } from "stores/useStores"
8
- import { Theme } from "styles/theme/Theme.type"
9
- import { FONT_SIZES } from "styles/typography"
10
- import styled, { ThemeContext } from "styled-components"
11
-
12
- type Props = {
13
- forceVisibility :boolean,
14
- delay :number,
15
- }
16
-
17
- const Container = styled(FlexBlock)`
18
- background: ${({ theme }) => theme.styles.pageBackground}B3;
19
- position: fixed;
20
- top: 0;
21
- left: 0;
22
- height: 100%;
23
- width: 100%;
24
- `
25
-
26
- export const Loader = ({ forceVisibility, delay } :Props) => {
27
- const { ui } = useStores()
28
- const theme = useContext<Theme>(ThemeContext)
29
-
30
- return useObserver(() => {
31
- if (!ui.isLoaderVisible && !forceVisibility) {
32
- return null
33
- }
34
-
35
- return (
36
- <Container justify={"center"}
37
- alignItems={"center"}>
38
- <Dots data-component-name={`${Loader.COMPONENT_NAME}`}
39
- color={theme.styles.colorPrimary}
40
- size={FONT_SIZES.XXL}
41
- delayMS={delay}
42
- velocity={-.25} />
43
- </Container>
44
- )
45
- })
46
- }
47
-
48
- Loader.defaultProps = {
49
- forceVisibility: false,
50
- delay : 100,
51
- }
52
- Loader.COMPONENT_NAME = "Loader"
@@ -1,49 +0,0 @@
1
- import { FlexBox } from "components/layout/FlexBox"
2
- import { Dots } from "components/loaders/Dots"
3
- import React, { ComponentType, PropsWithChildren, useContext } from "react"
4
- import styled, { ThemeContext } from "styled-components"
5
- import { Theme } from "styles/theme/Theme.type"
6
-
7
- type Props = {
8
- className?: string,
9
- innerAs?: ComponentType<any>,
10
- isLoading: boolean,
11
- }
12
-
13
- export let TranslucentLoader = ({
14
- children,
15
- className,
16
- innerAs,
17
- isLoading = true
18
- }: PropsWithChildren<Props>) => {
19
- const theme = useContext<Theme>(ThemeContext)
20
-
21
- return (
22
- <Container as={innerAs} className={className}>
23
- {children}
24
- {
25
- isLoading
26
- ? <FlexBox alignItems={"center"}
27
- justifyContent={"center"}
28
- css={`
29
- background: white;
30
- opacity: .7;
31
- top: 0;
32
- left: 0;
33
- position: absolute;
34
- height: 100%;
35
- width: 100%;
36
- `}>
37
- <Dots color={theme.styles.colorPrimary} />
38
- </FlexBox>
39
- : null
40
- }
41
- </Container>
42
- )
43
- }
44
-
45
- TranslucentLoader = styled(TranslucentLoader)<Props>``
46
-
47
- const Container = styled.div`
48
- position: relative;
49
- `