@teach-in/react 1.0.0 → 1.2.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.
Files changed (120) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +9 -9
  3. package/dist/{chunk-AMNORHD6.mjs → chunk-2ASQXBDD.mjs} +1 -1
  4. package/dist/{chunk-3VAZY2QK.mjs → chunk-2CEZXLZR.mjs} +1 -1
  5. package/dist/chunk-2UHA3DYG.mjs +62 -0
  6. package/dist/{chunk-LJIVY6GU.mjs → chunk-46SKVFMZ.mjs} +1 -1
  7. package/dist/{chunk-JDFRAN4S.mjs → chunk-5FFWQB7D.mjs} +12 -2
  8. package/dist/chunk-C2VWADF5.mjs +34 -0
  9. package/dist/{chunk-NLHQDWUK.mjs → chunk-CKJ5U5Q4.mjs} +1 -1
  10. package/dist/chunk-CUEG2BFV.mjs +34 -0
  11. package/dist/{chunk-CETCW7DS.mjs → chunk-IU2JYI7W.mjs} +1 -1
  12. package/dist/{chunk-KTUGFQWJ.mjs → chunk-KTWHCUYV.mjs} +1 -1
  13. package/dist/chunk-M5G6RR4Q.mjs +39 -0
  14. package/dist/chunk-MCQGBAUS.mjs +73 -0
  15. package/dist/chunk-NSU66J5E.mjs +59 -0
  16. package/dist/{chunk-CFG5V7VB.mjs → chunk-QCLLPJMB.mjs} +2 -2
  17. package/dist/{chunk-R7LDL5CU.mjs → chunk-R46SWVWL.mjs} +1 -1
  18. package/dist/chunk-SEJXJZSK.mjs +64 -0
  19. package/dist/chunk-TUIN5YJW.mjs +33 -0
  20. package/dist/chunk-UQAG7TKJ.mjs +1 -0
  21. package/dist/chunk-VXYV37IM.mjs +74 -0
  22. package/dist/index.js +609 -228
  23. package/dist/index.mjs +106 -86
  24. package/dist/ui/data/index.mjs +10 -10
  25. package/dist/ui/feedback/index.mjs +8 -8
  26. package/dist/ui/form/index.js +447 -106
  27. package/dist/ui/form/index.mjs +25 -15
  28. package/dist/ui/form/rhf/fields/autocomplete-field.mjs +16 -10
  29. package/dist/ui/form/rhf/fields/checkbox-field.mjs +16 -10
  30. package/dist/ui/form/rhf/fields/date-picker-field.mjs +16 -10
  31. package/dist/ui/form/rhf/fields/email-field.js +147 -10
  32. package/dist/ui/form/rhf/fields/email-field.mjs +17 -11
  33. package/dist/ui/form/rhf/fields/index.d.ts +1 -0
  34. package/dist/ui/form/rhf/fields/index.js +443 -102
  35. package/dist/ui/form/rhf/fields/index.mjs +25 -15
  36. package/dist/ui/form/rhf/fields/input-field.js +153 -6
  37. package/dist/ui/form/rhf/fields/input-field.mjs +17 -11
  38. package/dist/ui/form/rhf/fields/radio-field.mjs +16 -10
  39. package/dist/ui/form/rhf/fields/search-field.d.ts +10 -0
  40. package/dist/ui/form/rhf/fields/search-field.js +296 -0
  41. package/dist/ui/form/rhf/fields/search-field.mjs +37 -0
  42. package/dist/ui/form/rhf/fields/select-field.js +136 -26
  43. package/dist/ui/form/rhf/fields/select-field.mjs +17 -11
  44. package/dist/ui/form/rhf/fields/switch-field.mjs +16 -10
  45. package/dist/ui/form/rhf/fields/text-field.js +147 -10
  46. package/dist/ui/form/rhf/fields/text-field.mjs +17 -11
  47. package/dist/ui/form/rhf/fields/textarea-field.mjs +16 -10
  48. package/dist/ui/form/rhf/index.js +443 -102
  49. package/dist/ui/form/rhf/index.mjs +25 -15
  50. package/dist/ui/format/index.d.ts +1 -0
  51. package/dist/ui/format/index.js +41 -5
  52. package/dist/ui/format/index.mjs +15 -11
  53. package/dist/ui/format/uuid.d.ts +12 -0
  54. package/dist/ui/format/uuid.js +62 -0
  55. package/dist/ui/format/uuid.mjs +7 -0
  56. package/dist/ui/index.js +609 -228
  57. package/dist/ui/index.mjs +106 -86
  58. package/dist/ui/inputs/clear-button.d.ts +5 -0
  59. package/dist/ui/inputs/clear-button.js +67 -0
  60. package/dist/ui/inputs/clear-button.mjs +8 -0
  61. package/dist/ui/inputs/email/email.js +144 -7
  62. package/dist/ui/inputs/email/email.mjs +4 -2
  63. package/dist/ui/inputs/email/index.js +144 -7
  64. package/dist/ui/inputs/email/index.mjs +4 -2
  65. package/dist/ui/inputs/index.d.ts +2 -0
  66. package/dist/ui/inputs/index.js +363 -56
  67. package/dist/ui/inputs/index.mjs +27 -15
  68. package/dist/ui/inputs/input/index.js +140 -3
  69. package/dist/ui/inputs/input/index.mjs +3 -1
  70. package/dist/ui/inputs/input/input.d.ts +1 -0
  71. package/dist/ui/inputs/input/input.js +140 -3
  72. package/dist/ui/inputs/input/input.mjs +3 -1
  73. package/dist/ui/inputs/input/use-input.d.ts +19 -0
  74. package/dist/ui/inputs/input/use-input.js +82 -0
  75. package/dist/ui/inputs/input/use-input.mjs +7 -0
  76. package/dist/ui/inputs/radio/index.mjs +3 -3
  77. package/dist/ui/inputs/search/index.d.ts +1 -0
  78. package/dist/ui/inputs/search/index.js +270 -0
  79. package/dist/ui/inputs/search/index.mjs +13 -0
  80. package/dist/ui/inputs/search/search.d.ts +7 -0
  81. package/dist/ui/inputs/search/search.js +268 -0
  82. package/dist/ui/inputs/search/search.mjs +12 -0
  83. package/dist/ui/inputs/search/use-search.d.ts +12 -0
  84. package/dist/ui/inputs/search/use-search.js +57 -0
  85. package/dist/ui/inputs/search/use-search.mjs +7 -0
  86. package/dist/ui/inputs/select/index.js +132 -22
  87. package/dist/ui/inputs/select/index.mjs +3 -1
  88. package/dist/ui/inputs/select/select.d.ts +4 -0
  89. package/dist/ui/inputs/select/select.js +132 -22
  90. package/dist/ui/inputs/select/select.mjs +3 -1
  91. package/dist/ui/inputs/select/use-select.d.ts +17 -0
  92. package/dist/ui/inputs/select/use-select.js +85 -0
  93. package/dist/ui/inputs/select/use-select.mjs +7 -0
  94. package/dist/ui/inputs/text/index.js +144 -7
  95. package/dist/ui/inputs/text/index.mjs +4 -2
  96. package/dist/ui/inputs/text/text.js +144 -7
  97. package/dist/ui/inputs/text/text.mjs +4 -2
  98. package/dist/ui/layout/container/container.mjs +56 -48
  99. package/dist/ui/layout/container/index.mjs +56 -48
  100. package/dist/ui/layout/index.mjs +62 -54
  101. package/dist/ui/layout/page/index.mjs +4 -4
  102. package/dist/ui/layout/page/page-loading.mjs +4 -4
  103. package/dist/ui/layout/page/section-loading.mjs +4 -4
  104. package/dist/ui/navigation/index.mjs +8 -8
  105. package/dist/ui/overlays/index.mjs +5 -5
  106. package/dist/ui/provider/index.mjs +4 -4
  107. package/dist/ui/provider/ui-provider.mjs +4 -4
  108. package/dist/ui/theme/colors/common.mjs +5 -5
  109. package/dist/ui/theme/colors/index.mjs +8 -8
  110. package/dist/ui/theme/colors/semantic.mjs +6 -6
  111. package/dist/ui/theme/colors.mjs +8 -8
  112. package/dist/ui/theme/index.mjs +8 -8
  113. package/dist/ui/theme/theme.mjs +8 -8
  114. package/package.json +1 -1
  115. package/dist/chunk-3YOW5DEZ.mjs +0 -45
  116. package/dist/chunk-V2G5QHZZ.mjs +0 -14
  117. package/dist/{chunk-5IHVMMCK.mjs → chunk-5N3SIZHF.mjs} +0 -0
  118. package/dist/{chunk-CZEO3U25.mjs → chunk-5RNCFTW5.mjs} +0 -0
  119. package/dist/{chunk-STVN4B47.mjs → chunk-IXPMUODA.mjs} +12 -12
  120. /package/dist/{chunk-Q6JSJOU4.mjs → chunk-PTCNYQVY.mjs} +0 -0
package/dist/ui/index.js CHANGED
@@ -49,6 +49,7 @@ __export(ui_exports, {
49
49
  CheckboxGroup: () => CheckboxGroup,
50
50
  Chip: () => Chip,
51
51
  CircularProgress: () => CircularProgress,
52
+ ClearButton: () => ClearButton,
52
53
  Container: () => Container,
53
54
  DatePicker: () => DatePicker,
54
55
  DatePickerField: () => DatePickerField,
@@ -68,10 +69,11 @@ __export(ui_exports, {
68
69
  FormatDate: () => DateFormat,
69
70
  FormatDatetime: () => Datetime,
70
71
  FormatDuration: () => Duration,
71
- FormatNumber: () => Number,
72
+ FormatNumber: () => Number2,
72
73
  FormatPercent: () => Percent,
73
74
  FormatPlural: () => Plural,
74
75
  FormatTime: () => Time,
76
+ FormatUUID: () => Uuid,
75
77
  Grid: () => Grid,
76
78
  Header: () => Header2,
77
79
  Image: () => Image,
@@ -96,6 +98,8 @@ __export(ui_exports, {
96
98
  RadioGroup: () => RadioGroup,
97
99
  Root: () => Root2,
98
100
  ScrollShadow: () => ScrollShadow,
101
+ Search: () => Search,
102
+ SearchField: () => SearchField,
99
103
  Section: () => Section,
100
104
  SectionActions: () => SectionActions,
101
105
  SectionHeader: () => SectionHeader,
@@ -349,58 +353,361 @@ var DatePicker = import_react16.default.forwardRef(
349
353
  DatePicker.displayName = "TeachInUI.DatePicker";
350
354
 
351
355
  // src/ui/inputs/email/email.tsx
352
- var import_react18 = __toESM(require("react"));
356
+ var import_react20 = __toESM(require("react"));
353
357
 
354
358
  // src/ui/inputs/input/input.tsx
355
- var import_react17 = __toESM(require("react"));
359
+ var import_react19 = __toESM(require("react"));
356
360
  var import_input = require("@heroui/input");
361
+ var import_tailwind_variants = require("tailwind-variants");
362
+
363
+ // src/ui/inputs/clear-button.tsx
364
+ var import_react17 = __toESM(require("react"));
365
+ var import_button3 = require("@heroui/button");
366
+ var import_lucide_react = require("lucide-react");
357
367
  var import_jsx_runtime17 = require("react/jsx-runtime");
358
- var Input = import_react17.default.forwardRef(({ ...props }, ref) => {
359
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_input.Input, { ref, ...props });
368
+ var ClearButton = import_react17.default.forwardRef(
369
+ ({ onClear }, ref) => {
370
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
371
+ import_button3.Button,
372
+ {
373
+ ref,
374
+ isIconOnly: true,
375
+ "aria-label": "\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C",
376
+ as: "span",
377
+ className: "opacity-0 transition-opacity group-hover:opacity-100",
378
+ color: "default",
379
+ radius: "full",
380
+ size: "sm",
381
+ tabIndex: 0,
382
+ variant: "light",
383
+ onPress: onClear,
384
+ children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react.XIcon, { className: "size-4 text-default-500" })
385
+ }
386
+ );
387
+ }
388
+ );
389
+ ClearButton.displayName = "TeachInUI.ClearButton";
390
+
391
+ // src/ui/inputs/input/use-input.ts
392
+ var import_react18 = require("react");
393
+ function useInput({
394
+ value,
395
+ defaultValue,
396
+ onValueChange,
397
+ onClear,
398
+ isReadOnly,
399
+ isClearable = true,
400
+ ref
401
+ }) {
402
+ const inputRef = (0, import_react18.useRef)(null);
403
+ const [internalValue, setInternalValue] = (0, import_react18.useState)(defaultValue != null ? defaultValue : "");
404
+ const isControlled = value !== void 0;
405
+ const currentValue = isControlled ? value : internalValue;
406
+ const hasValue = String(currentValue).length > 0;
407
+ const handleValueChange = (0, import_react18.useCallback)(
408
+ (newValue) => {
409
+ if (!isControlled) {
410
+ setInternalValue(newValue);
411
+ }
412
+ onValueChange == null ? void 0 : onValueChange(newValue);
413
+ },
414
+ [isControlled, onValueChange]
415
+ );
416
+ const handleClear = (0, import_react18.useCallback)(() => {
417
+ var _a;
418
+ onClear == null ? void 0 : onClear();
419
+ handleValueChange("");
420
+ (_a = inputRef.current) == null ? void 0 : _a.focus();
421
+ }, [onClear, handleValueChange]);
422
+ const mergedRef = (0, import_react18.useCallback)(
423
+ (node) => {
424
+ inputRef.current = node;
425
+ if (typeof ref === "function") {
426
+ ref(node);
427
+ } else if (ref) {
428
+ ref.current = node;
429
+ }
430
+ },
431
+ [ref]
432
+ );
433
+ const showClearButton = hasValue && !isReadOnly && isClearable;
434
+ return {
435
+ inputRef,
436
+ currentValue,
437
+ hasValue,
438
+ handleValueChange,
439
+ handleClear,
440
+ mergedRef,
441
+ showClearButton
442
+ };
443
+ }
444
+
445
+ // src/ui/inputs/input/input.tsx
446
+ var import_jsx_runtime18 = require("react/jsx-runtime");
447
+ var inputWrapperVariants = (0, import_tailwind_variants.tv)({
448
+ variants: {
449
+ variant: {
450
+ flat: "",
451
+ underlined: "",
452
+ bordered: "border-1",
453
+ faded: "border-1"
454
+ }
455
+ }
360
456
  });
457
+ var Input = import_react19.default.forwardRef(
458
+ ({
459
+ value,
460
+ defaultValue,
461
+ onClear,
462
+ onValueChange,
463
+ variant,
464
+ classNames,
465
+ endContent,
466
+ isReadOnly,
467
+ isClearable,
468
+ ...props
469
+ }, ref) => {
470
+ const { currentValue, handleValueChange, handleClear, mergedRef, showClearButton } = useInput({
471
+ value,
472
+ defaultValue,
473
+ onValueChange,
474
+ onClear,
475
+ isReadOnly,
476
+ isClearable,
477
+ ref
478
+ });
479
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
480
+ import_input.Input,
481
+ {
482
+ ref: mergedRef,
483
+ classNames: {
484
+ ...classNames,
485
+ inputWrapper: inputWrapperVariants({ variant }),
486
+ innerWrapper: "group"
487
+ },
488
+ defaultValue,
489
+ endContent: (endContent || showClearButton) && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex items-center gap-1", children: [
490
+ endContent,
491
+ showClearButton && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ClearButton, { onClear: handleClear })
492
+ ] }),
493
+ isReadOnly,
494
+ value: currentValue,
495
+ variant,
496
+ onValueChange: handleValueChange,
497
+ ...props
498
+ }
499
+ );
500
+ }
501
+ );
361
502
  Input.displayName = "TeachInUI.Input";
362
503
 
363
504
  // src/ui/inputs/email/email.tsx
364
- var import_jsx_runtime18 = require("react/jsx-runtime");
365
- var Email = import_react18.default.forwardRef(({ ...props }, ref) => {
366
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Input, { ref, autoComplete: "email", type: "email", ...props });
505
+ var import_jsx_runtime19 = require("react/jsx-runtime");
506
+ var Email = import_react20.default.forwardRef(({ ...props }, ref) => {
507
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Input, { ref, autoComplete: "email", type: "email", ...props });
367
508
  });
368
509
  Email.displayName = "TeachInUI.Email";
369
510
 
511
+ // src/ui/inputs/search/search.tsx
512
+ var import_react22 = __toESM(require("react"));
513
+ var import_lucide_react2 = require("lucide-react");
514
+ var import_button4 = require("@heroui/button");
515
+ var import_tailwind_variants2 = require("tailwind-variants");
516
+
517
+ // src/ui/inputs/search/use-search.ts
518
+ var import_react21 = require("react");
519
+ function useSearch({ value, onSearch, onCancel, onKeyDown }) {
520
+ const handleKeyDown = (0, import_react21.useCallback)(
521
+ (event) => {
522
+ if (event.key === "Enter") {
523
+ event.preventDefault();
524
+ onSearch == null ? void 0 : onSearch(event.target.value);
525
+ } else if (event.key === "Escape") {
526
+ event.preventDefault();
527
+ onCancel == null ? void 0 : onCancel();
528
+ }
529
+ onKeyDown == null ? void 0 : onKeyDown(event);
530
+ },
531
+ [onSearch, onCancel, onKeyDown]
532
+ );
533
+ const hasValue = value !== void 0 && String(value).length > 0;
534
+ const handleSearchClick = (0, import_react21.useCallback)(() => {
535
+ if (hasValue) {
536
+ onSearch == null ? void 0 : onSearch(value);
537
+ }
538
+ }, [value, onSearch]);
539
+ return {
540
+ handleKeyDown,
541
+ handleSearchClick,
542
+ hasValue
543
+ };
544
+ }
545
+
546
+ // src/ui/inputs/search/search.tsx
547
+ var import_jsx_runtime20 = require("react/jsx-runtime");
548
+ var searchIconVariants = (0, import_tailwind_variants2.tv)({
549
+ base: "size-5 shrink-0",
550
+ variants: {
551
+ variant: {
552
+ faded: "text-default-400",
553
+ flat: "text-default-foreground",
554
+ bordered: "text-default-400",
555
+ underlined: "text-default-foreground"
556
+ }
557
+ }
558
+ });
559
+ var Search = import_react22.default.forwardRef(
560
+ ({ variant = "bordered", radius = "full", value, onSearch, onCancel, onKeyDown, ...props }, ref) => {
561
+ const { handleKeyDown, handleSearchClick, hasValue } = useSearch({
562
+ value,
563
+ onSearch,
564
+ onCancel,
565
+ onKeyDown
566
+ });
567
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
568
+ Input,
569
+ {
570
+ ref,
571
+ radius,
572
+ startContent: onSearch ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
573
+ import_button4.Button,
574
+ {
575
+ isIconOnly: true,
576
+ "aria-label": "\u041F\u043E\u0438\u0441\u043A",
577
+ isDisabled: !hasValue,
578
+ radius: "full",
579
+ size: "sm",
580
+ variant: "light",
581
+ onPress: handleSearchClick,
582
+ children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react2.SearchIcon, { className: searchIconVariants({ variant }) })
583
+ }
584
+ ) : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react2.SearchIcon, { className: searchIconVariants({ variant }) }),
585
+ value,
586
+ variant,
587
+ onKeyDown: handleKeyDown,
588
+ ...props
589
+ }
590
+ );
591
+ }
592
+ );
593
+ Search.displayName = "TeachInUI.Search";
594
+
370
595
  // src/ui/inputs/select/select.tsx
371
- var import_react19 = __toESM(require("react"));
596
+ var import_react24 = __toESM(require("react"));
372
597
  var import_select = require("@heroui/select");
373
- var import_jsx_runtime19 = require("react/jsx-runtime");
374
- var Select = import_react19.default.forwardRef(
375
- ({ value, items, onChange, selectionMode, ...props }, ref) => {
376
- const isMultiple = selectionMode === "multiple";
377
- const selectedKeys = import_react19.default.useMemo(() => {
378
- if (value == null) return /* @__PURE__ */ new Set();
379
- return new Set(Array.isArray(value) ? value : [value]);
380
- }, [value]);
381
- const handleSelectionChange = import_react19.default.useCallback(
382
- (keys) => {
383
- var _a;
384
- if (keys === "all") return;
385
- const selected = Array.from(keys).filter((key) => typeof key === "string");
386
- if (isMultiple) {
387
- onChange == null ? void 0 : onChange(selected);
388
- } else {
389
- onChange == null ? void 0 : onChange((_a = selected[0]) != null ? _a : null);
390
- }
391
- },
392
- [onChange, isMultiple]
393
- );
394
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
598
+ var import_tailwind_variants3 = require("tailwind-variants");
599
+
600
+ // src/ui/inputs/select/use-select.ts
601
+ var import_react23 = require("react");
602
+ function useSelect({
603
+ value,
604
+ onChange,
605
+ onClear,
606
+ selectionMode,
607
+ isClearable = true
608
+ }) {
609
+ const isMultiple = selectionMode === "multiple";
610
+ const [internalValue, setInternalValue] = (0, import_react23.useState)(
611
+ isMultiple ? [] : null
612
+ );
613
+ const isControlled = value !== void 0;
614
+ const currentValue = isControlled ? value : internalValue;
615
+ const hasValue = currentValue != null && (Array.isArray(currentValue) ? currentValue.length > 0 : currentValue !== "");
616
+ const handleChange = (0, import_react23.useCallback)(
617
+ (newValue) => {
618
+ if (!isControlled) {
619
+ setInternalValue(newValue);
620
+ }
621
+ if (isMultiple) {
622
+ onChange == null ? void 0 : onChange(newValue);
623
+ } else {
624
+ onChange == null ? void 0 : onChange(newValue);
625
+ }
626
+ },
627
+ [isControlled, onChange, isMultiple]
628
+ );
629
+ const handleClear = (0, import_react23.useCallback)(() => {
630
+ onClear == null ? void 0 : onClear();
631
+ handleChange(isMultiple ? [] : null);
632
+ }, [onClear, handleChange, isMultiple]);
633
+ const selectedKeys = (0, import_react23.useMemo)(() => {
634
+ if (currentValue == null) return /* @__PURE__ */ new Set();
635
+ return new Set(Array.isArray(currentValue) ? currentValue : [currentValue]);
636
+ }, [currentValue]);
637
+ const handleSelectionChange = (0, import_react23.useCallback)(
638
+ (keys) => {
639
+ var _a;
640
+ if (keys === "all") return;
641
+ const selected = Array.from(keys).filter((key) => typeof key === "string");
642
+ handleChange(isMultiple ? selected : (_a = selected[0]) != null ? _a : null);
643
+ },
644
+ [handleChange, isMultiple]
645
+ );
646
+ const showClearButton = hasValue && isClearable;
647
+ return {
648
+ currentValue,
649
+ hasValue,
650
+ selectedKeys,
651
+ handleSelectionChange,
652
+ handleClear,
653
+ showClearButton
654
+ };
655
+ }
656
+
657
+ // src/ui/inputs/select/select.tsx
658
+ var import_jsx_runtime21 = require("react/jsx-runtime");
659
+ var selectWrapperVariants = (0, import_tailwind_variants3.tv)({
660
+ variants: {
661
+ variant: {
662
+ flat: "",
663
+ underlined: "",
664
+ bordered: "border-1",
665
+ faded: "border-1"
666
+ }
667
+ }
668
+ });
669
+ var Select = import_react24.default.forwardRef(
670
+ ({
671
+ value,
672
+ defaultSelectedKeys,
673
+ items,
674
+ onChange,
675
+ selectionMode,
676
+ onClear,
677
+ variant,
678
+ classNames,
679
+ endContent,
680
+ isClearable,
681
+ ...props
682
+ }, ref) => {
683
+ const { selectedKeys, handleSelectionChange, handleClear, showClearButton } = useSelect({
684
+ value,
685
+ onChange,
686
+ onClear,
687
+ selectionMode,
688
+ isClearable
689
+ });
690
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
395
691
  import_select.Select,
396
692
  {
397
693
  ref,
694
+ classNames: {
695
+ ...classNames,
696
+ trigger: selectWrapperVariants({ variant }),
697
+ innerWrapper: "group"
698
+ },
699
+ defaultSelectedKeys,
700
+ endContent: (endContent || showClearButton) && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex items-center gap-1", children: [
701
+ endContent,
702
+ showClearButton && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ClearButton, { onClear: handleClear })
703
+ ] }),
398
704
  items,
399
705
  selectedKeys,
400
706
  selectionMode,
707
+ variant,
401
708
  onSelectionChange: handleSelectionChange,
402
709
  ...props,
403
- children: (item) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_select.SelectItem, { children: item.label }, item.key)
710
+ children: (item) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_select.SelectItem, { children: item.label }, item.key)
404
711
  }
405
712
  );
406
713
  }
@@ -408,20 +715,20 @@ var Select = import_react19.default.forwardRef(
408
715
  Select.displayName = "TeachInUI.Select";
409
716
 
410
717
  // src/ui/inputs/switch/switch.tsx
411
- var import_react20 = __toESM(require("react"));
718
+ var import_react25 = __toESM(require("react"));
412
719
  var import_switch = require("@heroui/switch");
413
- var import_jsx_runtime20 = require("react/jsx-runtime");
414
- var Switch = import_react20.default.forwardRef(({ ...props }, ref) => {
415
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_switch.Switch, { ref, ...props });
720
+ var import_jsx_runtime22 = require("react/jsx-runtime");
721
+ var Switch = import_react25.default.forwardRef(({ ...props }, ref) => {
722
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_switch.Switch, { ref, ...props });
416
723
  });
417
724
  Switch.displayName = "TeachInUI.Switch";
418
725
 
419
726
  // src/ui/inputs/switch/favorite-switch.tsx
420
727
  var import_switch2 = require("@heroui/switch");
421
- var import_lucide_react = require("lucide-react");
422
- var import_tailwind_variants = require("tailwind-variants");
423
- var import_jsx_runtime21 = require("react/jsx-runtime");
424
- var bookmarkVariants = (0, import_tailwind_variants.tv)({
728
+ var import_lucide_react3 = require("lucide-react");
729
+ var import_tailwind_variants4 = require("tailwind-variants");
730
+ var import_jsx_runtime23 = require("react/jsx-runtime");
731
+ var bookmarkVariants = (0, import_tailwind_variants4.tv)({
425
732
  base: "size-6 stroke-default-400 group-hover:fill-primary-100 group-hover:stroke-default-400",
426
733
  variants: {
427
734
  isSelected: {
@@ -434,16 +741,16 @@ function FavoriteSwitch({ isSelected, onValueChange }) {
434
741
  isSelected,
435
742
  onValueChange
436
743
  });
437
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Component, { ...getBaseProps(), children: [
438
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "sr-only", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("input", { ...getInputProps() }) }),
439
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
744
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Component, { ...getBaseProps(), children: [
745
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "sr-only", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("input", { ...getInputProps() }) }),
746
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
440
747
  "div",
441
748
  {
442
749
  ...getWrapperProps(),
443
750
  className: slots.wrapper({
444
751
  class: "flex h-8 w-8 cursor-pointer items-center justify-center rounded-sm !bg-transparent"
445
752
  }),
446
- children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_lucide_react.Bookmark, { className: bookmarkVariants({ isSelected }) })
753
+ children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lucide_react3.Bookmark, { className: bookmarkVariants({ isSelected }) })
447
754
  }
448
755
  )
449
756
  ] });
@@ -454,45 +761,55 @@ var import_radio = require("@heroui/radio");
454
761
  var Radio = Object.assign(import_radio.Radio, { displayName: "TeachInUI.Radio" });
455
762
 
456
763
  // src/ui/inputs/radio/radio-group.tsx
457
- var import_react21 = __toESM(require("react"));
764
+ var import_react26 = __toESM(require("react"));
458
765
  var import_radio2 = require("@heroui/radio");
459
- var import_jsx_runtime22 = require("react/jsx-runtime");
460
- var RadioGroup = import_react21.default.forwardRef(
766
+ var import_jsx_runtime24 = require("react/jsx-runtime");
767
+ var RadioGroup = import_react26.default.forwardRef(
461
768
  (props, ref) => {
462
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_radio2.RadioGroup, { ref, ...props });
769
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_radio2.RadioGroup, { ref, ...props });
463
770
  }
464
771
  );
465
772
  RadioGroup.displayName = "TeachInUI.RadioGroup";
466
773
 
467
774
  // src/ui/inputs/text/text.tsx
468
- var import_react22 = __toESM(require("react"));
469
- var import_jsx_runtime23 = require("react/jsx-runtime");
470
- var Text = import_react22.default.forwardRef(({ ...props }, ref) => {
471
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Input, { ref, type: "text", ...props });
775
+ var import_react27 = __toESM(require("react"));
776
+ var import_jsx_runtime25 = require("react/jsx-runtime");
777
+ var Text = import_react27.default.forwardRef(({ ...props }, ref) => {
778
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Input, { ref, type: "text", ...props });
472
779
  });
473
780
  Text.displayName = "TeachInUI.Text";
474
781
 
475
782
  // src/ui/inputs/textarea/textarea.tsx
476
- var import_input5 = require("@heroui/input");
477
- var import_react23 = __toESM(require("react"));
478
- var import_jsx_runtime24 = require("react/jsx-runtime");
479
- var Textarea = import_react23.default.forwardRef(
783
+ var import_input6 = require("@heroui/input");
784
+ var import_react28 = __toESM(require("react"));
785
+ var import_jsx_runtime26 = require("react/jsx-runtime");
786
+ var Textarea = import_react28.default.forwardRef(
480
787
  ({ minRows = 4, ...props }, ref) => {
481
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_input5.Textarea, { ref, minRows, ...props });
788
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_input6.Textarea, { ref, minRows, ...props });
482
789
  }
483
790
  );
484
791
  Textarea.displayName = "TeachInUI.Textarea";
485
792
 
486
793
  // src/ui/form/rhf/fields/input-field.tsx
487
- var import_jsx_runtime25 = require("react/jsx-runtime");
794
+ var import_jsx_runtime27 = require("react/jsx-runtime");
488
795
  function InputField({ name, ...props }) {
489
796
  const { control } = (0, import_react_hook_form.useFormContext)();
490
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
797
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
491
798
  import_react_hook_form.Controller,
492
799
  {
493
800
  control,
494
801
  name,
495
- render: ({ field: { ref, ...field }, fieldState: { error } }) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Input, { ...props, ...field, ref, errorMessage: error == null ? void 0 : error.message, isInvalid: !!error })
802
+ render: ({ field: { ref, ...field }, fieldState: { error } }) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
803
+ Input,
804
+ {
805
+ ...props,
806
+ ...field,
807
+ ref,
808
+ errorMessage: error == null ? void 0 : error.message,
809
+ isInvalid: !!error,
810
+ onValueChange: field.onChange
811
+ }
812
+ )
496
813
  }
497
814
  );
498
815
  }
@@ -500,15 +817,15 @@ InputField.displayName = "TeachInUI.InputField";
500
817
 
501
818
  // src/ui/form/rhf/fields/text-field.tsx
502
819
  var import_react_hook_form2 = require("react-hook-form");
503
- var import_jsx_runtime26 = require("react/jsx-runtime");
820
+ var import_jsx_runtime28 = require("react/jsx-runtime");
504
821
  function TextField({ name, ...props }) {
505
822
  const { control } = (0, import_react_hook_form2.useFormContext)();
506
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
823
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
507
824
  import_react_hook_form2.Controller,
508
825
  {
509
826
  control,
510
827
  name,
511
- render: ({ field: { ref, ...field }, fieldState: { error } }) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Text, { ...props, ...field, ref, errorMessage: error == null ? void 0 : error.message, isInvalid: !!error })
828
+ render: ({ field: { ref, ...field }, fieldState: { error } }) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Text, { ...props, ...field, ref, errorMessage: error == null ? void 0 : error.message, isInvalid: !!error })
512
829
  }
513
830
  );
514
831
  }
@@ -516,31 +833,57 @@ TextField.displayName = "TeachInUI.TextField";
516
833
 
517
834
  // src/ui/form/rhf/fields/email-field.tsx
518
835
  var import_react_hook_form3 = require("react-hook-form");
519
- var import_jsx_runtime27 = require("react/jsx-runtime");
836
+ var import_jsx_runtime29 = require("react/jsx-runtime");
520
837
  function EmailField({ name, ...props }) {
521
838
  const { control } = (0, import_react_hook_form3.useFormContext)();
522
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
839
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
523
840
  import_react_hook_form3.Controller,
524
841
  {
525
842
  control,
526
843
  name,
527
- render: ({ field: { ref, ...field }, fieldState: { error } }) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Email, { ...props, ...field, ref, errorMessage: error == null ? void 0 : error.message, isInvalid: !!error })
844
+ render: ({ field: { ref, ...field }, fieldState: { error } }) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Email, { ...props, ...field, ref, errorMessage: error == null ? void 0 : error.message, isInvalid: !!error })
528
845
  }
529
846
  );
530
847
  }
531
848
  EmailField.displayName = "TeachInUI.EmailField";
532
849
 
533
- // src/ui/form/rhf/fields/textarea-field.tsx
850
+ // src/ui/form/rhf/fields/search-field.tsx
534
851
  var import_react_hook_form4 = require("react-hook-form");
535
- var import_jsx_runtime28 = require("react/jsx-runtime");
536
- function TextareaField({ name, ...props }) {
852
+ var import_jsx_runtime30 = require("react/jsx-runtime");
853
+ function SearchField({ name, ...props }) {
537
854
  const { control } = (0, import_react_hook_form4.useFormContext)();
538
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
855
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
539
856
  import_react_hook_form4.Controller,
540
857
  {
541
858
  control,
542
859
  name,
543
- render: ({ field: { ref, ...field }, fieldState: { error } }) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
860
+ render: ({ field: { ref, ...field }, fieldState: { error } }) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
861
+ Search,
862
+ {
863
+ ...props,
864
+ ...field,
865
+ ref,
866
+ errorMessage: error == null ? void 0 : error.message,
867
+ isInvalid: !!error,
868
+ onValueChange: field.onChange
869
+ }
870
+ )
871
+ }
872
+ );
873
+ }
874
+ SearchField.displayName = "TeachInUI.SearchField";
875
+
876
+ // src/ui/form/rhf/fields/textarea-field.tsx
877
+ var import_react_hook_form5 = require("react-hook-form");
878
+ var import_jsx_runtime31 = require("react/jsx-runtime");
879
+ function TextareaField({ name, ...props }) {
880
+ const { control } = (0, import_react_hook_form5.useFormContext)();
881
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
882
+ import_react_hook_form5.Controller,
883
+ {
884
+ control,
885
+ name,
886
+ render: ({ field: { ref, ...field }, fieldState: { error } }) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
544
887
  Textarea,
545
888
  {
546
889
  ...props,
@@ -556,16 +899,16 @@ function TextareaField({ name, ...props }) {
556
899
  TextareaField.displayName = "TeachInUI.TextareaField";
557
900
 
558
901
  // src/ui/form/rhf/fields/select-field.tsx
559
- var import_react_hook_form5 = require("react-hook-form");
560
- var import_jsx_runtime29 = require("react/jsx-runtime");
902
+ var import_react_hook_form6 = require("react-hook-form");
903
+ var import_jsx_runtime32 = require("react/jsx-runtime");
561
904
  function SelectField({ name, selectionMode, ...props }) {
562
- const { control } = (0, import_react_hook_form5.useFormContext)();
563
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
564
- import_react_hook_form5.Controller,
905
+ const { control } = (0, import_react_hook_form6.useFormContext)();
906
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
907
+ import_react_hook_form6.Controller,
565
908
  {
566
909
  control,
567
910
  name,
568
- render: ({ field, fieldState: { error } }) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
911
+ render: ({ field, fieldState: { error } }) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
569
912
  Select,
570
913
  {
571
914
  selectionMode,
@@ -582,16 +925,16 @@ function SelectField({ name, selectionMode, ...props }) {
582
925
  SelectField.displayName = "TeachInUI.SelectField";
583
926
 
584
927
  // src/ui/form/rhf/fields/autocomplete-field.tsx
585
- var import_react_hook_form6 = require("react-hook-form");
586
- var import_jsx_runtime30 = require("react/jsx-runtime");
928
+ var import_react_hook_form7 = require("react-hook-form");
929
+ var import_jsx_runtime33 = require("react/jsx-runtime");
587
930
  function AutocompleteField({ name, ...props }) {
588
- const { control } = (0, import_react_hook_form6.useFormContext)();
589
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
590
- import_react_hook_form6.Controller,
931
+ const { control } = (0, import_react_hook_form7.useFormContext)();
932
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
933
+ import_react_hook_form7.Controller,
591
934
  {
592
935
  control,
593
936
  name,
594
- render: ({ field, fieldState: { error } }) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
937
+ render: ({ field, fieldState: { error } }) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
595
938
  Autocomplete,
596
939
  {
597
940
  ...props,
@@ -607,16 +950,16 @@ function AutocompleteField({ name, ...props }) {
607
950
  AutocompleteField.displayName = "TeachInUI.AutocompleteField";
608
951
 
609
952
  // src/ui/form/rhf/fields/date-picker-field.tsx
610
- var import_react_hook_form7 = require("react-hook-form");
611
- var import_jsx_runtime31 = require("react/jsx-runtime");
953
+ var import_react_hook_form8 = require("react-hook-form");
954
+ var import_jsx_runtime34 = require("react/jsx-runtime");
612
955
  function DatePickerField({ name, ...props }) {
613
- const { control } = (0, import_react_hook_form7.useFormContext)();
614
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
615
- import_react_hook_form7.Controller,
956
+ const { control } = (0, import_react_hook_form8.useFormContext)();
957
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
958
+ import_react_hook_form8.Controller,
616
959
  {
617
960
  control,
618
961
  name,
619
- render: ({ field: { ref, ...field }, fieldState: { error } }) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
962
+ render: ({ field: { ref, ...field }, fieldState: { error } }) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
620
963
  DatePicker,
621
964
  {
622
965
  ...props,
@@ -632,18 +975,18 @@ function DatePickerField({ name, ...props }) {
632
975
  DatePickerField.displayName = "TeachInUI.DatePickerField";
633
976
 
634
977
  // src/ui/form/rhf/fields/checkbox-field.tsx
635
- var import_react_hook_form8 = require("react-hook-form");
636
- var import_jsx_runtime32 = require("react/jsx-runtime");
978
+ var import_react_hook_form9 = require("react-hook-form");
979
+ var import_jsx_runtime35 = require("react/jsx-runtime");
637
980
  function CheckboxField({ name, ...props }) {
638
- const { control } = (0, import_react_hook_form8.useFormContext)();
639
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
640
- import_react_hook_form8.Controller,
981
+ const { control } = (0, import_react_hook_form9.useFormContext)();
982
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
983
+ import_react_hook_form9.Controller,
641
984
  {
642
985
  control,
643
986
  name,
644
- render: ({ field, fieldState: { error } }) => /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { children: [
645
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Checkbox, { ...props, isSelected: field.value, onValueChange: field.onChange }),
646
- error && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "text-tiny text-danger", children: error.message })
987
+ render: ({ field, fieldState: { error } }) => /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { children: [
988
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Checkbox, { ...props, isSelected: field.value, onValueChange: field.onChange }),
989
+ error && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "text-tiny text-danger", children: error.message })
647
990
  ] })
648
991
  }
649
992
  );
@@ -651,18 +994,18 @@ function CheckboxField({ name, ...props }) {
651
994
  CheckboxField.displayName = "TeachInUI.CheckboxField";
652
995
 
653
996
  // src/ui/form/rhf/fields/switch-field.tsx
654
- var import_react_hook_form9 = require("react-hook-form");
655
- var import_jsx_runtime33 = require("react/jsx-runtime");
997
+ var import_react_hook_form10 = require("react-hook-form");
998
+ var import_jsx_runtime36 = require("react/jsx-runtime");
656
999
  function SwitchField({ name, ...props }) {
657
- const { control } = (0, import_react_hook_form9.useFormContext)();
658
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
659
- import_react_hook_form9.Controller,
1000
+ const { control } = (0, import_react_hook_form10.useFormContext)();
1001
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
1002
+ import_react_hook_form10.Controller,
660
1003
  {
661
1004
  control,
662
1005
  name,
663
- render: ({ field, fieldState: { error } }) => /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { children: [
664
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Switch, { ...props, isSelected: field.value, onValueChange: field.onChange }),
665
- error && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "text-tiny text-danger", children: error.message })
1006
+ render: ({ field, fieldState: { error } }) => /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { children: [
1007
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Switch, { ...props, isSelected: field.value, onValueChange: field.onChange }),
1008
+ error && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "text-tiny text-danger", children: error.message })
666
1009
  ] })
667
1010
  }
668
1011
  );
@@ -670,16 +1013,16 @@ function SwitchField({ name, ...props }) {
670
1013
  SwitchField.displayName = "TeachInUI.SwitchField";
671
1014
 
672
1015
  // src/ui/form/rhf/fields/radio-field.tsx
673
- var import_react_hook_form10 = require("react-hook-form");
674
- var import_jsx_runtime34 = require("react/jsx-runtime");
1016
+ var import_react_hook_form11 = require("react-hook-form");
1017
+ var import_jsx_runtime37 = require("react/jsx-runtime");
675
1018
  function RadioField({ name, ...props }) {
676
- const { control } = (0, import_react_hook_form10.useFormContext)();
677
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
678
- import_react_hook_form10.Controller,
1019
+ const { control } = (0, import_react_hook_form11.useFormContext)();
1020
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
1021
+ import_react_hook_form11.Controller,
679
1022
  {
680
1023
  control,
681
1024
  name,
682
- render: ({ field: { ref, value, onChange, ...field }, fieldState: { error } }) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
1025
+ render: ({ field: { ref, value, onChange, ...field }, fieldState: { error } }) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
683
1026
  RadioGroup,
684
1027
  {
685
1028
  ...props,
@@ -698,15 +1041,15 @@ RadioField.displayName = "TeachInUI.RadioField";
698
1041
 
699
1042
  // src/ui/form/form.tsx
700
1043
  var import_form = require("@heroui/form");
701
- var import_react24 = __toESM(require("react"));
702
- var import_jsx_runtime35 = require("react/jsx-runtime");
703
- var Form = import_react24.default.forwardRef(({ ...props }, ref) => {
704
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_form.Form, { ref, ...props });
1044
+ var import_react29 = __toESM(require("react"));
1045
+ var import_jsx_runtime38 = require("react/jsx-runtime");
1046
+ var Form = import_react29.default.forwardRef(({ ...props }, ref) => {
1047
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_form.Form, { ref, ...props });
705
1048
  });
706
1049
  Form.displayName = "TeachInUI.Form";
707
1050
 
708
1051
  // src/ui/format/datetime.tsx
709
- var import_jsx_runtime36 = require("react/jsx-runtime");
1052
+ var import_jsx_runtime39 = require("react/jsx-runtime");
710
1053
  var defaultFormat = {
711
1054
  day: "numeric",
712
1055
  month: "long",
@@ -722,15 +1065,15 @@ function Datetime({
722
1065
  fallback = "\u2014"
723
1066
  }) {
724
1067
  const formatter = new Intl.DateTimeFormat(locale, format);
725
- if (!value) return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_jsx_runtime36.Fragment, { children: fallback });
1068
+ if (!value) return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_jsx_runtime39.Fragment, { children: fallback });
726
1069
  const date = value instanceof Date ? value : new Date(value);
727
- if (isNaN(date.getTime())) return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_jsx_runtime36.Fragment, { children: fallback });
728
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_jsx_runtime36.Fragment, { children: formatter.format(date) });
1070
+ if (isNaN(date.getTime())) return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_jsx_runtime39.Fragment, { children: fallback });
1071
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_jsx_runtime39.Fragment, { children: formatter.format(date) });
729
1072
  }
730
1073
  Datetime.displayName = "TeachInUI.FormatDatetime";
731
1074
 
732
1075
  // src/ui/format/date.tsx
733
- var import_jsx_runtime37 = require("react/jsx-runtime");
1076
+ var import_jsx_runtime40 = require("react/jsx-runtime");
734
1077
  var defaultFormat2 = {
735
1078
  day: "numeric",
736
1079
  month: "long",
@@ -743,15 +1086,15 @@ function DateFormat({
743
1086
  fallback = "\u2014"
744
1087
  }) {
745
1088
  const formatter = new Intl.DateTimeFormat(locale, format);
746
- if (!value) return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_jsx_runtime37.Fragment, { children: fallback });
1089
+ if (!value) return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_jsx_runtime40.Fragment, { children: fallback });
747
1090
  const date = value instanceof Date ? value : new Date(value);
748
- if (isNaN(date.getTime())) return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_jsx_runtime37.Fragment, { children: fallback });
749
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_jsx_runtime37.Fragment, { children: formatter.format(date) });
1091
+ if (isNaN(date.getTime())) return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_jsx_runtime40.Fragment, { children: fallback });
1092
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_jsx_runtime40.Fragment, { children: formatter.format(date) });
750
1093
  }
751
1094
  DateFormat.displayName = "TeachInUI.FormatDate";
752
1095
 
753
1096
  // src/ui/format/time.tsx
754
- var import_jsx_runtime38 = require("react/jsx-runtime");
1097
+ var import_jsx_runtime41 = require("react/jsx-runtime");
755
1098
  var defaultFormat3 = {
756
1099
  hour: "2-digit",
757
1100
  minute: "2-digit"
@@ -763,15 +1106,15 @@ function Time({
763
1106
  fallback = "\u2014"
764
1107
  }) {
765
1108
  const formatter = new Intl.DateTimeFormat(locale, format);
766
- if (!value) return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_jsx_runtime38.Fragment, { children: fallback });
1109
+ if (!value) return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_jsx_runtime41.Fragment, { children: fallback });
767
1110
  const date = value instanceof Date ? value : new Date(value);
768
- if (isNaN(date.getTime())) return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_jsx_runtime38.Fragment, { children: fallback });
769
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_jsx_runtime38.Fragment, { children: formatter.format(date) });
1111
+ if (isNaN(date.getTime())) return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_jsx_runtime41.Fragment, { children: fallback });
1112
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_jsx_runtime41.Fragment, { children: formatter.format(date) });
770
1113
  }
771
1114
  Time.displayName = "TeachInUI.FormatTime";
772
1115
 
773
1116
  // src/ui/format/currency.tsx
774
- var import_jsx_runtime39 = require("react/jsx-runtime");
1117
+ var import_jsx_runtime42 = require("react/jsx-runtime");
775
1118
  function Currency({
776
1119
  amount,
777
1120
  currency = "RUB",
@@ -786,23 +1129,23 @@ function Currency({
786
1129
  maximumFractionDigits: decimals
787
1130
  }
788
1131
  });
789
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_jsx_runtime39.Fragment, { children: formatter.format(amount) });
1132
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_jsx_runtime42.Fragment, { children: formatter.format(amount) });
790
1133
  }
791
1134
  Currency.displayName = "TeachInUI.FormatCurrency";
792
1135
 
793
1136
  // src/ui/format/number.tsx
794
- var import_jsx_runtime40 = require("react/jsx-runtime");
795
- function Number({ value, decimals, locale = "ru-RU" }) {
1137
+ var import_jsx_runtime43 = require("react/jsx-runtime");
1138
+ function Number2({ value, decimals, locale = "ru-RU" }) {
796
1139
  const formatter = new Intl.NumberFormat(locale, {
797
1140
  minimumFractionDigits: decimals != null ? decimals : 0,
798
1141
  maximumFractionDigits: decimals != null ? decimals : 2
799
1142
  });
800
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_jsx_runtime40.Fragment, { children: formatter.format(value) });
1143
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_jsx_runtime43.Fragment, { children: formatter.format(value) });
801
1144
  }
802
- Number.displayName = "TeachInUI.FormatNumber";
1145
+ Number2.displayName = "TeachInUI.FormatNumber";
803
1146
 
804
1147
  // src/ui/format/percent.tsx
805
- var import_jsx_runtime41 = require("react/jsx-runtime");
1148
+ var import_jsx_runtime44 = require("react/jsx-runtime");
806
1149
  function Percent({
807
1150
  value,
808
1151
  decimals = 1,
@@ -815,12 +1158,12 @@ function Percent({
815
1158
  maximumFractionDigits: decimals
816
1159
  });
817
1160
  const normalizedValue = unit === "percent" ? value / 100 : value;
818
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_jsx_runtime41.Fragment, { children: formatter.format(normalizedValue) });
1161
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_jsx_runtime44.Fragment, { children: formatter.format(normalizedValue) });
819
1162
  }
820
1163
  Percent.displayName = "TeachInUI.FormatPercent";
821
1164
 
822
1165
  // src/ui/format/plural.tsx
823
- var import_jsx_runtime42 = require("react/jsx-runtime");
1166
+ var import_jsx_runtime45 = require("react/jsx-runtime");
824
1167
  function Plural({
825
1168
  count,
826
1169
  one,
@@ -841,12 +1184,12 @@ function Plural({
841
1184
  };
842
1185
  const selectedForm = forms[rule];
843
1186
  const result = showCount ? `${count} ${selectedForm}` : selectedForm;
844
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_jsx_runtime42.Fragment, { children: result });
1187
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_jsx_runtime45.Fragment, { children: result });
845
1188
  }
846
1189
  Plural.displayName = "TeachInUI.FormatPlural";
847
1190
 
848
1191
  // src/ui/format/duration.tsx
849
- var import_jsx_runtime43 = require("react/jsx-runtime");
1192
+ var import_jsx_runtime46 = require("react/jsx-runtime");
850
1193
  function Duration({
851
1194
  minutes = 0,
852
1195
  hours = 0,
@@ -868,27 +1211,61 @@ function Duration({
868
1211
  if (remainingMinutes > 0 || totalDays === 0 && totalHours === 0) {
869
1212
  parts.push(compact ? `${remainingMinutes}\u043C` : `${remainingMinutes} \u043C\u0438\u043D`);
870
1213
  }
871
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_jsx_runtime43.Fragment, { children: parts.join(" ") });
1214
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_jsx_runtime46.Fragment, { children: parts.join(" ") });
872
1215
  }
873
1216
  Duration.displayName = "TeachInUI.FormatDuration";
874
1217
 
875
1218
  // src/ui/format/boolean.tsx
876
- var import_jsx_runtime44 = require("react/jsx-runtime");
1219
+ var import_jsx_runtime47 = require("react/jsx-runtime");
877
1220
  function Boolean({
878
1221
  value,
879
1222
  trueLabel = "\u0414\u0430",
880
1223
  falseLabel = "\u041D\u0435\u0442",
881
1224
  nullLabel = "\u2014"
882
1225
  }) {
883
- if (value === null || value === void 0) return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_jsx_runtime44.Fragment, { children: nullLabel });
884
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_jsx_runtime44.Fragment, { children: value ? trueLabel : falseLabel });
1226
+ if (value === null || value === void 0) return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_jsx_runtime47.Fragment, { children: nullLabel });
1227
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_jsx_runtime47.Fragment, { children: value ? trueLabel : falseLabel });
885
1228
  }
886
1229
  Boolean.displayName = "TeachInUI.FormatBoolean";
887
1230
 
1231
+ // src/ui/format/uuid.tsx
1232
+ var import_jsx_runtime48 = require("react/jsx-runtime");
1233
+ var uuidHyphenatedRegex = /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$/;
1234
+ function normalizeUuid(value) {
1235
+ const trimmed = value.trim();
1236
+ if (trimmed.length === 0) return null;
1237
+ const withoutPrefix = trimmed.toLowerCase().startsWith("urn:uuid:") ? trimmed.slice("urn:uuid:".length) : trimmed;
1238
+ const withoutBraces = withoutPrefix.startsWith("{") && withoutPrefix.endsWith("}") ? withoutPrefix.slice(1, -1) : withoutPrefix;
1239
+ if (uuidHyphenatedRegex.test(withoutBraces)) return withoutBraces.toLowerCase();
1240
+ return null;
1241
+ }
1242
+ function detectUuidVersion(normalizedUuid) {
1243
+ var _a;
1244
+ const versionChar = (_a = normalizedUuid.split("-")[2]) == null ? void 0 : _a[0];
1245
+ if (!versionChar) return null;
1246
+ const parsed = Number.parseInt(versionChar, 16);
1247
+ return Number.isNaN(parsed) ? null : parsed;
1248
+ }
1249
+ function Uuid({
1250
+ value,
1251
+ case: letterCase = "lower",
1252
+ showVersion = false,
1253
+ invalidFallback = "\u2014"
1254
+ }) {
1255
+ if (!value) return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_jsx_runtime48.Fragment, { children: invalidFallback });
1256
+ const normalized = normalizeUuid(value);
1257
+ if (!normalized) return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_jsx_runtime48.Fragment, { children: invalidFallback });
1258
+ const formatted = letterCase === "upper" ? normalized.toUpperCase() : normalized;
1259
+ if (!showVersion) return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_jsx_runtime48.Fragment, { children: formatted });
1260
+ const version = detectUuidVersion(normalized);
1261
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_jsx_runtime48.Fragment, { children: version !== null ? `${formatted} (v${version})` : formatted });
1262
+ }
1263
+ Uuid.displayName = "TeachInUI.FormatUUID";
1264
+
888
1265
  // src/ui/surface/bento/bento.tsx
889
- var import_tailwind_variants2 = require("tailwind-variants");
890
- var import_jsx_runtime45 = require("react/jsx-runtime");
891
- var bento = (0, import_tailwind_variants2.tv)({
1266
+ var import_tailwind_variants5 = require("tailwind-variants");
1267
+ var import_jsx_runtime49 = require("react/jsx-runtime");
1268
+ var bento = (0, import_tailwind_variants5.tv)({
892
1269
  base: "rounded-xl p-6 transition-colors",
893
1270
  variants: {
894
1271
  color: {
@@ -925,28 +1302,28 @@ var bento = (0, import_tailwind_variants2.tv)({
925
1302
  }
926
1303
  });
927
1304
  var Bento = ({ className, ...props }) => {
928
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: bento({ ...props, className }), ...props });
1305
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: bento({ ...props, className }), ...props });
929
1306
  };
930
1307
  Bento.displayName = "TeachInUI.Bento";
931
1308
 
932
1309
  // src/ui/surface/card/card.tsx
933
- var import_react25 = __toESM(require("react"));
1310
+ var import_react30 = __toESM(require("react"));
934
1311
  var import_card = require("@heroui/card");
935
- var import_jsx_runtime46 = require("react/jsx-runtime");
936
- var Root = import_react25.default.forwardRef(({ children, ...props }, ref) => {
937
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_card.Card, { ref, ...props, children });
1312
+ var import_jsx_runtime50 = require("react/jsx-runtime");
1313
+ var Root = import_react30.default.forwardRef(({ children, ...props }, ref) => {
1314
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_card.Card, { ref, ...props, children });
938
1315
  });
939
1316
  Root.displayName = "TeachInUI.Card.Root";
940
- var Header = import_react25.default.forwardRef(({ children, ...props }, ref) => {
941
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_card.CardHeader, { ref, ...props, children });
1317
+ var Header = import_react30.default.forwardRef(({ children, ...props }, ref) => {
1318
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_card.CardHeader, { ref, ...props, children });
942
1319
  });
943
1320
  Header.displayName = "TeachInUI.Card.Header";
944
- var Body = import_react25.default.forwardRef(({ children, ...props }, ref) => {
945
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_card.CardBody, { ref, ...props, children });
1321
+ var Body = import_react30.default.forwardRef(({ children, ...props }, ref) => {
1322
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_card.CardBody, { ref, ...props, children });
946
1323
  });
947
1324
  Body.displayName = "TeachInUI.Card.Body";
948
- var Footer = import_react25.default.forwardRef(({ children, ...props }, ref) => {
949
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_card.CardFooter, { ref, ...props, children });
1325
+ var Footer = import_react30.default.forwardRef(({ children, ...props }, ref) => {
1326
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_card.CardFooter, { ref, ...props, children });
950
1327
  });
951
1328
  Footer.displayName = "TeachInUI.Card.Footer";
952
1329
  var Card = {
@@ -958,9 +1335,9 @@ var Card = {
958
1335
 
959
1336
  // src/ui/layout/container/container.tsx
960
1337
  var import_react_slot = require("@radix-ui/react-slot");
961
- var import_tailwind_variants3 = require("tailwind-variants");
962
- var import_jsx_runtime47 = require("react/jsx-runtime");
963
- var variants = (0, import_tailwind_variants3.tv)({
1338
+ var import_tailwind_variants6 = require("tailwind-variants");
1339
+ var import_jsx_runtime51 = require("react/jsx-runtime");
1340
+ var variants = (0, import_tailwind_variants6.tv)({
964
1341
  base: "w-full mx-auto px-6",
965
1342
  variants: {
966
1343
  size: {
@@ -979,58 +1356,58 @@ var variants = (0, import_tailwind_variants3.tv)({
979
1356
  });
980
1357
  var Container = ({ children, asChild = false, className, size, ...props }) => {
981
1358
  const Comp = asChild ? import_react_slot.Slot : "div";
982
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Comp, { className: cn(variants({ size }), className), ...props, children });
1359
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Comp, { className: cn(variants({ size }), className), ...props, children });
983
1360
  };
984
1361
  Container.displayName = "TeachInUI.Container";
985
1362
 
986
1363
  // src/ui/layout/page/breadcrumbs.tsx
987
1364
  var import_breadcrumbs = require("@heroui/breadcrumbs");
988
- var import_jsx_runtime48 = require("react/jsx-runtime");
989
- var Breadcrumbs = ({ items }) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_breadcrumbs.Breadcrumbs, { children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_breadcrumbs.BreadcrumbItem, { href: item.href, isDisabled: item.href === void 0, children: item.label }, item.label)) });
1365
+ var import_jsx_runtime52 = require("react/jsx-runtime");
1366
+ var Breadcrumbs = ({ items }) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_breadcrumbs.Breadcrumbs, { children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_breadcrumbs.BreadcrumbItem, { href: item.href, isDisabled: item.href === void 0, children: item.label }, item.label)) });
990
1367
 
991
1368
  // src/ui/layout/page/page-content.tsx
992
- var import_jsx_runtime49 = require("react/jsx-runtime");
1369
+ var import_jsx_runtime53 = require("react/jsx-runtime");
993
1370
  var Root2 = ({
994
1371
  children,
995
1372
  breadcrumbs = []
996
- }) => /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex flex-col gap-6", children: [
997
- breadcrumbs.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Breadcrumbs, { items: breadcrumbs }),
1373
+ }) => /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex flex-col gap-6", children: [
1374
+ breadcrumbs.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Breadcrumbs, { items: breadcrumbs }),
998
1375
  children
999
1376
  ] });
1000
1377
  Root2.displayName = "TeachInUI.PageContent.Root";
1001
- var Header2 = ({ children, ...others }) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("header", { className: "flex items-center justify-between gap-4", role: "banner", ...others, children });
1378
+ var Header2 = ({ children, ...others }) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("header", { className: "flex items-center justify-between gap-4", role: "banner", ...others, children });
1002
1379
  Header2.displayName = "TeachInUI.PageContent.Header";
1003
1380
  var Title = ({
1004
1381
  children,
1005
1382
  ...others
1006
- }) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("h1", { className: "text-4xl leading-10 font-bold", ...others, children });
1383
+ }) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("h1", { className: "text-4xl leading-10 font-bold", ...others, children });
1007
1384
  Title.displayName = "TeachInUI.PageContent.Title";
1008
1385
  var Actions = ({
1009
1386
  children,
1010
1387
  ...others
1011
- }) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "flex gap-2", role: "group", ...others, children });
1388
+ }) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "flex gap-2", role: "group", ...others, children });
1012
1389
  Actions.displayName = "TeachInUI.PageContent.Actions";
1013
- var Body2 = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "flex flex-col gap-6", children });
1390
+ var Body2 = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "flex flex-col gap-6", children });
1014
1391
  Body2.displayName = "TeachInUI.PageContent.Body";
1015
1392
  var Section = ({
1016
1393
  children,
1017
1394
  ...others
1018
- }) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("section", { className: "flex flex-col gap-4", ...others, children });
1395
+ }) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("section", { className: "flex flex-col gap-4", ...others, children });
1019
1396
  Section.displayName = "TeachInUI.PageContent.Section";
1020
1397
  var SectionHeader = ({
1021
1398
  children,
1022
1399
  ...others
1023
- }) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "flex items-center justify-between", ...others, children });
1400
+ }) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "flex items-center justify-between", ...others, children });
1024
1401
  SectionHeader.displayName = "TeachInUI.PageContent.SectionHeader";
1025
1402
  var SectionTitle = ({
1026
1403
  children,
1027
1404
  ...others
1028
- }) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("h2", { className: "text-3xl leading-9 font-bold", ...others, children });
1405
+ }) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("h2", { className: "text-3xl leading-9 font-bold", ...others, children });
1029
1406
  SectionTitle.displayName = "TeachInUI.PageContent.SectionTitle";
1030
1407
  var SectionActions = ({
1031
1408
  children,
1032
1409
  ...others
1033
- }) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "flex gap-2", role: "group", ...others, children });
1410
+ }) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "flex gap-2", role: "group", ...others, children });
1034
1411
  SectionActions.displayName = "TeachInUI.PageContent.SectionActions";
1035
1412
  var PageContent = {
1036
1413
  Root: Root2,
@@ -1045,19 +1422,19 @@ var PageContent = {
1045
1422
  };
1046
1423
 
1047
1424
  // src/ui/layout/page/page-loading.tsx
1048
- var import_jsx_runtime50 = require("react/jsx-runtime");
1049
- var PageLoading = () => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "flex h-screen items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Spinner, {}) });
1425
+ var import_jsx_runtime54 = require("react/jsx-runtime");
1426
+ var PageLoading = () => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "flex h-screen items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Spinner, {}) });
1050
1427
  PageLoading.displayName = "TeachInUI.PageLoading";
1051
1428
 
1052
1429
  // src/ui/layout/page/section-loading.tsx
1053
- var import_jsx_runtime51 = require("react/jsx-runtime");
1054
- var SectionLoading = () => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "flex min-h-[400px] items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Spinner, {}) });
1430
+ var import_jsx_runtime55 = require("react/jsx-runtime");
1431
+ var SectionLoading = () => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "flex min-h-[400px] items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Spinner, {}) });
1055
1432
  SectionLoading.displayName = "TeachInUI.SectionLoading";
1056
1433
 
1057
1434
  // src/ui/layout/flex/flex.tsx
1058
- var import_tailwind_variants4 = require("tailwind-variants");
1059
- var import_jsx_runtime52 = require("react/jsx-runtime");
1060
- var variants2 = (0, import_tailwind_variants4.tv)({
1435
+ var import_tailwind_variants7 = require("tailwind-variants");
1436
+ var import_jsx_runtime56 = require("react/jsx-runtime");
1437
+ var variants2 = (0, import_tailwind_variants7.tv)({
1061
1438
  base: "flex",
1062
1439
  variants: {
1063
1440
  direction: {
@@ -1104,14 +1481,14 @@ var variants2 = (0, import_tailwind_variants4.tv)({
1104
1481
  }
1105
1482
  });
1106
1483
  var Flex = ({ className, ...props }) => {
1107
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: variants2({ ...props, className }), ...props });
1484
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: variants2({ ...props, className }), ...props });
1108
1485
  };
1109
1486
  Flex.displayName = "TeachInUI.Flex";
1110
1487
 
1111
1488
  // src/ui/layout/grid/grid.tsx
1112
- var import_tailwind_variants5 = require("tailwind-variants");
1113
- var import_jsx_runtime53 = require("react/jsx-runtime");
1114
- var variants3 = (0, import_tailwind_variants5.tv)({
1489
+ var import_tailwind_variants8 = require("tailwind-variants");
1490
+ var import_jsx_runtime57 = require("react/jsx-runtime");
1491
+ var variants3 = (0, import_tailwind_variants8.tv)({
1115
1492
  base: "grid",
1116
1493
  variants: {
1117
1494
  columns: {
@@ -1160,26 +1537,26 @@ var variants3 = (0, import_tailwind_variants5.tv)({
1160
1537
  }
1161
1538
  });
1162
1539
  var Grid = ({ className, ...props }) => {
1163
- return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: variants3({ ...props, className }), ...props });
1540
+ return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: variants3({ ...props, className }), ...props });
1164
1541
  };
1165
1542
  Grid.displayName = "TeachInUI.Grid";
1166
1543
 
1167
1544
  // src/ui/layout/divider/divider.tsx
1168
- var import_react26 = __toESM(require("react"));
1545
+ var import_react31 = __toESM(require("react"));
1169
1546
  var import_divider = require("@heroui/divider");
1170
- var import_jsx_runtime54 = require("react/jsx-runtime");
1171
- var Divider = import_react26.default.forwardRef((props, ref) => {
1547
+ var import_jsx_runtime58 = require("react/jsx-runtime");
1548
+ var Divider = import_react31.default.forwardRef((props, ref) => {
1172
1549
  const { ...restProps } = props;
1173
- return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_divider.Divider, { ref, ...restProps });
1550
+ return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_divider.Divider, { ref, ...restProps });
1174
1551
  });
1175
1552
  Divider.displayName = "TeachInUI.Divider";
1176
1553
 
1177
1554
  // src/ui/layout/scroll-shadow/scroll-shadow.tsx
1178
- var import_react27 = __toESM(require("react"));
1555
+ var import_react32 = __toESM(require("react"));
1179
1556
  var import_scroll_shadow = require("@heroui/scroll-shadow");
1180
- var import_jsx_runtime55 = require("react/jsx-runtime");
1181
- var ScrollShadow = import_react27.default.forwardRef((props, ref) => {
1182
- return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_scroll_shadow.ScrollShadow, { ref, ...props });
1557
+ var import_jsx_runtime59 = require("react/jsx-runtime");
1558
+ var ScrollShadow = import_react32.default.forwardRef((props, ref) => {
1559
+ return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_scroll_shadow.ScrollShadow, { ref, ...props });
1183
1560
  });
1184
1561
  ScrollShadow.displayName = "TeachInUI.ScrollShadow";
1185
1562
 
@@ -1190,18 +1567,18 @@ var AccordionItem = Object.assign(import_accordion.AccordionItem, { displayName:
1190
1567
 
1191
1568
  // src/ui/navigation/link/link.tsx
1192
1569
  var import_link = require("@heroui/link");
1193
- var import_jsx_runtime56 = require("react/jsx-runtime");
1570
+ var import_jsx_runtime60 = require("react/jsx-runtime");
1194
1571
  function Link({ children, ...props }) {
1195
- return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_link.Link, { ...props, children });
1572
+ return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_link.Link, { ...props, children });
1196
1573
  }
1197
1574
  Link.displayName = "TeachInUI.Link";
1198
1575
 
1199
1576
  // src/ui/navigation/tabs/tabs.tsx
1200
- var import_react28 = __toESM(require("react"));
1577
+ var import_react33 = __toESM(require("react"));
1201
1578
  var import_tabs = require("@heroui/tabs");
1202
- var import_jsx_runtime57 = require("react/jsx-runtime");
1203
- var Root3 = import_react28.default.forwardRef(({ children, ...props }, ref) => {
1204
- return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_tabs.Tabs, { ref, ...props, children });
1579
+ var import_jsx_runtime61 = require("react/jsx-runtime");
1580
+ var Root3 = import_react33.default.forwardRef(({ children, ...props }, ref) => {
1581
+ return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_tabs.Tabs, { ref, ...props, children });
1205
1582
  });
1206
1583
  Root3.displayName = "TeachInUI.Tabs.Root";
1207
1584
  var Tab = Object.assign(import_tabs.Tab, {
@@ -1213,35 +1590,35 @@ var Tabs = {
1213
1590
  };
1214
1591
 
1215
1592
  // src/ui/navigation/navbar/navbar.tsx
1216
- var import_react29 = __toESM(require("react"));
1593
+ var import_react34 = __toESM(require("react"));
1217
1594
  var import_navbar = require("@heroui/navbar");
1218
- var import_jsx_runtime58 = require("react/jsx-runtime");
1219
- var Navbar = import_react29.default.forwardRef((props, ref) => {
1220
- return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_navbar.Navbar, { ref, ...props });
1595
+ var import_jsx_runtime62 = require("react/jsx-runtime");
1596
+ var Navbar = import_react34.default.forwardRef((props, ref) => {
1597
+ return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_navbar.Navbar, { ref, ...props });
1221
1598
  });
1222
1599
  Navbar.displayName = "TeachInUI.Navbar";
1223
- var NavbarBrand = import_react29.default.forwardRef((props, ref) => {
1224
- return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_navbar.NavbarBrand, { ref, ...props });
1600
+ var NavbarBrand = import_react34.default.forwardRef((props, ref) => {
1601
+ return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_navbar.NavbarBrand, { ref, ...props });
1225
1602
  });
1226
1603
  NavbarBrand.displayName = "TeachInUI.NavbarBrand";
1227
- var NavbarContent = import_react29.default.forwardRef((props, ref) => {
1228
- return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_navbar.NavbarContent, { ref, ...props });
1604
+ var NavbarContent = import_react34.default.forwardRef((props, ref) => {
1605
+ return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_navbar.NavbarContent, { ref, ...props });
1229
1606
  });
1230
1607
  NavbarContent.displayName = "TeachInUI.NavbarContent";
1231
- var NavbarItem = import_react29.default.forwardRef((props, ref) => {
1232
- return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_navbar.NavbarItem, { ref, ...props });
1608
+ var NavbarItem = import_react34.default.forwardRef((props, ref) => {
1609
+ return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_navbar.NavbarItem, { ref, ...props });
1233
1610
  });
1234
1611
  NavbarItem.displayName = "TeachInUI.NavbarItem";
1235
- var NavbarMenu = import_react29.default.forwardRef((props, ref) => {
1236
- return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_navbar.NavbarMenu, { ref, ...props });
1612
+ var NavbarMenu = import_react34.default.forwardRef((props, ref) => {
1613
+ return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_navbar.NavbarMenu, { ref, ...props });
1237
1614
  });
1238
1615
  NavbarMenu.displayName = "TeachInUI.NavbarMenu";
1239
- var NavbarMenuItem = import_react29.default.forwardRef((props, ref) => {
1240
- return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_navbar.NavbarMenuItem, { ref, ...props });
1616
+ var NavbarMenuItem = import_react34.default.forwardRef((props, ref) => {
1617
+ return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_navbar.NavbarMenuItem, { ref, ...props });
1241
1618
  });
1242
1619
  NavbarMenuItem.displayName = "TeachInUI.NavbarMenuItem";
1243
- var NavbarMenuToggle = import_react29.default.forwardRef((props, ref) => {
1244
- return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_navbar.NavbarMenuToggle, { ref, ...props });
1620
+ var NavbarMenuToggle = import_react34.default.forwardRef((props, ref) => {
1621
+ return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_navbar.NavbarMenuToggle, { ref, ...props });
1245
1622
  });
1246
1623
  NavbarMenuToggle.displayName = "TeachInUI.NavbarMenuToggle";
1247
1624
 
@@ -1254,30 +1631,30 @@ var BreadcrumbItem2 = Object.assign(import_breadcrumbs3.BreadcrumbItem, {
1254
1631
 
1255
1632
  // src/ui/overlays/modal/modal.tsx
1256
1633
  var import_modal = require("@heroui/modal");
1257
- var import_jsx_runtime59 = require("react/jsx-runtime");
1634
+ var import_jsx_runtime63 = require("react/jsx-runtime");
1258
1635
  function Root4({
1259
1636
  size = "md",
1260
1637
  placement = "center",
1261
1638
  children,
1262
1639
  ...props
1263
1640
  }) {
1264
- return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_modal.Modal, { placement, size, ...props, children });
1641
+ return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_modal.Modal, { placement, size, ...props, children });
1265
1642
  }
1266
1643
  Root4.displayName = "TeachInUI.Modal.Root";
1267
1644
  function Content({ children, ...props }) {
1268
- return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_modal.ModalContent, { ...props, children: (onClose) => typeof children === "function" ? children(onClose) : children });
1645
+ return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_modal.ModalContent, { ...props, children: (onClose) => typeof children === "function" ? children(onClose) : children });
1269
1646
  }
1270
1647
  Content.displayName = "TeachInUI.Modal.Content";
1271
1648
  function Header3({ children, ...props }) {
1272
- return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_modal.ModalHeader, { ...props, children });
1649
+ return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_modal.ModalHeader, { ...props, children });
1273
1650
  }
1274
1651
  Header3.displayName = "TeachInUI.Modal.Header";
1275
1652
  function Body3({ children, ...props }) {
1276
- return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_modal.ModalBody, { ...props, children });
1653
+ return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_modal.ModalBody, { ...props, children });
1277
1654
  }
1278
1655
  Body3.displayName = "TeachInUI.Modal.Body";
1279
1656
  function Footer2({ children, ...props }) {
1280
- return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_modal.ModalFooter, { ...props, children });
1657
+ return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_modal.ModalFooter, { ...props, children });
1281
1658
  }
1282
1659
  Footer2.displayName = "TeachInUI.Modal.Footer";
1283
1660
  var Modal = {
@@ -1302,17 +1679,17 @@ var DropdownSection = Object.assign(import_dropdown.DropdownSection, {
1302
1679
 
1303
1680
  // src/ui/overlays/popover/popover.tsx
1304
1681
  var import_popover = require("@heroui/popover");
1305
- var import_jsx_runtime60 = require("react/jsx-runtime");
1682
+ var import_jsx_runtime64 = require("react/jsx-runtime");
1306
1683
  var Root5 = ({ children, ...props }) => {
1307
- return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_popover.Popover, { ...props, children });
1684
+ return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_popover.Popover, { ...props, children });
1308
1685
  };
1309
1686
  Root5.displayName = "TeachInUI.Popover.Root";
1310
1687
  var Trigger = ({ children, ...props }) => {
1311
- return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_popover.PopoverTrigger, { ...props, children });
1688
+ return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_popover.PopoverTrigger, { ...props, children });
1312
1689
  };
1313
1690
  Trigger.displayName = "TeachInUI.Popover.Trigger";
1314
1691
  var Content2 = ({ children, ...props }) => {
1315
- return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_popover.PopoverContent, { ...props, children });
1692
+ return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_popover.PopoverContent, { ...props, children });
1316
1693
  };
1317
1694
  Content2.displayName = "TeachInUI.Popover.Content";
1318
1695
  var Popover = {
@@ -1323,7 +1700,7 @@ var Popover = {
1323
1700
 
1324
1701
  // src/ui/provider/ui-provider.tsx
1325
1702
  var import_system3 = require("@heroui/system");
1326
- var import_jsx_runtime61 = require("react/jsx-runtime");
1703
+ var import_jsx_runtime65 = require("react/jsx-runtime");
1327
1704
  function UIProvider({
1328
1705
  children,
1329
1706
  locale = "ru-RU",
@@ -1331,9 +1708,9 @@ function UIProvider({
1331
1708
  navigate,
1332
1709
  toastProviderProps
1333
1710
  }) {
1334
- return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(import_system3.HeroUIProvider, { labelPlacement, locale, navigate, children: [
1711
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(import_system3.HeroUIProvider, { labelPlacement, locale, navigate, children: [
1335
1712
  children,
1336
- /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(ToastProvider, { ...toastProviderProps })
1713
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(ToastProvider, { ...toastProviderProps })
1337
1714
  ] });
1338
1715
  }
1339
1716
 
@@ -1733,6 +2110,7 @@ var theme = (0, import_theme.heroui)({
1733
2110
  CheckboxGroup,
1734
2111
  Chip,
1735
2112
  CircularProgress,
2113
+ ClearButton,
1736
2114
  Container,
1737
2115
  DatePicker,
1738
2116
  DatePickerField,
@@ -1756,6 +2134,7 @@ var theme = (0, import_theme.heroui)({
1756
2134
  FormatPercent,
1757
2135
  FormatPlural,
1758
2136
  FormatTime,
2137
+ FormatUUID,
1759
2138
  Grid,
1760
2139
  Header,
1761
2140
  Image,
@@ -1780,6 +2159,8 @@ var theme = (0, import_theme.heroui)({
1780
2159
  RadioGroup,
1781
2160
  Root,
1782
2161
  ScrollShadow,
2162
+ Search,
2163
+ SearchField,
1783
2164
  Section,
1784
2165
  SectionActions,
1785
2166
  SectionHeader,