@jbpark/ui-kit 3.8.0 → 4.0.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/index.d.mts +28 -15
- package/dist/index.mjs +9 -3
- package/dist/providers/Config/context.d.mts +3 -2
- package/dist/providers/Config/context.d.mts.map +1 -1
- package/dist/providers/Config/context.mjs +13 -2
- package/dist/providers/Config/context.mjs.map +1 -1
- package/dist/providers/Config/index.d.mts +4 -2
- package/dist/providers/Config/index.d.mts.map +1 -1
- package/dist/providers/Config/index.mjs +14 -4
- package/dist/providers/Config/index.mjs.map +1 -1
- package/dist/providers/Config/types.d.mts +10 -1
- package/dist/providers/Config/types.d.mts.map +1 -1
- package/dist/providers.d.mts +4 -0
- package/dist/providers.mjs +4 -0
- package/dist/style.css +114 -0
- package/package.json +3 -3
- 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/index.d.mts
CHANGED
|
@@ -2,10 +2,15 @@ import Button from "./Button.mjs";
|
|
|
2
2
|
import Tag from "./Tag.mjs";
|
|
3
3
|
import Typography from "./Typography.mjs";
|
|
4
4
|
import Card, { Props } from "./Card.mjs";
|
|
5
|
-
import { Menu, Props as Props$
|
|
6
|
-
import { Props as Props$
|
|
5
|
+
import { Menu, Props as Props$14 } from "./components/molecules/menu/menu.mjs";
|
|
6
|
+
import { Props as Props$18 } from "./components/molecules/reveals/reveals.mjs";
|
|
7
7
|
import Reveals from "./Reveals.mjs";
|
|
8
|
-
import Space, { Props as Props$
|
|
8
|
+
import Space, { Props as Props$21 } from "./Space.mjs";
|
|
9
|
+
import { Props as Props$5 } from "./components/templates/layout/content.mjs";
|
|
10
|
+
import { Props as Props$9 } from "./components/templates/layout/footer.mjs";
|
|
11
|
+
import { Props as Props$10 } from "./components/templates/layout/header.mjs";
|
|
12
|
+
import { Props as Props$11 } from "./components/templates/layout/layout.mjs";
|
|
13
|
+
import { Props as Props$20 } from "./components/templates/layout/sider.mjs";
|
|
9
14
|
import Layout from "./Layout.mjs";
|
|
10
15
|
import { Checkbox } from "./components/atoms/checkbox/index.mjs";
|
|
11
16
|
import { ColorPicker } from "./components/atoms/color-picker.mjs";
|
|
@@ -20,23 +25,31 @@ import { Skeleton } from "./components/atoms/skeleton/index.mjs";
|
|
|
20
25
|
import { Spin } from "./components/atoms/spin.mjs";
|
|
21
26
|
import { Switch } from "./components/atoms/switch.mjs";
|
|
22
27
|
import "./components/atoms/index.mjs";
|
|
23
|
-
import { Collapse, Props as Props$
|
|
24
|
-
import { Dropdown, Props as Props$
|
|
25
|
-
import { Props as Props$
|
|
28
|
+
import { Collapse, Props as Props$2 } from "./components/molecules/collapse.mjs";
|
|
29
|
+
import { Dropdown, Props as Props$7 } from "./components/molecules/dropdown.mjs";
|
|
30
|
+
import { Props as Props$13 } from "./components/molecules/marquees/marquees.mjs";
|
|
26
31
|
import { Marquees } from "./components/molecules/marquees/index.mjs";
|
|
27
|
-
import { Props as Props$
|
|
32
|
+
import { Props as Props$22 } from "./components/molecules/splitter/splitter.mjs";
|
|
28
33
|
import { Splitter } from "./components/molecules/splitter/index.mjs";
|
|
29
|
-
import { Props as Props$
|
|
34
|
+
import { Props as Props$24, Upload, UploadFile } from "./components/molecules/upload.mjs";
|
|
30
35
|
import "./components/molecules/index.mjs";
|
|
31
|
-
import { Drawer, Props as Props$
|
|
36
|
+
import { Drawer, Props as Props$6 } from "./components/organisms/drawer.mjs";
|
|
37
|
+
import { Props as Props$12 } from "./components/organisms/list/list.mjs";
|
|
32
38
|
import { List } from "./components/organisms/list/index.mjs";
|
|
33
|
-
import { Modal } from "./components/organisms/modal.mjs";
|
|
39
|
+
import { Modal, Props as Props$15 } from "./components/organisms/modal.mjs";
|
|
40
|
+
import { Props as Props$23 } from "./components/organisms/swiper/swiper.mjs";
|
|
34
41
|
import { Swiper } from "./components/organisms/swiper/index.mjs";
|
|
35
42
|
import { StaticProps, Toast } from "./components/organisms/toast.mjs";
|
|
36
43
|
import "./components/organisms/index.mjs";
|
|
44
|
+
import { Container, Props as Props$4 } from "./components/templates/container.mjs";
|
|
45
|
+
import { Empty, Props as Props$8 } from "./components/templates/empty.mjs";
|
|
46
|
+
import { Props as Props$17, Result } from "./components/templates/result.mjs";
|
|
47
|
+
import { PageHeader, Props as Props$16 } from "./components/templates/page-header.mjs";
|
|
48
|
+
import { Props as Props$19, Row } from "./components/templates/grid/row.mjs";
|
|
49
|
+
import { Col, Props as Props$1 } from "./components/templates/grid/col.mjs";
|
|
37
50
|
import "./components/templates/index.mjs";
|
|
38
|
-
import { ThemeConfig, ThemeToken } from "./providers/Config/types.mjs";
|
|
39
|
-
import { useConfig } from "./providers/Config/context.mjs";
|
|
40
|
-
import { Config, Props as Props$
|
|
41
|
-
import "./providers
|
|
42
|
-
export { Button, Card, Props as CardProps, Checkbox,
|
|
51
|
+
import { Locale, ThemeConfig, ThemeToken } from "./providers/Config/types.mjs";
|
|
52
|
+
import { DEFAULT_LOCALE, useConfig } from "./providers/Config/context.mjs";
|
|
53
|
+
import { Config, Props as Props$3 } from "./providers/Config/index.mjs";
|
|
54
|
+
import "./providers.mjs";
|
|
55
|
+
export { Button, Card, Props as CardProps, Checkbox, Col, Props$1 as ColProps, Collapse, Props$2 as CollapseProps, ColorPicker, Config, Props$3 as ConfigProps, Container, Props$4 as ContainerProps, Props$5 as ContentProps, DEFAULT_LOCALE, DatePicker, Drawer, Props$6 as DrawerProps, Dropdown, Props$7 as DropdownProps, Empty, Props$8 as EmptyProps, FloatButton, Props$9 as FooterProps, Props$10 as HeaderProps, Input, Layout, Props$11 as LayoutProps, List, Props$12 as ListProps, Locale, Marquees, Props$13 as MarqueesProps, Menu, Props$14 as MenuProps, Modal, Props$15 as ModalProps, PageHeader, Props$16 as PageHeaderProps, Popover, Progress, Radio, Result, Props$17 as ResultProps, Reveals, Props$18 as RevealsProps, Row, Props$19 as RowProps, Select, Props$20 as SiderProps, Skeleton, Space, Props$21 as SpaceProps, Spin, Splitter, Props$22 as SplitterProps, Swiper, Props$23 as SwiperProps, Switch, Tag, ThemeConfig, ThemeToken, Toast, StaticProps as ToastOptions, Typography, Upload, UploadFile, Props$24 as UploadProps, useConfig };
|
package/dist/index.mjs
CHANGED
|
@@ -5,6 +5,8 @@ import Typography from "./Typography.mjs";
|
|
|
5
5
|
import Popover from "./components/atoms/popover.mjs";
|
|
6
6
|
import ColorPicker from "./components/atoms/color-picker.mjs";
|
|
7
7
|
import DatePicker from "./components/atoms/date-picker.mjs";
|
|
8
|
+
import { DEFAULT_LOCALE, useConfig } from "./providers/Config/context.mjs";
|
|
9
|
+
import Config from "./providers/Config/index.mjs";
|
|
8
10
|
import FloatButton from "./components/atoms/float-button/index.mjs";
|
|
9
11
|
import Input from "./components/atoms/input/index.mjs";
|
|
10
12
|
import Progress from "./components/atoms/progress.mjs";
|
|
@@ -29,7 +31,11 @@ import Modal from "./components/organisms/modal.mjs";
|
|
|
29
31
|
import Swiper from "./components/organisms/swiper/index.mjs";
|
|
30
32
|
import Toast from "./components/organisms/toast.mjs";
|
|
31
33
|
import Layout from "./Layout.mjs";
|
|
32
|
-
import
|
|
33
|
-
import
|
|
34
|
+
import Container from "./components/templates/container.mjs";
|
|
35
|
+
import Empty from "./components/templates/empty.mjs";
|
|
36
|
+
import Result from "./components/templates/result.mjs";
|
|
37
|
+
import PageHeader from "./components/templates/page-header.mjs";
|
|
38
|
+
import Row from "./components/templates/grid/row.mjs";
|
|
39
|
+
import Col from "./components/templates/grid/col.mjs";
|
|
34
40
|
|
|
35
|
-
export { Button, Card, Checkbox, Collapse, ColorPicker, Config, DatePicker, Drawer, Dropdown, FloatButton, Input, Layout, List, Marquees, Menu, Modal, Popover, Progress, Radio, Reveals, Select, Skeleton, Space, Spin, Splitter, Swiper, Switch, Tag, Toast, Typography, Upload, useConfig };
|
|
41
|
+
export { Button, Card, Checkbox, Col, Collapse, ColorPicker, Config, Container, DEFAULT_LOCALE, DatePicker, Drawer, Dropdown, Empty, FloatButton, Input, Layout, List, Marquees, Menu, Modal, PageHeader, Popover, Progress, Radio, Result, Reveals, Row, Select, Skeleton, Space, Spin, Splitter, Swiper, Switch, Tag, Toast, Typography, Upload, useConfig };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { ContextValue } from "./types.mjs";
|
|
1
|
+
import { ContextValue, Locale } from "./types.mjs";
|
|
2
2
|
import "react";
|
|
3
3
|
|
|
4
4
|
//#region src/providers/Config/context.d.ts
|
|
5
|
+
declare const DEFAULT_LOCALE: Required<Locale>;
|
|
5
6
|
declare const useConfig: () => ContextValue;
|
|
6
7
|
//#endregion
|
|
7
|
-
export { useConfig };
|
|
8
|
+
export { DEFAULT_LOCALE, useConfig };
|
|
8
9
|
//# sourceMappingURL=context.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.mts","names":[],"sources":["../../../src/providers/Config/context.ts"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"context.d.mts","names":[],"sources":["../../../src/providers/Config/context.ts"],"mappings":";;;;cAMa,cAAA,EAAgB,QAAA,CAAS,MAAA;AAAA,cAczB,SAAA,QAAS,YAAA"}
|
|
@@ -3,9 +3,20 @@
|
|
|
3
3
|
import { createContext, useContext } from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/providers/Config/context.ts
|
|
6
|
-
const
|
|
6
|
+
const DEFAULT_LOCALE = {
|
|
7
|
+
close: "닫기",
|
|
8
|
+
clear: "지우기",
|
|
9
|
+
backToTop: "맨 위로",
|
|
10
|
+
loading: "로딩 중",
|
|
11
|
+
expand: "펼치기",
|
|
12
|
+
collapse: "접기"
|
|
13
|
+
};
|
|
14
|
+
const Context = createContext({
|
|
15
|
+
theme: {},
|
|
16
|
+
locale: DEFAULT_LOCALE
|
|
17
|
+
});
|
|
7
18
|
const useConfig = () => useContext(Context);
|
|
8
19
|
|
|
9
20
|
//#endregion
|
|
10
|
-
export { Context, useConfig };
|
|
21
|
+
export { Context, DEFAULT_LOCALE, useConfig };
|
|
11
22
|
//# sourceMappingURL=context.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.mjs","names":[],"sources":["../../../src/providers/Config/context.ts"],"sourcesContent":["'use client';\n\nimport { createContext, useContext } from 'react';\n\nimport type { ContextValue } from './types';\n\nexport const Context = createContext<ContextValue>({\n theme: {},\n});\n\nexport const useConfig = () => useContext(Context);\n"],"mappings":";;;;;AAMA,MAAa,UAAU,cAA4B,
|
|
1
|
+
{"version":3,"file":"context.mjs","names":[],"sources":["../../../src/providers/Config/context.ts"],"sourcesContent":["'use client';\n\nimport { createContext, useContext } from 'react';\n\nimport type { ContextValue, Locale } from './types';\n\nexport const DEFAULT_LOCALE: Required<Locale> = {\n close: '닫기',\n clear: '지우기',\n backToTop: '맨 위로',\n loading: '로딩 중',\n expand: '펼치기',\n collapse: '접기',\n};\n\nexport const Context = createContext<ContextValue>({\n theme: {},\n locale: DEFAULT_LOCALE,\n});\n\nexport const useConfig = () => useContext(Context);\n"],"mappings":";;;;;AAMA,MAAa,iBAAmC;CAC9C,OAAO;CACP,OAAO;CACP,WAAW;CACX,SAAS;CACT,QAAQ;CACR,UAAU;CACX;AAED,MAAa,UAAU,cAA4B;CACjD,OAAO,EAAE;CACT,QAAQ;CACT,CAAC;AAEF,MAAa,kBAAkB,WAAW,QAAQ"}
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
import { ThemeConfig, ThemeToken } from "./types.mjs";
|
|
2
|
-
import { useConfig } from "./context.mjs";
|
|
1
|
+
import { Locale, ThemeConfig, ThemeToken } from "./types.mjs";
|
|
2
|
+
import { DEFAULT_LOCALE, useConfig } from "./context.mjs";
|
|
3
3
|
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
4
|
|
|
5
5
|
//#region src/providers/Config/index.d.ts
|
|
6
6
|
interface Props {
|
|
7
7
|
theme?: ThemeConfig;
|
|
8
|
+
locale?: Locale;
|
|
8
9
|
className?: string;
|
|
9
10
|
children: React.ReactNode;
|
|
10
11
|
}
|
|
11
12
|
declare const Config: ({
|
|
12
13
|
theme,
|
|
14
|
+
locale,
|
|
13
15
|
className,
|
|
14
16
|
children
|
|
15
17
|
}: Props) => react_jsx_runtime0.JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../../../src/providers/Config/index.tsx"],"mappings":";;;;;UAmDU,KAAA;EACR,KAAA,GAAQ,WAAA;EACR,SAAA;EACA,QAAA,EAAU,KAAA,CAAM,SAAA;AAAA;AAAA,cAGZ,MAAA;EAAU,KAAA;EAAA,SAAA;EAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../../../src/providers/Config/index.tsx"],"mappings":";;;;;UAmDU,KAAA;EACR,KAAA,GAAQ,WAAA;EACR,MAAA,GAAS,MAAA;EACT,SAAA;EACA,QAAA,EAAU,KAAA,CAAM,SAAA;AAAA;AAAA,cAGZ,MAAA;EAAU,KAAA;EAAA,MAAA;EAAA,SAAA;EAAA;AAAA,GAAkD,KAAA,KAAK,kBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import { cn } from "../../utils.mjs";
|
|
4
|
-
import { Context, useConfig } from "./context.mjs";
|
|
4
|
+
import { Context, DEFAULT_LOCALE, useConfig } from "./context.mjs";
|
|
5
5
|
import { useMemo } from "react";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
7
|
|
|
@@ -37,9 +37,12 @@ const buildCssVars = (token) => {
|
|
|
37
37
|
}
|
|
38
38
|
return vars;
|
|
39
39
|
};
|
|
40
|
-
const Config = ({ theme = {}, className, children }) => {
|
|
40
|
+
const Config = ({ theme = {}, locale = {}, className, children }) => {
|
|
41
41
|
const parent = useConfig();
|
|
42
42
|
const themeKey = JSON.stringify(theme);
|
|
43
|
+
const parentThemeKey = JSON.stringify(parent.theme);
|
|
44
|
+
const localeKey = JSON.stringify(locale);
|
|
45
|
+
const parentLocaleKey = JSON.stringify(parent.locale);
|
|
43
46
|
const mergedTheme = useMemo(() => ({
|
|
44
47
|
...parent.theme,
|
|
45
48
|
...theme,
|
|
@@ -47,8 +50,15 @@ const Config = ({ theme = {}, className, children }) => {
|
|
|
47
50
|
...parent.theme.token,
|
|
48
51
|
...theme.token
|
|
49
52
|
}
|
|
50
|
-
}), [
|
|
51
|
-
const
|
|
53
|
+
}), [parentThemeKey, themeKey]);
|
|
54
|
+
const mergedLocale = useMemo(() => ({
|
|
55
|
+
...parent.locale,
|
|
56
|
+
...locale
|
|
57
|
+
}), [parentLocaleKey, localeKey]);
|
|
58
|
+
const contextValue = useMemo(() => ({
|
|
59
|
+
theme: mergedTheme,
|
|
60
|
+
locale: mergedLocale
|
|
61
|
+
}), [mergedTheme, mergedLocale]);
|
|
52
62
|
const cssVars = useMemo(() => buildCssVars(mergedTheme.token), [mergedTheme.token]);
|
|
53
63
|
const hasCssVars = Object.keys(cssVars).length > 0;
|
|
54
64
|
const hasDarkMode = mergedTheme.dark !== void 0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../../../src/providers/Config/index.tsx"],"sourcesContent":["'use client';\n\nimport { useMemo } from 'react';\n\nimport { cn } from '@repo/ui/utils';\n\nimport { Context, useConfig } from './context';\nimport type { ThemeConfig, ThemeToken } from './types';\n\nconst tokenToCssVar: Record<keyof ThemeToken, string> = {\n colorPrimary: '--primary',\n colorPrimaryForeground: '--primary-foreground',\n colorBackground: '--background',\n colorForeground: '--foreground',\n colorCard: '--card',\n colorCardForeground: '--card-foreground',\n colorPopover: '--popover',\n colorPopoverForeground: '--popover-foreground',\n colorSecondary: '--secondary',\n colorSecondaryForeground: '--secondary-foreground',\n colorMuted: '--muted',\n colorMutedForeground: '--muted-foreground',\n colorAccent: '--accent',\n colorAccentForeground: '--accent-foreground',\n colorDestructive: '--destructive',\n colorBorder: '--border',\n colorInput: '--input',\n colorRing: '--ring',\n borderRadius: '--radius',\n};\n\nconst buildCssVars = (token?: ThemeToken): React.CSSProperties => {\n if (!token) {\n return {};\n }\n\n const vars: Record<string, string> = {};\n\n for (const [key, value] of Object.entries(token)) {\n if (value === undefined) {\n continue;\n }\n const cssVar = tokenToCssVar[key as keyof ThemeToken];\n if (cssVar) {\n vars[cssVar] = value;\n }\n }\n\n return vars as React.CSSProperties;\n};\n\ninterface Props {\n theme?: ThemeConfig;\n className?: string;\n children: React.ReactNode;\n}\n\nconst Config = ({ theme = {}, className, children }: Props) => {\n const parent = useConfig();\n\n // `theme` is typically a fresh inline object literal at the call site\n // (and `parent.theme` inherits the same problem from its own Config\n // ancestor), so depending on them directly meant mergedTheme/contextValue\n // got a new identity on every render regardless of whether the actual\n // values changed — every useConfig() consumer in the tree re-rendered on\n // every render of whatever's above this Config, which for the common\n // app-root usage is everything. Depend on a serialized key instead so\n // the memo only invalidates when the content actually changes; these\n // are small, string/boolean-only objects, so JSON.stringify is cheap.\n const themeKey = JSON.stringify(theme);\n const parentThemeKey = JSON.stringify(parent.theme);\n\n const mergedTheme = useMemo<ThemeConfig>(\n () => ({\n ...parent.theme,\n ...theme,\n token: {\n ...parent.theme.token,\n ...theme.token,\n },\n }),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [parentThemeKey, themeKey],\n );\n\n const contextValue = useMemo(() => ({ theme: mergedTheme }),
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../../src/providers/Config/index.tsx"],"sourcesContent":["'use client';\n\nimport { useMemo } from 'react';\n\nimport { cn } from '@repo/ui/utils';\n\nimport { Context, DEFAULT_LOCALE, useConfig } from './context';\nimport type { Locale, ThemeConfig, ThemeToken } from './types';\n\nconst tokenToCssVar: Record<keyof ThemeToken, string> = {\n colorPrimary: '--primary',\n colorPrimaryForeground: '--primary-foreground',\n colorBackground: '--background',\n colorForeground: '--foreground',\n colorCard: '--card',\n colorCardForeground: '--card-foreground',\n colorPopover: '--popover',\n colorPopoverForeground: '--popover-foreground',\n colorSecondary: '--secondary',\n colorSecondaryForeground: '--secondary-foreground',\n colorMuted: '--muted',\n colorMutedForeground: '--muted-foreground',\n colorAccent: '--accent',\n colorAccentForeground: '--accent-foreground',\n colorDestructive: '--destructive',\n colorBorder: '--border',\n colorInput: '--input',\n colorRing: '--ring',\n borderRadius: '--radius',\n};\n\nconst buildCssVars = (token?: ThemeToken): React.CSSProperties => {\n if (!token) {\n return {};\n }\n\n const vars: Record<string, string> = {};\n\n for (const [key, value] of Object.entries(token)) {\n if (value === undefined) {\n continue;\n }\n const cssVar = tokenToCssVar[key as keyof ThemeToken];\n if (cssVar) {\n vars[cssVar] = value;\n }\n }\n\n return vars as React.CSSProperties;\n};\n\ninterface Props {\n theme?: ThemeConfig;\n locale?: Locale;\n className?: string;\n children: React.ReactNode;\n}\n\nconst Config = ({ theme = {}, locale = {}, className, children }: Props) => {\n const parent = useConfig();\n\n // `theme` is typically a fresh inline object literal at the call site\n // (and `parent.theme` inherits the same problem from its own Config\n // ancestor), so depending on them directly meant mergedTheme/contextValue\n // got a new identity on every render regardless of whether the actual\n // values changed — every useConfig() consumer in the tree re-rendered on\n // every render of whatever's above this Config, which for the common\n // app-root usage is everything. Depend on a serialized key instead so\n // the memo only invalidates when the content actually changes; these\n // are small, string/boolean-only objects, so JSON.stringify is cheap.\n const themeKey = JSON.stringify(theme);\n const parentThemeKey = JSON.stringify(parent.theme);\n const localeKey = JSON.stringify(locale);\n const parentLocaleKey = JSON.stringify(parent.locale);\n\n const mergedTheme = useMemo<ThemeConfig>(\n () => ({\n ...parent.theme,\n ...theme,\n token: {\n ...parent.theme.token,\n ...theme.token,\n },\n }),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [parentThemeKey, themeKey],\n );\n\n const mergedLocale = useMemo<Locale>(\n () => ({\n ...parent.locale,\n ...locale,\n }),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [parentLocaleKey, localeKey],\n );\n\n const contextValue = useMemo(\n () => ({ theme: mergedTheme, locale: mergedLocale }),\n [mergedTheme, mergedLocale],\n );\n\n const cssVars = useMemo(\n () => buildCssVars(mergedTheme.token),\n [mergedTheme.token],\n );\n\n const hasCssVars = Object.keys(cssVars).length > 0;\n const hasDarkMode = mergedTheme.dark !== undefined;\n const needsWrapper = hasCssVars || hasDarkMode || className;\n\n return (\n <Context.Provider value={contextValue}>\n {needsWrapper ? (\n <div\n className={cn(mergedTheme.dark && 'dark', className)}\n style={{\n ...(hasCssVars ? cssVars : undefined),\n // Keeps this element out of the layout box tree — so it\n // doesn't intercept flex/grid child relationships or break\n // height chains like min-h-screen — while custom properties\n // and the `dark` class selector still cascade to children\n // normally (inheritance and box generation are separate\n // mechanisms in CSS). Note this means className shouldn't be\n // used here for anything that needs a real box (padding,\n // background, borders); Config's className is meant for\n // theming hooks (the `dark` class, arbitrary selector hooks),\n // not layout.\n display: 'contents',\n }}\n >\n {children}\n </div>\n ) : (\n children\n )}\n </Context.Provider>\n );\n};\n\nexport default Config;\nexport { useConfig, DEFAULT_LOCALE };\nexport type { Props, Locale, ThemeConfig, ThemeToken };\n"],"mappings":";;;;;;;;AASA,MAAM,gBAAkD;CACtD,cAAc;CACd,wBAAwB;CACxB,iBAAiB;CACjB,iBAAiB;CACjB,WAAW;CACX,qBAAqB;CACrB,cAAc;CACd,wBAAwB;CACxB,gBAAgB;CAChB,0BAA0B;CAC1B,YAAY;CACZ,sBAAsB;CACtB,aAAa;CACb,uBAAuB;CACvB,kBAAkB;CAClB,aAAa;CACb,YAAY;CACZ,WAAW;CACX,cAAc;CACf;AAED,MAAM,gBAAgB,UAA4C;AAChE,KAAI,CAAC,MACH,QAAO,EAAE;CAGX,MAAM,OAA+B,EAAE;AAEvC,MAAK,MAAM,CAAC,KAAK,UAAU,OAAO,QAAQ,MAAM,EAAE;AAChD,MAAI,UAAU,OACZ;EAEF,MAAM,SAAS,cAAc;AAC7B,MAAI,OACF,MAAK,UAAU;;AAInB,QAAO;;AAUT,MAAM,UAAU,EAAE,QAAQ,EAAE,EAAE,SAAS,EAAE,EAAE,WAAW,eAAsB;CAC1E,MAAM,SAAS,WAAW;CAW1B,MAAM,WAAW,KAAK,UAAU,MAAM;CACtC,MAAM,iBAAiB,KAAK,UAAU,OAAO,MAAM;CACnD,MAAM,YAAY,KAAK,UAAU,OAAO;CACxC,MAAM,kBAAkB,KAAK,UAAU,OAAO,OAAO;CAErD,MAAM,cAAc,eACX;EACL,GAAG,OAAO;EACV,GAAG;EACH,OAAO;GACL,GAAG,OAAO,MAAM;GAChB,GAAG,MAAM;GACV;EACF,GAED,CAAC,gBAAgB,SAAS,CAC3B;CAED,MAAM,eAAe,eACZ;EACL,GAAG,OAAO;EACV,GAAG;EACJ,GAED,CAAC,iBAAiB,UAAU,CAC7B;CAED,MAAM,eAAe,eACZ;EAAE,OAAO;EAAa,QAAQ;EAAc,GACnD,CAAC,aAAa,aAAa,CAC5B;CAED,MAAM,UAAU,cACR,aAAa,YAAY,MAAM,EACrC,CAAC,YAAY,MAAM,CACpB;CAED,MAAM,aAAa,OAAO,KAAK,QAAQ,CAAC,SAAS;CACjD,MAAM,cAAc,YAAY,SAAS;CACzC,MAAM,eAAe,cAAc,eAAe;AAElD,QACE,oBAAC,QAAQ;EAAS,OAAO;YACtB,eACC,oBAAC;GACC,WAAW,GAAG,YAAY,QAAQ,QAAQ,UAAU;GACpD,OAAO;IACL,GAAI,aAAa,UAAU;IAW3B,SAAS;IACV;GAEA;IACG,GAEN;GAEe"}
|
|
@@ -24,9 +24,18 @@ interface ThemeConfig {
|
|
|
24
24
|
token?: ThemeToken;
|
|
25
25
|
dark?: boolean;
|
|
26
26
|
}
|
|
27
|
+
interface Locale {
|
|
28
|
+
close?: string;
|
|
29
|
+
clear?: string;
|
|
30
|
+
backToTop?: string;
|
|
31
|
+
loading?: string;
|
|
32
|
+
expand?: string;
|
|
33
|
+
collapse?: string;
|
|
34
|
+
}
|
|
27
35
|
interface ContextValue {
|
|
28
36
|
theme: ThemeConfig;
|
|
37
|
+
locale: Locale;
|
|
29
38
|
}
|
|
30
39
|
//#endregion
|
|
31
|
-
export { ContextValue, ThemeConfig, ThemeToken };
|
|
40
|
+
export { ContextValue, Locale, ThemeConfig, ThemeToken };
|
|
32
41
|
//# sourceMappingURL=types.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.mts","names":[],"sources":["../../../src/providers/Config/types.ts"],"mappings":";UAAiB,UAAA;EAEf,YAAA;EACA,sBAAA;EACA,eAAA;EACA,eAAA;EACA,SAAA;EACA,mBAAA;EACA,YAAA;EACA,sBAAA;EACA,cAAA;EACA,wBAAA;EACA,UAAA;EACA,oBAAA;EACA,WAAA;EACA,qBAAA;EACA,gBAAA;EACA,WAAA;EACA,UAAA;EACA,SAAA;EAGA,YAAA;AAAA;AAAA,UAGe,WAAA;EACf,KAAA,GAAQ,UAAA;EACR,IAAA;AAAA;AAAA,UAGe,YAAA;EACf,KAAA,EAAO,WAAA;AAAA"}
|
|
1
|
+
{"version":3,"file":"types.d.mts","names":[],"sources":["../../../src/providers/Config/types.ts"],"mappings":";UAAiB,UAAA;EAEf,YAAA;EACA,sBAAA;EACA,eAAA;EACA,eAAA;EACA,SAAA;EACA,mBAAA;EACA,YAAA;EACA,sBAAA;EACA,cAAA;EACA,wBAAA;EACA,UAAA;EACA,oBAAA;EACA,WAAA;EACA,qBAAA;EACA,gBAAA;EACA,WAAA;EACA,UAAA;EACA,SAAA;EAGA,YAAA;AAAA;AAAA,UAGe,WAAA;EACf,KAAA,GAAQ,UAAA;EACR,IAAA;AAAA;AAAA,UAQe,MAAA;EACf,KAAA;EACA,KAAA;EACA,SAAA;EACA,OAAA;EACA,MAAA;EACA,QAAA;AAAA;AAAA,UAGe,YAAA;EACf,KAAA,EAAO,WAAA;EACP,MAAA,EAAQ,MAAA;AAAA"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Locale, ThemeConfig, ThemeToken } from "./providers/Config/types.mjs";
|
|
2
|
+
import { DEFAULT_LOCALE, useConfig } from "./providers/Config/context.mjs";
|
|
3
|
+
import { Config, Props } from "./providers/Config/index.mjs";
|
|
4
|
+
export { Config, type Props as ConfigProps, DEFAULT_LOCALE, type Locale, type ThemeConfig, type ThemeToken, useConfig };
|