@codapet/design-system 0.7.3 → 0.7.4
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.mts +10 -1
- package/dist/index.mjs +40 -17
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -380,8 +380,17 @@ declare function DrawerTrigger({ ...props }: React$1.ComponentProps<typeof Drawe
|
|
|
380
380
|
declare function DrawerPortal({ ...props }: React$1.ComponentProps<typeof Drawer$1.Portal>): react_jsx_runtime.JSX.Element;
|
|
381
381
|
declare function DrawerClose({ ...props }: React$1.ComponentProps<typeof Drawer$1.Close>): react_jsx_runtime.JSX.Element;
|
|
382
382
|
declare function DrawerOverlay({ className, ...props }: React$1.ComponentProps<typeof Drawer$1.Overlay>): react_jsx_runtime.JSX.Element;
|
|
383
|
-
declare
|
|
383
|
+
declare const drawerDirectionClasses: {
|
|
384
|
+
readonly top: "inset-x-0 top-0 max-h-[80vh] rounded-b-3xl border-b border-border-default";
|
|
385
|
+
readonly bottom: "inset-x-0 bottom-0 max-h-[80vh] rounded-t-3xl border-t border-border-default";
|
|
386
|
+
readonly right: "inset-y-0 right-0 w-3/4 border-l border-border-default sm:max-w-sm";
|
|
387
|
+
readonly left: "inset-y-0 left-0 w-3/4 border-r border-border-default sm:max-w-sm";
|
|
388
|
+
};
|
|
389
|
+
declare function DrawerContent({ className, children, withCloseButton, showCloseButton, direction, overlayClassName, ...props }: React$1.ComponentProps<typeof Drawer$1.Content> & {
|
|
384
390
|
withCloseButton?: boolean;
|
|
391
|
+
showCloseButton?: boolean;
|
|
392
|
+
direction?: keyof typeof drawerDirectionClasses;
|
|
393
|
+
overlayClassName?: string;
|
|
385
394
|
}): react_jsx_runtime.JSX.Element;
|
|
386
395
|
declare function DrawerHeader({ className, ...props }: React$1.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
|
387
396
|
declare function DrawerFooter({ className, ...props }: React$1.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
package/dist/index.mjs
CHANGED
|
@@ -1755,7 +1755,7 @@ function DialogOverlay({
|
|
|
1755
1755
|
{
|
|
1756
1756
|
"data-slot": "dialog-overlay",
|
|
1757
1757
|
className: cn(
|
|
1758
|
-
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/
|
|
1758
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/40",
|
|
1759
1759
|
className
|
|
1760
1760
|
),
|
|
1761
1761
|
...props
|
|
@@ -1776,7 +1776,7 @@ function DialogContent({
|
|
|
1776
1776
|
{
|
|
1777
1777
|
"data-slot": "dialog-content",
|
|
1778
1778
|
className: cn(
|
|
1779
|
-
"bg-background 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-
|
|
1779
|
+
"bg-background border-border-default 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-3xl border p-6 shadow-lg duration-400 sm:max-w-lg",
|
|
1780
1780
|
className
|
|
1781
1781
|
),
|
|
1782
1782
|
...props,
|
|
@@ -1786,7 +1786,7 @@ function DialogContent({
|
|
|
1786
1786
|
DialogPrimitive.Close,
|
|
1787
1787
|
{
|
|
1788
1788
|
"data-slot": "dialog-close",
|
|
1789
|
-
className: "
|
|
1789
|
+
className: "border-border-default text-muted-foreground hover:bg-muted absolute top-4 right-4 flex size-9 shrink-0 cursor-pointer items-center justify-center rounded-full border [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
1790
1790
|
children: [
|
|
1791
1791
|
/* @__PURE__ */ jsx21(XIcon, {}),
|
|
1792
1792
|
/* @__PURE__ */ jsx21("span", { className: "sr-only", children: "Close" })
|
|
@@ -2957,6 +2957,7 @@ function DateRangeInput({
|
|
|
2957
2957
|
}
|
|
2958
2958
|
|
|
2959
2959
|
// src/components/ui/drawer.tsx
|
|
2960
|
+
import { XIcon as XIcon2 } from "lucide-react";
|
|
2960
2961
|
import "react";
|
|
2961
2962
|
import { Drawer as DrawerPrimitive } from "vaul";
|
|
2962
2963
|
import { jsx as jsx28, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
@@ -2989,36 +2990,53 @@ function DrawerOverlay({
|
|
|
2989
2990
|
{
|
|
2990
2991
|
"data-slot": "drawer-overlay",
|
|
2991
2992
|
className: cn(
|
|
2992
|
-
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/
|
|
2993
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/40",
|
|
2993
2994
|
className
|
|
2994
2995
|
),
|
|
2995
2996
|
...props
|
|
2996
2997
|
}
|
|
2997
2998
|
);
|
|
2998
2999
|
}
|
|
3000
|
+
var drawerDirectionClasses = {
|
|
3001
|
+
top: "inset-x-0 top-0 max-h-[80vh] rounded-b-3xl border-b border-border-default",
|
|
3002
|
+
bottom: "inset-x-0 bottom-0 max-h-[80vh] rounded-t-3xl border-t border-border-default",
|
|
3003
|
+
right: "inset-y-0 right-0 w-3/4 border-l border-border-default sm:max-w-sm",
|
|
3004
|
+
left: "inset-y-0 left-0 w-3/4 border-r border-border-default sm:max-w-sm"
|
|
3005
|
+
};
|
|
2999
3006
|
function DrawerContent({
|
|
3000
3007
|
className,
|
|
3001
3008
|
children,
|
|
3002
3009
|
withCloseButton = true,
|
|
3010
|
+
showCloseButton = true,
|
|
3011
|
+
direction = "bottom",
|
|
3012
|
+
overlayClassName,
|
|
3003
3013
|
...props
|
|
3004
3014
|
}) {
|
|
3005
3015
|
return /* @__PURE__ */ jsxs15(DrawerPortal, { "data-slot": "drawer-portal", children: [
|
|
3006
|
-
/* @__PURE__ */ jsx28(DrawerOverlay, {}),
|
|
3016
|
+
/* @__PURE__ */ jsx28(DrawerOverlay, { className: overlayClassName }),
|
|
3007
3017
|
/* @__PURE__ */ jsxs15(
|
|
3008
3018
|
DrawerPrimitive.Content,
|
|
3009
3019
|
{
|
|
3010
3020
|
"data-slot": "drawer-content",
|
|
3011
3021
|
className: cn(
|
|
3012
3022
|
"group/drawer-content bg-background fixed z-50 flex h-auto flex-col",
|
|
3013
|
-
|
|
3014
|
-
"data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t",
|
|
3015
|
-
"data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm",
|
|
3016
|
-
"data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm",
|
|
3023
|
+
drawerDirectionClasses[direction],
|
|
3017
3024
|
className
|
|
3018
3025
|
),
|
|
3019
3026
|
...props,
|
|
3020
3027
|
children: [
|
|
3021
3028
|
withCloseButton && /* @__PURE__ */ jsx28("div", { className: "bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block" }),
|
|
3029
|
+
showCloseButton && /* @__PURE__ */ jsxs15(
|
|
3030
|
+
DrawerPrimitive.Close,
|
|
3031
|
+
{
|
|
3032
|
+
"data-slot": "drawer-close-button",
|
|
3033
|
+
className: "border-border-default text-muted-foreground hover:bg-muted absolute top-4 right-4 z-10 flex size-9 shrink-0 cursor-pointer items-center justify-center rounded-full border [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
3034
|
+
children: [
|
|
3035
|
+
/* @__PURE__ */ jsx28(XIcon2, {}),
|
|
3036
|
+
/* @__PURE__ */ jsx28("span", { className: "sr-only", children: "Close" })
|
|
3037
|
+
]
|
|
3038
|
+
}
|
|
3039
|
+
),
|
|
3022
3040
|
children
|
|
3023
3041
|
]
|
|
3024
3042
|
}
|
|
@@ -3043,7 +3061,10 @@ function DrawerFooter({ className, ...props }) {
|
|
|
3043
3061
|
"div",
|
|
3044
3062
|
{
|
|
3045
3063
|
"data-slot": "drawer-footer",
|
|
3046
|
-
className: cn(
|
|
3064
|
+
className: cn(
|
|
3065
|
+
"border-border mt-auto flex shrink-0 flex-col gap-2 border-t px-4 pt-4 pb-[max(1rem,env(safe-area-inset-bottom,0px))]",
|
|
3066
|
+
className
|
|
3067
|
+
),
|
|
3047
3068
|
...props
|
|
3048
3069
|
}
|
|
3049
3070
|
);
|
|
@@ -5166,7 +5187,7 @@ function SearchInput({
|
|
|
5166
5187
|
|
|
5167
5188
|
// src/components/ui/searchable-select.tsx
|
|
5168
5189
|
import * as React44 from "react";
|
|
5169
|
-
import { CheckIcon as CheckIcon4, ChevronsUpDown, XIcon as
|
|
5190
|
+
import { CheckIcon as CheckIcon4, ChevronsUpDown, XIcon as XIcon3 } from "lucide-react";
|
|
5170
5191
|
import { jsx as jsx46, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
5171
5192
|
var SearchableSelectContext = React44.createContext(null);
|
|
5172
5193
|
function useSearchableSelect() {
|
|
@@ -5334,7 +5355,7 @@ function SearchableSelectTrigger({
|
|
|
5334
5355
|
e.stopPropagation();
|
|
5335
5356
|
ctx.setValues(ctx.values.filter((val) => val !== v));
|
|
5336
5357
|
},
|
|
5337
|
-
children: /* @__PURE__ */ jsx46(
|
|
5358
|
+
children: /* @__PURE__ */ jsx46(XIcon3, { className: "size-3" })
|
|
5338
5359
|
}
|
|
5339
5360
|
)
|
|
5340
5361
|
]
|
|
@@ -5691,7 +5712,7 @@ function Separator5({
|
|
|
5691
5712
|
|
|
5692
5713
|
// src/components/ui/sheet.tsx
|
|
5693
5714
|
import * as SheetPrimitive from "@radix-ui/react-dialog";
|
|
5694
|
-
import { XIcon as
|
|
5715
|
+
import { XIcon as XIcon4 } from "lucide-react";
|
|
5695
5716
|
import "react";
|
|
5696
5717
|
import { jsx as jsx49, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
5697
5718
|
function Sheet({ ...props }) {
|
|
@@ -5753,7 +5774,7 @@ function SheetContent({
|
|
|
5753
5774
|
children: [
|
|
5754
5775
|
children,
|
|
5755
5776
|
showCloseButton && /* @__PURE__ */ jsxs29(SheetPrimitive.Close, { className: "ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none", children: [
|
|
5756
|
-
/* @__PURE__ */ jsx49(
|
|
5777
|
+
/* @__PURE__ */ jsx49(XIcon4, { className: "size-4" }),
|
|
5757
5778
|
/* @__PURE__ */ jsx49("span", { className: "sr-only", children: "Close" })
|
|
5758
5779
|
] })
|
|
5759
5780
|
]
|
|
@@ -6683,7 +6704,7 @@ var SmartDialog = ({ children, ...props }) => {
|
|
|
6683
6704
|
};
|
|
6684
6705
|
var SmartDialogContent = ({
|
|
6685
6706
|
children,
|
|
6686
|
-
overlayClassName
|
|
6707
|
+
overlayClassName,
|
|
6687
6708
|
withCloseButton,
|
|
6688
6709
|
showCloseButton,
|
|
6689
6710
|
...props
|
|
@@ -6693,14 +6714,16 @@ var SmartDialogContent = ({
|
|
|
6693
6714
|
DrawerContent,
|
|
6694
6715
|
{
|
|
6695
6716
|
...props,
|
|
6696
|
-
|
|
6717
|
+
overlayClassName,
|
|
6718
|
+
withCloseButton: withCloseButton ?? true,
|
|
6719
|
+
showCloseButton: showCloseButton ?? true,
|
|
6697
6720
|
children
|
|
6698
6721
|
}
|
|
6699
6722
|
) : /* @__PURE__ */ jsx54(
|
|
6700
6723
|
DialogContent,
|
|
6701
6724
|
{
|
|
6702
6725
|
...props,
|
|
6703
|
-
showCloseButton: showCloseButton ??
|
|
6726
|
+
showCloseButton: showCloseButton ?? true,
|
|
6704
6727
|
overlayClassName,
|
|
6705
6728
|
children
|
|
6706
6729
|
}
|