@tipp/ui 1.4.13 → 1.4.15

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.
Files changed (71) hide show
  1. package/dist/atoms/dialog.cjs +4 -3
  2. package/dist/atoms/dialog.cjs.map +1 -1
  3. package/dist/atoms/dialog.js +1 -1
  4. package/dist/atoms/field-error-wrapper.js +2 -2
  5. package/dist/atoms/index.cjs +4 -4
  6. package/dist/atoms/index.cjs.map +1 -1
  7. package/dist/atoms/index.js +81 -81
  8. package/dist/atoms/pagination.js +2 -2
  9. package/dist/chunk-2PGSMNLI.js +90 -0
  10. package/dist/chunk-2PGSMNLI.js.map +1 -0
  11. package/dist/chunk-2VD5Y72N.js +89 -0
  12. package/dist/chunk-2VD5Y72N.js.map +1 -0
  13. package/dist/chunk-4UR2XNMY.js +87 -0
  14. package/dist/chunk-4UR2XNMY.js.map +1 -0
  15. package/dist/chunk-7RMTZBCT.js +192 -0
  16. package/dist/chunk-7RMTZBCT.js.map +1 -0
  17. package/dist/chunk-CVON644P.js +164 -0
  18. package/dist/chunk-CVON644P.js.map +1 -0
  19. package/dist/chunk-DWCPI2UN.js +113 -0
  20. package/dist/chunk-DWCPI2UN.js.map +1 -0
  21. package/dist/chunk-G6ITJNH2.js +128 -0
  22. package/dist/chunk-G6ITJNH2.js.map +1 -0
  23. package/dist/chunk-IKUXA6XG.js +340 -0
  24. package/dist/chunk-IKUXA6XG.js.map +1 -0
  25. package/dist/chunk-IYIR2TWL.js +192 -0
  26. package/dist/chunk-IYIR2TWL.js.map +1 -0
  27. package/dist/chunk-KFK3272Z.js +169 -0
  28. package/dist/chunk-KFK3272Z.js.map +1 -0
  29. package/dist/chunk-MVO7NIPH.js +164 -0
  30. package/dist/chunk-MVO7NIPH.js.map +1 -0
  31. package/dist/chunk-NCZFYI4T.js +192 -0
  32. package/dist/chunk-NCZFYI4T.js.map +1 -0
  33. package/dist/chunk-OCAFG4UV.js +97 -0
  34. package/dist/chunk-OCAFG4UV.js.map +1 -0
  35. package/dist/chunk-OHBL3CTQ.js +113 -0
  36. package/dist/chunk-OHBL3CTQ.js.map +1 -0
  37. package/dist/chunk-OKN5AK5Z.js +340 -0
  38. package/dist/chunk-OKN5AK5Z.js.map +1 -0
  39. package/dist/chunk-Q6OLO22T.js +89 -0
  40. package/dist/chunk-Q6OLO22T.js.map +1 -0
  41. package/dist/chunk-TRPACCEM.js +169 -0
  42. package/dist/chunk-TRPACCEM.js.map +1 -0
  43. package/dist/chunk-TT3Y6TU5.js +89 -0
  44. package/dist/chunk-TT3Y6TU5.js.map +1 -0
  45. package/dist/chunk-V5CNGZN6.js +87 -0
  46. package/dist/chunk-V5CNGZN6.js.map +1 -0
  47. package/dist/chunk-VKEZRJ2L.js +128 -0
  48. package/dist/chunk-VKEZRJ2L.js.map +1 -0
  49. package/dist/chunk-WVD5KKRC.js +97 -0
  50. package/dist/chunk-WVD5KKRC.js.map +1 -0
  51. package/dist/chunk-Y44Z3OUE.js +89 -0
  52. package/dist/chunk-Y44Z3OUE.js.map +1 -0
  53. package/dist/index.cjs +4 -4
  54. package/dist/index.cjs.map +1 -1
  55. package/dist/index.js +94 -94
  56. package/dist/molecules/date-picker/index.js +2 -2
  57. package/dist/molecules/expand-table/index.js +35 -35
  58. package/dist/molecules/expand-table/row.js +32 -32
  59. package/dist/molecules/form.cjs +0 -1
  60. package/dist/molecules/form.cjs.map +1 -1
  61. package/dist/molecules/form.d.cts +0 -4
  62. package/dist/molecules/form.d.ts +0 -4
  63. package/dist/molecules/form.js +2 -2
  64. package/dist/molecules/index.js +40 -40
  65. package/dist/molecules/learning-post.js +6 -6
  66. package/dist/molecules/navigation.js +33 -33
  67. package/dist/molecules/stepper.js +3 -3
  68. package/dist/molecules/tag-selector.js +33 -33
  69. package/package.json +3 -3
  70. package/src/atoms/dialog.tsx +5 -4
  71. package/src/molecules/form.tsx +0 -1
@@ -0,0 +1,90 @@
1
+ import {
2
+ Button
3
+ } from "./chunk-U7JPP7WJ.js";
4
+ import {
5
+ __objRest,
6
+ __spreadProps,
7
+ __spreadValues
8
+ } from "./chunk-N552FDTV.js";
9
+
10
+ // src/atoms/dialog.tsx
11
+ import * as RadixDialog from "@radix-ui/react-dialog";
12
+ import { Cross1Icon } from "@radix-ui/react-icons";
13
+ import { Flex } from "@radix-ui/themes";
14
+ import { useEffect, useRef } from "react";
15
+ import { jsx, jsxs } from "react/jsx-runtime";
16
+ function Content2(props) {
17
+ const _a = props, {
18
+ children,
19
+ style = {},
20
+ width,
21
+ maxWidth,
22
+ minWidth,
23
+ maxHeight,
24
+ height,
25
+ minHeight
26
+ } = _a, rest = __objRest(_a, [
27
+ "children",
28
+ "style",
29
+ "width",
30
+ "maxWidth",
31
+ "minWidth",
32
+ "maxHeight",
33
+ "height",
34
+ "minHeight"
35
+ ]);
36
+ const containerRef = useRef(null);
37
+ useEffect(() => {
38
+ const container = document.getElementsByClassName("radix-themes")[0];
39
+ containerRef.current = container;
40
+ console.log({ container });
41
+ }, []);
42
+ return /* @__PURE__ */ jsx(RadixDialog.Portal, { container: containerRef.current, children: /* @__PURE__ */ jsx(RadixDialog.Overlay, { className: "DialogOverlay", children: /* @__PURE__ */ jsx(
43
+ RadixDialog.Content,
44
+ __spreadProps(__spreadValues({
45
+ className: "DialogContent",
46
+ style: __spreadValues({
47
+ width,
48
+ maxWidth,
49
+ minWidth,
50
+ maxHeight,
51
+ height,
52
+ minHeight
53
+ }, style)
54
+ }, rest), {
55
+ children: /* @__PURE__ */ jsxs(Flex, { direction: "column", style: { position: "relative" }, children: [
56
+ /* @__PURE__ */ jsx(RadixDialog.Close, { asChild: true, className: "DialogClose", children: /* @__PURE__ */ jsx(Button, { color: "gray", variant: "transparent", children: /* @__PURE__ */ jsx(Cross1Icon, { height: "18px", width: "18px" }) }) }),
57
+ children
58
+ ] })
59
+ })
60
+ ) }) });
61
+ }
62
+ function Close2(_a) {
63
+ var _b = _a, {
64
+ children
65
+ } = _b, rest = __objRest(_b, [
66
+ "children"
67
+ ]);
68
+ return /* @__PURE__ */ jsx(RadixDialog.Close, __spreadProps(__spreadValues({ asChild: true }, rest), { children }));
69
+ }
70
+ function Trigger2(_a) {
71
+ var _b = _a, {
72
+ children
73
+ } = _b, rest = __objRest(_b, [
74
+ "children"
75
+ ]);
76
+ return /* @__PURE__ */ jsx(RadixDialog.Trigger, __spreadProps(__spreadValues({ asChild: true }, rest), { children }));
77
+ }
78
+ var Dialog = {
79
+ Root: RadixDialog.Root,
80
+ Trigger: Trigger2,
81
+ Content: Content2,
82
+ Close: Close2,
83
+ Description: RadixDialog.Description,
84
+ Title: RadixDialog.Title
85
+ };
86
+
87
+ export {
88
+ Dialog
89
+ };
90
+ //# sourceMappingURL=chunk-2PGSMNLI.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/atoms/dialog.tsx"],"sourcesContent":["import * as RadixDialog from '@radix-ui/react-dialog';\nimport { Cross1Icon } from '@radix-ui/react-icons';\nimport { Flex } from '@radix-ui/themes';\nimport { useEffect, useRef } from 'react';\nimport { Button } from './button';\n\ntype ContentProps = RadixDialog.DialogContentProps & {\n width?: string;\n maxWidth?: string;\n minWidth?: string;\n height?: string;\n maxHeight?: string;\n minHeight?: string;\n};\n\nfunction Content(props: ContentProps): React.ReactElement {\n const {\n children,\n style = {},\n width,\n maxWidth,\n minWidth,\n maxHeight,\n height,\n minHeight,\n ...rest\n } = props;\n const containerRef = useRef<Element | null>(null);\n\n useEffect(() => {\n const container = document.getElementsByClassName('radix-themes')[0];\n containerRef.current = container;\n console.log({ container });\n }, []);\n\n return (\n <RadixDialog.Portal container={containerRef.current}>\n <RadixDialog.Overlay className=\"DialogOverlay\">\n <RadixDialog.Content\n className=\"DialogContent\"\n style={{\n width,\n maxWidth,\n minWidth,\n maxHeight,\n height,\n minHeight,\n ...style,\n }}\n {...rest}\n >\n <Flex direction=\"column\" style={{ position: 'relative' }}>\n <RadixDialog.Close asChild className=\"DialogClose\">\n <Button color=\"gray\" variant=\"transparent\">\n <Cross1Icon height=\"18px\" width=\"18px\" />\n </Button>\n </RadixDialog.Close>\n {children}\n </Flex>\n </RadixDialog.Content>\n </RadixDialog.Overlay>\n </RadixDialog.Portal>\n );\n}\n\nfunction Close({\n children,\n ...rest\n}: RadixDialog.DialogCloseProps): React.ReactElement {\n return (\n <RadixDialog.Close asChild {...rest}>\n {children}\n </RadixDialog.Close>\n );\n}\n\nfunction Trigger({\n children,\n ...rest\n}: RadixDialog.DialogTriggerProps): React.ReactElement {\n return (\n <RadixDialog.Trigger asChild {...rest}>\n {children}\n </RadixDialog.Trigger>\n );\n}\n\nexport const Dialog = {\n Root: RadixDialog.Root,\n Trigger,\n Content,\n Close,\n Description: RadixDialog.Description,\n Title: RadixDialog.Title,\n};\n"],"mappings":";;;;;;;;;;AAAA,YAAY,iBAAiB;AAC7B,SAAS,kBAAkB;AAC3B,SAAS,YAAY;AACrB,SAAS,WAAW,cAAc;AAgDxB,SAGM,KAHN;AApCV,SAASA,SAAQ,OAAyC;AACxD,QAUI,YATF;AAAA;AAAA,IACA,QAAQ,CAAC;AAAA,IACT;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAxBJ,IA0BM,IADC,iBACD,IADC;AAAA,IARH;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAGF,QAAM,eAAe,OAAuB,IAAI;AAEhD,YAAU,MAAM;AACd,UAAM,YAAY,SAAS,uBAAuB,cAAc,EAAE,CAAC;AACnE,iBAAa,UAAU;AACvB,YAAQ,IAAI,EAAE,UAAU,CAAC;AAAA,EAC3B,GAAG,CAAC,CAAC;AAEL,SACE,oBAAa,oBAAZ,EAAmB,WAAW,aAAa,SAC1C,8BAAa,qBAAZ,EAAoB,WAAU,iBAC7B;AAAA,IAAa;AAAA,IAAZ;AAAA,MACC,WAAU;AAAA,MACV,OAAO;AAAA,QACL;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,SACG;AAAA,OAED,OAXL;AAAA,MAaC,+BAAC,QAAK,WAAU,UAAS,OAAO,EAAE,UAAU,WAAW,GACrD;AAAA,4BAAa,mBAAZ,EAAkB,SAAO,MAAC,WAAU,eACnC,8BAAC,UAAO,OAAM,QAAO,SAAQ,eAC3B,8BAAC,cAAW,QAAO,QAAO,OAAM,QAAO,GACzC,GACF;AAAA,QACC;AAAA,SACH;AAAA;AAAA,EACF,GACF,GACF;AAEJ;AAEA,SAASC,OAAM,IAGsC;AAHtC,eACb;AAAA;AAAA,EAlEF,IAiEe,IAEV,iBAFU,IAEV;AAAA,IADH;AAAA;AAGA,SACE,oBAAa,mBAAZ,+BAAkB,SAAO,QAAK,OAA9B,EACE,WACH;AAEJ;AAEA,SAASC,SAAQ,IAGsC;AAHtC,eACf;AAAA;AAAA,EA7EF,IA4EiB,IAEZ,iBAFY,IAEZ;AAAA,IADH;AAAA;AAGA,SACE,oBAAa,qBAAZ,+BAAoB,SAAO,QAAK,OAAhC,EACE,WACH;AAEJ;AAEO,IAAM,SAAS;AAAA,EACpB,MAAkB;AAAA,EAClB,SAAAA;AAAA,EACA,SAAAF;AAAA,EACA,OAAAC;AAAA,EACA,aAAyB;AAAA,EACzB,OAAmB;AACrB;","names":["Content","Close","Trigger"]}
@@ -0,0 +1,89 @@
1
+ import {
2
+ Button
3
+ } from "./chunk-U7JPP7WJ.js";
4
+ import {
5
+ __objRest,
6
+ __spreadProps,
7
+ __spreadValues
8
+ } from "./chunk-N552FDTV.js";
9
+
10
+ // src/atoms/dialog.tsx
11
+ import * as RadixDialog from "@radix-ui/react-dialog";
12
+ import { Cross1Icon } from "@radix-ui/react-icons";
13
+ import { Flex } from "@radix-ui/themes";
14
+ import { useRef } from "react";
15
+ import { jsx, jsxs } from "react/jsx-runtime";
16
+ function Content2(props) {
17
+ const _a = props, {
18
+ children,
19
+ style = {},
20
+ width,
21
+ maxWidth,
22
+ minWidth,
23
+ maxHeight,
24
+ height,
25
+ minHeight
26
+ } = _a, rest = __objRest(_a, [
27
+ "children",
28
+ "style",
29
+ "width",
30
+ "maxWidth",
31
+ "minWidth",
32
+ "maxHeight",
33
+ "height",
34
+ "minHeight"
35
+ ]);
36
+ const containerRef = useRef(null);
37
+ if (typeof document !== "undefined") {
38
+ const container = document.getElementsByClassName("radix-themes")[0];
39
+ containerRef.current = container;
40
+ }
41
+ return /* @__PURE__ */ jsx(RadixDialog.Portal, { container: containerRef.current, children: /* @__PURE__ */ jsx(RadixDialog.Overlay, { className: "DialogOverlay", children: /* @__PURE__ */ jsx(
42
+ RadixDialog.Content,
43
+ __spreadProps(__spreadValues({
44
+ className: "DialogContent",
45
+ style: __spreadValues({
46
+ width,
47
+ maxWidth,
48
+ minWidth,
49
+ maxHeight,
50
+ height,
51
+ minHeight
52
+ }, style)
53
+ }, rest), {
54
+ children: /* @__PURE__ */ jsxs(Flex, { direction: "column", style: { position: "relative" }, children: [
55
+ /* @__PURE__ */ jsx(RadixDialog.Close, { asChild: true, className: "DialogClose", children: /* @__PURE__ */ jsx(Button, { color: "gray", variant: "transparent", children: /* @__PURE__ */ jsx(Cross1Icon, { height: "18px", width: "18px" }) }) }),
56
+ children
57
+ ] })
58
+ })
59
+ ) }) });
60
+ }
61
+ function Close2(_a) {
62
+ var _b = _a, {
63
+ children
64
+ } = _b, rest = __objRest(_b, [
65
+ "children"
66
+ ]);
67
+ return /* @__PURE__ */ jsx(RadixDialog.Close, __spreadProps(__spreadValues({ asChild: true }, rest), { children }));
68
+ }
69
+ function Trigger2(_a) {
70
+ var _b = _a, {
71
+ children
72
+ } = _b, rest = __objRest(_b, [
73
+ "children"
74
+ ]);
75
+ return /* @__PURE__ */ jsx(RadixDialog.Trigger, __spreadProps(__spreadValues({ asChild: true }, rest), { children }));
76
+ }
77
+ var Dialog = {
78
+ Root: RadixDialog.Root,
79
+ Trigger: Trigger2,
80
+ Content: Content2,
81
+ Close: Close2,
82
+ Description: RadixDialog.Description,
83
+ Title: RadixDialog.Title
84
+ };
85
+
86
+ export {
87
+ Dialog
88
+ };
89
+ //# sourceMappingURL=chunk-2VD5Y72N.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/atoms/dialog.tsx"],"sourcesContent":["import * as RadixDialog from '@radix-ui/react-dialog';\nimport { Cross1Icon } from '@radix-ui/react-icons';\nimport { Flex } from '@radix-ui/themes';\nimport { useRef } from 'react';\nimport { Button } from './button';\n\ntype ContentProps = RadixDialog.DialogContentProps & {\n width?: string;\n maxWidth?: string;\n minWidth?: string;\n height?: string;\n maxHeight?: string;\n minHeight?: string;\n};\n\nfunction Content(props: ContentProps): React.ReactElement {\n const {\n children,\n style = {},\n width,\n maxWidth,\n minWidth,\n maxHeight,\n height,\n minHeight,\n ...rest\n } = props;\n const containerRef = useRef<Element | null>(null);\n\n if (typeof document !== 'undefined') {\n const container = document.getElementsByClassName('radix-themes')[0];\n containerRef.current = container;\n }\n\n return (\n <RadixDialog.Portal container={containerRef.current}>\n <RadixDialog.Overlay className=\"DialogOverlay\">\n <RadixDialog.Content\n className=\"DialogContent\"\n style={{\n width,\n maxWidth,\n minWidth,\n maxHeight,\n height,\n minHeight,\n ...style,\n }}\n {...rest}\n >\n <Flex direction=\"column\" style={{ position: 'relative' }}>\n <RadixDialog.Close asChild className=\"DialogClose\">\n <Button color=\"gray\" variant=\"transparent\">\n <Cross1Icon height=\"18px\" width=\"18px\" />\n </Button>\n </RadixDialog.Close>\n {children}\n </Flex>\n </RadixDialog.Content>\n </RadixDialog.Overlay>\n </RadixDialog.Portal>\n );\n}\n\nfunction Close({\n children,\n ...rest\n}: RadixDialog.DialogCloseProps): React.ReactElement {\n return (\n <RadixDialog.Close asChild {...rest}>\n {children}\n </RadixDialog.Close>\n );\n}\n\nfunction Trigger({\n children,\n ...rest\n}: RadixDialog.DialogTriggerProps): React.ReactElement {\n return (\n <RadixDialog.Trigger asChild {...rest}>\n {children}\n </RadixDialog.Trigger>\n );\n}\n\nexport const Dialog = {\n Root: RadixDialog.Root,\n Trigger,\n Content,\n Close,\n Description: RadixDialog.Description,\n Title: RadixDialog.Title,\n};\n"],"mappings":";;;;;;;;;;AAAA,YAAY,iBAAiB;AAC7B,SAAS,kBAAkB;AAC3B,SAAS,YAAY;AACrB,SAAS,cAAc;AA+Cb,SAGM,KAHN;AAnCV,SAASA,SAAQ,OAAyC;AACxD,QAUI,YATF;AAAA;AAAA,IACA,QAAQ,CAAC;AAAA,IACT;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAxBJ,IA0BM,IADC,iBACD,IADC;AAAA,IARH;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAGF,QAAM,eAAe,OAAuB,IAAI;AAEhD,MAAI,OAAO,aAAa,aAAa;AACnC,UAAM,YAAY,SAAS,uBAAuB,cAAc,EAAE,CAAC;AACnE,iBAAa,UAAU;AAAA,EACzB;AAEA,SACE,oBAAa,oBAAZ,EAAmB,WAAW,aAAa,SAC1C,8BAAa,qBAAZ,EAAoB,WAAU,iBAC7B;AAAA,IAAa;AAAA,IAAZ;AAAA,MACC,WAAU;AAAA,MACV,OAAO;AAAA,QACL;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,SACG;AAAA,OAED,OAXL;AAAA,MAaC,+BAAC,QAAK,WAAU,UAAS,OAAO,EAAE,UAAU,WAAW,GACrD;AAAA,4BAAa,mBAAZ,EAAkB,SAAO,MAAC,WAAU,eACnC,8BAAC,UAAO,OAAM,QAAO,SAAQ,eAC3B,8BAAC,cAAW,QAAO,QAAO,OAAM,QAAO,GACzC,GACF;AAAA,QACC;AAAA,SACH;AAAA;AAAA,EACF,GACF,GACF;AAEJ;AAEA,SAASC,OAAM,IAGsC;AAHtC,eACb;AAAA;AAAA,EAjEF,IAgEe,IAEV,iBAFU,IAEV;AAAA,IADH;AAAA;AAGA,SACE,oBAAa,mBAAZ,+BAAkB,SAAO,QAAK,OAA9B,EACE,WACH;AAEJ;AAEA,SAASC,SAAQ,IAGsC;AAHtC,eACf;AAAA;AAAA,EA5EF,IA2EiB,IAEZ,iBAFY,IAEZ;AAAA,IADH;AAAA;AAGA,SACE,oBAAa,qBAAZ,+BAAoB,SAAO,QAAK,OAAhC,EACE,WACH;AAEJ;AAEO,IAAM,SAAS;AAAA,EACpB,MAAkB;AAAA,EAClB,SAAAA;AAAA,EACA,SAAAF;AAAA,EACA,OAAAC;AAAA,EACA,aAAyB;AAAA,EACzB,OAAmB;AACrB;","names":["Content","Close","Trigger"]}
@@ -0,0 +1,87 @@
1
+ import {
2
+ Button
3
+ } from "./chunk-U7JPP7WJ.js";
4
+ import {
5
+ __objRest,
6
+ __spreadProps,
7
+ __spreadValues
8
+ } from "./chunk-N552FDTV.js";
9
+
10
+ // src/atoms/dialog.tsx
11
+ import * as RadixDialog from "@radix-ui/react-dialog";
12
+ import { Cross1Icon } from "@radix-ui/react-icons";
13
+ import { Flex } from "@radix-ui/themes";
14
+ import { useRef } from "react";
15
+ import { jsx, jsxs } from "react/jsx-runtime";
16
+ function Content2(props) {
17
+ const _a = props, {
18
+ children,
19
+ style = {},
20
+ width,
21
+ maxWidth,
22
+ minWidth,
23
+ maxHeight,
24
+ height,
25
+ minHeight
26
+ } = _a, rest = __objRest(_a, [
27
+ "children",
28
+ "style",
29
+ "width",
30
+ "maxWidth",
31
+ "minWidth",
32
+ "maxHeight",
33
+ "height",
34
+ "minHeight"
35
+ ]);
36
+ const containerRef = useRef(null);
37
+ const container = document.getElementsByClassName("radix-themes")[0];
38
+ containerRef.current = container;
39
+ return /* @__PURE__ */ jsx(RadixDialog.Portal, { container: containerRef.current, children: /* @__PURE__ */ jsx(RadixDialog.Overlay, { className: "DialogOverlay", children: /* @__PURE__ */ jsx(
40
+ RadixDialog.Content,
41
+ __spreadProps(__spreadValues({
42
+ className: "DialogContent",
43
+ style: __spreadValues({
44
+ width,
45
+ maxWidth,
46
+ minWidth,
47
+ maxHeight,
48
+ height,
49
+ minHeight
50
+ }, style)
51
+ }, rest), {
52
+ children: /* @__PURE__ */ jsxs(Flex, { direction: "column", style: { position: "relative" }, children: [
53
+ /* @__PURE__ */ jsx(RadixDialog.Close, { asChild: true, className: "DialogClose", children: /* @__PURE__ */ jsx(Button, { color: "gray", variant: "transparent", children: /* @__PURE__ */ jsx(Cross1Icon, { height: "18px", width: "18px" }) }) }),
54
+ children
55
+ ] })
56
+ })
57
+ ) }) });
58
+ }
59
+ function Close2(_a) {
60
+ var _b = _a, {
61
+ children
62
+ } = _b, rest = __objRest(_b, [
63
+ "children"
64
+ ]);
65
+ return /* @__PURE__ */ jsx(RadixDialog.Close, __spreadProps(__spreadValues({ asChild: true }, rest), { children }));
66
+ }
67
+ function Trigger2(_a) {
68
+ var _b = _a, {
69
+ children
70
+ } = _b, rest = __objRest(_b, [
71
+ "children"
72
+ ]);
73
+ return /* @__PURE__ */ jsx(RadixDialog.Trigger, __spreadProps(__spreadValues({ asChild: true }, rest), { children }));
74
+ }
75
+ var Dialog = {
76
+ Root: RadixDialog.Root,
77
+ Trigger: Trigger2,
78
+ Content: Content2,
79
+ Close: Close2,
80
+ Description: RadixDialog.Description,
81
+ Title: RadixDialog.Title
82
+ };
83
+
84
+ export {
85
+ Dialog
86
+ };
87
+ //# sourceMappingURL=chunk-4UR2XNMY.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/atoms/dialog.tsx"],"sourcesContent":["import * as RadixDialog from '@radix-ui/react-dialog';\nimport { Cross1Icon } from '@radix-ui/react-icons';\nimport { Flex } from '@radix-ui/themes';\nimport { useEffect, useRef } from 'react';\nimport { Button } from './button';\n\ntype ContentProps = RadixDialog.DialogContentProps & {\n width?: string;\n maxWidth?: string;\n minWidth?: string;\n height?: string;\n maxHeight?: string;\n minHeight?: string;\n};\n\nfunction Content(props: ContentProps): React.ReactElement {\n const {\n children,\n style = {},\n width,\n maxWidth,\n minWidth,\n maxHeight,\n height,\n minHeight,\n ...rest\n } = props;\n const containerRef = useRef<Element | null>(null);\n\n // useEffect(() => {\n // const container = document.getElementsByClassName('radix-themes')[0];\n // containerRef.current = container;\n // console.log({ container });\n // }, []);\n\n const container = document.getElementsByClassName('radix-themes')[0];\n containerRef.current = container;\n\n return (\n <RadixDialog.Portal container={containerRef.current}>\n <RadixDialog.Overlay className=\"DialogOverlay\">\n <RadixDialog.Content\n className=\"DialogContent\"\n style={{\n width,\n maxWidth,\n minWidth,\n maxHeight,\n height,\n minHeight,\n ...style,\n }}\n {...rest}\n >\n <Flex direction=\"column\" style={{ position: 'relative' }}>\n <RadixDialog.Close asChild className=\"DialogClose\">\n <Button color=\"gray\" variant=\"transparent\">\n <Cross1Icon height=\"18px\" width=\"18px\" />\n </Button>\n </RadixDialog.Close>\n {children}\n </Flex>\n </RadixDialog.Content>\n </RadixDialog.Overlay>\n </RadixDialog.Portal>\n );\n}\n\nfunction Close({\n children,\n ...rest\n}: RadixDialog.DialogCloseProps): React.ReactElement {\n return (\n <RadixDialog.Close asChild {...rest}>\n {children}\n </RadixDialog.Close>\n );\n}\n\nfunction Trigger({\n children,\n ...rest\n}: RadixDialog.DialogTriggerProps): React.ReactElement {\n return (\n <RadixDialog.Trigger asChild {...rest}>\n {children}\n </RadixDialog.Trigger>\n );\n}\n\nexport const Dialog = {\n Root: RadixDialog.Root,\n Trigger,\n Content,\n Close,\n Description: RadixDialog.Description,\n Title: RadixDialog.Title,\n};\n"],"mappings":";;;;;;;;;;AAAA,YAAY,iBAAiB;AAC7B,SAAS,kBAAkB;AAC3B,SAAS,YAAY;AACrB,SAAoB,cAAc;AAmDxB,SAGM,KAHN;AAvCV,SAASA,SAAQ,OAAyC;AACxD,QAUI,YATF;AAAA;AAAA,IACA,QAAQ,CAAC;AAAA,IACT;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAxBJ,IA0BM,IADC,iBACD,IADC;A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+ Row
3
+ } from "./chunk-PCWEW2UL.js";
4
+ import {
5
+ Spinner
6
+ } from "./chunk-FR2GDOU2.js";
7
+ import {
8
+ Pagination
9
+ } from "./chunk-VKEZRJ2L.js";
10
+ import {
11
+ Flex
12
+ } from "./chunk-25HMMI7R.js";
13
+ import {
14
+ Typo
15
+ } from "./chunk-52MVZ6AN.js";
16
+ import {
17
+ TriangleArrowDownIcon
18
+ } from "./chunk-BSTJBBEX.js";
19
+ import {
20
+ TriangleArrowUpIcon
21
+ } from "./chunk-NDUKDKGB.js";
22
+
23
+ // src/molecules/expand-table/index.tsx
24
+ import {
25
+ flexRender,
26
+ getCoreRowModel,
27
+ useReactTable,
28
+ getSortedRowModel,
29
+ createColumnHelper,
30
+ getPaginationRowModel
31
+ } from "@tanstack/react-table";
32
+ import { useCallback, useMemo, useState } from "react";
33
+ import { jsx, jsxs } from "react/jsx-runtime";
34
+ function ExpandTable(props) {
35
+ const {
36
+ data,
37
+ columns,
38
+ ExpandComp,
39
+ placeholder,
40
+ onRowClick,
41
+ tableStyle,
42
+ showPagination,
43
+ isLoading,
44
+ pageIndex = 0,
45
+ pageSize = 10,
46
+ siblingCount = 2,
47
+ getRowStyle,
48
+ getCellStyle
49
+ } = props;
50
+ const defaultAlign = "left";
51
+ const [pagination, setPagination] = useState({
52
+ pageIndex: pageIndex || 0,
53
+ pageSize: pageSize || 9999
54
+ });
55
+ const [sorting, setSorting] = useState([]);
56
+ const { getRowModel, getHeaderGroups, setPageIndex } = useReactTable({
57
+ data: data || [],
58
+ columns,
59
+ getCoreRowModel: getCoreRowModel(),
60
+ getSortedRowModel: getSortedRowModel(),
61
+ state: {
62
+ sorting,
63
+ pagination
64
+ },
65
+ onSortingChange: setSorting,
66
+ getPaginationRowModel: getPaginationRowModel(),
67
+ onPaginationChange: setPagination
68
+ });
69
+ const gridTemplateColumns = useMemo(() => {
70
+ return columns.map((col) => {
71
+ var _a;
72
+ if ((_a = col.meta) == null ? void 0 : _a.autoSize)
73
+ return "1fr";
74
+ return `${col.size || 150}px`;
75
+ }).join(" ");
76
+ }, [columns]);
77
+ const rowModels = getRowModel();
78
+ const onChangePagination = useCallback(
79
+ (page) => {
80
+ setPageIndex(page - 1);
81
+ },
82
+ [setPageIndex]
83
+ );
84
+ const helpCompRender = useCallback(
85
+ (rowLength) => {
86
+ if (isLoading) {
87
+ return /* @__PURE__ */ jsx(
88
+ Flex,
89
+ {
90
+ align: "center",
91
+ height: "100%",
92
+ justify: "center",
93
+ p: "5",
94
+ width: "100%",
95
+ children: /* @__PURE__ */ jsx(Spinner, {})
96
+ }
97
+ );
98
+ }
99
+ if (rowLength === 0) {
100
+ return /* @__PURE__ */ jsx("div", { className: "tr", children: /* @__PURE__ */ jsx(Flex, { align: "center", justify: "center", children: placeholder || /* @__PURE__ */ jsx(Typo, { color: "gray", mb: "6", mt: "6", variant: "body", children: "\uB370\uC774\uD130\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4" }) }) }, "expand_placeholder");
101
+ }
102
+ return null;
103
+ },
104
+ [isLoading, placeholder]
105
+ );
106
+ const pageCount = useMemo(() => {
107
+ if (!data)
108
+ return 0;
109
+ return Math.ceil(data.length / pageSize);
110
+ }, [data, pageSize]);
111
+ return /* @__PURE__ */ jsxs("div", { className: "expand-table", style: tableStyle, children: [
112
+ /* @__PURE__ */ jsx("div", { className: "thead", children: getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx(
113
+ "div",
114
+ {
115
+ className: "tr",
116
+ style: { gridTemplateColumns },
117
+ children: headerGroup.headers.map((header) => {
118
+ var _a;
119
+ const sortable = header.column.getCanSort();
120
+ const sortedState = header.column.getIsSorted();
121
+ const justifyContent = ((_a = header.column.columnDef.meta) == null ? void 0 : _a.align) || defaultAlign;
122
+ return /* @__PURE__ */ jsx("div", { className: `${justifyContent} th`, children: /* @__PURE__ */ jsxs(
123
+ "button",
124
+ {
125
+ onClick: header.column.getToggleSortingHandler(),
126
+ style: sortable ? { cursor: "pointer" } : { cursor: "default" },
127
+ type: "button",
128
+ children: [
129
+ /* @__PURE__ */ jsx(Typo, { as: "div", variant: "body", children: flexRender(
130
+ header.column.columnDef.header,
131
+ header.getContext()
132
+ ) }),
133
+ sortable ? /* @__PURE__ */ jsxs(
134
+ Flex,
135
+ {
136
+ direction: "column",
137
+ style: { marginLeft: "var(--space-2)" },
138
+ children: [
139
+ /* @__PURE__ */ jsx(
140
+ TriangleArrowUpIcon,
141
+ {
142
+ color: sortedState === "asc" ? "var(--iris-10)" : "var(--iris-6)"
143
+ }
144
+ ),
145
+ /* @__PURE__ */ jsx(
146
+ TriangleArrowDownIcon,
147
+ {
148
+ color: sortedState === "desc" ? "var(--iris-10)" : "var(--iris-6)"
149
+ }
150
+ )
151
+ ]
152
+ }
153
+ ) : null
154
+ ]
155
+ }
156
+ ) }, header.id);
157
+ })
158
+ },
159
+ headerGroup.id
160
+ )) }),
161
+ /* @__PURE__ */ jsx("div", { className: "tbody", children: helpCompRender(rowModels.rows.length) || rowModels.rows.map((row) => {
162
+ return /* @__PURE__ */ jsx(
163
+ Row,
164
+ {
165
+ ExpandComp,
166
+ defaultAlign,
167
+ getCellStyle,
168
+ getRowStyle,
169
+ gridTemplateColumns,
170
+ onRowClick,
171
+ row
172
+ },
173
+ `row_${row.id}`
174
+ );
175
+ }) }),
176
+ showPagination ? /* @__PURE__ */ jsx(Flex, { justify: "end", pt: "3", width: "100%", children: /* @__PURE__ */ jsx(
177
+ Pagination,
178
+ {
179
+ count: pageCount,
180
+ onChange: onChangePagination,
181
+ page: pagination.pageIndex + 1,
182
+ siblingCount
183
+ }
184
+ ) }) : null
185
+ ] });
186
+ }
187
+
188
+ export {
189
+ createColumnHelper,
190
+ ExpandTable
191
+ };
192
+ //# sourceMappingURL=chunk-7RMTZBCT.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/molecules/expand-table/index.tsx"],"sourcesContent":["import type {\n ColumnDef,\n SortingState,\n RowData,\n Row as RowType,\n PaginationState,\n} from '@tanstack/react-table';\nimport type { CSSProperties } from 'react';\nimport {\n flexRender,\n getCoreRowModel,\n useReactTable,\n getSortedRowModel,\n createColumnHelper,\n getPaginationRowModel,\n} from '@tanstack/react-table';\nimport React, { useCallback, useMemo, useState } from 'react';\nimport { Flex, Pagination, Spinner, Typo } from '../../atoms';\nimport { TriangleArrowDownIcon } from '../../icons/down';\nimport { TriangleArrowUpIcon } from '../../icons/up';\nimport { Row, type ExpandComp, type OnRowClick } from './row';\n\nexport type { ExpandComp, OnRowClick, ColumnDef, RowType as Row };\nexport { createColumnHelper };\n\nexport interface ExpandTableProps<Datum extends RowData> {\n /** 렌더할 데이터 배열 */\n data?: Datum[];\n /** 테이블 컬럼의 메타 데이터 */\n columns: ColumnDef<Datum>[];\n /** Row의 open이 true인 경우 하단의 collapse에 렌더할 컴포넌트 */\n ExpandComp?: ExpandComp<Datum>;\n /** 데이테가 없을 시 화면에 표시할 컴포넌트 */\n placeholder?: React.ReactNode;\n /** 행 클릭 시 실행할 콜백 */\n onRowClick?: OnRowClick<Datum>;\n getRowStyle?: (data: Datum) => CSSProperties;\n getCellStyle?: (data: Datum) => CSSProperties;\n tableStyle?: CSSProperties;\n isLoading?: boolean;\n\n /** pagination - 표시 유무 */\n showPagination?: boolean;\n /** pagination - 현재 선택된 페이지, 0부터 시작 */\n pageIndex?: number;\n /** pagination - 한 페이지에 표시될 컬럼 개수 */\n pageSize?: number;\n /** pagination - */\n siblingCount?: number;\n}\n\nexport function ExpandTable<Datum extends RowData>(\n props: ExpandTableProps<Datum>\n): React.ReactNode {\n const {\n data,\n columns,\n ExpandComp,\n placeholder,\n onRowClick,\n tableStyle,\n showPagination,\n isLoading,\n pageIndex = 0,\n pageSize = 10,\n siblingCount = 2,\n getRowStyle,\n getCellStyle,\n } = props;\n const defaultAlign = 'left';\n const [pagination, setPagination] = useState<PaginationState>({\n pageIndex: pageIndex || 0,\n pageSize: pageSize || 9999,\n });\n\n const [sorting, setSorting] = useState<SortingState>([]);\n const { getRowModel, getHeaderGroups, setPageIndex } = useReactTable({\n data: data || [],\n columns,\n getCoreRowModel: getCoreRowModel(),\n getSortedRowModel: getSortedRowModel(),\n state: {\n sorting,\n pagination,\n },\n onSortingChange: setSorting,\n getPaginationRowModel: getPaginationRowModel(),\n onPaginationChange: setPagination,\n });\n\n const gridTemplateColumns = useMemo<string>(() => {\n return columns\n .map((col) => {\n if (col.meta?.autoSize) return '1fr';\n return `${col.size || 150}px`;\n })\n .join(' ');\n }, [columns]);\n\n const rowModels = getRowModel();\n\n const onChangePagination = useCallback(\n (page: number) => {\n setPageIndex(page - 1);\n },\n [setPageIndex]\n );\n\n const helpCompRender = useCallback(\n (rowLength: number) => {\n if (isLoading) {\n return (\n <Flex\n align=\"center\"\n height=\"100%\"\n justify=\"center\"\n p=\"5\"\n width=\"100%\"\n >\n <Spinner />\n </Flex>\n );\n }\n if (rowLength === 0) {\n return (\n <div className=\"tr\" key=\"expand_placeholder\">\n <Flex align=\"center\" justify=\"center\">\n {placeholder || (\n <Typo color=\"gray\" mb=\"6\" mt=\"6\" variant=\"body\">\n 데이터가 없습니다\n </Typo>\n )}\n </Flex>\n </div>\n );\n }\n return null;\n },\n [isLoading, placeholder]\n );\n\n const pageCount = useMemo(() => {\n if (!data) return 0;\n return Math.ceil(data.length / pageSize);\n }, [data, pageSize]);\n\n return (\n <div className=\"expand-table\" style={tableStyle}>\n <div className=\"thead\">\n {getHeaderGroups().map((headerGroup) => (\n <div\n className=\"tr\"\n key={headerGroup.id}\n style={{ gridTemplateColumns }}\n >\n {headerGroup.headers.map((header) => {\n const sortable = header.column.getCanSort();\n const sortedState = header.column.getIsSorted();\n const justifyContent =\n header.column.columnDef.meta?.align || defaultAlign;\n\n return (\n <div className={`${justifyContent} th`} key={header.id}>\n <button\n onClick={header.column.getToggleSortingHandler()}\n style={\n sortable ? { cursor: 'pointer' } : { cursor: 'default' }\n }\n type=\"button\"\n >\n <Typo as=\"div\" variant=\"body\">\n {flexRender(\n header.column.columnDef.header,\n header.getContext()\n )}\n </Typo>\n {sortable ? (\n <Flex\n direction=\"column\"\n style={{ marginLeft: 'var(--space-2)' }}\n >\n <TriangleArrowUpIcon\n color={\n sortedState === 'asc'\n ? 'var(--iris-10)'\n : 'var(--iris-6)'\n }\n />\n <TriangleArrowDownIcon\n color={\n sortedState === 'desc'\n ? 'var(--iris-10)'\n : 'var(--iris-6)'\n }\n />\n </Flex>\n ) : null}\n </button>\n </div>\n );\n })}\n </div>\n ))}\n </div>\n <div className=\"tbody\">\n {/* 조건에 따라 placeholder 또는 loading 렌더*/}\n {helpCompRender(rowModels.rows.length) ||\n rowModels.rows.map((row) => {\n return (\n <Row\n ExpandComp={ExpandComp}\n defaultAlign={defaultAlign}\n getCellStyle={getCellStyle}\n getRowStyle={getRowStyle}\n gridTemplateColumns={gridTemplateColumns}\n key={`row_${row.id}`}\n onRowClick={onRowClick}\n row={row}\n />\n );\n })}\n </div>\n\n {showPagination ? (\n <Flex justify=\"end\" pt=\"3\" width=\"100%\">\n <Pagination\n count={pageCount}\n onChange={onChangePagination}\n page={pagination.pageIndex + 1}\n siblingCount={siblingCount}\n />\n </Flex>\n ) : null}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAQA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAgB,aAAa,SAAS,gBAAgB;AAuG1C,cA0DU,YA1DV;AApEL,SAAS,YACd,OACiB;AACjB,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,YAAY;AAAA,IACZ,WAAW;AAAA,IACX,eAAe;AAAA,IACf;AAAA,IACA;AAAA,EACF,IAAI;AACJ,QAAM,eAAe;AACrB,QAAM,CAAC,YAAY,aAAa,IAAI,SAA0B;AAAA,IAC5D,WAAW,aAAa;AAAA,IACxB,UAAU,YAAY;AAAA,EACxB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MAhDI,YAAY;AAAA,IAiDnB,CACD,GACH;AAAA,IACA,oBAAC,SAAI,WAAU,SAEZ,yBAAe,UAAU,KAAK,MAAM,KACnC,UAAU,KAAK,IAAI,CAAC,QAAQ;AAC1B,aACE;AAAA,QAAC;AAAA;AAAA,UACC;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UAEA;AAAA,UACA;AAAA;AAAA,QAFK,OAAO,IAAI,EAAE;AAAA,MAGpB;AAAA,IAEJ,CAAC,GACL;AAAA,IAEC,iBACC,oBAAC,QAAK,SAAQ,OAAM,IAAG,KAAI,OAAM,QAC/B;AAAA,MAAC;AAAA;AAAA,QACC,OAAO;AAAA,QACP,UAAU;AAAA,QACV,MAAM,WAAW,YAAY;AAAA,QAC7B;AAAA;AAAA,IACF,GACF,IACE;AAAA,KACN;AAEJ;","names":[]}
@@ -0,0 +1,164 @@
1
+ import {
2
+ ThemeProvider
3
+ } from "./chunk-BVNXAZ4W.js";
4
+ import {
5
+ Grid
6
+ } from "./chunk-EGEQY3KT.js";
7
+ import {
8
+ Box
9
+ } from "./chunk-4Y5BEXVN.js";
10
+ import {
11
+ Button
12
+ } from "./chunk-U7JPP7WJ.js";
13
+ import {
14
+ AspectRatio
15
+ } from "./chunk-EAXUQEO5.js";
16
+ import {
17
+ Badge
18
+ } from "./chunk-EWD4AO5N.js";
19
+ import {
20
+ Heading
21
+ } from "./chunk-HK224ADT.js";
22
+ import {
23
+ Flex
24
+ } from "./chunk-25HMMI7R.js";
25
+ import {
26
+ Typo
27
+ } from "./chunk-52MVZ6AN.js";
28
+ import {
29
+ __spreadProps,
30
+ __spreadValues
31
+ } from "./chunk-N552FDTV.js";
32
+
33
+ // src/molecules/learning-post.tsx
34
+ import { jsx, jsxs } from "react/jsx-runtime";
35
+ function LearningPost(props) {
36
+ const {
37
+ defaultThemeProps,
38
+ html,
39
+ tags,
40
+ title,
41
+ metaDescription,
42
+ imageComp,
43
+ onPageBack,
44
+ children
45
+ } = props;
46
+ return /* @__PURE__ */ jsx(
47
+ ThemeProvider,
48
+ __spreadProps(__spreadValues({}, defaultThemeProps), {
49
+ accentColor: "iris",
50
+ scaling: "110%",
51
+ style: {},
52
+ children: html ? /* @__PURE__ */ jsxs(
53
+ Grid,
54
+ {
55
+ columns: { initial: "1", md: "130px 1fr 130px" },
56
+ gap: { initial: "2", md: "5" },
57
+ height: "100%",
58
+ justify: "center",
59
+ pb: "160px",
60
+ position: "relative",
61
+ px: "4",
62
+ width: "100%",
63
+ children: [
64
+ /* @__PURE__ */ jsx("div", {}),
65
+ /* @__PURE__ */ jsxs(
66
+ Flex,
67
+ {
68
+ align: "center",
69
+ direction: "column",
70
+ maxWidth: "880px",
71
+ mt: { initial: "3", md: "8" },
72
+ overflow: "hidden",
73
+ width: "100%",
74
+ children: [
75
+ /* @__PURE__ */ jsxs(Grid, { align: "start", columns: { initial: "1", sm: "2" }, gap: "2", children: [
76
+ /* @__PURE__ */ jsxs(
77
+ Grid,
78
+ {
79
+ gap: "3",
80
+ mb: { initial: "4", sm: "0" },
81
+ style: { alignSelf: "flex-start" },
82
+ children: [
83
+ /* @__PURE__ */ jsx(
84
+ Heading,
85
+ {
86
+ style: {
87
+ fontSize: "2.4rem",
88
+ lineHeight: 1.25,
89
+ wordBreak: "keep-all"
90
+ },
91
+ variant: "heading1",
92
+ children: title
93
+ }
94
+ ),
95
+ /* @__PURE__ */ jsx(Typo, { children: metaDescription }),
96
+ /* @__PURE__ */ jsx(Flex, { gap: "1", wrap: "wrap", children: tags == null ? void 0 : tags.map((el) => {
97
+ var _a;
98
+ if ((_a = el.name) == null ? void 0 : _a.startsWith("filter"))
99
+ return;
100
+ return /* @__PURE__ */ jsx(Badge, { size: "large", variant: "solid", children: el.name }, el.id);
101
+ }) })
102
+ ]
103
+ }
104
+ ),
105
+ /* @__PURE__ */ jsx(
106
+ AspectRatio,
107
+ {
108
+ ratio: 5 / 3,
109
+ style: {
110
+ overflow: "hidden",
111
+ borderRadius: "var(--radius-4)",
112
+ objectFit: "cover"
113
+ },
114
+ children: imageComp
115
+ }
116
+ )
117
+ ] }),
118
+ /* @__PURE__ */ jsx(Box, { mt: "5", width: "100%", children: /* @__PURE__ */ jsx(
119
+ "div",
120
+ {
121
+ className: "gh-content",
122
+ dangerouslySetInnerHTML: { __html: html }
123
+ }
124
+ ) })
125
+ ]
126
+ }
127
+ ),
128
+ children
129
+ ]
130
+ }
131
+ ) : /* @__PURE__ */ jsxs(
132
+ Flex,
133
+ {
134
+ align: "center",
135
+ direction: "column",
136
+ gap: "6",
137
+ height: "100%",
138
+ justify: "center",
139
+ width: "100%",
140
+ children: [
141
+ /* @__PURE__ */ jsx(Heading, { variant: "heading1", children: "\uCF58\uD150\uCE20\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4." }),
142
+ /* @__PURE__ */ jsx(
143
+ Heading,
144
+ {
145
+ align: "center",
146
+ color: "gray",
147
+ variant: "heading4",
148
+ weight: "regular",
149
+ children: `\uC694\uCCAD\uD558\uC2E0 \uCF58\uD150\uCE20\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
150
+ \uC7A0\uC2DC \uD6C4 \uB2E4\uC2DC \uC2DC\uB3C4\uD574\uC8FC\uC138\uC694.`
151
+ }
152
+ ),
153
+ /* @__PURE__ */ jsx(Button, { onClick: onPageBack, size: "large", children: "\uB4A4\uB85C\uAC00\uAE30" })
154
+ ]
155
+ }
156
+ )
157
+ })
158
+ );
159
+ }
160
+
161
+ export {
162
+ LearningPost
163
+ };
164
+ //# sourceMappingURL=chunk-CVON644P.js.map