@korsolutions/ui 0.0.57 → 0.0.59
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/module/components/icon/icon.js +3 -3
- package/dist/module/components/icon/icon.js.map +1 -1
- package/dist/module/components/menu/components/menu-checkbox-item.js +51 -0
- package/dist/module/components/menu/components/menu-checkbox-item.js.map +1 -0
- package/dist/module/components/menu/components/menu-content.js +1 -1
- package/dist/module/components/menu/components/menu-content.js.map +1 -1
- package/dist/module/components/menu/components/menu-group.js +18 -0
- package/dist/module/components/menu/components/menu-group.js.map +1 -0
- package/dist/module/components/menu/components/menu-item.js +14 -6
- package/dist/module/components/menu/components/menu-item.js.map +1 -1
- package/dist/module/components/menu/components/menu-label.js +17 -0
- package/dist/module/components/menu/components/menu-label.js.map +1 -0
- package/dist/module/components/menu/components/menu-overlay.js +1 -1
- package/dist/module/components/menu/components/menu-overlay.js.map +1 -1
- package/dist/module/components/menu/components/menu-radio-group.js +24 -0
- package/dist/module/components/menu/components/menu-radio-group.js.map +1 -0
- package/dist/module/components/menu/components/menu-radio-item.js +54 -0
- package/dist/module/components/menu/components/menu-radio-item.js.map +1 -0
- package/dist/module/components/menu/components/menu-separator.js +17 -0
- package/dist/module/components/menu/components/menu-separator.js.map +1 -0
- package/dist/module/components/menu/components/menu-shortcut.js +17 -0
- package/dist/module/components/menu/components/menu-shortcut.js.map +1 -0
- package/dist/module/components/menu/context.js +8 -0
- package/dist/module/components/menu/context.js.map +1 -1
- package/dist/module/components/menu/index.js +15 -1
- package/dist/module/components/menu/index.js.map +1 -1
- package/dist/module/components/menu/use-organized-children.js +39 -0
- package/dist/module/components/menu/use-organized-children.js.map +1 -0
- package/dist/module/components/menu/variants/default.js +82 -6
- package/dist/module/components/menu/variants/default.js.map +1 -1
- package/dist/module/components/portal/portal.js.map +1 -1
- package/dist/module/components/touchable/touchable.js +1 -1
- package/dist/module/components/touchable/touchable.js.map +1 -1
- package/dist/module/components/touchable/variants/default.js +4 -2
- package/dist/module/components/touchable/variants/default.js.map +1 -1
- package/dist/module/themes/provider.js.map +1 -1
- package/dist/module/utils/element-utils.js +11 -0
- package/dist/module/utils/element-utils.js.map +1 -0
- package/dist/typescript/src/components/icon/icon.d.ts +2 -2
- package/dist/typescript/src/components/icon/icon.d.ts.map +1 -1
- package/dist/typescript/src/components/menu/components/menu-checkbox-item.d.ts +13 -0
- package/dist/typescript/src/components/menu/components/menu-checkbox-item.d.ts.map +1 -0
- package/dist/typescript/src/components/menu/components/menu-content.d.ts.map +1 -1
- package/dist/typescript/src/components/menu/components/menu-group.d.ts +9 -0
- package/dist/typescript/src/components/menu/components/menu-group.d.ts.map +1 -0
- package/dist/typescript/src/components/menu/components/menu-item.d.ts +3 -3
- package/dist/typescript/src/components/menu/components/menu-item.d.ts.map +1 -1
- package/dist/typescript/src/components/menu/components/menu-label.d.ts +9 -0
- package/dist/typescript/src/components/menu/components/menu-label.d.ts.map +1 -0
- package/dist/typescript/src/components/menu/components/menu-overlay.d.ts.map +1 -1
- package/dist/typescript/src/components/menu/components/menu-radio-group.d.ts +10 -0
- package/dist/typescript/src/components/menu/components/menu-radio-group.d.ts.map +1 -0
- package/dist/typescript/src/components/menu/components/menu-radio-item.d.ts +12 -0
- package/dist/typescript/src/components/menu/components/menu-radio-item.d.ts.map +1 -0
- package/dist/typescript/src/components/menu/components/menu-separator.d.ts +8 -0
- package/dist/typescript/src/components/menu/components/menu-separator.d.ts.map +1 -0
- package/dist/typescript/src/components/menu/components/menu-shortcut.d.ts +9 -0
- package/dist/typescript/src/components/menu/components/menu-shortcut.d.ts.map +1 -0
- package/dist/typescript/src/components/menu/context.d.ts +7 -1
- package/dist/typescript/src/components/menu/context.d.ts.map +1 -1
- package/dist/typescript/src/components/menu/index.d.ts +21 -0
- package/dist/typescript/src/components/menu/index.d.ts.map +1 -1
- package/dist/typescript/src/components/menu/types.d.ts +17 -2
- package/dist/typescript/src/components/menu/types.d.ts.map +1 -1
- package/dist/typescript/src/components/menu/use-organized-children.d.ts +3 -0
- package/dist/typescript/src/components/menu/use-organized-children.d.ts.map +1 -0
- package/dist/typescript/src/components/menu/variants/default.d.ts.map +1 -1
- package/dist/typescript/src/components/portal/portal.d.ts +2 -2
- package/dist/typescript/src/components/portal/portal.d.ts.map +1 -1
- package/dist/typescript/src/components/touchable/touchable.d.ts +2 -3
- package/dist/typescript/src/components/touchable/touchable.d.ts.map +1 -1
- package/dist/typescript/src/components/touchable/variants/default.d.ts.map +1 -1
- package/dist/typescript/src/themes/provider.d.ts +2 -2
- package/dist/typescript/src/themes/provider.d.ts.map +1 -1
- package/dist/typescript/src/types/element.types.d.ts +2 -0
- package/dist/typescript/src/types/element.types.d.ts.map +1 -1
- package/dist/typescript/src/utils/element-utils.d.ts +3 -0
- package/dist/typescript/src/utils/element-utils.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/components/icon/icon.tsx +9 -3
- package/src/components/menu/components/menu-checkbox-item.tsx +74 -0
- package/src/components/menu/components/menu-content.tsx +2 -1
- package/src/components/menu/components/menu-group.tsx +25 -0
- package/src/components/menu/components/menu-item.tsx +25 -9
- package/src/components/menu/components/menu-label.tsx +21 -0
- package/src/components/menu/components/menu-overlay.tsx +11 -2
- package/src/components/menu/components/menu-radio-group.tsx +35 -0
- package/src/components/menu/components/menu-radio-item.tsx +80 -0
- package/src/components/menu/components/menu-separator.tsx +22 -0
- package/src/components/menu/components/menu-shortcut.tsx +21 -0
- package/src/components/menu/context.ts +18 -1
- package/src/components/menu/index.ts +21 -0
- package/src/components/menu/types.ts +25 -2
- package/src/components/menu/use-organized-children.tsx +38 -0
- package/src/components/menu/variants/default.tsx +82 -6
- package/src/components/portal/portal.tsx +23 -5
- package/src/components/touchable/touchable.tsx +3 -9
- package/src/components/touchable/variants/default.tsx +2 -0
- package/src/themes/provider.tsx +2 -4
- package/src/types/element.types.ts +10 -1
- package/src/utils/element-utils.ts +12 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useState","Pressable","PressableVariants","jsx","_jsx","calculateState","props","isPressed","isHovered","isDisabled","Touchable","variant","style","children","rest","variantStyles","setIsHovered","handlePress","event","onPress","onHoverIn","e","onHoverOut","disabled","styleState","currentState","pressed","default"],"sourceRoot":"../../../../src","sources":["components/touchable/touchable.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,QAAQ,QAAQ,OAAO;AACvC,
|
|
1
|
+
{"version":3,"names":["React","useState","Pressable","PressableVariants","jsx","_jsx","calculateState","props","isPressed","isHovered","isDisabled","Touchable","variant","style","children","rest","variantStyles","setIsHovered","handlePress","event","onPress","onHoverIn","e","onHoverOut","disabled","styleState","currentState","pressed","default"],"sourceRoot":"../../../../src","sources":["components/touchable/touchable.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,QAAQ,QAAQ,OAAO;AACvC,SAASC,SAAS,QAA6B,cAAc;AAE7D,SAASC,iBAAiB,QAAQ,qBAAY;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAU/C,MAAMC,cAAc,GAAGA,CACrBC,KAAqB,EACrBC,SAAkB,EAClBC,SAAkB,KACC;EACnB,IAAIF,KAAK,CAACG,UAAU,EAAE,OAAO,UAAU;EACvC,IAAIF,SAAS,EAAE,OAAO,SAAS;EAC/B,IAAIC,SAAS,EAAE,OAAO,SAAS;EAC/B,OAAO,SAAS;AAClB,CAAC;AAED,OAAO,SAASE,SAASA,CAACJ,KAAqB,EAAE;EAC/C,MAAM;IAAEK,OAAO,GAAG,SAAS;IAAEF,UAAU;IAAEG,KAAK;IAAEC,QAAQ;IAAE,GAAGC;EAAK,CAAC,GAAGR,KAAK;EAC3E,MAAMS,aAAa,GAAGb,iBAAiB,CAACS,OAAO,CAAC,CAAC,CAAC;EAClD,MAAM,CAACH,SAAS,EAAEQ,YAAY,CAAC,GAAGhB,QAAQ,CAAC,KAAK,CAAC;EAEjD,MAAMiB,WAAsC,GAAIC,KAAK,IAAK;IACxD,IAAIT,UAAU,EAAE;IAChBK,IAAI,CAACK,OAAO,GAAGD,KAAK,CAAC;EACvB,CAAC;EAED,oBACEd,IAAA,CAACH,SAAS;IAAA,GACJa,IAAI;IACRK,OAAO,EAAEF,WAAY;IACrBG,SAAS,EAAGC,CAAC,IAAK;MAChBL,YAAY,CAAC,IAAI,CAAC;MAClBF,IAAI,CAACM,SAAS,GAAGC,CAAC,CAAC;IACrB,CAAE;IACFC,UAAU,EAAGD,CAAC,IAAK;MACjBL,YAAY,CAAC,KAAK,CAAC;MACnBF,IAAI,CAACQ,UAAU,GAAGD,CAAC,CAAC;IACtB,CAAE;IACFE,QAAQ,EAAEd,UAAW;IACrBG,KAAK,EAAGY,UAAU,IAAK;MACrB,MAAMC,YAAY,GAAGpB,cAAc,CACjCC,KAAK,EACLkB,UAAU,CAACE,OAAO,EAClBlB,SACF,CAAC;MAED,OAAO,CACLO,aAAa,EAAEY,OAAO,EACtBZ,aAAa,GAAGU,YAAY,CAAC,EAC7B,OAAOb,KAAK,KAAK,UAAU,GAAGA,KAAK,CAACY,UAAU,CAAC,GAAGZ,KAAK,CACxD;IACH,CAAE;IAAAC,QAAA,EAEDA;EAAQ,CACA,CAAC;AAEhB","ignoreList":[]}
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
export const usePressableVariantDefault = () => {
|
|
4
4
|
return {
|
|
5
5
|
default: {
|
|
6
|
-
cursor: "pointer"
|
|
6
|
+
cursor: "pointer",
|
|
7
|
+
pointerEvents: "box-only"
|
|
7
8
|
},
|
|
8
9
|
pressed: {
|
|
9
10
|
opacity: 0.8,
|
|
@@ -15,7 +16,8 @@ export const usePressableVariantDefault = () => {
|
|
|
15
16
|
opacity: 0.9
|
|
16
17
|
},
|
|
17
18
|
disabled: {
|
|
18
|
-
cursor: "not-allowed"
|
|
19
|
+
cursor: "not-allowed",
|
|
20
|
+
pointerEvents: "none"
|
|
19
21
|
}
|
|
20
22
|
};
|
|
21
23
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["usePressableVariantDefault","default","cursor","pressed","opacity","transform","scale","hovered","disabled"],"sourceRoot":"../../../../../src","sources":["components/touchable/variants/default.tsx"],"mappings":";;AAEA,OAAO,MAAMA,0BAA0B,GAAGA,CAAA,KAAuB;EAC/D,OAAO;IACLC,OAAO,EAAE;MACPC,MAAM,EAAE;
|
|
1
|
+
{"version":3,"names":["usePressableVariantDefault","default","cursor","pointerEvents","pressed","opacity","transform","scale","hovered","disabled"],"sourceRoot":"../../../../../src","sources":["components/touchable/variants/default.tsx"],"mappings":";;AAEA,OAAO,MAAMA,0BAA0B,GAAGA,CAAA,KAAuB;EAC/D,OAAO;IACLC,OAAO,EAAE;MACPC,MAAM,EAAE,SAAS;MACjBC,aAAa,EAAE;IACjB,CAAC;IACDC,OAAO,EAAE;MACPC,OAAO,EAAE,GAAG;MACZC,SAAS,EAAE,CAAC;QAAEC,KAAK,EAAE;MAAK,CAAC;IAC7B,CAAC;IACDC,OAAO,EAAE;MACPH,OAAO,EAAE;IACX,CAAC;IACDI,QAAQ,EAAE;MACRP,MAAM,EAAE,aAAoB;MAC5BC,aAAa,EAAE;IACjB;EACF,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["createContext","useContext","useEffect","useState","useColorScheme","defaultThemeAssets","mergeThemeAssets","jsx","_jsx","ThemeContext","ThemeProvider","props","children","theme","components","systemColorScheme","colorScheme","setColorScheme","themeAssets","colors","Provider","value","radius","fontFamily","letterSpacing","fontSize","useTheme","context","Error","useComponentsConfig"],"sourceRoot":"../../../src","sources":["themes/provider.tsx"],"mappings":";;AAAA,SACEA,aAAa,EAEbC,UAAU,EACVC,SAAS,EACTC,QAAQ,QACH,OAAO;AACd,SAASC,cAAc,QAAQ,cAAc;AAI7C,SAASC,kBAAkB,QAAQ,oBAAW;AAU9C,SAASC,gBAAgB,QAAQ,YAAS;AAAC,SAAAC,GAAA,IAAAC,IAAA;
|
|
1
|
+
{"version":3,"names":["createContext","useContext","useEffect","useState","useColorScheme","defaultThemeAssets","mergeThemeAssets","jsx","_jsx","ThemeContext","ThemeProvider","props","children","theme","components","systemColorScheme","colorScheme","setColorScheme","themeAssets","colors","Provider","value","radius","fontFamily","letterSpacing","fontSize","useTheme","context","Error","useComponentsConfig"],"sourceRoot":"../../../src","sources":["themes/provider.tsx"],"mappings":";;AAAA,SACEA,aAAa,EAEbC,UAAU,EACVC,SAAS,EACTC,QAAQ,QACH,OAAO;AACd,SAASC,cAAc,QAAQ,cAAc;AAI7C,SAASC,kBAAkB,QAAQ,oBAAW;AAU9C,SAASC,gBAAgB,QAAQ,YAAS;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAmB3C,MAAMC,YAAY,gBAAGT,aAAa,CAAsB,IAAI,CAAC;AAO7D,OAAO,MAAMU,aAAa,GAAIC,KAAyB,IAAK;EAC1D,MAAM;IAAEC,QAAQ;IAAEC,KAAK;IAAEC;EAAW,CAAC,GAAGH,KAAK;EAE7C,MAAMI,iBAAiB,GAAGX,cAAc,CAAC,CAAC;EAC1C,MAAM,CAACY,WAAW,EAAEC,cAAc,CAAC,GAAGd,QAAQ,CAC5CY,iBAAiB,KAAK,MAAM,GAAG,MAAM,GAAG,OAC1C,CAAC;EAED,MAAMG,WAAW,GAAGL,KAAK,GACrBP,gBAAgB,CAACD,kBAAkB,EAAEQ,KAAK,CAAC,GAC3CR,kBAAkB;EAEtB,MAAMc,MAAM,GAAGD,WAAW,CAACC,MAAM,CAACH,WAAW,CAAC;EAE9Cd,SAAS,CAAC,MAAM;IACd,IAAIa,iBAAiB,EAAE;MACrBE,cAAc,CAACF,iBAAiB,KAAK,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;IACjE;EACF,CAAC,EAAE,CAACA,iBAAiB,CAAC,CAAC;EAEvB,oBACEP,IAAA,CAACC,YAAY,CAACW,QAAQ;IACpBC,KAAK,EAAE;MACLL,WAAW;MACXC,cAAc;MACdE,MAAM;MACNG,MAAM,EAAEJ,WAAW,CAACI,MAAM;MAC1BC,UAAU,EAAEL,WAAW,CAACK,UAAU;MAClCC,aAAa,EAAEN,WAAW,CAACM,aAAa;MACxCC,QAAQ,EAAEP,WAAW,CAACO,QAAQ;MAC9BX;IACF,CAAE;IAAAF,QAAA,EAEDA;EAAQ,CACY,CAAC;AAE5B,CAAC;AAED,OAAO,MAAMc,QAAQ,GAAGA,CAAA,KAAM;EAC5B,MAAMC,OAAO,GAAG1B,UAAU,CAACQ,YAAY,CAAC;EACxC,IAAI,CAACkB,OAAO,EAAE;IACZ,MAAM,IAAIC,KAAK,CAAC,8CAA8C,CAAC;EACjE;EACA,OAAOD,OAAO;AAChB,CAAC;AAED,OAAO,MAAME,mBAAmB,GAAGA,CAAA,KAAM;EACvC,MAAMF,OAAO,GAAG1B,UAAU,CAACQ,YAAY,CAAC;EACxC,IAAI,CAACkB,OAAO,EAAE;IACZ,MAAM,IAAIC,KAAK,CAAC,yDAAyD,CAAC;EAC5E;EACA,OAAOD,OAAO,CAACb,UAAU;AAC3B,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React from "react";
|
|
4
|
+
export const getElementProp = (element, propName) => {
|
|
5
|
+
if (! /*#__PURE__*/React.isValidElement(element)) return undefined;
|
|
6
|
+
if (!element.props) return undefined;
|
|
7
|
+
if (typeof element.props !== "object") return undefined;
|
|
8
|
+
if (!(propName in element.props)) return undefined;
|
|
9
|
+
return element.props[propName];
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=element-utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","getElementProp","element","propName","isValidElement","undefined","props"],"sourceRoot":"../../../src","sources":["utils/element-utils.ts"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,OAAO,MAAMC,cAAc,GAAGA,CAC5BC,OAAwB,EACxBC,QAAgB,KACgC;EAChD,IAAI,eAACH,KAAK,CAACI,cAAc,CAACF,OAAO,CAAC,EAAE,OAAOG,SAAS;EACpD,IAAI,CAACH,OAAO,CAACI,KAAK,EAAE,OAAOD,SAAS;EACpC,IAAI,OAAOH,OAAO,CAACI,KAAK,KAAK,QAAQ,EAAE,OAAOD,SAAS;EACvD,IAAI,EAAEF,QAAQ,IAAID,OAAO,CAACI,KAAK,CAAC,EAAE,OAAOD,SAAS;EAClD,OAAQH,OAAO,CAACI,KAAK,CAASH,QAAQ,CAAC;AACzC,CAAC","ignoreList":[]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { PropsWithRequiredRender, SvgProps } from "../../types/props.types";
|
|
2
1
|
import React from "react";
|
|
2
|
+
import type { PropsWithRequiredRender, SvgProps } from "../../types/props.types";
|
|
3
3
|
import { IconVariants } from "./variants";
|
|
4
4
|
export type IconProps = SvgProps & {
|
|
5
5
|
variant?: keyof typeof IconVariants;
|
|
6
6
|
};
|
|
7
|
-
export declare
|
|
7
|
+
export declare const Icon: React.FC<PropsWithRequiredRender<IconProps>>;
|
|
8
8
|
//# sourceMappingURL=icon.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../../../../src/components/icon/icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../../../../src/components/icon/icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EACV,uBAAuB,EACvB,QAAQ,EACT,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE1C,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG;IACjC,OAAO,CAAC,EAAE,MAAM,OAAO,YAAY,CAAC;CACrC,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAa7D,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { type StyleProp, type ViewStyle } from "react-native";
|
|
3
|
+
export interface MenuCheckboxItemProps {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
checked: boolean;
|
|
6
|
+
onCheckedChange: (checked: boolean) => void;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
closeOnPress?: boolean;
|
|
9
|
+
render?: (props: MenuCheckboxItemProps) => React.ReactNode;
|
|
10
|
+
style?: StyleProp<ViewStyle>;
|
|
11
|
+
}
|
|
12
|
+
export declare function MenuCheckboxItem(props: MenuCheckboxItemProps): React.JSX.Element;
|
|
13
|
+
//# sourceMappingURL=menu-checkbox-item.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"menu-checkbox-item.d.ts","sourceRoot":"","sources":["../../../../../../src/components/menu/components/menu-checkbox-item.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AACxC,OAAO,EAAmB,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAK/E,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,OAAO,EAAE,OAAO,CAAC;IACjB,eAAe,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAC5C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,qBAAqB,KAAK,KAAK,CAAC,SAAS,CAAC;IAC3D,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAWD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,qBAgD5D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu-content.d.ts","sourceRoot":"","sources":["../../../../../../src/components/menu/components/menu-content.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"menu-content.d.ts","sourceRoot":"","sources":["../../../../../../src/components/menu/components/menu-content.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,SAAS,EAAQ,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAIpE,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE3B,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,KAAK,CAAC,SAAS,CAAC;IAEtD,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,qBAyBlD"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { type StyleProp, type ViewStyle } from "react-native";
|
|
3
|
+
export interface MenuGroupProps {
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
render?: (props: MenuGroupProps) => React.ReactNode;
|
|
6
|
+
style?: StyleProp<ViewStyle>;
|
|
7
|
+
}
|
|
8
|
+
export declare function MenuGroup(props: MenuGroupProps): React.JSX.Element;
|
|
9
|
+
//# sourceMappingURL=menu-group.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"menu-group.d.ts","sourceRoot":"","sources":["../../../../../../src/components/menu/components/menu-group.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAQ,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAGpE,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,KAAK,CAAC,SAAS,CAAC;IACpD,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,qBAc9C"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { type StyleProp, type
|
|
2
|
+
import { type StyleProp, type ViewStyle } from "react-native";
|
|
3
3
|
export interface MenuItemProps {
|
|
4
|
-
children:
|
|
4
|
+
children: React.ReactNode;
|
|
5
5
|
onPress?: () => void;
|
|
6
6
|
render?: (props: MenuItemProps) => React.ReactNode;
|
|
7
|
-
style?: StyleProp<
|
|
7
|
+
style?: StyleProp<ViewStyle>;
|
|
8
8
|
}
|
|
9
9
|
export declare function MenuItem(props: MenuItemProps): React.JSX.Element;
|
|
10
10
|
//# sourceMappingURL=menu-item.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu-item.d.ts","sourceRoot":"","sources":["../../../../../../src/components/menu/components/menu-item.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AACxC,OAAO,
|
|
1
|
+
{"version":3,"file":"menu-item.d.ts","sourceRoot":"","sources":["../../../../../../src/components/menu/components/menu-item.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AACxC,OAAO,EAAa,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAKzE,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAErB,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,KAAK,CAAC,SAAS,CAAC;IACnD,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AASD,wBAAgB,QAAQ,CAAC,KAAK,EAAE,aAAa,qBAsC5C"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { type StyleProp, type TextStyle } from "react-native";
|
|
3
|
+
export interface MenuLabelProps {
|
|
4
|
+
children: string;
|
|
5
|
+
render?: (props: MenuLabelProps) => React.ReactNode;
|
|
6
|
+
style?: StyleProp<TextStyle>;
|
|
7
|
+
}
|
|
8
|
+
export declare function MenuLabel(props: MenuLabelProps): React.JSX.Element;
|
|
9
|
+
//# sourceMappingURL=menu-label.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"menu-label.d.ts","sourceRoot":"","sources":["../../../../../../src/components/menu/components/menu-label.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAQ,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAGpE,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,KAAK,CAAC,SAAS,CAAC;IACpD,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,qBAU9C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu-overlay.d.ts","sourceRoot":"","sources":["../../../../../../src/components/menu/components/menu-overlay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,
|
|
1
|
+
{"version":3,"file":"menu-overlay.d.ts","sourceRoot":"","sources":["../../../../../../src/components/menu/components/menu-overlay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAEL,KAAK,SAAS,EAEd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAGtB,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE3B,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,KAAK,CAAC,YAAY,CAAC;IAEzD,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,qBAoBlD"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { type StyleProp, type ViewStyle } from "react-native";
|
|
3
|
+
export interface MenuRadioGroupProps {
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
value: string;
|
|
6
|
+
onValueChange: (value: string) => void;
|
|
7
|
+
style?: StyleProp<ViewStyle>;
|
|
8
|
+
}
|
|
9
|
+
export declare function MenuRadioGroup(props: MenuRadioGroupProps): React.JSX.Element;
|
|
10
|
+
//# sourceMappingURL=menu-radio-group.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"menu-radio-group.d.ts","sourceRoot":"","sources":["../../../../../../src/components/menu/components/menu-radio-group.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AACvC,OAAO,EAAQ,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAGpE,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,qBAuBxD"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { type StyleProp, type ViewStyle } from "react-native";
|
|
3
|
+
export interface MenuRadioItemProps {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
value: string;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
closeOnPress?: boolean;
|
|
8
|
+
render?: (props: MenuRadioItemProps) => React.ReactNode;
|
|
9
|
+
style?: StyleProp<ViewStyle>;
|
|
10
|
+
}
|
|
11
|
+
export declare function MenuRadioItem(props: MenuRadioItemProps): React.JSX.Element;
|
|
12
|
+
//# sourceMappingURL=menu-radio-item.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"menu-radio-item.d.ts","sourceRoot":"","sources":["../../../../../../src/components/menu/components/menu-radio-item.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AACxC,OAAO,EAAmB,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAK/E,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,kBAAkB,KAAK,KAAK,CAAC,SAAS,CAAC;IACxD,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAaD,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,qBAqDtD"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { type StyleProp, type ViewStyle } from "react-native";
|
|
3
|
+
export interface MenuSeparatorProps {
|
|
4
|
+
render?: (props: MenuSeparatorProps) => React.ReactNode;
|
|
5
|
+
style?: StyleProp<ViewStyle>;
|
|
6
|
+
}
|
|
7
|
+
export declare function MenuSeparator(props: MenuSeparatorProps): React.JSX.Element;
|
|
8
|
+
//# sourceMappingURL=menu-separator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"menu-separator.d.ts","sourceRoot":"","sources":["../../../../../../src/components/menu/components/menu-separator.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAQ,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAGpE,MAAM,WAAW,kBAAkB;IACjC,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,kBAAkB,KAAK,KAAK,CAAC,SAAS,CAAC;IACxD,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,qBAYtD"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { type StyleProp, type TextStyle } from "react-native";
|
|
3
|
+
export interface MenuShortcutProps {
|
|
4
|
+
children: string;
|
|
5
|
+
render?: (props: MenuShortcutProps) => React.ReactNode;
|
|
6
|
+
style?: StyleProp<TextStyle>;
|
|
7
|
+
}
|
|
8
|
+
export declare function MenuShortcut(props: MenuShortcutProps): React.JSX.Element;
|
|
9
|
+
//# sourceMappingURL=menu-shortcut.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"menu-shortcut.d.ts","sourceRoot":"","sources":["../../../../../../src/components/menu/components/menu-shortcut.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAQ,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAGpE,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,KAAK,CAAC,SAAS,CAAC;IACvD,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,qBAUpD"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { LayoutPosition } from "../../hooks/use-relative-position";
|
|
2
1
|
import { type Dispatch } from "react";
|
|
3
2
|
import type { LayoutRectangle } from "react-native";
|
|
3
|
+
import type { LayoutPosition } from "../../hooks/use-relative-position";
|
|
4
4
|
import type { MenuStyles } from "./types";
|
|
5
5
|
export interface MenuContext {
|
|
6
6
|
isOpen: boolean;
|
|
@@ -13,4 +13,10 @@ export interface MenuContext {
|
|
|
13
13
|
}
|
|
14
14
|
export declare const MenuContext: import("react").Context<MenuContext | undefined>;
|
|
15
15
|
export declare const useMenu: () => MenuContext;
|
|
16
|
+
export interface MenuRadioGroupContextValue {
|
|
17
|
+
value: string;
|
|
18
|
+
onValueChange: (value: string) => void;
|
|
19
|
+
}
|
|
20
|
+
export declare const MenuRadioGroupContext: import("react").Context<MenuRadioGroupContextValue | undefined>;
|
|
21
|
+
export declare const useMenuRadioGroup: () => MenuRadioGroupContextValue;
|
|
16
22
|
//# sourceMappingURL=context.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../../src/components/menu/context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../../src/components/menu/context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,QAAQ,EAAc,MAAM,OAAO,CAAC;AACjE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,EAAE,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;IACnD,eAAe,EAAE,cAAc,CAAC;IAChC,kBAAkB,EAAE,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC,CAAC;IACnE,aAAa,EAAE,eAAe,CAAC;IAC/B,gBAAgB,EAAE,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC,CAAC,CAAC;IAElE,MAAM,CAAC,EAAE,UAAU,CAAC;CACrB;AAED,eAAO,MAAM,WAAW,kDAAoD,CAAC;AAE7E,eAAO,MAAM,OAAO,mBAMnB,CAAC;AAEF,MAAM,WAAW,0BAA0B;IACzC,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACxC;AAED,eAAO,MAAM,qBAAqB,iEAEtB,CAAC;AAEb,eAAO,MAAM,iBAAiB,kCAM7B,CAAC"}
|
|
@@ -1,8 +1,15 @@
|
|
|
1
|
+
import { MenuCheckboxItem } from "./components/menu-checkbox-item";
|
|
1
2
|
import { MenuContent } from "./components/menu-content";
|
|
3
|
+
import { MenuGroup } from "./components/menu-group";
|
|
2
4
|
import { MenuItem } from "./components/menu-item";
|
|
5
|
+
import { MenuLabel } from "./components/menu-label";
|
|
3
6
|
import { MenuOverlay } from "./components/menu-overlay";
|
|
4
7
|
import { MenuPortal } from "./components/menu-portal";
|
|
8
|
+
import { MenuRadioGroup } from "./components/menu-radio-group";
|
|
9
|
+
import { MenuRadioItem } from "./components/menu-radio-item";
|
|
5
10
|
import { MenuRoot } from "./components/menu-root";
|
|
11
|
+
import { MenuSeparator } from "./components/menu-separator";
|
|
12
|
+
import { MenuShortcut } from "./components/menu-shortcut";
|
|
6
13
|
export declare const Menu: {
|
|
7
14
|
Root: typeof MenuRoot;
|
|
8
15
|
Trigger: import("react").ForwardRefExoticComponent<import(".").MenuTriggerProps & import("react").RefAttributes<import("./components/menu-trigger").MenuTriggerRef>>;
|
|
@@ -10,12 +17,26 @@ export declare const Menu: {
|
|
|
10
17
|
Overlay: typeof MenuOverlay;
|
|
11
18
|
Content: typeof MenuContent;
|
|
12
19
|
Item: typeof MenuItem;
|
|
20
|
+
Group: typeof MenuGroup;
|
|
21
|
+
Label: typeof MenuLabel;
|
|
22
|
+
Separator: typeof MenuSeparator;
|
|
23
|
+
CheckboxItem: typeof MenuCheckboxItem;
|
|
24
|
+
RadioGroup: typeof MenuRadioGroup;
|
|
25
|
+
RadioItem: typeof MenuRadioItem;
|
|
26
|
+
Shortcut: typeof MenuShortcut;
|
|
13
27
|
};
|
|
28
|
+
export type { MenuCheckboxItemProps } from "./components/menu-checkbox-item";
|
|
14
29
|
export type { MenuContentProps } from "./components/menu-content";
|
|
30
|
+
export type { MenuGroupProps } from "./components/menu-group";
|
|
15
31
|
export type { MenuItemProps } from "./components/menu-item";
|
|
32
|
+
export type { MenuLabelProps } from "./components/menu-label";
|
|
16
33
|
export type { MenuOverlayProps } from "./components/menu-overlay";
|
|
17
34
|
export type { MenuPortalProps } from "./components/menu-portal";
|
|
35
|
+
export type { MenuRadioGroupProps } from "./components/menu-radio-group";
|
|
36
|
+
export type { MenuRadioItemProps } from "./components/menu-radio-item";
|
|
18
37
|
export type { MenuRootProps } from "./components/menu-root";
|
|
38
|
+
export type { MenuSeparatorProps } from "./components/menu-separator";
|
|
39
|
+
export type { MenuShortcutProps } from "./components/menu-shortcut";
|
|
19
40
|
export type { MenuTriggerProps } from "./components/menu-trigger";
|
|
20
41
|
export type { MenuStyles } from "./types";
|
|
21
42
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/menu/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/menu/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAG1D,eAAO,MAAM,IAAI;;;;;;;;;;;;;;CAchB,CAAC;AAEF,YAAY,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAC7E,YAAY,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAClE,YAAY,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,YAAY,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC5D,YAAY,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,YAAY,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAClE,YAAY,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAChE,YAAY,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACzE,YAAY,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AACvE,YAAY,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC5D,YAAY,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACtE,YAAY,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpE,YAAY,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAClE,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -1,10 +1,25 @@
|
|
|
1
|
+
import type { StyleProp, TextStyle, ViewStyle } from "react-native";
|
|
2
|
+
import type { SvgProps } from "../../types/props.types";
|
|
1
3
|
import type { MenuContentProps } from "./components/menu-content";
|
|
2
|
-
import type { MenuItemProps } from "./components/menu-item";
|
|
3
4
|
import type { MenuOverlayProps } from "./components/menu-overlay";
|
|
4
5
|
export type MenuButtonState = "default" | "hovered";
|
|
6
|
+
export type MenuCheckboxItemState = "default" | "hovered" | "disabled";
|
|
7
|
+
export type MenuRadioItemState = "default" | "hovered" | "selected" | "disabled";
|
|
8
|
+
export type MenuRadioIndicatorState = "default" | "selected";
|
|
5
9
|
export interface MenuStyles {
|
|
6
10
|
content?: MenuContentProps["style"];
|
|
7
|
-
item?: Partial<Record<MenuButtonState,
|
|
11
|
+
item?: Partial<Record<MenuButtonState, StyleProp<ViewStyle>>>;
|
|
12
|
+
itemText?: StyleProp<TextStyle>;
|
|
13
|
+
itemIcon?: SvgProps;
|
|
8
14
|
overlay?: MenuOverlayProps["style"];
|
|
15
|
+
group?: StyleProp<ViewStyle>;
|
|
16
|
+
label?: StyleProp<TextStyle>;
|
|
17
|
+
separator?: StyleProp<ViewStyle>;
|
|
18
|
+
checkboxItem?: Partial<Record<MenuCheckboxItemState, StyleProp<ViewStyle>>>;
|
|
19
|
+
checkboxIndicator?: StyleProp<TextStyle>;
|
|
20
|
+
radioGroup?: StyleProp<ViewStyle>;
|
|
21
|
+
radioItem?: Partial<Record<MenuRadioItemState, StyleProp<ViewStyle>>>;
|
|
22
|
+
radioIndicator?: Partial<Record<MenuRadioIndicatorState, StyleProp<ViewStyle>>>;
|
|
23
|
+
shortcut?: StyleProp<TextStyle>;
|
|
9
24
|
}
|
|
10
25
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/menu/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/menu/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACpE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAElE,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,SAAS,CAAC;AACpD,MAAM,MAAM,qBAAqB,GAAG,SAAS,GAAG,SAAS,GAAG,UAAU,CAAC;AACvE,MAAM,MAAM,kBAAkB,GAC1B,SAAS,GACT,SAAS,GACT,UAAU,GACV,UAAU,CAAC;AAEf,MAAM,MAAM,uBAAuB,GAAG,SAAS,GAAG,UAAU,CAAC;AAE7D,MAAM,WAAW,UAAU;IACzB,OAAO,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;IACpC,IAAI,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,eAAe,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IAC9D,QAAQ,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAChC,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,OAAO,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;IAEpC,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,SAAS,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACjC,YAAY,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,qBAAqB,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IAC5E,iBAAiB,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACzC,UAAU,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAClC,SAAS,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,kBAAkB,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IACtE,cAAc,CAAC,EAAE,OAAO,CACtB,MAAM,CAAC,uBAAuB,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC,CACtD,CAAC;IACF,QAAQ,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CACjC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export declare function useOrganizedChildren(children: React.ReactNode): number | bigint | boolean | any[] | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | React.JSX.Element | null | undefined;
|
|
3
|
+
//# sourceMappingURL=use-organized-children.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-organized-children.d.ts","sourceRoot":"","sources":["../../../../../src/components/menu/use-organized-children.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAMvC,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,KAAK,CAAC,SAAS,kSA+B7D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../../../../../../src/components/menu/variants/default.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,OAAO,CAAC;AAGxC,eAAO,MAAM,qBAAqB,QAAO,
|
|
1
|
+
{"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../../../../../../src/components/menu/variants/default.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,OAAO,CAAC;AAGxC,eAAO,MAAM,qBAAqB,QAAO,UA4GxC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { type PortalHostProps, type PortalProps } from "./portal.constants";
|
|
2
|
-
export declare function PortalHost({ name, container }: PortalHostProps): import("react").JSX.Element | null;
|
|
3
|
-
export declare function Portal({ name, hostName, children }: PortalProps): import("react").JSX.Element;
|
|
2
|
+
export declare function PortalHost({ name, container, }: PortalHostProps): import("react").JSX.Element | null;
|
|
3
|
+
export declare function Portal({ name, hostName, children, }: PortalProps): import("react").JSX.Element;
|
|
4
4
|
//# sourceMappingURL=portal.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"portal.d.ts","sourceRoot":"","sources":["../../../../../src/components/portal/portal.tsx"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"portal.d.ts","sourceRoot":"","sources":["../../../../../src/components/portal/portal.tsx"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,WAAW,EACjB,MAAM,oBAAoB,CAAC;AAuD5B,wBAAgB,UAAU,CAAC,EACzB,IAA0B,EAC1B,SAAS,GACV,EAAE,eAAe,sCAyBjB;AAED,wBAAgB,MAAM,CAAC,EACrB,IAAI,EACJ,QAA8B,EAC9B,QAAQ,GACT,EAAE,WAAW,+BAYb"}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { type PressableProps
|
|
2
|
+
import { type PressableProps } from "react-native";
|
|
3
3
|
import { PressableVariants } from "./variants";
|
|
4
|
-
type ExtendablePressableProps = Omit<PressableProps, "
|
|
4
|
+
type ExtendablePressableProps = Omit<PressableProps, "disabled">;
|
|
5
5
|
export interface TouchableProps extends ExtendablePressableProps {
|
|
6
6
|
variant?: keyof typeof PressableVariants;
|
|
7
7
|
children?: React.ReactNode;
|
|
8
8
|
isDisabled?: boolean;
|
|
9
|
-
style?: (state: PressableStateCallbackType) => ViewStyle;
|
|
10
9
|
}
|
|
11
10
|
export declare function Touchable(props: TouchableProps): React.JSX.Element;
|
|
12
11
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"touchable.d.ts","sourceRoot":"","sources":["../../../../../src/components/touchable/touchable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AACxC,OAAO,
|
|
1
|
+
{"version":3,"file":"touchable.d.ts","sourceRoot":"","sources":["../../../../../src/components/touchable/touchable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AACxC,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAE/C,KAAK,wBAAwB,GAAG,IAAI,CAAC,cAAc,EAAE,UAAU,CAAC,CAAC;AAEjE,MAAM,WAAW,cAAe,SAAQ,wBAAwB;IAC9D,OAAO,CAAC,EAAE,MAAM,OAAO,iBAAiB,CAAC;IACzC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAaD,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,qBAwC9C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../../../../../../src/components/touchable/variants/default.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAEhD,eAAO,MAAM,0BAA0B,QAAO,
|
|
1
|
+
{"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../../../../../../src/components/touchable/variants/default.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAEhD,eAAO,MAAM,0BAA0B,QAAO,eAkB7C,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type PropsWithChildren } from "react";
|
|
2
2
|
import type { ToastVariants } from "../components/toast/variants";
|
|
3
|
-
import type {
|
|
3
|
+
import type { IconComponent } from "../types/element.types";
|
|
4
4
|
import type { DeepPartial } from "../types/util.types";
|
|
5
5
|
import type { Colors, ColorScheme, FontFamily, FontSize, LetterSpacing, Radius, ThemeAssets } from "./types";
|
|
6
6
|
interface ThemeContext {
|
|
@@ -15,7 +15,7 @@ interface ThemeContext {
|
|
|
15
15
|
}
|
|
16
16
|
export interface ComponentsConfig {
|
|
17
17
|
toast?: {
|
|
18
|
-
icons?: Partial<Record<keyof typeof ToastVariants,
|
|
18
|
+
icons?: Partial<Record<keyof typeof ToastVariants, IconComponent>>;
|
|
19
19
|
};
|
|
20
20
|
}
|
|
21
21
|
declare const ThemeContext: import("react").Context<ThemeContext | null>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../../../src/themes/provider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,iBAAiB,EAIvB,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../../../src/themes/provider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,iBAAiB,EAIvB,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEvD,OAAO,KAAK,EACV,MAAM,EACN,WAAW,EACX,UAAU,EACV,QAAQ,EACR,aAAa,EACb,MAAM,EACN,WAAW,EACZ,MAAM,SAAS,CAAC;AAGjB,UAAU,YAAY;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,UAAU,CAAC;IACvB,WAAW,EAAE,WAAW,CAAC;IACzB,aAAa,EAAE,aAAa,CAAC;IAC7B,QAAQ,EAAE,QAAQ,CAAC;IACnB,cAAc,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;IAC9C,UAAU,CAAC,EAAE,gBAAgB,CAAC;CAC/B;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,CAAC,EAAE;QACN,KAAK,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,OAAO,aAAa,EAAE,aAAa,CAAC,CAAC,CAAC;KACpE,CAAC;CACH;AAED,QAAA,MAAM,YAAY,8CAA2C,CAAC;AAE9D,MAAM,WAAW,kBAAmB,SAAQ,iBAAiB;IAC3D,KAAK,CAAC,EAAE,WAAW,CAAC,WAAW,CAAC,CAAC;IACjC,UAAU,CAAC,EAAE,gBAAgB,CAAC;CAC/B;AAED,eAAO,MAAM,aAAa,GAAI,OAAO,kBAAkB,gCAoCtD,CAAC;AAEF,eAAO,MAAM,QAAQ,oBAMpB,CAAC;AAEF,eAAO,MAAM,mBAAmB,oCAM/B,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { HostInstance } from "react-native";
|
|
2
|
+
import type { SvgProps } from "./props.types";
|
|
2
3
|
export type ViewRef = HostInstance;
|
|
3
4
|
export type TextInputRef = HostInstance & {
|
|
4
5
|
focus: () => void;
|
|
@@ -10,4 +11,5 @@ export type TextInputRef = HostInstance & {
|
|
|
10
11
|
};
|
|
11
12
|
export type TextChildren = string | number | boolean | null | undefined | string[];
|
|
12
13
|
export type ElementChildren = React.ReactElement | React.ReactElement[];
|
|
14
|
+
export type IconComponent = (props: SvgProps) => React.ReactElement;
|
|
13
15
|
//# sourceMappingURL=element.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"element.types.d.ts","sourceRoot":"","sources":["../../../../src/types/element.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"element.types.d.ts","sourceRoot":"","sources":["../../../../src/types/element.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAE9C,MAAM,MAAM,OAAO,GAAG,YAAY,CAAC;AACnC,MAAM,MAAM,YAAY,GAAG,YAAY,GAAG;IACxC,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,SAAS,EAAE,MAAM,OAAO,CAAC;IACzB,YAAY,EAAE,MAAM,YAAY,CAAC;IACjC,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CACrD,CAAC;AAEF,MAAM,MAAM,YAAY,GACpB,MAAM,GACN,MAAM,GACN,OAAO,GACP,IAAI,GACJ,SAAS,GACT,MAAM,EAAE,CAAC;AACb,MAAM,MAAM,eAAe,GAAG,KAAK,CAAC,YAAY,GAAG,KAAK,CAAC,YAAY,EAAE,CAAC;AAExE,MAAM,MAAM,aAAa,GAAG,CAAC,KAAK,EAAE,QAAQ,KAAK,KAAK,CAAC,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"element-utils.d.ts","sourceRoot":"","sources":["../../../../src/utils/element-utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,eAAO,MAAM,cAAc,GAAI,CAAC,SAAS,KAAK,CAAC,WAAW,EACxD,SAAS,KAAK,CAAC,SAAS,EACxB,UAAU,MAAM,KACf,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,SAMpC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,12 +1,18 @@
|
|
|
1
|
-
import type { PropsWithRequiredRender, SvgProps } from "../../types/props.types";
|
|
2
1
|
import React from "react";
|
|
2
|
+
import type {
|
|
3
|
+
PropsWithRequiredRender,
|
|
4
|
+
SvgProps,
|
|
5
|
+
} from "../../types/props.types";
|
|
3
6
|
import { IconVariants } from "./variants";
|
|
4
7
|
|
|
5
8
|
export type IconProps = SvgProps & {
|
|
6
9
|
variant?: keyof typeof IconVariants;
|
|
7
10
|
};
|
|
8
11
|
|
|
9
|
-
export
|
|
12
|
+
export const Icon: React.FC<PropsWithRequiredRender<IconProps>> = ({
|
|
13
|
+
render: Component,
|
|
14
|
+
...props
|
|
15
|
+
}) => {
|
|
10
16
|
const variantProps = IconVariants[props.variant ?? "default"]();
|
|
11
17
|
const composedProps: SvgProps = {
|
|
12
18
|
...variantProps,
|
|
@@ -16,4 +22,4 @@ export function Icon({ render: Component, ...props }: PropsWithRequiredRender<Ic
|
|
|
16
22
|
};
|
|
17
23
|
|
|
18
24
|
return <Component {...composedProps} />;
|
|
19
|
-
}
|
|
25
|
+
};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import React, { useState } from "react";
|
|
2
|
+
import { Pressable, Text, type StyleProp, type ViewStyle } from "react-native";
|
|
3
|
+
import { useMenu } from "../context";
|
|
4
|
+
import type { MenuCheckboxItemState } from "../types";
|
|
5
|
+
import { useOrganizedChildren } from "../use-organized-children";
|
|
6
|
+
|
|
7
|
+
export interface MenuCheckboxItemProps {
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
checked: boolean;
|
|
10
|
+
onCheckedChange: (checked: boolean) => void;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
closeOnPress?: boolean;
|
|
13
|
+
render?: (props: MenuCheckboxItemProps) => React.ReactNode;
|
|
14
|
+
style?: StyleProp<ViewStyle>;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const calculateState = (
|
|
18
|
+
isHovered: boolean,
|
|
19
|
+
disabled?: boolean,
|
|
20
|
+
): MenuCheckboxItemState => {
|
|
21
|
+
if (disabled) return "disabled";
|
|
22
|
+
if (isHovered) return "hovered";
|
|
23
|
+
return "default";
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export function MenuCheckboxItem(props: MenuCheckboxItemProps) {
|
|
27
|
+
const menu = useMenu();
|
|
28
|
+
const [isHovered, setIsHovered] = useState(false);
|
|
29
|
+
const state = calculateState(isHovered, props.disabled);
|
|
30
|
+
|
|
31
|
+
const composedStyle = [
|
|
32
|
+
menu.styles?.checkboxItem?.default,
|
|
33
|
+
menu.styles?.checkboxItem?.[state],
|
|
34
|
+
props.style,
|
|
35
|
+
];
|
|
36
|
+
|
|
37
|
+
const handlePress = () => {
|
|
38
|
+
if (props.disabled) return;
|
|
39
|
+
props.onCheckedChange(!props.checked);
|
|
40
|
+
if (props.closeOnPress) {
|
|
41
|
+
menu.setIsOpen(false);
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
const organizedChildren = useOrganizedChildren(props.children);
|
|
46
|
+
|
|
47
|
+
if (props.render) {
|
|
48
|
+
return (
|
|
49
|
+
<>
|
|
50
|
+
{props.render({
|
|
51
|
+
...props,
|
|
52
|
+
children: organizedChildren,
|
|
53
|
+
})}
|
|
54
|
+
</>
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
return (
|
|
59
|
+
<Pressable
|
|
60
|
+
onPress={handlePress}
|
|
61
|
+
onPointerEnter={() => setIsHovered(true)}
|
|
62
|
+
onPointerLeave={() => setIsHovered(false)}
|
|
63
|
+
disabled={props.disabled}
|
|
64
|
+
accessibilityRole="checkbox"
|
|
65
|
+
accessibilityState={{ checked: props.checked, disabled: props.disabled }}
|
|
66
|
+
style={composedStyle}
|
|
67
|
+
>
|
|
68
|
+
{organizedChildren}
|
|
69
|
+
<Text style={menu.styles?.checkboxIndicator}>
|
|
70
|
+
{props.checked ? "✓" : " "}
|
|
71
|
+
</Text>
|
|
72
|
+
</Pressable>
|
|
73
|
+
);
|
|
74
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useRelativePosition } from "../../../hooks/use-relative-position";
|
|
2
1
|
import React from "react";
|
|
3
2
|
import { type StyleProp, View, type ViewStyle } from "react-native";
|
|
3
|
+
import { useRelativePosition } from "../../../hooks/use-relative-position";
|
|
4
4
|
import { useMenu } from "../context";
|
|
5
5
|
|
|
6
6
|
export interface MenuContentProps {
|
|
@@ -26,6 +26,7 @@ export function MenuContent(props: MenuContentProps) {
|
|
|
26
26
|
const composedStyle = [positionStyle, menu.styles?.content, props.style];
|
|
27
27
|
|
|
28
28
|
const Component = props.render ?? View;
|
|
29
|
+
|
|
29
30
|
return (
|
|
30
31
|
<Component
|
|
31
32
|
{...props}
|