@yeongseoksong/framework 1.6.2 → 1.7.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/README.md +63 -1
- package/dist/platform/index.d.mts +40 -0
- package/dist/platform/index.mjs +30 -0
- package/dist/ui/index.mjs +104 -102
- package/dist/util/index.d.mts +50 -1
- package/dist/util/index.mjs +68 -0
- package/package.json +14 -33
- package/dist/store/index.cjs +0 -393
- package/dist/store/index.d.ts +0 -237
- package/dist/types/index.cjs +0 -18
- package/dist/types/index.d.ts +0 -105
- package/dist/ui/index.cjs +0 -3136
- package/dist/ui/index.d.ts +0 -1347
- package/dist/util/index.cjs +0 -199
- package/dist/util/index.d.ts +0 -114
package/dist/ui/index.mjs
CHANGED
|
@@ -42,6 +42,8 @@ var _a2;
|
|
|
42
42
|
var LOGO_SRC = (_a2 = process.env.NEXT_PUBLIC_LOGO_SRC) != null ? _a2 : "/logo.svg";
|
|
43
43
|
var _a3;
|
|
44
44
|
var LOGO_ALT = (_a3 = process.env.NEXT_PUBLIC_LOGO_ALT) != null ? _a3 : "\uB85C\uACE0";
|
|
45
|
+
var _a4;
|
|
46
|
+
var API_BASE_URL = (_a4 = process.env.NEXT_PUBLIC_API_BASE_URL) != null ? _a4 : "";
|
|
45
47
|
|
|
46
48
|
// ui/atom/Logo.tsx
|
|
47
49
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -59,24 +61,24 @@ import { Box, Tabs } from "@mantine/core";
|
|
|
59
61
|
// ui/atom/Container.tsx
|
|
60
62
|
import { Container } from "@mantine/core";
|
|
61
63
|
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
62
|
-
function SdContainer(
|
|
63
|
-
var _b =
|
|
64
|
+
function SdContainer(_a5) {
|
|
65
|
+
var _b = _a5, { children } = _b, props = __objRest(_b, ["children"]);
|
|
64
66
|
return /* @__PURE__ */ jsx2(Container, __spreadProps(__spreadValues({ px: { base: "md", sm: "xl" } }, props), { children }));
|
|
65
67
|
}
|
|
66
68
|
|
|
67
69
|
// ui/atom/Tabs.tsx
|
|
68
70
|
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
69
|
-
function SdPanel(
|
|
70
|
-
var _b =
|
|
71
|
+
function SdPanel(_a5) {
|
|
72
|
+
var _b = _a5, { children } = _b, props = __objRest(_b, ["children"]);
|
|
71
73
|
return /* @__PURE__ */ jsx3(Tabs.Panel, __spreadProps(__spreadValues({}, props), { children: /* @__PURE__ */ jsx3(SdContainer, { py: "xl", children }) }));
|
|
72
74
|
}
|
|
73
|
-
function SdScrollableList(
|
|
74
|
-
var _b =
|
|
75
|
+
function SdScrollableList(_a5) {
|
|
76
|
+
var _b = _a5, { children } = _b, props = __objRest(_b, ["children"]);
|
|
75
77
|
return /* @__PURE__ */ jsx3(Box, { style: { overflowX: "auto", width: "100%" }, children: /* @__PURE__ */ jsx3(Tabs.List, __spreadProps(__spreadValues({}, props), { children })) });
|
|
76
78
|
}
|
|
77
79
|
function createTabs(defaults, scrollable = false) {
|
|
78
|
-
function SdTabsRoot(
|
|
79
|
-
var _b =
|
|
80
|
+
function SdTabsRoot(_a5) {
|
|
81
|
+
var _b = _a5, { syncHash, value, onChange } = _b, props = __objRest(_b, ["syncHash", "value", "onChange"]);
|
|
80
82
|
const [hashValue, setHashValue] = useState(null);
|
|
81
83
|
useEffect(() => {
|
|
82
84
|
if (!syncHash) return;
|
|
@@ -171,8 +173,8 @@ function t(text) {
|
|
|
171
173
|
// ui/atom/Title.tsx
|
|
172
174
|
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
173
175
|
function createTitle(defaults) {
|
|
174
|
-
return function SdTitle2(
|
|
175
|
-
var _b =
|
|
176
|
+
return function SdTitle2(_a5) {
|
|
177
|
+
var _b = _a5, { children } = _b, props = __objRest(_b, ["children"]);
|
|
176
178
|
const resolved = typeof children === "string" ? t(children) : children;
|
|
177
179
|
return /* @__PURE__ */ jsx4(MantineTitle, __spreadProps(__spreadValues(__spreadValues({}, defaults), props), { children: resolved }));
|
|
178
180
|
};
|
|
@@ -226,8 +228,8 @@ var textStyles = {
|
|
|
226
228
|
// ui/atom/Text.tsx
|
|
227
229
|
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
228
230
|
function createText(defaults) {
|
|
229
|
-
return function SdText2(
|
|
230
|
-
var _b =
|
|
231
|
+
return function SdText2(_a5) {
|
|
232
|
+
var _b = _a5, { children } = _b, props = __objRest(_b, ["children"]);
|
|
231
233
|
const resolved = typeof children === "string" ? t(children) : children;
|
|
232
234
|
return /* @__PURE__ */ jsx5(MantineText, __spreadProps(__spreadValues(__spreadValues({}, defaults), props), { children: resolved }));
|
|
233
235
|
};
|
|
@@ -254,8 +256,8 @@ import { Button as MantineButton } from "@mantine/core";
|
|
|
254
256
|
import { IconDownload, IconFileSpreadsheet, IconSend, IconTrash, IconX } from "@tabler/icons-react";
|
|
255
257
|
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
256
258
|
function createButton(defaults, defaultLabel) {
|
|
257
|
-
return function SdButton2(
|
|
258
|
-
var _b =
|
|
259
|
+
return function SdButton2(_a5) {
|
|
260
|
+
var _b = _a5, { children } = _b, props = __objRest(_b, ["children"]);
|
|
259
261
|
return /* @__PURE__ */ jsx6(MantineButton, __spreadProps(__spreadValues(__spreadValues({}, defaults), props), { children: children != null ? children : defaultLabel }));
|
|
260
262
|
};
|
|
261
263
|
}
|
|
@@ -317,12 +319,12 @@ function QuoteInner({ lines, name, role }) {
|
|
|
317
319
|
] })
|
|
318
320
|
] });
|
|
319
321
|
}
|
|
320
|
-
function Plain(
|
|
321
|
-
var _b =
|
|
322
|
+
function Plain(_a5) {
|
|
323
|
+
var _b = _a5, { lines, name, role } = _b, boxProps = __objRest(_b, ["lines", "name", "role"]);
|
|
322
324
|
return /* @__PURE__ */ jsx7(Center, { children: /* @__PURE__ */ jsx7(Box2, __spreadProps(__spreadValues({ w: "fit-content" }, boxProps), { children: /* @__PURE__ */ jsx7(QuoteInner, { lines, name, role }) })) });
|
|
323
325
|
}
|
|
324
|
-
function CardQuote(
|
|
325
|
-
var _b =
|
|
326
|
+
function CardQuote(_a5) {
|
|
327
|
+
var _b = _a5, { lines, name, role } = _b, boxProps = __objRest(_b, ["lines", "name", "role"]);
|
|
326
328
|
return /* @__PURE__ */ jsx7(Center, { children: /* @__PURE__ */ jsx7(Card, __spreadProps(__spreadValues({ w: "fit-content" }, boxProps), { children: /* @__PURE__ */ jsx7(QuoteInner, { lines, name, role }) })) });
|
|
327
329
|
}
|
|
328
330
|
var SdQuote = {
|
|
@@ -355,12 +357,12 @@ var base = {
|
|
|
355
357
|
verticalSpacing: "sm",
|
|
356
358
|
horizontalSpacing: "md"
|
|
357
359
|
};
|
|
358
|
-
function SpecTh(
|
|
359
|
-
var _b =
|
|
360
|
+
function SpecTh(_a5) {
|
|
361
|
+
var _b = _a5, { children } = _b, props = __objRest(_b, ["children"]);
|
|
360
362
|
return /* @__PURE__ */ jsx8(Table.Th, __spreadProps(__spreadValues({}, props), { children: /* @__PURE__ */ jsx8(SdText.Strong, { c: "white", children }) }));
|
|
361
363
|
}
|
|
362
|
-
function SpecTd(
|
|
363
|
-
var _b =
|
|
364
|
+
function SpecTd(_a5) {
|
|
365
|
+
var _b = _a5, { children } = _b, props = __objRest(_b, ["children"]);
|
|
364
366
|
return /* @__PURE__ */ jsx8(Table.Td, __spreadProps(__spreadValues({}, props), { children: /* @__PURE__ */ jsx8(SdText.Body, { children }) }));
|
|
365
367
|
}
|
|
366
368
|
var Spec = createTable(__spreadProps(__spreadValues({}, base), {
|
|
@@ -401,8 +403,8 @@ var SdModal = createModal({
|
|
|
401
403
|
// ui/atom/NumberIcon.tsx
|
|
402
404
|
import { ThemeIcon } from "@mantine/core";
|
|
403
405
|
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
404
|
-
function SdNumberIcon(
|
|
405
|
-
var _b =
|
|
406
|
+
function SdNumberIcon(_a5) {
|
|
407
|
+
var _b = _a5, {
|
|
406
408
|
value,
|
|
407
409
|
size = 48,
|
|
408
410
|
radius = "xl",
|
|
@@ -420,8 +422,8 @@ function SdNumberIcon(_a4) {
|
|
|
420
422
|
import { Badge as MantineBadge } from "@mantine/core";
|
|
421
423
|
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
422
424
|
function createBadge(defaults) {
|
|
423
|
-
return function SdBadge2(
|
|
424
|
-
var _b =
|
|
425
|
+
return function SdBadge2(_a5) {
|
|
426
|
+
var _b = _a5, { children } = _b, props = __objRest(_b, ["children"]);
|
|
425
427
|
return /* @__PURE__ */ jsx11(MantineBadge, __spreadProps(__spreadValues(__spreadValues({}, defaults), props), { children }));
|
|
426
428
|
};
|
|
427
429
|
}
|
|
@@ -477,8 +479,8 @@ function createInput(Component, defaults) {
|
|
|
477
479
|
};
|
|
478
480
|
}
|
|
479
481
|
function createWrappedInput(Component, defaults) {
|
|
480
|
-
return function SdWrappedInput(
|
|
481
|
-
var _b =
|
|
482
|
+
return function SdWrappedInput(_a5) {
|
|
483
|
+
var _b = _a5, {
|
|
482
484
|
label,
|
|
483
485
|
description,
|
|
484
486
|
error,
|
|
@@ -504,8 +506,8 @@ function createWrappedInput(Component, defaults) {
|
|
|
504
506
|
);
|
|
505
507
|
};
|
|
506
508
|
}
|
|
507
|
-
function SdInputRadio(
|
|
508
|
-
var _b =
|
|
509
|
+
function SdInputRadio(_a5) {
|
|
510
|
+
var _b = _a5, { data, orientation = "horizontal" } = _b, props = __objRest(_b, ["data", "orientation"]);
|
|
509
511
|
const Layout = orientation === "vertical" ? Stack2 : Group2;
|
|
510
512
|
return /* @__PURE__ */ jsx12(Radio.Group, __spreadProps(__spreadValues({}, props), { children: /* @__PURE__ */ jsx12(Layout, { gap: "sm", mt: "xs", children: data.map((item) => /* @__PURE__ */ jsx12(Radio, { value: item.value, label: item.label, disabled: item.disabled }, item.value)) }) }));
|
|
511
513
|
}
|
|
@@ -594,20 +596,20 @@ var SdInputTime = SdInput.Time;
|
|
|
594
596
|
// ui/atom/Skeleton.tsx
|
|
595
597
|
import { Box as Box3, Skeleton as MantineSkeleton, Stack as Stack3 } from "@mantine/core";
|
|
596
598
|
import { jsx as jsx13, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
597
|
-
function SkeletonText(
|
|
598
|
-
var _b =
|
|
599
|
+
function SkeletonText(_a5) {
|
|
600
|
+
var _b = _a5, { width = "100%" } = _b, props = __objRest(_b, ["width"]);
|
|
599
601
|
return /* @__PURE__ */ jsx13(MantineSkeleton, __spreadValues({ height: 14, width, radius: "sm" }, props));
|
|
600
602
|
}
|
|
601
|
-
function SkeletonTitle(
|
|
602
|
-
var _b =
|
|
603
|
+
function SkeletonTitle(_a5) {
|
|
604
|
+
var _b = _a5, { width = "60%" } = _b, props = __objRest(_b, ["width"]);
|
|
603
605
|
return /* @__PURE__ */ jsx13(MantineSkeleton, __spreadValues({ height: 20, width, radius: "sm" }, props));
|
|
604
606
|
}
|
|
605
|
-
function SkeletonImage(
|
|
606
|
-
var _b =
|
|
607
|
+
function SkeletonImage(_a5) {
|
|
608
|
+
var _b = _a5, { height = 200 } = _b, props = __objRest(_b, ["height"]);
|
|
607
609
|
return /* @__PURE__ */ jsx13(MantineSkeleton, __spreadValues({ height, radius: "md" }, props));
|
|
608
610
|
}
|
|
609
|
-
function SkeletonAvatar(
|
|
610
|
-
var _b =
|
|
611
|
+
function SkeletonAvatar(_a5) {
|
|
612
|
+
var _b = _a5, { size = 40 } = _b, props = __objRest(_b, ["size"]);
|
|
611
613
|
return /* @__PURE__ */ jsx13(MantineSkeleton, __spreadValues({ height: size, width: size, circle: true }, props));
|
|
612
614
|
}
|
|
613
615
|
function SkeletonCard({ height, lines = 3 }) {
|
|
@@ -661,10 +663,10 @@ function toCssColor(value) {
|
|
|
661
663
|
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
662
664
|
var HOVER_COLOR = "var(--mantine-color-primary-6)";
|
|
663
665
|
function createLink(defaults, Fallback) {
|
|
664
|
-
return function SdLink2(
|
|
665
|
-
var _b =
|
|
666
|
-
var
|
|
667
|
-
const baseColor = toCssColor((
|
|
666
|
+
return function SdLink2(_a5) {
|
|
667
|
+
var _b = _a5, { children, onMouseEnter, onMouseLeave } = _b, props = __objRest(_b, ["children", "onMouseEnter", "onMouseLeave"]);
|
|
668
|
+
var _a6;
|
|
669
|
+
const baseColor = toCssColor((_a6 = props.c) != null ? _a6 : defaults.c);
|
|
668
670
|
const resolved = typeof children === "string" ? t(children) : children;
|
|
669
671
|
if (!props.href) {
|
|
670
672
|
const _b2 = props, { href: _href, target: _target, rel: _rel } = _b2, textProps = __objRest(_b2, ["href", "target", "rel"]);
|
|
@@ -767,8 +769,8 @@ var SdToastClean = SdToast.Clean;
|
|
|
767
769
|
import { Stack as Stack4 } from "@mantine/core";
|
|
768
770
|
import { jsx as jsx16, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
769
771
|
function createTextBox(titleVariant, defaultGap = "xs", descVariant = "Body", color_ = void 0) {
|
|
770
|
-
return function SdTextBox2(
|
|
771
|
-
var _b =
|
|
772
|
+
return function SdTextBox2(_a5) {
|
|
773
|
+
var _b = _a5, {
|
|
772
774
|
label,
|
|
773
775
|
title,
|
|
774
776
|
description,
|
|
@@ -832,9 +834,9 @@ import { Group as Group3, Stack as Stack6, Timeline as MantineTimeline } from "@
|
|
|
832
834
|
import { jsx as jsx18, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
833
835
|
function SdTimeline({ items }) {
|
|
834
836
|
const grouped = items.filter((item) => item.isShow).sort((a, b) => b.year - a.year || b.month - a.month).reduce((acc, item) => {
|
|
835
|
-
var
|
|
837
|
+
var _a5, _b;
|
|
836
838
|
;
|
|
837
|
-
((_b = acc[
|
|
839
|
+
((_b = acc[_a5 = item.year]) != null ? _b : acc[_a5] = []).push(item);
|
|
838
840
|
return acc;
|
|
839
841
|
}, {});
|
|
840
842
|
const years = Object.keys(grouped).map(Number).sort((a, b) => b - a);
|
|
@@ -968,8 +970,8 @@ function AuthorRow({ item }) {
|
|
|
968
970
|
] })
|
|
969
971
|
] });
|
|
970
972
|
}
|
|
971
|
-
function CardTestimonial(
|
|
972
|
-
var _b =
|
|
973
|
+
function CardTestimonial(_a5) {
|
|
974
|
+
var _b = _a5, { item } = _b, boxProps = __objRest(_b, ["item"]);
|
|
973
975
|
return /* @__PURE__ */ jsx20(Card4, __spreadProps(__spreadValues({ h: "100%" }, boxProps), { children: /* @__PURE__ */ jsxs7(Stack8, { gap: "md", h: "100%", children: [
|
|
974
976
|
item.rating && /* @__PURE__ */ jsx20(Rating2, { value: item.rating, readOnly: true, size: "sm", color: "primary" }),
|
|
975
977
|
/* @__PURE__ */ jsxs7(Stack8, { gap: "xs", style: { flex: 1 }, children: [
|
|
@@ -979,8 +981,8 @@ function CardTestimonial(_a4) {
|
|
|
979
981
|
/* @__PURE__ */ jsx20(AuthorRow, { item })
|
|
980
982
|
] }) }));
|
|
981
983
|
}
|
|
982
|
-
function Strip2(
|
|
983
|
-
var _b =
|
|
984
|
+
function Strip2(_a5) {
|
|
985
|
+
var _b = _a5, { item } = _b, boxProps = __objRest(_b, ["item"]);
|
|
984
986
|
return /* @__PURE__ */ jsx20(Box5, __spreadProps(__spreadValues({}, boxProps), { children: /* @__PURE__ */ jsxs7(Stack8, { gap: "md", children: [
|
|
985
987
|
item.rating && /* @__PURE__ */ jsx20(Rating2, { value: item.rating, readOnly: true, size: "sm", color: "primary" }),
|
|
986
988
|
/* @__PURE__ */ jsxs7(Group5, { gap: 4, align: "flex-start", children: [
|
|
@@ -1016,9 +1018,9 @@ import {
|
|
|
1016
1018
|
} from "@mantine/core";
|
|
1017
1019
|
import { IconCheck as IconCheck2, IconX as IconX3 } from "@tabler/icons-react";
|
|
1018
1020
|
import { jsx as jsx21, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1019
|
-
function Default(
|
|
1020
|
-
var _b =
|
|
1021
|
-
var
|
|
1021
|
+
function Default(_a5) {
|
|
1022
|
+
var _b = _a5, { item, onSelect } = _b, cardProps = __objRest(_b, ["item", "onSelect"]);
|
|
1023
|
+
var _a6;
|
|
1022
1024
|
return /* @__PURE__ */ jsx21(Card5, __spreadProps(__spreadValues({ withBorder: true, style: { position: "relative" } }, cardProps), { children: /* @__PURE__ */ jsxs8(Stack9, { gap: "xl", children: [
|
|
1023
1025
|
/* @__PURE__ */ jsxs8(Stack9, { gap: "xs", children: [
|
|
1024
1026
|
/* @__PURE__ */ jsxs8(Group6, { justify: "space-between", align: "flex-start", children: [
|
|
@@ -1048,12 +1050,12 @@ function Default(_a4) {
|
|
|
1048
1050
|
),
|
|
1049
1051
|
/* @__PURE__ */ jsx21(SdText.Body, { fz: "sm", c: f.included ? "slate.7" : "slate.4", children: f.text })
|
|
1050
1052
|
] }, i)) }),
|
|
1051
|
-
/* @__PURE__ */ jsx21(SdButton.Outline, { fullWidth: true, onClick: () => onSelect == null ? void 0 : onSelect(item), children: (
|
|
1053
|
+
/* @__PURE__ */ jsx21(SdButton.Outline, { fullWidth: true, onClick: () => onSelect == null ? void 0 : onSelect(item), children: (_a6 = item.ctaLabel) != null ? _a6 : "\uC2DC\uC791\uD558\uAE30" })
|
|
1052
1054
|
] }) }));
|
|
1053
1055
|
}
|
|
1054
|
-
function Featured(
|
|
1055
|
-
var _b =
|
|
1056
|
-
var
|
|
1056
|
+
function Featured(_a5) {
|
|
1057
|
+
var _b = _a5, { item, onSelect } = _b, cardProps = __objRest(_b, ["item", "onSelect"]);
|
|
1058
|
+
var _a6;
|
|
1057
1059
|
return /* @__PURE__ */ jsx21(Card5, __spreadProps(__spreadValues({ bg: "primary.6", style: { position: "relative" } }, cardProps), { children: /* @__PURE__ */ jsxs8(Stack9, { gap: "xl", children: [
|
|
1058
1060
|
/* @__PURE__ */ jsxs8(Stack9, { gap: "xs", children: [
|
|
1059
1061
|
/* @__PURE__ */ jsxs8(Group6, { justify: "space-between", align: "flex-start", children: [
|
|
@@ -1083,7 +1085,7 @@ function Featured(_a4) {
|
|
|
1083
1085
|
),
|
|
1084
1086
|
/* @__PURE__ */ jsx21(SdText.Body, { fz: "sm", c: f.included ? "white" : "primary.3", children: f.text })
|
|
1085
1087
|
] }, i)) }),
|
|
1086
|
-
/* @__PURE__ */ jsx21(SdButton.White, { fullWidth: true, onClick: () => onSelect == null ? void 0 : onSelect(item), children: (
|
|
1088
|
+
/* @__PURE__ */ jsx21(SdButton.White, { fullWidth: true, onClick: () => onSelect == null ? void 0 : onSelect(item), children: (_a6 = item.ctaLabel) != null ? _a6 : "\uC2DC\uC791\uD558\uAE30" })
|
|
1087
1089
|
] }) }));
|
|
1088
1090
|
}
|
|
1089
1091
|
function Grid2({ items, cols = { base: 1, sm: 2, md: 3 }, onSelect }) {
|
|
@@ -1106,22 +1108,22 @@ var SdPricingCardGrid = SdPricingCard.Grid;
|
|
|
1106
1108
|
// ui/molecule/Faq.tsx
|
|
1107
1109
|
import { Accordion, Box as Box7, Stack as Stack10 } from "@mantine/core";
|
|
1108
1110
|
import { jsx as jsx22, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1109
|
-
function Default2(
|
|
1110
|
-
var _b =
|
|
1111
|
+
function Default2(_a5) {
|
|
1112
|
+
var _b = _a5, { items } = _b, boxProps = __objRest(_b, ["items"]);
|
|
1111
1113
|
return /* @__PURE__ */ jsx22(Box7, __spreadProps(__spreadValues({}, boxProps), { children: /* @__PURE__ */ jsx22(Accordion, { variant: "separated", radius: "md", children: items.map((item, i) => /* @__PURE__ */ jsxs9(Accordion.Item, { value: String(i), children: [
|
|
1112
1114
|
/* @__PURE__ */ jsx22(Accordion.Control, { children: /* @__PURE__ */ jsx22(SdText.Strong, { fz: "sm", children: item.question }) }),
|
|
1113
1115
|
/* @__PURE__ */ jsx22(Accordion.Panel, { children: /* @__PURE__ */ jsx22(SdText.Body, { fz: "sm", children: item.answer }) })
|
|
1114
1116
|
] }, i)) }) }));
|
|
1115
1117
|
}
|
|
1116
|
-
function Filled(
|
|
1117
|
-
var _b =
|
|
1118
|
+
function Filled(_a5) {
|
|
1119
|
+
var _b = _a5, { items } = _b, boxProps = __objRest(_b, ["items"]);
|
|
1118
1120
|
return /* @__PURE__ */ jsx22(Box7, __spreadProps(__spreadValues({}, boxProps), { children: /* @__PURE__ */ jsx22(Accordion, { variant: "filled", radius: "md", children: items.map((item, i) => /* @__PURE__ */ jsxs9(Accordion.Item, { value: String(i), children: [
|
|
1119
1121
|
/* @__PURE__ */ jsx22(Accordion.Control, { children: /* @__PURE__ */ jsx22(SdText.Strong, { fz: "sm", children: item.question }) }),
|
|
1120
1122
|
/* @__PURE__ */ jsx22(Accordion.Panel, { children: /* @__PURE__ */ jsx22(SdText.Body, { fz: "sm", children: item.answer }) })
|
|
1121
1123
|
] }, i)) }) }));
|
|
1122
1124
|
}
|
|
1123
|
-
function WithHeader(
|
|
1124
|
-
var _b =
|
|
1125
|
+
function WithHeader(_a5) {
|
|
1126
|
+
var _b = _a5, { label, title, description, items } = _b, boxProps = __objRest(_b, ["label", "title", "description", "items"]);
|
|
1125
1127
|
return /* @__PURE__ */ jsxs9(Stack10, __spreadProps(__spreadValues({ gap: "xl" }, boxProps), { children: [
|
|
1126
1128
|
/* @__PURE__ */ jsxs9(Stack10, { gap: "xs", children: [
|
|
1127
1129
|
label && /* @__PURE__ */ jsx22(SdText.Eyebrow, { children: label }),
|
|
@@ -1146,8 +1148,8 @@ var SdFaqWithHeader = SdFaq.WithHeader;
|
|
|
1146
1148
|
// ui/molecule/Cta.tsx
|
|
1147
1149
|
import { Box as Box8, Center as Center2, Group as Group7, Stack as Stack11 } from "@mantine/core";
|
|
1148
1150
|
import { jsx as jsx23, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1149
|
-
function Banner(
|
|
1150
|
-
var _b =
|
|
1151
|
+
function Banner(_a5) {
|
|
1152
|
+
var _b = _a5, {
|
|
1151
1153
|
label,
|
|
1152
1154
|
title,
|
|
1153
1155
|
description,
|
|
@@ -1176,8 +1178,8 @@ function Banner(_a4) {
|
|
|
1176
1178
|
] })
|
|
1177
1179
|
] }) }) }));
|
|
1178
1180
|
}
|
|
1179
|
-
function Subtle(
|
|
1180
|
-
var _b =
|
|
1181
|
+
function Subtle(_a5) {
|
|
1182
|
+
var _b = _a5, {
|
|
1181
1183
|
label,
|
|
1182
1184
|
title,
|
|
1183
1185
|
description,
|
|
@@ -1216,8 +1218,8 @@ function Subtle(_a4) {
|
|
|
1216
1218
|
})
|
|
1217
1219
|
);
|
|
1218
1220
|
}
|
|
1219
|
-
function Inline(
|
|
1220
|
-
var _b =
|
|
1221
|
+
function Inline(_a5) {
|
|
1222
|
+
var _b = _a5, {
|
|
1221
1223
|
label,
|
|
1222
1224
|
title,
|
|
1223
1225
|
description,
|
|
@@ -1279,16 +1281,16 @@ import Link3 from "next/link";
|
|
|
1279
1281
|
import { Button, Card as Card6, SimpleGrid as SimpleGrid4, Stack as Stack12 } from "@mantine/core";
|
|
1280
1282
|
import Link2 from "next/link";
|
|
1281
1283
|
import { jsx as jsx24, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1282
|
-
function SolutionCardItem(
|
|
1283
|
-
var _b =
|
|
1284
|
-
var
|
|
1284
|
+
function SolutionCardItem(_a5) {
|
|
1285
|
+
var _b = _a5, { item, onSelect } = _b, cardProps = __objRest(_b, ["item", "onSelect"]);
|
|
1286
|
+
var _a6, _b2;
|
|
1285
1287
|
return /* @__PURE__ */ jsx24(Card6, __spreadProps(__spreadValues({ withBorder: true, h: "100%", style: { display: "flex", flexDirection: "column" } }, cardProps), { children: /* @__PURE__ */ jsxs11(Stack12, { gap: "md", style: { flex: 1 }, children: [
|
|
1286
1288
|
item.icon,
|
|
1287
1289
|
/* @__PURE__ */ jsx24(SdBadge.Primary, { children: item.category }),
|
|
1288
1290
|
/* @__PURE__ */ jsx24(SdTitle.Card, { children: item.title }),
|
|
1289
1291
|
/* @__PURE__ */ jsx24(SdText.Body, { children: item.description }),
|
|
1290
1292
|
item.href ? /* @__PURE__ */ jsxs11(Button, { variant: "subtle", color: "slate", component: Link2, href: item.href, mt: "auto", children: [
|
|
1291
|
-
(
|
|
1293
|
+
(_a6 = item.ctaLabel) != null ? _a6 : "\uC790\uC138\uD788 \uBCF4\uAE30",
|
|
1292
1294
|
" \u2192"
|
|
1293
1295
|
] }) : /* @__PURE__ */ jsxs11(SdButton.Ghost, { onClick: () => onSelect == null ? void 0 : onSelect(item), mt: "auto", children: [
|
|
1294
1296
|
(_b2 = item.ctaLabel) != null ? _b2 : "\uC790\uC138\uD788 \uBCF4\uAE30",
|
|
@@ -1321,7 +1323,7 @@ function Filtered({ items, allLabel = "\uC804\uCCB4", cols, onSelect }) {
|
|
|
1321
1323
|
}
|
|
1322
1324
|
function List({ items, onSelect }) {
|
|
1323
1325
|
return /* @__PURE__ */ jsx25(Stack13, { gap: 0, children: items.map((item, i) => {
|
|
1324
|
-
var
|
|
1326
|
+
var _a5, _b;
|
|
1325
1327
|
return /* @__PURE__ */ jsxs12("div", { children: [
|
|
1326
1328
|
i > 0 && /* @__PURE__ */ jsx25(Divider2, {}),
|
|
1327
1329
|
/* @__PURE__ */ jsxs12(Group8, { align: "flex-start", py: "lg", gap: "lg", children: [
|
|
@@ -1339,7 +1341,7 @@ function List({ items, onSelect }) {
|
|
|
1339
1341
|
href: item.href,
|
|
1340
1342
|
style: { alignSelf: "flex-start", paddingInline: 0 },
|
|
1341
1343
|
children: [
|
|
1342
|
-
(
|
|
1344
|
+
(_a5 = item.ctaLabel) != null ? _a5 : "\uC790\uC138\uD788 \uBCF4\uAE30",
|
|
1343
1345
|
" \u2192"
|
|
1344
1346
|
]
|
|
1345
1347
|
}
|
|
@@ -1482,15 +1484,15 @@ function MapFrame({ address, height }) {
|
|
|
1482
1484
|
] })
|
|
1483
1485
|
] });
|
|
1484
1486
|
}
|
|
1485
|
-
function Single(
|
|
1486
|
-
var _b =
|
|
1487
|
+
function Single(_a5) {
|
|
1488
|
+
var _b = _a5, { address, height = 400 } = _b, boxProps = __objRest(_b, ["address", "height"]);
|
|
1487
1489
|
if (!address.embbedUrl) return null;
|
|
1488
1490
|
return /* @__PURE__ */ jsx27(Box10, __spreadProps(__spreadValues({}, boxProps), { children: /* @__PURE__ */ jsx27(MapFrame, { address, height }) }));
|
|
1489
1491
|
}
|
|
1490
1492
|
function Tabs2({ addresses, height = 400 }) {
|
|
1491
|
-
var
|
|
1493
|
+
var _a5, _b, _c;
|
|
1492
1494
|
const mapped = addresses.filter((a) => a.embbedUrl);
|
|
1493
|
-
const [active, setActive] = useState3((_b = (
|
|
1495
|
+
const [active, setActive] = useState3((_b = (_a5 = mapped[0]) == null ? void 0 : _a5.label) != null ? _b : "");
|
|
1494
1496
|
if (mapped.length === 0) return null;
|
|
1495
1497
|
if (mapped.length === 1) return /* @__PURE__ */ jsx27(MapFrame, { address: mapped[0], height });
|
|
1496
1498
|
const current = (_c = mapped.find((a) => a.label === active)) != null ? _c : mapped[0];
|
|
@@ -1552,8 +1554,8 @@ function buildTrail(navItems, currentHref) {
|
|
|
1552
1554
|
}
|
|
1553
1555
|
return trail;
|
|
1554
1556
|
}
|
|
1555
|
-
function SdBreadcrumb(
|
|
1556
|
-
var _b =
|
|
1557
|
+
function SdBreadcrumb(_a5) {
|
|
1558
|
+
var _b = _a5, {
|
|
1557
1559
|
navItems: navItemsProp,
|
|
1558
1560
|
currentHref,
|
|
1559
1561
|
homeHref = "/",
|
|
@@ -1564,11 +1566,11 @@ function SdBreadcrumb(_a4) {
|
|
|
1564
1566
|
"homeHref",
|
|
1565
1567
|
"homeLabel"
|
|
1566
1568
|
]);
|
|
1567
|
-
var
|
|
1569
|
+
var _a6;
|
|
1568
1570
|
const navFromContext = useNav();
|
|
1569
1571
|
const navItems = navItemsProp != null ? navItemsProp : navFromContext;
|
|
1570
1572
|
const pathname = usePathname();
|
|
1571
|
-
const trail = buildTrail(navItems, (
|
|
1573
|
+
const trail = buildTrail(navItems, (_a6 = currentHref != null ? currentHref : pathname) != null ? _a6 : "");
|
|
1572
1574
|
if (navItems.length === 0) return;
|
|
1573
1575
|
return /* @__PURE__ */ jsx29(Box11, __spreadProps(__spreadValues({}, boxProps), { children: /* @__PURE__ */ jsxs15(
|
|
1574
1576
|
Breadcrumbs,
|
|
@@ -1606,8 +1608,8 @@ var variantMap = {
|
|
|
1606
1608
|
white: SdButton.White
|
|
1607
1609
|
};
|
|
1608
1610
|
function CtaButton({ cta }) {
|
|
1609
|
-
var
|
|
1610
|
-
const Button3 = variantMap[(
|
|
1611
|
+
var _a5;
|
|
1612
|
+
const Button3 = variantMap[(_a5 = cta.variant) != null ? _a5 : "primary"];
|
|
1611
1613
|
return /* @__PURE__ */ jsx30(Anchor2, { href: cta.href, underline: "never", children: cta.icon ? /* @__PURE__ */ jsx30(Button3, { size: "md", rightSection: /* @__PURE__ */ jsx30(IconArrowNarrowRight, {}), children: cta.label }) : /* @__PURE__ */ jsx30(Button3, { size: "md", children: cta.label }) });
|
|
1612
1614
|
}
|
|
1613
1615
|
function HeroCarousel({ slides, children }) {
|
|
@@ -1944,8 +1946,8 @@ var SOCIAL_ICONS = {
|
|
|
1944
1946
|
};
|
|
1945
1947
|
function FooterSocials({ items }) {
|
|
1946
1948
|
return /* @__PURE__ */ jsx32(Group11, { gap: 0, wrap: "nowrap", children: items.map((item) => {
|
|
1947
|
-
var
|
|
1948
|
-
const Icon = (
|
|
1949
|
+
var _a5, _b;
|
|
1950
|
+
const Icon = (_a5 = SOCIAL_ICONS[item.platform]) != null ? _a5 : IconWorld;
|
|
1949
1951
|
return /* @__PURE__ */ jsx32(
|
|
1950
1952
|
ActionIcon,
|
|
1951
1953
|
{
|
|
@@ -2013,8 +2015,8 @@ function SdFooter({ company, navItems, policyLinks, description, logoSize = "sm"
|
|
|
2013
2015
|
// ui/organism/FeatureSection.tsx
|
|
2014
2016
|
import { Stack as Stack18 } from "@mantine/core";
|
|
2015
2017
|
import { jsx as jsx33, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
2016
|
-
function SdFeatureSection(
|
|
2017
|
-
var _b =
|
|
2018
|
+
function SdFeatureSection(_a5) {
|
|
2019
|
+
var _b = _a5, {
|
|
2018
2020
|
label,
|
|
2019
2021
|
title,
|
|
2020
2022
|
description,
|
|
@@ -2048,8 +2050,8 @@ function SdFeatureSection(_a4) {
|
|
|
2048
2050
|
// ui/organism/TimelineSection.tsx
|
|
2049
2051
|
import { Center as Center3, Stack as Stack19 } from "@mantine/core";
|
|
2050
2052
|
import { jsx as jsx34, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
2051
|
-
function SdTimelineSection(
|
|
2052
|
-
var _b =
|
|
2053
|
+
function SdTimelineSection(_a5) {
|
|
2054
|
+
var _b = _a5, {
|
|
2053
2055
|
label,
|
|
2054
2056
|
title,
|
|
2055
2057
|
description,
|
|
@@ -2071,8 +2073,8 @@ function SdTimelineSection(_a4) {
|
|
|
2071
2073
|
// ui/organism/StepsSection.tsx
|
|
2072
2074
|
import { Stack as Stack20 } from "@mantine/core";
|
|
2073
2075
|
import { jsx as jsx35, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
2074
|
-
function SdStepsSection(
|
|
2075
|
-
var _b =
|
|
2076
|
+
function SdStepsSection(_a5) {
|
|
2077
|
+
var _b = _a5, {
|
|
2076
2078
|
label,
|
|
2077
2079
|
title,
|
|
2078
2080
|
description,
|
|
@@ -2197,11 +2199,11 @@ function LoginForm({
|
|
|
2197
2199
|
children
|
|
2198
2200
|
}) {
|
|
2199
2201
|
function handleSubmit(event) {
|
|
2200
|
-
var
|
|
2202
|
+
var _a5, _b;
|
|
2201
2203
|
event.preventDefault();
|
|
2202
2204
|
const data = new FormData(event.currentTarget);
|
|
2203
2205
|
onSubmit == null ? void 0 : onSubmit({
|
|
2204
|
-
email: String((
|
|
2206
|
+
email: String((_a5 = data.get("email")) != null ? _a5 : ""),
|
|
2205
2207
|
password: String((_b = data.get("password")) != null ? _b : ""),
|
|
2206
2208
|
remember: data.get("remember") === "on"
|
|
2207
2209
|
});
|
|
@@ -2245,7 +2247,7 @@ function LoginForm({
|
|
|
2245
2247
|
socials && socials.length > 0 && /* @__PURE__ */ jsxs23(Fragment6, { children: [
|
|
2246
2248
|
/* @__PURE__ */ jsx37(Divider4, { label: "\uB610\uB294", labelPosition: "center" }),
|
|
2247
2249
|
/* @__PURE__ */ jsx37(Stack22, { gap: "xs", children: socials.map((social) => {
|
|
2248
|
-
var
|
|
2250
|
+
var _a5;
|
|
2249
2251
|
const { Icon, label } = SOCIAL_META[social.provider];
|
|
2250
2252
|
return /* @__PURE__ */ jsx37(
|
|
2251
2253
|
SdButton.Outline,
|
|
@@ -2255,7 +2257,7 @@ function LoginForm({
|
|
|
2255
2257
|
type: "button",
|
|
2256
2258
|
onClick: social.onClick,
|
|
2257
2259
|
leftSection: /* @__PURE__ */ jsx37(Icon, { size: 16 }),
|
|
2258
|
-
children: (
|
|
2260
|
+
children: (_a5 = social.label) != null ? _a5 : label
|
|
2259
2261
|
},
|
|
2260
2262
|
social.provider
|
|
2261
2263
|
);
|
|
@@ -2278,8 +2280,8 @@ function FormHeader({
|
|
|
2278
2280
|
/* @__PURE__ */ jsx37(SdTextBox.Card, { title, description: description != null ? description : "" })
|
|
2279
2281
|
] });
|
|
2280
2282
|
}
|
|
2281
|
-
function Card7(
|
|
2282
|
-
var _b =
|
|
2283
|
+
function Card7(_a5) {
|
|
2284
|
+
var _b = _a5, {
|
|
2283
2285
|
title = "\uB85C\uADF8\uC778",
|
|
2284
2286
|
description = "%c \uC11C\uBE44\uC2A4\uB97C \uC774\uC6A9\uD558\uB824\uBA74 \uB85C\uADF8\uC778\uD574 \uC8FC\uC138\uC694.",
|
|
2285
2287
|
mih = "100svh",
|
|
@@ -2295,8 +2297,8 @@ function Card7(_a4) {
|
|
|
2295
2297
|
/* @__PURE__ */ jsx37(LoginForm, __spreadValues({}, formProps))
|
|
2296
2298
|
] }) }) });
|
|
2297
2299
|
}
|
|
2298
|
-
function Split(
|
|
2299
|
-
var _b =
|
|
2300
|
+
function Split(_a5) {
|
|
2301
|
+
var _b = _a5, {
|
|
2300
2302
|
title = "\uB85C\uADF8\uC778",
|
|
2301
2303
|
description = "\uACC4\uC815 \uC815\uBCF4\uB97C \uC785\uB825\uD574 \uC8FC\uC138\uC694.",
|
|
2302
2304
|
brandTitle = "%c",
|
package/dist/util/index.d.mts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CommonInfo } from '../types/index.mjs';
|
|
2
|
+
import { AxiosInstance } from 'axios';
|
|
2
3
|
import 'react';
|
|
3
4
|
|
|
4
5
|
/**
|
|
@@ -17,6 +18,8 @@ declare const COMPANY_NAME: string;
|
|
|
17
18
|
declare const LOGO_SRC: string;
|
|
18
19
|
/** 헤더 로고 대체 텍스트. */
|
|
19
20
|
declare const LOGO_ALT: string;
|
|
21
|
+
/** API 서버 base URL. 미지정 시 빈 문자열 — axios가 상대 경로로 요청한다(같은 오리진). */
|
|
22
|
+
declare const API_BASE_URL: string;
|
|
20
23
|
|
|
21
24
|
/** 문자열 안의 `%c`를 회사명으로 치환한다. 서버/클라이언트 양쪽에서 안전하다. */
|
|
22
25
|
declare function t(text: string): string;
|
|
@@ -111,4 +114,50 @@ declare function withJosa(word: string, pair: JosaPair): string;
|
|
|
111
114
|
*/
|
|
112
115
|
declare function fixJosa(text: string): string;
|
|
113
116
|
|
|
114
|
-
|
|
117
|
+
/**
|
|
118
|
+
* 표준 API 클라이언트.
|
|
119
|
+
*
|
|
120
|
+
* 인증은 기본적으로 httpOnly 쿠키(`withCredentials`)로 실어 보낸다 — `useAuthStore`가
|
|
121
|
+
* 토큰을 들고 있지 않는 이유(XSS)와 같은 전제다. 쿠키를 안 쓰는 소비자 앱은
|
|
122
|
+
* {@link setAccessTokenGetter}로 Authorization 헤더 주입을 추가로 켤 수 있다.
|
|
123
|
+
*/
|
|
124
|
+
declare const apiClient: AxiosInstance;
|
|
125
|
+
type AccessTokenGetter = () => string | null | undefined;
|
|
126
|
+
/**
|
|
127
|
+
* 매 요청에 `Authorization: Bearer <token>` 헤더를 자동으로 붙이려면 등록한다.
|
|
128
|
+
* `null`을 넘기면 해제된다. 토큰 자체는 여기서 들고 있지 않고 호출 시점에
|
|
129
|
+
* getter를 통해서만 읽는다 — 보관 방식(메모리·httpOnly 쿠키 등)은 소비자 몫이다.
|
|
130
|
+
*/
|
|
131
|
+
declare function setAccessTokenGetter(getter: AccessTokenGetter | null): void;
|
|
132
|
+
type RefreshHandler = () => Promise<boolean>;
|
|
133
|
+
/**
|
|
134
|
+
* Access 토큰 만료(401) 시 재발급을 시도할 핸들러를 등록한다. `null`을 넘기면 해제된다.
|
|
135
|
+
*
|
|
136
|
+
* 핸들러가 `true`를 반환하면 실패했던 요청을 한 번만 재시도하고, `false`나 예외면
|
|
137
|
+
* {@link setUnauthorizedHandler}로 등록한 콜백으로 넘어간다. 재발급 자체를 어떻게
|
|
138
|
+
* 하는지는 소비자 몫이다 — 쿠키 인증이면 핸들러 안에서 refresh 엔드포인트를
|
|
139
|
+
* (`withCredentials`로) 호출해 새 access 쿠키를 받으면 되고, Bearer 토큰이면 핸들러가
|
|
140
|
+
* 새 토큰을 받아 자체 저장소에 반영해야 한다(다음 요청은 `setAccessTokenGetter`가
|
|
141
|
+
* 그 저장소에서 새 값을 읽는다).
|
|
142
|
+
*/
|
|
143
|
+
declare function setRefreshHandler(handler: RefreshHandler | null): void;
|
|
144
|
+
/** 서버가 내려주는 표준 에러 바디. 소비자 API가 이 형태가 아니면 message는 axios 기본 메시지로 폴백한다. */
|
|
145
|
+
interface ApiErrorBody {
|
|
146
|
+
message?: string;
|
|
147
|
+
code?: string;
|
|
148
|
+
}
|
|
149
|
+
/** 인터셉터가 모든 실패 요청을 이 형태로 통일해 던진다 — 호출부가 axios 세부 타입을 몰라도 된다. */
|
|
150
|
+
declare class ApiError extends Error {
|
|
151
|
+
readonly status?: number;
|
|
152
|
+
readonly code?: string;
|
|
153
|
+
constructor(message: string, status?: number, code?: string);
|
|
154
|
+
}
|
|
155
|
+
type UnauthorizedHandler = () => void;
|
|
156
|
+
/**
|
|
157
|
+
* 401 응답을 받았을 때 실행할 핸들러(로그아웃 등)를 등록한다. `null`을 넘기면 해제된다.
|
|
158
|
+
* `platform/`은 store를 모르므로(아래 index.ts 상단 주석 참고) `useAuthStore`를
|
|
159
|
+
* 직접 참조하지 않고, 소비자 앱이 이 콜백으로 연결한다.
|
|
160
|
+
*/
|
|
161
|
+
declare function setUnauthorizedHandler(handler: UnauthorizedHandler | null): void;
|
|
162
|
+
|
|
163
|
+
export { API_BASE_URL, ApiError, type ApiErrorBody, COMPANY_NAME, type Finalizer, type Finalizers, type JosaPair, LOGO_ALT, LOGO_SRC, type SortDirection, apiClient, filterAndSort, fixJosa, getFinalSound, hasFinalConsonant, josa, runFinalizers, setAccessTokenGetter, setRefreshHandler, setUnauthorizedHandler, t, withJosa };
|