@kbach/react 0.6.14 → 0.6.15

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.
@@ -23,7 +23,7 @@ import {
23
23
  transformToWebProps,
24
24
  useConditionalWidth,
25
25
  useGlobalDarkMode
26
- } from "./chunk-HCRWLOJE.mjs";
26
+ } from "./chunk-YH2IOSKT.mjs";
27
27
 
28
28
  // src/jsx-runtime.tsx
29
29
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
@@ -2289,7 +2289,7 @@ var RESOLVERS = {
2289
2289
  "translate-x": ({ value, negative, isArbitrary }, { spacing }) => {
2290
2290
  const v = resolveSpacing(value, negative, spacing, isArbitrary);
2291
2291
  if (v === null) return null;
2292
- if (getEffectiveIsWeb()) return { transform: `translateX(${v})` };
2292
+ if (getEffectiveIsWeb()) return { transform: `translateX(${typeof v === "number" ? `${v}px` : v})` };
2293
2293
  if (typeof v === "string") {
2294
2294
  const n = parseFloat(v);
2295
2295
  return isNaN(n) ? null : { transform: [{ translateX: n }] };
@@ -2299,7 +2299,7 @@ var RESOLVERS = {
2299
2299
  "translate-y": ({ value, negative, isArbitrary }, { spacing }) => {
2300
2300
  const v = resolveSpacing(value, negative, spacing, isArbitrary);
2301
2301
  if (v === null) return null;
2302
- if (getEffectiveIsWeb()) return { transform: `translateY(${v})` };
2302
+ if (getEffectiveIsWeb()) return { transform: `translateY(${typeof v === "number" ? `${v}px` : v})` };
2303
2303
  if (typeof v === "string") {
2304
2304
  const n = parseFloat(v);
2305
2305
  return isNaN(n) ? null : { transform: [{ translateY: n }] };
package/dist/index.js CHANGED
@@ -2450,7 +2450,7 @@ var RESOLVERS = {
2450
2450
  "translate-x": ({ value, negative, isArbitrary }, { spacing }) => {
2451
2451
  const v = resolveSpacing(value, negative, spacing, isArbitrary);
2452
2452
  if (v === null) return null;
2453
- if (getEffectiveIsWeb()) return { transform: `translateX(${v})` };
2453
+ if (getEffectiveIsWeb()) return { transform: `translateX(${typeof v === "number" ? `${v}px` : v})` };
2454
2454
  if (typeof v === "string") {
2455
2455
  const n = parseFloat(v);
2456
2456
  return isNaN(n) ? null : { transform: [{ translateX: n }] };
@@ -2460,7 +2460,7 @@ var RESOLVERS = {
2460
2460
  "translate-y": ({ value, negative, isArbitrary }, { spacing }) => {
2461
2461
  const v = resolveSpacing(value, negative, spacing, isArbitrary);
2462
2462
  if (v === null) return null;
2463
- if (getEffectiveIsWeb()) return { transform: `translateY(${v})` };
2463
+ if (getEffectiveIsWeb()) return { transform: `translateY(${typeof v === "number" ? `${v}px` : v})` };
2464
2464
  if (typeof v === "string") {
2465
2465
  const n = parseFloat(v);
2466
2466
  return isNaN(n) ? null : { transform: [{ translateY: n }] };
package/dist/index.mjs CHANGED
@@ -39,7 +39,7 @@ import {
39
39
  useGlobalDarkMode,
40
40
  useGlobalWidth,
41
41
  useSyncExternalStore
42
- } from "./chunk-HCRWLOJE.mjs";
42
+ } from "./chunk-YH2IOSKT.mjs";
43
43
 
44
44
  // src/context.tsx
45
45
  import { createContext, useContext } from "react";
@@ -2408,7 +2408,7 @@ var RESOLVERS = {
2408
2408
  "translate-x": ({ value, negative, isArbitrary }, { spacing }) => {
2409
2409
  const v = resolveSpacing(value, negative, spacing, isArbitrary);
2410
2410
  if (v === null) return null;
2411
- if (getEffectiveIsWeb()) return { transform: `translateX(${v})` };
2411
+ if (getEffectiveIsWeb()) return { transform: `translateX(${typeof v === "number" ? `${v}px` : v})` };
2412
2412
  if (typeof v === "string") {
2413
2413
  const n = parseFloat(v);
2414
2414
  return isNaN(n) ? null : { transform: [{ translateX: n }] };
@@ -2418,7 +2418,7 @@ var RESOLVERS = {
2418
2418
  "translate-y": ({ value, negative, isArbitrary }, { spacing }) => {
2419
2419
  const v = resolveSpacing(value, negative, spacing, isArbitrary);
2420
2420
  if (v === null) return null;
2421
- if (getEffectiveIsWeb()) return { transform: `translateY(${v})` };
2421
+ if (getEffectiveIsWeb()) return { transform: `translateY(${typeof v === "number" ? `${v}px` : v})` };
2422
2422
  if (typeof v === "string") {
2423
2423
  const n = parseFloat(v);
2424
2424
  return isNaN(n) ? null : { transform: [{ translateY: n }] };
@@ -3,8 +3,8 @@ import {
3
3
  Fragment,
4
4
  jsx,
5
5
  jsxs
6
- } from "./chunk-7DHBNCL5.mjs";
7
- import "./chunk-HCRWLOJE.mjs";
6
+ } from "./chunk-THJIAZ6E.mjs";
7
+ import "./chunk-YH2IOSKT.mjs";
8
8
 
9
9
  // src/jsx-dev-runtime.tsx
10
10
  function jsxDEV(type, props, key, isStaticChildren, source, self) {
@@ -2409,7 +2409,7 @@ var RESOLVERS = {
2409
2409
  "translate-x": ({ value, negative, isArbitrary }, { spacing }) => {
2410
2410
  const v = resolveSpacing(value, negative, spacing, isArbitrary);
2411
2411
  if (v === null) return null;
2412
- if (getEffectiveIsWeb()) return { transform: `translateX(${v})` };
2412
+ if (getEffectiveIsWeb()) return { transform: `translateX(${typeof v === "number" ? `${v}px` : v})` };
2413
2413
  if (typeof v === "string") {
2414
2414
  const n = parseFloat(v);
2415
2415
  return isNaN(n) ? null : { transform: [{ translateX: n }] };
@@ -2419,7 +2419,7 @@ var RESOLVERS = {
2419
2419
  "translate-y": ({ value, negative, isArbitrary }, { spacing }) => {
2420
2420
  const v = resolveSpacing(value, negative, spacing, isArbitrary);
2421
2421
  if (v === null) return null;
2422
- if (getEffectiveIsWeb()) return { transform: `translateY(${v})` };
2422
+ if (getEffectiveIsWeb()) return { transform: `translateY(${typeof v === "number" ? `${v}px` : v})` };
2423
2423
  if (typeof v === "string") {
2424
2424
  const n = parseFloat(v);
2425
2425
  return isNaN(n) ? null : { transform: [{ translateY: n }] };
@@ -4,10 +4,10 @@ import {
4
4
  _invalidateDefaultFontCache,
5
5
  jsx,
6
6
  jsxs
7
- } from "./chunk-7DHBNCL5.mjs";
7
+ } from "./chunk-THJIAZ6E.mjs";
8
8
  import {
9
9
  registerWebElement
10
- } from "./chunk-HCRWLOJE.mjs";
10
+ } from "./chunk-YH2IOSKT.mjs";
11
11
  export {
12
12
  Fragment,
13
13
  _invalidateDefaultFontCache,
@@ -2223,7 +2223,7 @@ var RESOLVERS = {
2223
2223
  "translate-x": ({ value, negative, isArbitrary }, { spacing }) => {
2224
2224
  const v = resolveSpacing(value, negative, spacing, isArbitrary);
2225
2225
  if (v === null) return null;
2226
- if (getEffectiveIsWeb()) return { transform: `translateX(${v})` };
2226
+ if (getEffectiveIsWeb()) return { transform: `translateX(${typeof v === "number" ? `${v}px` : v})` };
2227
2227
  if (typeof v === "string") {
2228
2228
  const n = parseFloat(v);
2229
2229
  return isNaN(n) ? null : { transform: [{ translateX: n }] };
@@ -2233,7 +2233,7 @@ var RESOLVERS = {
2233
2233
  "translate-y": ({ value, negative, isArbitrary }, { spacing }) => {
2234
2234
  const v = resolveSpacing(value, negative, spacing, isArbitrary);
2235
2235
  if (v === null) return null;
2236
- if (getEffectiveIsWeb()) return { transform: `translateY(${v})` };
2236
+ if (getEffectiveIsWeb()) return { transform: `translateY(${typeof v === "number" ? `${v}px` : v})` };
2237
2237
  if (typeof v === "string") {
2238
2238
  const n = parseFloat(v);
2239
2239
  return isNaN(n) ? null : { transform: [{ translateY: n }] };
@@ -2189,7 +2189,7 @@ var RESOLVERS = {
2189
2189
  "translate-x": ({ value, negative, isArbitrary }, { spacing }) => {
2190
2190
  const v = resolveSpacing(value, negative, spacing, isArbitrary);
2191
2191
  if (v === null) return null;
2192
- if (getEffectiveIsWeb()) return { transform: `translateX(${v})` };
2192
+ if (getEffectiveIsWeb()) return { transform: `translateX(${typeof v === "number" ? `${v}px` : v})` };
2193
2193
  if (typeof v === "string") {
2194
2194
  const n = parseFloat(v);
2195
2195
  return isNaN(n) ? null : { transform: [{ translateX: n }] };
@@ -2199,7 +2199,7 @@ var RESOLVERS = {
2199
2199
  "translate-y": ({ value, negative, isArbitrary }, { spacing }) => {
2200
2200
  const v = resolveSpacing(value, negative, spacing, isArbitrary);
2201
2201
  if (v === null) return null;
2202
- if (getEffectiveIsWeb()) return { transform: `translateY(${v})` };
2202
+ if (getEffectiveIsWeb()) return { transform: `translateY(${typeof v === "number" ? `${v}px` : v})` };
2203
2203
  if (typeof v === "string") {
2204
2204
  const n = parseFloat(v);
2205
2205
  return isNaN(n) ? null : { transform: [{ translateY: n }] };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kbach/react",
3
- "version": "0.6.14",
3
+ "version": "0.6.15",
4
4
  "description": "React / React Native components and hooks for the Kbach framework",
5
5
  "source": "./src/index.ts",
6
6
  "main": "./dist/index.js",