@teach-in/react 0.1.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.
- package/LICENSE +21 -0
- package/README.md +9 -0
- package/dist/chunk-25ISU6R3.mjs +1 -0
- package/dist/chunk-26RHRVH2.mjs +18 -0
- package/dist/chunk-2W4N27WQ.mjs +28 -0
- package/dist/chunk-3BST3PYD.mjs +1 -0
- package/dist/chunk-3N5UZODS.mjs +1 -0
- package/dist/chunk-3ZTXXJSO.mjs +25 -0
- package/dist/chunk-4QSIBIUI.mjs +32 -0
- package/dist/chunk-54ZSBA6H.mjs +1 -0
- package/dist/chunk-5EWHMXCP.mjs +1 -0
- package/dist/chunk-5HK7HRTR.mjs +1 -0
- package/dist/chunk-5HUR2CNH.mjs +1 -0
- package/dist/chunk-5IHVMMCK.mjs +1 -0
- package/dist/chunk-5UKTT75Y.mjs +1 -0
- package/dist/chunk-5YMUHF45.mjs +1 -0
- package/dist/chunk-6UIBJVXP.mjs +27 -0
- package/dist/chunk-6WK4W5LL.mjs +17 -0
- package/dist/chunk-7GHK5XYK.mjs +33 -0
- package/dist/chunk-7T3JFARO.mjs +13 -0
- package/dist/chunk-A3AAC7PF.mjs +14 -0
- package/dist/chunk-AQ3ISJKU.mjs +1 -0
- package/dist/chunk-AS4T5M6E.mjs +14 -0
- package/dist/chunk-C3MURCMZ.mjs +19 -0
- package/dist/chunk-CETCW7DS.mjs +24 -0
- package/dist/chunk-CLDAITOP.mjs +26 -0
- package/dist/chunk-CRPCWBXA.mjs +1 -0
- package/dist/chunk-CUVF3U67.mjs +59 -0
- package/dist/chunk-CXAZBWS4.mjs +23 -0
- package/dist/chunk-DBQTFBA3.mjs +10 -0
- package/dist/chunk-DUQFM3QS.mjs +1 -0
- package/dist/chunk-EC3NSPHR.mjs +27 -0
- package/dist/chunk-EVQFKHCM.mjs +1 -0
- package/dist/chunk-FELJP42D.mjs +220 -0
- package/dist/chunk-FXXWSYJA.mjs +1 -0
- package/dist/chunk-GEJLG5RP.mjs +33 -0
- package/dist/chunk-GQ3LBZ2Q.mjs +33 -0
- package/dist/chunk-GRWFJ4FP.mjs +16 -0
- package/dist/chunk-HH7MLUOF.mjs +13 -0
- package/dist/chunk-HJUZTISD.mjs +16 -0
- package/dist/chunk-HZ5YAOU6.mjs +1 -0
- package/dist/chunk-I5AMV7H7.mjs +1 -0
- package/dist/chunk-IAJ6G633.mjs +17 -0
- package/dist/chunk-IZEJE6V2.mjs +14 -0
- package/dist/chunk-JDFRAN4S.mjs +24 -0
- package/dist/chunk-JJHHWDZT.mjs +1 -0
- package/dist/chunk-K3WTHFIG.mjs +1 -0
- package/dist/chunk-KH4D2C2T.mjs +1 -0
- package/dist/chunk-KTUGFQWJ.mjs +16 -0
- package/dist/chunk-LJIVY6GU.mjs +16 -0
- package/dist/chunk-LN7WH3OB.mjs +25 -0
- package/dist/chunk-LOMRTWX5.mjs +12 -0
- package/dist/chunk-LR4R7GFR.mjs +16 -0
- package/dist/chunk-N3EAW6UO.mjs +14 -0
- package/dist/chunk-NBFOX367.mjs +15 -0
- package/dist/chunk-NZI5NBXF.mjs +16 -0
- package/dist/chunk-OEHJDT6R.mjs +1 -0
- package/dist/chunk-ONQIPN3G.mjs +14 -0
- package/dist/chunk-PEB5ZH76.mjs +13 -0
- package/dist/chunk-Q4TQYK6N.mjs +73 -0
- package/dist/chunk-Q6XJI7Q2.mjs +1 -0
- package/dist/chunk-QU35SWES.mjs +28 -0
- package/dist/chunk-R7LDL5CU.mjs +24 -0
- package/dist/chunk-S2TB4GD2.mjs +35 -0
- package/dist/chunk-S3ET5HKP.mjs +33 -0
- package/dist/chunk-T57H3CGO.mjs +47 -0
- package/dist/chunk-TIFF5WZA.mjs +14 -0
- package/dist/chunk-UHLC7GOU.mjs +31 -0
- package/dist/chunk-UTZUYZZL.mjs +1 -0
- package/dist/chunk-UURZJWWV.mjs +1 -0
- package/dist/chunk-V2G5QHZZ.mjs +14 -0
- package/dist/chunk-V2HNFTTX.mjs +1 -0
- package/dist/chunk-V3KKDSQP.mjs +1 -0
- package/dist/chunk-V4HKGJYK.mjs +33 -0
- package/dist/chunk-V77JZXH7.mjs +1 -0
- package/dist/chunk-VOG5HJID.mjs +1 -0
- package/dist/chunk-WJXIRSSW.mjs +1 -0
- package/dist/chunk-WTXPB253.mjs +16 -0
- package/dist/chunk-WYJW5NNA.mjs +1 -0
- package/dist/chunk-WZDFBWUL.mjs +1 -0
- package/dist/chunk-XAW35UDV.mjs +1 -0
- package/dist/chunk-ZRHEFEFS.mjs +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +939 -0
- package/dist/index.mjs +237 -0
- package/dist/ui/actions/button/button.d.ts +25 -0
- package/dist/ui/actions/button/button.js +62 -0
- package/dist/ui/actions/button/button.mjs +8 -0
- package/dist/ui/actions/button/index.d.ts +1 -0
- package/dist/ui/actions/button/index.js +63 -0
- package/dist/ui/actions/button/index.mjs +8 -0
- package/dist/ui/actions/index.d.ts +1 -0
- package/dist/ui/actions/index.js +63 -0
- package/dist/ui/actions/index.mjs +9 -0
- package/dist/ui/data/avatar/avatar.d.ts +6 -0
- package/dist/ui/data/avatar/avatar.js +47 -0
- package/dist/ui/data/avatar/avatar.mjs +7 -0
- package/dist/ui/data/avatar/index.d.ts +1 -0
- package/dist/ui/data/avatar/index.js +49 -0
- package/dist/ui/data/avatar/index.mjs +8 -0
- package/dist/ui/data/index.d.ts +2 -0
- package/dist/ui/data/index.js +60 -0
- package/dist/ui/data/index.mjs +14 -0
- package/dist/ui/data/pagination/index.d.ts +1 -0
- package/dist/ui/data/pagination/index.js +49 -0
- package/dist/ui/data/pagination/index.mjs +8 -0
- package/dist/ui/data/pagination/pagination.d.ts +7 -0
- package/dist/ui/data/pagination/pagination.js +47 -0
- package/dist/ui/data/pagination/pagination.mjs +7 -0
- package/dist/ui/feedback/alert/alert.d.ts +8 -0
- package/dist/ui/feedback/alert/alert.js +48 -0
- package/dist/ui/feedback/alert/alert.mjs +8 -0
- package/dist/ui/feedback/alert/index.d.ts +1 -0
- package/dist/ui/feedback/alert/index.js +49 -0
- package/dist/ui/feedback/alert/index.mjs +8 -0
- package/dist/ui/feedback/chip/chip.d.ts +6 -0
- package/dist/ui/feedback/chip/chip.js +48 -0
- package/dist/ui/feedback/chip/chip.mjs +8 -0
- package/dist/ui/feedback/chip/index.d.ts +1 -0
- package/dist/ui/feedback/chip/index.js +49 -0
- package/dist/ui/feedback/chip/index.mjs +8 -0
- package/dist/ui/feedback/index.d.ts +4 -0
- package/dist/ui/feedback/index.js +86 -0
- package/dist/ui/feedback/index.mjs +24 -0
- package/dist/ui/feedback/spinner/index.d.ts +1 -0
- package/dist/ui/feedback/spinner/index.js +51 -0
- package/dist/ui/feedback/spinner/index.mjs +8 -0
- package/dist/ui/feedback/spinner/spinner.d.ts +6 -0
- package/dist/ui/feedback/spinner/spinner.js +50 -0
- package/dist/ui/feedback/spinner/spinner.mjs +8 -0
- package/dist/ui/feedback/tooltip/index.d.ts +1 -0
- package/dist/ui/feedback/tooltip/index.js +51 -0
- package/dist/ui/feedback/tooltip/index.mjs +8 -0
- package/dist/ui/feedback/tooltip/tooltip.d.ts +6 -0
- package/dist/ui/feedback/tooltip/tooltip.js +50 -0
- package/dist/ui/feedback/tooltip/tooltip.mjs +8 -0
- package/dist/ui/form/form.d.ts +6 -0
- package/dist/ui/form/form.js +47 -0
- package/dist/ui/form/form.mjs +7 -0
- package/dist/ui/form/index.d.ts +2 -0
- package/dist/ui/form/index.js +364 -0
- package/dist/ui/form/index.mjs +65 -0
- package/dist/ui/form/rhf/fields/autocomplete-field.d.ts +10 -0
- package/dist/ui/form/rhf/fields/autocomplete-field.js +77 -0
- package/dist/ui/form/rhf/fields/autocomplete-field.mjs +27 -0
- package/dist/ui/form/rhf/fields/checkbox-field.d.ts +10 -0
- package/dist/ui/form/rhf/fields/checkbox-field.js +71 -0
- package/dist/ui/form/rhf/fields/checkbox-field.mjs +27 -0
- package/dist/ui/form/rhf/fields/date-picker-field.d.ts +10 -0
- package/dist/ui/form/rhf/fields/date-picker-field.js +78 -0
- package/dist/ui/form/rhf/fields/date-picker-field.mjs +27 -0
- package/dist/ui/form/rhf/fields/email-field.d.ts +10 -0
- package/dist/ui/form/rhf/fields/email-field.js +76 -0
- package/dist/ui/form/rhf/fields/email-field.mjs +27 -0
- package/dist/ui/form/rhf/fields/index.d.ts +9 -0
- package/dist/ui/form/rhf/fields/index.js +353 -0
- package/dist/ui/form/rhf/fields/index.mjs +59 -0
- package/dist/ui/form/rhf/fields/input-field.d.ts +10 -0
- package/dist/ui/form/rhf/fields/input-field.js +66 -0
- package/dist/ui/form/rhf/fields/input-field.mjs +27 -0
- package/dist/ui/form/rhf/fields/select-field.d.ts +10 -0
- package/dist/ui/form/rhf/fields/select-field.js +94 -0
- package/dist/ui/form/rhf/fields/select-field.mjs +27 -0
- package/dist/ui/form/rhf/fields/switch-field.d.ts +10 -0
- package/dist/ui/form/rhf/fields/switch-field.js +69 -0
- package/dist/ui/form/rhf/fields/switch-field.mjs +27 -0
- package/dist/ui/form/rhf/fields/text-field.d.ts +10 -0
- package/dist/ui/form/rhf/fields/text-field.js +74 -0
- package/dist/ui/form/rhf/fields/text-field.mjs +27 -0
- package/dist/ui/form/rhf/fields/textarea-field.d.ts +10 -0
- package/dist/ui/form/rhf/fields/textarea-field.js +77 -0
- package/dist/ui/form/rhf/fields/textarea-field.mjs +27 -0
- package/dist/ui/form/rhf/index.d.ts +1 -0
- package/dist/ui/form/rhf/index.js +353 -0
- package/dist/ui/form/rhf/index.mjs +60 -0
- package/dist/ui/format/boolean.d.ts +12 -0
- package/dist/ui/format/boolean.js +42 -0
- package/dist/ui/format/boolean.mjs +8 -0
- package/dist/ui/format/currency.d.ts +12 -0
- package/dist/ui/format/currency.js +49 -0
- package/dist/ui/format/currency.mjs +8 -0
- package/dist/ui/format/date.d.ts +12 -0
- package/dist/ui/format/date.js +50 -0
- package/dist/ui/format/date.mjs +8 -0
- package/dist/ui/format/datetime.d.ts +12 -0
- package/dist/ui/format/datetime.js +52 -0
- package/dist/ui/format/datetime.mjs +8 -0
- package/dist/ui/format/duration.d.ts +13 -0
- package/dist/ui/format/duration.js +56 -0
- package/dist/ui/format/duration.mjs +8 -0
- package/dist/ui/format/index.d.ts +9 -0
- package/dist/ui/format/index.js +225 -0
- package/dist/ui/format/index.mjs +40 -0
- package/dist/ui/format/number.d.ts +11 -0
- package/dist/ui/format/number.js +40 -0
- package/dist/ui/format/number.mjs +8 -0
- package/dist/ui/format/percent.d.ts +12 -0
- package/dist/ui/format/percent.js +47 -0
- package/dist/ui/format/percent.mjs +8 -0
- package/dist/ui/format/plural.d.ts +14 -0
- package/dist/ui/format/plural.js +55 -0
- package/dist/ui/format/plural.mjs +8 -0
- package/dist/ui/format/time.d.ts +12 -0
- package/dist/ui/format/time.js +49 -0
- package/dist/ui/format/time.mjs +8 -0
- package/dist/ui/index.d.ts +12 -0
- package/dist/ui/index.js +939 -0
- package/dist/ui/index.mjs +237 -0
- package/dist/ui/inputs/autocomplete/autocomplete.d.ts +11 -0
- package/dist/ui/inputs/autocomplete/autocomplete.js +49 -0
- package/dist/ui/inputs/autocomplete/autocomplete.mjs +7 -0
- package/dist/ui/inputs/autocomplete/index.d.ts +1 -0
- package/dist/ui/inputs/autocomplete/index.js +51 -0
- package/dist/ui/inputs/autocomplete/index.mjs +8 -0
- package/dist/ui/inputs/checkbox/checkbox.d.ts +6 -0
- package/dist/ui/inputs/checkbox/checkbox.js +49 -0
- package/dist/ui/inputs/checkbox/checkbox.mjs +7 -0
- package/dist/ui/inputs/checkbox/index.d.ts +1 -0
- package/dist/ui/inputs/checkbox/index.js +51 -0
- package/dist/ui/inputs/checkbox/index.mjs +8 -0
- package/dist/ui/inputs/date-picker/date-picker.d.ts +6 -0
- package/dist/ui/inputs/date-picker/date-picker.js +50 -0
- package/dist/ui/inputs/date-picker/date-picker.mjs +7 -0
- package/dist/ui/inputs/date-picker/index.d.ts +1 -0
- package/dist/ui/inputs/date-picker/index.js +52 -0
- package/dist/ui/inputs/date-picker/index.mjs +8 -0
- package/dist/ui/inputs/email/email.d.ts +5 -0
- package/dist/ui/inputs/email/email.js +57 -0
- package/dist/ui/inputs/email/email.mjs +9 -0
- package/dist/ui/inputs/email/index.d.ts +1 -0
- package/dist/ui/inputs/email/index.js +59 -0
- package/dist/ui/inputs/email/index.mjs +10 -0
- package/dist/ui/inputs/index.d.ts +9 -0
- package/dist/ui/inputs/index.js +165 -0
- package/dist/ui/inputs/index.mjs +49 -0
- package/dist/ui/inputs/input/index.d.ts +1 -0
- package/dist/ui/inputs/input/index.js +49 -0
- package/dist/ui/inputs/input/index.mjs +8 -0
- package/dist/ui/inputs/input/input.d.ts +5 -0
- package/dist/ui/inputs/input/input.js +47 -0
- package/dist/ui/inputs/input/input.mjs +7 -0
- package/dist/ui/inputs/select/index.d.ts +1 -0
- package/dist/ui/inputs/select/index.js +68 -0
- package/dist/ui/inputs/select/index.mjs +8 -0
- package/dist/ui/inputs/select/select.d.ts +13 -0
- package/dist/ui/inputs/select/select.js +66 -0
- package/dist/ui/inputs/select/select.mjs +7 -0
- package/dist/ui/inputs/switch/index.d.ts +1 -0
- package/dist/ui/inputs/switch/index.js +49 -0
- package/dist/ui/inputs/switch/index.mjs +8 -0
- package/dist/ui/inputs/switch/switch.d.ts +5 -0
- package/dist/ui/inputs/switch/switch.js +48 -0
- package/dist/ui/inputs/switch/switch.mjs +8 -0
- package/dist/ui/inputs/text/index.d.ts +1 -0
- package/dist/ui/inputs/text/index.js +59 -0
- package/dist/ui/inputs/text/index.mjs +10 -0
- package/dist/ui/inputs/text/text.d.ts +5 -0
- package/dist/ui/inputs/text/text.js +57 -0
- package/dist/ui/inputs/text/text.mjs +9 -0
- package/dist/ui/inputs/textarea/index.d.ts +1 -0
- package/dist/ui/inputs/textarea/index.js +51 -0
- package/dist/ui/inputs/textarea/index.mjs +8 -0
- package/dist/ui/inputs/textarea/textarea.d.ts +5 -0
- package/dist/ui/inputs/textarea/textarea.js +49 -0
- package/dist/ui/inputs/textarea/textarea.mjs +7 -0
- package/dist/ui/layout/container.d.ts +12 -0
- package/dist/ui/layout/container.js +65 -0
- package/dist/ui/layout/container.mjs +87 -0
- package/dist/ui/layout/flex.d.ts +112 -0
- package/dist/ui/layout/flex.js +83 -0
- package/dist/ui/layout/flex.mjs +8 -0
- package/dist/ui/layout/index.d.ts +3 -0
- package/dist/ui/layout/index.js +238 -0
- package/dist/ui/layout/index.mjs +116 -0
- package/dist/ui/layout/page/breadcrumbs.d.ts +8 -0
- package/dist/ui/layout/page/breadcrumbs.js +34 -0
- package/dist/ui/layout/page/breadcrumbs.mjs +8 -0
- package/dist/ui/layout/page/index.d.ts +3 -0
- package/dist/ui/layout/page/index.js +144 -0
- package/dist/ui/layout/page/index.mjs +44 -0
- package/dist/ui/layout/page/page-content.d.ts +64 -0
- package/dist/ui/layout/page/page-content.js +109 -0
- package/dist/ui/layout/page/page-content.mjs +26 -0
- package/dist/ui/layout/page/page-loading.d.ts +2 -0
- package/dist/ui/layout/page/page-loading.js +56 -0
- package/dist/ui/layout/page/page-loading.mjs +16 -0
- package/dist/ui/layout/page/section-loading.d.ts +2 -0
- package/dist/ui/layout/page/section-loading.js +56 -0
- package/dist/ui/layout/page/section-loading.mjs +16 -0
- package/dist/ui/navigation/index.d.ts +1 -0
- package/dist/ui/navigation/index.js +38 -0
- package/dist/ui/navigation/index.mjs +9 -0
- package/dist/ui/navigation/link/index.d.ts +1 -0
- package/dist/ui/navigation/link/index.js +38 -0
- package/dist/ui/navigation/link/index.mjs +8 -0
- package/dist/ui/navigation/link/link.d.ts +8 -0
- package/dist/ui/navigation/link/link.js +36 -0
- package/dist/ui/navigation/link/link.mjs +7 -0
- package/dist/ui/overlays/index.d.ts +1 -0
- package/dist/ui/overlays/index.js +66 -0
- package/dist/ui/overlays/index.mjs +9 -0
- package/dist/ui/overlays/modal/index.d.ts +1 -0
- package/dist/ui/overlays/modal/index.js +66 -0
- package/dist/ui/overlays/modal/index.mjs +8 -0
- package/dist/ui/overlays/modal/modal.d.ts +40 -0
- package/dist/ui/overlays/modal/modal.js +65 -0
- package/dist/ui/overlays/modal/modal.mjs +8 -0
- package/dist/ui/provider/index.d.ts +2 -0
- package/dist/ui/provider/index.js +44 -0
- package/dist/ui/provider/index.mjs +9 -0
- package/dist/ui/provider/ui-provider.d.ts +5 -0
- package/dist/ui/provider/ui-provider.js +40 -0
- package/dist/ui/provider/ui-provider.mjs +7 -0
- package/dist/ui/style/css.d.ts +2 -0
- package/dist/ui/style/css.js +35 -0
- package/dist/ui/style/css.mjs +7 -0
- package/dist/ui/style/index.d.ts +1 -0
- package/dist/ui/style/index.js +37 -0
- package/dist/ui/style/index.mjs +8 -0
- package/dist/ui/theme/index.d.ts +2 -0
- package/dist/ui/theme/index.js +40 -0
- package/dist/ui/theme/index.mjs +10 -0
- package/dist/ui/theme/theme.css +2 -0
- package/dist/ui/theme/theme.d.ts +2 -0
- package/dist/ui/theme/theme.js +239 -0
- package/dist/ui/theme/theme.mjs +7 -0
- package/dist/ui/theme/tokens/breakpoints.d.ts +9 -0
- package/dist/ui/theme/tokens/breakpoints.js +38 -0
- package/dist/ui/theme/tokens/breakpoints.mjs +7 -0
- package/dist/ui/theme/tokens/index.d.ts +1 -0
- package/dist/ui/theme/tokens/index.js +40 -0
- package/dist/ui/theme/tokens/index.mjs +8 -0
- package/package.json +75 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// src/ui/actions/button/button.tsx
|
|
4
|
+
import React from "react";
|
|
5
|
+
import { Button as HeroUIButton } from "@heroui/button";
|
|
6
|
+
import { extendVariants } from "@heroui/system";
|
|
7
|
+
import { jsx } from "react/jsx-runtime";
|
|
8
|
+
var BaseButton = extendVariants(HeroUIButton, {
|
|
9
|
+
variants: {
|
|
10
|
+
color: {
|
|
11
|
+
primary: "bg-primary-400"
|
|
12
|
+
},
|
|
13
|
+
size: {
|
|
14
|
+
lg: "min-w-20 h-14 text-base gap-2 px-6"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
defaultVariants: {
|
|
18
|
+
size: "md"
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
var Button = React.forwardRef((props, ref) => {
|
|
22
|
+
return /* @__PURE__ */ jsx(BaseButton, { ref, ...props });
|
|
23
|
+
});
|
|
24
|
+
Button.displayName = "TeachInUI.Button";
|
|
25
|
+
|
|
26
|
+
export {
|
|
27
|
+
Button
|
|
28
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
Email
|
|
4
|
+
} from "./chunk-LJIVY6GU.mjs";
|
|
5
|
+
|
|
6
|
+
// src/ui/form/rhf/fields/email-field.tsx
|
|
7
|
+
import { Controller, useFormContext } from "react-hook-form";
|
|
8
|
+
import { jsx } from "react/jsx-runtime";
|
|
9
|
+
function EmailField({ name, ...props }) {
|
|
10
|
+
const { control } = useFormContext();
|
|
11
|
+
return /* @__PURE__ */ jsx(
|
|
12
|
+
Controller,
|
|
13
|
+
{
|
|
14
|
+
control,
|
|
15
|
+
name,
|
|
16
|
+
render: ({ field: { ref, ...field }, fieldState: { error } }) => /* @__PURE__ */ jsx(Email, { ...props, ...field, ref, errorMessage: error == null ? void 0 : error.message, isInvalid: !!error })
|
|
17
|
+
}
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
EmailField.displayName = "TeachInUI.EmailField";
|
|
21
|
+
|
|
22
|
+
export {
|
|
23
|
+
EmailField
|
|
24
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
cn
|
|
4
|
+
} from "./chunk-LOMRTWX5.mjs";
|
|
5
|
+
|
|
6
|
+
// src/ui/layout/container.tsx
|
|
7
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
8
|
+
import { tv } from "tailwind-variants";
|
|
9
|
+
import { jsx } from "react/jsx-runtime";
|
|
10
|
+
var variants = tv({
|
|
11
|
+
base: "w-full mx-auto px-6",
|
|
12
|
+
variants: {
|
|
13
|
+
size: {
|
|
14
|
+
xs: "max-w-screen-xs",
|
|
15
|
+
sm: "max-w-screen-sm",
|
|
16
|
+
md: "max-w-screen-md",
|
|
17
|
+
lg: "max-w-screen-lg",
|
|
18
|
+
xl: "max-w-screen-xl",
|
|
19
|
+
"2xl": "max-w-screen-2xl",
|
|
20
|
+
full: "max-w-full"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
defaultVariants: {
|
|
24
|
+
size: "2xl"
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
var Container = ({ children, asChild = false, className, size, ...props }) => {
|
|
28
|
+
const Comp = asChild ? Slot : "div";
|
|
29
|
+
return /* @__PURE__ */ jsx(Comp, { className: cn(variants({ size }), className), ...props, children });
|
|
30
|
+
};
|
|
31
|
+
Container.displayName = "TeachInUI.Container";
|
|
32
|
+
|
|
33
|
+
export {
|
|
34
|
+
Container
|
|
35
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
Autocomplete
|
|
4
|
+
} from "./chunk-C3MURCMZ.mjs";
|
|
5
|
+
|
|
6
|
+
// src/ui/form/rhf/fields/autocomplete-field.tsx
|
|
7
|
+
import { Controller, useFormContext } from "react-hook-form";
|
|
8
|
+
import { jsx } from "react/jsx-runtime";
|
|
9
|
+
function AutocompleteField({ name, ...props }) {
|
|
10
|
+
const { control } = useFormContext();
|
|
11
|
+
return /* @__PURE__ */ jsx(
|
|
12
|
+
Controller,
|
|
13
|
+
{
|
|
14
|
+
control,
|
|
15
|
+
name,
|
|
16
|
+
render: ({ field, fieldState: { error } }) => /* @__PURE__ */ jsx(
|
|
17
|
+
Autocomplete,
|
|
18
|
+
{
|
|
19
|
+
...props,
|
|
20
|
+
errorMessage: error == null ? void 0 : error.message,
|
|
21
|
+
isInvalid: !!error,
|
|
22
|
+
selectedKey: field.value,
|
|
23
|
+
onSelectionChange: field.onChange
|
|
24
|
+
}
|
|
25
|
+
)
|
|
26
|
+
}
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
AutocompleteField.displayName = "TeachInUI.AutocompleteField";
|
|
30
|
+
|
|
31
|
+
export {
|
|
32
|
+
AutocompleteField
|
|
33
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// src/ui/overlays/modal/modal.tsx
|
|
4
|
+
import {
|
|
5
|
+
Modal as HeroModal,
|
|
6
|
+
ModalContent as HeroModalContent,
|
|
7
|
+
ModalHeader as HeroModalHeader,
|
|
8
|
+
ModalBody as HeroModalBody,
|
|
9
|
+
ModalFooter as HeroModalFooter
|
|
10
|
+
} from "@heroui/modal";
|
|
11
|
+
import { jsx } from "react/jsx-runtime";
|
|
12
|
+
function Root({
|
|
13
|
+
size = "md",
|
|
14
|
+
placement = "center",
|
|
15
|
+
children,
|
|
16
|
+
...props
|
|
17
|
+
}) {
|
|
18
|
+
return /* @__PURE__ */ jsx(HeroModal, { placement, size, ...props, children });
|
|
19
|
+
}
|
|
20
|
+
Root.displayName = "TeachInUI.Modal.Root";
|
|
21
|
+
function Content({ children, ...props }) {
|
|
22
|
+
return /* @__PURE__ */ jsx(HeroModalContent, { ...props, children: (onClose) => typeof children === "function" ? children(onClose) : children });
|
|
23
|
+
}
|
|
24
|
+
Content.displayName = "TeachInUI.Modal.Content";
|
|
25
|
+
function Header({ children, ...props }) {
|
|
26
|
+
return /* @__PURE__ */ jsx(HeroModalHeader, { ...props, children });
|
|
27
|
+
}
|
|
28
|
+
Header.displayName = "TeachInUI.Modal.Header";
|
|
29
|
+
function Body({ children, ...props }) {
|
|
30
|
+
return /* @__PURE__ */ jsx(HeroModalBody, { ...props, children });
|
|
31
|
+
}
|
|
32
|
+
Body.displayName = "TeachInUI.Modal.Body";
|
|
33
|
+
function Footer({ children, ...props }) {
|
|
34
|
+
return /* @__PURE__ */ jsx(HeroModalFooter, { ...props, children });
|
|
35
|
+
}
|
|
36
|
+
Footer.displayName = "TeachInUI.Modal.Footer";
|
|
37
|
+
var Modal = {
|
|
38
|
+
Root,
|
|
39
|
+
Content,
|
|
40
|
+
Header,
|
|
41
|
+
Body,
|
|
42
|
+
Footer
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export {
|
|
46
|
+
Modal
|
|
47
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// src/ui/feedback/alert/alert.tsx
|
|
4
|
+
import React from "react";
|
|
5
|
+
import { Alert as HeroUIAlert } from "@heroui/alert";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
var Alert = React.forwardRef(({ children, ...props }, ref) => {
|
|
8
|
+
return /* @__PURE__ */ jsx(HeroUIAlert, { ref, title: children, ...props });
|
|
9
|
+
});
|
|
10
|
+
Alert.displayName = "TeachInUI.Alert";
|
|
11
|
+
|
|
12
|
+
export {
|
|
13
|
+
Alert
|
|
14
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// src/ui/format/plural.tsx
|
|
4
|
+
import { Fragment, jsx } from "react/jsx-runtime";
|
|
5
|
+
function Plural({
|
|
6
|
+
count,
|
|
7
|
+
one,
|
|
8
|
+
few,
|
|
9
|
+
many,
|
|
10
|
+
locale = "ru-RU",
|
|
11
|
+
showCount = true
|
|
12
|
+
}) {
|
|
13
|
+
const pluralRules = new Intl.PluralRules(locale);
|
|
14
|
+
const rule = pluralRules.select(count);
|
|
15
|
+
const forms = {
|
|
16
|
+
zero: many,
|
|
17
|
+
one,
|
|
18
|
+
two: few,
|
|
19
|
+
few,
|
|
20
|
+
many,
|
|
21
|
+
other: many
|
|
22
|
+
};
|
|
23
|
+
const selectedForm = forms[rule];
|
|
24
|
+
const result = showCount ? `${count} ${selectedForm}` : selectedForm;
|
|
25
|
+
return /* @__PURE__ */ jsx(Fragment, { children: result });
|
|
26
|
+
}
|
|
27
|
+
Plural.displayName = "TeachInUI.FormatPlural";
|
|
28
|
+
|
|
29
|
+
export {
|
|
30
|
+
Plural
|
|
31
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// src/ui/inputs/input/input.tsx
|
|
4
|
+
import React from "react";
|
|
5
|
+
import { Input as HeroUIInput } from "@heroui/input";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
var Input = React.forwardRef(({ ...props }, ref) => {
|
|
8
|
+
return /* @__PURE__ */ jsx(HeroUIInput, { ref, ...props });
|
|
9
|
+
});
|
|
10
|
+
Input.displayName = "TeachInUI.Input";
|
|
11
|
+
|
|
12
|
+
export {
|
|
13
|
+
Input
|
|
14
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
Textarea
|
|
4
|
+
} from "./chunk-HJUZTISD.mjs";
|
|
5
|
+
|
|
6
|
+
// src/ui/form/rhf/fields/textarea-field.tsx
|
|
7
|
+
import { Controller, useFormContext } from "react-hook-form";
|
|
8
|
+
import { jsx } from "react/jsx-runtime";
|
|
9
|
+
function TextareaField({ name, ...props }) {
|
|
10
|
+
const { control } = useFormContext();
|
|
11
|
+
return /* @__PURE__ */ jsx(
|
|
12
|
+
Controller,
|
|
13
|
+
{
|
|
14
|
+
control,
|
|
15
|
+
name,
|
|
16
|
+
render: ({ field: { ref, ...field }, fieldState: { error } }) => /* @__PURE__ */ jsx(
|
|
17
|
+
Textarea,
|
|
18
|
+
{
|
|
19
|
+
...props,
|
|
20
|
+
...field,
|
|
21
|
+
ref,
|
|
22
|
+
errorMessage: error == null ? void 0 : error.message,
|
|
23
|
+
isInvalid: !!error
|
|
24
|
+
}
|
|
25
|
+
)
|
|
26
|
+
}
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
TextareaField.displayName = "TeachInUI.TextareaField";
|
|
30
|
+
|
|
31
|
+
export {
|
|
32
|
+
TextareaField
|
|
33
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// src/ui/inputs/checkbox/checkbox.tsx
|
|
4
|
+
import { Checkbox as HeroUICheckbox } from "@heroui/checkbox";
|
|
5
|
+
import React from "react";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
var Checkbox = React.forwardRef(
|
|
8
|
+
({ label, ...props }, ref) => {
|
|
9
|
+
return /* @__PURE__ */ jsx(HeroUICheckbox, { ref, label, ...props, children: label });
|
|
10
|
+
}
|
|
11
|
+
);
|
|
12
|
+
Checkbox.displayName = "TeachInUI.Checkbox";
|
|
13
|
+
|
|
14
|
+
export {
|
|
15
|
+
Checkbox
|
|
16
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./ui";
|