@jbpark/ui-kit 3.8.0 → 4.1.0
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/components/atoms/float-button/back-top.d.mts.map +1 -1
- package/dist/components/atoms/float-button/back-top.mjs +3 -1
- package/dist/components/atoms/float-button/back-top.mjs.map +1 -1
- package/dist/components/atoms/input/search.d.mts.map +1 -1
- package/dist/components/atoms/input/search.mjs +3 -1
- package/dist/components/atoms/input/search.mjs.map +1 -1
- package/dist/components/atoms/skeleton/skeleton.d.mts.map +1 -1
- package/dist/components/atoms/skeleton/skeleton.mjs +5 -1
- package/dist/components/atoms/skeleton/skeleton.mjs.map +1 -1
- package/dist/components/atoms/spin.d.mts.map +1 -1
- package/dist/components/atoms/spin.mjs +7 -2
- package/dist/components/atoms/spin.mjs.map +1 -1
- package/dist/components/organisms/drawer.d.mts.map +1 -1
- package/dist/components/organisms/drawer.mjs +3 -1
- package/dist/components/organisms/drawer.mjs.map +1 -1
- package/dist/components/organisms/imperative-stack.mjs +106 -0
- package/dist/components/organisms/imperative-stack.mjs.map +1 -0
- package/dist/components/organisms/index.d.mts +3 -1
- package/dist/components/organisms/list/index.d.mts +1 -1
- package/dist/components/organisms/list/index.mjs.map +1 -1
- package/dist/components/organisms/list/list.d.mts +2 -2
- package/dist/components/organisms/list/list.d.mts.map +1 -1
- package/dist/components/organisms/list/list.mjs +20 -11
- package/dist/components/organisms/list/list.mjs.map +1 -1
- package/dist/components/organisms/modal.d.mts +2 -2
- package/dist/components/organisms/modal.d.mts.map +1 -1
- package/dist/components/organisms/modal.mjs +21 -101
- package/dist/components/organisms/modal.mjs.map +1 -1
- package/dist/components/organisms/swiper/index.d.mts +1 -1
- package/dist/components/organisms/swiper/index.mjs.map +1 -1
- package/dist/components/organisms/swiper/swiper.d.mts +2 -1
- package/dist/components/organisms/swiper/swiper.d.mts.map +1 -1
- package/dist/components/organisms/swiper/swiper.mjs +5 -3
- package/dist/components/organisms/swiper/swiper.mjs.map +1 -1
- package/dist/components/organisms/toast.d.mts +1 -1
- package/dist/components/organisms/toast.d.mts.map +1 -1
- package/dist/components/organisms/toast.mjs +35 -111
- package/dist/components/organisms/toast.mjs.map +1 -1
- package/dist/components/templates/container.d.mts +19 -0
- package/dist/components/templates/container.d.mts.map +1 -0
- package/dist/components/templates/container.mjs +32 -0
- package/dist/components/templates/container.mjs.map +1 -0
- package/dist/components/templates/empty.d.mts +20 -0
- package/dist/components/templates/empty.d.mts.map +1 -0
- package/dist/components/templates/empty.mjs +34 -0
- package/dist/components/templates/empty.mjs.map +1 -0
- package/dist/components/templates/grid/col.d.mts +35 -0
- package/dist/components/templates/grid/col.d.mts.map +1 -0
- package/dist/components/templates/grid/col.mjs +55 -0
- package/dist/components/templates/grid/col.mjs.map +1 -0
- package/dist/components/templates/grid/index.d.mts +2 -0
- package/dist/components/templates/grid/row-context.mjs +13 -0
- package/dist/components/templates/grid/row-context.mjs.map +1 -0
- package/dist/components/templates/grid/row.d.mts +36 -0
- package/dist/components/templates/grid/row.d.mts.map +1 -0
- package/dist/components/templates/grid/row.mjs +54 -0
- package/dist/components/templates/grid/row.mjs.map +1 -0
- package/dist/components/templates/index.d.mts +13 -1
- package/dist/components/templates/layout/content.d.mts +4 -1
- package/dist/components/templates/layout/content.d.mts.map +1 -1
- package/dist/components/templates/layout/content.mjs +3 -2
- package/dist/components/templates/layout/content.mjs.map +1 -1
- package/dist/components/templates/layout/footer.d.mts +1 -1
- package/dist/components/templates/layout/footer.d.mts.map +1 -1
- package/dist/components/templates/layout/footer.mjs.map +1 -1
- package/dist/components/templates/layout/header.d.mts +4 -1
- package/dist/components/templates/layout/header.d.mts.map +1 -1
- package/dist/components/templates/layout/header.mjs +2 -2
- package/dist/components/templates/layout/header.mjs.map +1 -1
- package/dist/components/templates/layout/layout.d.mts +1 -1
- package/dist/components/templates/layout/layout.d.mts.map +1 -1
- package/dist/components/templates/layout/layout.mjs.map +1 -1
- package/dist/components/templates/layout/sider.d.mts +9 -2
- package/dist/components/templates/layout/sider.d.mts.map +1 -1
- package/dist/components/templates/layout/sider.mjs +40 -13
- package/dist/components/templates/layout/sider.mjs.map +1 -1
- package/dist/components/templates/page-header.d.mts +30 -0
- package/dist/components/templates/page-header.d.mts.map +1 -0
- package/dist/components/templates/page-header.mjs +45 -0
- package/dist/components/templates/page-header.mjs.map +1 -0
- package/dist/components/templates/result.d.mts +24 -0
- package/dist/components/templates/result.d.mts.map +1 -0
- package/dist/components/templates/result.mjs +46 -0
- package/dist/components/templates/result.mjs.map +1 -0
- package/dist/core/badge.d.mts +1 -1
- package/dist/core/button.d.mts +1 -1
- package/dist/core/dialog.d.mts.map +1 -1
- package/dist/core/dialog.mjs +4 -1
- package/dist/core/dialog.mjs.map +1 -1
- package/dist/core/drawer.d.mts +1 -0
- package/dist/core/drawer.d.mts.map +1 -1
- package/dist/core/drawer.mjs +4 -1
- package/dist/core/drawer.mjs.map +1 -1
- package/dist/core/popover.d.mts +4 -1
- package/dist/core/popover.d.mts.map +1 -1
- package/dist/core/popover.mjs +13 -8
- package/dist/core/popover.mjs.map +1 -1
- package/dist/core/select.d.mts +4 -1
- package/dist/core/select.d.mts.map +1 -1
- package/dist/core/select.mjs +21 -16
- package/dist/core/select.mjs.map +1 -1
- package/dist/index.d.mts +28 -15
- package/dist/index.mjs +9 -3
- package/dist/providers/{Config/index.d.mts → config/config.d.mts} +8 -4
- package/dist/providers/config/config.d.mts.map +1 -0
- package/dist/providers/{Config/index.mjs → config/config.mjs} +34 -7
- package/dist/providers/config/config.mjs.map +1 -0
- package/dist/providers/config/context.d.mts +9 -0
- package/dist/providers/config/context.d.mts.map +1 -0
- package/dist/providers/config/context.mjs +23 -0
- package/dist/providers/config/context.mjs.map +1 -0
- package/dist/providers/config/index.d.mts +3 -0
- package/dist/providers/{Config → config}/types.d.mts +12 -2
- package/dist/providers/config/types.d.mts.map +1 -0
- package/dist/providers.d.mts +5 -0
- package/dist/providers.mjs +4 -0
- package/dist/style.css +114 -0
- package/package.json +3 -3
- package/dist/providers/Config/context.d.mts +0 -8
- package/dist/providers/Config/context.d.mts.map +0 -1
- package/dist/providers/Config/context.mjs +0 -11
- package/dist/providers/Config/context.mjs.map +0 -1
- package/dist/providers/Config/index.d.mts.map +0 -1
- package/dist/providers/Config/index.mjs.map +0 -1
- package/dist/providers/Config/types.d.mts.map +0 -1
- package/dist/providers/index.d.mts +0 -3
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
|
+
|
|
3
|
+
//#region src/components/templates/page-header.d.ts
|
|
4
|
+
interface Props extends Omit<React.ComponentProps<'div'>, 'title'> {
|
|
5
|
+
title?: React.ReactNode;
|
|
6
|
+
subTitle?: React.ReactNode;
|
|
7
|
+
extra?: React.ReactNode;
|
|
8
|
+
backIcon?: React.ReactNode;
|
|
9
|
+
onBack?: () => void;
|
|
10
|
+
classNames?: {
|
|
11
|
+
back?: string;
|
|
12
|
+
title?: string;
|
|
13
|
+
subTitle?: string;
|
|
14
|
+
extra?: string;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
declare const PageHeader: ({
|
|
18
|
+
title,
|
|
19
|
+
subTitle,
|
|
20
|
+
extra,
|
|
21
|
+
backIcon,
|
|
22
|
+
onBack,
|
|
23
|
+
className,
|
|
24
|
+
classNames,
|
|
25
|
+
children,
|
|
26
|
+
...props
|
|
27
|
+
}: Props) => react_jsx_runtime0.JSX.Element;
|
|
28
|
+
//#endregion
|
|
29
|
+
export { PageHeader, Props };
|
|
30
|
+
//# sourceMappingURL=page-header.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page-header.d.mts","names":[],"sources":["../../../src/components/templates/page-header.tsx"],"mappings":";;;UAQiB,KAAA,SAAc,IAAA,CAAK,KAAA,CAAM,cAAA;EACxC,KAAA,GAAQ,KAAA,CAAM,SAAA;EACd,QAAA,GAAW,KAAA,CAAM,SAAA;EACjB,KAAA,GAAQ,KAAA,CAAM,SAAA;EACd,QAAA,GAAW,KAAA,CAAM,SAAA;EACjB,MAAA;EACA,UAAA;IACE,IAAA;IACA,KAAA;IACA,QAAA;IACA,KAAA;EAAA;AAAA;AAAA,cAaE,UAAA;EAAc,KAAA;EAAA,QAAA;EAAA,KAAA;EAAA,QAAA;EAAA,MAAA;EAAA,SAAA;EAAA,UAAA;EAAA,QAAA;EAAA,GAAA;AAAA,GAUjB,KAAA,KAAK,kBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { cn, renderConditional } from "../../utils.mjs";
|
|
4
|
+
import Button from "../../Button.mjs";
|
|
5
|
+
import { ArrowLeft } from "lucide-react";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
|
|
8
|
+
//#region src/components/templates/page-header.tsx
|
|
9
|
+
const PageHeader = ({ title, subTitle, extra, backIcon, onBack, className, classNames, children, ...props }) => {
|
|
10
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
11
|
+
className: cn("flex flex-col gap-2", className),
|
|
12
|
+
...props,
|
|
13
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
14
|
+
className: "flex items-start gap-2",
|
|
15
|
+
children: [onBack && /* @__PURE__ */ jsx(Button, {
|
|
16
|
+
type: "text",
|
|
17
|
+
shape: "circle",
|
|
18
|
+
size: "small",
|
|
19
|
+
"aria-label": "뒤로가기",
|
|
20
|
+
icon: backIcon || /* @__PURE__ */ jsx(ArrowLeft, {}),
|
|
21
|
+
onClick: onBack,
|
|
22
|
+
className: cn(classNames?.back)
|
|
23
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
24
|
+
className: "flex flex-1 items-start justify-between gap-2",
|
|
25
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
26
|
+
className: "flex flex-col gap-0.5",
|
|
27
|
+
children: [title && /* @__PURE__ */ jsx("p", {
|
|
28
|
+
className: cn("text-lg font-medium", classNames?.title),
|
|
29
|
+
children: title
|
|
30
|
+
}), subTitle && /* @__PURE__ */ jsx("p", {
|
|
31
|
+
className: cn("text-muted-foreground text-sm", classNames?.subTitle),
|
|
32
|
+
children: subTitle
|
|
33
|
+
})]
|
|
34
|
+
}), renderConditional(extra, (v) => /* @__PURE__ */ jsx("div", {
|
|
35
|
+
className: cn("shrink-0", classNames?.extra),
|
|
36
|
+
children: v
|
|
37
|
+
}))]
|
|
38
|
+
})]
|
|
39
|
+
}), children]
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
//#endregion
|
|
44
|
+
export { PageHeader as default };
|
|
45
|
+
//# sourceMappingURL=page-header.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page-header.mjs","names":[],"sources":["../../../src/components/templates/page-header.tsx"],"sourcesContent":["'use client';\n\nimport { ArrowLeft } from 'lucide-react';\n\nimport { cn, renderConditional } from '@repo/ui/utils';\n\nimport Button from '../atoms/button';\n\nexport interface Props extends Omit<React.ComponentProps<'div'>, 'title'> {\n title?: React.ReactNode;\n subTitle?: React.ReactNode;\n extra?: React.ReactNode;\n backIcon?: React.ReactNode;\n onBack?: () => void;\n classNames?: {\n back?: string;\n title?: string;\n subTitle?: string;\n extra?: string;\n };\n}\n\n// Title + back button + extra action area — same shape as Drawer's header\n// (title/extra/closable), which this borrows the layout from wholesale;\n// PageHeader just swaps Drawer's close button for a back button.\n//\n// TODO: the back button's aria-label (\"뒤로가기\") is hardcoded the same\n// way every other component's was before #210 (Config's `locale` slot)\n// existed. Wire it up to `useConfig().locale` once that PR merges, adding\n// a `back` key to Locale/DEFAULT_LOCALE — left out here to avoid this PR\n// depending on an unmerged one.\nconst PageHeader = ({\n title,\n subTitle,\n extra,\n backIcon,\n onBack,\n className,\n classNames,\n children,\n ...props\n}: Props) => {\n return (\n <div className={cn('flex flex-col gap-2', className)} {...props}>\n <div className=\"flex items-start gap-2\">\n {onBack && (\n <Button\n type=\"text\"\n shape=\"circle\"\n size=\"small\"\n aria-label=\"뒤로가기\"\n icon={backIcon || <ArrowLeft />}\n onClick={onBack}\n className={cn(classNames?.back)}\n />\n )}\n <div className=\"flex flex-1 items-start justify-between gap-2\">\n <div className=\"flex flex-col gap-0.5\">\n {title && (\n <p className={cn('text-lg font-medium', classNames?.title)}>\n {title}\n </p>\n )}\n {subTitle && (\n <p\n className={cn(\n 'text-muted-foreground text-sm',\n classNames?.subTitle,\n )}\n >\n {subTitle}\n </p>\n )}\n </div>\n {renderConditional(extra, v => (\n <div className={cn('shrink-0', classNames?.extra)}>{v}</div>\n ))}\n </div>\n </div>\n {children}\n </div>\n );\n};\n\nexport default PageHeader;\n"],"mappings":";;;;;;;;AA+BA,MAAM,cAAc,EAClB,OACA,UACA,OACA,UACA,QACA,WACA,YACA,UACA,GAAG,YACQ;AACX,QACE,qBAAC;EAAI,WAAW,GAAG,uBAAuB,UAAU;EAAE,GAAI;aACxD,qBAAC;GAAI,WAAU;cACZ,UACC,oBAAC;IACC,MAAK;IACL,OAAM;IACN,MAAK;IACL,cAAW;IACX,MAAM,YAAY,oBAAC,cAAY;IAC/B,SAAS;IACT,WAAW,GAAG,YAAY,KAAK;KAC/B,EAEJ,qBAAC;IAAI,WAAU;eACb,qBAAC;KAAI,WAAU;gBACZ,SACC,oBAAC;MAAE,WAAW,GAAG,uBAAuB,YAAY,MAAM;gBACvD;OACC,EAEL,YACC,oBAAC;MACC,WAAW,GACT,iCACA,YAAY,SACb;gBAEA;OACC;MAEF,EACL,kBAAkB,QAAO,MACxB,oBAAC;KAAI,WAAW,GAAG,YAAY,YAAY,MAAM;eAAG;MAAQ,CAC5D;KACE;IACF,EACL;GACG"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
|
+
|
|
3
|
+
//#region src/components/templates/result.d.ts
|
|
4
|
+
type Status = 'success' | 'error' | 'info' | 'warning' | '404' | '403' | '500';
|
|
5
|
+
interface Props extends Omit<React.ComponentProps<'div'>, 'title'> {
|
|
6
|
+
status?: Status;
|
|
7
|
+
icon?: React.ReactNode;
|
|
8
|
+
title?: React.ReactNode;
|
|
9
|
+
subTitle?: React.ReactNode;
|
|
10
|
+
extra?: React.ReactNode;
|
|
11
|
+
}
|
|
12
|
+
declare const Result: ({
|
|
13
|
+
status,
|
|
14
|
+
icon,
|
|
15
|
+
title,
|
|
16
|
+
subTitle,
|
|
17
|
+
extra,
|
|
18
|
+
className,
|
|
19
|
+
children,
|
|
20
|
+
...props
|
|
21
|
+
}: Props) => react_jsx_runtime0.JSX.Element;
|
|
22
|
+
//#endregion
|
|
23
|
+
export { Props, Result };
|
|
24
|
+
//# sourceMappingURL=result.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"result.d.mts","names":[],"sources":["../../../src/components/templates/result.tsx"],"mappings":";;;KAYK,MAAA;AAAA,UAeY,KAAA,SAAc,IAAA,CAAK,KAAA,CAAM,cAAA;EACxC,MAAA,GAAS,MAAA;EACT,IAAA,GAAO,KAAA,CAAM,SAAA;EACb,KAAA,GAAQ,KAAA,CAAM,SAAA;EACd,QAAA,GAAW,KAAA,CAAM,SAAA;EACjB,KAAA,GAAQ,KAAA,CAAM,SAAA;AAAA;AAAA,cAMV,MAAA;EAAU,MAAA;EAAA,IAAA;EAAA,KAAA;EAAA,QAAA;EAAA,KAAA;EAAA,SAAA;EAAA,QAAA;EAAA,GAAA;AAAA,GASb,KAAA,KAAK,kBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { cn } from "../../utils.mjs";
|
|
2
|
+
import { Check, FileQuestion, Info, OctagonAlert, OctagonX, ServerCrash, ShieldAlert } from "lucide-react";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
//#region src/components/templates/result.tsx
|
|
6
|
+
const STATUS_ICONS = {
|
|
7
|
+
success: /* @__PURE__ */ jsx(Check, { className: "text-green-400" }),
|
|
8
|
+
error: /* @__PURE__ */ jsx(OctagonX, { className: "text-red-400" }),
|
|
9
|
+
info: /* @__PURE__ */ jsx(Info, { className: "text-blue-400" }),
|
|
10
|
+
warning: /* @__PURE__ */ jsx(OctagonAlert, { className: "text-yellow-400" }),
|
|
11
|
+
"404": /* @__PURE__ */ jsx(FileQuestion, { className: "text-muted-foreground" }),
|
|
12
|
+
"403": /* @__PURE__ */ jsx(ShieldAlert, { className: "text-muted-foreground" }),
|
|
13
|
+
"500": /* @__PURE__ */ jsx(ServerCrash, { className: "text-muted-foreground" })
|
|
14
|
+
};
|
|
15
|
+
const Result = ({ status = "info", icon, title, subTitle, extra, className, children, ...props }) => {
|
|
16
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
17
|
+
className: cn("flex flex-col items-center justify-center gap-2 py-16 text-center", className),
|
|
18
|
+
...props,
|
|
19
|
+
children: [
|
|
20
|
+
/* @__PURE__ */ jsx("div", {
|
|
21
|
+
className: "mb-2 [&_svg]:size-16",
|
|
22
|
+
children: icon ?? STATUS_ICONS[status]
|
|
23
|
+
}),
|
|
24
|
+
title && /* @__PURE__ */ jsx("p", {
|
|
25
|
+
className: "text-xl font-medium",
|
|
26
|
+
children: title
|
|
27
|
+
}),
|
|
28
|
+
subTitle && /* @__PURE__ */ jsx("p", {
|
|
29
|
+
className: "text-muted-foreground text-sm",
|
|
30
|
+
children: subTitle
|
|
31
|
+
}),
|
|
32
|
+
extra && /* @__PURE__ */ jsx("div", {
|
|
33
|
+
className: "mt-4 flex items-center justify-center gap-2",
|
|
34
|
+
children: extra
|
|
35
|
+
}),
|
|
36
|
+
children && /* @__PURE__ */ jsx("div", {
|
|
37
|
+
className: "mt-4 w-full",
|
|
38
|
+
children
|
|
39
|
+
})
|
|
40
|
+
]
|
|
41
|
+
});
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
//#endregion
|
|
45
|
+
export { Result as default };
|
|
46
|
+
//# sourceMappingURL=result.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"result.mjs","names":[],"sources":["../../../src/components/templates/result.tsx"],"sourcesContent":["import {\n Check,\n FileQuestion,\n Info,\n OctagonAlert,\n OctagonX,\n ServerCrash,\n ShieldAlert,\n} from 'lucide-react';\n\nimport { cn } from '@repo/ui/utils';\n\ntype Status = 'success' | 'error' | 'info' | 'warning' | '404' | '403' | '500';\n\n// Reuses Modal's exact STATIC_ICONS set (Check/OctagonX/Info/OctagonAlert,\n// same colors) for the 4 statuses they share, so a Result page matches the\n// tone of a Modal.success()/error()/etc a user may have just seen.\nconst STATUS_ICONS: Record<Status, React.ReactNode> = {\n success: <Check className=\"text-green-400\" />,\n error: <OctagonX className=\"text-red-400\" />,\n info: <Info className=\"text-blue-400\" />,\n warning: <OctagonAlert className=\"text-yellow-400\" />,\n '404': <FileQuestion className=\"text-muted-foreground\" />,\n '403': <ShieldAlert className=\"text-muted-foreground\" />,\n '500': <ServerCrash className=\"text-muted-foreground\" />,\n};\n\nexport interface Props extends Omit<React.ComponentProps<'div'>, 'title'> {\n status?: Status;\n icon?: React.ReactNode;\n title?: React.ReactNode;\n subTitle?: React.ReactNode;\n extra?: React.ReactNode;\n}\n\n// Full-page success/failure/404/403 state screen — Empty's larger,\n// more prominent sibling (Empty says \"nothing here yet\" inline within a\n// list/table; Result says \"here's what happened\" for an entire page/view).\nconst Result = ({\n status = 'info',\n icon,\n title,\n subTitle,\n extra,\n className,\n children,\n ...props\n}: Props) => {\n return (\n <div\n className={cn(\n 'flex flex-col items-center justify-center gap-2 py-16 text-center',\n className,\n //\n )}\n {...props}\n >\n <div className=\"mb-2 [&_svg]:size-16\">{icon ?? STATUS_ICONS[status]}</div>\n {title && <p className=\"text-xl font-medium\">{title}</p>}\n {subTitle && <p className=\"text-muted-foreground text-sm\">{subTitle}</p>}\n {extra && (\n <div className=\"mt-4 flex items-center justify-center gap-2\">\n {extra}\n </div>\n )}\n {children && <div className=\"mt-4 w-full\">{children}</div>}\n </div>\n );\n};\n\nexport default Result;\n"],"mappings":";;;;;AAiBA,MAAM,eAAgD;CACpD,SAAS,oBAAC,SAAM,WAAU,mBAAmB;CAC7C,OAAO,oBAAC,YAAS,WAAU,iBAAiB;CAC5C,MAAM,oBAAC,QAAK,WAAU,kBAAkB;CACxC,SAAS,oBAAC,gBAAa,WAAU,oBAAoB;CACrD,OAAO,oBAAC,gBAAa,WAAU,0BAA0B;CACzD,OAAO,oBAAC,eAAY,WAAU,0BAA0B;CACxD,OAAO,oBAAC,eAAY,WAAU,0BAA0B;CACzD;AAaD,MAAM,UAAU,EACd,SAAS,QACT,MACA,OACA,UACA,OACA,WACA,UACA,GAAG,YACQ;AACX,QACE,qBAAC;EACC,WAAW,GACT,qEACA,UAED;EACD,GAAI;;GAEJ,oBAAC;IAAI,WAAU;cAAwB,QAAQ,aAAa;KAAc;GACzE,SAAS,oBAAC;IAAE,WAAU;cAAuB;KAAU;GACvD,YAAY,oBAAC;IAAE,WAAU;cAAiC;KAAa;GACvE,SACC,oBAAC;IAAI,WAAU;cACZ;KACG;GAEP,YAAY,oBAAC;IAAI,WAAU;IAAe;KAAe;;GACtD"}
|
package/dist/core/badge.d.mts
CHANGED
|
@@ -8,7 +8,7 @@ declare namespace badge_d_exports {
|
|
|
8
8
|
export { Badge, Props, badgeVariants };
|
|
9
9
|
}
|
|
10
10
|
declare const badgeVariants: (props?: ({
|
|
11
|
-
variant?: "
|
|
11
|
+
variant?: "outline" | "default" | "destructive" | "secondary" | null | undefined;
|
|
12
12
|
} & class_variance_authority_types0.ClassProp) | undefined) => string;
|
|
13
13
|
type Props = React$1.ComponentProps<'span'> & VariantProps<typeof badgeVariants> & {
|
|
14
14
|
asChild?: boolean;
|
package/dist/core/button.d.mts
CHANGED
|
@@ -8,7 +8,7 @@ declare namespace button_d_exports {
|
|
|
8
8
|
export { Button, Props, buttonVariants };
|
|
9
9
|
}
|
|
10
10
|
declare const buttonVariants: (props?: ({
|
|
11
|
-
variant?: "link" | "
|
|
11
|
+
variant?: "link" | "outline" | "default" | "destructive" | "secondary" | "ghost" | null | undefined;
|
|
12
12
|
size?: "default" | "icon" | "xs" | "sm" | "lg" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
|
|
13
13
|
} & class_variance_authority_types0.ClassProp) | undefined) => string;
|
|
14
14
|
type Props = React$1.ComponentProps<'button'> & VariantProps<typeof buttonVariants> & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.d.mts","names":[],"sources":["../../src/core/dialog.tsx"],"mappings":";;;;;;;;
|
|
1
|
+
{"version":3,"file":"dialog.d.mts","names":[],"sources":["../../src/core/dialog.tsx"],"mappings":";;;;;;;;iBAYS,MAAA,CAAA;EAAA,GACJ;AAAA,GACF,OAAA,CAAM,cAAA,QAAsB,eAAA,CAAgB,IAAA,IAAK,kBAAA,CAAA,GAAA,CAAA,OAAA;AAAA,iBAI3C,aAAA,CAAA;EAAA,GACJ;AAAA,GACF,OAAA,CAAM,cAAA,QAAsB,eAAA,CAAgB,OAAA,IAAQ,kBAAA,CAAA,GAAA,CAAA,OAAA;AAAA,iBAI9C,YAAA,CAAA;EAAA,GACJ;AAAA,GACF,OAAA,CAAM,cAAA,QAAsB,eAAA,CAAgB,MAAA,IAAO,kBAAA,CAAA,GAAA,CAAA,OAAA;AAAA,iBAI7C,WAAA,CAAA;EAAA,GACJ;AAAA,GACF,OAAA,CAAM,cAAA,QAAsB,eAAA,CAAgB,KAAA,IAAM,kBAAA,CAAA,GAAA,CAAA,OAAA;AAAA,iBAI5C,aAAA,CAAA;EACP,SAAA;EAAA,GACG;AAAA,GACF,OAAA,CAAM,cAAA,QAAsB,eAAA,CAAgB,OAAA,IAAQ,kBAAA,CAAA,GAAA,CAAA,OAAA;AAAA,UAe7C,kBAAA;EACR,UAAA,GAAa,MAAA;EACb,SAAA,GAAY,OAAA,CAAM,SAAA;EAClB,QAAA;IAAuB,QAAA;EAAA;EACvB,SAAA,GAAY,WAAA;AAAA;AAAA,iBAGL,aAAA,CAAA;EACP,SAAA;EACA,QAAA;EACA,UAAA;EACA,SAAA,EAAW,UAAA;EACX,QAAA;EACA,SAAA;EAAA,GACG;AAAA,GACF,OAAA,CAAM,cAAA,QAAsB,eAAA,CAAgB,OAAA,IAAW,kBAAA,GAAkB,kBAAA,CAAA,GAAA,CAAA,OAAA;AAAA,iBA4CnE,YAAA,CAAA;EAAe,SAAA;EAAA,GAAc;AAAA,GAAS,OAAA,CAAM,cAAA,UAAqB,kBAAA,CAAA,GAAA,CAAA,OAAA;AAAA,iBAUjE,YAAA,CAAA;EACP,SAAA;EACA,eAAA;EACA,QAAA;EAAA,GACG;AAAA,GACF,OAAA,CAAM,cAAA;EACP,eAAA;AAAA,IACD,kBAAA,CAAA,GAAA,CAAA,OAAA;AAAA,iBAoBQ,WAAA,CAAA;EACP,SAAA;EAAA,GACG;AAAA,GACF,OAAA,CAAM,cAAA,QAAsB,eAAA,CAAgB,KAAA,IAAM,kBAAA,CAAA,GAAA,CAAA,OAAA;AAAA,iBAU5C,iBAAA,CAAA;EACP,SAAA;EAAA,GACG;AAAA,GACF,OAAA,CAAM,cAAA,QAAsB,eAAA,CAAgB,WAAA,IAAY,kBAAA,CAAA,GAAA,CAAA,OAAA"}
|
package/dist/core/dialog.mjs
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { __exportAll } from "../_virtual/_rolldown/runtime.mjs";
|
|
4
4
|
import { cn } from "../utils.mjs";
|
|
5
|
+
import { useConfig } from "../providers/config/context.mjs";
|
|
5
6
|
import Button from "../Button.mjs";
|
|
6
7
|
import { XIcon } from "lucide-react";
|
|
7
8
|
import "react";
|
|
@@ -55,6 +56,8 @@ function DialogOverlay({ className, ...props }) {
|
|
|
55
56
|
});
|
|
56
57
|
}
|
|
57
58
|
function DialogContent({ className, children, classNames, closeIcon: _closeIcon, closable, container, ...props }) {
|
|
59
|
+
const { getContainer } = useConfig();
|
|
60
|
+
const resolvedContainer = container ?? getContainer();
|
|
58
61
|
const closeIcon = /* @__PURE__ */ jsxs(DialogPrimitive.Close, {
|
|
59
62
|
"data-slot": "dialog-close",
|
|
60
63
|
className: "ring-offset-background focus:ring-ring\n data-[state=open]:bg-accent data-[state=open]:text-muted-foreground\n absolute top-4 right-4 rounded-xs opacity-70 transition-opacity\n hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden\n disabled:pointer-events-none [&_svg]:pointer-events-none\n [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
@@ -66,7 +69,7 @@ function DialogContent({ className, children, classNames, closeIcon: _closeIcon,
|
|
|
66
69
|
});
|
|
67
70
|
return /* @__PURE__ */ jsxs(DialogPortal, {
|
|
68
71
|
"data-slot": "dialog-portal",
|
|
69
|
-
container,
|
|
72
|
+
container: resolvedContainer,
|
|
70
73
|
children: [/* @__PURE__ */ jsx(DialogOverlay, { className: cn(classNames?.mask) }), /* @__PURE__ */ jsxs(DialogPrimitive.Content, {
|
|
71
74
|
"data-slot": "dialog-content",
|
|
72
75
|
className: cn(`bg-background data-[state=open]:animate-in
|
package/dist/core/dialog.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.mjs","names":[],"sources":["../../src/core/dialog.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\n\nimport * as DialogPrimitive from '@radix-ui/react-dialog';\nimport { XIcon } from 'lucide-react';\n\nimport { cn } from '@repo/ui/utils';\n\nimport Button from '../components/atoms/button';\n\nfunction Dialog({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Root>) {\n return <DialogPrimitive.Root data-slot=\"dialog\" {...props} />;\n}\n\nfunction DialogTrigger({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Trigger>) {\n return <DialogPrimitive.Trigger data-slot=\"dialog-trigger\" {...props} />;\n}\n\nfunction DialogPortal({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Portal>) {\n return <DialogPrimitive.Portal data-slot=\"dialog-portal\" {...props} />;\n}\n\nfunction DialogClose({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Close>) {\n return <DialogPrimitive.Close data-slot=\"dialog-close\" {...props} />;\n}\n\nfunction DialogOverlay({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Overlay>) {\n return (\n <DialogPrimitive.Overlay\n data-slot=\"dialog-overlay\"\n className={cn(\n `data-[state=open]:animate-in data-[state=closed]:animate-out\n data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0\n z-50 bg-black/50`,\n className,\n )}\n {...props}\n />\n );\n}\n\ninterface CustomContentProps {\n classNames?: Record<string, string>;\n closeIcon?: React.ReactNode;\n closable?: boolean | { disabled?: boolean };\n container?: HTMLElement;\n}\n\nfunction DialogContent({\n className,\n children,\n classNames,\n closeIcon: _closeIcon,\n closable,\n container,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Content> & CustomContentProps) {\n const closeIcon = (\n <DialogPrimitive.Close\n data-slot=\"dialog-close\"\n className=\"ring-offset-background focus:ring-ring\n data-[state=open]:bg-accent data-[state=open]:text-muted-foreground\n absolute top-4 right-4 rounded-xs opacity-70 transition-opacity\n hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden\n disabled:pointer-events-none [&_svg]:pointer-events-none\n [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\"\n disabled={typeof closable === 'object' && closable.disabled}\n >\n {_closeIcon || <XIcon />}\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n );\n\n return (\n <DialogPortal data-slot=\"dialog-portal\" container={
|
|
1
|
+
{"version":3,"file":"dialog.mjs","names":[],"sources":["../../src/core/dialog.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\n\nimport * as DialogPrimitive from '@radix-ui/react-dialog';\nimport { XIcon } from 'lucide-react';\n\nimport { useConfig } from '@repo/ui/providers';\nimport { cn } from '@repo/ui/utils';\n\nimport Button from '../components/atoms/button';\n\nfunction Dialog({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Root>) {\n return <DialogPrimitive.Root data-slot=\"dialog\" {...props} />;\n}\n\nfunction DialogTrigger({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Trigger>) {\n return <DialogPrimitive.Trigger data-slot=\"dialog-trigger\" {...props} />;\n}\n\nfunction DialogPortal({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Portal>) {\n return <DialogPrimitive.Portal data-slot=\"dialog-portal\" {...props} />;\n}\n\nfunction DialogClose({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Close>) {\n return <DialogPrimitive.Close data-slot=\"dialog-close\" {...props} />;\n}\n\nfunction DialogOverlay({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Overlay>) {\n return (\n <DialogPrimitive.Overlay\n data-slot=\"dialog-overlay\"\n className={cn(\n `data-[state=open]:animate-in data-[state=closed]:animate-out\n data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0\n z-50 bg-black/50`,\n className,\n )}\n {...props}\n />\n );\n}\n\ninterface CustomContentProps {\n classNames?: Record<string, string>;\n closeIcon?: React.ReactNode;\n closable?: boolean | { disabled?: boolean };\n container?: HTMLElement;\n}\n\nfunction DialogContent({\n className,\n children,\n classNames,\n closeIcon: _closeIcon,\n closable,\n container,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Content> & CustomContentProps) {\n const { getContainer } = useConfig();\n const resolvedContainer = container ?? getContainer();\n\n const closeIcon = (\n <DialogPrimitive.Close\n data-slot=\"dialog-close\"\n className=\"ring-offset-background focus:ring-ring\n data-[state=open]:bg-accent data-[state=open]:text-muted-foreground\n absolute top-4 right-4 rounded-xs opacity-70 transition-opacity\n hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden\n disabled:pointer-events-none [&_svg]:pointer-events-none\n [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\"\n disabled={typeof closable === 'object' && closable.disabled}\n >\n {_closeIcon || <XIcon />}\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n );\n\n return (\n <DialogPortal data-slot=\"dialog-portal\" container={resolvedContainer}>\n <DialogOverlay className={cn(classNames?.mask)} />\n <DialogPrimitive.Content\n data-slot=\"dialog-content\"\n className={cn(\n `bg-background data-[state=open]:animate-in\n data-[state=closed]:animate-out data-[state=closed]:fade-out-0\n data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95\n data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid\n w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%]\n gap-4 rounded-lg border p-6 shadow-lg duration-200 outline-none\n sm:max-w-lg`,\n className,\n )}\n {...props}\n >\n {children}\n {closable && closeIcon}\n </DialogPrimitive.Content>\n </DialogPortal>\n );\n}\n\nfunction DialogHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"dialog-header\"\n className={cn('flex flex-col gap-2 text-center sm:text-left', className)}\n {...props}\n />\n );\n}\n\nfunction DialogFooter({\n className,\n showCloseButton = false,\n children,\n ...props\n}: React.ComponentProps<'div'> & {\n showCloseButton?: boolean;\n}) {\n return (\n <div\n data-slot=\"dialog-footer\"\n className={cn(\n 'flex flex-col-reverse gap-2 sm:flex-row sm:justify-end',\n className,\n )}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close asChild>\n <Button variant=\"outlined\">Close</Button>\n </DialogPrimitive.Close>\n )}\n </div>\n );\n}\n\nfunction DialogTitle({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Title>) {\n return (\n <DialogPrimitive.Title\n data-slot=\"dialog-title\"\n className={cn('text-lg leading-none font-semibold', className)}\n {...props}\n />\n );\n}\n\nfunction DialogDescription({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Description>) {\n return (\n <DialogPrimitive.Description\n data-slot=\"dialog-description\"\n className={cn('text-muted-foreground text-sm', className)}\n {...props}\n />\n );\n}\n\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAYA,SAAS,OAAO,EACd,GAAG,SACiD;AACpD,QAAO,oBAAC,gBAAgB;EAAK,aAAU;EAAS,GAAI;GAAS;;AAG/D,SAAS,cAAc,EACrB,GAAG,SACoD;AACvD,QAAO,oBAAC,gBAAgB;EAAQ,aAAU;EAAiB,GAAI;GAAS;;AAG1E,SAAS,aAAa,EACpB,GAAG,SACmD;AACtD,QAAO,oBAAC,gBAAgB;EAAO,aAAU;EAAgB,GAAI;GAAS;;AAGxE,SAAS,YAAY,EACnB,GAAG,SACkD;AACrD,QAAO,oBAAC,gBAAgB;EAAM,aAAU;EAAe,GAAI;GAAS;;AAGtE,SAAS,cAAc,EACrB,WACA,GAAG,SACoD;AACvD,QACE,oBAAC,gBAAgB;EACf,aAAU;EACV,WAAW,GACT;;2BAGA,UACD;EACD,GAAI;GACJ;;AAWN,SAAS,cAAc,EACrB,WACA,UACA,YACA,WAAW,YACX,UACA,WACA,GAAG,SACyE;CAC5E,MAAM,EAAE,iBAAiB,WAAW;CACpC,MAAM,oBAAoB,aAAa,cAAc;CAErD,MAAM,YACJ,qBAAC,gBAAgB;EACf,aAAU;EACV,WAAU;EAMV,UAAU,OAAO,aAAa,YAAY,SAAS;aAElD,cAAc,oBAAC,UAAQ,EACxB,oBAAC;GAAK,WAAU;aAAU;IAAY;GAChB;AAG1B,QACE,qBAAC;EAAa,aAAU;EAAgB,WAAW;aACjD,oBAAC,iBAAc,WAAW,GAAG,YAAY,KAAK,GAAI,EAClD,qBAAC,gBAAgB;GACf,aAAU;GACV,WAAW,GACT;;;;;;wBAOA,UACD;GACD,GAAI;cAEH,UACA,YAAY;IACW;GACb;;AAInB,SAAS,aAAa,EAAE,WAAW,GAAG,SAAsC;AAC1E,QACE,oBAAC;EACC,aAAU;EACV,WAAW,GAAG,gDAAgD,UAAU;EACxE,GAAI;GACJ;;AAIN,SAAS,aAAa,EACpB,WACA,kBAAkB,OAClB,UACA,GAAG,SAGF;AACD,QACE,qBAAC;EACC,aAAU;EACV,WAAW,GACT,0DACA,UACD;EACD,GAAI;aAEH,UACA,mBACC,oBAAC,gBAAgB;GAAM;aACrB,oBAAC;IAAO,SAAQ;cAAW;KAAc;IACnB;GAEtB;;AAIV,SAAS,YAAY,EACnB,WACA,GAAG,SACkD;AACrD,QACE,oBAAC,gBAAgB;EACf,aAAU;EACV,WAAW,GAAG,sCAAsC,UAAU;EAC9D,GAAI;GACJ;;AAIN,SAAS,kBAAkB,EACzB,WACA,GAAG,SACwD;AAC3D,QACE,oBAAC,gBAAgB;EACf,aAAU;EACV,WAAW,GAAG,iCAAiC,UAAU;EACzD,GAAI;GACJ"}
|
package/dist/core/drawer.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawer.d.mts","names":[],"sources":["../../src/core/drawer.tsx"],"mappings":";;;;;;;;
|
|
1
|
+
{"version":3,"file":"drawer.d.mts","names":[],"sources":["../../src/core/drawer.tsx"],"mappings":";;;;;;;;UASU,WAAA;EACR,SAAA;AAAA;AAAA,iBAGO,QAAA,CAAA;EACP,SAAA;EACA,SAAA;EAAA,GACG;AAAA,GACF,OAAA,CAAM,cAAA,QAAsB,MAAA,CAAgB,IAAA,IAAQ,WAAA,GAAW,kBAAA,CAAA,GAAA,CAAA,OAAA;AAAA,iBAazD,aAAA,CAAA;EAAA,GACJ;AAAA,GACF,OAAA,CAAM,cAAA,QAAsB,MAAA,CAAgB,OAAA,IAAQ,kBAAA,CAAA,GAAA,CAAA,OAAA;AAAA,iBAI9C,YAAA,CAAA;EAAA,GACJ;AAAA,GACF,OAAA,CAAM,cAAA,QAAsB,MAAA,CAAgB,MAAA,IAAO,kBAAA,CAAA,GAAA,CAAA,OAAA;AAAA,iBAI7C,WAAA,CAAA;EAAA,GACJ;AAAA,GACF,OAAA,CAAM,cAAA,QAAsB,MAAA,CAAgB,KAAA,IAAM,kBAAA,CAAA,GAAA,CAAA,OAAA;AAAA,iBAI5C,aAAA,CAAA;EACP,SAAA;EAAA,GACG;AAAA,GACF,OAAA,CAAM,cAAA,QAAsB,MAAA,CAAgB,OAAA,IAAQ,kBAAA,CAAA,GAAA,CAAA,OAAA;AAAA,UAe7C,kBAAA;EACR,UAAA,GAAa,MAAA;EACb,SAAA;EACA,IAAA;AAAA;AAAA,iBAGO,aAAA,CAAA;EACP,SAAA;EACA,QAAA;EACA,UAAA;EACA,SAAA;EACA,IAAA;EAAA,GACG;AAAA,GACF,OAAA,CAAM,cAAA,QAAsB,MAAA,CAAgB,OAAA,IAAW,kBAAA,GAAkB,kBAAA,CAAA,GAAA,CAAA,OAAA;AAAA,iBA2DnE,YAAA,CAAA;EAAe,SAAA;EAAA,GAAc;AAAA,GAAS,OAAA,CAAM,cAAA,UAAqB,kBAAA,CAAA,GAAA,CAAA,OAAA;AAAA,iBAgBjE,YAAA,CAAA;EAAe,SAAA;EAAA,GAAc;AAAA,GAAS,OAAA,CAAM,cAAA,UAAqB,kBAAA,CAAA,GAAA,CAAA,OAAA;AAAA,iBAUjE,WAAA,CAAA;EACP,SAAA;EAAA,GACG;AAAA,GACF,OAAA,CAAM,cAAA,QAAsB,MAAA,CAAgB,KAAA,IAAM,kBAAA,CAAA,GAAA,CAAA,OAAA;AAAA,iBAU5C,iBAAA,CAAA;EACP,SAAA;EAAA,GACG;AAAA,GACF,OAAA,CAAM,cAAA,QAAsB,MAAA,CAAgB,WAAA,IAAY,kBAAA,CAAA,GAAA,CAAA,OAAA"}
|
package/dist/core/drawer.mjs
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { __exportAll } from "../_virtual/_rolldown/runtime.mjs";
|
|
4
4
|
import { cn } from "../utils.mjs";
|
|
5
|
+
import { useConfig } from "../providers/config/context.mjs";
|
|
5
6
|
import "react";
|
|
6
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
8
|
import { Drawer } from "vaul";
|
|
@@ -19,10 +20,12 @@ var drawer_exports = /* @__PURE__ */ __exportAll({
|
|
|
19
20
|
DrawerTitle: () => DrawerTitle,
|
|
20
21
|
DrawerTrigger: () => DrawerTrigger
|
|
21
22
|
});
|
|
22
|
-
function Drawer$1({ draggable, ...props }) {
|
|
23
|
+
function Drawer$1({ draggable, container, ...props }) {
|
|
24
|
+
const { getContainer } = useConfig();
|
|
23
25
|
return /* @__PURE__ */ jsx(Drawer.Root, {
|
|
24
26
|
"data-slot": "drawer",
|
|
25
27
|
handleOnly: !draggable,
|
|
28
|
+
container: container ?? getContainer(),
|
|
26
29
|
...props
|
|
27
30
|
});
|
|
28
31
|
}
|
package/dist/core/drawer.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawer.mjs","names":["Drawer","DrawerPrimitive"],"sources":["../../src/core/drawer.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\n\nimport { Drawer as DrawerPrimitive } from 'vaul';\n\nimport { cn } from '@repo/ui/utils';\n\ninterface CustomProps {\n draggable?: boolean;\n}\n\nfunction Drawer({\n draggable,\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Root> & CustomProps) {\n return (\n <DrawerPrimitive.Root\n data-slot=\"drawer\"\n handleOnly={!draggable}\n {...props}\n />\n );\n}\n\nfunction DrawerTrigger({\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Trigger>) {\n return <DrawerPrimitive.Trigger data-slot=\"drawer-trigger\" {...props} />;\n}\n\nfunction DrawerPortal({\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Portal>) {\n return <DrawerPrimitive.Portal data-slot=\"drawer-portal\" {...props} />;\n}\n\nfunction DrawerClose({\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Close>) {\n return <DrawerPrimitive.Close data-slot=\"drawer-close\" {...props} />;\n}\n\nfunction DrawerOverlay({\n className,\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Overlay>) {\n return (\n <DrawerPrimitive.Overlay\n data-slot=\"drawer-overlay\"\n className={cn(\n `data-[state=open]:animate-in data-[state=closed]:animate-out\n data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0\n z-50 bg-black/50`,\n className,\n )}\n {...props}\n />\n );\n}\n\ninterface CustomContentProps {\n classNames?: Record<string, string>;\n handlebar?: boolean;\n mask?: boolean;\n}\n\nfunction DrawerContent({\n className,\n children,\n classNames = {},\n handlebar,\n mask,\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Content> & CustomContentProps) {\n return (\n <DrawerPortal data-slot=\"drawer-portal\">\n <DrawerOverlay\n className={cn(\n classNames?.mask || '',\n !mask && 'hidden',\n //\n )}\n />\n <DrawerPrimitive.Content\n data-slot=\"drawer-content\"\n className={cn(\n 'group/drawer-content bg-background fixed z-50 flex h-auto flex-col',\n `data-[vaul-drawer-direction=top]:inset-x-0\n data-[vaul-drawer-direction=top]:top-0\n data-[vaul-drawer-direction=top]:mb-24\n data-[vaul-drawer-direction=top]:max-h-[80vh]\n data-[vaul-drawer-direction=top]:rounded-b-lg\n data-[vaul-drawer-direction=top]:border-b`,\n `data-[vaul-drawer-direction=bottom]:inset-x-0\n data-[vaul-drawer-direction=bottom]:bottom-0\n data-[vaul-drawer-direction=bottom]:mt-24\n data-[vaul-drawer-direction=bottom]:max-h-[80vh]\n data-[vaul-drawer-direction=bottom]:rounded-t-lg\n data-[vaul-drawer-direction=bottom]:border-t`,\n `data-[vaul-drawer-direction=right]:inset-y-0\n data-[vaul-drawer-direction=right]:right-0\n data-[vaul-drawer-direction=right]:w-3/4\n data-[vaul-drawer-direction=right]:border-l\n data-[vaul-drawer-direction=right]:sm:max-w-sm`,\n `data-[vaul-drawer-direction=left]:inset-y-0\n data-[vaul-drawer-direction=left]:left-0\n data-[vaul-drawer-direction=left]:w-3/4\n data-[vaul-drawer-direction=left]:border-r\n data-[vaul-drawer-direction=left]:sm:max-w-sm`,\n className,\n )}\n {...props}\n >\n {handlebar && (\n <div\n className={cn(\n `bg-muted mx-auto mt-4 hidden h-2 w-25 shrink-0 rounded-full\n group-data-[vaul-drawer-direction=bottom]/drawer-content:block`,\n classNames?.handlebar,\n )}\n />\n )}\n {/* <div\n className=\"bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full\n group-data-[vaul-drawer-direction=bottom]/drawer-content:block\"\n /> */}\n {children}\n </DrawerPrimitive.Content>\n </DrawerPortal>\n );\n}\n\nfunction DrawerHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"drawer-header\"\n className={cn(\n `flex flex-col gap-0.5 p-4\n group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center\n group-data-[vaul-drawer-direction=top]/drawer-content:text-center\n md:gap-1.5 md:text-left`,\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction DrawerFooter({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"drawer-footer\"\n className={cn('mt-auto flex flex-col gap-2 p-4', className)}\n {...props}\n />\n );\n}\n\nfunction DrawerTitle({\n className,\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Title>) {\n return (\n <DrawerPrimitive.Title\n data-slot=\"drawer-title\"\n className={cn('text-foreground font-semibold', className)}\n {...props}\n />\n );\n}\n\nfunction DrawerDescription({\n className,\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Description>) {\n return (\n <DrawerPrimitive.Description\n data-slot=\"drawer-description\"\n className={cn('text-muted-foreground text-sm', className)}\n {...props}\n />\n );\n}\n\nexport {\n Drawer,\n DrawerPortal,\n DrawerOverlay,\n DrawerTrigger,\n DrawerClose,\n DrawerContent,\n DrawerHeader,\n DrawerFooter,\n DrawerTitle,\n DrawerDescription,\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"drawer.mjs","names":["Drawer","DrawerPrimitive"],"sources":["../../src/core/drawer.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\n\nimport { Drawer as DrawerPrimitive } from 'vaul';\n\nimport { useConfig } from '@repo/ui/providers';\nimport { cn } from '@repo/ui/utils';\n\ninterface CustomProps {\n draggable?: boolean;\n}\n\nfunction Drawer({\n draggable,\n container,\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Root> & CustomProps) {\n const { getContainer } = useConfig();\n\n return (\n <DrawerPrimitive.Root\n data-slot=\"drawer\"\n handleOnly={!draggable}\n container={container ?? getContainer()}\n {...props}\n />\n );\n}\n\nfunction DrawerTrigger({\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Trigger>) {\n return <DrawerPrimitive.Trigger data-slot=\"drawer-trigger\" {...props} />;\n}\n\nfunction DrawerPortal({\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Portal>) {\n return <DrawerPrimitive.Portal data-slot=\"drawer-portal\" {...props} />;\n}\n\nfunction DrawerClose({\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Close>) {\n return <DrawerPrimitive.Close data-slot=\"drawer-close\" {...props} />;\n}\n\nfunction DrawerOverlay({\n className,\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Overlay>) {\n return (\n <DrawerPrimitive.Overlay\n data-slot=\"drawer-overlay\"\n className={cn(\n `data-[state=open]:animate-in data-[state=closed]:animate-out\n data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0\n z-50 bg-black/50`,\n className,\n )}\n {...props}\n />\n );\n}\n\ninterface CustomContentProps {\n classNames?: Record<string, string>;\n handlebar?: boolean;\n mask?: boolean;\n}\n\nfunction DrawerContent({\n className,\n children,\n classNames = {},\n handlebar,\n mask,\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Content> & CustomContentProps) {\n return (\n <DrawerPortal data-slot=\"drawer-portal\">\n <DrawerOverlay\n className={cn(\n classNames?.mask || '',\n !mask && 'hidden',\n //\n )}\n />\n <DrawerPrimitive.Content\n data-slot=\"drawer-content\"\n className={cn(\n 'group/drawer-content bg-background fixed z-50 flex h-auto flex-col',\n `data-[vaul-drawer-direction=top]:inset-x-0\n data-[vaul-drawer-direction=top]:top-0\n data-[vaul-drawer-direction=top]:mb-24\n data-[vaul-drawer-direction=top]:max-h-[80vh]\n data-[vaul-drawer-direction=top]:rounded-b-lg\n data-[vaul-drawer-direction=top]:border-b`,\n `data-[vaul-drawer-direction=bottom]:inset-x-0\n data-[vaul-drawer-direction=bottom]:bottom-0\n data-[vaul-drawer-direction=bottom]:mt-24\n data-[vaul-drawer-direction=bottom]:max-h-[80vh]\n data-[vaul-drawer-direction=bottom]:rounded-t-lg\n data-[vaul-drawer-direction=bottom]:border-t`,\n `data-[vaul-drawer-direction=right]:inset-y-0\n data-[vaul-drawer-direction=right]:right-0\n data-[vaul-drawer-direction=right]:w-3/4\n data-[vaul-drawer-direction=right]:border-l\n data-[vaul-drawer-direction=right]:sm:max-w-sm`,\n `data-[vaul-drawer-direction=left]:inset-y-0\n data-[vaul-drawer-direction=left]:left-0\n data-[vaul-drawer-direction=left]:w-3/4\n data-[vaul-drawer-direction=left]:border-r\n data-[vaul-drawer-direction=left]:sm:max-w-sm`,\n className,\n )}\n {...props}\n >\n {handlebar && (\n <div\n className={cn(\n `bg-muted mx-auto mt-4 hidden h-2 w-25 shrink-0 rounded-full\n group-data-[vaul-drawer-direction=bottom]/drawer-content:block`,\n classNames?.handlebar,\n )}\n />\n )}\n {/* <div\n className=\"bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full\n group-data-[vaul-drawer-direction=bottom]/drawer-content:block\"\n /> */}\n {children}\n </DrawerPrimitive.Content>\n </DrawerPortal>\n );\n}\n\nfunction DrawerHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"drawer-header\"\n className={cn(\n `flex flex-col gap-0.5 p-4\n group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center\n group-data-[vaul-drawer-direction=top]/drawer-content:text-center\n md:gap-1.5 md:text-left`,\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction DrawerFooter({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"drawer-footer\"\n className={cn('mt-auto flex flex-col gap-2 p-4', className)}\n {...props}\n />\n );\n}\n\nfunction DrawerTitle({\n className,\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Title>) {\n return (\n <DrawerPrimitive.Title\n data-slot=\"drawer-title\"\n className={cn('text-foreground font-semibold', className)}\n {...props}\n />\n );\n}\n\nfunction DrawerDescription({\n className,\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Description>) {\n return (\n <DrawerPrimitive.Description\n data-slot=\"drawer-description\"\n className={cn('text-muted-foreground text-sm', className)}\n {...props}\n />\n );\n}\n\nexport {\n Drawer,\n DrawerPortal,\n DrawerOverlay,\n DrawerTrigger,\n DrawerClose,\n DrawerContent,\n DrawerHeader,\n DrawerFooter,\n DrawerTitle,\n DrawerDescription,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAaA,SAASA,SAAO,EACd,WACA,WACA,GAAG,SAC+D;CAClE,MAAM,EAAE,iBAAiB,WAAW;AAEpC,QACE,oBAACC,OAAgB;EACf,aAAU;EACV,YAAY,CAAC;EACb,WAAW,aAAa,cAAc;EACtC,GAAI;GACJ;;AAIN,SAAS,cAAc,EACrB,GAAG,SACoD;AACvD,QAAO,oBAACA,OAAgB;EAAQ,aAAU;EAAiB,GAAI;GAAS;;AAG1E,SAAS,aAAa,EACpB,GAAG,SACmD;AACtD,QAAO,oBAACA,OAAgB;EAAO,aAAU;EAAgB,GAAI;GAAS;;AAGxE,SAAS,YAAY,EACnB,GAAG,SACkD;AACrD,QAAO,oBAACA,OAAgB;EAAM,aAAU;EAAe,GAAI;GAAS;;AAGtE,SAAS,cAAc,EACrB,WACA,GAAG,SACoD;AACvD,QACE,oBAACA,OAAgB;EACf,aAAU;EACV,WAAW,GACT;;2BAGA,UACD;EACD,GAAI;GACJ;;AAUN,SAAS,cAAc,EACrB,WACA,UACA,aAAa,EAAE,EACf,WACA,MACA,GAAG,SACyE;AAC5E,QACE,qBAAC;EAAa,aAAU;aACtB,oBAAC,iBACC,WAAW,GACT,YAAY,QAAQ,IACpB,CAAC,QAAQ,SAEV,GACD,EACF,qBAACA,OAAgB;GACf,aAAU;GACV,WAAW,GACT,sEACA;;;;;sDAMA;;;;;yDAMA;;;;2DAKA;;;;0DAKA,UACD;GACD,GAAI;cAEH,aACC,oBAAC,SACC,WAAW,GACT;+EAEA,YAAY,UACb,GACD,EAMH;IACuB;GACb;;AAInB,SAAS,aAAa,EAAE,WAAW,GAAG,SAAsC;AAC1E,QACE,oBAAC;EACC,aAAU;EACV,WAAW,GACT;;;kCAIA,UACD;EACD,GAAI;GACJ;;AAIN,SAAS,aAAa,EAAE,WAAW,GAAG,SAAsC;AAC1E,QACE,oBAAC;EACC,aAAU;EACV,WAAW,GAAG,mCAAmC,UAAU;EAC3D,GAAI;GACJ;;AAIN,SAAS,YAAY,EACnB,WACA,GAAG,SACkD;AACrD,QACE,oBAACA,OAAgB;EACf,aAAU;EACV,WAAW,GAAG,iCAAiC,UAAU;EACzD,GAAI;GACJ;;AAIN,SAAS,kBAAkB,EACzB,WACA,GAAG,SACwD;AAC3D,QACE,oBAACA,OAAgB;EACf,aAAU;EACV,WAAW,GAAG,iCAAiC,UAAU;EACzD,GAAI;GACJ"}
|
package/dist/core/popover.d.mts
CHANGED
|
@@ -16,8 +16,11 @@ declare function PopoverContent({
|
|
|
16
16
|
className,
|
|
17
17
|
align,
|
|
18
18
|
sideOffset,
|
|
19
|
+
container,
|
|
19
20
|
...props
|
|
20
|
-
}: React$1.ComponentProps<typeof PopoverPrimitive.Content>
|
|
21
|
+
}: React$1.ComponentProps<typeof PopoverPrimitive.Content> & {
|
|
22
|
+
container?: HTMLElement;
|
|
23
|
+
}): react_jsx_runtime0.JSX.Element;
|
|
21
24
|
declare function PopoverAnchor({
|
|
22
25
|
...props
|
|
23
26
|
}: React$1.ComponentProps<typeof PopoverPrimitive.Anchor>): react_jsx_runtime0.JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popover.d.mts","names":[],"sources":["../../src/core/popover.tsx"],"mappings":";;;;;;;;
|
|
1
|
+
{"version":3,"file":"popover.d.mts","names":[],"sources":["../../src/core/popover.tsx"],"mappings":";;;;;;;;iBASS,OAAA,CAAA;EAAA,GACJ;AAAA,GACF,OAAA,CAAM,cAAA,QAAsB,gBAAA,CAAiB,IAAA,IAAK,kBAAA,CAAA,GAAA,CAAA,OAAA;AAAA,iBAI5C,cAAA,CAAA;EAAA,GACJ;AAAA,GACF,OAAA,CAAM,cAAA,QAAsB,gBAAA,CAAiB,OAAA,IAAQ,kBAAA,CAAA,GAAA,CAAA,OAAA;AAAA,iBAI/C,cAAA,CAAA;EACP,SAAA;EACA,KAAA;EACA,UAAA;EACA,SAAA;EAAA,GACG;AAAA,GACF,OAAA,CAAM,cAAA,QAAsB,gBAAA,CAAiB,OAAA;EAC9C,SAAA,GAAY,WAAA;AAAA,IACb,kBAAA,CAAA,GAAA,CAAA,OAAA;AAAA,iBA2BQ,aAAA,CAAA;EAAA,GACJ;AAAA,GACF,OAAA,CAAM,cAAA,QAAsB,gBAAA,CAAiB,MAAA,IAAO,kBAAA,CAAA,GAAA,CAAA,OAAA;AAAA,iBAI9C,aAAA,CAAA;EAAgB,SAAA;EAAA,GAAc;AAAA,GAAS,OAAA,CAAM,cAAA,UAAqB,kBAAA,CAAA,GAAA,CAAA,OAAA;AAAA,iBAUlE,YAAA,CAAA;EAAe,SAAA;EAAA,GAAc;AAAA,GAAS,OAAA,CAAM,cAAA,SAAoB,kBAAA,CAAA,GAAA,CAAA,OAAA;AAAA,iBAUhE,kBAAA,CAAA;EACP,SAAA;EAAA,GACG;AAAA,GACF,OAAA,CAAM,cAAA,QAAmB,kBAAA,CAAA,GAAA,CAAA,OAAA"}
|
package/dist/core/popover.mjs
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { __exportAll } from "../_virtual/_rolldown/runtime.mjs";
|
|
4
4
|
import { cn } from "../utils.mjs";
|
|
5
|
+
import { useConfig } from "../providers/config/context.mjs";
|
|
5
6
|
import "react";
|
|
6
7
|
import { jsx } from "react/jsx-runtime";
|
|
7
8
|
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
@@ -28,12 +29,15 @@ function PopoverTrigger({ ...props }) {
|
|
|
28
29
|
...props
|
|
29
30
|
});
|
|
30
31
|
}
|
|
31
|
-
function PopoverContent({ className, align = "center", sideOffset = 4, ...props }) {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
32
|
+
function PopoverContent({ className, align = "center", sideOffset = 4, container, ...props }) {
|
|
33
|
+
const { getContainer } = useConfig();
|
|
34
|
+
return /* @__PURE__ */ jsx(PopoverPrimitive.Portal, {
|
|
35
|
+
container: container ?? getContainer(),
|
|
36
|
+
children: /* @__PURE__ */ jsx(PopoverPrimitive.Content, {
|
|
37
|
+
"data-slot": "popover-content",
|
|
38
|
+
align,
|
|
39
|
+
sideOffset,
|
|
40
|
+
className: cn(`bg-popover text-popover-foreground data-[state=open]:animate-in
|
|
37
41
|
data-[state=closed]:animate-out data-[state=closed]:fade-out-0
|
|
38
42
|
data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95
|
|
39
43
|
data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2
|
|
@@ -42,8 +46,9 @@ function PopoverContent({ className, align = "center", sideOffset = 4, ...props
|
|
|
42
46
|
data-[side=top]:slide-in-from-bottom-2 z-50 w-72
|
|
43
47
|
origin-(--radix-popover-content-transform-origin) rounded-md border
|
|
44
48
|
p-4 shadow-md outline-hidden`, className),
|
|
45
|
-
|
|
46
|
-
|
|
49
|
+
...props
|
|
50
|
+
})
|
|
51
|
+
});
|
|
47
52
|
}
|
|
48
53
|
function PopoverAnchor({ ...props }) {
|
|
49
54
|
return /* @__PURE__ */ jsx(PopoverPrimitive.Anchor, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popover.mjs","names":[],"sources":["../../src/core/popover.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\n\nimport * as PopoverPrimitive from '@radix-ui/react-popover';\n\nimport { cn } from '@repo/ui/utils';\n\nfunction Popover({\n ...props\n}: React.ComponentProps<typeof PopoverPrimitive.Root>) {\n return <PopoverPrimitive.Root data-slot=\"popover\" {...props} />;\n}\n\nfunction PopoverTrigger({\n ...props\n}: React.ComponentProps<typeof PopoverPrimitive.Trigger>) {\n return <PopoverPrimitive.Trigger data-slot=\"popover-trigger\" {...props} />;\n}\n\nfunction PopoverContent({\n className,\n align = 'center',\n sideOffset = 4,\n ...props\n}: React.ComponentProps<typeof PopoverPrimitive.Content>) {\n return (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n data-slot=\"popover-content\"\n align={align}\n sideOffset={sideOffset}\n className={cn(\n `bg-popover text-popover-foreground data-[state=open]:animate-in\n data-[state=closed]:animate-out data-[state=closed]:fade-out-0\n data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95\n data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2\n data-[side=left]:slide-in-from-right-2\n data-[side=right]:slide-in-from-left-2\n data-[side=top]:slide-in-from-bottom-2 z-50 w-72\n origin-(--radix-popover-content-transform-origin) rounded-md border\n p-4 shadow-md outline-hidden`,\n className,\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n );\n}\n\nfunction PopoverAnchor({\n ...props\n}: React.ComponentProps<typeof PopoverPrimitive.Anchor>) {\n return <PopoverPrimitive.Anchor data-slot=\"popover-anchor\" {...props} />;\n}\n\nfunction PopoverHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"popover-header\"\n className={cn('flex flex-col gap-1 text-sm', className)}\n {...props}\n />\n );\n}\n\nfunction PopoverTitle({ className, ...props }: React.ComponentProps<'h2'>) {\n return (\n <div\n data-slot=\"popover-title\"\n className={cn('font-medium', className)}\n {...props}\n />\n );\n}\n\nfunction PopoverDescription({\n className,\n ...props\n}: React.ComponentProps<'p'>) {\n return (\n <p\n data-slot=\"popover-description\"\n className={cn('text-muted-foreground', className)}\n {...props}\n />\n );\n}\n\nexport {\n Popover,\n PopoverTrigger,\n PopoverContent,\n PopoverAnchor,\n PopoverHeader,\n PopoverTitle,\n PopoverDescription,\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"popover.mjs","names":[],"sources":["../../src/core/popover.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\n\nimport * as PopoverPrimitive from '@radix-ui/react-popover';\n\nimport { useConfig } from '@repo/ui/providers';\nimport { cn } from '@repo/ui/utils';\n\nfunction Popover({\n ...props\n}: React.ComponentProps<typeof PopoverPrimitive.Root>) {\n return <PopoverPrimitive.Root data-slot=\"popover\" {...props} />;\n}\n\nfunction PopoverTrigger({\n ...props\n}: React.ComponentProps<typeof PopoverPrimitive.Trigger>) {\n return <PopoverPrimitive.Trigger data-slot=\"popover-trigger\" {...props} />;\n}\n\nfunction PopoverContent({\n className,\n align = 'center',\n sideOffset = 4,\n container,\n ...props\n}: React.ComponentProps<typeof PopoverPrimitive.Content> & {\n container?: HTMLElement;\n}) {\n const { getContainer } = useConfig();\n\n return (\n <PopoverPrimitive.Portal container={container ?? getContainer()}>\n <PopoverPrimitive.Content\n data-slot=\"popover-content\"\n align={align}\n sideOffset={sideOffset}\n className={cn(\n `bg-popover text-popover-foreground data-[state=open]:animate-in\n data-[state=closed]:animate-out data-[state=closed]:fade-out-0\n data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95\n data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2\n data-[side=left]:slide-in-from-right-2\n data-[side=right]:slide-in-from-left-2\n data-[side=top]:slide-in-from-bottom-2 z-50 w-72\n origin-(--radix-popover-content-transform-origin) rounded-md border\n p-4 shadow-md outline-hidden`,\n className,\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n );\n}\n\nfunction PopoverAnchor({\n ...props\n}: React.ComponentProps<typeof PopoverPrimitive.Anchor>) {\n return <PopoverPrimitive.Anchor data-slot=\"popover-anchor\" {...props} />;\n}\n\nfunction PopoverHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"popover-header\"\n className={cn('flex flex-col gap-1 text-sm', className)}\n {...props}\n />\n );\n}\n\nfunction PopoverTitle({ className, ...props }: React.ComponentProps<'h2'>) {\n return (\n <div\n data-slot=\"popover-title\"\n className={cn('font-medium', className)}\n {...props}\n />\n );\n}\n\nfunction PopoverDescription({\n className,\n ...props\n}: React.ComponentProps<'p'>) {\n return (\n <p\n data-slot=\"popover-description\"\n className={cn('text-muted-foreground', className)}\n {...props}\n />\n );\n}\n\nexport {\n Popover,\n PopoverTrigger,\n PopoverContent,\n PopoverAnchor,\n PopoverHeader,\n PopoverTitle,\n PopoverDescription,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;AASA,SAAS,QAAQ,EACf,GAAG,SACkD;AACrD,QAAO,oBAAC,iBAAiB;EAAK,aAAU;EAAU,GAAI;GAAS;;AAGjE,SAAS,eAAe,EACtB,GAAG,SACqD;AACxD,QAAO,oBAAC,iBAAiB;EAAQ,aAAU;EAAkB,GAAI;GAAS;;AAG5E,SAAS,eAAe,EACtB,WACA,QAAQ,UACR,aAAa,GACb,WACA,GAAG,SAGF;CACD,MAAM,EAAE,iBAAiB,WAAW;AAEpC,QACE,oBAAC,iBAAiB;EAAO,WAAW,aAAa,cAAc;YAC7D,oBAAC,iBAAiB;GAChB,aAAU;GACH;GACK;GACZ,WAAW,GACT;;;;;;;;yCASA,UACD;GACD,GAAI;IACJ;GACsB;;AAI9B,SAAS,cAAc,EACrB,GAAG,SACoD;AACvD,QAAO,oBAAC,iBAAiB;EAAO,aAAU;EAAiB,GAAI;GAAS;;AAG1E,SAAS,cAAc,EAAE,WAAW,GAAG,SAAsC;AAC3E,QACE,oBAAC;EACC,aAAU;EACV,WAAW,GAAG,+BAA+B,UAAU;EACvD,GAAI;GACJ;;AAIN,SAAS,aAAa,EAAE,WAAW,GAAG,SAAqC;AACzE,QACE,oBAAC;EACC,aAAU;EACV,WAAW,GAAG,eAAe,UAAU;EACvC,GAAI;GACJ;;AAIN,SAAS,mBAAmB,EAC1B,WACA,GAAG,SACyB;AAC5B,QACE,oBAAC;EACC,aAAU;EACV,WAAW,GAAG,yBAAyB,UAAU;EACjD,GAAI;GACJ"}
|
package/dist/core/select.d.mts
CHANGED
|
@@ -28,8 +28,11 @@ declare function SelectContent({
|
|
|
28
28
|
children,
|
|
29
29
|
position,
|
|
30
30
|
align,
|
|
31
|
+
container,
|
|
31
32
|
...props
|
|
32
|
-
}: React$1.ComponentProps<typeof Select.Content>
|
|
33
|
+
}: React$1.ComponentProps<typeof Select.Content> & {
|
|
34
|
+
container?: HTMLElement;
|
|
35
|
+
}): react_jsx_runtime0.JSX.Element;
|
|
33
36
|
declare function SelectLabel({
|
|
34
37
|
className,
|
|
35
38
|
...props
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.d.mts","names":[],"sources":["../../src/core/select.tsx"],"mappings":";;;;;;;;
|
|
1
|
+
{"version":3,"file":"select.d.mts","names":[],"sources":["../../src/core/select.tsx"],"mappings":";;;;;;;;iBAUS,QAAA,CAAA;EAAA,GACJ;AAAA,GACF,OAAA,CAAM,cAAA,QAAsB,MAAA,CAAgB,IAAA,IAAK,kBAAA,CAAA,GAAA,CAAA,OAAA;AAAA,iBAI3C,WAAA,CAAA;EAAA,GACJ;AAAA,GACF,OAAA,CAAM,cAAA,QAAsB,MAAA,CAAgB,KAAA,IAAM,kBAAA,CAAA,GAAA,CAAA,OAAA;AAAA,iBAI5C,WAAA,CAAA;EAAA,GACJ;AAAA,GACF,OAAA,CAAM,cAAA,QAAsB,MAAA,CAAgB,KAAA,IAAM,kBAAA,CAAA,GAAA,CAAA,OAAA;AAAA,iBAI5C,aAAA,CAAA;EACP,SAAA;EACA,IAAA;EACA,QAAA;EAAA,GACG;AAAA,GACF,OAAA,CAAM,cAAA,QAAsB,MAAA,CAAgB,OAAA;EAC7C,IAAA;AAAA,IACD,kBAAA,CAAA,GAAA,CAAA,OAAA;AAAA,iBA+BQ,aAAA,CAAA;EACP,SAAA;EACA,QAAA;EACA,QAAA;EACA,KAAA;EACA,SAAA;EAAA,GACG;AAAA,GACF,OAAA,CAAM,cAAA,QAAsB,MAAA,CAAgB,OAAA;EAC7C,SAAA,GAAY,WAAA;AAAA,IACb,kBAAA,CAAA,GAAA,CAAA,OAAA;AAAA,iBA4CQ,WAAA,CAAA;EACP,SAAA;EAAA,GACG;AAAA,GACF,OAAA,CAAM,cAAA,QAAsB,MAAA,CAAgB,KAAA,IAAM,kBAAA,CAAA,GAAA,CAAA,OAAA;AAAA,iBAU5C,UAAA,CAAA;EACP,SAAA;EACA,QAAA;EAAA,GACG;AAAA,GACF,OAAA,CAAM,cAAA,QAAsB,MAAA,CAAgB,IAAA,IAAK,kBAAA,CAAA,GAAA,CAAA,OAAA;AAAA,iBA6B3C,eAAA,CAAA;EACP,SAAA;EAAA,GACG;AAAA,GACF,OAAA,CAAM,cAAA,QAAsB,MAAA,CAAgB,SAAA,IAAU,kBAAA,CAAA,GAAA,CAAA,OAAA;AAAA,iBAUhD,oBAAA,CAAA;EACP,SAAA;EAAA,GACG;AAAA,GACF,OAAA,CAAM,cAAA,QAAsB,MAAA,CAAgB,cAAA,IAAe,kBAAA,CAAA,GAAA,CAAA,OAAA;AAAA,iBAerD,sBAAA,CAAA;EACP,SAAA;EAAA,GACG;AAAA,GACF,OAAA,CAAM,cAAA,QAAsB,MAAA,CAAgB,gBAAA,IAAiB,kBAAA,CAAA,GAAA,CAAA,OAAA"}
|
package/dist/core/select.mjs
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { __exportAll } from "../_virtual/_rolldown/runtime.mjs";
|
|
4
4
|
import { cn } from "../utils.mjs";
|
|
5
|
+
import { useConfig } from "../providers/config/context.mjs";
|
|
5
6
|
import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react";
|
|
6
7
|
import "react";
|
|
7
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -62,10 +63,13 @@ function SelectTrigger({ className, size = "default", children, ...props }) {
|
|
|
62
63
|
})]
|
|
63
64
|
});
|
|
64
65
|
}
|
|
65
|
-
function SelectContent({ className, children, position = "item-aligned", align = "center", ...props }) {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
66
|
+
function SelectContent({ className, children, position = "item-aligned", align = "center", container, ...props }) {
|
|
67
|
+
const { getContainer } = useConfig();
|
|
68
|
+
return /* @__PURE__ */ jsx(Select.Portal, {
|
|
69
|
+
container: container ?? getContainer(),
|
|
70
|
+
children: /* @__PURE__ */ jsxs(Select.Content, {
|
|
71
|
+
"data-slot": "select-content",
|
|
72
|
+
className: cn(`bg-popover text-popover-foreground data-[state=open]:animate-in
|
|
69
73
|
data-[state=closed]:animate-out data-[state=closed]:fade-out-0
|
|
70
74
|
data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95
|
|
71
75
|
data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2
|
|
@@ -76,19 +80,20 @@ function SelectContent({ className, children, position = "item-aligned", align =
|
|
|
76
80
|
origin-(--radix-select-content-transform-origin) overflow-x-hidden
|
|
77
81
|
overflow-y-auto rounded-md border shadow-md`, position === "popper" && `data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1
|
|
78
82
|
data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1`, className),
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
83
|
+
position,
|
|
84
|
+
align,
|
|
85
|
+
...props,
|
|
86
|
+
children: [
|
|
87
|
+
/* @__PURE__ */ jsx(SelectScrollUpButton, {}),
|
|
88
|
+
/* @__PURE__ */ jsx(Select.Viewport, {
|
|
89
|
+
className: cn("p-1", position === "popper" && `h-[var(--radix-select-trigger-height)] w-full
|
|
86
90
|
min-w-[var(--radix-select-trigger-width)] scroll-my-1`),
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
91
|
+
children
|
|
92
|
+
}),
|
|
93
|
+
/* @__PURE__ */ jsx(SelectScrollDownButton, {})
|
|
94
|
+
]
|
|
95
|
+
})
|
|
96
|
+
});
|
|
92
97
|
}
|
|
93
98
|
function SelectLabel({ className, ...props }) {
|
|
94
99
|
return /* @__PURE__ */ jsx(Select.Label, {
|
package/dist/core/select.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.mjs","names":["Select","SelectPrimitive"],"sources":["../../src/core/select.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\n\nimport { CheckIcon, ChevronDownIcon, ChevronUpIcon } from 'lucide-react';\nimport { Select as SelectPrimitive } from 'radix-ui';\n\nimport { cn } from '@repo/ui/utils';\n\nfunction Select({\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Root>) {\n return <SelectPrimitive.Root data-slot=\"select\" {...props} />;\n}\n\nfunction SelectGroup({\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Group>) {\n return <SelectPrimitive.Group data-slot=\"select-group\" {...props} />;\n}\n\nfunction SelectValue({\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Value>) {\n return <SelectPrimitive.Value data-slot=\"select-value\" {...props} />;\n}\n\nfunction SelectTrigger({\n className,\n size = 'default',\n children,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Trigger> & {\n size?: 'sm' | 'default';\n}) {\n return (\n <SelectPrimitive.Trigger\n data-slot=\"select-trigger\"\n data-size={size}\n className={cn(\n `border-input data-[placeholder]:text-muted-foreground\n [&_svg:not([class*='text-'])]:text-muted-foreground\n focus-visible:border-ring focus-visible:ring-ring/50\n aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40\n aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50\n flex w-fit items-center justify-between gap-2 rounded-md border\n bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs\n transition-[color,box-shadow] outline-none focus-visible:ring-[3px]\n disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9\n data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1\n *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center\n *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none\n [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,\n className,\n )}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon asChild>\n <ChevronDownIcon className=\"size-4 opacity-50\" />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n );\n}\n\nfunction SelectContent({\n className,\n children,\n position = 'item-aligned',\n align = 'center',\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Content>) {\n return (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n data-slot=\"select-content\"\n className={cn(\n `bg-popover text-popover-foreground data-[state=open]:animate-in\n data-[state=closed]:animate-out data-[state=closed]:fade-out-0\n data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95\n data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2\n data-[side=left]:slide-in-from-right-2\n data-[side=right]:slide-in-from-left-2\n data-[side=top]:slide-in-from-bottom-2 relative z-50\n max-h-(--radix-select-content-available-height) min-w-[8rem]\n origin-(--radix-select-content-transform-origin) overflow-x-hidden\n overflow-y-auto rounded-md border shadow-md`,\n position === 'popper' &&\n `data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1\n data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1`,\n className,\n )}\n position={position}\n align={align}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.Viewport\n className={cn(\n 'p-1',\n position === 'popper' &&\n `h-[var(--radix-select-trigger-height)] w-full\n min-w-[var(--radix-select-trigger-width)] scroll-my-1`,\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n <SelectScrollDownButton />\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n );\n}\n\nfunction SelectLabel({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Label>) {\n return (\n <SelectPrimitive.Label\n data-slot=\"select-label\"\n className={cn('text-muted-foreground px-2 py-1.5 text-xs', className)}\n {...props}\n />\n );\n}\n\nfunction SelectItem({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Item>) {\n return (\n <SelectPrimitive.Item\n data-slot=\"select-item\"\n className={cn(\n `focus:bg-accent focus:text-accent-foreground\n [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full\n cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm\n outline-hidden select-none data-[disabled]:pointer-events-none\n data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0\n [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex\n *:[span]:last:items-center *:[span]:last:gap-2`,\n className,\n )}\n {...props}\n >\n <span\n data-slot=\"select-item-indicator\"\n className=\"absolute right-2 flex size-3.5 items-center justify-center\"\n >\n <SelectPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n );\n}\n\nfunction SelectSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Separator>) {\n return (\n <SelectPrimitive.Separator\n data-slot=\"select-separator\"\n className={cn('bg-border pointer-events-none -mx-1 my-1 h-px', className)}\n {...props}\n />\n );\n}\n\nfunction SelectScrollUpButton({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>) {\n return (\n <SelectPrimitive.ScrollUpButton\n data-slot=\"select-scroll-up-button\"\n className={cn(\n 'flex cursor-default items-center justify-center py-1',\n className,\n )}\n {...props}\n >\n <ChevronUpIcon className=\"size-4\" />\n </SelectPrimitive.ScrollUpButton>\n );\n}\n\nfunction SelectScrollDownButton({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>) {\n return (\n <SelectPrimitive.ScrollDownButton\n data-slot=\"select-scroll-down-button\"\n className={cn(\n 'flex cursor-default items-center justify-center py-1',\n className,\n )}\n {...props}\n >\n <ChevronDownIcon className=\"size-4\" />\n </SelectPrimitive.ScrollDownButton>\n );\n}\n\nexport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectScrollDownButton,\n SelectScrollUpButton,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"select.mjs","names":["Select","SelectPrimitive"],"sources":["../../src/core/select.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\n\nimport { CheckIcon, ChevronDownIcon, ChevronUpIcon } from 'lucide-react';\nimport { Select as SelectPrimitive } from 'radix-ui';\n\nimport { useConfig } from '@repo/ui/providers';\nimport { cn } from '@repo/ui/utils';\n\nfunction Select({\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Root>) {\n return <SelectPrimitive.Root data-slot=\"select\" {...props} />;\n}\n\nfunction SelectGroup({\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Group>) {\n return <SelectPrimitive.Group data-slot=\"select-group\" {...props} />;\n}\n\nfunction SelectValue({\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Value>) {\n return <SelectPrimitive.Value data-slot=\"select-value\" {...props} />;\n}\n\nfunction SelectTrigger({\n className,\n size = 'default',\n children,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Trigger> & {\n size?: 'sm' | 'default';\n}) {\n return (\n <SelectPrimitive.Trigger\n data-slot=\"select-trigger\"\n data-size={size}\n className={cn(\n `border-input data-[placeholder]:text-muted-foreground\n [&_svg:not([class*='text-'])]:text-muted-foreground\n focus-visible:border-ring focus-visible:ring-ring/50\n aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40\n aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50\n flex w-fit items-center justify-between gap-2 rounded-md border\n bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs\n transition-[color,box-shadow] outline-none focus-visible:ring-[3px]\n disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9\n data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1\n *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center\n *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none\n [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,\n className,\n )}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon asChild>\n <ChevronDownIcon className=\"size-4 opacity-50\" />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n );\n}\n\nfunction SelectContent({\n className,\n children,\n position = 'item-aligned',\n align = 'center',\n container,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Content> & {\n container?: HTMLElement;\n}) {\n const { getContainer } = useConfig();\n\n return (\n <SelectPrimitive.Portal container={container ?? getContainer()}>\n <SelectPrimitive.Content\n data-slot=\"select-content\"\n className={cn(\n `bg-popover text-popover-foreground data-[state=open]:animate-in\n data-[state=closed]:animate-out data-[state=closed]:fade-out-0\n data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95\n data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2\n data-[side=left]:slide-in-from-right-2\n data-[side=right]:slide-in-from-left-2\n data-[side=top]:slide-in-from-bottom-2 relative z-50\n max-h-(--radix-select-content-available-height) min-w-[8rem]\n origin-(--radix-select-content-transform-origin) overflow-x-hidden\n overflow-y-auto rounded-md border shadow-md`,\n position === 'popper' &&\n `data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1\n data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1`,\n className,\n )}\n position={position}\n align={align}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.Viewport\n className={cn(\n 'p-1',\n position === 'popper' &&\n `h-[var(--radix-select-trigger-height)] w-full\n min-w-[var(--radix-select-trigger-width)] scroll-my-1`,\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n <SelectScrollDownButton />\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n );\n}\n\nfunction SelectLabel({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Label>) {\n return (\n <SelectPrimitive.Label\n data-slot=\"select-label\"\n className={cn('text-muted-foreground px-2 py-1.5 text-xs', className)}\n {...props}\n />\n );\n}\n\nfunction SelectItem({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Item>) {\n return (\n <SelectPrimitive.Item\n data-slot=\"select-item\"\n className={cn(\n `focus:bg-accent focus:text-accent-foreground\n [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full\n cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm\n outline-hidden select-none data-[disabled]:pointer-events-none\n data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0\n [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex\n *:[span]:last:items-center *:[span]:last:gap-2`,\n className,\n )}\n {...props}\n >\n <span\n data-slot=\"select-item-indicator\"\n className=\"absolute right-2 flex size-3.5 items-center justify-center\"\n >\n <SelectPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n );\n}\n\nfunction SelectSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Separator>) {\n return (\n <SelectPrimitive.Separator\n data-slot=\"select-separator\"\n className={cn('bg-border pointer-events-none -mx-1 my-1 h-px', className)}\n {...props}\n />\n );\n}\n\nfunction SelectScrollUpButton({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>) {\n return (\n <SelectPrimitive.ScrollUpButton\n data-slot=\"select-scroll-up-button\"\n className={cn(\n 'flex cursor-default items-center justify-center py-1',\n className,\n )}\n {...props}\n >\n <ChevronUpIcon className=\"size-4\" />\n </SelectPrimitive.ScrollUpButton>\n );\n}\n\nfunction SelectScrollDownButton({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>) {\n return (\n <SelectPrimitive.ScrollDownButton\n data-slot=\"select-scroll-down-button\"\n className={cn(\n 'flex cursor-default items-center justify-center py-1',\n className,\n )}\n {...props}\n >\n <ChevronDownIcon className=\"size-4\" />\n </SelectPrimitive.ScrollDownButton>\n );\n}\n\nexport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectScrollDownButton,\n SelectScrollUpButton,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAUA,SAASA,SAAO,EACd,GAAG,SACiD;AACpD,QAAO,oBAACC,OAAgB;EAAK,aAAU;EAAS,GAAI;GAAS;;AAG/D,SAAS,YAAY,EACnB,GAAG,SACkD;AACrD,QAAO,oBAACA,OAAgB;EAAM,aAAU;EAAe,GAAI;GAAS;;AAGtE,SAAS,YAAY,EACnB,GAAG,SACkD;AACrD,QAAO,oBAACA,OAAgB;EAAM,aAAU;EAAe,GAAI;GAAS;;AAGtE,SAAS,cAAc,EACrB,WACA,OAAO,WACP,UACA,GAAG,SAGF;AACD,QACE,qBAACA,OAAgB;EACf,aAAU;EACV,aAAW;EACX,WAAW,GACT;;;;;;;;;;;;gEAaA,UACD;EACD,GAAI;aAEH,UACD,oBAACA,OAAgB;GAAK;aACpB,oBAAC,mBAAgB,WAAU,sBAAsB;IAC5B;GACC;;AAI9B,SAAS,cAAc,EACrB,WACA,UACA,WAAW,gBACX,QAAQ,UACR,WACA,GAAG,SAGF;CACD,MAAM,EAAE,iBAAiB,WAAW;AAEpC,QACE,oBAACA,OAAgB;EAAO,WAAW,aAAa,cAAc;YAC5D,qBAACA,OAAgB;GACf,aAAU;GACV,WAAW,GACT;;;;;;;;;wDAUA,aAAa,YACX;6EAEF,UACD;GACS;GACH;GACP,GAAI;;IAEJ,oBAAC,yBAAuB;IACxB,oBAACA,OAAgB;KACf,WAAW,GACT,OACA,aAAa,YACX;qEAEH;KAEA;MACwB;IAC3B,oBAAC,2BAAyB;;IACF;GACH;;AAI7B,SAAS,YAAY,EACnB,WACA,GAAG,SACkD;AACrD,QACE,oBAACA,OAAgB;EACf,aAAU;EACV,WAAW,GAAG,6CAA6C,UAAU;EACrE,GAAI;GACJ;;AAIN,SAAS,WAAW,EAClB,WACA,UACA,GAAG,SACiD;AACpD,QACE,qBAACA,OAAgB;EACf,aAAU;EACV,WAAW,GACT;;;;;;yDAOA,UACD;EACD,GAAI;aAEJ,oBAAC;GACC,aAAU;GACV,WAAU;aAEV,oBAACA,OAAgB,2BACf,oBAAC,aAAU,WAAU,WAAW,GACF;IAC3B,EACP,oBAACA,OAAgB,YAAU,WAAoC;GAC1C;;AAI3B,SAAS,gBAAgB,EACvB,WACA,GAAG,SACsD;AACzD,QACE,oBAACA,OAAgB;EACf,aAAU;EACV,WAAW,GAAG,iDAAiD,UAAU;EACzE,GAAI;GACJ;;AAIN,SAAS,qBAAqB,EAC5B,WACA,GAAG,SAC2D;AAC9D,QACE,oBAACA,OAAgB;EACf,aAAU;EACV,WAAW,GACT,wDACA,UACD;EACD,GAAI;YAEJ,oBAAC,iBAAc,WAAU,WAAW;GACL;;AAIrC,SAAS,uBAAuB,EAC9B,WACA,GAAG,SAC6D;AAChE,QACE,oBAACA,OAAgB;EACf,aAAU;EACV,WAAW,GACT,wDACA,UACD;EACD,GAAI;YAEJ,oBAAC,mBAAgB,WAAU,WAAW;GACL"}
|