@kbach/react-native 1.0.0-beta.43 → 1.0.0-beta.46

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.
@@ -1,10 +1,10 @@
1
- import "./chunk-45OSRKPS.mjs";
1
+ import "./chunk-KT6TQLWI.mjs";
2
2
  import {
3
3
  Fragment,
4
4
  jsx,
5
5
  jsxs
6
- } from "./chunk-ZURXKRQE.mjs";
7
- import "./chunk-BTIGG7K2.mjs";
6
+ } from "./chunk-UFSVFF3V.mjs";
7
+ import "./chunk-DKZM4NUU.mjs";
8
8
 
9
9
  // src/jsxRuntimeCore.ts
10
10
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
@@ -105,6 +105,12 @@ function colorValue(theme, parsed) {
105
105
  if (rgb === null) return hex;
106
106
  return `rgba(${rgb.join(",")},${opacity / 100})`;
107
107
  }
108
+ var LENGTH_UNITS = ["px", "rem", "em", "%", "vh", "vw"];
109
+ function looksLikeLength(value) {
110
+ const unit = LENGTH_UNITS.find((u) => value.endsWith(u));
111
+ const withoutUnit = unit ? value.slice(0, value.length - unit.length) : value;
112
+ return withoutUnit !== "" && Number.isFinite(Number(withoutUnit));
113
+ }
108
114
 
109
115
  // src/jsxRuntimeCore.ts
110
116
  var import_dynamicTokens = require("./dynamicTokens");
@@ -1494,7 +1500,9 @@ function borderValue(theme, parsed) {
1494
1500
  if (value === "separate") return [decl("border-collapse", "separate")];
1495
1501
  }
1496
1502
  if (parsed.isArbitrary) {
1497
- return [decl("border-width", value)];
1503
+ if (looksLikeLength(value)) return [decl("border-width", value)];
1504
+ const color2 = colorValue(theme, parsed);
1505
+ return color2 === null ? null : [decl("border-color", color2)];
1498
1506
  }
1499
1507
  if (Number.isFinite(Number(value)) && value.trim() !== "") {
1500
1508
  const v = resolveLength(theme, parsed);
@@ -1509,7 +1517,11 @@ function borderValue(theme, parsed) {
1509
1517
  function borderSideValue(theme, parsed, sideProperty) {
1510
1518
  const value = parsed.value;
1511
1519
  if (value === null) return null;
1512
- if (parsed.isArbitrary) return [decl(`${sideProperty}-width`, value)];
1520
+ if (parsed.isArbitrary) {
1521
+ if (looksLikeLength(value)) return [decl(`${sideProperty}-width`, value)];
1522
+ const color2 = colorValue(theme, parsed);
1523
+ return color2 === null ? null : [decl(`${sideProperty}-color`, color2)];
1524
+ }
1513
1525
  if (Number.isFinite(Number(value)) && value.trim() !== "") {
1514
1526
  const v = resolveLength(theme, parsed);
1515
1527
  return v === null ? null : [decl(`${sideProperty}-width`, v)];
@@ -1523,7 +1535,11 @@ function borderSideValue(theme, parsed, sideProperty) {
1523
1535
  function borderAxisValue(theme, parsed, sideA, sideB) {
1524
1536
  const value = parsed.value;
1525
1537
  if (value === null) return null;
1526
- if (parsed.isArbitrary) return [decl(`${sideA}-width`, value), decl(`${sideB}-width`, value)];
1538
+ if (parsed.isArbitrary) {
1539
+ if (looksLikeLength(value)) return [decl(`${sideA}-width`, value), decl(`${sideB}-width`, value)];
1540
+ const color2 = colorValue(theme, parsed);
1541
+ return color2 === null ? null : [decl(`${sideA}-color`, color2), decl(`${sideB}-color`, color2)];
1542
+ }
1527
1543
  if (Number.isFinite(Number(value)) && value.trim() !== "") {
1528
1544
  const v = resolveLength(theme, parsed);
1529
1545
  return v === null ? null : [decl(`${sideA}-width`, v), decl(`${sideB}-width`, v)];
@@ -1590,7 +1606,11 @@ function outlineWidthValue(key) {
1590
1606
  function outlineValue(theme, parsed) {
1591
1607
  const value = parsed.value;
1592
1608
  if (value === null) return null;
1593
- if (parsed.isArbitrary) return [decl("outline-width", value)];
1609
+ if (parsed.isArbitrary) {
1610
+ if (looksLikeLength(value)) return [decl("outline-width", value)];
1611
+ const color2 = colorValue(theme, parsed);
1612
+ return color2 === null ? null : [decl("outline-color", color2)];
1613
+ }
1594
1614
  const w = outlineWidthValue(value);
1595
1615
  if (w !== null) return [decl("outline-width", w)];
1596
1616
  if (OUTLINE_STYLES.includes(value)) return [decl("outline-style", value)];