@modul/mbui 0.0.23-beta-pv-53369-5d26f1fe → 0.0.23
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/Drawer/Drawer.d.ts +6 -4
- package/dist/Drawer/Drawer.js +1 -1
- package/dist/Drawer/Drawer.js.map +1 -1
- package/dist/FavoritePyments/FavoritePaymentsList.js +3 -3
- package/dist/Toaster/index.js.map +1 -1
- package/dist/index.d.ts +1 -3
- package/dist/index.js +2 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -3
- package/src/Drawer/Drawer.tsx +7 -7
- package/src/FavoritePyments/FavoritePaymentsList.tsx +3 -3
- package/src/Toaster/index.ts +1 -1
- package/src/assets/css/global.css +4 -13
- package/src/index.ts +1 -4
- package/dist/Swipe2Show/Swipe2Show.d.ts +0 -6
- package/dist/Swipe2Show/Swipe2Show.js +0 -53
- package/dist/Swipe2Show/Swipe2Show.js.map +0 -1
- package/dist/Swipe2Show/index.d.ts +0 -1
- package/dist/Swipe2Show/index.js +0 -6
- package/dist/Swipe2Show/index.js.map +0 -1
- package/dist/Tooltip/Tooltip.d.ts +0 -13
- package/dist/Tooltip/Tooltip.js +0 -28
- package/dist/Tooltip/Tooltip.js.map +0 -1
- package/dist/Tooltip/index.d.ts +0 -3
- package/dist/Tooltip/index.js +0 -8
- package/dist/Tooltip/index.js.map +0 -1
- package/src/Swipe2Show/Swipe2Show.tsx +0 -67
- package/src/Swipe2Show/index.ts +0 -1
- package/src/Tooltip/Tooltip.tsx +0 -56
- package/src/Tooltip/index.ts +0 -5
package/dist/Drawer/Drawer.d.ts
CHANGED
|
@@ -4,8 +4,10 @@ declare const Drawer: {
|
|
|
4
4
|
({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Root>): React.JSX.Element;
|
|
5
5
|
displayName: string;
|
|
6
6
|
};
|
|
7
|
-
declare const DrawerTrigger:
|
|
8
|
-
declare const DrawerClose:
|
|
9
|
-
declare const DrawerTitle:
|
|
10
|
-
declare const DrawerContent:
|
|
7
|
+
declare const DrawerTrigger: React.ForwardRefExoticComponent<import("@radix-ui/react-dialog").DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
8
|
+
declare const DrawerClose: React.ForwardRefExoticComponent<import("@radix-ui/react-dialog").DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
9
|
+
declare const DrawerTitle: React.ForwardRefExoticComponent<Omit<import("@radix-ui/react-dialog").DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
10
|
+
declare const DrawerContent: React.ForwardRefExoticComponent<Omit<Omit<import("@radix-ui/react-dialog").DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
11
|
+
onAnimationEnd?: (open: boolean) => void;
|
|
12
|
+
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
11
13
|
export { Drawer, DrawerTrigger, DrawerContent, DrawerTitle, DrawerClose };
|
package/dist/Drawer/Drawer.js
CHANGED
|
@@ -26,7 +26,7 @@ const DrawerContent = React.forwardRef(({ className, children, ...props }, ref)
|
|
|
26
26
|
const { direction = 'bottom', modal = false } = (0, react_1.useContext)(DrawerContext);
|
|
27
27
|
return (React.createElement(DrawerPortal, null,
|
|
28
28
|
modal && React.createElement(DrawerOverlay, { className: 'z-50 fixed inset-0 bg-[--drawer-overlay-bg]' }),
|
|
29
|
-
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-
|
|
29
|
+
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-[0_0_6px_6px_rgba(36,48,54,.08)] max-h-[calc(100dvh-var(--page-header-height))] container`, direction === 'top' ? 'top-0 rounded-b-sm ' : 'bottom-0 rounded-t-sm', className), ...props },
|
|
30
30
|
direction !== 'top' && (React.createElement("div", { className: "pt-[4px] pb-[16px]" },
|
|
31
31
|
React.createElement("span", { className: "block bg-[--cl-graphite-5] mx-auto rounded-full w-[36px] h-[5px]" }))),
|
|
32
32
|
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,EAAC,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAC,CAAC,CAAA;AAE9E,MAAM,MAAM,GAAG,CAAC,EAAE,GAAG,KAAK,EAAqD,EAAE,EAAE;IAClF,OAAO,CACN,oBAAC,aAAa,CAAC,QAAQ,IAAC,KAAK,EAAE,EAAC,SAAS,EAAE,KAAK,CAAC,SAAS,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAC;QAC9E,oBAAC,aAAe,CAAC,IAAI,OAAK,KAAK,GAAI,CACX,CACzB,CAAA;AACF,CAAC,CAAA;AA2EQ,wBAAM;AAzEf,MAAM,CAAC,WAAW,GAAG,QAAQ,CAAA;AAE7B,MAAM,aAAa,
|
|
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,EAAC,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAC,CAAC,CAAA;AAE9E,MAAM,MAAM,GAAG,CAAC,EAAE,GAAG,KAAK,EAAqD,EAAE,EAAE;IAClF,OAAO,CACN,oBAAC,aAAa,CAAC,QAAQ,IAAC,KAAK,EAAE,EAAC,SAAS,EAAE,KAAK,CAAC,SAAS,EAAE,KAA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B,CAAC,CAAC,CAAC,uBAAuB,EACrE,SAAS,CACT,KACG,KAAK;YAER,SAAS,KAAK,KAAK,IAAI,CACvB,6BAAK,SAAS,EAAC,oBAAoB;gBAClC,8BAAM,SAAS,EAAC,kEAAkE,GAAG,CAChF,CACN;YAEA,QAAQ;YAER,SAAS,KAAK,KAAK,IAAI,CACvB,6BAAK,SAAS,EAAC,qBAAqB;gBACnC,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,sBAAsB,GAC1B,CACG,CACD,CACN,CACwB,CACZ,CACf,CAAA;AACF,CAAC,CAAC,CAAA;AAI8B,sCAAa;AAF7C,aAAa,CAAC,WAAW,GAAG,eAAe,CAAA"}
|
|
@@ -7,9 +7,9 @@ const farvoriteLinkClasses = `
|
|
|
7
7
|
block
|
|
8
8
|
px-[20px]
|
|
9
9
|
py-[8px]
|
|
10
|
-
hover:bg-
|
|
11
|
-
focus:bg-
|
|
12
|
-
active:bg-
|
|
10
|
+
hover:bg-btn-ghost-hover
|
|
11
|
+
focus:bg-btn-ghost-focus
|
|
12
|
+
active:bg-btn-ghost-active
|
|
13
13
|
`;
|
|
14
14
|
exports.farvoriteLinkClasses = farvoriteLinkClasses;
|
|
15
15
|
const FavoritePaymentsList = ({ children }) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Toaster/index.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Toaster/index.ts"],"names":[],"mappings":";;;AAAA,qCAA0C;AAAjC,kGAAA,OAAO,OAAA;AAAE,gGAAA,KAAK,OAAA"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Tooltip } from './Tooltip';
|
|
2
1
|
import { Tabs } from './Tabs';
|
|
3
2
|
import { Slider } from './Slider';
|
|
4
3
|
import { Popover } from './Popover';
|
|
@@ -31,5 +30,4 @@ import { DigitKeyPad } from "./DigitKeyPad";
|
|
|
31
30
|
import { Badge, badgeVariants } from './Badge';
|
|
32
31
|
import { Toaster, toast } from './Toaster';
|
|
33
32
|
import { Checkbox } from './Checkbox';
|
|
34
|
-
|
|
35
|
-
export { Tooltip, Tabs, Slider, Popover, Logo, InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator, Collapsible, CollapsibleTrigger, CollapsibleContent, AccountCollapsible, AccountCollapsibleHeader, AccountCollapsibleTrigger, AccountCollapsibleContent, AccountCollapsibleContentItem, Button, buttonVariants, InputField, InputLabel, Audio, cn, Icon, Drawer, DrawerTrigger, DrawerTitle, DrawerClose, DrawerContent, BottomNavigation, BottomNavigationList, BottomNavigationListItem, BottomNavigationLink, Page, Chip, Progress, Alert, Switch, Label, Textarea, SelectAccountCard, SelectAccount, SelectAsync, Select, Form, FormLabel, FormField, FormItem, FormControl, FormDescription, FormMessage, Calendar, DatePicker, InputMask, AlertDialog, AlertDialogTrigger, AlertDialogContent, AlertDialogHeader, AlertDialogFooter, AlertDialogTitle, AlertDialogDescription, AlertDialogAction, AlertDialogCancel, MessageTyping, FavoritePaymentsList, FavoritePaymentsItem, FarvoritePaymentDescription, farvoriteLinkClasses, Badge, badgeVariants, DigitKeyPad, ButtonWidget, Toaster, toast, Checkbox, Swipe2Show, };
|
|
33
|
+
export { Tabs, Slider, Popover, Logo, InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator, Collapsible, CollapsibleTrigger, CollapsibleContent, AccountCollapsible, AccountCollapsibleHeader, AccountCollapsibleTrigger, AccountCollapsibleContent, AccountCollapsibleContentItem, Button, buttonVariants, InputField, InputLabel, Audio, cn, Icon, Drawer, DrawerTrigger, DrawerTitle, DrawerClose, DrawerContent, BottomNavigation, BottomNavigationList, BottomNavigationListItem, BottomNavigationLink, Page, Chip, Progress, Alert, Switch, Label, Textarea, SelectAccountCard, SelectAccount, SelectAsync, Select, Form, FormLabel, FormField, FormItem, FormControl, FormDescription, FormMessage, Calendar, DatePicker, InputMask, AlertDialog, AlertDialogTrigger, AlertDialogContent, AlertDialogHeader, AlertDialogFooter, AlertDialogTitle, AlertDialogDescription, AlertDialogAction, AlertDialogCancel, MessageTyping, FavoritePaymentsList, FavoritePaymentsItem, FarvoritePaymentDescription, farvoriteLinkClasses, Badge, badgeVariants, DigitKeyPad, ButtonWidget, Toaster, toast, Checkbox, };
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FormDescription = exports.FormControl = exports.FormItem = exports.FormField = exports.FormLabel = exports.Form = exports.Select = exports.SelectAsync = exports.SelectAccount = exports.SelectAccountCard = exports.Textarea = exports.Label = exports.Switch = exports.Alert = exports.Progress = exports.Chip = exports.Page = exports.BottomNavigationLink = exports.BottomNavigationListItem = exports.BottomNavigationList = exports.BottomNavigation = exports.DrawerContent = exports.DrawerClose = exports.DrawerTitle = exports.DrawerTrigger = exports.Drawer = exports.Icon = exports.cn = exports.Audio = exports.InputLabel = exports.InputField = exports.buttonVariants = exports.Button = exports.AccountCollapsibleContentItem = exports.AccountCollapsibleContent = exports.AccountCollapsibleTrigger = exports.AccountCollapsibleHeader = exports.AccountCollapsible = exports.CollapsibleContent = exports.CollapsibleTrigger = exports.Collapsible = exports.InputOTPSeparator = exports.InputOTPSlot = exports.InputOTPGroup = exports.InputOTP = exports.Logo = exports.Popover = exports.Slider = exports.Tabs =
|
|
4
|
-
exports.
|
|
3
|
+
exports.FormMessage = exports.FormDescription = exports.FormControl = exports.FormItem = exports.FormField = exports.FormLabel = exports.Form = exports.Select = exports.SelectAsync = exports.SelectAccount = exports.SelectAccountCard = exports.Textarea = exports.Label = exports.Switch = exports.Alert = exports.Progress = exports.Chip = exports.Page = exports.BottomNavigationLink = exports.BottomNavigationListItem = exports.BottomNavigationList = exports.BottomNavigation = exports.DrawerContent = exports.DrawerClose = exports.DrawerTitle = exports.DrawerTrigger = exports.Drawer = exports.Icon = exports.cn = exports.Audio = exports.InputLabel = exports.InputField = exports.buttonVariants = exports.Button = exports.AccountCollapsibleContentItem = exports.AccountCollapsibleContent = exports.AccountCollapsibleTrigger = exports.AccountCollapsibleHeader = exports.AccountCollapsible = exports.CollapsibleContent = exports.CollapsibleTrigger = exports.Collapsible = exports.InputOTPSeparator = exports.InputOTPSlot = exports.InputOTPGroup = exports.InputOTP = exports.Logo = exports.Popover = exports.Slider = exports.Tabs = void 0;
|
|
4
|
+
exports.Checkbox = exports.toast = exports.Toaster = exports.ButtonWidget = exports.DigitKeyPad = exports.badgeVariants = exports.Badge = exports.farvoriteLinkClasses = exports.FarvoritePaymentDescription = exports.FavoritePaymentsItem = exports.FavoritePaymentsList = exports.MessageTyping = exports.AlertDialogCancel = exports.AlertDialogAction = exports.AlertDialogDescription = exports.AlertDialogTitle = exports.AlertDialogFooter = exports.AlertDialogHeader = exports.AlertDialogContent = exports.AlertDialogTrigger = exports.AlertDialog = exports.InputMask = exports.DatePicker = exports.Calendar = void 0;
|
|
5
5
|
const tslib_1 = require("tslib");
|
|
6
|
-
const Tooltip_1 = require("./Tooltip");
|
|
7
|
-
Object.defineProperty(exports, "Tooltip", { enumerable: true, get: function () { return Tooltip_1.Tooltip; } });
|
|
8
6
|
const Tabs_1 = require("./Tabs");
|
|
9
7
|
Object.defineProperty(exports, "Tabs", { enumerable: true, get: function () { return Tabs_1.Tabs; } });
|
|
10
8
|
const Slider_1 = require("./Slider");
|
|
@@ -111,6 +109,4 @@ Object.defineProperty(exports, "Toaster", { enumerable: true, get: function () {
|
|
|
111
109
|
Object.defineProperty(exports, "toast", { enumerable: true, get: function () { return Toaster_1.toast; } });
|
|
112
110
|
const Checkbox_1 = require("./Checkbox");
|
|
113
111
|
Object.defineProperty(exports, "Checkbox", { enumerable: true, get: function () { return Checkbox_1.Checkbox; } });
|
|
114
|
-
const Swipe2Show_1 = require("./Swipe2Show");
|
|
115
|
-
Object.defineProperty(exports, "Swipe2Show", { enumerable: true, get: function () { return Swipe2Show_1.Swipe2Show; } });
|
|
116
112
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;AAAA,iCAA6B;AAuD5B,qFAvDQ,WAAI,OAuDR;AAtDL,qCAAiC;AAuDhC,uFAvDQ,eAAM,OAuDR;AAtDP,uCAAmC;AAuDlC,wFAvDQ,iBAAO,OAuDR;AAtDR,+DAAyB;AAuDxB,eAvDM,cAAI,CAuDN;AAtDL,2CAAsF;AAuDrF,yFAvDQ,oBAAQ,OAuDR;AACR,8FAxDkB,yBAAa,OAwDlB;AACb,6FAzDiC,wBAAY,OAyDjC;AACZ,kGA1D+C,6BAAiB,OA0D/C;AAzDlB,yDAK2B;AAyE1B,iGA7EA,mCAAgB,OA6EA;AAChB,qGA7EA,uCAAoB,OA6EA;AACpB,yGA7EA,2CAAwB,OA6EA;AACxB,qGA7EA,uCAAoB,OA6EA;AA3ErB,0DAA8B;AAkE7B,oBAAI;AAjEL,+CAAmF;AAmDlF,4FAnDQ,yBAAW,OAmDR;AACX,mGApDqB,gCAAkB,OAoDrB;AAClB,mGArDyC,gCAAkB,OAqDzC;AApDnB,+CAMsB;AA+CrB,mGApDA,gCAAkB,OAoDA;AAClB,yGApDA,sCAAwB,OAoDA;AACxB,0GApDA,uCAAyB,OAoDA;AACzB,0GApDA,uCAAyB,OAoDA;AACzB,8GApDA,2CAA6B,OAoDA;AAlD9B,qCAA+D;AAmD9D,uFAnDQ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,OAsDR;AArDT,+CAUsB;AA8DrB,4FAvEA,yBAAW,OAuEA;AACX,mGAvEA,gCAAkB,OAuEA;AAClB,mGAvEA,gCAAkB,OAuEA;AAClB,kGAvEA,+BAAiB,OAuEA;AACjB,kGAvEA,+BAAiB,OAuEA;AACjB,iGAvEA,8BAAgB,OAuEA;AAChB,uGAvEA,oCAAsB,OAuEA;AACtB,kGAvEA,+BAAiB,OAuEA;AACjB,kGAvEA,+BAAiB,OAuEA;AArElB,iCAAsC;AAsErC,8FAtEQ,oBAAa,OAsER;AArEd,uDAAiI;AAsEhI,qGAtEQ,sCAAoB,OAsER;AACpB,qGAvE8B,sCAAoB,OAuE9B;AACpB,4GAxEoD,6CAA2B,OAwEpD;AAC3B,qGAzEiF,sCAAoB,OAyEjF;AAxErB,+CAA2C;AA2E1C,4FA3EQ,yBAAW,OA2ER;AA1EZ,mCAA8C;AAwE7C,sFAxEQ,aAAK,OAwER;AACL,8FAzEe,qBAAa,OAyEf;AAxEd,uCAA0C;AA2EzC,wFA3EQ,iBAAO,OA2ER;AACP,sFA5EiB,eAAK,OA4EjB;AA3EN,yCAAqC;AA4EpC,yFA5EQ,mBAAQ,OA4ER"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@modul/mbui",
|
|
3
|
-
"version": "0.0.23
|
|
3
|
+
"version": "0.0.23",
|
|
4
4
|
"packageManager": "yarn@3.5.1",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -41,12 +41,10 @@
|
|
|
41
41
|
"clsx": "^2.1.1",
|
|
42
42
|
"input-otp": "1.2.4",
|
|
43
43
|
"lodash": "4.17.5",
|
|
44
|
-
"react-datepicker": "4.16.0",
|
|
45
44
|
"react-day-picker": "^9.0.8",
|
|
46
45
|
"react-hook-form": "7.53.0",
|
|
47
46
|
"react-imask": "7.6.1",
|
|
48
47
|
"react-select": "5.8.0",
|
|
49
|
-
"react-swipeable": "7.0.1",
|
|
50
48
|
"sonner": "^1.5.0",
|
|
51
49
|
"tailwind-merge": "^2.3.0",
|
|
52
50
|
"tailwindcss": "^3.4.4",
|
package/src/Drawer/Drawer.tsx
CHANGED
|
@@ -15,15 +15,15 @@ const Drawer = ({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Root>)
|
|
|
15
15
|
|
|
16
16
|
Drawer.displayName = 'Drawer'
|
|
17
17
|
|
|
18
|
-
const DrawerTrigger
|
|
18
|
+
const DrawerTrigger = DrawerPrimitive.Trigger
|
|
19
19
|
|
|
20
|
-
const DrawerPortal
|
|
20
|
+
const DrawerPortal = DrawerPrimitive.Portal
|
|
21
21
|
|
|
22
|
-
const DrawerClose
|
|
22
|
+
const DrawerClose = DrawerPrimitive.Close
|
|
23
23
|
|
|
24
|
-
const DrawerOverlay
|
|
24
|
+
const DrawerOverlay = DrawerPrimitive.Overlay
|
|
25
25
|
|
|
26
|
-
const DrawerTitle
|
|
26
|
+
const DrawerTitle = React.forwardRef<
|
|
27
27
|
React.ElementRef<typeof DrawerPrimitive.Title>,
|
|
28
28
|
React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Title>
|
|
29
29
|
>(({ className, ...props }, ref) => (
|
|
@@ -36,7 +36,7 @@ const DrawerTitle: typeof DrawerPrimitive.Title = React.forwardRef<
|
|
|
36
36
|
|
|
37
37
|
DrawerTitle.displayName = DrawerPrimitive.Title.displayName
|
|
38
38
|
|
|
39
|
-
const DrawerContent
|
|
39
|
+
const DrawerContent = React.forwardRef<
|
|
40
40
|
React.ElementRef<typeof DrawerPrimitive.Content>,
|
|
41
41
|
React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Content>
|
|
42
42
|
>(({ className, children, ...props }, ref) => {
|
|
@@ -48,7 +48,7 @@ const DrawerContent: typeof DrawerPrimitive.Content = React.forwardRef<
|
|
|
48
48
|
<DrawerPrimitive.Content
|
|
49
49
|
ref={ref}
|
|
50
50
|
className={cn(
|
|
51
|
-
`z-50 fixed inset-x-0 flex flex-col bg-page shadow-
|
|
51
|
+
`z-50 fixed inset-x-0 flex flex-col bg-page shadow-[0_0_6px_6px_rgba(36,48,54,.08)] max-h-[calc(100dvh-var(--page-header-height))] container`,
|
|
52
52
|
direction === 'top' ? 'top-0 rounded-b-sm ' : 'bottom-0 rounded-t-sm',
|
|
53
53
|
className
|
|
54
54
|
)}
|
|
@@ -4,9 +4,9 @@ const farvoriteLinkClasses: string = `
|
|
|
4
4
|
block
|
|
5
5
|
px-[20px]
|
|
6
6
|
py-[8px]
|
|
7
|
-
hover:bg-
|
|
8
|
-
focus:bg-
|
|
9
|
-
active:bg-
|
|
7
|
+
hover:bg-btn-ghost-hover
|
|
8
|
+
focus:bg-btn-ghost-focus
|
|
9
|
+
active:bg-btn-ghost-active
|
|
10
10
|
`
|
|
11
11
|
|
|
12
12
|
const FavoritePaymentsList: FC<{children: React.ReactNode}> = ({children}) => {
|
package/src/Toaster/index.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Toaster, toast} from './Toaster'
|
|
1
|
+
export { Toaster, toast } from './Toaster'
|
|
@@ -182,24 +182,15 @@
|
|
|
182
182
|
|
|
183
183
|
/* DRAWER */
|
|
184
184
|
/* =========================================== */
|
|
185
|
-
--drawer-overlay-bg: rgba(
|
|
186
|
-
|
|
187
|
-
|
|
185
|
+
--drawer-overlay-bg: rgba(34, 39, 51, .5);
|
|
186
|
+
--drawer-shadow: 0 0 20px 44px rgba(36, 48, 54, 0.12);
|
|
187
|
+
|
|
188
188
|
|
|
189
|
-
/* DRAWER */
|
|
190
|
-
/* =========================================== */
|
|
191
|
-
--payments-list-item-hover: var(--cl-graphite-5);
|
|
192
|
-
--payments-list-item-focus: var(--cl-graphite-5);
|
|
193
|
-
--payments-list-item-active: var(--cl-graphite-7);
|
|
194
|
-
|
|
195
189
|
/* =========================================== */
|
|
196
190
|
/* DRAWER */
|
|
197
191
|
|
|
198
192
|
--page-header-height: 44px;
|
|
199
|
-
--page-container-width:
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
193
|
+
--page-container-width: 600px;
|
|
203
194
|
}
|
|
204
195
|
|
|
205
196
|
|
package/src/index.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Tooltip } from './Tooltip'
|
|
2
1
|
import { Tabs } from './Tabs'
|
|
3
2
|
import { Slider } from './Slider'
|
|
4
3
|
import { Popover } from './Popover'
|
|
@@ -52,10 +51,8 @@ import { DigitKeyPad } from "./DigitKeyPad"
|
|
|
52
51
|
import { Badge, badgeVariants } from './Badge'
|
|
53
52
|
import { Toaster, toast } from './Toaster'
|
|
54
53
|
import { Checkbox } from './Checkbox'
|
|
55
|
-
import { Swipe2Show } from './Swipe2Show'
|
|
56
54
|
|
|
57
55
|
export {
|
|
58
|
-
Tooltip,
|
|
59
56
|
Tabs,
|
|
60
57
|
Slider,
|
|
61
58
|
Popover,
|
|
@@ -130,5 +127,5 @@ export {
|
|
|
130
127
|
Toaster,
|
|
131
128
|
toast,
|
|
132
129
|
Checkbox,
|
|
133
|
-
|
|
130
|
+
|
|
134
131
|
}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Swipe2Show = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const react_1 = (0, tslib_1.__importStar)(require("react"));
|
|
6
|
-
const react_swipeable_1 = require("react-swipeable");
|
|
7
|
-
const Swipe2Show = ({ children, contentToShowRight }) => {
|
|
8
|
-
const wrapperRef = (0, react_1.useRef)(null);
|
|
9
|
-
const actionRef = (0, react_1.useRef)(null);
|
|
10
|
-
const [showRight, setShowRight] = (0, react_1.useState)(false);
|
|
11
|
-
const translateX = actionRef.current?.offsetWidth;
|
|
12
|
-
const handlers = (0, react_swipeable_1.useSwipeable)({
|
|
13
|
-
onSwipedLeft: () => setShowRight(true),
|
|
14
|
-
onSwipedRight: () => setShowRight(false),
|
|
15
|
-
swipeDuration: 500,
|
|
16
|
-
preventScrollOnSwipe: true,
|
|
17
|
-
trackMouse: true,
|
|
18
|
-
});
|
|
19
|
-
const checkClickOutside = (evt) => {
|
|
20
|
-
if (showRight && wrapperRef.current && !wrapperRef.current.contains(evt.target)) {
|
|
21
|
-
setShowRight(false);
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
(0, react_1.useEffect)(() => {
|
|
25
|
-
document.addEventListener("mousedown", checkClickOutside);
|
|
26
|
-
document.addEventListener("touchstart", checkClickOutside);
|
|
27
|
-
return () => {
|
|
28
|
-
document.removeEventListener("mousedown", checkClickOutside);
|
|
29
|
-
document.removeEventListener("touchstart", checkClickOutside);
|
|
30
|
-
};
|
|
31
|
-
});
|
|
32
|
-
return (react_1.default.createElement("div", { style: { position: "relative" }, ref: wrapperRef },
|
|
33
|
-
(0, react_1.cloneElement)(children, {
|
|
34
|
-
style: {
|
|
35
|
-
transform: showRight && `translateX(-${translateX}px)`,
|
|
36
|
-
transition: "transform .15s ease-in-out",
|
|
37
|
-
width: "100%",
|
|
38
|
-
zIndex: "1",
|
|
39
|
-
touchAction: 'pan-x',
|
|
40
|
-
},
|
|
41
|
-
...handlers,
|
|
42
|
-
}),
|
|
43
|
-
react_1.default.createElement("div", { ref: actionRef, style: {
|
|
44
|
-
position: "absolute",
|
|
45
|
-
top: ".5px",
|
|
46
|
-
right: "0",
|
|
47
|
-
bottom: ".5px",
|
|
48
|
-
opacity: `${showRight ? '1' : '0'}`,
|
|
49
|
-
transition: 'opacity .15s ease-in-out'
|
|
50
|
-
} }, contentToShowRight)));
|
|
51
|
-
};
|
|
52
|
-
exports.Swipe2Show = Swipe2Show;
|
|
53
|
-
//# sourceMappingURL=Swipe2Show.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Swipe2Show.js","sourceRoot":"","sources":["../../src/Swipe2Show/Swipe2Show.tsx"],"names":[],"mappings":";;;;AAAA,4DA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,OAAO,CACH,uCAAK,KAAK,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,EAAE,GAAG,EAAE,UAAU;QAChD,IAAA,oBAAY,EAAC,QAAmC,EAAE;YAC/C,KAAK,EAAE;gBACH,SAAS,EAAE,SAAS,IAAI,eAAe,UAAU,KAAK;gBACtD,UAAU,EAAE,4BAA4B;gBACxC,KAAK,EAAE,MAAM;gBACb,MAAM,EAAE,GAAG;gBAC1B,WAAW,EAAE,OAAO;aACR;YACD,GAAG,QAAQ;SACd,CAAC;QACF,uCACI,GAAG,EAAE,SAAS,EACd,KAAK,EAAE;gBACH,QAAQ,EAAE,UAAU;gBACpB,GAAG,EAAE,MAAM;gBACX,KAAK,EAAE,GAAG;gBACV,MAAM,EAAE,MAAM;gBAC7B,OAAO,EAAE,GAAG,SAAS,CAAC,CAAC,CAAC,GAAG,CAAA,CAAC,CAAC,GAAG,EAAE;gBAClC,UAAU,EAAE,0BAA0B;aAC1B,IAEA,kBAAkB,CACjB,CACJ,CACT,CAAA;AACL,CAAC,CAAA;AAEQ,gCAAU"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Swipe2Show } from './Swipe2Show';
|
package/dist/Swipe2Show/index.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Swipe2Show = void 0;
|
|
4
|
-
var Swipe2Show_1 = require("./Swipe2Show");
|
|
5
|
-
Object.defineProperty(exports, "Swipe2Show", { enumerable: true, get: function () { return Swipe2Show_1.Swipe2Show; } });
|
|
6
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Swipe2Show/index.ts"],"names":[],"mappings":";;;AAAA,2CAAyC;AAAhC,wGAAA,UAAU,OAAA"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
3
|
-
import { TooltipProps } from "@radix-ui/react-tooltip";
|
|
4
|
-
declare type TooltipComponents = {
|
|
5
|
-
Provider: typeof TooltipProvider;
|
|
6
|
-
Trigger: typeof TooltipTrigger;
|
|
7
|
-
Content: typeof TooltipContent;
|
|
8
|
-
};
|
|
9
|
-
declare const Tooltip: React.FC<TooltipProps> & TooltipComponents;
|
|
10
|
-
declare const TooltipProvider: React.FC<TooltipPrimitive.TooltipProviderProps>;
|
|
11
|
-
declare const TooltipTrigger: React.ForwardRefExoticComponent<TooltipPrimitive.TooltipTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
12
|
-
declare const TooltipContent: React.ForwardRefExoticComponent<Omit<TooltipPrimitive.TooltipContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
-
export default Tooltip;
|
package/dist/Tooltip/Tooltip.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
const react_1 = (0, tslib_1.__importDefault)(require("react"));
|
|
5
|
-
const utils_1 = require("../@/lib/utils");
|
|
6
|
-
const TooltipPrimitive = (0, tslib_1.__importStar)(require("@radix-ui/react-tooltip"));
|
|
7
|
-
//
|
|
8
|
-
const cssClass = `z-50 overflow-hidden
|
|
9
|
-
rounded-md border bg-popover px-3 py-1.5 text-sm
|
|
10
|
-
text-popover-foreground
|
|
11
|
-
shadow-md animate-in fade-in-0 zoom-in-95
|
|
12
|
-
data-[state=closed]:animate-out
|
|
13
|
-
data-[state=closed]:fade-out-0
|
|
14
|
-
data-[state=closed]:zoom-out-95
|
|
15
|
-
data-[side=bottom]:slide-in-from-top-2
|
|
16
|
-
data-[side=left]:slide-in-from-right-2
|
|
17
|
-
data-[side=right]:slide-in-from-left-2
|
|
18
|
-
data-[side=top]:slide-in-from-bottom-2`;
|
|
19
|
-
const Tooltip = ({ ...props }) => react_1.default.createElement(TooltipPrimitive.Root, { ...props });
|
|
20
|
-
const TooltipProvider = TooltipPrimitive.Provider;
|
|
21
|
-
const TooltipTrigger = TooltipPrimitive.Trigger;
|
|
22
|
-
const TooltipContent = react_1.default.forwardRef(({ className, sideOffset = 4, ...props }, ref) => (react_1.default.createElement(TooltipPrimitive.Content, { ref: ref, sideOffset: sideOffset, className: (0, utils_1.cn)(cssClass, className), ...props })));
|
|
23
|
-
Tooltip.Provider = TooltipProvider;
|
|
24
|
-
Tooltip.Trigger = TooltipTrigger;
|
|
25
|
-
Tooltip.Content = TooltipContent;
|
|
26
|
-
TooltipContent.displayName = "TooltipContent";
|
|
27
|
-
exports.default = Tooltip;
|
|
28
|
-
//# sourceMappingURL=Tooltip.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.js","sourceRoot":"","sources":["../../src/Tooltip/Tooltip.tsx"],"names":[],"mappings":";;;AAAA,+DAAyB;AACzB,0CAAmC;AACnC,uFAA2D;AAE3D,EAAE;AACF,MAAM,QAAQ,GAAG;;;;;;;;;;yCAUwB,CAAA;AAiBzC,MAAM,OAAO,GAA+C,CAAC,EAAC,GAAG,KAAK,EAAC,EAAE,EAAE,CAAC,8BAAC,gBAAgB,CAAC,IAAI,OAAK,KAAK,GAAG,CAAA;AAE/G,MAAM,eAAe,GAAG,gBAAgB,CAAC,QAAQ,CAAA;AAEjD,MAAM,cAAc,GAAG,gBAAgB,CAAC,OAAO,CAAA;AAE/C,MAAM,cAAc,GAAG,eAAK,CAAC,UAAU,CAGrC,CAAC,EAAE,SAAS,EAAE,UAAU,GAAG,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CACnD,8BAAC,gBAAgB,CAAC,OAAO,IACxB,GAAG,EAAE,GAAG,EACR,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,IAAA,UAAE,EAAC,QAAQ,EAAE,SAAS,CAAC,KAC9B,KAAK,GACR,CACF,CAAC,CAAA;AAEF,OAAO,CAAC,QAAQ,GAAG,eAAe,CAAA;AAClC,OAAO,CAAC,OAAO,GAAG,cAAc,CAAA;AAChC,OAAO,CAAC,OAAO,GAAG,cAAc,CAAA;AAChC,cAAc,CAAC,WAAW,GAAG,gBAAgB,CAAA;AAE7C,kBAAe,OAAO,CAAA"}
|
package/dist/Tooltip/index.d.ts
DELETED
package/dist/Tooltip/index.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Tooltip = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const Tooltip_1 = (0, tslib_1.__importDefault)(require("./Tooltip"));
|
|
6
|
-
exports.Tooltip = Tooltip_1.default;
|
|
7
|
-
exports.default = Tooltip_1.default;
|
|
8
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Tooltip/index.ts"],"names":[],"mappings":";;;;AAAA,qEAA+B;AAEtB,kBAFF,iBAAO,CAEE;AAEhB,kBAAe,iBAAO,CAAA"}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import React, { cloneElement, FC, useCallback, useEffect, useRef, useState } from "react"
|
|
2
|
-
import { useSwipeable } from "react-swipeable"
|
|
3
|
-
|
|
4
|
-
interface IProps extends React.PropsWithChildren {
|
|
5
|
-
contentToShowRight: React.ReactNode
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
const Swipe2Show: FC<IProps> = ({ children, contentToShowRight }) => {
|
|
9
|
-
const wrapperRef = useRef<HTMLDivElement>(null);
|
|
10
|
-
const actionRef = useRef<HTMLDivElement>(null)
|
|
11
|
-
const [showRight, setShowRight] = useState(false)
|
|
12
|
-
const translateX = actionRef.current?.offsetWidth
|
|
13
|
-
|
|
14
|
-
const handlers = useSwipeable({
|
|
15
|
-
onSwipedLeft: () => setShowRight(true),
|
|
16
|
-
onSwipedRight: () => setShowRight(false),
|
|
17
|
-
swipeDuration: 500,
|
|
18
|
-
preventScrollOnSwipe: true,
|
|
19
|
-
trackMouse: true,
|
|
20
|
-
})
|
|
21
|
-
|
|
22
|
-
const checkClickOutside = (evt) => {
|
|
23
|
-
if (showRight && wrapperRef.current && !wrapperRef.current.contains(evt.target)) {
|
|
24
|
-
setShowRight(false)
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
useEffect(() => {
|
|
29
|
-
document.addEventListener("mousedown", checkClickOutside)
|
|
30
|
-
document.addEventListener("touchstart", checkClickOutside)
|
|
31
|
-
|
|
32
|
-
return () => {
|
|
33
|
-
document.removeEventListener("mousedown", checkClickOutside)
|
|
34
|
-
document.removeEventListener("touchstart", checkClickOutside)
|
|
35
|
-
}
|
|
36
|
-
})
|
|
37
|
-
|
|
38
|
-
return (
|
|
39
|
-
<div style={{ position: "relative" }} ref={wrapperRef}>
|
|
40
|
-
{cloneElement(children as React.ReactElement<any>, {
|
|
41
|
-
style: {
|
|
42
|
-
transform: showRight && `translateX(-${translateX}px)`,
|
|
43
|
-
transition: "transform .15s ease-in-out",
|
|
44
|
-
width: "100%",
|
|
45
|
-
zIndex: "1",
|
|
46
|
-
touchAction: 'pan-x',
|
|
47
|
-
},
|
|
48
|
-
...handlers,
|
|
49
|
-
})}
|
|
50
|
-
<div
|
|
51
|
-
ref={actionRef}
|
|
52
|
-
style={{
|
|
53
|
-
position: "absolute",
|
|
54
|
-
top: ".5px",
|
|
55
|
-
right: "0",
|
|
56
|
-
bottom: ".5px",
|
|
57
|
-
opacity: `${showRight ? '1': '0'}`,
|
|
58
|
-
transition: 'opacity .15s ease-in-out'
|
|
59
|
-
}}
|
|
60
|
-
>
|
|
61
|
-
{contentToShowRight}
|
|
62
|
-
</div>
|
|
63
|
-
</div>
|
|
64
|
-
)
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
export { Swipe2Show }
|
package/src/Swipe2Show/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Swipe2Show } from './Swipe2Show'
|
package/src/Tooltip/Tooltip.tsx
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { cn } from '../@/lib/utils'
|
|
3
|
-
import * as TooltipPrimitive from '@radix-ui/react-tooltip'
|
|
4
|
-
import {TooltipProps} from "@radix-ui/react-tooltip";
|
|
5
|
-
//
|
|
6
|
-
const cssClass = `z-50 overflow-hidden
|
|
7
|
-
rounded-md border bg-popover px-3 py-1.5 text-sm
|
|
8
|
-
text-popover-foreground
|
|
9
|
-
shadow-md animate-in fade-in-0 zoom-in-95
|
|
10
|
-
data-[state=closed]:animate-out
|
|
11
|
-
data-[state=closed]:fade-out-0
|
|
12
|
-
data-[state=closed]:zoom-out-95
|
|
13
|
-
data-[side=bottom]:slide-in-from-top-2
|
|
14
|
-
data-[side=left]:slide-in-from-right-2
|
|
15
|
-
data-[side=right]:slide-in-from-left-2
|
|
16
|
-
data-[side=top]:slide-in-from-bottom-2`
|
|
17
|
-
// import './ant-tooltip.styl'
|
|
18
|
-
|
|
19
|
-
// "_error": mdStyle === "error",
|
|
20
|
-
// "_white": mdStyle === "white",
|
|
21
|
-
//
|
|
22
|
-
// "_sm": mdSize === "sm",
|
|
23
|
-
// "_md": mdSize === "md",
|
|
24
|
-
// "_lg": mdSize === "lg",
|
|
25
|
-
// "_xl": mdSize === "xl",
|
|
26
|
-
|
|
27
|
-
type TooltipComponents = {
|
|
28
|
-
Provider: typeof TooltipProvider,
|
|
29
|
-
Trigger: typeof TooltipTrigger,
|
|
30
|
-
Content: typeof TooltipContent,
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
const Tooltip: React.FC<TooltipProps> & TooltipComponents = ({...props}) => <TooltipPrimitive.Root {...props}/>
|
|
34
|
-
|
|
35
|
-
const TooltipProvider = TooltipPrimitive.Provider
|
|
36
|
-
|
|
37
|
-
const TooltipTrigger = TooltipPrimitive.Trigger
|
|
38
|
-
|
|
39
|
-
const TooltipContent = React.forwardRef<
|
|
40
|
-
React.ElementRef<typeof TooltipPrimitive.Content>,
|
|
41
|
-
React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>
|
|
42
|
-
>(({ className, sideOffset = 4, ...props }, ref) => (
|
|
43
|
-
<TooltipPrimitive.Content
|
|
44
|
-
ref={ref}
|
|
45
|
-
sideOffset={sideOffset}
|
|
46
|
-
className={cn(cssClass, className)}
|
|
47
|
-
{...props}
|
|
48
|
-
/>
|
|
49
|
-
))
|
|
50
|
-
|
|
51
|
-
Tooltip.Provider = TooltipProvider
|
|
52
|
-
Tooltip.Trigger = TooltipTrigger
|
|
53
|
-
Tooltip.Content = TooltipContent
|
|
54
|
-
TooltipContent.displayName = "TooltipContent"
|
|
55
|
-
|
|
56
|
-
export default Tooltip
|