@limonify/zest-ui 0.1.0 → 0.1.2
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/lib/combobox/portal/ComboboxPortal.js +1 -1
- package/lib/dialog/portal/DialogPortal.d.ts +4 -2
- package/lib/dialog/portal/DialogPortal.d.ts.map +1 -1
- package/lib/dialog/portal/DialogPortal.js +5 -3
- package/lib/dialog/portal/DialogPortal.js.map +1 -1
- package/lib/menu/portal/MenuPortal.js +1 -1
- package/lib/popover/portal/PopoverPortal.js +1 -1
- package/lib/select/portal/SelectPortal.js +1 -1
- package/lib/tooltip/portal/TooltipPortal.js +1 -1
- package/package.json +5 -5
- package/src/combobox/portal/ComboboxPortal.tsx +1 -1
- package/src/dialog/portal/DialogPortal.tsx +5 -3
- package/src/menu/portal/MenuPortal.tsx +1 -1
- package/src/popover/portal/PopoverPortal.tsx +1 -1
- package/src/select/portal/SelectPortal.tsx +1 -1
- package/src/tooltip/portal/TooltipPortal.tsx +1 -1
|
@@ -16,7 +16,7 @@ function ComboboxPortal(props) {
|
|
|
16
16
|
if (!shouldRender) {
|
|
17
17
|
return null;
|
|
18
18
|
}
|
|
19
|
-
return ((0, jsx_runtime_1.jsx)(react_native_1.Modal, { transparent: true, visible: open, animationType: "
|
|
19
|
+
return ((0, jsx_runtime_1.jsx)(react_native_1.Modal, { transparent: true, visible: open, animationType: "fade", statusBarTranslucent: true, navigationBarTranslucent: true, onRequestClose: (event) => {
|
|
20
20
|
setOpen(false, event);
|
|
21
21
|
}, children: children }));
|
|
22
22
|
}
|
|
@@ -5,8 +5,10 @@ import * as React from 'react';
|
|
|
5
5
|
* Implemented with React Native's `Modal`, which mounts its children at the
|
|
6
6
|
* root of the native view hierarchy, contains accessibility focus, and wires
|
|
7
7
|
* the Android hardware back button (and Escape on web) to `onRequestClose`.
|
|
8
|
-
*
|
|
9
|
-
* animation
|
|
8
|
+
* The Modal uses `animationType="fade"` so open/close get a smooth native
|
|
9
|
+
* cross-fade (including the exit, which a consumer-driven animation can't cover
|
|
10
|
+
* because the Modal unmounts on close). Consumers still layer their own
|
|
11
|
+
* enter transitions (scale/slide) on the popup on top of this fade.
|
|
10
12
|
*/
|
|
11
13
|
export declare function DialogPortal(props: DialogPortal.Props): React.JSX.Element | null;
|
|
12
14
|
export interface DialogPortalProps {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DialogPortal.d.ts","sourceRoot":"","sources":["../../../src/dialog/portal/DialogPortal.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B
|
|
1
|
+
{"version":3,"file":"DialogPortal.d.ts","sourceRoot":"","sources":["../../../src/dialog/portal/DialogPortal.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,YAAY,CAAC,KAAK,4BA2BrD;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CACnC;AAED,yBAAiB,YAAY,CAAC;IAC5B,KAAY,KAAK,GAAG,iBAAiB,CAAC;CACvC"}
|
|
@@ -14,8 +14,10 @@ const reasons_1 = require("../../utils/reasons");
|
|
|
14
14
|
* Implemented with React Native's `Modal`, which mounts its children at the
|
|
15
15
|
* root of the native view hierarchy, contains accessibility focus, and wires
|
|
16
16
|
* the Android hardware back button (and Escape on web) to `onRequestClose`.
|
|
17
|
-
*
|
|
18
|
-
* animation
|
|
17
|
+
* The Modal uses `animationType="fade"` so open/close get a smooth native
|
|
18
|
+
* cross-fade (including the exit, which a consumer-driven animation can't cover
|
|
19
|
+
* because the Modal unmounts on close). Consumers still layer their own
|
|
20
|
+
* enter transitions (scale/slide) on the popup on top of this fade.
|
|
19
21
|
*/
|
|
20
22
|
function DialogPortal(props) {
|
|
21
23
|
const { children, keepMounted = false } = props;
|
|
@@ -25,7 +27,7 @@ function DialogPortal(props) {
|
|
|
25
27
|
if (!shouldRender) {
|
|
26
28
|
return null;
|
|
27
29
|
}
|
|
28
|
-
return ((0, jsx_runtime_1.jsx)(DialogPortalContext_1.DialogPortalContext.Provider, { value: keepMounted, children: (0, jsx_runtime_1.jsx)(react_native_1.Modal, { transparent: true, visible: open, animationType: "
|
|
30
|
+
return ((0, jsx_runtime_1.jsx)(DialogPortalContext_1.DialogPortalContext.Provider, { value: keepMounted, children: (0, jsx_runtime_1.jsx)(react_native_1.Modal, { transparent: true, visible: open, animationType: "fade", statusBarTranslucent: true, navigationBarTranslucent: true, onRequestClose: (event) => {
|
|
29
31
|
store.setOpen(false, (0, createChangeEventDetails_1.createChangeEventDetails)(reasons_1.REASONS.escapeKey, event));
|
|
30
32
|
}, children: children }) }));
|
|
31
33
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DialogPortal.js","sourceRoot":"","sources":["../../../src/dialog/portal/DialogPortal.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAC;;
|
|
1
|
+
{"version":3,"file":"DialogPortal.js","sourceRoot":"","sources":["../../../src/dialog/portal/DialogPortal.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAC;;AAmBb,oCA2BC;;AA5CD,+CAAgE;AAChE,iEAAiE;AACjE,+DAA4D;AAC5D,mFAAgF;AAChF,iDAA8C;AAE9C;;;;;;;;;;GAUG;AACH,SAAgB,YAAY,CAAC,KAAyB;IACpD,MAAM,EAAE,QAAQ,EAAE,WAAW,GAAG,KAAK,EAAE,GAAG,KAAK,CAAC;IAEhD,MAAM,KAAK,GAAG,IAAA,wCAAoB,GAAE,CAAC;IACrC,MAAM,IAAI,GAAG,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IAEpC,MAAM,YAAY,GAAG,IAAI,IAAI,WAAW,CAAC;IACzC,IAAI,CAAC,YAAY,EAAE,CAAC;QAClB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,CACL,uBAAC,yCAAmB,CAAC,QAAQ,IAAC,KAAK,EAAE,WAAW,YAC9C,uBAAC,oBAAK,IACJ,WAAW,QACX,OAAO,EAAE,IAAI,EACb,aAAa,EAAC,MAAM,EACpB,oBAAoB,QACpB,wBAAwB,QACxB,cAAc,EAAE,CAAC,KAAoC,EAAE,EAAE;gBACvD,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,IAAA,mDAAwB,EAAC,iBAAO,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC;YAC3E,CAAC,YAEA,QAAQ,GACH,GACqB,CAChC,CAAC;AACJ,CAAC"}
|
|
@@ -25,7 +25,7 @@ function MenuPortal(props) {
|
|
|
25
25
|
if (!shouldRender) {
|
|
26
26
|
return null;
|
|
27
27
|
}
|
|
28
|
-
return ((0, jsx_runtime_1.jsx)(MenuPortalContext_1.MenuPortalContext.Provider, { value: keepMounted, children: (0, jsx_runtime_1.jsx)(react_native_1.Modal, { transparent: true, visible: open, animationType: "
|
|
28
|
+
return ((0, jsx_runtime_1.jsx)(MenuPortalContext_1.MenuPortalContext.Provider, { value: keepMounted, children: (0, jsx_runtime_1.jsx)(react_native_1.Modal, { transparent: true, visible: open, animationType: "fade", statusBarTranslucent: true, navigationBarTranslucent: true, onRequestClose: (event) => {
|
|
29
29
|
const eventDetails = (0, createChangeEventDetails_1.createChangeEventDetails)(reasons_1.REASONS.escapeKey, event);
|
|
30
30
|
store.setOpen(false, eventDetails);
|
|
31
31
|
// A submenu closes itself; `closeParentOnEsc` dismisses the whole menu
|
|
@@ -27,7 +27,7 @@ function PopoverPortal(props) {
|
|
|
27
27
|
if (!shouldRender) {
|
|
28
28
|
return null;
|
|
29
29
|
}
|
|
30
|
-
return ((0, jsx_runtime_1.jsx)(PopoverPortalContext_1.PopoverPortalContext.Provider, { value: keepMounted, children: (0, jsx_runtime_1.jsx)(react_native_1.Modal, { transparent: true, visible: open, animationType: "
|
|
30
|
+
return ((0, jsx_runtime_1.jsx)(PopoverPortalContext_1.PopoverPortalContext.Provider, { value: keepMounted, children: (0, jsx_runtime_1.jsx)(react_native_1.Modal, { transparent: true, visible: open, animationType: "fade", statusBarTranslucent: true, navigationBarTranslucent: true, onRequestClose: (event) => {
|
|
31
31
|
store.setOpen(false, (0, createChangeEventDetails_1.createChangeEventDetails)(reasons_1.REASONS.escapeKey, event));
|
|
32
32
|
}, children: children }) }));
|
|
33
33
|
}
|
|
@@ -21,7 +21,7 @@ function SelectPortal(props) {
|
|
|
21
21
|
if (!shouldRender) {
|
|
22
22
|
return null;
|
|
23
23
|
}
|
|
24
|
-
return ((0, jsx_runtime_1.jsx)(SelectPortalContext_1.SelectPortalContext.Provider, { value: keepMounted, children: (0, jsx_runtime_1.jsx)(react_native_1.Modal, { transparent: true, visible: open, animationType: "
|
|
24
|
+
return ((0, jsx_runtime_1.jsx)(SelectPortalContext_1.SelectPortalContext.Provider, { value: keepMounted, children: (0, jsx_runtime_1.jsx)(react_native_1.Modal, { transparent: true, visible: open, animationType: "fade", statusBarTranslucent: true, navigationBarTranslucent: true, onRequestClose: (event) => {
|
|
25
25
|
store.setOpen(false, (0, createChangeEventDetails_1.createChangeEventDetails)(reasons_1.REASONS.escapeKey, event));
|
|
26
26
|
}, children: children }) }));
|
|
27
27
|
}
|
|
@@ -26,7 +26,7 @@ function TooltipPortal(props) {
|
|
|
26
26
|
if (!shouldRender) {
|
|
27
27
|
return null;
|
|
28
28
|
}
|
|
29
|
-
return ((0, jsx_runtime_1.jsx)(TooltipPortalContext_1.TooltipPortalContext.Provider, { value: keepMounted, children: (0, jsx_runtime_1.jsxs)(react_native_1.Modal, { transparent: true, visible: open, animationType: "
|
|
29
|
+
return ((0, jsx_runtime_1.jsx)(TooltipPortalContext_1.TooltipPortalContext.Provider, { value: keepMounted, children: (0, jsx_runtime_1.jsxs)(react_native_1.Modal, { transparent: true, visible: open, animationType: "fade", statusBarTranslucent: true, navigationBarTranslucent: true, onRequestClose: (event) => {
|
|
30
30
|
store.setOpen(false, (0, createChangeEventDetails_1.createChangeEventDetails)(reasons_1.REASONS.escapeKey, event));
|
|
31
31
|
}, children: [(0, jsx_runtime_1.jsx)(react_native_1.View, { style: react_native_1.StyleSheet.absoluteFill, onStartShouldSetResponder: () => true, onResponderRelease: (event) => {
|
|
32
32
|
store.setOpen(false, (0, createChangeEventDetails_1.createChangeEventDetails)(reasons_1.REASONS.outsidePress, event));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@limonify/zest-ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Base UI for React Native — headless, unstyled, accessible primitive components.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -42,19 +42,19 @@
|
|
|
42
42
|
"peerDependencies": {
|
|
43
43
|
"react": ">=19.0.0",
|
|
44
44
|
"react-native": ">=0.79.0",
|
|
45
|
-
"react-native-gesture-handler": ">=
|
|
45
|
+
"react-native-gesture-handler": ">=3.0.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@babel/runtime": "^8.0.0",
|
|
49
49
|
"@testing-library/react-native": "^14.0.1",
|
|
50
50
|
"@types/jest": "^29.5.14",
|
|
51
51
|
"@types/react": "~19.2.2",
|
|
52
|
-
"expo": "~57.0.
|
|
52
|
+
"expo": "~57.0.7",
|
|
53
53
|
"jest": "^29.7.0",
|
|
54
|
-
"jest-expo": "~57.0.
|
|
54
|
+
"jest-expo": "~57.0.2",
|
|
55
55
|
"react": "19.2.3",
|
|
56
56
|
"react-native": "0.86.0",
|
|
57
|
-
"react-native-gesture-handler": "~
|
|
57
|
+
"react-native-gesture-handler": "~3.1.0",
|
|
58
58
|
"typescript": "~6.0.3"
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
@@ -21,7 +21,7 @@ export function ComboboxPortal(props: ComboboxPortal.Props) {
|
|
|
21
21
|
<Modal
|
|
22
22
|
transparent
|
|
23
23
|
visible={open}
|
|
24
|
-
animationType="
|
|
24
|
+
animationType="fade"
|
|
25
25
|
statusBarTranslucent
|
|
26
26
|
navigationBarTranslucent
|
|
27
27
|
onRequestClose={(event: NativeSyntheticEvent<unknown>) => {
|
|
@@ -12,8 +12,10 @@ import { REASONS } from '../../utils/reasons';
|
|
|
12
12
|
* Implemented with React Native's `Modal`, which mounts its children at the
|
|
13
13
|
* root of the native view hierarchy, contains accessibility focus, and wires
|
|
14
14
|
* the Android hardware back button (and Escape on web) to `onRequestClose`.
|
|
15
|
-
*
|
|
16
|
-
* animation
|
|
15
|
+
* The Modal uses `animationType="fade"` so open/close get a smooth native
|
|
16
|
+
* cross-fade (including the exit, which a consumer-driven animation can't cover
|
|
17
|
+
* because the Modal unmounts on close). Consumers still layer their own
|
|
18
|
+
* enter transitions (scale/slide) on the popup on top of this fade.
|
|
17
19
|
*/
|
|
18
20
|
export function DialogPortal(props: DialogPortal.Props) {
|
|
19
21
|
const { children, keepMounted = false } = props;
|
|
@@ -31,7 +33,7 @@ export function DialogPortal(props: DialogPortal.Props) {
|
|
|
31
33
|
<Modal
|
|
32
34
|
transparent
|
|
33
35
|
visible={open}
|
|
34
|
-
animationType="
|
|
36
|
+
animationType="fade"
|
|
35
37
|
statusBarTranslucent
|
|
36
38
|
navigationBarTranslucent
|
|
37
39
|
onRequestClose={(event: NativeSyntheticEvent<unknown>) => {
|
|
@@ -33,7 +33,7 @@ export function PopoverPortal(props: PopoverPortal.Props) {
|
|
|
33
33
|
<Modal
|
|
34
34
|
transparent
|
|
35
35
|
visible={open}
|
|
36
|
-
animationType="
|
|
36
|
+
animationType="fade"
|
|
37
37
|
statusBarTranslucent
|
|
38
38
|
navigationBarTranslucent
|
|
39
39
|
onRequestClose={(event: NativeSyntheticEvent<unknown>) => {
|
|
@@ -27,7 +27,7 @@ export function SelectPortal(props: SelectPortal.Props) {
|
|
|
27
27
|
<Modal
|
|
28
28
|
transparent
|
|
29
29
|
visible={open}
|
|
30
|
-
animationType="
|
|
30
|
+
animationType="fade"
|
|
31
31
|
statusBarTranslucent
|
|
32
32
|
navigationBarTranslucent
|
|
33
33
|
onRequestClose={(event: NativeSyntheticEvent<unknown>) => {
|
|
@@ -38,7 +38,7 @@ export function TooltipPortal(props: TooltipPortal.Props) {
|
|
|
38
38
|
<Modal
|
|
39
39
|
transparent
|
|
40
40
|
visible={open}
|
|
41
|
-
animationType="
|
|
41
|
+
animationType="fade"
|
|
42
42
|
statusBarTranslucent
|
|
43
43
|
navigationBarTranslucent
|
|
44
44
|
onRequestClose={(event: NativeSyntheticEvent<unknown>) => {
|