@teamturing/react-kit 2.16.2 → 2.16.3
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.
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { HTMLAttributes, RefObject } from 'react';
|
|
2
|
-
import { ResponsiveValue } from 'styled-system';
|
|
2
|
+
import { MaxHeightProps, ResponsiveValue } from 'styled-system';
|
|
3
|
+
import { SxProp } from '../../utils/styled-system';
|
|
3
4
|
type OverlaySizeType = 's' | 'm' | 'l';
|
|
4
5
|
type Props = {
|
|
5
6
|
isOpen?: boolean;
|
|
@@ -7,14 +8,14 @@ type Props = {
|
|
|
7
8
|
size?: ResponsiveValue<OverlaySizeType>;
|
|
8
9
|
ignoreOutsideClickRefs?: RefObject<HTMLElement>[];
|
|
9
10
|
dismissFocusRef?: RefObject<HTMLElement>;
|
|
10
|
-
} & HTMLAttributes<HTMLElement>;
|
|
11
|
+
} & MaxHeightProps & SxProp & HTMLAttributes<HTMLElement>;
|
|
11
12
|
declare const _default: import("react").ForwardRefExoticComponent<{
|
|
12
13
|
isOpen?: boolean | undefined;
|
|
13
14
|
onDismiss?: (() => void) | undefined;
|
|
14
15
|
size?: ResponsiveValue<OverlaySizeType> | undefined;
|
|
15
16
|
ignoreOutsideClickRefs?: RefObject<HTMLElement>[] | undefined;
|
|
16
17
|
dismissFocusRef?: RefObject<HTMLElement> | undefined;
|
|
17
|
-
} & HTMLAttributes<HTMLElement> & {
|
|
18
|
+
} & MaxHeightProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, import("csstype").Property.MaxHeight<import("styled-system").TLengthStyledSystem>> & SxProp & HTMLAttributes<HTMLElement> & {
|
|
18
19
|
children?: import("react").ReactNode;
|
|
19
20
|
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
20
21
|
export default _default;
|
package/dist/index.js
CHANGED
|
@@ -977,7 +977,7 @@ layout$1.width;
|
|
|
977
977
|
layout$1.minWidth;
|
|
978
978
|
layout$1.minHeight;
|
|
979
979
|
layout$1.maxWidth;
|
|
980
|
-
layout$1.maxHeight;
|
|
980
|
+
var maxHeight = layout$1.maxHeight;
|
|
981
981
|
layout$1.size;
|
|
982
982
|
layout$1.verticalAlign;
|
|
983
983
|
layout$1.display;
|
|
@@ -18871,6 +18871,7 @@ const Overlay = ({
|
|
|
18871
18871
|
size = 'm',
|
|
18872
18872
|
ignoreOutsideClickRefs = [],
|
|
18873
18873
|
dismissFocusRef,
|
|
18874
|
+
maxHeight = forcePixelValue(600),
|
|
18874
18875
|
...props
|
|
18875
18876
|
}, ref) => {
|
|
18876
18877
|
const overlayRef = React.useRef(null);
|
|
@@ -18923,6 +18924,7 @@ const Overlay = ({
|
|
|
18923
18924
|
return isOpen ? /*#__PURE__*/jsxRuntimeExports.jsx(BaseOverlay, {
|
|
18924
18925
|
ref: overlayRef,
|
|
18925
18926
|
size: size,
|
|
18927
|
+
maxHeight: maxHeight,
|
|
18926
18928
|
...props,
|
|
18927
18929
|
role: 'dialog',
|
|
18928
18930
|
children: children
|
|
@@ -18957,6 +18959,8 @@ const BaseOverlay = styled__default.default.div`
|
|
|
18957
18959
|
}
|
|
18958
18960
|
}
|
|
18959
18961
|
})}
|
|
18962
|
+
|
|
18963
|
+
${maxHeight}
|
|
18960
18964
|
${sx}
|
|
18961
18965
|
`;
|
|
18962
18966
|
var Overlay$1 = /*#__PURE__*/React.forwardRef(Overlay);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { forwardRef, useRef, useImperativeHandle, useCallback, useEffect } from 'react';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
|
-
import '../../node_modules/styled-system/dist/index.esm.js';
|
|
3
|
+
import { maxHeight } from '../../node_modules/styled-system/dist/index.esm.js';
|
|
4
4
|
import { forcePixelValue } from '../../utils/forcePixelValue.js';
|
|
5
5
|
import { sx } from '../../utils/styled-system/index.js';
|
|
6
6
|
import { j as jsxRuntimeExports } from '../../node_modules/react/jsx-runtime.js';
|
|
@@ -14,6 +14,7 @@ const Overlay = ({
|
|
|
14
14
|
size = 'm',
|
|
15
15
|
ignoreOutsideClickRefs = [],
|
|
16
16
|
dismissFocusRef,
|
|
17
|
+
maxHeight = forcePixelValue(600),
|
|
17
18
|
...props
|
|
18
19
|
}, ref) => {
|
|
19
20
|
const overlayRef = useRef(null);
|
|
@@ -66,6 +67,7 @@ const Overlay = ({
|
|
|
66
67
|
return isOpen ? /*#__PURE__*/jsxRuntimeExports.jsx(BaseOverlay, {
|
|
67
68
|
ref: overlayRef,
|
|
68
69
|
size: size,
|
|
70
|
+
maxHeight: maxHeight,
|
|
69
71
|
...props,
|
|
70
72
|
role: 'dialog',
|
|
71
73
|
children: children
|
|
@@ -100,6 +102,8 @@ const BaseOverlay = styled.div`
|
|
|
100
102
|
}
|
|
101
103
|
}
|
|
102
104
|
})}
|
|
105
|
+
|
|
106
|
+
${maxHeight}
|
|
103
107
|
${sx}
|
|
104
108
|
`;
|
|
105
109
|
var Overlay$1 = /*#__PURE__*/forwardRef(Overlay);
|
|
@@ -16,7 +16,7 @@ layout.width;
|
|
|
16
16
|
layout.minWidth;
|
|
17
17
|
layout.minHeight;
|
|
18
18
|
layout.maxWidth;
|
|
19
|
-
layout.maxHeight;
|
|
19
|
+
var maxHeight = layout.maxHeight;
|
|
20
20
|
layout.size;
|
|
21
21
|
layout.verticalAlign;
|
|
22
22
|
layout.display;
|
|
@@ -74,4 +74,4 @@ position.zIndex;
|
|
|
74
74
|
position.bottom;
|
|
75
75
|
position.left;
|
|
76
76
|
|
|
77
|
-
export { background, border, border as borders, color, flexbox, fontSize, fontWeight, grid, layout, lineHeight, position, textAlign, typography };
|
|
77
|
+
export { background, border, border as borders, color, flexbox, fontSize, fontWeight, grid, layout, lineHeight, maxHeight, position, textAlign, typography };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teamturing/react-kit",
|
|
3
|
-
"version": "2.16.
|
|
3
|
+
"version": "2.16.3",
|
|
4
4
|
"description": "React components, hooks for create teamturing web application",
|
|
5
5
|
"author": "Sungchang Park <psch300@gmail.com> (https://github.com/psch300)",
|
|
6
6
|
"homepage": "https://github.com/weareteamturing/bombe#readme",
|
|
@@ -62,5 +62,5 @@
|
|
|
62
62
|
"react-is": "^18.2.0",
|
|
63
63
|
"styled-system": "^5.1.5"
|
|
64
64
|
},
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "5d22785a97a7991ab894c44c6ea913202821cd01"
|
|
66
66
|
}
|