@shiflo/ui 0.1.7 → 0.2.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/dist/assets/icons/index.mjs +30 -22
- package/dist/assets/icons/index.ts-Cv-GsCPN.js +48 -0
- package/dist/assets/icons/solid/arrow-left-solid.svg-C16XJbK9.js +5 -0
- package/dist/assets/icons/solid/circle-check-solid.svg-D2Pv_oiO.js +5 -0
- package/dist/assets/icons/solid/circle-exclamation-solid.svg-CuZt_q4T.js +5 -0
- package/dist/assets/icons/solid/circle-info-solid.svg-eMJtJJRm.js +5 -0
- package/dist/assets/icons/solid/index.d.ts +4 -0
- package/dist/assets/icons/solid/index.mjs +32 -24
- package/dist/components/BottomSheet/BottomSheet.d.ts +2 -2
- package/dist/components/BottomSheet/BottomSheet.mjs +77 -61
- package/dist/components/BottomSheet/BottomSheet.typing.d.ts +2 -4
- package/dist/components/Button/Button.mjs +112 -178
- package/dist/components/Button/Button.typing.d.ts +2 -3
- package/dist/components/Dialog/Dialog.mjs +36 -37
- package/dist/components/Dialog/Dialog.typing.d.ts +2 -3
- package/dist/components/Icon/Icon.d.ts +1 -1
- package/dist/components/Icon/Icon.mjs +11 -23
- package/dist/components/Icon/Icon.typing.d.ts +2 -2
- package/dist/components/Overlay/Overlay.d.ts +1 -1
- package/dist/components/Overlay/Overlay.mjs +55 -53
- package/dist/components/Overlay/Overlay.typing.d.ts +3 -2
- package/dist/components/Snackbar/Snackbar.mjs +59 -60
- package/dist/components/Snackbar/Snackbar.typing.d.ts +3 -3
- package/dist/components/Switch/Switch.mjs +35 -50
- package/dist/components/Switch/Switch.typing.d.ts +3 -3
- package/dist/components/Tag/Tag.mjs +8 -9
- package/dist/components/Tag/Tag.typing.d.ts +2 -2
- package/dist/components/TextField/TextField.mjs +21 -22
- package/dist/components/TextField/TextField.typing.d.ts +2 -3
- package/dist/components/Typography/Typography.mjs +14 -15
- package/dist/theme/dark.mjs +10 -10
- package/dist/theme/light.mjs +8 -8
- package/package.json +1 -3
- package/dist/assets/icons/index.ts-Bfm0GTNS.js +0 -40
|
@@ -1,108 +1,117 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
const m = v(f.button)`
|
|
1
|
+
import { jsxs as s } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import S from "@emotion/styled";
|
|
3
|
+
const b = S.button`
|
|
5
4
|
display: inline-flex;
|
|
6
5
|
align-items: center;
|
|
7
6
|
justify-content: center;
|
|
8
|
-
gap: ${({ theme: { spacing:
|
|
7
|
+
gap: ${({ theme: { spacing: e } }) => e[100]};
|
|
9
8
|
font-weight: 500;
|
|
10
|
-
transition: all 0.
|
|
9
|
+
transition: all 0.2s;
|
|
10
|
+
border: 1px solid transparent;
|
|
11
11
|
|
|
12
|
-
${({
|
|
13
|
-
|
|
14
|
-
mode:
|
|
15
|
-
palette: { primary:
|
|
16
|
-
typography: { body1:
|
|
17
|
-
spacing:
|
|
18
|
-
radius:
|
|
19
|
-
}
|
|
20
|
-
|
|
12
|
+
${({
|
|
13
|
+
theme: {
|
|
14
|
+
mode: e,
|
|
15
|
+
palette: { primary: r, secondary: t, neutral: o, gradient: g },
|
|
16
|
+
typography: { body1: a, body2: n, small1: c, small2: l },
|
|
17
|
+
spacing: d,
|
|
18
|
+
radius: h
|
|
19
|
+
},
|
|
20
|
+
variant: k,
|
|
21
|
+
size: f,
|
|
22
|
+
color: v
|
|
23
|
+
}) => {
|
|
24
|
+
const i = {};
|
|
25
|
+
switch (k) {
|
|
21
26
|
case "ghost":
|
|
22
27
|
Object.assign(i, {
|
|
23
|
-
backgroundColor:
|
|
24
|
-
color:
|
|
28
|
+
backgroundColor: r.alpha[10],
|
|
29
|
+
color: r.main,
|
|
25
30
|
"& svg": {
|
|
26
|
-
color:
|
|
31
|
+
color: r.main
|
|
27
32
|
},
|
|
28
33
|
"@media (hover: hover)": {
|
|
29
34
|
"&:hover": {
|
|
30
|
-
backgroundColor:
|
|
35
|
+
backgroundColor: r.alpha[20]
|
|
31
36
|
}
|
|
32
37
|
},
|
|
33
38
|
"&:active": {
|
|
34
|
-
|
|
39
|
+
transform: "scale(0.9)",
|
|
40
|
+
backgroundColor: r.alpha[30]
|
|
35
41
|
},
|
|
36
42
|
"&:disabled": {
|
|
37
|
-
backgroundColor:
|
|
43
|
+
backgroundColor: e === "dark" ? r.alpha[10] : r.alpha[5],
|
|
38
44
|
color: o[500],
|
|
39
45
|
cursor: "not-allowed"
|
|
40
46
|
}
|
|
41
47
|
});
|
|
42
48
|
break;
|
|
43
|
-
case "
|
|
49
|
+
case "gradient":
|
|
44
50
|
Object.assign(i, {
|
|
45
|
-
|
|
46
|
-
color:
|
|
47
|
-
// 기본 텍스트 색상 (더 강조된 중립색)
|
|
51
|
+
background: g.primaryToAccent,
|
|
52
|
+
color: e === "dark" ? o[900] : t.main,
|
|
48
53
|
"& svg": {
|
|
49
|
-
color:
|
|
54
|
+
color: e === "dark" ? o[900] : t.main
|
|
50
55
|
},
|
|
51
56
|
"@media (hover: hover)": {
|
|
52
57
|
"&:hover": {
|
|
53
|
-
|
|
58
|
+
background: g.primaryToAccent
|
|
54
59
|
}
|
|
55
60
|
},
|
|
56
61
|
"&:active": {
|
|
57
|
-
|
|
62
|
+
transform: "scale(0.9)",
|
|
63
|
+
background: g.primaryToAccent,
|
|
64
|
+
boxShadow: `inset 0 0 0 100px ${r.dark}`
|
|
58
65
|
},
|
|
59
66
|
"&:disabled": {
|
|
67
|
+
background: o[200],
|
|
60
68
|
color: o[500],
|
|
61
|
-
backgroundColor: "transparent",
|
|
62
69
|
cursor: "not-allowed",
|
|
63
|
-
|
|
70
|
+
boxShadow: "none"
|
|
64
71
|
}
|
|
65
72
|
});
|
|
66
73
|
break;
|
|
67
|
-
case "
|
|
74
|
+
case "text":
|
|
68
75
|
Object.assign(i, {
|
|
69
|
-
|
|
70
|
-
color:
|
|
76
|
+
backgroundColor: "transparent",
|
|
77
|
+
color: e === "dark" ? o[800] : o[700],
|
|
78
|
+
// 기본 텍스트 색상 (더 강조된 중립색)
|
|
71
79
|
"& svg": {
|
|
72
|
-
color:
|
|
80
|
+
color: e === "dark" ? o[800] : o[700]
|
|
73
81
|
},
|
|
74
82
|
"@media (hover: hover)": {
|
|
75
83
|
"&:hover": {
|
|
76
|
-
|
|
84
|
+
backgroundColor: o[200]
|
|
77
85
|
}
|
|
78
86
|
},
|
|
79
87
|
"&:active": {
|
|
80
|
-
|
|
81
|
-
|
|
88
|
+
transform: "scale(0.9)",
|
|
89
|
+
backgroundColor: o[300]
|
|
82
90
|
},
|
|
83
91
|
"&:disabled": {
|
|
84
|
-
background: o[200],
|
|
85
92
|
color: o[500],
|
|
93
|
+
backgroundColor: "transparent",
|
|
86
94
|
cursor: "not-allowed",
|
|
87
|
-
|
|
95
|
+
textDecoration: "none"
|
|
88
96
|
}
|
|
89
97
|
});
|
|
90
98
|
break;
|
|
91
99
|
default:
|
|
92
|
-
if (
|
|
100
|
+
if (v === "secondary") {
|
|
93
101
|
Object.assign(i, {
|
|
94
|
-
backgroundColor:
|
|
95
|
-
color:
|
|
102
|
+
backgroundColor: t.main,
|
|
103
|
+
color: e === "dark" ? o[900] : o[700],
|
|
96
104
|
"& svg": {
|
|
97
|
-
color:
|
|
105
|
+
color: e === "dark" ? o[900] : o[700]
|
|
98
106
|
},
|
|
99
107
|
"@media (hover: hover)": {
|
|
100
108
|
"&:hover": {
|
|
101
|
-
backgroundColor:
|
|
109
|
+
backgroundColor: t.light
|
|
102
110
|
}
|
|
103
111
|
},
|
|
104
112
|
"&:active": {
|
|
105
|
-
|
|
113
|
+
transform: "scale(0.9)",
|
|
114
|
+
backgroundColor: t.dark
|
|
106
115
|
},
|
|
107
116
|
"&:disabled": {
|
|
108
117
|
backgroundColor: o[200],
|
|
@@ -113,18 +122,19 @@ const m = v(f.button)`
|
|
|
113
122
|
break;
|
|
114
123
|
}
|
|
115
124
|
Object.assign(i, {
|
|
116
|
-
backgroundColor:
|
|
117
|
-
color:
|
|
125
|
+
backgroundColor: r.main,
|
|
126
|
+
color: e === "dark" ? o[900] : t.main,
|
|
118
127
|
"& svg": {
|
|
119
|
-
color:
|
|
128
|
+
color: e === "dark" ? o[900] : t.main
|
|
120
129
|
},
|
|
121
130
|
"@media (hover: hover)": {
|
|
122
131
|
"&:hover": {
|
|
123
|
-
backgroundColor:
|
|
132
|
+
backgroundColor: r.hover
|
|
124
133
|
}
|
|
125
134
|
},
|
|
126
135
|
"&:active": {
|
|
127
|
-
|
|
136
|
+
transform: "scale(0.9)",
|
|
137
|
+
backgroundColor: r.active
|
|
128
138
|
},
|
|
129
139
|
"&:disabled": {
|
|
130
140
|
backgroundColor: o[200],
|
|
@@ -134,52 +144,52 @@ const m = v(f.button)`
|
|
|
134
144
|
});
|
|
135
145
|
break;
|
|
136
146
|
}
|
|
137
|
-
switch (
|
|
147
|
+
switch (f) {
|
|
138
148
|
case "large":
|
|
139
149
|
Object.assign(i, {
|
|
140
|
-
padding: `${
|
|
141
|
-
borderRadius:
|
|
142
|
-
fontSize:
|
|
143
|
-
lineHeight:
|
|
150
|
+
padding: `${d[300]} ${d[350]}`,
|
|
151
|
+
borderRadius: h[300],
|
|
152
|
+
fontSize: a.fontSize,
|
|
153
|
+
lineHeight: a.lineHeight,
|
|
144
154
|
"& svg": {
|
|
145
|
-
width:
|
|
146
|
-
height:
|
|
155
|
+
width: a.fontSize,
|
|
156
|
+
height: a.fontSize
|
|
147
157
|
}
|
|
148
158
|
});
|
|
149
159
|
break;
|
|
150
160
|
case "small":
|
|
151
161
|
Object.assign(i, {
|
|
152
|
-
padding: `${
|
|
153
|
-
borderRadius:
|
|
154
|
-
fontSize:
|
|
155
|
-
lineHeight:
|
|
162
|
+
padding: `${d[100]} ${d[150]}`,
|
|
163
|
+
borderRadius: h[200],
|
|
164
|
+
fontSize: c.fontSize,
|
|
165
|
+
lineHeight: c.lineHeight,
|
|
156
166
|
"& svg": {
|
|
157
|
-
width:
|
|
158
|
-
height:
|
|
167
|
+
width: c.fontSize,
|
|
168
|
+
height: c.fontSize
|
|
159
169
|
}
|
|
160
170
|
});
|
|
161
171
|
break;
|
|
162
172
|
case "xSmall":
|
|
163
173
|
Object.assign(i, {
|
|
164
|
-
padding: `${
|
|
165
|
-
borderRadius:
|
|
166
|
-
fontSize:
|
|
167
|
-
lineHeight:
|
|
174
|
+
padding: `${d[50]} ${d[100]}`,
|
|
175
|
+
borderRadius: h[150],
|
|
176
|
+
fontSize: l.fontSize,
|
|
177
|
+
lineHeight: l.lineHeight,
|
|
168
178
|
"& svg": {
|
|
169
|
-
width:
|
|
170
|
-
height:
|
|
179
|
+
width: l.fontSize,
|
|
180
|
+
height: l.fontSize
|
|
171
181
|
}
|
|
172
182
|
});
|
|
173
183
|
break;
|
|
174
184
|
default:
|
|
175
185
|
Object.assign(i, {
|
|
176
|
-
padding: `${
|
|
177
|
-
borderRadius:
|
|
178
|
-
fontSize:
|
|
179
|
-
lineHeight:
|
|
186
|
+
padding: `${d[200]} ${d[250]}`,
|
|
187
|
+
borderRadius: h[250],
|
|
188
|
+
fontSize: n.fontSize,
|
|
189
|
+
lineHeight: n.lineHeight,
|
|
180
190
|
"& svg": {
|
|
181
|
-
width:
|
|
182
|
-
height:
|
|
191
|
+
width: n.fontSize,
|
|
192
|
+
height: n.fontSize
|
|
183
193
|
}
|
|
184
194
|
});
|
|
185
195
|
break;
|
|
@@ -187,110 +197,34 @@ const m = v(f.button)`
|
|
|
187
197
|
return i;
|
|
188
198
|
}}
|
|
189
199
|
`;
|
|
190
|
-
function
|
|
191
|
-
ref:
|
|
192
|
-
children:
|
|
193
|
-
variant:
|
|
194
|
-
size:
|
|
195
|
-
color:
|
|
196
|
-
startIcon:
|
|
197
|
-
endIcon:
|
|
198
|
-
...
|
|
200
|
+
function w({
|
|
201
|
+
ref: e,
|
|
202
|
+
children: r,
|
|
203
|
+
variant: t = "filled",
|
|
204
|
+
size: o = "medium",
|
|
205
|
+
color: g = "primary",
|
|
206
|
+
startIcon: a,
|
|
207
|
+
endIcon: n,
|
|
208
|
+
...c
|
|
199
209
|
}) {
|
|
200
|
-
return
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
children: [
|
|
218
|
-
e,
|
|
219
|
-
l,
|
|
220
|
-
r
|
|
221
|
-
]
|
|
222
|
-
}
|
|
223
|
-
) : d === "ghost" ? /* @__PURE__ */ k(
|
|
224
|
-
m,
|
|
225
|
-
{
|
|
226
|
-
ref: t,
|
|
227
|
-
variant: "ghost",
|
|
228
|
-
size: c,
|
|
229
|
-
color: "primary",
|
|
230
|
-
whileHover: {
|
|
231
|
-
scale: 1.02
|
|
232
|
-
},
|
|
233
|
-
whileTap: { scale: 0.98 },
|
|
234
|
-
transition: {
|
|
235
|
-
type: "spring",
|
|
236
|
-
duration: 0.3,
|
|
237
|
-
bounce: 0.2
|
|
238
|
-
},
|
|
239
|
-
...o,
|
|
240
|
-
children: [
|
|
241
|
-
e,
|
|
242
|
-
l,
|
|
243
|
-
r
|
|
244
|
-
]
|
|
245
|
-
}
|
|
246
|
-
) : d === "gradient" ? /* @__PURE__ */ k(
|
|
247
|
-
m,
|
|
248
|
-
{
|
|
249
|
-
ref: t,
|
|
250
|
-
variant: "gradient",
|
|
251
|
-
size: c,
|
|
252
|
-
color: "primary",
|
|
253
|
-
whileHover: {
|
|
254
|
-
scale: 1.02
|
|
255
|
-
},
|
|
256
|
-
whileTap: { scale: 0.98 },
|
|
257
|
-
transition: {
|
|
258
|
-
type: "spring",
|
|
259
|
-
duration: 0.3,
|
|
260
|
-
bounce: 0.2
|
|
261
|
-
},
|
|
262
|
-
...o,
|
|
263
|
-
children: [
|
|
264
|
-
e,
|
|
265
|
-
l,
|
|
266
|
-
r
|
|
267
|
-
]
|
|
268
|
-
}
|
|
269
|
-
) : /* @__PURE__ */ k(
|
|
270
|
-
m,
|
|
271
|
-
{
|
|
272
|
-
ref: t,
|
|
273
|
-
variant: d,
|
|
274
|
-
size: c,
|
|
275
|
-
color: a,
|
|
276
|
-
whileHover: {
|
|
277
|
-
scale: 1.02
|
|
278
|
-
},
|
|
279
|
-
whileTap: { scale: 0.98 },
|
|
280
|
-
transition: {
|
|
281
|
-
type: "spring",
|
|
282
|
-
duration: 0.3,
|
|
283
|
-
bounce: 0.2
|
|
284
|
-
},
|
|
285
|
-
...o,
|
|
286
|
-
children: [
|
|
287
|
-
e,
|
|
288
|
-
l,
|
|
289
|
-
r
|
|
290
|
-
]
|
|
291
|
-
}
|
|
292
|
-
);
|
|
210
|
+
return t === "text" ? /* @__PURE__ */ s(b, { ref: e, variant: "text", size: o, color: "secondary", ...c, children: [
|
|
211
|
+
a,
|
|
212
|
+
r,
|
|
213
|
+
n
|
|
214
|
+
] }) : t === "ghost" ? /* @__PURE__ */ s(b, { ref: e, variant: "ghost", size: o, color: "primary", ...c, children: [
|
|
215
|
+
a,
|
|
216
|
+
r,
|
|
217
|
+
n
|
|
218
|
+
] }) : t === "gradient" ? /* @__PURE__ */ s(b, { ref: e, variant: "gradient", size: o, color: "primary", ...c, children: [
|
|
219
|
+
a,
|
|
220
|
+
r,
|
|
221
|
+
n
|
|
222
|
+
] }) : /* @__PURE__ */ s(b, { ref: e, variant: t, size: o, color: g, ...c, children: [
|
|
223
|
+
a,
|
|
224
|
+
r,
|
|
225
|
+
n
|
|
226
|
+
] });
|
|
293
227
|
}
|
|
294
228
|
export {
|
|
295
|
-
|
|
229
|
+
w as default
|
|
296
230
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ComponentPropsWithRef, ReactNode } from 'react';
|
|
2
2
|
import { UtilityProps } from '../../typings/utility';
|
|
3
|
-
import { HTMLMotionProps } from 'motion/react';
|
|
4
3
|
export interface BaseButtonProps extends Pick<UtilityProps, "css"> {
|
|
5
4
|
size?: "xSmall" | "small" | "medium" | "large";
|
|
6
5
|
startIcon?: ReactNode;
|
|
@@ -22,4 +21,4 @@ export interface GradientButtonProps extends BaseButtonProps {
|
|
|
22
21
|
variant?: "gradient";
|
|
23
22
|
color?: "primary";
|
|
24
23
|
}
|
|
25
|
-
export type ButtonProps = (FilledButtonProps | GhostButtonProps | TextButtonProps | GradientButtonProps) &
|
|
24
|
+
export type ButtonProps = (FilledButtonProps | GhostButtonProps | TextButtonProps | GradientButtonProps) & ComponentPropsWithRef<"button">;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useState as p, useEffect as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
const y = u(h.div)`
|
|
1
|
+
import { jsx as s } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { useState as $, useRef as p, useEffect as h } from "react";
|
|
3
|
+
import g from "@emotion/styled";
|
|
4
|
+
import y from "../Overlay/Overlay.mjs";
|
|
5
|
+
const x = g.div`
|
|
7
6
|
width: calc(100% - ${({ theme: { spacing: e } }) => e[800]});
|
|
8
7
|
max-width: ${({ maxWidth: e = "375px" }) => e};
|
|
9
8
|
max-height: calc(100% - ${({ theme: { spacing: e } }) => e[800]});
|
|
@@ -16,55 +15,55 @@ const y = u(h.div)`
|
|
|
16
15
|
palette: { common: e }
|
|
17
16
|
}
|
|
18
17
|
}) => e.background};
|
|
18
|
+
transition:
|
|
19
|
+
transform ${({ transitionDuration: e }) => `${e}ms`}
|
|
20
|
+
${({ ease: e }) => e === "in" ? "ease-out" : "ease-in"},
|
|
21
|
+
opacity ${({ transitionDuration: e }) => `${e}ms`}
|
|
22
|
+
${({ ease: e }) => e === "in" ? "ease-out" : "ease-in"},
|
|
23
|
+
background-color 0.2s;
|
|
19
24
|
`;
|
|
20
25
|
function O({
|
|
21
26
|
open: e,
|
|
22
|
-
onClose:
|
|
23
|
-
children:
|
|
24
|
-
transitionDuration: a =
|
|
27
|
+
onClose: n,
|
|
28
|
+
children: m,
|
|
29
|
+
transitionDuration: a = 200,
|
|
25
30
|
onClick: o,
|
|
26
|
-
style:
|
|
27
|
-
maxWidth:
|
|
28
|
-
...
|
|
31
|
+
style: l,
|
|
32
|
+
maxWidth: c = "375px",
|
|
33
|
+
...f
|
|
29
34
|
}) {
|
|
30
|
-
const [
|
|
35
|
+
const [r, i] = $(!1), u = p(null), d = (t) => {
|
|
31
36
|
t.stopPropagation(), typeof o == "function" && o(t);
|
|
32
37
|
};
|
|
33
|
-
return
|
|
38
|
+
return h(() => {
|
|
34
39
|
let t;
|
|
35
40
|
return e ? t = requestAnimationFrame(() => {
|
|
36
|
-
|
|
37
|
-
}) :
|
|
41
|
+
i(!0);
|
|
42
|
+
}) : i(!1), () => {
|
|
38
43
|
t && cancelAnimationFrame(t);
|
|
39
44
|
};
|
|
40
|
-
}, [e]), /* @__PURE__ */
|
|
41
|
-
|
|
45
|
+
}, [e]), /* @__PURE__ */ s(
|
|
46
|
+
y,
|
|
42
47
|
{
|
|
48
|
+
ref: u,
|
|
43
49
|
open: e,
|
|
44
|
-
onClose:
|
|
50
|
+
onClose: n,
|
|
45
51
|
transitionDuration: a,
|
|
46
52
|
placement: "center-middle",
|
|
47
|
-
children: /* @__PURE__ */
|
|
48
|
-
|
|
53
|
+
children: /* @__PURE__ */ s(
|
|
54
|
+
x,
|
|
49
55
|
{
|
|
56
|
+
ease: e ? "in" : "out",
|
|
50
57
|
transitionDuration: a,
|
|
51
|
-
maxWidth:
|
|
52
|
-
onClick:
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
58
|
+
maxWidth: c,
|
|
59
|
+
onClick: d,
|
|
60
|
+
...f,
|
|
61
|
+
style: {
|
|
62
|
+
transform: `scale(${r ? 1 : 0.9})`,
|
|
63
|
+
opacity: r ? 1 : 0,
|
|
64
|
+
...l
|
|
56
65
|
},
|
|
57
|
-
|
|
58
|
-
scale: i ? 1 : 0.9,
|
|
59
|
-
opacity: i ? 1 : 0
|
|
60
|
-
},
|
|
61
|
-
transition: {
|
|
62
|
-
type: "spring",
|
|
63
|
-
duration: a,
|
|
64
|
-
bounce: 0.2
|
|
65
|
-
},
|
|
66
|
-
...s,
|
|
67
|
-
children: l
|
|
66
|
+
children: m
|
|
68
67
|
}
|
|
69
68
|
)
|
|
70
69
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ComponentPropsWithRef } from 'react';
|
|
2
2
|
import { UtilityProps } from '../../typings/utility';
|
|
3
|
-
|
|
4
|
-
export interface DialogProps extends PropsWithChildren<HTMLMotionProps<"div"> & Pick<UtilityProps, "css">> {
|
|
3
|
+
export interface DialogProps extends ComponentPropsWithRef<"div">, Pick<UtilityProps, "css"> {
|
|
5
4
|
open?: boolean;
|
|
6
5
|
onClose?: () => void;
|
|
7
6
|
transitionDuration?: number;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { IconProps } from './Icon.typing';
|
|
2
|
-
declare function Icon({
|
|
2
|
+
declare function Icon({ name, ...props }: IconProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default Icon;
|
|
@@ -1,30 +1,18 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import c from "
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
transition:
|
|
8
|
-
width 0.3s,
|
|
9
|
-
height 0.3s,
|
|
10
|
-
color 0.3s;
|
|
1
|
+
import { jsx as e } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { S as i } from "../../assets/icons/index.ts-Cv-GsCPN.js";
|
|
3
|
+
import s from "@emotion/styled";
|
|
4
|
+
import c from "../../utils/getValueByPath.mjs";
|
|
5
|
+
const l = (o) => s(o)`
|
|
6
|
+
transition: all 0.2s;
|
|
11
7
|
|
|
12
8
|
width: ${({ width: t }) => `${t || 24}px`};
|
|
13
9
|
height: ${({ height: t }) => `${t || 24}px`};
|
|
14
|
-
color: ${({ theme: { palette: t }, color: r }) =>
|
|
10
|
+
color: ${({ theme: { palette: t }, color: r }) => c(t, r || "") || "inherit"};
|
|
15
11
|
`;
|
|
16
|
-
function
|
|
17
|
-
const
|
|
18
|
-
return
|
|
19
|
-
if (!l(i))
|
|
20
|
-
return null;
|
|
21
|
-
const o = {
|
|
22
|
-
...s,
|
|
23
|
-
...i.props
|
|
24
|
-
};
|
|
25
|
-
return o.width = e ?? o.width, o.height = n ?? o.height, /* @__PURE__ */ m(f, { ref: t, ...o });
|
|
26
|
-
});
|
|
12
|
+
function h({ name: o, ...t }) {
|
|
13
|
+
const r = i[o], n = l(r);
|
|
14
|
+
return /* @__PURE__ */ e(n, { name: o, ...t });
|
|
27
15
|
}
|
|
28
16
|
export {
|
|
29
|
-
|
|
17
|
+
h as default
|
|
30
18
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ComponentPropsWithRef } from 'react';
|
|
2
2
|
import { ShifloTheme } from '../../theme/typing';
|
|
3
|
-
import { RecursionPath } from '../../typings/utility';
|
|
3
|
+
import { RecursionPath, UtilityProps } from '../../typings/utility';
|
|
4
4
|
import type * as Svgs from "../../assets/icons";
|
|
5
|
-
export interface BaseIconProps {
|
|
5
|
+
export interface BaseIconProps extends Pick<UtilityProps, "css"> {
|
|
6
6
|
name: keyof typeof Svgs;
|
|
7
7
|
color?: RecursionPath<ShifloTheme["palette"]> | "inherit";
|
|
8
8
|
width?: number;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { OverlayProps } from './Overlay.typing';
|
|
2
|
-
declare function Overlay({ children, open, onClose, transitionDuration, placement, ref, onClick,
|
|
2
|
+
declare function Overlay({ children, open, onClose, transitionDuration, placement, style, ref, onClick, ...props }: OverlayProps): import('react').ReactPortal | null;
|
|
3
3
|
export default Overlay;
|