@onewelcome/react-lib-components 0.1.0-alpha

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 (248) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +71 -0
  3. package/dist/BaseModal/BaseModal.d.ts +16 -0
  4. package/dist/BaseModal/BaseModalActions/BaseModalActions.d.ts +5 -0
  5. package/dist/BaseModal/BaseModalContent/BaseModalContent.d.ts +8 -0
  6. package/dist/BaseModal/BaseModalContext.d.ts +2 -0
  7. package/dist/BaseModal/BaseModalHeader/BaseModalHeader.d.ts +8 -0
  8. package/dist/Breadcrumbs/Breadcrumbs.d.ts +9 -0
  9. package/dist/Button/BaseButton.d.ts +8 -0
  10. package/dist/Button/Button.d.ts +10 -0
  11. package/dist/Button/IconButton.d.ts +10 -0
  12. package/dist/ContextMenu/ContextMenu.d.ts +18 -0
  13. package/dist/ContextMenu/ContextMenuItem.d.ts +6 -0
  14. package/dist/Dialog/Dialog.d.ts +18 -0
  15. package/dist/Dialog/DialogActions/DialogActions.d.ts +6 -0
  16. package/dist/Dialog/DialogTitle/DialogTitle.d.ts +6 -0
  17. package/dist/Form/Checkbox/Checkbox.d.ts +13 -0
  18. package/dist/Form/Fieldset/Fieldset.d.ts +13 -0
  19. package/dist/Form/Form.d.ts +5 -0
  20. package/dist/Form/FormControl/FormControl.d.ts +8 -0
  21. package/dist/Form/FormGroup/FormGroup.d.ts +18 -0
  22. package/dist/Form/FormHelperText/FormHelperText.d.ts +7 -0
  23. package/dist/Form/FormSelectorWrapper/FormSelectorWrapper.d.ts +18 -0
  24. package/dist/Form/Input/Input.d.ts +12 -0
  25. package/dist/Form/Label/Label.d.ts +6 -0
  26. package/dist/Form/Radio/Radio.d.ts +11 -0
  27. package/dist/Form/Select/Option.d.ts +12 -0
  28. package/dist/Form/Select/Select.d.ts +15 -0
  29. package/dist/Form/Textarea/Textarea.d.ts +7 -0
  30. package/dist/Form/Toggle/Toggle.d.ts +6 -0
  31. package/dist/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.d.ts +8 -0
  32. package/dist/Form/Wrapper/InputWrapper/InputWrapper.d.ts +17 -0
  33. package/dist/Form/Wrapper/RadioWrapper/RadioWrapper.d.ts +10 -0
  34. package/dist/Form/Wrapper/SelectWrapper/SelectWrapper.d.ts +12 -0
  35. package/dist/Form/Wrapper/TextareaWrapper/TextareaWrapper.d.ts +14 -0
  36. package/dist/Form/Wrapper/Wrapper/Wrapper.d.ts +28 -0
  37. package/dist/Form/form.interfaces.d.ts +12 -0
  38. package/dist/Icon/Icon.d.ts +75 -0
  39. package/dist/Link/Link.d.ts +15 -0
  40. package/dist/Modal/Modal.d.ts +1 -0
  41. package/dist/Modal/ModalActions/ModalActions.d.ts +1 -0
  42. package/dist/Modal/ModalContent/ModalContent.d.ts +1 -0
  43. package/dist/Modal/ModalHeader/ModalHeader.d.ts +1 -0
  44. package/dist/Popover/Popover.d.ts +11 -0
  45. package/dist/Snackbar/SnackbarContainer/SnackbarContainer.d.ts +12 -0
  46. package/dist/Snackbar/SnackbarItem/SnackbarItem.d.ts +13 -0
  47. package/dist/Snackbar/SnackbarProvider/SnackbarProvider.d.ts +18 -0
  48. package/dist/Snackbar/SnackbarProvider/SnackbarStateProvider.d.ts +14 -0
  49. package/dist/Snackbar/interfaces.d.ts +10 -0
  50. package/dist/Snackbar/useSnackbar.d.ts +1 -0
  51. package/dist/Tiles/Tile.d.ts +16 -0
  52. package/dist/Tiles/Tiles.d.ts +6 -0
  53. package/dist/Tooltip/Tooltip.d.ts +11 -0
  54. package/dist/Typography/Typography.d.ts +12 -0
  55. package/dist/Wizard/BaseWizardSteps/BaseWizardSteps.d.ts +13 -0
  56. package/dist/Wizard/Wizard.d.ts +12 -0
  57. package/dist/Wizard/WizardActions/WizardActions.d.ts +12 -0
  58. package/dist/Wizard/WizardStateProvider.d.ts +12 -0
  59. package/dist/Wizard/WizardSteps/WizardSteps.d.ts +5 -0
  60. package/dist/Wizard/wizardStateReducer.d.ts +26 -0
  61. package/dist/_BaseStyling_/BaseStyling.d.ts +47 -0
  62. package/dist/hooks/useAnimation.d.ts +6 -0
  63. package/dist/hooks/useBodyClick.d.ts +1 -0
  64. package/dist/hooks/useFormSelector.d.ts +13 -0
  65. package/dist/hooks/usePosition.d.ts +36 -0
  66. package/dist/hooks/useScroll.d.ts +2 -0
  67. package/dist/hooks/useSpacing.d.ts +18 -0
  68. package/dist/hooks/useWrapper.d.ts +11 -0
  69. package/dist/index.d.ts +43 -0
  70. package/dist/index.js +8 -0
  71. package/dist/interfaces.d.ts +13 -0
  72. package/dist/react-lib-components.cjs.development.js +3282 -0
  73. package/dist/react-lib-components.cjs.development.js.map +1 -0
  74. package/dist/react-lib-components.cjs.production.min.js +2 -0
  75. package/dist/react-lib-components.cjs.production.min.js.map +1 -0
  76. package/dist/react-lib-components.esm.js +3235 -0
  77. package/dist/react-lib-components.esm.js.map +1 -0
  78. package/dist/util/helper.d.ts +1 -0
  79. package/package.json +88 -0
  80. package/src/BaseModal/BaseModal.module.scss +58 -0
  81. package/src/BaseModal/BaseModal.test.tsx +59 -0
  82. package/src/BaseModal/BaseModal.tsx +113 -0
  83. package/src/BaseModal/BaseModalActions/BaseModalActions.module.scss +9 -0
  84. package/src/BaseModal/BaseModalActions/BaseModalActions.test.tsx +17 -0
  85. package/src/BaseModal/BaseModalActions/BaseModalActions.tsx +14 -0
  86. package/src/BaseModal/BaseModalContent/BaseModalContent.module.scss +6 -0
  87. package/src/BaseModal/BaseModalContent/BaseModalContent.test.tsx +29 -0
  88. package/src/BaseModal/BaseModalContent/BaseModalContent.tsx +35 -0
  89. package/src/BaseModal/BaseModalContext.ts +2 -0
  90. package/src/BaseModal/BaseModalHeader/BaseModalHeader.module.scss +17 -0
  91. package/src/BaseModal/BaseModalHeader/BaseModalHeader.test.tsx +30 -0
  92. package/src/BaseModal/BaseModalHeader/BaseModalHeader.tsx +28 -0
  93. package/src/Breadcrumbs/Breadcrumbs.module.scss +14 -0
  94. package/src/Breadcrumbs/Breadcrumbs.test.tsx +42 -0
  95. package/src/Breadcrumbs/Breadcrumbs.tsx +48 -0
  96. package/src/Button/BaseButton.module.scss +20 -0
  97. package/src/Button/BaseButton.test.tsx +59 -0
  98. package/src/Button/BaseButton.tsx +31 -0
  99. package/src/Button/Button.module.scss +336 -0
  100. package/src/Button/Button.test.tsx +76 -0
  101. package/src/Button/Button.tsx +44 -0
  102. package/src/Button/IconButton.module.scss +161 -0
  103. package/src/Button/IconButton.test.tsx +47 -0
  104. package/src/Button/IconButton.tsx +29 -0
  105. package/src/ContextMenu/ContextMenu.module.scss +20 -0
  106. package/src/ContextMenu/ContextMenu.test.tsx +93 -0
  107. package/src/ContextMenu/ContextMenu.tsx +91 -0
  108. package/src/ContextMenu/ContextMenuItem.module.scss +31 -0
  109. package/src/ContextMenu/ContextMenuItem.tsx +15 -0
  110. package/src/Dialog/Dialog.module.scss +16 -0
  111. package/src/Dialog/Dialog.test.tsx +79 -0
  112. package/src/Dialog/Dialog.tsx +96 -0
  113. package/src/Dialog/DialogActions/DialogActions.module.scss +11 -0
  114. package/src/Dialog/DialogActions/DialogActions.test.tsx +25 -0
  115. package/src/Dialog/DialogActions/DialogActions.tsx +21 -0
  116. package/src/Dialog/DialogTitle/DialogTitle.module.scss +7 -0
  117. package/src/Dialog/DialogTitle/DialogTitle.test.tsx +18 -0
  118. package/src/Dialog/DialogTitle/DialogTitle.tsx +18 -0
  119. package/src/Form/Checkbox/Checkbox.module.scss +65 -0
  120. package/src/Form/Checkbox/Checkbox.test.tsx +119 -0
  121. package/src/Form/Checkbox/Checkbox.tsx +145 -0
  122. package/src/Form/Fieldset/Fieldset.module.scss +19 -0
  123. package/src/Form/Fieldset/Fieldset.test.tsx +85 -0
  124. package/src/Form/Fieldset/Fieldset.tsx +55 -0
  125. package/src/Form/Form.module.scss +3 -0
  126. package/src/Form/Form.test.tsx +47 -0
  127. package/src/Form/Form.tsx +14 -0
  128. package/src/Form/FormControl/FormControl.module.scss +67 -0
  129. package/src/Form/FormControl/FormControl.test.tsx +56 -0
  130. package/src/Form/FormControl/FormControl.tsx +47 -0
  131. package/src/Form/FormGroup/FormGroup.module.scss +29 -0
  132. package/src/Form/FormGroup/FormGroup.test.tsx +61 -0
  133. package/src/Form/FormGroup/FormGroup.tsx +78 -0
  134. package/src/Form/FormHelperText/FormHelperText.module.scss +8 -0
  135. package/src/Form/FormHelperText/FormHelperText.test.tsx +42 -0
  136. package/src/Form/FormHelperText/FormHelperText.tsx +22 -0
  137. package/src/Form/FormSelectorWrapper/FormSelectorWrapper.module.scss +33 -0
  138. package/src/Form/FormSelectorWrapper/FormSelectorWrapper.tsx +65 -0
  139. package/src/Form/Input/Input.module.scss +65 -0
  140. package/src/Form/Input/Input.test.tsx +135 -0
  141. package/src/Form/Input/Input.tsx +72 -0
  142. package/src/Form/Label/Label.module.scss +5 -0
  143. package/src/Form/Label/Label.test.tsx +26 -0
  144. package/src/Form/Label/Label.tsx +19 -0
  145. package/src/Form/Radio/Radio.module.scss +100 -0
  146. package/src/Form/Radio/Radio.test.tsx +88 -0
  147. package/src/Form/Radio/Radio.tsx +98 -0
  148. package/src/Form/Select/Option.test.tsx +15 -0
  149. package/src/Form/Select/Option.tsx +57 -0
  150. package/src/Form/Select/Select.module.scss +189 -0
  151. package/src/Form/Select/Select.test.tsx +96 -0
  152. package/src/Form/Select/Select.tsx +217 -0
  153. package/src/Form/Textarea/Textarea.module.scss +53 -0
  154. package/src/Form/Textarea/Textarea.test.tsx +76 -0
  155. package/src/Form/Textarea/Textarea.tsx +33 -0
  156. package/src/Form/Toggle/Toggle.module.scss +58 -0
  157. package/src/Form/Toggle/Toggle.test.tsx +29 -0
  158. package/src/Form/Toggle/Toggle.tsx +20 -0
  159. package/src/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.module.scss +12 -0
  160. package/src/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.test.tsx +99 -0
  161. package/src/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.tsx +62 -0
  162. package/src/Form/Wrapper/InputWrapper/InputWrapper.module.scss +24 -0
  163. package/src/Form/Wrapper/InputWrapper/InputWrapper.test.tsx +93 -0
  164. package/src/Form/Wrapper/InputWrapper/InputWrapper.tsx +92 -0
  165. package/src/Form/Wrapper/RadioWrapper/RadioWrapper.module.scss +12 -0
  166. package/src/Form/Wrapper/RadioWrapper/RadioWrapper.test.tsx +101 -0
  167. package/src/Form/Wrapper/RadioWrapper/RadioWrapper.tsx +74 -0
  168. package/src/Form/Wrapper/SelectWrapper/SelectWrapper.module.scss +14 -0
  169. package/src/Form/Wrapper/SelectWrapper/SelectWrapper.test.tsx +101 -0
  170. package/src/Form/Wrapper/SelectWrapper/SelectWrapper.tsx +59 -0
  171. package/src/Form/Wrapper/TextareaWrapper/TextareaWrapper.module.scss +65 -0
  172. package/src/Form/Wrapper/TextareaWrapper/TextareaWrapper.test.tsx +125 -0
  173. package/src/Form/Wrapper/TextareaWrapper/TextareaWrapper.tsx +105 -0
  174. package/src/Form/Wrapper/Wrapper/Wrapper.module.scss +35 -0
  175. package/src/Form/Wrapper/Wrapper/Wrapper.test.tsx +17 -0
  176. package/src/Form/Wrapper/Wrapper/Wrapper.tsx +101 -0
  177. package/src/Form/form.interfaces.ts +14 -0
  178. package/src/Icon/Icon.module.scss +278 -0
  179. package/src/Icon/Icon.test.tsx +39 -0
  180. package/src/Icon/Icon.tsx +94 -0
  181. package/src/Link/Link.module.scss +46 -0
  182. package/src/Link/Link.test.tsx +122 -0
  183. package/src/Link/Link.tsx +80 -0
  184. package/src/Link/types.d.ts +9 -0
  185. package/src/Modal/Modal.test.tsx +16 -0
  186. package/src/Modal/Modal.tsx +1 -0
  187. package/src/Modal/ModalActions/ModalActions.tsx +4 -0
  188. package/src/Modal/ModalContent/ModalContent.tsx +4 -0
  189. package/src/Modal/ModalHeader/ModalHeader.tsx +4 -0
  190. package/src/Popover/Popover.module.scss +18 -0
  191. package/src/Popover/Popover.test.tsx +84 -0
  192. package/src/Popover/Popover.tsx +46 -0
  193. package/src/Snackbar/SnackbarContainer/SnackbarContainer.module.scss +35 -0
  194. package/src/Snackbar/SnackbarContainer/SnackbarContainer.test.tsx +37 -0
  195. package/src/Snackbar/SnackbarContainer/SnackbarContainer.tsx +28 -0
  196. package/src/Snackbar/SnackbarItem/SnackbarItem.module.scss +135 -0
  197. package/src/Snackbar/SnackbarItem/SnackbarItem.test.tsx +47 -0
  198. package/src/Snackbar/SnackbarItem/SnackbarItem.tsx +105 -0
  199. package/src/Snackbar/SnackbarProvider/SnackbarProvider.test.tsx +179 -0
  200. package/src/Snackbar/SnackbarProvider/SnackbarProvider.tsx +127 -0
  201. package/src/Snackbar/SnackbarProvider/SnackbarStateProvider.tsx +25 -0
  202. package/src/Snackbar/interfaces.ts +11 -0
  203. package/src/Snackbar/useSnackbar.ts +4 -0
  204. package/src/Tiles/Tile.module.scss +72 -0
  205. package/src/Tiles/Tile.test.tsx +129 -0
  206. package/src/Tiles/Tile.tsx +48 -0
  207. package/src/Tiles/Tiles.module.scss +11 -0
  208. package/src/Tiles/Tiles.test.tsx +118 -0
  209. package/src/Tiles/Tiles.tsx +48 -0
  210. package/src/Tooltip/Tooltip.module.scss +42 -0
  211. package/src/Tooltip/Tooltip.test.tsx +72 -0
  212. package/src/Tooltip/Tooltip.tsx +130 -0
  213. package/src/Typography/Typography.module.scss +46 -0
  214. package/src/Typography/Typography.test.tsx +114 -0
  215. package/src/Typography/Typography.tsx +84 -0
  216. package/src/Wizard/BaseWizardSteps/BaseWizardSteps.module.scss +192 -0
  217. package/src/Wizard/BaseWizardSteps/BaseWizardSteps.test.tsx +75 -0
  218. package/src/Wizard/BaseWizardSteps/BaseWizardSteps.tsx +86 -0
  219. package/src/Wizard/Wizard.test.tsx +198 -0
  220. package/src/Wizard/Wizard.tsx +49 -0
  221. package/src/Wizard/WizardActions/WizardActions.test.tsx +168 -0
  222. package/src/Wizard/WizardActions/WizardActions.tsx +100 -0
  223. package/src/Wizard/WizardStateProvider.tsx +26 -0
  224. package/src/Wizard/WizardSteps/WizardSteps.test.tsx +110 -0
  225. package/src/Wizard/WizardSteps/WizardSteps.tsx +30 -0
  226. package/src/Wizard/wizardStateReducer.ts +51 -0
  227. package/src/_BaseStyling_/BaseStyling.test.tsx +39 -0
  228. package/src/_BaseStyling_/BaseStyling.tsx +115 -0
  229. package/src/hooks/useAnimation.test.tsx +45 -0
  230. package/src/hooks/useAnimation.ts +20 -0
  231. package/src/hooks/useBodyClick.test.tsx +39 -0
  232. package/src/hooks/useBodyClick.ts +20 -0
  233. package/src/hooks/useFormSelector.test.ts +40 -0
  234. package/src/hooks/useFormSelector.ts +47 -0
  235. package/src/hooks/usePosition.test.tsx +494 -0
  236. package/src/hooks/usePosition.ts +347 -0
  237. package/src/hooks/useScroll.test.tsx +20 -0
  238. package/src/hooks/useScroll.ts +16 -0
  239. package/src/hooks/useSpacing.test.ts +70 -0
  240. package/src/hooks/useSpacing.ts +42 -0
  241. package/src/hooks/useWrapper.test.ts +49 -0
  242. package/src/hooks/useWrapper.ts +35 -0
  243. package/src/index.ts +52 -0
  244. package/src/interfaces.ts +15 -0
  245. package/src/readyclasses.module.scss +77 -0
  246. package/src/types.d.ts +4 -0
  247. package/src/util/helper.test.tsx +15 -0
  248. package/src/util/helper.tsx +80 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2022 Daniel
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,71 @@
1
+ # OneWelcome React Component Library
2
+
3
+ This project provides React components built according to the [UI Component Library design](https://xd.adobe.com/view/1f7161d7-5ade-4e54-bb3d-6e4aa3a1d1a0-4a22/grid/). It uses the [DTS tool](https://weiran-zsd.github.io/dts-cli/) which provides for a consistent setup and configuration.
4
+
5
+ > Note: the package is publicly available.
6
+
7
+ ## Commands
8
+
9
+ ### Component library
10
+
11
+ Run lib locally:
12
+
13
+ ```bash
14
+ npm start # or yarn start
15
+ ```
16
+
17
+ This builds to `/dist` and runs the project in watch mode so any edits you save inside `src` causes a rebuild to `/dist`.
18
+
19
+ To run tests, use `npm test` or `yarn test`.
20
+
21
+ ```bash
22
+ npm test # or yarn test
23
+ ```
24
+
25
+ ### Storybook
26
+
27
+ Run Storybook locally:
28
+
29
+ ```bash
30
+ npm run storybook # or yarn storybook
31
+ ```
32
+
33
+ ## Development
34
+ Please see the [CONTRIBUTING.md](https://github.com/onewelcome/react-lib-components/blob/master/CONTRIBUTING.md) file for information on how to develop for the Component Library.
35
+
36
+ ### Adding new icons
37
+
38
+ See [adding icons to font manual](font/README.md)
39
+
40
+ ## Configuration
41
+
42
+ Code quality is set up for you with `prettier`, `husky`, and `lint-staged`. Adjust the respective fields in `package.json` accordingly.
43
+
44
+ ### Bundle analysis
45
+
46
+ Calculates the real cost of your library using [size-limit](https://github.com/ai/size-limit) with `npm run size` and visulize it with `npm run analyze`.
47
+
48
+ ### Rollup
49
+
50
+ [DTS](https://weiran-zsd.github.io/dts-cli/) uses [Rollup](https://rollupjs.org) as a bundler and generates multiple rollup configs for various module formats and build settings. See [Optimizations](#optimizations) for details.
51
+
52
+ ### TypeScript
53
+
54
+ `tsconfig.json` is set up to interpret `dom` and `esnext` types, as well as `react` for `jsx`. Adjust according to your needs.
55
+
56
+ ## Release
57
+
58
+ The publishing process is fired by git tag creation. CircleCI builds a package and publishes it to the public npmjs.com registry.
59
+ Release notes should be provided via GitHub UI.
60
+ After a successful release, the release notes are published on `#releases` slack channel.
61
+
62
+ ### Creating release
63
+
64
+ Follow these steps to create a release:
65
+
66
+ - note all changes introduced from the last release
67
+ - create a release on the GitHub repository page:
68
+ - determine new version (bugfix/minor/major)
69
+ - put proper release notes based on previous releases
70
+ - click on the `CREATE RELEASE` button
71
+ - check if the release is published on `https://www.npmjs.com/package/@onewelcome/react-lib-components`
@@ -0,0 +1,16 @@
1
+ import React, { HTMLAttributes } from 'react';
2
+ export interface Props extends HTMLAttributes<HTMLDivElement> {
3
+ id: string;
4
+ children: React.ReactNode;
5
+ open: boolean;
6
+ onClose?: (event?: React.MouseEvent<HTMLElement>) => unknown;
7
+ className?: string;
8
+ containerClassName?: string;
9
+ labelledby?: string;
10
+ describedby?: string;
11
+ disableEscapeKeyDown?: boolean;
12
+ disableBackdrop?: boolean;
13
+ zIndex?: number;
14
+ }
15
+ export declare const useSetBodyScroll: (open: boolean) => void;
16
+ export declare const BaseModal: ({ id, children, open, onClose, className, containerClassName, labelledby, describedby, disableEscapeKeyDown, disableBackdrop, zIndex, ...restProps }: Props) => JSX.Element;
@@ -0,0 +1,5 @@
1
+ import React, { HTMLAttributes } from 'react';
2
+ export interface Props extends HTMLAttributes<HTMLElement> {
3
+ children?: React.ReactNode;
4
+ }
5
+ export declare const BaseModalActions: ({ children, className, ...restProps }: Props) => JSX.Element;
@@ -0,0 +1,8 @@
1
+ import React, { HTMLAttributes } from 'react';
2
+ export interface Props extends HTMLAttributes<HTMLDivElement> {
3
+ id?: string;
4
+ children: React.ReactNode;
5
+ className?: string;
6
+ disableAutoFocus?: boolean;
7
+ }
8
+ export declare const BaseModalContent: ({ id, children, className, disableAutoFocus, ...restProps }: Props) => JSX.Element;
@@ -0,0 +1,2 @@
1
+ export declare const labelId: (id: string) => string;
2
+ export declare const descriptionId: (id: string) => string;
@@ -0,0 +1,8 @@
1
+ import React, { HTMLAttributes } from 'react';
2
+ export interface Props extends HTMLAttributes<HTMLElement> {
3
+ id: string;
4
+ title: string;
5
+ children?: React.ReactNode;
6
+ onClose: (event: React.MouseEvent<HTMLButtonElement>) => void;
7
+ }
8
+ export declare const BaseModalHeader: ({ id, title, children, onClose, ...restProps }: Props) => JSX.Element;
@@ -0,0 +1,9 @@
1
+ import { HTMLProps, ReactElement } from 'react';
2
+ import { Link, Props as LinkProps } from '../Link/Link';
3
+ declare type ChildrenType = ReactElement<LinkProps, typeof Link>;
4
+ export interface Props extends HTMLProps<HTMLElement> {
5
+ children: ChildrenType | ChildrenType[];
6
+ 'aria-label': string;
7
+ }
8
+ export declare const Breadcrumbs: ({ children, "aria-label": ariaLabel, className, ...rest }: Props) => JSX.Element;
9
+ export {};
@@ -0,0 +1,8 @@
1
+ import React, { RefObject } from 'react';
2
+ export interface Props extends Omit<React.HTMLProps<HTMLButtonElement>, 'ref'> {
3
+ type?: 'submit' | 'button' | 'reset';
4
+ disabled?: boolean;
5
+ ref?: RefObject<HTMLButtonElement>;
6
+ color?: 'primary' | 'secondary' | 'tertiary' | 'default';
7
+ }
8
+ export declare const BaseButton: React.ForwardRefExoticComponent<Pick<Props, "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "async" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "cite" | "classID" | "cols" | "colSpan" | "content" | "controls" | "coords" | "crossOrigin" | "data" | "dateTime" | "default" | "defer" | "disabled" | "download" | "encType" | "form" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "height" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "label" | "list" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "method" | "min" | "minLength" | "multiple" | "muted" | "name" | "nonce" | "noValidate" | "open" | "optimum" | "pattern" | "placeholder" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "size" | "sizes" | "span" | "src" | "srcDoc" | "srcLang" | "srcSet" | "start" | "step" | "summary" | "target" | "type" | "useMap" | "value" | "width" | "wmode" | "wrap" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key"> & React.RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1,10 @@
1
+ import React, { RefObject } from 'react';
2
+ import { Props as BaseButtonProps } from './BaseButton';
3
+ export interface Props extends Omit<BaseButtonProps, 'ref'> {
4
+ startIcon?: React.ReactNode | false;
5
+ endIcon?: React.ReactNode | false;
6
+ children?: React.ReactNode;
7
+ variant?: 'text' | 'fill' | 'outline';
8
+ ref?: RefObject<HTMLButtonElement>;
9
+ }
10
+ export declare const Button: React.ForwardRefExoticComponent<Pick<Props, "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "async" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "cite" | "classID" | "cols" | "colSpan" | "content" | "controls" | "coords" | "crossOrigin" | "data" | "dateTime" | "default" | "defer" | "disabled" | "download" | "encType" | "form" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "height" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "label" | "list" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "method" | "min" | "minLength" | "multiple" | "muted" | "name" | "nonce" | "noValidate" | "open" | "optimum" | "pattern" | "placeholder" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "size" | "sizes" | "span" | "src" | "srcDoc" | "srcLang" | "srcSet" | "start" | "step" | "summary" | "target" | "type" | "useMap" | "value" | "width" | "wmode" | "wrap" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "startIcon" | "endIcon" | "variant"> & React.RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1,10 @@
1
+ import React, { RefObject } from 'react';
2
+ import { Props as BaseButtonProps } from './BaseButton';
3
+ export interface Props extends Omit<BaseButtonProps, 'ref'> {
4
+ children?: React.ReactNode;
5
+ iconSize?: 's' | 'm' | 'l';
6
+ className?: string;
7
+ title: string;
8
+ ref?: RefObject<HTMLButtonElement>;
9
+ }
10
+ export declare const IconButton: React.ForwardRefExoticComponent<Pick<Props, "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "async" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "cite" | "classID" | "cols" | "colSpan" | "content" | "controls" | "coords" | "crossOrigin" | "data" | "dateTime" | "default" | "defer" | "disabled" | "download" | "encType" | "form" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "height" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "label" | "list" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "method" | "min" | "minLength" | "multiple" | "muted" | "name" | "nonce" | "noValidate" | "open" | "optimum" | "pattern" | "placeholder" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "size" | "sizes" | "span" | "src" | "srcDoc" | "srcLang" | "srcSet" | "start" | "step" | "summary" | "target" | "type" | "useMap" | "value" | "width" | "wmode" | "wrap" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "iconSize"> & React.RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1,18 @@
1
+ import { HTMLProps, ReactElement } from 'react';
2
+ import { Props as ButtonProps } from '../Button/Button';
3
+ import { Props as IconButtonProps } from '../Button/IconButton';
4
+ import { Placement, Offset } from '../hooks/usePosition';
5
+ import { Props as ContextMenuItemProps } from './ContextMenuItem';
6
+ export interface Props extends HTMLProps<HTMLDivElement> {
7
+ trigger: ReactElement<ButtonProps> | ReactElement<IconButtonProps>;
8
+ children: ReactElement<ContextMenuItemProps> | ReactElement<ContextMenuItemProps>[];
9
+ placement?: Placement;
10
+ transformOrigin?: Placement;
11
+ offset?: Offset;
12
+ id: string;
13
+ show?: boolean;
14
+ domRoot?: HTMLElement;
15
+ onShow?: () => void;
16
+ onClose?: () => void;
17
+ }
18
+ export declare const ContextMenu: ({ trigger, children, id, show, onShow, onClose, placement, offset, transformOrigin, domRoot, ...rest }: Props) => JSX.Element;
@@ -0,0 +1,6 @@
1
+ import React, { HTMLProps } from 'react';
2
+ export interface Props extends Omit<HTMLProps<HTMLLIElement>, 'onClick'> {
3
+ children?: string;
4
+ onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
5
+ }
6
+ export declare const ContextMenuItem: ({ children, onClick, ...rest }: Props) => JSX.Element;
@@ -0,0 +1,18 @@
1
+ import React, { HTMLAttributes } from 'react';
2
+ import { Props as ButtonProps } from '../Button/Button';
3
+ export interface Props extends HTMLAttributes<HTMLDivElement> {
4
+ id: string;
5
+ open: boolean;
6
+ children: React.ReactNode;
7
+ alignActions: 'left' | 'right';
8
+ onClose: () => void;
9
+ title: string;
10
+ primaryAction: Action;
11
+ secondaryAction?: Action;
12
+ zIndex?: number;
13
+ }
14
+ export interface Action extends Omit<ButtonProps, 'variant' | 'ref'> {
15
+ label: string;
16
+ onClick: (event?: React.MouseEvent<HTMLButtonElement>) => unknown;
17
+ }
18
+ export declare const Dialog: ({ id, open, children, alignActions, onClose, title, primaryAction, secondaryAction, zIndex, ...restProps }: Props) => JSX.Element;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import { Props as BaseModalActionsProps } from '../../BaseModal/BaseModalActions/BaseModalActions';
3
+ export interface Props extends BaseModalActionsProps {
4
+ align: 'left' | 'right';
5
+ }
6
+ export declare const DialogActions: ({ children, align, ...restProps }: Props) => JSX.Element;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ export interface Props {
3
+ id: string;
4
+ title: string;
5
+ }
6
+ export declare const DialogTitle: ({ id, title }: Props) => JSX.Element;
@@ -0,0 +1,13 @@
1
+ import React, { ReactNode } from 'react';
2
+ import { Props as FormHelperTextProps } from '../FormHelperText/FormHelperText';
3
+ import { FormSelector } from '../form.interfaces';
4
+ import { HTMLProps } from '../../interfaces';
5
+ export interface CheckboxProps extends FormSelector<HTMLInputElement> {
6
+ children: ReactNode;
7
+ label?: string;
8
+ indeterminate?: boolean;
9
+ helperProps?: FormHelperTextProps;
10
+ wrapperProps?: HTMLProps<HTMLDivElement>;
11
+ onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
12
+ }
13
+ export declare const Checkbox: ({ children, name, helperText, helperProps, indeterminate, parentErrorId, errorMessage, disabled, label, parentHelperId, className, error, checked, wrapperProps, onChange, ...rest }: CheckboxProps) => JSX.Element;
@@ -0,0 +1,13 @@
1
+ import { ReactElement } from 'react';
2
+ import { HTMLProps } from '../../interfaces';
3
+ import { Variant } from '../../Typography/Typography';
4
+ export interface Props extends HTMLProps<HTMLFieldSetElement> {
5
+ children?: ReactElement | ReactElement[];
6
+ title: string;
7
+ titleVariant?: Variant;
8
+ hideTitle?: boolean;
9
+ background?: string;
10
+ noPadding?: boolean;
11
+ noBackground?: boolean;
12
+ }
13
+ export declare const Fieldset: ({ children, className, title, titleVariant, hideTitle, noBackground, background, noPadding, disabled, ...rest }: Props) => JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { HTMLProps, ReactNode } from 'react';
2
+ export interface Props extends HTMLProps<HTMLFormElement> {
3
+ children?: ReactNode;
4
+ }
5
+ export declare const Form: ({ children, className, ...rest }: Props) => JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { ReactElement } from 'react';
2
+ import { HTMLProps } from '../../interfaces';
3
+ export interface Props extends HTMLProps<HTMLDivElement> {
4
+ children: ReactElement | ReactElement[];
5
+ grid?: 1 | 2 | 3;
6
+ align?: 'top' | 'start' | 'middle' | 'center' | 'bottom' | 'end' | 'stretch';
7
+ }
8
+ export declare const FormControl: ({ children, disabled, className, grid, align, ...rest }: Props) => JSX.Element;
@@ -0,0 +1,18 @@
1
+ /** The empty className property on FormHelperText is on purpose! We want to basically "filter" out the className from helperProps because we're adding this to the surrounding div. This makes it so also the errormessage receives this styling. */
2
+ import { ReactChild } from 'react';
3
+ import { Props as HelperProps } from '../FormHelperText/FormHelperText';
4
+ import { Icons } from '../../Icon/Icon';
5
+ import { HTMLProps } from '../../interfaces';
6
+ export interface Props extends HTMLProps<HTMLDivElement> {
7
+ children: ReactChild[] | ReactChild;
8
+ error?: boolean;
9
+ errorMessageIcon?: Icons;
10
+ errorMessageIconPosition?: 'before' | 'after';
11
+ errorMessage?: string;
12
+ errorId?: string;
13
+ helperIndent?: number;
14
+ helperText?: string;
15
+ helperId?: string;
16
+ helperProps?: HelperProps;
17
+ }
18
+ export declare const FormGroup: ({ children, className, error, errorMessage, errorId, errorMessageIcon, errorMessageIconPosition, helperText, helperId, helperProps, helperIndent, ...rest }: Props) => JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { ReactNode } from 'react';
2
+ import { HTMLProps } from '../../interfaces';
3
+ export interface Props extends HTMLProps<HTMLDivElement> {
4
+ children?: ReactNode;
5
+ error?: boolean;
6
+ }
7
+ export declare const FormHelperText: ({ children, error, className, ...rest }: Props) => JSX.Element;
@@ -0,0 +1,18 @@
1
+ import { ReactNode } from 'react';
2
+ import { HTMLProps } from '../../interfaces';
3
+ import { Props as FormHelperTextProps } from '../FormHelperText/FormHelperText';
4
+ export interface Props extends HTMLProps<HTMLDivElement> {
5
+ children?: ReactNode;
6
+ nestedChildren?: ReactNode;
7
+ containerProps: HTMLProps<HTMLDivElement>;
8
+ helperProps?: FormHelperTextProps;
9
+ error?: boolean;
10
+ disabled?: boolean;
11
+ helperText?: string;
12
+ errorMessage?: string;
13
+ parentHelperId?: string;
14
+ parentErrorId?: string;
15
+ errorId: string;
16
+ identifier: string;
17
+ }
18
+ export declare const FormSelectorWrapper: ({ children, className, nestedChildren, containerProps, helperProps, error, disabled, helperText, errorMessage, parentErrorId, errorId, identifier, ...rest }: Props) => JSX.Element;
@@ -0,0 +1,12 @@
1
+ /// <reference types="react" />
2
+ import { HTMLProps } from '../../interfaces';
3
+ declare const dateTypes: readonly ["date", "time", "datetime-local"];
4
+ export declare type Type = 'text' | 'email' | 'file' | 'number' | 'password' | 'search' | 'tel' | 'url' | 'hidden' | typeof dateTypes[number];
5
+ export interface Props extends HTMLProps<HTMLInputElement> {
6
+ wrapperProps?: HTMLProps<HTMLInputElement>;
7
+ labeledBy?: string;
8
+ type: Type;
9
+ error?: boolean;
10
+ }
11
+ export declare const Input: ({ error, className, name, style, wrapperProps, type, labeledBy, ...rest }: Props) => JSX.Element;
12
+ export {};
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import { HTMLProps } from '../../interfaces';
3
+ export interface Props extends HTMLProps<HTMLLabelElement> {
4
+ children?: string;
5
+ }
6
+ export declare const Label: ({ children, className, hidden, ...rest }: Props) => JSX.Element;
@@ -0,0 +1,11 @@
1
+ /// <reference types="react" />
2
+ import { Props as HelperProps } from '../FormHelperText/FormHelperText';
3
+ import { FormSelector } from '../form.interfaces';
4
+ import { HTMLProps } from '../../interfaces';
5
+ export interface Props extends FormSelector<HTMLInputElement> {
6
+ children: string;
7
+ value: string;
8
+ wrapperProps?: HTMLProps<HTMLDivElement>;
9
+ helperProps?: HelperProps;
10
+ }
11
+ export declare const Radio: ({ children, disabled, className, value, name, helperText, parentErrorId, parentHelperId, error, errorMessage, checked, wrapperProps, helperProps, onChange, ...rest }: Props) => JSX.Element;
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import { HTMLProps } from '../../interfaces';
3
+ export interface Props extends HTMLProps<HTMLLIElement> {
4
+ children: string;
5
+ value: string;
6
+ disabled?: boolean;
7
+ selected?: boolean;
8
+ label?: string;
9
+ filter?: string;
10
+ onOptionSelect?: (event: React.SyntheticEvent<HTMLLIElement>) => void;
11
+ }
12
+ export declare const Option: ({ children, className, selected, onOptionSelect, disabled, filter, ...rest }: Props) => JSX.Element | null;
@@ -0,0 +1,15 @@
1
+ import React, { ReactElement } from 'react';
2
+ import { FormElement } from '../form.interfaces';
3
+ export interface Props extends FormElement<HTMLSelectElement> {
4
+ children: ReactElement[];
5
+ name?: string;
6
+ labeledBy?: string;
7
+ describedBy?: string;
8
+ placeholder?: string;
9
+ searchPlaceholder?: string;
10
+ className?: string;
11
+ value?: string;
12
+ onChange?: (event: React.ChangeEvent<HTMLSelectElement>, child?: ReactElement) => void;
13
+ onClear?: (event: React.MouseEvent<HTMLDivElement>) => void;
14
+ }
15
+ export declare const Select: ({ children, name, disabled, labeledBy, placeholder, describedBy, searchPlaceholder, className, error, value, onChange, onClear, ...rest }: Props) => JSX.Element;
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ import { FormElement } from '../form.interfaces';
3
+ export interface Props extends FormElement<HTMLTextAreaElement> {
4
+ wrapperClassName?: string;
5
+ errorClassName?: string;
6
+ }
7
+ export declare const Textarea: ({ error, disabled, className, rows, wrapperClassName, errorClassName, ...rest }: Props) => JSX.Element;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import { CheckboxProps } from '../Checkbox/Checkbox';
3
+ export interface Props extends Omit<CheckboxProps, 'indeterminate' | 'errorMessage' | 'error' | 'children'> {
4
+ children: string;
5
+ }
6
+ export declare const Toggle: ({ children, checked, ...rest }: Props) => JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { ReactElement } from 'react';
2
+ import { WrapperProps } from '../Wrapper/Wrapper';
3
+ import { Props as FieldsetProps } from '../../../Form/Fieldset/Fieldset';
4
+ export interface Props extends WrapperProps {
5
+ children: ReactElement[] | ReactElement;
6
+ fieldsetProps: FieldsetProps;
7
+ }
8
+ export declare const CheckboxWrapper: ({ children, error, helperText, helperProps, fieldsetProps, ...rest }: Props) => JSX.Element;
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ import { Type, Props as InputProps } from '../../Input/Input';
3
+ import { WrapperProps } from '../Wrapper/Wrapper';
4
+ interface OptionalInputProps extends Omit<InputProps, 'type'> {
5
+ }
6
+ export interface Props extends WrapperProps {
7
+ label: string;
8
+ type: Type;
9
+ name: string;
10
+ inputProps?: OptionalInputProps;
11
+ value: string;
12
+ onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
13
+ onBlur?: (event: React.FocusEvent<HTMLInputElement>) => void;
14
+ onFocus?: (event: React.FocusEvent<HTMLInputElement>) => void;
15
+ }
16
+ export declare const InputWrapper: ({ type, name, inputProps, helperText, helperProps, value, error, onChange, onBlur, onFocus, ...rest }: Props) => JSX.Element;
17
+ export {};
@@ -0,0 +1,10 @@
1
+ import React, { ReactElement } from 'react';
2
+ import { WrapperProps } from '../Wrapper/Wrapper';
3
+ import { Props as FieldsetProps } from '../../../Form/Fieldset/Fieldset';
4
+ export interface Props extends WrapperProps {
5
+ children: ReactElement | ReactElement[];
6
+ fieldsetProps: FieldsetProps;
7
+ value: string;
8
+ onChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
9
+ }
10
+ export declare const RadioWrapper: ({ children, error, name, helperText, helperProps, fieldsetProps, value, onChange, disabled, ...rest }: Props) => JSX.Element;
@@ -0,0 +1,12 @@
1
+ import React, { ReactChild } from 'react';
2
+ import { WrapperProps } from '../Wrapper/Wrapper';
3
+ import { Props as SelectProps } from '../../Select/Select';
4
+ export interface Props extends Omit<WrapperProps, 'onChange'> {
5
+ children: ReactChild | ReactChild[];
6
+ placeholder?: string;
7
+ value: string;
8
+ selectProps?: SelectProps;
9
+ onChange?: (event: React.ChangeEvent<HTMLSelectElement>) => void;
10
+ onClear?: () => void;
11
+ }
12
+ export declare const SelectWrapper: ({ children, error, value, placeholder, selectProps, helperProps, onChange, onClear, ...rest }: Props) => JSX.Element;
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ import { WrapperProps } from '../Wrapper/Wrapper';
3
+ import { Props as TextareaProps } from '../../Textarea/Textarea';
4
+ export interface Props extends Omit<WrapperProps, 'onFocus' | 'onChange' | 'onBlur' | 'onMouseEnter' | 'onMouseLeave'> {
5
+ placeholder?: string;
6
+ textareaProps?: TextareaProps;
7
+ value: string;
8
+ onFocus?: (event: React.FocusEvent<HTMLTextAreaElement>) => void;
9
+ onChange?: (event: React.ChangeEvent<HTMLTextAreaElement>) => void;
10
+ onBlur?: (event: React.FocusEvent<HTMLTextAreaElement>) => void;
11
+ onMouseEnter?: (event: React.MouseEvent<HTMLTextAreaElement>) => void;
12
+ onMouseLeave?: (event: React.MouseEvent<HTMLTextAreaElement>) => void;
13
+ }
14
+ export declare const TextareaWrapper: ({ name, error, value, label, placeholder, textareaProps, helperProps, onChange, onFocus, onBlur, onMouseEnter, onMouseLeave, disabled, ...rest }: Props) => JSX.Element;
@@ -0,0 +1,28 @@
1
+ import { ReactElement } from 'react';
2
+ import { Props as FormGroupProps } from '../../FormGroup/FormGroup';
3
+ import { Props as LabelProps } from '../../Label/Label';
4
+ import { Props as HelperProps } from '../../FormHelperText/FormHelperText';
5
+ import { HTMLProps } from '../../../interfaces';
6
+ export interface Props extends Omit<FormGroupProps, 'children'> {
7
+ children: ReactElement | ReactElement[];
8
+ floatingLabelActive?: boolean;
9
+ floatingLabel?: boolean;
10
+ helperIndent?: number;
11
+ label?: string;
12
+ labelProps?: LabelProps;
13
+ name: string;
14
+ /** This does NOT add validation! It simply adds an asterix on the Label! */
15
+ required?: boolean;
16
+ innerClassName?: string;
17
+ }
18
+ /** For components that extend this component we create an interface (InputWrapper, SelectWrapper, etc.) */
19
+ export interface WrapperProps extends HTMLProps<HTMLDivElement> {
20
+ errorMessage?: string;
21
+ error: boolean;
22
+ helperText?: string;
23
+ helperProps?: HelperProps;
24
+ label?: string;
25
+ name: string;
26
+ required?: boolean;
27
+ }
28
+ export declare const Wrapper: ({ children, className, error, errorMessage, errorId, errorMessageIcon, errorMessageIconPosition, helperText, helperId, floatingLabel, floatingLabelActive, required, helperProps, helperIndent, labelProps, label, disabled, name, innerClassName, ...rest }: Props) => JSX.Element;
@@ -0,0 +1,12 @@
1
+ import { HTMLProps } from '../interfaces';
2
+ /** Radios */
3
+ export interface FormSelector<T> extends FormElement<T> {
4
+ helperText?: string;
5
+ errorMessage?: string;
6
+ parentHelperId?: string;
7
+ parentErrorId?: string;
8
+ }
9
+ /** Default form elements */
10
+ export interface FormElement<T> extends HTMLProps<T> {
11
+ error?: boolean;
12
+ }