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