jattac.libs.web.zest-button 1.0.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.
@@ -0,0 +1,584 @@
1
+ import require$$0, { useState, useRef, useEffect } from 'react';
2
+ import { FaSpinner } from 'react-icons/fa6';
3
+
4
+ var jsxRuntime = {exports: {}};
5
+
6
+ var reactJsxRuntime_production = {};
7
+
8
+ /**
9
+ * @license React
10
+ * react-jsx-runtime.production.js
11
+ *
12
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
13
+ *
14
+ * This source code is licensed under the MIT license found in the
15
+ * LICENSE file in the root directory of this source tree.
16
+ */
17
+
18
+ var hasRequiredReactJsxRuntime_production;
19
+
20
+ function requireReactJsxRuntime_production () {
21
+ if (hasRequiredReactJsxRuntime_production) return reactJsxRuntime_production;
22
+ hasRequiredReactJsxRuntime_production = 1;
23
+ var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
24
+ REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
25
+ function jsxProd(type, config, maybeKey) {
26
+ var key = null;
27
+ void 0 !== maybeKey && (key = "" + maybeKey);
28
+ void 0 !== config.key && (key = "" + config.key);
29
+ if ("key" in config) {
30
+ maybeKey = {};
31
+ for (var propName in config)
32
+ "key" !== propName && (maybeKey[propName] = config[propName]);
33
+ } else maybeKey = config;
34
+ config = maybeKey.ref;
35
+ return {
36
+ $$typeof: REACT_ELEMENT_TYPE,
37
+ type: type,
38
+ key: key,
39
+ ref: void 0 !== config ? config : null,
40
+ props: maybeKey
41
+ };
42
+ }
43
+ reactJsxRuntime_production.Fragment = REACT_FRAGMENT_TYPE;
44
+ reactJsxRuntime_production.jsx = jsxProd;
45
+ reactJsxRuntime_production.jsxs = jsxProd;
46
+ return reactJsxRuntime_production;
47
+ }
48
+
49
+ var reactJsxRuntime_development = {};
50
+
51
+ /**
52
+ * @license React
53
+ * react-jsx-runtime.development.js
54
+ *
55
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
56
+ *
57
+ * This source code is licensed under the MIT license found in the
58
+ * LICENSE file in the root directory of this source tree.
59
+ */
60
+
61
+ var hasRequiredReactJsxRuntime_development;
62
+
63
+ function requireReactJsxRuntime_development () {
64
+ if (hasRequiredReactJsxRuntime_development) return reactJsxRuntime_development;
65
+ hasRequiredReactJsxRuntime_development = 1;
66
+ "production" !== process.env.NODE_ENV &&
67
+ (function () {
68
+ function getComponentNameFromType(type) {
69
+ if (null == type) return null;
70
+ if ("function" === typeof type)
71
+ return type.$$typeof === REACT_CLIENT_REFERENCE
72
+ ? null
73
+ : type.displayName || type.name || null;
74
+ if ("string" === typeof type) return type;
75
+ switch (type) {
76
+ case REACT_FRAGMENT_TYPE:
77
+ return "Fragment";
78
+ case REACT_PROFILER_TYPE:
79
+ return "Profiler";
80
+ case REACT_STRICT_MODE_TYPE:
81
+ return "StrictMode";
82
+ case REACT_SUSPENSE_TYPE:
83
+ return "Suspense";
84
+ case REACT_SUSPENSE_LIST_TYPE:
85
+ return "SuspenseList";
86
+ case REACT_ACTIVITY_TYPE:
87
+ return "Activity";
88
+ }
89
+ if ("object" === typeof type)
90
+ switch (
91
+ ("number" === typeof type.tag &&
92
+ console.error(
93
+ "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
94
+ ),
95
+ type.$$typeof)
96
+ ) {
97
+ case REACT_PORTAL_TYPE:
98
+ return "Portal";
99
+ case REACT_CONTEXT_TYPE:
100
+ return type.displayName || "Context";
101
+ case REACT_CONSUMER_TYPE:
102
+ return (type._context.displayName || "Context") + ".Consumer";
103
+ case REACT_FORWARD_REF_TYPE:
104
+ var innerType = type.render;
105
+ type = type.displayName;
106
+ type ||
107
+ ((type = innerType.displayName || innerType.name || ""),
108
+ (type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef"));
109
+ return type;
110
+ case REACT_MEMO_TYPE:
111
+ return (
112
+ (innerType = type.displayName || null),
113
+ null !== innerType
114
+ ? innerType
115
+ : getComponentNameFromType(type.type) || "Memo"
116
+ );
117
+ case REACT_LAZY_TYPE:
118
+ innerType = type._payload;
119
+ type = type._init;
120
+ try {
121
+ return getComponentNameFromType(type(innerType));
122
+ } catch (x) {}
123
+ }
124
+ return null;
125
+ }
126
+ function testStringCoercion(value) {
127
+ return "" + value;
128
+ }
129
+ function checkKeyStringCoercion(value) {
130
+ try {
131
+ testStringCoercion(value);
132
+ var JSCompiler_inline_result = !1;
133
+ } catch (e) {
134
+ JSCompiler_inline_result = true;
135
+ }
136
+ if (JSCompiler_inline_result) {
137
+ JSCompiler_inline_result = console;
138
+ var JSCompiler_temp_const = JSCompiler_inline_result.error;
139
+ var JSCompiler_inline_result$jscomp$0 =
140
+ ("function" === typeof Symbol &&
141
+ Symbol.toStringTag &&
142
+ value[Symbol.toStringTag]) ||
143
+ value.constructor.name ||
144
+ "Object";
145
+ JSCompiler_temp_const.call(
146
+ JSCompiler_inline_result,
147
+ "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
148
+ JSCompiler_inline_result$jscomp$0
149
+ );
150
+ return testStringCoercion(value);
151
+ }
152
+ }
153
+ function getTaskName(type) {
154
+ if (type === REACT_FRAGMENT_TYPE) return "<>";
155
+ if (
156
+ "object" === typeof type &&
157
+ null !== type &&
158
+ type.$$typeof === REACT_LAZY_TYPE
159
+ )
160
+ return "<...>";
161
+ try {
162
+ var name = getComponentNameFromType(type);
163
+ return name ? "<" + name + ">" : "<...>";
164
+ } catch (x) {
165
+ return "<...>";
166
+ }
167
+ }
168
+ function getOwner() {
169
+ var dispatcher = ReactSharedInternals.A;
170
+ return null === dispatcher ? null : dispatcher.getOwner();
171
+ }
172
+ function UnknownOwner() {
173
+ return Error("react-stack-top-frame");
174
+ }
175
+ function hasValidKey(config) {
176
+ if (hasOwnProperty.call(config, "key")) {
177
+ var getter = Object.getOwnPropertyDescriptor(config, "key").get;
178
+ if (getter && getter.isReactWarning) return false;
179
+ }
180
+ return void 0 !== config.key;
181
+ }
182
+ function defineKeyPropWarningGetter(props, displayName) {
183
+ function warnAboutAccessingKey() {
184
+ specialPropKeyWarningShown ||
185
+ ((specialPropKeyWarningShown = true),
186
+ console.error(
187
+ "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
188
+ displayName
189
+ ));
190
+ }
191
+ warnAboutAccessingKey.isReactWarning = true;
192
+ Object.defineProperty(props, "key", {
193
+ get: warnAboutAccessingKey,
194
+ configurable: true
195
+ });
196
+ }
197
+ function elementRefGetterWithDeprecationWarning() {
198
+ var componentName = getComponentNameFromType(this.type);
199
+ didWarnAboutElementRef[componentName] ||
200
+ ((didWarnAboutElementRef[componentName] = true),
201
+ console.error(
202
+ "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
203
+ ));
204
+ componentName = this.props.ref;
205
+ return void 0 !== componentName ? componentName : null;
206
+ }
207
+ function ReactElement(type, key, props, owner, debugStack, debugTask) {
208
+ var refProp = props.ref;
209
+ type = {
210
+ $$typeof: REACT_ELEMENT_TYPE,
211
+ type: type,
212
+ key: key,
213
+ props: props,
214
+ _owner: owner
215
+ };
216
+ null !== (void 0 !== refProp ? refProp : null)
217
+ ? Object.defineProperty(type, "ref", {
218
+ enumerable: false,
219
+ get: elementRefGetterWithDeprecationWarning
220
+ })
221
+ : Object.defineProperty(type, "ref", { enumerable: false, value: null });
222
+ type._store = {};
223
+ Object.defineProperty(type._store, "validated", {
224
+ configurable: false,
225
+ enumerable: false,
226
+ writable: true,
227
+ value: 0
228
+ });
229
+ Object.defineProperty(type, "_debugInfo", {
230
+ configurable: false,
231
+ enumerable: false,
232
+ writable: true,
233
+ value: null
234
+ });
235
+ Object.defineProperty(type, "_debugStack", {
236
+ configurable: false,
237
+ enumerable: false,
238
+ writable: true,
239
+ value: debugStack
240
+ });
241
+ Object.defineProperty(type, "_debugTask", {
242
+ configurable: false,
243
+ enumerable: false,
244
+ writable: true,
245
+ value: debugTask
246
+ });
247
+ Object.freeze && (Object.freeze(type.props), Object.freeze(type));
248
+ return type;
249
+ }
250
+ function jsxDEVImpl(
251
+ type,
252
+ config,
253
+ maybeKey,
254
+ isStaticChildren,
255
+ debugStack,
256
+ debugTask
257
+ ) {
258
+ var children = config.children;
259
+ if (void 0 !== children)
260
+ if (isStaticChildren)
261
+ if (isArrayImpl(children)) {
262
+ for (
263
+ isStaticChildren = 0;
264
+ isStaticChildren < children.length;
265
+ isStaticChildren++
266
+ )
267
+ validateChildKeys(children[isStaticChildren]);
268
+ Object.freeze && Object.freeze(children);
269
+ } else
270
+ console.error(
271
+ "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
272
+ );
273
+ else validateChildKeys(children);
274
+ if (hasOwnProperty.call(config, "key")) {
275
+ children = getComponentNameFromType(type);
276
+ var keys = Object.keys(config).filter(function (k) {
277
+ return "key" !== k;
278
+ });
279
+ isStaticChildren =
280
+ 0 < keys.length
281
+ ? "{key: someKey, " + keys.join(": ..., ") + ": ...}"
282
+ : "{key: someKey}";
283
+ didWarnAboutKeySpread[children + isStaticChildren] ||
284
+ ((keys =
285
+ 0 < keys.length ? "{" + keys.join(": ..., ") + ": ...}" : "{}"),
286
+ console.error(
287
+ 'A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',
288
+ isStaticChildren,
289
+ children,
290
+ keys,
291
+ children
292
+ ),
293
+ (didWarnAboutKeySpread[children + isStaticChildren] = true));
294
+ }
295
+ children = null;
296
+ void 0 !== maybeKey &&
297
+ (checkKeyStringCoercion(maybeKey), (children = "" + maybeKey));
298
+ hasValidKey(config) &&
299
+ (checkKeyStringCoercion(config.key), (children = "" + config.key));
300
+ if ("key" in config) {
301
+ maybeKey = {};
302
+ for (var propName in config)
303
+ "key" !== propName && (maybeKey[propName] = config[propName]);
304
+ } else maybeKey = config;
305
+ children &&
306
+ defineKeyPropWarningGetter(
307
+ maybeKey,
308
+ "function" === typeof type
309
+ ? type.displayName || type.name || "Unknown"
310
+ : type
311
+ );
312
+ return ReactElement(
313
+ type,
314
+ children,
315
+ maybeKey,
316
+ getOwner(),
317
+ debugStack,
318
+ debugTask
319
+ );
320
+ }
321
+ function validateChildKeys(node) {
322
+ isValidElement(node)
323
+ ? node._store && (node._store.validated = 1)
324
+ : "object" === typeof node &&
325
+ null !== node &&
326
+ node.$$typeof === REACT_LAZY_TYPE &&
327
+ ("fulfilled" === node._payload.status
328
+ ? isValidElement(node._payload.value) &&
329
+ node._payload.value._store &&
330
+ (node._payload.value._store.validated = 1)
331
+ : node._store && (node._store.validated = 1));
332
+ }
333
+ function isValidElement(object) {
334
+ return (
335
+ "object" === typeof object &&
336
+ null !== object &&
337
+ object.$$typeof === REACT_ELEMENT_TYPE
338
+ );
339
+ }
340
+ var React = require$$0,
341
+ REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
342
+ REACT_PORTAL_TYPE = Symbol.for("react.portal"),
343
+ REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
344
+ REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
345
+ REACT_PROFILER_TYPE = Symbol.for("react.profiler"),
346
+ REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
347
+ REACT_CONTEXT_TYPE = Symbol.for("react.context"),
348
+ REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
349
+ REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
350
+ REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"),
351
+ REACT_MEMO_TYPE = Symbol.for("react.memo"),
352
+ REACT_LAZY_TYPE = Symbol.for("react.lazy"),
353
+ REACT_ACTIVITY_TYPE = Symbol.for("react.activity"),
354
+ REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"),
355
+ ReactSharedInternals =
356
+ React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
357
+ hasOwnProperty = Object.prototype.hasOwnProperty,
358
+ isArrayImpl = Array.isArray,
359
+ createTask = console.createTask
360
+ ? console.createTask
361
+ : function () {
362
+ return null;
363
+ };
364
+ React = {
365
+ react_stack_bottom_frame: function (callStackForError) {
366
+ return callStackForError();
367
+ }
368
+ };
369
+ var specialPropKeyWarningShown;
370
+ var didWarnAboutElementRef = {};
371
+ var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(
372
+ React,
373
+ UnknownOwner
374
+ )();
375
+ var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
376
+ var didWarnAboutKeySpread = {};
377
+ reactJsxRuntime_development.Fragment = REACT_FRAGMENT_TYPE;
378
+ reactJsxRuntime_development.jsx = function (type, config, maybeKey) {
379
+ var trackActualOwner =
380
+ 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
381
+ return jsxDEVImpl(
382
+ type,
383
+ config,
384
+ maybeKey,
385
+ false,
386
+ trackActualOwner
387
+ ? Error("react-stack-top-frame")
388
+ : unknownOwnerDebugStack,
389
+ trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
390
+ );
391
+ };
392
+ reactJsxRuntime_development.jsxs = function (type, config, maybeKey) {
393
+ var trackActualOwner =
394
+ 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
395
+ return jsxDEVImpl(
396
+ type,
397
+ config,
398
+ maybeKey,
399
+ true,
400
+ trackActualOwner
401
+ ? Error("react-stack-top-frame")
402
+ : unknownOwnerDebugStack,
403
+ trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
404
+ );
405
+ };
406
+ })();
407
+ return reactJsxRuntime_development;
408
+ }
409
+
410
+ var hasRequiredJsxRuntime;
411
+
412
+ function requireJsxRuntime () {
413
+ if (hasRequiredJsxRuntime) return jsxRuntime.exports;
414
+ hasRequiredJsxRuntime = 1;
415
+
416
+ if (process.env.NODE_ENV === 'production') {
417
+ jsxRuntime.exports = requireReactJsxRuntime_production();
418
+ } else {
419
+ jsxRuntime.exports = requireReactJsxRuntime_development();
420
+ }
421
+ return jsxRuntime.exports;
422
+ }
423
+
424
+ var jsxRuntimeExports = requireJsxRuntime();
425
+
426
+ const SpinnerIcon = ({ className, ...props }) => (jsxRuntimeExports.jsx(FaSpinner, { className: className, ...props }));
427
+
428
+ var styles = {"button":"ZestButton-module_button__KDafc","disabled":"ZestButton-module_disabled__gw6y3","fullWidth":"ZestButton-module_fullWidth__2ziwk","sm":"ZestButton-module_sm__G1vAP","md":"ZestButton-module_md__Y-PMO","lg":"ZestButton-module_lg__AQgdf","standard":"ZestButton-module_standard__T3EGM","success":"ZestButton-module_success__XEptA","danger":"ZestButton-module_danger__nJpJ-","inner":"ZestButton-module_inner__1j2Fr","spinner":"ZestButton-module_spinner__l2hLe","spin":"ZestButton-module_spin__4asdw","content":"ZestButton-module_content__hlea3","label":"ZestButton-module_label__8x263","icon":"ZestButton-module_icon__B3DFi","animatedCheck":"ZestButton-module_animatedCheck__8K4K-","animatedX":"ZestButton-module_animatedX__KQnt7","fadeIn":"ZestButton-module_fadeIn__iEave","drawCheck":"ZestButton-module_drawCheck__3DyjT","shake":"ZestButton-module_shake__NtIjf","shakeIt":"ZestButton-module_shakeIt__ox-R3"};
429
+
430
+ // --- Components ---
431
+ const AnimatedCheckmark = () => (jsxRuntimeExports.jsx("svg", { className: styles.animatedCheck, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "3", strokeLinecap: "round", strokeLinejoin: "round", children: jsxRuntimeExports.jsx("path", { d: "M5 13l4 4L19 7" }) }));
432
+ const AnimatedX = () => (jsxRuntimeExports.jsxs("svg", { className: styles.animatedX, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "3", strokeLinecap: "round", strokeLinejoin: "round", children: [jsxRuntimeExports.jsx("path", { d: "M6 6L18 18" }), jsxRuntimeExports.jsx("path", { d: "M6 18L18 6" })] }));
433
+ const ZestButton = ({ visualOptions, busyOptions, successOptions, isDefault = false, className = "", disabled, children, onClick, ...props }) => {
434
+ const { variant = "standard", size = "md", fullWidth = false, iconLeft, iconRight, } = visualOptions || {};
435
+ const { handleInternally = true, preventRageClick = true, minBusyDurationMs = 500, } = busyOptions || {};
436
+ const { showCheckmark = true, showFailIcon = true, autoResetAfterMs = 2000, } = successOptions || {};
437
+ const [internalBusy, setInternalBusy] = useState(false);
438
+ const [wasSuccessful, setWasSuccessful] = useState(false);
439
+ const [wasFailed, setWasFailed] = useState(false);
440
+ const buttonRef = useRef(null);
441
+ const [currentChildren, setCurrentChildren] = useState(children);
442
+ const [awaitingConfirm, setAwaitingConfirm] = useState(false);
443
+ // ✅ interval ref for confirm countdown
444
+ const confirmIntervalRef = useRef(null);
445
+ // keep children in sync when not in confirm mode
446
+ useEffect(() => {
447
+ if (!awaitingConfirm) {
448
+ setCurrentChildren(children);
449
+ }
450
+ }, [children, awaitingConfirm]);
451
+ const effectiveBusy = typeof props["aria-busy"] === "boolean"
452
+ ? Boolean(props["aria-busy"])
453
+ : handleInternally
454
+ ? internalBusy
455
+ : false;
456
+ const isDisabled = disabled ||
457
+ effectiveBusy ||
458
+ (preventRageClick && (wasSuccessful || wasFailed));
459
+ const handleClick = async (e) => {
460
+ if (preventRageClick && internalBusy)
461
+ return;
462
+ if (handleInternally && typeof onClick === "function") {
463
+ try {
464
+ setWasSuccessful(false);
465
+ setWasFailed(false);
466
+ setInternalBusy(true);
467
+ const startTime = Date.now();
468
+ await onClick(e);
469
+ const elapsed = Date.now() - startTime;
470
+ const remaining = Math.max(minBusyDurationMs - elapsed, 0);
471
+ if (remaining > 0) {
472
+ await new Promise((resolve) => setTimeout(resolve, remaining));
473
+ }
474
+ if (showCheckmark)
475
+ setWasSuccessful(true);
476
+ }
477
+ catch (err) {
478
+ console.error(err);
479
+ if (showFailIcon)
480
+ setWasFailed(true);
481
+ }
482
+ finally {
483
+ setInternalBusy(false);
484
+ }
485
+ }
486
+ else if (onClick) {
487
+ onClick(e);
488
+ }
489
+ };
490
+ // auto-reset success/failure state
491
+ useEffect(() => {
492
+ if ((wasSuccessful || wasFailed) && autoResetAfterMs) {
493
+ const timeout = setTimeout(() => {
494
+ setWasSuccessful(false);
495
+ setWasFailed(false);
496
+ }, autoResetAfterMs);
497
+ return () => clearTimeout(timeout);
498
+ }
499
+ }, [wasSuccessful, wasFailed, autoResetAfterMs]);
500
+ // Enter key handler if isDefault
501
+ useEffect(() => {
502
+ if (!isDefault || isDisabled)
503
+ return;
504
+ const listener = (e) => {
505
+ var _a;
506
+ const target = e.target;
507
+ if (e.key === "Enter" &&
508
+ !e.repeat &&
509
+ !e.defaultPrevented &&
510
+ !(target instanceof HTMLTextAreaElement)) {
511
+ e.preventDefault();
512
+ (_a = buttonRef.current) === null || _a === void 0 ? void 0 : _a.click();
513
+ }
514
+ };
515
+ document.addEventListener("keydown", listener);
516
+ return () => document.removeEventListener("keydown", listener);
517
+ }, [isDefault, isDisabled]);
518
+ const stopWaiting = () => {
519
+ if (confirmIntervalRef.current) {
520
+ clearInterval(confirmIntervalRef.current);
521
+ confirmIntervalRef.current = null;
522
+ }
523
+ setCurrentChildren(children);
524
+ setAwaitingConfirm(false);
525
+ };
526
+ const handleConfirmClick = (e) => {
527
+ if (!props.confirmOptions) {
528
+ return handleClick(e);
529
+ }
530
+ if (awaitingConfirm) {
531
+ stopWaiting();
532
+ return handleClick(e);
533
+ }
534
+ const { displayLabel, timeoutSecs } = props.confirmOptions;
535
+ const startTime = Date.now();
536
+ setAwaitingConfirm(true);
537
+ confirmIntervalRef.current = setInterval(() => {
538
+ const elapsed = Date.now() - startTime;
539
+ if (elapsed >= timeoutSecs * 1000) {
540
+ stopWaiting();
541
+ }
542
+ else {
543
+ const elapsedSecs = Math.floor(elapsed / 1000);
544
+ const timeRemaining = timeoutSecs - elapsedSecs;
545
+ setCurrentChildren(`${displayLabel} (${timeRemaining}s)`);
546
+ }
547
+ }, 100); // ✅ update once per second
548
+ };
549
+ // cleanup on unmount
550
+ useEffect(() => {
551
+ return () => {
552
+ if (confirmIntervalRef.current) {
553
+ clearInterval(confirmIntervalRef.current);
554
+ }
555
+ };
556
+ }, []);
557
+ const renderLeftIcon = () => {
558
+ if (effectiveBusy) {
559
+ return (jsxRuntimeExports.jsx("span", { className: `${styles.icon} ${styles.fadeIn}`, children: jsxRuntimeExports.jsx(SpinnerIcon, { className: styles.spinner, size: 18 }) }));
560
+ }
561
+ else if (wasSuccessful && showCheckmark) {
562
+ return (jsxRuntimeExports.jsx("span", { className: `${styles.icon} ${styles.fadeIn}`, children: jsxRuntimeExports.jsx(AnimatedCheckmark, {}) }));
563
+ }
564
+ else if (wasFailed && showFailIcon) {
565
+ return (jsxRuntimeExports.jsx("span", { className: `${styles.icon} ${styles.fadeIn} ${styles.failShake}`, children: jsxRuntimeExports.jsx(AnimatedX, {}) }));
566
+ }
567
+ else if (iconLeft) {
568
+ return jsxRuntimeExports.jsx("span", { className: styles.icon, children: iconLeft });
569
+ }
570
+ return null;
571
+ };
572
+ return (jsxRuntimeExports.jsx("button", { ref: buttonRef, className: [
573
+ styles.button,
574
+ styles[variant],
575
+ styles[size],
576
+ fullWidth ? styles.fullWidth : "",
577
+ isDisabled ? styles.disabled : "",
578
+ wasFailed ? styles.failGlow : "",
579
+ className,
580
+ ].join(" "), disabled: isDisabled, "aria-busy": effectiveBusy, onClick: handleConfirmClick, ...props, children: jsxRuntimeExports.jsxs("span", { className: styles.inner, children: [renderLeftIcon(), jsxRuntimeExports.jsxs("span", { className: styles.content, children: [currentChildren, iconRight && jsxRuntimeExports.jsx("span", { className: styles.icon, children: iconRight })] })] }) }));
581
+ };
582
+
583
+ export { ZestButton as default };
584
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../node_modules/react/cjs/react-jsx-runtime.production.js","../../node_modules/react/cjs/react-jsx-runtime.development.js","../../node_modules/react/jsx-runtime.js","../../UI/SpinnerIcon.tsx","../../UI/ZestButton.tsx"],"sourcesContent":["/**\n * @license React\n * react-jsx-runtime.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\");\nfunction jsxProd(type, config, maybeKey) {\n var key = null;\n void 0 !== maybeKey && (key = \"\" + maybeKey);\n void 0 !== config.key && (key = \"\" + config.key);\n if (\"key\" in config) {\n maybeKey = {};\n for (var propName in config)\n \"key\" !== propName && (maybeKey[propName] = config[propName]);\n } else maybeKey = config;\n config = maybeKey.ref;\n return {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n ref: void 0 !== config ? config : null,\n props: maybeKey\n };\n}\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.jsx = jsxProd;\nexports.jsxs = jsxProd;\n","/**\n * @license React\n * react-jsx-runtime.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n (function () {\n function getComponentNameFromType(type) {\n if (null == type) return null;\n if (\"function\" === typeof type)\n return type.$$typeof === REACT_CLIENT_REFERENCE\n ? null\n : type.displayName || type.name || null;\n if (\"string\" === typeof type) return type;\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return \"Fragment\";\n case REACT_PROFILER_TYPE:\n return \"Profiler\";\n case REACT_STRICT_MODE_TYPE:\n return \"StrictMode\";\n case REACT_SUSPENSE_TYPE:\n return \"Suspense\";\n case REACT_SUSPENSE_LIST_TYPE:\n return \"SuspenseList\";\n case REACT_ACTIVITY_TYPE:\n return \"Activity\";\n }\n if (\"object\" === typeof type)\n switch (\n (\"number\" === typeof type.tag &&\n console.error(\n \"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.\"\n ),\n type.$$typeof)\n ) {\n case REACT_PORTAL_TYPE:\n return \"Portal\";\n case REACT_CONTEXT_TYPE:\n return type.displayName || \"Context\";\n case REACT_CONSUMER_TYPE:\n return (type._context.displayName || \"Context\") + \".Consumer\";\n case REACT_FORWARD_REF_TYPE:\n var innerType = type.render;\n type = type.displayName;\n type ||\n ((type = innerType.displayName || innerType.name || \"\"),\n (type = \"\" !== type ? \"ForwardRef(\" + type + \")\" : \"ForwardRef\"));\n return type;\n case REACT_MEMO_TYPE:\n return (\n (innerType = type.displayName || null),\n null !== innerType\n ? innerType\n : getComponentNameFromType(type.type) || \"Memo\"\n );\n case REACT_LAZY_TYPE:\n innerType = type._payload;\n type = type._init;\n try {\n return getComponentNameFromType(type(innerType));\n } catch (x) {}\n }\n return null;\n }\n function testStringCoercion(value) {\n return \"\" + value;\n }\n function checkKeyStringCoercion(value) {\n try {\n testStringCoercion(value);\n var JSCompiler_inline_result = !1;\n } catch (e) {\n JSCompiler_inline_result = !0;\n }\n if (JSCompiler_inline_result) {\n JSCompiler_inline_result = console;\n var JSCompiler_temp_const = JSCompiler_inline_result.error;\n var JSCompiler_inline_result$jscomp$0 =\n (\"function\" === typeof Symbol &&\n Symbol.toStringTag &&\n value[Symbol.toStringTag]) ||\n value.constructor.name ||\n \"Object\";\n JSCompiler_temp_const.call(\n JSCompiler_inline_result,\n \"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.\",\n JSCompiler_inline_result$jscomp$0\n );\n return testStringCoercion(value);\n }\n }\n function getTaskName(type) {\n if (type === REACT_FRAGMENT_TYPE) return \"<>\";\n if (\n \"object\" === typeof type &&\n null !== type &&\n type.$$typeof === REACT_LAZY_TYPE\n )\n return \"<...>\";\n try {\n var name = getComponentNameFromType(type);\n return name ? \"<\" + name + \">\" : \"<...>\";\n } catch (x) {\n return \"<...>\";\n }\n }\n function getOwner() {\n var dispatcher = ReactSharedInternals.A;\n return null === dispatcher ? null : dispatcher.getOwner();\n }\n function UnknownOwner() {\n return Error(\"react-stack-top-frame\");\n }\n function hasValidKey(config) {\n if (hasOwnProperty.call(config, \"key\")) {\n var getter = Object.getOwnPropertyDescriptor(config, \"key\").get;\n if (getter && getter.isReactWarning) return !1;\n }\n return void 0 !== config.key;\n }\n function defineKeyPropWarningGetter(props, displayName) {\n function warnAboutAccessingKey() {\n specialPropKeyWarningShown ||\n ((specialPropKeyWarningShown = !0),\n console.error(\n \"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)\",\n displayName\n ));\n }\n warnAboutAccessingKey.isReactWarning = !0;\n Object.defineProperty(props, \"key\", {\n get: warnAboutAccessingKey,\n configurable: !0\n });\n }\n function elementRefGetterWithDeprecationWarning() {\n var componentName = getComponentNameFromType(this.type);\n didWarnAboutElementRef[componentName] ||\n ((didWarnAboutElementRef[componentName] = !0),\n console.error(\n \"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.\"\n ));\n componentName = this.props.ref;\n return void 0 !== componentName ? componentName : null;\n }\n function ReactElement(type, key, props, owner, debugStack, debugTask) {\n var refProp = props.ref;\n type = {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n props: props,\n _owner: owner\n };\n null !== (void 0 !== refProp ? refProp : null)\n ? Object.defineProperty(type, \"ref\", {\n enumerable: !1,\n get: elementRefGetterWithDeprecationWarning\n })\n : Object.defineProperty(type, \"ref\", { enumerable: !1, value: null });\n type._store = {};\n Object.defineProperty(type._store, \"validated\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: 0\n });\n Object.defineProperty(type, \"_debugInfo\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: null\n });\n Object.defineProperty(type, \"_debugStack\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugStack\n });\n Object.defineProperty(type, \"_debugTask\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugTask\n });\n Object.freeze && (Object.freeze(type.props), Object.freeze(type));\n return type;\n }\n function jsxDEVImpl(\n type,\n config,\n maybeKey,\n isStaticChildren,\n debugStack,\n debugTask\n ) {\n var children = config.children;\n if (void 0 !== children)\n if (isStaticChildren)\n if (isArrayImpl(children)) {\n for (\n isStaticChildren = 0;\n isStaticChildren < children.length;\n isStaticChildren++\n )\n validateChildKeys(children[isStaticChildren]);\n Object.freeze && Object.freeze(children);\n } else\n console.error(\n \"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.\"\n );\n else validateChildKeys(children);\n if (hasOwnProperty.call(config, \"key\")) {\n children = getComponentNameFromType(type);\n var keys = Object.keys(config).filter(function (k) {\n return \"key\" !== k;\n });\n isStaticChildren =\n 0 < keys.length\n ? \"{key: someKey, \" + keys.join(\": ..., \") + \": ...}\"\n : \"{key: someKey}\";\n didWarnAboutKeySpread[children + isStaticChildren] ||\n ((keys =\n 0 < keys.length ? \"{\" + keys.join(\": ..., \") + \": ...}\" : \"{}\"),\n console.error(\n 'A props object containing a \"key\" prop is being spread into JSX:\\n let props = %s;\\n <%s {...props} />\\nReact keys must be passed directly to JSX without using spread:\\n let props = %s;\\n <%s key={someKey} {...props} />',\n isStaticChildren,\n children,\n keys,\n children\n ),\n (didWarnAboutKeySpread[children + isStaticChildren] = !0));\n }\n children = null;\n void 0 !== maybeKey &&\n (checkKeyStringCoercion(maybeKey), (children = \"\" + maybeKey));\n hasValidKey(config) &&\n (checkKeyStringCoercion(config.key), (children = \"\" + config.key));\n if (\"key\" in config) {\n maybeKey = {};\n for (var propName in config)\n \"key\" !== propName && (maybeKey[propName] = config[propName]);\n } else maybeKey = config;\n children &&\n defineKeyPropWarningGetter(\n maybeKey,\n \"function\" === typeof type\n ? type.displayName || type.name || \"Unknown\"\n : type\n );\n return ReactElement(\n type,\n children,\n maybeKey,\n getOwner(),\n debugStack,\n debugTask\n );\n }\n function validateChildKeys(node) {\n isValidElement(node)\n ? node._store && (node._store.validated = 1)\n : \"object\" === typeof node &&\n null !== node &&\n node.$$typeof === REACT_LAZY_TYPE &&\n (\"fulfilled\" === node._payload.status\n ? isValidElement(node._payload.value) &&\n node._payload.value._store &&\n (node._payload.value._store.validated = 1)\n : node._store && (node._store.validated = 1));\n }\n function isValidElement(object) {\n return (\n \"object\" === typeof object &&\n null !== object &&\n object.$$typeof === REACT_ELEMENT_TYPE\n );\n }\n var React = require(\"react\"),\n REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\"),\n REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\n REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n REACT_ACTIVITY_TYPE = Symbol.for(\"react.activity\"),\n REACT_CLIENT_REFERENCE = Symbol.for(\"react.client.reference\"),\n ReactSharedInternals =\n React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,\n hasOwnProperty = Object.prototype.hasOwnProperty,\n isArrayImpl = Array.isArray,\n createTask = console.createTask\n ? console.createTask\n : function () {\n return null;\n };\n React = {\n react_stack_bottom_frame: function (callStackForError) {\n return callStackForError();\n }\n };\n var specialPropKeyWarningShown;\n var didWarnAboutElementRef = {};\n var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(\n React,\n UnknownOwner\n )();\n var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));\n var didWarnAboutKeySpread = {};\n exports.Fragment = REACT_FRAGMENT_TYPE;\n exports.jsx = function (type, config, maybeKey) {\n var trackActualOwner =\n 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;\n return jsxDEVImpl(\n type,\n config,\n maybeKey,\n !1,\n trackActualOwner\n ? Error(\"react-stack-top-frame\")\n : unknownOwnerDebugStack,\n trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n );\n };\n exports.jsxs = function (type, config, maybeKey) {\n var trackActualOwner =\n 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;\n return jsxDEVImpl(\n type,\n config,\n maybeKey,\n !0,\n trackActualOwner\n ? Error(\"react-stack-top-frame\")\n : unknownOwnerDebugStack,\n trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n );\n };\n })();\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","import { FaSpinner } from \"react-icons/fa6\";\nimport { IconBaseProps } from \"react-icons\";\n\ninterface SpinnerIconProps extends IconBaseProps {\n className?: string;\n}\n\nconst SpinnerIcon: React.FC<SpinnerIconProps> = ({ className, ...props }) => (\n <FaSpinner className={className} {...props} />\n);\n\nexport default SpinnerIcon;\n","import React, { useState, useEffect, useRef } from \"react\";\nimport SpinnerIcon from \"./SpinnerIcon\";\nimport styles from \"../Styles/ZestButton.module.css\";\n\n// --- Types ---\n\nexport type ZestVariant = \"standard\" | \"success\" | \"danger\";\nexport type ZestSize = \"sm\" | \"md\" | \"lg\";\n\n/**\n * Visual appearance of the button\n */\ninterface VisualOptions {\n variant?: ZestVariant;\n size?: ZestSize;\n fullWidth?: boolean;\n iconLeft?: React.ReactNode;\n iconRight?: React.ReactNode;\n}\n\n/**\n * Behavior during async operations\n */\ninterface BusyOptions {\n handleInternally?: boolean;\n preventRageClick?: boolean;\n minBusyDurationMs?: number;\n}\n\n/**\n * Behavior after a successful or failed click\n */\ninterface SuccessOptions {\n showCheckmark?: boolean;\n showFailIcon?: boolean;\n autoResetAfterMs?: number;\n}\n\ninterface ConfirmOptions {\n displayLabel: string;\n timeoutSecs: number;\n}\n\n/**\n * All supported props\n */\nexport interface ZestButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n visualOptions?: VisualOptions;\n busyOptions?: BusyOptions;\n successOptions?: SuccessOptions;\n confirmOptions?: ConfirmOptions;\n isDefault?: boolean;\n}\n\n// --- Components ---\n\nconst AnimatedCheckmark: React.FC = () => (\n <svg\n className={styles.animatedCheck}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"3\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"M5 13l4 4L19 7\" />\n </svg>\n);\n\nconst AnimatedX: React.FC = () => (\n <svg\n className={styles.animatedX}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"3\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"M6 6L18 18\" />\n <path d=\"M6 18L18 6\" />\n </svg>\n);\n\nconst ZestButton: React.FC<ZestButtonProps> = ({\n visualOptions,\n busyOptions,\n successOptions,\n isDefault = false,\n className = \"\",\n disabled,\n children,\n onClick,\n ...props\n}) => {\n const {\n variant = \"standard\",\n size = \"md\",\n fullWidth = false,\n iconLeft,\n iconRight,\n } = visualOptions || {};\n\n const {\n handleInternally = true,\n preventRageClick = true,\n minBusyDurationMs = 500,\n } = busyOptions || {};\n\n const {\n showCheckmark = true,\n showFailIcon = true,\n autoResetAfterMs = 2000,\n } = successOptions || {};\n\n const [internalBusy, setInternalBusy] = useState(false);\n const [wasSuccessful, setWasSuccessful] = useState(false);\n const [wasFailed, setWasFailed] = useState(false);\n const buttonRef = useRef<HTMLButtonElement>(null);\n\n const [currentChildren, setCurrentChildren] =\n useState<React.ReactNode>(children);\n const [awaitingConfirm, setAwaitingConfirm] = useState(false);\n\n // ✅ interval ref for confirm countdown\n const confirmIntervalRef = useRef<ReturnType<typeof setInterval> | null>(\n null\n );\n\n // keep children in sync when not in confirm mode\n useEffect(() => {\n if (!awaitingConfirm) {\n setCurrentChildren(children);\n }\n }, [children, awaitingConfirm]);\n\n const effectiveBusy =\n typeof props[\"aria-busy\"] === \"boolean\"\n ? Boolean(props[\"aria-busy\"])\n : handleInternally\n ? internalBusy\n : false;\n\n const isDisabled =\n disabled ||\n effectiveBusy ||\n (preventRageClick && (wasSuccessful || wasFailed));\n\n const handleClick = async (e: React.MouseEvent<HTMLButtonElement>) => {\n if (preventRageClick && internalBusy) return;\n\n if (handleInternally && typeof onClick === \"function\") {\n try {\n setWasSuccessful(false);\n setWasFailed(false);\n setInternalBusy(true);\n const startTime = Date.now();\n\n await onClick(e);\n\n const elapsed = Date.now() - startTime;\n const remaining = Math.max(minBusyDurationMs - elapsed, 0);\n if (remaining > 0) {\n await new Promise((resolve) => setTimeout(resolve, remaining));\n }\n\n if (showCheckmark) setWasSuccessful(true);\n } catch (err) {\n console.error(err);\n if (showFailIcon) setWasFailed(true);\n } finally {\n setInternalBusy(false);\n }\n } else if (onClick) {\n onClick(e);\n }\n };\n\n // auto-reset success/failure state\n useEffect(() => {\n if ((wasSuccessful || wasFailed) && autoResetAfterMs) {\n const timeout = setTimeout(() => {\n setWasSuccessful(false);\n setWasFailed(false);\n }, autoResetAfterMs);\n return () => clearTimeout(timeout);\n }\n }, [wasSuccessful, wasFailed, autoResetAfterMs]);\n\n // Enter key handler if isDefault\n useEffect(() => {\n if (!isDefault || isDisabled) return;\n const listener = (e: KeyboardEvent) => {\n const target = e.target as HTMLElement;\n if (\n e.key === \"Enter\" &&\n !e.repeat &&\n !e.defaultPrevented &&\n !(target instanceof HTMLTextAreaElement)\n ) {\n e.preventDefault();\n buttonRef.current?.click();\n }\n };\n document.addEventListener(\"keydown\", listener);\n return () => document.removeEventListener(\"keydown\", listener);\n }, [isDefault, isDisabled]);\n\n const stopWaiting = () => {\n if (confirmIntervalRef.current) {\n clearInterval(confirmIntervalRef.current);\n confirmIntervalRef.current = null;\n }\n setCurrentChildren(children);\n setAwaitingConfirm(false);\n };\n\n const handleConfirmClick = (e: React.MouseEvent<HTMLButtonElement>) => {\n if (!props.confirmOptions) {\n return handleClick(e);\n }\n\n if (awaitingConfirm) {\n stopWaiting();\n return handleClick(e);\n }\n\n const { displayLabel, timeoutSecs } = props.confirmOptions;\n const startTime = Date.now();\n setAwaitingConfirm(true);\n\n confirmIntervalRef.current = setInterval(() => {\n const elapsed = Date.now() - startTime;\n if (elapsed >= timeoutSecs * 1000) {\n stopWaiting();\n } else {\n const elapsedSecs = Math.floor(elapsed / 1000);\n const timeRemaining = timeoutSecs - elapsedSecs;\n setCurrentChildren(`${displayLabel} (${timeRemaining}s)`);\n }\n }, 100); // ✅ update once per second\n };\n\n // cleanup on unmount\n useEffect(() => {\n return () => {\n if (confirmIntervalRef.current) {\n clearInterval(confirmIntervalRef.current);\n }\n };\n }, []);\n\n const renderLeftIcon = () => {\n if (effectiveBusy) {\n return (\n <span className={`${styles.icon} ${styles.fadeIn}`}>\n <SpinnerIcon className={styles.spinner} size={18} />\n </span>\n );\n } else if (wasSuccessful && showCheckmark) {\n return (\n <span className={`${styles.icon} ${styles.fadeIn}`}>\n <AnimatedCheckmark />\n </span>\n );\n } else if (wasFailed && showFailIcon) {\n return (\n <span className={`${styles.icon} ${styles.fadeIn} ${styles.failShake}`}>\n <AnimatedX />\n </span>\n );\n } else if (iconLeft) {\n return <span className={styles.icon}>{iconLeft}</span>;\n }\n return null;\n };\n\n return (\n <button\n ref={buttonRef}\n className={[\n styles.button,\n styles[variant],\n styles[size],\n fullWidth ? styles.fullWidth : \"\",\n isDisabled ? styles.disabled : \"\",\n wasFailed ? styles.failGlow : \"\",\n className,\n ].join(\" \")}\n disabled={isDisabled}\n aria-busy={effectiveBusy}\n onClick={handleConfirmClick}\n {...props}\n >\n <span className={styles.inner}>\n {renderLeftIcon()}\n <span className={styles.content}>\n {currentChildren}\n {iconRight && <span className={styles.icon}>{iconRight}</span>}\n </span>\n </span>\n </button>\n );\n};\n\nexport default ZestButton;\n"],"names":["jsxRuntimeModule","require$$0","require$$1","_jsx","_jsxs"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAWA,CAAA,IAAI,kBAAkB,GAAG,MAAM,CAAC,GAAG,CAAC,4BAA4B,CAAC;AACjE,GAAE,mBAAmB,GAAG,MAAM,CAAC,GAAG,CAAC,gBAAgB,CAAC;AACpD,CAAA,SAAS,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE;GACvC,IAAI,GAAG,GAAG,IAAI;GACd,MAAM,KAAK,QAAQ,KAAK,GAAG,GAAG,EAAE,GAAG,QAAQ,CAAC;AAC9C,GAAE,MAAM,KAAK,MAAM,CAAC,GAAG,KAAK,GAAG,GAAG,EAAE,GAAG,MAAM,CAAC,GAAG,CAAC;AAClD,GAAE,IAAI,KAAK,IAAI,MAAM,EAAE;KACnB,QAAQ,GAAG,EAAE;AACjB,KAAI,KAAK,IAAI,QAAQ,IAAI,MAAM;AAC/B,OAAM,KAAK,KAAK,QAAQ,KAAK,QAAQ,CAAC,QAAQ,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;GACnE,CAAG,MAAM,QAAQ,GAAG,MAAM;AAC1B,GAAE,MAAM,GAAG,QAAQ,CAAC,GAAG;AACvB,GAAE,OAAO;KACL,QAAQ,EAAE,kBAAkB;KAC5B,IAAI,EAAE,IAAI;KACV,GAAG,EAAE,GAAG;KACR,GAAG,EAAE,MAAM,KAAK,MAAM,GAAG,MAAM,GAAG,IAAI;AAC1C,KAAI,KAAK,EAAE;IACR;AACH,CAAA;AACA,CAAA,0BAAA,CAAA,QAAgB,GAAG,mBAAmB;AACtC,CAAA,0BAAA,CAAA,GAAW,GAAG,OAAO;AACrB,CAAA,0BAAA,CAAA,IAAY,G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