@teach-in/react 1.5.0 → 1.6.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 (92) hide show
  1. package/dist/{chunk-2UHA3DYG.mjs → chunk-6BWSC6ZH.mjs} +3 -10
  2. package/dist/chunk-7WIZONLU.mjs +81 -0
  3. package/dist/chunk-ALGSVEUS.mjs +1 -0
  4. package/dist/chunk-BHOCYKBI.mjs +81 -0
  5. package/dist/{chunk-VXYV37IM.mjs → chunk-C5FQB2UN.mjs} +16 -8
  6. package/dist/{chunk-CKJ5U5Q4.mjs → chunk-DEKPRZIQ.mjs} +1 -1
  7. package/dist/chunk-GEPCSZCU.mjs +71 -0
  8. package/dist/chunk-VDPROXMN.mjs +57 -0
  9. package/dist/{chunk-R46SWVWL.mjs → chunk-ZK6VZMUJ.mjs} +1 -1
  10. package/dist/index.js +487 -248
  11. package/dist/index.mjs +189 -181
  12. package/dist/ui/data/index.js +56 -7
  13. package/dist/ui/data/index.mjs +10 -8
  14. package/dist/ui/data/user/index.js +51 -2
  15. package/dist/ui/data/user/index.mjs +3 -1
  16. package/dist/ui/data/user/user.d.ts +24 -2
  17. package/dist/ui/data/user/user.js +52 -2
  18. package/dist/ui/data/user/user.mjs +4 -1
  19. package/dist/ui/feedback/index.mjs +12 -12
  20. package/dist/ui/feedback/progress/index.mjs +3 -3
  21. package/dist/ui/form/index.js +76 -18
  22. package/dist/ui/form/index.mjs +24 -19
  23. package/dist/ui/form/rhf/fields/autocomplete-field.mjs +19 -14
  24. package/dist/ui/form/rhf/fields/checkbox-field.mjs +19 -14
  25. package/dist/ui/form/rhf/fields/date-picker-field.mjs +19 -14
  26. package/dist/ui/form/rhf/fields/email-field.js +58 -3
  27. package/dist/ui/form/rhf/fields/email-field.mjs +20 -15
  28. package/dist/ui/form/rhf/fields/index.js +76 -18
  29. package/dist/ui/form/rhf/fields/index.mjs +21 -16
  30. package/dist/ui/form/rhf/fields/input-field.mjs +19 -14
  31. package/dist/ui/form/rhf/fields/radio-field.mjs +19 -14
  32. package/dist/ui/form/rhf/fields/search-field.mjs +19 -14
  33. package/dist/ui/form/rhf/fields/select-field.js +18 -15
  34. package/dist/ui/form/rhf/fields/select-field.mjs +20 -15
  35. package/dist/ui/form/rhf/fields/switch-field.mjs +19 -14
  36. package/dist/ui/form/rhf/fields/text-field.mjs +19 -14
  37. package/dist/ui/form/rhf/fields/textarea-field.mjs +19 -14
  38. package/dist/ui/form/rhf/index.js +76 -18
  39. package/dist/ui/form/rhf/index.mjs +21 -16
  40. package/dist/ui/format/index.mjs +6 -6
  41. package/dist/ui/index.js +487 -248
  42. package/dist/ui/index.mjs +189 -181
  43. package/dist/ui/inputs/checkbox/index.mjs +3 -3
  44. package/dist/ui/inputs/email/email.js +58 -3
  45. package/dist/ui/inputs/email/email.mjs +1 -1
  46. package/dist/ui/inputs/email/index.js +58 -3
  47. package/dist/ui/inputs/email/index.mjs +1 -1
  48. package/dist/ui/inputs/index.d.ts +1 -0
  49. package/dist/ui/inputs/index.js +273 -67
  50. package/dist/ui/inputs/index.mjs +36 -26
  51. package/dist/ui/inputs/number/index.d.ts +1 -0
  52. package/dist/ui/inputs/number/index.js +218 -0
  53. package/dist/ui/inputs/number/index.mjs +12 -0
  54. package/dist/ui/inputs/number/number.d.ts +12 -0
  55. package/dist/ui/inputs/number/number.js +219 -0
  56. package/dist/ui/inputs/number/number.mjs +13 -0
  57. package/dist/ui/inputs/number/use-number.d.ts +20 -0
  58. package/dist/ui/inputs/number/use-number.js +104 -0
  59. package/dist/ui/inputs/number/use-number.mjs +7 -0
  60. package/dist/ui/inputs/radio/index.mjs +3 -3
  61. package/dist/ui/inputs/select/index.d.ts +1 -1
  62. package/dist/ui/inputs/select/index.js +23 -17
  63. package/dist/ui/inputs/select/index.mjs +8 -4
  64. package/dist/ui/inputs/select/select.d.ts +11 -22
  65. package/dist/ui/inputs/select/select.js +23 -17
  66. package/dist/ui/inputs/select/select.mjs +8 -4
  67. package/dist/ui/inputs/select/use-select.d.ts +0 -1
  68. package/dist/ui/inputs/select/use-select.js +2 -9
  69. package/dist/ui/inputs/select/use-select.mjs +1 -1
  70. package/dist/ui/inputs/switch/index.mjs +3 -3
  71. package/dist/ui/layout/container/container.mjs +88 -85
  72. package/dist/ui/layout/container/index.mjs +88 -85
  73. package/dist/ui/layout/index.js +7 -7
  74. package/dist/ui/layout/index.mjs +95 -92
  75. package/dist/ui/layout/page/index.mjs +6 -6
  76. package/dist/ui/layout/page/page-loading.mjs +5 -5
  77. package/dist/ui/layout/page/section-loading.mjs +5 -5
  78. package/dist/ui/navigation/index.mjs +5 -5
  79. package/dist/ui/overlays/index.mjs +4 -4
  80. package/dist/ui/provider/index.mjs +5 -5
  81. package/dist/ui/provider/ui-provider.mjs +5 -5
  82. package/dist/ui/surface/index.mjs +1 -1
  83. package/dist/ui/theme/colors/index.mjs +1 -1
  84. package/dist/ui/theme/colors.mjs +1 -1
  85. package/dist/ui/theme/index.mjs +1 -1
  86. package/dist/ui/theme/theme.d.ts +2 -1
  87. package/dist/ui/theme/theme.mjs +1 -1
  88. package/package.json +13 -9
  89. package/LICENSE +0 -21
  90. package/dist/chunk-46SKVFMZ.mjs +0 -16
  91. package/dist/chunk-XHCXM5MU.mjs +0 -14
  92. /package/dist/{chunk-UQAG7TKJ.mjs → chunk-37MCHF7U.mjs} +0 -0
package/dist/ui/index.js CHANGED
@@ -64,19 +64,19 @@ __export(ui_exports, {
64
64
  FavoriteSwitch: () => FavoriteSwitch,
65
65
  Flex: () => Flex,
66
66
  Form: () => Form,
67
- FormatBoolean: () => Boolean,
67
+ FormatBoolean: () => Boolean2,
68
68
  FormatCurrency: () => Currency,
69
69
  FormatDate: () => DateFormat,
70
70
  FormatDatetime: () => Datetime,
71
71
  FormatDuration: () => Duration,
72
- FormatNumber: () => Number2,
72
+ FormatNumber: () => Number3,
73
73
  FormatPercent: () => Percent,
74
74
  FormatPlural: () => Plural,
75
75
  FormatTime: () => Time,
76
76
  FormatUUID: () => Uuid,
77
77
  Grid: () => Grid,
78
78
  Header: () => Header2,
79
- Image: () => Image,
79
+ Image: () => Image2,
80
80
  Input: () => Input,
81
81
  InputField: () => InputField,
82
82
  Link: () => Link,
@@ -88,6 +88,7 @@ __export(ui_exports, {
88
88
  NavbarMenu: () => NavbarMenu,
89
89
  NavbarMenuItem: () => NavbarMenuItem,
90
90
  NavbarMenuToggle: () => NavbarMenuToggle,
91
+ Number: () => Number2,
91
92
  PageContent: () => PageContent,
92
93
  PageLoading: () => PageLoading,
93
94
  Pagination: () => Pagination,
@@ -107,6 +108,7 @@ __export(ui_exports, {
107
108
  SectionTitle: () => SectionTitle,
108
109
  Select: () => Select,
109
110
  SelectField: () => SelectField,
111
+ SelectItem: () => SelectItem,
110
112
  Spinner: () => Spinner,
111
113
  Switch: () => Switch,
112
114
  SwitchField: () => SwitchField,
@@ -201,20 +203,69 @@ var getKeyValue = import_table.getKeyValue;
201
203
  // src/ui/data/user/user.tsx
202
204
  var import_react4 = __toESM(require("react"));
203
205
  var import_user = require("@heroui/user");
206
+ var import_image = require("@heroui/image");
207
+ var import_tailwind_variants = require("tailwind-variants");
208
+
209
+ // src/ui/style/css.ts
210
+ var import_clsx = require("clsx");
211
+ var import_tailwind_merge = require("tailwind-merge");
212
+ function cn(...inputs) {
213
+ return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
214
+ }
215
+
216
+ // src/ui/data/user/user.tsx
204
217
  var import_jsx_runtime4 = require("react/jsx-runtime");
205
- var User = import_react4.default.forwardRef((props, ref) => {
206
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_user.User, { ref, ...props });
218
+ function getNameInitials(fullName) {
219
+ const normalizedFullName = fullName.trim();
220
+ const parts = normalizedFullName.split(" ").filter((part) => part.length > 0);
221
+ if (parts.length >= 2) {
222
+ return parts[0][0].toUpperCase() + parts[1][0].toUpperCase();
223
+ }
224
+ return normalizedFullName.slice(0, 2).toUpperCase();
225
+ }
226
+ var userVariants = (0, import_tailwind_variants.tv)({
227
+ base: "flex items-start gap-2 hyphens-auto",
228
+ variants: {
229
+ direction: {
230
+ row: "flex-row",
231
+ column: "flex-col items-center"
232
+ }
233
+ },
234
+ defaultVariants: {
235
+ direction: "row"
236
+ }
207
237
  });
238
+ var User = import_react4.default.forwardRef(
239
+ ({ name, avatarProps, className, direction = "row", ...props }, ref) => {
240
+ var _a, _b;
241
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
242
+ import_user.User,
243
+ {
244
+ ref,
245
+ avatarProps: {
246
+ ...avatarProps,
247
+ className: cn("shrink-0", avatarProps == null ? void 0 : avatarProps.className),
248
+ name: (_a = avatarProps == null ? void 0 : avatarProps.name) != null ? _a : getNameInitials(name),
249
+ ImgComponent: import_image.Image,
250
+ showFallback: (_b = avatarProps == null ? void 0 : avatarProps.showFallback) != null ? _b : true
251
+ },
252
+ className: userVariants({ direction, className }),
253
+ name,
254
+ ...props
255
+ }
256
+ );
257
+ }
258
+ );
208
259
  User.displayName = "TeachInUI.User";
209
260
 
210
261
  // src/ui/data/image/image.tsx
211
262
  var import_react5 = __toESM(require("react"));
212
- var import_image = require("@heroui/image");
263
+ var import_image2 = require("@heroui/image");
213
264
  var import_jsx_runtime5 = require("react/jsx-runtime");
214
- var Image = import_react5.default.forwardRef(({ ...props }, ref) => {
215
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_image.Image, { ref, ...props });
265
+ var Image2 = import_react5.default.forwardRef(({ ...props }, ref) => {
266
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_image2.Image, { ref, ...props });
216
267
  });
217
- Image.displayName = "TeachInUI.Image";
268
+ Image2.displayName = "TeachInUI.Image";
218
269
 
219
270
  // src/ui/feedback/alert/alert.tsx
220
271
  var import_react6 = __toESM(require("react"));
@@ -358,7 +409,7 @@ var import_react20 = __toESM(require("react"));
358
409
  // src/ui/inputs/input/input.tsx
359
410
  var import_react19 = __toESM(require("react"));
360
411
  var import_input = require("@heroui/input");
361
- var import_tailwind_variants = require("tailwind-variants");
412
+ var import_tailwind_variants2 = require("tailwind-variants");
362
413
 
363
414
  // src/ui/inputs/clear-button.tsx
364
415
  var import_react17 = __toESM(require("react"));
@@ -444,7 +495,7 @@ function useInput({
444
495
 
445
496
  // src/ui/inputs/input/input.tsx
446
497
  var import_jsx_runtime18 = require("react/jsx-runtime");
447
- var inputWrapperVariants = (0, import_tailwind_variants.tv)({
498
+ var inputWrapperVariants = (0, import_tailwind_variants2.tv)({
448
499
  variants: {
449
500
  variant: {
450
501
  flat: "",
@@ -503,21 +554,219 @@ Input.displayName = "TeachInUI.Input";
503
554
 
504
555
  // src/ui/inputs/email/email.tsx
505
556
  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 });
508
- });
557
+ var EMAIL_REGEX = /^(?!\.)(?!.*\.\.)[A-Za-zА-Яа-яЁё0-9._+%-]+(?<!\.)@(?:(?:[A-Za-zА-Яа-яЁё0-9](?:[A-Za-zА-Яа-яЁё0-9-]*[A-Za-zА-Яа-яЁё0-9])?)\.)+[A-Za-zА-Яа-яЁё]{2,}$/u;
558
+ var DEFAULT_ERROR_MESSAGE = "\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0444\u043E\u0440\u043C\u0430\u0442 email";
559
+ var defaultValidateEmail = (value) => {
560
+ if (!value) {
561
+ return;
562
+ }
563
+ return EMAIL_REGEX.test(value) ? true : DEFAULT_ERROR_MESSAGE;
564
+ };
565
+ function getValidationMessage(result) {
566
+ if (typeof result === "string") {
567
+ return result;
568
+ }
569
+ if (Array.isArray(result)) {
570
+ return result.join(" ");
571
+ }
572
+ return;
573
+ }
574
+ var Email = import_react20.default.forwardRef(
575
+ ({
576
+ defaultValue,
577
+ errorMessage,
578
+ isInvalid,
579
+ onValueChange,
580
+ validate = defaultValidateEmail,
581
+ value,
582
+ ...props
583
+ }, ref) => {
584
+ const [internalValue, setInternalValue] = import_react20.default.useState(defaultValue != null ? defaultValue : "");
585
+ const isControlled = value !== void 0;
586
+ const currentValue = isControlled ? value : internalValue;
587
+ const handleValueChange = import_react20.default.useCallback(
588
+ (nextValue) => {
589
+ if (!isControlled) {
590
+ setInternalValue(nextValue);
591
+ }
592
+ onValueChange == null ? void 0 : onValueChange(nextValue);
593
+ },
594
+ [isControlled, onValueChange]
595
+ );
596
+ const validationMessage = getValidationMessage(validate(currentValue != null ? currentValue : ""));
597
+ const resolvedErrorMessage = errorMessage != null ? errorMessage : validationMessage;
598
+ const resolvedIsInvalid = isInvalid != null ? isInvalid : Boolean(validationMessage);
599
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
600
+ Input,
601
+ {
602
+ ref,
603
+ autoComplete: "email",
604
+ errorMessage: resolvedErrorMessage,
605
+ isInvalid: resolvedIsInvalid,
606
+ type: "email",
607
+ validate,
608
+ value: currentValue,
609
+ onValueChange: handleValueChange,
610
+ ...props
611
+ }
612
+ );
613
+ }
614
+ );
509
615
  Email.displayName = "TeachInUI.Email";
510
616
 
511
- // src/ui/inputs/search/search.tsx
617
+ // src/ui/inputs/number/number.tsx
512
618
  var import_react22 = __toESM(require("react"));
619
+ var import_number_input = require("@heroui/number-input");
620
+ var import_tailwind_variants3 = require("tailwind-variants");
621
+
622
+ // src/ui/inputs/number/use-number.ts
623
+ var import_number = require("@internationalized/number");
624
+ var import_react21 = require("react");
625
+ function normalizeNumberValue(value) {
626
+ if (value == null || Number.isNaN(value)) {
627
+ return null;
628
+ }
629
+ return value;
630
+ }
631
+ function useNumber({
632
+ locale,
633
+ value,
634
+ onChange,
635
+ onValueChange,
636
+ onClear,
637
+ isReadOnly,
638
+ isClearable = true,
639
+ ref
640
+ }) {
641
+ const inputRef = (0, import_react21.useRef)(null);
642
+ const currentValue = normalizeNumberValue(value);
643
+ const hasValue = currentValue !== null;
644
+ const currentLocale = locale != null ? locale : Intl.NumberFormat().resolvedOptions().locale;
645
+ const numberParser = (0, import_react21.useMemo)(() => new import_number.NumberParser(currentLocale), [currentLocale]);
646
+ const emitValueChange = (0, import_react21.useCallback)(
647
+ (newValue) => {
648
+ onValueChange == null ? void 0 : onValueChange(newValue);
649
+ onChange == null ? void 0 : onChange(newValue);
650
+ },
651
+ [onChange, onValueChange]
652
+ );
653
+ const handleValueChange = (0, import_react21.useCallback)(
654
+ (incomingValue) => {
655
+ let newValue = null;
656
+ if (incomingValue === null) {
657
+ newValue = null;
658
+ } else if (typeof incomingValue === "number") {
659
+ newValue = Number.isNaN(incomingValue) ? null : incomingValue;
660
+ } else {
661
+ const rawValue = incomingValue.target.value;
662
+ newValue = rawValue === "" ? null : numberParser.parse(rawValue);
663
+ newValue = Number.isNaN(newValue) ? null : newValue;
664
+ }
665
+ emitValueChange(newValue);
666
+ },
667
+ [emitValueChange, numberParser]
668
+ );
669
+ const handleClear = (0, import_react21.useCallback)(() => {
670
+ var _a;
671
+ onClear == null ? void 0 : onClear();
672
+ emitValueChange(null);
673
+ (_a = inputRef.current) == null ? void 0 : _a.focus();
674
+ }, [emitValueChange, onClear]);
675
+ const mergedRef = (0, import_react21.useCallback)(
676
+ (node) => {
677
+ inputRef.current = node;
678
+ if (typeof ref === "function") {
679
+ ref(node);
680
+ } else if (ref) {
681
+ ref.current = node;
682
+ }
683
+ },
684
+ [ref]
685
+ );
686
+ const showClearButton = hasValue && !isReadOnly && isClearable;
687
+ return {
688
+ inputRef,
689
+ currentValue,
690
+ hasValue,
691
+ handleValueChange,
692
+ handleClear,
693
+ mergedRef,
694
+ showClearButton
695
+ };
696
+ }
697
+
698
+ // src/ui/inputs/number/number.tsx
699
+ var import_jsx_runtime20 = require("react/jsx-runtime");
700
+ var inputWrapperVariants2 = (0, import_tailwind_variants3.tv)({
701
+ variants: {
702
+ variant: {
703
+ flat: "",
704
+ underlined: "",
705
+ bordered: "border-1",
706
+ faded: "border-1"
707
+ }
708
+ }
709
+ });
710
+ var Number2 = import_react22.default.forwardRef(
711
+ ({
712
+ locale,
713
+ value,
714
+ onChange,
715
+ onValueChange,
716
+ onClear,
717
+ variant,
718
+ classNames,
719
+ endContent,
720
+ isReadOnly,
721
+ isClearable,
722
+ ...props
723
+ }, ref) => {
724
+ const { currentValue, handleValueChange, handleClear, mergedRef, showClearButton } = useNumber({
725
+ locale,
726
+ value,
727
+ onChange,
728
+ onValueChange,
729
+ onClear,
730
+ isReadOnly,
731
+ isClearable,
732
+ ref
733
+ });
734
+ const normalizedValue = currentValue === null ? globalThis.Number.NaN : currentValue;
735
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
736
+ import_number_input.NumberInput,
737
+ {
738
+ ref: mergedRef,
739
+ classNames: {
740
+ ...classNames,
741
+ inputWrapper: cn(inputWrapperVariants2({ variant }), classNames == null ? void 0 : classNames.inputWrapper),
742
+ innerWrapper: cn("group", classNames == null ? void 0 : classNames.innerWrapper)
743
+ },
744
+ endContent: (endContent || showClearButton) && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "flex items-center gap-1", children: [
745
+ endContent,
746
+ showClearButton && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ClearButton, { onClear: handleClear })
747
+ ] }),
748
+ inputMode: "decimal",
749
+ isReadOnly,
750
+ value: normalizedValue,
751
+ variant,
752
+ onChange: handleValueChange,
753
+ ...props
754
+ }
755
+ );
756
+ }
757
+ );
758
+ Number2.displayName = "TeachInUI.Number";
759
+
760
+ // src/ui/inputs/search/search.tsx
761
+ var import_react24 = __toESM(require("react"));
513
762
  var import_lucide_react2 = require("lucide-react");
514
763
  var import_button4 = require("@heroui/button");
515
- var import_tailwind_variants2 = require("tailwind-variants");
764
+ var import_tailwind_variants4 = require("tailwind-variants");
516
765
 
517
766
  // src/ui/inputs/search/use-search.ts
518
- var import_react21 = require("react");
767
+ var import_react23 = require("react");
519
768
  function useSearch({ value, onSearch, onCancel, onKeyDown }) {
520
- const handleKeyDown = (0, import_react21.useCallback)(
769
+ const handleKeyDown = (0, import_react23.useCallback)(
521
770
  (event) => {
522
771
  if (event.key === "Enter") {
523
772
  event.preventDefault();
@@ -531,7 +780,7 @@ function useSearch({ value, onSearch, onCancel, onKeyDown }) {
531
780
  [onSearch, onCancel, onKeyDown]
532
781
  );
533
782
  const hasValue = value !== void 0 && String(value).length > 0;
534
- const handleSearchClick = (0, import_react21.useCallback)(() => {
783
+ const handleSearchClick = (0, import_react23.useCallback)(() => {
535
784
  if (hasValue) {
536
785
  onSearch == null ? void 0 : onSearch(value);
537
786
  }
@@ -544,8 +793,8 @@ function useSearch({ value, onSearch, onCancel, onKeyDown }) {
544
793
  }
545
794
 
546
795
  // src/ui/inputs/search/search.tsx
547
- var import_jsx_runtime20 = require("react/jsx-runtime");
548
- var searchIconVariants = (0, import_tailwind_variants2.tv)({
796
+ var import_jsx_runtime21 = require("react/jsx-runtime");
797
+ var searchIconVariants = (0, import_tailwind_variants4.tv)({
549
798
  base: "size-5 shrink-0",
550
799
  variants: {
551
800
  variant: {
@@ -556,7 +805,7 @@ var searchIconVariants = (0, import_tailwind_variants2.tv)({
556
805
  }
557
806
  }
558
807
  });
559
- var Search = import_react22.default.forwardRef(
808
+ var Search = import_react24.default.forwardRef(
560
809
  ({ variant = "bordered", radius = "full", value, onSearch, onCancel, onKeyDown, ...props }, ref) => {
561
810
  const { handleKeyDown, handleSearchClick, hasValue } = useSearch({
562
811
  value,
@@ -564,12 +813,12 @@ var Search = import_react22.default.forwardRef(
564
813
  onCancel,
565
814
  onKeyDown
566
815
  });
567
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
816
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
568
817
  Input,
569
818
  {
570
819
  ref,
571
820
  radius,
572
- startContent: onSearch ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
821
+ startContent: onSearch ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
573
822
  import_button4.Button,
574
823
  {
575
824
  isIconOnly: true,
@@ -579,9 +828,9 @@ var Search = import_react22.default.forwardRef(
579
828
  size: "sm",
580
829
  variant: "light",
581
830
  onPress: handleSearchClick,
582
- children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react2.SearchIcon, { className: searchIconVariants({ variant }) })
831
+ children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_lucide_react2.SearchIcon, { className: searchIconVariants({ variant }) })
583
832
  }
584
- ) : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react2.SearchIcon, { className: searchIconVariants({ variant }) }),
833
+ ) : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_lucide_react2.SearchIcon, { className: searchIconVariants({ variant }) }),
585
834
  value,
586
835
  variant,
587
836
  onKeyDown: handleKeyDown,
@@ -593,12 +842,12 @@ var Search = import_react22.default.forwardRef(
593
842
  Search.displayName = "TeachInUI.Search";
594
843
 
595
844
  // src/ui/inputs/select/select.tsx
596
- var import_react24 = __toESM(require("react"));
845
+ var import_react26 = __toESM(require("react"));
597
846
  var import_select = require("@heroui/select");
598
- var import_tailwind_variants3 = require("tailwind-variants");
847
+ var import_tailwind_variants5 = require("tailwind-variants");
599
848
 
600
849
  // src/ui/inputs/select/use-select.ts
601
- var import_react23 = require("react");
850
+ var import_react25 = require("react");
602
851
  function useSelect({
603
852
  value,
604
853
  onChange,
@@ -607,34 +856,27 @@ function useSelect({
607
856
  isClearable = true
608
857
  }) {
609
858
  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;
859
+ const currentValue = value != null ? value : isMultiple ? [] : null;
615
860
  const hasValue = currentValue != null && (Array.isArray(currentValue) ? currentValue.length > 0 : currentValue !== "");
616
- const handleChange = (0, import_react23.useCallback)(
861
+ const handleChange = (0, import_react25.useCallback)(
617
862
  (newValue) => {
618
- if (!isControlled) {
619
- setInternalValue(newValue);
620
- }
621
863
  if (isMultiple) {
622
864
  onChange == null ? void 0 : onChange(newValue);
623
865
  } else {
624
866
  onChange == null ? void 0 : onChange(newValue);
625
867
  }
626
868
  },
627
- [isControlled, onChange, isMultiple]
869
+ [onChange, isMultiple]
628
870
  );
629
- const handleClear = (0, import_react23.useCallback)(() => {
871
+ const handleClear = (0, import_react25.useCallback)(() => {
630
872
  onClear == null ? void 0 : onClear();
631
873
  handleChange(isMultiple ? [] : null);
632
874
  }, [onClear, handleChange, isMultiple]);
633
- const selectedKeys = (0, import_react23.useMemo)(() => {
875
+ const selectedKeys = (0, import_react25.useMemo)(() => {
634
876
  if (currentValue == null) return /* @__PURE__ */ new Set();
635
877
  return new Set(Array.isArray(currentValue) ? currentValue : [currentValue]);
636
878
  }, [currentValue]);
637
- const handleSelectionChange = (0, import_react23.useCallback)(
879
+ const handleSelectionChange = (0, import_react25.useCallback)(
638
880
  (keys) => {
639
881
  var _a;
640
882
  if (keys === "all") return;
@@ -655,8 +897,8 @@ function useSelect({
655
897
  }
656
898
 
657
899
  // src/ui/inputs/select/select.tsx
658
- var import_jsx_runtime21 = require("react/jsx-runtime");
659
- var selectWrapperVariants = (0, import_tailwind_variants3.tv)({
900
+ var import_jsx_runtime22 = require("react/jsx-runtime");
901
+ var selectWrapperVariants = (0, import_tailwind_variants5.tv)({
660
902
  variants: {
661
903
  variant: {
662
904
  flat: "",
@@ -666,12 +908,14 @@ var selectWrapperVariants = (0, import_tailwind_variants3.tv)({
666
908
  }
667
909
  }
668
910
  });
669
- var Select = import_react24.default.forwardRef(
911
+ var Select = import_react26.default.forwardRef(
670
912
  ({
671
913
  value,
672
- defaultSelectedKeys,
673
914
  items,
915
+ children,
916
+ selectedKeys: selectedKeysProp,
674
917
  onChange,
918
+ onSelectionChange,
675
919
  selectionMode,
676
920
  onClear,
677
921
  variant,
@@ -680,6 +924,8 @@ var Select = import_react24.default.forwardRef(
680
924
  isClearable,
681
925
  ...props
682
926
  }, ref) => {
927
+ const usesExternalSelectionControl = selectedKeysProp !== void 0 || onSelectionChange !== void 0;
928
+ const selectChildren = children != null ? children : (item) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_select.SelectItem, { children: item.label }, item.key);
683
929
  const { selectedKeys, handleSelectionChange, handleClear, showClearButton } = useSelect({
684
930
  value,
685
931
  onChange,
@@ -687,48 +933,48 @@ var Select = import_react24.default.forwardRef(
687
933
  selectionMode,
688
934
  isClearable
689
935
  });
690
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
936
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
691
937
  import_select.Select,
692
938
  {
693
939
  ref,
694
940
  classNames: {
695
941
  ...classNames,
696
- trigger: selectWrapperVariants({ variant }),
942
+ trigger: cn(selectWrapperVariants({ variant }), classNames == null ? void 0 : classNames.trigger),
697
943
  innerWrapper: "group"
698
944
  },
699
- defaultSelectedKeys,
700
- endContent: (endContent || showClearButton) && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex items-center gap-1", children: [
945
+ endContent: (endContent || showClearButton) && /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "flex items-center gap-1", children: [
701
946
  endContent,
702
- showClearButton && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ClearButton, { onClear: handleClear })
947
+ showClearButton && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(ClearButton, { onClear: handleClear })
703
948
  ] }),
704
949
  items,
705
- selectedKeys,
950
+ selectedKeys: usesExternalSelectionControl ? selectedKeysProp : selectedKeys,
706
951
  selectionMode,
707
952
  variant,
708
- onSelectionChange: handleSelectionChange,
953
+ onSelectionChange: usesExternalSelectionControl ? onSelectionChange : handleSelectionChange,
709
954
  ...props,
710
- children: (item) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_select.SelectItem, { children: item.label }, item.key)
955
+ children: selectChildren
711
956
  }
712
957
  );
713
958
  }
714
959
  );
715
960
  Select.displayName = "TeachInUI.Select";
961
+ var SelectItem = import_select.SelectItem;
716
962
 
717
963
  // src/ui/inputs/switch/switch.tsx
718
- var import_react25 = __toESM(require("react"));
964
+ var import_react27 = __toESM(require("react"));
719
965
  var import_switch = require("@heroui/switch");
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 });
966
+ var import_jsx_runtime23 = require("react/jsx-runtime");
967
+ var Switch = import_react27.default.forwardRef(({ ...props }, ref) => {
968
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_switch.Switch, { ref, ...props });
723
969
  });
724
970
  Switch.displayName = "TeachInUI.Switch";
725
971
 
726
972
  // src/ui/inputs/switch/favorite-switch.tsx
727
973
  var import_switch2 = require("@heroui/switch");
728
974
  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)({
975
+ var import_tailwind_variants6 = require("tailwind-variants");
976
+ var import_jsx_runtime24 = require("react/jsx-runtime");
977
+ var bookmarkVariants = (0, import_tailwind_variants6.tv)({
732
978
  base: "stroke-default-400 group-hover:fill-primary-100 group-hover:stroke-default-400",
733
979
  variants: {
734
980
  size: {
@@ -744,7 +990,7 @@ var bookmarkVariants = (0, import_tailwind_variants4.tv)({
744
990
  size: "md"
745
991
  }
746
992
  });
747
- var wrapperVariants = (0, import_tailwind_variants4.tv)({
993
+ var wrapperVariants = (0, import_tailwind_variants6.tv)({
748
994
  base: "flex cursor-pointer items-center justify-center rounded-sm bg-transparent!",
749
995
  variants: {
750
996
  size: {
@@ -762,16 +1008,16 @@ function FavoriteSwitch({ isSelected, onValueChange, size }) {
762
1008
  isSelected,
763
1009
  onValueChange
764
1010
  });
765
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Component, { ...getBaseProps(), children: [
766
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "sr-only", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("input", { ...getInputProps() }) }),
767
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1011
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Component, { ...getBaseProps(), children: [
1012
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "sr-only", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("input", { ...getInputProps() }) }),
1013
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
768
1014
  "div",
769
1015
  {
770
1016
  ...getWrapperProps(),
771
1017
  className: slots.wrapper({
772
1018
  class: wrapperVariants({ size })
773
1019
  }),
774
- children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1020
+ children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
775
1021
  import_lucide_react3.BookmarkIcon,
776
1022
  {
777
1023
  absoluteStrokeWidth: true,
@@ -791,45 +1037,45 @@ var import_radio = require("@heroui/radio");
791
1037
  var Radio = Object.assign(import_radio.Radio, { displayName: "TeachInUI.Radio" });
792
1038
 
793
1039
  // src/ui/inputs/radio/radio-group.tsx
794
- var import_react26 = __toESM(require("react"));
1040
+ var import_react28 = __toESM(require("react"));
795
1041
  var import_radio2 = require("@heroui/radio");
796
- var import_jsx_runtime24 = require("react/jsx-runtime");
797
- var RadioGroup = import_react26.default.forwardRef(
1042
+ var import_jsx_runtime25 = require("react/jsx-runtime");
1043
+ var RadioGroup = import_react28.default.forwardRef(
798
1044
  (props, ref) => {
799
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_radio2.RadioGroup, { ref, ...props });
1045
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_radio2.RadioGroup, { ref, ...props });
800
1046
  }
801
1047
  );
802
1048
  RadioGroup.displayName = "TeachInUI.RadioGroup";
803
1049
 
804
1050
  // src/ui/inputs/text/text.tsx
805
- var import_react27 = __toESM(require("react"));
806
- var import_jsx_runtime25 = require("react/jsx-runtime");
807
- var Text = import_react27.default.forwardRef(({ ...props }, ref) => {
808
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Input, { ref, type: "text", ...props });
1051
+ var import_react29 = __toESM(require("react"));
1052
+ var import_jsx_runtime26 = require("react/jsx-runtime");
1053
+ var Text = import_react29.default.forwardRef(({ ...props }, ref) => {
1054
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Input, { ref, type: "text", ...props });
809
1055
  });
810
1056
  Text.displayName = "TeachInUI.Text";
811
1057
 
812
1058
  // src/ui/inputs/textarea/textarea.tsx
813
1059
  var import_input6 = require("@heroui/input");
814
- var import_react28 = __toESM(require("react"));
815
- var import_jsx_runtime26 = require("react/jsx-runtime");
816
- var Textarea = import_react28.default.forwardRef(
1060
+ var import_react30 = __toESM(require("react"));
1061
+ var import_jsx_runtime27 = require("react/jsx-runtime");
1062
+ var Textarea = import_react30.default.forwardRef(
817
1063
  ({ minRows = 4, ...props }, ref) => {
818
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_input6.Textarea, { ref, minRows, ...props });
1064
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_input6.Textarea, { ref, minRows, ...props });
819
1065
  }
820
1066
  );
821
1067
  Textarea.displayName = "TeachInUI.Textarea";
822
1068
 
823
1069
  // src/ui/form/rhf/fields/input-field.tsx
824
- var import_jsx_runtime27 = require("react/jsx-runtime");
1070
+ var import_jsx_runtime28 = require("react/jsx-runtime");
825
1071
  function InputField({ name, ...props }) {
826
1072
  const { control } = (0, import_react_hook_form.useFormContext)();
827
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
1073
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
828
1074
  import_react_hook_form.Controller,
829
1075
  {
830
1076
  control,
831
1077
  name,
832
- render: ({ field: { ref, ...field }, fieldState: { error } }) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
1078
+ render: ({ field: { ref, ...field }, fieldState: { error } }) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
833
1079
  Input,
834
1080
  {
835
1081
  ...props,
@@ -847,15 +1093,15 @@ InputField.displayName = "TeachInUI.InputField";
847
1093
 
848
1094
  // src/ui/form/rhf/fields/text-field.tsx
849
1095
  var import_react_hook_form2 = require("react-hook-form");
850
- var import_jsx_runtime28 = require("react/jsx-runtime");
1096
+ var import_jsx_runtime29 = require("react/jsx-runtime");
851
1097
  function TextField({ name, ...props }) {
852
1098
  const { control } = (0, import_react_hook_form2.useFormContext)();
853
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
1099
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
854
1100
  import_react_hook_form2.Controller,
855
1101
  {
856
1102
  control,
857
1103
  name,
858
- 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 })
1104
+ render: ({ field: { ref, ...field }, fieldState: { error } }) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Text, { ...props, ...field, ref, errorMessage: error == null ? void 0 : error.message, isInvalid: !!error })
859
1105
  }
860
1106
  );
861
1107
  }
@@ -863,15 +1109,15 @@ TextField.displayName = "TeachInUI.TextField";
863
1109
 
864
1110
  // src/ui/form/rhf/fields/email-field.tsx
865
1111
  var import_react_hook_form3 = require("react-hook-form");
866
- var import_jsx_runtime29 = require("react/jsx-runtime");
1112
+ var import_jsx_runtime30 = require("react/jsx-runtime");
867
1113
  function EmailField({ name, ...props }) {
868
1114
  const { control } = (0, import_react_hook_form3.useFormContext)();
869
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
1115
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
870
1116
  import_react_hook_form3.Controller,
871
1117
  {
872
1118
  control,
873
1119
  name,
874
- 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 })
1120
+ render: ({ field: { ref, ...field }, fieldState: { error } }) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Email, { ...props, ...field, ref, errorMessage: error == null ? void 0 : error.message, isInvalid: !!error })
875
1121
  }
876
1122
  );
877
1123
  }
@@ -879,15 +1125,15 @@ EmailField.displayName = "TeachInUI.EmailField";
879
1125
 
880
1126
  // src/ui/form/rhf/fields/search-field.tsx
881
1127
  var import_react_hook_form4 = require("react-hook-form");
882
- var import_jsx_runtime30 = require("react/jsx-runtime");
1128
+ var import_jsx_runtime31 = require("react/jsx-runtime");
883
1129
  function SearchField({ name, ...props }) {
884
1130
  const { control } = (0, import_react_hook_form4.useFormContext)();
885
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
1131
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
886
1132
  import_react_hook_form4.Controller,
887
1133
  {
888
1134
  control,
889
1135
  name,
890
- render: ({ field: { ref, ...field }, fieldState: { error } }) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
1136
+ render: ({ field: { ref, ...field }, fieldState: { error } }) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
891
1137
  Search,
892
1138
  {
893
1139
  ...props,
@@ -905,15 +1151,15 @@ SearchField.displayName = "TeachInUI.SearchField";
905
1151
 
906
1152
  // src/ui/form/rhf/fields/textarea-field.tsx
907
1153
  var import_react_hook_form5 = require("react-hook-form");
908
- var import_jsx_runtime31 = require("react/jsx-runtime");
1154
+ var import_jsx_runtime32 = require("react/jsx-runtime");
909
1155
  function TextareaField({ name, ...props }) {
910
1156
  const { control } = (0, import_react_hook_form5.useFormContext)();
911
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
1157
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
912
1158
  import_react_hook_form5.Controller,
913
1159
  {
914
1160
  control,
915
1161
  name,
916
- render: ({ field: { ref, ...field }, fieldState: { error } }) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
1162
+ render: ({ field: { ref, ...field }, fieldState: { error } }) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
917
1163
  Textarea,
918
1164
  {
919
1165
  ...props,
@@ -930,15 +1176,15 @@ TextareaField.displayName = "TeachInUI.TextareaField";
930
1176
 
931
1177
  // src/ui/form/rhf/fields/select-field.tsx
932
1178
  var import_react_hook_form6 = require("react-hook-form");
933
- var import_jsx_runtime32 = require("react/jsx-runtime");
1179
+ var import_jsx_runtime33 = require("react/jsx-runtime");
934
1180
  function SelectField({ name, selectionMode, ...props }) {
935
1181
  const { control } = (0, import_react_hook_form6.useFormContext)();
936
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
1182
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
937
1183
  import_react_hook_form6.Controller,
938
1184
  {
939
1185
  control,
940
1186
  name,
941
- render: ({ field, fieldState: { error } }) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
1187
+ render: ({ field, fieldState: { error } }) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
942
1188
  Select,
943
1189
  {
944
1190
  selectionMode,
@@ -956,15 +1202,15 @@ SelectField.displayName = "TeachInUI.SelectField";
956
1202
 
957
1203
  // src/ui/form/rhf/fields/autocomplete-field.tsx
958
1204
  var import_react_hook_form7 = require("react-hook-form");
959
- var import_jsx_runtime33 = require("react/jsx-runtime");
1205
+ var import_jsx_runtime34 = require("react/jsx-runtime");
960
1206
  function AutocompleteField({ name, ...props }) {
961
1207
  const { control } = (0, import_react_hook_form7.useFormContext)();
962
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
1208
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
963
1209
  import_react_hook_form7.Controller,
964
1210
  {
965
1211
  control,
966
1212
  name,
967
- render: ({ field, fieldState: { error } }) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
1213
+ render: ({ field, fieldState: { error } }) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
968
1214
  Autocomplete,
969
1215
  {
970
1216
  ...props,
@@ -981,15 +1227,15 @@ AutocompleteField.displayName = "TeachInUI.AutocompleteField";
981
1227
 
982
1228
  // src/ui/form/rhf/fields/date-picker-field.tsx
983
1229
  var import_react_hook_form8 = require("react-hook-form");
984
- var import_jsx_runtime34 = require("react/jsx-runtime");
1230
+ var import_jsx_runtime35 = require("react/jsx-runtime");
985
1231
  function DatePickerField({ name, ...props }) {
986
1232
  const { control } = (0, import_react_hook_form8.useFormContext)();
987
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
1233
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
988
1234
  import_react_hook_form8.Controller,
989
1235
  {
990
1236
  control,
991
1237
  name,
992
- render: ({ field: { ref, ...field }, fieldState: { error } }) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
1238
+ render: ({ field: { ref, ...field }, fieldState: { error } }) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
993
1239
  DatePicker,
994
1240
  {
995
1241
  ...props,
@@ -1006,17 +1252,17 @@ DatePickerField.displayName = "TeachInUI.DatePickerField";
1006
1252
 
1007
1253
  // src/ui/form/rhf/fields/checkbox-field.tsx
1008
1254
  var import_react_hook_form9 = require("react-hook-form");
1009
- var import_jsx_runtime35 = require("react/jsx-runtime");
1255
+ var import_jsx_runtime36 = require("react/jsx-runtime");
1010
1256
  function CheckboxField({ name, ...props }) {
1011
1257
  const { control } = (0, import_react_hook_form9.useFormContext)();
1012
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
1258
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
1013
1259
  import_react_hook_form9.Controller,
1014
1260
  {
1015
1261
  control,
1016
1262
  name,
1017
- render: ({ field, fieldState: { error } }) => /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { children: [
1018
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Checkbox, { ...props, isSelected: field.value, onValueChange: field.onChange }),
1019
- error && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "text-tiny text-danger", children: error.message })
1263
+ render: ({ field, fieldState: { error } }) => /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { children: [
1264
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Checkbox, { ...props, isSelected: field.value, onValueChange: field.onChange }),
1265
+ error && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "text-tiny text-danger", children: error.message })
1020
1266
  ] })
1021
1267
  }
1022
1268
  );
@@ -1025,17 +1271,17 @@ CheckboxField.displayName = "TeachInUI.CheckboxField";
1025
1271
 
1026
1272
  // src/ui/form/rhf/fields/switch-field.tsx
1027
1273
  var import_react_hook_form10 = require("react-hook-form");
1028
- var import_jsx_runtime36 = require("react/jsx-runtime");
1274
+ var import_jsx_runtime37 = require("react/jsx-runtime");
1029
1275
  function SwitchField({ name, ...props }) {
1030
1276
  const { control } = (0, import_react_hook_form10.useFormContext)();
1031
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
1277
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
1032
1278
  import_react_hook_form10.Controller,
1033
1279
  {
1034
1280
  control,
1035
1281
  name,
1036
- render: ({ field, fieldState: { error } }) => /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { children: [
1037
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Switch, { ...props, isSelected: field.value, onValueChange: field.onChange }),
1038
- error && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "text-tiny text-danger", children: error.message })
1282
+ render: ({ field, fieldState: { error } }) => /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { children: [
1283
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Switch, { ...props, isSelected: field.value, onValueChange: field.onChange }),
1284
+ error && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "text-tiny text-danger", children: error.message })
1039
1285
  ] })
1040
1286
  }
1041
1287
  );
@@ -1044,15 +1290,15 @@ SwitchField.displayName = "TeachInUI.SwitchField";
1044
1290
 
1045
1291
  // src/ui/form/rhf/fields/radio-field.tsx
1046
1292
  var import_react_hook_form11 = require("react-hook-form");
1047
- var import_jsx_runtime37 = require("react/jsx-runtime");
1293
+ var import_jsx_runtime38 = require("react/jsx-runtime");
1048
1294
  function RadioField({ name, ...props }) {
1049
1295
  const { control } = (0, import_react_hook_form11.useFormContext)();
1050
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
1296
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
1051
1297
  import_react_hook_form11.Controller,
1052
1298
  {
1053
1299
  control,
1054
1300
  name,
1055
- render: ({ field: { ref, value, onChange, ...field }, fieldState: { error } }) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
1301
+ render: ({ field: { ref, value, onChange, ...field }, fieldState: { error } }) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
1056
1302
  RadioGroup,
1057
1303
  {
1058
1304
  ...props,
@@ -1071,15 +1317,15 @@ RadioField.displayName = "TeachInUI.RadioField";
1071
1317
 
1072
1318
  // src/ui/form/form.tsx
1073
1319
  var import_form = require("@heroui/form");
1074
- var import_react29 = __toESM(require("react"));
1075
- var import_jsx_runtime38 = require("react/jsx-runtime");
1076
- var Form = import_react29.default.forwardRef(({ ...props }, ref) => {
1077
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_form.Form, { ref, ...props });
1320
+ var import_react31 = __toESM(require("react"));
1321
+ var import_jsx_runtime39 = require("react/jsx-runtime");
1322
+ var Form = import_react31.default.forwardRef(({ ...props }, ref) => {
1323
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_form.Form, { ref, ...props });
1078
1324
  });
1079
1325
  Form.displayName = "TeachInUI.Form";
1080
1326
 
1081
1327
  // src/ui/format/datetime.tsx
1082
- var import_jsx_runtime39 = require("react/jsx-runtime");
1328
+ var import_jsx_runtime40 = require("react/jsx-runtime");
1083
1329
  var defaultFormat = {
1084
1330
  day: "numeric",
1085
1331
  month: "long",
@@ -1095,15 +1341,15 @@ function Datetime({
1095
1341
  fallback = "\u2014"
1096
1342
  }) {
1097
1343
  const formatter = new Intl.DateTimeFormat(locale, format);
1098
- if (!value) return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_jsx_runtime39.Fragment, { children: fallback });
1344
+ if (!value) return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_jsx_runtime40.Fragment, { children: fallback });
1099
1345
  const date = value instanceof Date ? value : new Date(value);
1100
- if (isNaN(date.getTime())) return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_jsx_runtime39.Fragment, { children: fallback });
1101
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_jsx_runtime39.Fragment, { children: formatter.format(date) });
1346
+ if (isNaN(date.getTime())) return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_jsx_runtime40.Fragment, { children: fallback });
1347
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_jsx_runtime40.Fragment, { children: formatter.format(date) });
1102
1348
  }
1103
1349
  Datetime.displayName = "TeachInUI.FormatDatetime";
1104
1350
 
1105
1351
  // src/ui/format/date.tsx
1106
- var import_jsx_runtime40 = require("react/jsx-runtime");
1352
+ var import_jsx_runtime41 = require("react/jsx-runtime");
1107
1353
  var defaultFormat2 = {
1108
1354
  day: "numeric",
1109
1355
  month: "long",
@@ -1116,15 +1362,15 @@ function DateFormat({
1116
1362
  fallback = "\u2014"
1117
1363
  }) {
1118
1364
  const formatter = new Intl.DateTimeFormat(locale, format);
1119
- if (!value) return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_jsx_runtime40.Fragment, { children: fallback });
1365
+ if (!value) return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_jsx_runtime41.Fragment, { children: fallback });
1120
1366
  const date = value instanceof Date ? value : new Date(value);
1121
- if (isNaN(date.getTime())) return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_jsx_runtime40.Fragment, { children: fallback });
1122
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_jsx_runtime40.Fragment, { children: formatter.format(date) });
1367
+ if (isNaN(date.getTime())) return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_jsx_runtime41.Fragment, { children: fallback });
1368
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_jsx_runtime41.Fragment, { children: formatter.format(date) });
1123
1369
  }
1124
1370
  DateFormat.displayName = "TeachInUI.FormatDate";
1125
1371
 
1126
1372
  // src/ui/format/time.tsx
1127
- var import_jsx_runtime41 = require("react/jsx-runtime");
1373
+ var import_jsx_runtime42 = require("react/jsx-runtime");
1128
1374
  var defaultFormat3 = {
1129
1375
  hour: "2-digit",
1130
1376
  minute: "2-digit"
@@ -1136,15 +1382,15 @@ function Time({
1136
1382
  fallback = "\u2014"
1137
1383
  }) {
1138
1384
  const formatter = new Intl.DateTimeFormat(locale, format);
1139
- if (!value) return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_jsx_runtime41.Fragment, { children: fallback });
1385
+ if (!value) return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_jsx_runtime42.Fragment, { children: fallback });
1140
1386
  const date = value instanceof Date ? value : new Date(value);
1141
- if (isNaN(date.getTime())) return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_jsx_runtime41.Fragment, { children: fallback });
1142
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_jsx_runtime41.Fragment, { children: formatter.format(date) });
1387
+ if (isNaN(date.getTime())) return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_jsx_runtime42.Fragment, { children: fallback });
1388
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_jsx_runtime42.Fragment, { children: formatter.format(date) });
1143
1389
  }
1144
1390
  Time.displayName = "TeachInUI.FormatTime";
1145
1391
 
1146
1392
  // src/ui/format/currency.tsx
1147
- var import_jsx_runtime42 = require("react/jsx-runtime");
1393
+ var import_jsx_runtime43 = require("react/jsx-runtime");
1148
1394
  function Currency({
1149
1395
  amount,
1150
1396
  currency = "RUB",
@@ -1159,23 +1405,23 @@ function Currency({
1159
1405
  maximumFractionDigits: decimals
1160
1406
  }
1161
1407
  });
1162
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_jsx_runtime42.Fragment, { children: formatter.format(amount) });
1408
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_jsx_runtime43.Fragment, { children: formatter.format(amount) });
1163
1409
  }
1164
1410
  Currency.displayName = "TeachInUI.FormatCurrency";
1165
1411
 
1166
1412
  // src/ui/format/number.tsx
1167
- var import_jsx_runtime43 = require("react/jsx-runtime");
1168
- function Number2({ value, decimals, locale = "ru-RU" }) {
1413
+ var import_jsx_runtime44 = require("react/jsx-runtime");
1414
+ function Number3({ value, decimals, locale = "ru-RU" }) {
1169
1415
  const formatter = new Intl.NumberFormat(locale, {
1170
1416
  minimumFractionDigits: decimals != null ? decimals : 0,
1171
1417
  maximumFractionDigits: decimals != null ? decimals : 2
1172
1418
  });
1173
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_jsx_runtime43.Fragment, { children: formatter.format(value) });
1419
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_jsx_runtime44.Fragment, { children: formatter.format(value) });
1174
1420
  }
1175
- Number2.displayName = "TeachInUI.FormatNumber";
1421
+ Number3.displayName = "TeachInUI.FormatNumber";
1176
1422
 
1177
1423
  // src/ui/format/percent.tsx
1178
- var import_jsx_runtime44 = require("react/jsx-runtime");
1424
+ var import_jsx_runtime45 = require("react/jsx-runtime");
1179
1425
  function Percent({
1180
1426
  value,
1181
1427
  decimals = 1,
@@ -1188,12 +1434,12 @@ function Percent({
1188
1434
  maximumFractionDigits: decimals
1189
1435
  });
1190
1436
  const normalizedValue = unit === "percent" ? value / 100 : value;
1191
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_jsx_runtime44.Fragment, { children: formatter.format(normalizedValue) });
1437
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_jsx_runtime45.Fragment, { children: formatter.format(normalizedValue) });
1192
1438
  }
1193
1439
  Percent.displayName = "TeachInUI.FormatPercent";
1194
1440
 
1195
1441
  // src/ui/format/plural.tsx
1196
- var import_jsx_runtime45 = require("react/jsx-runtime");
1442
+ var import_jsx_runtime46 = require("react/jsx-runtime");
1197
1443
  function Plural({
1198
1444
  count,
1199
1445
  one,
@@ -1214,12 +1460,12 @@ function Plural({
1214
1460
  };
1215
1461
  const selectedForm = forms[rule];
1216
1462
  const result = showCount ? `${count} ${selectedForm}` : selectedForm;
1217
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_jsx_runtime45.Fragment, { children: result });
1463
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_jsx_runtime46.Fragment, { children: result });
1218
1464
  }
1219
1465
  Plural.displayName = "TeachInUI.FormatPlural";
1220
1466
 
1221
1467
  // src/ui/format/duration.tsx
1222
- var import_jsx_runtime46 = require("react/jsx-runtime");
1468
+ var import_jsx_runtime47 = require("react/jsx-runtime");
1223
1469
  function Duration({
1224
1470
  minutes = 0,
1225
1471
  hours = 0,
@@ -1241,25 +1487,25 @@ function Duration({
1241
1487
  if (remainingMinutes > 0 || totalDays === 0 && totalHours === 0) {
1242
1488
  parts.push(compact ? `${remainingMinutes}\u043C` : `${remainingMinutes} \u043C\u0438\u043D`);
1243
1489
  }
1244
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_jsx_runtime46.Fragment, { children: parts.join(" ") });
1490
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_jsx_runtime47.Fragment, { children: parts.join(" ") });
1245
1491
  }
1246
1492
  Duration.displayName = "TeachInUI.FormatDuration";
1247
1493
 
1248
1494
  // src/ui/format/boolean.tsx
1249
- var import_jsx_runtime47 = require("react/jsx-runtime");
1250
- function Boolean({
1495
+ var import_jsx_runtime48 = require("react/jsx-runtime");
1496
+ function Boolean2({
1251
1497
  value,
1252
1498
  trueLabel = "\u0414\u0430",
1253
1499
  falseLabel = "\u041D\u0435\u0442",
1254
1500
  nullLabel = "\u2014"
1255
1501
  }) {
1256
- if (value === null || value === void 0) return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_jsx_runtime47.Fragment, { children: nullLabel });
1257
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_jsx_runtime47.Fragment, { children: value ? trueLabel : falseLabel });
1502
+ if (value === null || value === void 0) return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_jsx_runtime48.Fragment, { children: nullLabel });
1503
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_jsx_runtime48.Fragment, { children: value ? trueLabel : falseLabel });
1258
1504
  }
1259
- Boolean.displayName = "TeachInUI.FormatBoolean";
1505
+ Boolean2.displayName = "TeachInUI.FormatBoolean";
1260
1506
 
1261
1507
  // src/ui/format/uuid.tsx
1262
- var import_jsx_runtime48 = require("react/jsx-runtime");
1508
+ var import_jsx_runtime49 = require("react/jsx-runtime");
1263
1509
  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}$/;
1264
1510
  function normalizeUuid(value) {
1265
1511
  const trimmed = value.trim();
@@ -1282,20 +1528,20 @@ function Uuid({
1282
1528
  showVersion = false,
1283
1529
  invalidFallback = "\u2014"
1284
1530
  }) {
1285
- if (!value) return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_jsx_runtime48.Fragment, { children: invalidFallback });
1531
+ if (!value) return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_jsx_runtime49.Fragment, { children: invalidFallback });
1286
1532
  const normalized = normalizeUuid(value);
1287
- if (!normalized) return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_jsx_runtime48.Fragment, { children: invalidFallback });
1533
+ if (!normalized) return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_jsx_runtime49.Fragment, { children: invalidFallback });
1288
1534
  const formatted = letterCase === "upper" ? normalized.toUpperCase() : normalized;
1289
- if (!showVersion) return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_jsx_runtime48.Fragment, { children: formatted });
1535
+ if (!showVersion) return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_jsx_runtime49.Fragment, { children: formatted });
1290
1536
  const version = detectUuidVersion(normalized);
1291
- return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_jsx_runtime48.Fragment, { children: version !== null ? `${formatted} (v${version})` : formatted });
1537
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_jsx_runtime49.Fragment, { children: version !== null ? `${formatted} (v${version})` : formatted });
1292
1538
  }
1293
1539
  Uuid.displayName = "TeachInUI.FormatUUID";
1294
1540
 
1295
1541
  // src/ui/surface/bento/bento.tsx
1296
- var import_tailwind_variants5 = require("tailwind-variants");
1297
- var import_jsx_runtime49 = require("react/jsx-runtime");
1298
- var bento = (0, import_tailwind_variants5.tv)({
1542
+ var import_tailwind_variants7 = require("tailwind-variants");
1543
+ var import_jsx_runtime50 = require("react/jsx-runtime");
1544
+ var bento = (0, import_tailwind_variants7.tv)({
1299
1545
  base: "p-8 transition-colors",
1300
1546
  variants: {
1301
1547
  color: {
@@ -1332,23 +1578,14 @@ var bento = (0, import_tailwind_variants5.tv)({
1332
1578
  }
1333
1579
  });
1334
1580
  var Bento = ({ className, ...props }) => {
1335
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: bento({ ...props, className }), ...props });
1581
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: bento({ ...props, className }), ...props });
1336
1582
  };
1337
1583
  Bento.displayName = "TeachInUI.Bento";
1338
1584
 
1339
1585
  // src/ui/surface/card/card.tsx
1340
- var import_react30 = __toESM(require("react"));
1586
+ var import_react32 = __toESM(require("react"));
1341
1587
  var import_card = require("@heroui/card");
1342
-
1343
- // src/ui/style/css.ts
1344
- var import_clsx = require("clsx");
1345
- var import_tailwind_merge = require("tailwind-merge");
1346
- function cn(...inputs) {
1347
- return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
1348
- }
1349
-
1350
- // src/ui/surface/card/card.tsx
1351
- var import_jsx_runtime50 = require("react/jsx-runtime");
1588
+ var import_jsx_runtime51 = require("react/jsx-runtime");
1352
1589
  var CardBase = extendVariants2(import_card.Card, {
1353
1590
  variants: {
1354
1591
  radius: {
@@ -1361,20 +1598,20 @@ var CardBase = extendVariants2(import_card.Card, {
1361
1598
  shadow: "none"
1362
1599
  }
1363
1600
  });
1364
- var Root = import_react30.default.forwardRef(({ children, className, ...props }, ref) => {
1365
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(CardBase, { ref, className: cn("bg-default-100", className), ...props, children });
1601
+ var Root = import_react32.default.forwardRef(({ children, className, ...props }, ref) => {
1602
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(CardBase, { ref, className: cn("bg-default-100", className), ...props, children });
1366
1603
  });
1367
1604
  Root.displayName = "TeachInUI.Card.Root";
1368
- var Header = import_react30.default.forwardRef(({ children, ...props }, ref) => {
1369
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_card.CardHeader, { ref, ...props, children });
1605
+ var Header = import_react32.default.forwardRef(({ children, ...props }, ref) => {
1606
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_card.CardHeader, { ref, ...props, children });
1370
1607
  });
1371
1608
  Header.displayName = "TeachInUI.Card.Header";
1372
- var Body = import_react30.default.forwardRef(({ children, ...props }, ref) => {
1373
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_card.CardBody, { ref, ...props, children });
1609
+ var Body = import_react32.default.forwardRef(({ children, ...props }, ref) => {
1610
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_card.CardBody, { ref, ...props, children });
1374
1611
  });
1375
1612
  Body.displayName = "TeachInUI.Card.Body";
1376
- var Footer = import_react30.default.forwardRef(({ children, ...props }, ref) => {
1377
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_card.CardFooter, { ref, ...props, children });
1613
+ var Footer = import_react32.default.forwardRef(({ children, ...props }, ref) => {
1614
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_card.CardFooter, { ref, ...props, children });
1378
1615
  });
1379
1616
  Footer.displayName = "TeachInUI.Card.Footer";
1380
1617
  var Card = {
@@ -1386,9 +1623,9 @@ var Card = {
1386
1623
 
1387
1624
  // src/ui/layout/container/container.tsx
1388
1625
  var import_react_slot = require("@radix-ui/react-slot");
1389
- var import_tailwind_variants6 = require("tailwind-variants");
1390
- var import_jsx_runtime51 = require("react/jsx-runtime");
1391
- var variants = (0, import_tailwind_variants6.tv)({
1626
+ var import_tailwind_variants8 = require("tailwind-variants");
1627
+ var import_jsx_runtime52 = require("react/jsx-runtime");
1628
+ var variants = (0, import_tailwind_variants8.tv)({
1392
1629
  base: "w-full mx-auto px-6",
1393
1630
  variants: {
1394
1631
  size: {
@@ -1407,58 +1644,58 @@ var variants = (0, import_tailwind_variants6.tv)({
1407
1644
  });
1408
1645
  var Container = ({ children, asChild = false, className, size, ...props }) => {
1409
1646
  const Comp = asChild ? import_react_slot.Slot : "div";
1410
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Comp, { className: cn(variants({ size }), className), ...props, children });
1647
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Comp, { className: cn(variants({ size }), className), ...props, children });
1411
1648
  };
1412
1649
  Container.displayName = "TeachInUI.Container";
1413
1650
 
1414
1651
  // src/ui/layout/page/breadcrumbs.tsx
1415
1652
  var import_breadcrumbs = require("@heroui/breadcrumbs");
1416
- var import_jsx_runtime52 = require("react/jsx-runtime");
1417
- 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)) });
1653
+ var import_jsx_runtime53 = require("react/jsx-runtime");
1654
+ var Breadcrumbs = ({ items }) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_breadcrumbs.Breadcrumbs, { children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_breadcrumbs.BreadcrumbItem, { href: item.href, isDisabled: item.href === void 0, children: item.label }, item.label)) });
1418
1655
 
1419
1656
  // src/ui/layout/page/page-content.tsx
1420
- var import_jsx_runtime53 = require("react/jsx-runtime");
1657
+ var import_jsx_runtime54 = require("react/jsx-runtime");
1421
1658
  var Root2 = ({
1422
1659
  children,
1423
1660
  breadcrumbs = []
1424
- }) => /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex flex-col gap-6", children: [
1425
- breadcrumbs.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Breadcrumbs, { items: breadcrumbs }),
1661
+ }) => /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "flex flex-col gap-6", children: [
1662
+ breadcrumbs.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Breadcrumbs, { items: breadcrumbs }),
1426
1663
  children
1427
1664
  ] });
1428
1665
  Root2.displayName = "TeachInUI.PageContent.Root";
1429
- var Header2 = ({ children, ...others }) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("header", { className: "flex items-center justify-between gap-4", role: "banner", ...others, children });
1666
+ var Header2 = ({ children, ...others }) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("header", { className: "flex items-center justify-between gap-4", role: "banner", ...others, children });
1430
1667
  Header2.displayName = "TeachInUI.PageContent.Header";
1431
1668
  var Title = ({
1432
1669
  children,
1433
1670
  ...others
1434
- }) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("h1", { className: "text-4xl leading-10 font-bold", ...others, children });
1671
+ }) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("h1", { className: "text-4xl leading-10 font-bold", ...others, children });
1435
1672
  Title.displayName = "TeachInUI.PageContent.Title";
1436
1673
  var Actions = ({
1437
1674
  children,
1438
1675
  ...others
1439
- }) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "flex gap-2", role: "group", ...others, children });
1676
+ }) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "flex gap-2", role: "group", ...others, children });
1440
1677
  Actions.displayName = "TeachInUI.PageContent.Actions";
1441
- var Body2 = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "flex flex-col gap-6", children });
1678
+ var Body2 = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "flex flex-col gap-6", children });
1442
1679
  Body2.displayName = "TeachInUI.PageContent.Body";
1443
1680
  var Section = ({
1444
1681
  children,
1445
1682
  ...others
1446
- }) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("section", { className: "flex flex-col gap-4", ...others, children });
1683
+ }) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("section", { className: "flex flex-col gap-4", ...others, children });
1447
1684
  Section.displayName = "TeachInUI.PageContent.Section";
1448
1685
  var SectionHeader = ({
1449
1686
  children,
1450
1687
  ...others
1451
- }) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "flex items-center justify-between", ...others, children });
1688
+ }) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "flex items-center justify-between", ...others, children });
1452
1689
  SectionHeader.displayName = "TeachInUI.PageContent.SectionHeader";
1453
1690
  var SectionTitle = ({
1454
1691
  children,
1455
1692
  ...others
1456
- }) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("h2", { className: "text-3xl leading-9 font-bold", ...others, children });
1693
+ }) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("h2", { className: "text-3xl leading-9 font-bold", ...others, children });
1457
1694
  SectionTitle.displayName = "TeachInUI.PageContent.SectionTitle";
1458
1695
  var SectionActions = ({
1459
1696
  children,
1460
1697
  ...others
1461
- }) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "flex gap-2", role: "group", ...others, children });
1698
+ }) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "flex gap-2", role: "group", ...others, children });
1462
1699
  SectionActions.displayName = "TeachInUI.PageContent.SectionActions";
1463
1700
  var PageContent = {
1464
1701
  Root: Root2,
@@ -1473,19 +1710,19 @@ var PageContent = {
1473
1710
  };
1474
1711
 
1475
1712
  // src/ui/layout/page/page-loading.tsx
1476
- var import_jsx_runtime54 = require("react/jsx-runtime");
1477
- 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, {}) });
1713
+ var import_jsx_runtime55 = require("react/jsx-runtime");
1714
+ var PageLoading = () => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "flex h-screen items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Spinner, {}) });
1478
1715
  PageLoading.displayName = "TeachInUI.PageLoading";
1479
1716
 
1480
1717
  // src/ui/layout/page/section-loading.tsx
1481
- var import_jsx_runtime55 = require("react/jsx-runtime");
1482
- 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, {}) });
1718
+ var import_jsx_runtime56 = require("react/jsx-runtime");
1719
+ var SectionLoading = () => /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "flex min-h-[400px] items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Spinner, {}) });
1483
1720
  SectionLoading.displayName = "TeachInUI.SectionLoading";
1484
1721
 
1485
1722
  // src/ui/layout/flex/flex.tsx
1486
- var import_tailwind_variants7 = require("tailwind-variants");
1487
- var import_jsx_runtime56 = require("react/jsx-runtime");
1488
- var variants2 = (0, import_tailwind_variants7.tv)({
1723
+ var import_tailwind_variants9 = require("tailwind-variants");
1724
+ var import_jsx_runtime57 = require("react/jsx-runtime");
1725
+ var variants2 = (0, import_tailwind_variants9.tv)({
1489
1726
  base: "flex",
1490
1727
  variants: {
1491
1728
  direction: {
@@ -1532,14 +1769,14 @@ var variants2 = (0, import_tailwind_variants7.tv)({
1532
1769
  }
1533
1770
  });
1534
1771
  var Flex = ({ className, ...props }) => {
1535
- return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: variants2({ ...props, className }), ...props });
1772
+ return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: variants2({ ...props, className }), ...props });
1536
1773
  };
1537
1774
  Flex.displayName = "TeachInUI.Flex";
1538
1775
 
1539
1776
  // src/ui/layout/grid/grid.tsx
1540
- var import_tailwind_variants8 = require("tailwind-variants");
1541
- var import_jsx_runtime57 = require("react/jsx-runtime");
1542
- var variants3 = (0, import_tailwind_variants8.tv)({
1777
+ var import_tailwind_variants10 = require("tailwind-variants");
1778
+ var import_jsx_runtime58 = require("react/jsx-runtime");
1779
+ var variants3 = (0, import_tailwind_variants10.tv)({
1543
1780
  base: "grid",
1544
1781
  variants: {
1545
1782
  columns: {
@@ -1588,26 +1825,26 @@ var variants3 = (0, import_tailwind_variants8.tv)({
1588
1825
  }
1589
1826
  });
1590
1827
  var Grid = ({ className, ...props }) => {
1591
- return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: variants3({ ...props, className }), ...props });
1828
+ return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: variants3({ ...props, className }), ...props });
1592
1829
  };
1593
1830
  Grid.displayName = "TeachInUI.Grid";
1594
1831
 
1595
1832
  // src/ui/layout/divider/divider.tsx
1596
- var import_react31 = __toESM(require("react"));
1833
+ var import_react33 = __toESM(require("react"));
1597
1834
  var import_divider = require("@heroui/divider");
1598
- var import_jsx_runtime58 = require("react/jsx-runtime");
1599
- var Divider = import_react31.default.forwardRef((props, ref) => {
1835
+ var import_jsx_runtime59 = require("react/jsx-runtime");
1836
+ var Divider = import_react33.default.forwardRef((props, ref) => {
1600
1837
  const { ...restProps } = props;
1601
- return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_divider.Divider, { ref, ...restProps });
1838
+ return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_divider.Divider, { ref, ...restProps });
1602
1839
  });
1603
1840
  Divider.displayName = "TeachInUI.Divider";
1604
1841
 
1605
1842
  // src/ui/layout/scroll-shadow/scroll-shadow.tsx
1606
- var import_react32 = __toESM(require("react"));
1843
+ var import_react34 = __toESM(require("react"));
1607
1844
  var import_scroll_shadow = require("@heroui/scroll-shadow");
1608
- var import_jsx_runtime59 = require("react/jsx-runtime");
1609
- var ScrollShadow = import_react32.default.forwardRef((props, ref) => {
1610
- return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_scroll_shadow.ScrollShadow, { ref, ...props });
1845
+ var import_jsx_runtime60 = require("react/jsx-runtime");
1846
+ var ScrollShadow = import_react34.default.forwardRef((props, ref) => {
1847
+ return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_scroll_shadow.ScrollShadow, { ref, ...props });
1611
1848
  });
1612
1849
  ScrollShadow.displayName = "TeachInUI.ScrollShadow";
1613
1850
 
@@ -1618,18 +1855,18 @@ var AccordionItem = Object.assign(import_accordion.AccordionItem, { displayName:
1618
1855
 
1619
1856
  // src/ui/navigation/link/link.tsx
1620
1857
  var import_link = require("@heroui/link");
1621
- var import_jsx_runtime60 = require("react/jsx-runtime");
1858
+ var import_jsx_runtime61 = require("react/jsx-runtime");
1622
1859
  function Link({ children, ...props }) {
1623
- return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_link.Link, { ...props, children });
1860
+ return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_link.Link, { ...props, children });
1624
1861
  }
1625
1862
  Link.displayName = "TeachInUI.Link";
1626
1863
 
1627
1864
  // src/ui/navigation/tabs/tabs.tsx
1628
- var import_react33 = __toESM(require("react"));
1865
+ var import_react35 = __toESM(require("react"));
1629
1866
  var import_tabs = require("@heroui/tabs");
1630
- var import_jsx_runtime61 = require("react/jsx-runtime");
1631
- var Root3 = import_react33.default.forwardRef(({ children, ...props }, ref) => {
1632
- return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_tabs.Tabs, { ref, ...props, children });
1867
+ var import_jsx_runtime62 = require("react/jsx-runtime");
1868
+ var Root3 = import_react35.default.forwardRef(({ children, ...props }, ref) => {
1869
+ return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_tabs.Tabs, { ref, ...props, children });
1633
1870
  });
1634
1871
  Root3.displayName = "TeachInUI.Tabs.Root";
1635
1872
  var Tab = Object.assign(import_tabs.Tab, {
@@ -1641,35 +1878,35 @@ var Tabs = {
1641
1878
  };
1642
1879
 
1643
1880
  // src/ui/navigation/navbar/navbar.tsx
1644
- var import_react34 = __toESM(require("react"));
1881
+ var import_react36 = __toESM(require("react"));
1645
1882
  var import_navbar = require("@heroui/navbar");
1646
- var import_jsx_runtime62 = require("react/jsx-runtime");
1647
- var Navbar = import_react34.default.forwardRef((props, ref) => {
1648
- return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_navbar.Navbar, { ref, ...props });
1883
+ var import_jsx_runtime63 = require("react/jsx-runtime");
1884
+ var Navbar = import_react36.default.forwardRef((props, ref) => {
1885
+ return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_navbar.Navbar, { ref, ...props });
1649
1886
  });
1650
1887
  Navbar.displayName = "TeachInUI.Navbar";
1651
- var NavbarBrand = import_react34.default.forwardRef((props, ref) => {
1652
- return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_navbar.NavbarBrand, { ref, ...props });
1888
+ var NavbarBrand = import_react36.default.forwardRef((props, ref) => {
1889
+ return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_navbar.NavbarBrand, { ref, ...props });
1653
1890
  });
1654
1891
  NavbarBrand.displayName = "TeachInUI.NavbarBrand";
1655
- var NavbarContent = import_react34.default.forwardRef((props, ref) => {
1656
- return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_navbar.NavbarContent, { ref, ...props });
1892
+ var NavbarContent = import_react36.default.forwardRef((props, ref) => {
1893
+ return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_navbar.NavbarContent, { ref, ...props });
1657
1894
  });
1658
1895
  NavbarContent.displayName = "TeachInUI.NavbarContent";
1659
- var NavbarItem = import_react34.default.forwardRef((props, ref) => {
1660
- return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_navbar.NavbarItem, { ref, ...props });
1896
+ var NavbarItem = import_react36.default.forwardRef((props, ref) => {
1897
+ return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_navbar.NavbarItem, { ref, ...props });
1661
1898
  });
1662
1899
  NavbarItem.displayName = "TeachInUI.NavbarItem";
1663
- var NavbarMenu = import_react34.default.forwardRef((props, ref) => {
1664
- return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_navbar.NavbarMenu, { ref, ...props });
1900
+ var NavbarMenu = import_react36.default.forwardRef((props, ref) => {
1901
+ return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_navbar.NavbarMenu, { ref, ...props });
1665
1902
  });
1666
1903
  NavbarMenu.displayName = "TeachInUI.NavbarMenu";
1667
- var NavbarMenuItem = import_react34.default.forwardRef((props, ref) => {
1668
- return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_navbar.NavbarMenuItem, { ref, ...props });
1904
+ var NavbarMenuItem = import_react36.default.forwardRef((props, ref) => {
1905
+ return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_navbar.NavbarMenuItem, { ref, ...props });
1669
1906
  });
1670
1907
  NavbarMenuItem.displayName = "TeachInUI.NavbarMenuItem";
1671
- var NavbarMenuToggle = import_react34.default.forwardRef((props, ref) => {
1672
- return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_navbar.NavbarMenuToggle, { ref, ...props });
1908
+ var NavbarMenuToggle = import_react36.default.forwardRef((props, ref) => {
1909
+ return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_navbar.NavbarMenuToggle, { ref, ...props });
1673
1910
  });
1674
1911
  NavbarMenuToggle.displayName = "TeachInUI.NavbarMenuToggle";
1675
1912
 
@@ -1682,30 +1919,30 @@ var BreadcrumbItem2 = Object.assign(import_breadcrumbs3.BreadcrumbItem, {
1682
1919
 
1683
1920
  // src/ui/overlays/modal/modal.tsx
1684
1921
  var import_modal = require("@heroui/modal");
1685
- var import_jsx_runtime63 = require("react/jsx-runtime");
1922
+ var import_jsx_runtime64 = require("react/jsx-runtime");
1686
1923
  function Root4({
1687
1924
  size = "md",
1688
1925
  placement = "center",
1689
1926
  children,
1690
1927
  ...props
1691
1928
  }) {
1692
- return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_modal.Modal, { placement, size, ...props, children });
1929
+ return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_modal.Modal, { placement, size, ...props, children });
1693
1930
  }
1694
1931
  Root4.displayName = "TeachInUI.Modal.Root";
1695
1932
  function Content({ children, ...props }) {
1696
- return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_modal.ModalContent, { ...props, children: (onClose) => typeof children === "function" ? children(onClose) : children });
1933
+ return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_modal.ModalContent, { ...props, children: (onClose) => typeof children === "function" ? children(onClose) : children });
1697
1934
  }
1698
1935
  Content.displayName = "TeachInUI.Modal.Content";
1699
1936
  function Header3({ children, ...props }) {
1700
- return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_modal.ModalHeader, { ...props, children });
1937
+ return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_modal.ModalHeader, { ...props, children });
1701
1938
  }
1702
1939
  Header3.displayName = "TeachInUI.Modal.Header";
1703
1940
  function Body3({ children, ...props }) {
1704
- return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_modal.ModalBody, { ...props, children });
1941
+ return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_modal.ModalBody, { ...props, children });
1705
1942
  }
1706
1943
  Body3.displayName = "TeachInUI.Modal.Body";
1707
1944
  function Footer2({ children, ...props }) {
1708
- return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_modal.ModalFooter, { ...props, children });
1945
+ return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_modal.ModalFooter, { ...props, children });
1709
1946
  }
1710
1947
  Footer2.displayName = "TeachInUI.Modal.Footer";
1711
1948
  var Modal = {
@@ -1730,17 +1967,17 @@ var DropdownSection = Object.assign(import_dropdown.DropdownSection, {
1730
1967
 
1731
1968
  // src/ui/overlays/popover/popover.tsx
1732
1969
  var import_popover = require("@heroui/popover");
1733
- var import_jsx_runtime64 = require("react/jsx-runtime");
1970
+ var import_jsx_runtime65 = require("react/jsx-runtime");
1734
1971
  var Root5 = ({ children, ...props }) => {
1735
- return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_popover.Popover, { ...props, children });
1972
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_popover.Popover, { ...props, children });
1736
1973
  };
1737
1974
  Root5.displayName = "TeachInUI.Popover.Root";
1738
1975
  var Trigger = ({ children, ...props }) => {
1739
- return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_popover.PopoverTrigger, { ...props, children });
1976
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_popover.PopoverTrigger, { ...props, children });
1740
1977
  };
1741
1978
  Trigger.displayName = "TeachInUI.Popover.Trigger";
1742
1979
  var Content2 = ({ children, ...props }) => {
1743
- return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_popover.PopoverContent, { ...props, children });
1980
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_popover.PopoverContent, { ...props, children });
1744
1981
  };
1745
1982
  Content2.displayName = "TeachInUI.Popover.Content";
1746
1983
  var Popover = {
@@ -1751,7 +1988,7 @@ var Popover = {
1751
1988
 
1752
1989
  // src/ui/provider/ui-provider.tsx
1753
1990
  var import_system3 = require("@heroui/system");
1754
- var import_jsx_runtime65 = require("react/jsx-runtime");
1991
+ var import_jsx_runtime66 = require("react/jsx-runtime");
1755
1992
  function UIProvider({
1756
1993
  children,
1757
1994
  locale = "ru-RU",
@@ -1759,9 +1996,9 @@ function UIProvider({
1759
1996
  navigate,
1760
1997
  toastProviderProps
1761
1998
  }) {
1762
- return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(import_system3.HeroUIProvider, { labelPlacement, locale, navigate, children: [
1999
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(import_system3.HeroUIProvider, { labelPlacement, locale, navigate, children: [
1763
2000
  children,
1764
- /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(ToastProvider, { ...toastProviderProps })
2001
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(ToastProvider, { ...toastProviderProps })
1765
2002
  ] });
1766
2003
  }
1767
2004
 
@@ -2215,6 +2452,7 @@ var theme = (0, import_theme.heroui)({
2215
2452
  NavbarMenu,
2216
2453
  NavbarMenuItem,
2217
2454
  NavbarMenuToggle,
2455
+ Number,
2218
2456
  PageContent,
2219
2457
  PageLoading,
2220
2458
  Pagination,
@@ -2234,6 +2472,7 @@ var theme = (0, import_theme.heroui)({
2234
2472
  SectionTitle,
2235
2473
  Select,
2236
2474
  SelectField,
2475
+ SelectItem,
2237
2476
  Spinner,
2238
2477
  Switch,
2239
2478
  SwitchField,