woori-product-component 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# woori-product-component
|
|
2
|
+
|
|
3
|
+
금융 애플리케이션에서 사용할 수 있는 **상품 정보 카드(ProductCard) UI 컴포넌트 라이브러리**입니다.
|
|
4
|
+
React 기반으로 설계되었으며, **디자인 시스템 토큰(CSS Variables)** 을 활용해
|
|
5
|
+
다양한 프로젝트 환경에서 재사용할 수 있도록 구현되었습니다.
|
|
6
|
+
|
|
7
|
+
> 본 패키지는 UI 컴포넌트만 제공하며,
|
|
8
|
+
> 라우팅·데이터 패칭·비즈니스 로직에는 의존하지 않습니다.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## ✨ Features
|
|
13
|
+
|
|
14
|
+
- 💳 금융 상품 요약 카드 UI (예금/적금/대출 등)
|
|
15
|
+
- 🎨 CSS 변수 기반 디자인 토큰 적용
|
|
16
|
+
- ♻️ props 기반 재사용 가능한 컴포넌트 설계
|
|
17
|
+
- 🧭 페이지 이동은 `href` / `onClick`으로 외부 위임
|
|
18
|
+
- ♿ 접근성 고려 (role, tabIndex, keyboard interaction)
|
|
19
|
+
- 🧩 React 의존 최소화 (`peerDependencies`)
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## 📦 Installation
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
npm install woori-product-component
|
|
27
|
+
# or
|
|
28
|
+
yarn add woori-product-component
|
|
29
|
+
```
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:root{--pc-width: 100%;--pc-max-width: 360px;--pc-min-height: 200px;--color-surface: #ffffff;--color-surface-muted: #f8f9f9;--color-border: #dee2e6;--color-text: #3d4248;--color-text-muted: #80888e;--color-accent: #0b71fe;--color-accent-soft-border: #dee2e6;--radius-card: 20px;--radius-inner: 16px;--space-card-padding: 24px;--space-header-gap: 5px;--space-box-padding: 16px;--space-row-padding-y: 9px;--font-title-size: 17px;--font-title-weight: 600;--font-desc-size: 14px;--font-desc-weight: 400;--font-label-size: 15px;--font-label-weight: 500;--font-value-size: 15px;--font-value-weight: 500;--letter-tight: -.2px;--line-height-desc: 1.4}.pc{display:block;box-sizing:border-box;width:var(--pc-width);max-width:var(--pc-max-width);min-height:var(--pc-min-height);padding:var(--space-card-padding);background:var(--color-surface);border:1px solid var(--color-border);border-radius:var(--radius-card)}.pc--recommend{border-color:var(--color-accent-soft-border)}.pc[role=button]{cursor:pointer}.pc__header{margin-bottom:var(--space-box-padding)}.pc__title{margin:0;font-size:var(--font-title-size);font-weight:var(--font-title-weight);color:var(--color-text);letter-spacing:var(--letter-tight)}.pc__desc,.pc__label{font-size:var(--font-desc-size);color:var(--color-text-muted)}.pc__desc{margin-top:var(--space-header-gap);line-height:var(--line-height-desc)}.pc__box{padding:var(--space-box-padding);background:var(--color-surface-muted);border-radius:var(--radius-inner)}.pc__list{margin:0;padding:0;list-style:none}.pc__row{display:flex;align-items:center;justify-content:space-between;gap:var(--space-row-padding-y);padding:var(--space-row-padding-y) 0}.pc__value{font-size:var(--font-value-size);font-weight:var(--font-value-weight);color:var(--color-text);letter-spacing:var(--letter-tight);text-align:right}.pc__value--highlight{color:var(--color-accent)}
|
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
import ee from "react";
|
|
2
|
+
var T = { exports: {} }, p = {};
|
|
3
|
+
var F;
|
|
4
|
+
function re() {
|
|
5
|
+
if (F) return p;
|
|
6
|
+
F = 1;
|
|
7
|
+
var c = /* @__PURE__ */ Symbol.for("react.transitional.element"), i = /* @__PURE__ */ Symbol.for("react.fragment");
|
|
8
|
+
function f(d, o, s) {
|
|
9
|
+
var _ = null;
|
|
10
|
+
if (s !== void 0 && (_ = "" + s), o.key !== void 0 && (_ = "" + o.key), "key" in o) {
|
|
11
|
+
s = {};
|
|
12
|
+
for (var l in o)
|
|
13
|
+
l !== "key" && (s[l] = o[l]);
|
|
14
|
+
} else s = o;
|
|
15
|
+
return o = s.ref, {
|
|
16
|
+
$$typeof: c,
|
|
17
|
+
type: d,
|
|
18
|
+
key: _,
|
|
19
|
+
ref: o !== void 0 ? o : null,
|
|
20
|
+
props: s
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
return p.Fragment = i, p.jsx = f, p.jsxs = f, p;
|
|
24
|
+
}
|
|
25
|
+
var E = {};
|
|
26
|
+
var L;
|
|
27
|
+
function te() {
|
|
28
|
+
return L || (L = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
29
|
+
function c(e) {
|
|
30
|
+
if (e == null) return null;
|
|
31
|
+
if (typeof e == "function")
|
|
32
|
+
return e.$$typeof === Z ? null : e.displayName || e.name || null;
|
|
33
|
+
if (typeof e == "string") return e;
|
|
34
|
+
switch (e) {
|
|
35
|
+
case h:
|
|
36
|
+
return "Fragment";
|
|
37
|
+
case q:
|
|
38
|
+
return "Profiler";
|
|
39
|
+
case U:
|
|
40
|
+
return "StrictMode";
|
|
41
|
+
case G:
|
|
42
|
+
return "Suspense";
|
|
43
|
+
case X:
|
|
44
|
+
return "SuspenseList";
|
|
45
|
+
case H:
|
|
46
|
+
return "Activity";
|
|
47
|
+
}
|
|
48
|
+
if (typeof e == "object")
|
|
49
|
+
switch (typeof e.tag == "number" && console.error(
|
|
50
|
+
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
51
|
+
), e.$$typeof) {
|
|
52
|
+
case W:
|
|
53
|
+
return "Portal";
|
|
54
|
+
case V:
|
|
55
|
+
return e.displayName || "Context";
|
|
56
|
+
case J:
|
|
57
|
+
return (e._context.displayName || "Context") + ".Consumer";
|
|
58
|
+
case z:
|
|
59
|
+
var r = e.render;
|
|
60
|
+
return e = e.displayName, e || (e = r.displayName || r.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
|
|
61
|
+
case B:
|
|
62
|
+
return r = e.displayName || null, r !== null ? r : c(e.type) || "Memo";
|
|
63
|
+
case k:
|
|
64
|
+
r = e._payload, e = e._init;
|
|
65
|
+
try {
|
|
66
|
+
return c(e(r));
|
|
67
|
+
} catch {
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
return null;
|
|
71
|
+
}
|
|
72
|
+
function i(e) {
|
|
73
|
+
return "" + e;
|
|
74
|
+
}
|
|
75
|
+
function f(e) {
|
|
76
|
+
try {
|
|
77
|
+
i(e);
|
|
78
|
+
var r = !1;
|
|
79
|
+
} catch {
|
|
80
|
+
r = !0;
|
|
81
|
+
}
|
|
82
|
+
if (r) {
|
|
83
|
+
r = console;
|
|
84
|
+
var t = r.error, a = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
85
|
+
return t.call(
|
|
86
|
+
r,
|
|
87
|
+
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
88
|
+
a
|
|
89
|
+
), i(e);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
function d(e) {
|
|
93
|
+
if (e === h) return "<>";
|
|
94
|
+
if (typeof e == "object" && e !== null && e.$$typeof === k)
|
|
95
|
+
return "<...>";
|
|
96
|
+
try {
|
|
97
|
+
var r = c(e);
|
|
98
|
+
return r ? "<" + r + ">" : "<...>";
|
|
99
|
+
} catch {
|
|
100
|
+
return "<...>";
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
function o() {
|
|
104
|
+
var e = x.A;
|
|
105
|
+
return e === null ? null : e.getOwner();
|
|
106
|
+
}
|
|
107
|
+
function s() {
|
|
108
|
+
return Error("react-stack-top-frame");
|
|
109
|
+
}
|
|
110
|
+
function _(e) {
|
|
111
|
+
if (y.call(e, "key")) {
|
|
112
|
+
var r = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
113
|
+
if (r && r.isReactWarning) return !1;
|
|
114
|
+
}
|
|
115
|
+
return e.key !== void 0;
|
|
116
|
+
}
|
|
117
|
+
function l(e, r) {
|
|
118
|
+
function t() {
|
|
119
|
+
N || (N = !0, console.error(
|
|
120
|
+
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
121
|
+
r
|
|
122
|
+
));
|
|
123
|
+
}
|
|
124
|
+
t.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
125
|
+
get: t,
|
|
126
|
+
configurable: !0
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
function v() {
|
|
130
|
+
var e = c(this.type);
|
|
131
|
+
return C[e] || (C[e] = !0, console.error(
|
|
132
|
+
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
133
|
+
)), e = this.props.ref, e !== void 0 ? e : null;
|
|
134
|
+
}
|
|
135
|
+
function M(e, r, t, a, R, O) {
|
|
136
|
+
var n = t.ref;
|
|
137
|
+
return e = {
|
|
138
|
+
$$typeof: w,
|
|
139
|
+
type: e,
|
|
140
|
+
key: r,
|
|
141
|
+
props: t,
|
|
142
|
+
_owner: a
|
|
143
|
+
}, (n !== void 0 ? n : null) !== null ? Object.defineProperty(e, "ref", {
|
|
144
|
+
enumerable: !1,
|
|
145
|
+
get: v
|
|
146
|
+
}) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
|
|
147
|
+
configurable: !1,
|
|
148
|
+
enumerable: !1,
|
|
149
|
+
writable: !0,
|
|
150
|
+
value: 0
|
|
151
|
+
}), Object.defineProperty(e, "_debugInfo", {
|
|
152
|
+
configurable: !1,
|
|
153
|
+
enumerable: !1,
|
|
154
|
+
writable: !0,
|
|
155
|
+
value: null
|
|
156
|
+
}), Object.defineProperty(e, "_debugStack", {
|
|
157
|
+
configurable: !1,
|
|
158
|
+
enumerable: !1,
|
|
159
|
+
writable: !0,
|
|
160
|
+
value: R
|
|
161
|
+
}), Object.defineProperty(e, "_debugTask", {
|
|
162
|
+
configurable: !1,
|
|
163
|
+
enumerable: !1,
|
|
164
|
+
writable: !0,
|
|
165
|
+
value: O
|
|
166
|
+
}), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
|
|
167
|
+
}
|
|
168
|
+
function S(e, r, t, a, R, O) {
|
|
169
|
+
var n = r.children;
|
|
170
|
+
if (n !== void 0)
|
|
171
|
+
if (a)
|
|
172
|
+
if (Q(n)) {
|
|
173
|
+
for (a = 0; a < n.length; a++)
|
|
174
|
+
P(n[a]);
|
|
175
|
+
Object.freeze && Object.freeze(n);
|
|
176
|
+
} else
|
|
177
|
+
console.error(
|
|
178
|
+
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
179
|
+
);
|
|
180
|
+
else P(n);
|
|
181
|
+
if (y.call(r, "key")) {
|
|
182
|
+
n = c(e);
|
|
183
|
+
var m = Object.keys(r).filter(function(K) {
|
|
184
|
+
return K !== "key";
|
|
185
|
+
});
|
|
186
|
+
a = 0 < m.length ? "{key: someKey, " + m.join(": ..., ") + ": ...}" : "{key: someKey}", I[n + a] || (m = 0 < m.length ? "{" + m.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
187
|
+
`A props object containing a "key" prop is being spread into JSX:
|
|
188
|
+
let props = %s;
|
|
189
|
+
<%s {...props} />
|
|
190
|
+
React keys must be passed directly to JSX without using spread:
|
|
191
|
+
let props = %s;
|
|
192
|
+
<%s key={someKey} {...props} />`,
|
|
193
|
+
a,
|
|
194
|
+
n,
|
|
195
|
+
m,
|
|
196
|
+
n
|
|
197
|
+
), I[n + a] = !0);
|
|
198
|
+
}
|
|
199
|
+
if (n = null, t !== void 0 && (f(t), n = "" + t), _(r) && (f(r.key), n = "" + r.key), "key" in r) {
|
|
200
|
+
t = {};
|
|
201
|
+
for (var A in r)
|
|
202
|
+
A !== "key" && (t[A] = r[A]);
|
|
203
|
+
} else t = r;
|
|
204
|
+
return n && l(
|
|
205
|
+
t,
|
|
206
|
+
typeof e == "function" ? e.displayName || e.name || "Unknown" : e
|
|
207
|
+
), M(
|
|
208
|
+
e,
|
|
209
|
+
n,
|
|
210
|
+
t,
|
|
211
|
+
o(),
|
|
212
|
+
R,
|
|
213
|
+
O
|
|
214
|
+
);
|
|
215
|
+
}
|
|
216
|
+
function P(e) {
|
|
217
|
+
g(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e !== null && e.$$typeof === k && (e._payload.status === "fulfilled" ? g(e._payload.value) && e._payload.value._store && (e._payload.value._store.validated = 1) : e._store && (e._store.validated = 1));
|
|
218
|
+
}
|
|
219
|
+
function g(e) {
|
|
220
|
+
return typeof e == "object" && e !== null && e.$$typeof === w;
|
|
221
|
+
}
|
|
222
|
+
var b = ee, w = /* @__PURE__ */ Symbol.for("react.transitional.element"), W = /* @__PURE__ */ Symbol.for("react.portal"), h = /* @__PURE__ */ Symbol.for("react.fragment"), U = /* @__PURE__ */ Symbol.for("react.strict_mode"), q = /* @__PURE__ */ Symbol.for("react.profiler"), J = /* @__PURE__ */ Symbol.for("react.consumer"), V = /* @__PURE__ */ Symbol.for("react.context"), z = /* @__PURE__ */ Symbol.for("react.forward_ref"), G = /* @__PURE__ */ Symbol.for("react.suspense"), X = /* @__PURE__ */ Symbol.for("react.suspense_list"), B = /* @__PURE__ */ Symbol.for("react.memo"), k = /* @__PURE__ */ Symbol.for("react.lazy"), H = /* @__PURE__ */ Symbol.for("react.activity"), Z = /* @__PURE__ */ Symbol.for("react.client.reference"), x = b.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, y = Object.prototype.hasOwnProperty, Q = Array.isArray, j = console.createTask ? console.createTask : function() {
|
|
223
|
+
return null;
|
|
224
|
+
};
|
|
225
|
+
b = {
|
|
226
|
+
react_stack_bottom_frame: function(e) {
|
|
227
|
+
return e();
|
|
228
|
+
}
|
|
229
|
+
};
|
|
230
|
+
var N, C = {}, Y = b.react_stack_bottom_frame.bind(
|
|
231
|
+
b,
|
|
232
|
+
s
|
|
233
|
+
)(), $ = j(d(s)), I = {};
|
|
234
|
+
E.Fragment = h, E.jsx = function(e, r, t) {
|
|
235
|
+
var a = 1e4 > x.recentlyCreatedOwnerStacks++;
|
|
236
|
+
return S(
|
|
237
|
+
e,
|
|
238
|
+
r,
|
|
239
|
+
t,
|
|
240
|
+
!1,
|
|
241
|
+
a ? Error("react-stack-top-frame") : Y,
|
|
242
|
+
a ? j(d(e)) : $
|
|
243
|
+
);
|
|
244
|
+
}, E.jsxs = function(e, r, t) {
|
|
245
|
+
var a = 1e4 > x.recentlyCreatedOwnerStacks++;
|
|
246
|
+
return S(
|
|
247
|
+
e,
|
|
248
|
+
r,
|
|
249
|
+
t,
|
|
250
|
+
!0,
|
|
251
|
+
a ? Error("react-stack-top-frame") : Y,
|
|
252
|
+
a ? j(d(e)) : $
|
|
253
|
+
);
|
|
254
|
+
};
|
|
255
|
+
})()), E;
|
|
256
|
+
}
|
|
257
|
+
var D;
|
|
258
|
+
function ae() {
|
|
259
|
+
return D || (D = 1, process.env.NODE_ENV === "production" ? T.exports = re() : T.exports = te()), T.exports;
|
|
260
|
+
}
|
|
261
|
+
var u = ae();
|
|
262
|
+
const ne = ["예상금리", "기간", "금액", "예상이자"];
|
|
263
|
+
function se({
|
|
264
|
+
title: c,
|
|
265
|
+
description: i,
|
|
266
|
+
items: f = [],
|
|
267
|
+
tone: d = "default",
|
|
268
|
+
onClick: o
|
|
269
|
+
}) {
|
|
270
|
+
const s = typeof o == "function", _ = new Map(f.map((l) => [l.label, l]));
|
|
271
|
+
return /* @__PURE__ */ u.jsxs(
|
|
272
|
+
"div",
|
|
273
|
+
{
|
|
274
|
+
className: `pc pc--${d}`,
|
|
275
|
+
role: s ? "button" : void 0,
|
|
276
|
+
tabIndex: s ? 0 : void 0,
|
|
277
|
+
onClick: o,
|
|
278
|
+
children: [
|
|
279
|
+
/* @__PURE__ */ u.jsxs("header", { className: "pc__header", children: [
|
|
280
|
+
/* @__PURE__ */ u.jsx("h3", { className: "pc__title", children: c }),
|
|
281
|
+
i ? /* @__PURE__ */ u.jsx("p", { className: "pc__desc", children: i }) : null
|
|
282
|
+
] }),
|
|
283
|
+
/* @__PURE__ */ u.jsx("div", { className: "pc__box", children: /* @__PURE__ */ u.jsx("ul", { className: "pc__list", children: ne.map((l) => {
|
|
284
|
+
const v = _.get(l);
|
|
285
|
+
return /* @__PURE__ */ u.jsxs("li", { className: "pc__row", children: [
|
|
286
|
+
/* @__PURE__ */ u.jsx("span", { className: "pc__label", children: l }),
|
|
287
|
+
/* @__PURE__ */ u.jsx(
|
|
288
|
+
"span",
|
|
289
|
+
{
|
|
290
|
+
className: `pc__value${v?.highlight ? " pc__value--highlight" : ""}`,
|
|
291
|
+
children: v?.value ?? "-"
|
|
292
|
+
}
|
|
293
|
+
)
|
|
294
|
+
] }, l);
|
|
295
|
+
}) }) })
|
|
296
|
+
]
|
|
297
|
+
}
|
|
298
|
+
);
|
|
299
|
+
}
|
|
300
|
+
export {
|
|
301
|
+
se as ProductCard
|
|
302
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
(function(i,E){typeof exports=="object"&&typeof module<"u"?E(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],E):(i=typeof globalThis<"u"?globalThis:i||self,E(i.WooriProductComponent={},i.React))})(this,(function(i,E){"use strict";var R={exports:{}},b={};var A;function U(){if(A)return b;A=1;var u=Symbol.for("react.transitional.element"),f=Symbol.for("react.fragment");function d(_,o,s){var m=null;if(s!==void 0&&(m=""+s),o.key!==void 0&&(m=""+o.key),"key"in o){s={};for(var l in o)l!=="key"&&(s[l]=o[l])}else s=o;return o=s.ref,{$$typeof:u,type:_,key:m,ref:o!==void 0?o:null,props:s}}return b.Fragment=f,b.jsx=d,b.jsxs=d,b}var v={};var g;function q(){return g||(g=1,process.env.NODE_ENV!=="production"&&(function(){function u(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ae?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case k:return"Fragment";case H:return"Profiler";case B:return"StrictMode";case ee:return"Suspense";case re:return"SuspenseList";case ne:return"Activity"}if(typeof e=="object")switch(typeof e.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case X:return"Portal";case Q:return e.displayName||"Context";case Z:return(e._context.displayName||"Context")+".Consumer";case K:var r=e.render;return e=e.displayName,e||(e=r.displayName||r.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case te:return r=e.displayName||null,r!==null?r:u(e.type)||"Memo";case j:r=e._payload,e=e._init;try{return u(e(r))}catch{}}return null}function f(e){return""+e}function d(e){try{f(e);var r=!1}catch{r=!0}if(r){r=console;var t=r.error,n=typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t.call(r,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",n),f(e)}}function _(e){if(e===k)return"<>";if(typeof e=="object"&&e!==null&&e.$$typeof===j)return"<...>";try{var r=u(e);return r?"<"+r+">":"<...>"}catch{return"<...>"}}function o(){var e=O.A;return e===null?null:e.getOwner()}function s(){return Error("react-stack-top-frame")}function m(e){if(I.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function l(e,r){function t(){F||(F=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",r))}t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}function T(){var e=u(this.type);return L[e]||(L[e]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),e=this.props.ref,e!==void 0?e:null}function G(e,r,t,n,x,P){var a=t.ref;return e={$$typeof:$,type:e,key:r,props:t,_owner:n},(a!==void 0?a:null)!==null?Object.defineProperty(e,"ref",{enumerable:!1,get:T}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:x}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:P}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function N(e,r,t,n,x,P){var a=r.children;if(a!==void 0)if(n)if(oe(a)){for(n=0;n<a.length;n++)C(a[n]);Object.freeze&&Object.freeze(a)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else C(a);if(I.call(r,"key")){a=u(e);var p=Object.keys(r).filter(function(se){return se!=="key"});n=0<p.length?"{key: someKey, "+p.join(": ..., ")+": ...}":"{key: someKey}",W[a+n]||(p=0<p.length?"{"+p.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
2
|
+
let props = %s;
|
|
3
|
+
<%s {...props} />
|
|
4
|
+
React keys must be passed directly to JSX without using spread:
|
|
5
|
+
let props = %s;
|
|
6
|
+
<%s key={someKey} {...props} />`,n,a,p,a),W[a+n]=!0)}if(a=null,t!==void 0&&(d(t),a=""+t),m(r)&&(d(r.key),a=""+r.key),"key"in r){t={};for(var S in r)S!=="key"&&(t[S]=r[S])}else t=r;return a&&l(t,typeof e=="function"?e.displayName||e.name||"Unknown":e),G(e,a,t,o(),x,P)}function C(e){Y(e)?e._store&&(e._store.validated=1):typeof e=="object"&&e!==null&&e.$$typeof===j&&(e._payload.status==="fulfilled"?Y(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1))}function Y(e){return typeof e=="object"&&e!==null&&e.$$typeof===$}var h=E,$=Symbol.for("react.transitional.element"),X=Symbol.for("react.portal"),k=Symbol.for("react.fragment"),B=Symbol.for("react.strict_mode"),H=Symbol.for("react.profiler"),Z=Symbol.for("react.consumer"),Q=Symbol.for("react.context"),K=Symbol.for("react.forward_ref"),ee=Symbol.for("react.suspense"),re=Symbol.for("react.suspense_list"),te=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),ne=Symbol.for("react.activity"),ae=Symbol.for("react.client.reference"),O=h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I=Object.prototype.hasOwnProperty,oe=Array.isArray,y=console.createTask?console.createTask:function(){return null};h={react_stack_bottom_frame:function(e){return e()}};var F,L={},D=h.react_stack_bottom_frame.bind(h,s)(),M=y(_(s)),W={};v.Fragment=k,v.jsx=function(e,r,t){var n=1e4>O.recentlyCreatedOwnerStacks++;return N(e,r,t,!1,n?Error("react-stack-top-frame"):D,n?y(_(e)):M)},v.jsxs=function(e,r,t){var n=1e4>O.recentlyCreatedOwnerStacks++;return N(e,r,t,!0,n?Error("react-stack-top-frame"):D,n?y(_(e)):M)}})()),v}var w;function J(){return w||(w=1,process.env.NODE_ENV==="production"?R.exports=U():R.exports=q()),R.exports}var c=J();const V=["예상금리","기간","금액","예상이자"];function z({title:u,description:f,items:d=[],tone:_="default",onClick:o}){const s=typeof o=="function",m=new Map(d.map(l=>[l.label,l]));return c.jsxs("div",{className:`pc pc--${_}`,role:s?"button":void 0,tabIndex:s?0:void 0,onClick:o,children:[c.jsxs("header",{className:"pc__header",children:[c.jsx("h3",{className:"pc__title",children:u}),f?c.jsx("p",{className:"pc__desc",children:f}):null]}),c.jsx("div",{className:"pc__box",children:c.jsx("ul",{className:"pc__list",children:V.map(l=>{const T=m.get(l);return c.jsxs("li",{className:"pc__row",children:[c.jsx("span",{className:"pc__label",children:l}),c.jsx("span",{className:`pc__value${T?.highlight?" pc__value--highlight":""}`,children:T?.value??"-"})]},l)})})})]})}i.ProductCard=z,Object.defineProperty(i,Symbol.toStringTag,{value:"Module"})}));
|
package/package.json
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "woori-product-component",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"private": false,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"files": [
|
|
7
|
+
"dist"
|
|
8
|
+
],
|
|
9
|
+
"main": "dist/woori-product-component.umd.cjs",
|
|
10
|
+
"module": "dist/woori-product-component.js",
|
|
11
|
+
"exports": {
|
|
12
|
+
".": {
|
|
13
|
+
"import": "./dist/woori-product-component.js",
|
|
14
|
+
"require": "./dist/woori-product-component.umd.cjs"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"scripts": {
|
|
18
|
+
"dev": "vite",
|
|
19
|
+
"build": "vite build",
|
|
20
|
+
"lint": "eslint .",
|
|
21
|
+
"preview": "vite preview"
|
|
22
|
+
},
|
|
23
|
+
"peerDependencies": {
|
|
24
|
+
"react": "^19.2.0",
|
|
25
|
+
"react-dom": "^19.2.0"
|
|
26
|
+
},
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"@eslint/js": "^9.39.1",
|
|
29
|
+
"@vitejs/plugin-react": "^5.1.1",
|
|
30
|
+
"eslint": "^9.39.1",
|
|
31
|
+
"eslint-plugin-react-hooks": "^7.0.1",
|
|
32
|
+
"eslint-plugin-react-refresh": "^0.4.24",
|
|
33
|
+
"globals": "^16.5.0",
|
|
34
|
+
"vite": "^7.2.4"
|
|
35
|
+
}
|
|
36
|
+
}
|