@kbach/react-native 1.0.0-beta.51 → 1.0.0-beta.53

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,6 +1,6 @@
1
1
  import {
2
2
  resolveClassName
3
- } from "./chunk-IJAXJVB4.mjs";
3
+ } from "./chunk-P75PP2QR.mjs";
4
4
 
5
5
  // src/jsxRuntimeCoreWeb.ts
6
6
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
package/dist/index.d.ts CHANGED
@@ -1,8 +1,9 @@
1
1
  export { ColorEntry, ContainerConfig, ThemeConfig, defaultTheme, getTheme, setTheme } from './theme';
2
- export { C as ClassArray, a as ClassDictionary, b as ClassValue, c as ColorScale, d as ColorsAPI, K as KbachConfig, T as ThemeProvider, e as ThemeProviderProps, f as ThemeState, g as ThemeStorageAdapter, h as applyKbachConfig, i as clsx, r as resolveKbachConfig, u as useColors, j as useDynamicToken, k as useTheme } from './clsx-BLLSnqAa.js';
2
+ export { B as Button, a as ButtonProps, C as ClassArray, b as ClassDictionary, c as ClassValue, d as ColorScale, e as ColorsAPI, H as H1, f as H2, g as H3, h as H4, i as H5, j as H6, k as HeadingProps, K as KbachConfig, P as Paragraph, l as ParagraphProps, T as ThemeProvider, m as ThemeProviderProps, n as ThemeState, o as ThemeStorageAdapter, p as applyKbachConfig, q as clsx, r as resolveKbachConfig, u as useColors, s as useDynamicToken, t as useTheme } from './semanticElements-Bk3TB-vt.js';
3
3
  export { ThemeMode, getGlobalDarkMode, getGlobalThemeMode, setGlobalThemeMode, subscribeGlobalDarkMode, toggleGlobalDarkMode } from './darkModeStore';
4
4
  export { deleteDynamicToken, getDynamicToken, setDynamicToken, subscribeDynamicTokens } from './dynamicTokens';
5
5
  import 'react';
6
+ import 'react-native';
6
7
 
7
8
  type StyleValue = string | number | {
8
9
  width: number;
package/dist/index.js CHANGED
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
+ var __create = Object.create;
2
3
  var __defProp = Object.defineProperty;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
5
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
8
  var __export = (target, all) => {
7
9
  for (var name in all)
@@ -15,11 +17,27 @@ var __copyProps = (to, from, except, desc) => {
15
17
  }
16
18
  return to;
17
19
  };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
18
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
29
 
20
30
  // src/index.ts
21
31
  var src_exports = {};
22
32
  __export(src_exports, {
33
+ Button: () => Button,
34
+ H1: () => H1,
35
+ H2: () => H2,
36
+ H3: () => H3,
37
+ H4: () => H4,
38
+ H5: () => H5,
39
+ H6: () => H6,
40
+ Paragraph: () => Paragraph,
23
41
  ThemeProvider: () => ThemeProvider,
24
42
  applyKbachConfig: () => applyKbachConfig,
25
43
  clsx: () => clsx,
@@ -1457,6 +1475,8 @@ function resolveTextNative(parsed, theme) {
1457
1475
  if (size !== null) return [decl("font-size", size)];
1458
1476
  const align = textAlign(parsed.value);
1459
1477
  if (align !== null) return [decl("text-align", align)];
1478
+ } else if (parsed.isArbitrary && parsed.value !== null && looksLikeLength(parsed.value)) {
1479
+ return [decl("font-size", parsed.value)];
1460
1480
  }
1461
1481
  const hex = nativeHexColor(parsed, theme);
1462
1482
  return hex === null ? null : [decl("color", hex)];
@@ -2177,8 +2197,42 @@ function resolveClassValue(value) {
2177
2197
  }
2178
2198
  return "";
2179
2199
  }
2200
+
2201
+ // src/semanticElements.tsx
2202
+ var React = __toESM(require("react"));
2203
+ var import_react_native2 = require("react-native");
2204
+ var import_jsx_runtime2 = require("react/jsx-runtime");
2205
+ var Button = React.forwardRef(function Button2(props, ref) {
2206
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native2.Pressable, { ref, accessibilityRole: "button", ...props });
2207
+ });
2208
+ var PARAGRAPH_ROLE = "paragraph";
2209
+ var Paragraph = React.forwardRef(function Paragraph2(props, ref) {
2210
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native2.Text, { ref, role: PARAGRAPH_ROLE, ...props });
2211
+ });
2212
+ function makeHeading(level) {
2213
+ const extra = { "aria-level": level };
2214
+ const Heading = React.forwardRef(function Heading2(props, ref) {
2215
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native2.Text, { ref, accessibilityRole: "header", ...extra, ...props });
2216
+ });
2217
+ Heading.displayName = `H${level}`;
2218
+ return Heading;
2219
+ }
2220
+ var H1 = makeHeading(1);
2221
+ var H2 = makeHeading(2);
2222
+ var H3 = makeHeading(3);
2223
+ var H4 = makeHeading(4);
2224
+ var H5 = makeHeading(5);
2225
+ var H6 = makeHeading(6);
2180
2226
  // Annotate the CommonJS export names for ESM import in node:
2181
2227
  0 && (module.exports = {
2228
+ Button,
2229
+ H1,
2230
+ H2,
2231
+ H3,
2232
+ H4,
2233
+ H5,
2234
+ H6,
2235
+ Paragraph,
2182
2236
  ThemeProvider,
2183
2237
  applyKbachConfig,
2184
2238
  clsx,
@@ -1,8 +1,9 @@
1
1
  export { ColorEntry, ContainerConfig, ThemeConfig, defaultTheme, getTheme, setTheme } from './theme';
2
- export { C as ClassArray, a as ClassDictionary, b as ClassValue, c as ColorScale, d as ColorsAPI, K as KbachConfig, T as ThemeProvider, e as ThemeProviderProps, f as ThemeState, h as applyKbachConfig, i as clsx, r as resolveKbachConfig, u as useColors, j as useDynamicToken, k as useTheme } from './clsx-BLLSnqAa.js';
2
+ export { B as Button, a as ButtonProps, C as ClassArray, b as ClassDictionary, c as ClassValue, d as ColorScale, e as ColorsAPI, H as H1, f as H2, g as H3, h as H4, i as H5, j as H6, k as HeadingProps, K as KbachConfig, P as Paragraph, l as ParagraphProps, T as ThemeProvider, m as ThemeProviderProps, n as ThemeState, p as applyKbachConfig, q as clsx, r as resolveKbachConfig, u as useColors, s as useDynamicToken, t as useTheme } from './semanticElements-Bk3TB-vt.js';
3
3
  export { ThemeMode, getGlobalDarkMode, getGlobalThemeMode, setGlobalThemeMode, subscribeGlobalDarkMode, toggleGlobalDarkMode } from './darkModeStore';
4
4
  export { deleteDynamicToken, getDynamicToken, setDynamicToken, subscribeDynamicTokens } from './dynamicTokens';
5
5
  import 'react';
6
+ import 'react-native';
6
7
 
7
8
  /**
8
9
  * Resolves `classString` to CSS via the WASM engine, injects every returned