@nattui/react-components 0.0.6 → 0.0.8

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
 
2
2
  
3
- > @nattui/react-components@0.0.3 build /Users/snowshift/Documents/3-github/react-components/packages/ui
3
+ > @nattui/react-components@0.0.7 build /Users/snowshift/Documents/3-github/react-components/packages/ui
4
4
  > tsup
5
5
 
6
6
  CLI Building entry: src/index.ts
@@ -11,19 +11,19 @@
11
11
  CLI Cleaning output folder
12
12
  ESM Build start
13
13
  CJS Build start
14
- CJS dist/button-background.module-T5B7XZ2Z.module.css 702.00 B
15
- CJS dist/button-spinner.module-4TBETQ4T.module.css 1.49 KB
16
- CJS dist/button.module-N3Y5HX7N.module.css 5.83 KB
17
- CJS dist/index.js 4.26 KB
18
- CJS dist/index.js.map 7.92 KB
19
- CJS ⚡️ Build success in 76ms
20
- ESM dist/button.module-N3Y5HX7N.module.css 5.83 KB
21
14
  ESM dist/button-background.module-T5B7XZ2Z.module.css 702.00 B
22
15
  ESM dist/button-spinner.module-4TBETQ4T.module.css 1.49 KB
23
- ESM dist/index.mjs 3.53 KB
24
- ESM dist/index.mjs.map 7.87 KB
25
- ESM ⚡️ Build success in 77ms
16
+ ESM dist/button.module-4G5LYXJH.module.css 5.76 KB
17
+ ESM dist/index.mjs 3.54 KB
18
+ ESM dist/index.mjs.map 7.92 KB
19
+ ESM ⚡️ Build success in 58ms
20
+ CJS dist/button-spinner.module-4TBETQ4T.module.css 1.49 KB
21
+ CJS dist/button.module-4G5LYXJH.module.css 5.76 KB
22
+ CJS dist/button-background.module-T5B7XZ2Z.module.css 702.00 B
23
+ CJS dist/index.js 4.27 KB
24
+ CJS dist/index.js.map 7.97 KB
25
+ CJS ⚡️ Build success in 58ms
26
26
  DTS Build start
27
- DTS ⚡️ Build success in 698ms
28
- DTS dist/index.d.mts 1.37 KB
29
- DTS dist/index.d.ts 1.37 KB
27
+ DTS ⚡️ Build success in 497ms
28
+ DTS dist/index.d.mts 1.39 KB
29
+ DTS dist/index.d.ts 1.39 KB
@@ -0,0 +1,338 @@
1
+
2
+ > @nattui/react-components@0.0.7 dev /Users/snowshift/Documents/3-github/react-components/packages/ui
3
+ > tsup --watch
4
+
5
+ CLI Building entry: src/index.ts
6
+ CLI Using tsconfig: tsconfig.json
7
+ CLI tsup v8.5.0
8
+ CLI Using tsup config: /Users/snowshift/Documents/3-github/react-components/packages/ui/tsup.config.ts
9
+ CLI Running in watch mode
10
+ CLI Target: node16
11
+ CLI Cleaning output folder
12
+ ESM Build start
13
+ CJS Build start
14
+ ESM dist/button-background.module-T5B7XZ2Z.module.css 702.00 B
15
+ ESM dist/button-spinner.module-4TBETQ4T.module.css 1.49 KB
16
+ ESM dist/button.module-4G5LYXJH.module.css 5.76 KB
17
+ ESM dist/index.mjs 3.53 KB
18
+ ESM dist/index.mjs.map 7.90 KB
19
+ ESM ⚡️ Build success in 84ms
20
+ CJS dist/button-background.module-T5B7XZ2Z.module.css 702.00 B
21
+ CJS dist/button.module-4G5LYXJH.module.css 5.76 KB
22
+ CJS dist/button-spinner.module-4TBETQ4T.module.css 1.49 KB
23
+ CJS dist/index.js 4.26 KB
24
+ CJS dist/index.js.map 7.96 KB
25
+ CJS ⚡️ Build success in 84ms
26
+ CLI Watching for changes in "."
27
+ CLI Ignoring changes in "**/{.git,node_modules}/**" | "dist"
28
+ DTS Build start
29
+ DTS ⚡️ Build success in 582ms
30
+ CLI Change detected: change src/button.tsx
31
+ CLI Cleaning output folder
32
+ ESM Build start
33
+ CJS Build start
34
+ ESM dist/button-background.module-T5B7XZ2Z.module.css 702.00 B
35
+ ESM dist/button-spinner.module-4TBETQ4T.module.css 1.49 KB
36
+ ESM dist/button.module-4G5LYXJH.module.css 5.76 KB
37
+ ESM dist/index.mjs 3.54 KB
38
+ ESM dist/index.mjs.map 7.93 KB
39
+ ESM ⚡️ Build success in 42ms
40
+ CJS dist/button-spinner.module-4TBETQ4T.module.css 1.49 KB
41
+ CJS dist/button.module-4G5LYXJH.module.css 5.76 KB
42
+ CJS dist/button-background.module-T5B7XZ2Z.module.css 702.00 B
43
+ CJS dist/index.js 4.27 KB
44
+ CJS dist/index.js.map 7.98 KB
45
+ CJS ⚡️ Build success in 42ms
46
+ DTS Build start
47
+ src/button.tsx(43,5): error TS2339: Property 'isRounded' does not exist on type 'ButtonPropsInternal'.
48
+ src/button.tsx(56,7): error TS2552: Cannot find name 'rounded'. Did you mean 'isRounded'?
49
+ src/button.tsx(70,34): error TS2552: Cannot find name 'rounded'. Did you mean 'isRounded'?
50
+
51
+ DTS Build failed
52
+ RollupError: [plugin dts] src/button.tsx: Failed to compile. Check the logs above.
53
+ at getRollupError (/Users/snowshift/Documents/3-github/react-components/node_modules/.pnpm/rollup@4.52.3/node_modules/rollup/dist/shared/parseAst.js:285:41)
54
+ at Object.error (/Users/snowshift/Documents/3-github/react-components/node_modules/.pnpm/rollup@4.52.3/node_modules/rollup/dist/shared/parseAst.js:281:42)
55
+ at Object.error (/Users/snowshift/Documents/3-github/react-components/node_modules/.pnpm/rollup@4.52.3/node_modules/rollup/dist/shared/rollup.js:913:32)
56
+ at Object.error (/Users/snowshift/Documents/3-github/react-components/node_modules/.pnpm/rollup@4.52.3/node_modules/rollup/dist/shared/rollup.js:22390:42)
57
+ at generateDtsFromTs (/Users/snowshift/Documents/3-github/react-components/node_modules/.pnpm/tsup@8.5.0_jiti@2.6.0_postcss@8.5.6_typescript@5.9.2/node_modules/tsup/dist/rollup.js:6376:22)
58
+ at /Users/snowshift/Documents/3-github/react-components/node_modules/.pnpm/tsup@8.5.0_jiti@2.6.0_postcss@8.5.6_typescript@5.9.2/node_modules/tsup/dist/rollup.js:6383:59
59
+ at _nullishCoalesce (/Users/snowshift/Documents/3-github/react-components/node_modules/.pnpm/tsup@8.5.0_jiti@2.6.0_postcss@8.5.6_typescript@5.9.2/node_modules/tsup/dist/rollup.js:1:472)
60
+ at Object.transform (/Users/snowshift/Documents/3-github/react-components/node_modules/.pnpm/tsup@8.5.0_jiti@2.6.0_postcss@8.5.6_typescript@5.9.2/node_modules/tsup/dist/rollup.js:6383:18)
61
+ at /Users/snowshift/Documents/3-github/react-components/node_modules/.pnpm/rollup@4.52.3/node_modules/rollup/dist/shared/rollup.js:3392:40
62
+ CLI Change detected: change src/button.tsx
63
+ CLI Cleaning output folder
64
+ ESM Build start
65
+ CJS Build start
66
+ DTS Build start
67
+ ESM dist/button-background.module-T5B7XZ2Z.module.css 702.00 B
68
+ ESM dist/button-spinner.module-4TBETQ4T.module.css 1.49 KB
69
+ ESM dist/button.module-4G5LYXJH.module.css 5.76 KB
70
+ ESM dist/index.mjs 3.54 KB
71
+ ESM dist/index.mjs.map 7.93 KB
72
+ ESM ⚡️ Build success in 22ms
73
+ CJS dist/button-background.module-T5B7XZ2Z.module.css 702.00 B
74
+ CJS dist/button-spinner.module-4TBETQ4T.module.css 1.49 KB
75
+ CJS dist/index.js 4.27 KB
76
+ CJS dist/button.module-4G5LYXJH.module.css 5.76 KB
77
+ CJS dist/index.js.map 7.98 KB
78
+ CJS ⚡️ Build success in 22ms
79
+ error TS6053: File '/Users/snowshift/Documents/3-github/react-components/packages/ui/dist/index.d.mts' not found.
80
+ The file is in the program because:
81
+ Root file specified for compilation
82
+ error TS6053: File '/Users/snowshift/Documents/3-github/react-components/packages/ui/dist/index.d.ts' not found.
83
+ The file is in the program because:
84
+ Root file specified for compilation
85
+
86
+ RollupError: [plugin dts] src/index.ts: Failed to compile. Check the logs above.
87
+ at getRollupError (/Users/snowshift/Documents/3-github/react-components/node_modules/.pnpm/rollup@4.52.3/node_modules/rollup/dist/shared/parseAst.js:285:41)
88
+ at Object.error (/Users/snowshift/Documents/3-github/react-components/node_modules/.pnpm/rollup@4.52.3/node_modules/rollup/dist/shared/parseAst.js:281:42)
89
+ at Object.error (/Users/snowshift/Documents/3-github/react-components/node_modules/.pnpm/rollup@4.52.3/node_modules/rollup/dist/shared/rollup.js:913:32)
90
+ at Object.error (/Users/snowshift/Documents/3-github/react-components/node_modules/.pnpm/rollup@4.52.3/node_modules/rollup/dist/shared/rollup.js:22390:42)
91
+ at generateDtsFromTs (/Users/snowshift/Documents/3-github/react-components/node_modules/.pnpm/tsup@8.5.0_jiti@2.6.0_postcss@8.5.6_typescript@5.9.2/node_modules/tsup/dist/rollup.js:6376:22)
92
+ at /Users/snowshift/Documents/3-github/react-components/node_modules/.pnpm/tsup@8.5.0_jiti@2.6.0_postcss@8.5.6_typescript@5.9.2/node_modules/tsup/dist/rollup.js:6383:59
93
+ at _nullishCoalesce (/Users/snowshift/Documents/3-github/react-components/node_modules/.pnpm/tsup@8.5.0_jiti@2.6.0_postcss@8.5.6_typescript@5.9.2/node_modules/tsup/dist/rollup.js:1:472)
94
+ at Object.transform (/Users/snowshift/Documents/3-github/react-components/node_modules/.pnpm/tsup@8.5.0_jiti@2.6.0_postcss@8.5.6_typescript@5.9.2/node_modules/tsup/dist/rollup.js:6383:18)
95
+ at /Users/snowshift/Documents/3-github/react-components/node_modules/.pnpm/rollup@4.52.3/node_modules/rollup/dist/shared/rollup.js:3392:40
96
+ DTS Build failed
97
+ CLI Change detected: change src/button.tsx
98
+ CLI Cleaning output folder
99
+ ESM Build start
100
+ CJS Build start
101
+ DTS Build start
102
+ ESM dist/button-background.module-T5B7XZ2Z.module.css 702.00 B
103
+ ESM dist/button.module-4G5LYXJH.module.css 5.76 KB
104
+ ESM dist/button-spinner.module-4TBETQ4T.module.css 1.49 KB
105
+ ESM dist/index.mjs 3.54 KB
106
+ ESM dist/index.mjs.map 7.93 KB
107
+ ESM ⚡️ Build success in 21ms
108
+ CJS dist/button-spinner.module-4TBETQ4T.module.css 1.49 KB
109
+ CJS dist/button.module-4G5LYXJH.module.css 5.76 KB
110
+ CJS dist/button-background.module-T5B7XZ2Z.module.css 702.00 B
111
+ CJS dist/index.js 4.27 KB
112
+ CJS dist/index.js.map 7.98 KB
113
+ CJS ⚡️ Build success in 21ms
114
+ error TS6053: File '/Users/snowshift/Documents/3-github/react-components/packages/ui/dist/index.d.mts' not found.
115
+ The file is in the program because:
116
+ Root file specified for compilation
117
+ error TS6053: File '/Users/snowshift/Documents/3-github/react-components/packages/ui/dist/index.d.ts' not found.
118
+ The file is in the program because:
119
+ Root file specified for compilation
120
+
121
+ DTS Build failed
122
+ RollupError: [plugin dts] src/index.ts: Failed to compile. Check the logs above.
123
+ at getRollupError (/Users/snowshift/Documents/3-github/react-components/node_modules/.pnpm/rollup@4.52.3/node_modules/rollup/dist/shared/parseAst.js:285:41)
124
+ at Object.error (/Users/snowshift/Documents/3-github/react-components/node_modules/.pnpm/rollup@4.52.3/node_modules/rollup/dist/shared/parseAst.js:281:42)
125
+ at Object.error (/Users/snowshift/Documents/3-github/react-components/node_modules/.pnpm/rollup@4.52.3/node_modules/rollup/dist/shared/rollup.js:913:32)
126
+ at Object.error (/Users/snowshift/Documents/3-github/react-components/node_modules/.pnpm/rollup@4.52.3/node_modules/rollup/dist/shared/rollup.js:22390:42)
127
+ at generateDtsFromTs (/Users/snowshift/Documents/3-github/react-components/node_modules/.pnpm/tsup@8.5.0_jiti@2.6.0_postcss@8.5.6_typescript@5.9.2/node_modules/tsup/dist/rollup.js:6376:22)
128
+ at /Users/snowshift/Documents/3-github/react-components/node_modules/.pnpm/tsup@8.5.0_jiti@2.6.0_postcss@8.5.6_typescript@5.9.2/node_modules/tsup/dist/rollup.js:6383:59
129
+ at _nullishCoalesce (/Users/snowshift/Documents/3-github/react-components/node_modules/.pnpm/tsup@8.5.0_jiti@2.6.0_postcss@8.5.6_typescript@5.9.2/node_modules/tsup/dist/rollup.js:1:472)
130
+ at Object.transform (/Users/snowshift/Documents/3-github/react-components/node_modules/.pnpm/tsup@8.5.0_jiti@2.6.0_postcss@8.5.6_typescript@5.9.2/node_modules/tsup/dist/rollup.js:6383:18)
131
+ at /Users/snowshift/Documents/3-github/react-components/node_modules/.pnpm/rollup@4.52.3/node_modules/rollup/dist/shared/rollup.js:3392:40
132
+ CLI Change detected: change src/button.tsx
133
+ DTS Build start
134
+ CLI Cleaning output folder
135
+ ESM Build start
136
+ CJS Build start
137
+ CJS dist/button-background.module-T5B7XZ2Z.module.css 702.00 B
138
+ CJS dist/button.module-4G5LYXJH.module.css 5.76 KB
139
+ CJS dist/button-spinner.module-4TBETQ4T.module.css 1.49 KB
140
+ CJS dist/index.js 4.28 KB
141
+ CJS dist/index.js.map 7.97 KB
142
+ CJS ⚡️ Build success in 23ms
143
+ ESM dist/button-background.module-T5B7XZ2Z.module.css 702.00 B
144
+ ESM dist/button.module-4G5LYXJH.module.css 5.76 KB
145
+ ESM dist/button-spinner.module-4TBETQ4T.module.css 1.49 KB
146
+ ESM dist/index.mjs 3.54 KB
147
+ ESM dist/index.mjs.map 7.92 KB
148
+ ESM ⚡️ Build success in 23ms
149
+ error TS6053: File '/Users/snowshift/Documents/3-github/react-components/packages/ui/dist/index.d.mts' not found.
150
+ The file is in the program because:
151
+ Root file specified for compilation
152
+ error TS6053: File '/Users/snowshift/Documents/3-github/react-components/packages/ui/dist/index.d.ts' not found.
153
+ The file is in the program because:
154
+ Root file specified for compilation
155
+
156
+ DTS Build failed
157
+ RollupError: [plugin dts] src/index.ts: Failed to compile. Check the logs above.
158
+ at getRollupError (/Users/snowshift/Documents/3-github/react-components/node_modules/.pnpm/rollup@4.52.3/node_modules/rollup/dist/shared/parseAst.js:285:41)
159
+ at Object.error (/Users/snowshift/Documents/3-github/react-components/node_modules/.pnpm/rollup@4.52.3/node_modules/rollup/dist/shared/parseAst.js:281:42)
160
+ at Object.error (/Users/snowshift/Documents/3-github/react-components/node_modules/.pnpm/rollup@4.52.3/node_modules/rollup/dist/shared/rollup.js:913:32)
161
+ at Object.error (/Users/snowshift/Documents/3-github/react-components/node_modules/.pnpm/rollup@4.52.3/node_modules/rollup/dist/shared/rollup.js:22390:42)
162
+ at generateDtsFromTs (/Users/snowshift/Documents/3-github/react-components/node_modules/.pnpm/tsup@8.5.0_jiti@2.6.0_postcss@8.5.6_typescript@5.9.2/node_modules/tsup/dist/rollup.js:6376:22)
163
+ at /Users/snowshift/Documents/3-github/react-components/node_modules/.pnpm/tsup@8.5.0_jiti@2.6.0_postcss@8.5.6_typescript@5.9.2/node_modules/tsup/dist/rollup.js:6383:59
164
+ at _nullishCoalesce (/Users/snowshift/Documents/3-github/react-components/node_modules/.pnpm/tsup@8.5.0_jiti@2.6.0_postcss@8.5.6_typescript@5.9.2/node_modules/tsup/dist/rollup.js:1:472)
165
+ at Object.transform (/Users/snowshift/Documents/3-github/react-components/node_modules/.pnpm/tsup@8.5.0_jiti@2.6.0_postcss@8.5.6_typescript@5.9.2/node_modules/tsup/dist/rollup.js:6383:18)
166
+ at /Users/snowshift/Documents/3-github/react-components/node_modules/.pnpm/rollup@4.52.3/node_modules/rollup/dist/shared/rollup.js:3392:40
167
+ CLI Change detected: change src/button.tsx
168
+ CLI Cleaning output folder
169
+ ESM Build start
170
+ CJS Build start
171
+ ESM dist/button-background.module-T5B7XZ2Z.module.css 702.00 B
172
+ ESM dist/button-spinner.module-4TBETQ4T.module.css 1.49 KB
173
+ ESM dist/button.module-4G5LYXJH.module.css 5.76 KB
174
+ ESM dist/index.mjs 3.54 KB
175
+ ESM dist/index.mjs.map 7.92 KB
176
+ ESM ⚡️ Build success in 20ms
177
+ CJS dist/button-background.module-T5B7XZ2Z.module.css 702.00 B
178
+ CJS dist/button-spinner.module-4TBETQ4T.module.css 1.49 KB
179
+ CJS dist/button.module-4G5LYXJH.module.css 5.76 KB
180
+ CJS dist/index.js 4.28 KB
181
+ CJS dist/index.js.map 7.97 KB
182
+ CJS ⚡️ Build success in 21ms
183
+ CLI Change detected: change src/button-background.tsx
184
+ DTS Build start
185
+ CLI Cleaning output folder
186
+ ESM Build start
187
+ CJS Build start
188
+ ESM dist/button-background.module-T5B7XZ2Z.module.css 702.00 B
189
+ ESM dist/button-spinner.module-4TBETQ4T.module.css 1.49 KB
190
+ ESM dist/button.module-4G5LYXJH.module.css 5.76 KB
191
+ ESM dist/index.mjs 3.54 KB
192
+ ESM dist/index.mjs.map 7.92 KB
193
+ ESM ⚡️ Build success in 21ms
194
+ CJS dist/button-spinner.module-4TBETQ4T.module.css 1.49 KB
195
+ CJS dist/button-background.module-T5B7XZ2Z.module.css 702.00 B
196
+ CJS dist/index.js 4.28 KB
197
+ CJS dist/button.module-4G5LYXJH.module.css 5.76 KB
198
+ CJS dist/index.js.map 7.97 KB
199
+ CJS ⚡️ Build success in 21ms
200
+ error TS6053: File '/Users/snowshift/Documents/3-github/react-components/packages/ui/dist/index.d.mts' not found.
201
+ The file is in the program because:
202
+ Root file specified for compilation
203
+ error TS6053: File '/Users/snowshift/Documents/3-github/react-components/packages/ui/dist/index.d.ts' not found.
204
+ The file is in the program because:
205
+ Root file specified for compilation
206
+
207
+ DTS Build failed
208
+ RollupError: [plugin dts] src/index.ts: Failed to compile. Check the logs above.
209
+ at getRollupError (/Users/snowshift/Documents/3-github/react-components/node_modules/.pnpm/rollup@4.52.3/node_modules/rollup/dist/shared/parseAst.js:285:41)
210
+ at Object.error (/Users/snowshift/Documents/3-github/react-components/node_modules/.pnpm/rollup@4.52.3/node_modules/rollup/dist/shared/parseAst.js:281:42)
211
+ at Object.error (/Users/snowshift/Documents/3-github/react-components/node_modules/.pnpm/rollup@4.52.3/node_modules/rollup/dist/shared/rollup.js:913:32)
212
+ at Object.error (/Users/snowshift/Documents/3-github/react-components/node_modules/.pnpm/rollup@4.52.3/node_modules/rollup/dist/shared/rollup.js:22390:42)
213
+ at generateDtsFromTs (/Users/snowshift/Documents/3-github/react-components/node_modules/.pnpm/tsup@8.5.0_jiti@2.6.0_postcss@8.5.6_typescript@5.9.2/node_modules/tsup/dist/rollup.js:6376:22)
214
+ at /Users/snowshift/Documents/3-github/react-components/node_modules/.pnpm/tsup@8.5.0_jiti@2.6.0_postcss@8.5.6_typescript@5.9.2/node_modules/tsup/dist/rollup.js:6383:59
215
+ at _nullishCoalesce (/Users/snowshift/Documents/3-github/react-components/node_modules/.pnpm/tsup@8.5.0_jiti@2.6.0_postcss@8.5.6_typescript@5.9.2/node_modules/tsup/dist/rollup.js:1:472)
216
+ at Object.transform (/Users/snowshift/Documents/3-github/react-components/node_modules/.pnpm/tsup@8.5.0_jiti@2.6.0_postcss@8.5.6_typescript@5.9.2/node_modules/tsup/dist/rollup.js:6383:18)
217
+ at /Users/snowshift/Documents/3-github/react-components/node_modules/.pnpm/rollup@4.52.3/node_modules/rollup/dist/shared/rollup.js:3392:40
218
+ CLI Change detected: change src/button-background.tsx
219
+ CLI Cleaning output folder
220
+ ESM Build start
221
+ CJS Build start
222
+ DTS Build start
223
+ ESM dist/button-background.module-T5B7XZ2Z.module.css 702.00 B
224
+ ESM dist/button-spinner.module-4TBETQ4T.module.css 1.49 KB
225
+ ESM dist/button.module-4G5LYXJH.module.css 5.76 KB
226
+ ESM dist/index.mjs 3.55 KB
227
+ ESM dist/index.mjs.map 7.92 KB
228
+ ESM ⚡️ Build success in 31ms
229
+ CJS dist/button-background.module-T5B7XZ2Z.module.css 702.00 B
230
+ CJS dist/button-spinner.module-4TBETQ4T.module.css 1.49 KB
231
+ CJS dist/button.module-4G5LYXJH.module.css 5.76 KB
232
+ CJS dist/index.js 4.28 KB
233
+ CJS dist/index.js.map 7.98 KB
234
+ CJS ⚡️ Build success in 31ms
235
+ error TS6053: File '/Users/snowshift/Documents/3-github/react-components/packages/ui/dist/index.d.mts' not found.
236
+ The file is in the program because:
237
+ Root file specified for compilation
238
+ error TS6053: File '/Users/snowshift/Documents/3-github/react-components/packages/ui/dist/index.d.ts' not found.
239
+ The file is in the program because:
240
+ Root file specified for compilation
241
+
242
+ DTS Build failed
243
+ RollupError: [plugin dts] src/index.ts: Failed to compile. Check the logs above.
244
+ at getRollupError (/Users/snowshift/Documents/3-github/react-components/node_modules/.pnpm/rollup@4.52.3/node_modules/rollup/dist/shared/parseAst.js:285:41)
245
+ at Object.error (/Users/snowshift/Documents/3-github/react-components/node_modules/.pnpm/rollup@4.52.3/node_modules/rollup/dist/shared/parseAst.js:281:42)
246
+ at Object.error (/Users/snowshift/Documents/3-github/react-components/node_modules/.pnpm/rollup@4.52.3/node_modules/rollup/dist/shared/rollup.js:913:32)
247
+ at Object.error (/Users/snowshift/Documents/3-github/react-components/node_modules/.pnpm/rollup@4.52.3/node_modules/rollup/dist/shared/rollup.js:22390:42)
248
+ at generateDtsFromTs (/Users/snowshift/Documents/3-github/react-components/node_modules/.pnpm/tsup@8.5.0_jiti@2.6.0_postcss@8.5.6_typescript@5.9.2/node_modules/tsup/dist/rollup.js:6376:22)
249
+ at /Users/snowshift/Documents/3-github/react-components/node_modules/.pnpm/tsup@8.5.0_jiti@2.6.0_postcss@8.5.6_typescript@5.9.2/node_modules/tsup/dist/rollup.js:6383:59
250
+ at _nullishCoalesce (/Users/snowshift/Documents/3-github/react-components/node_modules/.pnpm/tsup@8.5.0_jiti@2.6.0_postcss@8.5.6_typescript@5.9.2/node_modules/tsup/dist/rollup.js:1:472)
251
+ at Object.transform (/Users/snowshift/Documents/3-github/react-components/node_modules/.pnpm/tsup@8.5.0_jiti@2.6.0_postcss@8.5.6_typescript@5.9.2/node_modules/tsup/dist/rollup.js:6383:18)
252
+ at /Users/snowshift/Documents/3-github/react-components/node_modules/.pnpm/rollup@4.52.3/node_modules/rollup/dist/shared/rollup.js:3392:40
253
+ CLI Change detected: change src/button-background.tsx
254
+ CLI Cleaning output folder
255
+ ESM Build start
256
+ CJS Build start
257
+ ESM dist/button-background.module-T5B7XZ2Z.module.css 702.00 B
258
+ ESM dist/button.module-4G5LYXJH.module.css 5.76 KB
259
+ ESM dist/button-spinner.module-4TBETQ4T.module.css 1.49 KB
260
+ ESM dist/index.mjs 3.55 KB
261
+ ESM dist/index.mjs.map 7.92 KB
262
+ ESM ⚡️ Build success in 28ms
263
+ CJS dist/button-background.module-T5B7XZ2Z.module.css 702.00 B
264
+ CJS dist/button.module-4G5LYXJH.module.css 5.76 KB
265
+ CJS dist/index.js 4.28 KB
266
+ CJS dist/button-spinner.module-4TBETQ4T.module.css 1.49 KB
267
+ CJS dist/index.js.map 7.98 KB
268
+ CJS ⚡️ Build success in 28ms
269
+ CLI Change detected: change src/button.tsx
270
+ DTS Build start
271
+ CLI Cleaning output folder
272
+ ESM Build start
273
+ CJS Build start
274
+ ESM dist/button.module-4G5LYXJH.module.css 5.76 KB
275
+ ESM dist/button-spinner.module-4TBETQ4T.module.css 1.49 KB
276
+ ESM dist/button-background.module-T5B7XZ2Z.module.css 702.00 B
277
+ ESM dist/index.mjs 3.54 KB
278
+ ESM dist/index.mjs.map 7.92 KB
279
+ ESM ⚡️ Build success in 19ms
280
+ CJS dist/button-background.module-T5B7XZ2Z.module.css 702.00 B
281
+ CJS dist/button.module-4G5LYXJH.module.css 5.76 KB
282
+ CJS dist/button-spinner.module-4TBETQ4T.module.css 1.49 KB
283
+ CJS dist/index.js 4.27 KB
284
+ CJS dist/index.js.map 7.97 KB
285
+ CJS ⚡️ Build success in 19ms
286
+ error TS6053: File '/Users/snowshift/Documents/3-github/react-components/packages/ui/dist/index.d.mts' not found.
287
+ The file is in the program because:
288
+ Root file specified for compilation
289
+ error TS6053: File '/Users/snowshift/Documents/3-github/react-components/packages/ui/dist/index.d.ts' not found.
290
+ The file is in the program because:
291
+ Root file specified for compilation
292
+
293
+ DTS Build failed
294
+ RollupError: [plugin dts] src/index.ts: Failed to compile. Check the logs above.
295
+ at getRollupError (/Users/snowshift/Documents/3-github/react-components/node_modules/.pnpm/rollup@4.52.3/node_modules/rollup/dist/shared/parseAst.js:285:41)
296
+ at Object.error (/Users/snowshift/Documents/3-github/react-components/node_modules/.pnpm/rollup@4.52.3/node_modules/rollup/dist/shared/parseAst.js:281:42)
297
+ at Object.error (/Users/snowshift/Documents/3-github/react-components/node_modules/.pnpm/rollup@4.52.3/node_modules/rollup/dist/shared/rollup.js:913:32)
298
+ at Object.error (/Users/snowshift/Documents/3-github/react-components/node_modules/.pnpm/rollup@4.52.3/node_modules/rollup/dist/shared/rollup.js:22390:42)
299
+ at generateDtsFromTs (/Users/snowshift/Documents/3-github/react-components/node_modules/.pnpm/tsup@8.5.0_jiti@2.6.0_postcss@8.5.6_typescript@5.9.2/node_modules/tsup/dist/rollup.js:6376:22)
300
+ at /Users/snowshift/Documents/3-github/react-components/node_modules/.pnpm/tsup@8.5.0_jiti@2.6.0_postcss@8.5.6_typescript@5.9.2/node_modules/tsup/dist/rollup.js:6383:59
301
+ at _nullishCoalesce (/Users/snowshift/Documents/3-github/react-components/node_modules/.pnpm/tsup@8.5.0_jiti@2.6.0_postcss@8.5.6_typescript@5.9.2/node_modules/tsup/dist/rollup.js:1:472)
302
+ at Object.transform (/Users/snowshift/Documents/3-github/react-components/node_modules/.pnpm/tsup@8.5.0_jiti@2.6.0_postcss@8.5.6_typescript@5.9.2/node_modules/tsup/dist/rollup.js:6383:18)
303
+ at /Users/snowshift/Documents/3-github/react-components/node_modules/.pnpm/rollup@4.52.3/node_modules/rollup/dist/shared/rollup.js:3392:40
304
+ CLI Change detected: change src/button.tsx
305
+ CLI Cleaning output folder
306
+ ESM Build start
307
+ CJS Build start
308
+ CJS dist/button-spinner.module-4TBETQ4T.module.css 1.49 KB
309
+ CJS dist/button-background.module-T5B7XZ2Z.module.css 702.00 B
310
+ CJS dist/button.module-4G5LYXJH.module.css 5.76 KB
311
+ CJS dist/index.js 4.27 KB
312
+ CJS dist/index.js.map 7.97 KB
313
+ CJS ⚡️ Build success in 23ms
314
+ ESM dist/button-spinner.module-4TBETQ4T.module.css 1.49 KB
315
+ ESM dist/button.module-4G5LYXJH.module.css 5.76 KB
316
+ ESM dist/button-background.module-T5B7XZ2Z.module.css 702.00 B
317
+ ESM dist/index.mjs 3.54 KB
318
+ ESM dist/index.mjs.map 7.92 KB
319
+ ESM ⚡️ Build success in 23ms
320
+ DTS Build start
321
+ error TS6053: File '/Users/snowshift/Documents/3-github/react-components/packages/ui/dist/index.d.mts' not found.
322
+ The file is in the program because:
323
+ Root file specified for compilation
324
+ error TS6053: File '/Users/snowshift/Documents/3-github/react-components/packages/ui/dist/index.d.ts' not found.
325
+ The file is in the program because:
326
+ Root file specified for compilation
327
+
328
+ DTS Build failed
329
+ RollupError: [plugin dts] src/index.ts: Failed to compile. Check the logs above.
330
+ at getRollupError (/Users/snowshift/Documents/3-github/react-components/node_modules/.pnpm/rollup@4.52.3/node_modules/rollup/dist/shared/parseAst.js:285:41)
331
+ at Object.error (/Users/snowshift/Documents/3-github/react-components/node_modules/.pnpm/rollup@4.52.3/node_modules/rollup/dist/shared/parseAst.js:281:42)
332
+ at Object.error (/Users/snowshift/Documents/3-github/react-components/node_modules/.pnpm/rollup@4.52.3/node_modules/rollup/dist/shared/rollup.js:913:32)
333
+ at Object.error (/Users/snowshift/Documents/3-github/react-components/node_modules/.pnpm/rollup@4.52.3/node_modules/rollup/dist/shared/rollup.js:22390:42)
334
+ at generateDtsFromTs (/Users/snowshift/Documents/3-github/react-components/node_modules/.pnpm/tsup@8.5.0_jiti@2.6.0_postcss@8.5.6_typescript@5.9.2/node_modules/tsup/dist/rollup.js:6376:22)
335
+ at /Users/snowshift/Documents/3-github/react-components/node_modules/.pnpm/tsup@8.5.0_jiti@2.6.0_postcss@8.5.6_typescript@5.9.2/node_modules/tsup/dist/rollup.js:6383:59
336
+ at _nullishCoalesce (/Users/snowshift/Documents/3-github/react-components/node_modules/.pnpm/tsup@8.5.0_jiti@2.6.0_postcss@8.5.6_typescript@5.9.2/node_modules/tsup/dist/rollup.js:1:472)
337
+ at Object.transform (/Users/snowshift/Documents/3-github/react-components/node_modules/.pnpm/tsup@8.5.0_jiti@2.6.0_postcss@8.5.6_typescript@5.9.2/node_modules/tsup/dist/rollup.js:6383:18)
338
+ at /Users/snowshift/Documents/3-github/react-components/node_modules/.pnpm/rollup@4.52.3/node_modules/rollup/dist/shared/rollup.js:3392:40
package/dist/index.d.mts CHANGED
@@ -8,7 +8,7 @@ interface ButtonProps extends Omit<ComponentProps<"button">, "aria-pressed" | "d
8
8
  isActive?: boolean;
9
9
  isDisabled?: boolean;
10
10
  isLoading?: boolean;
11
- rounded?: boolean;
11
+ isRounded?: boolean;
12
12
  size?: 32 | 36 | 40 | 48;
13
13
  variant?: "accent" | "ghost" | "primary" | "secondary";
14
14
  }
package/dist/index.d.ts CHANGED
@@ -8,7 +8,7 @@ interface ButtonProps extends Omit<ComponentProps<"button">, "aria-pressed" | "d
8
8
  isActive?: boolean;
9
9
  isDisabled?: boolean;
10
10
  isLoading?: boolean;
11
- rounded?: boolean;
11
+ isRounded?: boolean;
12
12
  size?: 32 | 36 | 40 | 48;
13
13
  variant?: "accent" | "ghost" | "primary" | "secondary";
14
14
  }
package/dist/index.js CHANGED
@@ -13,10 +13,10 @@ var styles3__default = /*#__PURE__*/_interopDefault(styles3);
13
13
 
14
14
  // src/button-background.tsx
15
15
  function ButtonBackground(props) {
16
- const { rounded = false, variant = "primary" } = props;
16
+ const { isRounded = false, variant = "primary" } = props;
17
17
  const combinedBackgroundStyles = `
18
18
  ${BUTTON_BACKGROUND_CLASS_NAME.BASE}
19
- ${rounded ? BUTTON_BACKGROUND_CLASS_NAME.ROUNDED.FULL : BUTTON_BACKGROUND_CLASS_NAME.ROUNDED.BASE}
19
+ ${isRounded ? BUTTON_BACKGROUND_CLASS_NAME.ROUNDED.FULL : BUTTON_BACKGROUND_CLASS_NAME.ROUNDED.BASE}
20
20
  ${variant === "accent" ? BUTTON_BACKGROUND_CLASS_NAME.VARIANT.ACCENT : ""}
21
21
  ${variant === "primary" ? BUTTON_BACKGROUND_CLASS_NAME.VARIANT.PRIMARY : ""}
22
22
  `.replaceAll(/\s+/g, " ").trim();
@@ -62,7 +62,7 @@ function Button(props) {
62
62
  isActive = false,
63
63
  isDisabled = false,
64
64
  isLoading = false,
65
- rounded = false,
65
+ isRounded = false,
66
66
  size = 36,
67
67
  type = "button",
68
68
  variant = "primary",
@@ -74,7 +74,7 @@ function Button(props) {
74
74
  ${BUTTON_CLASS_NAME.VARIANT[variant.toUpperCase()]}
75
75
  ${fullWidth ? BUTTON_CLASS_NAME.WIDTH.FULL : BUTTON_CLASS_NAME.WIDTH.BASE}
76
76
  ${iconOnly ? BUTTON_CLASS_NAME.ICON_ONLY : ""}
77
- ${rounded ? BUTTON_CLASS_NAME.ROUNDED.FULL : BUTTON_CLASS_NAME.ROUNDED.BASE}
77
+ ${isRounded ? BUTTON_CLASS_NAME.ROUNDED.FULL : BUTTON_CLASS_NAME.ROUNDED.BASE}
78
78
  ${customClassName}
79
79
  `.replaceAll(/\s+/g, " ").trim();
80
80
  return /* @__PURE__ */ jsxRuntime.jsxs(
@@ -86,7 +86,7 @@ function Button(props) {
86
86
  type,
87
87
  ...rest,
88
88
  children: [
89
- /* @__PURE__ */ jsxRuntime.jsx(ButtonBackground, { rounded, variant }),
89
+ /* @__PURE__ */ jsxRuntime.jsx(ButtonBackground, { isRounded, variant }),
90
90
  isLoading && /* @__PURE__ */ jsxRuntime.jsx(ButtonSpinner, {}),
91
91
  !isLoading && iconStart,
92
92
  iconOnly ? children : /* @__PURE__ */ jsxRuntime.jsx("span", { children }),
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/button-background.tsx","../src/button-spinner.tsx","../src/button.tsx"],"names":["jsx","Fragment","styles","jsxs"],"mappings":";;;;;;;;;;;;;;AAOO,SAAS,iBAAiB,KAAA,EAA2C;AAC1E,EAAA,MAAM,EAAE,OAAA,GAAU,KAAA,EAAO,OAAA,GAAU,WAAU,GAAI,KAAA;AAEjD,EAAA,MAAM,wBAAA,GAA2B;AAAA,IAAA,EAC7B,6BAA6B,IAAI;AAAA,IAAA,EACjC,UAAU,4BAAA,CAA6B,OAAA,CAAQ,IAAA,GAAO,4BAAA,CAA6B,QAAQ,IAAI;AAAA,IAAA,EAC/F,OAAA,KAAY,QAAA,GAAW,4BAAA,CAA6B,OAAA,CAAQ,SAAS,EAAE;AAAA,IAAA,EACvE,OAAA,KAAY,SAAA,GAAY,4BAAA,CAA6B,OAAA,CAAQ,UAAU,EAAE;A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c,CAAA;AAAA,QAC5B,CAAC,SAAA,IAAa,SAAA;AAAA,QACd,QAAA,GAAW,QAAA,mBAAWA,cAAAA,CAAC,UAAM,QAAA,EAAS,CAAA;AAAA,QACtC,CAAC,SAAA,IAAa;AAAA;AAAA;AAAA,GACjB;AAEJ;AAEO,IAAM,iBAAA,GAAoB;AAAA,EAC/B,MAAME,wBAAAA,CAAO,MAAA;AAAA,EACb,WAAWA,wBAAAA,CAAO,iBAAA;AAAA,EAClB,OAAA,EAAS;AAAA,IACP,MAAMA,wBAAAA,CAAO,oBAAA;AAAA,IACb,MAAMA,wBAAAA,CAAO;AAAA,GACf;AAAA,EACA,IAAA,EAAM;AAAA,IACJ,IAAIA,wBAAAA,CAAO,eAAA;AAAA,IACX,IAAIA,wBAAAA,CAAO,eAAA;AAAA,IACX,IAAIA,wBAAAA,CAAO,eAAA;AAAA,IACX,IAAIA,wBAAAA,CAAO;AAAA,GACb;AAAA,EACA,OAAA,EAAS;AAAA,IACP,QAAQA,wBAAAA,CAAO,sBAAA;AAAA,IACf,OAAOA,wBAAAA,CAAO,qBAAA;AAAA,IACd,SAASA,wBAAAA,CAAO,uBAAA;AAAA,IAChB,WAAWA,wBAAAA,CAAO;AAAA,GACpB;AAAA,EACA,KAAA,EAAO;AAAA,IACL,MAAMA,wBAAAA,CAAO,kBAAA;AAAA,IACb,MAAMA,wBAAAA,CAAO;AAAA;AAEjB","file":"index.js","sourcesContent":["import type { JSX } from \"react\"\nimport type { ButtonProps } from \"@/button\"\nimport styles from \"@/button-background.module.css\"\n\nexport interface ButtonBackgroundProps\n extends Pick<ButtonProps, \"rounded\" | \"variant\"> {}\n\nexport function ButtonBackground(props: ButtonBackgroundProps): JSX.Element {\n const { rounded = false, variant = \"primary\" } = props\n\n const combinedBackgroundStyles = `\n ${BUTTON_BACKGROUND_CLASS_NAME.BASE}\n ${rounded ? BUTTON_BACKGROUND_CLASS_NAME.ROUNDED.FULL : BUTTON_BACKGROUND_CLASS_NAME.ROUNDED.BASE}\n ${variant === \"accent\" ? BUTTON_BACKGROUND_CLASS_NAME.VARIANT.ACCENT : \"\"}\n ${variant === \"primary\" ? BUTTON_BACKGROUND_CLASS_NAME.VARIANT.PRIMARY : \"\"}\n `\n .replaceAll(/\\s+/g, \" \")\n .trim()\n\n if (!(variant === \"accent\" || variant === \"primary\")) return <></>\n\n return (\n <div\n className={combinedBackgroundStyles}\n data-element=\"button-background\"\n />\n )\n}\n\nexport const BUTTON_BACKGROUND_CLASS_NAME = {\n BASE: styles.button_background,\n ROUNDED: {\n BASE: styles.button_background__rounded_base,\n FULL: styles.button_background__rounded_full,\n },\n VARIANT: {\n ACCENT: styles.button_background__variant_accent,\n PRIMARY: styles.button_background__variant_primary,\n },\n} as const\n","import type { CSSProperties, JSX } from \"react\"\nimport styles from \"@/button-spinner.module.css\"\n\nexport interface ButtonSpinnerProps {\n size?: number\n}\n\nexport function ButtonSpinner(props: ButtonSpinnerProps): JSX.Element {\n const { size = 16 } = props\n\n return (\n <div\n className={styles.button_spinner}\n style={{ \"--size\": `${size}px` } as CSSProperties}\n >\n {Array.from({ length: 12 }).map((_, index) => (\n <div key={index} />\n ))}\n </div>\n )\n}\n","import type { ComponentProps, JSX, ReactNode } from \"react\"\nimport { ButtonBackground } from \"@/button-background\"\nimport { ButtonSpinner } from \"@/button-spinner\"\nimport styles from \"@/button.module.css\"\n\nexport interface ButtonProps\n extends Omit<ComponentProps<\"button\">, \"aria-pressed\" | \"disabled\"> {\n fullWidth?: boolean\n iconEnd?: ReactNode\n iconOnly?: boolean\n iconStart?: ReactNode\n isActive?: boolean\n isDisabled?: boolean\n isLoading?: boolean\n rounded?: boolean\n size?: 32 | 36 | 40 | 48\n variant?: \"accent\" | \"ghost\" | \"primary\" | \"secondary\"\n}\n\ntype ButtonPropsInternal = ButtonPropsWithIcon | ButtonPropsWithText\n\ninterface ButtonPropsWithIcon extends ButtonProps {\n children?: ReactNode\n iconOnly: true\n}\n\ninterface ButtonPropsWithText extends ButtonProps {\n children?: string\n iconOnly?: false\n}\n\nexport function Button(props: ButtonPropsInternal): JSX.Element {\n const {\n children = \"\",\n className: customClassName = \"\",\n fullWidth = false,\n iconEnd = \"\",\n iconOnly = false,\n iconStart = \"\",\n isActive = false,\n isDisabled = false,\n isLoading = false,\n rounded = false,\n size = 36,\n type = \"button\",\n variant = \"primary\",\n ...rest\n } = props\n\n const combinedClassName = `\n ${BUTTON_CLASS_NAME.BASE}\n ${BUTTON_CLASS_NAME.SIZE[size]}\n ${BUTTON_CLASS_NAME.VARIANT[variant.toUpperCase() as keyof typeof BUTTON_CLASS_NAME.VARIANT]}\n ${fullWidth ? BUTTON_CLASS_NAME.WIDTH.FULL : BUTTON_CLASS_NAME.WIDTH.BASE}\n ${iconOnly ? BUTTON_CLASS_NAME.ICON_ONLY : \"\"}\n ${rounded ? BUTTON_CLASS_NAME.ROUNDED.FULL : BUTTON_CLASS_NAME.ROUNDED.BASE}\n ${customClassName}\n `\n .replaceAll(/\\s+/g, \" \")\n .trim()\n\n return (\n <button\n aria-pressed={isActive}\n className={combinedClassName}\n disabled={isDisabled || isLoading}\n type={type}\n {...rest}\n >\n <ButtonBackground rounded={rounded} variant={variant} />\n {isLoading && <ButtonSpinner />}\n {!isLoading && iconStart}\n {iconOnly ? children : <span>{children}</span>}\n {!isLoading && iconEnd}\n </button>\n )\n}\n\nexport const BUTTON_CLASS_NAME = {\n BASE: styles.button,\n ICON_ONLY: styles.button__icon_only,\n ROUNDED: {\n BASE: styles.button__rounded_base,\n FULL: styles.button__rounded_full,\n },\n SIZE: {\n 32: styles.button__size_32,\n 36: styles.button__size_36,\n 40: styles.button__size_40,\n 48: styles.button__size_48,\n },\n VARIANT: {\n ACCENT: styles.button__variant_accent,\n GHOST: styles.button__variant_ghost,\n PRIMARY: styles.button__variant_primary,\n SECONDARY: styles.button__variant_secondary,\n },\n WIDTH: {\n BASE: styles.button__width_base,\n FULL: styles.button__width_full,\n },\n} as const\n"]}
1
+ {"version":3,"sources":["../src/button-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O,uBAAA;AAAA,IAChB,WAAWA,wBAAAA,CAAO;AAAA,GACpB;AAAA,EACA,KAAA,EAAO;AAAA,IACL,MAAMA,wBAAAA,CAAO,kBAAA;AAAA,IACb,MAAMA,wBAAAA,CAAO;AAAA;AAEjB","file":"index.js","sourcesContent":["import type { JSX } from \"react\"\nimport type { ButtonProps } from \"@/button\"\nimport styles from \"@/button-background.module.css\"\n\nexport interface ButtonBackgroundProps\n extends Pick<ButtonProps, \"isRounded\" | \"variant\"> {}\n\nexport function ButtonBackground(props: ButtonBackgroundProps): JSX.Element {\n const { isRounded = false, variant = \"primary\" } = props\n\n const combinedBackgroundStyles = `\n ${BUTTON_BACKGROUND_CLASS_NAME.BASE}\n ${isRounded ? BUTTON_BACKGROUND_CLASS_NAME.ROUNDED.FULL : BUTTON_BACKGROUND_CLASS_NAME.ROUNDED.BASE}\n ${variant === \"accent\" ? BUTTON_BACKGROUND_CLASS_NAME.VARIANT.ACCENT : \"\"}\n ${variant === \"primary\" ? BUTTON_BACKGROUND_CLASS_NAME.VARIANT.PRIMARY : \"\"}\n `\n .replaceAll(/\\s+/g, \" \")\n .trim()\n\n if (!(variant === \"accent\" || variant === \"primary\")) return <></>\n\n return (\n <div\n className={combinedBackgroundStyles}\n data-element=\"button-background\"\n />\n )\n}\n\nexport const BUTTON_BACKGROUND_CLASS_NAME = {\n BASE: styles.button_background,\n ROUNDED: {\n BASE: styles.button_background__rounded_base,\n FULL: styles.button_background__rounded_full,\n },\n VARIANT: {\n ACCENT: styles.button_background__variant_accent,\n PRIMARY: styles.button_background__variant_primary,\n },\n} as const\n","import type { CSSProperties, JSX } from \"react\"\nimport styles from \"@/button-spinner.module.css\"\n\nexport interface ButtonSpinnerProps {\n size?: number\n}\n\nexport function ButtonSpinner(props: ButtonSpinnerProps): JSX.Element {\n const { size = 16 } = props\n\n return (\n <div\n className={styles.button_spinner}\n style={{ \"--size\": `${size}px` } as CSSProperties}\n >\n {Array.from({ length: 12 }).map((_, index) => (\n <div key={index} />\n ))}\n </div>\n )\n}\n","import type { ComponentProps, JSX, ReactNode } from \"react\"\nimport { ButtonBackground } from \"@/button-background\"\nimport { ButtonSpinner } from \"@/button-spinner\"\nimport styles from \"@/button.module.css\"\n\nexport interface ButtonProps\n extends Omit<ComponentProps<\"button\">, \"aria-pressed\" | \"disabled\"> {\n fullWidth?: boolean\n iconEnd?: ReactNode\n iconOnly?: boolean\n iconStart?: ReactNode\n isActive?: boolean\n isDisabled?: boolean\n isLoading?: boolean\n isRounded?: boolean\n size?: 32 | 36 | 40 | 48\n variant?: \"accent\" | \"ghost\" | \"primary\" | \"secondary\"\n}\n\ntype ButtonPropsInternal = ButtonPropsWithIcon | ButtonPropsWithText\n\ninterface ButtonPropsWithIcon extends ButtonProps {\n children?: ReactNode\n iconOnly: true\n}\n\ninterface ButtonPropsWithText extends ButtonProps {\n children?: string\n iconOnly?: false\n}\n\nexport function Button(props: ButtonPropsInternal): JSX.Element {\n const {\n children = \"\",\n className: customClassName = \"\",\n fullWidth = false,\n iconEnd = \"\",\n iconOnly = false,\n iconStart = \"\",\n isActive = false,\n isDisabled = false,\n isLoading = false,\n isRounded = false,\n size = 36,\n type = \"button\",\n variant = \"primary\",\n ...rest\n } = props\n\n const combinedClassName = `\n ${BUTTON_CLASS_NAME.BASE}\n ${BUTTON_CLASS_NAME.SIZE[size]}\n ${BUTTON_CLASS_NAME.VARIANT[variant.toUpperCase() as keyof typeof BUTTON_CLASS_NAME.VARIANT]}\n ${fullWidth ? BUTTON_CLASS_NAME.WIDTH.FULL : BUTTON_CLASS_NAME.WIDTH.BASE}\n ${iconOnly ? BUTTON_CLASS_NAME.ICON_ONLY : \"\"}\n ${isRounded ? BUTTON_CLASS_NAME.ROUNDED.FULL : BUTTON_CLASS_NAME.ROUNDED.BASE}\n ${customClassName}\n `\n .replaceAll(/\\s+/g, \" \")\n .trim()\n\n return (\n <button\n aria-pressed={isActive}\n className={combinedClassName}\n disabled={isDisabled || isLoading}\n type={type}\n {...rest}\n >\n <ButtonBackground isRounded={isRounded} variant={variant} />\n {isLoading && <ButtonSpinner />}\n {!isLoading && iconStart}\n {iconOnly ? children : <span>{children}</span>}\n {!isLoading && iconEnd}\n </button>\n )\n}\n\nexport const BUTTON_CLASS_NAME = {\n BASE: styles.button,\n ICON_ONLY: styles.button__icon_only,\n ROUNDED: {\n BASE: styles.button__rounded_base,\n FULL: styles.button__rounded_full,\n },\n SIZE: {\n 32: styles.button__size_32,\n 36: styles.button__size_36,\n 40: styles.button__size_40,\n 48: styles.button__size_48,\n },\n VARIANT: {\n ACCENT: styles.button__variant_accent,\n GHOST: styles.button__variant_ghost,\n PRIMARY: styles.button__variant_primary,\n SECONDARY: styles.button__variant_secondary,\n },\n WIDTH: {\n BASE: styles.button__width_base,\n FULL: styles.button__width_full,\n },\n} as const\n"]}
package/dist/index.mjs CHANGED
@@ -5,10 +5,10 @@ import styles3 from './button.module-4G5LYXJH.module.css';
5
5
 
6
6
  // src/button-background.tsx
7
7
  function ButtonBackground(props) {
8
- const { rounded = false, variant = "primary" } = props;
8
+ const { isRounded = false, variant = "primary" } = props;
9
9
  const combinedBackgroundStyles = `
10
10
  ${BUTTON_BACKGROUND_CLASS_NAME.BASE}
11
- ${rounded ? BUTTON_BACKGROUND_CLASS_NAME.ROUNDED.FULL : BUTTON_BACKGROUND_CLASS_NAME.ROUNDED.BASE}
11
+ ${isRounded ? BUTTON_BACKGROUND_CLASS_NAME.ROUNDED.FULL : BUTTON_BACKGROUND_CLASS_NAME.ROUNDED.BASE}
12
12
  ${variant === "accent" ? BUTTON_BACKGROUND_CLASS_NAME.VARIANT.ACCENT : ""}
13
13
  ${variant === "primary" ? BUTTON_BACKGROUND_CLASS_NAME.VARIANT.PRIMARY : ""}
14
14
  `.replaceAll(/\s+/g, " ").trim();
@@ -54,7 +54,7 @@ function Button(props) {
54
54
  isActive = false,
55
55
  isDisabled = false,
56
56
  isLoading = false,
57
- rounded = false,
57
+ isRounded = false,
58
58
  size = 36,
59
59
  type = "button",
60
60
  variant = "primary",
@@ -66,7 +66,7 @@ function Button(props) {
66
66
  ${BUTTON_CLASS_NAME.VARIANT[variant.toUpperCase()]}
67
67
  ${fullWidth ? BUTTON_CLASS_NAME.WIDTH.FULL : BUTTON_CLASS_NAME.WIDTH.BASE}
68
68
  ${iconOnly ? BUTTON_CLASS_NAME.ICON_ONLY : ""}
69
- ${rounded ? BUTTON_CLASS_NAME.ROUNDED.FULL : BUTTON_CLASS_NAME.ROUNDED.BASE}
69
+ ${isRounded ? BUTTON_CLASS_NAME.ROUNDED.FULL : BUTTON_CLASS_NAME.ROUNDED.BASE}
70
70
  ${customClassName}
71
71
  `.replaceAll(/\s+/g, " ").trim();
72
72
  return /* @__PURE__ */ jsxs(
@@ -78,7 +78,7 @@ function Button(props) {
78
78
  type,
79
79
  ...rest,
80
80
  children: [
81
- /* @__PURE__ */ jsx(ButtonBackground, { rounded, variant }),
81
+ /* @__PURE__ */ jsx(ButtonBackground, { isRounded, variant }),
82
82
  isLoading && /* @__PURE__ */ jsx(ButtonSpinner, {}),
83
83
  !isLoading && iconStart,
84
84
  iconOnly ? children : /* @__PURE__ */ jsx("span", { children }),
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/button-background.tsx","../src/button-spinner.tsx","../src/button.tsx"],"names":["jsx","styles"],"mappings":";;;;;;AAOO,SAAS,iBAAiB,KAAA,EAA2C;AAC1E,EAAA,MAAM,EAAE,OAAA,GAAU,KAAA,EAAO,OAAA,GAAU,WAAU,GAAI,KAAA;AAEjD,EAAA,MAAM,wBAAA,GAA2B;AAAA,IAAA,EAC7B,6BAA6B,IAAI;AAAA,IAAA,EACjC,UAAU,4BAAA,CAA6B,OAAA,CAAQ,IAAA,GAAO,4BAAA,CAA6B,QAAQ,IAAI;AAAA,IAAA,EAC/F,OAAA,KAAY,QAAA,GAAW,4BAAA,CAA6B,OAAA,CAAQ,SAAS,EAAE;AAAA,IAAA,EACvE,OAAA,KAAY,SAAA,GAAY,4BAAA,CAA6B,OA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EAAA,EAAc,CAAA;AAAA,QAC5B,CAAC,SAAA,IAAa,SAAA;AAAA,QACd,QAAA,GAAW,QAAA,mBAAWA,GAAAA,CAAC,UAAM,QAAA,EAAS,CAAA;AAAA,QACtC,CAAC,SAAA,IAAa;AAAA;AAAA;AAAA,GACjB;AAEJ;AAEO,IAAM,iBAAA,GAAoB;AAAA,EAC/B,MAAMC,OAAAA,CAAO,MAAA;AAAA,EACb,WAAWA,OAAAA,CAAO,iBAAA;AAAA,EAClB,OAAA,EAAS;AAAA,IACP,MAAMA,OAAAA,CAAO,oBAAA;AAAA,IACb,MAAMA,OAAAA,CAAO;AAAA,GACf;AAAA,EACA,IAAA,EAAM;AAAA,IACJ,IAAIA,OAAAA,CAAO,eAAA;AAAA,IACX,IAAIA,OAAAA,CAAO,eAAA;AAAA,IACX,IAAIA,OAAAA,CAAO,eAAA;AAAA,IACX,IAAIA,OAAAA,CAAO;AAAA,GACb;AAAA,EACA,OAAA,EAAS;AAAA,IACP,QAAQA,OAAAA,CAAO,sBAAA;AAAA,IACf,OAAOA,OAAAA,CAAO,qBAAA;AAAA,IACd,SAASA,OAAAA,CAAO,uBAAA;AAAA,IAChB,WAAWA,OAAAA,CAAO;AAAA,GACpB;AAAA,EACA,KAAA,EAAO;AAAA,IACL,MAAMA,OAAAA,CAAO,kBAAA;AAAA,IACb,MAAMA,OAAAA,CAAO;AAAA;AAEjB","file":"index.mjs","sourcesContent":["import type { JSX } from \"react\"\nimport type { ButtonProps } from \"@/button\"\nimport styles from \"@/button-background.module.css\"\n\nexport interface ButtonBackgroundProps\n extends Pick<ButtonProps, \"rounded\" | \"variant\"> {}\n\nexport function ButtonBackground(props: ButtonBackgroundProps): JSX.Element {\n const { rounded = false, variant = \"primary\" } = props\n\n const combinedBackgroundStyles = `\n ${BUTTON_BACKGROUND_CLASS_NAME.BASE}\n ${rounded ? BUTTON_BACKGROUND_CLASS_NAME.ROUNDED.FULL : BUTTON_BACKGROUND_CLASS_NAME.ROUNDED.BASE}\n ${variant === \"accent\" ? BUTTON_BACKGROUND_CLASS_NAME.VARIANT.ACCENT : \"\"}\n ${variant === \"primary\" ? BUTTON_BACKGROUND_CLASS_NAME.VARIANT.PRIMARY : \"\"}\n `\n .replaceAll(/\\s+/g, \" \")\n .trim()\n\n if (!(variant === \"accent\" || variant === \"primary\")) return <></>\n\n return (\n <div\n className={combinedBackgroundStyles}\n data-element=\"button-background\"\n />\n )\n}\n\nexport const BUTTON_BACKGROUND_CLASS_NAME = {\n BASE: styles.button_background,\n ROUNDED: {\n BASE: styles.button_background__rounded_base,\n FULL: styles.button_background__rounded_full,\n },\n VARIANT: {\n ACCENT: styles.button_background__variant_accent,\n PRIMARY: styles.button_background__variant_primary,\n },\n} as const\n","import type { CSSProperties, JSX } from \"react\"\nimport styles from \"@/button-spinner.module.css\"\n\nexport interface ButtonSpinnerProps {\n size?: number\n}\n\nexport function ButtonSpinner(props: ButtonSpinnerProps): JSX.Element {\n const { size = 16 } = props\n\n return (\n <div\n className={styles.button_spinner}\n style={{ \"--size\": `${size}px` } as CSSProperties}\n >\n {Array.from({ length: 12 }).map((_, index) => (\n <div key={index} />\n ))}\n </div>\n )\n}\n","import type { ComponentProps, JSX, ReactNode } from \"react\"\nimport { ButtonBackground } from \"@/button-background\"\nimport { ButtonSpinner } from \"@/button-spinner\"\nimport styles from \"@/button.module.css\"\n\nexport interface ButtonProps\n extends Omit<ComponentProps<\"button\">, \"aria-pressed\" | \"disabled\"> {\n fullWidth?: boolean\n iconEnd?: ReactNode\n iconOnly?: boolean\n iconStart?: ReactNode\n isActive?: boolean\n isDisabled?: boolean\n isLoading?: boolean\n rounded?: boolean\n size?: 32 | 36 | 40 | 48\n variant?: \"accent\" | \"ghost\" | \"primary\" | \"secondary\"\n}\n\ntype ButtonPropsInternal = ButtonPropsWithIcon | ButtonPropsWithText\n\ninterface ButtonPropsWithIcon extends ButtonProps {\n children?: ReactNode\n iconOnly: true\n}\n\ninterface ButtonPropsWithText extends ButtonProps {\n children?: string\n iconOnly?: false\n}\n\nexport function Button(props: ButtonPropsInternal): JSX.Element {\n const {\n children = \"\",\n className: customClassName = \"\",\n fullWidth = false,\n iconEnd = \"\",\n iconOnly = false,\n iconStart = \"\",\n isActive = false,\n isDisabled = false,\n isLoading = false,\n rounded = false,\n size = 36,\n type = \"button\",\n variant = \"primary\",\n ...rest\n } = props\n\n const combinedClassName = `\n ${BUTTON_CLASS_NAME.BASE}\n ${BUTTON_CLASS_NAME.SIZE[size]}\n ${BUTTON_CLASS_NAME.VARIANT[variant.toUpperCase() as keyof typeof BUTTON_CLASS_NAME.VARIANT]}\n ${fullWidth ? BUTTON_CLASS_NAME.WIDTH.FULL : BUTTON_CLASS_NAME.WIDTH.BASE}\n ${iconOnly ? BUTTON_CLASS_NAME.ICON_ONLY : \"\"}\n ${rounded ? BUTTON_CLASS_NAME.ROUNDED.FULL : BUTTON_CLASS_NAME.ROUNDED.BASE}\n ${customClassName}\n `\n .replaceAll(/\\s+/g, \" \")\n .trim()\n\n return (\n <button\n aria-pressed={isActive}\n className={combinedClassName}\n disabled={isDisabled || isLoading}\n type={type}\n {...rest}\n >\n <ButtonBackground rounded={rounded} variant={variant} />\n {isLoading && <ButtonSpinner />}\n {!isLoading && iconStart}\n {iconOnly ? children : <span>{children}</span>}\n {!isLoading && iconEnd}\n </button>\n )\n}\n\nexport const BUTTON_CLASS_NAME = {\n BASE: styles.button,\n ICON_ONLY: styles.button__icon_only,\n ROUNDED: {\n BASE: styles.button__rounded_base,\n FULL: styles.button__rounded_full,\n },\n SIZE: {\n 32: styles.button__size_32,\n 36: styles.button__size_36,\n 40: styles.button__size_40,\n 48: styles.button__size_48,\n },\n VARIANT: {\n ACCENT: styles.button__variant_accent,\n GHOST: styles.button__variant_ghost,\n PRIMARY: styles.button__variant_primary,\n SECONDARY: styles.button__variant_secondary,\n },\n WIDTH: {\n BASE: styles.button__width_base,\n FULL: styles.button__width_full,\n },\n} as const\n"]}
1
+ {"version":3,"sources":["../src/button-background.t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B;AAAA,EACA,KAAA,EAAO;AAAA,IACL,MAAMA,OAAAA,CAAO,kBAAA;AAAA,IACb,MAAMA,OAAAA,CAAO;AAAA;AAEjB","file":"index.mjs","sourcesContent":["import type { JSX } from \"react\"\nimport type { ButtonProps } from \"@/button\"\nimport styles from \"@/button-background.module.css\"\n\nexport interface ButtonBackgroundProps\n extends Pick<ButtonProps, \"isRounded\" | \"variant\"> {}\n\nexport function ButtonBackground(props: ButtonBackgroundProps): JSX.Element {\n const { isRounded = false, variant = \"primary\" } = props\n\n const combinedBackgroundStyles = `\n ${BUTTON_BACKGROUND_CLASS_NAME.BASE}\n ${isRounded ? BUTTON_BACKGROUND_CLASS_NAME.ROUNDED.FULL : BUTTON_BACKGROUND_CLASS_NAME.ROUNDED.BASE}\n ${variant === \"accent\" ? BUTTON_BACKGROUND_CLASS_NAME.VARIANT.ACCENT : \"\"}\n ${variant === \"primary\" ? BUTTON_BACKGROUND_CLASS_NAME.VARIANT.PRIMARY : \"\"}\n `\n .replaceAll(/\\s+/g, \" \")\n .trim()\n\n if (!(variant === \"accent\" || variant === \"primary\")) return <></>\n\n return (\n <div\n className={combinedBackgroundStyles}\n data-element=\"button-background\"\n />\n )\n}\n\nexport const BUTTON_BACKGROUND_CLASS_NAME = {\n BASE: styles.button_background,\n ROUNDED: {\n BASE: styles.button_background__rounded_base,\n FULL: styles.button_background__rounded_full,\n },\n VARIANT: {\n ACCENT: styles.button_background__variant_accent,\n PRIMARY: styles.button_background__variant_primary,\n },\n} as const\n","import type { CSSProperties, JSX } from \"react\"\nimport styles from \"@/button-spinner.module.css\"\n\nexport interface ButtonSpinnerProps {\n size?: number\n}\n\nexport function ButtonSpinner(props: ButtonSpinnerProps): JSX.Element {\n const { size = 16 } = props\n\n return (\n <div\n className={styles.button_spinner}\n style={{ \"--size\": `${size}px` } as CSSProperties}\n >\n {Array.from({ length: 12 }).map((_, index) => (\n <div key={index} />\n ))}\n </div>\n )\n}\n","import type { ComponentProps, JSX, ReactNode } from \"react\"\nimport { ButtonBackground } from \"@/button-background\"\nimport { ButtonSpinner } from \"@/button-spinner\"\nimport styles from \"@/button.module.css\"\n\nexport interface ButtonProps\n extends Omit<ComponentProps<\"button\">, \"aria-pressed\" | \"disabled\"> {\n fullWidth?: boolean\n iconEnd?: ReactNode\n iconOnly?: boolean\n iconStart?: ReactNode\n isActive?: boolean\n isDisabled?: boolean\n isLoading?: boolean\n isRounded?: boolean\n size?: 32 | 36 | 40 | 48\n variant?: \"accent\" | \"ghost\" | \"primary\" | \"secondary\"\n}\n\ntype ButtonPropsInternal = ButtonPropsWithIcon | ButtonPropsWithText\n\ninterface ButtonPropsWithIcon extends ButtonProps {\n children?: ReactNode\n iconOnly: true\n}\n\ninterface ButtonPropsWithText extends ButtonProps {\n children?: string\n iconOnly?: false\n}\n\nexport function Button(props: ButtonPropsInternal): JSX.Element {\n const {\n children = \"\",\n className: customClassName = \"\",\n fullWidth = false,\n iconEnd = \"\",\n iconOnly = false,\n iconStart = \"\",\n isActive = false,\n isDisabled = false,\n isLoading = false,\n isRounded = false,\n size = 36,\n type = \"button\",\n variant = \"primary\",\n ...rest\n } = props\n\n const combinedClassName = `\n ${BUTTON_CLASS_NAME.BASE}\n ${BUTTON_CLASS_NAME.SIZE[size]}\n ${BUTTON_CLASS_NAME.VARIANT[variant.toUpperCase() as keyof typeof BUTTON_CLASS_NAME.VARIANT]}\n ${fullWidth ? BUTTON_CLASS_NAME.WIDTH.FULL : BUTTON_CLASS_NAME.WIDTH.BASE}\n ${iconOnly ? BUTTON_CLASS_NAME.ICON_ONLY : \"\"}\n ${isRounded ? BUTTON_CLASS_NAME.ROUNDED.FULL : BUTTON_CLASS_NAME.ROUNDED.BASE}\n ${customClassName}\n `\n .replaceAll(/\\s+/g, \" \")\n .trim()\n\n return (\n <button\n aria-pressed={isActive}\n className={combinedClassName}\n disabled={isDisabled || isLoading}\n type={type}\n {...rest}\n >\n <ButtonBackground isRounded={isRounded} variant={variant} />\n {isLoading && <ButtonSpinner />}\n {!isLoading && iconStart}\n {iconOnly ? children : <span>{children}</span>}\n {!isLoading && iconEnd}\n </button>\n )\n}\n\nexport const BUTTON_CLASS_NAME = {\n BASE: styles.button,\n ICON_ONLY: styles.button__icon_only,\n ROUNDED: {\n BASE: styles.button__rounded_base,\n FULL: styles.button__rounded_full,\n },\n SIZE: {\n 32: styles.button__size_32,\n 36: styles.button__size_36,\n 40: styles.button__size_40,\n 48: styles.button__size_48,\n },\n VARIANT: {\n ACCENT: styles.button__variant_accent,\n GHOST: styles.button__variant_ghost,\n PRIMARY: styles.button__variant_primary,\n SECONDARY: styles.button__variant_secondary,\n },\n WIDTH: {\n BASE: styles.button__width_base,\n FULL: styles.button__width_full,\n },\n} as const\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nattui/react-components",
3
- "version": "0.0.6",
3
+ "version": "0.0.8",
4
4
  "description": "A collection of reusable React components built with TypeScript and CSS Modules",
5
5
  "keywords": [
6
6
  "components",
@@ -17,9 +17,15 @@
17
17
  },
18
18
  "license": "MIT",
19
19
  "author": "Natt Nguyen <hello@natt.sh> (https://natt.sh)",
20
- "exports": "./dist/index.js",
20
+ "exports": {
21
+ ".": {
22
+ "types": "./dist/index.d.ts",
23
+ "import": "./dist/index.mjs",
24
+ "require": "./dist/index.js"
25
+ }
26
+ },
21
27
  "main": "./dist/index.js",
22
- "module": "./dist/index.js",
28
+ "module": "./dist/index.mjs",
23
29
  "types": "./dist/index.d.ts",
24
30
  "devDependencies": {
25
31
  "@eslint/js": "^9.32.0",
@@ -3,14 +3,14 @@ import type { ButtonProps } from "@/button"
3
3
  import styles from "@/button-background.module.css"
4
4
 
5
5
  export interface ButtonBackgroundProps
6
- extends Pick<ButtonProps, "rounded" | "variant"> {}
6
+ extends Pick<ButtonProps, "isRounded" | "variant"> {}
7
7
 
8
8
  export function ButtonBackground(props: ButtonBackgroundProps): JSX.Element {
9
- const { rounded = false, variant = "primary" } = props
9
+ const { isRounded = false, variant = "primary" } = props
10
10
 
11
11
  const combinedBackgroundStyles = `
12
12
  ${BUTTON_BACKGROUND_CLASS_NAME.BASE}
13
- ${rounded ? BUTTON_BACKGROUND_CLASS_NAME.ROUNDED.FULL : BUTTON_BACKGROUND_CLASS_NAME.ROUNDED.BASE}
13
+ ${isRounded ? BUTTON_BACKGROUND_CLASS_NAME.ROUNDED.FULL : BUTTON_BACKGROUND_CLASS_NAME.ROUNDED.BASE}
14
14
  ${variant === "accent" ? BUTTON_BACKGROUND_CLASS_NAME.VARIANT.ACCENT : ""}
15
15
  ${variant === "primary" ? BUTTON_BACKGROUND_CLASS_NAME.VARIANT.PRIMARY : ""}
16
16
  `
package/src/button.tsx CHANGED
@@ -12,7 +12,7 @@ export interface ButtonProps
12
12
  isActive?: boolean
13
13
  isDisabled?: boolean
14
14
  isLoading?: boolean
15
- rounded?: boolean
15
+ isRounded?: boolean
16
16
  size?: 32 | 36 | 40 | 48
17
17
  variant?: "accent" | "ghost" | "primary" | "secondary"
18
18
  }
@@ -40,7 +40,7 @@ export function Button(props: ButtonPropsInternal): JSX.Element {
40
40
  isActive = false,
41
41
  isDisabled = false,
42
42
  isLoading = false,
43
- rounded = false,
43
+ isRounded = false,
44
44
  size = 36,
45
45
  type = "button",
46
46
  variant = "primary",
@@ -53,7 +53,7 @@ export function Button(props: ButtonPropsInternal): JSX.Element {
53
53
  ${BUTTON_CLASS_NAME.VARIANT[variant.toUpperCase() as keyof typeof BUTTON_CLASS_NAME.VARIANT]}
54
54
  ${fullWidth ? BUTTON_CLASS_NAME.WIDTH.FULL : BUTTON_CLASS_NAME.WIDTH.BASE}
55
55
  ${iconOnly ? BUTTON_CLASS_NAME.ICON_ONLY : ""}
56
- ${rounded ? BUTTON_CLASS_NAME.ROUNDED.FULL : BUTTON_CLASS_NAME.ROUNDED.BASE}
56
+ ${isRounded ? BUTTON_CLASS_NAME.ROUNDED.FULL : BUTTON_CLASS_NAME.ROUNDED.BASE}
57
57
  ${customClassName}
58
58
  `
59
59
  .replaceAll(/\s+/g, " ")
@@ -67,7 +67,7 @@ export function Button(props: ButtonPropsInternal): JSX.Element {
67
67
  type={type}
68
68
  {...rest}
69
69
  >
70
- <ButtonBackground rounded={rounded} variant={variant} />
70
+ <ButtonBackground isRounded={isRounded} variant={variant} />
71
71
  {isLoading && <ButtonSpinner />}
72
72
  {!isLoading && iconStart}
73
73
  {iconOnly ? children : <span>{children}</span>}