@onewelcome/react-lib-components 8.3.0 → 8.5.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 (184) hide show
  1. package/dist/cjs/Button/BaseButton.cjs.js +1 -1
  2. package/dist/cjs/Button/BaseButton.cjs.js.map +1 -1
  3. package/dist/cjs/Button/Spinner.cjs.js +1 -1
  4. package/dist/cjs/Button/Spinner.cjs.js.map +1 -1
  5. package/dist/cjs/DataGrid/DataGridBody/DataGridCell/DataGridCell.module.scss.cjs.js +1 -1
  6. package/dist/cjs/DataGrid/DataGridBody/DataGridRow/DataGridRow.module.scss.cjs.js +1 -1
  7. package/dist/cjs/DataGrid/DataGridFilters/DataGridFilters.interfaces.cjs.js.map +1 -1
  8. package/dist/cjs/DataGrid/DataGridFilters/DataGridSearchbar.cjs.js.map +1 -1
  9. package/dist/cjs/DataGrid/DataGridFilters/FilterKeyMapper.cjs.js +2 -0
  10. package/dist/cjs/DataGrid/DataGridFilters/FilterKeyMapper.cjs.js.map +1 -0
  11. package/dist/cjs/DataGrid/DataGridHeader/DataGridHeader.module.scss.cjs.js +1 -1
  12. package/dist/cjs/Form/FileUpload/FileItem/FileItem.cjs.js +1 -1
  13. package/dist/cjs/Form/FileUpload/FileItem/FileItem.cjs.js.map +1 -1
  14. package/dist/cjs/Form/FileUpload/FileItem/FileItem.module.scss.cjs.js +1 -1
  15. package/dist/cjs/Form/FileUpload/FileUpload.cjs.js +1 -1
  16. package/dist/cjs/Form/FileUpload/FileUpload.cjs.js.map +1 -1
  17. package/dist/cjs/Form/FileUpload/FileUpload.module.scss.cjs.js +1 -1
  18. package/dist/cjs/Icon/Icon.cjs.js +1 -1
  19. package/dist/cjs/Icon/Icon.cjs.js.map +1 -1
  20. package/dist/cjs/Icon/Icon.module.scss.cjs.js +1 -1
  21. package/dist/cjs/Notifications/BaseModal/BaseModal.cjs.js +1 -1
  22. package/dist/cjs/Notifications/BaseModal/BaseModal.cjs.js.map +1 -1
  23. package/dist/cjs/Notifications/BaseModal/BaseModalHeader/BaseModalHeader.cjs.js +1 -1
  24. package/dist/cjs/Notifications/BaseModal/BaseModalHeader/BaseModalHeader.cjs.js.map +1 -1
  25. package/dist/cjs/Notifications/SideSheet/SideSheet.cjs.js +2 -0
  26. package/dist/cjs/Notifications/SideSheet/SideSheet.cjs.js.map +1 -0
  27. package/dist/cjs/Notifications/SideSheet/SideSheet.module.scss.cjs.js +2 -0
  28. package/dist/cjs/Notifications/SideSheet/SideSheet.module.scss.cjs.js.map +1 -0
  29. package/dist/cjs/Notifications/SideSheet/SideSheetContent/SideSheetContent.cjs.js +2 -0
  30. package/dist/cjs/Notifications/SideSheet/SideSheetContent/SideSheetContent.cjs.js.map +1 -0
  31. package/dist/cjs/Notifications/SideSheet/SideSheetContent/SideSheetContent.module.scss.cjs.js +2 -0
  32. package/dist/cjs/Notifications/SideSheet/SideSheetContent/SideSheetContent.module.scss.cjs.js.map +1 -0
  33. package/dist/cjs/Notifications/SideSheet/SideSheetHeader/SideSheetHeader.cjs.js +2 -0
  34. package/dist/cjs/Notifications/SideSheet/SideSheetHeader/SideSheetHeader.cjs.js.map +1 -0
  35. package/dist/cjs/Notifications/SideSheet/SideSheetHeader/SideSheetHeader.module.scss.cjs.js +2 -0
  36. package/dist/cjs/Notifications/SideSheet/SideSheetHeader/SideSheetHeader.module.scss.cjs.js.map +1 -0
  37. package/dist/cjs/Notifications/SlideInModal/SlideInModal.cjs.js.map +1 -1
  38. package/dist/cjs/Spinner/Spinner.cjs.js +2 -0
  39. package/dist/cjs/Spinner/Spinner.cjs.js.map +1 -0
  40. package/dist/cjs/Spinner/Spinner.module.scss.cjs.js +2 -0
  41. package/dist/cjs/Spinner/Spinner.module.scss.cjs.js.map +1 -0
  42. package/dist/cjs/_BaseStyling_/BaseStyling.cjs.js +1 -1
  43. package/dist/cjs/_BaseStyling_/BaseStyling.cjs.js.map +1 -1
  44. package/dist/cjs/src/components/Button/Spinner.d.ts +1 -1
  45. package/dist/cjs/src/components/DataGrid/DataGridFilters/DataGridFilters.interfaces.d.ts +4 -0
  46. package/dist/cjs/src/components/DataGrid/DataGridFilters/DataGridSearchbar.d.ts +1 -1
  47. package/dist/cjs/src/components/DataGrid/DataGridFilters/FilterKeyMapper.d.ts +14 -0
  48. package/dist/cjs/src/components/DataGrid/DataGridFilters/FilterKeyMapper.test.d.ts +1 -0
  49. package/dist/cjs/src/components/DataGrid/testUtils.d.ts +3 -1
  50. package/dist/cjs/src/components/Form/Select/MultiSelect/MultiSelect.test.d.ts +1 -2
  51. package/dist/cjs/src/components/Form/Select/SingleSelect/Select.test.d.ts +1 -2
  52. package/dist/cjs/src/components/Icon/Icon.d.ts +4 -1
  53. package/dist/cjs/src/components/Notifications/BaseModal/BaseModal.d.ts +1 -0
  54. package/dist/cjs/src/components/Notifications/BaseModal/BaseModalHeader/BaseModalHeader.d.ts +1 -0
  55. package/dist/cjs/src/components/Notifications/SideSheet/SideSheet.d.ts +10 -0
  56. package/dist/cjs/src/components/Notifications/SideSheet/SideSheet.test.d.ts +1 -0
  57. package/dist/cjs/src/components/Notifications/SideSheet/SideSheetActions/SideSheetActions.d.ts +2 -0
  58. package/dist/cjs/src/components/Notifications/SideSheet/SideSheetContent/SideSheetContent.d.ts +4 -0
  59. package/dist/cjs/src/components/Notifications/SideSheet/SideSheetHeader/SideSheetHeader.d.ts +4 -0
  60. package/dist/cjs/src/components/Spinner/Spinner.d.ts +6 -0
  61. package/dist/cjs/src/components/Spinner/Spinner.test.d.ts +1 -0
  62. package/dist/cjs/src/components/Typography/Typography.d.ts +1 -1
  63. package/dist/cjs/src/components/_BaseStyling_/BaseStyling.d.ts +2 -0
  64. package/dist/cjs/src/hooks/useUploadFile.cjs.js +2 -0
  65. package/dist/cjs/src/hooks/useUploadFile.cjs.js.map +1 -0
  66. package/dist/cjs/src/hooks/useUploadFile.d.ts +10 -4
  67. package/dist/cjs/src/index.cjs.js +1 -1
  68. package/dist/cjs/src/index.d.ts +19 -2
  69. package/dist/cjs/src/util/helper.cjs.js +1 -1
  70. package/dist/cjs/src/util/helper.cjs.js.map +1 -1
  71. package/dist/cjs/src/util/helper.d.ts +0 -3
  72. package/dist/esm/Button/BaseButton.esm.js +2 -2
  73. package/dist/esm/Button/BaseButton.esm.js.map +1 -1
  74. package/dist/esm/Button/Spinner.esm.js +2 -2
  75. package/dist/esm/Button/Spinner.esm.js.map +1 -1
  76. package/dist/esm/DataGrid/DataGridBody/DataGridCell/DataGridCell.module.scss.esm.js +1 -1
  77. package/dist/esm/DataGrid/DataGridBody/DataGridRow/DataGridRow.module.scss.esm.js +1 -1
  78. package/dist/esm/DataGrid/DataGridFilters/DataGridFilters.interfaces.esm.js.map +1 -1
  79. package/dist/esm/DataGrid/DataGridFilters/DataGridSearchbar.esm.js.map +1 -1
  80. package/dist/esm/DataGrid/DataGridFilters/FilterKeyMapper.esm.js +46 -0
  81. package/dist/esm/DataGrid/DataGridFilters/FilterKeyMapper.esm.js.map +1 -0
  82. package/dist/esm/DataGrid/DataGridHeader/DataGridHeader.module.scss.esm.js +2 -2
  83. package/dist/esm/Form/FileUpload/FileItem/FileItem.esm.js +4 -3
  84. package/dist/esm/Form/FileUpload/FileItem/FileItem.esm.js.map +1 -1
  85. package/dist/esm/Form/FileUpload/FileItem/FileItem.module.scss.esm.js +1 -1
  86. package/dist/esm/Form/FileUpload/FileUpload.esm.js +8 -7
  87. package/dist/esm/Form/FileUpload/FileUpload.esm.js.map +1 -1
  88. package/dist/esm/Form/FileUpload/FileUpload.module.scss.esm.js +2 -2
  89. package/dist/esm/Icon/Icon.esm.js +3 -0
  90. package/dist/esm/Icon/Icon.esm.js.map +1 -1
  91. package/dist/esm/Icon/Icon.module.scss.esm.js +2 -2
  92. package/dist/esm/Notifications/BaseModal/BaseModal.esm.js +2 -2
  93. package/dist/esm/Notifications/BaseModal/BaseModal.esm.js.map +1 -1
  94. package/dist/esm/Notifications/BaseModal/BaseModalHeader/BaseModalHeader.esm.js +4 -3
  95. package/dist/esm/Notifications/BaseModal/BaseModalHeader/BaseModalHeader.esm.js.map +1 -1
  96. package/dist/esm/Notifications/SideSheet/SideSheet.esm.js +59 -0
  97. package/dist/esm/Notifications/SideSheet/SideSheet.esm.js.map +1 -0
  98. package/dist/esm/Notifications/SideSheet/SideSheet.module.scss.esm.js +8 -0
  99. package/dist/esm/Notifications/SideSheet/SideSheet.module.scss.esm.js.map +1 -0
  100. package/dist/esm/Notifications/SideSheet/SideSheetContent/SideSheetContent.esm.js +23 -0
  101. package/dist/esm/Notifications/SideSheet/SideSheetContent/SideSheetContent.esm.js.map +1 -0
  102. package/dist/esm/Notifications/SideSheet/SideSheetContent/SideSheetContent.module.scss.esm.js +8 -0
  103. package/dist/esm/Notifications/SideSheet/SideSheetContent/SideSheetContent.module.scss.esm.js.map +1 -0
  104. package/dist/esm/Notifications/SideSheet/SideSheetHeader/SideSheetHeader.esm.js +23 -0
  105. package/dist/esm/Notifications/SideSheet/SideSheetHeader/SideSheetHeader.esm.js.map +1 -0
  106. package/dist/esm/Notifications/SideSheet/SideSheetHeader/SideSheetHeader.module.scss.esm.js +8 -0
  107. package/dist/esm/Notifications/SideSheet/SideSheetHeader/SideSheetHeader.module.scss.esm.js.map +1 -0
  108. package/dist/esm/Notifications/SlideInModal/SlideInModal.esm.js +3 -0
  109. package/dist/esm/Notifications/SlideInModal/SlideInModal.esm.js.map +1 -1
  110. package/dist/esm/Spinner/Spinner.esm.js +29 -0
  111. package/dist/esm/Spinner/Spinner.esm.js.map +1 -0
  112. package/dist/esm/Spinner/Spinner.module.scss.esm.js +8 -0
  113. package/dist/esm/Spinner/Spinner.module.scss.esm.js.map +1 -0
  114. package/dist/esm/_BaseStyling_/BaseStyling.esm.js +2 -0
  115. package/dist/esm/_BaseStyling_/BaseStyling.esm.js.map +1 -1
  116. package/dist/esm/src/components/Button/Spinner.d.ts +1 -1
  117. package/dist/esm/src/components/DataGrid/DataGridFilters/DataGridFilters.interfaces.d.ts +4 -0
  118. package/dist/esm/src/components/DataGrid/DataGridFilters/DataGridSearchbar.d.ts +1 -1
  119. package/dist/esm/src/components/DataGrid/DataGridFilters/FilterKeyMapper.d.ts +14 -0
  120. package/dist/esm/src/components/DataGrid/DataGridFilters/FilterKeyMapper.test.d.ts +1 -0
  121. package/dist/esm/src/components/DataGrid/testUtils.d.ts +3 -1
  122. package/dist/esm/src/components/Form/Select/MultiSelect/MultiSelect.test.d.ts +1 -2
  123. package/dist/esm/src/components/Form/Select/SingleSelect/Select.test.d.ts +1 -2
  124. package/dist/esm/src/components/Icon/Icon.d.ts +4 -1
  125. package/dist/esm/src/components/Notifications/BaseModal/BaseModal.d.ts +1 -0
  126. package/dist/esm/src/components/Notifications/BaseModal/BaseModalHeader/BaseModalHeader.d.ts +1 -0
  127. package/dist/esm/src/components/Notifications/SideSheet/SideSheet.d.ts +10 -0
  128. package/dist/esm/src/components/Notifications/SideSheet/SideSheet.test.d.ts +1 -0
  129. package/dist/esm/src/components/Notifications/SideSheet/SideSheetActions/SideSheetActions.d.ts +2 -0
  130. package/dist/esm/src/components/Notifications/SideSheet/SideSheetContent/SideSheetContent.d.ts +4 -0
  131. package/dist/esm/src/components/Notifications/SideSheet/SideSheetHeader/SideSheetHeader.d.ts +4 -0
  132. package/dist/esm/src/components/Spinner/Spinner.d.ts +6 -0
  133. package/dist/esm/src/components/Spinner/Spinner.test.d.ts +1 -0
  134. package/dist/esm/src/components/Typography/Typography.d.ts +1 -1
  135. package/dist/esm/src/components/_BaseStyling_/BaseStyling.d.ts +2 -0
  136. package/dist/esm/src/hooks/useUploadFile.d.ts +10 -4
  137. package/dist/esm/src/hooks/useUploadFile.esm.js +101 -0
  138. package/dist/esm/src/hooks/useUploadFile.esm.js.map +1 -0
  139. package/dist/esm/src/index.d.ts +19 -2
  140. package/dist/esm/src/index.esm.js +8 -1
  141. package/dist/esm/src/index.esm.js.map +1 -1
  142. package/dist/esm/src/util/helper.d.ts +0 -3
  143. package/dist/esm/src/util/helper.esm.js +10 -1
  144. package/dist/esm/src/util/helper.esm.js.map +1 -1
  145. package/dist/lib/style-inject.js +48 -41
  146. package/dist/lib/style-inject.js.map +1 -1
  147. package/package.json +22 -22
  148. package/src/components/Button/BaseButton.tsx +2 -2
  149. package/src/components/Button/Spinner.tsx +1 -1
  150. package/src/components/DataGrid/DataGridBody/DataGridCell/DataGridCell.module.scss +1 -1
  151. package/src/components/DataGrid/DataGridBody/DataGridRow/DataGridRow.module.scss +8 -24
  152. package/src/components/DataGrid/DataGridFilters/DataGridFilters.interfaces.ts +5 -0
  153. package/src/components/DataGrid/DataGridFilters/DataGridSearchbar.tsx +5 -2
  154. package/src/components/DataGrid/DataGridFilters/FilterKeyMapper.ts +48 -0
  155. package/src/components/DataGrid/DataGridHeader/DataGridHeader.module.scss +9 -8
  156. package/src/components/DataGrid/dataGridMixins.module.scss +33 -0
  157. package/src/components/DataGrid/testUtils.ts +39 -32
  158. package/src/components/Form/FileUpload/FileItem/FileItem.module.scss +6 -3
  159. package/src/components/Form/FileUpload/FileItem/FileItem.tsx +3 -1
  160. package/src/components/Form/FileUpload/FileUpload.module.scss +12 -5
  161. package/src/components/Form/FileUpload/FileUpload.tsx +10 -7
  162. package/src/components/Icon/Icon.module.scss +12 -0
  163. package/src/components/Icon/Icon.tsx +4 -1
  164. package/src/components/Notifications/BaseModal/BaseModal.tsx +10 -6
  165. package/src/components/Notifications/BaseModal/BaseModalHeader/BaseModalHeader.tsx +14 -2
  166. package/src/components/Notifications/SideSheet/SideSheet.module.scss +96 -0
  167. package/src/components/Notifications/SideSheet/SideSheet.tsx +114 -0
  168. package/src/components/Notifications/SideSheet/SideSheetActions/SideSheetActions.tsx +18 -0
  169. package/src/components/Notifications/SideSheet/SideSheetContent/SideSheetContent.module.scss +19 -0
  170. package/src/components/Notifications/SideSheet/SideSheetContent/SideSheetContent.tsx +25 -0
  171. package/src/components/Notifications/SideSheet/SideSheetHeader/SideSheetHeader.module.scss +19 -0
  172. package/src/components/Notifications/SideSheet/SideSheetHeader/SideSheetHeader.tsx +25 -0
  173. package/src/components/Notifications/SlideInModal/SlideInModal.tsx +3 -0
  174. package/src/components/Spinner/Spinner.module.scss +33 -0
  175. package/src/components/Spinner/Spinner.tsx +61 -0
  176. package/src/components/_BaseStyling_/BaseStyling.tsx +4 -0
  177. package/src/font/icomoon.eot +0 -0
  178. package/src/font/icomoon.svg +3 -0
  179. package/src/font/icomoon.ttf +0 -0
  180. package/src/font/icomoon.woff +0 -0
  181. package/src/font/selection.json +1 -1
  182. package/src/hooks/useUploadFile.tsx +27 -25
  183. package/src/index.ts +29 -2
  184. package/src/util/helper.tsx +0 -6
@@ -0,0 +1,96 @@
1
+ /*!
2
+ * Copyright 2022 OneWelcome B.V.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ @use "../../../mixins.module.scss";
18
+
19
+ .slide-in-modal {
20
+ right: 0;
21
+ left: auto;
22
+
23
+ justify-content: flex-end;
24
+
25
+ min-width: 25rem;
26
+ width: 33vw;
27
+ max-width: 40rem;
28
+
29
+ visibility: visible;
30
+
31
+ transform: translate(calc(100% - 0.5rem));
32
+ @include mixins.transition(transform, 0.5s, ease-in-out);
33
+
34
+ &.hide {
35
+ visibility: hidden;
36
+ }
37
+
38
+ &.visible {
39
+ visibility: visible;
40
+ transform: translate(0%);
41
+
42
+ #backdrop-slide {
43
+ background-color: transparent;
44
+ }
45
+ }
46
+ }
47
+
48
+ .handle {
49
+ position: absolute;
50
+ top: 13.25rem;
51
+ left: -1.5rem;
52
+
53
+ display: flex;
54
+ align-items: center;
55
+ justify-content: center;
56
+
57
+ width: 1.5rem;
58
+ height: 2.5rem;
59
+ padding: 0.5rem 0;
60
+ border-top-left-radius: 4px;
61
+ border-bottom-left-radius: 4px;
62
+ background-color: var(--modal-background-color);
63
+ box-shadow:
64
+ -4px 4px 5px 0px var(--side-sheet-shadow-color-one),
65
+ -4px 3px 14px 0px var(--side-sheet-shadow-color-two),
66
+ -4px 8px 10px 0px var(--side-sheet-shadow-color-two);
67
+ }
68
+
69
+ .handle-button {
70
+ transform: rotateY(180deg);
71
+ }
72
+
73
+ .collapsed-sheet {
74
+ position: absolute;
75
+ top: 0;
76
+ right: 0;
77
+ width: 0.5rem;
78
+ height: 100vh;
79
+ background-color: var(--modal-background-color);
80
+ box-shadow:
81
+ 0px 4px 5px 0px var(--side-sheet-shadow-color-one),
82
+ 0px 3px 14px 0px var(--side-sheet-shadow-color-two),
83
+ 0px 8px 10px 0px var(--side-sheet-shadow-color-two);
84
+ }
85
+
86
+ .container {
87
+ margin-top: 0;
88
+ width: 50rem;
89
+ height: 100%;
90
+ max-height: unset;
91
+ border-radius: 0;
92
+ box-shadow:
93
+ 0px 4px 5px 0px var(--side-sheet-shadow-color-one),
94
+ 0px 3px 14px 0px var(--side-sheet-shadow-color-two),
95
+ 0px 8px 10px 0px var(--side-sheet-shadow-color-two);
96
+ }
@@ -0,0 +1,114 @@
1
+ /*
2
+ * Copyright 2022 OneWelcome B.V.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ import React, {
18
+ ForwardRefRenderFunction,
19
+ TransitionEventHandler,
20
+ useState,
21
+ useRef,
22
+ useCallback,
23
+ useEffect
24
+ } from "react";
25
+ import { Props as ModalProps, Modal } from "../Modal/Modal";
26
+ import classes from "./SideSheet.module.scss";
27
+ import { IconButton } from "../../Button/IconButton";
28
+ import { Icon, Icons } from "../../Icon/Icon";
29
+
30
+ export interface Props extends Omit<ModalProps, "hideBackdrop" | "disableBackdrop"> {
31
+ handleButtonProps?: {
32
+ onOpen: () => void;
33
+ onClose: () => void;
34
+ title?: string;
35
+ };
36
+ }
37
+
38
+ const SideSheetComponent: ForwardRefRenderFunction<HTMLDivElement, Props> = (
39
+ { children, id, open, handleButtonProps, ...rest }: Props,
40
+ ref
41
+ ) => {
42
+ const [classHideOnTransition, setClassHideOnTransition] = useState<string>("hide");
43
+ const [controlledOpen, setControlledOpen] = useState(false);
44
+ const containerRef = useRef(null);
45
+ const handleTitle = handleButtonProps?.title ?? "Side sheet handle";
46
+ const handleButtonStyle = {
47
+ width: "1.5rem",
48
+ height: "3.5rem",
49
+ borderTopLeftRadius: "4px",
50
+ borderBottomLeftRadius: "4px"
51
+ };
52
+
53
+ const onTransitionEnd: TransitionEventHandler<HTMLDivElement> = useCallback(
54
+ e => {
55
+ if (e.target === containerRef.current) {
56
+ setClassHideOnTransition(prev => (prev ? "" : "hide"));
57
+ if (!open && controlledOpen) {
58
+ setControlledOpen(false);
59
+ }
60
+ }
61
+ },
62
+ [open]
63
+ );
64
+
65
+ useEffect(() => {
66
+ open && setControlledOpen(open);
67
+ }, [open]);
68
+
69
+ return (
70
+ <>
71
+ {handleButtonProps && !open && (
72
+ <div className={classes["collapsed-sheet"]}>
73
+ <div className={classes["handle"]}>
74
+ <IconButton
75
+ style={handleButtonStyle}
76
+ className={classes["handle-button"]}
77
+ onClick={handleButtonProps.onOpen}
78
+ title={handleTitle}
79
+ >
80
+ <Icon size="0.9rem" icon={Icons.SideSheetHandle} />
81
+ </IconButton>
82
+ </div>
83
+ </div>
84
+ )}
85
+ <Modal
86
+ {...rest}
87
+ id={id}
88
+ open={controlledOpen}
89
+ className={`${classes["slide-in-modal"]} ${open ? classes["visible"] : ""} ${
90
+ !open ? classes[classHideOnTransition] : ""
91
+ }`}
92
+ containerProps={{ className: classes["container"] }}
93
+ hideBackdrop={true}
94
+ onTransitionEnd={onTransitionEnd}
95
+ ref={ref ?? containerRef}
96
+ >
97
+ {handleButtonProps && (
98
+ <div className={classes["handle"]}>
99
+ <IconButton
100
+ style={handleButtonStyle}
101
+ title={handleTitle}
102
+ onClick={handleButtonProps.onClose}
103
+ >
104
+ <Icon size="0.9rem" icon={Icons.SideSheetHandle} />
105
+ </IconButton>
106
+ </div>
107
+ )}
108
+ {children}
109
+ </Modal>
110
+ </>
111
+ );
112
+ };
113
+
114
+ export const SideSheet = React.forwardRef(SideSheetComponent);
@@ -0,0 +1,18 @@
1
+ /*
2
+ * Copyright 2022 OneWelcome B.V.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ export { BaseModalActions as SideSheetActions } from "../../BaseModal/BaseModalActions/BaseModalActions";
18
+ export type { Props } from "../../BaseModal/BaseModalActions/BaseModalActions";
@@ -0,0 +1,19 @@
1
+ /*
2
+ * Copyright 2022 OneWelcome B.V.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ .side-sheet-content {
18
+ padding: 1.5rem;
19
+ }
@@ -0,0 +1,25 @@
1
+ /*
2
+ * Copyright 2022 OneWelcome B.V.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ import React from "react";
18
+ import { BaseModalContent, Props } from "../../BaseModal/BaseModalContent/BaseModalContent";
19
+ import classes from "./SideSheetContent.module.scss";
20
+
21
+ export const SideSheetContent: React.FC<Props> = ({ className, ...rest }) => (
22
+ <BaseModalContent {...rest} className={`${classes["side-sheet-content"]} ${className}`} />
23
+ );
24
+
25
+ export { Props } from "../../BaseModal/BaseModalContent/BaseModalContent";
@@ -0,0 +1,19 @@
1
+ /*
2
+ * Copyright 2022 OneWelcome B.V.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ .side-sheet-header {
18
+ padding: 1rem 1.5rem;
19
+ }
@@ -0,0 +1,25 @@
1
+ /*
2
+ * Copyright 2022 OneWelcome B.V.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ import React from "react";
18
+ import { BaseModalHeader, Props } from "../../BaseModal/BaseModalHeader/BaseModalHeader";
19
+ import classes from "./SideSheetHeader.module.scss";
20
+
21
+ export const SideSheetHeader: React.FC<Props> = ({ className, ...rest }) => (
22
+ <BaseModalHeader {...rest} className={`${classes["side-sheet-header"]} ${className}`} />
23
+ );
24
+
25
+ export { Props } from "../../BaseModal/BaseModalHeader/BaseModalHeader";
@@ -25,6 +25,9 @@ import React, {
25
25
  import { Props as ModalProps, Modal } from "../Modal/Modal";
26
26
  import classes from "./SlideInModal.module.scss";
27
27
 
28
+ /**
29
+ * @deprecated use the new `SideSheet` component
30
+ */
28
31
  const SlideInModalComponent: ForwardRefRenderFunction<HTMLDivElement, ModalProps> = (
29
32
  { children, id, open, ...rest }: ModalProps,
30
33
  ref
@@ -0,0 +1,33 @@
1
+ /*!
2
+ * Copyright 2022 OneWelcome B.V.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ @import "../../mixins.module.scss";
17
+
18
+ .spinner {
19
+ --orbit-color: var(--color-blue-grey100);
20
+ --arch-color: var(--color-blue-grey900);
21
+ @keyframes rotate {
22
+ 0% {
23
+ transform: rotate(0deg);
24
+ }
25
+ 100% {
26
+ transform: rotate(360deg);
27
+ }
28
+ }
29
+ .arch {
30
+ animation: rotate 1s linear infinite;
31
+ transform-origin: center;
32
+ }
33
+ }
@@ -0,0 +1,61 @@
1
+ /*
2
+ * Copyright 2022 OneWelcome B.V.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ import React from "react";
18
+ import classes from "./Spinner.module.scss";
19
+
20
+ export interface SpinnerProps extends React.SVGProps<SVGSVGElement> {
21
+ size?: number;
22
+ thickness?: number;
23
+ }
24
+
25
+ export const Spinner: React.FC<SpinnerProps> = ({ size = 32, thickness, ...props }) => {
26
+ if (!thickness) {
27
+ thickness = size / 16;
28
+ }
29
+ return (
30
+ <svg
31
+ {...props}
32
+ className={classes["spinner"]}
33
+ width={size}
34
+ height={size}
35
+ viewBox={`0 0 ${size} ${size}`}
36
+ fill="none"
37
+ xmlns="http://www.w3.org/2000/svg"
38
+ >
39
+ <circle
40
+ cx={size / 2}
41
+ cy={size / 2}
42
+ r={(size - thickness) / 2}
43
+ stroke="var(--orbit-color)"
44
+ strokeWidth={thickness}
45
+ fill="none"
46
+ ></circle>
47
+ <circle
48
+ className={classes["arch"]}
49
+ cx={size / 2}
50
+ cy={size / 2}
51
+ r={(size - thickness) / 2}
52
+ stroke="var(--arch-color)"
53
+ strokeWidth={thickness}
54
+ strokeLinecap="round"
55
+ fill="none"
56
+ strokeDasharray={`${size}`}
57
+ transform="rotate(-90 25 25)"
58
+ />
59
+ </svg>
60
+ );
61
+ };
@@ -116,6 +116,8 @@ interface CSSProperties {
116
116
  modalShadowColor?: string;
117
117
  modalBackgroundColor?: string;
118
118
  modalBackdropColor?: string;
119
+ sideSheetShadowColorOne?: string;
120
+ sideSheetShadowColorTwo?: string;
119
121
  skeletonBackgroundColor?: string;
120
122
  skeletonAnimationColorRgb?: string;
121
123
 
@@ -310,6 +312,8 @@ export const BaseStyling = ({ children, properties = {} }: Props) => {
310
312
  modalShadowColor: "rgba(0, 0, 0, 0.16)",
311
313
  modalBackgroundColor: "var(--light)",
312
314
  modalBackdropColor: "var(--default)",
315
+ sideSheetShadowColorOne: "#01053214",
316
+ sideSheetShadowColorTwo: "#0105320a",
313
317
  skeletonBackgroundColor: "var(--disabled)",
314
318
  skeletonAnimationColorRgb: "255, 255, 255",
315
319
 
Binary file
@@ -88,5 +88,8 @@
88
88
  <glyph unicode="&#xe94e;" glyph-name="ZoomIn" d="M731.85 315.975h-46.258l-16.391 15.808c57.379 66.744 91.917 153.395 91.917 247.657 0 210.187-170.371 380.561-380.557 380.561s-380.561-170.374-380.561-380.561c0-210.187 170.374-380.557 380.561-380.557 94.262 0 180.913 34.538 247.657 91.917l15.808-16.391v-46.258l292.736-292.151 87.239 87.239-292.151 292.736zM380.561 315.975c-145.784 0-263.465 117.681-263.465 263.465s117.681 263.465 263.465 263.465c145.784 0 263.465-117.681 263.465-263.465s-117.681-263.465-263.465-263.465zM409.835 725.809h-58.548v-117.095h-117.095v-58.548h117.095v-117.095h58.548v117.095h117.095v58.548h-117.095v117.095z" />
89
89
  <glyph unicode="&#xe94f;" glyph-name="arrow-up" d="M0.001 448.003l90.24-90.24 357.76 357.117v-778.879h128.002v778.879l357.12-357.762 90.877 90.885-512.002 511.996-511.996-511.996z" />
90
90
  <glyph unicode="&#xe950;" glyph-name="external-link" d="M910.225 49.775h-796.448v796.448h398.223v113.777h-398.223c-63.146 0-113.777-51.2-113.777-113.777v-796.448c0-62.575 50.631-113.775 113.777-113.775h796.448c62.575 0 113.775 51.2 113.775 113.775v398.225h-113.775v-398.225zM625.777 960v-113.777h204.232l-559.218-559.218 80.213-80.213 559.221 559.218v-204.232h113.775v398.223h-398.223z" />
91
+ <glyph unicode="&#xe951;" glyph-name="sidesheet-handle" horiz-adv-x="1317" d="M1316.785 960v-146.286h-292.571v146.286h292.571zM1316.785 667.429v-146.286h-292.571v146.286h292.571zM1316.785 228.571v146.286h-292.571v-146.286h292.571zM1316.785 82.286v-146.286h-292.571v146.286h292.571zM660.044 508.952h-659.83v-121.904h659.83l-203.662-218.819 80.213-85.943 341.334 365.714-341.334 365.714-80.213-85.943 203.662-218.819z" />
92
+ <glyph unicode="&#xe952;" glyph-name="pending-circle" d="M511.997 959.999c-282.621 0-511.997-229.375-511.997-511.998 0-282.62 229.376-512.001 511.997-512.001 282.623 0 512.003 229.38 512.003 512.001 0 282.623-229.38 511.998-512.003 511.998zM511.997 38.402c-226.302 0-409.598 183.294-409.598 409.598s183.295 409.6 409.598 409.6c226.308 0 409.601-183.296 409.601-409.6s-183.294-409.598-409.601-409.598zM255.999 371.203c42.415 0 76.8 34.382 76.8 76.796s-34.385 76.8-76.8 76.8c-42.415 0-76.8-34.385-76.8-76.8s34.385-76.796 76.8-76.796zM511.997 371.203c42.418 0 76.8 34.382 76.8 76.796s-34.382 76.8-76.8 76.8c-42.414 0-76.797-34.385-76.797-76.8s34.385-76.796 76.797-76.796zM767.998 371.203c42.412 0 76.8 34.382 76.8 76.796s-34.388 76.8-76.8 76.8c-42.418 0-76.8-34.385-76.8-76.8s34.382-76.796 76.8-76.796z" />
93
+ <glyph unicode="&#xe953;" glyph-name="minus-circle" d="M255.999 499.2v-102.401h511.999v102.401h-511.999zM511.997 959.999c-282.621 0-511.997-229.375-511.997-511.998 0-282.62 229.376-512.001 511.997-512.001 282.623 0 512.003 229.38 512.003 512.001 0 282.623-229.38 511.998-512.003 511.998zM511.997 38.402c-225.789 0-409.598 183.81-409.598 409.598 0 225.792 183.808 409.6 409.598 409.6 225.792 0 409.601-183.808 409.601-409.6 0-225.788-183.81-409.598-409.601-409.598z" />
91
94
  <glyph unicode="&#xe9d1;" glyph-name="eye-blocked" d="M945.942 945.942c-18.746 18.744-49.136 18.744-67.882 0l-202.164-202.164c-51.938 15.754-106.948 24.222-163.896 24.222-223.318 0-416.882-130.042-512-320 41.122-82.124 100.648-153.040 173.022-207.096l-158.962-158.962c-18.746-18.746-18.746-49.136 0-67.882 9.372-9.374 21.656-14.060 33.94-14.060s24.568 4.686 33.942 14.058l864 864c18.744 18.746 18.744 49.138 0 67.884zM416 640c42.24 0 78.082-27.294 90.92-65.196l-121.724-121.724c-37.902 12.838-65.196 48.68-65.196 90.92 0 53.020 42.98 96 96 96zM110.116 448c38.292 60.524 89.274 111.924 149.434 150.296 3.918 2.5 7.876 4.922 11.862 7.3-9.962-27.328-15.412-56.822-15.412-87.596 0-54.89 17.286-105.738 46.7-147.418l-60.924-60.924c-52.446 36.842-97.202 83.882-131.66 138.342zM768 518c0 27.166-4.256 53.334-12.102 77.898l-321.808-321.808c24.568-7.842 50.742-12.090 77.91-12.090 141.382 0 256 114.618 256 256zM830.026 670.026l-69.362-69.362c1.264-0.786 2.53-1.568 3.786-2.368 60.162-38.374 111.142-89.774 149.434-150.296-38.292-60.522-89.274-111.922-149.436-150.296-75.594-48.218-162.89-73.704-252.448-73.704-38.664 0-76.902 4.76-113.962 14.040l-76.894-76.894c59.718-21.462 123.95-33.146 190.856-33.146 223.31 0 416.876 130.042 512 320-45.022 89.916-112.118 166.396-193.974 222.026z" />
92
95
  </font></defs></svg>
Binary file
Binary file