@shiflo/ui 0.0.7 → 0.0.9

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.
@@ -1,6 +1,6 @@
1
1
  import { jsxs as g } from "react/jsx-runtime";
2
- import u from "basic-styled";
3
- const h = u.button`
2
+ import v from "basic-styled";
3
+ const h = v.button`
4
4
  display: inline-flex;
5
5
  align-items: center;
6
6
  justify-content: center;
@@ -22,29 +22,26 @@ const h = u.button`
22
22
  theme: {
23
23
  mode: r,
24
24
  palette: { primary: e, secondary: t, neutral: o },
25
- typography: { body1: d, body2: i, small1: n, small2: c },
25
+ typography: { body1: c, body2: a, small1: n, small2: d },
26
26
  spacing: s,
27
27
  radius: l
28
28
  },
29
29
  variant: b,
30
- size: k,
31
- color: f
30
+ size: f,
31
+ color: k
32
32
  }) => {
33
- const a = {};
33
+ const i = {};
34
34
  switch (b) {
35
35
  case "ghost":
36
- Object.assign(a, {
36
+ Object.assign(i, {
37
37
  backgroundColor: e.alpha[10],
38
38
  color: e.main,
39
39
  "& svg": {
40
40
  color: e.main
41
41
  },
42
- "&:hover": {
43
- backgroundColor: e.alpha[20]
44
- },
45
- "@media (pointer: coarse), (any-pointer: coarse)": {
42
+ "@media (hover: hover)": {
46
43
  "&:hover": {
47
- backgroundColor: e.alpha[10]
44
+ backgroundColor: e.alpha[20]
48
45
  }
49
46
  },
50
47
  "&:active": {
@@ -59,19 +56,16 @@ const h = u.button`
59
56
  });
60
57
  break;
61
58
  case "text":
62
- Object.assign(a, {
59
+ Object.assign(i, {
63
60
  backgroundColor: "transparent",
64
61
  color: r === "dark" ? o[800] : o[700],
65
62
  // 기본 텍스트 색상 (더 강조된 중립색)
66
63
  "& svg": {
67
64
  color: r === "dark" ? o[800] : o[700]
68
65
  },
69
- "&:hover": {
70
- backgroundColor: o[200]
71
- },
72
- "@media (pointer: coarse), (any-pointer: coarse)": {
66
+ "@media (hover: hover)": {
73
67
  "&:hover": {
74
- backgroundColor: "transparent"
68
+ backgroundColor: o[200]
75
69
  }
76
70
  },
77
71
  "&:active": {
@@ -87,19 +81,16 @@ const h = u.button`
87
81
  });
88
82
  break;
89
83
  default:
90
- if (f === "secondary") {
91
- Object.assign(a, {
84
+ if (k === "secondary") {
85
+ Object.assign(i, {
92
86
  backgroundColor: t.main,
93
87
  color: r === "dark" ? o[900] : o[700],
94
88
  "& svg": {
95
89
  color: r === "dark" ? o[900] : o[700]
96
90
  },
97
- "&:hover": {
98
- backgroundColor: t.light
99
- },
100
- "@media (pointer: coarse), (any-pointer: coarse)": {
91
+ "@media (hover: hover)": {
101
92
  "&:hover": {
102
- backgroundColor: t.main
93
+ backgroundColor: t.light
103
94
  }
104
95
  },
105
96
  "&:active": {
@@ -114,18 +105,15 @@ const h = u.button`
114
105
  });
115
106
  break;
116
107
  }
117
- Object.assign(a, {
108
+ Object.assign(i, {
118
109
  backgroundColor: e.main,
119
110
  color: r === "dark" ? o[900] : t.main,
120
111
  "& svg": {
121
112
  color: r === "dark" ? o[900] : t.main
122
113
  },
123
- "&:hover": {
124
- backgroundColor: e.hover
125
- },
126
- "@media (pointer: coarse), (any-pointer: coarse)": {
114
+ "@media (hover: hover)": {
127
115
  "&:hover": {
128
- backgroundColor: e.main
116
+ backgroundColor: e.hover
129
117
  }
130
118
  },
131
119
  "&:active": {
@@ -140,21 +128,21 @@ const h = u.button`
140
128
  });
141
129
  break;
142
130
  }
143
- switch (k) {
131
+ switch (f) {
144
132
  case "large":
145
- Object.assign(a, {
133
+ Object.assign(i, {
146
134
  padding: `${s[300]} ${s[350]}`,
147
135
  borderRadius: l[300],
148
- fontSize: d.fontSize,
149
- lineHeight: d.lineHeight,
136
+ fontSize: c.fontSize,
137
+ lineHeight: c.lineHeight,
150
138
  "& svg": {
151
- width: d.fontSize,
152
- height: d.fontSize
139
+ width: c.fontSize,
140
+ height: c.fontSize
153
141
  }
154
142
  });
155
143
  break;
156
144
  case "small":
157
- Object.assign(a, {
145
+ Object.assign(i, {
158
146
  padding: `${s[100]} ${s[150]}`,
159
147
  borderRadius: l[200],
160
148
  fontSize: n.fontSize,
@@ -166,57 +154,57 @@ const h = u.button`
166
154
  });
167
155
  break;
168
156
  case "xSmall":
169
- Object.assign(a, {
157
+ Object.assign(i, {
170
158
  padding: `${s[50]} ${s[100]}`,
171
159
  borderRadius: l[150],
172
- fontSize: c.fontSize,
173
- lineHeight: c.lineHeight,
160
+ fontSize: d.fontSize,
161
+ lineHeight: d.lineHeight,
174
162
  "& svg": {
175
- width: c.fontSize,
176
- height: c.fontSize
163
+ width: d.fontSize,
164
+ height: d.fontSize
177
165
  }
178
166
  });
179
167
  break;
180
168
  default:
181
- Object.assign(a, {
169
+ Object.assign(i, {
182
170
  padding: `${s[200]} ${s[250]}`,
183
171
  borderRadius: l[250],
184
- fontSize: i.fontSize,
185
- lineHeight: i.lineHeight,
172
+ fontSize: a.fontSize,
173
+ lineHeight: a.lineHeight,
186
174
  "& svg": {
187
- width: i.fontSize,
188
- height: i.fontSize
175
+ width: a.fontSize,
176
+ height: a.fontSize
189
177
  }
190
178
  });
191
179
  break;
192
180
  }
193
- return a;
181
+ return i;
194
182
  }}
195
183
  `;
196
- function S({
184
+ function C({
197
185
  ref: r,
198
186
  children: e,
199
187
  variant: t = "filled",
200
188
  size: o = "medium",
201
- color: d = "primary",
202
- startIcon: i,
189
+ color: c = "primary",
190
+ startIcon: a,
203
191
  endIcon: n,
204
- ...c
192
+ ...d
205
193
  }) {
206
- return t === "text" ? /* @__PURE__ */ g(h, { ref: r, variant: "text", size: o, color: "secondary", ...c, children: [
207
- i,
194
+ return t === "text" ? /* @__PURE__ */ g(h, { ref: r, variant: "text", size: o, color: "secondary", ...d, children: [
195
+ a,
208
196
  e,
209
197
  n
210
- ] }) : t === "ghost" ? /* @__PURE__ */ g(h, { ref: r, variant: "ghost", size: o, color: "primary", ...c, children: [
211
- i,
198
+ ] }) : t === "ghost" ? /* @__PURE__ */ g(h, { ref: r, variant: "ghost", size: o, color: "primary", ...d, children: [
199
+ a,
212
200
  e,
213
201
  n
214
- ] }) : /* @__PURE__ */ g(h, { ref: r, variant: t, size: o, color: d, ...c, children: [
215
- i,
202
+ ] }) : /* @__PURE__ */ g(h, { ref: r, variant: t, size: o, color: c, ...d, children: [
203
+ a,
216
204
  e,
217
205
  n
218
206
  ] });
219
207
  }
220
208
  export {
221
- S as default
209
+ C as default
222
210
  };
@@ -1,5 +1,5 @@
1
1
  import { jsxs as t, jsx as r } from "react/jsx-runtime";
2
- import m from "basic-styled/setup/createBuilder";
2
+ import m from "basic-styled/setup/configureStyled";
3
3
  import i from "basic-styled/setup/ResetStyle";
4
4
  import f from "basic-styled/setup/ThemeProvider";
5
5
  import l from "./dark.mjs";
@@ -8,7 +8,7 @@ import h from "./light.mjs";
8
8
  m({
9
9
  prefix: "shiflo-ui"
10
10
  });
11
- function j({ children: e, theme: o }) {
11
+ function y({ children: e, theme: o }) {
12
12
  return /* @__PURE__ */ t(f, { theme: o === "dark" ? l : h, children: [
13
13
  /* @__PURE__ */ r(i, {}),
14
14
  /* @__PURE__ */ r(p, {}),
@@ -16,5 +16,5 @@ function j({ children: e, theme: o }) {
16
16
  ] });
17
17
  }
18
18
  export {
19
- j as default
19
+ y as default
20
20
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@shiflo/ui",
3
3
  "description": "Shiflo React UI Components",
4
- "version": "0.0.7",
4
+ "version": "0.0.9",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist"
@@ -85,7 +85,7 @@
85
85
  "vite-plugin-svgr": "^4.3.0"
86
86
  },
87
87
  "peerDependencies": {
88
- "basic-styled": ">=0.1.10",
88
+ "basic-styled": ">=0.1.11",
89
89
  "react": "^19.0.0",
90
90
  "react-dom": "^19.0.0"
91
91
  },