@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
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2020 Next UI Inc.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// src/ui/format/boolean.tsx
|
|
4
|
+
import { Fragment, jsx } from "react/jsx-runtime";
|
|
5
|
+
function Boolean({
|
|
6
|
+
value,
|
|
7
|
+
trueLabel = "\u0414\u0430",
|
|
8
|
+
falseLabel = "\u041D\u0435\u0442",
|
|
9
|
+
nullLabel = "\u2014"
|
|
10
|
+
}) {
|
|
11
|
+
if (value === null || value === void 0) return /* @__PURE__ */ jsx(Fragment, { children: nullLabel });
|
|
12
|
+
return /* @__PURE__ */ jsx(Fragment, { children: value ? trueLabel : falseLabel });
|
|
13
|
+
}
|
|
14
|
+
Boolean.displayName = "TeachInUI.FormatBoolean";
|
|
15
|
+
|
|
16
|
+
export {
|
|
17
|
+
Boolean
|
|
18
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// src/ui/format/datetime.tsx
|
|
4
|
+
import { Fragment, jsx } from "react/jsx-runtime";
|
|
5
|
+
var defaultFormat = {
|
|
6
|
+
day: "2-digit",
|
|
7
|
+
month: "2-digit",
|
|
8
|
+
year: "numeric",
|
|
9
|
+
hour: "2-digit",
|
|
10
|
+
minute: "2-digit"
|
|
11
|
+
};
|
|
12
|
+
function Datetime({
|
|
13
|
+
value,
|
|
14
|
+
format = defaultFormat,
|
|
15
|
+
locale = "ru-RU",
|
|
16
|
+
fallback = "\u2014"
|
|
17
|
+
}) {
|
|
18
|
+
const formatter = new Intl.DateTimeFormat(locale, format);
|
|
19
|
+
if (!value) return /* @__PURE__ */ jsx(Fragment, { children: fallback });
|
|
20
|
+
const date = value instanceof Date ? value : new Date(value);
|
|
21
|
+
if (isNaN(date.getTime())) return /* @__PURE__ */ jsx(Fragment, { children: fallback });
|
|
22
|
+
return /* @__PURE__ */ jsx(Fragment, { children: formatter.format(date) });
|
|
23
|
+
}
|
|
24
|
+
Datetime.displayName = "TeachInUI.FormatDatetime";
|
|
25
|
+
|
|
26
|
+
export {
|
|
27
|
+
Datetime
|
|
28
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// src/ui/format/time.tsx
|
|
4
|
+
import { Fragment, jsx } from "react/jsx-runtime";
|
|
5
|
+
var defaultFormat = {
|
|
6
|
+
hour: "2-digit",
|
|
7
|
+
minute: "2-digit"
|
|
8
|
+
};
|
|
9
|
+
function Time({
|
|
10
|
+
value,
|
|
11
|
+
format = defaultFormat,
|
|
12
|
+
locale = "ru-RU",
|
|
13
|
+
fallback = "\u2014"
|
|
14
|
+
}) {
|
|
15
|
+
const formatter = new Intl.DateTimeFormat(locale, format);
|
|
16
|
+
if (!value) return /* @__PURE__ */ jsx(Fragment, { children: fallback });
|
|
17
|
+
const date = value instanceof Date ? value : new Date(value);
|
|
18
|
+
if (isNaN(date.getTime())) return /* @__PURE__ */ jsx(Fragment, { children: fallback });
|
|
19
|
+
return /* @__PURE__ */ jsx(Fragment, { children: formatter.format(date) });
|
|
20
|
+
}
|
|
21
|
+
Time.displayName = "TeachInUI.FormatTime";
|
|
22
|
+
|
|
23
|
+
export {
|
|
24
|
+
Time
|
|
25
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// src/ui/format/duration.tsx
|
|
4
|
+
import { Fragment, jsx } from "react/jsx-runtime";
|
|
5
|
+
function Duration({
|
|
6
|
+
minutes = 0,
|
|
7
|
+
hours = 0,
|
|
8
|
+
days = 0,
|
|
9
|
+
seconds = 0,
|
|
10
|
+
compact = false
|
|
11
|
+
}) {
|
|
12
|
+
const totalMinutes = days * 24 * 60 + hours * 60 + minutes + Math.floor(seconds / 60);
|
|
13
|
+
const totalDays = Math.floor(totalMinutes / (24 * 60));
|
|
14
|
+
const totalHours = Math.floor(totalMinutes % (24 * 60) / 60);
|
|
15
|
+
const remainingMinutes = totalMinutes % 60;
|
|
16
|
+
const parts = [];
|
|
17
|
+
if (totalDays > 0) {
|
|
18
|
+
parts.push(compact ? `${totalDays}\u0434` : `${totalDays} \u0434`);
|
|
19
|
+
}
|
|
20
|
+
if (totalHours > 0) {
|
|
21
|
+
parts.push(compact ? `${totalHours}\u0447` : `${totalHours} \u0447`);
|
|
22
|
+
}
|
|
23
|
+
if (remainingMinutes > 0 || totalDays === 0 && totalHours === 0) {
|
|
24
|
+
parts.push(compact ? `${remainingMinutes}\u043C` : `${remainingMinutes} \u043C\u0438\u043D`);
|
|
25
|
+
}
|
|
26
|
+
return /* @__PURE__ */ jsx(Fragment, { children: parts.join(" ") });
|
|
27
|
+
}
|
|
28
|
+
Duration.displayName = "TeachInUI.FormatDuration";
|
|
29
|
+
|
|
30
|
+
export {
|
|
31
|
+
Duration
|
|
32
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
Checkbox
|
|
4
|
+
} from "./chunk-WTXPB253.mjs";
|
|
5
|
+
|
|
6
|
+
// src/ui/form/rhf/fields/checkbox-field.tsx
|
|
7
|
+
import { Controller, useFormContext } from "react-hook-form";
|
|
8
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
function CheckboxField({ name, ...props }) {
|
|
10
|
+
const { control } = useFormContext();
|
|
11
|
+
return /* @__PURE__ */ jsx(
|
|
12
|
+
Controller,
|
|
13
|
+
{
|
|
14
|
+
control,
|
|
15
|
+
name,
|
|
16
|
+
render: ({ field, fieldState: { error } }) => /* @__PURE__ */ jsxs("div", { children: [
|
|
17
|
+
/* @__PURE__ */ jsx(Checkbox, { ...props, isSelected: field.value, onValueChange: field.onChange }),
|
|
18
|
+
error && /* @__PURE__ */ jsx("span", { className: "text-tiny text-danger", children: error.message })
|
|
19
|
+
] })
|
|
20
|
+
}
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
CheckboxField.displayName = "TeachInUI.CheckboxField";
|
|
24
|
+
|
|
25
|
+
export {
|
|
26
|
+
CheckboxField
|
|
27
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// src/ui/provider/ui-provider.tsx
|
|
4
|
+
import { HeroUIProvider } from "@heroui/system";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
function UIProvider({
|
|
7
|
+
children,
|
|
8
|
+
locale = "ru-RU",
|
|
9
|
+
labelPlacement = "outside",
|
|
10
|
+
navigate
|
|
11
|
+
}) {
|
|
12
|
+
return /* @__PURE__ */ jsx(HeroUIProvider, { labelPlacement, locale, navigate, children });
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export {
|
|
16
|
+
UIProvider
|
|
17
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
DatePicker
|
|
4
|
+
} from "./chunk-IAJ6G633.mjs";
|
|
5
|
+
|
|
6
|
+
// src/ui/form/rhf/fields/date-picker-field.tsx
|
|
7
|
+
import { Controller, useFormContext } from "react-hook-form";
|
|
8
|
+
import { jsx } from "react/jsx-runtime";
|
|
9
|
+
function DatePickerField({ 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
|
+
DatePicker,
|
|
18
|
+
{
|
|
19
|
+
...props,
|
|
20
|
+
...field,
|
|
21
|
+
ref,
|
|
22
|
+
errorMessage: error == null ? void 0 : error.message,
|
|
23
|
+
isInvalid: !!error
|
|
24
|
+
}
|
|
25
|
+
)
|
|
26
|
+
}
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
DatePickerField.displayName = "TeachInUI.DatePickerField";
|
|
30
|
+
|
|
31
|
+
export {
|
|
32
|
+
DatePickerField
|
|
33
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// src/ui/navigation/link/link.tsx
|
|
4
|
+
import { Link as HeroUILink } from "@heroui/link";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
function Link({ children, ...props }) {
|
|
7
|
+
return /* @__PURE__ */ jsx(HeroUILink, { ...props, children });
|
|
8
|
+
}
|
|
9
|
+
Link.displayName = "TeachInUI.Link";
|
|
10
|
+
|
|
11
|
+
export {
|
|
12
|
+
Link
|
|
13
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// src/ui/form/form.tsx
|
|
4
|
+
import { Form as HeroUIForm } from "@heroui/form";
|
|
5
|
+
import React from "react";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
var Form = React.forwardRef(({ ...props }, ref) => {
|
|
8
|
+
return /* @__PURE__ */ jsx(HeroUIForm, { ref, ...props });
|
|
9
|
+
});
|
|
10
|
+
Form.displayName = "TeachInUI.Form";
|
|
11
|
+
|
|
12
|
+
export {
|
|
13
|
+
Form
|
|
14
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// src/ui/data/pagination/pagination.tsx
|
|
4
|
+
import React from "react";
|
|
5
|
+
import { Pagination as HeroUIPagination } from "@heroui/pagination";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
var Pagination = React.forwardRef(({ pages, ...props }, ref) => {
|
|
8
|
+
return /* @__PURE__ */ jsx(HeroUIPagination, { ref, isCompact: true, showControls: true, showShadow: true, total: pages, ...props });
|
|
9
|
+
});
|
|
10
|
+
Pagination.displayName = "TeachInUI.Pagination";
|
|
11
|
+
|
|
12
|
+
export {
|
|
13
|
+
Pagination
|
|
14
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// src/ui/inputs/autocomplete/autocomplete.tsx
|
|
4
|
+
import React from "react";
|
|
5
|
+
import {
|
|
6
|
+
Autocomplete as HeroUIAutocomplete,
|
|
7
|
+
AutocompleteItem as HeroUIAutocompleteItem
|
|
8
|
+
} from "@heroui/autocomplete";
|
|
9
|
+
import { jsx } from "react/jsx-runtime";
|
|
10
|
+
var Autocomplete = React.forwardRef(
|
|
11
|
+
({ items, ...props }, ref) => {
|
|
12
|
+
return /* @__PURE__ */ jsx(HeroUIAutocomplete, { ref, items, ...props, children: (item) => /* @__PURE__ */ jsx(HeroUIAutocompleteItem, { children: item.label }, item.key) });
|
|
13
|
+
}
|
|
14
|
+
);
|
|
15
|
+
Autocomplete.displayName = "TeachInUI.Autocomplete";
|
|
16
|
+
|
|
17
|
+
export {
|
|
18
|
+
Autocomplete
|
|
19
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
Text
|
|
4
|
+
} from "./chunk-KTUGFQWJ.mjs";
|
|
5
|
+
|
|
6
|
+
// src/ui/form/rhf/fields/text-field.tsx
|
|
7
|
+
import { Controller, useFormContext } from "react-hook-form";
|
|
8
|
+
import { jsx } from "react/jsx-runtime";
|
|
9
|
+
function TextField({ 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(Text, { ...props, ...field, ref, errorMessage: error == null ? void 0 : error.message, isInvalid: !!error })
|
|
17
|
+
}
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
TextField.displayName = "TeachInUI.TextField";
|
|
21
|
+
|
|
22
|
+
export {
|
|
23
|
+
TextField
|
|
24
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// src/ui/format/date.tsx
|
|
4
|
+
import { Fragment, jsx } from "react/jsx-runtime";
|
|
5
|
+
var defaultFormat = {
|
|
6
|
+
day: "2-digit",
|
|
7
|
+
month: "2-digit",
|
|
8
|
+
year: "numeric"
|
|
9
|
+
};
|
|
10
|
+
function DateFormat({
|
|
11
|
+
value,
|
|
12
|
+
format = defaultFormat,
|
|
13
|
+
locale = "ru-RU",
|
|
14
|
+
fallback = "\u2014"
|
|
15
|
+
}) {
|
|
16
|
+
const formatter = new Intl.DateTimeFormat(locale, format);
|
|
17
|
+
if (!value) return /* @__PURE__ */ jsx(Fragment, { children: fallback });
|
|
18
|
+
const date = value instanceof Date ? value : new Date(value);
|
|
19
|
+
if (isNaN(date.getTime())) return /* @__PURE__ */ jsx(Fragment, { children: fallback });
|
|
20
|
+
return /* @__PURE__ */ jsx(Fragment, { children: formatter.format(date) });
|
|
21
|
+
}
|
|
22
|
+
DateFormat.displayName = "TeachInUI.FormatDate";
|
|
23
|
+
|
|
24
|
+
export {
|
|
25
|
+
DateFormat
|
|
26
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// src/ui/layout/flex.tsx
|
|
4
|
+
import { tv } from "tailwind-variants";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
var variants = tv({
|
|
7
|
+
base: "flex",
|
|
8
|
+
variants: {
|
|
9
|
+
direction: {
|
|
10
|
+
row: "flex-row",
|
|
11
|
+
column: "flex-col",
|
|
12
|
+
"row-reverse": "flex-row-reverse",
|
|
13
|
+
"column-reverse": "flex-col-reverse"
|
|
14
|
+
},
|
|
15
|
+
align: {
|
|
16
|
+
start: "items-start",
|
|
17
|
+
center: "items-center",
|
|
18
|
+
end: "items-end",
|
|
19
|
+
stretch: "items-stretch",
|
|
20
|
+
baseline: "items-baseline"
|
|
21
|
+
},
|
|
22
|
+
justify: {
|
|
23
|
+
start: "justify-start",
|
|
24
|
+
center: "justify-center",
|
|
25
|
+
end: "justify-end",
|
|
26
|
+
between: "justify-between",
|
|
27
|
+
around: "justify-around",
|
|
28
|
+
evenly: "justify-evenly"
|
|
29
|
+
},
|
|
30
|
+
wrap: {
|
|
31
|
+
nowrap: "flex-nowrap",
|
|
32
|
+
wrap: "flex-wrap",
|
|
33
|
+
"wrap-reverse": "flex-wrap-reverse"
|
|
34
|
+
},
|
|
35
|
+
gap: {
|
|
36
|
+
0: "gap-0",
|
|
37
|
+
1: "gap-1",
|
|
38
|
+
2: "gap-2",
|
|
39
|
+
4: "gap-4",
|
|
40
|
+
6: "gap-6",
|
|
41
|
+
8: "gap-8"
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
defaultVariants: {
|
|
45
|
+
direction: "row",
|
|
46
|
+
align: "stretch",
|
|
47
|
+
justify: "start",
|
|
48
|
+
wrap: "nowrap",
|
|
49
|
+
gap: 0
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
var Flex = ({ className, ...props }) => {
|
|
53
|
+
return /* @__PURE__ */ jsx("div", { className: variants({ ...props, className }), ...props });
|
|
54
|
+
};
|
|
55
|
+
Flex.displayName = "TeachInUI.Flex";
|
|
56
|
+
|
|
57
|
+
export {
|
|
58
|
+
Flex
|
|
59
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// src/ui/format/percent.tsx
|
|
4
|
+
import { Fragment, jsx } from "react/jsx-runtime";
|
|
5
|
+
function Percent({
|
|
6
|
+
value,
|
|
7
|
+
decimals = 1,
|
|
8
|
+
locale = "ru-RU",
|
|
9
|
+
unit = "percent"
|
|
10
|
+
}) {
|
|
11
|
+
const formatter = new Intl.NumberFormat(locale, {
|
|
12
|
+
style: "percent",
|
|
13
|
+
minimumFractionDigits: decimals,
|
|
14
|
+
maximumFractionDigits: decimals
|
|
15
|
+
});
|
|
16
|
+
const normalizedValue = unit === "percent" ? value / 100 : value;
|
|
17
|
+
return /* @__PURE__ */ jsx(Fragment, { children: formatter.format(normalizedValue) });
|
|
18
|
+
}
|
|
19
|
+
Percent.displayName = "TeachInUI.FormatPercent";
|
|
20
|
+
|
|
21
|
+
export {
|
|
22
|
+
Percent
|
|
23
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// src/ui/layout/page/breadcrumbs.tsx
|
|
4
|
+
import { Breadcrumbs as HeroUIBreadcrumbs, BreadcrumbItem } from "@heroui/breadcrumbs";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
var Breadcrumbs = ({ items }) => /* @__PURE__ */ jsx(HeroUIBreadcrumbs, { children: items.map((item) => /* @__PURE__ */ jsx(BreadcrumbItem, { href: item.href, isDisabled: item.href === void 0, children: item.label }, item.label)) });
|
|
7
|
+
|
|
8
|
+
export {
|
|
9
|
+
Breadcrumbs
|
|
10
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
Switch
|
|
4
|
+
} from "./chunk-N3EAW6UO.mjs";
|
|
5
|
+
|
|
6
|
+
// src/ui/form/rhf/fields/switch-field.tsx
|
|
7
|
+
import { Controller, useFormContext } from "react-hook-form";
|
|
8
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
function SwitchField({ name, ...props }) {
|
|
10
|
+
const { control } = useFormContext();
|
|
11
|
+
return /* @__PURE__ */ jsx(
|
|
12
|
+
Controller,
|
|
13
|
+
{
|
|
14
|
+
control,
|
|
15
|
+
name,
|
|
16
|
+
render: ({ field, fieldState: { error } }) => /* @__PURE__ */ jsxs("div", { children: [
|
|
17
|
+
/* @__PURE__ */ jsx(Switch, { ...props, isSelected: field.value, onValueChange: field.onChange }),
|
|
18
|
+
error && /* @__PURE__ */ jsx("span", { className: "text-tiny text-danger", children: error.message })
|
|
19
|
+
] })
|
|
20
|
+
}
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
SwitchField.displayName = "TeachInUI.SwitchField";
|
|
24
|
+
|
|
25
|
+
export {
|
|
26
|
+
SwitchField
|
|
27
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";
|