linkedunion-design-kit 1.11.5 → 1.11.6-beta.1
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/index.d.ts +3 -0
- package/dist/index.js +3 -0
- package/dist/src/components/Button/Button/Button.d.ts +2 -1
- package/dist/src/components/Button/Button/Button.js +19 -7
- package/dist/src/components/Button/Button/Button.stories.d.ts +4 -2
- package/dist/src/components/Button/index.d.ts +1 -0
- package/dist/src/components/Button/index.js +3 -2
- package/dist/src/components/Dropdown/DropdownMenu/DropdownMenu.d.ts +6 -2
- package/dist/src/components/Dropdown/DropdownMenu/DropdownMenu.js +7 -6
- package/dist/src/components/Dropdown/DropdownMenu/DropdownMenu.stories.d.ts +8 -1
- package/dist/src/components/Dropdown/DropdownMenu/DropdownMenu.stories.js +48 -3
- package/dist/src/components/Dropdown/DropdownMenu/index.d.ts +5 -0
- package/dist/src/components/Dropdown/DropdownMenu/index.js +5 -0
- package/dist/src/components/Dropdown/select.js +3 -2
- package/dist/src/components/Modal/Modal.js +1 -1
- package/dist/src/components/Separator/Separator.stories.d.ts +15 -0
- package/dist/src/components/Separator/Separator.stories.js +79 -0
- package/dist/src/components/Separator/index.d.ts +1 -0
- package/dist/src/components/Separator/index.js +1 -0
- package/dist/src/components/Separator/separator.d.ts +4 -0
- package/dist/src/components/Separator/separator.js +32 -0
- package/dist/src/components/Sheet/index.d.ts +1 -0
- package/dist/src/components/Sheet/index.js +1 -0
- package/dist/src/components/Sheet/sheet.d.ts +25 -0
- package/dist/src/components/Sheet/sheet.js +76 -0
- package/dist/src/components/Sheet/sheet.stories.d.ts +4 -0
- package/dist/src/components/Sheet/sheet.stories.js +13 -0
- package/dist/src/utils/iconList.d.ts +1 -0
- package/dist/src/utils/iconList.js +1 -0
- package/dist/styles/global.css +100 -5
- package/package.json +2 -1
package/dist/index.d.ts
CHANGED
|
@@ -37,3 +37,6 @@ export { Dialog, DialogTrigger, DialogContent, DialogHeader, DialogTitle, Dialog
|
|
|
37
37
|
export { DatePicker } from "./src/components/DatePicker/DatePicker";
|
|
38
38
|
export { DateRangePicker } from "./src/components/DateRangePicker/DateRangePicker";
|
|
39
39
|
export { TimePicker } from "./src/components/TimePicker/TimePicker";
|
|
40
|
+
export * from "./src/components/Sheet";
|
|
41
|
+
export * from "./src/components/Separator";
|
|
42
|
+
export { SweetAlert, SweetAlertTrigger, SweetAlertContent, SweetAlertFooter, SweetAlertTitle, SweetAlertDescription, SweetAlertAction, SweetAlertCancel, SweetAlertIcon, } from "./src/components/SweetAlert/SweetAlert";
|
package/dist/index.js
CHANGED
|
@@ -36,3 +36,6 @@ export { Dialog, DialogTrigger, DialogContent, DialogHeader, DialogTitle, Dialog
|
|
|
36
36
|
export { DatePicker } from "./src/components/DatePicker/DatePicker";
|
|
37
37
|
export { DateRangePicker } from "./src/components/DateRangePicker/DateRangePicker";
|
|
38
38
|
export { TimePicker } from "./src/components/TimePicker/TimePicker";
|
|
39
|
+
export * from "./src/components/Sheet";
|
|
40
|
+
export * from "./src/components/Separator";
|
|
41
|
+
export { SweetAlert, SweetAlertTrigger, SweetAlertContent, SweetAlertFooter, SweetAlertTitle, SweetAlertDescription, SweetAlertAction, SweetAlertCancel, SweetAlertIcon, } from "./src/components/SweetAlert/SweetAlert";
|
|
@@ -15,7 +15,8 @@ export declare const variant: {
|
|
|
15
15
|
};
|
|
16
16
|
declare const buttonVariants: (props?: ({
|
|
17
17
|
color?: "blue" | "light-blue" | "green" | "light-green" | "yellow" | "light-yellow" | "red" | "light-red" | "indigo" | "light-indigo" | "gray" | "light-gray" | "disabled" | null | undefined;
|
|
18
|
-
size?: "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
18
|
+
size?: "sm" | "md" | "lg" | "xl" | "none" | null | undefined;
|
|
19
|
+
linkSize?: "sm" | "md" | "lg" | "none" | null | undefined;
|
|
19
20
|
shape?: "rounded-sm" | "rounded-full" | "rounded-none" | null | undefined;
|
|
20
21
|
variant?: "link" | "fill" | "outline" | "ghost" | null | undefined;
|
|
21
22
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
@@ -37,30 +37,39 @@ import LUIcon from "../../Icons/LUIcon";
|
|
|
37
37
|
import { buttonStyles } from "..";
|
|
38
38
|
export var variant = {
|
|
39
39
|
fill: "",
|
|
40
|
-
link: "lu-bg-transparent hover:lu-bg-transparent focus:lu-bg-transparent active:lu-bg-transparent !p-0 underline-offset-4 hover:underline border-none",
|
|
41
|
-
outline: "border lu-bg-transparent",
|
|
40
|
+
link: "lu-bg-transparent hover:lu-bg-transparent focus:lu-bg-transparent active:lu-bg-transparent !p-0 underline-offset-4 hover:underline border-none font-normal leading-normal",
|
|
41
|
+
outline: "lu-border lu-bg-transparent",
|
|
42
42
|
ghost: "lu-bg-transparent border-none",
|
|
43
43
|
};
|
|
44
|
-
var buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespace-nowrap
|
|
44
|
+
var buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none shrink-0 [&_svg]:shrink-0 outline-none aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive cursor-pointer", {
|
|
45
45
|
variants: {
|
|
46
46
|
color: buttonStyles.fillColor,
|
|
47
|
-
size: buttonStyles.size,
|
|
47
|
+
size: __assign(__assign({}, buttonStyles.size), { none: "" }),
|
|
48
|
+
linkSize: __assign(__assign({}, buttonStyles.linkSize), { none: "" }),
|
|
48
49
|
shape: buttonStyles.shape,
|
|
49
50
|
variant: variant,
|
|
50
51
|
},
|
|
51
52
|
defaultVariants: {
|
|
52
53
|
color: "blue",
|
|
53
54
|
size: "md",
|
|
55
|
+
linkSize: "none",
|
|
54
56
|
shape: "rounded-sm",
|
|
55
57
|
variant: "fill",
|
|
56
58
|
},
|
|
57
|
-
compoundVariants: __spreadArray(__spreadArray(__spreadArray([], Object.entries(buttonStyles.linkColor).map(function (_a) {
|
|
59
|
+
compoundVariants: __spreadArray(__spreadArray(__spreadArray(__spreadArray([], Object.entries(buttonStyles.linkColor).map(function (_a) {
|
|
58
60
|
var color = _a[0], className = _a[1];
|
|
59
61
|
return ({
|
|
60
62
|
color: color,
|
|
61
63
|
variant: "link",
|
|
62
64
|
class: className,
|
|
63
65
|
});
|
|
66
|
+
}), true), Object.entries(buttonStyles.linkSize).map(function (_a) {
|
|
67
|
+
var sizeKey = _a[0], className = _a[1];
|
|
68
|
+
return ({
|
|
69
|
+
linkSize: sizeKey,
|
|
70
|
+
variant: "link",
|
|
71
|
+
class: className,
|
|
72
|
+
});
|
|
64
73
|
}), true), Object.entries(buttonStyles.outlineColor).map(function (_a) {
|
|
65
74
|
var color = _a[0], className = _a[1];
|
|
66
75
|
return ({
|
|
@@ -78,7 +87,7 @@ var buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespa
|
|
|
78
87
|
}), true),
|
|
79
88
|
});
|
|
80
89
|
function Button(_a) {
|
|
81
|
-
var className = _a.className, _b = _a.color, color = _b === void 0 ? "blue" : _b,
|
|
90
|
+
var className = _a.className, _b = _a.color, color = _b === void 0 ? "blue" : _b, _c = _a.size, size = _c === void 0 ? "md" : _c, shape = _a.shape, _d = _a.variant, variant = _d === void 0 ? "fill" : _d, _e = _a.asChild, asChild = _e === void 0 ? false : _e, startIcon = _a.startIcon, endIcon = _a.endIcon, props = __rest(_a, ["className", "color", "size", "shape", "variant", "asChild", "startIcon", "endIcon"]);
|
|
82
91
|
var Comp = asChild ? Slot : "button";
|
|
83
92
|
// Map button size to appropriate icon sizes for start and end icons
|
|
84
93
|
var getIconSizes = function () {
|
|
@@ -98,6 +107,9 @@ function Button(_a) {
|
|
|
98
107
|
// Use the calculated sizes based on button size
|
|
99
108
|
var startIconSizeValue = iconSizes.startIcon;
|
|
100
109
|
var endIconSizeValue = iconSizes.endIcon;
|
|
101
|
-
|
|
110
|
+
var sizeProps = variant === "link"
|
|
111
|
+
? { linkSize: size === "xl" ? "lg" : size, size: "none" }
|
|
112
|
+
: { size: size !== null && size !== void 0 ? size : "md", linkSize: "none" };
|
|
113
|
+
return (_jsxs(Comp, __assign({ "data-slot": "button", "data-size": size, "data-variant": variant, "data-color": color, className: cn(buttonVariants(__assign(__assign({ variant: variant, color: color }, sizeProps), { shape: shape })), className) }, props, { children: [startIcon && (_jsx(LUIcon, { size: startIconSizeValue, "data-testid": "start-icon", icon: startIcon })), props.children, endIcon && (_jsx(LUIcon, { size: endIconSizeValue, "data-testid": "end-icon", icon: endIcon }))] })));
|
|
102
114
|
}
|
|
103
115
|
export { Button, buttonVariants };
|
|
@@ -391,9 +391,10 @@ declare const meta: {
|
|
|
391
391
|
onTransitionRunCapture?: import("react").TransitionEventHandler<HTMLButtonElement> | undefined;
|
|
392
392
|
onTransitionStart?: import("react").TransitionEventHandler<HTMLButtonElement> | undefined;
|
|
393
393
|
onTransitionStartCapture?: import("react").TransitionEventHandler<HTMLButtonElement> | undefined;
|
|
394
|
-
size?: "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
394
|
+
size?: "sm" | "md" | "lg" | "xl" | "none" | null | undefined;
|
|
395
395
|
variant?: "fill" | "link" | "outline" | "ghost" | undefined;
|
|
396
396
|
shape?: "rounded-sm" | "rounded-full" | "rounded-none" | null | undefined;
|
|
397
|
+
linkSize?: "sm" | "md" | "lg" | "none" | null | undefined;
|
|
397
398
|
asChild?: boolean | undefined;
|
|
398
399
|
startIcon?: keyof typeof import("../../../utils/iconList").iconList | undefined;
|
|
399
400
|
endIcon?: keyof typeof import("../../../utils/iconList").iconList | undefined;
|
|
@@ -691,9 +692,10 @@ declare const meta: {
|
|
|
691
692
|
onTransitionRunCapture?: import("react").TransitionEventHandler<HTMLButtonElement> | undefined;
|
|
692
693
|
onTransitionStart?: import("react").TransitionEventHandler<HTMLButtonElement> | undefined;
|
|
693
694
|
onTransitionStartCapture?: import("react").TransitionEventHandler<HTMLButtonElement> | undefined;
|
|
694
|
-
size?: "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
695
|
+
size?: "sm" | "md" | "lg" | "xl" | "none" | null | undefined;
|
|
695
696
|
variant?: "fill" | "link" | "outline" | "ghost" | undefined;
|
|
696
697
|
shape?: "rounded-sm" | "rounded-full" | "rounded-none" | null | undefined;
|
|
698
|
+
linkSize?: "sm" | "md" | "lg" | "none" | null | undefined;
|
|
697
699
|
asChild?: boolean | undefined;
|
|
698
700
|
startIcon?: keyof typeof import("../../../utils/iconList").iconList | undefined;
|
|
699
701
|
endIcon?: keyof typeof import("../../../utils/iconList").iconList | undefined;
|
|
@@ -43,8 +43,9 @@ export var buttonStyles = {
|
|
|
43
43
|
disabled: "text-gray-300 hover:no-underline",
|
|
44
44
|
},
|
|
45
45
|
linkSize: {
|
|
46
|
-
lg: "!text-
|
|
47
|
-
md: "!text-
|
|
46
|
+
lg: "!text-lg",
|
|
47
|
+
md: "!text-base",
|
|
48
|
+
sm: "!text-sm",
|
|
48
49
|
},
|
|
49
50
|
outlineColor: {
|
|
50
51
|
blue: "text-blue-600 hover:bg-blue-700 hover:text-blue-50 active:bg-blue-800 active:text-blue-50",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
3
|
-
import { checkBoxSize, dropdownMenuSize } from ".";
|
|
3
|
+
import { checkBoxSize, dropdownContentPosition, dropdownMenuSize } from ".";
|
|
4
4
|
declare const DropdownMenu: React.FC<DropdownMenuPrimitive.DropdownMenuProps>;
|
|
5
5
|
declare const DropdownMenuTrigger: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
6
6
|
declare const DropdownMenuGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -13,9 +13,13 @@ declare const DropdownMenuSubTrigger: React.ForwardRefExoticComponent<Omit<Dropd
|
|
|
13
13
|
declare const DropdownMenuSubContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
14
14
|
size?: keyof typeof dropdownMenuSize;
|
|
15
15
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
16
|
+
export type DropdownMenuContentProps = React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content> & {
|
|
17
|
+
size?: keyof typeof dropdownMenuSize;
|
|
18
|
+
align?: keyof typeof dropdownContentPosition;
|
|
19
|
+
};
|
|
16
20
|
declare const DropdownMenuContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
17
21
|
size?: keyof typeof dropdownMenuSize;
|
|
18
|
-
align?:
|
|
22
|
+
align?: keyof typeof dropdownContentPosition;
|
|
19
23
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
20
24
|
declare const DropdownMenuItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
21
25
|
inset?: boolean;
|
|
@@ -27,6 +27,7 @@ import { ChevronRight, Circle } from "lucide-react";
|
|
|
27
27
|
import { cn } from "../../../lib/utils";
|
|
28
28
|
import { checkBoxSize, dropdownMenuIconSize, dropDownMenuItemSize, dropdownMenuSize, } from ".";
|
|
29
29
|
import { Checkbox } from "../../../components/Checkbox/checkbox";
|
|
30
|
+
import { Reset_BS } from "../../../utils/constants";
|
|
30
31
|
// Provide size from Content to all items
|
|
31
32
|
var DropdownMenuSizeContext = React.createContext("md");
|
|
32
33
|
var DropdownMenu = DropdownMenuPrimitive.Root;
|
|
@@ -37,7 +38,7 @@ var DropdownMenuSub = DropdownMenuPrimitive.Sub;
|
|
|
37
38
|
var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
|
38
39
|
var DropdownMenuSubTrigger = React.forwardRef(function (_a, ref) {
|
|
39
40
|
var className = _a.className, inset = _a.inset, children = _a.children, props = __rest(_a, ["className", "inset", "children"]);
|
|
40
|
-
return (_jsxs(DropdownMenuPrimitive.SubTrigger, __assign({ ref: ref, className: cn("flex cursor-default select-none items-center gap-2 rounded-sm p-2 outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", inset && "pl-8", className) }, props, { children: [children, _jsx(ChevronRight, { className: "ml-auto" })] })));
|
|
41
|
+
return (_jsxs(DropdownMenuPrimitive.SubTrigger, __assign({ ref: ref, className: cn("flex cursor-default select-none items-center gap-2 rounded-sm !p-2 outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", inset && "pl-8", className) }, props, { children: [children, _jsx(ChevronRight, { className: "ml-auto" })] })));
|
|
41
42
|
});
|
|
42
43
|
DropdownMenuSubTrigger.displayName =
|
|
43
44
|
DropdownMenuPrimitive.SubTrigger.displayName;
|
|
@@ -52,7 +53,7 @@ DropdownMenuSubContent.displayName =
|
|
|
52
53
|
DropdownMenuPrimitive.SubContent.displayName;
|
|
53
54
|
var DropdownMenuContent = React.forwardRef(function (_a, ref) {
|
|
54
55
|
var className = _a.className, _b = _a.sideOffset, sideOffset = _b === void 0 ? 4 : _b, _c = _a.size, size = _c === void 0 ? "md" : _c, _d = _a.align, align = _d === void 0 ? "start" : _d, props = __rest(_a, ["className", "sideOffset", "size", "align"]);
|
|
55
|
-
return (_jsx(DropdownMenuPrimitive.Portal, { children: _jsx(DropdownMenuSizeContext.Provider, { value: size, children: _jsx(DropdownMenuPrimitive.Content, __assign({ ref: ref, sideOffset: sideOffset, align: align, className: cn("z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-sm bg-white p-2 text-gray-900 shadow-backdrop-shadow-lg", "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-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]", dropdownMenuSize[size], className) }, props)) }) }));
|
|
56
|
+
return (_jsx(DropdownMenuPrimitive.Portal, { children: _jsx(DropdownMenuSizeContext.Provider, { value: size, children: _jsx(DropdownMenuPrimitive.Content, __assign({ "data-reset": Reset_BS, ref: ref, sideOffset: sideOffset, align: align, className: cn("z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-sm bg-white !p-2 text-gray-900 shadow-backdrop-shadow-lg", "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-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]", dropdownMenuSize[size], className) }, props)) }) }));
|
|
56
57
|
});
|
|
57
58
|
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
58
59
|
var DropdownMenuItem = React.forwardRef(function (_a, ref) {
|
|
@@ -60,7 +61,7 @@ var DropdownMenuItem = React.forwardRef(function (_a, ref) {
|
|
|
60
61
|
var className = _a.className, inset = _a.inset, selected = _a.selected, size = _a.size, props = __rest(_a, ["className", "inset", "selected", "size"]);
|
|
61
62
|
var inheritedSize = React.useContext(DropdownMenuSizeContext);
|
|
62
63
|
var effectiveSize = (_b = size !== null && size !== void 0 ? size : inheritedSize) !== null && _b !== void 0 ? _b : "md";
|
|
63
|
-
return (_jsx(DropdownMenuPrimitive.Item, __assign({ ref: ref, className: cn("relative flex cursor-pointer select-none items-center gap-2 rounded-sm outline-none transition-colors text-gray-900 hover:bg-blue-50 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[disabled]:bg-gray-100 data-[disabled]:text-gray-300 [&>svg]:shrink-0", dropdownMenuIconSize[effectiveSize], dropdownMenuSize[effectiveSize], dropDownMenuItemSize[effectiveSize], inset && "pl-8", selected && "bg-blue-50 text-blue-600", // Apply styles for selected item
|
|
64
|
+
return (_jsx(DropdownMenuPrimitive.Item, __assign({ ref: ref, "data-reset": Reset_BS, className: cn("relative flex cursor-pointer select-none items-center gap-2 rounded-sm outline-none transition-colors text-gray-900 hover:bg-blue-50 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[disabled]:bg-gray-100 data-[disabled]:text-gray-300 [&>svg]:shrink-0", dropdownMenuIconSize[effectiveSize], dropdownMenuSize[effectiveSize], dropDownMenuItemSize[effectiveSize], inset && "pl-8", selected && "bg-blue-50 text-blue-600", // Apply styles for selected item
|
|
64
65
|
className) }, props)));
|
|
65
66
|
});
|
|
66
67
|
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
@@ -75,17 +76,17 @@ DropdownMenuCheckboxItem.displayName =
|
|
|
75
76
|
DropdownMenuPrimitive.CheckboxItem.displayName;
|
|
76
77
|
var DropdownMenuRadioItem = React.forwardRef(function (_a, ref) {
|
|
77
78
|
var className = _a.className, children = _a.children, props = __rest(_a, ["className", "children"]);
|
|
78
|
-
return (_jsxs(DropdownMenuPrimitive.RadioItem, __assign({ ref: ref, className: cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", className) }, props, { children: [_jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: _jsx(DropdownMenuPrimitive.ItemIndicator, { children: _jsx(Circle, { className: "h-2 w-2 fill-current" }) }) }), children] })));
|
|
79
|
+
return (_jsxs(DropdownMenuPrimitive.RadioItem, __assign({ ref: ref, className: cn("relative flex cursor-default select-none items-center rounded-sm !py-1.5 pl-8 !pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", className) }, props, { children: [_jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: _jsx(DropdownMenuPrimitive.ItemIndicator, { children: _jsx(Circle, { className: "h-2 w-2 fill-current" }) }) }), children] })));
|
|
79
80
|
});
|
|
80
81
|
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
|
81
82
|
var DropdownMenuLabel = React.forwardRef(function (_a, ref) {
|
|
82
83
|
var className = _a.className, inset = _a.inset, props = __rest(_a, ["className", "inset"]);
|
|
83
|
-
return (_jsx(DropdownMenuPrimitive.Label, __assign({ ref: ref, className: cn("px-2 py-1.5 text-sm font-semibold", inset && "pl-8", className) }, props)));
|
|
84
|
+
return (_jsx(DropdownMenuPrimitive.Label, __assign({ ref: ref, className: cn("!px-2 !py-1.5 text-sm font-semibold", inset && "pl-8", className) }, props)));
|
|
84
85
|
});
|
|
85
86
|
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
86
87
|
var DropdownMenuSeparator = React.forwardRef(function (_a, ref) {
|
|
87
88
|
var className = _a.className, props = __rest(_a, ["className"]);
|
|
88
|
-
return (_jsx(DropdownMenuPrimitive.Separator, __assign({ ref: ref, className: cn("-mx-1 my-1 h-px bg-muted", className) }, props)));
|
|
89
|
+
return (_jsx(DropdownMenuPrimitive.Separator, __assign({ ref: ref, className: cn("-mx-1 !my-1 h-px bg-muted", className) }, props)));
|
|
89
90
|
});
|
|
90
91
|
DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
|
|
91
92
|
var DropdownMenuShortcut = function (_a) {
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import { Meta } from "@storybook/react";
|
|
2
2
|
import { DropdownMenu } from "./DropdownMenu";
|
|
3
|
+
import type { DropdownMenuContentProps } from "./DropdownMenu";
|
|
4
|
+
type DropdownMenuStoryArgs = DropdownMenuContentProps & {
|
|
5
|
+
size?: keyof typeof dropdownMenuSize;
|
|
6
|
+
align?: "start" | "center" | "end";
|
|
7
|
+
};
|
|
8
|
+
import { dropdownMenuSize } from ".";
|
|
3
9
|
declare const _default: Meta<typeof DropdownMenu>;
|
|
4
10
|
export default _default;
|
|
5
|
-
export declare const Default: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer,
|
|
11
|
+
export declare const Default: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, DropdownMenuStoryArgs>;
|
|
6
12
|
export declare const Sizes: () => import("react/jsx-runtime").JSX.Element;
|
|
7
13
|
export declare const WithIcons: () => import("react/jsx-runtime").JSX.Element;
|
|
8
14
|
export declare const DisabledItems: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -23,3 +29,4 @@ export declare const DropdownMenuWithSelectAllAndSearch: () => import("react/jsx
|
|
|
23
29
|
export declare const WorkSpaceSwitcher: () => import("react/jsx-runtime").JSX.Element;
|
|
24
30
|
export declare const LanguageDropdownMenu: () => import("react/jsx-runtime").JSX.Element;
|
|
25
31
|
export declare const Alignments: () => import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
export declare const MasterDropdownMenu: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -9,6 +9,17 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
12
23
|
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
13
24
|
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
14
25
|
if (ar || !(i in from)) {
|
|
@@ -23,7 +34,7 @@ import { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuIte
|
|
|
23
34
|
import { Button } from "../../../components/Button/Button/Button";
|
|
24
35
|
import LUIcon from "../../../components/Icons/LUIcon";
|
|
25
36
|
import { useState } from "react";
|
|
26
|
-
import { dropdownMenuSize } from ".";
|
|
37
|
+
import { dropdownContentPosition, dropdownMenuSize } from ".";
|
|
27
38
|
import { IconButton } from "../../../components/Button/IconButton/IconButton";
|
|
28
39
|
import { Checkbox } from "../../../components/Checkbox/checkbox";
|
|
29
40
|
import { Label } from "../../../components/Label/Label";
|
|
@@ -31,6 +42,7 @@ import { Caption } from "../../../components/Typography/Caption/caption";
|
|
|
31
42
|
import { Input } from "../../../components/Input";
|
|
32
43
|
import { SelectAllSection } from "./SelectAllSection";
|
|
33
44
|
import { Avatar, AvatarFallback, AvatarImage, } from "../../../components/Avatar/Avatar/Avatar";
|
|
45
|
+
import { Badge } from "../../../components/Badge/Badge";
|
|
34
46
|
export default {
|
|
35
47
|
title: "Components/Dropdown/DropdownMenu",
|
|
36
48
|
component: DropdownMenu,
|
|
@@ -55,7 +67,7 @@ export default {
|
|
|
55
67
|
},
|
|
56
68
|
align: {
|
|
57
69
|
control: { type: "select" },
|
|
58
|
-
options:
|
|
70
|
+
options: Object.keys(dropdownContentPosition),
|
|
59
71
|
description: "Alignment of the dropdown menu",
|
|
60
72
|
table: {
|
|
61
73
|
type: { summary: "string" },
|
|
@@ -70,7 +82,8 @@ var Template = function (args) {
|
|
|
70
82
|
{ label: "Option 2" },
|
|
71
83
|
{ label: "Option 3" },
|
|
72
84
|
];
|
|
73
|
-
|
|
85
|
+
var size = args.size, align = args.align, rest = __rest(args, ["size", "align"]);
|
|
86
|
+
return (_jsxs(DropdownMenu, __assign({}, rest, { children: [_jsx(DropdownMenuTrigger, { children: _jsx(Button, { children: "Open Menu" }) }), _jsx(DropdownMenuContent, { size: size, align: align, children: menuItems.map(function (item, index) { return (_jsx(DropdownMenuItem, { onSelect: function () { return alert("".concat(item.label, " selected")); }, children: item.label }, index)); }) })] })));
|
|
74
87
|
};
|
|
75
88
|
export var Default = Template.bind({});
|
|
76
89
|
export var Sizes = function () {
|
|
@@ -251,3 +264,35 @@ export var LanguageDropdownMenu = function () {
|
|
|
251
264
|
export var Alignments = function () {
|
|
252
265
|
return (_jsxs("div", { className: "flex flex-row space-x-4", children: [_jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { children: _jsx(Button, { children: "Align Start" }) }), _jsxs(DropdownMenuContent, { align: "start", children: [_jsx(DropdownMenuItem, { children: "Option 1" }), _jsx(DropdownMenuItem, { children: "Option 2" }), _jsx(DropdownMenuItem, { children: "Option 3" })] })] }), _jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { children: _jsx(Button, { children: "Align Center" }) }), _jsxs(DropdownMenuContent, { align: "center", children: [_jsx(DropdownMenuItem, { children: "Option 1" }), _jsx(DropdownMenuItem, { children: "Option 2" }), _jsx(DropdownMenuItem, { children: "Option 3" })] })] }), _jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { children: _jsx(Button, { children: "Align End" }) }), _jsxs(DropdownMenuContent, { align: "end", children: [_jsx(DropdownMenuItem, { children: "Option 1" }), _jsx(DropdownMenuItem, { children: "Option 2" }), _jsx(DropdownMenuItem, { children: "Option 3" })] })] })] }));
|
|
253
266
|
};
|
|
267
|
+
export var MasterDropdownMenu = function () {
|
|
268
|
+
var menuItems = [
|
|
269
|
+
{ type: "item", label: "Text Label 1" },
|
|
270
|
+
{ type: "item", label: "Text Label 2" },
|
|
271
|
+
{ type: "submenu", label: "Text Label 3", subItems: ["Submenu Item 1", "Submenu Item 2", "Submenu Item 3"] },
|
|
272
|
+
{ type: "submenu", label: "Text Label 4", subItems: ["Submenu Item 1", "Submenu Item 2", "Submenu Item 3"] },
|
|
273
|
+
{ type: "item", label: "Text Label 5" },
|
|
274
|
+
{ type: "badge", label: "Text Label 6", badge: "09" },
|
|
275
|
+
{ type: "avatar", label: "Text Label 7" },
|
|
276
|
+
{ type: "item", label: "Text Label 8" },
|
|
277
|
+
// Second column starts after 8 items
|
|
278
|
+
{ type: "item", label: "Text Label 9" },
|
|
279
|
+
{ type: "submenu", label: "Text Label 10", subItems: ["Submenu Item 1", "Submenu Item 2", "Submenu Item 3"] },
|
|
280
|
+
{ type: "item", label: "Text Label 11" },
|
|
281
|
+
{ type: "badge", label: "Text Label 12", badge: "09" },
|
|
282
|
+
{ type: "avatar", label: "Text Label 13" },
|
|
283
|
+
];
|
|
284
|
+
var renderMenuItem = function (item, index) {
|
|
285
|
+
var _a;
|
|
286
|
+
switch (item.type) {
|
|
287
|
+
case "submenu":
|
|
288
|
+
return (_jsxs(DropdownMenuSub, { children: [_jsx(DropdownMenuSubTrigger, { children: item.label }), _jsx(DropdownMenuSubContent, { children: (_a = item.subItems) === null || _a === void 0 ? void 0 : _a.map(function (subItem, subIndex) { return (_jsx(DropdownMenuItem, { children: subItem }, subIndex)); }) })] }, index));
|
|
289
|
+
case "badge":
|
|
290
|
+
return (_jsx(DropdownMenuItem, { onSelect: function () { return alert("".concat(item.label, " selected")); }, children: _jsxs("div", { className: "flex items-center justify-between w-full", children: [item.label, _jsx(Badge, { color: "light-blue", children: item.badge })] }) }, index));
|
|
291
|
+
case "avatar":
|
|
292
|
+
return (_jsx(DropdownMenuItem, { onSelect: function () { return alert("".concat(item.label, " selected")); }, children: _jsxs("div", { className: "flex items-center gap-2", children: [_jsxs(Avatar, { children: [_jsx(AvatarImage, { alt: "Avatar", src: "/images/avatar.png" }), _jsx(AvatarFallback, { children: "AB" })] }), item.label] }) }, index));
|
|
293
|
+
default:
|
|
294
|
+
return (_jsx(DropdownMenuItem, { onSelect: function () { return alert("".concat(item.label, " selected")); }, children: item.label }, index));
|
|
295
|
+
}
|
|
296
|
+
};
|
|
297
|
+
return (_jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsx(Button, { shape: "rounded-full", children: "Text Label" }) }), _jsx(DropdownMenuContent, { className: "w-auto", size: "lg", children: _jsxs("div", { className: "grid gap-0 ".concat(menuItems.length > 8 ? 'grid-cols-1 md:grid-cols-2' : 'grid-cols-1'), children: [_jsxs("div", { className: "flex flex-col", children: [_jsx(DropdownMenuLabel, { className: "mb-1", children: "Group Heading" }), menuItems.slice(0, 8).map(function (item, index) { return renderMenuItem(item, index); })] }), menuItems.length > 8 && (_jsxs("div", { className: "flex flex-col md:pl-2", children: [_jsx(DropdownMenuLabel, { className: "mb-1", children: "Group Heading" }), menuItems.slice(8).map(function (item, index) { return renderMenuItem(item, index + 8); })] }))] }) })] }));
|
|
298
|
+
};
|
|
@@ -25,6 +25,7 @@ import * as SelectPrimitive from "@radix-ui/react-select";
|
|
|
25
25
|
import { cn } from "../../lib/utils";
|
|
26
26
|
import { selectSize, selectShape, selectType, selectColor, itemSize, } from ".";
|
|
27
27
|
import LUIcon from "../Icons/LUIcon";
|
|
28
|
+
import { Reset_BS } from "../../utils/constants";
|
|
28
29
|
// Map select size to icon size
|
|
29
30
|
var iconSizeMap = {
|
|
30
31
|
lg: "md",
|
|
@@ -53,7 +54,7 @@ function SelectTrigger(_a) {
|
|
|
53
54
|
var colorClass = isDisabled
|
|
54
55
|
? selectColor[variant]["disabled"]
|
|
55
56
|
: selectColor[variant][color];
|
|
56
|
-
return (_jsxs(SelectPrimitive.Trigger, __assign({ "data-
|
|
57
|
+
return (_jsxs(SelectPrimitive.Trigger, __assign({ "data-reset": Reset_BS, "data-size": size, "data-shape": shape, "data-type": variant, "data-color": isDisabled ? "disabled" : color, className: cn("data-[placeholder]:text-gray-400 w-full !px-4 !py-3 [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-blue-200 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex items-center justify-between gap-2 !border border-gray-200 whitespace-nowrap !shadow-xs transition-[color,box-shadow] outline-none disabled:cursor-not-allowed disabled:opacity-50 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", typeClass, shapeClass, selectSize[size], colorClass, className), disabled: isDisabled }, props, { children: [children, _jsx(SelectPrimitive.Icon, { asChild: true, children: _jsx(LUIcon, { icon: "angle-down", size: iconSize, color: "light-gray" }) })] })));
|
|
57
58
|
}
|
|
58
59
|
function SelectContent(_a) {
|
|
59
60
|
var className = _a.className, children = _a.children, _b = _a.position, position = _b === void 0 ? "popper" : _b, _c = _a.hidePortal, hidePortal = _c === void 0 ? false : _c, props = __rest(_a, ["className", "children", "position", "hidePortal"]);
|
|
@@ -68,7 +69,7 @@ function SelectLabel(_a) {
|
|
|
68
69
|
}
|
|
69
70
|
function SelectItem(_a) {
|
|
70
71
|
var className = _a.className, children = _a.children, _b = _a.size, size = _b === void 0 ? "md" : _b, props = __rest(_a, ["className", "children", "size"]);
|
|
71
|
-
return (_jsx(SelectPrimitive.Item, __assign({ "data-
|
|
72
|
+
return (_jsx(SelectPrimitive.Item, __assign({ "data-reset": "reset-bs-link", className: cn("text-gray-900 data-[disabled]:bg-gray-100 data-[disabled]:text-gray-300 [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 !rounded-sm py-1.5 pr-8 pl-2 outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2 data-[state=checked]:bg-gray-50 hover:bg-gray-50", itemSize[size], className) }, props, { children: _jsx(SelectPrimitive.ItemText, { children: children }) })));
|
|
72
73
|
}
|
|
73
74
|
function SelectSeparator(_a) {
|
|
74
75
|
var className = _a.className, props = __rest(_a, ["className"]);
|
|
@@ -52,7 +52,7 @@ var DialogHeader = function (_a) {
|
|
|
52
52
|
DialogHeader.displayName = "DialogHeader";
|
|
53
53
|
var DialogBody = function (_a) {
|
|
54
54
|
var className = _a.className, props = __rest(_a, ["className"]);
|
|
55
|
-
return (_jsx("div", __assign({ className: cn("py-4 px-4", className) }, props)));
|
|
55
|
+
return (_jsx("div", __assign({ className: cn("!py-4 !px-4", className) }, props)));
|
|
56
56
|
};
|
|
57
57
|
DialogBody.displayName = "DialogBody";
|
|
58
58
|
var DialogFooter = function (_a) {
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { Separator } from "../../components/Separator/separator";
|
|
3
|
+
declare const meta: Meta<typeof Separator>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Separator>;
|
|
6
|
+
export declare function SeparatorDemo({ orientation, decorative, className, }: {
|
|
7
|
+
orientation?: "horizontal" | "vertical";
|
|
8
|
+
decorative?: boolean;
|
|
9
|
+
className?: string;
|
|
10
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare const Horizontal: Story;
|
|
12
|
+
export declare const Vertical: Story;
|
|
13
|
+
export declare const Demo: Story;
|
|
14
|
+
export declare const DecorativeTrue: Story;
|
|
15
|
+
export declare const DecorativeFalse: Story;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import { Separator } from "../../components/Separator/separator";
|
|
14
|
+
var meta = {
|
|
15
|
+
title: "UI/Separator",
|
|
16
|
+
component: Separator,
|
|
17
|
+
tags: ["autodocs"],
|
|
18
|
+
argTypes: {
|
|
19
|
+
orientation: {
|
|
20
|
+
control: { type: "radio" },
|
|
21
|
+
options: ["horizontal", "vertical"],
|
|
22
|
+
description: "Separator orientation",
|
|
23
|
+
table: { type: { summary: '"horizontal" | "vertical"' } },
|
|
24
|
+
},
|
|
25
|
+
decorative: {
|
|
26
|
+
control: { type: "boolean" },
|
|
27
|
+
description: "Accessibility: purely visual separator",
|
|
28
|
+
table: { type: { summary: "boolean" } },
|
|
29
|
+
},
|
|
30
|
+
className: {
|
|
31
|
+
control: { type: "text" },
|
|
32
|
+
description: "Custom CSS classes",
|
|
33
|
+
table: { type: { summary: "string" } },
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
export default meta;
|
|
38
|
+
export function SeparatorDemo(_a) {
|
|
39
|
+
var _b = _a.orientation, orientation = _b === void 0 ? "horizontal" : _b, _c = _a.decorative, decorative = _c === void 0 ? true : _c, _d = _a.className, className = _d === void 0 ? "my-4" : _d;
|
|
40
|
+
return (_jsxs("div", { children: [_jsxs("div", { className: "space-y-1", children: [_jsx("h4", { className: "text-sm leading-none font-medium", children: "Radix Primitives" }), _jsx("p", { className: "text-muted-foreground text-sm", children: "An open-source UI component library." })] }), _jsx("div", { className: "h-20 flex items-center", children: _jsx(Separator, { className: className, orientation: orientation, decorative: decorative }) }), _jsxs("div", { className: "flex h-5 items-center space-x-4 text-sm", children: [_jsx("div", { children: "Blog" }), _jsx(Separator, { orientation: "vertical", decorative: decorative, className: className }), _jsx("div", { children: "Docs" }), _jsx(Separator, { orientation: "vertical", decorative: decorative, className: className }), _jsx("div", { children: "Source" })] })] }));
|
|
41
|
+
}
|
|
42
|
+
export var Horizontal = {
|
|
43
|
+
args: {
|
|
44
|
+
orientation: "horizontal",
|
|
45
|
+
decorative: true,
|
|
46
|
+
className: "my-4",
|
|
47
|
+
},
|
|
48
|
+
render: function (args) { return (_jsx("div", { style: { width: 300 }, children: _jsx(Separator, __assign({}, args)) })); },
|
|
49
|
+
};
|
|
50
|
+
export var Vertical = {
|
|
51
|
+
args: {
|
|
52
|
+
orientation: "vertical",
|
|
53
|
+
decorative: true,
|
|
54
|
+
className: "mx-4 h-20",
|
|
55
|
+
},
|
|
56
|
+
render: function (args) { return _jsx(Separator, __assign({}, args)); },
|
|
57
|
+
};
|
|
58
|
+
export var Demo = {
|
|
59
|
+
args: {
|
|
60
|
+
orientation: "horizontal",
|
|
61
|
+
decorative: true,
|
|
62
|
+
className: "my-4",
|
|
63
|
+
},
|
|
64
|
+
render: function (args) { return _jsx(SeparatorDemo, __assign({}, args)); },
|
|
65
|
+
};
|
|
66
|
+
export var DecorativeTrue = {
|
|
67
|
+
args: {
|
|
68
|
+
decorative: true,
|
|
69
|
+
className: "my-4",
|
|
70
|
+
},
|
|
71
|
+
render: function (args) { return (_jsxs("div", { children: [_jsx("p", { children: "Above separator " }), _jsx(Separator, __assign({}, args)), _jsx("p", { children: "Below separator" })] })); },
|
|
72
|
+
};
|
|
73
|
+
export var DecorativeFalse = {
|
|
74
|
+
args: {
|
|
75
|
+
decorative: false,
|
|
76
|
+
className: "my-4",
|
|
77
|
+
},
|
|
78
|
+
render: function (args) { return (_jsxs("div", { children: [_jsx("p", { children: "Above separator (decorative=false)" }), _jsx(Separator, __assign({}, args)), _jsx("p", { children: "Below separator" })] })); },
|
|
79
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Separator } from "./separator";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Separator } from "./separator";
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
3
|
+
declare const Separator: React.ForwardRefExoticComponent<Omit<SeparatorPrimitive.SeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
4
|
+
export { Separator };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
|
+
import * as React from "react";
|
|
25
|
+
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
26
|
+
import { cn } from "../../lib/utils";
|
|
27
|
+
var Separator = React.forwardRef(function (_a, ref) {
|
|
28
|
+
var className = _a.className, _b = _a.orientation, orientation = _b === void 0 ? "horizontal" : _b, _c = _a.decorative, decorative = _c === void 0 ? true : _c, props = __rest(_a, ["className", "orientation", "decorative"]);
|
|
29
|
+
return (_jsx(SeparatorPrimitive.Root, __assign({ ref: ref, decorative: decorative, orientation: orientation, className: cn("shrink-0 bg-border", orientation === "horizontal" ? "h-px w-full" : "h-full w-px", className) }, props)));
|
|
30
|
+
});
|
|
31
|
+
Separator.displayName = SeparatorPrimitive.Root.displayName;
|
|
32
|
+
export { Separator };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Sheet, SheetPortal, SheetOverlay, SheetTrigger, SheetClose, SheetContent, SheetHeader, SheetFooter, SheetTitle, SheetDescription, } from "./sheet";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Sheet, SheetPortal, SheetOverlay, SheetTrigger, SheetClose, SheetContent, SheetHeader, SheetFooter, SheetTitle, SheetDescription, } from "./sheet";
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as SheetPrimitive from "@radix-ui/react-dialog";
|
|
3
|
+
import { type VariantProps } from "class-variance-authority";
|
|
4
|
+
declare const Sheet: React.FC<SheetPrimitive.DialogProps>;
|
|
5
|
+
declare const SheetTrigger: React.ForwardRefExoticComponent<SheetPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
6
|
+
declare const SheetClose: React.ForwardRefExoticComponent<SheetPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
7
|
+
declare const SheetPortal: React.FC<SheetPrimitive.DialogPortalProps>;
|
|
8
|
+
declare const SheetOverlay: React.ForwardRefExoticComponent<Omit<SheetPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
declare const sheetVariants: (props?: ({
|
|
10
|
+
side?: "top" | "bottom" | "left" | "right" | null | undefined;
|
|
11
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
12
|
+
interface SheetContentProps extends React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content>, VariantProps<typeof sheetVariants> {
|
|
13
|
+
}
|
|
14
|
+
declare const SheetContent: React.ForwardRefExoticComponent<SheetContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
15
|
+
declare const SheetHeader: {
|
|
16
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
displayName: string;
|
|
18
|
+
};
|
|
19
|
+
declare const SheetFooter: {
|
|
20
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
displayName: string;
|
|
22
|
+
};
|
|
23
|
+
declare const SheetTitle: React.ForwardRefExoticComponent<Omit<SheetPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
24
|
+
declare const SheetDescription: React.ForwardRefExoticComponent<Omit<SheetPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
25
|
+
export { Sheet, SheetPortal, SheetOverlay, SheetTrigger, SheetClose, SheetContent, SheetHeader, SheetFooter, SheetTitle, SheetDescription, };
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
|
+
import * as React from "react";
|
|
25
|
+
import * as SheetPrimitive from "@radix-ui/react-dialog";
|
|
26
|
+
import { cva } from "class-variance-authority";
|
|
27
|
+
import { X } from "lucide-react";
|
|
28
|
+
import { cn } from "../../lib/utils";
|
|
29
|
+
var Sheet = SheetPrimitive.Root;
|
|
30
|
+
var SheetTrigger = SheetPrimitive.Trigger;
|
|
31
|
+
var SheetClose = SheetPrimitive.Close;
|
|
32
|
+
var SheetPortal = SheetPrimitive.Portal;
|
|
33
|
+
var SheetOverlay = React.forwardRef(function (_a, ref) {
|
|
34
|
+
var className = _a.className, props = __rest(_a, ["className"]);
|
|
35
|
+
return (_jsx(SheetPrimitive.Overlay, __assign({ className: 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 })));
|
|
36
|
+
});
|
|
37
|
+
SheetOverlay.displayName = SheetPrimitive.Overlay.displayName;
|
|
38
|
+
var sheetVariants = cva("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out", {
|
|
39
|
+
variants: {
|
|
40
|
+
side: {
|
|
41
|
+
top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
|
|
42
|
+
bottom: "inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
|
|
43
|
+
left: "inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",
|
|
44
|
+
right: "inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm",
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
defaultVariants: {
|
|
48
|
+
side: "right",
|
|
49
|
+
},
|
|
50
|
+
});
|
|
51
|
+
var SheetContent = React.forwardRef(function (_a, ref) {
|
|
52
|
+
var _b = _a.side, side = _b === void 0 ? "right" : _b, className = _a.className, children = _a.children, props = __rest(_a, ["side", "className", "children"]);
|
|
53
|
+
return (_jsxs(SheetPortal, { children: [_jsx(SheetOverlay, {}), _jsxs(SheetPrimitive.Content, __assign({ ref: ref, className: cn(sheetVariants({ side: side }), className) }, props, { children: [_jsxs(SheetPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary", children: [_jsx(X, { className: "h-4 w-4" }), _jsx("span", { className: "sr-only", children: "Close" })] }), children] }))] }));
|
|
54
|
+
});
|
|
55
|
+
SheetContent.displayName = SheetPrimitive.Content.displayName;
|
|
56
|
+
var SheetHeader = function (_a) {
|
|
57
|
+
var className = _a.className, props = __rest(_a, ["className"]);
|
|
58
|
+
return (_jsx("div", __assign({ className: cn("flex flex-col space-y-2 text-center sm:text-left", className) }, props)));
|
|
59
|
+
};
|
|
60
|
+
SheetHeader.displayName = "SheetHeader";
|
|
61
|
+
var SheetFooter = function (_a) {
|
|
62
|
+
var className = _a.className, props = __rest(_a, ["className"]);
|
|
63
|
+
return (_jsx("div", __assign({ className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className) }, props)));
|
|
64
|
+
};
|
|
65
|
+
SheetFooter.displayName = "SheetFooter";
|
|
66
|
+
var SheetTitle = React.forwardRef(function (_a, ref) {
|
|
67
|
+
var className = _a.className, props = __rest(_a, ["className"]);
|
|
68
|
+
return (_jsx(SheetPrimitive.Title, __assign({ ref: ref, className: cn("text-lg font-semibold text-foreground", className) }, props)));
|
|
69
|
+
});
|
|
70
|
+
SheetTitle.displayName = SheetPrimitive.Title.displayName;
|
|
71
|
+
var SheetDescription = React.forwardRef(function (_a, ref) {
|
|
72
|
+
var className = _a.className, props = __rest(_a, ["className"]);
|
|
73
|
+
return (_jsx(SheetPrimitive.Description, __assign({ ref: ref, className: cn("text-sm text-muted-foreground", className) }, props)));
|
|
74
|
+
});
|
|
75
|
+
SheetDescription.displayName = SheetPrimitive.Description.displayName;
|
|
76
|
+
export { Sheet, SheetPortal, SheetOverlay, SheetTrigger, SheetClose, SheetContent, SheetHeader, SheetFooter, SheetTitle, SheetDescription, };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Sheet, SheetTrigger, SheetContent, SheetHeader, SheetFooter, SheetTitle, SheetDescription, SheetClose, } from "../../components/Sheet/sheet";
|
|
3
|
+
import { Button } from "../../components/Button/Button/Button";
|
|
4
|
+
var meta = {
|
|
5
|
+
title: "Components/Sheet",
|
|
6
|
+
component: Sheet,
|
|
7
|
+
tags: ["autodocs"],
|
|
8
|
+
};
|
|
9
|
+
export default meta;
|
|
10
|
+
var SIDES = ["top", "right", "bottom", "left"];
|
|
11
|
+
export var Default = {
|
|
12
|
+
render: function () { return (_jsx("div", { className: "flex flex-wrap gap-2", children: SIDES.map(function (side) { return (_jsxs(Sheet, { children: [_jsx(SheetTrigger, { asChild: true, children: _jsx(Button, { children: side.charAt(0).toUpperCase() + side.slice(1) }) }), _jsxs(SheetContent, { side: side, children: [_jsxs(SheetHeader, { children: [_jsxs(SheetTitle, { children: [side.charAt(0).toUpperCase() + side.slice(1), " Sheet"] }), _jsxs(SheetDescription, { children: ["This sheet slides in from the ", side, "."] })] }), _jsx("div", { className: "my-4", children: "Sheet content goes here." }), _jsx(SheetFooter, { children: _jsx(SheetClose, { asChild: true, children: _jsx(Button, { variant: "outline", children: "Close" }) }) })] })] }, side)); }) })); },
|
|
13
|
+
};
|
|
@@ -171,4 +171,5 @@ export var iconList = {
|
|
|
171
171
|
exclamation: "M18 2C18 0.89375 17.1063 0 16 0C14.8937 0 14 0.89375 14 2V22C14 23.1063 14.8937 24 16 24C17.1063 24 18 23.1063 18 22V2ZM16 32C17.3812 32 18.5 30.8813 18.5 29.5C18.5 28.1187 17.3812 27 16 27C14.6187 27 13.5 28.1187 13.5 29.5C13.5 30.8813 14.6187 32 16 32Z",
|
|
172
172
|
"fax-no": "M10 5V10H14V5H23.1688L26 7.83125V10H30V7.83125C30 6.76875 29.5812 5.75 28.8312 5L26 2.16875C25.25 1.41875 24.2313 1 23.1688 1H14C11.7938 1 10 2.79375 10 5ZM2 9C0.89375 9 0 9.89375 0 11V29C0 30.1063 0.89375 31 2 31H5C6.10625 31 7 30.1063 7 29V11C7 9.89375 6.10625 9 5 9H2ZM30 13H10V29C10 30.1063 10.8937 31 12 31H30C31.1063 31 32 30.1063 32 29V15C32 13.8937 31.1063 13 30 13ZM14 19C14 18.1687 14.6687 17.5 15.5 17.5C16.3313 17.5 17 18.1687 17 19C17 19.8313 16.3313 20.5 15.5 20.5C14.6687 20.5 14 19.8313 14 19ZM14 25C14 24.1687 14.6687 23.5 15.5 23.5C16.3313 23.5 17 24.1687 17 25C17 25.8313 16.3313 26.5 15.5 26.5C14.6687 26.5 14 25.8313 14 25ZM21 17.5C21.8313 17.5 22.5 18.1687 22.5 19C22.5 19.8313 21.8313 20.5 21 20.5C20.1687 20.5 19.5 19.8313 19.5 19C19.5 18.1687 20.1687 17.5 21 17.5ZM19.5 25C19.5 24.1687 20.1687 23.5 21 23.5C21.8313 23.5 22.5 24.1687 22.5 25C22.5 25.8313 21.8313 26.5 21 26.5C20.1687 26.5 19.5 25.8313 19.5 25ZM26.5 17.5C27.3313 17.5 28 18.1687 28 19C28 19.8313 27.3313 20.5 26.5 20.5C25.6687 20.5 25 19.8313 25 19C25 18.1687 25.6687 17.5 26.5 17.5ZM25 25C25 24.1687 25.6687 23.5 26.5 23.5C27.3313 23.5 28 24.1687 28 25C28 25.8313 27.3313 26.5 26.5 26.5C25.6687 26.5 25 25.8313 25 25Z",
|
|
173
173
|
briefcase: "M12.5 4H19.5C19.775 4 20 4.225 20 4.5V7H12V4.5C12 4.225 12.225 4 12.5 4ZM9 4.5V7H4C1.79375 7 0 8.79375 0 11V17H32V11C32 8.79375 30.2062 7 28 7H23V4.5C23 2.56875 21.4312 1 19.5 1H12.5C10.5688 1 9 2.56875 9 4.5ZM32 20H20V21C20 22.1063 19.1063 23 18 23H14C12.8938 23 12 22.1063 12 21V20H0V27C0 29.2062 1.79375 31 4 31H28C30.2062 31 32 29.2062 32 27V20Z",
|
|
174
|
+
bluesky: "M6.80914 3.68254C10.2783 6.26286 13.9886 11.4971 16 14.2286C18.0114 11.4971 21.7217 6.26286 25.1909 3.68254C27.7029 1.81143 31.4286 0.342857 31.4286 4.76572C31.4286 5.64914 30.8183 11.3714 30.4457 12.4686C29.2274 16.0571 25.5909 16.9257 22.3543 16.3657C28.0617 17.3486 29.7143 20.3931 26.7657 23.4377C21.1954 29.1874 17.9337 22.3086 16.6297 19.3749C16.3703 18.7909 16.2503 18.5063 16 18.5063C15.7497 18.5063 15.6297 18.7909 15.3703 19.3749C14.0663 22.3086 10.8046 29.1874 5.23428 23.4377C2.28571 20.3931 3.93828 17.3486 9.64571 16.3657C6.40914 16.9257 2.77257 16.0571 1.55428 12.4686C1.18171 11.3714 0.571428 5.64914 0.571428 4.76572C0.571428 0.342857 4.29714 1.81143 6.80914 3.68254Z",
|
|
174
175
|
};
|
package/dist/styles/global.css
CHANGED
|
@@ -247,6 +247,12 @@
|
|
|
247
247
|
.inset-0 {
|
|
248
248
|
inset: calc(var(--spacing) * 0);
|
|
249
249
|
}
|
|
250
|
+
.inset-x-0 {
|
|
251
|
+
inset-inline: calc(var(--spacing) * 0);
|
|
252
|
+
}
|
|
253
|
+
.inset-y-0 {
|
|
254
|
+
inset-block: calc(var(--spacing) * 0);
|
|
255
|
+
}
|
|
250
256
|
.top-0 {
|
|
251
257
|
top: calc(var(--spacing) * 0);
|
|
252
258
|
}
|
|
@@ -379,9 +385,15 @@
|
|
|
379
385
|
.mx-2 {
|
|
380
386
|
margin-inline: calc(var(--spacing) * 2);
|
|
381
387
|
}
|
|
388
|
+
.mx-4 {
|
|
389
|
+
margin-inline: calc(var(--spacing) * 4);
|
|
390
|
+
}
|
|
382
391
|
.mx-auto {
|
|
383
392
|
margin-inline: auto;
|
|
384
393
|
}
|
|
394
|
+
.\!my-1 {
|
|
395
|
+
margin-block: calc(var(--spacing) * 1) !important;
|
|
396
|
+
}
|
|
385
397
|
.my-1 {
|
|
386
398
|
margin-block: calc(var(--spacing) * 1);
|
|
387
399
|
}
|
|
@@ -883,6 +895,9 @@
|
|
|
883
895
|
.w-full {
|
|
884
896
|
width: 100%;
|
|
885
897
|
}
|
|
898
|
+
.w-px {
|
|
899
|
+
width: 1px;
|
|
900
|
+
}
|
|
886
901
|
.w-xs {
|
|
887
902
|
width: var(--container-xs);
|
|
888
903
|
}
|
|
@@ -1359,6 +1374,10 @@
|
|
|
1359
1374
|
border-bottom-style: var(--tw-border-style);
|
|
1360
1375
|
border-bottom-width: 0px;
|
|
1361
1376
|
}
|
|
1377
|
+
.border-l {
|
|
1378
|
+
border-left-style: var(--tw-border-style);
|
|
1379
|
+
border-left-width: 1px;
|
|
1380
|
+
}
|
|
1362
1381
|
.border-l-4 {
|
|
1363
1382
|
border-left-style: var(--tw-border-style);
|
|
1364
1383
|
border-left-width: 4px;
|
|
@@ -1864,9 +1883,6 @@
|
|
|
1864
1883
|
.py-3 {
|
|
1865
1884
|
padding-block: calc(var(--spacing) * 3);
|
|
1866
1885
|
}
|
|
1867
|
-
.py-4 {
|
|
1868
|
-
padding-block: calc(var(--spacing) * 4);
|
|
1869
|
-
}
|
|
1870
1886
|
.py-6 {
|
|
1871
1887
|
padding-block: calc(var(--spacing) * 6);
|
|
1872
1888
|
}
|
|
@@ -1888,8 +1904,8 @@
|
|
|
1888
1904
|
.\!pt-4 {
|
|
1889
1905
|
padding-top: calc(var(--spacing) * 4) !important;
|
|
1890
1906
|
}
|
|
1891
|
-
|
|
1892
|
-
padding-right: calc(var(--spacing) * 2);
|
|
1907
|
+
.\!pr-2 {
|
|
1908
|
+
padding-right: calc(var(--spacing) * 2) !important;
|
|
1893
1909
|
}
|
|
1894
1910
|
.pr-2\.5 {
|
|
1895
1911
|
padding-right: calc(var(--spacing) * 2.5);
|
|
@@ -2512,6 +2528,9 @@
|
|
|
2512
2528
|
.\[--cell-size\:--spacing\(6\)\] {
|
|
2513
2529
|
--cell-size: calc(var(--spacing) * 6);
|
|
2514
2530
|
}
|
|
2531
|
+
.lu-border {
|
|
2532
|
+
border: 1px solid currentColor;
|
|
2533
|
+
}
|
|
2515
2534
|
.running {
|
|
2516
2535
|
animation-play-state: running;
|
|
2517
2536
|
}
|
|
@@ -4512,6 +4531,12 @@
|
|
|
4512
4531
|
opacity: 0%;
|
|
4513
4532
|
}
|
|
4514
4533
|
}
|
|
4534
|
+
.data-\[state\=closed\]\:duration-300 {
|
|
4535
|
+
&[data-state="closed"] {
|
|
4536
|
+
--tw-duration: 300ms;
|
|
4537
|
+
transition-duration: 300ms;
|
|
4538
|
+
}
|
|
4539
|
+
}
|
|
4515
4540
|
.data-\[state\=closed\]\:fade-out-0 {
|
|
4516
4541
|
&[data-state="closed"] {
|
|
4517
4542
|
--tw-exit-opacity: calc(0/100);
|
|
@@ -4524,6 +4549,26 @@
|
|
|
4524
4549
|
--tw-exit-scale: .95;
|
|
4525
4550
|
}
|
|
4526
4551
|
}
|
|
4552
|
+
.data-\[state\=closed\]\:slide-out-to-bottom {
|
|
4553
|
+
&[data-state="closed"] {
|
|
4554
|
+
--tw-exit-translate-y: 100%;
|
|
4555
|
+
}
|
|
4556
|
+
}
|
|
4557
|
+
.data-\[state\=closed\]\:slide-out-to-left {
|
|
4558
|
+
&[data-state="closed"] {
|
|
4559
|
+
--tw-exit-translate-x: -100%;
|
|
4560
|
+
}
|
|
4561
|
+
}
|
|
4562
|
+
.data-\[state\=closed\]\:slide-out-to-right {
|
|
4563
|
+
&[data-state="closed"] {
|
|
4564
|
+
--tw-exit-translate-x: 100%;
|
|
4565
|
+
}
|
|
4566
|
+
}
|
|
4567
|
+
.data-\[state\=closed\]\:slide-out-to-top {
|
|
4568
|
+
&[data-state="closed"] {
|
|
4569
|
+
--tw-exit-translate-y: -100%;
|
|
4570
|
+
}
|
|
4571
|
+
}
|
|
4527
4572
|
.data-\[state\=inactive\]\:bg-blue-100 {
|
|
4528
4573
|
&[data-state="inactive"] {
|
|
4529
4574
|
background-color: #e2edf9;
|
|
@@ -4557,6 +4602,11 @@
|
|
|
4557
4602
|
background-color: var(--accent);
|
|
4558
4603
|
}
|
|
4559
4604
|
}
|
|
4605
|
+
.data-\[state\=open\]\:bg-secondary {
|
|
4606
|
+
&[data-state="open"] {
|
|
4607
|
+
background-color: var(--secondary);
|
|
4608
|
+
}
|
|
4609
|
+
}
|
|
4560
4610
|
.data-\[state\=open\]\:text-muted-foreground {
|
|
4561
4611
|
&[data-state="open"] {
|
|
4562
4612
|
color: var(--muted-foreground);
|
|
@@ -4567,6 +4617,12 @@
|
|
|
4567
4617
|
opacity: 100%;
|
|
4568
4618
|
}
|
|
4569
4619
|
}
|
|
4620
|
+
.data-\[state\=open\]\:duration-500 {
|
|
4621
|
+
&[data-state="open"] {
|
|
4622
|
+
--tw-duration: 500ms;
|
|
4623
|
+
transition-duration: 500ms;
|
|
4624
|
+
}
|
|
4625
|
+
}
|
|
4570
4626
|
.data-\[state\=open\]\:fade-in-0 {
|
|
4571
4627
|
&[data-state="open"] {
|
|
4572
4628
|
--tw-enter-opacity: calc(0/100);
|
|
@@ -4579,6 +4635,26 @@
|
|
|
4579
4635
|
--tw-enter-scale: .95;
|
|
4580
4636
|
}
|
|
4581
4637
|
}
|
|
4638
|
+
.data-\[state\=open\]\:slide-in-from-bottom {
|
|
4639
|
+
&[data-state="open"] {
|
|
4640
|
+
--tw-enter-translate-y: 100%;
|
|
4641
|
+
}
|
|
4642
|
+
}
|
|
4643
|
+
.data-\[state\=open\]\:slide-in-from-left {
|
|
4644
|
+
&[data-state="open"] {
|
|
4645
|
+
--tw-enter-translate-x: -100%;
|
|
4646
|
+
}
|
|
4647
|
+
}
|
|
4648
|
+
.data-\[state\=open\]\:slide-in-from-right {
|
|
4649
|
+
&[data-state="open"] {
|
|
4650
|
+
--tw-enter-translate-x: 100%;
|
|
4651
|
+
}
|
|
4652
|
+
}
|
|
4653
|
+
.data-\[state\=open\]\:slide-in-from-top {
|
|
4654
|
+
&[data-state="open"] {
|
|
4655
|
+
--tw-enter-translate-y: -100%;
|
|
4656
|
+
}
|
|
4657
|
+
}
|
|
4582
4658
|
.data-\[state\=selected\]\:bg-gray-50 {
|
|
4583
4659
|
&[data-state="selected"] {
|
|
4584
4660
|
background-color: #fafafa;
|
|
@@ -4666,6 +4742,11 @@
|
|
|
4666
4742
|
max-width: var(--container-lg);
|
|
4667
4743
|
}
|
|
4668
4744
|
}
|
|
4745
|
+
.sm\:max-w-sm {
|
|
4746
|
+
@media (width >= 40rem) {
|
|
4747
|
+
max-width: var(--container-sm);
|
|
4748
|
+
}
|
|
4749
|
+
}
|
|
4669
4750
|
.sm\:grid-cols-2 {
|
|
4670
4751
|
@media (width >= 40rem) {
|
|
4671
4752
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
@@ -4701,6 +4782,15 @@
|
|
|
4701
4782
|
gap: calc(var(--spacing) * 2);
|
|
4702
4783
|
}
|
|
4703
4784
|
}
|
|
4785
|
+
.sm\:space-x-2 {
|
|
4786
|
+
@media (width >= 40rem) {
|
|
4787
|
+
:where(& > :not(:last-child)) {
|
|
4788
|
+
--tw-space-x-reverse: 0;
|
|
4789
|
+
margin-inline-start: calc(calc(var(--spacing) * 2) * var(--tw-space-x-reverse));
|
|
4790
|
+
margin-inline-end: calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-x-reverse)));
|
|
4791
|
+
}
|
|
4792
|
+
}
|
|
4793
|
+
}
|
|
4704
4794
|
.sm\:p-2 {
|
|
4705
4795
|
@media (width >= 40rem) {
|
|
4706
4796
|
padding: calc(var(--spacing) * 2);
|
|
@@ -4780,6 +4870,11 @@
|
|
|
4780
4870
|
gap: calc(var(--spacing) * 4);
|
|
4781
4871
|
}
|
|
4782
4872
|
}
|
|
4873
|
+
.md\:pl-2 {
|
|
4874
|
+
@media (width >= 48rem) {
|
|
4875
|
+
padding-left: calc(var(--spacing) * 2);
|
|
4876
|
+
}
|
|
4877
|
+
}
|
|
4783
4878
|
.md\:\!text-sm {
|
|
4784
4879
|
@media (width >= 48rem) {
|
|
4785
4880
|
font-size: var(--text-sm) !important;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "linkedunion-design-kit",
|
|
3
|
-
"version": "1.11.
|
|
3
|
+
"version": "1.11.6-beta.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -50,6 +50,7 @@
|
|
|
50
50
|
"@radix-ui/react-popover": "^1.1.14",
|
|
51
51
|
"@radix-ui/react-radio-group": "^1.3.7",
|
|
52
52
|
"@radix-ui/react-select": "^2.2.5",
|
|
53
|
+
"@radix-ui/react-separator": "^1.1.8",
|
|
53
54
|
"@radix-ui/react-slider": "^1.3.5",
|
|
54
55
|
"@radix-ui/react-slot": "^1.2.3",
|
|
55
56
|
"@radix-ui/react-switch": "^1.1.4",
|