@kanso-labs/kanso-ui 0.44.1 → 0.45.0
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/README.md +59 -7
- package/dist/chip/index.js +24 -4
- package/dist/chip/index.js.map +1 -1
- package/dist/chip/styles.js +13 -5
- package/dist/chip/styles.js.map +1 -1
- package/dist/components/app-bar/index.d.ts +14 -2
- package/dist/components/app-bar/index.js +36 -7
- package/dist/components/app-bar/index.js.map +1 -1
- package/dist/components/autocomplete/index.d.ts +44 -0
- package/dist/components/autocomplete/index.js +44 -0
- package/dist/components/autocomplete/index.js.map +1 -1
- package/dist/components/button/index.d.ts +3 -2
- package/dist/components/button/index.js +53 -59
- package/dist/components/button/index.js.map +1 -1
- package/dist/components/card/index.d.ts +11 -3
- package/dist/components/card/index.js +23 -1
- package/dist/components/card/index.js.map +1 -1
- package/dist/components/checkbox/index.js +65 -58
- package/dist/components/checkbox/index.js.map +1 -1
- package/dist/components/chip/index.d.ts +46 -30
- package/dist/components/chip/index.js +38 -17
- package/dist/components/chip/index.js.map +1 -1
- package/dist/components/chip-group/index.d.ts +5 -2
- package/dist/components/chip-group/index.js +8 -2
- package/dist/components/chip-group/index.js.map +1 -1
- package/dist/components/dialog/index.d.ts +27 -0
- package/dist/components/dialog/index.js +81 -37
- package/dist/components/dialog/index.js.map +1 -1
- package/dist/components/fab/index.d.ts +1 -1
- package/dist/components/fab/index.js.map +1 -1
- package/dist/components/form/index.d.ts +14 -4
- package/dist/components/form/index.js +6 -3
- package/dist/components/form/index.js.map +1 -1
- package/dist/components/icon-button/index.d.ts +15 -1
- package/dist/components/icon-button/index.js +15 -1
- package/dist/components/icon-button/index.js.map +1 -1
- package/dist/components/link/index.d.ts +4 -0
- package/dist/components/link/index.js +4 -0
- package/dist/components/link/index.js.map +1 -1
- package/dist/components/list/index.d.ts +34 -0
- package/dist/components/list/index.js +47 -13
- package/dist/components/list/index.js.map +1 -1
- package/dist/components/list-detail/index.d.ts +34 -1
- package/dist/components/list-detail/index.js +34 -1
- package/dist/components/list-detail/index.js.map +1 -1
- package/dist/components/list-item/index.d.ts +21 -2
- package/dist/components/list-item/index.js +6 -0
- package/dist/components/list-item/index.js.map +1 -1
- package/dist/components/menu/index.d.ts +6 -3
- package/dist/components/menu/index.js +3 -1
- package/dist/components/menu/index.js.map +1 -1
- package/dist/components/meter/index.d.ts +4 -0
- package/dist/components/meter/index.js +4 -0
- package/dist/components/meter/index.js.map +1 -1
- package/dist/components/navigation-bar/index.d.ts +14 -2
- package/dist/components/navigation-bar/index.js +14 -2
- package/dist/components/navigation-bar/index.js.map +1 -1
- package/dist/components/navigation-tree/index.js +2 -9
- package/dist/components/navigation-tree/index.js.map +1 -1
- package/dist/components/number-field/index.d.ts +7 -1
- package/dist/components/number-field/index.js +7 -1
- package/dist/components/number-field/index.js.map +1 -1
- package/dist/components/popover/index.d.ts +15 -1
- package/dist/components/popover/index.js +15 -1
- package/dist/components/popover/index.js.map +1 -1
- package/dist/components/product-icon/index.d.ts +8 -1
- package/dist/components/product-icon/index.js +8 -1
- package/dist/components/product-icon/index.js.map +1 -1
- package/dist/components/progress-indicator/index.d.ts +12 -6
- package/dist/components/progress-indicator/index.js +57 -46
- package/dist/components/progress-indicator/index.js.map +1 -1
- package/dist/components/radio-group/index.d.ts +7 -0
- package/dist/components/radio-group/index.js +23 -14
- package/dist/components/radio-group/index.js.map +1 -1
- package/dist/components/search-field/index.d.ts +13 -4
- package/dist/components/search-field/index.js +10 -4
- package/dist/components/search-field/index.js.map +1 -1
- package/dist/components/search-view/index.d.ts +2 -0
- package/dist/components/search-view/index.js.map +1 -1
- package/dist/components/segmented-button/index.d.ts +1 -1
- package/dist/components/segmented-button/index.js.map +1 -1
- package/dist/components/separator/index.d.ts +31 -6
- package/dist/components/separator/index.js +30 -6
- package/dist/components/separator/index.js.map +1 -1
- package/dist/components/sheet/index.d.ts +96 -37
- package/dist/components/sheet/index.js +420 -136
- package/dist/components/sheet/index.js.map +1 -1
- package/dist/components/snackbar/index.d.ts +8 -1
- package/dist/components/snackbar/index.js +7 -0
- package/dist/components/snackbar/index.js.map +1 -1
- package/dist/components/stack/index.d.ts +21 -5
- package/dist/components/stack/index.js +10 -0
- package/dist/components/stack/index.js.map +1 -1
- package/dist/components/switch/index.d.ts +12 -0
- package/dist/components/switch/index.js +12 -0
- package/dist/components/switch/index.js.map +1 -1
- package/dist/components/text-field/index.d.ts +39 -9
- package/dist/components/text-field/index.js +29 -7
- package/dist/components/text-field/index.js.map +1 -1
- package/dist/components/tree/index.js +11 -15
- package/dist/components/tree/index.js.map +1 -1
- package/dist/hooks/useBottomEdge.js +6 -3
- package/dist/hooks/useBottomEdge.js.map +1 -1
- package/dist/hooks/useRipple.js +216 -192
- package/dist/hooks/useRipple.js.map +1 -1
- package/dist/i18n/index.js +1 -0
- package/dist/i18n/index.js.map +1 -1
- package/dist/i18n/messages.js +34 -0
- package/dist/i18n/messages.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/indicator/styles.js +7 -4
- package/dist/indicator/styles.js.map +1 -1
- package/dist/mark/styles.js +11 -5
- package/dist/mark/styles.js.map +1 -1
- package/dist/react-aria.d.ts +2 -2
- package/dist/row/index.js +90 -62
- package/dist/row/index.js.map +1 -1
- package/dist/row/styles.js +6 -1
- package/dist/row/styles.js.map +1 -1
- package/dist/styles/focus.js.map +1 -1
- package/dist/styles/overlay.js +8 -0
- package/dist/styles/overlay.js.map +1 -1
- package/dist/styles.css +135 -114
- package/dist/theme-scope.d.ts +14 -2
- package/dist/theme-scope.js +12 -0
- package/dist/theme-scope.js.map +1 -1
- package/package.json +3 -3
package/dist/hooks/useRipple.js
CHANGED
|
@@ -46,17 +46,18 @@ function isTouch(event) {
|
|
|
46
46
|
function prefersReducedMotion() {
|
|
47
47
|
return window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
48
48
|
}
|
|
49
|
-
function useRipple(t0, t1, t2) {
|
|
50
|
-
const $ = c(
|
|
49
|
+
function useRipple(t0, t1, t2, t3) {
|
|
50
|
+
const $ = c(63);
|
|
51
51
|
const enabled = t0 === void 0 ? true : t0;
|
|
52
|
-
let
|
|
52
|
+
let t4;
|
|
53
53
|
if ($[0] !== t1) {
|
|
54
|
-
|
|
54
|
+
t4 = t1 === void 0 ? {} : t1;
|
|
55
55
|
$[0] = t1;
|
|
56
|
-
$[1] =
|
|
57
|
-
} else
|
|
58
|
-
const externalHandlers =
|
|
56
|
+
$[1] = t4;
|
|
57
|
+
} else t4 = $[1];
|
|
58
|
+
const externalHandlers = t4;
|
|
59
59
|
const endsOnRelease = t2 === void 0 ? false : t2;
|
|
60
|
+
const centred = t3 === void 0 ? false : t3;
|
|
60
61
|
const [pressed, setPressed] = useState(false);
|
|
61
62
|
const rippleRef = useRef(null);
|
|
62
63
|
const state = useRef(RippleState.Inactive);
|
|
@@ -65,25 +66,25 @@ function useRipple(t0, t1, t2) {
|
|
|
65
66
|
const initialSize = useRef(0);
|
|
66
67
|
const rippleScale = useRef("1");
|
|
67
68
|
const removeDocumentListeners = useRef(void 0);
|
|
68
|
-
let
|
|
69
|
+
let t5;
|
|
69
70
|
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
70
|
-
|
|
71
|
+
t5 = (event) => {
|
|
71
72
|
if (!event.isPrimary) return false;
|
|
72
73
|
const startEvent = rippleStartEvent.current;
|
|
73
74
|
return !startEvent || startEvent.pointerId === event.pointerId;
|
|
74
75
|
};
|
|
75
|
-
$[2] =
|
|
76
|
-
} else
|
|
77
|
-
const isPressPointer =
|
|
78
|
-
let t5;
|
|
79
|
-
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
80
|
-
t5 = (event_0) => isPressPointer(event_0) && (isTouch(event_0) || event_0.buttons === 1);
|
|
81
|
-
$[3] = t5;
|
|
82
|
-
} else t5 = $[3];
|
|
83
|
-
const shouldReactToEvent = t5;
|
|
76
|
+
$[2] = t5;
|
|
77
|
+
} else t5 = $[2];
|
|
78
|
+
const isPressPointer = t5;
|
|
84
79
|
let t6;
|
|
80
|
+
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
81
|
+
t6 = (event_0) => isPressPointer(event_0) && (isTouch(event_0) || event_0.buttons === 1);
|
|
82
|
+
$[3] = t6;
|
|
83
|
+
} else t6 = $[3];
|
|
84
|
+
const shouldReactToEvent = t6;
|
|
85
|
+
let t7;
|
|
85
86
|
if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
|
|
86
|
-
|
|
87
|
+
t7 = (rect) => {
|
|
87
88
|
const { height, width } = rect;
|
|
88
89
|
const maxDimension = Math.max(height, width);
|
|
89
90
|
const softEdgeSize = Math.max(SOFT_EDGE_CONTAINER_RATIO * maxDimension, SOFT_EDGE_MINIMUM_SIZE);
|
|
@@ -93,12 +94,12 @@ function useRipple(t0, t1, t2) {
|
|
|
93
94
|
rippleScale.current = `${(maxRadius + softEdgeSize) / size}`;
|
|
94
95
|
return `${size}px`;
|
|
95
96
|
};
|
|
96
|
-
$[4] =
|
|
97
|
-
} else
|
|
98
|
-
const determineRippleSize =
|
|
99
|
-
let
|
|
97
|
+
$[4] = t7;
|
|
98
|
+
} else t7 = $[4];
|
|
99
|
+
const determineRippleSize = t7;
|
|
100
|
+
let t8;
|
|
100
101
|
if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
|
|
101
|
-
|
|
102
|
+
t8 = (rect_0, positionEvent) => {
|
|
102
103
|
const { height: height_0, left, top, width: width_0 } = rect_0;
|
|
103
104
|
const size_0 = initialSize.current;
|
|
104
105
|
const endPoint = {
|
|
@@ -120,12 +121,12 @@ function useRipple(t0, t1, t2) {
|
|
|
120
121
|
}
|
|
121
122
|
};
|
|
122
123
|
};
|
|
123
|
-
$[5] =
|
|
124
|
-
} else
|
|
125
|
-
const getTranslationCoordinates =
|
|
126
|
-
let
|
|
127
|
-
if ($[6]
|
|
128
|
-
|
|
124
|
+
$[5] = t8;
|
|
125
|
+
} else t8 = $[5];
|
|
126
|
+
const getTranslationCoordinates = t8;
|
|
127
|
+
let t9;
|
|
128
|
+
if ($[6] !== centred) {
|
|
129
|
+
t9 = (target, positionEvent_0) => {
|
|
129
130
|
const ripple = rippleRef.current;
|
|
130
131
|
if (!ripple) return;
|
|
131
132
|
setPressed(true);
|
|
@@ -133,7 +134,7 @@ function useRipple(t0, t1, t2) {
|
|
|
133
134
|
const surface = ripple.parentElement?.getBoundingClientRect();
|
|
134
135
|
const rect_1 = surface && (surface.width > 0 || surface.height > 0) ? surface : target.getBoundingClientRect();
|
|
135
136
|
const size_1 = determineRippleSize(rect_1);
|
|
136
|
-
const { endPoint: endPoint_0, startPoint: startPoint_0 } = getTranslationCoordinates(rect_1, positionEvent_0);
|
|
137
|
+
const { endPoint: endPoint_0, startPoint: startPoint_0 } = getTranslationCoordinates(rect_1, centred ? void 0 : positionEvent_0);
|
|
137
138
|
ripple.style.width = size_1;
|
|
138
139
|
ripple.style.height = size_1;
|
|
139
140
|
growAnimation.current = ripple.animate({ transform: [`translate(${startPoint_0.x}px, ${startPoint_0.y}px) scale(1)`, `translate(${endPoint_0.x}px, ${endPoint_0.y}px) scale(${rippleScale.current})`] }, {
|
|
@@ -142,12 +143,13 @@ function useRipple(t0, t1, t2) {
|
|
|
142
143
|
fill: "forwards"
|
|
143
144
|
});
|
|
144
145
|
};
|
|
145
|
-
$[6] =
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
146
|
+
$[6] = centred;
|
|
147
|
+
$[7] = t9;
|
|
148
|
+
} else t9 = $[7];
|
|
149
|
+
const startPressAnimation = t9;
|
|
150
|
+
let t10;
|
|
151
|
+
if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
|
|
152
|
+
t10 = async () => {
|
|
151
153
|
removeDocumentListeners.current?.();
|
|
152
154
|
removeDocumentListeners.current = void 0;
|
|
153
155
|
rippleStartEvent.current = void 0;
|
|
@@ -164,12 +166,12 @@ function useRipple(t0, t1, t2) {
|
|
|
164
166
|
if (growAnimation.current !== animation) return;
|
|
165
167
|
setPressed(false);
|
|
166
168
|
};
|
|
167
|
-
$[
|
|
168
|
-
} else
|
|
169
|
-
const endPressAnimation =
|
|
170
|
-
let
|
|
171
|
-
if ($[
|
|
172
|
-
|
|
169
|
+
$[8] = t10;
|
|
170
|
+
} else t10 = $[8];
|
|
171
|
+
const endPressAnimation = t10;
|
|
172
|
+
let t11;
|
|
173
|
+
if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
|
|
174
|
+
t11 = (host, pointerId) => {
|
|
173
175
|
removeDocumentListeners.current?.();
|
|
174
176
|
const document = host.ownerDocument;
|
|
175
177
|
const handleEnd = (event_1) => {
|
|
@@ -183,32 +185,32 @@ function useRipple(t0, t1, t2) {
|
|
|
183
185
|
document.removeEventListener("pointerup", handleEnd, true);
|
|
184
186
|
};
|
|
185
187
|
};
|
|
186
|
-
$[
|
|
187
|
-
} else
|
|
188
|
-
const listenBeyondHost =
|
|
189
|
-
let t11;
|
|
188
|
+
$[9] = t11;
|
|
189
|
+
} else t11 = $[9];
|
|
190
|
+
const listenBeyondHost = t11;
|
|
190
191
|
let t12;
|
|
191
|
-
|
|
192
|
-
|
|
192
|
+
let t13;
|
|
193
|
+
if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
|
|
194
|
+
t12 = () => () => {
|
|
193
195
|
removeDocumentListeners.current?.();
|
|
194
196
|
};
|
|
195
|
-
|
|
196
|
-
$[9] = t11;
|
|
197
|
+
t13 = [];
|
|
197
198
|
$[10] = t12;
|
|
199
|
+
$[11] = t13;
|
|
198
200
|
} else {
|
|
199
|
-
t11 = $[9];
|
|
200
201
|
t12 = $[10];
|
|
202
|
+
t13 = $[11];
|
|
201
203
|
}
|
|
202
|
-
useEffect(
|
|
203
|
-
let t13;
|
|
204
|
-
if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
|
|
205
|
-
t13 = () => state.current;
|
|
206
|
-
$[11] = t13;
|
|
207
|
-
} else t13 = $[11];
|
|
208
|
-
const getState = t13;
|
|
204
|
+
useEffect(t12, t13);
|
|
209
205
|
let t14;
|
|
210
206
|
if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
|
|
211
|
-
t14 =
|
|
207
|
+
t14 = () => state.current;
|
|
208
|
+
$[12] = t14;
|
|
209
|
+
} else t14 = $[12];
|
|
210
|
+
const getState = t14;
|
|
211
|
+
let t15;
|
|
212
|
+
if ($[13] !== startPressAnimation) {
|
|
213
|
+
t15 = async (event_2) => {
|
|
212
214
|
if (!shouldReactToEvent(event_2)) return;
|
|
213
215
|
rippleStartEvent.current = event_2;
|
|
214
216
|
const target_0 = event_2.currentTarget;
|
|
@@ -224,20 +226,22 @@ function useRipple(t0, t1, t2) {
|
|
|
224
226
|
state.current = RippleState.Holding;
|
|
225
227
|
startPressAnimation(target_0, event_2);
|
|
226
228
|
};
|
|
227
|
-
$[
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
229
|
+
$[13] = startPressAnimation;
|
|
230
|
+
$[14] = t15;
|
|
231
|
+
} else t15 = $[14];
|
|
232
|
+
const handlePointerDownAsync = t15;
|
|
233
|
+
let t16;
|
|
234
|
+
if ($[15] !== handlePointerDownAsync) {
|
|
235
|
+
t16 = (event_3) => {
|
|
233
236
|
handlePointerDownAsync(event_3);
|
|
234
237
|
};
|
|
235
|
-
$[
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
238
|
+
$[15] = handlePointerDownAsync;
|
|
239
|
+
$[16] = t16;
|
|
240
|
+
} else t16 = $[16];
|
|
241
|
+
const handlePointerDown = t16;
|
|
242
|
+
let t17;
|
|
243
|
+
if ($[17] !== endsOnRelease || $[18] !== startPressAnimation) {
|
|
244
|
+
t17 = (event_4) => {
|
|
241
245
|
if (endsOnRelease && !isTouch(event_4)) {
|
|
242
246
|
if (isPressPointer(event_4) && state.current === RippleState.WaitingForClick) endPressAnimation();
|
|
243
247
|
return;
|
|
@@ -250,31 +254,32 @@ function useRipple(t0, t1, t2) {
|
|
|
250
254
|
}
|
|
251
255
|
if (endsOnRelease && state.current === RippleState.WaitingForClick) endPressAnimation();
|
|
252
256
|
};
|
|
253
|
-
$[
|
|
254
|
-
$[
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
257
|
+
$[17] = endsOnRelease;
|
|
258
|
+
$[18] = startPressAnimation;
|
|
259
|
+
$[19] = t17;
|
|
260
|
+
} else t17 = $[19];
|
|
261
|
+
const handlePointerUp = t17;
|
|
262
|
+
let t18;
|
|
263
|
+
if ($[20] === Symbol.for("react.memo_cache_sentinel")) {
|
|
264
|
+
t18 = (event_5) => {
|
|
260
265
|
if (isTouch(event_5) || !shouldReactToEvent(event_5)) return;
|
|
261
266
|
if (state.current !== RippleState.Inactive) endPressAnimation();
|
|
262
267
|
};
|
|
263
|
-
$[
|
|
264
|
-
} else
|
|
265
|
-
const handlePointerLeave =
|
|
266
|
-
let
|
|
267
|
-
if ($[
|
|
268
|
-
|
|
268
|
+
$[20] = t18;
|
|
269
|
+
} else t18 = $[20];
|
|
270
|
+
const handlePointerLeave = t18;
|
|
271
|
+
let t19;
|
|
272
|
+
if ($[21] === Symbol.for("react.memo_cache_sentinel")) {
|
|
273
|
+
t19 = (event_6) => {
|
|
269
274
|
if (!shouldReactToEvent(event_6)) return;
|
|
270
275
|
endPressAnimation();
|
|
271
276
|
};
|
|
272
|
-
$[
|
|
273
|
-
} else
|
|
274
|
-
const handlePointerCancel =
|
|
275
|
-
let
|
|
276
|
-
if ($[
|
|
277
|
-
|
|
277
|
+
$[21] = t19;
|
|
278
|
+
} else t19 = $[21];
|
|
279
|
+
const handlePointerCancel = t19;
|
|
280
|
+
let t20;
|
|
281
|
+
if ($[22] !== startPressAnimation) {
|
|
282
|
+
t20 = (event_7) => {
|
|
278
283
|
if (state.current === RippleState.WaitingForClick) {
|
|
279
284
|
endPressAnimation();
|
|
280
285
|
return;
|
|
@@ -284,149 +289,168 @@ function useRipple(t0, t1, t2) {
|
|
|
284
289
|
endPressAnimation();
|
|
285
290
|
}
|
|
286
291
|
};
|
|
287
|
-
$[
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
292
|
+
$[22] = startPressAnimation;
|
|
293
|
+
$[23] = t20;
|
|
294
|
+
} else t20 = $[23];
|
|
295
|
+
const handleClick = t20;
|
|
296
|
+
let t21;
|
|
297
|
+
if ($[24] !== startPressAnimation) {
|
|
298
|
+
t21 = () => {
|
|
299
|
+
const host_0 = rippleRef.current?.parentElement?.parentElement;
|
|
300
|
+
if (!host_0 || state.current !== RippleState.Inactive) return;
|
|
301
|
+
startPressAnimation(host_0);
|
|
293
302
|
endPressAnimation();
|
|
294
303
|
};
|
|
295
|
-
$[
|
|
296
|
-
|
|
297
|
-
|
|
304
|
+
$[24] = startPressAnimation;
|
|
305
|
+
$[25] = t21;
|
|
306
|
+
} else t21 = $[25];
|
|
307
|
+
const play = t21;
|
|
308
|
+
let t22;
|
|
309
|
+
if ($[26] === Symbol.for("react.memo_cache_sentinel")) {
|
|
310
|
+
t22 = () => {
|
|
311
|
+
endPressAnimation();
|
|
312
|
+
};
|
|
313
|
+
$[26] = t22;
|
|
314
|
+
} else t22 = $[26];
|
|
315
|
+
const handleContextMenu = t22;
|
|
298
316
|
const { onClick: onClickProp, onContextMenu: onContextMenuProp, onPointerCancel: onPointerCancelProp, onPointerDown: onPointerDownProp, onPointerLeave: onPointerLeaveProp, onPointerUp: onPointerUpProp } = externalHandlers;
|
|
299
|
-
let
|
|
300
|
-
if ($[
|
|
301
|
-
|
|
317
|
+
let t23;
|
|
318
|
+
if ($[27] !== handleClick || $[28] !== onClickProp) {
|
|
319
|
+
t23 = (event_8) => {
|
|
302
320
|
handleClick(event_8);
|
|
303
321
|
onClickProp?.(event_8);
|
|
304
322
|
};
|
|
305
|
-
$[
|
|
306
|
-
$[
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
323
|
+
$[27] = handleClick;
|
|
324
|
+
$[28] = onClickProp;
|
|
325
|
+
$[29] = t23;
|
|
326
|
+
} else t23 = $[29];
|
|
327
|
+
const onClick = t23;
|
|
328
|
+
let t24;
|
|
329
|
+
if ($[30] !== onContextMenuProp) {
|
|
330
|
+
t24 = (event_9) => {
|
|
312
331
|
handleContextMenu();
|
|
313
332
|
onContextMenuProp?.(event_9);
|
|
314
333
|
};
|
|
315
|
-
$[
|
|
316
|
-
$[
|
|
317
|
-
} else
|
|
318
|
-
const onContextMenu =
|
|
319
|
-
let
|
|
320
|
-
if ($[
|
|
321
|
-
|
|
334
|
+
$[30] = onContextMenuProp;
|
|
335
|
+
$[31] = t24;
|
|
336
|
+
} else t24 = $[31];
|
|
337
|
+
const onContextMenu = t24;
|
|
338
|
+
let t25;
|
|
339
|
+
if ($[32] !== onPointerCancelProp) {
|
|
340
|
+
t25 = (event_10) => {
|
|
322
341
|
handlePointerCancel(event_10);
|
|
323
342
|
onPointerCancelProp?.(event_10);
|
|
324
343
|
};
|
|
325
|
-
$[
|
|
326
|
-
$[
|
|
327
|
-
} else
|
|
328
|
-
const onPointerCancel =
|
|
329
|
-
let
|
|
330
|
-
if ($[
|
|
331
|
-
|
|
344
|
+
$[32] = onPointerCancelProp;
|
|
345
|
+
$[33] = t25;
|
|
346
|
+
} else t25 = $[33];
|
|
347
|
+
const onPointerCancel = t25;
|
|
348
|
+
let t26;
|
|
349
|
+
if ($[34] !== handlePointerDown || $[35] !== onPointerDownProp) {
|
|
350
|
+
t26 = (event_11) => {
|
|
332
351
|
handlePointerDown(event_11);
|
|
333
352
|
onPointerDownProp?.(event_11);
|
|
334
353
|
};
|
|
335
|
-
$[
|
|
336
|
-
$[
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
354
|
+
$[34] = handlePointerDown;
|
|
355
|
+
$[35] = onPointerDownProp;
|
|
356
|
+
$[36] = t26;
|
|
357
|
+
} else t26 = $[36];
|
|
358
|
+
const onPointerDown = t26;
|
|
359
|
+
let t27;
|
|
360
|
+
if ($[37] !== onPointerLeaveProp) {
|
|
361
|
+
t27 = (event_12) => {
|
|
342
362
|
handlePointerLeave(event_12);
|
|
343
363
|
onPointerLeaveProp?.(event_12);
|
|
344
364
|
};
|
|
345
|
-
$[
|
|
346
|
-
$[
|
|
347
|
-
} else
|
|
348
|
-
const onPointerLeave =
|
|
349
|
-
let
|
|
350
|
-
if ($[
|
|
351
|
-
|
|
365
|
+
$[37] = onPointerLeaveProp;
|
|
366
|
+
$[38] = t27;
|
|
367
|
+
} else t27 = $[38];
|
|
368
|
+
const onPointerLeave = t27;
|
|
369
|
+
let t28;
|
|
370
|
+
if ($[39] !== handlePointerUp || $[40] !== onPointerUpProp) {
|
|
371
|
+
t28 = (event_13) => {
|
|
352
372
|
handlePointerUp(event_13);
|
|
353
373
|
onPointerUpProp?.(event_13);
|
|
354
374
|
};
|
|
355
|
-
$[
|
|
356
|
-
$[
|
|
357
|
-
$[
|
|
358
|
-
} else
|
|
359
|
-
const onPointerUp =
|
|
360
|
-
let
|
|
361
|
-
if ($[
|
|
362
|
-
|
|
375
|
+
$[39] = handlePointerUp;
|
|
376
|
+
$[40] = onPointerUpProp;
|
|
377
|
+
$[41] = t28;
|
|
378
|
+
} else t28 = $[41];
|
|
379
|
+
const onPointerUp = t28;
|
|
380
|
+
let t29;
|
|
381
|
+
if ($[42] !== onContextMenu || $[43] !== onPointerCancel || $[44] !== onPointerDown || $[45] !== onPointerLeave || $[46] !== onPointerUp) {
|
|
382
|
+
t29 = {
|
|
363
383
|
onContextMenu,
|
|
364
384
|
onPointerCancel,
|
|
365
385
|
onPointerDown,
|
|
366
386
|
onPointerLeave,
|
|
367
387
|
onPointerUp
|
|
368
388
|
};
|
|
369
|
-
$[
|
|
370
|
-
$[
|
|
371
|
-
$[
|
|
372
|
-
$[
|
|
373
|
-
$[
|
|
374
|
-
$[
|
|
375
|
-
} else
|
|
376
|
-
const pointer =
|
|
377
|
-
let
|
|
378
|
-
if ($[
|
|
379
|
-
|
|
389
|
+
$[42] = onContextMenu;
|
|
390
|
+
$[43] = onPointerCancel;
|
|
391
|
+
$[44] = onPointerDown;
|
|
392
|
+
$[45] = onPointerLeave;
|
|
393
|
+
$[46] = onPointerUp;
|
|
394
|
+
$[47] = t29;
|
|
395
|
+
} else t29 = $[47];
|
|
396
|
+
const pointer = t29;
|
|
397
|
+
let t30;
|
|
398
|
+
if ($[48] !== endsOnRelease || $[49] !== onClick || $[50] !== pointer) {
|
|
399
|
+
t30 = endsOnRelease ? pointer : {
|
|
380
400
|
onClick,
|
|
381
401
|
...pointer
|
|
382
402
|
};
|
|
383
|
-
$[
|
|
384
|
-
$[
|
|
385
|
-
$[
|
|
386
|
-
$[
|
|
387
|
-
} else
|
|
388
|
-
const handlers =
|
|
389
|
-
let
|
|
390
|
-
if ($[
|
|
391
|
-
|
|
392
|
-
$[
|
|
393
|
-
$[
|
|
394
|
-
} else
|
|
395
|
-
let
|
|
396
|
-
if ($[
|
|
397
|
-
|
|
403
|
+
$[48] = endsOnRelease;
|
|
404
|
+
$[49] = onClick;
|
|
405
|
+
$[50] = pointer;
|
|
406
|
+
$[51] = t30;
|
|
407
|
+
} else t30 = $[51];
|
|
408
|
+
const handlers = t30;
|
|
409
|
+
let t31;
|
|
410
|
+
if ($[52] !== pressed) {
|
|
411
|
+
t31 = props(styles.press, pressed && styles.pressed);
|
|
412
|
+
$[52] = pressed;
|
|
413
|
+
$[53] = t31;
|
|
414
|
+
} else t31 = $[53];
|
|
415
|
+
let t32;
|
|
416
|
+
if ($[54] !== t31) {
|
|
417
|
+
t32 = /* @__PURE__ */ jsx("span", {
|
|
398
418
|
"aria-hidden": "true",
|
|
399
419
|
...surfaceProps,
|
|
400
420
|
children: /* @__PURE__ */ jsx("span", {
|
|
401
421
|
ref: rippleRef,
|
|
402
|
-
...
|
|
422
|
+
...t31
|
|
403
423
|
})
|
|
404
424
|
});
|
|
405
|
-
$[
|
|
406
|
-
$[
|
|
407
|
-
} else
|
|
408
|
-
const surface_0 =
|
|
409
|
-
let
|
|
410
|
-
if ($[
|
|
411
|
-
|
|
425
|
+
$[54] = t31;
|
|
426
|
+
$[55] = t32;
|
|
427
|
+
} else t32 = $[55];
|
|
428
|
+
const surface_0 = t32;
|
|
429
|
+
let t33;
|
|
430
|
+
if ($[56] !== handlers || $[57] !== play || $[58] !== surface_0) {
|
|
431
|
+
t33 = {
|
|
412
432
|
handlers,
|
|
433
|
+
play,
|
|
413
434
|
surface: surface_0
|
|
414
435
|
};
|
|
415
|
-
$[
|
|
416
|
-
$[
|
|
417
|
-
$[
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
436
|
+
$[56] = handlers;
|
|
437
|
+
$[57] = play;
|
|
438
|
+
$[58] = surface_0;
|
|
439
|
+
$[59] = t33;
|
|
440
|
+
} else t33 = $[59];
|
|
441
|
+
const enabledResult = t33;
|
|
442
|
+
let t34;
|
|
443
|
+
if ($[60] !== externalHandlers || $[61] !== play) {
|
|
444
|
+
t34 = {
|
|
423
445
|
handlers: externalHandlers,
|
|
446
|
+
play,
|
|
424
447
|
surface: null
|
|
425
448
|
};
|
|
426
|
-
$[
|
|
427
|
-
$[
|
|
428
|
-
|
|
429
|
-
|
|
449
|
+
$[60] = externalHandlers;
|
|
450
|
+
$[61] = play;
|
|
451
|
+
$[62] = t34;
|
|
452
|
+
} else t34 = $[62];
|
|
453
|
+
return enabled ? enabledResult : t34;
|
|
430
454
|
}
|
|
431
455
|
function _temp(resolve_0) {
|
|
432
456
|
setTimeout(resolve_0, motionDurationMs.short2);
|