@native-systems/ui 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -1,11 +1,7 @@
1
- import * as React from 'react';
2
- import React__default, {
3
- useState,
4
- createContext,
5
- useRef,
6
- useContext,
7
- } from 'react';
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
8
2
  import { useForm } from 'react-hook-form';
3
+ import * as React from 'react';
4
+ import { useState, createContext, useRef, useContext } from 'react';
9
5
  import {
10
6
  PatternCompiler,
11
7
  eqPlugin,
@@ -15,445 +11,6 @@ import {
15
11
  urlPlugin,
16
12
  } from '@native-systems/utility';
17
13
 
18
- // shim for using process in browser
19
- // based off https://github.com/defunctzombie/node-process/blob/master/browser.js
20
-
21
- var env = {};
22
-
23
- var browser$1 = {
24
- env: env,
25
- };
26
-
27
- var jsxRuntime = { exports: {} };
28
-
29
- var reactJsxRuntime_production = {};
30
-
31
- /**
32
- * @license React
33
- * react-jsx-runtime.production.js
34
- *
35
- * Copyright (c) Meta Platforms, Inc. and affiliates.
36
- *
37
- * This source code is licensed under the MIT license found in the
38
- * LICENSE file in the root directory of this source tree.
39
- */
40
-
41
- var hasRequiredReactJsxRuntime_production;
42
-
43
- function requireReactJsxRuntime_production() {
44
- if (hasRequiredReactJsxRuntime_production) return reactJsxRuntime_production;
45
- hasRequiredReactJsxRuntime_production = 1;
46
- var REACT_ELEMENT_TYPE = Symbol.for('react.transitional.element'),
47
- REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');
48
- function jsxProd(type, config, maybeKey) {
49
- var key = null;
50
- void 0 !== maybeKey && (key = '' + maybeKey);
51
- void 0 !== config.key && (key = '' + config.key);
52
- if ('key' in config) {
53
- maybeKey = {};
54
- for (var propName in config)
55
- 'key' !== propName && (maybeKey[propName] = config[propName]);
56
- } else maybeKey = config;
57
- config = maybeKey.ref;
58
- return {
59
- $$typeof: REACT_ELEMENT_TYPE,
60
- type: type,
61
- key: key,
62
- ref: void 0 !== config ? config : null,
63
- props: maybeKey,
64
- };
65
- }
66
- reactJsxRuntime_production.Fragment = REACT_FRAGMENT_TYPE;
67
- reactJsxRuntime_production.jsx = jsxProd;
68
- reactJsxRuntime_production.jsxs = jsxProd;
69
- return reactJsxRuntime_production;
70
- }
71
-
72
- var reactJsxRuntime_development = {};
73
-
74
- var hasRequiredReactJsxRuntime_development;
75
-
76
- function requireReactJsxRuntime_development() {
77
- if (hasRequiredReactJsxRuntime_development)
78
- return reactJsxRuntime_development;
79
- hasRequiredReactJsxRuntime_development = 1;
80
- 'production' !== browser$1.env.NODE_ENV &&
81
- (function () {
82
- function getComponentNameFromType(type) {
83
- if (null == type) return null;
84
- if ('function' === typeof type)
85
- return type.$$typeof === REACT_CLIENT_REFERENCE
86
- ? null
87
- : type.displayName || type.name || null;
88
- if ('string' === typeof type) return type;
89
- switch (type) {
90
- case REACT_FRAGMENT_TYPE:
91
- return 'Fragment';
92
- case REACT_PROFILER_TYPE:
93
- return 'Profiler';
94
- case REACT_STRICT_MODE_TYPE:
95
- return 'StrictMode';
96
- case REACT_SUSPENSE_TYPE:
97
- return 'Suspense';
98
- case REACT_SUSPENSE_LIST_TYPE:
99
- return 'SuspenseList';
100
- case REACT_ACTIVITY_TYPE:
101
- return 'Activity';
102
- }
103
- if ('object' === typeof type)
104
- switch (
105
- ('number' === typeof type.tag &&
106
- console.error(
107
- 'Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.'
108
- ),
109
- type.$$typeof)
110
- ) {
111
- case REACT_PORTAL_TYPE:
112
- return 'Portal';
113
- case REACT_CONTEXT_TYPE:
114
- return (type.displayName || 'Context') + '.Provider';
115
- case REACT_CONSUMER_TYPE:
116
- return (type._context.displayName || 'Context') + '.Consumer';
117
- case REACT_FORWARD_REF_TYPE:
118
- var innerType = type.render;
119
- type = type.displayName;
120
- type ||
121
- ((type = innerType.displayName || innerType.name || ''),
122
- (type =
123
- '' !== type ? 'ForwardRef(' + type + ')' : 'ForwardRef'));
124
- return type;
125
- case REACT_MEMO_TYPE:
126
- return (
127
- (innerType = type.displayName || null),
128
- null !== innerType
129
- ? innerType
130
- : getComponentNameFromType(type.type) || 'Memo'
131
- );
132
- case REACT_LAZY_TYPE:
133
- innerType = type._payload;
134
- type = type._init;
135
- try {
136
- return getComponentNameFromType(type(innerType));
137
- } catch (x) {}
138
- }
139
- return null;
140
- }
141
- function testStringCoercion(value) {
142
- return '' + value;
143
- }
144
- function checkKeyStringCoercion(value) {
145
- try {
146
- testStringCoercion(value);
147
- var JSCompiler_inline_result = !1;
148
- } catch (e) {
149
- JSCompiler_inline_result = true;
150
- }
151
- if (JSCompiler_inline_result) {
152
- JSCompiler_inline_result = console;
153
- var JSCompiler_temp_const = JSCompiler_inline_result.error;
154
- var JSCompiler_inline_result$jscomp$0 =
155
- ('function' === typeof Symbol &&
156
- Symbol.toStringTag &&
157
- value[Symbol.toStringTag]) ||
158
- value.constructor.name ||
159
- 'Object';
160
- JSCompiler_temp_const.call(
161
- JSCompiler_inline_result,
162
- 'The provided key is an unsupported type %s. This value must be coerced to a string before using it here.',
163
- JSCompiler_inline_result$jscomp$0
164
- );
165
- return testStringCoercion(value);
166
- }
167
- }
168
- function getTaskName(type) {
169
- if (type === REACT_FRAGMENT_TYPE) return '<>';
170
- if (
171
- 'object' === typeof type &&
172
- null !== type &&
173
- type.$$typeof === REACT_LAZY_TYPE
174
- )
175
- return '<...>';
176
- try {
177
- var name = getComponentNameFromType(type);
178
- return name ? '<' + name + '>' : '<...>';
179
- } catch (x) {
180
- return '<...>';
181
- }
182
- }
183
- function getOwner() {
184
- var dispatcher = ReactSharedInternals.A;
185
- return null === dispatcher ? null : dispatcher.getOwner();
186
- }
187
- function UnknownOwner() {
188
- return Error('react-stack-top-frame');
189
- }
190
- function hasValidKey(config) {
191
- if (hasOwnProperty.call(config, 'key')) {
192
- var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
193
- if (getter && getter.isReactWarning) return false;
194
- }
195
- return void 0 !== config.key;
196
- }
197
- function defineKeyPropWarningGetter(props, displayName) {
198
- function warnAboutAccessingKey() {
199
- specialPropKeyWarningShown ||
200
- ((specialPropKeyWarningShown = true),
201
- console.error(
202
- '%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)',
203
- displayName
204
- ));
205
- }
206
- warnAboutAccessingKey.isReactWarning = true;
207
- Object.defineProperty(props, 'key', {
208
- get: warnAboutAccessingKey,
209
- configurable: true,
210
- });
211
- }
212
- function elementRefGetterWithDeprecationWarning() {
213
- var componentName = getComponentNameFromType(this.type);
214
- didWarnAboutElementRef[componentName] ||
215
- ((didWarnAboutElementRef[componentName] = true),
216
- console.error(
217
- '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.'
218
- ));
219
- componentName = this.props.ref;
220
- return void 0 !== componentName ? componentName : null;
221
- }
222
- function ReactElement(
223
- type,
224
- key,
225
- self,
226
- source,
227
- owner,
228
- props,
229
- debugStack,
230
- debugTask
231
- ) {
232
- self = props.ref;
233
- type = {
234
- $$typeof: REACT_ELEMENT_TYPE,
235
- type: type,
236
- key: key,
237
- props: props,
238
- _owner: owner,
239
- };
240
- null !== (void 0 !== self ? self : null)
241
- ? Object.defineProperty(type, 'ref', {
242
- enumerable: false,
243
- get: elementRefGetterWithDeprecationWarning,
244
- })
245
- : Object.defineProperty(type, 'ref', {
246
- enumerable: false,
247
- value: null,
248
- });
249
- type._store = {};
250
- Object.defineProperty(type._store, 'validated', {
251
- configurable: false,
252
- enumerable: false,
253
- writable: true,
254
- value: 0,
255
- });
256
- Object.defineProperty(type, '_debugInfo', {
257
- configurable: false,
258
- enumerable: false,
259
- writable: true,
260
- value: null,
261
- });
262
- Object.defineProperty(type, '_debugStack', {
263
- configurable: false,
264
- enumerable: false,
265
- writable: true,
266
- value: debugStack,
267
- });
268
- Object.defineProperty(type, '_debugTask', {
269
- configurable: false,
270
- enumerable: false,
271
- writable: true,
272
- value: debugTask,
273
- });
274
- Object.freeze && (Object.freeze(type.props), Object.freeze(type));
275
- return type;
276
- }
277
- function jsxDEVImpl(
278
- type,
279
- config,
280
- maybeKey,
281
- isStaticChildren,
282
- source,
283
- self,
284
- debugStack,
285
- debugTask
286
- ) {
287
- var children = config.children;
288
- if (void 0 !== children)
289
- if (isStaticChildren)
290
- if (isArrayImpl(children)) {
291
- for (
292
- isStaticChildren = 0;
293
- isStaticChildren < children.length;
294
- isStaticChildren++
295
- )
296
- validateChildKeys(children[isStaticChildren]);
297
- Object.freeze && Object.freeze(children);
298
- } else
299
- console.error(
300
- 'React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.'
301
- );
302
- else validateChildKeys(children);
303
- if (hasOwnProperty.call(config, 'key')) {
304
- children = getComponentNameFromType(type);
305
- var keys = Object.keys(config).filter(function (k) {
306
- return 'key' !== k;
307
- });
308
- isStaticChildren =
309
- 0 < keys.length
310
- ? '{key: someKey, ' + keys.join(': ..., ') + ': ...}'
311
- : '{key: someKey}';
312
- didWarnAboutKeySpread[children + isStaticChildren] ||
313
- ((keys =
314
- 0 < keys.length ? '{' + keys.join(': ..., ') + ': ...}' : '{}'),
315
- console.error(
316
- '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} />',
317
- isStaticChildren,
318
- children,
319
- keys,
320
- children
321
- ),
322
- (didWarnAboutKeySpread[children + isStaticChildren] = true));
323
- }
324
- children = null;
325
- void 0 !== maybeKey &&
326
- (checkKeyStringCoercion(maybeKey), (children = '' + maybeKey));
327
- hasValidKey(config) &&
328
- (checkKeyStringCoercion(config.key), (children = '' + config.key));
329
- if ('key' in config) {
330
- maybeKey = {};
331
- for (var propName in config)
332
- 'key' !== propName && (maybeKey[propName] = config[propName]);
333
- } else maybeKey = config;
334
- children &&
335
- defineKeyPropWarningGetter(
336
- maybeKey,
337
- 'function' === typeof type
338
- ? type.displayName || type.name || 'Unknown'
339
- : type
340
- );
341
- return ReactElement(
342
- type,
343
- children,
344
- self,
345
- source,
346
- getOwner(),
347
- maybeKey,
348
- debugStack,
349
- debugTask
350
- );
351
- }
352
- function validateChildKeys(node) {
353
- 'object' === typeof node &&
354
- null !== node &&
355
- node.$$typeof === REACT_ELEMENT_TYPE &&
356
- node._store &&
357
- (node._store.validated = 1);
358
- }
359
- var React = React__default,
360
- REACT_ELEMENT_TYPE = Symbol.for('react.transitional.element'),
361
- REACT_PORTAL_TYPE = Symbol.for('react.portal'),
362
- REACT_FRAGMENT_TYPE = Symbol.for('react.fragment'),
363
- REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode'),
364
- REACT_PROFILER_TYPE = Symbol.for('react.profiler');
365
- var REACT_CONSUMER_TYPE = Symbol.for('react.consumer'),
366
- REACT_CONTEXT_TYPE = Symbol.for('react.context'),
367
- REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref'),
368
- REACT_SUSPENSE_TYPE = Symbol.for('react.suspense'),
369
- REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list'),
370
- REACT_MEMO_TYPE = Symbol.for('react.memo'),
371
- REACT_LAZY_TYPE = Symbol.for('react.lazy'),
372
- REACT_ACTIVITY_TYPE = Symbol.for('react.activity'),
373
- REACT_CLIENT_REFERENCE = Symbol.for('react.client.reference'),
374
- ReactSharedInternals =
375
- React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
376
- hasOwnProperty = Object.prototype.hasOwnProperty,
377
- isArrayImpl = Array.isArray,
378
- createTask = console.createTask
379
- ? console.createTask
380
- : function () {
381
- return null;
382
- };
383
- React = {
384
- react_stack_bottom_frame: function (callStackForError) {
385
- return callStackForError();
386
- },
387
- };
388
- var specialPropKeyWarningShown;
389
- var didWarnAboutElementRef = {};
390
- var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(
391
- React,
392
- UnknownOwner
393
- )();
394
- var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
395
- var didWarnAboutKeySpread = {};
396
- reactJsxRuntime_development.Fragment = REACT_FRAGMENT_TYPE;
397
- reactJsxRuntime_development.jsx = function (
398
- type,
399
- config,
400
- maybeKey,
401
- source,
402
- self
403
- ) {
404
- var trackActualOwner =
405
- 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
406
- return jsxDEVImpl(
407
- type,
408
- config,
409
- maybeKey,
410
- false,
411
- source,
412
- self,
413
- trackActualOwner
414
- ? Error('react-stack-top-frame')
415
- : unknownOwnerDebugStack,
416
- trackActualOwner
417
- ? createTask(getTaskName(type))
418
- : unknownOwnerDebugTask
419
- );
420
- };
421
- reactJsxRuntime_development.jsxs = function (
422
- type,
423
- config,
424
- maybeKey,
425
- source,
426
- self
427
- ) {
428
- var trackActualOwner =
429
- 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
430
- return jsxDEVImpl(
431
- type,
432
- config,
433
- maybeKey,
434
- true,
435
- source,
436
- self,
437
- trackActualOwner
438
- ? Error('react-stack-top-frame')
439
- : unknownOwnerDebugStack,
440
- trackActualOwner
441
- ? createTask(getTaskName(type))
442
- : unknownOwnerDebugTask
443
- );
444
- };
445
- })();
446
- return reactJsxRuntime_development;
447
- }
448
-
449
- (function (module) {
450
- if (browser$1.env.NODE_ENV === 'production') {
451
- module.exports = requireReactJsxRuntime_production();
452
- } else {
453
- module.exports = requireReactJsxRuntime_development();
454
- }
455
- })(jsxRuntime);
456
-
457
14
  function EyeSlashIcon({ title, titleId, ...props }, svgRef) {
458
15
  return /*#__PURE__*/ React.createElement(
459
16
  'svg',
@@ -529,191 +86,77 @@ function EyeIcon({ title, titleId, ...props }, svgRef) {
529
86
  }
530
87
  const ForwardRef$4 = /*#__PURE__*/ React.forwardRef(EyeIcon);
531
88
 
532
- function _array_like_to_array(arr, len) {
533
- if (len == null || len > arr.length) len = arr.length;
534
- for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
535
- return arr2;
536
- }
537
- function _array_with_holes(arr) {
538
- if (Array.isArray(arr)) return arr;
539
- }
540
- function _define_property$2(obj, key, value) {
541
- if (key in obj) {
542
- Object.defineProperty(obj, key, {
543
- value: value,
544
- enumerable: true,
545
- configurable: true,
546
- writable: true,
547
- });
548
- } else {
549
- obj[key] = value;
550
- }
551
- return obj;
552
- }
553
- function _iterable_to_array_limit(arr, i) {
554
- var _i =
555
- arr == null
556
- ? null
557
- : (typeof Symbol !== 'undefined' && arr[Symbol.iterator]) ||
558
- arr['@@iterator'];
559
- if (_i == null) return;
560
- var _arr = [];
561
- var _n = true;
562
- var _d = false;
563
- var _s, _e;
564
- try {
565
- for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
566
- _arr.push(_s.value);
567
- if (i && _arr.length === i) break;
568
- }
569
- } catch (err) {
570
- _d = true;
571
- _e = err;
572
- } finally {
573
- try {
574
- if (!_n && _i['return'] != null) _i['return']();
575
- } finally {
576
- if (_d) throw _e;
577
- }
578
- }
579
- return _arr;
580
- }
581
- function _non_iterable_rest() {
582
- throw new TypeError(
583
- 'Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.'
584
- );
585
- }
586
- function _object_spread$2(target) {
587
- for (var i = 1; i < arguments.length; i++) {
588
- var source = arguments[i] != null ? arguments[i] : {};
589
- var ownKeys = Object.keys(source);
590
- if (typeof Object.getOwnPropertySymbols === 'function') {
591
- ownKeys = ownKeys.concat(
592
- Object.getOwnPropertySymbols(source).filter(function (sym) {
593
- return Object.getOwnPropertyDescriptor(source, sym).enumerable;
594
- })
595
- );
596
- }
597
- ownKeys.forEach(function (key) {
598
- _define_property$2(target, key, source[key]);
599
- });
600
- }
601
- return target;
602
- }
603
- function _sliced_to_array(arr, i) {
604
- return (
605
- _array_with_holes(arr) ||
606
- _iterable_to_array_limit(arr, i) ||
607
- _unsupported_iterable_to_array(arr, i) ||
608
- _non_iterable_rest()
609
- );
610
- }
611
- function _unsupported_iterable_to_array(o, minLen) {
612
- if (!o) return;
613
- if (typeof o === 'string') return _array_like_to_array(o, minLen);
614
- var n = Object.prototype.toString.call(o).slice(8, -1);
615
- if (n === 'Object' && o.constructor) n = o.constructor.name;
616
- if (n === 'Map' || n === 'Set') return Array.from(n);
617
- if (n === 'Arguments' || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
618
- return _array_like_to_array(o, minLen);
619
- }
620
- function InputField(param) {
621
- var id = param.id,
622
- label = param.label,
623
- register = param.register,
624
- type = param.type,
625
- required = param.required,
626
- _param_autoCompleteId = param.autoCompleteId,
627
- autoCompleteId =
628
- _param_autoCompleteId === void 0 ? 'off' : _param_autoCompleteId,
629
- _param_isPasswordField = param.isPasswordField,
630
- isPasswordField =
631
- _param_isPasswordField === void 0 ? false : _param_isPasswordField;
632
- var _useState = _sliced_to_array(useState(false), 2),
633
- isPasswordVisible = _useState[0],
634
- setIsPasswordVisible = _useState[1];
635
- return jsxRuntime.exports.jsxs('div', {
89
+ function InputField({
90
+ id,
91
+ label,
92
+ register,
93
+ type,
94
+ required,
95
+ autoCompleteId = 'off',
96
+ isPasswordField = false,
97
+ }) {
98
+ const [isPasswordVisible, setIsPasswordVisible] = useState(false);
99
+ return jsxs('div', {
636
100
  className: 'flex flex-col space-y-2',
637
101
  children: [
638
- jsxRuntime.exports.jsx('label', {
102
+ jsx('label', {
639
103
  htmlFor: id,
640
104
  className:
641
105
  'block ml-1 text-sm font-medium text-gray-700 dark:text-white',
642
106
  children: label,
643
107
  }),
644
108
  isPasswordField
645
- ? jsxRuntime.exports.jsxs('div', {
109
+ ? jsxs('div', {
646
110
  className: 'relative w-full',
647
111
  children: [
648
- jsxRuntime.exports.jsx(
649
- 'input',
650
- _object_spread$2(
651
- {
652
- id: id,
653
- required: required,
654
- type: isPasswordVisible ? 'text' : 'password',
655
- autoComplete: autoCompleteId,
656
- placeholder: label,
657
- className:
658
- 'w-full block py-3 pr-8 pl-3 text-gray-600 bg-white border-none rounded-lg shadow-sm shadow-input appearance-none focus:outline-none focus:ring-primary placeholder-gray-400 sm:text-sm dark:text-black dark:placeholder-gray-500 '.concat(
659
- type === 'number' ? 'text-right' : ''
660
- ),
661
- },
662
- register
663
- )
664
- ),
665
- jsxRuntime.exports.jsx('div', {
112
+ jsx('input', {
113
+ id: id,
114
+ required: required,
115
+ type: isPasswordVisible ? 'text' : 'password',
116
+ autoComplete: autoCompleteId,
117
+ placeholder: label,
118
+ className: `w-full block py-3 pr-8 pl-3 text-gray-600 bg-white border-none rounded-lg shadow-sm shadow-input appearance-none focus:outline-none focus:ring-primary placeholder-gray-400 sm:text-sm dark:text-black dark:placeholder-gray-500 ${type === 'number' ? 'text-right' : ''}`,
119
+ ...register,
120
+ }),
121
+ jsx('div', {
666
122
  className:
667
123
  'absolute top-1/2 right-2 w-5 h-5 -translate-y-1/2 text-text-color-300 hover:cursor-pointer',
668
124
  children: isPasswordVisible
669
- ? jsxRuntime.exports.jsx(ForwardRef$5, {
670
- onClick: function () {
125
+ ? jsx(ForwardRef$5, {
126
+ onClick: () => {
671
127
  setIsPasswordVisible(false);
672
128
  },
673
129
  })
674
- : jsxRuntime.exports.jsx(ForwardRef$4, {
675
- onClick: function () {
130
+ : jsx(ForwardRef$4, {
131
+ onClick: () => {
676
132
  setIsPasswordVisible(true);
677
133
  },
678
134
  }),
679
135
  }),
680
136
  ],
681
137
  })
682
- : jsxRuntime.exports.jsx(
683
- 'input',
684
- _object_spread$2(
685
- {
686
- id: id,
687
- required: required,
688
- type: type,
689
- autoComplete: autoCompleteId,
690
- placeholder: label,
691
- className:
692
- 'relative w-full block py-3 pr-10 pl-3 text-gray-600 bg-white border-none rounded-lg shadow-sm shadow-input appearance-none focus:outline-none focus:ring-primary placeholder-gray-400 sm:text-sm dark:text-black dark:placeholder-gray-500 '.concat(
693
- type === 'number' ? 'text-right' : ''
694
- ),
695
- },
696
- register
697
- )
698
- ),
138
+ : jsx('input', {
139
+ id: id,
140
+ required: required,
141
+ type: type,
142
+ autoComplete: autoCompleteId,
143
+ placeholder: label,
144
+ className: `relative w-full block py-3 pr-10 pl-3 text-gray-600 bg-white border-none rounded-lg shadow-sm shadow-input appearance-none focus:outline-none focus:ring-primary placeholder-gray-400 sm:text-sm dark:text-black dark:placeholder-gray-500 ${type === 'number' ? 'text-right' : ''}`,
145
+ ...register,
146
+ }),
699
147
  ],
700
148
  });
701
149
  }
702
150
 
703
- var SigninForm = function (param) {
704
- var mapText = param.mapText,
705
- onSubmit = param.onSubmit,
706
- errorMessage = param.errorMessage;
707
- var _useForm = useForm({
708
- shouldUseNativeValidation: true,
709
- }),
710
- register = _useForm.register,
711
- handleSubmit = _useForm.handleSubmit;
712
- return jsxRuntime.exports.jsxs('form', {
151
+ const SigninForm = ({ mapText, onSubmit, errorMessage }) => {
152
+ const { register, handleSubmit } = useForm({
153
+ shouldUseNativeValidation: true,
154
+ });
155
+ return jsxs('form', {
713
156
  onSubmit: handleSubmit(onSubmit),
714
157
  className: 'space-y-6',
715
158
  children: [
716
- jsxRuntime.exports.jsx(InputField, {
159
+ jsx(InputField, {
717
160
  id: 'email',
718
161
  label: mapText('auth:form.email.label'),
719
162
  type: 'text',
@@ -723,9 +166,9 @@ var SigninForm = function (param) {
723
166
  required: mapText('form.email.validations.required'),
724
167
  }),
725
168
  }),
726
- jsxRuntime.exports.jsx('div', {
169
+ jsx('div', {
727
170
  className: 'relative',
728
- children: jsxRuntime.exports.jsx(InputField, {
171
+ children: jsx(InputField, {
729
172
  id: 'password',
730
173
  label: mapText('auth:form.password.label'),
731
174
  type: 'password',
@@ -737,25 +180,25 @@ var SigninForm = function (param) {
737
180
  isPasswordField: true,
738
181
  }),
739
182
  }),
740
- jsxRuntime.exports.jsxs('div', {
183
+ jsxs('div', {
741
184
  children: [
742
- jsxRuntime.exports.jsx('button', {
185
+ jsx('button', {
743
186
  type: 'submit',
744
187
  className:
745
188
  'w-full flex justify-center px-4 py-3 text-sm font-medium text-white bg-[length:200%_200%] bg-primary-shimmer border-none border rounded-lg shadow-sm transition-transform animate-shimmerdelayed hover:scale-105 focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2',
746
189
  children: mapText('auth:form.submit.text'),
747
190
  }),
748
- jsxRuntime.exports.jsx('span', {
191
+ jsx('span', {
749
192
  className: 'block mt-2 text-sm font-medium text-red-500',
750
193
  children: errorMessage,
751
194
  }),
752
195
  ],
753
196
  }),
754
- jsxRuntime.exports.jsx('div', {
197
+ jsx('div', {
755
198
  className: 'flex justify-between items-center',
756
- children: jsxRuntime.exports.jsx('div', {
199
+ children: jsx('div', {
757
200
  className: 'text-sm',
758
- children: jsxRuntime.exports.jsx('a', {
201
+ children: jsx('a', {
759
202
  href: '',
760
203
  className:
761
204
  'font-medium text-primary transition-colors hover:text-primary-500 dark:text-white',
@@ -767,38 +210,33 @@ var SigninForm = function (param) {
767
210
  });
768
211
  };
769
212
 
770
- function SigninLayout(param) {
771
- var mapText = param.mapText,
772
- onSubmit = param.onSubmit,
773
- errorMessage = param.errorMessage;
774
- return jsxRuntime.exports.jsxs('div', {
213
+ function SigninLayout({ mapText, onSubmit, errorMessage }) {
214
+ return jsxs('div', {
775
215
  className: 'h-full flex flex-col sm:flex-row',
776
216
  children: [
777
- jsxRuntime.exports.jsx('div', {
217
+ jsx('div', {
778
218
  className:
779
219
  "relative w-auto h-full bg-[url('/assets/signup_cover.png')] bg-no-repeat bg-center bg-cover sm:flex-1",
780
220
  }),
781
- jsxRuntime.exports.jsx('div', {
221
+ jsx('div', {
782
222
  className:
783
223
  'flex-1 w-auto flex flex-col lg:flex-none max-sm:absolute max-sm:top-1/2 max-sm:left-1/2 max-sm:w-full max-sm:-translate-x-1/2 max-sm:-translate-y-1/2 max-sm:max-w-96 dark:sm:bg-base-900',
784
- children: jsxRuntime.exports.jsx('div', {
224
+ children: jsx('div', {
785
225
  className:
786
226
  'flex-1 flex flex-col p-4 sm:justify-center sm:px-6 sm:py-12 lg:px-20 xl:px-24 2xl:px-40 max-sm:px-5 max-sm:mx-5 max-sm:bg-white/80 max-sm:rounded-lg dark:max-sm:bg-base-900/80',
787
- children: jsxRuntime.exports.jsxs('div', {
227
+ children: jsxs('div', {
788
228
  className: 'w-full mx-auto lg:w-96 max-w-xl',
789
229
  children: [
790
- jsxRuntime.exports.jsx('h2', {
230
+ jsx('h2', {
791
231
  className:
792
232
  'mt-6 text-3xl font-extrabold text-gray-900 select-none dark:text-white',
793
233
  children: mapText('auth:page.title'),
794
234
  }),
795
- jsxRuntime.exports.jsx('div', {
235
+ jsx('div', {
796
236
  className: 'mt-10',
797
- children: jsxRuntime.exports.jsx(SigninForm, {
237
+ children: jsx(SigninForm, {
798
238
  mapText: mapText,
799
- onSubmit: function (values) {
800
- return onSubmit(values.email, values.password);
801
- },
239
+ onSubmit: (values) => onSubmit(values.email, values.password),
802
240
  errorMessage: errorMessage,
803
241
  }),
804
242
  }),
@@ -816,15 +254,14 @@ var UI = /*#__PURE__*/ Object.freeze({
816
254
  SigninLayout: SigninLayout,
817
255
  });
818
256
 
819
- function MainContentFrame(param) {
820
- var children = param.children;
821
- return jsxRuntime.exports.jsx('main', {
257
+ function MainContentFrame({ children }) {
258
+ return jsx('main', {
822
259
  className:
823
260
  'w-full pb-2 overflow-hidden bg-zinc-100 lg:pt-2 lg:pr-2 dark:bg-zinc-950',
824
- children: jsxRuntime.exports.jsx('div', {
261
+ children: jsx('div', {
825
262
  className:
826
263
  'w-full h-full p-6 content-canvas bg-white border-zinc-950/10 lg:p-10 lg:border lg:rounded-lg lg:shadow-xs dark:bg-zinc-900 dark:border-white/5',
827
- children: jsxRuntime.exports.jsx('div', {
264
+ children: jsx('div', {
828
265
  className: 'mx-auto max-w-[1400px]',
829
266
  children: children,
830
267
  }),
@@ -964,86 +401,86 @@ function ChevronRightIcon({ title, titleId, ...props }, svgRef) {
964
401
  }
965
402
  const ForwardRef = /*#__PURE__*/ React.forwardRef(ChevronRightIcon);
966
403
 
967
- function Pagination(param) {
968
- var currentPage = param.currentPage,
969
- totalPages = param.totalPages,
970
- hasPrevPage = param.hasPrevPage,
971
- hasNextPage = param.hasNextPage,
972
- goToFirstPage = param.goToFirstPage,
973
- goToPreviousPage = param.goToPreviousPage,
974
- goToNextPage = param.goToNextPage,
975
- goToLastPage = param.goToLastPage;
404
+ function Pagination({
405
+ currentPage,
406
+ totalPages,
407
+ hasPrevPage,
408
+ hasNextPage,
409
+ goToFirstPage,
410
+ goToPreviousPage,
411
+ goToNextPage,
412
+ goToLastPage,
413
+ }) {
976
414
  if (totalPages === 0) {
977
415
  return null;
978
416
  }
979
- return jsxRuntime.exports.jsxs('div', {
417
+ return jsxs('div', {
980
418
  className: 'w-full flex justify-center items-center gap-x-2 mt-6',
981
419
  children: [
982
- jsxRuntime.exports.jsxs('button', {
420
+ jsxs('button', {
983
421
  onClick: goToFirstPage,
984
422
  disabled: !hasPrevPage,
985
423
  className:
986
424
  'flex gap-0.5 px-4 py-2.5 text-sm text-white bg-primary-500 rounded-lg transition-colors disabled:bg-zinc-300 enabled:hover:bg-primary-400 dark:disabled:bg-zinc-800',
987
425
  children: [
988
- jsxRuntime.exports.jsx(ForwardRef$3, {
426
+ jsx(ForwardRef$3, {
989
427
  className: 'w-5 h-auto',
990
428
  }),
991
429
  'Erste',
992
430
  ],
993
431
  }),
994
- jsxRuntime.exports.jsxs('button', {
432
+ jsxs('button', {
995
433
  onClick: goToPreviousPage,
996
434
  disabled: !hasPrevPage,
997
435
  className:
998
436
  'flex gap-0.5 px-4 py-2.5 text-sm text-white bg-primary-500 rounded-lg transition-colors disabled:bg-zinc-300 enabled:hover:bg-primary-400 dark:disabled:bg-zinc-800',
999
437
  children: [
1000
- jsxRuntime.exports.jsx(ForwardRef$1, {
438
+ jsx(ForwardRef$1, {
1001
439
  className: 'w-5 h-auto',
1002
440
  }),
1003
- 'Zur\xfcck',
441
+ 'Zurück',
1004
442
  ],
1005
443
  }),
1006
- jsxRuntime.exports.jsxs('span', {
444
+ jsxs('span', {
1007
445
  className: 'px-3 text-sm text-black dark:text-white',
1008
446
  children: [
1009
447
  'Seite ',
1010
- jsxRuntime.exports.jsx('strong', {
448
+ jsx('strong', {
1011
449
  children: currentPage,
1012
450
  }),
1013
451
  ' von',
1014
452
  ' ',
1015
- jsxRuntime.exports.jsx('strong', {
453
+ jsx('strong', {
1016
454
  children:
1017
455
  totalPages !== null && totalPages !== void 0 ? totalPages : 1,
1018
456
  }),
1019
457
  ],
1020
458
  }),
1021
- jsxRuntime.exports.jsxs('button', {
459
+ jsxs('button', {
1022
460
  onClick: goToNextPage,
1023
461
  disabled: !hasNextPage,
1024
462
  className:
1025
463
  'flex gap-0.5 px-4 py-2.5 text-sm text-white bg-primary-500 rounded-lg transition-colors disabled:bg-zinc-300 enabled:hover:bg-primary-400 dark:disabled:bg-zinc-800',
1026
464
  children: [
1027
465
  'Weiter',
1028
- jsxRuntime.exports.jsx(ForwardRef, {
466
+ jsx(ForwardRef, {
1029
467
  className: 'w-5 h-5',
1030
468
  }),
1031
469
  ],
1032
470
  }),
1033
- jsxRuntime.exports.jsxs('button', {
1034
- onClick: function () {
1035
- return goToLastPage(
471
+ jsxs('button', {
472
+ onClick: () =>
473
+ goToLastPage(
1036
474
  totalPages !== null && totalPages !== void 0
1037
475
  ? totalPages
1038
476
  : currentPage
1039
- );
1040
- },
477
+ ),
1041
478
  disabled: !hasNextPage,
1042
479
  className:
1043
480
  'flex gap-0.5 px-4 py-2.5 text-sm text-white bg-primary-500 rounded-lg transition-colors disabled:bg-zinc-300 enabled:hover:bg-primary-400 dark:disabled:bg-zinc-800',
1044
481
  children: [
1045
482
  'Letzte',
1046
- jsxRuntime.exports.jsx(ForwardRef$2, {
483
+ jsx(ForwardRef$2, {
1047
484
  className: 'w-5 h-5',
1048
485
  }),
1049
486
  ],
@@ -1052,9 +489,8 @@ function Pagination(param) {
1052
489
  });
1053
490
  }
1054
491
 
1055
- function CancelButton(param) {
1056
- var onClick = param.onClick;
1057
- return jsxRuntime.exports.jsx('button', {
492
+ function CancelButton({ onClick }) {
493
+ return jsx('button', {
1058
494
  type: 'button',
1059
495
  className:
1060
496
  'px-5 py-1.5 isolate text-sm font-semibold text-white bg-zinc-500 rounded-lg transition-colors cursor-pointer hover:bg-zinc-400 ',
@@ -1063,10 +499,9 @@ function CancelButton(param) {
1063
499
  });
1064
500
  }
1065
501
 
1066
- function ErrorDisplay(param) {
1067
- var error = param.error;
502
+ function ErrorDisplay({ error }) {
1068
503
  if (!error) return null;
1069
- return jsxRuntime.exports.jsx('div', {
504
+ return jsx('div', {
1070
505
  className:
1071
506
  'error-display p-4 mb-4 text-red-700 bg-red-100 border rounded border-red-400',
1072
507
  children: error,
@@ -1074,10 +509,9 @@ function ErrorDisplay(param) {
1074
509
  }
1075
510
 
1076
511
  function HowToCloseText() {
1077
- return jsxRuntime.exports.jsx('p', {
512
+ return jsx('p', {
1078
513
  className: 'absolute top-full mt-2 text-xs text-black dark:text-white',
1079
- children:
1080
- 'Schlie\xdfen: au\xdferhalb klicken oder die Esc-Taste dr\xfccken',
514
+ children: 'Schließen: außerhalb klicken oder die Esc-Taste drücken',
1081
515
  });
1082
516
  }
1083
517
 
@@ -1100,22 +534,20 @@ function clsx() {
1100
534
  return n;
1101
535
  }
1102
536
 
1103
- function LoadingSpinner(param) {
1104
- var className = param.className,
1105
- innerClassName = param.innerClassName;
1106
- return jsxRuntime.exports.jsx('div', {
537
+ function LoadingSpinner({ className, innerClassName }) {
538
+ return jsx('div', {
1107
539
  className: clsx(
1108
540
  'loading-spinner w-full h-full flex flex-col justify-center items-center px-1',
1109
541
  className
1110
542
  ),
1111
- children: jsxRuntime.exports.jsx('div', {
543
+ children: jsx('div', {
1112
544
  'className': clsx(
1113
545
  'size-5 inline-block border-[3px] border-t-transparent rounded-full border-current animate-spin',
1114
546
  innerClassName
1115
547
  ),
1116
548
  'role': 'status',
1117
549
  'aria-label': 'loading',
1118
- 'children': jsxRuntime.exports.jsx('span', {
550
+ 'children': jsx('span', {
1119
551
  className: 'sr-only',
1120
552
  children: 'Loading...',
1121
553
  }),
@@ -1123,34 +555,25 @@ function LoadingSpinner(param) {
1123
555
  });
1124
556
  }
1125
557
 
1126
- function SaveButton(param) {
1127
- var isSaving = param.isSaving,
1128
- onClick = param.onClick,
1129
- disabled = param.disabled;
1130
- return jsxRuntime.exports.jsx('button', {
558
+ function SaveButton({ isSaving, onClick, disabled }) {
559
+ return jsx('button', {
1131
560
  type: 'submit',
1132
561
  className:
1133
562
  'px-5 py-1.5 isolate text-sm font-semibold text-white bg-primary-500 rounded-lg transition-colors cursor-pointer disabled:bg-zinc-300 disabled:cursor-default enabled:hover:bg-primary-400 dark:disabled:bg-zinc-800',
1134
563
  onClick: onClick,
1135
564
  disabled: disabled || isSaving,
1136
- children: isSaving ? jsxRuntime.exports.jsx(LoadingSpinner, {}) : 'Save',
565
+ children: isSaving ? jsx(LoadingSpinner, {}) : 'Save',
1137
566
  });
1138
567
  }
1139
568
 
1140
- function Textarea(param) {
1141
- var value = param.value,
1142
- onChange = param.onChange,
1143
- _param_rows = param.rows,
1144
- rows = _param_rows === void 0 ? 2 : _param_rows;
1145
- return jsxRuntime.exports.jsx('textarea', {
569
+ function Textarea({ value, onChange, rows = 2 }) {
570
+ return jsx('textarea', {
1146
571
  className: clsx(
1147
572
  'w-full block px-3 py-1.5 mt-3 text-sm/6 text-white bg-white/5 border-none rounded-lg'
1148
573
  ),
1149
574
  rows: rows,
1150
575
  value: value,
1151
- onChange: function (e) {
1152
- return onChange(e.target.value);
1153
- },
576
+ onChange: (e) => onChange(e.target.value),
1154
577
  });
1155
578
  }
1156
579
 
@@ -1167,49 +590,16 @@ var Util = /*#__PURE__*/ Object.freeze({
1167
590
  Textarea: Textarea,
1168
591
  });
1169
592
 
1170
- function _define_property$1(obj, key, value) {
1171
- if (key in obj) {
1172
- Object.defineProperty(obj, key, {
1173
- value: value,
1174
- enumerable: true,
1175
- configurable: true,
1176
- writable: true,
1177
- });
1178
- } else {
1179
- obj[key] = value;
1180
- }
1181
- return obj;
1182
- }
1183
- function _object_spread$1(target) {
1184
- for (var i = 1; i < arguments.length; i++) {
1185
- var source = arguments[i] != null ? arguments[i] : {};
1186
- var ownKeys = Object.keys(source);
1187
- if (typeof Object.getOwnPropertySymbols === 'function') {
1188
- ownKeys = ownKeys.concat(
1189
- Object.getOwnPropertySymbols(source).filter(function (sym) {
1190
- return Object.getOwnPropertyDescriptor(source, sym).enumerable;
1191
- })
1192
- );
1193
- }
1194
- ownKeys.forEach(function (key) {
1195
- _define_property$1(target, key, source[key]);
1196
- });
1197
- }
1198
- return target;
1199
- }
1200
- var TemplateParserContext = createContext({
1201
- parse: function () {
1202
- return String();
1203
- },
1204
- addToTemporaryView: function () {},
593
+ const TemplateParserContext = createContext({
594
+ parse: () => String(),
595
+ addToTemporaryView: () => {},
1205
596
  });
1206
- var TemplateParserProvider = function (props) {
597
+ const TemplateParserProvider = (props) => {
1207
598
  var _Intl_DateTimeFormat, _Intl;
1208
- var children = props.children;
1209
- props.navigationView;
1210
- var systemTimezone = 'Europe/Berlin';
1211
- var systemLocale = 'de-DE';
1212
- var timezone =
599
+ const { children, navigationView } = props;
600
+ const systemTimezone = 'Europe/Berlin';
601
+ const systemLocale = 'de-DE';
602
+ const timezone =
1213
603
  ((_Intl = Intl) === null || _Intl === void 0
1214
604
  ? void 0
1215
605
  : (_Intl_DateTimeFormat = _Intl.DateTimeFormat) === null ||
@@ -1217,13 +607,13 @@ var TemplateParserProvider = function (props) {
1217
607
  ? void 0
1218
608
  : _Intl_DateTimeFormat.call(_Intl).resolvedOptions().timeZone) ||
1219
609
  systemTimezone;
1220
- var locale =
610
+ const locale =
1221
611
  (Array.isArray(navigator.languages) && navigator.languages[0]) ||
1222
612
  navigator.language ||
1223
613
  systemLocale;
1224
- var temporaryView = useRef({});
1225
- var compiler = useRef(
1226
- new PatternCompiler(temporaryView.current, function (handlebars) {
614
+ const temporaryView = useRef({});
615
+ const compiler = useRef(
616
+ new PatternCompiler(temporaryView.current, (handlebars) => {
1227
617
  eqPlugin(handlebars);
1228
618
  stringPlugin(handlebars);
1229
619
  timezonePlugin(handlebars, {
@@ -1237,25 +627,25 @@ var TemplateParserProvider = function (props) {
1237
627
  urlPlugin(handlebars);
1238
628
  })
1239
629
  );
1240
- var parse = function (source, partialView) {
1241
- return compiler.current.compile(
1242
- source,
1243
- _object_spread$1({}, temporaryView.current, partialView)
1244
- );
630
+ const parse = (source, partialView) => {
631
+ return compiler.current.compile(source, {
632
+ ...temporaryView.current,
633
+ ...partialView,
634
+ });
1245
635
  };
1246
- var addToTemporaryView = function (key, value) {
636
+ const addToTemporaryView = (key, value) => {
1247
637
  temporaryView.current[key] = value;
1248
638
  };
1249
- return jsxRuntime.exports.jsx(TemplateParserContext.Provider, {
639
+ return jsx(TemplateParserContext.Provider, {
1250
640
  value: {
1251
- parse: parse,
1252
- addToTemporaryView: addToTemporaryView,
641
+ parse,
642
+ addToTemporaryView,
1253
643
  },
1254
644
  children: children,
1255
645
  });
1256
646
  };
1257
- var useTemplateParser = function () {
1258
- var context = useContext(TemplateParserContext);
647
+ const useTemplateParser = () => {
648
+ const context = useContext(TemplateParserContext);
1259
649
  if (context === undefined) {
1260
650
  throw new Error(
1261
651
  'useTemplateParser must be used within a TemplateParseProvider'
@@ -1270,37 +660,11 @@ var Ctx = /*#__PURE__*/ Object.freeze({
1270
660
  useTemplateParser: useTemplateParser,
1271
661
  });
1272
662
 
1273
- function _define_property(obj, key, value) {
1274
- if (key in obj) {
1275
- Object.defineProperty(obj, key, {
1276
- value: value,
1277
- enumerable: true,
1278
- configurable: true,
1279
- writable: true,
1280
- });
1281
- } else {
1282
- obj[key] = value;
1283
- }
1284
- return obj;
1285
- }
1286
- function _object_spread(target) {
1287
- for (var i = 1; i < arguments.length; i++) {
1288
- var source = arguments[i] != null ? arguments[i] : {};
1289
- var ownKeys = Object.keys(source);
1290
- if (typeof Object.getOwnPropertySymbols === 'function') {
1291
- ownKeys = ownKeys.concat(
1292
- Object.getOwnPropertySymbols(source).filter(function (sym) {
1293
- return Object.getOwnPropertyDescriptor(source, sym).enumerable;
1294
- })
1295
- );
1296
- }
1297
- ownKeys.forEach(function (key) {
1298
- _define_property(target, key, source[key]);
1299
- });
1300
- }
1301
- return target;
1302
- }
1303
- var index = _object_spread({}, UI, Util, Ctx);
663
+ var index = {
664
+ ...UI,
665
+ ...Util,
666
+ ...Ctx,
667
+ };
1304
668
 
1305
669
  export {
1306
670
  CancelButton,