@onlynative/components 0.0.0-alpha.0 → 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/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,23 +338,9 @@ function Grid({
338
338
  }
339
339
 
340
340
  // src/button/Button.tsx
341
- var import_react7 = require("react");
342
- var import_react_native8 = require("react-native");
343
- var import_react_native9 = require("react-native");
344
- var import_react_native10 = require("react-native");
345
341
  var import_core5 = require("@onlynative/core");
346
342
 
347
- // ../utils/dist/chunk-OQRDRRQA.mjs
348
- var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
349
- get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
350
- }) : x)(function(x) {
351
- if (typeof require !== "undefined") return require.apply(this, arguments);
352
- throw Error('Dynamic require of "' + x + '" is not supported');
353
- });
354
-
355
- // ../utils/dist/index.mjs
356
- var import_react_native5 = require("react-native");
357
- var import_react_native6 = require("react-native");
343
+ // ../utils/src/color.ts
358
344
  function parseHexColor(color) {
359
345
  const normalized = color.replace("#", "");
360
346
  if (normalized.length !== 6 && normalized.length !== 8) {
@@ -397,6 +383,9 @@ function blendColor(base, overlay, overlayAlpha) {
397
383
  );
398
384
  return `rgb(${r}, ${g}, ${b})`;
399
385
  }
386
+
387
+ // ../utils/src/elevation.ts
388
+ var import_react_native5 = require("react-native");
400
389
  function elevationStyle(level) {
401
390
  if (import_react_native5.Platform.OS === "web") {
402
391
  const { shadowOffset, shadowOpacity, shadowRadius } = level;
@@ -418,13 +407,15 @@ function elevationStyle(level) {
418
407
  elevation: level.elevation
419
408
  };
420
409
  }
410
+
411
+ // ../utils/src/icon.ts
421
412
  var _MCIcons = null;
422
413
  var _resolved = false;
423
414
  function getMaterialCommunityIcons() {
424
415
  if (!_resolved) {
425
416
  _resolved = true;
426
417
  try {
427
- const mod = __require("@expo/vector-icons/MaterialCommunityIcons");
418
+ const mod = require("@expo/vector-icons/MaterialCommunityIcons");
428
419
  _MCIcons = mod.default || mod;
429
420
  } catch {
430
421
  _MCIcons = null;
@@ -437,15 +428,47 @@ function getMaterialCommunityIcons() {
437
428
  }
438
429
  return _MCIcons;
439
430
  }
431
+
432
+ // ../utils/src/pressable.ts
433
+ var import_react_native6 = require("react-native");
434
+ function resolvePressableStyle(base, hovered, pressed, disabled, isDisabled, style) {
435
+ if (typeof style === "function") {
436
+ return (state) => [
437
+ base,
438
+ state.hovered && !state.pressed && !isDisabled ? hovered : void 0,
439
+ state.pressed && !isDisabled ? pressed : void 0,
440
+ isDisabled ? disabled : void 0,
441
+ style(state)
442
+ ];
443
+ }
444
+ return (state) => [
445
+ base,
446
+ state.hovered && !state.pressed && !isDisabled ? hovered : void 0,
447
+ state.pressed && !isDisabled ? pressed : void 0,
448
+ isDisabled ? disabled : void 0,
449
+ style
450
+ ];
451
+ }
452
+ function resolveColorFromStyle(...styles3) {
453
+ const flattened = import_react_native6.StyleSheet.flatten(styles3);
454
+ return typeof (flattened == null ? void 0 : flattened.color) === "string" ? flattened.color : void 0;
455
+ }
456
+
457
+ // ../utils/src/rtl.ts
458
+ var import_react_native7 = require("react-native");
440
459
  function transformOrigin(vertical = "top") {
441
- return import_react_native6.I18nManager.isRTL ? `right ${vertical}` : `left ${vertical}`;
460
+ return import_react_native7.I18nManager.isRTL ? `right ${vertical}` : `left ${vertical}`;
442
461
  }
443
462
  function selectRTL(ltr, rtl) {
444
- return import_react_native6.I18nManager.isRTL ? rtl : ltr;
463
+ return import_react_native7.I18nManager.isRTL ? rtl : ltr;
445
464
  }
446
465
 
466
+ // src/button/Button.tsx
467
+ var import_react7 = require("react");
468
+ var import_react_native9 = require("react-native");
469
+
447
470
  // src/button/styles.ts
448
- var import_react_native7 = require("react-native");
471
+ var import_react_native8 = require("react-native");
449
472
  function getVariantColors(theme, variant) {
450
473
  const disabledContainerColor = alphaColor(theme.colors.onSurface, 0.12);
451
474
  const disabledLabelColor = alphaColor(theme.colors.onSurface, 0.38);
@@ -626,7 +649,7 @@ function createStyles(theme, variant, hasLeadingIcon, hasTrailingIcon, container
626
649
  const elevationLevel1 = elevationStyle(theme.elevation.level1);
627
650
  const elevationLevel2 = elevationStyle(theme.elevation.level2);
628
651
  const baseElevation = variant === "elevated" ? elevationLevel1 : elevationLevel0;
629
- return import_react_native7.StyleSheet.create({
652
+ return import_react_native8.StyleSheet.create({
630
653
  container: {
631
654
  alignSelf: "flex-start",
632
655
  alignItems: "center",
@@ -679,24 +702,6 @@ function createStyles(theme, variant, hasLeadingIcon, hasTrailingIcon, container
679
702
 
680
703
  // src/button/Button.tsx
681
704
  var import_jsx_runtime7 = require("react/jsx-runtime");
682
- function resolveStyle(containerStyle, hoveredContainerStyle, pressedContainerStyle, disabledContainerStyle, disabled, style) {
683
- if (typeof style === "function") {
684
- return (state) => [
685
- containerStyle,
686
- state.hovered && !state.pressed && !disabled ? hoveredContainerStyle : void 0,
687
- state.pressed && !disabled ? pressedContainerStyle : void 0,
688
- disabled ? disabledContainerStyle : void 0,
689
- style(state)
690
- ];
691
- }
692
- return (state) => [
693
- containerStyle,
694
- state.hovered && !state.pressed && !disabled ? hoveredContainerStyle : void 0,
695
- state.pressed && !disabled ? pressedContainerStyle : void 0,
696
- disabled ? disabledContainerStyle : void 0,
697
- style
698
- ];
699
- }
700
705
  function Button({
701
706
  children,
702
707
  style,
@@ -726,13 +731,13 @@ function Button({
726
731
  [theme, variant, hasLeading, hasTrailing, containerColor, contentColor]
727
732
  );
728
733
  const MaterialCommunityIcons = leadingIcon || trailingIcon ? getMaterialCommunityIcons() : null;
729
- const resolvedIconColor = (0, import_react7.useMemo)(() => {
730
- const base = import_react_native9.StyleSheet.flatten([
734
+ const resolvedIconColor = (0, import_react7.useMemo)(
735
+ () => resolveColorFromStyle(
731
736
  styles3.label,
732
737
  isDisabled ? styles3.disabledLabel : void 0
733
- ]);
734
- return typeof (base == null ? void 0 : base.color) === "string" ? base.color : void 0;
735
- }, [styles3.label, styles3.disabledLabel, isDisabled]);
738
+ ),
739
+ [styles3.label, styles3.disabledLabel, isDisabled]
740
+ );
736
741
  const computedLabelStyle = (0, import_react7.useMemo)(
737
742
  () => [
738
743
  styles3.label,
@@ -742,14 +747,14 @@ function Button({
742
747
  [isDisabled, styles3.disabledLabel, styles3.label, labelStyleOverride]
743
748
  );
744
749
  return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
745
- import_react_native8.Pressable,
750
+ import_react_native9.Pressable,
746
751
  {
747
752
  ...props,
748
753
  accessibilityRole: "button",
749
754
  accessibilityState: { disabled: isDisabled },
750
- hitSlop: import_react_native8.Platform.OS === "web" ? void 0 : 4,
755
+ hitSlop: import_react_native9.Platform.OS === "web" ? void 0 : 4,
751
756
  disabled: isDisabled,
752
- style: resolveStyle(
757
+ style: resolvePressableStyle(
753
758
  styles3.container,
754
759
  styles3.hoveredContainer,
755
760
  styles3.pressedContainer,
@@ -767,7 +772,7 @@ function Button({
767
772
  style: styles3.leadingIcon
768
773
  }
769
774
  ) : null,
770
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react_native10.Text, { style: computedLabelStyle, children }),
775
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react_native9.Text, { style: computedLabelStyle, children }),
771
776
  trailingIcon ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
772
777
  MaterialCommunityIcons,
773
778
  {
@@ -783,17 +788,17 @@ function Button({
783
788
  }
784
789
 
785
790
  // src/icon-button/IconButton.tsx
786
- var import_react8 = require("react");
787
- var import_react_native12 = require("react-native");
788
791
  var import_core6 = require("@onlynative/core");
792
+ var import_react8 = require("react");
793
+ var import_react_native11 = require("react-native");
789
794
 
790
795
  // src/icon-button/styles.ts
791
- var import_react_native11 = require("react-native");
796
+ var import_react_native10 = require("react-native");
792
797
  function createStyles2(theme) {
793
798
  const disabledContainerColor = alphaColor(theme.colors.onSurface, 0.12);
794
799
  const disabledOutlineColor = alphaColor(theme.colors.onSurface, 0.12);
795
800
  const toggleUnselectedContainerColor = theme.colors.surfaceContainerHighest;
796
- return import_react_native11.StyleSheet.create({
801
+ return import_react_native10.StyleSheet.create({
797
802
  container: {
798
803
  borderRadius: theme.shape.cornerFull,
799
804
  alignItems: "center",
@@ -1028,11 +1033,13 @@ function createStyles2(theme) {
1028
1033
  borderColor: disabledContainerColor,
1029
1034
  cursor: "auto"
1030
1035
  },
1036
+ // eslint-disable-next-line react-native/no-color-literals
1031
1037
  disabledOutlined: {
1032
1038
  backgroundColor: "transparent",
1033
1039
  borderColor: disabledOutlineColor,
1034
1040
  cursor: "auto"
1035
1041
  },
1042
+ // eslint-disable-next-line react-native/no-color-literals
1036
1043
  disabledStandard: {
1037
1044
  backgroundColor: "transparent",
1038
1045
  borderColor: "transparent",
@@ -1231,7 +1238,7 @@ function IconButton({
1231
1238
  };
1232
1239
  }, [containerColor, resolvedIconColor, theme.stateLayer]);
1233
1240
  return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1234
- import_react_native12.Pressable,
1241
+ import_react_native11.Pressable,
1235
1242
  {
1236
1243
  ...props,
1237
1244
  accessibilityRole: "button",
@@ -1273,14 +1280,14 @@ function IconButton({
1273
1280
  }
1274
1281
 
1275
1282
  // src/appbar/AppBar.tsx
1283
+ var import_core8 = require("@onlynative/core");
1276
1284
  var import_react9 = require("react");
1277
- var import_react_native14 = require("react-native");
1285
+ var import_react_native13 = require("react-native");
1278
1286
  var import_react_native_safe_area_context2 = require("react-native-safe-area-context");
1279
- var import_core8 = require("@onlynative/core");
1280
1287
 
1281
1288
  // src/appbar/styles.ts
1282
- var import_react_native13 = require("react-native");
1283
1289
  var import_core7 = require("@onlynative/core");
1290
+ var import_react_native12 = require("react-native");
1284
1291
  function getColorSchemeColors(theme, colorScheme) {
1285
1292
  switch (colorScheme) {
1286
1293
  case "surfaceContainerLowest":
@@ -1337,7 +1344,7 @@ function getColorSchemeColors(theme, colorScheme) {
1337
1344
  function createStyles3(theme, schemeColors) {
1338
1345
  var _a;
1339
1346
  const topAppBar = (_a = theme.topAppBar) != null ? _a : import_core7.defaultTopAppBarTokens;
1340
- return import_react_native13.StyleSheet.create({
1347
+ return import_react_native12.StyleSheet.create({
1341
1348
  root: {
1342
1349
  backgroundColor: schemeColors.containerColor
1343
1350
  },
@@ -1426,7 +1433,7 @@ function createStyles3(theme, schemeColors) {
1426
1433
  // src/appbar/AppBar.tsx
1427
1434
  var import_jsx_runtime9 = require("react/jsx-runtime");
1428
1435
  function getBackIcon() {
1429
- if (import_react_native14.Platform.OS === "ios") {
1436
+ if (import_react_native13.Platform.OS === "ios") {
1430
1437
  return selectRTL("chevron-left", "chevron-right");
1431
1438
  }
1432
1439
  return selectRTL("arrow-left", "arrow-right");
@@ -1457,7 +1464,7 @@ function withTopInset(enabled, content, style) {
1457
1464
  if (enabled) {
1458
1465
  return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native_safe_area_context2.SafeAreaView, { edges: ["top"], style, children: content });
1459
1466
  }
1460
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native14.View, { style, children: content });
1467
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native13.View, { style, children: content });
1461
1468
  }
1462
1469
  function measureWidth(event) {
1463
1470
  return Math.round(event.nativeEvent.layout.width);
@@ -1518,7 +1525,7 @@ function AppBar({
1518
1525
  if (!canGoBack) {
1519
1526
  return null;
1520
1527
  }
1521
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native14.View, { style: styles3.iconFrame, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1528
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native13.View, { style: styles3.iconFrame, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1522
1529
  IconButton,
1523
1530
  {
1524
1531
  icon: getBackIcon(),
@@ -1537,8 +1544,8 @@ function AppBar({
1537
1544
  if (!actions || actions.length === 0) {
1538
1545
  return null;
1539
1546
  }
1540
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native14.View, { style: styles3.actionsRow, children: actions.map((action, index) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1541
- import_react_native14.View,
1547
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native13.View, { style: styles3.actionsRow, children: actions.map((action, index) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1548
+ import_react_native13.View,
1542
1549
  {
1543
1550
  style: styles3.iconFrame,
1544
1551
  children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
@@ -1556,7 +1563,13 @@ function AppBar({
1556
1563
  },
1557
1564
  `${String(action.icon)}-${index}`
1558
1565
  )) });
1559
- }, [actions, resolvedContentColor, styles3.actionsRow, styles3.iconFrame, trailing]);
1566
+ }, [
1567
+ actions,
1568
+ resolvedContentColor,
1569
+ styles3.actionsRow,
1570
+ styles3.iconFrame,
1571
+ trailing
1572
+ ]);
1560
1573
  const onLeadingLayout = (0, import_react9.useCallback)((event) => {
1561
1574
  const nextWidth = measureWidth(event);
1562
1575
  setLeadingWidth((currentWidth) => {
@@ -1575,9 +1588,9 @@ function AppBar({
1575
1588
  return nextWidth;
1576
1589
  });
1577
1590
  }, []);
1578
- const topRow = /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_react_native14.View, { style: styles3.topRow, children: [
1591
+ const topRow = /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_react_native13.View, { style: styles3.topRow, children: [
1579
1592
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1580
- import_react_native14.View,
1593
+ import_react_native13.View,
1581
1594
  {
1582
1595
  collapsable: false,
1583
1596
  onLayout: onLeadingLayout,
@@ -1585,9 +1598,9 @@ function AppBar({
1585
1598
  children: leadingContent
1586
1599
  }
1587
1600
  ),
1588
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native14.View, { style: styles3.topRowSpacer }),
1601
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native13.View, { style: styles3.topRowSpacer }),
1589
1602
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1590
- import_react_native14.View,
1603
+ import_react_native13.View,
1591
1604
  {
1592
1605
  collapsable: false,
1593
1606
  onLayout: onActionsLayout,
@@ -1609,10 +1622,10 @@ function AppBar({
1609
1622
  containerOverride
1610
1623
  ];
1611
1624
  if (isExpanded) {
1612
- const content2 = /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_react_native14.View, { style: [styles3.expandedContainer, getSizeStyle2(styles3, size)], children: [
1625
+ const content2 = /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_react_native13.View, { style: [styles3.expandedContainer, getSizeStyle2(styles3, size)], children: [
1613
1626
  topRow,
1614
1627
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1615
- import_react_native14.View,
1628
+ import_react_native13.View,
1616
1629
  {
1617
1630
  style: [
1618
1631
  styles3.expandedTitleContainer,
@@ -1636,11 +1649,11 @@ function AppBar({
1636
1649
  }
1637
1650
  )
1638
1651
  ] });
1639
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native14.View, { style: rootStyle, children: withTopInset(insetTop, content2, safeAreaStyle) });
1652
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native13.View, { style: rootStyle, children: withTopInset(insetTop, content2, safeAreaStyle) });
1640
1653
  }
1641
- const content = /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_react_native14.View, { style: styles3.smallContainer, children: [
1654
+ const content = /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_react_native13.View, { style: styles3.smallContainer, children: [
1642
1655
  topRow,
1643
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native14.View, { style: [styles3.overlayTitleContainer, overlayTitleInsetStyle], children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1656
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native13.View, { style: [styles3.overlayTitleContainer, overlayTitleInsetStyle], children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1644
1657
  Typography,
1645
1658
  {
1646
1659
  ...APP_BAR_TITLE_TEXT_PROPS,
@@ -1655,16 +1668,16 @@ function AppBar({
1655
1668
  }
1656
1669
  ) })
1657
1670
  ] });
1658
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native14.View, { style: rootStyle, children: withTopInset(insetTop, content, safeAreaStyle) });
1671
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native13.View, { style: rootStyle, children: withTopInset(insetTop, content, safeAreaStyle) });
1659
1672
  }
1660
1673
 
1661
1674
  // src/card/Card.tsx
1662
- var import_react10 = require("react");
1663
- var import_react_native16 = require("react-native");
1664
1675
  var import_core9 = require("@onlynative/core");
1676
+ var import_react10 = require("react");
1677
+ var import_react_native15 = require("react-native");
1665
1678
 
1666
1679
  // src/card/styles.ts
1667
- var import_react_native15 = require("react-native");
1680
+ var import_react_native14 = require("react-native");
1668
1681
  function getVariantColors2(theme, variant) {
1669
1682
  const disabledContainerColor = alphaColor(theme.colors.onSurface, 0.12);
1670
1683
  const disabledOutlineColor = alphaColor(theme.colors.onSurface, 0.12);
@@ -1748,7 +1761,7 @@ function createStyles4(theme, variant, containerColor) {
1748
1761
  const elevationLevel1 = elevationStyle(theme.elevation.level1);
1749
1762
  const elevationLevel2 = elevationStyle(theme.elevation.level2);
1750
1763
  const baseElevation = variant === "elevated" ? elevationLevel1 : elevationLevel0;
1751
- return import_react_native15.StyleSheet.create({
1764
+ return import_react_native14.StyleSheet.create({
1752
1765
  container: {
1753
1766
  borderRadius: theme.shape.cornerMedium,
1754
1767
  backgroundColor: colors.backgroundColor,
@@ -1798,38 +1811,37 @@ function Card({
1798
1811
  [theme, variant, containerColor]
1799
1812
  );
1800
1813
  if (!isInteractive) {
1801
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_native16.View, { ...props, style: [styles3.container, style], children });
1802
- }
1803
- const resolvedStyle = (state) => [
1804
- styles3.container,
1805
- styles3.interactiveContainer,
1806
- state.hovered && !state.pressed && !isDisabled ? styles3.hoveredContainer : void 0,
1807
- state.pressed && !isDisabled ? styles3.pressedContainer : void 0,
1808
- isDisabled ? styles3.disabledContainer : void 0,
1809
- typeof style === "function" ? style(state) : style
1810
- ];
1814
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_native15.View, { ...props, style: [styles3.container, style], children });
1815
+ }
1811
1816
  return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1812
- import_react_native16.Pressable,
1817
+ import_react_native15.Pressable,
1813
1818
  {
1814
1819
  ...props,
1815
1820
  role: "button",
1816
1821
  accessibilityState: { disabled: isDisabled },
1817
- hitSlop: import_react_native16.Platform.OS === "web" ? void 0 : 4,
1822
+ hitSlop: import_react_native15.Platform.OS === "web" ? void 0 : 4,
1818
1823
  disabled: isDisabled,
1819
1824
  onPress,
1820
- style: resolvedStyle,
1821
- children: isDisabled ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_native16.View, { style: styles3.disabledContent, children }) : children
1825
+ style: resolvePressableStyle(
1826
+ [styles3.container, styles3.interactiveContainer],
1827
+ styles3.hoveredContainer,
1828
+ styles3.pressedContainer,
1829
+ styles3.disabledContainer,
1830
+ isDisabled,
1831
+ style
1832
+ ),
1833
+ children: isDisabled ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_native15.View, { style: styles3.disabledContent, children }) : children
1822
1834
  }
1823
1835
  );
1824
1836
  }
1825
1837
 
1826
1838
  // src/chip/Chip.tsx
1827
- var import_react11 = require("react");
1828
- var import_react_native18 = require("react-native");
1829
1839
  var import_core10 = require("@onlynative/core");
1840
+ var import_react11 = require("react");
1841
+ var import_react_native17 = require("react-native");
1830
1842
 
1831
1843
  // src/chip/styles.ts
1832
- var import_react_native17 = require("react-native");
1844
+ var import_react_native16 = require("react-native");
1833
1845
  function getVariantColors3(theme, variant, elevated, selected) {
1834
1846
  const disabledContainerColor = alphaColor(theme.colors.onSurface, 0.12);
1835
1847
  const disabledLabelColor = alphaColor(theme.colors.onSurface, 0.38);
@@ -1957,7 +1969,7 @@ function createStyles5(theme, variant, elevated, selected, hasLeadingContent, ha
1957
1969
  const elevationLevel2 = elevationStyle(theme.elevation.level2);
1958
1970
  const isElevated = elevated && variant !== "input";
1959
1971
  const baseElevation = isElevated ? elevationLevel1 : elevationLevel0;
1960
- return import_react_native17.StyleSheet.create({
1972
+ return import_react_native16.StyleSheet.create({
1961
1973
  container: {
1962
1974
  alignSelf: "flex-start",
1963
1975
  alignItems: "center",
@@ -2014,24 +2026,6 @@ function createStyles5(theme, variant, elevated, selected, hasLeadingContent, ha
2014
2026
 
2015
2027
  // src/chip/Chip.tsx
2016
2028
  var import_jsx_runtime11 = require("react/jsx-runtime");
2017
- function resolveStyle2(containerStyle, hoveredContainerStyle, pressedContainerStyle, disabledContainerStyle, disabled, style) {
2018
- if (typeof style === "function") {
2019
- return (state) => [
2020
- containerStyle,
2021
- state.hovered && !state.pressed && !disabled ? hoveredContainerStyle : void 0,
2022
- state.pressed && !disabled ? pressedContainerStyle : void 0,
2023
- disabled ? disabledContainerStyle : void 0,
2024
- style(state)
2025
- ];
2026
- }
2027
- return (state) => [
2028
- containerStyle,
2029
- state.hovered && !state.pressed && !disabled ? hoveredContainerStyle : void 0,
2030
- state.pressed && !disabled ? pressedContainerStyle : void 0,
2031
- disabled ? disabledContainerStyle : void 0,
2032
- style
2033
- ];
2034
- }
2035
2029
  function Chip({
2036
2030
  children,
2037
2031
  style,
@@ -2079,13 +2073,13 @@ function Chip({
2079
2073
  contentColor
2080
2074
  ]
2081
2075
  );
2082
- const resolvedIconColor = (0, import_react11.useMemo)(() => {
2083
- const base = import_react_native18.StyleSheet.flatten([
2076
+ const resolvedIconColor = (0, import_react11.useMemo)(
2077
+ () => resolveColorFromStyle(
2084
2078
  styles3.label,
2085
2079
  isDisabled ? styles3.disabledLabel : void 0
2086
- ]);
2087
- return typeof (base == null ? void 0 : base.color) === "string" ? base.color : void 0;
2088
- }, [styles3.label, styles3.disabledLabel, isDisabled]);
2080
+ ),
2081
+ [styles3.label, styles3.disabledLabel, isDisabled]
2082
+ );
2089
2083
  const computedLabelStyle = (0, import_react11.useMemo)(
2090
2084
  () => [
2091
2085
  styles3.label,
@@ -2096,7 +2090,7 @@ function Chip({
2096
2090
  );
2097
2091
  const renderLeadingContent = () => {
2098
2092
  if (variant === "input" && avatar) {
2099
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_native18.View, { style: styles3.avatar, children: avatar });
2093
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_native17.View, { style: styles3.avatar, children: avatar });
2100
2094
  }
2101
2095
  if (leadingIcon) {
2102
2096
  return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
@@ -2123,7 +2117,7 @@ function Chip({
2123
2117
  return null;
2124
2118
  };
2125
2119
  return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
2126
- import_react_native18.Pressable,
2120
+ import_react_native17.Pressable,
2127
2121
  {
2128
2122
  ...props,
2129
2123
  accessibilityRole: "button",
@@ -2131,9 +2125,9 @@ function Chip({
2131
2125
  disabled: isDisabled,
2132
2126
  ...variant === "filter" ? { selected: isSelected } : void 0
2133
2127
  },
2134
- hitSlop: import_react_native18.Platform.OS === "web" ? void 0 : 4,
2128
+ hitSlop: import_react_native17.Platform.OS === "web" ? void 0 : 4,
2135
2129
  disabled: isDisabled,
2136
- style: resolveStyle2(
2130
+ style: resolvePressableStyle(
2137
2131
  styles3.container,
2138
2132
  styles3.hoveredContainer,
2139
2133
  styles3.pressedContainer,
@@ -2143,9 +2137,9 @@ function Chip({
2143
2137
  ),
2144
2138
  children: [
2145
2139
  renderLeadingContent(),
2146
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_native18.Text, { style: computedLabelStyle, children }),
2140
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_native17.Text, { style: computedLabelStyle, children }),
2147
2141
  showCloseIcon ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
2148
- import_react_native18.Pressable,
2142
+ import_react_native17.Pressable,
2149
2143
  {
2150
2144
  onPress: onClose,
2151
2145
  accessibilityRole: "button",
@@ -2168,12 +2162,12 @@ function Chip({
2168
2162
  }
2169
2163
 
2170
2164
  // src/checkbox/Checkbox.tsx
2171
- var import_react12 = require("react");
2172
- var import_react_native20 = require("react-native");
2173
2165
  var import_core11 = require("@onlynative/core");
2166
+ var import_react12 = require("react");
2167
+ var import_react_native19 = require("react-native");
2174
2168
 
2175
2169
  // src/checkbox/styles.ts
2176
- var import_react_native19 = require("react-native");
2170
+ var import_react_native18 = require("react-native");
2177
2171
  function getColors(theme, checked) {
2178
2172
  const disabledOnSurface38 = alphaColor(theme.colors.onSurface, 0.38);
2179
2173
  if (checked) {
@@ -2249,7 +2243,7 @@ function createStyles6(theme, checked, containerColor, contentColor) {
2249
2243
  );
2250
2244
  const size = 18;
2251
2245
  const touchTarget = 48;
2252
- return import_react_native19.StyleSheet.create({
2246
+ return import_react_native18.StyleSheet.create({
2253
2247
  container: {
2254
2248
  width: touchTarget,
2255
2249
  height: touchTarget,
@@ -2294,24 +2288,6 @@ function createStyles6(theme, checked, containerColor, contentColor) {
2294
2288
 
2295
2289
  // src/checkbox/Checkbox.tsx
2296
2290
  var import_jsx_runtime12 = require("react/jsx-runtime");
2297
- function resolveStyle3(containerStyle, hoveredContainerStyle, pressedContainerStyle, disabledContainerStyle, disabled, style) {
2298
- if (typeof style === "function") {
2299
- return (state) => [
2300
- containerStyle,
2301
- state.hovered && !state.pressed && !disabled ? hoveredContainerStyle : void 0,
2302
- state.pressed && !disabled ? pressedContainerStyle : void 0,
2303
- disabled ? disabledContainerStyle : void 0,
2304
- style(state)
2305
- ];
2306
- }
2307
- return (state) => [
2308
- containerStyle,
2309
- state.hovered && !state.pressed && !disabled ? hoveredContainerStyle : void 0,
2310
- state.pressed && !disabled ? pressedContainerStyle : void 0,
2311
- disabled ? disabledContainerStyle : void 0,
2312
- style
2313
- ];
2314
- }
2315
2291
  function Checkbox({
2316
2292
  style,
2317
2293
  value = false,
@@ -2329,20 +2305,20 @@ function Checkbox({
2329
2305
  () => createStyles6(theme, isChecked, containerColor, contentColor),
2330
2306
  [theme, isChecked, containerColor, contentColor]
2331
2307
  );
2332
- const resolvedIconColor = (0, import_react12.useMemo)(() => {
2333
- const base = import_react_native20.StyleSheet.flatten([
2308
+ const resolvedIconColor = (0, import_react12.useMemo)(
2309
+ () => resolveColorFromStyle(
2334
2310
  styles3.iconColor,
2335
2311
  isDisabled ? styles3.disabledIconColor : void 0
2336
- ]);
2337
- return typeof (base == null ? void 0 : base.color) === "string" ? base.color : void 0;
2338
- }, [styles3.iconColor, styles3.disabledIconColor, isDisabled]);
2312
+ ),
2313
+ [styles3.iconColor, styles3.disabledIconColor, isDisabled]
2314
+ );
2339
2315
  const handlePress = () => {
2340
2316
  if (!isDisabled) {
2341
2317
  onValueChange == null ? void 0 : onValueChange(!isChecked);
2342
2318
  }
2343
2319
  };
2344
2320
  return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2345
- import_react_native20.Pressable,
2321
+ import_react_native19.Pressable,
2346
2322
  {
2347
2323
  ...props,
2348
2324
  accessibilityRole: "checkbox",
@@ -2350,10 +2326,10 @@ function Checkbox({
2350
2326
  disabled: isDisabled,
2351
2327
  checked: isChecked
2352
2328
  },
2353
- hitSlop: import_react_native20.Platform.OS === "web" ? void 0 : 4,
2329
+ hitSlop: import_react_native19.Platform.OS === "web" ? void 0 : 4,
2354
2330
  disabled: isDisabled,
2355
2331
  onPress: handlePress,
2356
- style: resolveStyle3(
2332
+ style: resolvePressableStyle(
2357
2333
  styles3.container,
2358
2334
  styles3.hoveredContainer,
2359
2335
  styles3.pressedContainer,
@@ -2361,7 +2337,7 @@ function Checkbox({
2361
2337
  isDisabled,
2362
2338
  style
2363
2339
  ),
2364
- children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react_native20.View, { style: [styles3.box, isDisabled ? styles3.disabledBox : void 0], children: isChecked ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2340
+ children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react_native19.View, { style: [styles3.box, isDisabled ? styles3.disabledBox : void 0], children: isChecked ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2365
2341
  MaterialCommunityIcons,
2366
2342
  {
2367
2343
  name: "check",
@@ -2374,12 +2350,12 @@ function Checkbox({
2374
2350
  }
2375
2351
 
2376
2352
  // src/radio/Radio.tsx
2377
- var import_react13 = require("react");
2378
- var import_react_native22 = require("react-native");
2379
2353
  var import_core12 = require("@onlynative/core");
2354
+ var import_react13 = require("react");
2355
+ var import_react_native21 = require("react-native");
2380
2356
 
2381
2357
  // src/radio/styles.ts
2382
- var import_react_native21 = require("react-native");
2358
+ var import_react_native20 = require("react-native");
2383
2359
  function getColors2(theme, selected) {
2384
2360
  const disabledOnSurface38 = alphaColor(theme.colors.onSurface, 0.38);
2385
2361
  if (selected) {
@@ -2443,7 +2419,7 @@ function createStyles7(theme, selected, containerColor, contentColor) {
2443
2419
  const outerSize = 20;
2444
2420
  const innerSize = 10;
2445
2421
  const touchTarget = 48;
2446
- return import_react_native21.StyleSheet.create({
2422
+ return import_react_native20.StyleSheet.create({
2447
2423
  container: {
2448
2424
  width: touchTarget,
2449
2425
  height: touchTarget,
@@ -2488,24 +2464,6 @@ function createStyles7(theme, selected, containerColor, contentColor) {
2488
2464
 
2489
2465
  // src/radio/Radio.tsx
2490
2466
  var import_jsx_runtime13 = require("react/jsx-runtime");
2491
- function resolveStyle4(containerStyle, hoveredContainerStyle, pressedContainerStyle, disabledContainerStyle, disabled, style) {
2492
- if (typeof style === "function") {
2493
- return (state) => [
2494
- containerStyle,
2495
- state.hovered && !state.pressed && !disabled ? hoveredContainerStyle : void 0,
2496
- state.pressed && !disabled ? pressedContainerStyle : void 0,
2497
- disabled ? disabledContainerStyle : void 0,
2498
- style(state)
2499
- ];
2500
- }
2501
- return (state) => [
2502
- containerStyle,
2503
- state.hovered && !state.pressed && !disabled ? hoveredContainerStyle : void 0,
2504
- state.pressed && !disabled ? pressedContainerStyle : void 0,
2505
- disabled ? disabledContainerStyle : void 0,
2506
- style
2507
- ];
2508
- }
2509
2467
  function Radio({
2510
2468
  style,
2511
2469
  value = false,
@@ -2528,7 +2486,7 @@ function Radio({
2528
2486
  }
2529
2487
  };
2530
2488
  return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
2531
- import_react_native22.Pressable,
2489
+ import_react_native21.Pressable,
2532
2490
  {
2533
2491
  ...props,
2534
2492
  accessibilityRole: "radio",
@@ -2536,10 +2494,10 @@ function Radio({
2536
2494
  disabled: isDisabled,
2537
2495
  checked: isSelected
2538
2496
  },
2539
- hitSlop: import_react_native22.Platform.OS === "web" ? void 0 : 4,
2497
+ hitSlop: import_react_native21.Platform.OS === "web" ? void 0 : 4,
2540
2498
  disabled: isDisabled,
2541
2499
  onPress: handlePress,
2542
- style: resolveStyle4(
2500
+ style: resolvePressableStyle(
2543
2501
  styles3.container,
2544
2502
  styles3.hoveredContainer,
2545
2503
  styles3.pressedContainer,
@@ -2548,11 +2506,11 @@ function Radio({
2548
2506
  style
2549
2507
  ),
2550
2508
  children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
2551
- import_react_native22.View,
2509
+ import_react_native21.View,
2552
2510
  {
2553
2511
  style: [styles3.outer, isDisabled ? styles3.disabledOuter : void 0],
2554
2512
  children: isSelected ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
2555
- import_react_native22.View,
2513
+ import_react_native21.View,
2556
2514
  {
2557
2515
  style: [
2558
2516
  styles3.inner,
@@ -2567,12 +2525,12 @@ function Radio({
2567
2525
  }
2568
2526
 
2569
2527
  // src/switch/Switch.tsx
2570
- var import_react14 = require("react");
2571
- var import_react_native24 = require("react-native");
2572
2528
  var import_core13 = require("@onlynative/core");
2529
+ var import_react14 = require("react");
2530
+ var import_react_native23 = require("react-native");
2573
2531
 
2574
2532
  // src/switch/styles.ts
2575
- var import_react_native23 = require("react-native");
2533
+ var import_react_native22 = require("react-native");
2576
2534
  function getColors3(theme, selected) {
2577
2535
  const disabledOnSurface12 = alphaColor(theme.colors.onSurface, 0.12);
2578
2536
  const disabledOnSurface38 = alphaColor(theme.colors.onSurface, 0.38);
@@ -2660,7 +2618,7 @@ function createStyles8(theme, selected, hasIcon, containerColor, contentColor) {
2660
2618
  const trackHeight = 32;
2661
2619
  const trackPadding = 4;
2662
2620
  const thumbOffset = selected ? trackWidth - trackPadding - thumbSize : trackPadding;
2663
- return import_react_native23.StyleSheet.create({
2621
+ return import_react_native22.StyleSheet.create({
2664
2622
  track: {
2665
2623
  width: trackWidth,
2666
2624
  height: trackHeight,
@@ -2706,24 +2664,6 @@ function createStyles8(theme, selected, hasIcon, containerColor, contentColor) {
2706
2664
 
2707
2665
  // src/switch/Switch.tsx
2708
2666
  var import_jsx_runtime14 = require("react/jsx-runtime");
2709
- function resolveStyle5(trackStyle, hoveredTrackStyle, pressedTrackStyle, disabledTrackStyle, disabled, style) {
2710
- if (typeof style === "function") {
2711
- return (state) => [
2712
- trackStyle,
2713
- state.hovered && !state.pressed && !disabled ? hoveredTrackStyle : void 0,
2714
- state.pressed && !disabled ? pressedTrackStyle : void 0,
2715
- disabled ? disabledTrackStyle : void 0,
2716
- style(state)
2717
- ];
2718
- }
2719
- return (state) => [
2720
- trackStyle,
2721
- state.hovered && !state.pressed && !disabled ? hoveredTrackStyle : void 0,
2722
- state.pressed && !disabled ? pressedTrackStyle : void 0,
2723
- disabled ? disabledTrackStyle : void 0,
2724
- style
2725
- ];
2726
- }
2727
2667
  function Switch({
2728
2668
  style,
2729
2669
  value = false,
@@ -2743,13 +2683,13 @@ function Switch({
2743
2683
  () => createStyles8(theme, isSelected, hasIcon, containerColor, contentColor),
2744
2684
  [theme, isSelected, hasIcon, containerColor, contentColor]
2745
2685
  );
2746
- const resolvedIconColor = (0, import_react14.useMemo)(() => {
2747
- const base = import_react_native24.StyleSheet.flatten([
2686
+ const resolvedIconColor = (0, import_react14.useMemo)(
2687
+ () => resolveColorFromStyle(
2748
2688
  styles3.iconColor,
2749
2689
  isDisabled ? styles3.disabledIconColor : void 0
2750
- ]);
2751
- return typeof (base == null ? void 0 : base.color) === "string" ? base.color : void 0;
2752
- }, [styles3.iconColor, styles3.disabledIconColor, isDisabled]);
2690
+ ),
2691
+ [styles3.iconColor, styles3.disabledIconColor, isDisabled]
2692
+ );
2753
2693
  const handlePress = () => {
2754
2694
  if (!isDisabled) {
2755
2695
  onValueChange == null ? void 0 : onValueChange(!isSelected);
@@ -2759,7 +2699,7 @@ function Switch({
2759
2699
  const MaterialCommunityIcons = iconName ? getMaterialCommunityIcons() : null;
2760
2700
  const iconSize = 16;
2761
2701
  return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
2762
- import_react_native24.Pressable,
2702
+ import_react_native23.Pressable,
2763
2703
  {
2764
2704
  ...props,
2765
2705
  accessibilityRole: "switch",
@@ -2767,10 +2707,10 @@ function Switch({
2767
2707
  disabled: isDisabled,
2768
2708
  checked: isSelected
2769
2709
  },
2770
- hitSlop: import_react_native24.Platform.OS === "web" ? void 0 : 4,
2710
+ hitSlop: import_react_native23.Platform.OS === "web" ? void 0 : 4,
2771
2711
  disabled: isDisabled,
2772
2712
  onPress: handlePress,
2773
- style: resolveStyle5(
2713
+ style: resolvePressableStyle(
2774
2714
  styles3.track,
2775
2715
  styles3.hoveredTrack,
2776
2716
  styles3.pressedTrack,
@@ -2779,7 +2719,7 @@ function Switch({
2779
2719
  style
2780
2720
  ),
2781
2721
  children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
2782
- import_react_native24.View,
2722
+ import_react_native23.View,
2783
2723
  {
2784
2724
  style: [styles3.thumb, isDisabled ? styles3.disabledThumb : void 0],
2785
2725
  children: iconName ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
@@ -2797,12 +2737,12 @@ function Switch({
2797
2737
  }
2798
2738
 
2799
2739
  // src/text-field/TextField.tsx
2800
- var import_react15 = require("react");
2801
- var import_react_native26 = require("react-native");
2802
2740
  var import_core14 = require("@onlynative/core");
2741
+ var import_react15 = require("react");
2742
+ var import_react_native25 = require("react-native");
2803
2743
 
2804
2744
  // src/text-field/styles.ts
2805
- var import_react_native25 = require("react-native");
2745
+ var import_react_native24 = require("react-native");
2806
2746
  var CONTAINER_HEIGHT = 56;
2807
2747
  var ICON_SIZE = 24;
2808
2748
  var LABEL_FLOATED_LINE_HEIGHT = 16;
@@ -2861,7 +2801,7 @@ function createStyles9(theme, variant) {
2861
2801
  const isFilled = variant === "filled";
2862
2802
  return {
2863
2803
  colors,
2864
- styles: import_react_native25.StyleSheet.create({
2804
+ styles: import_react_native24.StyleSheet.create({
2865
2805
  root: {
2866
2806
  alignSelf: "stretch"
2867
2807
  },
@@ -3038,13 +2978,13 @@ function TextField({
3038
2978
  const isControlled = value !== void 0;
3039
2979
  const hasValue = isControlled ? value !== "" : internalHasText;
3040
2980
  const isLabelFloated = isFocused || hasValue;
3041
- const labelAnimRef = (0, import_react15.useRef)(new import_react_native26.Animated.Value(isLabelFloated ? 1 : 0));
2981
+ const labelAnimRef = (0, import_react15.useRef)(new import_react_native25.Animated.Value(isLabelFloated ? 1 : 0));
3042
2982
  const labelAnim = labelAnimRef.current;
3043
2983
  (0, import_react15.useEffect)(() => {
3044
- import_react_native26.Animated.timing(labelAnim, {
2984
+ import_react_native25.Animated.timing(labelAnim, {
3045
2985
  toValue: isLabelFloated ? 1 : 0,
3046
2986
  duration: 150,
3047
- useNativeDriver: import_react_native26.Platform.OS !== "web"
2987
+ useNativeDriver: import_react_native25.Platform.OS !== "web"
3048
2988
  }).start();
3049
2989
  }, [isLabelFloated, labelAnim]);
3050
2990
  const labelScale = (0, import_react15.useMemo)(() => {
@@ -3122,9 +3062,9 @@ function TextField({
3122
3062
  [styles3, isFocused, isError, isDisabled]
3123
3063
  );
3124
3064
  const displaySupportingText = isError ? errorText : supportingText;
3125
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_react_native26.View, { style: [styles3.root, style], children: [
3126
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native26.Pressable, { onPress: handleContainerPress, disabled: isDisabled, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_react_native26.View, { style: containerStyle, children: [
3127
- leadingIcon ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native26.View, { style: styles3.leadingIcon, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
3065
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_react_native25.View, { style: [styles3.root, style], children: [
3066
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native25.Pressable, { onPress: handleContainerPress, disabled: isDisabled, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_react_native25.View, { style: containerStyle, children: [
3067
+ leadingIcon ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native25.View, { style: styles3.leadingIcon, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
3128
3068
  MaterialCommunityIcons,
3129
3069
  {
3130
3070
  name: leadingIcon,
@@ -3133,14 +3073,14 @@ function TextField({
3133
3073
  }
3134
3074
  ) }) : null,
3135
3075
  /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
3136
- import_react_native26.View,
3076
+ import_react_native25.View,
3137
3077
  {
3138
3078
  style: [
3139
3079
  styles3.inputWrapper,
3140
3080
  label ? styles3.inputWrapperWithLabel : void 0
3141
3081
  ],
3142
3082
  children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
3143
- import_react_native26.TextInput,
3083
+ import_react_native25.TextInput,
3144
3084
  {
3145
3085
  ref: inputRef,
3146
3086
  ...textInputProps,
@@ -3166,14 +3106,14 @@ function TextField({
3166
3106
  }
3167
3107
  ),
3168
3108
  trailingIcon ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
3169
- import_react_native26.Pressable,
3109
+ import_react_native25.Pressable,
3170
3110
  {
3171
3111
  onPress: onTrailingIconPress,
3172
3112
  disabled: isDisabled || !onTrailingIconPress,
3173
3113
  accessibilityRole: "button",
3174
3114
  hitSlop: 12,
3175
3115
  style: styles3.trailingIconPressable,
3176
- children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native26.View, { style: styles3.trailingIcon, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
3116
+ children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native25.View, { style: styles3.trailingIcon, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
3177
3117
  MaterialCommunityIcons,
3178
3118
  {
3179
3119
  name: trailingIcon,
@@ -3184,7 +3124,7 @@ function TextField({
3184
3124
  }
3185
3125
  ) : null,
3186
3126
  label ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
3187
- import_react_native26.Animated.Text,
3127
+ import_react_native25.Animated.Text,
3188
3128
  {
3189
3129
  numberOfLines: 1,
3190
3130
  style: [
@@ -3204,10 +3144,10 @@ function TextField({
3204
3144
  children: label
3205
3145
  }
3206
3146
  ) : null,
3207
- isFilled ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native26.View, { style: indicatorStyle }) : null
3147
+ isFilled ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native25.View, { style: indicatorStyle }) : null
3208
3148
  ] }) }),
3209
- displaySupportingText ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native26.View, { style: styles3.supportingTextRow, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
3210
- import_react_native26.Text,
3149
+ displaySupportingText ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native25.View, { style: styles3.supportingTextRow, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
3150
+ import_react_native25.Text,
3211
3151
  {
3212
3152
  style: [
3213
3153
  styles3.supportingText,
@@ -3220,12 +3160,12 @@ function TextField({
3220
3160
  }
3221
3161
 
3222
3162
  // src/list/List.tsx
3223
- var import_react16 = require("react");
3224
- var import_react_native28 = require("react-native");
3225
3163
  var import_core15 = require("@onlynative/core");
3164
+ var import_react16 = require("react");
3165
+ var import_react_native27 = require("react-native");
3226
3166
 
3227
3167
  // src/list/styles.ts
3228
- var import_react_native27 = require("react-native");
3168
+ var import_react_native26 = require("react-native");
3229
3169
  var ITEM_PADDING_VERTICAL = 12;
3230
3170
  var INSET_START = 56;
3231
3171
  var MIN_HEIGHT = {
@@ -3234,7 +3174,7 @@ var MIN_HEIGHT = {
3234
3174
  3: 88
3235
3175
  };
3236
3176
  function createListStyles(theme) {
3237
- return import_react_native27.StyleSheet.create({
3177
+ return import_react_native26.StyleSheet.create({
3238
3178
  container: {
3239
3179
  paddingVertical: theme.spacing.sm
3240
3180
  }
@@ -3271,7 +3211,7 @@ function getItemColors(theme, containerColor) {
3271
3211
  }
3272
3212
  function createListItemStyles(theme, lines, containerColor) {
3273
3213
  const colors = getItemColors(theme, containerColor);
3274
- return import_react_native27.StyleSheet.create({
3214
+ return import_react_native26.StyleSheet.create({
3275
3215
  container: {
3276
3216
  flexDirection: "row",
3277
3217
  alignItems: lines === 3 ? "flex-start" : "center",
@@ -3326,7 +3266,7 @@ function createListItemStyles(theme, lines, containerColor) {
3326
3266
  });
3327
3267
  }
3328
3268
  function createDividerStyles(theme, inset) {
3329
- return import_react_native27.StyleSheet.create({
3269
+ return import_react_native26.StyleSheet.create({
3330
3270
  divider: {
3331
3271
  height: 1,
3332
3272
  backgroundColor: theme.colors.outlineVariant,
@@ -3340,13 +3280,13 @@ var import_jsx_runtime16 = require("react/jsx-runtime");
3340
3280
  function List({ children, style, ...props }) {
3341
3281
  const theme = (0, import_core15.useTheme)();
3342
3282
  const styles3 = (0, import_react16.useMemo)(() => createListStyles(theme), [theme]);
3343
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native28.View, { ...props, style: [styles3.container, style], children });
3283
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native27.View, { ...props, style: [styles3.container, style], children });
3344
3284
  }
3345
3285
 
3346
3286
  // src/list/ListItem.tsx
3347
- var import_react17 = require("react");
3348
- var import_react_native29 = require("react-native");
3349
3287
  var import_core16 = require("@onlynative/core");
3288
+ var import_react17 = require("react");
3289
+ var import_react_native28 = require("react-native");
3350
3290
  var import_jsx_runtime17 = require("react/jsx-runtime");
3351
3291
  function getLines(supportingText, overlineText, supportingTextNumberOfLines) {
3352
3292
  if (supportingText && overlineText || supportingText && supportingTextNumberOfLines && supportingTextNumberOfLines > 1) {
@@ -3372,18 +3312,22 @@ function ListItem({
3372
3312
  const isDisabled = Boolean(disabled);
3373
3313
  const isInteractive = onPress !== void 0;
3374
3314
  const theme = (0, import_core16.useTheme)();
3375
- const lines = getLines(supportingText, overlineText, supportingTextNumberOfLines);
3315
+ const lines = getLines(
3316
+ supportingText,
3317
+ overlineText,
3318
+ supportingTextNumberOfLines
3319
+ );
3376
3320
  const styles3 = (0, import_react17.useMemo)(
3377
3321
  () => createListItemStyles(theme, lines, containerColor),
3378
3322
  [theme, lines, containerColor]
3379
3323
  );
3380
3324
  const content = /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
3381
- leadingContent != null && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native29.View, { style: styles3.leadingContent, children: leadingContent }),
3382
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native29.View, { style: styles3.textBlock, children: [
3383
- overlineText != null && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native29.Text, { style: styles3.overlineText, numberOfLines: 1, children: overlineText }),
3384
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native29.Text, { style: styles3.headlineText, numberOfLines: 1, children: headlineText }),
3325
+ leadingContent != null && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native28.View, { style: styles3.leadingContent, children: leadingContent }),
3326
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native28.View, { style: styles3.textBlock, children: [
3327
+ overlineText != null && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native28.Text, { style: styles3.overlineText, numberOfLines: 1, children: overlineText }),
3328
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native28.Text, { style: styles3.headlineText, numberOfLines: 1, children: headlineText }),
3385
3329
  supportingText != null && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
3386
- import_react_native29.Text,
3330
+ import_react_native28.Text,
3387
3331
  {
3388
3332
  style: styles3.supportingText,
3389
3333
  numberOfLines: supportingTextNumberOfLines,
@@ -3391,41 +3335,40 @@ function ListItem({
3391
3335
  }
3392
3336
  )
3393
3337
  ] }),
3394
- (trailingContent != null || trailingSupportingText != null) && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native29.View, { style: styles3.trailingBlock, children: [
3395
- trailingSupportingText != null && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native29.Text, { style: styles3.trailingSupportingText, numberOfLines: 1, children: trailingSupportingText }),
3338
+ (trailingContent != null || trailingSupportingText != null) && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native28.View, { style: styles3.trailingBlock, children: [
3339
+ trailingSupportingText != null && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native28.Text, { style: styles3.trailingSupportingText, numberOfLines: 1, children: trailingSupportingText }),
3396
3340
  trailingContent
3397
3341
  ] })
3398
3342
  ] });
3399
3343
  if (!isInteractive) {
3400
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native29.View, { ...props, style: [styles3.container, style], children: content });
3401
- }
3402
- const resolvedStyle = (state) => [
3403
- styles3.container,
3404
- styles3.interactiveContainer,
3405
- state.hovered && !state.pressed && !isDisabled ? styles3.hoveredContainer : void 0,
3406
- state.pressed && !isDisabled ? styles3.pressedContainer : void 0,
3407
- isDisabled ? styles3.disabledContainer : void 0,
3408
- typeof style === "function" ? style(state) : style
3409
- ];
3344
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native28.View, { ...props, style: [styles3.container, style], children: content });
3345
+ }
3410
3346
  return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
3411
- import_react_native29.Pressable,
3347
+ import_react_native28.Pressable,
3412
3348
  {
3413
3349
  ...props,
3414
3350
  role: "button",
3415
3351
  accessibilityState: { disabled: isDisabled },
3416
- hitSlop: import_react_native29.Platform.OS === "web" ? void 0 : 4,
3352
+ hitSlop: import_react_native28.Platform.OS === "web" ? void 0 : 4,
3417
3353
  disabled: isDisabled,
3418
3354
  onPress,
3419
- style: resolvedStyle,
3420
- children: isDisabled ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native29.View, { style: styles3.disabledContentWrapper, children: content }) : content
3355
+ style: resolvePressableStyle(
3356
+ [styles3.container, styles3.interactiveContainer],
3357
+ styles3.hoveredContainer,
3358
+ styles3.pressedContainer,
3359
+ styles3.disabledContainer,
3360
+ isDisabled,
3361
+ style
3362
+ ),
3363
+ children: isDisabled ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native28.View, { style: styles3.disabledContentWrapper, children: content }) : content
3421
3364
  }
3422
3365
  );
3423
3366
  }
3424
3367
 
3425
3368
  // src/list/ListDivider.tsx
3426
- var import_react18 = require("react");
3427
- var import_react_native30 = require("react-native");
3428
3369
  var import_core17 = require("@onlynative/core");
3370
+ var import_react18 = require("react");
3371
+ var import_react_native29 = require("react-native");
3429
3372
  var import_jsx_runtime18 = require("react/jsx-runtime");
3430
3373
  function ListDivider({
3431
3374
  inset = false,
@@ -3437,16 +3380,16 @@ function ListDivider({
3437
3380
  () => createDividerStyles(theme, inset),
3438
3381
  [theme, inset]
3439
3382
  );
3440
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native30.View, { ...props, style: [styles3.divider, style] });
3383
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native29.View, { ...props, style: [styles3.divider, style] });
3441
3384
  }
3442
3385
 
3443
3386
  // src/keyboard-avoiding-wrapper/KeyboardAvoidingWrapper.tsx
3444
3387
  var import_react19 = require("react");
3445
- var import_react_native32 = require("react-native");
3388
+ var import_react_native31 = require("react-native");
3446
3389
 
3447
3390
  // src/keyboard-avoiding-wrapper/styles.ts
3448
- var import_react_native31 = require("react-native");
3449
- var styles2 = import_react_native31.StyleSheet.create({
3391
+ var import_react_native30 = require("react-native");
3392
+ var styles2 = import_react_native30.StyleSheet.create({
3450
3393
  root: {
3451
3394
  flex: 1
3452
3395
  },
@@ -3457,7 +3400,7 @@ var styles2 = import_react_native31.StyleSheet.create({
3457
3400
 
3458
3401
  // src/keyboard-avoiding-wrapper/KeyboardAvoidingWrapper.tsx
3459
3402
  var import_jsx_runtime19 = require("react/jsx-runtime");
3460
- var isIOS = import_react_native32.Platform.OS === "ios";
3403
+ var isIOS = import_react_native31.Platform.OS === "ios";
3461
3404
  function KeyboardAvoidingWrapper({
3462
3405
  children,
3463
3406
  behavior = "padding",
@@ -3473,29 +3416,25 @@ function KeyboardAvoidingWrapper({
3473
3416
  const subscriptions = [];
3474
3417
  if (onKeyboardShow) {
3475
3418
  const showEvent = isIOS ? "keyboardWillShow" : "keyboardDidShow";
3476
- subscriptions.push(
3477
- import_react_native32.Keyboard.addListener(showEvent, onKeyboardShow)
3478
- );
3419
+ subscriptions.push(import_react_native31.Keyboard.addListener(showEvent, onKeyboardShow));
3479
3420
  }
3480
3421
  if (onKeyboardHide) {
3481
3422
  const hideEvent = isIOS ? "keyboardWillHide" : "keyboardDidHide";
3482
- subscriptions.push(
3483
- import_react_native32.Keyboard.addListener(hideEvent, onKeyboardHide)
3484
- );
3423
+ subscriptions.push(import_react_native31.Keyboard.addListener(hideEvent, onKeyboardHide));
3485
3424
  }
3486
3425
  return () => {
3487
3426
  subscriptions.forEach((sub) => sub.remove());
3488
3427
  };
3489
3428
  }, [onKeyboardShow, onKeyboardHide]);
3490
3429
  return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
3491
- import_react_native32.KeyboardAvoidingView,
3430
+ import_react_native31.KeyboardAvoidingView,
3492
3431
  {
3493
3432
  style: [styles2.root, style],
3494
3433
  behavior,
3495
3434
  keyboardVerticalOffset,
3496
3435
  enabled: !isIOS && enabled,
3497
3436
  children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
3498
- import_react_native32.ScrollView,
3437
+ import_react_native31.ScrollView,
3499
3438
  {
3500
3439
  automaticallyAdjustKeyboardInsets: isIOS && enabled,
3501
3440
  keyboardShouldPersistTaps: "handled",
@@ -3510,14 +3449,14 @@ function KeyboardAvoidingWrapper({
3510
3449
  }
3511
3450
 
3512
3451
  // src/avatar/Avatar.tsx
3513
- var import_react20 = require("react");
3514
- var import_react_native34 = require("react-native");
3515
3452
  var import_core18 = require("@onlynative/core");
3453
+ var import_react20 = require("react");
3454
+ var import_react_native33 = require("react-native");
3516
3455
 
3517
3456
  // src/avatar/styles.ts
3518
- var import_react_native33 = require("react-native");
3457
+ var import_react_native32 = require("react-native");
3519
3458
  function createStyles10(theme) {
3520
- return import_react_native33.StyleSheet.create({
3459
+ return import_react_native32.StyleSheet.create({
3521
3460
  container: {
3522
3461
  borderRadius: theme.shape.cornerFull,
3523
3462
  alignItems: "center",
@@ -3612,7 +3551,7 @@ function Avatar({
3612
3551
  }),
3613
3552
  [bgColor, fgColor, theme.stateLayer]
3614
3553
  );
3615
- const content = imageUri ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native34.Image, { source: { uri: imageUri }, style: styles3.image, accessible: false }) : label && !icon ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native34.Text, { style: initialsStyle, numberOfLines: 1, allowFontScaling: false, children: initials }) : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3554
+ const content = imageUri ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native33.Image, { source: { uri: imageUri }, style: styles3.image, accessible: false }) : label && !icon ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native33.Text, { style: initialsStyle, numberOfLines: 1, allowFontScaling: false, children: initials }) : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3616
3555
  MaterialCommunityIcons,
3617
3556
  {
3618
3557
  name: icon != null ? icon : "account",
@@ -3622,7 +3561,7 @@ function Avatar({
3622
3561
  );
3623
3562
  if (!isInteractive) {
3624
3563
  return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3625
- import_react_native34.View,
3564
+ import_react_native33.View,
3626
3565
  {
3627
3566
  ...props,
3628
3567
  accessibilityLabel,
@@ -3632,7 +3571,7 @@ function Avatar({
3632
3571
  );
3633
3572
  }
3634
3573
  return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3635
- import_react_native34.Pressable,
3574
+ import_react_native33.Pressable,
3636
3575
  {
3637
3576
  ...props,
3638
3577
  accessibilityRole: "button",