@tipp/ui 1.2.21 → 1.3.1
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/atoms/field-error-wrapper.js +2 -2
- package/dist/atoms/index.js +57 -57
- package/dist/atoms/pagination.js +2 -2
- package/dist/chunk-2UZBUVJL.js +123 -0
- package/dist/chunk-2UZBUVJL.js.map +1 -0
- package/dist/chunk-3AEOJKJI.js +123 -0
- package/dist/chunk-3AEOJKJI.js.map +1 -0
- package/dist/chunk-4LZTPZ5T.js +340 -0
- package/dist/chunk-4LZTPZ5T.js.map +1 -0
- package/dist/chunk-5X3BCQPR.js +128 -0
- package/dist/chunk-5X3BCQPR.js.map +1 -0
- package/dist/chunk-645IUNKJ.js +164 -0
- package/dist/chunk-645IUNKJ.js.map +1 -0
- package/dist/chunk-6F2NKWN6.js +128 -0
- package/dist/chunk-6F2NKWN6.js.map +1 -0
- package/dist/chunk-6IPYGPBK.js +145 -0
- package/dist/chunk-6IPYGPBK.js.map +1 -0
- package/dist/chunk-6QQPOAYW.js +145 -0
- package/dist/chunk-6QQPOAYW.js.map +1 -0
- package/dist/chunk-6YBBHIKU.js +340 -0
- package/dist/chunk-6YBBHIKU.js.map +1 -0
- package/dist/chunk-6ZAP2Q6K.js +1 -0
- package/dist/chunk-6ZAP2Q6K.js.map +1 -0
- package/dist/chunk-73RRM3PM.js +123 -0
- package/dist/chunk-73RRM3PM.js.map +1 -0
- package/dist/chunk-75PG3OYR.js +183 -0
- package/dist/chunk-75PG3OYR.js.map +1 -0
- package/dist/chunk-A5QAIT36.js +173 -0
- package/dist/chunk-A5QAIT36.js.map +1 -0
- package/dist/chunk-AQOEKDWM.js +145 -0
- package/dist/chunk-AQOEKDWM.js.map +1 -0
- package/dist/chunk-BVNXAZ4W.js +15 -0
- package/dist/chunk-BVNXAZ4W.js.map +1 -0
- package/dist/chunk-C2X3WJR3.js +183 -0
- package/dist/chunk-C2X3WJR3.js.map +1 -0
- package/dist/chunk-C4ELQHF2.js +145 -0
- package/dist/chunk-C4ELQHF2.js.map +1 -0
- package/dist/chunk-CG4SCRPG.js +123 -0
- package/dist/chunk-CG4SCRPG.js.map +1 -0
- package/dist/chunk-CTKB7XD7.js +173 -0
- package/dist/chunk-CTKB7XD7.js.map +1 -0
- package/dist/chunk-DGIUCAZZ.js +164 -0
- package/dist/chunk-DGIUCAZZ.js.map +1 -0
- package/dist/chunk-DYKEZ7NH.js +123 -0
- package/dist/chunk-DYKEZ7NH.js.map +1 -0
- package/dist/chunk-EMCXUIHP.js +161 -0
- package/dist/chunk-EMCXUIHP.js.map +1 -0
- package/dist/chunk-FA5LZP3V.js +161 -0
- package/dist/chunk-FA5LZP3V.js.map +1 -0
- package/dist/chunk-FIIIEJLL.js +164 -0
- package/dist/chunk-FIIIEJLL.js.map +1 -0
- package/dist/chunk-FYUX53KS.js +340 -0
- package/dist/chunk-FYUX53KS.js.map +1 -0
- package/dist/chunk-G3F273US.js +161 -0
- package/dist/chunk-G3F273US.js.map +1 -0
- package/dist/chunk-GNHIR74H.js +340 -0
- package/dist/chunk-GNHIR74H.js.map +1 -0
- package/dist/chunk-GOMNN3RB.js +164 -0
- package/dist/chunk-GOMNN3RB.js.map +1 -0
- package/dist/chunk-HLFIBPJT.js +123 -0
- package/dist/chunk-HLFIBPJT.js.map +1 -0
- package/dist/chunk-IE7LZPQS.js +161 -0
- package/dist/chunk-IE7LZPQS.js.map +1 -0
- package/dist/chunk-IM7DSIK2.js +128 -0
- package/dist/chunk-IM7DSIK2.js.map +1 -0
- package/dist/chunk-J3EDICNX.js +176 -0
- package/dist/chunk-J3EDICNX.js.map +1 -0
- package/dist/chunk-J75G72IG.js +123 -0
- package/dist/chunk-J75G72IG.js.map +1 -0
- package/dist/chunk-JOGHKB3I.js +123 -0
- package/dist/chunk-JOGHKB3I.js.map +1 -0
- package/dist/chunk-K5YOXMCZ.js +183 -0
- package/dist/chunk-K5YOXMCZ.js.map +1 -0
- package/dist/chunk-LCFIXFMZ.js +161 -0
- package/dist/chunk-LCFIXFMZ.js.map +1 -0
- package/dist/chunk-LPIEJIKD.js +130 -0
- package/dist/chunk-LPIEJIKD.js.map +1 -0
- package/dist/chunk-MV5RAZYM.js +130 -0
- package/dist/chunk-MV5RAZYM.js.map +1 -0
- package/dist/chunk-NFAO4ZOY.js +145 -0
- package/dist/chunk-NFAO4ZOY.js.map +1 -0
- package/dist/chunk-NFNLPXUN.js +161 -0
- package/dist/chunk-NFNLPXUN.js.map +1 -0
- package/dist/chunk-OAFZJPCX.js +127 -0
- package/dist/chunk-OAFZJPCX.js.map +1 -0
- package/dist/chunk-P3M2VZEC.js +169 -0
- package/dist/chunk-P3M2VZEC.js.map +1 -0
- package/dist/chunk-QQC7RJJV.js +145 -0
- package/dist/chunk-QQC7RJJV.js.map +1 -0
- package/dist/chunk-R4OEICEH.js +173 -0
- package/dist/chunk-R4OEICEH.js.map +1 -0
- package/dist/chunk-S7N3OJMB.js +164 -0
- package/dist/chunk-S7N3OJMB.js.map +1 -0
- package/dist/chunk-SJJRMOZT.js +123 -0
- package/dist/chunk-SJJRMOZT.js.map +1 -0
- package/dist/chunk-SK42QINW.js +183 -0
- package/dist/chunk-SK42QINW.js.map +1 -0
- package/dist/chunk-TVPONI3Y.js +340 -0
- package/dist/chunk-TVPONI3Y.js.map +1 -0
- package/dist/chunk-UNETGTV5.js +161 -0
- package/dist/chunk-UNETGTV5.js.map +1 -0
- package/dist/chunk-URPUEA3G.js +130 -0
- package/dist/chunk-URPUEA3G.js.map +1 -0
- package/dist/chunk-VCWF3AHX.js +173 -0
- package/dist/chunk-VCWF3AHX.js.map +1 -0
- package/dist/chunk-VEM3E4QK.js +175 -0
- package/dist/chunk-VEM3E4QK.js.map +1 -0
- package/dist/chunk-VGORTGYC.js +176 -0
- package/dist/chunk-VGORTGYC.js.map +1 -0
- package/dist/chunk-WB5DTU6Y.js +123 -0
- package/dist/chunk-WB5DTU6Y.js.map +1 -0
- package/dist/chunk-WHOLYNTB.js +123 -0
- package/dist/chunk-WHOLYNTB.js.map +1 -0
- package/dist/chunk-XNP73UIK.js +164 -0
- package/dist/chunk-XNP73UIK.js.map +1 -0
- package/dist/chunk-Y4QN32UT.js +340 -0
- package/dist/chunk-Y4QN32UT.js.map +1 -0
- package/dist/chunk-YD47UTWW.js +97 -0
- package/dist/chunk-YD47UTWW.js.map +1 -0
- package/dist/chunk-YDYRNWR7.js +128 -0
- package/dist/chunk-YDYRNWR7.js.map +1 -0
- package/dist/chunk-YQSWQ7WB.js +169 -0
- package/dist/chunk-YQSWQ7WB.js.map +1 -0
- package/dist/index.cjs +134 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +2055 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +85 -81
- package/dist/molecules/date-picker/index.js +2 -2
- package/dist/molecules/expand-table/index.js +25 -25
- package/dist/molecules/expand-table/row.js +24 -24
- package/dist/molecules/index.cjs +181 -38
- package/dist/molecules/index.cjs.map +1 -1
- package/dist/molecules/index.d.cts +3 -0
- package/dist/molecules/index.d.ts +3 -0
- package/dist/molecules/index.js +38 -33
- package/dist/molecules/learning-post.cjs +339 -0
- package/dist/molecules/learning-post.cjs.map +1 -0
- package/dist/molecules/learning-post.d.cts +22 -0
- package/dist/molecules/learning-post.d.ts +22 -0
- package/dist/molecules/learning-post.js +17 -0
- package/dist/molecules/learning-post.js.map +1 -0
- package/dist/molecules/navigation.js +25 -25
- package/dist/molecules/stepper.js +3 -3
- package/dist/molecules/tag-selector.js +25 -25
- package/dist/theme/theme-provider.cjs.map +1 -1
- package/dist/theme/theme-provider.d.cts +1 -1
- package/dist/theme/theme-provider.d.ts +1 -1
- package/dist/theme/theme-provider.js +1 -1
- package/dist/utils/index.js +3 -3
- package/package.json +3 -3
- package/src/molecules/index.ts +2 -1
- package/src/molecules/learning-post.tsx +143 -0
- package/src/theme/theme-provider.tsx +1 -1
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Flex
|
|
3
|
+
} from "./chunk-25HMMI7R.js";
|
|
4
|
+
import {
|
|
5
|
+
Typo
|
|
6
|
+
} from "./chunk-52MVZ6AN.js";
|
|
7
|
+
import {
|
|
8
|
+
Avatar
|
|
9
|
+
} from "./chunk-3SSSCLJ5.js";
|
|
10
|
+
import {
|
|
11
|
+
CheckIcon
|
|
12
|
+
} from "./chunk-66C4U3BG.js";
|
|
13
|
+
|
|
14
|
+
// src/molecules/stepper.tsx
|
|
15
|
+
import { createContext, Children, useContext, useMemo } from "react";
|
|
16
|
+
import { Separator } from "@radix-ui/themes";
|
|
17
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
18
|
+
var StepContext = createContext({
|
|
19
|
+
active: false,
|
|
20
|
+
completed: false,
|
|
21
|
+
index: 0
|
|
22
|
+
});
|
|
23
|
+
function Root(props) {
|
|
24
|
+
const {
|
|
25
|
+
activeStep = 0,
|
|
26
|
+
children,
|
|
27
|
+
width,
|
|
28
|
+
minWidth,
|
|
29
|
+
maxWidth,
|
|
30
|
+
direction = "vertical"
|
|
31
|
+
} = props;
|
|
32
|
+
return /* @__PURE__ */ jsx(
|
|
33
|
+
Flex,
|
|
34
|
+
{
|
|
35
|
+
gap: "3",
|
|
36
|
+
style: {
|
|
37
|
+
width,
|
|
38
|
+
minWidth,
|
|
39
|
+
maxWidth
|
|
40
|
+
},
|
|
41
|
+
children: Children.map(children, (child, index) => {
|
|
42
|
+
return /* @__PURE__ */ jsx(
|
|
43
|
+
StepContext.Provider,
|
|
44
|
+
{
|
|
45
|
+
value: {
|
|
46
|
+
active: index === activeStep,
|
|
47
|
+
completed: index < activeStep,
|
|
48
|
+
index,
|
|
49
|
+
direction
|
|
50
|
+
},
|
|
51
|
+
children: child
|
|
52
|
+
}
|
|
53
|
+
);
|
|
54
|
+
})
|
|
55
|
+
}
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
function Step(props) {
|
|
59
|
+
const { Icon, children } = props;
|
|
60
|
+
const {
|
|
61
|
+
active,
|
|
62
|
+
completed,
|
|
63
|
+
index,
|
|
64
|
+
direction = "vertical"
|
|
65
|
+
} = useContext(StepContext);
|
|
66
|
+
const connector = index > 0 ? /* @__PURE__ */ jsx(
|
|
67
|
+
Separator,
|
|
68
|
+
{
|
|
69
|
+
style: {
|
|
70
|
+
width: `calc(100% - 40px)`,
|
|
71
|
+
position: "absolute",
|
|
72
|
+
top: 16,
|
|
73
|
+
right: `calc(50% + 26px)`
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
) : null;
|
|
77
|
+
const InnerStep = useMemo(() => {
|
|
78
|
+
if (active) {
|
|
79
|
+
return ActiveStep;
|
|
80
|
+
}
|
|
81
|
+
if (completed) {
|
|
82
|
+
return CompleteStep;
|
|
83
|
+
}
|
|
84
|
+
return IncompleteStep;
|
|
85
|
+
}, [completed, active]);
|
|
86
|
+
return /* @__PURE__ */ jsxs(
|
|
87
|
+
Flex,
|
|
88
|
+
{
|
|
89
|
+
align: "center",
|
|
90
|
+
direction: direction === "horizontal" ? "row" : "column",
|
|
91
|
+
gap: "4",
|
|
92
|
+
position: "relative",
|
|
93
|
+
style: { flex: 1 },
|
|
94
|
+
children: [
|
|
95
|
+
connector,
|
|
96
|
+
/* @__PURE__ */ jsx(InnerStep, { Icon, children })
|
|
97
|
+
]
|
|
98
|
+
}
|
|
99
|
+
);
|
|
100
|
+
}
|
|
101
|
+
function CompleteStep(props) {
|
|
102
|
+
const { Icon, children } = props;
|
|
103
|
+
const { completed, active } = useContext(StepContext);
|
|
104
|
+
const background = "var(--accent-a4)";
|
|
105
|
+
const border = "1px solid var(--accent-7)";
|
|
106
|
+
const color = "var(--accent-contrast)";
|
|
107
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
108
|
+
Icon ? /* @__PURE__ */ jsx(Icon, { active, completed }) : /* @__PURE__ */ jsx(
|
|
109
|
+
Avatar,
|
|
110
|
+
{
|
|
111
|
+
fallback: /* @__PURE__ */ jsx(CheckIcon, { fill: color, height: 16, width: 16 }),
|
|
112
|
+
radius: "full",
|
|
113
|
+
size: "medium",
|
|
114
|
+
style: {
|
|
115
|
+
border,
|
|
116
|
+
background
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
),
|
|
120
|
+
/* @__PURE__ */ jsx(Typo, { align: "center", variant: "caption", children })
|
|
121
|
+
] });
|
|
122
|
+
}
|
|
123
|
+
function IncompleteStep(props) {
|
|
124
|
+
const { Icon, children } = props;
|
|
125
|
+
const { completed, active, index } = useContext(StepContext);
|
|
126
|
+
const background = "var(--gray-5)";
|
|
127
|
+
const color = "var(--gray-a11)";
|
|
128
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
129
|
+
Icon ? /* @__PURE__ */ jsx(Icon, { active, completed }) : /* @__PURE__ */ jsx(
|
|
130
|
+
Avatar,
|
|
131
|
+
{
|
|
132
|
+
fallback: /* @__PURE__ */ jsx(Typo, { style: { color }, children: index + 1 }),
|
|
133
|
+
radius: "full",
|
|
134
|
+
size: "medium",
|
|
135
|
+
style: {
|
|
136
|
+
background
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
),
|
|
140
|
+
/* @__PURE__ */ jsx(Typo, { align: "center", style: { color }, variant: "caption", children })
|
|
141
|
+
] });
|
|
142
|
+
}
|
|
143
|
+
function ActiveStep(props) {
|
|
144
|
+
const { Icon, children } = props;
|
|
145
|
+
const { completed, active, index } = useContext(StepContext);
|
|
146
|
+
const background = "var(--accent-10)";
|
|
147
|
+
const color = "var(--accent-contrast)";
|
|
148
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
149
|
+
Icon ? /* @__PURE__ */ jsx(Icon, { active, completed }) : /* @__PURE__ */ jsx(
|
|
150
|
+
Avatar,
|
|
151
|
+
{
|
|
152
|
+
fallback: /* @__PURE__ */ jsx(Typo, { style: { color }, weight: "bold", children: index + 1 }),
|
|
153
|
+
radius: "full",
|
|
154
|
+
size: "medium",
|
|
155
|
+
style: { background }
|
|
156
|
+
}
|
|
157
|
+
),
|
|
158
|
+
/* @__PURE__ */ jsx(Typo, { align: "center", variant: "caption", weight: "bold", children })
|
|
159
|
+
] });
|
|
160
|
+
}
|
|
161
|
+
var Stepper = {
|
|
162
|
+
Root,
|
|
163
|
+
Step
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
export {
|
|
167
|
+
Stepper
|
|
168
|
+
};
|
|
169
|
+
//# sourceMappingURL=chunk-YQSWQ7WB.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/molecules/stepper.tsx"],"sourcesContent":["import React, { createContext, Children, useContext, useMemo } from 'react';\nimport { Separator } from '@radix-ui/themes';\nimport { Flex } from '../atoms/flex';\nimport { Avatar } from '../atoms/avatar';\nimport { CheckIcon } from '../icon';\nimport { Typo } from '../atoms/typo';\n\ninterface StepState extends Pick<StepperProps, 'direction'> {\n active: boolean;\n completed: boolean;\n index: number;\n}\n\nconst StepContext = createContext<StepState>({\n active: false,\n completed: false,\n index: 0,\n});\n\ninterface StepperProps {\n // 활성화된 스텝 인덱스. 0부터 시작\n activeStep?: number;\n children?: React.ReactElement | React.ReactElement[];\n width?: string;\n maxWidth?: string;\n minWidth?: string;\n /** icon과 children의 배치 방향. 기본 값 vertical */\n direction?: 'horizontal' | 'vertical';\n}\n\nfunction Root(props: StepperProps): React.ReactElement {\n const {\n activeStep = 0,\n children,\n width,\n minWidth,\n maxWidth,\n direction = 'vertical',\n } = props;\n\n return (\n <Flex\n gap=\"3\"\n style={{\n width,\n minWidth,\n maxWidth,\n }}\n >\n {Children.map(children, (child, index) => {\n return (\n <StepContext.Provider\n value={{\n active: index === activeStep,\n completed: index < activeStep,\n index,\n direction,\n }}\n >\n {child}\n </StepContext.Provider>\n );\n })}\n </Flex>\n );\n}\n\ninterface StepProps {\n children?: React.ReactNode;\n /** 아이콘 커스텀 필요시 사용 */\n Icon?: (args: { completed: boolean; active: boolean }) => React.ReactElement;\n}\n\nfunction Step(props: StepProps): React.ReactElement {\n const { Icon, children } = props;\n const {\n active,\n completed,\n index,\n direction = 'vertical',\n } = useContext(StepContext);\n\n const connector =\n index > 0 ? (\n <Separator\n style={{\n width: `calc(100% - 40px)`,\n position: 'absolute',\n top: 16,\n right: `calc(50% + 26px)`,\n }}\n />\n ) : null;\n\n const InnerStep = useMemo<(props: StepProps) => React.ReactElement>(() => {\n if (active) {\n return ActiveStep;\n }\n if (completed) {\n return CompleteStep;\n }\n return IncompleteStep;\n }, [completed, active]);\n\n return (\n <Flex\n align=\"center\"\n direction={direction === 'horizontal' ? 'row' : 'column'}\n gap=\"4\"\n position=\"relative\"\n style={{ flex: 1 }}\n >\n {connector}\n <InnerStep Icon={Icon}>{children}</InnerStep>\n </Flex>\n );\n}\n\nfunction CompleteStep(props: StepProps): React.ReactElement {\n const { Icon, children } = props;\n const { completed, active } = useContext(StepContext);\n const background = 'var(--accent-a4)';\n const border = '1px solid var(--accent-7)';\n const color = 'var(--accent-contrast)';\n\n return (\n <>\n {Icon ? (\n <Icon active={active} completed={completed} />\n ) : (\n <Avatar\n fallback={<CheckIcon fill={color} height={16} width={16} />}\n radius=\"full\"\n size=\"medium\"\n style={{\n border,\n background,\n }}\n />\n )}\n <Typo align=\"center\" variant=\"caption\">\n {children}\n </Typo>\n </>\n );\n}\n\nfunction IncompleteStep(props: StepProps): React.ReactElement {\n const { Icon, children } = props;\n const { completed, active, index } = useContext(StepContext);\n const background = 'var(--gray-5)';\n const color = 'var(--gray-a11)';\n return (\n <>\n {Icon ? (\n <Icon active={active} completed={completed} />\n ) : (\n <Avatar\n fallback={<Typo style={{ color }}>{index + 1}</Typo>}\n radius=\"full\"\n size=\"medium\"\n style={{\n background,\n }}\n />\n )}\n <Typo align=\"center\" style={{ color }} variant=\"caption\">\n {children}\n </Typo>\n </>\n );\n}\n\nfunction ActiveStep(props: StepProps): React.ReactElement {\n const { Icon, children } = props;\n const { completed, active, index } = useContext(StepContext);\n const background = 'var(--accent-10)';\n const color = 'var(--accent-contrast)';\n\n return (\n <>\n {Icon ? (\n <Icon active={active} completed={completed} />\n ) : (\n <Avatar\n fallback={\n <Typo style={{ color }} weight=\"bold\">\n {index + 1}\n </Typo>\n }\n radius=\"full\"\n size=\"medium\"\n style={{ background }}\n />\n )}\n <Typo align=\"center\" variant=\"caption\" weight=\"bold\">\n {children}\n </Typo>\n </>\n );\n}\n\nexport const Stepper = {\n Root,\n Step,\n};\n"],"mappings":"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","names":[]}
|
package/dist/index.cjs
CHANGED
|
@@ -121,6 +121,7 @@ __export(src_exports, {
|
|
|
121
121
|
InfoCircledIcon: () => import_react_icons2.InfoCircledIcon,
|
|
122
122
|
Inset: () => import_themes25.Inset,
|
|
123
123
|
Kbd: () => import_themes26.Kbd,
|
|
124
|
+
LearningPost: () => LearningPost,
|
|
124
125
|
Link: () => Link,
|
|
125
126
|
Link2Icon: () => import_react_icons2.Link2Icon,
|
|
126
127
|
MagnifyingGlassIcon: () => import_react_icons2.MagnifyingGlassIcon,
|
|
@@ -1863,6 +1864,134 @@ function ThemeProvider(props) {
|
|
|
1863
1864
|
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_themes51.Theme, __spreadValues({ accentColor: "iris", radius: "medium" }, props));
|
|
1864
1865
|
}
|
|
1865
1866
|
|
|
1867
|
+
// src/molecules/learning-post.tsx
|
|
1868
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
1869
|
+
function LearningPost(props) {
|
|
1870
|
+
const {
|
|
1871
|
+
defaultThemeProps,
|
|
1872
|
+
html,
|
|
1873
|
+
tags,
|
|
1874
|
+
title,
|
|
1875
|
+
metaDescription,
|
|
1876
|
+
imageComp,
|
|
1877
|
+
onPageBack,
|
|
1878
|
+
children
|
|
1879
|
+
} = props;
|
|
1880
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1881
|
+
ThemeProvider,
|
|
1882
|
+
__spreadProps(__spreadValues({}, defaultThemeProps), {
|
|
1883
|
+
accentColor: "iris",
|
|
1884
|
+
scaling: "110%",
|
|
1885
|
+
style: {},
|
|
1886
|
+
children: html ? /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
1887
|
+
import_themes20.Grid,
|
|
1888
|
+
{
|
|
1889
|
+
columns: { initial: "1", md: "130px 1fr 130px" },
|
|
1890
|
+
gap: { initial: "2", md: "5" },
|
|
1891
|
+
height: "100%",
|
|
1892
|
+
justify: "center",
|
|
1893
|
+
pb: "160px",
|
|
1894
|
+
position: "relative",
|
|
1895
|
+
px: "4",
|
|
1896
|
+
width: "100%",
|
|
1897
|
+
children: [
|
|
1898
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", {}),
|
|
1899
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
1900
|
+
import_themes19.Flex,
|
|
1901
|
+
{
|
|
1902
|
+
align: "center",
|
|
1903
|
+
direction: "column",
|
|
1904
|
+
maxWidth: "880px",
|
|
1905
|
+
mt: { initial: "3", md: "8" },
|
|
1906
|
+
overflow: "hidden",
|
|
1907
|
+
width: "100%",
|
|
1908
|
+
children: [
|
|
1909
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_themes20.Grid, { align: "start", columns: { initial: "1", sm: "2" }, gap: "2", children: [
|
|
1910
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
1911
|
+
import_themes20.Grid,
|
|
1912
|
+
{
|
|
1913
|
+
gap: "3",
|
|
1914
|
+
mb: { initial: "4", sm: "0" },
|
|
1915
|
+
style: { alignSelf: "flex-start" },
|
|
1916
|
+
children: [
|
|
1917
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1918
|
+
Heading2,
|
|
1919
|
+
{
|
|
1920
|
+
style: {
|
|
1921
|
+
fontSize: "2.4rem",
|
|
1922
|
+
lineHeight: 1.25,
|
|
1923
|
+
wordBreak: "keep-all"
|
|
1924
|
+
},
|
|
1925
|
+
variant: "heading1",
|
|
1926
|
+
children: title
|
|
1927
|
+
}
|
|
1928
|
+
),
|
|
1929
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Typo, { children: metaDescription }),
|
|
1930
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_themes19.Flex, { gap: "1", wrap: "wrap", children: tags == null ? void 0 : tags.map((el) => {
|
|
1931
|
+
var _a;
|
|
1932
|
+
if ((_a = el.name) == null ? void 0 : _a.startsWith("filter"))
|
|
1933
|
+
return;
|
|
1934
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Badge, { size: "large", variant: "solid", children: el.name }, el.id);
|
|
1935
|
+
}) })
|
|
1936
|
+
]
|
|
1937
|
+
}
|
|
1938
|
+
),
|
|
1939
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1940
|
+
import_themes2.AspectRatio,
|
|
1941
|
+
{
|
|
1942
|
+
ratio: 5 / 3,
|
|
1943
|
+
style: {
|
|
1944
|
+
overflow: "hidden",
|
|
1945
|
+
borderRadius: "var(--radius-4)",
|
|
1946
|
+
objectFit: "cover"
|
|
1947
|
+
},
|
|
1948
|
+
children: imageComp
|
|
1949
|
+
}
|
|
1950
|
+
)
|
|
1951
|
+
] }),
|
|
1952
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_themes6.Box, { mt: "5", width: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1953
|
+
"div",
|
|
1954
|
+
{
|
|
1955
|
+
className: "gh-content",
|
|
1956
|
+
dangerouslySetInnerHTML: { __html: html }
|
|
1957
|
+
}
|
|
1958
|
+
) })
|
|
1959
|
+
]
|
|
1960
|
+
}
|
|
1961
|
+
),
|
|
1962
|
+
children
|
|
1963
|
+
]
|
|
1964
|
+
}
|
|
1965
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
1966
|
+
import_themes19.Flex,
|
|
1967
|
+
{
|
|
1968
|
+
align: "center",
|
|
1969
|
+
direction: "column",
|
|
1970
|
+
gap: "6",
|
|
1971
|
+
height: "100%",
|
|
1972
|
+
justify: "center",
|
|
1973
|
+
width: "100%",
|
|
1974
|
+
children: [
|
|
1975
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Heading2, { variant: "heading1", children: "\uCF58\uD150\uCE20\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4." }),
|
|
1976
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1977
|
+
Heading2,
|
|
1978
|
+
{
|
|
1979
|
+
align: "center",
|
|
1980
|
+
color: "gray",
|
|
1981
|
+
variant: "heading4",
|
|
1982
|
+
weight: "regular",
|
|
1983
|
+
children: `\uC694\uCCAD\uD558\uC2E0 \uCF58\uD150\uCE20\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
|
|
1984
|
+
\uC7A0\uC2DC \uD6C4 \uB2E4\uC2DC \uC2DC\uB3C4\uD574\uC8FC\uC138\uC694.`
|
|
1985
|
+
}
|
|
1986
|
+
),
|
|
1987
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Button, { onClick: onPageBack, size: "large", children: "\uB4A4\uB85C\uAC00\uAE30" })
|
|
1988
|
+
]
|
|
1989
|
+
}
|
|
1990
|
+
)
|
|
1991
|
+
})
|
|
1992
|
+
);
|
|
1993
|
+
}
|
|
1994
|
+
|
|
1866
1995
|
// src/theme/use-theme.tsx
|
|
1867
1996
|
var import_themes52 = require("@radix-ui/themes");
|
|
1868
1997
|
|
|
@@ -1870,22 +1999,22 @@ var import_themes52 = require("@radix-ui/themes");
|
|
|
1870
1999
|
var uiProps = __toESM(require("@radix-ui/themes/dist/cjs/props/index.js"), 1);
|
|
1871
2000
|
|
|
1872
2001
|
// src/charts/horizontal-bar-chart.tsx
|
|
1873
|
-
var
|
|
2002
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
1874
2003
|
function HorizontalBarChart(props) {
|
|
1875
2004
|
const { total, value, backgroundColor, barColor, height } = props;
|
|
1876
|
-
return /* @__PURE__ */ (0,
|
|
2005
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
1877
2006
|
"div",
|
|
1878
2007
|
{
|
|
1879
2008
|
className: "tipp_horizontal-bar-chart bar-wrapper",
|
|
1880
2009
|
style: { height, backgroundColor },
|
|
1881
|
-
children: /* @__PURE__ */ (0,
|
|
2010
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
1882
2011
|
"div",
|
|
1883
2012
|
{
|
|
1884
2013
|
style: {
|
|
1885
2014
|
width: `${Math.round(value / total * 100)}%`,
|
|
1886
2015
|
height: "100%"
|
|
1887
2016
|
},
|
|
1888
|
-
children: /* @__PURE__ */ (0,
|
|
2017
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "bar", style: { backgroundColor: barColor } })
|
|
1889
2018
|
}
|
|
1890
2019
|
)
|
|
1891
2020
|
}
|
|
@@ -2144,6 +2273,7 @@ function scrollTo(element, targetPosition, duration) {
|
|
|
2144
2273
|
InfoCircledIcon,
|
|
2145
2274
|
Inset,
|
|
2146
2275
|
Kbd,
|
|
2276
|
+
LearningPost,
|
|
2147
2277
|
Link,
|
|
2148
2278
|
Link2Icon,
|
|
2149
2279
|
MagnifyingGlassIcon,
|