@rubenpazch/date-input 2.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,1180 @@
1
+ import * as require$$0 from 'react';
2
+ import require$$0__default, { useState, useRef, useEffect } from 'react';
3
+
4
+ var jsxRuntime$1 = {exports: {}};
5
+
6
+ var reactJsxRuntime_production$1 = {};
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$1;
19
+
20
+ function requireReactJsxRuntime_production$1 () {
21
+ if (hasRequiredReactJsxRuntime_production$1) return reactJsxRuntime_production$1;
22
+ hasRequiredReactJsxRuntime_production$1 = 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$1.Fragment = REACT_FRAGMENT_TYPE;
44
+ reactJsxRuntime_production$1.jsx = jsxProd;
45
+ reactJsxRuntime_production$1.jsxs = jsxProd;
46
+ return reactJsxRuntime_production$1;
47
+ }
48
+
49
+ var reactJsxRuntime_development$1 = {};
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$1;
62
+
63
+ function requireReactJsxRuntime_development$1 () {
64
+ if (hasRequiredReactJsxRuntime_development$1) return reactJsxRuntime_development$1;
65
+ hasRequiredReactJsxRuntime_development$1 = 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__default,
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$1.Fragment = REACT_FRAGMENT_TYPE;
378
+ reactJsxRuntime_development$1.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$1.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$1;
408
+ }
409
+
410
+ var hasRequiredJsxRuntime$1;
411
+
412
+ function requireJsxRuntime$1 () {
413
+ if (hasRequiredJsxRuntime$1) return jsxRuntime$1.exports;
414
+ hasRequiredJsxRuntime$1 = 1;
415
+
416
+ if (process.env.NODE_ENV === 'production') {
417
+ jsxRuntime$1.exports = requireReactJsxRuntime_production$1();
418
+ } else {
419
+ jsxRuntime$1.exports = requireReactJsxRuntime_development$1();
420
+ }
421
+ return jsxRuntime$1.exports;
422
+ }
423
+
424
+ var jsxRuntimeExports$1 = requireJsxRuntime$1();
425
+
426
+ var e,o$1={exports:{}},t$1={};var r$1,a$1,l$1={};
427
+ /**
428
+ * @license React
429
+ * react-jsx-runtime.development.js
430
+ *
431
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
432
+ *
433
+ * This source code is licensed under the MIT license found in the
434
+ * LICENSE file in the root directory of this source tree.
435
+ */function i$1(){return r$1||(r$1=1,"production"!==process.env.NODE_ENV&&function(){function e(n){if(null==n)return null;if("function"==typeof n)return n.$$typeof===O?null:n.displayName||n.name||null;if("string"==typeof n)return n;switch(n){case p:return "Fragment";case y:return "Profiler";case b:return "StrictMode";case B:return "Suspense";case v:return "SuspenseList";case E:return "Activity"}if("object"==typeof n)switch("number"==typeof n.tag&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),n.$$typeof){case f:return "Portal";case h:return n.displayName||"Context";case g:return (n._context.displayName||"Context")+".Consumer";case x:var o=n.render;return (n=n.displayName)||(n=""!==(n=o.displayName||o.name||"")?"ForwardRef("+n+")":"ForwardRef"),n;case k:return null!==(o=n.displayName||null)?o:e(n.type)||"Memo";case S:o=n._payload,n=n._init;try{return e(n(o))}catch(n){}}return null}function o(n){return ""+n}function t(n){try{o(n);var e=!1;}catch(n){e=true;}if(e){var t=(e=console).error,r="function"==typeof Symbol&&Symbol.toStringTag&&n[Symbol.toStringTag]||n.constructor.name||"Object";return t.call(e,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",r),o(n)}}function r(n){if(n===p)return "<>";if("object"==typeof n&&null!==n&&n.$$typeof===S)return "<...>";try{var o=e(n);return o?"<"+o+">":"<...>"}catch(n){return "<...>"}}function a(){return Error("react-stack-top-frame")}function i(){var n=e(this.type);return P[n]||(P[n]=true,console.error("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.")),void 0!==(n=this.props.ref)?n:null}function u(n,o,r,a,l,u){var c,_=o.children;if(void 0!==_)if(a)if(j(_)){for(a=0;a<_.length;a++)d(_[a]);Object.freeze&&Object.freeze(_);}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else d(_);if(N.call(o,"key")){_=e(n);var f=Object.keys(o).filter(function(n){return "key"!==n});a=0<f.length?"{key: someKey, "+f.join(": ..., ")+": ...}":"{key: someKey}",z[_+a]||(f=0<f.length?"{"+f.join(": ..., ")+": ...}":"{}",console.error('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} />',a,_,f,_),z[_+a]=true);}if(_=null,void 0!==r&&(t(r),_=""+r),function(n){if(N.call(n,"key")){var e=Object.getOwnPropertyDescriptor(n,"key").get;if(e&&e.isReactWarning)return false}return void 0!==n.key}(o)&&(t(o.key),_=""+o.key),"key"in o)for(var p in r={},o)"key"!==p&&(r[p]=o[p]);else r=o;return _&&function(n,e){function o(){s||(s=true,console.error("%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)",e));}o.isReactWarning=true,Object.defineProperty(n,"key",{get:o,configurable:true});}(r,"function"==typeof n?n.displayName||n.name||"Unknown":n),function(n,e,o,t,r,a){var l=o.ref;return n={$$typeof:m,type:n,key:e,props:o,_owner:t},null!==(void 0!==l?l:null)?Object.defineProperty(n,"ref",{enumerable:false,get:i}):Object.defineProperty(n,"ref",{enumerable:false,value:null}),n._store={},Object.defineProperty(n._store,"validated",{configurable:false,enumerable:false,writable:true,value:0}),Object.defineProperty(n,"_debugInfo",{configurable:false,enumerable:false,writable:true,value:null}),Object.defineProperty(n,"_debugStack",{configurable:false,enumerable:false,writable:true,value:r}),Object.defineProperty(n,"_debugTask",{configurable:false,enumerable:false,writable:true,value:a}),Object.freeze&&(Object.freeze(n.props),Object.freeze(n)),n}(n,_,r,null===(c=w.A)?null:c.getOwner(),l,u)}function d(n){c(n)?n._store&&(n._store.validated=1):"object"==typeof n&&null!==n&&n.$$typeof===S&&("fulfilled"===n._payload.status?c(n._payload.value)&&n._payload.value._store&&(n._payload.value._store.validated=1):n._store&&(n._store.validated=1));}function c(n){return "object"==typeof n&&null!==n&&n.$$typeof===m}var s,_=require$$0__default,m=Symbol.for("react.transitional.element"),f=Symbol.for("react.portal"),p=Symbol.for("react.fragment"),b=Symbol.for("react.strict_mode"),y=Symbol.for("react.profiler"),g=Symbol.for("react.consumer"),h=Symbol.for("react.context"),x=Symbol.for("react.forward_ref"),B=Symbol.for("react.suspense"),v=Symbol.for("react.suspense_list"),k=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),E=Symbol.for("react.activity"),O=Symbol.for("react.client.reference"),w=_.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,N=Object.prototype.hasOwnProperty,j=Array.isArray,I=console.createTask?console.createTask:function(){return null},P={},W=(_={react_stack_bottom_frame:function(n){return n()}}).react_stack_bottom_frame.bind(_,a)(),C=I(r(a)),z={};l$1.Fragment=p,l$1.jsx=function(n,e,o){var t=1e4>w.recentlyCreatedOwnerStacks++;return u(n,e,o,false,t?Error("react-stack-top-frame"):W,t?I(r(n)):C)},l$1.jsxs=function(n,e,o){var t=1e4>w.recentlyCreatedOwnerStacks++;return u(n,e,o,true,t?Error("react-stack-top-frame"):W,t?I(r(n)):C)};}()),l$1}var u=(a$1||(a$1=1,"production"===process.env.NODE_ENV?o$1.exports=function(){if(e)return t$1;e=1;var n=Symbol.for("react.transitional.element"),o=Symbol.for("react.fragment");function r(e,o,t){var r=null;if(void 0!==t&&(r=""+t),void 0!==o.key&&(r=""+o.key),"key"in o)for(var a in t={},o)"key"!==a&&(t[a]=o[a]);else t=o;return o=t.ref,{$$typeof:n,type:e,key:r,ref:void 0!==o?o:null,props:t}}return t$1.Fragment=o,t$1.jsx=r,t$1.jsxs=r,t$1}():o$1.exports=i$1()),o$1.exports);var d={root:"Button-module_root__CbGH4",sizeSmall:"Button-module_sizeSmall__cwk1u",sizeMedium:"Button-module_sizeMedium__WI9SU",sizeLarge:"Button-module_sizeLarge__DCsOs",disabled:"Button-module_disabled__JgtZl",fullWidth:"Button-module_fullWidth__dOsPn",noElevation:"Button-module_noElevation__I6-zN",loading:"Button-module_loading__fZbPs",loadingWrapper:"Button-module_loadingWrapper__NrZp3",content:"Button-module_content__xCYa9",contentHidden:"Button-module_contentHidden__lJy-Z",startIcon:"Button-module_startIcon__x3190",endIcon:"Button-module_endIcon__9vUum",text:"Button-module_text__5mE0X",textPrimary:"Button-module_textPrimary__vfnk5",textSecondary:"Button-module_textSecondary__a3EiY",textSuccess:"Button-module_textSuccess__F84Hf",textError:"Button-module_textError__47t2-",textWarning:"Button-module_textWarning__sUoJ4",textInfo:"Button-module_textInfo__eHIQf",contained:"Button-module_contained__ihcEr",containedPrimary:"Button-module_containedPrimary__QABiB",containedSecondary:"Button-module_containedSecondary__Amyuq",containedSuccess:"Button-module_containedSuccess__klgok",containedError:"Button-module_containedError__WOxWG",containedWarning:"Button-module_containedWarning__dFc-N",containedInfo:"Button-module_containedInfo__PLgZO",outlined:"Button-module_outlined__3QTXD",outlinedPrimary:"Button-module_outlinedPrimary__fKrCf",outlinedSecondary:"Button-module_outlinedSecondary__n7OpX",outlinedSuccess:"Button-module_outlinedSuccess__Y2Plg",outlinedError:"Button-module_outlinedError__6NJ-J",outlinedWarning:"Button-module_outlinedWarning__aXlYk",outlinedInfo:"Button-module_outlinedInfo__hpDkF",spinner:"Button-module_spinner__vwfOT",spin:"Button-module_spin__fjXhP",spinnerCircle:"Button-module_spinnerCircle__7vRpf",spinnerDash:"Button-module_spinnerDash__y8Dii"};!function(n,e){ void 0===e&&(e={});var o=e.insertAt;if("undefined"!=typeof document){var t=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===o&&t.firstChild?t.insertBefore(r,t.firstChild):t.appendChild(r),r.styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n));}}(".Button-module_root__CbGH4 {\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 0.5rem;\n font-family: inherit;\n font-weight: 500;\n border: 1px solid transparent;\n line-height: 1.75;\n white-space: nowrap;\n background: transparent;\n color: inherit;\n cursor: pointer;\n border-radius: 0.25rem;\n transition:\n background-color 250ms cubic-bezier(0.4, 0, 0.2, 1),\n color 250ms cubic-bezier(0.4, 0, 0.2, 1),\n border-color 250ms cubic-bezier(0.4, 0, 0.2, 1),\n box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);\n}\n\n.Button-module_root__CbGH4:focus-visible {\n outline: none;\n box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.5);\n}\n\n/* Size variants */\n.Button-module_sizeSmall__cwk1u {\n padding: 0.25rem 0.625rem;\n font-size: 0.8125rem;\n min-height: 1.875rem;\n}\n\n.Button-module_sizeMedium__WI9SU {\n padding: 0.375rem 1rem;\n font-size: 0.875rem;\n min-height: 2.25rem;\n}\n\n.Button-module_sizeLarge__DCsOs {\n padding: 0.5rem 1.375rem;\n font-size: 0.9375rem;\n min-height: 2.625rem;\n}\n\n/* Disabled state */\n.Button-module_disabled__JgtZl {\n background: rgba(0, 0, 0, 0.12);\n color: rgba(0, 0, 0, 0.26);\n border-color: transparent;\n cursor: not-allowed;\n pointer-events: none;\n box-shadow: none;\n}\n\n/* Full width */\n.Button-module_fullWidth__dOsPn {\n width: 100%;\n}\n\n/* No elevation */\n.Button-module_noElevation__I6-zN {\n box-shadow: none !important;\n}\n\n/* Loading state */\n.Button-module_loading__fZbPs {\n pointer-events: none;\n}\n\n.Button-module_loadingWrapper__NrZp3 {\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.Button-module_content__xCYa9 {\n display: inline-flex;\n align-items: inherit;\n justify-content: inherit;\n gap: 0.5rem;\n}\n\n.Button-module_contentHidden__lJy-Z {\n opacity: 0;\n}\n\n.Button-module_startIcon__x3190,\n.Button-module_endIcon__9vUum {\n display: inherit;\n font-size: 1.25em;\n line-height: 1;\n}\n\n/* Variant: text */\n.Button-module_text__5mE0X {\n padding: 0.375rem 0.5rem;\n}\n\n.Button-module_text__5mE0X:hover {\n background-color: rgba(0, 0, 0, 0.04);\n}\n\n/* ============================================\n COLOR STYLES - TEXT VARIANT\n ============================================ */\n\n/* Primary */\n.Button-module_textPrimary__vfnk5 {\n color: #1976d2;\n}\n.Button-module_textPrimary__vfnk5:hover {\n background-color: rgba(25, 118, 210, 0.04);\n}\n\n/* Secondary */\n.Button-module_textSecondary__a3EiY {\n color: #9c27b0;\n}\n.Button-module_textSecondary__a3EiY:hover {\n background-color: rgba(156, 39, 176, 0.04);\n}\n\n/* Success */\n.Button-module_textSuccess__F84Hf {\n color: #2e7d32;\n}\n.Button-module_textSuccess__F84Hf:hover {\n background-color: rgba(46, 125, 50, 0.04);\n}\n\n/* Error */\n.Button-module_textError__47t2- {\n color: #d32f2f;\n}\n.Button-module_textError__47t2-:hover {\n background-color: rgba(211, 47, 47, 0.04);\n}\n\n/* Warning */\n.Button-module_textWarning__sUoJ4 {\n color: #ed6c02;\n}\n.Button-module_textWarning__sUoJ4:hover {\n background-color: rgba(237, 108, 2, 0.04);\n}\n\n/* Info */\n.Button-module_textInfo__eHIQf {\n color: #0288d1;\n}\n.Button-module_textInfo__eHIQf:hover {\n background-color: rgba(2, 136, 209, 0.04);\n}\n\n/* ============================================\n COLOR STYLES - CONTAINED VARIANT\n ============================================ */\n\n/* Contained base */\n.Button-module_contained__ihcEr {\n box-shadow:\n 0px 3px 1px -2px rgba(0, 0, 0, 0.2),\n 0px 2px 2px 0px rgba(0, 0, 0, 0.14),\n 0px 1px 5px 0px rgba(0, 0, 0, 0.12);\n}\n\n.Button-module_contained__ihcEr:hover {\n box-shadow:\n 0px 2px 4px -1px rgba(0, 0, 0, 0.2),\n 0px 4px 5px 0px rgba(0, 0, 0, 0.14),\n 0px 1px 10px 0px rgba(0, 0, 0, 0.12);\n}\n\n.Button-module_contained__ihcEr:active {\n box-shadow:\n 0px 5px 5px -3px rgba(0, 0, 0, 0.2),\n 0px 8px 10px 1px rgba(0, 0, 0, 0.14),\n 0px 3px 14px 2px rgba(0, 0, 0, 0.12);\n}\n\n/* Primary */\n.Button-module_containedPrimary__QABiB {\n background-color: #1976d2;\n color: #fff;\n}\n.Button-module_containedPrimary__QABiB:hover {\n background-color: #1565c0;\n}\n\n/* Secondary */\n.Button-module_containedSecondary__Amyuq {\n background-color: #9c27b0;\n color: #fff;\n}\n.Button-module_containedSecondary__Amyuq:hover {\n background-color: #7b1fa2;\n}\n\n/* Success */\n.Button-module_containedSuccess__klgok {\n background-color: #2e7d32;\n color: #fff;\n}\n.Button-module_containedSuccess__klgok:hover {\n background-color: #1b5e20;\n}\n\n/* Error */\n.Button-module_containedError__WOxWG {\n background-color: #d32f2f;\n color: #fff;\n}\n.Button-module_containedError__WOxWG:hover {\n background-color: #c62828;\n}\n\n/* Warning */\n.Button-module_containedWarning__dFc-N {\n background-color: #ed6c02;\n color: #fff;\n}\n.Button-module_containedWarning__dFc-N:hover {\n background-color: #e65100;\n}\n\n/* Info */\n.Button-module_containedInfo__PLgZO {\n background-color: #0288d1;\n color: #fff;\n}\n.Button-module_containedInfo__PLgZO:hover {\n background-color: #01579b;\n}\n\n/* ============================================\n COLOR STYLES - OUTLINED VARIANT\n ============================================ */\n\n/* Outlined base */\n.Button-module_outlined__3QTXD {\n border: 1px solid rgba(0, 0, 0, 0.23);\n}\n\n/* Primary */\n.Button-module_outlinedPrimary__fKrCf {\n color: #1976d2;\n border-color: rgba(25, 118, 210, 0.5);\n}\n.Button-module_outlinedPrimary__fKrCf:hover {\n background-color: rgba(25, 118, 210, 0.04);\n border-color: #1976d2;\n}\n\n/* Secondary */\n.Button-module_outlinedSecondary__n7OpX {\n color: #9c27b0;\n border-color: rgba(156, 39, 176, 0.5);\n}\n.Button-module_outlinedSecondary__n7OpX:hover {\n background-color: rgba(156, 39, 176, 0.04);\n border-color: #9c27b0;\n}\n\n/* Success */\n.Button-module_outlinedSuccess__Y2Plg {\n color: #2e7d32;\n border-color: rgba(46, 125, 50, 0.5);\n}\n.Button-module_outlinedSuccess__Y2Plg:hover {\n background-color: rgba(46, 125, 50, 0.04);\n border-color: #2e7d32;\n}\n\n/* Error */\n.Button-module_outlinedError__6NJ-J {\n color: #d32f2f;\n border-color: rgba(211, 47, 47, 0.5);\n}\n.Button-module_outlinedError__6NJ-J:hover {\n background-color: rgba(211, 47, 47, 0.04);\n border-color: #d32f2f;\n}\n\n/* Warning */\n.Button-module_outlinedWarning__aXlYk {\n color: #ed6c02;\n border-color: rgba(237, 108, 2, 0.5);\n}\n.Button-module_outlinedWarning__aXlYk:hover {\n background-color: rgba(237, 108, 2, 0.04);\n border-color: #ed6c02;\n}\n\n/* Info */\n.Button-module_outlinedInfo__hpDkF {\n color: #0288d1;\n border-color: rgba(2, 136, 209, 0.5);\n}\n.Button-module_outlinedInfo__hpDkF:hover {\n background-color: rgba(2, 136, 209, 0.04);\n border-color: #0288d1;\n}\n\n/* Spinner animation */\n.Button-module_spinner__vwfOT {\n display: inline-flex;\n animation: Button-module_spin__fjXhP 0.8s linear infinite;\n}\n\n.Button-module_spinnerCircle__7vRpf {\n stroke-dasharray: 50;\n stroke-dashoffset: 25;\n animation: Button-module_spinnerDash__y8Dii 1.5s ease-in-out infinite;\n}\n\n@keyframes Button-module_spin__fjXhP {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n}\n\n@keyframes Button-module_spinnerDash__y8Dii {\n 0% {\n stroke-dasharray: 1, 150;\n stroke-dashoffset: 0;\n }\n 50% {\n stroke-dasharray: 90, 150;\n stroke-dashoffset: -35;\n }\n 100% {\n stroke-dasharray: 90, 150;\n stroke-dashoffset: -124;\n }\n}\n");const c$1=(...n)=>n.filter(Boolean).join(" "),s={small:d.sizeSmall,medium:d.sizeMedium,large:d.sizeLarge},_=({size:n})=>{const e={small:14,medium:18,large:22}[n];return u.jsx("svg",{className:d.spinner,width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:u.jsx("circle",{className:d.spinnerCircle,cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round"})})},m=require$$0__default.forwardRef((n,e)=>{const{variant:o="text",color:t="primary",size:r="medium",component:a,className:l,loading:i=false,startIcon:m,endIcon:f,fullWidth:p=false,disableElevation:b=false,children:y,...g}=n,h="disabled"in n&&n.disabled,x="href"in n?n.href:void 0,B=a||(x?"a":"button"),v=h||i,k=c$1(d.root,d[o],((n,e)=>{const o=`${e}${n.charAt(0).toUpperCase()}${n.slice(1)}`;return d[o]||""})(t,o),s[r],v?d.disabled:void 0,p?d.fullWidth:void 0,b?d.noElevation:void 0,i?d.loading:void 0,l),S="button"===B?{disabled:v}:{},E="a"===B?{href:x,"aria-disabled":v}:{};return u.jsxs(B,{ref:e,className:k,...S,...E,...g,children:[i&&u.jsx("span",{className:d.loadingWrapper,children:u.jsx(_,{size:r})}),u.jsxs("span",{className:c$1(d.content,i?d.contentHidden:void 0),children:[m&&u.jsx("span",{className:d.startIcon,children:m}),y,f&&u.jsx("span",{className:d.endIcon,children:f})]})]})});m.displayName="Button";
436
+
437
+ var jsxRuntime = {exports: {}};
438
+
439
+ var reactJsxRuntime_production = {};
440
+
441
+ /**
442
+ * @license React
443
+ * react-jsx-runtime.production.js
444
+ *
445
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
446
+ *
447
+ * This source code is licensed under the MIT license found in the
448
+ * LICENSE file in the root directory of this source tree.
449
+ */
450
+
451
+ var hasRequiredReactJsxRuntime_production;
452
+
453
+ function requireReactJsxRuntime_production () {
454
+ if (hasRequiredReactJsxRuntime_production) return reactJsxRuntime_production;
455
+ hasRequiredReactJsxRuntime_production = 1;
456
+ var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
457
+ REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
458
+ function jsxProd(type, config, maybeKey) {
459
+ var key = null;
460
+ void 0 !== maybeKey && (key = "" + maybeKey);
461
+ void 0 !== config.key && (key = "" + config.key);
462
+ if ("key" in config) {
463
+ maybeKey = {};
464
+ for (var propName in config)
465
+ "key" !== propName && (maybeKey[propName] = config[propName]);
466
+ } else maybeKey = config;
467
+ config = maybeKey.ref;
468
+ return {
469
+ $$typeof: REACT_ELEMENT_TYPE,
470
+ type: type,
471
+ key: key,
472
+ ref: void 0 !== config ? config : null,
473
+ props: maybeKey
474
+ };
475
+ }
476
+ reactJsxRuntime_production.Fragment = REACT_FRAGMENT_TYPE;
477
+ reactJsxRuntime_production.jsx = jsxProd;
478
+ reactJsxRuntime_production.jsxs = jsxProd;
479
+ return reactJsxRuntime_production;
480
+ }
481
+
482
+ var reactJsxRuntime_development = {};
483
+
484
+ /**
485
+ * @license React
486
+ * react-jsx-runtime.development.js
487
+ *
488
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
489
+ *
490
+ * This source code is licensed under the MIT license found in the
491
+ * LICENSE file in the root directory of this source tree.
492
+ */
493
+
494
+ var hasRequiredReactJsxRuntime_development;
495
+
496
+ function requireReactJsxRuntime_development () {
497
+ if (hasRequiredReactJsxRuntime_development) return reactJsxRuntime_development;
498
+ hasRequiredReactJsxRuntime_development = 1;
499
+ "production" !== process.env.NODE_ENV &&
500
+ (function () {
501
+ function getComponentNameFromType(type) {
502
+ if (null == type) return null;
503
+ if ("function" === typeof type)
504
+ return type.$$typeof === REACT_CLIENT_REFERENCE
505
+ ? null
506
+ : type.displayName || type.name || null;
507
+ if ("string" === typeof type) return type;
508
+ switch (type) {
509
+ case REACT_FRAGMENT_TYPE:
510
+ return "Fragment";
511
+ case REACT_PROFILER_TYPE:
512
+ return "Profiler";
513
+ case REACT_STRICT_MODE_TYPE:
514
+ return "StrictMode";
515
+ case REACT_SUSPENSE_TYPE:
516
+ return "Suspense";
517
+ case REACT_SUSPENSE_LIST_TYPE:
518
+ return "SuspenseList";
519
+ case REACT_ACTIVITY_TYPE:
520
+ return "Activity";
521
+ }
522
+ if ("object" === typeof type)
523
+ switch (
524
+ ("number" === typeof type.tag &&
525
+ console.error(
526
+ "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
527
+ ),
528
+ type.$$typeof)
529
+ ) {
530
+ case REACT_PORTAL_TYPE:
531
+ return "Portal";
532
+ case REACT_CONTEXT_TYPE:
533
+ return type.displayName || "Context";
534
+ case REACT_CONSUMER_TYPE:
535
+ return (type._context.displayName || "Context") + ".Consumer";
536
+ case REACT_FORWARD_REF_TYPE:
537
+ var innerType = type.render;
538
+ type = type.displayName;
539
+ type ||
540
+ ((type = innerType.displayName || innerType.name || ""),
541
+ (type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef"));
542
+ return type;
543
+ case REACT_MEMO_TYPE:
544
+ return (
545
+ (innerType = type.displayName || null),
546
+ null !== innerType
547
+ ? innerType
548
+ : getComponentNameFromType(type.type) || "Memo"
549
+ );
550
+ case REACT_LAZY_TYPE:
551
+ innerType = type._payload;
552
+ type = type._init;
553
+ try {
554
+ return getComponentNameFromType(type(innerType));
555
+ } catch (x) {}
556
+ }
557
+ return null;
558
+ }
559
+ function testStringCoercion(value) {
560
+ return "" + value;
561
+ }
562
+ function checkKeyStringCoercion(value) {
563
+ try {
564
+ testStringCoercion(value);
565
+ var JSCompiler_inline_result = !1;
566
+ } catch (e) {
567
+ JSCompiler_inline_result = true;
568
+ }
569
+ if (JSCompiler_inline_result) {
570
+ JSCompiler_inline_result = console;
571
+ var JSCompiler_temp_const = JSCompiler_inline_result.error;
572
+ var JSCompiler_inline_result$jscomp$0 =
573
+ ("function" === typeof Symbol &&
574
+ Symbol.toStringTag &&
575
+ value[Symbol.toStringTag]) ||
576
+ value.constructor.name ||
577
+ "Object";
578
+ JSCompiler_temp_const.call(
579
+ JSCompiler_inline_result,
580
+ "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
581
+ JSCompiler_inline_result$jscomp$0
582
+ );
583
+ return testStringCoercion(value);
584
+ }
585
+ }
586
+ function getTaskName(type) {
587
+ if (type === REACT_FRAGMENT_TYPE) return "<>";
588
+ if (
589
+ "object" === typeof type &&
590
+ null !== type &&
591
+ type.$$typeof === REACT_LAZY_TYPE
592
+ )
593
+ return "<...>";
594
+ try {
595
+ var name = getComponentNameFromType(type);
596
+ return name ? "<" + name + ">" : "<...>";
597
+ } catch (x) {
598
+ return "<...>";
599
+ }
600
+ }
601
+ function getOwner() {
602
+ var dispatcher = ReactSharedInternals.A;
603
+ return null === dispatcher ? null : dispatcher.getOwner();
604
+ }
605
+ function UnknownOwner() {
606
+ return Error("react-stack-top-frame");
607
+ }
608
+ function hasValidKey(config) {
609
+ if (hasOwnProperty.call(config, "key")) {
610
+ var getter = Object.getOwnPropertyDescriptor(config, "key").get;
611
+ if (getter && getter.isReactWarning) return false;
612
+ }
613
+ return void 0 !== config.key;
614
+ }
615
+ function defineKeyPropWarningGetter(props, displayName) {
616
+ function warnAboutAccessingKey() {
617
+ specialPropKeyWarningShown ||
618
+ ((specialPropKeyWarningShown = true),
619
+ console.error(
620
+ "%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)",
621
+ displayName
622
+ ));
623
+ }
624
+ warnAboutAccessingKey.isReactWarning = true;
625
+ Object.defineProperty(props, "key", {
626
+ get: warnAboutAccessingKey,
627
+ configurable: true
628
+ });
629
+ }
630
+ function elementRefGetterWithDeprecationWarning() {
631
+ var componentName = getComponentNameFromType(this.type);
632
+ didWarnAboutElementRef[componentName] ||
633
+ ((didWarnAboutElementRef[componentName] = true),
634
+ console.error(
635
+ "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."
636
+ ));
637
+ componentName = this.props.ref;
638
+ return void 0 !== componentName ? componentName : null;
639
+ }
640
+ function ReactElement(type, key, props, owner, debugStack, debugTask) {
641
+ var refProp = props.ref;
642
+ type = {
643
+ $$typeof: REACT_ELEMENT_TYPE,
644
+ type: type,
645
+ key: key,
646
+ props: props,
647
+ _owner: owner
648
+ };
649
+ null !== (void 0 !== refProp ? refProp : null)
650
+ ? Object.defineProperty(type, "ref", {
651
+ enumerable: false,
652
+ get: elementRefGetterWithDeprecationWarning
653
+ })
654
+ : Object.defineProperty(type, "ref", { enumerable: false, value: null });
655
+ type._store = {};
656
+ Object.defineProperty(type._store, "validated", {
657
+ configurable: false,
658
+ enumerable: false,
659
+ writable: true,
660
+ value: 0
661
+ });
662
+ Object.defineProperty(type, "_debugInfo", {
663
+ configurable: false,
664
+ enumerable: false,
665
+ writable: true,
666
+ value: null
667
+ });
668
+ Object.defineProperty(type, "_debugStack", {
669
+ configurable: false,
670
+ enumerable: false,
671
+ writable: true,
672
+ value: debugStack
673
+ });
674
+ Object.defineProperty(type, "_debugTask", {
675
+ configurable: false,
676
+ enumerable: false,
677
+ writable: true,
678
+ value: debugTask
679
+ });
680
+ Object.freeze && (Object.freeze(type.props), Object.freeze(type));
681
+ return type;
682
+ }
683
+ function jsxDEVImpl(
684
+ type,
685
+ config,
686
+ maybeKey,
687
+ isStaticChildren,
688
+ debugStack,
689
+ debugTask
690
+ ) {
691
+ var children = config.children;
692
+ if (void 0 !== children)
693
+ if (isStaticChildren)
694
+ if (isArrayImpl(children)) {
695
+ for (
696
+ isStaticChildren = 0;
697
+ isStaticChildren < children.length;
698
+ isStaticChildren++
699
+ )
700
+ validateChildKeys(children[isStaticChildren]);
701
+ Object.freeze && Object.freeze(children);
702
+ } else
703
+ console.error(
704
+ "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
705
+ );
706
+ else validateChildKeys(children);
707
+ if (hasOwnProperty.call(config, "key")) {
708
+ children = getComponentNameFromType(type);
709
+ var keys = Object.keys(config).filter(function (k) {
710
+ return "key" !== k;
711
+ });
712
+ isStaticChildren =
713
+ 0 < keys.length
714
+ ? "{key: someKey, " + keys.join(": ..., ") + ": ...}"
715
+ : "{key: someKey}";
716
+ didWarnAboutKeySpread[children + isStaticChildren] ||
717
+ ((keys =
718
+ 0 < keys.length ? "{" + keys.join(": ..., ") + ": ...}" : "{}"),
719
+ console.error(
720
+ '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} />',
721
+ isStaticChildren,
722
+ children,
723
+ keys,
724
+ children
725
+ ),
726
+ (didWarnAboutKeySpread[children + isStaticChildren] = true));
727
+ }
728
+ children = null;
729
+ void 0 !== maybeKey &&
730
+ (checkKeyStringCoercion(maybeKey), (children = "" + maybeKey));
731
+ hasValidKey(config) &&
732
+ (checkKeyStringCoercion(config.key), (children = "" + config.key));
733
+ if ("key" in config) {
734
+ maybeKey = {};
735
+ for (var propName in config)
736
+ "key" !== propName && (maybeKey[propName] = config[propName]);
737
+ } else maybeKey = config;
738
+ children &&
739
+ defineKeyPropWarningGetter(
740
+ maybeKey,
741
+ "function" === typeof type
742
+ ? type.displayName || type.name || "Unknown"
743
+ : type
744
+ );
745
+ return ReactElement(
746
+ type,
747
+ children,
748
+ maybeKey,
749
+ getOwner(),
750
+ debugStack,
751
+ debugTask
752
+ );
753
+ }
754
+ function validateChildKeys(node) {
755
+ isValidElement(node)
756
+ ? node._store && (node._store.validated = 1)
757
+ : "object" === typeof node &&
758
+ null !== node &&
759
+ node.$$typeof === REACT_LAZY_TYPE &&
760
+ ("fulfilled" === node._payload.status
761
+ ? isValidElement(node._payload.value) &&
762
+ node._payload.value._store &&
763
+ (node._payload.value._store.validated = 1)
764
+ : node._store && (node._store.validated = 1));
765
+ }
766
+ function isValidElement(object) {
767
+ return (
768
+ "object" === typeof object &&
769
+ null !== object &&
770
+ object.$$typeof === REACT_ELEMENT_TYPE
771
+ );
772
+ }
773
+ var React = require$$0__default,
774
+ REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
775
+ REACT_PORTAL_TYPE = Symbol.for("react.portal"),
776
+ REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
777
+ REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
778
+ REACT_PROFILER_TYPE = Symbol.for("react.profiler"),
779
+ REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
780
+ REACT_CONTEXT_TYPE = Symbol.for("react.context"),
781
+ REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
782
+ REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
783
+ REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"),
784
+ REACT_MEMO_TYPE = Symbol.for("react.memo"),
785
+ REACT_LAZY_TYPE = Symbol.for("react.lazy"),
786
+ REACT_ACTIVITY_TYPE = Symbol.for("react.activity"),
787
+ REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"),
788
+ ReactSharedInternals =
789
+ React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
790
+ hasOwnProperty = Object.prototype.hasOwnProperty,
791
+ isArrayImpl = Array.isArray,
792
+ createTask = console.createTask
793
+ ? console.createTask
794
+ : function () {
795
+ return null;
796
+ };
797
+ React = {
798
+ react_stack_bottom_frame: function (callStackForError) {
799
+ return callStackForError();
800
+ }
801
+ };
802
+ var specialPropKeyWarningShown;
803
+ var didWarnAboutElementRef = {};
804
+ var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(
805
+ React,
806
+ UnknownOwner
807
+ )();
808
+ var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
809
+ var didWarnAboutKeySpread = {};
810
+ reactJsxRuntime_development.Fragment = REACT_FRAGMENT_TYPE;
811
+ reactJsxRuntime_development.jsx = function (type, config, maybeKey) {
812
+ var trackActualOwner =
813
+ 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
814
+ return jsxDEVImpl(
815
+ type,
816
+ config,
817
+ maybeKey,
818
+ false,
819
+ trackActualOwner
820
+ ? Error("react-stack-top-frame")
821
+ : unknownOwnerDebugStack,
822
+ trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
823
+ );
824
+ };
825
+ reactJsxRuntime_development.jsxs = function (type, config, maybeKey) {
826
+ var trackActualOwner =
827
+ 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
828
+ return jsxDEVImpl(
829
+ type,
830
+ config,
831
+ maybeKey,
832
+ true,
833
+ trackActualOwner
834
+ ? Error("react-stack-top-frame")
835
+ : unknownOwnerDebugStack,
836
+ trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
837
+ );
838
+ };
839
+ })();
840
+ return reactJsxRuntime_development;
841
+ }
842
+
843
+ var hasRequiredJsxRuntime;
844
+
845
+ function requireJsxRuntime () {
846
+ if (hasRequiredJsxRuntime) return jsxRuntime.exports;
847
+ hasRequiredJsxRuntime = 1;
848
+
849
+ if (process.env.NODE_ENV === 'production') {
850
+ jsxRuntime.exports = requireReactJsxRuntime_production();
851
+ } else {
852
+ jsxRuntime.exports = requireReactJsxRuntime_development();
853
+ }
854
+ return jsxRuntime.exports;
855
+ }
856
+
857
+ var jsxRuntimeExports = requireJsxRuntime();
858
+
859
+ function styleInject$1(css, ref) {
860
+ if ( ref === void 0 ) ref = {};
861
+ var insertAt = ref.insertAt;
862
+
863
+ if (typeof document === 'undefined') { return; }
864
+
865
+ var head = document.head || document.getElementsByTagName('head')[0];
866
+ var style = document.createElement('style');
867
+ style.type = 'text/css';
868
+
869
+ if (insertAt === 'top') {
870
+ if (head.firstChild) {
871
+ head.insertBefore(style, head.firstChild);
872
+ } else {
873
+ head.appendChild(style);
874
+ }
875
+ } else {
876
+ head.appendChild(style);
877
+ }
878
+
879
+ if (style.styleSheet) {
880
+ style.styleSheet.cssText = css;
881
+ } else {
882
+ style.appendChild(document.createTextNode(css));
883
+ }
884
+ }
885
+
886
+ var css_248z$1 = "/* Container */\n.IconButton-module_root__OeJI- {\n display: inline-flex;\n position: relative;\n}\n\n/* Button base */\n.IconButton-module_button__4Nd2Y {\n transition: all 200ms;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 0.5rem;\n}\n\n/* Sizes - Icon only */\n.IconButton-module_sizeSmall__bzuoa {\n padding: 0.5rem;\n width: 2rem;\n height: 2rem;\n}\n\n.IconButton-module_sizeMedium__RVUm- {\n padding: 0.625rem;\n width: 2.5rem;\n height: 2.5rem;\n}\n\n/* Sizes - With text */\n.IconButton-module_textSmall__JDLDQ {\n padding: 0.375rem 0.75rem;\n font-size: 0.75rem;\n font-weight: 500;\n}\n\n.IconButton-module_textMedium__5fZu- {\n padding: 0.5rem 1rem;\n font-size: 0.875rem;\n font-weight: 500;\n}\n\n/* Shapes */\n.IconButton-module_shapeRounded__coEl9 {\n border-radius: 9999px;\n}\n\n.IconButton-module_shapeSquare__sLXWp {\n border-radius: 0.5rem;\n}\n\n.IconButton-module_roundedLg__8-1dJ {\n border-radius: 0.5rem;\n}\n\n/* Icon sizes */\n.IconButton-module_iconSmall__b1FgZ {\n width: 1rem;\n height: 1rem;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.IconButton-module_iconMedium__eM0iz {\n width: 1.25rem;\n height: 1.25rem;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n/* Disabled state */\n.IconButton-module_disabled__JHuO- {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n/* Focus styles */\n.IconButton-module_focusFilled__ZJk-n:focus {\n outline: none;\n box-shadow:\n 0 0 0 2px white,\n 0 0 0 4px currentColor;\n}\n\n.IconButton-module_focusOutline__r5GNi:focus {\n outline: none;\n box-shadow:\n 0 0 0 2px white,\n 0 0 0 4px currentColor;\n}\n\n.IconButton-module_focusUnderline__npQBO:focus {\n outline: none;\n text-decoration: underline;\n}\n\n/* Link style */\n.IconButton-module_linkStyle__Yndex:hover {\n text-decoration: underline;\n}\n\n/* Variants - Default */\n.IconButton-module_variantDefaultOutlined__Grkdb {\n color: #2563eb;\n border: 2px solid #2563eb;\n}\n\n.IconButton-module_variantDefaultOutlined__Grkdb:hover:not(:disabled) {\n background-color: #eff6ff;\n}\n\n.IconButton-module_variantDefaultFilled__1cFiO {\n background-color: #2563eb;\n color: white;\n}\n\n.IconButton-module_variantDefaultFilled__1cFiO:hover:not(:disabled) {\n background-color: #1d4ed8;\n}\n\n.IconButton-module_variantDefaultQuiet__tOMEl {\n color: #2563eb;\n}\n\n.IconButton-module_variantDefaultQuiet__tOMEl:hover:not(:disabled) {\n color: #1d4ed8;\n background-color: #eff6ff;\n}\n\n/* Variants - Secondary */\n.IconButton-module_variantSecondaryOutlined__pEjyX {\n color: #4b5563;\n border: 2px solid #4b5563;\n}\n\n.IconButton-module_variantSecondaryOutlined__pEjyX:hover:not(:disabled) {\n background-color: #f9fafb;\n}\n\n.IconButton-module_variantSecondaryFilled__ZY-cK {\n background-color: #4b5563;\n color: white;\n}\n\n.IconButton-module_variantSecondaryFilled__ZY-cK:hover:not(:disabled) {\n background-color: #374151;\n}\n\n.IconButton-module_variantSecondaryQuiet__IsOFW {\n color: #4b5563;\n}\n\n.IconButton-module_variantSecondaryQuiet__IsOFW:hover:not(:disabled) {\n color: #1f2937;\n background-color: #f9fafb;\n}\n\n/* Variants - Black */\n.IconButton-module_variantBlackOutlined__tVikC {\n color: #000;\n border: 2px solid #000;\n}\n\n.IconButton-module_variantBlackOutlined__tVikC:hover:not(:disabled) {\n background-color: #f3f4f6;\n}\n\n.IconButton-module_variantBlackFilled__71iwX {\n background-color: #000;\n color: white;\n}\n\n.IconButton-module_variantBlackFilled__71iwX:hover:not(:disabled) {\n background-color: #111827;\n}\n\n.IconButton-module_variantBlackQuiet__nNlZz {\n color: #000;\n}\n\n.IconButton-module_variantBlackQuiet__nNlZz:hover:not(:disabled) {\n color: #111827;\n background-color: #f3f4f6;\n}\n\n/* Variants - Gradient Green */\n.IconButton-module_variantGradientGreenOutlined__E3jjm {\n color: #34d399;\n border: 2px solid #34d399;\n}\n\n.IconButton-module_variantGradientGreenOutlined__E3jjm:hover:not(:disabled) {\n background-color: #ecfdf5;\n}\n\n.IconButton-module_variantGradientGreenFilled__7YMfu {\n background: linear-gradient(to right, #34d399, #22d3ee);\n color: white;\n}\n\n.IconButton-module_variantGradientGreenFilled__7YMfu:hover:not(:disabled) {\n opacity: 0.9;\n}\n\n.IconButton-module_variantGradientGreenQuiet__mNMY0 {\n color: #10b981;\n}\n\n.IconButton-module_variantGradientGreenQuiet__mNMY0:hover:not(:disabled) {\n color: #059669;\n background-color: #ecfdf5;\n}\n\n/* Variants - Solid Green */\n.IconButton-module_variantSolidGreenOutlined__vNPXm {\n color: #10b981;\n border: 2px solid #10b981;\n}\n\n.IconButton-module_variantSolidGreenOutlined__vNPXm:hover:not(:disabled) {\n background-color: #ecfdf5;\n}\n\n.IconButton-module_variantSolidGreenFilled__yUA7L {\n background-color: #10b981;\n color: white;\n}\n\n.IconButton-module_variantSolidGreenFilled__yUA7L:hover:not(:disabled) {\n background-color: #059669;\n}\n\n.IconButton-module_variantSolidGreenQuiet__3PorI {\n color: #10b981;\n}\n\n.IconButton-module_variantSolidGreenQuiet__3PorI:hover:not(:disabled) {\n color: #059669;\n background-color: #ecfdf5;\n}\n\n/* Variants - Blue */\n.IconButton-module_variantBlueOutlined__rErvH {\n color: #3b82f6;\n border: 2px solid #3b82f6;\n}\n\n.IconButton-module_variantBlueOutlined__rErvH:hover:not(:disabled) {\n background-color: #eff6ff;\n}\n\n.IconButton-module_variantBlueFilled__jDAto {\n background-color: #3b82f6;\n color: white;\n}\n\n.IconButton-module_variantBlueFilled__jDAto:hover:not(:disabled) {\n background-color: #2563eb;\n}\n\n.IconButton-module_variantBlueQuiet__blcUu {\n color: #3b82f6;\n}\n\n.IconButton-module_variantBlueQuiet__blcUu:hover:not(:disabled) {\n color: #2563eb;\n background-color: #eff6ff;\n}\n\n/* Variants - Pink */\n.IconButton-module_variantPinkOutlined__AnhZD {\n color: #ec4899;\n border: 2px solid #ec4899;\n}\n\n.IconButton-module_variantPinkOutlined__AnhZD:hover:not(:disabled) {\n background-color: #fdf2f8;\n}\n\n.IconButton-module_variantPinkFilled__hp3wm {\n background-color: #ec4899;\n color: white;\n}\n\n.IconButton-module_variantPinkFilled__hp3wm:hover:not(:disabled) {\n background-color: #db2777;\n}\n\n.IconButton-module_variantPinkQuiet__-xL4- {\n color: #ec4899;\n}\n\n.IconButton-module_variantPinkQuiet__-xL4-:hover:not(:disabled) {\n color: #db2777;\n background-color: #fdf2f8;\n}\n\n/* Variants - Warning */\n.IconButton-module_variantWarningOutlined__zWIz5 {\n color: #f97316;\n border: 2px solid #f97316;\n}\n\n.IconButton-module_variantWarningOutlined__zWIz5:hover:not(:disabled) {\n background-color: #fff7ed;\n}\n\n.IconButton-module_variantWarningFilled__m8Q-W {\n background-color: #f97316;\n color: white;\n}\n\n.IconButton-module_variantWarningFilled__m8Q-W:hover:not(:disabled) {\n background-color: #ea580c;\n}\n\n.IconButton-module_variantWarningQuiet__NmQFL {\n color: #f97316;\n}\n\n.IconButton-module_variantWarningQuiet__NmQFL:hover:not(:disabled) {\n color: #ea580c;\n background-color: #fff7ed;\n}\n\n/* Disabled quiet */\n.IconButton-module_disabledQuiet__c5jUS {\n color: #4b5563;\n}\n\n.IconButton-module_disabledQuiet__c5jUS:focus {\n outline: none;\n}\n\n/* Tooltip */\n.IconButton-module_tooltip__NWsLt {\n position: absolute;\n z-index: 50;\n padding: 0.25rem 0.5rem;\n font-size: 0.75rem;\n color: white;\n background-color: #111827;\n border-radius: 0.25rem;\n white-space: nowrap;\n pointer-events: none;\n}\n\n.IconButton-module_tooltipTop__Jl-BA {\n bottom: 100%;\n margin-bottom: 0.5rem;\n left: 50%;\n transform: translateX(-50%);\n}\n\n.IconButton-module_tooltipTop__Jl-BA::after {\n content: \"\";\n position: absolute;\n top: 100%;\n left: 50%;\n transform: translateX(-50%);\n border: 4px solid transparent;\n border-top-color: #111827;\n}\n\n.IconButton-module_tooltipBottom__jm-42 {\n top: 100%;\n margin-top: 0.5rem;\n left: 50%;\n transform: translateX(-50%);\n}\n\n.IconButton-module_tooltipBottom__jm-42::after {\n content: \"\";\n position: absolute;\n bottom: 100%;\n left: 50%;\n transform: translateX(-50%);\n border: 4px solid transparent;\n border-bottom-color: #111827;\n}\n\n.IconButton-module_tooltipLeft__L5doh {\n right: 100%;\n margin-right: 0.5rem;\n top: 50%;\n transform: translateY(-50%);\n}\n\n.IconButton-module_tooltipLeft__L5doh::after {\n content: \"\";\n position: absolute;\n left: 100%;\n top: 50%;\n transform: translateY(-50%);\n border: 4px solid transparent;\n border-left-color: #111827;\n}\n\n.IconButton-module_tooltipRight__kUVkh {\n left: 100%;\n margin-left: 0.5rem;\n top: 50%;\n transform: translateY(-50%);\n}\n\n.IconButton-module_tooltipRight__kUVkh::after {\n content: \"\";\n position: absolute;\n right: 100%;\n top: 50%;\n transform: translateY(-50%);\n border: 4px solid transparent;\n border-right-color: #111827;\n}\n\n/* Whitespace */\n.IconButton-module_whitespaceNowrap__EhkvW {\n white-space: nowrap;\n}\n";
887
+ var styles$1 = {"root":"IconButton-module_root__OeJI-","button":"IconButton-module_button__4Nd2Y","sizeSmall":"IconButton-module_sizeSmall__bzuoa","sizeMedium":"IconButton-module_sizeMedium__RVUm-","textSmall":"IconButton-module_textSmall__JDLDQ","textMedium":"IconButton-module_textMedium__5fZu-","shapeRounded":"IconButton-module_shapeRounded__coEl9","shapeSquare":"IconButton-module_shapeSquare__sLXWp","roundedLg":"IconButton-module_roundedLg__8-1dJ","iconSmall":"IconButton-module_iconSmall__b1FgZ","iconMedium":"IconButton-module_iconMedium__eM0iz","disabled":"IconButton-module_disabled__JHuO-","focusFilled":"IconButton-module_focusFilled__ZJk-n","focusOutline":"IconButton-module_focusOutline__r5GNi","focusUnderline":"IconButton-module_focusUnderline__npQBO","linkStyle":"IconButton-module_linkStyle__Yndex","variantDefaultOutlined":"IconButton-module_variantDefaultOutlined__Grkdb","variantDefaultFilled":"IconButton-module_variantDefaultFilled__1cFiO","variantDefaultQuiet":"IconButton-module_variantDefaultQuiet__tOMEl","variantSecondaryOutlined":"IconButton-module_variantSecondaryOutlined__pEjyX","variantSecondaryFilled":"IconButton-module_variantSecondaryFilled__ZY-cK","variantSecondaryQuiet":"IconButton-module_variantSecondaryQuiet__IsOFW","variantBlackOutlined":"IconButton-module_variantBlackOutlined__tVikC","variantBlackFilled":"IconButton-module_variantBlackFilled__71iwX","variantBlackQuiet":"IconButton-module_variantBlackQuiet__nNlZz","variantGradientGreenOutlined":"IconButton-module_variantGradientGreenOutlined__E3jjm","variantGradientGreenFilled":"IconButton-module_variantGradientGreenFilled__7YMfu","variantGradientGreenQuiet":"IconButton-module_variantGradientGreenQuiet__mNMY0","variantSolidGreenOutlined":"IconButton-module_variantSolidGreenOutlined__vNPXm","variantSolidGreenFilled":"IconButton-module_variantSolidGreenFilled__yUA7L","variantSolidGreenQuiet":"IconButton-module_variantSolidGreenQuiet__3PorI","variantBlueOutlined":"IconButton-module_variantBlueOutlined__rErvH","variantBlueFilled":"IconButton-module_variantBlueFilled__jDAto","variantBlueQuiet":"IconButton-module_variantBlueQuiet__blcUu","variantPinkOutlined":"IconButton-module_variantPinkOutlined__AnhZD","variantPinkFilled":"IconButton-module_variantPinkFilled__hp3wm","variantPinkQuiet":"IconButton-module_variantPinkQuiet__-xL4-","variantWarningOutlined":"IconButton-module_variantWarningOutlined__zWIz5","variantWarningFilled":"IconButton-module_variantWarningFilled__m8Q-W","variantWarningQuiet":"IconButton-module_variantWarningQuiet__NmQFL","disabledQuiet":"IconButton-module_disabledQuiet__c5jUS","tooltip":"IconButton-module_tooltip__NWsLt","tooltipTop":"IconButton-module_tooltipTop__Jl-BA","tooltipBottom":"IconButton-module_tooltipBottom__jm-42","tooltipLeft":"IconButton-module_tooltipLeft__L5doh","tooltipRight":"IconButton-module_tooltipRight__kUVkh","whitespaceNowrap":"IconButton-module_whitespaceNowrap__EhkvW"};
888
+ styleInject$1(css_248z$1);
889
+
890
+ const IconButton = require$$0__default.forwardRef(({ icon, variant = "default", size = "medium", shape = "rounded", filled = false, quiet = false, inverted = false, linkStyle = false, focusStyleType = "filled", focusTriggerType = "self", iconPosition = "start", label, labelPosition = "end", tooltip, tooltipPosition = "top", className, disabled, children, type = "button", ...props }, ref) => {
891
+ const [showTooltip, setShowTooltip] = useState(false);
892
+ // Inverted styles (outline becomes filled and vice versa)
893
+ const isFilledStyle = inverted ? !filled : filled;
894
+ // Determine variant class
895
+ const getVariantClass = () => {
896
+ if (disabled && quiet) {
897
+ return styles$1.disabledQuiet;
898
+ }
899
+ const variantKey = variant.replace(/-./g, (m) => m[1].toUpperCase());
900
+ const capitalizedVariant = variantKey.charAt(0).toUpperCase() + variantKey.slice(1);
901
+ let styleType;
902
+ if (quiet) {
903
+ styleType = "Quiet";
904
+ }
905
+ else if (isFilledStyle) {
906
+ styleType = "Filled";
907
+ }
908
+ else {
909
+ styleType = "Outlined";
910
+ }
911
+ return styles$1[`variant${capitalizedVariant}${styleType}`];
912
+ };
913
+ const variantClass = getVariantClass();
914
+ const sizeClass = size === "small" ? styles$1.sizeSmall : styles$1.sizeMedium;
915
+ const textSizeClass = size === "small" ? styles$1.textSmall : styles$1.textMedium;
916
+ const shapeClass = shape === "square" ? styles$1.shapeSquare : styles$1.shapeRounded;
917
+ const iconSizeClass = size === "small" ? styles$1.iconSmall : styles$1.iconMedium;
918
+ const focusClass = styles$1[`focus${focusStyleType.charAt(0).toUpperCase() + focusStyleType.slice(1)}`];
919
+ const tooltipPosClass = styles$1[`tooltip${tooltipPosition.charAt(0).toUpperCase() + tooltipPosition.slice(1)}`];
920
+ // If icon-only button (no children, no label)
921
+ if (!children && !label) {
922
+ const buttonClasses = [
923
+ styles$1.button,
924
+ sizeClass,
925
+ variantClass,
926
+ shapeClass,
927
+ disabled && styles$1.disabled,
928
+ focusClass,
929
+ linkStyle && !disabled && styles$1.linkStyle,
930
+ className,
931
+ ]
932
+ .filter(Boolean)
933
+ .join(" ");
934
+ return (jsxRuntimeExports.jsxs("div", { className: styles$1.root, children: [jsxRuntimeExports.jsx("button", { ref: ref, disabled: disabled, className: buttonClasses, "data-focus-trigger": focusTriggerType, onMouseEnter: () => tooltip && setShowTooltip(true), onMouseLeave: () => setShowTooltip(false), onFocus: () => tooltip && setShowTooltip(true), onBlur: () => setShowTooltip(false), ...props, children: jsxRuntimeExports.jsx("span", { className: iconSizeClass, children: icon }) }), tooltip && showTooltip && (jsxRuntimeExports.jsx("div", { className: `${styles$1.tooltip} ${tooltipPosClass}`, children: tooltip }))] }));
935
+ }
936
+ // Icon button with text
937
+ const textButtonClasses = [
938
+ styles$1.button,
939
+ textSizeClass,
940
+ variantClass,
941
+ styles$1.roundedLg,
942
+ disabled && styles$1.disabled,
943
+ focusClass,
944
+ linkStyle && !disabled && styles$1.linkStyle,
945
+ styles$1.whitespaceNowrap,
946
+ className,
947
+ ]
948
+ .filter(Boolean)
949
+ .join(" ");
950
+ // Arrange icon and text based on position
951
+ const iconElement = jsxRuntimeExports.jsx("span", { className: iconSizeClass, children: icon });
952
+ const textElement = children || label;
953
+ const content = iconPosition === "start" ? (jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [iconElement, textElement] })) : (jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [textElement, iconElement] }));
954
+ return (jsxRuntimeExports.jsxs("div", { className: styles$1.root, children: [jsxRuntimeExports.jsx("button", { ref: ref, disabled: disabled, className: textButtonClasses, "data-focus-trigger": focusTriggerType, onMouseEnter: () => tooltip && setShowTooltip(true), onMouseLeave: () => setShowTooltip(false), onFocus: () => tooltip && setShowTooltip(true), onBlur: () => setShowTooltip(false), ...props, type: type, children: content }), tooltip && showTooltip && (jsxRuntimeExports.jsx("div", { className: `${styles$1.tooltip} ${tooltipPosClass}`, children: tooltip }))] }));
955
+ });
956
+ IconButton.displayName = "IconButton";
957
+
958
+ var r,o={exports:{}},t={};var l,n,a={};
959
+ /**
960
+ * @license React
961
+ * react-jsx-runtime.development.js
962
+ *
963
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
964
+ *
965
+ * This source code is licensed under the MIT license found in the
966
+ * LICENSE file in the root directory of this source tree.
967
+ */function i(){return l||(l=1,"production"!==process.env.NODE_ENV&&function(){function e(s){if(null==s)return null;if("function"==typeof s)return s.$$typeof===M?null:s.displayName||s.name||null;if("string"==typeof s)return s;switch(s){case x:return "Fragment";case p:return "Profiler";case v:return "StrictMode";case f:return "Suspense";case C:return "SuspenseList";case N:return "Activity"}if("object"==typeof s)switch("number"==typeof s.tag&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),s.$$typeof){case u:return "Portal";case j:return s.displayName||"Context";case g:return (s._context.displayName||"Context")+".Consumer";case k:var r=s.render;return (s=s.displayName)||(s=""!==(s=r.displayName||r.name||"")?"ForwardRef("+s+")":"ForwardRef"),s;case L:return null!==(r=s.displayName||null)?r:e(s.type)||"Memo";case y:r=s._payload,s=s._init;try{return e(s(r))}catch(e){}}return null}function r(e){return ""+e}function o(e){try{r(e);var s=!1;}catch(e){s=true;}if(s){var o=(s=console).error,t="function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return o.call(s,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",t),r(e)}}function t(s){if(s===x)return "<>";if("object"==typeof s&&null!==s&&s.$$typeof===y)return "<...>";try{var r=e(s);return r?"<"+r+">":"<...>"}catch(e){return "<...>"}}function l(){return Error("react-stack-top-frame")}function n(){var s=e(this.type);return B[s]||(B[s]=true,console.error("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.")),void 0!==(s=this.props.ref)?s:null}function i(s,r,t,l,a,i){var h,m=r.children;if(void 0!==m)if(l)if(z(m)){for(l=0;l<m.length;l++)c(m[l]);Object.freeze&&Object.freeze(m);}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else c(m);if(b.call(r,"key")){m=e(s);var u=Object.keys(r).filter(function(e){return "key"!==e});l=0<u.length?"{key: someKey, "+u.join(": ..., ")+": ...}":"{key: someKey}",W[m+l]||(u=0<u.length?"{"+u.join(": ..., ")+": ...}":"{}",console.error('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} />',l,m,u,m),W[m+l]=true);}if(m=null,void 0!==t&&(o(t),m=""+t),function(e){if(b.call(e,"key")){var s=Object.getOwnPropertyDescriptor(e,"key").get;if(s&&s.isReactWarning)return false}return void 0!==e.key}(r)&&(o(r.key),m=""+r.key),"key"in r)for(var x in t={},r)"key"!==x&&(t[x]=r[x]);else t=r;return m&&function(e,s){function r(){d||(d=true,console.error("%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)",s));}r.isReactWarning=true,Object.defineProperty(e,"key",{get:r,configurable:true});}(t,"function"==typeof s?s.displayName||s.name||"Unknown":s),function(e,s,r,o,t,l){var a=r.ref;return e={$$typeof:w,type:e,key:s,props:r,_owner:o},null!==(void 0!==a?a:null)?Object.defineProperty(e,"ref",{enumerable:false,get:n}):Object.defineProperty(e,"ref",{enumerable:false,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:false,enumerable:false,writable:true,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:false,enumerable:false,writable:true,value:null}),Object.defineProperty(e,"_debugStack",{configurable:false,enumerable:false,writable:true,value:t}),Object.defineProperty(e,"_debugTask",{configurable:false,enumerable:false,writable:true,value:l}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}(s,m,t,null===(h=$.A)?null:h.getOwner(),a,i)}function c(e){h(e)?e._store&&(e._store.validated=1):"object"==typeof e&&null!==e&&e.$$typeof===y&&("fulfilled"===e._payload.status?h(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1));}function h(e){return "object"==typeof e&&null!==e&&e.$$typeof===w}var d,m=require$$0__default,w=Symbol.for("react.transitional.element"),u=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),v=Symbol.for("react.strict_mode"),p=Symbol.for("react.profiler"),g=Symbol.for("react.consumer"),j=Symbol.for("react.context"),k=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),C=Symbol.for("react.suspense_list"),L=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),N=Symbol.for("react.activity"),M=Symbol.for("react.client.reference"),$=m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,b=Object.prototype.hasOwnProperty,z=Array.isArray,H=console.createTask?console.createTask:function(){return null},B={},V=(m={react_stack_bottom_frame:function(e){return e()}}).react_stack_bottom_frame.bind(m,l)(),Z=H(t(l)),W={};a.Fragment=x,a.jsx=function(e,s,r){var o=1e4>$.recentlyCreatedOwnerStacks++;return i(e,s,r,false,o?Error("react-stack-top-frame"):V,o?H(t(e)):Z)},a.jsxs=function(e,s,r){var o=1e4>$.recentlyCreatedOwnerStacks++;return i(e,s,r,true,o?Error("react-stack-top-frame"):V,o?H(t(e)):Z)};}()),a}var c=(n||(n=1,"production"===process.env.NODE_ENV?o.exports=function(){if(r)return t;r=1;var e=Symbol.for("react.transitional.element"),s=Symbol.for("react.fragment");function o(s,r,o){var t=null;if(void 0!==o&&(t=""+o),void 0!==r.key&&(t=""+r.key),"key"in r)for(var l in o={},r)"key"!==l&&(o[l]=r[l]);else o=r;return r=o.ref,{$$typeof:e,type:s,key:t,ref:void 0!==r?r:null,props:o}}return t.Fragment=s,t.jsx=o,t.jsxs=o,t}():o.exports=i()),o.exports);const v=({className:e="",size:s="md"})=>{const r=`${{sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"}[s]} ${e}`;return c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:r,"aria-label":"Calendar",children:c.jsx("path",{fillRule:"evenodd",d:"M6 2a1 1 0 00-1 1v1H4a2 2 0 00-2 2v10a2 2 0 002 2h12a2 2 0 002-2V6a2 2 0 00-2-2h-1V3a1 1 0 10-2 0v1H7V3a1 1 0 00-1-1zm0 5a1 1 0 000 2h8a1 1 0 100-2H6z",clipRule:"evenodd"})})};const y=({className:e="",size:s="md",color:r="currentColor",direction:o="down"})=>c.jsx("svg",{className:`${{sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"}[s]} ${{up:"rotate-180",down:"",left:"rotate-90",right:"-rotate-90"}[o]} ${e}`,fill:"none",stroke:r,viewBox:"0 0 24 24",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:c.jsx("path",{d:"M6 9l6 6 6-6"})});const E=({className:e="",size:s="md"})=>{const r=`${{sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"}[s]} ${e}`;return c.jsx("svg",{className:r,viewBox:"0 0 20 20",fill:"currentColor","aria-label":"Error",children:c.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"})})};const Xe={outlined:"material-symbols-outlined",rounded:"material-symbols-rounded",sharp:"material-symbols-sharp"},Ye=require$$0.forwardRef(({name:e,variant:s="outlined",size:r="md",fill:o=0,weight:t=400,grade:l=0,opticalSize:n=24,style:a,className:i,...h},d)=>{const m=(e=>"number"==typeof e?e:"sm"===e?16:"md"===e?20:24)(r),w=`"FILL" ${o}, "wght" ${t}, "GRAD" ${l}, "opsz" ${n}`;return c.jsx("span",{ref:d,"aria-hidden":"true",className:Xe[s]+(i?` ${i}`:""),style:{fontVariationSettings:w,fontSize:m,lineHeight:1,display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",...a},...h,children:e})});Ye.displayName="MaterialIcon";
968
+
969
+ function styleInject(css, ref) {
970
+ if ( ref === void 0 ) ref = {};
971
+ var insertAt = ref.insertAt;
972
+
973
+ if (typeof document === 'undefined') { return; }
974
+
975
+ var head = document.head || document.getElementsByTagName('head')[0];
976
+ var style = document.createElement('style');
977
+ style.type = 'text/css';
978
+
979
+ if (insertAt === 'top') {
980
+ if (head.firstChild) {
981
+ head.insertBefore(style, head.firstChild);
982
+ } else {
983
+ head.appendChild(style);
984
+ }
985
+ } else {
986
+ head.appendChild(style);
987
+ }
988
+
989
+ if (style.styleSheet) {
990
+ style.styleSheet.cssText = css;
991
+ } else {
992
+ style.appendChild(document.createTextNode(css));
993
+ }
994
+ }
995
+
996
+ var css_248z = ".DateInput-module_wrapper__MP3pN {\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n}\n\n.DateInput-module_label__5Viox {\n display: block;\n font-size: 0.875rem;\n font-weight: 500;\n color: #374151;\n}\n\n.DateInput-module_required__LLtRa {\n color: #ef4444;\n margin-left: 0.25rem;\n}\n\n.DateInput-module_inputWrapper__7reUr {\n position: relative;\n}\n\n.DateInput-module_inputContainer__-gSJ0 {\n display: flex;\n align-items: center;\n border: 1px solid #d1d5db;\n border-radius: 0.5rem;\n overflow: hidden;\n transition:\n border-color 150ms ease,\n box-shadow 150ms ease;\n background: #ffffff;\n}\n\n.DateInput-module_inputContainer__-gSJ0:focus-within {\n border-color: transparent;\n box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.4);\n}\n\n.DateInput-module_inputError__l6qyl {\n border-color: #ef4444;\n}\n\n.DateInput-module_inputError__l6qyl:focus-within {\n box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.3);\n}\n\n.DateInput-module_inputDisabled__UfVE3 {\n background: #f3f4f6;\n}\n\n.DateInput-module_input__xXOdW {\n flex: 1;\n padding: 0.5rem 1rem;\n font-size: 0.875rem;\n color: #111827;\n border: none;\n outline: none;\n background: transparent;\n}\n\n.DateInput-module_input__xXOdW::placeholder {\n color: #9ca3af;\n}\n\n.DateInput-module_input__xXOdW:disabled {\n color: #6b7280;\n}\n\n.DateInput-module_iconButton__JbQEl {\n padding: 0.5rem 0.75rem;\n color: #6b7280;\n background: transparent;\n border: none;\n cursor: pointer;\n transition:\n color 150ms ease,\n opacity 150ms ease;\n}\n\n.DateInput-module_iconButton__JbQEl:hover:not(:disabled) {\n color: #374151;\n}\n\n.DateInput-module_iconButton__JbQEl:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.DateInput-module_icon__QYsQ2 {\n width: 1.25rem;\n height: 1.25rem;\n}\n\n.DateInput-module_calendar__J2TaA {\n position: absolute;\n top: calc(100% + 0.5rem);\n left: 0;\n z-index: 50;\n width: 20rem;\n background: #ffffff;\n border: 1px solid #d1d5db;\n border-radius: 0.75rem;\n box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);\n}\n\n.DateInput-module_header__l1q1l {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 1rem;\n border-bottom: 1px solid #e5e7eb;\n}\n\n.DateInput-module_navButton__MpmWa {\n padding: 0.5rem;\n border: none;\n background: transparent;\n border-radius: 0.5rem;\n cursor: pointer;\n transition: background-color 150ms ease;\n}\n\n.DateInput-module_navButton__MpmWa:hover {\n background: #f3f4f6;\n}\n\n.DateInput-module_navIconPrev__m4nOB,\n.DateInput-module_navIconNext__uHOxV {\n width: 1.25rem;\n height: 1.25rem;\n color: #4b5563;\n}\n\n.DateInput-module_navIconPrev__m4nOB {\n transform: rotate(90deg);\n}\n\n.DateInput-module_navIconNext__uHOxV {\n transform: rotate(-90deg);\n}\n\n.DateInput-module_monthTitle__ubEKP {\n flex: 1;\n text-align: center;\n font-size: 1rem;\n font-weight: 600;\n color: #111827;\n}\n\n.DateInput-module_dayNames__nlbfg {\n display: grid;\n grid-template-columns: repeat(7, 1fr);\n gap: 0.25rem;\n padding: 0.75rem 1rem 0.5rem;\n border-bottom: 1px solid #e5e7eb;\n}\n\n.DateInput-module_dayName__tUYuM {\n text-align: center;\n font-size: 0.75rem;\n font-weight: 600;\n color: #6b7280;\n padding: 0.5rem 0;\n}\n\n.DateInput-module_calendarGrid__duNI4 {\n display: grid;\n grid-template-columns: repeat(7, 1fr);\n gap: 0.25rem;\n padding: 1rem;\n}\n\n.DateInput-module_dayButton__5YF7V {\n padding: 0;\n border-radius: 0.5rem;\n font-size: 0.875rem;\n font-weight: 500;\n border: none;\n background: transparent;\n transition:\n background-color 150ms ease,\n color 150ms ease,\n border-color 150ms ease;\n box-shadow: none;\n}\n\n.DateInput-module_dayEmpty__G6G3v {\n cursor: default;\n background: transparent;\n}\n\n.DateInput-module_daySelectable__JTaJu {\n color: #111827;\n cursor: pointer;\n}\n\n.DateInput-module_daySelectable__JTaJu:hover {\n background: #f3f4f6;\n}\n\n.DateInput-module_daySelected__E-Dn9 {\n background: #2563eb;\n color: #ffffff;\n}\n\n.DateInput-module_daySelected__E-Dn9:hover {\n background: #1d4ed8;\n}\n\n.DateInput-module_dayToday__agR7N {\n background: #eff6ff;\n color: #2563eb;\n border: 2px solid #bfdbfe;\n}\n\n.DateInput-module_dayToday__agR7N:hover {\n background: #dbeafe;\n}\n\n.DateInput-module_dayDisabled__xHiwC {\n color: #d1d5db;\n cursor: not-allowed;\n}\n\n.DateInput-module_quickActions__6-1px {\n display: flex;\n flex-wrap: wrap;\n gap: 0.5rem;\n padding: 1rem;\n border-top: 1px solid #e5e7eb;\n}\n\n.DateInput-module_actionButton__PZFxK {\n flex: 1;\n}\n\n.DateInput-module_hint__FQbf3 {\n margin-top: 0.25rem;\n font-size: 0.75rem;\n color: #6b7280;\n}\n\n.DateInput-module_errorRow__8nWQ1 {\n display: flex;\n align-items: flex-start;\n gap: 0.5rem;\n margin-top: 0.25rem;\n}\n\n.DateInput-module_errorIcon__s1CsH {\n width: 1rem;\n height: 1rem;\n color: #ef4444;\n flex-shrink: 0;\n margin-top: 0.125rem;\n}\n\n.DateInput-module_errorText__970HV {\n font-size: 0.875rem;\n color: #dc2626;\n}\n";
997
+ var styles = {"wrapper":"DateInput-module_wrapper__MP3pN","label":"DateInput-module_label__5Viox","required":"DateInput-module_required__LLtRa","inputWrapper":"DateInput-module_inputWrapper__7reUr","inputContainer":"DateInput-module_inputContainer__-gSJ0","inputError":"DateInput-module_inputError__l6qyl","inputDisabled":"DateInput-module_inputDisabled__UfVE3","input":"DateInput-module_input__xXOdW","icon":"DateInput-module_icon__QYsQ2","calendar":"DateInput-module_calendar__J2TaA","header":"DateInput-module_header__l1q1l","navIconPrev":"DateInput-module_navIconPrev__m4nOB","navIconNext":"DateInput-module_navIconNext__uHOxV","monthTitle":"DateInput-module_monthTitle__ubEKP","dayNames":"DateInput-module_dayNames__nlbfg","dayName":"DateInput-module_dayName__tUYuM","calendarGrid":"DateInput-module_calendarGrid__duNI4","dayButton":"DateInput-module_dayButton__5YF7V","dayEmpty":"DateInput-module_dayEmpty__G6G3v","daySelectable":"DateInput-module_daySelectable__JTaJu","daySelected":"DateInput-module_daySelected__E-Dn9","dayToday":"DateInput-module_dayToday__agR7N","dayDisabled":"DateInput-module_dayDisabled__xHiwC","quickActions":"DateInput-module_quickActions__6-1px","actionButton":"DateInput-module_actionButton__PZFxK","hint":"DateInput-module_hint__FQbf3","errorRow":"DateInput-module_errorRow__8nWQ1","errorIcon":"DateInput-module_errorIcon__s1CsH","errorText":"DateInput-module_errorText__970HV"};
998
+ styleInject(css_248z);
999
+
1000
+ const DateInput = ({ label, value, onChange, placeholder = "MM/DD/YYYY", error, required = false, disabled = false, minDate, maxDate, className = "", hint, locale = "en", }) => {
1001
+ const classNames = (...classes) => classes.filter(Boolean).join(" ");
1002
+ const [isOpen, setIsOpen] = useState(false);
1003
+ const [currentMonth, setCurrentMonth] = useState(value ? new Date(value) : new Date());
1004
+ const [inputValue, setInputValue] = useState(value);
1005
+ const containerRef = useRef(null);
1006
+ const inputRef = useRef(null);
1007
+ // Format date based on locale
1008
+ const formatDate = (date) => {
1009
+ if (locale.startsWith("es")) {
1010
+ return date.toLocaleDateString("es-ES", {
1011
+ year: "numeric",
1012
+ month: "2-digit",
1013
+ day: "2-digit",
1014
+ });
1015
+ }
1016
+ return date.toLocaleDateString("en-US", {
1017
+ year: "numeric",
1018
+ month: "2-digit",
1019
+ day: "2-digit",
1020
+ });
1021
+ };
1022
+ // Parse input value
1023
+ const parseInputValue = (val) => {
1024
+ if (!val)
1025
+ return null;
1026
+ const date = new Date(val);
1027
+ return isNaN(date.getTime()) ? null : date;
1028
+ };
1029
+ // Handle date selection from calendar
1030
+ const handleSelectDate = (day) => {
1031
+ const selectedDate = new Date(currentMonth);
1032
+ selectedDate.setDate(day);
1033
+ const isoString = selectedDate.toISOString().split("T")[0];
1034
+ onChange(isoString);
1035
+ setInputValue(formatDate(selectedDate));
1036
+ setIsOpen(false);
1037
+ };
1038
+ // Handle month navigation
1039
+ const handlePreviousMonth = () => {
1040
+ setCurrentMonth(new Date(currentMonth.getFullYear(), currentMonth.getMonth() - 1));
1041
+ };
1042
+ const handleNextMonth = () => {
1043
+ setCurrentMonth(new Date(currentMonth.getFullYear(), currentMonth.getMonth() + 1));
1044
+ };
1045
+ // Handle input change with validation
1046
+ const handleInputChange = (e) => {
1047
+ const val = e.target.value;
1048
+ setInputValue(val);
1049
+ // Try to parse the date
1050
+ const parsed = parseInputValue(val);
1051
+ if (parsed) {
1052
+ onChange(parsed.toISOString().split("T")[0]);
1053
+ setCurrentMonth(parsed);
1054
+ }
1055
+ };
1056
+ // Handle input blur
1057
+ const handleInputBlur = () => {
1058
+ if (inputValue && !parseInputValue(inputValue)) {
1059
+ // Invalid date, reset
1060
+ setInputValue(value);
1061
+ }
1062
+ };
1063
+ // Close picker on outside click
1064
+ useEffect(() => {
1065
+ const handleClickOutside = (event) => {
1066
+ if (containerRef.current &&
1067
+ !containerRef.current.contains(event.target)) {
1068
+ setIsOpen(false);
1069
+ }
1070
+ };
1071
+ document.addEventListener("mousedown", handleClickOutside);
1072
+ return () => document.removeEventListener("mousedown", handleClickOutside);
1073
+ }, []);
1074
+ // Update input value when prop changes
1075
+ useEffect(() => {
1076
+ if (value) {
1077
+ const date = new Date(value);
1078
+ setInputValue(formatDate(date));
1079
+ setCurrentMonth(date);
1080
+ }
1081
+ else {
1082
+ setInputValue("");
1083
+ }
1084
+ }, [value, locale]);
1085
+ // Get days in month
1086
+ const getDaysInMonth = (date) => {
1087
+ return new Date(date.getFullYear(), date.getMonth() + 1, 0).getDate();
1088
+ };
1089
+ // Get first day of month (0 = Sunday)
1090
+ const getFirstDayOfMonth = (date) => {
1091
+ return new Date(date.getFullYear(), date.getMonth(), 1).getDay();
1092
+ };
1093
+ // Get day names
1094
+ const getDayNames = () => {
1095
+ if (locale.startsWith("es")) {
1096
+ return ["Dom", "Lun", "Mar", "Mié", "Jue", "Vie", "Sáb"];
1097
+ }
1098
+ return ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
1099
+ };
1100
+ // Get month name
1101
+ const getMonthName = (date) => {
1102
+ if (locale.startsWith("es")) {
1103
+ return date.toLocaleDateString("es-ES", {
1104
+ month: "long",
1105
+ year: "numeric",
1106
+ });
1107
+ }
1108
+ return date.toLocaleDateString("en-US", {
1109
+ month: "long",
1110
+ year: "numeric",
1111
+ });
1112
+ };
1113
+ // Check if date is selectable
1114
+ const isDateSelectable = (day) => {
1115
+ const testDate = new Date(currentMonth.getFullYear(), currentMonth.getMonth(), day);
1116
+ const testDateStr = testDate.toISOString().split("T")[0];
1117
+ if (minDate && testDateStr < minDate)
1118
+ return false;
1119
+ if (maxDate && testDateStr > maxDate)
1120
+ return false;
1121
+ return true;
1122
+ };
1123
+ // Check if date is today
1124
+ const isToday = (day) => {
1125
+ const today = new Date();
1126
+ return (day === today.getDate() &&
1127
+ currentMonth.getMonth() === today.getMonth() &&
1128
+ currentMonth.getFullYear() === today.getFullYear());
1129
+ };
1130
+ // Check if date is selected
1131
+ const isSelected = (day) => {
1132
+ if (!value)
1133
+ return false;
1134
+ const selectedDate = new Date(value);
1135
+ return (day === selectedDate.getDate() &&
1136
+ currentMonth.getMonth() === selectedDate.getMonth() &&
1137
+ currentMonth.getFullYear() === selectedDate.getFullYear());
1138
+ };
1139
+ // Generate calendar days
1140
+ const calendarDays = [];
1141
+ const daysInMonth = getDaysInMonth(currentMonth);
1142
+ const firstDay = getFirstDayOfMonth(currentMonth);
1143
+ // Add empty cells for days before the first day of month
1144
+ for (let i = 0; i < firstDay; i++) {
1145
+ calendarDays.push(null);
1146
+ }
1147
+ // Add days of the month
1148
+ for (let i = 1; i <= daysInMonth; i++) {
1149
+ calendarDays.push(i);
1150
+ }
1151
+ const getQuickActionLabels = () => {
1152
+ if (locale.startsWith("es")) {
1153
+ return { today: "Hoy", clear: "Limpiar" };
1154
+ }
1155
+ return { today: "Today", clear: "Clear" };
1156
+ };
1157
+ const { today, clear } = getQuickActionLabels();
1158
+ return (jsxRuntimeExports$1.jsxs("div", { className: classNames(styles.wrapper, className), ref: containerRef, children: [label && (jsxRuntimeExports$1.jsxs("label", { className: styles.label, children: [label, required && jsxRuntimeExports$1.jsx("span", { className: styles.required, children: "*" })] })), jsxRuntimeExports$1.jsxs("div", { className: styles.inputWrapper, children: [jsxRuntimeExports$1.jsxs("div", { className: classNames(styles.inputContainer, error && styles.inputError, disabled && styles.inputDisabled), children: [jsxRuntimeExports$1.jsx("input", { ref: inputRef, type: "text", value: inputValue, onChange: handleInputChange, onBlur: handleInputBlur, onClick: () => !disabled && setIsOpen(!isOpen), onFocus: () => !disabled && setIsOpen(true), placeholder: placeholder, disabled: disabled, className: styles.input }), jsxRuntimeExports$1.jsx(IconButton, { icon: jsxRuntimeExports$1.jsx(v, { size: "md", className: styles.icon }), "aria-label": "Open calendar", onClick: () => !disabled && setIsOpen(!isOpen), disabled: disabled, size: "small", variant: "secondary", quiet: true })] }), isOpen && !disabled && (jsxRuntimeExports$1.jsxs("div", { className: styles.calendar, children: [jsxRuntimeExports$1.jsxs("div", { className: styles.header, children: [jsxRuntimeExports$1.jsx(IconButton, { icon: jsxRuntimeExports$1.jsx(y, { size: "md", className: styles.navIconPrev }), "aria-label": "Previous month", onClick: handlePreviousMonth, size: "small", variant: "secondary", quiet: true }), jsxRuntimeExports$1.jsx("h3", { className: styles.monthTitle, children: getMonthName(currentMonth) }), jsxRuntimeExports$1.jsx(IconButton, { icon: jsxRuntimeExports$1.jsx(y, { size: "md", className: styles.navIconNext }), "aria-label": "Next month", onClick: handleNextMonth, size: "small", variant: "secondary", quiet: true })] }), jsxRuntimeExports$1.jsx("div", { className: styles.dayNames, children: getDayNames().map((day) => (jsxRuntimeExports$1.jsx("div", { className: styles.dayName, children: day }, day))) }), jsxRuntimeExports$1.jsx("div", { className: styles.calendarGrid, children: calendarDays.map((day, index) => (jsxRuntimeExports$1.jsx(m, { type: "button", onClick: () => day !== null &&
1159
+ isDateSelectable(day) &&
1160
+ handleSelectDate(day), disabled: day === null || !isDateSelectable(day), variant: "text", color: "secondary", size: "small", disableElevation: true, className: classNames(styles.dayButton, day === null && styles.dayEmpty, day !== null && isSelected(day) && styles.daySelected, day !== null &&
1161
+ !isSelected(day) &&
1162
+ isToday(day) &&
1163
+ styles.dayToday, day !== null &&
1164
+ !isSelected(day) &&
1165
+ !isToday(day) &&
1166
+ isDateSelectable(day) &&
1167
+ styles.daySelectable, day !== null &&
1168
+ !isDateSelectable(day) &&
1169
+ styles.dayDisabled), children: day }, index))) }), jsxRuntimeExports$1.jsxs("div", { className: styles.quickActions, children: [jsxRuntimeExports$1.jsx(m, { type: "button", onClick: () => {
1170
+ const today = new Date();
1171
+ handleSelectDate(today.getDate());
1172
+ setCurrentMonth(today);
1173
+ }, variant: "outlined", color: "primary", size: "small", className: styles.actionButton, children: today }), jsxRuntimeExports$1.jsx(m, { type: "button", onClick: () => {
1174
+ onChange("");
1175
+ setInputValue("");
1176
+ setIsOpen(false);
1177
+ }, variant: "outlined", color: "secondary", size: "small", className: styles.actionButton, children: clear })] })] }))] }), hint && !error && jsxRuntimeExports$1.jsx("p", { className: styles.hint, children: hint }), error && (jsxRuntimeExports$1.jsxs("div", { className: styles.errorRow, children: [jsxRuntimeExports$1.jsx(E, { size: "sm", className: styles.errorIcon }), jsxRuntimeExports$1.jsx("p", { className: styles.errorText, children: error })] }))] }));
1178
+ };
1179
+
1180
+ export { DateInput as default };