@kanso-labs/kanso-ui 0.34.0 → 0.34.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/collection/text.js +17 -0
- package/dist/collection/text.js.map +1 -0
- package/dist/components/avatar/index.js +49 -34
- package/dist/components/avatar/index.js.map +1 -1
- package/dist/components/chip-group/index.js +1 -3
- package/dist/components/chip-group/index.js.map +1 -1
- package/dist/components/color-picker/index.d.ts +2 -2
- package/dist/components/color-picker/index.js.map +1 -1
- package/dist/components/combo-box/index.js +112 -77
- package/dist/components/combo-box/index.js.map +1 -1
- package/dist/components/disclosure/index.js +35 -29
- package/dist/components/disclosure/index.js.map +1 -1
- package/dist/components/link/index.js.map +1 -1
- package/dist/components/list/index.d.ts +1 -1
- package/dist/components/list/index.js +70 -50
- package/dist/components/list/index.js.map +1 -1
- package/dist/components/list-box/index.d.ts +1 -1
- package/dist/components/list-box/index.js +72 -88
- package/dist/components/list-box/index.js.map +1 -1
- package/dist/components/menu/index.d.ts +4 -3
- package/dist/components/menu/index.js +57 -69
- package/dist/components/menu/index.js.map +1 -1
- package/dist/components/meter/index.d.ts +3 -2
- package/dist/components/meter/index.js.map +1 -1
- package/dist/components/navigation-tree/index.d.ts +1 -1
- package/dist/components/navigation-tree/index.js +62 -76
- package/dist/components/navigation-tree/index.js.map +1 -1
- package/dist/components/product-icon/index.js +49 -34
- package/dist/components/product-icon/index.js.map +1 -1
- package/dist/components/token-field/index.js +4 -2
- package/dist/components/token-field/index.js.map +1 -1
- package/dist/components/tree/index.d.ts +1 -1
- package/dist/components/tree/index.js +74 -52
- package/dist/components/tree/index.js.map +1 -1
- package/dist/hooks/useImageLoadingStatus.js +14 -7
- package/dist/hooks/useImageLoadingStatus.js.map +1 -1
- package/dist/hooks/useRipple.js +209 -216
- package/dist/hooks/useRipple.js.map +1 -1
- package/dist/styles/overlay.js +1 -0
- package/dist/styles/overlay.js.map +1 -1
- package/dist/styles.css +4 -0
- package/package.json +2 -2
package/dist/hooks/useRipple.js
CHANGED
|
@@ -46,43 +46,17 @@ function isTouch(event) {
|
|
|
46
46
|
function prefersReducedMotion() {
|
|
47
47
|
return window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
48
48
|
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
* the element's center for a keyboard or other non-pointer activation.
|
|
52
|
-
*
|
|
53
|
-
* Growth runs via the Web Animations API on a single reused element (no
|
|
54
|
-
* per-click DOM nodes to clean up), over a fixed duration independent of how
|
|
55
|
-
* long the element is held — a real press-and-hold keeps the ripple
|
|
56
|
-
* growing until release, while a quick tap is still held visible for a
|
|
57
|
-
* minimum duration so it plays a complete animation rather than a flicker.
|
|
58
|
-
*
|
|
59
|
-
* Merges its own handlers with `externalHandlers` (e.g. a component's own
|
|
60
|
-
* consumer-supplied props — ripple's own run first, then the external
|
|
61
|
-
* ones) and returns `handlers` to spread onto the interactive element and
|
|
62
|
-
* `surface`, the node to render as a child. The host element must
|
|
63
|
-
* establish a positioning context (`position: relative` or similar) so
|
|
64
|
-
* `surface`, which fills it via `inset: 0`, clips to its bounds and
|
|
65
|
-
* inherits its shape.
|
|
66
|
-
*
|
|
67
|
-
* Pass `enabled: false` to opt out — no ripple listeners are attached and
|
|
68
|
-
* no surface is rendered, leaving `externalHandlers` and a component's own
|
|
69
|
-
* hover/press state layer (if any) untouched.
|
|
70
|
-
*
|
|
71
|
-
* `handlers` and `surface` are hand-memoized (not left to build-tool
|
|
72
|
-
* optimization) so a consumer rendering many instances — a list of icon
|
|
73
|
-
* buttons, say — can memoize around them too, and so stability doesn't
|
|
74
|
-
* depend on any particular compiler being configured.
|
|
75
|
-
*/
|
|
76
|
-
function useRipple(t0, t1) {
|
|
77
|
-
const $ = c(43);
|
|
49
|
+
function useRipple(t0, t1, t2) {
|
|
50
|
+
const $ = c(49);
|
|
78
51
|
const enabled = t0 === void 0 ? true : t0;
|
|
79
|
-
let
|
|
52
|
+
let t3;
|
|
80
53
|
if ($[0] !== t1) {
|
|
81
|
-
|
|
54
|
+
t3 = t1 === void 0 ? {} : t1;
|
|
82
55
|
$[0] = t1;
|
|
83
|
-
$[1] =
|
|
84
|
-
} else
|
|
85
|
-
const externalHandlers =
|
|
56
|
+
$[1] = t3;
|
|
57
|
+
} else t3 = $[1];
|
|
58
|
+
const externalHandlers = t3;
|
|
59
|
+
const endsOnRelease = t2 === void 0 ? false : t2;
|
|
86
60
|
const [pressed, setPressed] = useState(false);
|
|
87
61
|
const rippleRef = useRef(null);
|
|
88
62
|
const state = useRef(RippleState.Inactive);
|
|
@@ -90,20 +64,25 @@ function useRipple(t0, t1) {
|
|
|
90
64
|
const rippleStartEvent = useRef(void 0);
|
|
91
65
|
const initialSize = useRef(0);
|
|
92
66
|
const rippleScale = useRef("1");
|
|
93
|
-
let
|
|
67
|
+
let t4;
|
|
94
68
|
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
95
|
-
|
|
69
|
+
t4 = (event) => {
|
|
96
70
|
if (!event.isPrimary) return false;
|
|
97
71
|
const startEvent = rippleStartEvent.current;
|
|
98
|
-
|
|
99
|
-
return isTouch(event) || event.buttons === 1;
|
|
72
|
+
return !startEvent || startEvent.pointerId === event.pointerId;
|
|
100
73
|
};
|
|
101
|
-
$[2] =
|
|
102
|
-
} else
|
|
103
|
-
const
|
|
104
|
-
let
|
|
74
|
+
$[2] = t4;
|
|
75
|
+
} else t4 = $[2];
|
|
76
|
+
const isPressPointer = t4;
|
|
77
|
+
let t5;
|
|
105
78
|
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
106
|
-
|
|
79
|
+
t5 = (event_0) => isPressPointer(event_0) && (isTouch(event_0) || event_0.buttons === 1);
|
|
80
|
+
$[3] = t5;
|
|
81
|
+
} else t5 = $[3];
|
|
82
|
+
const shouldReactToEvent = t5;
|
|
83
|
+
let t6;
|
|
84
|
+
if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
|
|
85
|
+
t6 = (rect) => {
|
|
107
86
|
const { height, width } = rect;
|
|
108
87
|
const maxDimension = Math.max(height, width);
|
|
109
88
|
const softEdgeSize = Math.max(SOFT_EDGE_CONTAINER_RATIO * maxDimension, SOFT_EDGE_MINIMUM_SIZE);
|
|
@@ -113,12 +92,12 @@ function useRipple(t0, t1) {
|
|
|
113
92
|
rippleScale.current = `${(maxRadius + softEdgeSize) / size}`;
|
|
114
93
|
return `${size}px`;
|
|
115
94
|
};
|
|
116
|
-
$[
|
|
117
|
-
} else
|
|
118
|
-
const determineRippleSize =
|
|
119
|
-
let
|
|
120
|
-
if ($[
|
|
121
|
-
|
|
95
|
+
$[4] = t6;
|
|
96
|
+
} else t6 = $[4];
|
|
97
|
+
const determineRippleSize = t6;
|
|
98
|
+
let t7;
|
|
99
|
+
if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
|
|
100
|
+
t7 = (rect_0, positionEvent) => {
|
|
122
101
|
const { height: height_0, left, top, width: width_0 } = rect_0;
|
|
123
102
|
const size_0 = initialSize.current;
|
|
124
103
|
const endPoint = {
|
|
@@ -140,12 +119,12 @@ function useRipple(t0, t1) {
|
|
|
140
119
|
}
|
|
141
120
|
};
|
|
142
121
|
};
|
|
143
|
-
$[
|
|
144
|
-
} else
|
|
145
|
-
const getTranslationCoordinates =
|
|
146
|
-
let
|
|
147
|
-
if ($[
|
|
148
|
-
|
|
122
|
+
$[5] = t7;
|
|
123
|
+
} else t7 = $[5];
|
|
124
|
+
const getTranslationCoordinates = t7;
|
|
125
|
+
let t8;
|
|
126
|
+
if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
|
|
127
|
+
t8 = (target, positionEvent_0) => {
|
|
149
128
|
const ripple = rippleRef.current;
|
|
150
129
|
if (!ripple) return;
|
|
151
130
|
setPressed(true);
|
|
@@ -161,12 +140,12 @@ function useRipple(t0, t1) {
|
|
|
161
140
|
fill: "forwards"
|
|
162
141
|
});
|
|
163
142
|
};
|
|
164
|
-
$[
|
|
165
|
-
} else
|
|
166
|
-
const startPressAnimation =
|
|
167
|
-
let
|
|
168
|
-
if ($[
|
|
169
|
-
|
|
143
|
+
$[6] = t8;
|
|
144
|
+
} else t8 = $[6];
|
|
145
|
+
const startPressAnimation = t8;
|
|
146
|
+
let t9;
|
|
147
|
+
if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
|
|
148
|
+
t9 = async () => {
|
|
170
149
|
rippleStartEvent.current = void 0;
|
|
171
150
|
state.current = RippleState.Inactive;
|
|
172
151
|
const animation = growAnimation.current;
|
|
@@ -181,221 +160,235 @@ function useRipple(t0, t1) {
|
|
|
181
160
|
if (growAnimation.current !== animation) return;
|
|
182
161
|
setPressed(false);
|
|
183
162
|
};
|
|
184
|
-
$[
|
|
185
|
-
} else
|
|
186
|
-
const endPressAnimation =
|
|
187
|
-
let
|
|
188
|
-
if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
|
|
189
|
-
t8 = () => state.current;
|
|
190
|
-
$[7] = t8;
|
|
191
|
-
} else t8 = $[7];
|
|
192
|
-
const getState = t8;
|
|
193
|
-
let t9;
|
|
163
|
+
$[7] = t9;
|
|
164
|
+
} else t9 = $[7];
|
|
165
|
+
const endPressAnimation = t9;
|
|
166
|
+
let t10;
|
|
194
167
|
if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
168
|
+
t10 = () => state.current;
|
|
169
|
+
$[8] = t10;
|
|
170
|
+
} else t10 = $[8];
|
|
171
|
+
const getState = t10;
|
|
172
|
+
let t11;
|
|
173
|
+
if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
|
|
174
|
+
t11 = async (event_1) => {
|
|
175
|
+
if (!shouldReactToEvent(event_1)) return;
|
|
176
|
+
rippleStartEvent.current = event_1;
|
|
177
|
+
const target_0 = event_1.currentTarget;
|
|
178
|
+
if (!isTouch(event_1)) {
|
|
200
179
|
state.current = RippleState.WaitingForClick;
|
|
201
|
-
startPressAnimation(target_0,
|
|
180
|
+
startPressAnimation(target_0, event_1);
|
|
202
181
|
return;
|
|
203
182
|
}
|
|
204
183
|
state.current = RippleState.TouchDelay;
|
|
205
184
|
await new Promise(_temp);
|
|
206
185
|
if (getState() !== RippleState.TouchDelay) return;
|
|
207
186
|
state.current = RippleState.Holding;
|
|
208
|
-
startPressAnimation(target_0,
|
|
187
|
+
startPressAnimation(target_0, event_1);
|
|
209
188
|
};
|
|
210
|
-
$[
|
|
211
|
-
} else
|
|
212
|
-
const handlePointerDownAsync =
|
|
213
|
-
let
|
|
214
|
-
if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
|
|
215
|
-
t10 = (event_1) => {
|
|
216
|
-
handlePointerDownAsync(event_1);
|
|
217
|
-
};
|
|
218
|
-
$[9] = t10;
|
|
219
|
-
} else t10 = $[9];
|
|
220
|
-
const handlePointerDown = t10;
|
|
221
|
-
let t11;
|
|
189
|
+
$[9] = t11;
|
|
190
|
+
} else t11 = $[9];
|
|
191
|
+
const handlePointerDownAsync = t11;
|
|
192
|
+
let t12;
|
|
222
193
|
if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
194
|
+
t12 = (event_2) => {
|
|
195
|
+
handlePointerDownAsync(event_2);
|
|
196
|
+
};
|
|
197
|
+
$[10] = t12;
|
|
198
|
+
} else t12 = $[10];
|
|
199
|
+
const handlePointerDown = t12;
|
|
200
|
+
let t13;
|
|
201
|
+
if ($[11] !== endsOnRelease) {
|
|
202
|
+
t13 = (event_3) => {
|
|
203
|
+
if (endsOnRelease && !isTouch(event_3)) {
|
|
204
|
+
if (isPressPointer(event_3) && state.current === RippleState.WaitingForClick) endPressAnimation();
|
|
227
205
|
return;
|
|
228
206
|
}
|
|
229
|
-
if (
|
|
207
|
+
if (!shouldReactToEvent(event_3)) return;
|
|
208
|
+
if (state.current === RippleState.Holding) state.current = RippleState.WaitingForClick;
|
|
209
|
+
else if (state.current === RippleState.TouchDelay) {
|
|
230
210
|
state.current = RippleState.WaitingForClick;
|
|
231
|
-
startPressAnimation(
|
|
211
|
+
startPressAnimation(event_3.currentTarget, rippleStartEvent.current);
|
|
232
212
|
}
|
|
213
|
+
if (endsOnRelease && state.current === RippleState.WaitingForClick) endPressAnimation();
|
|
233
214
|
};
|
|
234
|
-
$[
|
|
235
|
-
} else t11 = $[10];
|
|
236
|
-
const handlePointerUp = t11;
|
|
237
|
-
let t12;
|
|
238
|
-
if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
|
|
239
|
-
t12 = (event_3) => {
|
|
240
|
-
if (isTouch(event_3) || !shouldReactToEvent(event_3)) return;
|
|
241
|
-
if (state.current !== RippleState.Inactive) endPressAnimation();
|
|
242
|
-
};
|
|
243
|
-
$[11] = t12;
|
|
244
|
-
} else t12 = $[11];
|
|
245
|
-
const handlePointerLeave = t12;
|
|
246
|
-
let t13;
|
|
247
|
-
if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
|
|
248
|
-
t13 = (event_4) => {
|
|
249
|
-
if (!shouldReactToEvent(event_4)) return;
|
|
250
|
-
endPressAnimation();
|
|
251
|
-
};
|
|
215
|
+
$[11] = endsOnRelease;
|
|
252
216
|
$[12] = t13;
|
|
253
217
|
} else t13 = $[12];
|
|
254
|
-
const
|
|
218
|
+
const handlePointerUp = t13;
|
|
255
219
|
let t14;
|
|
256
220
|
if ($[13] === Symbol.for("react.memo_cache_sentinel")) {
|
|
257
|
-
t14 = (
|
|
258
|
-
if (
|
|
259
|
-
|
|
260
|
-
return;
|
|
261
|
-
}
|
|
262
|
-
if (state.current === RippleState.Inactive) {
|
|
263
|
-
startPressAnimation(event_5.currentTarget);
|
|
264
|
-
endPressAnimation();
|
|
265
|
-
}
|
|
221
|
+
t14 = (event_4) => {
|
|
222
|
+
if (isTouch(event_4) || !shouldReactToEvent(event_4)) return;
|
|
223
|
+
if (state.current !== RippleState.Inactive) endPressAnimation();
|
|
266
224
|
};
|
|
267
225
|
$[13] = t14;
|
|
268
226
|
} else t14 = $[13];
|
|
269
|
-
const
|
|
227
|
+
const handlePointerLeave = t14;
|
|
270
228
|
let t15;
|
|
271
229
|
if ($[14] === Symbol.for("react.memo_cache_sentinel")) {
|
|
272
|
-
t15 = () => {
|
|
230
|
+
t15 = (event_5) => {
|
|
231
|
+
if (!shouldReactToEvent(event_5)) return;
|
|
273
232
|
endPressAnimation();
|
|
274
233
|
};
|
|
275
234
|
$[14] = t15;
|
|
276
235
|
} else t15 = $[14];
|
|
277
|
-
const
|
|
278
|
-
const { onClick: onClickProp, onContextMenu: onContextMenuProp, onPointerCancel: onPointerCancelProp, onPointerDown: onPointerDownProp, onPointerLeave: onPointerLeaveProp, onPointerUp: onPointerUpProp } = externalHandlers;
|
|
236
|
+
const handlePointerCancel = t15;
|
|
279
237
|
let t16;
|
|
280
|
-
if ($[15]
|
|
238
|
+
if ($[15] === Symbol.for("react.memo_cache_sentinel")) {
|
|
281
239
|
t16 = (event_6) => {
|
|
282
|
-
|
|
283
|
-
|
|
240
|
+
if (state.current === RippleState.WaitingForClick) {
|
|
241
|
+
endPressAnimation();
|
|
242
|
+
return;
|
|
243
|
+
}
|
|
244
|
+
if (state.current === RippleState.Inactive) {
|
|
245
|
+
startPressAnimation(event_6.currentTarget);
|
|
246
|
+
endPressAnimation();
|
|
247
|
+
}
|
|
284
248
|
};
|
|
285
|
-
$[15] =
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
const onClick = t16;
|
|
249
|
+
$[15] = t16;
|
|
250
|
+
} else t16 = $[15];
|
|
251
|
+
const handleClick = t16;
|
|
289
252
|
let t17;
|
|
290
|
-
if ($[
|
|
291
|
-
t17 = (
|
|
292
|
-
|
|
293
|
-
onContextMenuProp?.(event_7);
|
|
253
|
+
if ($[16] === Symbol.for("react.memo_cache_sentinel")) {
|
|
254
|
+
t17 = () => {
|
|
255
|
+
endPressAnimation();
|
|
294
256
|
};
|
|
295
|
-
$[
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
const onContextMenu =
|
|
257
|
+
$[16] = t17;
|
|
258
|
+
} else t17 = $[16];
|
|
259
|
+
const handleContextMenu = t17;
|
|
260
|
+
const { onClick: onClickProp, onContextMenu: onContextMenuProp, onPointerCancel: onPointerCancelProp, onPointerDown: onPointerDownProp, onPointerLeave: onPointerLeaveProp, onPointerUp: onPointerUpProp } = externalHandlers;
|
|
299
261
|
let t18;
|
|
300
|
-
if ($[
|
|
301
|
-
t18 = (
|
|
302
|
-
|
|
303
|
-
|
|
262
|
+
if ($[17] !== onClickProp) {
|
|
263
|
+
t18 = (event_7) => {
|
|
264
|
+
handleClick(event_7);
|
|
265
|
+
onClickProp?.(event_7);
|
|
304
266
|
};
|
|
305
|
-
$[
|
|
306
|
-
$[
|
|
307
|
-
} else t18 = $[
|
|
308
|
-
const
|
|
267
|
+
$[17] = onClickProp;
|
|
268
|
+
$[18] = t18;
|
|
269
|
+
} else t18 = $[18];
|
|
270
|
+
const onClick = t18;
|
|
309
271
|
let t19;
|
|
310
|
-
if ($[
|
|
311
|
-
t19 = (
|
|
312
|
-
|
|
313
|
-
|
|
272
|
+
if ($[19] !== onContextMenuProp) {
|
|
273
|
+
t19 = (event_8) => {
|
|
274
|
+
handleContextMenu();
|
|
275
|
+
onContextMenuProp?.(event_8);
|
|
314
276
|
};
|
|
315
|
-
$[
|
|
316
|
-
$[
|
|
317
|
-
} else t19 = $[
|
|
318
|
-
const
|
|
277
|
+
$[19] = onContextMenuProp;
|
|
278
|
+
$[20] = t19;
|
|
279
|
+
} else t19 = $[20];
|
|
280
|
+
const onContextMenu = t19;
|
|
319
281
|
let t20;
|
|
320
|
-
if ($[
|
|
321
|
-
t20 = (
|
|
322
|
-
|
|
323
|
-
|
|
282
|
+
if ($[21] !== onPointerCancelProp) {
|
|
283
|
+
t20 = (event_9) => {
|
|
284
|
+
handlePointerCancel(event_9);
|
|
285
|
+
onPointerCancelProp?.(event_9);
|
|
324
286
|
};
|
|
325
|
-
$[
|
|
326
|
-
$[
|
|
327
|
-
} else t20 = $[
|
|
328
|
-
const
|
|
287
|
+
$[21] = onPointerCancelProp;
|
|
288
|
+
$[22] = t20;
|
|
289
|
+
} else t20 = $[22];
|
|
290
|
+
const onPointerCancel = t20;
|
|
329
291
|
let t21;
|
|
330
|
-
if ($[
|
|
331
|
-
t21 = (
|
|
332
|
-
|
|
333
|
-
|
|
292
|
+
if ($[23] !== onPointerDownProp) {
|
|
293
|
+
t21 = (event_10) => {
|
|
294
|
+
handlePointerDown(event_10);
|
|
295
|
+
onPointerDownProp?.(event_10);
|
|
334
296
|
};
|
|
335
|
-
$[
|
|
336
|
-
$[
|
|
337
|
-
} else t21 = $[
|
|
338
|
-
const
|
|
297
|
+
$[23] = onPointerDownProp;
|
|
298
|
+
$[24] = t21;
|
|
299
|
+
} else t21 = $[24];
|
|
300
|
+
const onPointerDown = t21;
|
|
339
301
|
let t22;
|
|
340
|
-
if ($[
|
|
341
|
-
t22 = {
|
|
342
|
-
|
|
302
|
+
if ($[25] !== onPointerLeaveProp) {
|
|
303
|
+
t22 = (event_11) => {
|
|
304
|
+
handlePointerLeave(event_11);
|
|
305
|
+
onPointerLeaveProp?.(event_11);
|
|
306
|
+
};
|
|
307
|
+
$[25] = onPointerLeaveProp;
|
|
308
|
+
$[26] = t22;
|
|
309
|
+
} else t22 = $[26];
|
|
310
|
+
const onPointerLeave = t22;
|
|
311
|
+
let t23;
|
|
312
|
+
if ($[27] !== handlePointerUp || $[28] !== onPointerUpProp) {
|
|
313
|
+
t23 = (event_12) => {
|
|
314
|
+
handlePointerUp(event_12);
|
|
315
|
+
onPointerUpProp?.(event_12);
|
|
316
|
+
};
|
|
317
|
+
$[27] = handlePointerUp;
|
|
318
|
+
$[28] = onPointerUpProp;
|
|
319
|
+
$[29] = t23;
|
|
320
|
+
} else t23 = $[29];
|
|
321
|
+
const onPointerUp = t23;
|
|
322
|
+
let t24;
|
|
323
|
+
if ($[30] !== onContextMenu || $[31] !== onPointerCancel || $[32] !== onPointerDown || $[33] !== onPointerLeave || $[34] !== onPointerUp) {
|
|
324
|
+
t24 = {
|
|
343
325
|
onContextMenu,
|
|
344
326
|
onPointerCancel,
|
|
345
327
|
onPointerDown,
|
|
346
328
|
onPointerLeave,
|
|
347
329
|
onPointerUp
|
|
348
330
|
};
|
|
349
|
-
$[
|
|
350
|
-
$[
|
|
351
|
-
$[
|
|
352
|
-
$[
|
|
353
|
-
$[
|
|
354
|
-
$[
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
331
|
+
$[30] = onContextMenu;
|
|
332
|
+
$[31] = onPointerCancel;
|
|
333
|
+
$[32] = onPointerDown;
|
|
334
|
+
$[33] = onPointerLeave;
|
|
335
|
+
$[34] = onPointerUp;
|
|
336
|
+
$[35] = t24;
|
|
337
|
+
} else t24 = $[35];
|
|
338
|
+
const pointer = t24;
|
|
339
|
+
let t25;
|
|
340
|
+
if ($[36] !== endsOnRelease || $[37] !== onClick || $[38] !== pointer) {
|
|
341
|
+
t25 = endsOnRelease ? pointer : {
|
|
342
|
+
onClick,
|
|
343
|
+
...pointer
|
|
344
|
+
};
|
|
345
|
+
$[36] = endsOnRelease;
|
|
346
|
+
$[37] = onClick;
|
|
347
|
+
$[38] = pointer;
|
|
348
|
+
$[39] = t25;
|
|
349
|
+
} else t25 = $[39];
|
|
350
|
+
const handlers = t25;
|
|
351
|
+
let t26;
|
|
352
|
+
if ($[40] !== pressed) {
|
|
353
|
+
t26 = props(styles.press, pressed && styles.pressed);
|
|
354
|
+
$[40] = pressed;
|
|
355
|
+
$[41] = t26;
|
|
356
|
+
} else t26 = $[41];
|
|
357
|
+
let t27;
|
|
358
|
+
if ($[42] !== t26) {
|
|
359
|
+
t27 = /* @__PURE__ */ jsx("span", {
|
|
367
360
|
"aria-hidden": "true",
|
|
368
361
|
...surfaceProps,
|
|
369
362
|
children: /* @__PURE__ */ jsx("span", {
|
|
370
363
|
ref: rippleRef,
|
|
371
|
-
...
|
|
364
|
+
...t26
|
|
372
365
|
})
|
|
373
366
|
});
|
|
374
|
-
$[
|
|
375
|
-
$[
|
|
376
|
-
} else
|
|
377
|
-
const surface =
|
|
378
|
-
let
|
|
379
|
-
if ($[
|
|
380
|
-
|
|
367
|
+
$[42] = t26;
|
|
368
|
+
$[43] = t27;
|
|
369
|
+
} else t27 = $[43];
|
|
370
|
+
const surface = t27;
|
|
371
|
+
let t28;
|
|
372
|
+
if ($[44] !== handlers || $[45] !== surface) {
|
|
373
|
+
t28 = {
|
|
381
374
|
handlers,
|
|
382
375
|
surface
|
|
383
376
|
};
|
|
384
|
-
$[
|
|
385
|
-
$[
|
|
386
|
-
$[
|
|
387
|
-
} else
|
|
388
|
-
const enabledResult =
|
|
389
|
-
let
|
|
390
|
-
if ($[
|
|
391
|
-
|
|
377
|
+
$[44] = handlers;
|
|
378
|
+
$[45] = surface;
|
|
379
|
+
$[46] = t28;
|
|
380
|
+
} else t28 = $[46];
|
|
381
|
+
const enabledResult = t28;
|
|
382
|
+
let t29;
|
|
383
|
+
if ($[47] !== externalHandlers) {
|
|
384
|
+
t29 = {
|
|
392
385
|
handlers: externalHandlers,
|
|
393
386
|
surface: null
|
|
394
387
|
};
|
|
395
|
-
$[
|
|
396
|
-
$[
|
|
397
|
-
} else
|
|
398
|
-
return enabled ? enabledResult :
|
|
388
|
+
$[47] = externalHandlers;
|
|
389
|
+
$[48] = t29;
|
|
390
|
+
} else t29 = $[48];
|
|
391
|
+
return enabled ? enabledResult : t29;
|
|
399
392
|
}
|
|
400
393
|
function _temp(resolve_0) {
|
|
401
394
|
setTimeout(resolve_0, motionDurationMs.short2);
|