@modul/mbui 0.0.23-beta-pv-53326-0777308a → 0.0.23-beta-pv-53369-5d26f1fe
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 +4 -6
- package/dist/Drawer/Drawer.js +1 -1
- package/dist/Drawer/Drawer.js.map +1 -1
- package/dist/FavoritePyments/FavoritePaymentsList.js +3 -3
- package/dist/Swipe2Show/Swipe2Show.d.ts +6 -0
- package/dist/Swipe2Show/Swipe2Show.js +53 -0
- package/dist/Swipe2Show/Swipe2Show.js.map +1 -0
- package/dist/Swipe2Show/index.d.ts +1 -0
- package/dist/Swipe2Show/index.js +6 -0
- package/dist/Swipe2Show/index.js.map +1 -0
- package/dist/Toaster/index.js.map +1 -1
- package/dist/Tooltip/Tooltip.d.ts +13 -0
- package/dist/Tooltip/Tooltip.js +28 -0
- package/dist/Tooltip/Tooltip.js.map +1 -0
- package/dist/Tooltip/index.d.ts +3 -0
- package/dist/Tooltip/index.js +8 -0
- package/dist/Tooltip/index.js.map +1 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/package.json +3 -1
- package/src/Drawer/Drawer.tsx +7 -7
- package/src/FavoritePyments/FavoritePaymentsList.tsx +3 -3
- package/src/Swipe2Show/Swipe2Show.tsx +67 -0
- package/src/Swipe2Show/index.ts +1 -0
- package/src/Toaster/index.ts +1 -1
- package/src/Tooltip/Tooltip.tsx +56 -0
- package/src/Tooltip/index.ts +5 -0
- package/src/assets/css/global.css +13 -4
- package/src/index.ts +4 -1
package/dist/Drawer/Drawer.d.ts
CHANGED
|
@@ -4,10 +4,8 @@ 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:
|
|
11
|
-
onAnimationEnd?: (open: boolean) => void;
|
|
12
|
-
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
declare const DrawerTrigger: typeof DrawerPrimitive.Trigger;
|
|
8
|
+
declare const DrawerClose: typeof DrawerPrimitive.Close;
|
|
9
|
+
declare const DrawerTitle: typeof DrawerPrimitive.Title;
|
|
10
|
+
declare const DrawerContent: typeof DrawerPrimitive.Content;
|
|
13
11
|
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-sm max-h-[94%] sm: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,0CAAm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B,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-[--payments-list-item-hover]
|
|
11
|
+
focus:bg-[--payments-list-item-focus]
|
|
12
|
+
active:bg-[--payments-list-item-active]
|
|
13
13
|
`;
|
|
14
14
|
exports.farvoriteLinkClasses = farvoriteLinkClasses;
|
|
15
15
|
const FavoritePaymentsList = ({ children }) => {
|
|
@@ -0,0 +1,53 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Swipe2Show.js","sourceRoot":"","sources":["../../src/Swipe2Show/Swipe2Show.tsx"],"names":[],"mappings":";;;;AAAA,4DAAyF;AACzF,qDAA8C;AAM9C,MAAM,UA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E,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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Swipe2Show } from './Swipe2Show';
|
|
@@ -0,0 +1,6 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Swipe2Show/index.ts"],"names":[],"mappings":";;;AAAA,2CAAyC;AAAhC,wGAAA,UAAU,OAAA"}
|
|
@@ -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,qCAAyC;AAAhC,kGAAA,OAAO,OAAA;AAAE,gGAAA,KAAK,OAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
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;
|
|
@@ -0,0 +1,28 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,8 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Tooltip } from './Tooltip';
|
|
1
2
|
import { Tabs } from './Tabs';
|
|
2
3
|
import { Slider } from './Slider';
|
|
3
4
|
import { Popover } from './Popover';
|
|
@@ -30,4 +31,5 @@ import { DigitKeyPad } from "./DigitKeyPad";
|
|
|
30
31
|
import { Badge, badgeVariants } from './Badge';
|
|
31
32
|
import { Toaster, toast } from './Toaster';
|
|
32
33
|
import { Checkbox } from './Checkbox';
|
|
33
|
-
|
|
34
|
+
import { Swipe2Show } from './Swipe2Show';
|
|
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, };
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
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;
|
|
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 = exports.Tooltip = void 0;
|
|
4
|
+
exports.Swipe2Show = 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 = exports.FormMessage = 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; } });
|
|
6
8
|
const Tabs_1 = require("./Tabs");
|
|
7
9
|
Object.defineProperty(exports, "Tabs", { enumerable: true, get: function () { return Tabs_1.Tabs; } });
|
|
8
10
|
const Slider_1 = require("./Slider");
|
|
@@ -109,4 +111,6 @@ Object.defineProperty(exports, "Toaster", { enumerable: true, get: function () {
|
|
|
109
111
|
Object.defineProperty(exports, "toast", { enumerable: true, get: function () { return Toaster_1.toast; } });
|
|
110
112
|
const Checkbox_1 = require("./Checkbox");
|
|
111
113
|
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; } });
|
|
112
116
|
//# 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,iCAA6B;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;AAAA,uCAAmC;AAyDlC,wFAzDQ,iBAAO,OAyDR;AAxDR,iCAA6B;AAyD5B,qFAzDQ,WAAI,OAyDR;AAxDL,qCAAiC;AAyDhC,uFAzDQ,eAAM,OAyDR;AAxDP,uCAAmC;AAyDlC,wFAzDQ,iBAAO,OAyDR;AAxDR,+DAAyB;AAyDxB,eAzDM,cAAI,CAyDN;AAxDL,2CAAsF;AAyDrF,yFAzDQ,oBAAQ,OAyDR;AACR,8FA1DkB,yBAAa,OA0DlB;AACb,6FA3DiC,wBAAY,OA2DjC;AACZ,kGA5D+C,6BAAiB,OA4D/C;AA3DlB,yDAK2B;AA2E1B,iGA/EA,mCAAgB,OA+EA;AAChB,qGA/EA,uCAAoB,OA+EA;AACpB,yGA/EA,2CAAwB,OA+EA;AACxB,qGA/EA,uCAAoB,OA+EA;AA7ErB,0DAA8B;AAoE7B,oBAAI;AAnEL,+CAAmF;AAqDlF,4FArDQ,yBAAW,OAqDR;AACX,mGAtDqB,gCAAkB,OAsDrB;AAClB,mGAvDyC,gCAAkB,OAuDzC;AAtDnB,+CAMs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
@@ -41,10 +41,12 @@
|
|
|
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",
|
|
44
45
|
"react-day-picker": "^9.0.8",
|
|
45
46
|
"react-hook-form": "7.53.0",
|
|
46
47
|
"react-imask": "7.6.1",
|
|
47
48
|
"react-select": "5.8.0",
|
|
49
|
+
"react-swipeable": "7.0.1",
|
|
48
50
|
"sonner": "^1.5.0",
|
|
49
51
|
"tailwind-merge": "^2.3.0",
|
|
50
52
|
"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 = DrawerPrimitive.Trigger
|
|
18
|
+
const DrawerTrigger: typeof DrawerPrimitive.Trigger = DrawerPrimitive.Trigger
|
|
19
19
|
|
|
20
|
-
const DrawerPortal = DrawerPrimitive.Portal
|
|
20
|
+
const DrawerPortal: typeof DrawerPrimitive.Portal = DrawerPrimitive.Portal
|
|
21
21
|
|
|
22
|
-
const DrawerClose = DrawerPrimitive.Close
|
|
22
|
+
const DrawerClose : typeof DrawerPrimitive.Close = DrawerPrimitive.Close
|
|
23
23
|
|
|
24
|
-
const DrawerOverlay = DrawerPrimitive.Overlay
|
|
24
|
+
const DrawerOverlay: typeof DrawerPrimitive.Overlay = DrawerPrimitive.Overlay
|
|
25
25
|
|
|
26
|
-
const DrawerTitle = React.forwardRef<
|
|
26
|
+
const DrawerTitle: typeof DrawerPrimitive.Title = 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 = React.forwardRef<
|
|
|
36
36
|
|
|
37
37
|
DrawerTitle.displayName = DrawerPrimitive.Title.displayName
|
|
38
38
|
|
|
39
|
-
const DrawerContent = React.forwardRef<
|
|
39
|
+
const DrawerContent: typeof DrawerPrimitive.Content = 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 = 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-sm max-h-[94%] sm: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-[--payments-list-item-hover]
|
|
8
|
+
focus:bg-[--payments-list-item-focus]
|
|
9
|
+
active:bg-[--payments-list-item-active]
|
|
10
10
|
`
|
|
11
11
|
|
|
12
12
|
const FavoritePaymentsList: FC<{children: React.ReactNode}> = ({children}) => {
|
|
@@ -0,0 +1,67 @@
|
|
|
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 }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Swipe2Show } from './Swipe2Show'
|
package/src/Toaster/index.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Toaster, toast
|
|
1
|
+
export { Toaster, toast} from './Toaster'
|
|
@@ -0,0 +1,56 @@
|
|
|
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
|
|
@@ -182,15 +182,24 @@
|
|
|
182
182
|
|
|
183
183
|
/* DRAWER */
|
|
184
184
|
/* =========================================== */
|
|
185
|
-
--drawer-overlay-bg: rgba(
|
|
186
|
-
|
|
187
|
-
|
|
185
|
+
--drawer-overlay-bg: rgba(0,0,0,.3);
|
|
186
|
+
/* =========================================== */
|
|
187
|
+
/* DRAWER */
|
|
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
|
+
|
|
189
195
|
/* =========================================== */
|
|
190
196
|
/* DRAWER */
|
|
191
197
|
|
|
192
198
|
--page-header-height: 44px;
|
|
193
|
-
--page-container-width:
|
|
199
|
+
--page-container-width: 375px;
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
|
|
194
203
|
}
|
|
195
204
|
|
|
196
205
|
|
package/src/index.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Tooltip } from './Tooltip'
|
|
1
2
|
import { Tabs } from './Tabs'
|
|
2
3
|
import { Slider } from './Slider'
|
|
3
4
|
import { Popover } from './Popover'
|
|
@@ -51,8 +52,10 @@ import { DigitKeyPad } from "./DigitKeyPad"
|
|
|
51
52
|
import { Badge, badgeVariants } from './Badge'
|
|
52
53
|
import { Toaster, toast } from './Toaster'
|
|
53
54
|
import { Checkbox } from './Checkbox'
|
|
55
|
+
import { Swipe2Show } from './Swipe2Show'
|
|
54
56
|
|
|
55
57
|
export {
|
|
58
|
+
Tooltip,
|
|
56
59
|
Tabs,
|
|
57
60
|
Slider,
|
|
58
61
|
Popover,
|
|
@@ -127,5 +130,5 @@ export {
|
|
|
127
130
|
Toaster,
|
|
128
131
|
toast,
|
|
129
132
|
Checkbox,
|
|
130
|
-
|
|
133
|
+
Swipe2Show,
|
|
131
134
|
}
|