@teach-in/react 1.4.0 → 1.5.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 (56) hide show
  1. package/dist/chunk-GTE5VEBV.mjs +68 -0
  2. package/dist/{chunk-UFYLYN5Z.mjs → chunk-QFWSQOF6.mjs} +20 -2
  3. package/dist/{chunk-J3OZNLTZ.mjs → chunk-WG4IPOHE.mjs} +5 -5
  4. package/dist/index.js +62 -18
  5. package/dist/index.mjs +165 -165
  6. package/dist/ui/data/index.mjs +7 -7
  7. package/dist/ui/feedback/index.mjs +11 -11
  8. package/dist/ui/feedback/progress/index.mjs +3 -3
  9. package/dist/ui/form/index.mjs +9 -9
  10. package/dist/ui/form/rhf/fields/autocomplete-field.mjs +9 -9
  11. package/dist/ui/form/rhf/fields/checkbox-field.mjs +9 -9
  12. package/dist/ui/form/rhf/fields/date-picker-field.mjs +9 -9
  13. package/dist/ui/form/rhf/fields/email-field.mjs +9 -9
  14. package/dist/ui/form/rhf/fields/index.mjs +9 -9
  15. package/dist/ui/form/rhf/fields/input-field.mjs +9 -9
  16. package/dist/ui/form/rhf/fields/radio-field.mjs +9 -9
  17. package/dist/ui/form/rhf/fields/search-field.mjs +9 -9
  18. package/dist/ui/form/rhf/fields/select-field.mjs +9 -9
  19. package/dist/ui/form/rhf/fields/switch-field.mjs +9 -9
  20. package/dist/ui/form/rhf/fields/text-field.mjs +9 -9
  21. package/dist/ui/form/rhf/fields/textarea-field.mjs +9 -9
  22. package/dist/ui/form/rhf/index.mjs +9 -9
  23. package/dist/ui/format/index.mjs +6 -6
  24. package/dist/ui/index.js +62 -18
  25. package/dist/ui/index.mjs +163 -163
  26. package/dist/ui/inputs/index.js +34 -4
  27. package/dist/ui/inputs/index.mjs +19 -19
  28. package/dist/ui/inputs/radio/index.mjs +3 -3
  29. package/dist/ui/inputs/switch/favorite-switch.d.ts +23 -2
  30. package/dist/ui/inputs/switch/favorite-switch.js +34 -4
  31. package/dist/ui/inputs/switch/favorite-switch.mjs +1 -1
  32. package/dist/ui/inputs/switch/index.js +34 -4
  33. package/dist/ui/inputs/switch/index.mjs +3 -3
  34. package/dist/ui/layout/container/container.mjs +74 -74
  35. package/dist/ui/layout/container/index.mjs +74 -74
  36. package/dist/ui/layout/index.mjs +81 -81
  37. package/dist/ui/layout/page/index.mjs +7 -7
  38. package/dist/ui/layout/page/page-loading.mjs +6 -6
  39. package/dist/ui/layout/page/section-loading.mjs +6 -6
  40. package/dist/ui/navigation/index.mjs +4 -4
  41. package/dist/ui/provider/index.mjs +6 -6
  42. package/dist/ui/provider/ui-provider.mjs +6 -6
  43. package/dist/ui/surface/bento/bento.d.ts +2 -2
  44. package/dist/ui/surface/bento/bento.js +5 -5
  45. package/dist/ui/surface/bento/bento.mjs +1 -1
  46. package/dist/ui/surface/bento/index.js +5 -5
  47. package/dist/ui/surface/bento/index.mjs +1 -1
  48. package/dist/ui/surface/card/card.d.ts +2427 -5
  49. package/dist/ui/surface/card/card.js +29 -2
  50. package/dist/ui/surface/card/card.mjs +5 -1
  51. package/dist/ui/surface/card/index.js +29 -2
  52. package/dist/ui/surface/card/index.mjs +5 -1
  53. package/dist/ui/surface/index.js +34 -7
  54. package/dist/ui/surface/index.mjs +9 -5
  55. package/package.json +1 -1
  56. package/dist/chunk-E5QSNLSR.mjs +0 -38
@@ -36,9 +36,36 @@ __export(card_exports, {
36
36
  module.exports = __toCommonJS(card_exports);
37
37
  var import_react = __toESM(require("react"));
38
38
  var import_card = require("@heroui/card");
39
+
40
+ // src/utils/extend-variants.ts
41
+ var import_system = require("@heroui/system");
42
+ var extendVariants = (component, config) => {
43
+ return (0, import_system.extendVariants)(component, config);
44
+ };
45
+
46
+ // src/ui/style/css.ts
47
+ var import_clsx = require("clsx");
48
+ var import_tailwind_merge = require("tailwind-merge");
49
+ function cn(...inputs) {
50
+ return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
51
+ }
52
+
53
+ // src/ui/surface/card/card.tsx
39
54
  var import_jsx_runtime = require("react/jsx-runtime");
40
- var Root = import_react.default.forwardRef(({ children, ...props }, ref) => {
41
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_card.Card, { ref, ...props, children });
55
+ var CardBase = extendVariants(import_card.Card, {
56
+ variants: {
57
+ radius: {
58
+ sm: { base: "rounded-lg" },
59
+ md: { base: "rounded-2xl" },
60
+ lg: { base: "rounded-3xl" }
61
+ }
62
+ },
63
+ defaultVariants: {
64
+ shadow: "none"
65
+ }
66
+ });
67
+ var Root = import_react.default.forwardRef(({ children, className, ...props }, ref) => {
68
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CardBase, { ref, className: cn("bg-default-100", className), ...props, children });
42
69
  });
43
70
  Root.displayName = "TeachInUI.Card.Root";
44
71
  var Header = import_react.default.forwardRef(({ children, ...props }, ref) => {
@@ -1,7 +1,11 @@
1
1
  "use client";
2
2
  import {
3
3
  Card
4
- } from "../../../chunk-UFYLYN5Z.mjs";
4
+ } from "../../../chunk-QFWSQOF6.mjs";
5
+ import "../../../chunk-Q6XJI7Q2.mjs";
6
+ import "../../../chunk-LOMRTWX5.mjs";
7
+ import "../../../chunk-Q2ILWL7L.mjs";
8
+ import "../../../chunk-7BTEKEON.mjs";
5
9
  export {
6
10
  Card
7
11
  };
@@ -38,9 +38,36 @@ module.exports = __toCommonJS(card_exports);
38
38
  // src/ui/surface/card/card.tsx
39
39
  var import_react = __toESM(require("react"));
40
40
  var import_card = require("@heroui/card");
41
+
42
+ // src/utils/extend-variants.ts
43
+ var import_system = require("@heroui/system");
44
+ var extendVariants = (component, config) => {
45
+ return (0, import_system.extendVariants)(component, config);
46
+ };
47
+
48
+ // src/ui/style/css.ts
49
+ var import_clsx = require("clsx");
50
+ var import_tailwind_merge = require("tailwind-merge");
51
+ function cn(...inputs) {
52
+ return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
53
+ }
54
+
55
+ // src/ui/surface/card/card.tsx
41
56
  var import_jsx_runtime = require("react/jsx-runtime");
42
- var Root = import_react.default.forwardRef(({ children, ...props }, ref) => {
43
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_card.Card, { ref, ...props, children });
57
+ var CardBase = extendVariants(import_card.Card, {
58
+ variants: {
59
+ radius: {
60
+ sm: { base: "rounded-lg" },
61
+ md: { base: "rounded-2xl" },
62
+ lg: { base: "rounded-3xl" }
63
+ }
64
+ },
65
+ defaultVariants: {
66
+ shadow: "none"
67
+ }
68
+ });
69
+ var Root = import_react.default.forwardRef(({ children, className, ...props }, ref) => {
70
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CardBase, { ref, className: cn("bg-default-100", className), ...props, children });
44
71
  });
45
72
  Root.displayName = "TeachInUI.Card.Root";
46
73
  var Header = import_react.default.forwardRef(({ children, ...props }, ref) => {
@@ -2,7 +2,11 @@
2
2
  import "../../../chunk-57JRJHSH.mjs";
3
3
  import {
4
4
  Card
5
- } from "../../../chunk-UFYLYN5Z.mjs";
5
+ } from "../../../chunk-QFWSQOF6.mjs";
6
+ import "../../../chunk-Q6XJI7Q2.mjs";
7
+ import "../../../chunk-LOMRTWX5.mjs";
8
+ import "../../../chunk-Q2ILWL7L.mjs";
9
+ import "../../../chunk-7BTEKEON.mjs";
6
10
  export {
7
11
  Card
8
12
  };
@@ -41,10 +41,10 @@ module.exports = __toCommonJS(surface_exports);
41
41
  var import_tailwind_variants = require("tailwind-variants");
42
42
  var import_jsx_runtime = require("react/jsx-runtime");
43
43
  var bento = (0, import_tailwind_variants.tv)({
44
- base: "rounded-xl p-6 transition-colors",
44
+ base: "p-8 transition-colors",
45
45
  variants: {
46
46
  color: {
47
- default: "bg-default-50 text-default-700",
47
+ default: "bg-content1 text-foreground",
48
48
  primary: "bg-primary-50 text-primary-700",
49
49
  secondary: "bg-secondary-50 text-secondary-700",
50
50
  success: "bg-success-50 text-success-700",
@@ -53,9 +53,9 @@ var bento = (0, import_tailwind_variants.tv)({
53
53
  },
54
54
  radius: {
55
55
  none: "rounded-none",
56
- sm: "rounded-md",
57
- md: "rounded-lg",
58
- lg: "rounded-xl",
56
+ sm: "rounded-lg",
57
+ md: "rounded-2xl",
58
+ lg: "rounded-3xl",
59
59
  full: "rounded-full"
60
60
  },
61
61
  shadow: {
@@ -84,9 +84,36 @@ Bento.displayName = "TeachInUI.Bento";
84
84
  // src/ui/surface/card/card.tsx
85
85
  var import_react = __toESM(require("react"));
86
86
  var import_card = require("@heroui/card");
87
+
88
+ // src/utils/extend-variants.ts
89
+ var import_system = require("@heroui/system");
90
+ var extendVariants = (component, config) => {
91
+ return (0, import_system.extendVariants)(component, config);
92
+ };
93
+
94
+ // src/ui/style/css.ts
95
+ var import_clsx = require("clsx");
96
+ var import_tailwind_merge = require("tailwind-merge");
97
+ function cn(...inputs) {
98
+ return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
99
+ }
100
+
101
+ // src/ui/surface/card/card.tsx
87
102
  var import_jsx_runtime2 = require("react/jsx-runtime");
88
- var Root = import_react.default.forwardRef(({ children, ...props }, ref) => {
89
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_card.Card, { ref, ...props, children });
103
+ var CardBase = extendVariants(import_card.Card, {
104
+ variants: {
105
+ radius: {
106
+ sm: { base: "rounded-lg" },
107
+ md: { base: "rounded-2xl" },
108
+ lg: { base: "rounded-3xl" }
109
+ }
110
+ },
111
+ defaultVariants: {
112
+ shadow: "none"
113
+ }
114
+ });
115
+ var Root = import_react.default.forwardRef(({ children, className, ...props }, ref) => {
116
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(CardBase, { ref, className: cn("bg-default-100", className), ...props, children });
90
117
  });
91
118
  Root.displayName = "TeachInUI.Card.Root";
92
119
  var Header = import_react.default.forwardRef(({ children, ...props }, ref) => {
@@ -1,14 +1,18 @@
1
1
  "use client";
2
2
  import "../../chunk-UNBE67YJ.mjs";
3
3
  import "../../chunk-PON4ZQKG.mjs";
4
- import {
5
- Bento,
6
- bento
7
- } from "../../chunk-J3OZNLTZ.mjs";
8
4
  import "../../chunk-57JRJHSH.mjs";
9
5
  import {
10
6
  Card
11
- } from "../../chunk-UFYLYN5Z.mjs";
7
+ } from "../../chunk-QFWSQOF6.mjs";
8
+ import {
9
+ Bento,
10
+ bento
11
+ } from "../../chunk-WG4IPOHE.mjs";
12
+ import "../../chunk-Q6XJI7Q2.mjs";
13
+ import "../../chunk-LOMRTWX5.mjs";
14
+ import "../../chunk-Q2ILWL7L.mjs";
15
+ import "../../chunk-7BTEKEON.mjs";
12
16
  export {
13
17
  Bento,
14
18
  Card,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teach-in/react",
3
- "version": "1.4.0",
3
+ "version": "1.5.0",
4
4
  "description": "Библиотека компонентов для создания современного пользовательского интерфейса для react",
5
5
  "keywords": [
6
6
  "ui"
@@ -1,38 +0,0 @@
1
- "use client";
2
-
3
- // src/ui/inputs/switch/favorite-switch.tsx
4
- import { useSwitch } from "@heroui/switch";
5
- import { Bookmark } from "lucide-react";
6
- import { tv } from "tailwind-variants";
7
- import { jsx, jsxs } from "react/jsx-runtime";
8
- var bookmarkVariants = tv({
9
- base: "size-6 stroke-default-400 group-hover:fill-primary-100 group-hover:stroke-default-400",
10
- variants: {
11
- isSelected: {
12
- true: "stroke-primary fill-primary-100"
13
- }
14
- }
15
- });
16
- function FavoriteSwitch({ isSelected, onValueChange }) {
17
- const { Component, slots, getBaseProps, getInputProps, getWrapperProps } = useSwitch({
18
- isSelected,
19
- onValueChange
20
- });
21
- return /* @__PURE__ */ jsxs(Component, { ...getBaseProps(), children: [
22
- /* @__PURE__ */ jsx("div", { className: "sr-only", children: /* @__PURE__ */ jsx("input", { ...getInputProps() }) }),
23
- /* @__PURE__ */ jsx(
24
- "div",
25
- {
26
- ...getWrapperProps(),
27
- className: slots.wrapper({
28
- class: "flex h-8 w-8 cursor-pointer items-center justify-center rounded-sm !bg-transparent"
29
- }),
30
- children: /* @__PURE__ */ jsx(Bookmark, { className: bookmarkVariants({ isSelected }) })
31
- }
32
- )
33
- ] });
34
- }
35
-
36
- export {
37
- FavoriteSwitch
38
- };