@hive-ui/side-modal 0.3.1 → 0.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.
- package/dist/index.d.mts +52 -41
- package/dist/index.mjs +2 -2
- package/package.json +12 -12
package/dist/index.d.mts
CHANGED
|
@@ -2,59 +2,60 @@ import { BoxProps } from "@hive-ui/box";
|
|
|
2
2
|
import { NonModalDialogPrimitivePopoverInitialState, NonModalDialogPrimitiveStateReturn, NonModalDialogPrimitiveStateReturn as SideModalStateReturn } from "@hive-ui/non-modal-dialog-primitive";
|
|
3
3
|
import * as _$react from "react";
|
|
4
4
|
import { ReactNode } from "react";
|
|
5
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
5
6
|
import { ButtonProps } from "@hive-ui/button";
|
|
6
7
|
import { HeadingProps } from "@hive-ui/heading";
|
|
7
8
|
//#region src/SideModal.d.ts
|
|
8
9
|
type SideModalProps = Pick<BoxProps<"div">, "element" | "children"> & {
|
|
9
10
|
/**
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
* Title of the dialog for screen readers.
|
|
12
|
+
*
|
|
13
|
+
* @type {string}
|
|
14
|
+
* @memberof SideModalProps
|
|
15
|
+
*/
|
|
15
16
|
"aria-label": string;
|
|
16
17
|
/**
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
* Set to false to disable closing the SideModal when the "Escape" key is pressed.
|
|
19
|
+
*
|
|
20
|
+
* @default true
|
|
21
|
+
* @type {boolean}
|
|
22
|
+
* @memberof SideModalProps
|
|
23
|
+
*/
|
|
23
24
|
hideOnEsc?: boolean;
|
|
24
25
|
};
|
|
25
26
|
declare const SideModal: _$react.ForwardRefExoticComponent<Pick<BoxProps<"div">, "children" | "element"> & {
|
|
26
27
|
/**
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
* Title of the dialog for screen readers.
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof SideModalProps
|
|
32
|
+
*/
|
|
32
33
|
"aria-label": string;
|
|
33
34
|
/**
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
35
|
+
* Set to false to disable closing the SideModal when the "Escape" key is pressed.
|
|
36
|
+
*
|
|
37
|
+
* @default true
|
|
38
|
+
* @type {boolean}
|
|
39
|
+
* @memberof SideModalProps
|
|
40
|
+
*/
|
|
40
41
|
hideOnEsc?: boolean;
|
|
41
42
|
} & _$react.RefAttributes<HTMLElement>>;
|
|
42
43
|
//#endregion
|
|
43
44
|
//#region src/SideModalButton.d.ts
|
|
44
45
|
type SideModalButtonProps = Omit<ButtonProps, "as"> & {
|
|
45
46
|
/**
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
* The id of the SideModal that the button controls
|
|
48
|
+
*
|
|
49
|
+
* @type {string}
|
|
50
|
+
*/
|
|
50
51
|
id?: string;
|
|
51
52
|
};
|
|
52
53
|
declare const SideModalButton: _$react.ForwardRefExoticComponent<Omit<ButtonProps, "as"> & {
|
|
53
54
|
/**
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
55
|
+
* The id of the SideModal that the button controls
|
|
56
|
+
*
|
|
57
|
+
* @type {string}
|
|
58
|
+
*/
|
|
58
59
|
id?: string;
|
|
59
60
|
} & _$react.RefAttributes<HTMLElement>>;
|
|
60
61
|
//#endregion
|
|
@@ -113,7 +114,17 @@ type SideModalContainerProps = NonModalDialogPrimitivePopoverInitialState & {
|
|
|
113
114
|
*/
|
|
114
115
|
state?: SideModalStateReturn;
|
|
115
116
|
};
|
|
116
|
-
declare const SideModalContainer: _$react.
|
|
117
|
+
declare const SideModalContainer: _$react.MemoExoticComponent<{
|
|
118
|
+
({
|
|
119
|
+
gutter: _gutter,
|
|
120
|
+
placement: _placement,
|
|
121
|
+
modal: _modal,
|
|
122
|
+
children,
|
|
123
|
+
state,
|
|
124
|
+
...initialState
|
|
125
|
+
}: SideModalContainerProps): _$react_jsx_runtime0.JSX.Element;
|
|
126
|
+
displayName: string;
|
|
127
|
+
}>;
|
|
117
128
|
//#endregion
|
|
118
129
|
//#region src/SideModalBody.d.ts
|
|
119
130
|
type SideModalBodyProps = Pick<BoxProps<"div">, "element" | "children">;
|
|
@@ -127,20 +138,20 @@ declare const SideModalFooter: _$react.ForwardRefExoticComponent<SideModalFooter
|
|
|
127
138
|
type JustifyOptions = "flex-start" | "flex-end" | "space-between";
|
|
128
139
|
type SideModalFooterActionsProps = Pick<BoxProps<"div">, "element" | "children"> & {
|
|
129
140
|
/**
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
141
|
+
* Sets the `justify-content` CSS property.
|
|
142
|
+
*
|
|
143
|
+
* @type {JustifyOptions}
|
|
144
|
+
* @memberof SideModalFooterActionsProps
|
|
145
|
+
*/
|
|
135
146
|
justifyContent?: JustifyOptions;
|
|
136
147
|
};
|
|
137
148
|
declare const SideModalFooterActions: _$react.ForwardRefExoticComponent<Pick<BoxProps<"div">, "children" | "element"> & {
|
|
138
149
|
/**
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
150
|
+
* Sets the `justify-content` CSS property.
|
|
151
|
+
*
|
|
152
|
+
* @type {JustifyOptions}
|
|
153
|
+
* @memberof SideModalFooterActionsProps
|
|
154
|
+
*/
|
|
144
155
|
justifyContent?: JustifyOptions;
|
|
145
156
|
} & _$react.RefAttributes<HTMLElement>>;
|
|
146
157
|
//#endregion
|
package/dist/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { animated, useTransition } from "@hive-ui/animation-library";
|
|
2
2
|
import { Box } from "@hive-ui/box";
|
|
3
|
-
import { hiveBaseStyles } from "@hive-ui/theme";
|
|
4
3
|
import { styled } from "@hive-ui/css-library";
|
|
5
4
|
import { NonModalDialogDisclosurePrimitive, NonModalDialogPrimitive, useNonModalDialogPrimitiveState } from "@hive-ui/non-modal-dialog-primitive";
|
|
5
|
+
import { hiveBaseStyles } from "@hive-ui/theme";
|
|
6
6
|
import { createContext, forwardRef, memo, useContext } from "react";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
import { Button } from "@hive-ui/button";
|
|
@@ -128,7 +128,7 @@ const SideModalHeading = forwardRef(({ element = "SIDE_MODAL_HEADING", as = "h2"
|
|
|
128
128
|
});
|
|
129
129
|
//#endregion
|
|
130
130
|
//#region src/SideModalContainer.tsx
|
|
131
|
-
const BaseSideModalContainer = ({ gutter, placement, modal, children, state, ...initialState }) => {
|
|
131
|
+
const BaseSideModalContainer = ({ gutter: _gutter, placement: _placement, modal: _modal, children, state, ...initialState }) => {
|
|
132
132
|
const dialog = state || useNonModalDialogPrimitiveState({
|
|
133
133
|
modal: true,
|
|
134
134
|
unstable_fixed: true,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hive-ui/side-modal",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.5.0",
|
|
4
|
+
"description": "Side Modal presents a non-modal dialog that slides in from the right without blocking interaction with the page. It provides structured header, body, footer, and trigger components.",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
7
7
|
],
|
|
@@ -21,16 +21,16 @@
|
|
|
21
21
|
"prepublishOnly": "vp run build"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@hive-ui/
|
|
25
|
-
"@hive-ui/
|
|
26
|
-
"@hive-ui/
|
|
27
|
-
"@hive-ui/
|
|
28
|
-
"@hive-ui/
|
|
29
|
-
"@hive-ui/
|
|
30
|
-
"@hive-ui/
|
|
31
|
-
"@hive-ui/
|
|
32
|
-
"@hive-ui/
|
|
33
|
-
"@hive-ui/
|
|
24
|
+
"@hive-ui/animation-library": "^0.5.0",
|
|
25
|
+
"@hive-ui/box": "^0.5.0",
|
|
26
|
+
"@hive-ui/button": "^0.5.0",
|
|
27
|
+
"@hive-ui/css-library": "^0.5.0",
|
|
28
|
+
"@hive-ui/heading": "^0.5.0",
|
|
29
|
+
"@hive-ui/icons": "^0.5.0",
|
|
30
|
+
"@hive-ui/non-modal-dialog-primitive": "^0.5.0",
|
|
31
|
+
"@hive-ui/screen-reader-only": "^0.5.0",
|
|
32
|
+
"@hive-ui/style-props": "^0.5.0",
|
|
33
|
+
"@hive-ui/theme": "^0.5.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@types/node": "^25.6.2",
|