Skip to content

Commit b56b9cf

Browse files
committed
chore: @gluestack-ui/button version bump to 1.0.7
1 parent 27a024a commit b56b9cf

File tree

12 files changed

+209
-113
lines changed

12 files changed

+209
-113
lines changed

example/storybook-nativewind/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"@gluestack-style/animation-resolver": "^1.0.4",
3333
"@gluestack-style/react": "^1.0.57",
3434
"@gluestack-ui/config": "^1.1.19",
35-
"@gluestack-ui/themed": "^1.1.39",
35+
"@gluestack-ui/themed": "^1.1.40",
3636
"@gluestack/design-system": "^0.5.36",
3737
"@gorhom/bottom-sheet": "^5.0.0-alpha.10",
3838
"@legendapp/motion": "^2.2.0",

example/storybook-nativewind/src/core-components/nativewind/button/index.tsx

Lines changed: 52 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,10 @@ const UIButton = createButton({
8181
Text,
8282
Group: View,
8383
Spinner: ActivityIndicator,
84-
Icon: Platform.OS === 'web' ? PrimitiveIcon : withStates(PrimitiveIcon),
84+
Icon:
85+
Platform.OS === 'web'
86+
? withStates(PrimitiveIcon)
87+
: withStates(PrimitiveIcon),
8588
});
8689

8790
cssInterop(UIButton, { className: 'style' });
@@ -90,7 +93,7 @@ cssInterop(UIButton.Group, { className: 'style' });
9093
cssInterop(UIButton.Spinner, {
9194
className: { target: 'style', nativeStyleToProp: { color: true } },
9295
});
93-
cssInterop(UIButton.Icon, {
96+
cssInterop(PrimitiveIcon, {
9497
className: {
9598
target: 'style',
9699
nativeStyleToProp: {
@@ -109,19 +112,20 @@ const buttonStyle = tva({
109112
variants: {
110113
action: {
111114
primary:
112-
'bg-primary-500 hover:bg-primary-600 active:bg-primary-700 border-primary-300 hover:border-primary-400 active:border-primary-500 data-[focus-visible=true]:web:ring-indicator-info',
115+
'bg-primary-500 data-[hover=true]:bg-primary-600 data-[active=true]:bg-primary-700 border-primary-300 data-[hover=true]:border-primary-400 data-[active=true]:border-primary-500 data-[focus-visible=true]:web:ring-indicator-info',
113116
secondary:
114-
'bg-secondary-500 border-secondary-300 hover:bg-secondary-600 hover:border-secondary-400 active:bg-secondary-700 active:border-secondary-500 data-[focus-visible=true]:web:ring-indicator-info',
117+
'bg-secondary-500 border-secondary-300 data-[hover=true]:bg-secondary-600 data-[hover=true]:border-secondary-400 data-[active=true]:bg-secondary-700 data-[active=true]:border-secondary-500 data-[focus-visible=true]:web:ring-indicator-info',
115118
positive:
116-
'bg-success-500 border-success-300 hover:bg-success-600 hover:border-success-400 active:bg-success-700 active:border-success-500 data-[focus-visible=true]:web:ring-indicator-info',
119+
'bg-success-500 border-success-300 data-[hover=true]:bg-success-600 data-[hover=true]:border-success-400 data-[active=true]:bg-success-700 data-[active=true]:border-success-500 data-[focus-visible=true]:web:ring-indicator-info',
117120
negative:
118-
'bg-error-500 border-error-300 hover:bg-error-600 hover:border-error-400 active:bg-error-700 active:border-error-500 data-[focus-visible=true]:web:ring-indicator-info',
119-
default: 'bg-transparent hover:bg-background-50 active:bg-transparent',
121+
'bg-error-500 border-error-300 data-[hover=true]:bg-error-600 data-[hover=true]:border-error-400 data-[active=true]:bg-error-700 data-[active=true]:border-error-500 data-[focus-visible=true]:web:ring-indicator-info',
122+
default:
123+
'bg-transparent data-[hover=true]:bg-background-50 data-[active=true]:bg-transparent',
120124
},
121125
variant: {
122126
link: 'px-0',
123127
outline:
124-
'bg-transparent border hover:bg-background-50 active:bg-transparent',
128+
'bg-transparent border data-[hover=true]:bg-background-50 data-[active=true]:bg-transparent',
125129
solid: '',
126130
},
127131

@@ -137,42 +141,50 @@ const buttonStyle = tva({
137141
{
138142
action: 'primary',
139143
variant: 'link',
140-
class: 'px-0 bg-transparent hover:bg-transparent active:bg-transparent',
144+
class:
145+
'px-0 bg-transparent data-[hover=true]:bg-transparent data-[active=true]:bg-transparent',
141146
},
142147
{
143148
action: 'secondary',
144149
variant: 'link',
145-
class: 'px-0 bg-transparent hover:bg-transparent active:bg-transparent',
150+
class:
151+
'px-0 bg-transparent data-[hover=true]:bg-transparent data-[active=true]:bg-transparent',
146152
},
147153
{
148154
action: 'positive',
149155
variant: 'link',
150-
class: 'px-0 bg-transparent hover:bg-transparent active:bg-transparent',
156+
class:
157+
'px-0 bg-transparent data-[hover=true]:bg-transparent data-[active=true]:bg-transparent',
151158
},
152159
{
153160
action: 'negative',
154161
variant: 'link',
155-
class: 'px-0 bg-transparent hover:bg-transparent active:bg-transparent',
162+
class:
163+
'px-0 bg-transparent data-[hover=true]:bg-transparent data-[active=true]:bg-transparent',
156164
},
157165
{
158166
action: 'primary',
159167
variant: 'outline',
160-
class: 'bg-transparent hover:bg-background-50 active:bg-transparent',
168+
class:
169+
'bg-transparent data-[hover=true]:bg-background-50 data-[active=true]:bg-transparent',
161170
},
162171
{
163172
action: 'secondary',
164173
variant: 'outline',
165-
class: 'bg-transparent hover:bg-background-50 active:bg-transparent',
174+
class:
175+
'bg-transparent data-[hover=true]:bg-background-50 data-[active=true]:bg-transparent',
166176
},
167177
{
168178
action: 'positive',
169179
variant: 'outline',
170-
class: 'bg-transparent hover:bg-background-50 active:bg-transparent',
180+
class:
181+
'bg-transparent data-[hover=true]:bg-background-50 data-[active=true]:bg-transparent',
171182
},
172183
{
173184
action: 'negative',
174185
variant: 'outline',
175-
class: 'bg-transparent hover:bg-background-50 active:bg-transparent',
186+
class:
187+
'bg-transparent data-[hover=true]:bg-background-50 data-[active=true]:bg-transparent',
176188
},
177189
],
178190
});
@@ -182,19 +194,19 @@ const buttonTextStyle = tva({
182194
parentVariants: {
183195
action: {
184196
primary:
185-
'text-primary-600 group-hover/button:text-primary-600 group-active/button:text-primary-700',
197+
'text-primary-600 data-[hover=true]:text-primary-600 data-[active=true]:text-primary-700',
186198
secondary:
187-
'text-secondary-600 group-hover/button:text-secondary-600 group-active/button:text-secondary-700',
199+
'text-secondary-600 data-[hover=true]:text-secondary-600 data-[active=true]:text-secondary-700',
188200
positive:
189-
'text-success-600 group-hover/button:text-success-600 group-active/button:text-success-700',
201+
'text-success-600 data-[hover=true]:text-success-600 data-[active=true]:text-success-700',
190202
negative:
191-
'text-error-600 group-hover/button:text-error-600 group-active/button:text-error-700',
203+
'text-error-600 data-[hover=true]:text-error-600 data-[active=true]:text-error-700',
192204
},
193205
variant: {
194-
link: 'group-hover/button:underline group-active/button:underline',
206+
link: 'data-[hover=true]:underline data-[active=true]:underline',
195207
outline: '',
196208
solid:
197-
'text-typography-0 group-hover/button:text-typography-0 group-active/button:text-typography-0',
209+
'text-typography-0 data-[hover=true]:text-typography-0 data-[active=true]:text-typography-0',
198210
},
199211
size: {
200212
xs: 'text-xs',
@@ -209,49 +221,49 @@ const buttonTextStyle = tva({
209221
variant: 'solid',
210222
action: 'primary',
211223
class:
212-
'text-typography-0 group-hover/button:text-typography-0 group-active/button:text-typography-0',
224+
'text-typography-0 data-[hover=true]:text-typography-0 data-[active=true]:text-typography-0',
213225
},
214226
{
215227
variant: 'solid',
216228
action: 'secondary',
217229
class:
218-
'text-typography-0 group-hover/button:text-typography-0 group-active/button:text-typography-0',
230+
'text-typography-0 data-[hover=true]:text-typography-0 data-[active=true]:text-typography-0',
219231
},
220232
{
221233
variant: 'solid',
222234
action: 'positive',
223235
class:
224-
'text-typography-0 group-hover/button:text-typography-0 group-active/button:text-typography-0',
236+
'text-typography-0 data-[hover=true]:text-typography-0 data-[active=true]:text-typography-0',
225237
},
226238
{
227239
variant: 'solid',
228240
action: 'negative',
229241
class:
230-
'text-typography-0 group-hover/button:text-typography-0 group-active/button:text-typography-0',
242+
'text-typography-0 data-[hover=true]:text-typography-0 data-[active=true]:text-typography-0',
231243
},
232244
{
233245
variant: 'outline',
234246
action: 'primary',
235247
class:
236-
'text-primary-500 group-hover/button:text-primary-500 group-active/button:text-primary-500',
248+
'text-primary-500 data-[hover=true]:text-primary-500 data-[active=true]:text-primary-500',
237249
},
238250
{
239251
variant: 'outline',
240252
action: 'secondary',
241253
class:
242-
'text-primary-500 group-hover/button:text-primary-500 group-active/button:text-primary-500',
254+
'text-primary-500 data-[hover=true]:text-primary-500 data-[active=true]:text-primary-500',
243255
},
244256
{
245257
variant: 'outline',
246258
action: 'positive',
247259
class:
248-
'text-primary-500 group-hover/button:text-primary-500 group-active/button:text-primary-500',
260+
'text-primary-500 data-[hover=true]:text-primary-500 data-[active=true]:text-primary-500',
249261
},
250262
{
251263
variant: 'outline',
252264
action: 'negative',
253265
class:
254-
'text-primary-500 group-hover/button:text-primary-500 group-active/button:text-primary-500',
266+
'text-primary-500 data-[hover=true]:text-primary-500 data-[active=true]:text-primary-500',
255267
},
256268
],
257269
});
@@ -260,10 +272,10 @@ const buttonIconStyle = tva({
260272
base: 'fill-none',
261273
parentVariants: {
262274
variant: {
263-
link: 'group-hover/button:underline group-active/button:underline',
275+
link: 'data-[hover=true]:underline data-[active=true]:underline',
264276
outline: '',
265277
solid:
266-
'text-typography-0 group-hover/button:text-typography-0 group-active/button:text-typography-0',
278+
'text-typography-0 data-[hover=true]:text-typography-0 data-[active=true]:text-typography-0',
267279
},
268280
size: {
269281
xs: 'h-3.5 w-3.5',
@@ -274,40 +286,40 @@ const buttonIconStyle = tva({
274286
},
275287
action: {
276288
primary:
277-
'text-primary-600 group-hover/button:text-primary-600 group-active/button:text-primary-700',
289+
'text-primary-600 data-[hover=true]:text-primary-600 data-[active=true]:text-primary-700',
278290
secondary:
279-
'text-secondary-600 group-hover/button:text-secondary-600 group-active/button:text-secondary-700',
291+
'text-secondary-600 data-[hover=true]:text-secondary-600 data-[active=true]:text-secondary-700',
280292
positive:
281-
'text-success-600 group-hover/button:text-success-600 group-active/button:text-success-700',
293+
'text-success-600 data-[hover=true]:text-success-600 data-[active=true]:text-success-700',
282294

283295
negative:
284-
'text-error-600 group-hover/button:text-error-600 group-active/button:text-error-700',
296+
'text-error-600 data-[hover=true]:text-error-600 data-[active=true]:text-error-700',
285297
},
286298
},
287299
parentCompoundVariants: [
288300
{
289301
variant: 'solid',
290302
action: 'primary',
291303
class:
292-
'text-typography-0 group-hover/button:text-typography-0 group-active/button:text-typography-0',
304+
'text-typography-0 data-[hover=true]:text-typography-0 data-[active=true]:text-typography-0',
293305
},
294306
{
295307
variant: 'solid',
296308
action: 'secondary',
297309
class:
298-
'text-typography-0 group-hover/button:text-typography-0 group-active/button:text-typography-0',
310+
'text-typography-0 data-[hover=true]:text-typography-0 data-[active=true]:text-typography-0',
299311
},
300312
{
301313
variant: 'solid',
302314
action: 'positive',
303315
class:
304-
'text-typography-0 group-hover/button:text-typography-0 group-active/button:text-typography-0',
316+
'text-typography-0 data-[hover=true]:text-typography-0 data-[active=true]:text-typography-0',
305317
},
306318
{
307319
variant: 'solid',
308320
action: 'negative',
309321
class:
310-
'text-typography-0 group-hover/button:text-typography-0 group-active/button:text-typography-0',
322+
'text-typography-0 data-[hover=true]:text-typography-0 data-[active=true]:text-typography-0',
311323
},
312324
],
313325
});

packages/config/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"@gluestack-ui/alert": "0.1.15",
4444
"@gluestack-ui/alert-dialog": "0.1.30",
4545
"@gluestack-ui/avatar": "0.1.17",
46-
"@gluestack-ui/button": "1.0.6",
46+
"@gluestack-ui/button": "1.0.7",
4747
"@gluestack-ui/checkbox": "0.1.30",
4848
"@gluestack-ui/divider": "0.1.9",
4949
"@gluestack-ui/fab": "0.1.21",
@@ -66,14 +66,14 @@
6666
"@gluestack-ui/switch": "0.1.22",
6767
"@gluestack-ui/tabs": "0.1.16",
6868
"@gluestack-ui/textarea": "0.1.23",
69-
"@gluestack-ui/themed": "1.1.39",
69+
"@gluestack-ui/themed": "1.1.40",
7070
"@gluestack-ui/toast": "1.0.7",
7171
"@gluestack-ui/tooltip": "0.1.32",
7272
"@legendapp/motion": "latest"
7373
},
7474
"peerDependencies": {
7575
"@gluestack-style/react": ">=1.0.57",
76-
"@gluestack-ui/themed": ">=1.1.39"
76+
"@gluestack-ui/themed": ">=1.1.40"
7777
},
7878
"release-it": {
7979
"git": {

packages/themed/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# @gluestack-ui/themed
22

3+
## 1.1.40
4+
5+
### Patch Changes
6+
7+
- Updated dependencies
8+
- @gluestack-ui/button@1.0.7
9+
310
## 1.1.39
411

512
### Patch Changes

packages/themed/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@gluestack-ui/themed",
3-
"version": "1.1.39",
3+
"version": "1.1.40",
44
"main": "build/index.js",
55
"types": "build/index.d.ts",
66
"module": "build/index",
@@ -42,7 +42,7 @@
4242
"@gluestack-ui/alert": "0.1.15",
4343
"@gluestack-ui/alert-dialog": "0.1.30",
4444
"@gluestack-ui/avatar": "0.1.17",
45-
"@gluestack-ui/button": "1.0.6",
45+
"@gluestack-ui/button": "1.0.7",
4646
"@gluestack-ui/checkbox": "0.1.30",
4747
"@gluestack-ui/divider": "0.1.9",
4848
"@gluestack-ui/fab": "0.1.21",

packages/unstyled/button/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# @gluestack-ui/button
22

3+
## 1.0.7
4+
5+
### Patch Changes
6+
7+
- fix: added datasets to other button components
8+
39
## 1.0.6
410

511
### Patch Changes

packages/unstyled/button/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@gluestack-ui/button",
3-
"version": "1.0.6",
3+
"version": "1.0.7",
44
"main": "lib/commonjs/index",
55
"module": "lib/module/index",
66
"types": "lib/typescript/index.d.ts",

0 commit comments

Comments
 (0)