@react-xp/aeiou 1.0.0-beta.3 → 1.0.0-beta.4
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/cjs/components/a/a.native.js +6 -3
- package/dist/cjs/components/a/a.web.js +2 -3
- package/dist/cjs/components/d/d.native.js +20 -5
- package/dist/cjs/components/d/d.web.js +21 -6
- package/dist/cjs/components/e/e.native.js +2 -3
- package/dist/cjs/components/e/e.web.js +4 -3
- package/dist/cjs/components/i/i.native.js +4 -3
- package/dist/cjs/components/i/i.web.js +8 -3
- package/dist/cjs/components/l/l.web.js +2 -3
- package/dist/cjs/components/o/o.native.js +4 -3
- package/dist/cjs/components/o/o.web.js +2 -3
- package/dist/cjs/components/p/p.native.js +4 -3
- package/dist/cjs/components/p/p.web.js +4 -3
- package/dist/cjs/components/s/s.native.js +2 -3
- package/dist/cjs/components/t/t.native.js +2 -3
- package/dist/cjs/components/t/t.web.js +2 -3
- package/dist/esm/components/a/a.native.js +6 -2
- package/dist/esm/components/a/a.web.js +2 -2
- package/dist/esm/components/d/d.native.js +20 -4
- package/dist/esm/components/d/d.web.js +21 -5
- package/dist/esm/components/e/e.native.js +2 -2
- package/dist/esm/components/e/e.web.js +4 -2
- package/dist/esm/components/i/i.native.js +4 -2
- package/dist/esm/components/i/i.web.js +8 -2
- package/dist/esm/components/l/l.web.js +2 -2
- package/dist/esm/components/o/o.native.js +4 -2
- package/dist/esm/components/o/o.web.js +2 -2
- package/dist/esm/components/p/p.native.js +4 -2
- package/dist/esm/components/p/p.web.js +4 -2
- package/dist/esm/components/s/s.native.js +2 -2
- package/dist/esm/components/t/t.native.js +2 -2
- package/dist/esm/components/t/t.web.js +2 -2
- package/dist/tsconfig.cjs.tsbuildinfo +1 -1
- package/dist/tsconfig.esm.tsbuildinfo +1 -1
- package/dist/types/components/d/d.native.d.ts.map +1 -1
- package/package.json +5 -5
- package/dist/native/cjs/components/a/a.native.js +0 -17
- package/dist/native/cjs/components/a/a.web.js +0 -15
- package/dist/native/cjs/components/a/index.native.js +0 -17
- package/dist/native/cjs/components/a/index.web.js +0 -17
- package/dist/native/cjs/components/d/d.native.js +0 -28
- package/dist/native/cjs/components/d/d.web.js +0 -38
- package/dist/native/cjs/components/d/index.native.js +0 -17
- package/dist/native/cjs/components/d/index.web.js +0 -17
- package/dist/native/cjs/components/e/e.native.js +0 -16
- package/dist/native/cjs/components/e/e.web.js +0 -15
- package/dist/native/cjs/components/e/index.native.js +0 -17
- package/dist/native/cjs/components/e/index.web.js +0 -17
- package/dist/native/cjs/components/i/i.native.js +0 -28
- package/dist/native/cjs/components/i/i.web.js +0 -27
- package/dist/native/cjs/components/i/index.native.js +0 -17
- package/dist/native/cjs/components/i/index.web.js +0 -17
- package/dist/native/cjs/components/i/useIUtils.js +0 -71
- package/dist/native/cjs/components/index.js +0 -26
- package/dist/native/cjs/components/index.native.js +0 -26
- package/dist/native/cjs/components/index.web.js +0 -26
- package/dist/native/cjs/components/l/index.native.js +0 -17
- package/dist/native/cjs/components/l/index.web.js +0 -17
- package/dist/native/cjs/components/l/l.native.js +0 -10
- package/dist/native/cjs/components/l/l.web.js +0 -15
- package/dist/native/cjs/components/o/index.native.js +0 -17
- package/dist/native/cjs/components/o/index.web.js +0 -17
- package/dist/native/cjs/components/o/o.native.js +0 -12
- package/dist/native/cjs/components/o/o.web.js +0 -15
- package/dist/native/cjs/components/p/index.native.js +0 -17
- package/dist/native/cjs/components/p/index.web.js +0 -17
- package/dist/native/cjs/components/p/p.native.js +0 -13
- package/dist/native/cjs/components/p/p.web.js +0 -16
- package/dist/native/cjs/components/s/index.native.js +0 -17
- package/dist/native/cjs/components/s/index.web.js +0 -17
- package/dist/native/cjs/components/s/s.native.js +0 -10
- package/dist/native/cjs/components/s/s.web.js +0 -10
- package/dist/native/cjs/components/t/index.native.js +0 -17
- package/dist/native/cjs/components/t/index.web.js +0 -17
- package/dist/native/cjs/components/t/t.native.js +0 -15
- package/dist/native/cjs/components/t/t.web.js +0 -15
- package/dist/native/cjs/components/u/context.js +0 -14
- package/dist/native/cjs/components/u/errorBoundary.js +0 -27
- package/dist/native/cjs/components/u/index.native.js +0 -19
- package/dist/native/cjs/components/u/index.web.js +0 -19
- package/dist/native/cjs/components/u/provider.native.js +0 -24
- package/dist/native/cjs/components/u/provider.web.js +0 -21
- package/dist/native/cjs/components/u/types.js +0 -2
- package/dist/native/cjs/components/u/useUniverse.js +0 -8
- package/dist/native/cjs/hooks/index.js +0 -19
- package/dist/native/cjs/hooks/index.native.js +0 -22
- package/dist/native/cjs/hooks/index.web.js +0 -22
- package/dist/native/cjs/hooks/useCn.js +0 -15
- package/dist/native/cjs/hooks/useInteractiveHandlers/useInteractiveHandlers.native.js +0 -43
- package/dist/native/cjs/hooks/useInteractiveHandlers/useInteractiveHandlers.web.js +0 -45
- package/dist/native/cjs/hooks/useInteractiveState/useInteractiveState.native.js +0 -69
- package/dist/native/cjs/hooks/useInteractiveState/useInteractiveState.web.js +0 -74
- package/dist/native/cjs/hooks/useOnChange.js +0 -18
- package/dist/native/cjs/hooks/useProps.js +0 -66
- package/dist/native/cjs/hooks/useStyles/useStyles.helpers.js +0 -35
- package/dist/native/cjs/hooks/useStyles/useStyles.native.js +0 -46
- package/dist/native/cjs/hooks/useStyles/useStyles.types.js +0 -2
- package/dist/native/cjs/hooks/useStyles/useStyles.web.js +0 -71
- package/dist/native/cjs/index.js +0 -19
- package/dist/native/cjs/index.native.js +0 -19
- package/dist/native/cjs/index.web.js +0 -19
- package/dist/native/cjs/types/base.js +0 -2
- package/dist/native/cjs/types/index.js +0 -17
- package/dist/native/esm/components/a/a.native.js +0 -13
- package/dist/native/esm/components/a/a.web.js +0 -11
- package/dist/native/esm/components/a/index.native.js +0 -1
- package/dist/native/esm/components/a/index.web.js +0 -1
- package/dist/native/esm/components/d/d.native.js +0 -24
- package/dist/native/esm/components/d/d.web.js +0 -34
- package/dist/native/esm/components/d/index.native.js +0 -1
- package/dist/native/esm/components/d/index.web.js +0 -1
- package/dist/native/esm/components/e/e.native.js +0 -12
- package/dist/native/esm/components/e/e.web.js +0 -11
- package/dist/native/esm/components/e/index.native.js +0 -1
- package/dist/native/esm/components/e/index.web.js +0 -1
- package/dist/native/esm/components/i/i.native.js +0 -24
- package/dist/native/esm/components/i/i.web.js +0 -23
- package/dist/native/esm/components/i/index.native.js +0 -1
- package/dist/native/esm/components/i/index.web.js +0 -1
- package/dist/native/esm/components/i/useIUtils.js +0 -67
- package/dist/native/esm/components/index.js +0 -10
- package/dist/native/esm/components/index.native.js +0 -10
- package/dist/native/esm/components/index.web.js +0 -10
- package/dist/native/esm/components/l/index.native.js +0 -1
- package/dist/native/esm/components/l/index.web.js +0 -1
- package/dist/native/esm/components/l/l.native.js +0 -6
- package/dist/native/esm/components/l/l.web.js +0 -11
- package/dist/native/esm/components/o/index.native.js +0 -1
- package/dist/native/esm/components/o/index.web.js +0 -1
- package/dist/native/esm/components/o/o.native.js +0 -8
- package/dist/native/esm/components/o/o.web.js +0 -11
- package/dist/native/esm/components/p/index.native.js +0 -1
- package/dist/native/esm/components/p/index.web.js +0 -1
- package/dist/native/esm/components/p/p.native.js +0 -9
- package/dist/native/esm/components/p/p.web.js +0 -12
- package/dist/native/esm/components/s/index.native.js +0 -1
- package/dist/native/esm/components/s/index.web.js +0 -1
- package/dist/native/esm/components/s/s.native.js +0 -7
- package/dist/native/esm/components/s/s.web.js +0 -6
- package/dist/native/esm/components/t/index.native.js +0 -1
- package/dist/native/esm/components/t/index.web.js +0 -1
- package/dist/native/esm/components/t/t.native.js +0 -11
- package/dist/native/esm/components/t/t.web.js +0 -11
- package/dist/native/esm/components/u/context.js +0 -11
- package/dist/native/esm/components/u/errorBoundary.js +0 -23
- package/dist/native/esm/components/u/index.native.js +0 -3
- package/dist/native/esm/components/u/index.web.js +0 -3
- package/dist/native/esm/components/u/provider.native.js +0 -20
- package/dist/native/esm/components/u/provider.web.js +0 -17
- package/dist/native/esm/components/u/types.js +0 -1
- package/dist/native/esm/components/u/useUniverse.js +0 -5
- package/dist/native/esm/hooks/index.js +0 -3
- package/dist/native/esm/hooks/index.native.js +0 -6
- package/dist/native/esm/hooks/index.web.js +0 -6
- package/dist/native/esm/hooks/useCn.js +0 -8
- package/dist/native/esm/hooks/useInteractiveHandlers/useInteractiveHandlers.native.js +0 -40
- package/dist/native/esm/hooks/useInteractiveHandlers/useInteractiveHandlers.web.js +0 -42
- package/dist/native/esm/hooks/useInteractiveState/useInteractiveState.native.js +0 -66
- package/dist/native/esm/hooks/useInteractiveState/useInteractiveState.web.js +0 -71
- package/dist/native/esm/hooks/useOnChange.js +0 -14
- package/dist/native/esm/hooks/useProps.js +0 -59
- package/dist/native/esm/hooks/useStyles/useStyles.helpers.js +0 -29
- package/dist/native/esm/hooks/useStyles/useStyles.native.js +0 -42
- package/dist/native/esm/hooks/useStyles/useStyles.types.js +0 -1
- package/dist/native/esm/hooks/useStyles/useStyles.web.js +0 -66
- package/dist/native/esm/index.js +0 -3
- package/dist/native/esm/index.native.js +0 -3
- package/dist/native/esm/index.web.js +0 -3
- package/dist/native/esm/types/base.js +0 -1
- package/dist/native/esm/types/index.js +0 -1
- package/dist/native/tsconfig.native.cjs.tsbuildinfo +0 -1
- package/dist/native/tsconfig.native.esm.tsbuildinfo +0 -1
|
@@ -5,13 +5,16 @@ exports.A = A;
|
|
|
5
5
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
6
|
const react_native_1 = require("react-native");
|
|
7
7
|
const index_native_1 = require("../../hooks/index.native");
|
|
8
|
-
const useCn_1 = require("../../hooks/useCn");
|
|
9
8
|
const index_native_2 = require("../e/index.native");
|
|
10
9
|
function A({ accessibilityLabel, accessibilityRole, accessibilityState, className, children, loading, ref, style, testId, ...restProps }) {
|
|
11
|
-
const cn =
|
|
10
|
+
// const cn = useCn();
|
|
12
11
|
const { disabled, eventHandlers } = (0, index_native_1.useInteractiveHandlers)(restProps);
|
|
13
12
|
const { getStylesWithInteraction } = (0, index_native_1.useStyles)();
|
|
14
13
|
const isDisabled = Boolean(disabled || loading);
|
|
15
|
-
return ((0, jsx_runtime_1.jsx)(react_native_1.Pressable, { ref: ref, disabled: isDisabled, accessibilityLabel: accessibilityLabel, accessibilityRole: accessibilityRole, accessibilityState: accessibilityState, testID: testId, ...eventHandlers, ...getStylesWithInteraction({ disabled, style }), children: (0, jsx_runtime_1.jsx)(index_native_2.E
|
|
14
|
+
return ((0, jsx_runtime_1.jsx)(react_native_1.Pressable, { ref: ref, disabled: isDisabled, accessibilityLabel: accessibilityLabel, accessibilityRole: accessibilityRole, accessibilityState: accessibilityState, testID: testId, ...eventHandlers, ...getStylesWithInteraction({ disabled, style }), children: (0, jsx_runtime_1.jsx)(index_native_2.E
|
|
15
|
+
// className={cn(disabled && 'opacity-60', className)}
|
|
16
|
+
, {
|
|
17
|
+
// className={cn(disabled && 'opacity-60', className)}
|
|
18
|
+
style: style, ...restProps, children: children }) }));
|
|
16
19
|
}
|
|
17
20
|
exports.Action = A;
|
|
@@ -4,12 +4,11 @@ exports.Action = void 0;
|
|
|
4
4
|
exports.A = A;
|
|
5
5
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
6
|
const index_web_1 = require("../../hooks/index.web");
|
|
7
|
-
const useCn_1 = require("../../hooks/useCn");
|
|
8
7
|
function A({ className, children, loading, ref, testId, accessibilityLabel, accessibilityRole, accessibilityState, style, ...restProps }) {
|
|
9
|
-
const cn =
|
|
8
|
+
// const cn = useCn();
|
|
10
9
|
const { getStyles } = (0, index_web_1.useStyles)();
|
|
11
10
|
const { disabled, eventHandlers } = (0, index_web_1.useInteractiveHandlers)(restProps);
|
|
12
11
|
const isDisabled = Boolean(disabled || loading);
|
|
13
|
-
return ((0, jsx_runtime_1.jsx)("button", { ref: ref, type: "button",
|
|
12
|
+
return ((0, jsx_runtime_1.jsx)("button", { ref: ref, type: "button", "aria-disabled": isDisabled || undefined, "aria-busy": loading || undefined, "aria-label": accessibilityLabel, "data-testid": testId, ...restProps, ...eventHandlers, ...getStyles({ disabled, style }), children: children }));
|
|
14
13
|
}
|
|
15
14
|
exports.Action = A;
|
|
@@ -4,10 +4,9 @@ exports.Dialog = void 0;
|
|
|
4
4
|
exports.D = D;
|
|
5
5
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
6
|
const react_native_1 = require("react-native");
|
|
7
|
-
const useCn_1 = require("../../hooks/useCn");
|
|
8
7
|
const index_native_1 = require("../e/index.native");
|
|
9
8
|
function D({ open, onOpenChange, placement = 'center', backdropClassName, backdropStyle, containerClassName, containerStyle, contentClassName, contentStyle, children, ref, ...restProps }) {
|
|
10
|
-
const cn =
|
|
9
|
+
// const cn = useCn();
|
|
11
10
|
const placementClasses = {
|
|
12
11
|
center: 'items-center justify-center',
|
|
13
12
|
top: 'items-start justify-center',
|
|
@@ -15,14 +14,30 @@ function D({ open, onOpenChange, placement = 'center', backdropClassName, backdr
|
|
|
15
14
|
left: 'items-stretch justify-start',
|
|
16
15
|
right: 'items-stretch justify-end',
|
|
17
16
|
};
|
|
18
|
-
const containerClasses = cn(
|
|
19
|
-
|
|
17
|
+
// const containerClasses = cn(
|
|
18
|
+
// 'flex-1 bg-black/40 flex',
|
|
19
|
+
// placementClasses[placement],
|
|
20
|
+
// containerClassName,
|
|
21
|
+
// backdropClassName,
|
|
22
|
+
// );
|
|
23
|
+
// const contentClasses = cn(
|
|
24
|
+
// 'bg-background p-4 rounded-lg shadow-lg max-h-[90vh] w-full max-w-lg',
|
|
25
|
+
// placement === 'left' || placement === 'right' ? 'h-full max-h-none' : '',
|
|
26
|
+
// placement === 'bottom' || placement === 'top' ? 'max-w-none' : '',
|
|
27
|
+
// contentClassName,
|
|
28
|
+
// );
|
|
20
29
|
const handleRequestClose = (e) => {
|
|
21
30
|
onOpenChange?.(false);
|
|
22
31
|
if (typeof restProps.onRequestClose === 'function') {
|
|
23
32
|
restProps.onRequestClose?.(e);
|
|
24
33
|
}
|
|
25
34
|
};
|
|
26
|
-
return ((0, jsx_runtime_1.jsx)(react_native_1.Modal, { visible: open, animationType: "slide", transparent: true, onRequestClose: handleRequestClose, ...restProps, children: (0, jsx_runtime_1.jsx)(index_native_1.E
|
|
35
|
+
return ((0, jsx_runtime_1.jsx)(react_native_1.Modal, { visible: open, animationType: "slide", transparent: true, onRequestClose: handleRequestClose, ...restProps, children: (0, jsx_runtime_1.jsx)(index_native_1.E
|
|
36
|
+
// className={containerClasses}
|
|
37
|
+
, {
|
|
38
|
+
// className={containerClasses}
|
|
39
|
+
style: { ...containerStyle, ...backdropStyle }, children: (0, jsx_runtime_1.jsx)(index_native_1.E, { ref: ref,
|
|
40
|
+
// className={contentClasses}
|
|
41
|
+
style: contentStyle, children: children }) }) }));
|
|
27
42
|
}
|
|
28
43
|
exports.Dialog = D;
|
|
@@ -4,10 +4,9 @@ exports.Dialog = void 0;
|
|
|
4
4
|
exports.D = D;
|
|
5
5
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
6
|
const react_dom_1 = require("react-dom");
|
|
7
|
-
const useCn_1 = require("../../hooks/useCn");
|
|
8
7
|
const index_web_1 = require("../e/index.web");
|
|
9
8
|
function D({ open, onOpenChange, placement = 'center', backdropClassName, backdropStyle, containerClassName, containerStyle, contentClassName, contentStyle, closeOnBackdropClick = true, children, ref, ...restProps }) {
|
|
10
|
-
const cn =
|
|
9
|
+
// const cn = useCn();
|
|
11
10
|
if (typeof document === 'undefined')
|
|
12
11
|
return null;
|
|
13
12
|
if (!open)
|
|
@@ -26,13 +25,29 @@ function D({ open, onOpenChange, placement = 'center', backdropClassName, backdr
|
|
|
26
25
|
onOpenChange?.(false);
|
|
27
26
|
}
|
|
28
27
|
};
|
|
29
|
-
const backdropClasses = cn(
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
// const backdropClasses = cn(
|
|
29
|
+
// 'fixed inset-0 z-50 flex bg-black/40',
|
|
30
|
+
// placementClasses[placement],
|
|
31
|
+
// containerClassName,
|
|
32
|
+
// backdropClassName,
|
|
33
|
+
// );
|
|
34
|
+
// const contentClasses = cn(
|
|
35
|
+
// 'relative max-h-[90vh] w-full max-w-lg overflow-auto rounded-lg bg-background p-4 shadow-lg',
|
|
36
|
+
// placement === 'left' || placement === 'right' ? 'h-full max-h-none' : '',
|
|
37
|
+
// placement === 'bottom' || placement === 'top' ? 'max-w-none' : '',
|
|
38
|
+
// contentClassName,
|
|
39
|
+
// );
|
|
40
|
+
return (0, react_dom_1.createPortal)((0, jsx_runtime_1.jsx)(index_web_1.E
|
|
41
|
+
// className={backdropClasses}
|
|
42
|
+
, {
|
|
43
|
+
// className={backdropClasses}
|
|
44
|
+
role: "presentation", onClick: handleBackdropClick, style: {
|
|
32
45
|
...(containerStyle || {}),
|
|
33
46
|
...(backdropStyle || {}),
|
|
34
47
|
}, children: (0, jsx_runtime_1.jsx)("div", { ref: ref,
|
|
35
48
|
// biome-ignore lint/a11y/useSemanticElements: <explanation>
|
|
36
|
-
role: "dialog", "aria-modal": "true",
|
|
49
|
+
role: "dialog", "aria-modal": "true",
|
|
50
|
+
// className={contentClasses}
|
|
51
|
+
style: contentStyle, ...restProps, children: children }) }), document.body);
|
|
37
52
|
}
|
|
38
53
|
exports.Dialog = D;
|
|
@@ -4,13 +4,12 @@ exports.Element = void 0;
|
|
|
4
4
|
exports.E = E;
|
|
5
5
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
6
|
const react_native_1 = require("react-native");
|
|
7
|
-
const useCn_1 = require("../../hooks/useCn");
|
|
8
7
|
const index_native_1 = require("../../index.native");
|
|
9
8
|
const index_native_2 = require("../t/index.native");
|
|
10
9
|
function E({ className, children, ref, style, ...restProps }) {
|
|
11
|
-
const cn =
|
|
10
|
+
// const cn = useCn();
|
|
12
11
|
const { getStyles } = (0, index_native_1.useStyles)();
|
|
13
12
|
const { disabled, eventHandlers } = (0, index_native_1.useInteractiveHandlers)(restProps);
|
|
14
|
-
return ((0, jsx_runtime_1.jsx)(react_native_1.View, { ref: ref,
|
|
13
|
+
return ((0, jsx_runtime_1.jsx)(react_native_1.View, { ref: ref, ...eventHandlers, ...getStyles({ disabled, style }), children: typeof children === 'string' ? (0, jsx_runtime_1.jsx)(index_native_2.T, { children: children }) : children }));
|
|
15
14
|
}
|
|
16
15
|
exports.Element = E;
|
|
@@ -3,13 +3,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Element = void 0;
|
|
4
4
|
exports.E = E;
|
|
5
5
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
const useCn_1 = require("../../hooks/useCn");
|
|
7
6
|
const index_web_1 = require("../../index.web");
|
|
8
7
|
function E({ as = 'div', className, children, ref, role, style, ...restProps }) {
|
|
9
|
-
const cn =
|
|
8
|
+
// const cn = useCn();
|
|
10
9
|
const { disabled, eventHandlers } = (0, index_web_1.useInteractiveHandlers)(restProps);
|
|
11
10
|
const { getStyles } = (0, index_web_1.useStyles)();
|
|
12
11
|
const Comp = as;
|
|
13
|
-
return ((0, jsx_runtime_1.jsx)(Comp, { ref: ref,
|
|
12
|
+
return ((0, jsx_runtime_1.jsx)(Comp, { ref: ref,
|
|
13
|
+
// className={cn(className)}
|
|
14
|
+
role: role, ...restProps, ...eventHandlers, ...getStyles({ disabled, style }), children: children }));
|
|
14
15
|
}
|
|
15
16
|
exports.Element = E;
|
|
@@ -4,13 +4,12 @@ exports.Input = void 0;
|
|
|
4
4
|
exports.I = I;
|
|
5
5
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
6
|
const react_native_1 = require("react-native");
|
|
7
|
-
const useCn_1 = require("../../hooks/useCn");
|
|
8
7
|
const useOnChange_1 = require("../../hooks/useOnChange");
|
|
9
8
|
const index_native_1 = require("../../index.native");
|
|
10
9
|
const useIUtils_1 = require("./useIUtils");
|
|
11
10
|
function I({ className, value, defaultValue, placeholder, onChange, onChangeValue, type, inputMode, keyboardType, editable, ref, name, style, ...restProps }) {
|
|
12
11
|
const { treatTypeModeAndKeyboardType } = (0, useIUtils_1.useIUtils)();
|
|
13
|
-
const cn =
|
|
12
|
+
// const cn = useCn();
|
|
14
13
|
const { onChange: handleOnChange } = (0, useOnChange_1.useOnChange)({
|
|
15
14
|
onChange,
|
|
16
15
|
onChangeValue,
|
|
@@ -23,6 +22,8 @@ function I({ className, value, defaultValue, placeholder, onChange, onChangeValu
|
|
|
23
22
|
keyboardType,
|
|
24
23
|
type,
|
|
25
24
|
});
|
|
26
|
-
return ((0, jsx_runtime_1.jsx)(react_native_1.TextInput, { ref: ref,
|
|
25
|
+
return ((0, jsx_runtime_1.jsx)(react_native_1.TextInput, { ref: ref,
|
|
26
|
+
// className={cn(!effectiveEditable && 'opacity-60', className)}
|
|
27
|
+
value: value?.toString(), defaultValue: defaultValue?.toString(), placeholder: placeholder, onChange: handleOnChange, secureTextEntry: masterInputType === 'password', keyboardType: masterInputKeyboardType, editable: effectiveEditable, ...restProps, ...eventHandlers, ...getStyles({ disabled, style }) }));
|
|
27
28
|
}
|
|
28
29
|
exports.Input = I;
|
|
@@ -3,13 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Input = void 0;
|
|
4
4
|
exports.I = I;
|
|
5
5
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
const useCn_1 = require("../../hooks/useCn");
|
|
7
6
|
const useOnChange_1 = require("../../hooks/useOnChange");
|
|
8
7
|
const index_web_1 = require("../../index.web");
|
|
9
8
|
const useIUtils_1 = require("./useIUtils");
|
|
10
9
|
function I({ className, value, defaultValue, placeholder, onChange, onChangeValue, type, inputMode, keyboardType, editable, ref, style, ...restProps }) {
|
|
11
10
|
const { treatTypeModeAndKeyboardType } = (0, useIUtils_1.useIUtils)();
|
|
12
|
-
const cn =
|
|
11
|
+
// const cn = useCn();
|
|
13
12
|
const { onChange: handleOnChange } = (0, useOnChange_1.useOnChange)({
|
|
14
13
|
onChange,
|
|
15
14
|
onChangeValue,
|
|
@@ -22,6 +21,12 @@ function I({ className, value, defaultValue, placeholder, onChange, onChangeValu
|
|
|
22
21
|
keyboardType,
|
|
23
22
|
type,
|
|
24
23
|
});
|
|
25
|
-
return ((0, jsx_runtime_1.jsx)("input", { ref: ref, type: masterInputType, inputMode: masterInputMode,
|
|
24
|
+
return ((0, jsx_runtime_1.jsx)("input", { ref: ref, type: masterInputType, inputMode: masterInputMode,
|
|
25
|
+
// className={cn(
|
|
26
|
+
// 'outline-none',
|
|
27
|
+
// effectiveDisabled && 'opacity-60 cursor-not-allowed',
|
|
28
|
+
// className,
|
|
29
|
+
// )}
|
|
30
|
+
value: value?.toString(), defaultValue: defaultValue?.toString(), placeholder: placeholder, onChange: handleOnChange, disabled: effectiveDisabled, ...restProps, ...eventHandlers, ...getStyles({ disabled, style }) }));
|
|
26
31
|
}
|
|
27
32
|
exports.Input = I;
|
|
@@ -3,13 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Link = void 0;
|
|
4
4
|
exports.L = L;
|
|
5
5
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
const useCn_1 = require("../../hooks/useCn");
|
|
7
6
|
const index_web_1 = require("../../index.web");
|
|
8
7
|
function L({ className, children, to, href, preventDefault, ref, style, ...restProps }) {
|
|
9
|
-
const cn =
|
|
8
|
+
// const cn = useCn();
|
|
10
9
|
const { disabled, eventHandlers } = (0, index_web_1.useInteractiveHandlers)(restProps);
|
|
11
10
|
const { getStyles } = (0, index_web_1.useStyles)();
|
|
12
11
|
const resolvedHref = href ?? to ?? '#';
|
|
13
|
-
return ((0, jsx_runtime_1.jsx)("a", { ref: ref, href: resolvedHref,
|
|
12
|
+
return ((0, jsx_runtime_1.jsx)("a", { ref: ref, href: resolvedHref, ...restProps, ...eventHandlers, ...getStyles({ disabled, style }), children: children }));
|
|
14
13
|
}
|
|
15
14
|
exports.Link = L;
|
|
@@ -4,9 +4,10 @@ exports.Overflow = void 0;
|
|
|
4
4
|
exports.O = O;
|
|
5
5
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
6
|
const react_native_1 = require("react-native");
|
|
7
|
-
const useCn_1 = require("../../hooks/useCn");
|
|
8
7
|
function O({ className, children, horizontal, ref, ...restProps }) {
|
|
9
|
-
const cn =
|
|
10
|
-
return ((0, jsx_runtime_1.jsx)(react_native_1.ScrollView, { ref: ref,
|
|
8
|
+
// const cn = useCn();
|
|
9
|
+
return ((0, jsx_runtime_1.jsx)(react_native_1.ScrollView, { ref: ref,
|
|
10
|
+
// className={cn(className)}
|
|
11
|
+
horizontal: horizontal, ...restProps, children: children }));
|
|
11
12
|
}
|
|
12
13
|
exports.Overflow = O;
|
|
@@ -3,13 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Overflow = void 0;
|
|
4
4
|
exports.O = O;
|
|
5
5
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
const useCn_1 = require("../../hooks/useCn");
|
|
7
6
|
const index_web_1 = require("../../index.web");
|
|
8
7
|
function O({ className, children, horizontal, ref, style, ...restProps }) {
|
|
9
|
-
const cn =
|
|
8
|
+
// const cn = useCn();
|
|
10
9
|
const { disabled, eventHandlers } = (0, index_web_1.useInteractiveHandlers)(restProps);
|
|
11
10
|
const { getStyles } = (0, index_web_1.useStyles)();
|
|
12
11
|
const overflowClass = horizontal ? 'overflow-x-auto' : 'overflow-y-auto';
|
|
13
|
-
return ((0, jsx_runtime_1.jsx)("div", { ref: ref,
|
|
12
|
+
return ((0, jsx_runtime_1.jsx)("div", { ref: ref, ...restProps, ...eventHandlers, ...getStyles({ disabled, style }), children: children }));
|
|
14
13
|
}
|
|
15
14
|
exports.Overflow = O;
|
|
@@ -4,10 +4,11 @@ exports.Picture = void 0;
|
|
|
4
4
|
exports.P = P;
|
|
5
5
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
6
|
const react_native_1 = require("react-native");
|
|
7
|
-
const useCn_1 = require("../../hooks/useCn");
|
|
8
7
|
function P({ className, src, source, ref, ...restProps }) {
|
|
9
|
-
const cn =
|
|
8
|
+
// const cn = useCn();
|
|
10
9
|
const finalSource = src != null ? { uri: src } : source;
|
|
11
|
-
return ((0, jsx_runtime_1.jsx)(react_native_1.Image, { ref: ref,
|
|
10
|
+
return ((0, jsx_runtime_1.jsx)(react_native_1.Image, { ref: ref,
|
|
11
|
+
// className={cn(className)}
|
|
12
|
+
source: finalSource, ...restProps }));
|
|
12
13
|
}
|
|
13
14
|
exports.Picture = P;
|
|
@@ -3,14 +3,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Picture = void 0;
|
|
4
4
|
exports.P = P;
|
|
5
5
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
const useCn_1 = require("../../hooks/useCn");
|
|
7
6
|
const index_web_1 = require("../../index.web");
|
|
8
7
|
function P({ alt, className, ref, style, source, src, ...restProps }) {
|
|
9
|
-
const cn =
|
|
8
|
+
// const cn = useCn();
|
|
10
9
|
const { disabled, eventHandlers } = (0, index_web_1.useInteractiveHandlers)(restProps);
|
|
11
10
|
const { getStyles } = (0, index_web_1.useStyles)();
|
|
12
11
|
return (
|
|
13
12
|
// biome-ignore lint/a11y/useAltText: <explanation>
|
|
14
|
-
(0, jsx_runtime_1.jsx)("img", { alt: alt, "aria-label": alt, ref: ref,
|
|
13
|
+
(0, jsx_runtime_1.jsx)("img", { alt: alt, "aria-label": alt, ref: ref,
|
|
14
|
+
// className={cn('object-cover', className)}
|
|
15
|
+
src: src ?? source, ...restProps, ...eventHandlers, ...getStyles({ disabled, style }) }));
|
|
15
16
|
}
|
|
16
17
|
exports.Picture = P;
|
|
@@ -3,8 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.S = S;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_native_safe_area_context_1 = require("react-native-safe-area-context");
|
|
6
|
-
const useCn_1 = require("../../hooks/useCn");
|
|
7
6
|
function S({ className, children, ref, ...restProps }) {
|
|
8
|
-
const cn =
|
|
9
|
-
return ((0, jsx_runtime_1.jsx)(react_native_safe_area_context_1.SafeAreaView, { ref: ref,
|
|
7
|
+
// const cn = useCn();
|
|
8
|
+
return ((0, jsx_runtime_1.jsx)(react_native_safe_area_context_1.SafeAreaView, { ref: ref, ...restProps, children: children }));
|
|
10
9
|
}
|
|
@@ -4,12 +4,11 @@ exports.Text = void 0;
|
|
|
4
4
|
exports.T = T;
|
|
5
5
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
6
|
const react_native_1 = require("react-native");
|
|
7
|
-
const useCn_1 = require("../../hooks/useCn");
|
|
8
7
|
const index_native_1 = require("../../index.native");
|
|
9
8
|
function T({ className, children, ref, style, ...restProps }) {
|
|
10
|
-
const cn =
|
|
9
|
+
// const cn = useCn();
|
|
11
10
|
const { disabled, eventHandlers } = (0, index_native_1.useInteractiveHandlers)(restProps);
|
|
12
11
|
const { getStyles } = (0, index_native_1.useStyles)();
|
|
13
|
-
return ((0, jsx_runtime_1.jsx)(react_native_1.Text, { ref: ref,
|
|
12
|
+
return ((0, jsx_runtime_1.jsx)(react_native_1.Text, { ref: ref, ...restProps, ...eventHandlers, ...getStyles({ disabled, style }), children: children }));
|
|
14
13
|
}
|
|
15
14
|
exports.Text = T;
|
|
@@ -3,13 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Text = void 0;
|
|
4
4
|
exports.T = T;
|
|
5
5
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
const useCn_1 = require("../../hooks/useCn");
|
|
7
6
|
const index_web_1 = require("../../index.web");
|
|
8
7
|
function T({ as = 'span', className, children, ref, style, ...restProps }) {
|
|
9
|
-
const cn =
|
|
8
|
+
// const cn = useCn();
|
|
10
9
|
const { disabled, eventHandlers } = (0, index_web_1.useInteractiveHandlers)(restProps);
|
|
11
10
|
const { getStyles } = (0, index_web_1.useStyles)();
|
|
12
11
|
const Comp = as;
|
|
13
|
-
return ((0, jsx_runtime_1.jsx)(Comp, { ref: ref,
|
|
12
|
+
return ((0, jsx_runtime_1.jsx)(Comp, { ref: ref, ...restProps, ...eventHandlers, ...getStyles({ disabled, style }), children: children }));
|
|
14
13
|
}
|
|
15
14
|
exports.Text = T;
|
|
@@ -4,10 +4,14 @@ import { useInteractiveHandlers, useStyles } from '../../hooks/index.native';
|
|
|
4
4
|
import { useCn } from '../../hooks/useCn';
|
|
5
5
|
import { E } from '../e/index.native';
|
|
6
6
|
export function A({ accessibilityLabel, accessibilityRole, accessibilityState, className, children, loading, ref, style, testId, ...restProps }) {
|
|
7
|
-
const cn = useCn();
|
|
7
|
+
// const cn = useCn();
|
|
8
8
|
const { disabled, eventHandlers } = useInteractiveHandlers(restProps);
|
|
9
9
|
const { getStylesWithInteraction } = useStyles();
|
|
10
10
|
const isDisabled = Boolean(disabled || loading);
|
|
11
|
-
return (_jsx(Pressable, { ref: ref, disabled: isDisabled, accessibilityLabel: accessibilityLabel, accessibilityRole: accessibilityRole, accessibilityState: accessibilityState, testID: testId, ...eventHandlers, ...getStylesWithInteraction({ disabled, style }), children: _jsx(E
|
|
11
|
+
return (_jsx(Pressable, { ref: ref, disabled: isDisabled, accessibilityLabel: accessibilityLabel, accessibilityRole: accessibilityRole, accessibilityState: accessibilityState, testID: testId, ...eventHandlers, ...getStylesWithInteraction({ disabled, style }), children: _jsx(E
|
|
12
|
+
// className={cn(disabled && 'opacity-60', className)}
|
|
13
|
+
, {
|
|
14
|
+
// className={cn(disabled && 'opacity-60', className)}
|
|
15
|
+
style: style, ...restProps, children: children }) }));
|
|
12
16
|
}
|
|
13
17
|
export const Action = A;
|
|
@@ -2,10 +2,10 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { useInteractiveHandlers, useStyles } from '../../hooks/index.web';
|
|
3
3
|
import { useCn } from '../../hooks/useCn';
|
|
4
4
|
export function A({ className, children, loading, ref, testId, accessibilityLabel, accessibilityRole, accessibilityState, style, ...restProps }) {
|
|
5
|
-
const cn = useCn();
|
|
5
|
+
// const cn = useCn();
|
|
6
6
|
const { getStyles } = useStyles();
|
|
7
7
|
const { disabled, eventHandlers } = useInteractiveHandlers(restProps);
|
|
8
8
|
const isDisabled = Boolean(disabled || loading);
|
|
9
|
-
return (_jsx("button", { ref: ref, type: "button",
|
|
9
|
+
return (_jsx("button", { ref: ref, type: "button", "aria-disabled": isDisabled || undefined, "aria-busy": loading || undefined, "aria-label": accessibilityLabel, "data-testid": testId, ...restProps, ...eventHandlers, ...getStyles({ disabled, style }), children: children }));
|
|
10
10
|
}
|
|
11
11
|
export const Action = A;
|
|
@@ -3,7 +3,7 @@ import { Modal } from 'react-native';
|
|
|
3
3
|
import { useCn } from '../../hooks/useCn';
|
|
4
4
|
import { E } from '../e/index.native';
|
|
5
5
|
export function D({ open, onOpenChange, placement = 'center', backdropClassName, backdropStyle, containerClassName, containerStyle, contentClassName, contentStyle, children, ref, ...restProps }) {
|
|
6
|
-
const cn = useCn();
|
|
6
|
+
// const cn = useCn();
|
|
7
7
|
const placementClasses = {
|
|
8
8
|
center: 'items-center justify-center',
|
|
9
9
|
top: 'items-start justify-center',
|
|
@@ -11,14 +11,30 @@ export function D({ open, onOpenChange, placement = 'center', backdropClassName,
|
|
|
11
11
|
left: 'items-stretch justify-start',
|
|
12
12
|
right: 'items-stretch justify-end',
|
|
13
13
|
};
|
|
14
|
-
const containerClasses = cn(
|
|
15
|
-
|
|
14
|
+
// const containerClasses = cn(
|
|
15
|
+
// 'flex-1 bg-black/40 flex',
|
|
16
|
+
// placementClasses[placement],
|
|
17
|
+
// containerClassName,
|
|
18
|
+
// backdropClassName,
|
|
19
|
+
// );
|
|
20
|
+
// const contentClasses = cn(
|
|
21
|
+
// 'bg-background p-4 rounded-lg shadow-lg max-h-[90vh] w-full max-w-lg',
|
|
22
|
+
// placement === 'left' || placement === 'right' ? 'h-full max-h-none' : '',
|
|
23
|
+
// placement === 'bottom' || placement === 'top' ? 'max-w-none' : '',
|
|
24
|
+
// contentClassName,
|
|
25
|
+
// );
|
|
16
26
|
const handleRequestClose = (e) => {
|
|
17
27
|
onOpenChange?.(false);
|
|
18
28
|
if (typeof restProps.onRequestClose === 'function') {
|
|
19
29
|
restProps.onRequestClose?.(e);
|
|
20
30
|
}
|
|
21
31
|
};
|
|
22
|
-
return (_jsx(Modal, { visible: open, animationType: "slide", transparent: true, onRequestClose: handleRequestClose, ...restProps, children: _jsx(E
|
|
32
|
+
return (_jsx(Modal, { visible: open, animationType: "slide", transparent: true, onRequestClose: handleRequestClose, ...restProps, children: _jsx(E
|
|
33
|
+
// className={containerClasses}
|
|
34
|
+
, {
|
|
35
|
+
// className={containerClasses}
|
|
36
|
+
style: { ...containerStyle, ...backdropStyle }, children: _jsx(E, { ref: ref,
|
|
37
|
+
// className={contentClasses}
|
|
38
|
+
style: contentStyle, children: children }) }) }));
|
|
23
39
|
}
|
|
24
40
|
export const Dialog = D;
|
|
@@ -3,7 +3,7 @@ import { createPortal } from 'react-dom';
|
|
|
3
3
|
import { useCn } from '../../hooks/useCn';
|
|
4
4
|
import { E } from '../e/index.web';
|
|
5
5
|
export function D({ open, onOpenChange, placement = 'center', backdropClassName, backdropStyle, containerClassName, containerStyle, contentClassName, contentStyle, closeOnBackdropClick = true, children, ref, ...restProps }) {
|
|
6
|
-
const cn = useCn();
|
|
6
|
+
// const cn = useCn();
|
|
7
7
|
if (typeof document === 'undefined')
|
|
8
8
|
return null;
|
|
9
9
|
if (!open)
|
|
@@ -22,13 +22,29 @@ export function D({ open, onOpenChange, placement = 'center', backdropClassName,
|
|
|
22
22
|
onOpenChange?.(false);
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
|
-
const backdropClasses = cn(
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
// const backdropClasses = cn(
|
|
26
|
+
// 'fixed inset-0 z-50 flex bg-black/40',
|
|
27
|
+
// placementClasses[placement],
|
|
28
|
+
// containerClassName,
|
|
29
|
+
// backdropClassName,
|
|
30
|
+
// );
|
|
31
|
+
// const contentClasses = cn(
|
|
32
|
+
// 'relative max-h-[90vh] w-full max-w-lg overflow-auto rounded-lg bg-background p-4 shadow-lg',
|
|
33
|
+
// placement === 'left' || placement === 'right' ? 'h-full max-h-none' : '',
|
|
34
|
+
// placement === 'bottom' || placement === 'top' ? 'max-w-none' : '',
|
|
35
|
+
// contentClassName,
|
|
36
|
+
// );
|
|
37
|
+
return createPortal(_jsx(E
|
|
38
|
+
// className={backdropClasses}
|
|
39
|
+
, {
|
|
40
|
+
// className={backdropClasses}
|
|
41
|
+
role: "presentation", onClick: handleBackdropClick, style: {
|
|
28
42
|
...(containerStyle || {}),
|
|
29
43
|
...(backdropStyle || {}),
|
|
30
44
|
}, children: _jsx("div", { ref: ref,
|
|
31
45
|
// biome-ignore lint/a11y/useSemanticElements: <explanation>
|
|
32
|
-
role: "dialog", "aria-modal": "true",
|
|
46
|
+
role: "dialog", "aria-modal": "true",
|
|
47
|
+
// className={contentClasses}
|
|
48
|
+
style: contentStyle, ...restProps, children: children }) }), document.body);
|
|
33
49
|
}
|
|
34
50
|
export const Dialog = D;
|
|
@@ -4,9 +4,9 @@ import { useCn } from '../../hooks/useCn';
|
|
|
4
4
|
import { useInteractiveHandlers, useStyles } from '../../index.native';
|
|
5
5
|
import { T } from '../t/index.native';
|
|
6
6
|
export function E({ className, children, ref, style, ...restProps }) {
|
|
7
|
-
const cn = useCn();
|
|
7
|
+
// const cn = useCn();
|
|
8
8
|
const { getStyles } = useStyles();
|
|
9
9
|
const { disabled, eventHandlers } = useInteractiveHandlers(restProps);
|
|
10
|
-
return (_jsx(View, { ref: ref,
|
|
10
|
+
return (_jsx(View, { ref: ref, ...eventHandlers, ...getStyles({ disabled, style }), children: typeof children === 'string' ? _jsx(T, { children: children }) : children }));
|
|
11
11
|
}
|
|
12
12
|
export const Element = E;
|
|
@@ -2,10 +2,12 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { useCn } from '../../hooks/useCn';
|
|
3
3
|
import { useInteractiveHandlers, useStyles } from '../../index.web';
|
|
4
4
|
export function E({ as = 'div', className, children, ref, role, style, ...restProps }) {
|
|
5
|
-
const cn = useCn();
|
|
5
|
+
// const cn = useCn();
|
|
6
6
|
const { disabled, eventHandlers } = useInteractiveHandlers(restProps);
|
|
7
7
|
const { getStyles } = useStyles();
|
|
8
8
|
const Comp = as;
|
|
9
|
-
return (_jsx(Comp, { ref: ref,
|
|
9
|
+
return (_jsx(Comp, { ref: ref,
|
|
10
|
+
// className={cn(className)}
|
|
11
|
+
role: role, ...restProps, ...eventHandlers, ...getStyles({ disabled, style }), children: children }));
|
|
10
12
|
}
|
|
11
13
|
export const Element = E;
|
|
@@ -6,7 +6,7 @@ import { useInteractiveHandlers, useStyles } from '../../index.native';
|
|
|
6
6
|
import { useIUtils } from './useIUtils';
|
|
7
7
|
export function I({ className, value, defaultValue, placeholder, onChange, onChangeValue, type, inputMode, keyboardType, editable, ref, name, style, ...restProps }) {
|
|
8
8
|
const { treatTypeModeAndKeyboardType } = useIUtils();
|
|
9
|
-
const cn = useCn();
|
|
9
|
+
// const cn = useCn();
|
|
10
10
|
const { onChange: handleOnChange } = useOnChange({
|
|
11
11
|
onChange,
|
|
12
12
|
onChangeValue,
|
|
@@ -19,6 +19,8 @@ export function I({ className, value, defaultValue, placeholder, onChange, onCha
|
|
|
19
19
|
keyboardType,
|
|
20
20
|
type,
|
|
21
21
|
});
|
|
22
|
-
return (_jsx(TextInput, { ref: ref,
|
|
22
|
+
return (_jsx(TextInput, { ref: ref,
|
|
23
|
+
// className={cn(!effectiveEditable && 'opacity-60', className)}
|
|
24
|
+
value: value?.toString(), defaultValue: defaultValue?.toString(), placeholder: placeholder, onChange: handleOnChange, secureTextEntry: masterInputType === 'password', keyboardType: masterInputKeyboardType, editable: effectiveEditable, ...restProps, ...eventHandlers, ...getStyles({ disabled, style }) }));
|
|
23
25
|
}
|
|
24
26
|
export const Input = I;
|
|
@@ -5,7 +5,7 @@ import { useInteractiveHandlers, useStyles } from '../../index.web';
|
|
|
5
5
|
import { useIUtils } from './useIUtils';
|
|
6
6
|
export function I({ className, value, defaultValue, placeholder, onChange, onChangeValue, type, inputMode, keyboardType, editable, ref, style, ...restProps }) {
|
|
7
7
|
const { treatTypeModeAndKeyboardType } = useIUtils();
|
|
8
|
-
const cn = useCn();
|
|
8
|
+
// const cn = useCn();
|
|
9
9
|
const { onChange: handleOnChange } = useOnChange({
|
|
10
10
|
onChange,
|
|
11
11
|
onChangeValue,
|
|
@@ -18,6 +18,12 @@ export function I({ className, value, defaultValue, placeholder, onChange, onCha
|
|
|
18
18
|
keyboardType,
|
|
19
19
|
type,
|
|
20
20
|
});
|
|
21
|
-
return (_jsx("input", { ref: ref, type: masterInputType, inputMode: masterInputMode,
|
|
21
|
+
return (_jsx("input", { ref: ref, type: masterInputType, inputMode: masterInputMode,
|
|
22
|
+
// className={cn(
|
|
23
|
+
// 'outline-none',
|
|
24
|
+
// effectiveDisabled && 'opacity-60 cursor-not-allowed',
|
|
25
|
+
// className,
|
|
26
|
+
// )}
|
|
27
|
+
value: value?.toString(), defaultValue: defaultValue?.toString(), placeholder: placeholder, onChange: handleOnChange, disabled: effectiveDisabled, ...restProps, ...eventHandlers, ...getStyles({ disabled, style }) }));
|
|
22
28
|
}
|
|
23
29
|
export const Input = I;
|
|
@@ -2,10 +2,10 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { useCn } from '../../hooks/useCn';
|
|
3
3
|
import { useInteractiveHandlers, useStyles } from '../../index.web';
|
|
4
4
|
export function L({ className, children, to, href, preventDefault, ref, style, ...restProps }) {
|
|
5
|
-
const cn = useCn();
|
|
5
|
+
// const cn = useCn();
|
|
6
6
|
const { disabled, eventHandlers } = useInteractiveHandlers(restProps);
|
|
7
7
|
const { getStyles } = useStyles();
|
|
8
8
|
const resolvedHref = href ?? to ?? '#';
|
|
9
|
-
return (_jsx("a", { ref: ref, href: resolvedHref,
|
|
9
|
+
return (_jsx("a", { ref: ref, href: resolvedHref, ...restProps, ...eventHandlers, ...getStyles({ disabled, style }), children: children }));
|
|
10
10
|
}
|
|
11
11
|
export const Link = L;
|
|
@@ -2,7 +2,9 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { ScrollView } from 'react-native';
|
|
3
3
|
import { useCn } from '../../hooks/useCn';
|
|
4
4
|
export function O({ className, children, horizontal, ref, ...restProps }) {
|
|
5
|
-
const cn = useCn();
|
|
6
|
-
return (_jsx(ScrollView, { ref: ref,
|
|
5
|
+
// const cn = useCn();
|
|
6
|
+
return (_jsx(ScrollView, { ref: ref,
|
|
7
|
+
// className={cn(className)}
|
|
8
|
+
horizontal: horizontal, ...restProps, children: children }));
|
|
7
9
|
}
|
|
8
10
|
export const Overflow = O;
|
|
@@ -2,10 +2,10 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { useCn } from '../../hooks/useCn';
|
|
3
3
|
import { useInteractiveHandlers, useStyles } from '../../index.web';
|
|
4
4
|
export function O({ className, children, horizontal, ref, style, ...restProps }) {
|
|
5
|
-
const cn = useCn();
|
|
5
|
+
// const cn = useCn();
|
|
6
6
|
const { disabled, eventHandlers } = useInteractiveHandlers(restProps);
|
|
7
7
|
const { getStyles } = useStyles();
|
|
8
8
|
const overflowClass = horizontal ? 'overflow-x-auto' : 'overflow-y-auto';
|
|
9
|
-
return (_jsx("div", { ref: ref,
|
|
9
|
+
return (_jsx("div", { ref: ref, ...restProps, ...eventHandlers, ...getStyles({ disabled, style }), children: children }));
|
|
10
10
|
}
|
|
11
11
|
export const Overflow = O;
|
|
@@ -2,8 +2,10 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { Image } from 'react-native';
|
|
3
3
|
import { useCn } from '../../hooks/useCn';
|
|
4
4
|
export function P({ className, src, source, ref, ...restProps }) {
|
|
5
|
-
const cn = useCn();
|
|
5
|
+
// const cn = useCn();
|
|
6
6
|
const finalSource = src != null ? { uri: src } : source;
|
|
7
|
-
return (_jsx(Image, { ref: ref,
|
|
7
|
+
return (_jsx(Image, { ref: ref,
|
|
8
|
+
// className={cn(className)}
|
|
9
|
+
source: finalSource, ...restProps }));
|
|
8
10
|
}
|
|
9
11
|
export const Picture = P;
|