@greaming/gds 0.0.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/README.md +52 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +268 -0
- package/dist/vite.svg +1 -0
- package/package.json +52 -0
- package/theme.css +8 -0
package/README.md
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# GDS 0.0.1
|
|
2
|
+
Greaming Design System
|
|
3
|
+
|
|
4
|
+
React 앱용 디자인 시스템 패키지.
|
|
5
|
+
|
|
6
|
+
## 앱 레포 연결
|
|
7
|
+
|
|
8
|
+
### 옵션 A: 로컬 프리뷰 (file dependency)
|
|
9
|
+
퍼블리시 없이 로컬에서 컴포넌트를 확인할 때 사용.
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
# from the app repo
|
|
13
|
+
pnpm add ../GDS
|
|
14
|
+
pnpm -C ../GDS install
|
|
15
|
+
pnpm -C ../GDS build
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
참고: 패키지 엔트리는 `dist`를 읽으므로, 앱에 반영하려면
|
|
19
|
+
`pnpm -C ../GDS build`가 필요합니다.
|
|
20
|
+
|
|
21
|
+
### 옵션 B: 배포 패키지
|
|
22
|
+
레지스트리에서 사용할 때.
|
|
23
|
+
|
|
24
|
+
```sh
|
|
25
|
+
pnpm add @greaming/gds
|
|
26
|
+
pnpm up @greaming/gds
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Tailwind v4 테마 토큰
|
|
30
|
+
|
|
31
|
+
`theme.css`는 `@theme`를 사용하므로 Tailwind 빌드에서 처리돼야 합니다.
|
|
32
|
+
앱의 전역 CSS(Tailwind를 import하는 파일)에서 아래처럼 import 하세요:
|
|
33
|
+
|
|
34
|
+
```css
|
|
35
|
+
@import "tailwindcss/theme";
|
|
36
|
+
@import "@greaming/gds/theme.css";
|
|
37
|
+
@import "tailwindcss/utilities";
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
그 다음 유틸리티로 토큰을 사용합니다:
|
|
41
|
+
|
|
42
|
+
```html
|
|
43
|
+
<button class="bg-primary text-white font-brand">Button</button>
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## 로컬 개발
|
|
47
|
+
|
|
48
|
+
```sh
|
|
49
|
+
pnpm install
|
|
50
|
+
pnpm dev
|
|
51
|
+
pnpm build
|
|
52
|
+
```
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
import K from "react";
|
|
2
|
+
var p = { exports: {} }, _ = {};
|
|
3
|
+
var $;
|
|
4
|
+
function ee() {
|
|
5
|
+
if ($) return _;
|
|
6
|
+
$ = 1;
|
|
7
|
+
var l = /* @__PURE__ */ Symbol.for("react.transitional.element"), i = /* @__PURE__ */ Symbol.for("react.fragment");
|
|
8
|
+
function u(c, o, s) {
|
|
9
|
+
var m = null;
|
|
10
|
+
if (s !== void 0 && (m = "" + s), o.key !== void 0 && (m = "" + o.key), "key" in o) {
|
|
11
|
+
s = {};
|
|
12
|
+
for (var d in o)
|
|
13
|
+
d !== "key" && (s[d] = o[d]);
|
|
14
|
+
} else s = o;
|
|
15
|
+
return o = s.ref, {
|
|
16
|
+
$$typeof: l,
|
|
17
|
+
type: c,
|
|
18
|
+
key: m,
|
|
19
|
+
ref: o !== void 0 ? o : null,
|
|
20
|
+
props: s
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
return _.Fragment = i, _.jsx = u, _.jsxs = u, _;
|
|
24
|
+
}
|
|
25
|
+
var E = {};
|
|
26
|
+
var I;
|
|
27
|
+
function re() {
|
|
28
|
+
return I || (I = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
29
|
+
function l(e) {
|
|
30
|
+
if (e == null) return null;
|
|
31
|
+
if (typeof e == "function")
|
|
32
|
+
return e.$$typeof === H ? null : e.displayName || e.name || null;
|
|
33
|
+
if (typeof e == "string") return e;
|
|
34
|
+
switch (e) {
|
|
35
|
+
case v:
|
|
36
|
+
return "Fragment";
|
|
37
|
+
case U:
|
|
38
|
+
return "Profiler";
|
|
39
|
+
case W:
|
|
40
|
+
return "StrictMode";
|
|
41
|
+
case z:
|
|
42
|
+
return "Suspense";
|
|
43
|
+
case G:
|
|
44
|
+
return "SuspenseList";
|
|
45
|
+
case B:
|
|
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 M:
|
|
53
|
+
return "Portal";
|
|
54
|
+
case J:
|
|
55
|
+
return e.displayName || "Context";
|
|
56
|
+
case q:
|
|
57
|
+
return (e._context.displayName || "Context") + ".Consumer";
|
|
58
|
+
case V:
|
|
59
|
+
var r = e.render;
|
|
60
|
+
return e = e.displayName, e || (e = r.displayName || r.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
|
|
61
|
+
case X:
|
|
62
|
+
return r = e.displayName || null, r !== null ? r : l(e.type) || "Memo";
|
|
63
|
+
case T:
|
|
64
|
+
r = e._payload, e = e._init;
|
|
65
|
+
try {
|
|
66
|
+
return l(e(r));
|
|
67
|
+
} catch {
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
return null;
|
|
71
|
+
}
|
|
72
|
+
function i(e) {
|
|
73
|
+
return "" + e;
|
|
74
|
+
}
|
|
75
|
+
function u(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, n = 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
|
+
n
|
|
89
|
+
), i(e);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
function c(e) {
|
|
93
|
+
if (e === v) return "<>";
|
|
94
|
+
if (typeof e == "object" && e !== null && e.$$typeof === T)
|
|
95
|
+
return "<...>";
|
|
96
|
+
try {
|
|
97
|
+
var r = l(e);
|
|
98
|
+
return r ? "<" + r + ">" : "<...>";
|
|
99
|
+
} catch {
|
|
100
|
+
return "<...>";
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
function o() {
|
|
104
|
+
var e = k.A;
|
|
105
|
+
return e === null ? null : e.getOwner();
|
|
106
|
+
}
|
|
107
|
+
function s() {
|
|
108
|
+
return Error("react-stack-top-frame");
|
|
109
|
+
}
|
|
110
|
+
function m(e) {
|
|
111
|
+
if (g.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 d(e, r) {
|
|
118
|
+
function t() {
|
|
119
|
+
j || (j = !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 D() {
|
|
130
|
+
var e = l(this.type);
|
|
131
|
+
return h[e] || (h[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 L(e, r, t, n, R, O) {
|
|
136
|
+
var a = t.ref;
|
|
137
|
+
return e = {
|
|
138
|
+
$$typeof: w,
|
|
139
|
+
type: e,
|
|
140
|
+
key: r,
|
|
141
|
+
props: t,
|
|
142
|
+
_owner: n
|
|
143
|
+
}, (a !== void 0 ? a : null) !== null ? Object.defineProperty(e, "ref", {
|
|
144
|
+
enumerable: !1,
|
|
145
|
+
get: D
|
|
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 A(e, r, t, n, R, O) {
|
|
169
|
+
var a = r.children;
|
|
170
|
+
if (a !== void 0)
|
|
171
|
+
if (n)
|
|
172
|
+
if (Z(a)) {
|
|
173
|
+
for (n = 0; n < a.length; n++)
|
|
174
|
+
S(a[n]);
|
|
175
|
+
Object.freeze && Object.freeze(a);
|
|
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 S(a);
|
|
181
|
+
if (g.call(r, "key")) {
|
|
182
|
+
a = l(e);
|
|
183
|
+
var f = Object.keys(r).filter(function(Q) {
|
|
184
|
+
return Q !== "key";
|
|
185
|
+
});
|
|
186
|
+
n = 0 < f.length ? "{key: someKey, " + f.join(": ..., ") + ": ...}" : "{key: someKey}", Y[a + n] || (f = 0 < f.length ? "{" + f.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
|
+
n,
|
|
194
|
+
a,
|
|
195
|
+
f,
|
|
196
|
+
a
|
|
197
|
+
), Y[a + n] = !0);
|
|
198
|
+
}
|
|
199
|
+
if (a = null, t !== void 0 && (u(t), a = "" + t), m(r) && (u(r.key), a = "" + r.key), "key" in r) {
|
|
200
|
+
t = {};
|
|
201
|
+
for (var x in r)
|
|
202
|
+
x !== "key" && (t[x] = r[x]);
|
|
203
|
+
} else t = r;
|
|
204
|
+
return a && d(
|
|
205
|
+
t,
|
|
206
|
+
typeof e == "function" ? e.displayName || e.name || "Unknown" : e
|
|
207
|
+
), L(
|
|
208
|
+
e,
|
|
209
|
+
a,
|
|
210
|
+
t,
|
|
211
|
+
o(),
|
|
212
|
+
R,
|
|
213
|
+
O
|
|
214
|
+
);
|
|
215
|
+
}
|
|
216
|
+
function S(e) {
|
|
217
|
+
P(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e !== null && e.$$typeof === T && (e._payload.status === "fulfilled" ? P(e._payload.value) && e._payload.value._store && (e._payload.value._store.validated = 1) : e._store && (e._store.validated = 1));
|
|
218
|
+
}
|
|
219
|
+
function P(e) {
|
|
220
|
+
return typeof e == "object" && e !== null && e.$$typeof === w;
|
|
221
|
+
}
|
|
222
|
+
var b = K, w = /* @__PURE__ */ Symbol.for("react.transitional.element"), M = /* @__PURE__ */ Symbol.for("react.portal"), v = /* @__PURE__ */ Symbol.for("react.fragment"), W = /* @__PURE__ */ Symbol.for("react.strict_mode"), U = /* @__PURE__ */ Symbol.for("react.profiler"), q = /* @__PURE__ */ Symbol.for("react.consumer"), J = /* @__PURE__ */ Symbol.for("react.context"), V = /* @__PURE__ */ Symbol.for("react.forward_ref"), z = /* @__PURE__ */ Symbol.for("react.suspense"), G = /* @__PURE__ */ Symbol.for("react.suspense_list"), X = /* @__PURE__ */ Symbol.for("react.memo"), T = /* @__PURE__ */ Symbol.for("react.lazy"), B = /* @__PURE__ */ Symbol.for("react.activity"), H = /* @__PURE__ */ Symbol.for("react.client.reference"), k = b.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, g = Object.prototype.hasOwnProperty, Z = Array.isArray, y = 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 j, h = {}, N = b.react_stack_bottom_frame.bind(
|
|
231
|
+
b,
|
|
232
|
+
s
|
|
233
|
+
)(), C = y(c(s)), Y = {};
|
|
234
|
+
E.Fragment = v, E.jsx = function(e, r, t) {
|
|
235
|
+
var n = 1e4 > k.recentlyCreatedOwnerStacks++;
|
|
236
|
+
return A(
|
|
237
|
+
e,
|
|
238
|
+
r,
|
|
239
|
+
t,
|
|
240
|
+
!1,
|
|
241
|
+
n ? Error("react-stack-top-frame") : N,
|
|
242
|
+
n ? y(c(e)) : C
|
|
243
|
+
);
|
|
244
|
+
}, E.jsxs = function(e, r, t) {
|
|
245
|
+
var n = 1e4 > k.recentlyCreatedOwnerStacks++;
|
|
246
|
+
return A(
|
|
247
|
+
e,
|
|
248
|
+
r,
|
|
249
|
+
t,
|
|
250
|
+
!0,
|
|
251
|
+
n ? Error("react-stack-top-frame") : N,
|
|
252
|
+
n ? y(c(e)) : C
|
|
253
|
+
);
|
|
254
|
+
};
|
|
255
|
+
})()), E;
|
|
256
|
+
}
|
|
257
|
+
var F;
|
|
258
|
+
function te() {
|
|
259
|
+
return F || (F = 1, process.env.NODE_ENV === "production" ? p.exports = ee() : p.exports = re()), p.exports;
|
|
260
|
+
}
|
|
261
|
+
var ne = te();
|
|
262
|
+
function oe({ variant: l = "primary", className: i = "", ...u }) {
|
|
263
|
+
const c = "inline-flex items-center justify-center rounded-lg px-4 py-2", o = l === "primary" ? "bg-[var(--color-primary)] text-white" : "bg-[var(--color-secondary)] text-black";
|
|
264
|
+
return /* @__PURE__ */ ne.jsx("button", { className: `${c} ${o} ${i}`, ...u });
|
|
265
|
+
}
|
|
266
|
+
export {
|
|
267
|
+
oe as Button
|
|
268
|
+
};
|
package/dist/vite.svg
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
|
package/package.json
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@greaming/gds",
|
|
3
|
+
"private": false,
|
|
4
|
+
"version": "0.0.1",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"module": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"files": [
|
|
10
|
+
"dist",
|
|
11
|
+
"theme.css"
|
|
12
|
+
],
|
|
13
|
+
"exports": {
|
|
14
|
+
".": {
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
|
+
"import": "./dist/index.js"
|
|
17
|
+
},
|
|
18
|
+
"./theme.css": "./theme.css"
|
|
19
|
+
},
|
|
20
|
+
"sideEffects": [
|
|
21
|
+
"*.css"
|
|
22
|
+
],
|
|
23
|
+
"peerDependencies": {
|
|
24
|
+
"react": "^19",
|
|
25
|
+
"react-dom": "^19"
|
|
26
|
+
},
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"@eslint/js": "^9.39.1",
|
|
29
|
+
"@types/node": "^24.10.1",
|
|
30
|
+
"@types/react": "^19.2.5",
|
|
31
|
+
"@types/react-dom": "^19.2.3",
|
|
32
|
+
"@vitejs/plugin-react": "^5.1.1",
|
|
33
|
+
"eslint": "^9.39.1",
|
|
34
|
+
"eslint-plugin-react-hooks": "^7.0.1",
|
|
35
|
+
"eslint-plugin-react-refresh": "^0.4.24",
|
|
36
|
+
"globals": "^16.5.0",
|
|
37
|
+
"typescript": "~5.9.3",
|
|
38
|
+
"typescript-eslint": "^8.46.4",
|
|
39
|
+
"vite": "^7.2.4",
|
|
40
|
+
"vite-plugin-dts": "^4.5.4"
|
|
41
|
+
},
|
|
42
|
+
"dependencies": {
|
|
43
|
+
"@tailwindcss/vite": "^4.1.18",
|
|
44
|
+
"tailwindcss": "^4.1.18"
|
|
45
|
+
},
|
|
46
|
+
"scripts": {
|
|
47
|
+
"dev": "vite",
|
|
48
|
+
"build": "vite build",
|
|
49
|
+
"typecheck": "tsc --noEmit",
|
|
50
|
+
"lint": "eslint ."
|
|
51
|
+
}
|
|
52
|
+
}
|