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