@tipp/ui 1.2.21 → 1.3.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.
Files changed (134) hide show
  1. package/dist/chunk-2UZBUVJL.js +123 -0
  2. package/dist/chunk-2UZBUVJL.js.map +1 -0
  3. package/dist/chunk-3AEOJKJI.js +123 -0
  4. package/dist/chunk-3AEOJKJI.js.map +1 -0
  5. package/dist/chunk-4LZTPZ5T.js +340 -0
  6. package/dist/chunk-4LZTPZ5T.js.map +1 -0
  7. package/dist/chunk-5X3BCQPR.js +128 -0
  8. package/dist/chunk-5X3BCQPR.js.map +1 -0
  9. package/dist/chunk-645IUNKJ.js +164 -0
  10. package/dist/chunk-645IUNKJ.js.map +1 -0
  11. package/dist/chunk-6F2NKWN6.js +128 -0
  12. package/dist/chunk-6F2NKWN6.js.map +1 -0
  13. package/dist/chunk-6IPYGPBK.js +145 -0
  14. package/dist/chunk-6IPYGPBK.js.map +1 -0
  15. package/dist/chunk-6QQPOAYW.js +145 -0
  16. package/dist/chunk-6QQPOAYW.js.map +1 -0
  17. package/dist/chunk-6YBBHIKU.js +340 -0
  18. package/dist/chunk-6YBBHIKU.js.map +1 -0
  19. package/dist/chunk-6ZAP2Q6K.js +1 -0
  20. package/dist/chunk-6ZAP2Q6K.js.map +1 -0
  21. package/dist/chunk-73RRM3PM.js +123 -0
  22. package/dist/chunk-73RRM3PM.js.map +1 -0
  23. package/dist/chunk-75PG3OYR.js +183 -0
  24. package/dist/chunk-75PG3OYR.js.map +1 -0
  25. package/dist/chunk-A5QAIT36.js +173 -0
  26. package/dist/chunk-A5QAIT36.js.map +1 -0
  27. package/dist/chunk-AQOEKDWM.js +145 -0
  28. package/dist/chunk-AQOEKDWM.js.map +1 -0
  29. package/dist/chunk-BVNXAZ4W.js +15 -0
  30. package/dist/chunk-BVNXAZ4W.js.map +1 -0
  31. package/dist/chunk-C2X3WJR3.js +183 -0
  32. package/dist/chunk-C2X3WJR3.js.map +1 -0
  33. package/dist/chunk-C4ELQHF2.js +145 -0
  34. package/dist/chunk-C4ELQHF2.js.map +1 -0
  35. package/dist/chunk-CG4SCRPG.js +123 -0
  36. package/dist/chunk-CG4SCRPG.js.map +1 -0
  37. package/dist/chunk-CTKB7XD7.js +173 -0
  38. package/dist/chunk-CTKB7XD7.js.map +1 -0
  39. package/dist/chunk-DGIUCAZZ.js +164 -0
  40. package/dist/chunk-DGIUCAZZ.js.map +1 -0
  41. package/dist/chunk-DYKEZ7NH.js +123 -0
  42. package/dist/chunk-DYKEZ7NH.js.map +1 -0
  43. package/dist/chunk-EMCXUIHP.js +161 -0
  44. package/dist/chunk-EMCXUIHP.js.map +1 -0
  45. package/dist/chunk-FA5LZP3V.js +161 -0
  46. package/dist/chunk-FA5LZP3V.js.map +1 -0
  47. package/dist/chunk-FIIIEJLL.js +164 -0
  48. package/dist/chunk-FIIIEJLL.js.map +1 -0
  49. package/dist/chunk-G3F273US.js +161 -0
  50. package/dist/chunk-G3F273US.js.map +1 -0
  51. package/dist/chunk-GNHIR74H.js +340 -0
  52. package/dist/chunk-GNHIR74H.js.map +1 -0
  53. package/dist/chunk-GOMNN3RB.js +164 -0
  54. package/dist/chunk-GOMNN3RB.js.map +1 -0
  55. package/dist/chunk-HLFIBPJT.js +123 -0
  56. package/dist/chunk-HLFIBPJT.js.map +1 -0
  57. package/dist/chunk-IE7LZPQS.js +161 -0
  58. package/dist/chunk-IE7LZPQS.js.map +1 -0
  59. package/dist/chunk-IM7DSIK2.js +128 -0
  60. package/dist/chunk-IM7DSIK2.js.map +1 -0
  61. package/dist/chunk-J3EDICNX.js +176 -0
  62. package/dist/chunk-J3EDICNX.js.map +1 -0
  63. package/dist/chunk-J75G72IG.js +123 -0
  64. package/dist/chunk-J75G72IG.js.map +1 -0
  65. package/dist/chunk-JOGHKB3I.js +123 -0
  66. package/dist/chunk-JOGHKB3I.js.map +1 -0
  67. package/dist/chunk-K5YOXMCZ.js +183 -0
  68. package/dist/chunk-K5YOXMCZ.js.map +1 -0
  69. package/dist/chunk-LCFIXFMZ.js +161 -0
  70. package/dist/chunk-LCFIXFMZ.js.map +1 -0
  71. package/dist/chunk-MV5RAZYM.js +130 -0
  72. package/dist/chunk-MV5RAZYM.js.map +1 -0
  73. package/dist/chunk-NFAO4ZOY.js +145 -0
  74. package/dist/chunk-NFAO4ZOY.js.map +1 -0
  75. package/dist/chunk-NFNLPXUN.js +161 -0
  76. package/dist/chunk-NFNLPXUN.js.map +1 -0
  77. package/dist/chunk-OAFZJPCX.js +127 -0
  78. package/dist/chunk-OAFZJPCX.js.map +1 -0
  79. package/dist/chunk-QQC7RJJV.js +145 -0
  80. package/dist/chunk-QQC7RJJV.js.map +1 -0
  81. package/dist/chunk-R4OEICEH.js +173 -0
  82. package/dist/chunk-R4OEICEH.js.map +1 -0
  83. package/dist/chunk-SJJRMOZT.js +123 -0
  84. package/dist/chunk-SJJRMOZT.js.map +1 -0
  85. package/dist/chunk-SK42QINW.js +183 -0
  86. package/dist/chunk-SK42QINW.js.map +1 -0
  87. package/dist/chunk-TVPONI3Y.js +340 -0
  88. package/dist/chunk-TVPONI3Y.js.map +1 -0
  89. package/dist/chunk-UNETGTV5.js +161 -0
  90. package/dist/chunk-UNETGTV5.js.map +1 -0
  91. package/dist/chunk-URPUEA3G.js +130 -0
  92. package/dist/chunk-URPUEA3G.js.map +1 -0
  93. package/dist/chunk-VCWF3AHX.js +173 -0
  94. package/dist/chunk-VCWF3AHX.js.map +1 -0
  95. package/dist/chunk-VEM3E4QK.js +175 -0
  96. package/dist/chunk-VEM3E4QK.js.map +1 -0
  97. package/dist/chunk-VGORTGYC.js +176 -0
  98. package/dist/chunk-VGORTGYC.js.map +1 -0
  99. package/dist/chunk-WB5DTU6Y.js +123 -0
  100. package/dist/chunk-WB5DTU6Y.js.map +1 -0
  101. package/dist/chunk-WHOLYNTB.js +123 -0
  102. package/dist/chunk-WHOLYNTB.js.map +1 -0
  103. package/dist/chunk-Y4QN32UT.js +340 -0
  104. package/dist/chunk-Y4QN32UT.js.map +1 -0
  105. package/dist/chunk-YDYRNWR7.js +128 -0
  106. package/dist/chunk-YDYRNWR7.js.map +1 -0
  107. package/dist/chunk-YQSWQ7WB.js +169 -0
  108. package/dist/chunk-YQSWQ7WB.js.map +1 -0
  109. package/dist/index.cjs +134 -4
  110. package/dist/index.cjs.map +1 -1
  111. package/dist/index.css +2055 -0
  112. package/dist/index.css.map +1 -1
  113. package/dist/index.d.cts +2 -1
  114. package/dist/index.d.ts +2 -1
  115. package/dist/index.js +11 -7
  116. package/dist/molecules/index.cjs +181 -38
  117. package/dist/molecules/index.cjs.map +1 -1
  118. package/dist/molecules/index.d.cts +3 -0
  119. package/dist/molecules/index.d.ts +3 -0
  120. package/dist/molecules/index.js +6 -1
  121. package/dist/molecules/learning-post.cjs +339 -0
  122. package/dist/molecules/learning-post.cjs.map +1 -0
  123. package/dist/molecules/learning-post.d.cts +22 -0
  124. package/dist/molecules/learning-post.d.ts +22 -0
  125. package/dist/molecules/learning-post.js +17 -0
  126. package/dist/molecules/learning-post.js.map +1 -0
  127. package/dist/theme/theme-provider.cjs.map +1 -1
  128. package/dist/theme/theme-provider.d.cts +1 -1
  129. package/dist/theme/theme-provider.d.ts +1 -1
  130. package/dist/theme/theme-provider.js +1 -1
  131. package/package.json +3 -3
  132. package/src/molecules/index.ts +2 -1
  133. package/src/molecules/learning-post.tsx +143 -0
  134. package/src/theme/theme-provider.tsx +1 -1
@@ -0,0 +1,339 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __defProps = Object.defineProperties;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
10
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
11
+ var __spreadValues = (a, b) => {
12
+ for (var prop in b || (b = {}))
13
+ if (__hasOwnProp.call(b, prop))
14
+ __defNormalProp(a, prop, b[prop]);
15
+ if (__getOwnPropSymbols)
16
+ for (var prop of __getOwnPropSymbols(b)) {
17
+ if (__propIsEnum.call(b, prop))
18
+ __defNormalProp(a, prop, b[prop]);
19
+ }
20
+ return a;
21
+ };
22
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
23
+ var __objRest = (source, exclude) => {
24
+ var target = {};
25
+ for (var prop in source)
26
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
27
+ target[prop] = source[prop];
28
+ if (source != null && __getOwnPropSymbols)
29
+ for (var prop of __getOwnPropSymbols(source)) {
30
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
31
+ target[prop] = source[prop];
32
+ }
33
+ return target;
34
+ };
35
+ var __export = (target, all) => {
36
+ for (var name in all)
37
+ __defProp(target, name, { get: all[name], enumerable: true });
38
+ };
39
+ var __copyProps = (to, from, except, desc) => {
40
+ if (from && typeof from === "object" || typeof from === "function") {
41
+ for (let key of __getOwnPropNames(from))
42
+ if (!__hasOwnProp.call(to, key) && key !== except)
43
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
44
+ }
45
+ return to;
46
+ };
47
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
48
+
49
+ // src/molecules/learning-post.tsx
50
+ var learning_post_exports = {};
51
+ __export(learning_post_exports, {
52
+ LearningPost: () => LearningPost
53
+ });
54
+ module.exports = __toCommonJS(learning_post_exports);
55
+
56
+ // src/theme/theme-provider.tsx
57
+ var import_themes = require("@radix-ui/themes");
58
+ var import_jsx_runtime = require("react/jsx-runtime");
59
+ function ThemeProvider(props) {
60
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_themes.Theme, __spreadValues({ accentColor: "iris", radius: "medium" }, props));
61
+ }
62
+
63
+ // src/atoms/grid.tsx
64
+ var import_themes2 = require("@radix-ui/themes");
65
+
66
+ // src/atoms/flex.tsx
67
+ var import_themes3 = require("@radix-ui/themes");
68
+
69
+ // src/atoms/heading.tsx
70
+ var import_themes4 = require("@radix-ui/themes");
71
+ var import_react = require("react");
72
+ var import_themes5 = require("@radix-ui/themes");
73
+ var import_jsx_runtime2 = require("react/jsx-runtime");
74
+ function Heading2(props) {
75
+ const _a = props, { size, children, variant } = _a, rest = __objRest(_a, ["size", "children", "variant"]);
76
+ const radixSize = (0, import_react.useMemo)(() => {
77
+ switch (variant) {
78
+ case "heading1":
79
+ return "7";
80
+ case "heading2":
81
+ return "6";
82
+ case "heading3":
83
+ return "5";
84
+ case "heading4":
85
+ return "4";
86
+ case "heading5":
87
+ return "3";
88
+ default:
89
+ return size;
90
+ }
91
+ }, [size, variant]);
92
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_themes4.Heading, __spreadProps(__spreadValues({}, rest), { size: radixSize, children }));
93
+ }
94
+
95
+ // src/atoms/typo.tsx
96
+ var import_themes6 = require("@radix-ui/themes");
97
+ var import_react2 = require("react");
98
+ var import_jsx_runtime3 = require("react/jsx-runtime");
99
+ var Typo = (0, import_react2.forwardRef)(
100
+ (props, ref) => {
101
+ const _a = props, { size, variant, children } = _a, rest = __objRest(_a, ["size", "variant", "children"]);
102
+ const radixSize = (0, import_react2.useMemo)(() => {
103
+ if (size !== void 0)
104
+ return size;
105
+ switch (variant) {
106
+ case "caption":
107
+ return "1";
108
+ case "subtitle":
109
+ return "3";
110
+ case "body":
111
+ default:
112
+ return "2";
113
+ }
114
+ }, [size, variant]);
115
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_themes6.Text, __spreadProps(__spreadValues({}, rest), { ref, size: radixSize, children }));
116
+ }
117
+ );
118
+ Typo.displayName = "Typo";
119
+
120
+ // src/atoms/aspect-ratio.tsx
121
+ var import_themes7 = require("@radix-ui/themes");
122
+
123
+ // src/atoms/badge.tsx
124
+ var import_themes8 = require("@radix-ui/themes");
125
+ var import_react3 = require("react");
126
+ var import_jsx_runtime4 = require("react/jsx-runtime");
127
+ var Badge = (0, import_react3.forwardRef)(
128
+ (props, ref) => {
129
+ const _a = props, { size = "small", color = "accent" } = _a, rest = __objRest(_a, ["size", "color"]);
130
+ const radixSize = (0, import_react3.useMemo)(() => {
131
+ switch (size) {
132
+ case "small":
133
+ return "1";
134
+ case "medium":
135
+ return "2";
136
+ case "large":
137
+ return "3";
138
+ default:
139
+ return "1";
140
+ }
141
+ }, [size]);
142
+ const radixColor = (0, import_react3.useMemo)(() => {
143
+ switch (color) {
144
+ case "error":
145
+ return "red";
146
+ case "neutral":
147
+ return "gray";
148
+ case "success":
149
+ return "green";
150
+ case "accent":
151
+ default:
152
+ return void 0;
153
+ }
154
+ }, [color]);
155
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_themes8.Badge, __spreadProps(__spreadValues({}, rest), { color: radixColor, ref, size: radixSize }));
156
+ }
157
+ );
158
+ Badge.displayName = "Badge";
159
+
160
+ // src/atoms/box.tsx
161
+ var import_themes9 = require("@radix-ui/themes");
162
+
163
+ // src/atoms/button.tsx
164
+ var import_themes10 = require("@radix-ui/themes");
165
+ var import_react4 = require("react");
166
+ var import_jsx_runtime5 = require("react/jsx-runtime");
167
+ var Button = (0, import_react4.forwardRef)(
168
+ (props, ref) => {
169
+ const _a = props, { size, style, variant } = _a, restProps = __objRest(_a, ["size", "style", "variant"]);
170
+ const radixSize = (0, import_react4.useMemo)(() => {
171
+ switch (size) {
172
+ case "small":
173
+ return "1";
174
+ case "medium":
175
+ return "2";
176
+ case "large":
177
+ return "3";
178
+ default:
179
+ return "2";
180
+ }
181
+ }, [size]);
182
+ const mergedStyle = (0, import_react4.useMemo)(() => {
183
+ const baseStyle = {
184
+ background: variant === "transparent" ? "transparent" : void 0,
185
+ fontWeight: 400
186
+ };
187
+ return __spreadValues(__spreadValues({}, baseStyle), style);
188
+ }, [style, variant]);
189
+ const radixVariant = (0, import_react4.useMemo)(() => {
190
+ if (variant === "transparent")
191
+ return "ghost";
192
+ return variant;
193
+ }, [variant]);
194
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
195
+ import_themes10.Button,
196
+ __spreadProps(__spreadValues({
197
+ style: mergedStyle,
198
+ variant: radixVariant
199
+ }, restProps), {
200
+ ref,
201
+ size: radixSize
202
+ })
203
+ );
204
+ }
205
+ );
206
+ Button.displayName = "Button";
207
+
208
+ // src/molecules/learning-post.tsx
209
+ var import_jsx_runtime6 = require("react/jsx-runtime");
210
+ function LearningPost(props) {
211
+ const {
212
+ defaultThemeProps,
213
+ html,
214
+ tags,
215
+ title,
216
+ metaDescription,
217
+ imageComp,
218
+ onPageBack,
219
+ children
220
+ } = props;
221
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
222
+ ThemeProvider,
223
+ __spreadProps(__spreadValues({}, defaultThemeProps), {
224
+ accentColor: "iris",
225
+ scaling: "110%",
226
+ style: {},
227
+ children: html ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
228
+ import_themes2.Grid,
229
+ {
230
+ columns: { initial: "1", md: "130px 1fr 130px" },
231
+ gap: { initial: "2", md: "5" },
232
+ height: "100%",
233
+ justify: "center",
234
+ pb: "160px",
235
+ position: "relative",
236
+ px: "4",
237
+ width: "100%",
238
+ children: [
239
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", {}),
240
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
241
+ import_themes3.Flex,
242
+ {
243
+ align: "center",
244
+ direction: "column",
245
+ maxWidth: "880px",
246
+ mt: { initial: "3", md: "8" },
247
+ overflow: "hidden",
248
+ width: "100%",
249
+ children: [
250
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_themes2.Grid, { align: "start", columns: { initial: "1", sm: "2" }, gap: "2", children: [
251
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
252
+ import_themes2.Grid,
253
+ {
254
+ gap: "3",
255
+ mb: { initial: "4", sm: "0" },
256
+ style: { alignSelf: "flex-start" },
257
+ children: [
258
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
259
+ Heading2,
260
+ {
261
+ style: {
262
+ fontSize: "2.4rem",
263
+ lineHeight: 1.25,
264
+ wordBreak: "keep-all"
265
+ },
266
+ variant: "heading1",
267
+ children: title
268
+ }
269
+ ),
270
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Typo, { children: metaDescription }),
271
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_themes3.Flex, { gap: "1", wrap: "wrap", children: tags == null ? void 0 : tags.map((el) => {
272
+ var _a;
273
+ if ((_a = el.name) == null ? void 0 : _a.startsWith("filter"))
274
+ return;
275
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Badge, { size: "large", variant: "solid", children: el.name }, el.id);
276
+ }) })
277
+ ]
278
+ }
279
+ ),
280
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
281
+ import_themes7.AspectRatio,
282
+ {
283
+ ratio: 5 / 3,
284
+ style: {
285
+ overflow: "hidden",
286
+ borderRadius: "var(--radius-4)",
287
+ objectFit: "cover"
288
+ },
289
+ children: imageComp
290
+ }
291
+ )
292
+ ] }),
293
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_themes9.Box, { mt: "5", width: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
294
+ "div",
295
+ {
296
+ className: "gh-content",
297
+ dangerouslySetInnerHTML: { __html: html }
298
+ }
299
+ ) })
300
+ ]
301
+ }
302
+ ),
303
+ children
304
+ ]
305
+ }
306
+ ) : /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
307
+ import_themes3.Flex,
308
+ {
309
+ align: "center",
310
+ direction: "column",
311
+ gap: "6",
312
+ height: "100%",
313
+ justify: "center",
314
+ width: "100%",
315
+ children: [
316
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Heading2, { variant: "heading1", children: "\uCF58\uD150\uCE20\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4." }),
317
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
318
+ Heading2,
319
+ {
320
+ align: "center",
321
+ color: "gray",
322
+ variant: "heading4",
323
+ weight: "regular",
324
+ children: `\uC694\uCCAD\uD558\uC2E0 \uCF58\uD150\uCE20\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
325
+ \uC7A0\uC2DC \uD6C4 \uB2E4\uC2DC \uC2DC\uB3C4\uD574\uC8FC\uC138\uC694.`
326
+ }
327
+ ),
328
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Button, { onClick: onPageBack, size: "large", children: "\uB4A4\uB85C\uAC00\uAE30" })
329
+ ]
330
+ }
331
+ )
332
+ })
333
+ );
334
+ }
335
+ // Annotate the CommonJS export names for ESM import in node:
336
+ 0 && (module.exports = {
337
+ LearningPost
338
+ });
339
+ //# sourceMappingURL=learning-post.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/molecules/learning-post.tsx","../../src/theme/theme-provider.tsx","../../src/atoms/grid.tsx","../../src/atoms/flex.tsx","../../src/atoms/heading.tsx","../../src/atoms/typo.tsx","../../src/atoms/aspect-ratio.tsx","../../src/atoms/badge.tsx","../../src/atoms/box.tsx","../../src/atoms/button.tsx"],"sourcesContent":["import React from 'react';\nimport type { ThemeProviderProps } from '../theme/theme-provider';\nimport { ThemeProvider } from '../theme/theme-provider';\nimport { Grid } from '../atoms/grid';\nimport { Flex } from '../atoms/flex';\nimport { Heading } from '../atoms/heading';\nimport { Typo } from '../atoms/typo';\nimport { AspectRatio } from '../atoms/aspect-ratio';\nimport { Badge } from '../atoms/badge';\nimport { Box } from '../atoms/box';\nimport { Button } from '../atoms/button';\n\ninterface Tag {\n name?: string;\n id: string;\n}\nexport interface LearningPostProps {\n defaultThemeProps?: Partial<ThemeProviderProps>;\n html?: string;\n title?: string;\n metaDescription?: string;\n /** 섬네일에 해당하는 이미지 컴포넌트 */\n imageComp?: React.ReactElement;\n tags?: Tag[];\n children?: React.ReactElement;\n onPageBack?: () => void;\n}\n\nexport function LearningPost(props: LearningPostProps): React.ReactNode {\n const {\n defaultThemeProps,\n html,\n tags,\n title,\n metaDescription,\n imageComp,\n onPageBack,\n children,\n } = props;\n return (\n <ThemeProvider\n {...defaultThemeProps}\n accentColor=\"iris\"\n scaling=\"110%\"\n style={{}}\n >\n {html ? (\n <Grid\n columns={{ initial: '1', md: '130px 1fr 130px' }}\n gap={{ initial: '2', md: '5' }}\n height=\"100%\"\n justify=\"center\"\n pb=\"160px\"\n position=\"relative\"\n px=\"4\"\n width=\"100%\"\n >\n <div />\n <Flex\n align=\"center\"\n direction=\"column\"\n maxWidth=\"880px\"\n mt={{ initial: '3', md: '8' }}\n overflow=\"hidden\"\n width=\"100%\"\n >\n <Grid align=\"start\" columns={{ initial: '1', sm: '2' }} gap=\"2\">\n <Grid\n gap=\"3\"\n mb={{ initial: '4', sm: '0' }}\n style={{ alignSelf: 'flex-start' }}\n >\n <Heading\n style={{\n fontSize: '2.4rem',\n lineHeight: 1.25,\n wordBreak: 'keep-all',\n }}\n variant=\"heading1\"\n >\n {title}\n </Heading>\n <Typo>{metaDescription}</Typo>\n <Flex gap=\"1\" wrap=\"wrap\">\n {tags?.map((el) => {\n if (el.name?.startsWith('filter')) return;\n return (\n <Badge key={el.id} size=\"large\" variant=\"solid\">\n {el.name}\n </Badge>\n );\n })}\n </Flex>\n </Grid>\n\n <AspectRatio\n ratio={5 / 3}\n style={{\n overflow: 'hidden',\n borderRadius: 'var(--radius-4)',\n objectFit: 'cover',\n }}\n >\n {imageComp}\n </AspectRatio>\n </Grid>\n\n <Box mt=\"5\" width=\"100%\">\n <div\n className=\"gh-content\"\n dangerouslySetInnerHTML={{ __html: html }}\n />\n </Box>\n </Flex>\n {children}\n </Grid>\n ) : (\n <Flex\n align=\"center\"\n direction=\"column\"\n gap=\"6\"\n height=\"100%\"\n justify=\"center\"\n width=\"100%\"\n >\n <Heading variant=\"heading1\">콘텐츠를 찾을 수 없습니다.</Heading>\n <Heading\n align=\"center\"\n color=\"gray\"\n variant=\"heading4\"\n weight=\"regular\"\n >\n {`요청하신 콘텐츠를 찾을 수 없습니다.\n 잠시 후 다시 시도해주세요.`}\n </Heading>\n <Button onClick={onPageBack} size=\"large\">\n 뒤로가기\n </Button>\n </Flex>\n )}\n </ThemeProvider>\n );\n}\n","import React from 'react';\nimport { Theme } from '@radix-ui/themes';\n\ntype ThemeProps = React.ComponentProps<typeof Theme>;\n\nexport interface ThemeProviderProps extends ThemeProps {\n children: React.ReactNode;\n}\n\nexport function ThemeProvider(props: ThemeProviderProps): React.ReactElement {\n return <Theme accentColor=\"iris\" radius=\"medium\" {...props} />;\n}\n","export { Grid, type GridProps } from '@radix-ui/themes';\n","export { Flex, type FlexProps } from '@radix-ui/themes';\n","import {\n Heading as RadixHeading,\n type HeadingProps as RadixHeadingProps,\n} from '@radix-ui/themes';\nimport { useMemo } from 'react';\n\nexport { Heading as RadixHeading } from '@radix-ui/themes';\n\nexport type HeadingProps = RadixHeadingProps & {\n variant?: 'heading1' | 'heading2' | 'heading3' | 'heading4' | 'heading5';\n};\n\nexport function Heading(props: HeadingProps): React.ReactElement {\n const { size, children, variant, ...rest } = props;\n const radixSize = useMemo<RadixHeadingProps['size']>(() => {\n switch (variant) {\n case 'heading1':\n return '7';\n case 'heading2':\n return '6';\n case 'heading3':\n return '5';\n case 'heading4':\n return '4';\n case 'heading5':\n return '3';\n default:\n return size;\n }\n }, [size, variant]);\n\n return (\n <RadixHeading {...rest} size={radixSize}>\n {children}\n </RadixHeading>\n );\n}\n","import type { TextProps as RadixTextProps } from '@radix-ui/themes';\nimport { Text as RadixText } from '@radix-ui/themes';\nimport React, { useMemo, forwardRef } from 'react';\n\nexport type TypoProps = RadixTextProps & {\n variant?: 'body' | 'caption' | 'subtitle';\n};\n\nexport const Typo = forwardRef<HTMLSpanElement, TypoProps>(\n (props: TypoProps, ref): React.ReactElement => {\n const { size, variant, children, ...rest } = props;\n\n const radixSize = useMemo<RadixTextProps['size']>(() => {\n if (size !== undefined) return size;\n switch (variant) {\n case 'caption':\n return '1';\n case 'subtitle':\n return '3';\n case 'body':\n default:\n return '2';\n }\n }, [size, variant]);\n\n return (\n <RadixText {...rest} ref={ref} size={radixSize}>\n {children}\n </RadixText>\n );\n }\n);\n\nTypo.displayName = 'Typo';\n","export { AspectRatio } from '@radix-ui/themes';\n","import {\n Badge as RadixBadge,\n type BadgeProps as RadixBadgeProps,\n} from '@radix-ui/themes';\nimport { useMemo, forwardRef } from 'react';\n\nexport type BadgeProps = Omit<RadixBadgeProps, 'color' | 'size'> & {\n size?: 'small' | 'medium' | 'large';\n color?: 'error' | 'accent' | 'neutral' | 'success';\n};\n\nexport const Badge = forwardRef<HTMLSpanElement, BadgeProps>(\n (props: BadgeProps, ref): React.ReactElement => {\n const { size = 'small', color = 'accent', ...rest } = props;\n\n const radixSize = useMemo(() => {\n switch (size) {\n case 'small':\n return '1';\n case 'medium':\n return '2';\n case 'large':\n return '3';\n default:\n return '1';\n }\n }, [size]);\n\n const radixColor = useMemo(() => {\n switch (color) {\n case 'error':\n return 'red';\n case 'neutral':\n return 'gray';\n case 'success':\n return 'green';\n case 'accent':\n default:\n return undefined;\n }\n }, [color]);\n\n return (\n <RadixBadge {...rest} color={radixColor} ref={ref} size={radixSize} />\n );\n }\n);\n\nBadge.displayName = 'Badge';\n","export { Box, type BoxProps } from '@radix-ui/themes';\n","import {\n Button as RadixButton,\n type ButtonProps as RadixButtonProps,\n} from '@radix-ui/themes';\nimport React, { forwardRef, useMemo } from 'react';\n\nexport type ButtonProps = Omit<RadixButtonProps, 'size' | 'variant'> & {\n size?: 'small' | 'medium' | 'large';\n variant?: RadixButtonProps['variant'] | 'transparent';\n};\n\nexport const Button = forwardRef<HTMLButtonElement, ButtonProps>(\n (props, ref): React.ReactElement => {\n const { size, style, variant, ...restProps } = props;\n\n const radixSize = useMemo(() => {\n switch (size) {\n case 'small':\n return '1';\n case 'medium':\n return '2';\n case 'large':\n return '3';\n default:\n return '2';\n }\n }, [size]);\n\n const mergedStyle = useMemo<ButtonProps['style']>(() => {\n const baseStyle = {\n background: variant === 'transparent' ? 'transparent' : undefined,\n fontWeight: 400,\n };\n return { ...baseStyle, ...style };\n }, [style, variant]);\n\n const radixVariant = useMemo(() => {\n if (variant === 'transparent') return 'ghost';\n return variant;\n }, [variant]);\n\n return (\n <RadixButton\n style={mergedStyle}\n variant={radixVariant}\n {...restProps}\n ref={ref}\n size={radixSize}\n />\n );\n }\n);\n\nButton.displayName = 'Button';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACCA,oBAAsB;AASb;AADF,SAAS,cAAc,OAA+C;AAC3E,SAAO,4CAAC,sCAAM,aAAY,QAAO,QAAO,YAAa,MAAO;AAC9D;;;ACXA,IAAAA,iBAAqC;;;ACArC,IAAAC,iBAAqC;;;ACArC,IAAAC,iBAGO;AACP,mBAAwB;AAExB,IAAAA,iBAAwC;AA0BpC,IAAAC,sBAAA;AApBG,SAASC,SAAQ,OAAyC;AAC/D,QAA6C,YAArC,QAAM,UAAU,QAb1B,IAa+C,IAAT,iBAAS,IAAT,CAA5B,QAAM,YAAU;AACxB,QAAM,gBAAY,sBAAmC,MAAM;AACzD,YAAQ,SAAS;AAAA,MACf,KAAK;AACH,eAAO;AAAA,MACT,KAAK;AACH,eAAO;AAAA,MACT,KAAK;AACH,eAAO;AAAA,MACT,KAAK;AACH,eAAO;AAAA,MACT,KAAK;AACH,eAAO;AAAA,MACT;AACE,eAAO;AAAA,IACX;AAAA,EACF,GAAG,CAAC,MAAM,OAAO,CAAC;AAElB,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,0BAEJ,IACF;AAAA;AAAA;AAAA,oBACF;AAAA,oBAEA;AAAA,sBAAC;AAAA;AAAA,wBACC,OAAO,IAAI;AAAA,wBACX,OAAO;AAAA,0BACL,UAAU;AAAA,0BACV,cAAc;AAAA,0BACd,WAAW;AAAA,wBACb;AAAA,wBAEC;AAAA;AAAA,oBACH;AAAA,qBACF;AAAA,kBAEA,6CAAC,sBAAI,IAAG,KAAI,OAAM,QAChB;AAAA,oBAAC;AAAA;AAAA,sBACC,WAAU;AAAA,sBACV,yBAAyB,EAAE,QAAQ,KAAK;AAAA;AAAA,kBAC1C,GACF;AAAA;AAAA;AAAA,YACF;AAAA,YACC;AAAA;AAAA;AAAA,MACH,IAEA;AAAA,QAAC;AAAA;AAAA,UACC,OAAM;AAAA,UACN,WAAU;AAAA,UACV,KAAI;AAAA,UACJ,QAAO;AAAA,UACP,SAAQ;AAAA,UACR,OAAM;AAAA,UAEN;AAAA,yDAACA,UAAA,EAAQ,SAAQ,YAAW,oFAAe;AAAA,YAC3C;AAAA,cAACA;AAAA,cAAA;AAAA,gBACC,OAAM;AAAA,gBACN,OAAM;AAAA,gBACN,SAAQ;AAAA,gBACR,QAAO;AAAA,gBAEN;AAAA;AAAA;AAAA,YAEH;AAAA,YACA,6CAAC,UAAO,SAAS,YAAY,MAAK,SAAQ,sCAE1C;AAAA;AAAA;AAAA,MACF;AAAA;AAAA,EAEJ;AAEJ;","names":["import_themes","import_themes","import_themes","import_jsx_runtime","Heading","RadixHeading","import_themes","import_react","import_jsx_runtime","RadixText","import_themes","import_themes","import_react","import_jsx_runtime","RadixBadge","import_themes","import_themes","import_react","import_jsx_runtime","RadixButton","import_jsx_runtime","Heading"]}
@@ -0,0 +1,22 @@
1
+ import react__default from 'react';
2
+ import { ThemeProviderProps } from '../theme/theme-provider.cjs';
3
+ import '@radix-ui/themes';
4
+
5
+ interface Tag {
6
+ name?: string;
7
+ id: string;
8
+ }
9
+ interface LearningPostProps {
10
+ defaultThemeProps?: Partial<ThemeProviderProps>;
11
+ html?: string;
12
+ title?: string;
13
+ metaDescription?: string;
14
+ /** 섬네일에 해당하는 이미지 컴포넌트 */
15
+ imageComp?: react__default.ReactElement;
16
+ tags?: Tag[];
17
+ children?: react__default.ReactElement;
18
+ onPageBack?: () => void;
19
+ }
20
+ declare function LearningPost(props: LearningPostProps): react__default.ReactNode;
21
+
22
+ export { LearningPost, type LearningPostProps };
@@ -0,0 +1,22 @@
1
+ import react__default from 'react';
2
+ import { ThemeProviderProps } from '../theme/theme-provider.js';
3
+ import '@radix-ui/themes';
4
+
5
+ interface Tag {
6
+ name?: string;
7
+ id: string;
8
+ }
9
+ interface LearningPostProps {
10
+ defaultThemeProps?: Partial<ThemeProviderProps>;
11
+ html?: string;
12
+ title?: string;
13
+ metaDescription?: string;
14
+ /** 섬네일에 해당하는 이미지 컴포넌트 */
15
+ imageComp?: react__default.ReactElement;
16
+ tags?: Tag[];
17
+ children?: react__default.ReactElement;
18
+ onPageBack?: () => void;
19
+ }
20
+ declare function LearningPost(props: LearningPostProps): react__default.ReactNode;
21
+
22
+ export { LearningPost, type LearningPostProps };
@@ -0,0 +1,17 @@
1
+ import {
2
+ LearningPost
3
+ } from "../chunk-FIIIEJLL.js";
4
+ import "../chunk-BVNXAZ4W.js";
5
+ import "../chunk-52MVZ6AN.js";
6
+ import "../chunk-25HMMI7R.js";
7
+ import "../chunk-EGEQY3KT.js";
8
+ import "../chunk-HK224ADT.js";
9
+ import "../chunk-EWD4AO5N.js";
10
+ import "../chunk-4Y5BEXVN.js";
11
+ import "../chunk-P3YCIJUP.js";
12
+ import "../chunk-EAXUQEO5.js";
13
+ import "../chunk-N552FDTV.js";
14
+ export {
15
+ LearningPost
16
+ };
17
+ //# sourceMappingURL=learning-post.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/theme/theme-provider.tsx"],"sourcesContent":["import React from 'react';\nimport { Theme } from '@radix-ui/themes';\n\ntype ThemeProps = React.ComponentProps<typeof Theme>;\n\ninterface ThemeProviderProps extends ThemeProps {\n children: React.ReactNode;\n}\n\nexport function ThemeProvider(props: ThemeProviderProps): React.ReactElement {\n return <Theme accentColor=\"iris\" radius=\"medium\" {...props} />;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,oBAAsB;AASb;AADF,SAAS,cAAc,OAA+C;AAC3E,SAAO,4CAAC,sCAAM,aAAY,QAAO,QAAO,YAAa,MAAO;AAC9D;","names":[]}
1
+ {"version":3,"sources":["../../src/theme/theme-provider.tsx"],"sourcesContent":["import React from 'react';\nimport { Theme } from '@radix-ui/themes';\n\ntype ThemeProps = React.ComponentProps<typeof Theme>;\n\nexport interface ThemeProviderProps extends ThemeProps {\n children: React.ReactNode;\n}\n\nexport function ThemeProvider(props: ThemeProviderProps): React.ReactElement {\n return <Theme accentColor=\"iris\" radius=\"medium\" {...props} />;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,oBAAsB;AASb;AADF,SAAS,cAAc,OAA+C;AAC3E,SAAO,4CAAC,sCAAM,aAAY,QAAO,QAAO,YAAa,MAAO;AAC9D;","names":[]}
@@ -7,4 +7,4 @@ interface ThemeProviderProps extends ThemeProps {
7
7
  }
8
8
  declare function ThemeProvider(props: ThemeProviderProps): react__default.ReactElement;
9
9
 
10
- export { ThemeProvider };
10
+ export { ThemeProvider, type ThemeProviderProps };
@@ -7,4 +7,4 @@ interface ThemeProviderProps extends ThemeProps {
7
7
  }
8
8
  declare function ThemeProvider(props: ThemeProviderProps): react__default.ReactElement;
9
9
 
10
- export { ThemeProvider };
10
+ export { ThemeProvider, type ThemeProviderProps };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  ThemeProvider
3
- } from "../chunk-BVBX6IJ3.js";
3
+ } from "../chunk-BVNXAZ4W.js";
4
4
  import "../chunk-N552FDTV.js";
5
5
  export {
6
6
  ThemeProvider
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tipp/ui",
3
- "version": "1.2.21",
3
+ "version": "1.3.0",
4
4
  "private": false,
5
5
  "sideEffects": false,
6
6
  "type": "module",
@@ -54,8 +54,8 @@
54
54
  "postcss-nesting": "12.0.2",
55
55
  "tsup": "^8.0.2",
56
56
  "typescript": "^5.3.3",
57
- "@tipp/eslint-config": "1.0.0",
58
- "@tipp/typescript-config": "1.0.0"
57
+ "@tipp/typescript-config": "1.0.0",
58
+ "@tipp/eslint-config": "1.0.0"
59
59
  },
60
60
  "scripts": {
61
61
  "build": "pnpm run build:js && pnpm run build:css",
@@ -5,4 +5,5 @@ export * from './dot-navigation';
5
5
 
6
6
  export * from './stepper';
7
7
 
8
- export * from './tag-selector';
8
+ export * from './tag-selector';
9
+ export * from './learning-post';
@@ -0,0 +1,143 @@
1
+ import React from 'react';
2
+ import type { ThemeProviderProps } from '../theme/theme-provider';
3
+ import { ThemeProvider } from '../theme/theme-provider';
4
+ import { Grid } from '../atoms/grid';
5
+ import { Flex } from '../atoms/flex';
6
+ import { Heading } from '../atoms/heading';
7
+ import { Typo } from '../atoms/typo';
8
+ import { AspectRatio } from '../atoms/aspect-ratio';
9
+ import { Badge } from '../atoms/badge';
10
+ import { Box } from '../atoms/box';
11
+ import { Button } from '../atoms/button';
12
+
13
+ interface Tag {
14
+ name?: string;
15
+ id: string;
16
+ }
17
+ export interface LearningPostProps {
18
+ defaultThemeProps?: Partial<ThemeProviderProps>;
19
+ html?: string;
20
+ title?: string;
21
+ metaDescription?: string;
22
+ /** 섬네일에 해당하는 이미지 컴포넌트 */
23
+ imageComp?: React.ReactElement;
24
+ tags?: Tag[];
25
+ children?: React.ReactElement;
26
+ onPageBack?: () => void;
27
+ }
28
+
29
+ export function LearningPost(props: LearningPostProps): React.ReactNode {
30
+ const {
31
+ defaultThemeProps,
32
+ html,
33
+ tags,
34
+ title,
35
+ metaDescription,
36
+ imageComp,
37
+ onPageBack,
38
+ children,
39
+ } = props;
40
+ return (
41
+ <ThemeProvider
42
+ {...defaultThemeProps}
43
+ accentColor="iris"
44
+ scaling="110%"
45
+ style={{}}
46
+ >
47
+ {html ? (
48
+ <Grid
49
+ columns={{ initial: '1', md: '130px 1fr 130px' }}
50
+ gap={{ initial: '2', md: '5' }}
51
+ height="100%"
52
+ justify="center"
53
+ pb="160px"
54
+ position="relative"
55
+ px="4"
56
+ width="100%"
57
+ >
58
+ <div />
59
+ <Flex
60
+ align="center"
61
+ direction="column"
62
+ maxWidth="880px"
63
+ mt={{ initial: '3', md: '8' }}
64
+ overflow="hidden"
65
+ width="100%"
66
+ >
67
+ <Grid align="start" columns={{ initial: '1', sm: '2' }} gap="2">
68
+ <Grid
69
+ gap="3"
70
+ mb={{ initial: '4', sm: '0' }}
71
+ style={{ alignSelf: 'flex-start' }}
72
+ >
73
+ <Heading
74
+ style={{
75
+ fontSize: '2.4rem',
76
+ lineHeight: 1.25,
77
+ wordBreak: 'keep-all',
78
+ }}
79
+ variant="heading1"
80
+ >
81
+ {title}
82
+ </Heading>
83
+ <Typo>{metaDescription}</Typo>
84
+ <Flex gap="1" wrap="wrap">
85
+ {tags?.map((el) => {
86
+ if (el.name?.startsWith('filter')) return;
87
+ return (
88
+ <Badge key={el.id} size="large" variant="solid">
89
+ {el.name}
90
+ </Badge>
91
+ );
92
+ })}
93
+ </Flex>
94
+ </Grid>
95
+
96
+ <AspectRatio
97
+ ratio={5 / 3}
98
+ style={{
99
+ overflow: 'hidden',
100
+ borderRadius: 'var(--radius-4)',
101
+ objectFit: 'cover',
102
+ }}
103
+ >
104
+ {imageComp}
105
+ </AspectRatio>
106
+ </Grid>
107
+
108
+ <Box mt="5" width="100%">
109
+ <div
110
+ className="gh-content"
111
+ dangerouslySetInnerHTML={{ __html: html }}
112
+ />
113
+ </Box>
114
+ </Flex>
115
+ {children}
116
+ </Grid>
117
+ ) : (
118
+ <Flex
119
+ align="center"
120
+ direction="column"
121
+ gap="6"
122
+ height="100%"
123
+ justify="center"
124
+ width="100%"
125
+ >
126
+ <Heading variant="heading1">콘텐츠를 찾을 수 없습니다.</Heading>
127
+ <Heading
128
+ align="center"
129
+ color="gray"
130
+ variant="heading4"
131
+ weight="regular"
132
+ >
133
+ {`요청하신 콘텐츠를 찾을 수 없습니다.
134
+ 잠시 후 다시 시도해주세요.`}
135
+ </Heading>
136
+ <Button onClick={onPageBack} size="large">
137
+ 뒤로가기
138
+ </Button>
139
+ </Flex>
140
+ )}
141
+ </ThemeProvider>
142
+ );
143
+ }
@@ -3,7 +3,7 @@ import { Theme } from '@radix-ui/themes';
3
3
 
4
4
  type ThemeProps = React.ComponentProps<typeof Theme>;
5
5
 
6
- interface ThemeProviderProps extends ThemeProps {
6
+ export interface ThemeProviderProps extends ThemeProps {
7
7
  children: React.ReactNode;
8
8
  }
9
9