@modul/mbui 0.0.13-beta-pv-53127-63b6a630 → 0.0.13-beta-pv-53036-3ecb0556
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/dist/{Info/Info.d.ts → Alert/Alert.d.ts} +4 -4
- package/dist/{Info/Info.js → Alert/Alert.js} +7 -7
- package/dist/Alert/Alert.js.map +1 -0
- package/dist/Alert/index.d.ts +1 -0
- package/dist/Alert/index.js +6 -0
- package/dist/Alert/index.js.map +1 -0
- package/dist/AlertDialog/AlertDialog.d.ts +20 -0
- package/dist/AlertDialog/AlertDialog.js +42 -0
- package/dist/AlertDialog/AlertDialog.js.map +1 -0
- package/dist/AlertDialog/index.d.ts +1 -0
- package/dist/AlertDialog/index.js +16 -0
- package/dist/AlertDialog/index.js.map +1 -0
- package/dist/Button/Button.d.ts +1 -1
- package/dist/Calendar/Calendar.d.ts +8 -0
- package/dist/Calendar/Calendar.js +45 -0
- package/dist/Calendar/Calendar.js.map +1 -0
- package/dist/Calendar/index.d.ts +1 -0
- package/dist/Calendar/index.js +6 -0
- package/dist/Calendar/index.js.map +1 -0
- package/dist/Chip/Chip.d.ts +1 -1
- package/dist/DatePicker/DatePicker.d.ts +9 -0
- package/dist/DatePicker/DatePicker.js +23 -0
- package/dist/DatePicker/DatePicker.js.map +1 -0
- package/dist/DatePicker/index.d.ts +1 -0
- package/dist/DatePicker/index.js +6 -0
- package/dist/DatePicker/index.js.map +1 -0
- package/dist/Drawer/Drawer.js +1 -1
- package/dist/Drawer/Drawer.js.map +1 -1
- package/dist/Form/Form.d.ts +23 -0
- package/dist/Form/Form.js +73 -0
- package/dist/Form/Form.js.map +1 -0
- package/dist/Form/index.d.ts +1 -0
- package/dist/Form/index.js +13 -0
- package/dist/Form/index.js.map +1 -0
- package/dist/Input/Input.js +1 -1
- package/dist/Input/Input.js.map +1 -1
- package/dist/Input/InputMask.d.ts +3 -0
- package/dist/Input/InputMask.js +12 -0
- package/dist/Input/InputMask.js.map +1 -0
- package/dist/Input/index.d.ts +1 -0
- package/dist/Input/index.js +3 -1
- package/dist/Input/index.js.map +1 -1
- package/dist/Input-OTP/Input.d.ts +4 -4
- package/dist/Label/Label.d.ts +5 -0
- package/dist/Label/Label.js +13 -0
- package/dist/Label/Label.js.map +1 -0
- package/dist/Label/index.d.ts +1 -0
- package/dist/Label/index.js +6 -0
- package/dist/Label/index.js.map +1 -0
- package/dist/Page/Page.js +1 -1
- package/dist/Page/Page.js.map +1 -1
- package/dist/Select/Select.d.ts +3 -0
- package/dist/Select/Select.js +11 -0
- package/dist/Select/Select.js.map +1 -0
- package/dist/Select/SelectAccountCard.d.ts +5 -0
- package/dist/Select/SelectAccountCard.js +77 -0
- package/dist/Select/SelectAccountCard.js.map +1 -0
- package/dist/Select/SelectAsync.d.ts +8 -0
- package/dist/Select/SelectAsync.js +73 -0
- package/dist/Select/SelectAsync.js.map +1 -0
- package/dist/Select/SelectBase.d.ts +6 -0
- package/dist/Select/SelectBase.js +72 -0
- package/dist/Select/SelectBase.js.map +1 -0
- package/dist/Select/index.d.ts +4 -0
- package/dist/Select/index.js +12 -0
- package/dist/Select/index.js.map +1 -0
- package/dist/Switch/Switch.d.ts +4 -0
- package/dist/Switch/Switch.js +31 -0
- package/dist/Switch/Switch.js.map +1 -0
- package/dist/Switch/index.d.ts +1 -0
- package/dist/Switch/index.js +6 -0
- package/dist/Switch/index.js.map +1 -0
- package/dist/Textarea/Textarea.d.ts +5 -0
- package/dist/Textarea/Textarea.js +12 -0
- package/dist/Textarea/Textarea.js.map +1 -0
- package/dist/Textarea/index.d.ts +1 -0
- package/dist/Textarea/index.js +6 -0
- package/dist/Textarea/index.js.map +1 -0
- package/dist/index.d.ts +27 -20
- package/dist/index.js +41 -10
- package/dist/index.js.map +1 -1
- package/package.json +11 -4
- package/src/{Info/Info.tsx → Alert/Alert.tsx} +6 -6
- package/src/Alert/index.ts +1 -0
- package/src/AlertDialog/AlertDialog.tsx +138 -0
- package/src/AlertDialog/index.ts +13 -0
- package/src/Calendar/Calendar.tsx +61 -0
- package/src/Calendar/index.ts +1 -0
- package/src/DatePicker/DatePicker.tsx +38 -0
- package/src/DatePicker/index.ts +1 -0
- package/src/Drawer/Drawer.tsx +2 -2
- package/src/Form/Form.tsx +152 -0
- package/src/Form/index.ts +1 -0
- package/src/Input/Input.tsx +1 -1
- package/src/Input/InputMask.tsx +15 -0
- package/src/Input/index.ts +2 -1
- package/src/Label/Label.tsx +1 -1
- package/src/Page/Page.tsx +1 -1
- package/src/Select/Select.tsx +8 -0
- package/src/Select/SelectAccountCard.tsx +175 -0
- package/src/Select/SelectAsync.tsx +183 -0
- package/src/Select/SelectBase.tsx +181 -0
- package/src/Select/index.ts +4 -0
- package/src/Switch/Switch.tsx +47 -0
- package/src/Switch/index.ts +1 -0
- package/src/Textarea/Textarea.tsx +24 -0
- package/src/Textarea/index.ts +1 -0
- package/src/assets/css/global.css +22 -9
- package/src/index.ts +67 -41
- package/dist/Base/Input/Base.d.ts +0 -4
- package/dist/Base/Input/Base.js +0 -20
- package/dist/Base/Input/Base.js.map +0 -1
- package/dist/Base/Input/Input.d.ts +0 -4
- package/dist/Base/Input/Input.js +0 -18
- package/dist/Base/Input/Input.js.map +0 -1
- package/dist/Base/Input/index.d.ts +0 -2
- package/dist/Base/Input/index.js +0 -7
- package/dist/Base/Input/index.js.map +0 -1
- package/dist/Base/Input/types.d.ts +0 -9
- package/dist/Base/Input/types.js +0 -3
- package/dist/Base/Input/types.js.map +0 -1
- package/dist/Info/Info.js.map +0 -1
- package/dist/Info/index.d.ts +0 -1
- package/dist/Info/index.js +0 -6
- package/dist/Info/index.js.map +0 -1
- package/dist/Progress/Progress.d.ts +0 -4
- package/dist/Progress/Progress.js +0 -12
- package/dist/Progress/Progress.js.map +0 -1
- package/dist/Progress/index.d.ts +0 -1
- package/dist/Progress/index.js +0 -6
- package/dist/Progress/index.js.map +0 -1
- package/src/DrawerCompanyList/CompanyList.tsx +0 -63
- package/src/DrawerCompanyList/index.ts +0 -1
- package/src/Info/index.ts +0 -1
- package/src/Progress/Progress.tsx +0 -23
- package/src/Progress/index.ts +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
-
declare const
|
|
3
|
+
declare const alertVariants: (props?: {
|
|
4
4
|
variant?: "success" | "light" | "warning" | "critical";
|
|
5
5
|
} & import("class-variance-authority/dist/types").ClassProp) => string;
|
|
6
|
-
export interface IProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof
|
|
6
|
+
export interface IProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof alertVariants> {
|
|
7
7
|
}
|
|
8
|
-
declare const
|
|
9
|
-
export {
|
|
8
|
+
declare const Alert: React.ForwardRefExoticComponent<IProps & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
export { Alert };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.Alert = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const React = (0, tslib_1.__importStar)(require("react"));
|
|
6
6
|
const class_variance_authority_1 = require("class-variance-authority");
|
|
7
7
|
const utils_1 = require("../@/lib/utils");
|
|
8
8
|
// import { cn } from "@/lib/utils" порешать с алиасами
|
|
9
|
-
const
|
|
9
|
+
const alertVariants = (0, class_variance_authority_1.cva)('px-[16px] py-[12px] rounded-sm text-[14px]', {
|
|
10
10
|
variants: {
|
|
11
11
|
variant: {
|
|
12
12
|
light: 'bg-[--cl-graphite-7]',
|
|
@@ -19,9 +19,9 @@ const infoVariants = (0, class_variance_authority_1.cva)('px-[16px] py-[12px] ro
|
|
|
19
19
|
variant: 'light'
|
|
20
20
|
},
|
|
21
21
|
});
|
|
22
|
-
const
|
|
23
|
-
return (React.createElement("div", { className: (0, utils_1.cn)(
|
|
22
|
+
const Alert = React.forwardRef(({ className, variant, children, ...props }, ref) => {
|
|
23
|
+
return (React.createElement("div", { className: (0, utils_1.cn)(alertVariants({ variant, className })), ...props }, children));
|
|
24
24
|
});
|
|
25
|
-
exports.
|
|
26
|
-
|
|
27
|
-
//# sourceMappingURL=
|
|
25
|
+
exports.Alert = Alert;
|
|
26
|
+
Alert.displayName = 'Alert';
|
|
27
|
+
//# sourceMappingURL=Alert.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Alert.js","sourceRoot":"","sources":["../../src/Alert/Alert.tsx"],"names":[],"mappings":";;;;AAAA,0DAA8B;AAC9B,uEAAiE;AAEjE,0CAAmC;AACnC,uDAAuD;AAEvD,MAAM,aAAa,GAAG,IAAA,8BAAG,EAAC,4CAA4C,EAAE;IACvE,QAAQ,EAAE;QACT,OAAO,EAAE;YACR,KAAK,EAAE,sBAAsB;YAC7B,OAAO,EAAE,kBAAkB;YAC3B,OAAO,EAAE,kBAAkB;YAC3B,QAAQ,EAAE,wBAAwB;SAClC;KACD;IACD,eAAe,EAAE;QAChB,OAAO,EAAE,OAAO;KAChB;CACD,CAAC,CAAA;AAMF,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CAAyB,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IAC1G,OAAO,CACN,6BACC,SAAS,EAAE,IAAA,UAAE,EAAC,aAAa,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC,CAAC,KAChD,KAAK,IAER,QAAQ,CACJ,CACN,CAAA;AACF,CAAC,CAAC,CAAA;AAIO,sBAAK;AAFd,KAAK,CAAC,WAAW,GAAG,OAAO,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Alert } from './Alert';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Alert = void 0;
|
|
4
|
+
var Alert_1 = require("./Alert");
|
|
5
|
+
Object.defineProperty(exports, "Alert", { enumerable: true, get: function () { return Alert_1.Alert; } });
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Alert/index.ts"],"names":[],"mappings":";;;AAAA,iCAA+B;AAAtB,8FAAA,KAAK,OAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
|
|
3
|
+
declare const AlertDialog: React.FC<AlertDialogPrimitive.AlertDialogProps>;
|
|
4
|
+
declare const AlertDialogTrigger: React.ForwardRefExoticComponent<AlertDialogPrimitive.AlertDialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
5
|
+
declare const AlertDialogPortal: React.FC<AlertDialogPrimitive.AlertDialogPortalProps>;
|
|
6
|
+
declare const AlertDialogOverlay: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
declare const AlertDialogContent: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
declare const AlertDialogHeader: {
|
|
9
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
|
|
10
|
+
displayName: string;
|
|
11
|
+
};
|
|
12
|
+
declare const AlertDialogFooter: {
|
|
13
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
|
|
14
|
+
displayName: string;
|
|
15
|
+
};
|
|
16
|
+
declare const AlertDialogTitle: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
17
|
+
declare const AlertDialogDescription: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
18
|
+
declare const AlertDialogAction: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogActionProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
19
|
+
declare const AlertDialogCancel: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogCancelProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
20
|
+
export { AlertDialog, AlertDialogPortal, AlertDialogOverlay, AlertDialogTrigger, AlertDialogContent, AlertDialogHeader, AlertDialogFooter, AlertDialogTitle, AlertDialogDescription, AlertDialogAction, AlertDialogCancel, };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AlertDialogCancel = exports.AlertDialogAction = exports.AlertDialogDescription = exports.AlertDialogTitle = exports.AlertDialogFooter = exports.AlertDialogHeader = exports.AlertDialogContent = exports.AlertDialogTrigger = exports.AlertDialogOverlay = exports.AlertDialogPortal = exports.AlertDialog = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const React = (0, tslib_1.__importStar)(require("react"));
|
|
6
|
+
const AlertDialogPrimitive = (0, tslib_1.__importStar)(require("@radix-ui/react-alert-dialog"));
|
|
7
|
+
const utils_1 = require("../@/lib/utils");
|
|
8
|
+
const Button_1 = require("../Button");
|
|
9
|
+
const AlertDialog = AlertDialogPrimitive.Root;
|
|
10
|
+
exports.AlertDialog = AlertDialog;
|
|
11
|
+
const AlertDialogTrigger = AlertDialogPrimitive.Trigger;
|
|
12
|
+
exports.AlertDialogTrigger = AlertDialogTrigger;
|
|
13
|
+
const AlertDialogPortal = AlertDialogPrimitive.Portal;
|
|
14
|
+
exports.AlertDialogPortal = AlertDialogPortal;
|
|
15
|
+
const AlertDialogOverlay = React.forwardRef(({ className, ...props }, ref) => (React.createElement(AlertDialogPrimitive.Overlay, { className: (0, utils_1.cn)("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", className), ...props, ref: ref })));
|
|
16
|
+
exports.AlertDialogOverlay = AlertDialogOverlay;
|
|
17
|
+
AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;
|
|
18
|
+
const AlertDialogContent = React.forwardRef(({ className, ...props }, ref) => (React.createElement(AlertDialogPortal, null,
|
|
19
|
+
React.createElement(AlertDialogOverlay, null),
|
|
20
|
+
React.createElement(AlertDialogPrimitive.Content, { ref: ref, className: (0, utils_1.cn)("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-input bg-dialog p-[16px] shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] rounded-md", className), ...props }))));
|
|
21
|
+
exports.AlertDialogContent = AlertDialogContent;
|
|
22
|
+
AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;
|
|
23
|
+
const AlertDialogHeader = ({ className, ...props }) => (React.createElement("div", { className: (0, utils_1.cn)("flex flex-col space-y-2 text-center sm:text-left", className), ...props }));
|
|
24
|
+
exports.AlertDialogHeader = AlertDialogHeader;
|
|
25
|
+
AlertDialogHeader.displayName = "AlertDialogHeader";
|
|
26
|
+
const AlertDialogFooter = ({ className, ...props }) => (React.createElement("div", { className: (0, utils_1.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className), ...props }));
|
|
27
|
+
exports.AlertDialogFooter = AlertDialogFooter;
|
|
28
|
+
AlertDialogFooter.displayName = "AlertDialogFooter";
|
|
29
|
+
const AlertDialogTitle = React.forwardRef(({ className, ...props }, ref) => (React.createElement(AlertDialogPrimitive.Title, { ref: ref, className: (0, utils_1.cn)("text-lg font-semibold", className), ...props })));
|
|
30
|
+
exports.AlertDialogTitle = AlertDialogTitle;
|
|
31
|
+
AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;
|
|
32
|
+
const AlertDialogDescription = React.forwardRef(({ className, ...props }, ref) => (React.createElement(AlertDialogPrimitive.Description, { ref: ref, className: (0, utils_1.cn)("text-sm text-muted-foreground", className), ...props })));
|
|
33
|
+
exports.AlertDialogDescription = AlertDialogDescription;
|
|
34
|
+
AlertDialogDescription.displayName =
|
|
35
|
+
AlertDialogPrimitive.Description.displayName;
|
|
36
|
+
const AlertDialogAction = React.forwardRef(({ className, ...props }, ref) => (React.createElement(AlertDialogPrimitive.Action, { ref: ref, className: (0, utils_1.cn)((0, Button_1.buttonVariants)({ variant: 'primary', size: 'sm' }), className), ...props })));
|
|
37
|
+
exports.AlertDialogAction = AlertDialogAction;
|
|
38
|
+
AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;
|
|
39
|
+
const AlertDialogCancel = React.forwardRef(({ className, ...props }, ref) => (React.createElement(AlertDialogPrimitive.Cancel, { ref: ref, className: (0, utils_1.cn)((0, Button_1.buttonVariants)({ variant: "outline", size: 'sm' }), className), ...props })));
|
|
40
|
+
exports.AlertDialogCancel = AlertDialogCancel;
|
|
41
|
+
AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;
|
|
42
|
+
//# sourceMappingURL=AlertDialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AlertDialog.js","sourceRoot":"","sources":["../../src/A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BAAC,oBAAoB,CAAC,MAAM,IAC1B,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,IAAA,UAAE,EAAC,IAAA,uBAAc,EAAC,EAAC,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAC,CAAC,EAAE,SAAS,CAAC,KACtE,KAAK,GACT,CACH,CAAC,CAAA;AA4BA,8CAAiB;AA3BnB,iBAAiB,CAAC,WAAW,GAAG,oBAAoB,CAAC,MAAM,CAAC,WAAW,CAAA;AAEvE,MAAM,iBAAiB,GAAG,KAAK,CAAC,UAAU,CAGxC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAClC,oBAAC,oBAAoB,CAAC,MAAM,IAC1B,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,IAAA,UAAE,EACX,IAAA,uBAAc,EAAC,EAAE,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAClD,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC,CAAA;AAcA,8CAAiB;AAbnB,iBAAiB,CAAC,WAAW,GAAG,oBAAoB,CAAC,MAAM,CAAC,WAAW,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { AlertDialog, AlertDialogPortal, AlertDialogOverlay, AlertDialogTrigger, AlertDialogContent, AlertDialogHeader, AlertDialogFooter, AlertDialogTitle, AlertDialogDescription, AlertDialogAction, AlertDialogCancel, } from './AlertDialog';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AlertDialogCancel = exports.AlertDialogAction = exports.AlertDialogDescription = exports.AlertDialogTitle = exports.AlertDialogFooter = exports.AlertDialogHeader = exports.AlertDialogContent = exports.AlertDialogTrigger = exports.AlertDialogOverlay = exports.AlertDialogPortal = exports.AlertDialog = void 0;
|
|
4
|
+
var AlertDialog_1 = require("./AlertDialog");
|
|
5
|
+
Object.defineProperty(exports, "AlertDialog", { enumerable: true, get: function () { return AlertDialog_1.AlertDialog; } });
|
|
6
|
+
Object.defineProperty(exports, "AlertDialogPortal", { enumerable: true, get: function () { return AlertDialog_1.AlertDialogPortal; } });
|
|
7
|
+
Object.defineProperty(exports, "AlertDialogOverlay", { enumerable: true, get: function () { return AlertDialog_1.AlertDialogOverlay; } });
|
|
8
|
+
Object.defineProperty(exports, "AlertDialogTrigger", { enumerable: true, get: function () { return AlertDialog_1.AlertDialogTrigger; } });
|
|
9
|
+
Object.defineProperty(exports, "AlertDialogContent", { enumerable: true, get: function () { return AlertDialog_1.AlertDialogContent; } });
|
|
10
|
+
Object.defineProperty(exports, "AlertDialogHeader", { enumerable: true, get: function () { return AlertDialog_1.AlertDialogHeader; } });
|
|
11
|
+
Object.defineProperty(exports, "AlertDialogFooter", { enumerable: true, get: function () { return AlertDialog_1.AlertDialogFooter; } });
|
|
12
|
+
Object.defineProperty(exports, "AlertDialogTitle", { enumerable: true, get: function () { return AlertDialog_1.AlertDialogTitle; } });
|
|
13
|
+
Object.defineProperty(exports, "AlertDialogDescription", { enumerable: true, get: function () { return AlertDialog_1.AlertDialogDescription; } });
|
|
14
|
+
Object.defineProperty(exports, "AlertDialogAction", { enumerable: true, get: function () { return AlertDialog_1.AlertDialogAction; } });
|
|
15
|
+
Object.defineProperty(exports, "AlertDialogCancel", { enumerable: true, get: function () { return AlertDialog_1.AlertDialogCancel; } });
|
|
16
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/AlertDialog/index.ts"],"names":[],"mappings":";;;AAAA,6CAYsB;AAXrB,0GAAA,WAAW,OAAA;AACX,gHAAA,iBAAiB,OAAA;AACjB,iHAAA,kBAAkB,OAAA;AAClB,iHAAA,kBAAkB,OAAA;AAClB,iHAAA,kBAAkB,OAAA;AAClB,gHAAA,iBAAiB,OAAA;AACjB,gHAAA,iBAAiB,OAAA;AACjB,+GAAA,gBAAgB,OAAA;AAChB,qHAAA,sBAAsB,OAAA;AACtB,gHAAA,iBAAiB,OAAA;AACjB,gHAAA,iBAAiB,OAAA"}
|
package/dist/Button/Button.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { type VariantProps } from 'class-variance-authority';
|
|
3
3
|
declare const buttonVariants: (props?: {
|
|
4
|
-
variant?: "
|
|
4
|
+
variant?: "primary" | "secondary" | "success" | "primary-outline" | "outline" | "ghost";
|
|
5
5
|
size?: "lg" | "md" | "sm" | "xs" | "xxs";
|
|
6
6
|
} & import("class-variance-authority/dist/types").ClassProp) => string;
|
|
7
7
|
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { DayPicker } from 'react-day-picker';
|
|
3
|
+
export declare type CalendarProps = React.ComponentProps<typeof DayPicker>;
|
|
4
|
+
declare function Calendar({ className, classNames, showOutsideDays, ...props }: CalendarProps): React.JSX.Element;
|
|
5
|
+
declare namespace Calendar {
|
|
6
|
+
var displayName: string;
|
|
7
|
+
}
|
|
8
|
+
export { Calendar };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Calendar = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const React = (0, tslib_1.__importStar)(require("react"));
|
|
6
|
+
const react_day_picker_1 = require("react-day-picker");
|
|
7
|
+
const utils_1 = require("../@/lib/utils");
|
|
8
|
+
const locale_1 = require("date-fns/locale");
|
|
9
|
+
const daySelectedClasses = 'bg-btn-primary text-btn-primary rounded-sm';
|
|
10
|
+
const dayTodayClasses = 'bg-btn-secondary text-btn-secondary rounded-sm';
|
|
11
|
+
const rangeMiddleClasses = 'date-range-middle aria-selected:bg-btn-primary/50 aria-selected:text-white';
|
|
12
|
+
const btnNavClasses = 'opacity-50 hover:opacity-100 ring-offset-2 focus-visible:opacity-100 focus-visible:outline-primary border-input border rounded-sm shadow-sm';
|
|
13
|
+
function Calendar({ className, classNames, showOutsideDays = true, ...props }) {
|
|
14
|
+
return (React.createElement(react_day_picker_1.DayPicker, { locale: locale_1.ru, showOutsideDays: showOutsideDays, className: (0, utils_1.cn)('inline-flex', className), classNames: {
|
|
15
|
+
months: 'relative',
|
|
16
|
+
month: 'flex flex-col space-y-[16px] items-center',
|
|
17
|
+
month_grid: 'w-full border-collapse',
|
|
18
|
+
month_caption: 'inline m-x-auto',
|
|
19
|
+
caption_label: 'text-sm font-medium capitalize',
|
|
20
|
+
nav: 'flex justify-between absolute start-0 end-0',
|
|
21
|
+
button_previous: btnNavClasses,
|
|
22
|
+
button_next: btnNavClasses,
|
|
23
|
+
weekdays: 'flex',
|
|
24
|
+
weekday: 'text-light w-[32px] font-normal text-[14px]',
|
|
25
|
+
week: 'flex w-full mt-2',
|
|
26
|
+
day_button: 'w-[32px] h-[32px] p-0',
|
|
27
|
+
day: (0, utils_1.cn)('aria-selected:opacity-100 text-[14px] leading-[1]', props.mode === 'range'
|
|
28
|
+
? '[&:(.day-range-middle)]:rounded-0 [&:has(>.day-range-end)]:rounded-r-sm [&:has(>.day-range-start)]:rounded-l-sm first:[&:has([aria-selected])]:rounded-l-sm last:[&:has([aria-selected])]:rounded-r-sm'
|
|
29
|
+
: '[&:([aria-selected])]:rounded-sm'),
|
|
30
|
+
range_start: 'day-range-start',
|
|
31
|
+
range_end: 'day-range-end',
|
|
32
|
+
range_middle: rangeMiddleClasses,
|
|
33
|
+
selected: daySelectedClasses,
|
|
34
|
+
today: dayTodayClasses,
|
|
35
|
+
outside: 'day-outside opacity-50 aria-selected:bg-primary aria-selected:text-[white] aria-selected:opacity-30',
|
|
36
|
+
disabled: 'text-light opacity-50',
|
|
37
|
+
hidden: 'invisible',
|
|
38
|
+
...classNames,
|
|
39
|
+
}, components: {
|
|
40
|
+
// Chevron: () => <Left className="w-4 h-4" />,
|
|
41
|
+
}, ...props }));
|
|
42
|
+
}
|
|
43
|
+
exports.Calendar = Calendar;
|
|
44
|
+
Calendar.displayName = 'Calendar';
|
|
45
|
+
//# sourceMappingURL=Calendar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Calendar.js","sourceRoot":"","sources":["../../src/Calendar/Calendar.tsx"],"names":[],"mappings":";;;;AAAA,0DAA8B;AAC9B,uDAA4C;AAC5C,0CAAmC;AACnC,4CAAoC;AAEpC,MAAM,kBAAkB,GAAG,4CAA4C,CAAA;AACvE,MAAM,eAAe,GAAG,gDAAgD,CAAA;AACxE,MAAM,kBAAkB,GAAG,4EAA4E,CAAA;AACvG,MAAM,aAAa,GAClB,6IAA6I,CAAA;AAG9I,SAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,eAAe,GAAG,IAAI,EAAE,GAAG,KAAK,EAAiB;IAC3F,OAAO,CACN,oBAAC,4BAAS,IACT,MAAM,EAAE,WAAE,EACV,eAAe,EAAE,eAAe,EAChC,SAAS,EAAE,IAAA,UAAE,EAAC,aAAa,EAAE,SAAS,CAAC,EACvC,UAAU,EAAE;YACX,MAAM,EAAE,UAAU;YAClB,KAAK,EAAE,2CAA2C;YAClD,UAAU,EAAE,wBAAwB;YACpC,aAAa,EAAE,iBAAiB;YAChC,aAAa,EAAE,gCAAgC;YAC/C,GAAG,EAAE,6CAA6C;YAClD,eAAe,EAAE,aAAa;YAC9B,WAAW,EAAE,aAAa;YAC1B,QAAQ,EAAE,MAAM;YAChB,OAAO,EAAE,6CAA6C;YACtD,IAAI,EAAE,kBAAkB;YACxB,UAAU,EAAE,uBAAuB;YACnC,GAAG,EAAE,IAAA,UAAE,EACN,mDAAmD,EACnD,KAAK,CAAC,IAAI,KAAK,OAAO;gBACrB,CAAC,CAAC,wMAAwM;gBAC1M,CAAC,CAAC,kCAAkC,CACrC;YACD,WAAW,EAAE,iBAAiB;YAC9B,SAAS,EAAE,eAAe;YAC1B,YAAY,EAAE,kBAAkB;YAChC,QAAQ,EAAE,kBAAkB;YAC5B,KAAK,EAAE,eAAe;YACtB,OAAO,EACN,qGAAqG;YACtG,QAAQ,EAAE,uBAAuB;YACjC,MAAM,EAAE,WAAW;YACnB,GAAG,UAAU;SACb,EACD,UAAU,EACT;QACC,+CAA+C;SAC/C,KAEE,KAAK,GACR,CACF,CAAA;AACF,CAAC;AAIQ,4BAAQ;AAFjB,QAAQ,CAAC,WAAW,GAAG,UAAU,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Calendar } from './Calendar';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Calendar = void 0;
|
|
4
|
+
var Calendar_1 = require("./Calendar");
|
|
5
|
+
Object.defineProperty(exports, "Calendar", { enumerable: true, get: function () { return Calendar_1.Calendar; } });
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Calendar/index.ts"],"names":[],"mappings":";;;AAAA,uCAAqC;AAA5B,oGAAA,QAAQ,OAAA"}
|
package/dist/Chip/Chip.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type VariantProps } from 'class-variance-authority';
|
|
3
3
|
declare const chipVariants: (props?: {
|
|
4
|
-
variant?: "
|
|
4
|
+
variant?: "primary" | "secondary" | "success" | "primary-outline" | "outline" | "ghost";
|
|
5
5
|
size?: "lg" | "md" | "sm" | "xs" | "xxs";
|
|
6
6
|
} & import("class-variance-authority/dist/types").ClassProp) => string;
|
|
7
7
|
export interface IChipProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof chipVariants> {
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DatePicker = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const React = (0, tslib_1.__importStar)(require("react"));
|
|
6
|
+
const date_fns_1 = require("date-fns");
|
|
7
|
+
const utils_1 = require("../@/lib/utils");
|
|
8
|
+
const Calendar_1 = require("../Calendar");
|
|
9
|
+
const Icon_1 = require("../Icon");
|
|
10
|
+
const Popover_1 = require("../Popover");
|
|
11
|
+
const locale_1 = require("date-fns/locale");
|
|
12
|
+
const trigegrClasses = 'inline-flex items-center border-input px-[12px] border rounded-sm h-[44px] text-left';
|
|
13
|
+
const DatePicker = ({ placeholder, triggerDisabled, date, classTrigger, ...props }) => {
|
|
14
|
+
return (React.createElement(Popover_1.Popover, null,
|
|
15
|
+
React.createElement(Popover_1.Popover.Trigger, { asChild: true },
|
|
16
|
+
React.createElement("button", { className: (0, utils_1.cn)(trigegrClasses, { 'bg-light text-light': triggerDisabled }, classTrigger), disabled: triggerDisabled },
|
|
17
|
+
date ? React.createElement("span", { className: 'w-[calc(100%-26px)] truncate' }, (0, date_fns_1.format)(date, 'PPP', { locale: locale_1.ru })) : React.createElement("span", { className: 'w-[calc(100%-26px)] text-light truncate' }, placeholder),
|
|
18
|
+
React.createElement(Icon_1.Calendar, { width: 18, height: 18, className: "ml-[8px] text-light shrink-0" }))),
|
|
19
|
+
React.createElement(Popover_1.Popover.Content, { className: "bg-page p-0 w-auto", align: "center" },
|
|
20
|
+
React.createElement(Calendar_1.Calendar, { ...props }))));
|
|
21
|
+
};
|
|
22
|
+
exports.DatePicker = DatePicker;
|
|
23
|
+
//# sourceMappingURL=DatePicker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DatePicker.js","sourceRoot":"","sources":["../../src/DatePicker/DatePicker.tsx"],"names":[],"mappings":";;;;AAAA,0DAA8B;AAC9B,uCAAiC;AACjC,0CAAmC;AACnC,0CAAsC;AACtC,kCAAkD;AAClD,wCAAoC;AACpC,4CAAoC;AAEpC,MAAM,cAAc,GAAG,sFAAsF,CAAA;AAS7G,MAAM,UAAU,GAAqB,CAAC,EAAC,WAAW,EAAE,eAAe,EAAE,IAAI,EAAE,YAAY,EAAG,GAAG,KAAK,EAAC,EAAE,EAAE;IAEtG,OAAO,CACN,oBAAC,iBAAO;QACP,oBAAC,iBAAO,CAAC,OAAO,IAAC,OAAO;YACvB,gCAAQ,SAAS,EAAE,IAAA,UAAE,EAAC,cAAc,EAAE,EAAC,qBAAqB,EAAC,eAAe,EAAC,EAAE,YAAY,CAAC,EAAE,QAAQ,EAAE,eAAe;gBACrH,IAAI,CAAC,CAAC,CAAC,8BAAM,SAAS,EAAC,8BAA8B,IAAE,IAAA,iBAAM,EAAC,IAAI,EAAE,KAAK,EAAE,EAAC,MAAM,EAAE,WAAE,EAAC,CAAC,CAAQ,CAAC,CAAC,CAAC,8BAAM,SAAS,EAAC,yCAAyC,IAAE,WAAW,CAAQ;gBAClL,oBAAC,eAAY,IAAC,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,SAAS,EAAC,8BAA8B,GAAG,CACxE,CACQ;QAClB,oBAAC,iBAAO,CAAC,OAAO,IACf,SAAS,EAAC,oBAAoB,EAC9B,KAAK,EAAC,QAAQ;YAEd,oBAAC,mBAAQ,OAAK,KAAK,GAAG,CACL,CACT,CACV,CAAA;AACF,CAAC,CAAA;AAEQ,gCAAU"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DatePicker } from './DatePicker';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DatePicker = void 0;
|
|
4
|
+
var DatePicker_1 = require("./DatePicker");
|
|
5
|
+
Object.defineProperty(exports, "DatePicker", { enumerable: true, get: function () { return DatePicker_1.DatePicker; } });
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/DatePicker/index.ts"],"names":[],"mappings":";;;AAAA,2CAAyC;AAAhC,wGAAA,UAAU,OAAA"}
|
package/dist/Drawer/Drawer.js
CHANGED
|
@@ -25,7 +25,7 @@ DrawerTitle.displayName = vaul_1.Drawer.Title.displayName;
|
|
|
25
25
|
const DrawerContent = React.forwardRef(({ className, children, ...props }, ref) => {
|
|
26
26
|
const direction = (0, react_1.useContext)(DrawerContext);
|
|
27
27
|
return (React.createElement(DrawerPortal, null,
|
|
28
|
-
React.createElement(vaul_1.Drawer.Content, { ref: ref, className: (0, utils_1.cn)(`z-50 fixed inset-x-0 flex flex-col bg-page
|
|
28
|
+
React.createElement(vaul_1.Drawer.Content, { ref: ref, className: (0, utils_1.cn)(`z-50 fixed inset-x-0 flex flex-col bg-page shadow-sm max-h-[94%] sm:container`, direction === 'top' ? 'top-0 rounded-b-sm ' : 'bottom-0 rounded-t-sm', className), ...props },
|
|
29
29
|
direction !== 'top' && (React.createElement(DrawerClose, { className: "pt-[4px] pb-[16px]" },
|
|
30
30
|
React.createElement("span", { className: "block bg-[#cbcdd1] mx-auto rounded-full w-[36px] h-[5px]" }))),
|
|
31
31
|
children,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Drawer.js","sourceRoot":"","sources":["../../src/Drawer/Drawer.tsx"],"names":[],"mappings":";;;;AAAA,0DAA8B;AAC9B,+BAAgD;AAChD,0CAAmC;AACnC,iCAAkC;AAElC,MAAM,aAAa,GAAG,KAAK,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAA;AAEnD,MAAM,MAAM,GAAG,CAAC,EAAE,GAAG,KAAK,EAAqD,EAAE,EAAE;IAClF,OAAO,CACN,oBAAC,aAAa,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,CAAC,SAAS;QAC7C,oBAAC,aAAe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AqB,CAAC,CAAC,CAAC,uBAAuB,EACrE,SAAS,CACT,KACG,KAAK;YAER,SAAS,KAAK,KAAK,IAAI,CACvB,oBAAC,WAAW,IAAC,SAAS,EAAC,oBAAoB;gBAC1C,8BAAM,SAAS,EAAC,0DAA0D,GAAG,CAChE,CACd;YAEA,QAAQ;YAER,SAAS,KAAK,KAAK,IAAI,CACvB,oBAAC,WAAW,IAAC,SAAS,EAAC,qBAAqB;gBAC3C,6BACC,SAAS,EAAC,SAAS,EACnB,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,EACX,KAAK,EAAC,4BAA4B;oBAElC,8BACC,CAAC,EAAC,+UAA+U,EACjV,IAAI,EAAC,SAAS,GACb,CACG,CACO,CACd,CACwB,CACZ,CACf,CAAA;AACF,CAAC,CAAC,CAAA;AAG8B,sCAAa;AAF7C,aAAa,CAAC,WAAW,GAAG,eAAe,CAAA"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
3
|
+
import { ControllerProps, FieldValues } from 'react-hook-form';
|
|
4
|
+
declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues extends FieldValues = undefined>(props: import("react-hook-form").FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React.JSX.Element;
|
|
5
|
+
declare const FormField: <TFieldValues extends FieldValues = FieldValues, TName extends import("react-hook-form").Path<TFieldValues> = import("react-hook-form").Path<TFieldValues>>({ ...props }: ControllerProps<TFieldValues, TName>) => React.JSX.Element;
|
|
6
|
+
declare const useFormField: () => {
|
|
7
|
+
invalid: boolean;
|
|
8
|
+
isDirty: boolean;
|
|
9
|
+
isTouched: boolean;
|
|
10
|
+
isValidating: boolean;
|
|
11
|
+
error?: import("react-hook-form").FieldError;
|
|
12
|
+
id: string;
|
|
13
|
+
name: string;
|
|
14
|
+
formItemId: string;
|
|
15
|
+
formDescriptionId: string;
|
|
16
|
+
formMessageId: string;
|
|
17
|
+
};
|
|
18
|
+
declare const FormItem: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
19
|
+
declare const FormLabel: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & React.RefAttributes<HTMLLabelElement>>;
|
|
20
|
+
declare const FormControl: React.ForwardRefExoticComponent<Omit<import("@radix-ui/react-slot").SlotProps & React.RefAttributes<HTMLElement>, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
21
|
+
declare const FormDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
22
|
+
declare const FormMessage: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
23
|
+
export { useFormField, Form, FormItem, FormLabel, FormControl, FormDescription, FormMessage, FormField };
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FormField = exports.FormMessage = exports.FormDescription = exports.FormControl = exports.FormLabel = exports.FormItem = exports.Form = exports.useFormField = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const React = (0, tslib_1.__importStar)(require("react"));
|
|
6
|
+
const react_slot_1 = require("@radix-ui/react-slot");
|
|
7
|
+
const react_hook_form_1 = require("react-hook-form");
|
|
8
|
+
const utils_1 = require("../@/lib/utils");
|
|
9
|
+
const Label_1 = require("../Label");
|
|
10
|
+
const Form = react_hook_form_1.FormProvider;
|
|
11
|
+
exports.Form = Form;
|
|
12
|
+
const FormFieldContext = React.createContext({});
|
|
13
|
+
const FormField = ({ ...props }) => {
|
|
14
|
+
return (React.createElement(FormFieldContext.Provider, { value: { name: props.name } },
|
|
15
|
+
React.createElement(react_hook_form_1.Controller, { ...props })));
|
|
16
|
+
};
|
|
17
|
+
exports.FormField = FormField;
|
|
18
|
+
const useFormField = () => {
|
|
19
|
+
const fieldContext = React.useContext(FormFieldContext);
|
|
20
|
+
const itemContext = React.useContext(FormItemContext);
|
|
21
|
+
const { getFieldState, formState } = (0, react_hook_form_1.useFormContext)();
|
|
22
|
+
const fieldState = getFieldState(fieldContext.name, formState);
|
|
23
|
+
if (!fieldContext) {
|
|
24
|
+
throw new Error('useFormField should be used within <FormField>');
|
|
25
|
+
}
|
|
26
|
+
const { id } = itemContext;
|
|
27
|
+
return {
|
|
28
|
+
id,
|
|
29
|
+
name: fieldContext.name,
|
|
30
|
+
formItemId: `${id}-form-item`,
|
|
31
|
+
formDescriptionId: `${id}-form-item-description`,
|
|
32
|
+
formMessageId: `${id}-form-item-message`,
|
|
33
|
+
...fieldState,
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
exports.useFormField = useFormField;
|
|
37
|
+
const FormItemContext = React.createContext({});
|
|
38
|
+
const FormItem = React.forwardRef(({ className, ...props }, ref) => {
|
|
39
|
+
const id = React.useId();
|
|
40
|
+
return (React.createElement(FormItemContext.Provider, { value: { id } },
|
|
41
|
+
React.createElement("div", { ref: ref, className: (0, utils_1.cn)('space-y-2', className), ...props })));
|
|
42
|
+
});
|
|
43
|
+
exports.FormItem = FormItem;
|
|
44
|
+
FormItem.displayName = 'FormItem';
|
|
45
|
+
const FormLabel = React.forwardRef(({ className, ...props }, ref) => {
|
|
46
|
+
const { error, formItemId } = useFormField();
|
|
47
|
+
return (React.createElement(Label_1.Label, { ref: ref, className: (0, utils_1.cn)(error && 'text-destructive', className), htmlFor: formItemId, ...props }));
|
|
48
|
+
});
|
|
49
|
+
exports.FormLabel = FormLabel;
|
|
50
|
+
FormLabel.displayName = 'FormLabel';
|
|
51
|
+
const FormControl = React.forwardRef(({ ...props }, ref) => {
|
|
52
|
+
const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
|
|
53
|
+
return (React.createElement(react_slot_1.Slot, { ref: ref, id: formItemId, "aria-describedby": !error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`, "aria-invalid": !!error, ...props }));
|
|
54
|
+
});
|
|
55
|
+
exports.FormControl = FormControl;
|
|
56
|
+
FormControl.displayName = 'FormControl';
|
|
57
|
+
const FormDescription = React.forwardRef(({ className, ...props }, ref) => {
|
|
58
|
+
const { formDescriptionId } = useFormField();
|
|
59
|
+
return (React.createElement("p", { ref: ref, id: formDescriptionId, className: (0, utils_1.cn)('text-[0.8rem] text-light', className), ...props }));
|
|
60
|
+
});
|
|
61
|
+
exports.FormDescription = FormDescription;
|
|
62
|
+
FormDescription.displayName = 'FormDescription';
|
|
63
|
+
const FormMessage = React.forwardRef(({ className, children, ...props }, ref) => {
|
|
64
|
+
const { error, formMessageId } = useFormField();
|
|
65
|
+
const body = error ? String(error?.message) : children;
|
|
66
|
+
if (!body) {
|
|
67
|
+
return null;
|
|
68
|
+
}
|
|
69
|
+
return (React.createElement("p", { ref: ref, id: formMessageId, className: (0, utils_1.cn)('text-[0.8rem] font-medium text-destructive', className), ...props }, body));
|
|
70
|
+
});
|
|
71
|
+
exports.FormMessage = FormMessage;
|
|
72
|
+
FormMessage.displayName = 'FormMessage';
|
|
73
|
+
//# sourceMappingURL=Form.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Form.js","sourceRoot":"","sources":["../../src/Form/Form.tsx"],"names":[],"mappings":";;;;AAAA,0DAA8B;AAE9B,qDAA2C;AAC3C,qDAAmH;AAEnH,0CAAmC;AACnC,oCAAgC;AAEhC,MAAM,IAAI,GAAG,8BAAY,CAAA;AA+IF,oBAAI;AAtI3B,MAAM,gBAAgB,GAAG,KAAK,CAAC,aAAa,CAAwB,EAA2B,CAAC,CAAA;AAEhG,MAAM,SAAS,GAAG,CAGhB,EACD,GAAG,KAAK,EAC8B,EAAE,EAAE;IAC1C,OAAO,CACN,oBAAC,gBAAgB,CA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;IAChC,MAAM,EAAE,iBAAiB,EAAE,GAAG,YAAY,EAAE,CAAA;IAE5C,OAAO,CACN,2BACC,GAAG,EAAE,GAAG,EACR,EAAE,EAAE,iBAAiB,EACrB,SAAS,EAAE,IAAA,UAAE,EAAC,0BAA0B,EAAE,SAAS,CAAC,KAChD,KAAK,GACR,CACF,CAAA;AACF,CAAC,CACD,CAAA;AA0B8D,0CAAe;AAzB9E,eAAe,CAAC,WAAW,GAAG,iBAAiB,CAAA;AAE/C,MAAM,WAAW,GAAG,KAAK,CAAC,UAAU,CACnC,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IAC1C,MAAM,EAAE,KAAK,EAAE,aAAa,EAAE,GAAG,YAAY,EAAE,CAAA;IAC/C,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAA;IAEtD,IAAI,CAAC,IAAI,EAAE;QACV,OAAO,IAAI,CAAA;KACX;IAED,OAAO,CACN,2BACC,GAAG,EAAE,GAAG,EACR,EAAE,EAAE,aAAa,EACjB,SAAS,EAAE,IAAA,UAAE,EAAC,4CAA4C,EAAE,SAAS,CAAC,KAClE,KAAK,IAER,IAAI,CACF,CACJ,CAAA;AACF,CAAC,CACD,CAAA;AAG+E,kCAAW;AAF3F,WAAW,CAAC,WAAW,GAAG,aAAa,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useFormField, Form, FormItem, FormLabel, FormControl, FormDescription, FormMessage, FormField } from './Form';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FormField = exports.FormMessage = exports.FormDescription = exports.FormControl = exports.FormLabel = exports.FormItem = exports.Form = exports.useFormField = void 0;
|
|
4
|
+
var Form_1 = require("./Form");
|
|
5
|
+
Object.defineProperty(exports, "useFormField", { enumerable: true, get: function () { return Form_1.useFormField; } });
|
|
6
|
+
Object.defineProperty(exports, "Form", { enumerable: true, get: function () { return Form_1.Form; } });
|
|
7
|
+
Object.defineProperty(exports, "FormItem", { enumerable: true, get: function () { return Form_1.FormItem; } });
|
|
8
|
+
Object.defineProperty(exports, "FormLabel", { enumerable: true, get: function () { return Form_1.FormLabel; } });
|
|
9
|
+
Object.defineProperty(exports, "FormControl", { enumerable: true, get: function () { return Form_1.FormControl; } });
|
|
10
|
+
Object.defineProperty(exports, "FormDescription", { enumerable: true, get: function () { return Form_1.FormDescription; } });
|
|
11
|
+
Object.defineProperty(exports, "FormMessage", { enumerable: true, get: function () { return Form_1.FormMessage; } });
|
|
12
|
+
Object.defineProperty(exports, "FormField", { enumerable: true, get: function () { return Form_1.FormField; } });
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Form/index.ts"],"names":[],"mappings":";;;AAAA,+BAAsH;AAA7G,oGAAA,YAAY,OAAA;AAAE,4FAAA,IAAI,OAAA;AAAE,gGAAA,QAAQ,OAAA;AAAE,iGAAA,SAAS,OAAA;AAAE,mGAAA,WAAW,OAAA;AAAE,uGAAA,eAAe,OAAA;AAAE,mGAAA,WAAW,OAAA;AAAE,iGAAA,SAAS,OAAA"}
|
package/dist/Input/Input.js
CHANGED
|
@@ -10,7 +10,7 @@ const InputLabel = React.forwardRef(({ className, children, ...props }) => {
|
|
|
10
10
|
exports.InputLabel = InputLabel;
|
|
11
11
|
InputLabel.displayName = 'InputLabel';
|
|
12
12
|
const InputField = React.forwardRef(({ className, type, ...props }, ref) => {
|
|
13
|
-
return (React.createElement("input", { type: type, className: (0, utils_1.cn)('border-input file:border-0 bg-transparent font-normal file:bg-transparent disabled:opacity-50 border rounded-
|
|
13
|
+
return (React.createElement("input", { type: type, className: (0, utils_1.cn)('form-input px-[16px] border-input file:border-0 bg-transparent font-normal file:bg-transparent disabled:opacity-50 border rounded-sm focus-visible:ring-1 focus-visible:ring-ring w-full h-[44px] file:font-medium file:text-sm placeholder:text-muted-foreground leading-[1.17] transition-colors focus-visible:outline-none disabled:cursor-not-allowed', className), ref: ref, ...props }));
|
|
14
14
|
});
|
|
15
15
|
exports.InputField = InputField;
|
|
16
16
|
InputField.displayName = 'InputField';
|
package/dist/Input/Input.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.js","sourceRoot":"","sources":["../../src/Input/Input.tsx"],"names":[],"mappings":";;;;AAAA,0DAA8B;AAC9B,0CAAmC;AAEnC,MAAM,UAAU,GAAG,KAAK,CAAC,UAAU,CAClC,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE;IACrC,OAAO,CACN,+BACC,SAAS,EAAE,IAAA,UAAE,EAAC,0GAA0G,EAAE,SAAS,CAAC,KAChI,KAAK,IAER,QAAQ,CACF,CACR,CAAA;AACF,CAAC,CACD,CAAA;AAoBoB,gCAAU;AAlB/B,UAAU,CAAC,WAAW,GAAG,YAAY,CAAA;AAErC,MAAM,UAAU,GAAG,KAAK,CAAC,UAAU,CAAgE,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IACzI,OAAO,CACN,+BACC,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,IAAA,UAAE,EACZ,
|
|
1
|
+
{"version":3,"file":"Input.js","sourceRoot":"","sources":["../../src/Input/Input.tsx"],"names":[],"mappings":";;;;AAAA,0DAA8B;AAC9B,0CAAmC;AAEnC,MAAM,UAAU,GAAG,KAAK,CAAC,UAAU,CAClC,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE;IACrC,OAAO,CACN,+BACC,SAAS,EAAE,IAAA,UAAE,EAAC,0GAA0G,EAAE,SAAS,CAAC,KAChI,KAAK,IAER,QAAQ,CACF,CACR,CAAA;AACF,CAAC,CACD,CAAA;AAoBoB,gCAAU;AAlB/B,UAAU,CAAC,WAAW,GAAG,YAAY,CAAA;AAErC,MAAM,UAAU,GAAG,KAAK,CAAC,UAAU,CAAgE,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IACzI,OAAO,CACN,+BACC,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,IAAA,UAAE,EACZ,2VAA2V,EAC3V,SAAS,CACT,EACD,GAAG,EAAE,GAAG,KACJ,KAAK,GACR,CACF,CAAA;AACF,CAAC,CAAC,CAAA;AAIO,gCAAU;AAFnB,UAAU,CAAC,WAAW,GAAG,YAAY,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InputMask = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const React = (0, tslib_1.__importStar)(require("react"));
|
|
6
|
+
const react_imask_1 = require("react-imask");
|
|
7
|
+
const inputClasses = 'form-input border-input file:border-0 bg-transparent font-normal file:bg-transparent disabled:opacity-50 border rounded-sm focus-visible:ring-1 focus-visible:ring-ring w-full h-[44px] file:font-medium file:text-sm placeholder:text-muted-foreground leading-[1.17] transition-colors focus-visible:outline-none disabled:cursor-not-allowed';
|
|
8
|
+
const InputMask = ({ ...props }) => {
|
|
9
|
+
return (React.createElement(react_imask_1.IMaskInput, { className: inputClasses, ...props }));
|
|
10
|
+
};
|
|
11
|
+
exports.InputMask = InputMask;
|
|
12
|
+
//# sourceMappingURL=InputMask.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InputMask.js","sourceRoot":"","sources":["../../src/Input/InputMask.tsx"],"names":[],"mappings":";;;;AAAA,0DAA8B;AAC9B,6CAAwC;AAExC,MAAM,YAAY,GAAG,iVAAiV,CAAA;AAEtW,MAAM,SAAS,GAAa,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE;IAC5C,OAAO,CACN,oBAAC,wBAAU,IACV,SAAS,EAAE,YAAY,KACnB,KAAK,GACR,CACF,CAAA;AACF,CAAC,CAAA;AAEQ,8BAAS"}
|
package/dist/Input/index.d.ts
CHANGED
package/dist/Input/index.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.InputLabel = exports.InputField = void 0;
|
|
3
|
+
exports.InputMask = exports.InputLabel = exports.InputField = void 0;
|
|
4
4
|
var Input_1 = require("./Input");
|
|
5
5
|
Object.defineProperty(exports, "InputField", { enumerable: true, get: function () { return Input_1.InputField; } });
|
|
6
6
|
Object.defineProperty(exports, "InputLabel", { enumerable: true, get: function () { return Input_1.InputLabel; } });
|
|
7
|
+
var InputMask_1 = require("./InputMask");
|
|
8
|
+
Object.defineProperty(exports, "InputMask", { enumerable: true, get: function () { return InputMask_1.InputMask; } });
|
|
7
9
|
//# sourceMappingURL=index.js.map
|
package/dist/Input/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Input/index.ts"],"names":[],"mappings":";;;AAAA,iCAAgD;AAAvC,mGAAA,UAAU,OAAA;AAAE,mGAAA,UAAU,OAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Input/index.ts"],"names":[],"mappings":";;;AAAA,iCAAgD;AAAvC,mGAAA,UAAU,OAAA;AAAE,mGAAA,UAAU,OAAA;AAC/B,yCAAuC;AAA9B,sGAAA,SAAS,OAAA"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
declare const InputOTP: React.ForwardRefExoticComponent<(Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "
|
|
2
|
+
declare const InputOTP: React.ForwardRefExoticComponent<(Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "value" | "maxLength" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "containerClassName" | "noScriptCSSFallback"> & {
|
|
3
3
|
value?: string;
|
|
4
4
|
onChange?: (newValue: string) => unknown;
|
|
5
5
|
maxLength: number;
|
|
6
|
-
textAlign?: "center" | "
|
|
6
|
+
textAlign?: "center" | "right" | "left";
|
|
7
7
|
onComplete?: (...args: any[]) => unknown;
|
|
8
8
|
pushPasswordManagerStrategy?: "none" | "increase-width";
|
|
9
9
|
containerClassName?: string;
|
|
@@ -11,11 +11,11 @@ declare const InputOTP: React.ForwardRefExoticComponent<(Omit<Omit<React.InputHT
|
|
|
11
11
|
} & {
|
|
12
12
|
render: (props: import("input-otp").RenderProps) => React.ReactNode;
|
|
13
13
|
children?: never;
|
|
14
|
-
} & React.RefAttributes<HTMLInputElement>, "ref"> | Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "
|
|
14
|
+
} & React.RefAttributes<HTMLInputElement>, "ref"> | Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "value" | "maxLength" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "containerClassName" | "noScriptCSSFallback"> & {
|
|
15
15
|
value?: string;
|
|
16
16
|
onChange?: (newValue: string) => unknown;
|
|
17
17
|
maxLength: number;
|
|
18
|
-
textAlign?: "center" | "
|
|
18
|
+
textAlign?: "center" | "right" | "left";
|
|
19
19
|
onComplete?: (...args: any[]) => unknown;
|
|
20
20
|
pushPasswordManagerStrategy?: "none" | "increase-width";
|
|
21
21
|
containerClassName?: string;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
3
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
4
|
+
declare const Label: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & VariantProps<(props?: import("class-variance-authority/dist/types").ClassProp) => string> & React.RefAttributes<HTMLLabelElement>>;
|
|
5
|
+
export { Label };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Label = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const React = (0, tslib_1.__importStar)(require("react"));
|
|
6
|
+
const LabelPrimitive = (0, tslib_1.__importStar)(require("@radix-ui/react-label"));
|
|
7
|
+
const class_variance_authority_1 = require("class-variance-authority");
|
|
8
|
+
const utils_1 = require("../@/lib/utils");
|
|
9
|
+
const labelVariants = (0, class_variance_authority_1.cva)('peer-disabled:opacity-70 peer-disabled:cursor-not-allowed');
|
|
10
|
+
const Label = React.forwardRef(({ className, ...props }, ref) => (React.createElement(LabelPrimitive.Root, { ref: ref, className: (0, utils_1.cn)(labelVariants(), className), ...props })));
|
|
11
|
+
exports.Label = Label;
|
|
12
|
+
Label.displayName = LabelPrimitive.Root.displayName;
|
|
13
|
+
//# sourceMappingURL=Label.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Label.js","sourceRoot":"","sources":["../../src/Label/Label.tsx"],"names":[],"mappings":";;;;AAAA,0DAA8B;AAC9B,mFAAuD;AACvD,uEAAiE;AACjE,0CAAmC;AAEnC,MAAM,aAAa,GAAG,IAAA,8BAAG,EAAC,2DAA2D,CAAC,CAAA;AAEtF,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CAG5B,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CACnC,oBAAC,cAAc,CAAC,IAAI,IACnB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,IAAA,UAAE,EAAC,aAAa,EAAE,EAAE,SAAS,CAAC,KACrC,KAAK,GACR,CACF,CAAC,CAAA;AAGO,sBAAK;AAFd,KAAK,CAAC,WAAW,GAAG,cAAc,CAAC,IAAI,CAAC,WAAW,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Label } from './Label';
|