@onlynative/components 0.0.0-alpha.1 → 0.0.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/dist/appbar/index.js +51 -47
- package/dist/avatar/index.js +13 -20
- package/dist/button/index.js +19 -20
- package/dist/card/index.js +17 -12
- package/dist/checkbox/index.js +17 -21
- package/dist/chip/index.js +21 -22
- package/dist/icon-button/index.js +13 -18
- package/dist/index.js +45 -39
- package/dist/keyboard-avoiding-wrapper/index.js +2 -6
- package/dist/layout/index.js +3 -3
- package/dist/list/index.js +27 -29
- package/dist/radio/index.js +14 -12
- package/dist/switch/index.js +17 -21
- package/dist/text-field/index.js +28 -32
- package/dist/typography/index.js +1 -1
- package/llms.txt +2 -2
- package/package.json +27 -27
package/dist/chip/index.js
CHANGED
|
@@ -25,22 +25,9 @@ __export(chip_exports, {
|
|
|
25
25
|
module.exports = __toCommonJS(chip_exports);
|
|
26
26
|
|
|
27
27
|
// src/chip/Chip.tsx
|
|
28
|
-
var import_react = require("react");
|
|
29
|
-
var import_react_native5 = require("react-native");
|
|
30
28
|
var import_core = require("@onlynative/core");
|
|
31
29
|
|
|
32
|
-
// ../utils/
|
|
33
|
-
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
34
|
-
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
35
|
-
}) : x)(function(x) {
|
|
36
|
-
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
37
|
-
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
// ../utils/dist/index.mjs
|
|
41
|
-
var import_react_native = require("react-native");
|
|
42
|
-
var import_react_native2 = require("react-native");
|
|
43
|
-
var import_react_native3 = require("react-native");
|
|
30
|
+
// ../utils/src/color.ts
|
|
44
31
|
function parseHexColor(color) {
|
|
45
32
|
const normalized = color.replace("#", "");
|
|
46
33
|
if (normalized.length !== 6 && normalized.length !== 8) {
|
|
@@ -83,6 +70,9 @@ function blendColor(base, overlay, overlayAlpha) {
|
|
|
83
70
|
);
|
|
84
71
|
return `rgb(${r}, ${g}, ${b})`;
|
|
85
72
|
}
|
|
73
|
+
|
|
74
|
+
// ../utils/src/elevation.ts
|
|
75
|
+
var import_react_native = require("react-native");
|
|
86
76
|
function elevationStyle(level) {
|
|
87
77
|
if (import_react_native.Platform.OS === "web") {
|
|
88
78
|
const { shadowOffset, shadowOpacity, shadowRadius } = level;
|
|
@@ -104,13 +94,15 @@ function elevationStyle(level) {
|
|
|
104
94
|
elevation: level.elevation
|
|
105
95
|
};
|
|
106
96
|
}
|
|
97
|
+
|
|
98
|
+
// ../utils/src/icon.ts
|
|
107
99
|
var _MCIcons = null;
|
|
108
100
|
var _resolved = false;
|
|
109
101
|
function getMaterialCommunityIcons() {
|
|
110
102
|
if (!_resolved) {
|
|
111
103
|
_resolved = true;
|
|
112
104
|
try {
|
|
113
|
-
const mod =
|
|
105
|
+
const mod = require("@expo/vector-icons/MaterialCommunityIcons");
|
|
114
106
|
_MCIcons = mod.default || mod;
|
|
115
107
|
} catch {
|
|
116
108
|
_MCIcons = null;
|
|
@@ -123,6 +115,9 @@ function getMaterialCommunityIcons() {
|
|
|
123
115
|
}
|
|
124
116
|
return _MCIcons;
|
|
125
117
|
}
|
|
118
|
+
|
|
119
|
+
// ../utils/src/pressable.ts
|
|
120
|
+
var import_react_native2 = require("react-native");
|
|
126
121
|
function resolvePressableStyle(base, hovered, pressed, disabled, isDisabled, style) {
|
|
127
122
|
if (typeof style === "function") {
|
|
128
123
|
return (state) => [
|
|
@@ -146,8 +141,12 @@ function resolveColorFromStyle(...styles) {
|
|
|
146
141
|
return typeof (flattened == null ? void 0 : flattened.color) === "string" ? flattened.color : void 0;
|
|
147
142
|
}
|
|
148
143
|
|
|
149
|
-
// src/chip/
|
|
144
|
+
// src/chip/Chip.tsx
|
|
145
|
+
var import_react = require("react");
|
|
150
146
|
var import_react_native4 = require("react-native");
|
|
147
|
+
|
|
148
|
+
// src/chip/styles.ts
|
|
149
|
+
var import_react_native3 = require("react-native");
|
|
151
150
|
function getVariantColors(theme, variant, elevated, selected) {
|
|
152
151
|
const disabledContainerColor = alphaColor(theme.colors.onSurface, 0.12);
|
|
153
152
|
const disabledLabelColor = alphaColor(theme.colors.onSurface, 0.38);
|
|
@@ -275,7 +274,7 @@ function createStyles(theme, variant, elevated, selected, hasLeadingContent, has
|
|
|
275
274
|
const elevationLevel2 = elevationStyle(theme.elevation.level2);
|
|
276
275
|
const isElevated = elevated && variant !== "input";
|
|
277
276
|
const baseElevation = isElevated ? elevationLevel1 : elevationLevel0;
|
|
278
|
-
return
|
|
277
|
+
return import_react_native3.StyleSheet.create({
|
|
279
278
|
container: {
|
|
280
279
|
alignSelf: "flex-start",
|
|
281
280
|
alignItems: "center",
|
|
@@ -396,7 +395,7 @@ function Chip({
|
|
|
396
395
|
);
|
|
397
396
|
const renderLeadingContent = () => {
|
|
398
397
|
if (variant === "input" && avatar) {
|
|
399
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
398
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native4.View, { style: styles.avatar, children: avatar });
|
|
400
399
|
}
|
|
401
400
|
if (leadingIcon) {
|
|
402
401
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
@@ -423,7 +422,7 @@ function Chip({
|
|
|
423
422
|
return null;
|
|
424
423
|
};
|
|
425
424
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
426
|
-
|
|
425
|
+
import_react_native4.Pressable,
|
|
427
426
|
{
|
|
428
427
|
...props,
|
|
429
428
|
accessibilityRole: "button",
|
|
@@ -431,7 +430,7 @@ function Chip({
|
|
|
431
430
|
disabled: isDisabled,
|
|
432
431
|
...variant === "filter" ? { selected: isSelected } : void 0
|
|
433
432
|
},
|
|
434
|
-
hitSlop:
|
|
433
|
+
hitSlop: import_react_native4.Platform.OS === "web" ? void 0 : 4,
|
|
435
434
|
disabled: isDisabled,
|
|
436
435
|
style: resolvePressableStyle(
|
|
437
436
|
styles.container,
|
|
@@ -443,9 +442,9 @@ function Chip({
|
|
|
443
442
|
),
|
|
444
443
|
children: [
|
|
445
444
|
renderLeadingContent(),
|
|
446
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
445
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native4.Text, { style: computedLabelStyle, children }),
|
|
447
446
|
showCloseIcon ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
448
|
-
|
|
447
|
+
import_react_native4.Pressable,
|
|
449
448
|
{
|
|
450
449
|
onPress: onClose,
|
|
451
450
|
accessibilityRole: "button",
|
|
@@ -25,22 +25,9 @@ __export(icon_button_exports, {
|
|
|
25
25
|
module.exports = __toCommonJS(icon_button_exports);
|
|
26
26
|
|
|
27
27
|
// src/icon-button/IconButton.tsx
|
|
28
|
-
var import_react = require("react");
|
|
29
|
-
var import_react_native5 = require("react-native");
|
|
30
28
|
var import_core = require("@onlynative/core");
|
|
31
29
|
|
|
32
|
-
// ../utils/
|
|
33
|
-
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
34
|
-
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
35
|
-
}) : x)(function(x) {
|
|
36
|
-
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
37
|
-
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
// ../utils/dist/index.mjs
|
|
41
|
-
var import_react_native = require("react-native");
|
|
42
|
-
var import_react_native2 = require("react-native");
|
|
43
|
-
var import_react_native3 = require("react-native");
|
|
30
|
+
// ../utils/src/color.ts
|
|
44
31
|
function parseHexColor(color) {
|
|
45
32
|
const normalized = color.replace("#", "");
|
|
46
33
|
if (normalized.length !== 6 && normalized.length !== 8) {
|
|
@@ -83,13 +70,15 @@ function blendColor(base, overlay, overlayAlpha) {
|
|
|
83
70
|
);
|
|
84
71
|
return `rgb(${r}, ${g}, ${b})`;
|
|
85
72
|
}
|
|
73
|
+
|
|
74
|
+
// ../utils/src/icon.ts
|
|
86
75
|
var _MCIcons = null;
|
|
87
76
|
var _resolved = false;
|
|
88
77
|
function getMaterialCommunityIcons() {
|
|
89
78
|
if (!_resolved) {
|
|
90
79
|
_resolved = true;
|
|
91
80
|
try {
|
|
92
|
-
const mod =
|
|
81
|
+
const mod = require("@expo/vector-icons/MaterialCommunityIcons");
|
|
93
82
|
_MCIcons = mod.default || mod;
|
|
94
83
|
} catch {
|
|
95
84
|
_MCIcons = null;
|
|
@@ -103,13 +92,17 @@ function getMaterialCommunityIcons() {
|
|
|
103
92
|
return _MCIcons;
|
|
104
93
|
}
|
|
105
94
|
|
|
95
|
+
// src/icon-button/IconButton.tsx
|
|
96
|
+
var import_react = require("react");
|
|
97
|
+
var import_react_native2 = require("react-native");
|
|
98
|
+
|
|
106
99
|
// src/icon-button/styles.ts
|
|
107
|
-
var
|
|
100
|
+
var import_react_native = require("react-native");
|
|
108
101
|
function createStyles(theme) {
|
|
109
102
|
const disabledContainerColor = alphaColor(theme.colors.onSurface, 0.12);
|
|
110
103
|
const disabledOutlineColor = alphaColor(theme.colors.onSurface, 0.12);
|
|
111
104
|
const toggleUnselectedContainerColor = theme.colors.surfaceContainerHighest;
|
|
112
|
-
return
|
|
105
|
+
return import_react_native.StyleSheet.create({
|
|
113
106
|
container: {
|
|
114
107
|
borderRadius: theme.shape.cornerFull,
|
|
115
108
|
alignItems: "center",
|
|
@@ -344,11 +337,13 @@ function createStyles(theme) {
|
|
|
344
337
|
borderColor: disabledContainerColor,
|
|
345
338
|
cursor: "auto"
|
|
346
339
|
},
|
|
340
|
+
// eslint-disable-next-line react-native/no-color-literals
|
|
347
341
|
disabledOutlined: {
|
|
348
342
|
backgroundColor: "transparent",
|
|
349
343
|
borderColor: disabledOutlineColor,
|
|
350
344
|
cursor: "auto"
|
|
351
345
|
},
|
|
346
|
+
// eslint-disable-next-line react-native/no-color-literals
|
|
352
347
|
disabledStandard: {
|
|
353
348
|
backgroundColor: "transparent",
|
|
354
349
|
borderColor: "transparent",
|
|
@@ -547,7 +542,7 @@ function IconButton({
|
|
|
547
542
|
};
|
|
548
543
|
}, [containerColor, resolvedIconColor, theme.stateLayer]);
|
|
549
544
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
550
|
-
|
|
545
|
+
import_react_native2.Pressable,
|
|
551
546
|
{
|
|
552
547
|
...props,
|
|
553
548
|
accessibilityRole: "button",
|
package/dist/index.js
CHANGED
|
@@ -54,9 +54,9 @@ __export(index_exports, {
|
|
|
54
54
|
module.exports = __toCommonJS(index_exports);
|
|
55
55
|
|
|
56
56
|
// src/typography/Typography.tsx
|
|
57
|
+
var import_core = require("@onlynative/core");
|
|
57
58
|
var import_react = require("react");
|
|
58
59
|
var import_react_native = require("react-native");
|
|
59
|
-
var import_core = require("@onlynative/core");
|
|
60
60
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
61
61
|
var HEADING_VARIANTS = /* @__PURE__ */ new Set([
|
|
62
62
|
"displayLarge",
|
|
@@ -103,10 +103,10 @@ function Typography({
|
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
// src/layout/Layout.tsx
|
|
106
|
+
var import_core2 = require("@onlynative/core");
|
|
106
107
|
var import_react2 = require("react");
|
|
107
108
|
var import_react_native2 = require("react-native");
|
|
108
109
|
var import_react_native_safe_area_context = require("react-native-safe-area-context");
|
|
109
|
-
var import_core2 = require("@onlynative/core");
|
|
110
110
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
111
111
|
var defaultEdges = ["bottom"];
|
|
112
112
|
function resolveEdges(immersive, edges) {
|
|
@@ -160,9 +160,9 @@ function Layout({ immersive, edges, children, style }) {
|
|
|
160
160
|
}
|
|
161
161
|
|
|
162
162
|
// src/layout/Box.tsx
|
|
163
|
+
var import_core3 = require("@onlynative/core");
|
|
163
164
|
var import_react3 = require("react");
|
|
164
165
|
var import_react_native3 = require("react-native");
|
|
165
|
-
var import_core3 = require("@onlynative/core");
|
|
166
166
|
|
|
167
167
|
// src/layout/resolveSpacing.ts
|
|
168
168
|
function resolveSpacing(spacing, value) {
|
|
@@ -277,9 +277,9 @@ function Column({ inverted = false, style, ...boxProps }) {
|
|
|
277
277
|
}
|
|
278
278
|
|
|
279
279
|
// src/layout/Grid.tsx
|
|
280
|
+
var import_core4 = require("@onlynative/core");
|
|
280
281
|
var import_react6 = __toESM(require("react"));
|
|
281
282
|
var import_react_native4 = require("react-native");
|
|
282
|
-
var import_core4 = require("@onlynative/core");
|
|
283
283
|
|
|
284
284
|
// src/layout/Row.tsx
|
|
285
285
|
var import_react5 = require("react");
|
|
@@ -338,22 +338,9 @@ function Grid({
|
|
|
338
338
|
}
|
|
339
339
|
|
|
340
340
|
// src/button/Button.tsx
|
|
341
|
-
var import_react7 = require("react");
|
|
342
|
-
var import_react_native9 = require("react-native");
|
|
343
341
|
var import_core5 = require("@onlynative/core");
|
|
344
342
|
|
|
345
|
-
// ../utils/
|
|
346
|
-
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
347
|
-
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
348
|
-
}) : x)(function(x) {
|
|
349
|
-
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
350
|
-
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
351
|
-
});
|
|
352
|
-
|
|
353
|
-
// ../utils/dist/index.mjs
|
|
354
|
-
var import_react_native5 = require("react-native");
|
|
355
|
-
var import_react_native6 = require("react-native");
|
|
356
|
-
var import_react_native7 = require("react-native");
|
|
343
|
+
// ../utils/src/color.ts
|
|
357
344
|
function parseHexColor(color) {
|
|
358
345
|
const normalized = color.replace("#", "");
|
|
359
346
|
if (normalized.length !== 6 && normalized.length !== 8) {
|
|
@@ -396,6 +383,9 @@ function blendColor(base, overlay, overlayAlpha) {
|
|
|
396
383
|
);
|
|
397
384
|
return `rgb(${r}, ${g}, ${b})`;
|
|
398
385
|
}
|
|
386
|
+
|
|
387
|
+
// ../utils/src/elevation.ts
|
|
388
|
+
var import_react_native5 = require("react-native");
|
|
399
389
|
function elevationStyle(level) {
|
|
400
390
|
if (import_react_native5.Platform.OS === "web") {
|
|
401
391
|
const { shadowOffset, shadowOpacity, shadowRadius } = level;
|
|
@@ -417,13 +407,15 @@ function elevationStyle(level) {
|
|
|
417
407
|
elevation: level.elevation
|
|
418
408
|
};
|
|
419
409
|
}
|
|
410
|
+
|
|
411
|
+
// ../utils/src/icon.ts
|
|
420
412
|
var _MCIcons = null;
|
|
421
413
|
var _resolved = false;
|
|
422
414
|
function getMaterialCommunityIcons() {
|
|
423
415
|
if (!_resolved) {
|
|
424
416
|
_resolved = true;
|
|
425
417
|
try {
|
|
426
|
-
const mod =
|
|
418
|
+
const mod = require("@expo/vector-icons/MaterialCommunityIcons");
|
|
427
419
|
_MCIcons = mod.default || mod;
|
|
428
420
|
} catch {
|
|
429
421
|
_MCIcons = null;
|
|
@@ -436,6 +428,9 @@ function getMaterialCommunityIcons() {
|
|
|
436
428
|
}
|
|
437
429
|
return _MCIcons;
|
|
438
430
|
}
|
|
431
|
+
|
|
432
|
+
// ../utils/src/pressable.ts
|
|
433
|
+
var import_react_native6 = require("react-native");
|
|
439
434
|
function resolvePressableStyle(base, hovered, pressed, disabled, isDisabled, style) {
|
|
440
435
|
if (typeof style === "function") {
|
|
441
436
|
return (state) => [
|
|
@@ -458,6 +453,9 @@ function resolveColorFromStyle(...styles3) {
|
|
|
458
453
|
const flattened = import_react_native6.StyleSheet.flatten(styles3);
|
|
459
454
|
return typeof (flattened == null ? void 0 : flattened.color) === "string" ? flattened.color : void 0;
|
|
460
455
|
}
|
|
456
|
+
|
|
457
|
+
// ../utils/src/rtl.ts
|
|
458
|
+
var import_react_native7 = require("react-native");
|
|
461
459
|
function transformOrigin(vertical = "top") {
|
|
462
460
|
return import_react_native7.I18nManager.isRTL ? `right ${vertical}` : `left ${vertical}`;
|
|
463
461
|
}
|
|
@@ -465,6 +463,10 @@ function selectRTL(ltr, rtl) {
|
|
|
465
463
|
return import_react_native7.I18nManager.isRTL ? rtl : ltr;
|
|
466
464
|
}
|
|
467
465
|
|
|
466
|
+
// src/button/Button.tsx
|
|
467
|
+
var import_react7 = require("react");
|
|
468
|
+
var import_react_native9 = require("react-native");
|
|
469
|
+
|
|
468
470
|
// src/button/styles.ts
|
|
469
471
|
var import_react_native8 = require("react-native");
|
|
470
472
|
function getVariantColors(theme, variant) {
|
|
@@ -786,9 +788,9 @@ function Button({
|
|
|
786
788
|
}
|
|
787
789
|
|
|
788
790
|
// src/icon-button/IconButton.tsx
|
|
791
|
+
var import_core6 = require("@onlynative/core");
|
|
789
792
|
var import_react8 = require("react");
|
|
790
793
|
var import_react_native11 = require("react-native");
|
|
791
|
-
var import_core6 = require("@onlynative/core");
|
|
792
794
|
|
|
793
795
|
// src/icon-button/styles.ts
|
|
794
796
|
var import_react_native10 = require("react-native");
|
|
@@ -1031,11 +1033,13 @@ function createStyles2(theme) {
|
|
|
1031
1033
|
borderColor: disabledContainerColor,
|
|
1032
1034
|
cursor: "auto"
|
|
1033
1035
|
},
|
|
1036
|
+
// eslint-disable-next-line react-native/no-color-literals
|
|
1034
1037
|
disabledOutlined: {
|
|
1035
1038
|
backgroundColor: "transparent",
|
|
1036
1039
|
borderColor: disabledOutlineColor,
|
|
1037
1040
|
cursor: "auto"
|
|
1038
1041
|
},
|
|
1042
|
+
// eslint-disable-next-line react-native/no-color-literals
|
|
1039
1043
|
disabledStandard: {
|
|
1040
1044
|
backgroundColor: "transparent",
|
|
1041
1045
|
borderColor: "transparent",
|
|
@@ -1276,14 +1280,14 @@ function IconButton({
|
|
|
1276
1280
|
}
|
|
1277
1281
|
|
|
1278
1282
|
// src/appbar/AppBar.tsx
|
|
1283
|
+
var import_core8 = require("@onlynative/core");
|
|
1279
1284
|
var import_react9 = require("react");
|
|
1280
1285
|
var import_react_native13 = require("react-native");
|
|
1281
1286
|
var import_react_native_safe_area_context2 = require("react-native-safe-area-context");
|
|
1282
|
-
var import_core8 = require("@onlynative/core");
|
|
1283
1287
|
|
|
1284
1288
|
// src/appbar/styles.ts
|
|
1285
|
-
var import_react_native12 = require("react-native");
|
|
1286
1289
|
var import_core7 = require("@onlynative/core");
|
|
1290
|
+
var import_react_native12 = require("react-native");
|
|
1287
1291
|
function getColorSchemeColors(theme, colorScheme) {
|
|
1288
1292
|
switch (colorScheme) {
|
|
1289
1293
|
case "surfaceContainerLowest":
|
|
@@ -1559,7 +1563,13 @@ function AppBar({
|
|
|
1559
1563
|
},
|
|
1560
1564
|
`${String(action.icon)}-${index}`
|
|
1561
1565
|
)) });
|
|
1562
|
-
}, [
|
|
1566
|
+
}, [
|
|
1567
|
+
actions,
|
|
1568
|
+
resolvedContentColor,
|
|
1569
|
+
styles3.actionsRow,
|
|
1570
|
+
styles3.iconFrame,
|
|
1571
|
+
trailing
|
|
1572
|
+
]);
|
|
1563
1573
|
const onLeadingLayout = (0, import_react9.useCallback)((event) => {
|
|
1564
1574
|
const nextWidth = measureWidth(event);
|
|
1565
1575
|
setLeadingWidth((currentWidth) => {
|
|
@@ -1662,9 +1672,9 @@ function AppBar({
|
|
|
1662
1672
|
}
|
|
1663
1673
|
|
|
1664
1674
|
// src/card/Card.tsx
|
|
1675
|
+
var import_core9 = require("@onlynative/core");
|
|
1665
1676
|
var import_react10 = require("react");
|
|
1666
1677
|
var import_react_native15 = require("react-native");
|
|
1667
|
-
var import_core9 = require("@onlynative/core");
|
|
1668
1678
|
|
|
1669
1679
|
// src/card/styles.ts
|
|
1670
1680
|
var import_react_native14 = require("react-native");
|
|
@@ -1826,9 +1836,9 @@ function Card({
|
|
|
1826
1836
|
}
|
|
1827
1837
|
|
|
1828
1838
|
// src/chip/Chip.tsx
|
|
1839
|
+
var import_core10 = require("@onlynative/core");
|
|
1829
1840
|
var import_react11 = require("react");
|
|
1830
1841
|
var import_react_native17 = require("react-native");
|
|
1831
|
-
var import_core10 = require("@onlynative/core");
|
|
1832
1842
|
|
|
1833
1843
|
// src/chip/styles.ts
|
|
1834
1844
|
var import_react_native16 = require("react-native");
|
|
@@ -2152,9 +2162,9 @@ function Chip({
|
|
|
2152
2162
|
}
|
|
2153
2163
|
|
|
2154
2164
|
// src/checkbox/Checkbox.tsx
|
|
2165
|
+
var import_core11 = require("@onlynative/core");
|
|
2155
2166
|
var import_react12 = require("react");
|
|
2156
2167
|
var import_react_native19 = require("react-native");
|
|
2157
|
-
var import_core11 = require("@onlynative/core");
|
|
2158
2168
|
|
|
2159
2169
|
// src/checkbox/styles.ts
|
|
2160
2170
|
var import_react_native18 = require("react-native");
|
|
@@ -2340,9 +2350,9 @@ function Checkbox({
|
|
|
2340
2350
|
}
|
|
2341
2351
|
|
|
2342
2352
|
// src/radio/Radio.tsx
|
|
2353
|
+
var import_core12 = require("@onlynative/core");
|
|
2343
2354
|
var import_react13 = require("react");
|
|
2344
2355
|
var import_react_native21 = require("react-native");
|
|
2345
|
-
var import_core12 = require("@onlynative/core");
|
|
2346
2356
|
|
|
2347
2357
|
// src/radio/styles.ts
|
|
2348
2358
|
var import_react_native20 = require("react-native");
|
|
@@ -2515,9 +2525,9 @@ function Radio({
|
|
|
2515
2525
|
}
|
|
2516
2526
|
|
|
2517
2527
|
// src/switch/Switch.tsx
|
|
2528
|
+
var import_core13 = require("@onlynative/core");
|
|
2518
2529
|
var import_react14 = require("react");
|
|
2519
2530
|
var import_react_native23 = require("react-native");
|
|
2520
|
-
var import_core13 = require("@onlynative/core");
|
|
2521
2531
|
|
|
2522
2532
|
// src/switch/styles.ts
|
|
2523
2533
|
var import_react_native22 = require("react-native");
|
|
@@ -2727,9 +2737,9 @@ function Switch({
|
|
|
2727
2737
|
}
|
|
2728
2738
|
|
|
2729
2739
|
// src/text-field/TextField.tsx
|
|
2740
|
+
var import_core14 = require("@onlynative/core");
|
|
2730
2741
|
var import_react15 = require("react");
|
|
2731
2742
|
var import_react_native25 = require("react-native");
|
|
2732
|
-
var import_core14 = require("@onlynative/core");
|
|
2733
2743
|
|
|
2734
2744
|
// src/text-field/styles.ts
|
|
2735
2745
|
var import_react_native24 = require("react-native");
|
|
@@ -3150,9 +3160,9 @@ function TextField({
|
|
|
3150
3160
|
}
|
|
3151
3161
|
|
|
3152
3162
|
// src/list/List.tsx
|
|
3163
|
+
var import_core15 = require("@onlynative/core");
|
|
3153
3164
|
var import_react16 = require("react");
|
|
3154
3165
|
var import_react_native27 = require("react-native");
|
|
3155
|
-
var import_core15 = require("@onlynative/core");
|
|
3156
3166
|
|
|
3157
3167
|
// src/list/styles.ts
|
|
3158
3168
|
var import_react_native26 = require("react-native");
|
|
@@ -3274,9 +3284,9 @@ function List({ children, style, ...props }) {
|
|
|
3274
3284
|
}
|
|
3275
3285
|
|
|
3276
3286
|
// src/list/ListItem.tsx
|
|
3287
|
+
var import_core16 = require("@onlynative/core");
|
|
3277
3288
|
var import_react17 = require("react");
|
|
3278
3289
|
var import_react_native28 = require("react-native");
|
|
3279
|
-
var import_core16 = require("@onlynative/core");
|
|
3280
3290
|
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
3281
3291
|
function getLines(supportingText, overlineText, supportingTextNumberOfLines) {
|
|
3282
3292
|
if (supportingText && overlineText || supportingText && supportingTextNumberOfLines && supportingTextNumberOfLines > 1) {
|
|
@@ -3356,9 +3366,9 @@ function ListItem({
|
|
|
3356
3366
|
}
|
|
3357
3367
|
|
|
3358
3368
|
// src/list/ListDivider.tsx
|
|
3369
|
+
var import_core17 = require("@onlynative/core");
|
|
3359
3370
|
var import_react18 = require("react");
|
|
3360
3371
|
var import_react_native29 = require("react-native");
|
|
3361
|
-
var import_core17 = require("@onlynative/core");
|
|
3362
3372
|
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
3363
3373
|
function ListDivider({
|
|
3364
3374
|
inset = false,
|
|
@@ -3406,15 +3416,11 @@ function KeyboardAvoidingWrapper({
|
|
|
3406
3416
|
const subscriptions = [];
|
|
3407
3417
|
if (onKeyboardShow) {
|
|
3408
3418
|
const showEvent = isIOS ? "keyboardWillShow" : "keyboardDidShow";
|
|
3409
|
-
subscriptions.push(
|
|
3410
|
-
import_react_native31.Keyboard.addListener(showEvent, onKeyboardShow)
|
|
3411
|
-
);
|
|
3419
|
+
subscriptions.push(import_react_native31.Keyboard.addListener(showEvent, onKeyboardShow));
|
|
3412
3420
|
}
|
|
3413
3421
|
if (onKeyboardHide) {
|
|
3414
3422
|
const hideEvent = isIOS ? "keyboardWillHide" : "keyboardDidHide";
|
|
3415
|
-
subscriptions.push(
|
|
3416
|
-
import_react_native31.Keyboard.addListener(hideEvent, onKeyboardHide)
|
|
3417
|
-
);
|
|
3423
|
+
subscriptions.push(import_react_native31.Keyboard.addListener(hideEvent, onKeyboardHide));
|
|
3418
3424
|
}
|
|
3419
3425
|
return () => {
|
|
3420
3426
|
subscriptions.forEach((sub) => sub.remove());
|
|
@@ -3443,9 +3449,9 @@ function KeyboardAvoidingWrapper({
|
|
|
3443
3449
|
}
|
|
3444
3450
|
|
|
3445
3451
|
// src/avatar/Avatar.tsx
|
|
3452
|
+
var import_core18 = require("@onlynative/core");
|
|
3446
3453
|
var import_react20 = require("react");
|
|
3447
3454
|
var import_react_native33 = require("react-native");
|
|
3448
|
-
var import_core18 = require("@onlynative/core");
|
|
3449
3455
|
|
|
3450
3456
|
// src/avatar/styles.ts
|
|
3451
3457
|
var import_react_native32 = require("react-native");
|
|
@@ -57,15 +57,11 @@ function KeyboardAvoidingWrapper({
|
|
|
57
57
|
const subscriptions = [];
|
|
58
58
|
if (onKeyboardShow) {
|
|
59
59
|
const showEvent = isIOS ? "keyboardWillShow" : "keyboardDidShow";
|
|
60
|
-
subscriptions.push(
|
|
61
|
-
import_react_native2.Keyboard.addListener(showEvent, onKeyboardShow)
|
|
62
|
-
);
|
|
60
|
+
subscriptions.push(import_react_native2.Keyboard.addListener(showEvent, onKeyboardShow));
|
|
63
61
|
}
|
|
64
62
|
if (onKeyboardHide) {
|
|
65
63
|
const hideEvent = isIOS ? "keyboardWillHide" : "keyboardDidHide";
|
|
66
|
-
subscriptions.push(
|
|
67
|
-
import_react_native2.Keyboard.addListener(hideEvent, onKeyboardHide)
|
|
68
|
-
);
|
|
64
|
+
subscriptions.push(import_react_native2.Keyboard.addListener(hideEvent, onKeyboardHide));
|
|
69
65
|
}
|
|
70
66
|
return () => {
|
|
71
67
|
subscriptions.forEach((sub) => sub.remove());
|
package/dist/layout/index.js
CHANGED
|
@@ -39,10 +39,10 @@ __export(layout_exports, {
|
|
|
39
39
|
module.exports = __toCommonJS(layout_exports);
|
|
40
40
|
|
|
41
41
|
// src/layout/Layout.tsx
|
|
42
|
+
var import_core = require("@onlynative/core");
|
|
42
43
|
var import_react = require("react");
|
|
43
44
|
var import_react_native = require("react-native");
|
|
44
45
|
var import_react_native_safe_area_context = require("react-native-safe-area-context");
|
|
45
|
-
var import_core = require("@onlynative/core");
|
|
46
46
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
47
47
|
var defaultEdges = ["bottom"];
|
|
48
48
|
function resolveEdges(immersive, edges) {
|
|
@@ -96,9 +96,9 @@ function Layout({ immersive, edges, children, style }) {
|
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
// src/layout/Box.tsx
|
|
99
|
+
var import_core2 = require("@onlynative/core");
|
|
99
100
|
var import_react2 = require("react");
|
|
100
101
|
var import_react_native2 = require("react-native");
|
|
101
|
-
var import_core2 = require("@onlynative/core");
|
|
102
102
|
|
|
103
103
|
// src/layout/resolveSpacing.ts
|
|
104
104
|
function resolveSpacing(spacing, value) {
|
|
@@ -213,9 +213,9 @@ function Column({ inverted = false, style, ...boxProps }) {
|
|
|
213
213
|
}
|
|
214
214
|
|
|
215
215
|
// src/layout/Grid.tsx
|
|
216
|
+
var import_core3 = require("@onlynative/core");
|
|
216
217
|
var import_react5 = __toESM(require("react"));
|
|
217
218
|
var import_react_native3 = require("react-native");
|
|
218
|
-
var import_core3 = require("@onlynative/core");
|
|
219
219
|
|
|
220
220
|
// src/layout/Row.tsx
|
|
221
221
|
var import_react4 = require("react");
|