@touchtech/baselayer-ui 5.3.2-alpha.4 → 5.4.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/README.md +75 -75
  2. package/dist/components/Button/Button.d.ts +24 -25
  3. package/dist/components/Button/__tests__/Button.test.d.ts +1 -1
  4. package/dist/components/Button/index.d.ts +1 -1
  5. package/dist/components/ButtonBadge/ButtonBadge.d.ts +7 -7
  6. package/dist/components/ButtonBadge/__tests__/ButtonBadge.test.d.ts +1 -1
  7. package/dist/components/ButtonBadge/index.d.ts +1 -1
  8. package/dist/components/ButtonLink/ButtonLink.d.ts +23 -23
  9. package/dist/components/ButtonLink/__tests__/ButtonLink.test.d.ts +1 -1
  10. package/dist/components/ButtonLink/index.d.ts +1 -1
  11. package/dist/components/Checkbox/Checkbox.d.ts +16 -16
  12. package/dist/components/Checkbox/__tests__/Checkbox.test.d.ts +1 -1
  13. package/dist/components/Checkbox/index.d.ts +1 -1
  14. package/dist/components/ColorPicker/ColorPicker.d.ts +12 -12
  15. package/dist/components/ColorPicker/__tests__/ColorPicker.test.d.ts +1 -1
  16. package/dist/components/ColorPicker/index.d.ts +1 -1
  17. package/dist/components/ColorSwatch/ColorSwatch.d.ts +11 -11
  18. package/dist/components/ColorSwatch/__tests__/ColorSwatch.test.d.ts +1 -1
  19. package/dist/components/ColorSwatch/index.d.ts +1 -1
  20. package/dist/components/ConfirmationModal/ConfirmationModal.d.ts +19 -19
  21. package/dist/components/ConfirmationModal/__tests__/ConfirmationModal.test.d.ts +1 -1
  22. package/dist/components/ConfirmationModal/index.d.ts +1 -1
  23. package/dist/components/Dropdown/Clickable.d.ts +6 -6
  24. package/dist/components/Dropdown/Dropdown.d.ts +24 -23
  25. package/dist/components/Dropdown/Dropdown.test.d.ts +1 -1
  26. package/dist/components/Dropdown/index.d.ts +2 -2
  27. package/dist/components/EditableText/EditableText.d.ts +11 -0
  28. package/dist/components/{Numpad/Numpad.test.d.ts → EditableText/__tests__/EditableText.test.d.ts} +1 -1
  29. package/dist/components/EditableText/index.d.ts +1 -0
  30. package/dist/components/FileInput/FileInput.d.ts +22 -22
  31. package/dist/components/FileInput/__tests__/FileInput.test.d.ts +1 -1
  32. package/dist/components/FileInput/index.d.ts +2 -2
  33. package/dist/components/FloatingPanel/FloatingPanel.d.ts +14 -14
  34. package/dist/components/FloatingPanel/__tests__/FloatingPanel.test.d.ts +1 -1
  35. package/dist/components/FloatingPanel/index.d.ts +1 -1
  36. package/dist/components/Icon/Icon.d.ts +10 -10
  37. package/dist/components/Icon/__tests__/Icon.test.d.ts +1 -1
  38. package/dist/components/Icon/index.d.ts +1 -1
  39. package/dist/components/IconButton/IconButton.d.ts +21 -21
  40. package/dist/components/IconButton/__tests__/IconButton.test.d.ts +1 -1
  41. package/dist/components/IconButton/index.d.ts +1 -1
  42. package/dist/components/IconButtonLink/IconButtonLink.d.ts +21 -21
  43. package/dist/components/IconButtonLink/__tests__/IconButtonLink.test.d.ts +1 -1
  44. package/dist/components/IconButtonLink/index.d.ts +1 -1
  45. package/dist/components/Image/Image.d.ts +14 -14
  46. package/dist/components/Image/__tests__/Image.test.d.ts +1 -1
  47. package/dist/components/Image/index.d.ts +1 -1
  48. package/dist/components/Label/Label.d.ts +9 -9
  49. package/dist/components/Label/__tests/Label.test.d.ts +1 -1
  50. package/dist/components/Label/index.d.ts +1 -1
  51. package/dist/components/ListView/ListView.d.ts +10 -10
  52. package/dist/components/ListView/ListViewItem.d.ts +14 -14
  53. package/dist/components/ListView/ListViewLinkItem.d.ts +13 -13
  54. package/dist/components/ListView/__tests__/ListView.test.d.ts +1 -1
  55. package/dist/components/ListView/index.d.ts +3 -3
  56. package/dist/components/Menu/Menu.d.ts +11 -11
  57. package/dist/components/Menu/MenuContainer.d.ts +13 -13
  58. package/dist/components/Menu/MenuItem.d.ts +10 -10
  59. package/dist/components/Menu/MenuLinkItem.d.ts +9 -9
  60. package/dist/components/Menu/__tests__/Menu.test.d.ts +1 -1
  61. package/dist/components/Menu/__tests__/MenuLinkItem.test.d.ts +1 -1
  62. package/dist/components/Menu/index.d.ts +4 -4
  63. package/dist/components/Modal/Modal.d.ts +14 -14
  64. package/dist/components/Modal/__tests__/Modal.test.d.ts +1 -1
  65. package/dist/components/Modal/index.d.ts +1 -1
  66. package/dist/components/Overlay/Overlay.d.ts +10 -10
  67. package/dist/components/Overlay/__tests__/Overlay.test.d.ts +1 -1
  68. package/dist/components/Overlay/index.d.ts +1 -1
  69. package/dist/components/TextInput/TextInput.d.ts +18 -18
  70. package/dist/components/TextInput/__tests__/TextInput.test.d.ts +1 -1
  71. package/dist/components/TextInput/index.d.ts +1 -1
  72. package/dist/components/Toast/Toast.d.ts +8 -8
  73. package/dist/components/Toast/ToastContainer.d.ts +7 -7
  74. package/dist/components/Toast/__tests__/Toast.test.d.ts +1 -1
  75. package/dist/components/Toast/__tests__/ToastContainer.test.d.ts +1 -1
  76. package/dist/components/Toast/index.d.ts +2 -2
  77. package/dist/components/Video/Video.d.ts +23 -23
  78. package/dist/components/Video/__tests__/Video.test.d.ts +1 -1
  79. package/dist/components/Video/index.d.ts +1 -1
  80. package/dist/hooks/__tests__/useToggle.test.d.ts +1 -1
  81. package/dist/hooks/index.d.ts +2 -2
  82. package/dist/hooks/useOutsideClick.d.ts +4 -4
  83. package/dist/hooks/useToggle.d.ts +1 -1
  84. package/dist/index.d.ts +22 -23
  85. package/dist/index.js +25 -10
  86. package/dist/styles.css +1384 -1435
  87. package/dist/types/index.d.ts +7 -7
  88. package/package.json +100 -100
  89. package/dist/components/Numpad/Numpad.d.ts +0 -7
  90. package/dist/components/Numpad/Numpad.stories.d.ts +0 -5
  91. package/dist/components/Numpad/index.d.ts +0 -1
package/README.md CHANGED
@@ -1,75 +1,75 @@
1
- # Baselayer UI - React Component Library
2
-
3
- https://baselayer-ui.touchtech.com
4
-
5
- ## Development
6
-
7
- Run `npm install` to install the project dependencies. Since this library is used by multiple Digital Showroom projects it's important that we create
8
- a global [link](https://docs.npmjs.com/cli/link) so we can use this local copy in the other projects during development. Run `npm link` to do so.
9
-
10
- Run `npm start` to open our [Storybook](https://storybook.js.org).
11
-
12
- ### Testing
13
-
14
- We test our components using [Jest](http://jestjs.io) and [React Testing Library](https://github.com/testing-library/react-testing-library). Tests are placed in the `__tests__` directory in the same directory as the component.
15
-
16
- ```
17
- src/
18
- ├── Button
19
- │ ├── Button.js
20
- │ ├── Button.module.css
21
- │ ├── Button.stories.js
22
- │ ├── __tests__
23
- │ │ └── Button.test.js
24
- │ └── index.js
25
- └── index.js
26
-
27
- 2 directories, 6 files
28
- ```
29
-
30
- You can execute `npm run test` or `npm test` as a shorthand to run all tests. Running `npm test` every time you change a file gets old pretty fast. Thankfully we can mitigate that by entering watch mode.
31
-
32
- - `npm test -- --watch`
33
-
34
- ### Linting & Formatting
35
-
36
- We lint our code using [ESlint](https://eslint.org). For your convinience there are a few [npm scripts](https://docs.npmjs.com/misc/scripts) available.
37
-
38
- - `npm run lint` - Run the linter over the entire codebase and report problems.
39
- - `npm run lint-fix` - Run the linter over the entire codebase and automatically fix problems.
40
-
41
- [ESlint](https://eslint.org) also have editor integrations, see [editors](https://eslint.org/docs/user-guide/integrations#editors) for instructions on how to set up your editor.
42
-
43
- We format our code using [Prettier](https://prettier.io). For your convinience there are a few [npm scripts](https://docs.npmjs.com/misc/scripts) available.
44
-
45
- - `npm run format` - Run the formatter over the entire codebase and report any formatting issues.
46
- - `npm run format-fix` - Run the formatter over the entire codebase and automatically format the code.
47
-
48
- [Prettier](https://prettier.io) also have editor integrations, see [editors](https://prettier.io/docs/en/editors.html) for instructions on how to setup your editor.
49
-
50
- Since linting and formatting is such a common task, you can execute `npm run check` to check for both linting problems and formatting issues simultaneously. Execute `npm run fix` to automatically fix both.
51
-
52
- ### CSS
53
-
54
- Each component can have a related CSS file. The CSS file should end with the extension `.module.css` and is treated as a [CSS Module](https://github.com/css-modules/css-modules). Whenever a `.module.css` file is imported, its definitions
55
- are only available locally to the component importing it. When referencing class names from a CSS Module use camelCase. E.g., `.button-small` becomes `buttonSmall`.
56
-
57
- **Example**
58
-
59
- ```css
60
- /* Button.module.css */
61
- .button-small {
62
- }
63
- ```
64
-
65
- ```javascript
66
- // Button.js
67
- import React from "react";
68
- import styles from "./Button.module.css";
69
-
70
- function Button({ children }) {
71
- return <button className={styles.buttonSmall}>{children}</button>;
72
- }
73
-
74
- export default Button;
75
- ```
1
+ # Baselayer UI - React Component Library
2
+
3
+ https://baselayer-ui.touchtech.com
4
+
5
+ ## Development
6
+
7
+ Run `npm install` to install the project dependencies. Since this library is used by multiple Digital Showroom projects it's important that we create
8
+ a global [link](https://docs.npmjs.com/cli/link) so we can use this local copy in the other projects during development. Run `npm link` to do so.
9
+
10
+ Run `npm start` to open our [Storybook](https://storybook.js.org).
11
+
12
+ ### Testing
13
+
14
+ We test our components using [Jest](http://jestjs.io) and [React Testing Library](https://github.com/testing-library/react-testing-library). Tests are placed in the `__tests__` directory in the same directory as the component.
15
+
16
+ ```
17
+ src/
18
+ ├── Button
19
+ │ ├── Button.js
20
+ │ ├── Button.module.css
21
+ │ ├── Button.stories.js
22
+ │ ├── __tests__
23
+ │ │ └── Button.test.js
24
+ │ └── index.js
25
+ └── index.js
26
+
27
+ 2 directories, 6 files
28
+ ```
29
+
30
+ You can execute `npm run test` or `npm test` as a shorthand to run all tests. Running `npm test` every time you change a file gets old pretty fast. Thankfully we can mitigate that by entering watch mode.
31
+
32
+ - `npm test -- --watch`
33
+
34
+ ### Linting & Formatting
35
+
36
+ We lint our code using [ESlint](https://eslint.org). For your convinience there are a few [npm scripts](https://docs.npmjs.com/misc/scripts) available.
37
+
38
+ - `npm run lint` - Run the linter over the entire codebase and report problems.
39
+ - `npm run lint-fix` - Run the linter over the entire codebase and automatically fix problems.
40
+
41
+ [ESlint](https://eslint.org) also have editor integrations, see [editors](https://eslint.org/docs/user-guide/integrations#editors) for instructions on how to set up your editor.
42
+
43
+ We format our code using [Prettier](https://prettier.io). For your convinience there are a few [npm scripts](https://docs.npmjs.com/misc/scripts) available.
44
+
45
+ - `npm run format` - Run the formatter over the entire codebase and report any formatting issues.
46
+ - `npm run format-fix` - Run the formatter over the entire codebase and automatically format the code.
47
+
48
+ [Prettier](https://prettier.io) also have editor integrations, see [editors](https://prettier.io/docs/en/editors.html) for instructions on how to setup your editor.
49
+
50
+ Since linting and formatting is such a common task, you can execute `npm run check` to check for both linting problems and formatting issues simultaneously. Execute `npm run fix` to automatically fix both.
51
+
52
+ ### CSS
53
+
54
+ Each component can have a related CSS file. The CSS file should end with the extension `.module.css` and is treated as a [CSS Module](https://github.com/css-modules/css-modules). Whenever a `.module.css` file is imported, its definitions
55
+ are only available locally to the component importing it. When referencing class names from a CSS Module use camelCase. E.g., `.button-small` becomes `buttonSmall`.
56
+
57
+ **Example**
58
+
59
+ ```css
60
+ /* Button.module.css */
61
+ .button-small {
62
+ }
63
+ ```
64
+
65
+ ```javascript
66
+ // Button.js
67
+ import React from "react";
68
+ import styles from "./Button.module.css";
69
+
70
+ function Button({ children }) {
71
+ return <button className={styles.buttonSmall}>{children}</button>;
72
+ }
73
+
74
+ export default Button;
75
+ ```
@@ -1,25 +1,24 @@
1
- import React, { ReactNode, RefObject } from "react";
2
- import { Size } from "../../types";
3
- declare type ButtonProps = {
4
- children: ReactNode;
5
- className?: string;
6
- containerRef?: RefObject<HTMLButtonElement>;
7
- disabled?: boolean;
8
- inverted?: boolean;
9
- rounded?: boolean;
10
- noShadow?: boolean;
11
- noPadding?: boolean;
12
- noBorder?: boolean;
13
- transparent?: boolean;
14
- stretchHorizontally?: boolean;
15
- stretchVertically?: boolean;
16
- autoFocus?: boolean;
17
- onClick?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
18
- onPointerDown?: (event: React.PointerEvent<HTMLButtonElement>) => void;
19
- size?: Size;
20
- type?: "submit" | "reset" | "button";
21
- align?: "left" | "center";
22
- offsetSides?: Array<"left" | "right">;
23
- };
24
- declare function Button({ children, className, onClick, onPointerDown, containerRef, disabled, inverted, rounded, noShadow, noPadding, noBorder, transparent, stretchHorizontally, stretchVertically, autoFocus, offsetSides, align, size, type, }: ButtonProps): JSX.Element;
25
- export default Button;
1
+ import { ReactNode, RefObject, SyntheticEvent } from "react";
2
+ import { Size } from "../../types";
3
+ declare type ButtonProps = {
4
+ children: ReactNode;
5
+ className?: string;
6
+ containerRef?: RefObject<HTMLButtonElement>;
7
+ disabled?: boolean;
8
+ inverted?: boolean;
9
+ rounded?: boolean;
10
+ noShadow?: boolean;
11
+ noPadding?: boolean;
12
+ noBorder?: boolean;
13
+ transparent?: boolean;
14
+ stretchHorizontally?: boolean;
15
+ stretchVertically?: boolean;
16
+ autoFocus?: boolean;
17
+ onClick?: (event?: SyntheticEvent<HTMLButtonElement>) => void;
18
+ size?: Size;
19
+ type?: "submit" | "reset" | "button";
20
+ align?: "left" | "center";
21
+ offsetSides?: Array<"left" | "right">;
22
+ };
23
+ declare function Button({ children, className, onClick, containerRef, disabled, inverted, rounded, noShadow, noPadding, noBorder, transparent, stretchHorizontally, stretchVertically, autoFocus, offsetSides, align, size, type, }: ButtonProps): JSX.Element;
24
+ export default Button;
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -1 +1 @@
1
- export { default as Button } from "./Button";
1
+ export { default as Button } from "./Button";
@@ -1,7 +1,7 @@
1
- import { ReactNode } from "react";
2
- declare type ButtonBadgeProps = {
3
- children: ReactNode;
4
- className?: string;
5
- };
6
- declare function ButtonBadge({ children, className }: ButtonBadgeProps): JSX.Element;
7
- export default ButtonBadge;
1
+ import { ReactNode } from "react";
2
+ declare type ButtonBadgeProps = {
3
+ children: ReactNode;
4
+ className?: string;
5
+ };
6
+ declare function ButtonBadge({ children, className }: ButtonBadgeProps): JSX.Element;
7
+ export default ButtonBadge;
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -1 +1 @@
1
- export { default as ButtonBadge } from "./ButtonBadge";
1
+ export { default as ButtonBadge } from "./ButtonBadge";
@@ -1,23 +1,23 @@
1
- import { ReactNode, ElementType, RefObject } from "react";
2
- import { Size } from "../../types";
3
- declare type OffsetSide = "left" | "right";
4
- declare type ButtonLinkProps = {
5
- as?: ElementType;
6
- children: ReactNode;
7
- className?: string;
8
- containerRef?: RefObject<HTMLElement>;
9
- inverted?: boolean;
10
- rounded?: boolean;
11
- transparent?: boolean;
12
- noShadow?: boolean;
13
- noPadding?: boolean;
14
- noBorder?: boolean;
15
- stretchHorizontally?: boolean;
16
- stretchVertically?: boolean;
17
- size?: Size;
18
- disabled?: boolean;
19
- offsetSides?: Array<OffsetSide>;
20
- align?: "left" | "center";
21
- } | any;
22
- declare function ButtonLink({ as: Component, children, className, size, containerRef, inverted, rounded, transparent, noShadow, noPadding, noBorder, stretchHorizontally, stretchVertically, disabled, offsetSides, align, ...props }: ButtonLinkProps): JSX.Element;
23
- export default ButtonLink;
1
+ import { ReactNode, ElementType, RefObject } from "react";
2
+ import { Size } from "../../types";
3
+ declare type OffsetSide = "left" | "right";
4
+ declare type ButtonLinkProps = {
5
+ as?: ElementType;
6
+ children: ReactNode;
7
+ className?: string;
8
+ containerRef?: RefObject<HTMLElement>;
9
+ inverted?: boolean;
10
+ rounded?: boolean;
11
+ transparent?: boolean;
12
+ noShadow?: boolean;
13
+ noPadding?: boolean;
14
+ noBorder?: boolean;
15
+ stretchHorizontally?: boolean;
16
+ stretchVertically?: boolean;
17
+ size?: Size;
18
+ disabled?: boolean;
19
+ offsetSides?: Array<OffsetSide>;
20
+ align?: "left" | "center";
21
+ } | any;
22
+ declare function ButtonLink({ as: Component, children, className, size, containerRef, inverted, rounded, transparent, noShadow, noPadding, noBorder, stretchHorizontally, stretchVertically, disabled, offsetSides, align, ...props }: ButtonLinkProps): JSX.Element;
23
+ export default ButtonLink;
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -1 +1 @@
1
- export { default as ButtonLink } from "./ButtonLink";
1
+ export { default as ButtonLink } from "./ButtonLink";
@@ -1,16 +1,16 @@
1
- /// <reference types="react" />
2
- import { Size } from "../../types";
3
- declare type CheckboxProps = {
4
- label?: string;
5
- onChange: (value: boolean) => void;
6
- placeholder?: string;
7
- checked?: boolean;
8
- disabled?: boolean;
9
- name?: string;
10
- size?: Size;
11
- autoFocus?: boolean;
12
- indeterminate?: boolean;
13
- className?: string;
14
- };
15
- declare function Checkbox({ label, onChange, placeholder, checked, disabled, name, className, indeterminate, size, autoFocus, }: CheckboxProps): JSX.Element;
16
- export default Checkbox;
1
+ /// <reference types="react" />
2
+ import { Size } from "../../types";
3
+ declare type CheckboxProps = {
4
+ label?: string;
5
+ onChange: (value: boolean) => void;
6
+ placeholder?: string;
7
+ checked?: boolean;
8
+ disabled?: boolean;
9
+ name?: string;
10
+ size?: Size;
11
+ autoFocus?: boolean;
12
+ indeterminate?: boolean;
13
+ className?: string;
14
+ };
15
+ declare function Checkbox({ label, onChange, placeholder, checked, disabled, name, className, indeterminate, size, autoFocus, }: CheckboxProps): JSX.Element;
16
+ export default Checkbox;
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -1 +1 @@
1
- export { default as Checkbox } from "./Checkbox";
1
+ export { default as Checkbox } from "./Checkbox";
@@ -1,12 +1,12 @@
1
- import { RefObject } from "react";
2
- import { Color } from "../../types";
3
- declare type ColorPickerProps = {
4
- colors: Color[];
5
- containerRef?: RefObject<HTMLDivElement>;
6
- direction?: "horizontal" | "vertical";
7
- onSelect: (color: Color) => void;
8
- selectedColor?: Color;
9
- canToggle?: boolean;
10
- };
11
- declare function ColorPicker({ colors, containerRef, onSelect, selectedColor, direction, canToggle, }: ColorPickerProps): JSX.Element;
12
- export default ColorPicker;
1
+ import { RefObject } from "react";
2
+ import { Color } from "../../types";
3
+ declare type ColorPickerProps = {
4
+ colors: Color[];
5
+ containerRef?: RefObject<HTMLDivElement>;
6
+ direction?: "horizontal" | "vertical";
7
+ onSelect: (color: Color) => void;
8
+ selectedColor?: Color;
9
+ canToggle?: boolean;
10
+ };
11
+ declare function ColorPicker({ colors, containerRef, onSelect, selectedColor, direction, canToggle, }: ColorPickerProps): JSX.Element;
12
+ export default ColorPicker;
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -1 +1 @@
1
- export { default as ColorPicker } from "./ColorPicker";
1
+ export { default as ColorPicker } from "./ColorPicker";
@@ -1,11 +1,11 @@
1
- import { RefObject } from "react";
2
- import { Color, Size } from "../../types";
3
- declare type ColorSwatchProps = {
4
- color: Color;
5
- containerRef?: RefObject<HTMLButtonElement>;
6
- isSelected?: boolean;
7
- size?: Size;
8
- onClick?: () => void;
9
- };
10
- declare function ColorSwatch({ color, containerRef, isSelected, size, onClick, }: ColorSwatchProps): JSX.Element;
11
- export default ColorSwatch;
1
+ import { RefObject } from "react";
2
+ import { Color, Size } from "../../types";
3
+ declare type ColorSwatchProps = {
4
+ color: Color;
5
+ containerRef?: RefObject<HTMLButtonElement>;
6
+ isSelected?: boolean;
7
+ size?: Size;
8
+ onClick?: () => void;
9
+ };
10
+ declare function ColorSwatch({ color, containerRef, isSelected, size, onClick, }: ColorSwatchProps): JSX.Element;
11
+ export default ColorSwatch;
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -1 +1 @@
1
- export { default as ColorSwatch } from "./ColorSwatch";
1
+ export { default as ColorSwatch } from "./ColorSwatch";
@@ -1,19 +1,19 @@
1
- import { ReactElement, ReactNode, RefObject } from "react";
2
- declare type ConfirmationModalProps = {
3
- buttonsLeft?: ReactElement[];
4
- buttonsRight?: ReactElement[];
5
- children?: ReactNode;
6
- containerRef?: RefObject<HTMLDivElement>;
7
- header?: string;
8
- isOpen: boolean;
9
- noPadding?: boolean;
10
- noOverlay?: boolean;
11
- noShadow?: boolean;
12
- onClose?: () => void;
13
- baseZIndex?: number;
14
- };
15
- declare function ConfirmationModal({ children, containerRef, header, isOpen, buttonsLeft, buttonsRight, onClose, noPadding, noOverlay, noShadow, baseZIndex, }: ConfirmationModalProps): JSX.Element;
16
- declare namespace ConfirmationModal {
17
- var displayName: string;
18
- }
19
- export default ConfirmationModal;
1
+ import { ReactElement, ReactNode, RefObject } from "react";
2
+ declare type ConfirmationModalProps = {
3
+ buttonsLeft?: ReactElement[];
4
+ buttonsRight?: ReactElement[];
5
+ children?: ReactNode;
6
+ containerRef?: RefObject<HTMLDivElement>;
7
+ header: string;
8
+ isOpen: boolean;
9
+ noPadding?: boolean;
10
+ noOverlay?: boolean;
11
+ noShadow?: boolean;
12
+ onClose?: () => void;
13
+ baseZIndex?: number;
14
+ };
15
+ declare function ConfirmationModal({ children, containerRef, header, isOpen, buttonsLeft, buttonsRight, onClose, noPadding, noOverlay, noShadow, baseZIndex, }: ConfirmationModalProps): JSX.Element;
16
+ declare namespace ConfirmationModal {
17
+ var displayName: string;
18
+ }
19
+ export default ConfirmationModal;
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -1 +1 @@
1
- export { default as ConfirmationModal } from "./ConfirmationModal";
1
+ export { default as ConfirmationModal } from "./ConfirmationModal";
@@ -1,6 +1,6 @@
1
- /// <reference types="react" />
2
- import { Item, RenderDisplayProps } from "./Dropdown";
3
- export declare type ClickableProps<T extends Item> = Omit<RenderDisplayProps<T>, "selectedItem" | "toggleIsOpen"> & {
4
- onClick: RenderDisplayProps<T>["toggleIsOpen"];
5
- };
6
- export declare function Clickable<T extends Item>({ display, isDisabled, onClick: handleClick, }: ClickableProps<T>): JSX.Element;
1
+ /// <reference types="react" />
2
+ import { Item, RenderDisplayProps } from "./Dropdown";
3
+ export declare type ClickableProps<T extends Item> = Omit<RenderDisplayProps<T>, "toggleIsOpen"> & {
4
+ onClick: () => void;
5
+ };
6
+ export declare function Clickable<T extends Item>({ display, isDisabled, onClick: handleClick, selectedItem, }: ClickableProps<T>): JSX.Element;
@@ -1,23 +1,24 @@
1
- import { ReactChild, ReactElement } from "react";
2
- export declare type Item = {
3
- id: number | string;
4
- name: string;
5
- };
6
- export declare type RenderDisplayProps<T extends Item> = Pick<DropdownProps<T>, "display" | "selectedItem"> & {
7
- isDisabled: boolean;
8
- toggleIsOpen: () => void;
9
- };
10
- export declare type RenderClickableFn<T extends Item> = (props: RenderDisplayProps<T>) => ReactElement;
11
- export declare type ItemBodyRendererFn<T extends Item> = (state: {
12
- item: T;
13
- isSelected: boolean;
14
- }) => ReactChild;
15
- export interface DropdownProps<T extends Item> {
16
- itemBodyRenderer?: ItemBodyRendererFn<T>;
17
- items: T[];
18
- onSelect: (item: T) => void;
19
- display: ReactChild;
20
- renderClickable?: RenderClickableFn<T>;
21
- selectedItem: T | null;
22
- }
23
- export declare function Dropdown<T extends Item>({ itemBodyRenderer, items, onSelect: handleSelect, display, renderClickable, selectedItem, }: DropdownProps<T>): JSX.Element;
1
+ import { ReactChild, ReactElement } from "react";
2
+ export declare type Item = {
3
+ id: number | string;
4
+ name: string;
5
+ };
6
+ export declare type RenderDisplayProps<T extends Item> = Pick<DropdownProps<T>, "display" | "selectedItem"> & {
7
+ isDisabled: boolean;
8
+ toggleIsOpen: () => void;
9
+ };
10
+ export declare type RenderClickableFn<T extends Item> = (props: RenderDisplayProps<T>) => ReactElement;
11
+ export declare type ItemBodyRendererFn<T extends Item> = (state: {
12
+ item: T;
13
+ isSelected: boolean;
14
+ }) => ReactChild;
15
+ export interface DropdownProps<T extends Item> {
16
+ itemBodyRenderer?: ItemBodyRendererFn<T>;
17
+ items: T[];
18
+ onSelect: (item: T) => void;
19
+ display: ReactChild;
20
+ renderClickable?: RenderClickableFn<T>;
21
+ selectedItem: T | null;
22
+ }
23
+ export declare function Dropdown<T extends Item>({ itemBodyRenderer, items, onSelect: handleSelect, display, renderClickable, selectedItem, }: DropdownProps<T>): JSX.Element;
24
+ export default Dropdown;
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -1,2 +1,2 @@
1
- export { Dropdown, DropdownProps, Item as DropdownItem, ItemBodyRendererFn as DropdownItemBodyRendererFn, RenderClickableFn as DropdownRenderClickableFn, RenderDisplayProps as DropdownRenderDisplayProps, } from "./Dropdown";
2
- export { Clickable as DropdownClickable, ClickableProps as DropdownClickableProps } from "./Clickable";
1
+ export { Dropdown, DropdownProps, Item as DropdownItem, ItemBodyRendererFn as DropdownItemBodyRendererFn, RenderClickableFn as DropdownRenderClickableFn, RenderDisplayProps as DropdownRenderDisplayProps, } from "./Dropdown";
2
+ export { Clickable as DropdownClickable, ClickableProps as DropdownClickableProps } from "./Clickable";
@@ -0,0 +1,11 @@
1
+ import React, { ElementType, FocusEvent } from "react";
2
+ declare type Props = {
3
+ as?: ElementType;
4
+ onBlur(updatedText: string): void;
5
+ onClick?(event: FocusEvent<HTMLElement>): void;
6
+ text: string;
7
+ className?: string;
8
+ canEdit: boolean;
9
+ };
10
+ declare const EditableText: React.ForwardRefExoticComponent<Props & React.RefAttributes<any>>;
11
+ export default EditableText;
@@ -0,0 +1 @@
1
+ export { default as EditableText } from "./EditableText";
@@ -1,22 +1,22 @@
1
- import React, { ChangeEvent } from "react";
2
- import { Size } from "../../types";
3
- export declare type FileInputSize = Size;
4
- declare type Props = {
5
- onChange: (e: ChangeEvent<HTMLInputElement>) => void;
6
- children: React.ReactNode;
7
- accept?: string;
8
- multiple?: boolean;
9
- disabled?: boolean;
10
- inputRef?: React.RefObject<HTMLInputElement>;
11
- inverted?: boolean;
12
- noShadow?: boolean;
13
- noBorder?: boolean;
14
- noPadding?: boolean;
15
- transparent?: boolean;
16
- stretchHorizontally?: boolean;
17
- stretchVertically?: boolean;
18
- rounded?: boolean;
19
- size?: FileInputSize;
20
- };
21
- declare function FileInput({ children, accept, onChange, inputRef, multiple, disabled, inverted, noShadow, noBorder, noPadding, transparent, stretchHorizontally, stretchVertically, rounded, size, }: Props): JSX.Element;
22
- export default FileInput;
1
+ import React, { ChangeEvent } from "react";
2
+ import { Size } from "../../types";
3
+ export declare type FileInputSize = Size;
4
+ declare type Props = {
5
+ onChange: (e: ChangeEvent<HTMLInputElement>) => void;
6
+ children: React.ReactNode;
7
+ accept?: string;
8
+ multiple?: boolean;
9
+ disabled?: boolean;
10
+ inputRef?: React.RefObject<HTMLInputElement>;
11
+ inverted?: boolean;
12
+ noShadow?: boolean;
13
+ noBorder?: boolean;
14
+ noPadding?: boolean;
15
+ transparent?: boolean;
16
+ stretchHorizontally?: boolean;
17
+ stretchVertically?: boolean;
18
+ rounded?: boolean;
19
+ size?: FileInputSize;
20
+ };
21
+ declare function FileInput({ children, accept, onChange, inputRef, multiple, disabled, inverted, noShadow, noBorder, noPadding, transparent, stretchHorizontally, stretchVertically, rounded, size, }: Props): JSX.Element;
22
+ export default FileInput;
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -1,2 +1,2 @@
1
- export { default as FileInput } from "./FileInput";
2
- export { FileInputSize } from "./FileInput";
1
+ export { default as FileInput } from "./FileInput";
2
+ export { FileInputSize } from "./FileInput";
@@ -1,14 +1,14 @@
1
- import { ReactNode, RefObject } from "react";
2
- declare type Placement = {
3
- horizontal: "right" | "rightEdge" | "rightOnEdge" | "left" | "leftEdge" | "leftOnEdge" | "leftOnEdge" | "center";
4
- vertical: "top" | "topEdge" | "topOnEdge" | "bottom" | "bottomEdge" | "bottomOnEdge" | "center";
5
- parent: "viewport" | "container";
6
- };
7
- declare type FloatingPanelProps = {
8
- children: ReactNode;
9
- containerRef?: RefObject<HTMLDivElement>;
10
- layout?: "column" | "row";
11
- placement?: Placement;
12
- };
13
- declare function FloatingPanel({ children, containerRef, layout, placement, }: FloatingPanelProps): JSX.Element;
14
- export default FloatingPanel;
1
+ import { ReactNode, RefObject } from "react";
2
+ declare type Placement = {
3
+ horizontal: "right" | "rightEdge" | "rightOnEdge" | "left" | "leftEdge" | "leftOnEdge" | "leftOnEdge" | "center";
4
+ vertical: "top" | "topEdge" | "topOnEdge" | "bottom" | "bottomEdge" | "bottomOnEdge" | "center";
5
+ parent: "viewport" | "container";
6
+ };
7
+ declare type FloatingPanelProps = {
8
+ children: ReactNode;
9
+ containerRef?: RefObject<HTMLDivElement>;
10
+ layout?: "column" | "row";
11
+ placement?: Placement;
12
+ };
13
+ declare function FloatingPanel({ children, containerRef, layout, placement, }: FloatingPanelProps): JSX.Element;
14
+ export default FloatingPanel;
@@ -1 +1 @@
1
- export {};
1
+ export {};