@kbach/react 0.5.3 → 0.5.4

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.
@@ -3600,6 +3600,9 @@ var InteractiveWrapper = forwardRef(
3600
3600
  style: styleProp,
3601
3601
  onPressIn,
3602
3602
  onPressOut,
3603
+ onPointerDown,
3604
+ onPointerUp,
3605
+ onPointerLeave,
3603
3606
  onMouseEnter,
3604
3607
  onMouseLeave,
3605
3608
  onFocus,
@@ -3615,6 +3618,9 @@ var InteractiveWrapper = forwardRef(
3615
3618
  const [focused, setFocused] = useState(false);
3616
3619
  const handlePressIn = useCallback(chain(onPressIn, () => setPressed(true)), [onPressIn]);
3617
3620
  const handlePressOut = useCallback(chain(onPressOut, () => setPressed(false)), [onPressOut]);
3621
+ const handlePointerDown = useCallback(chain(onPointerDown, () => setPressed(true)), [onPointerDown]);
3622
+ const handlePointerUp = useCallback(chain(onPointerUp, () => setPressed(false)), [onPointerUp]);
3623
+ const handlePointerLeave = useCallback(chain(onPointerLeave, () => setPressed(false)), [onPointerLeave]);
3618
3624
  const handleMouseEnter = useCallback(chain(onMouseEnter, () => setHovered(true)), [onMouseEnter]);
3619
3625
  const handleMouseLeave = useCallback(chain(onMouseLeave, () => setHovered(false)), [onMouseLeave]);
3620
3626
  const handleFocus = useCallback(chain(onFocus, () => setFocused(true)), [onFocus]);
@@ -3662,8 +3668,9 @@ var InteractiveWrapper = forwardRef(
3662
3668
  ...restWithoutChildren,
3663
3669
  style: finalStyle,
3664
3670
  ...isWeb && className ? { className } : {},
3665
- // onPressIn / onPressOut are React Native-only; skip on web to avoid DOM warnings.
3666
- ...isWeb ? {} : { onPressIn: handlePressIn, onPressOut: handlePressOut },
3671
+ // onPressIn / onPressOut are React Native-only.
3672
+ // On web, onPointerDown/Up drive the pressed state instead (covers mouse + touch).
3673
+ ...isWeb ? { onPointerDown: handlePointerDown, onPointerUp: handlePointerUp, onPointerLeave: handlePointerLeave } : { onPressIn: handlePressIn, onPressOut: handlePressOut },
3667
3674
  onMouseEnter: handleMouseEnter,
3668
3675
  onMouseLeave: handleMouseLeave,
3669
3676
  onFocus: handleFocus,
@@ -8,7 +8,7 @@ import {
8
8
  resolve,
9
9
  useConditionalWidth,
10
10
  useGlobalDarkMode
11
- } from "./chunk-OKK7AJ2G.mjs";
11
+ } from "./chunk-D7Q7ZCOW.mjs";
12
12
 
13
13
  // src/jsx-runtime.tsx
14
14
  import { jsx as _jsx, jsxs as _jsxs, Fragment } from "react/jsx-runtime";
package/dist/index.d.mts CHANGED
@@ -315,6 +315,9 @@ interface InteractiveWrapperProps {
315
315
  children?: React__default.ReactNode;
316
316
  onPressIn?: (...args: any[]) => void;
317
317
  onPressOut?: (...args: any[]) => void;
318
+ onPointerDown?: (...args: any[]) => void;
319
+ onPointerUp?: (...args: any[]) => void;
320
+ onPointerLeave?: (...args: any[]) => void;
318
321
  onMouseEnter?: (...args: any[]) => void;
319
322
  onMouseLeave?: (...args: any[]) => void;
320
323
  onFocus?: (...args: any[]) => void;
package/dist/index.d.ts CHANGED
@@ -315,6 +315,9 @@ interface InteractiveWrapperProps {
315
315
  children?: React__default.ReactNode;
316
316
  onPressIn?: (...args: any[]) => void;
317
317
  onPressOut?: (...args: any[]) => void;
318
+ onPointerDown?: (...args: any[]) => void;
319
+ onPointerUp?: (...args: any[]) => void;
320
+ onPointerLeave?: (...args: any[]) => void;
318
321
  onMouseEnter?: (...args: any[]) => void;
319
322
  onMouseLeave?: (...args: any[]) => void;
320
323
  onFocus?: (...args: any[]) => void;
package/dist/index.js CHANGED
@@ -4120,6 +4120,9 @@ var InteractiveWrapper = (0, import_react9.forwardRef)(
4120
4120
  style: styleProp,
4121
4121
  onPressIn,
4122
4122
  onPressOut,
4123
+ onPointerDown,
4124
+ onPointerUp,
4125
+ onPointerLeave,
4123
4126
  onMouseEnter,
4124
4127
  onMouseLeave,
4125
4128
  onFocus,
@@ -4135,6 +4138,9 @@ var InteractiveWrapper = (0, import_react9.forwardRef)(
4135
4138
  const [focused, setFocused] = (0, import_react9.useState)(false);
4136
4139
  const handlePressIn = (0, import_react9.useCallback)(chain(onPressIn, () => setPressed(true)), [onPressIn]);
4137
4140
  const handlePressOut = (0, import_react9.useCallback)(chain(onPressOut, () => setPressed(false)), [onPressOut]);
4141
+ const handlePointerDown = (0, import_react9.useCallback)(chain(onPointerDown, () => setPressed(true)), [onPointerDown]);
4142
+ const handlePointerUp = (0, import_react9.useCallback)(chain(onPointerUp, () => setPressed(false)), [onPointerUp]);
4143
+ const handlePointerLeave = (0, import_react9.useCallback)(chain(onPointerLeave, () => setPressed(false)), [onPointerLeave]);
4138
4144
  const handleMouseEnter = (0, import_react9.useCallback)(chain(onMouseEnter, () => setHovered(true)), [onMouseEnter]);
4139
4145
  const handleMouseLeave = (0, import_react9.useCallback)(chain(onMouseLeave, () => setHovered(false)), [onMouseLeave]);
4140
4146
  const handleFocus = (0, import_react9.useCallback)(chain(onFocus, () => setFocused(true)), [onFocus]);
@@ -4182,8 +4188,9 @@ var InteractiveWrapper = (0, import_react9.forwardRef)(
4182
4188
  ...restWithoutChildren,
4183
4189
  style: finalStyle,
4184
4190
  ...isWeb && className ? { className } : {},
4185
- // onPressIn / onPressOut are React Native-only; skip on web to avoid DOM warnings.
4186
- ...isWeb ? {} : { onPressIn: handlePressIn, onPressOut: handlePressOut },
4191
+ // onPressIn / onPressOut are React Native-only.
4192
+ // On web, onPointerDown/Up drive the pressed state instead (covers mouse + touch).
4193
+ ...isWeb ? { onPointerDown: handlePointerDown, onPointerUp: handlePointerUp, onPointerLeave: handlePointerLeave } : { onPressIn: handlePressIn, onPressOut: handlePressOut },
4187
4194
  onMouseEnter: handleMouseEnter,
4188
4195
  onMouseLeave: handleMouseLeave,
4189
4196
  onFocus: handleFocus,
package/dist/index.mjs CHANGED
@@ -23,7 +23,7 @@ import {
23
23
  useConditionalWidth,
24
24
  useGlobalDarkMode,
25
25
  useGlobalWidth
26
- } from "./chunk-OKK7AJ2G.mjs";
26
+ } from "./chunk-D7Q7ZCOW.mjs";
27
27
 
28
28
  // src/context.tsx
29
29
  import { createContext, useContext } from "react";
@@ -3578,6 +3578,9 @@ var InteractiveWrapper = (0, import_react3.forwardRef)(
3578
3578
  style: styleProp,
3579
3579
  onPressIn,
3580
3580
  onPressOut,
3581
+ onPointerDown,
3582
+ onPointerUp,
3583
+ onPointerLeave,
3581
3584
  onMouseEnter,
3582
3585
  onMouseLeave,
3583
3586
  onFocus,
@@ -3593,6 +3596,9 @@ var InteractiveWrapper = (0, import_react3.forwardRef)(
3593
3596
  const [focused, setFocused] = (0, import_react3.useState)(false);
3594
3597
  const handlePressIn = (0, import_react3.useCallback)(chain(onPressIn, () => setPressed(true)), [onPressIn]);
3595
3598
  const handlePressOut = (0, import_react3.useCallback)(chain(onPressOut, () => setPressed(false)), [onPressOut]);
3599
+ const handlePointerDown = (0, import_react3.useCallback)(chain(onPointerDown, () => setPressed(true)), [onPointerDown]);
3600
+ const handlePointerUp = (0, import_react3.useCallback)(chain(onPointerUp, () => setPressed(false)), [onPointerUp]);
3601
+ const handlePointerLeave = (0, import_react3.useCallback)(chain(onPointerLeave, () => setPressed(false)), [onPointerLeave]);
3596
3602
  const handleMouseEnter = (0, import_react3.useCallback)(chain(onMouseEnter, () => setHovered(true)), [onMouseEnter]);
3597
3603
  const handleMouseLeave = (0, import_react3.useCallback)(chain(onMouseLeave, () => setHovered(false)), [onMouseLeave]);
3598
3604
  const handleFocus = (0, import_react3.useCallback)(chain(onFocus, () => setFocused(true)), [onFocus]);
@@ -3640,8 +3646,9 @@ var InteractiveWrapper = (0, import_react3.forwardRef)(
3640
3646
  ...restWithoutChildren,
3641
3647
  style: finalStyle,
3642
3648
  ...isWeb && className ? { className } : {},
3643
- // onPressIn / onPressOut are React Native-only; skip on web to avoid DOM warnings.
3644
- ...isWeb ? {} : { onPressIn: handlePressIn, onPressOut: handlePressOut },
3649
+ // onPressIn / onPressOut are React Native-only.
3650
+ // On web, onPointerDown/Up drive the pressed state instead (covers mouse + touch).
3651
+ ...isWeb ? { onPointerDown: handlePointerDown, onPointerUp: handlePointerUp, onPointerLeave: handlePointerLeave } : { onPressIn: handlePressIn, onPressOut: handlePressOut },
3645
3652
  onMouseEnter: handleMouseEnter,
3646
3653
  onMouseLeave: handleMouseLeave,
3647
3654
  onFocus: handleFocus,
@@ -2,8 +2,8 @@ import {
2
2
  Fragment,
3
3
  jsx,
4
4
  jsxs
5
- } from "./chunk-7C3WGTMN.mjs";
6
- import "./chunk-OKK7AJ2G.mjs";
5
+ } from "./chunk-UR4DTYE3.mjs";
6
+ import "./chunk-D7Q7ZCOW.mjs";
7
7
 
8
8
  // src/jsx-dev-runtime.tsx
9
9
  function jsxDEV(type, props, key, isStaticChildren, _source, _self) {
@@ -3577,6 +3577,9 @@ var InteractiveWrapper = (0, import_react3.forwardRef)(
3577
3577
  style: styleProp,
3578
3578
  onPressIn,
3579
3579
  onPressOut,
3580
+ onPointerDown,
3581
+ onPointerUp,
3582
+ onPointerLeave,
3580
3583
  onMouseEnter,
3581
3584
  onMouseLeave,
3582
3585
  onFocus,
@@ -3592,6 +3595,9 @@ var InteractiveWrapper = (0, import_react3.forwardRef)(
3592
3595
  const [focused, setFocused] = (0, import_react3.useState)(false);
3593
3596
  const handlePressIn = (0, import_react3.useCallback)(chain(onPressIn, () => setPressed(true)), [onPressIn]);
3594
3597
  const handlePressOut = (0, import_react3.useCallback)(chain(onPressOut, () => setPressed(false)), [onPressOut]);
3598
+ const handlePointerDown = (0, import_react3.useCallback)(chain(onPointerDown, () => setPressed(true)), [onPointerDown]);
3599
+ const handlePointerUp = (0, import_react3.useCallback)(chain(onPointerUp, () => setPressed(false)), [onPointerUp]);
3600
+ const handlePointerLeave = (0, import_react3.useCallback)(chain(onPointerLeave, () => setPressed(false)), [onPointerLeave]);
3595
3601
  const handleMouseEnter = (0, import_react3.useCallback)(chain(onMouseEnter, () => setHovered(true)), [onMouseEnter]);
3596
3602
  const handleMouseLeave = (0, import_react3.useCallback)(chain(onMouseLeave, () => setHovered(false)), [onMouseLeave]);
3597
3603
  const handleFocus = (0, import_react3.useCallback)(chain(onFocus, () => setFocused(true)), [onFocus]);
@@ -3639,8 +3645,9 @@ var InteractiveWrapper = (0, import_react3.forwardRef)(
3639
3645
  ...restWithoutChildren,
3640
3646
  style: finalStyle,
3641
3647
  ...isWeb && className ? { className } : {},
3642
- // onPressIn / onPressOut are React Native-only; skip on web to avoid DOM warnings.
3643
- ...isWeb ? {} : { onPressIn: handlePressIn, onPressOut: handlePressOut },
3648
+ // onPressIn / onPressOut are React Native-only.
3649
+ // On web, onPointerDown/Up drive the pressed state instead (covers mouse + touch).
3650
+ ...isWeb ? { onPointerDown: handlePointerDown, onPointerUp: handlePointerUp, onPointerLeave: handlePointerLeave } : { onPressIn: handlePressIn, onPressOut: handlePressOut },
3644
3651
  onMouseEnter: handleMouseEnter,
3645
3652
  onMouseLeave: handleMouseLeave,
3646
3653
  onFocus: handleFocus,
@@ -2,8 +2,8 @@ import {
2
2
  Fragment,
3
3
  jsx,
4
4
  jsxs
5
- } from "./chunk-7C3WGTMN.mjs";
6
- import "./chunk-OKK7AJ2G.mjs";
5
+ } from "./chunk-UR4DTYE3.mjs";
6
+ import "./chunk-D7Q7ZCOW.mjs";
7
7
  export {
8
8
  Fragment,
9
9
  jsx,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kbach/react",
3
- "version": "0.5.3",
3
+ "version": "0.5.4",
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",