Skip to content

Commit

Permalink
Merge pull request #2269 from gluestack/main
Browse files Browse the repository at this point in the history
Backmerge Main -> Patch
  • Loading branch information
Viraj-10 authored Jul 3, 2024
2 parents 07b01d5 + bb4a29a commit fb97248
Show file tree
Hide file tree
Showing 11 changed files with 35 additions and 85 deletions.
2 changes: 1 addition & 1 deletion example/storybook-nativewind/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"@gluestack-style/animation-resolver": "^1.0.4",
"@gluestack-style/react": "^1.0.56",
"@gluestack-ui/config": "^1.1.18",
"@gluestack-ui/themed": "^1.1.31",
"@gluestack-ui/themed": "^1.1.32",
"@gluestack/design-system": "^0.5.36",
"@gorhom/bottom-sheet": "^5.0.0-alpha.10",
"@legendapp/motion": "^2.2.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ const checkboxLabelStyle = tva({
});

const checkboxIconStyle = tva({
base: 'data-[disabled=true]:opacity-40 text-typography-50 fill-none',
base: 'text-typography-50 fill-none',

parentVariants: {
size: {
Expand Down
8 changes: 4 additions & 4 deletions packages/config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"@gluestack-ui/alert-dialog": "0.1.29",
"@gluestack-ui/avatar": "0.1.16",
"@gluestack-ui/button": "1.0.5",
"@gluestack-ui/checkbox": "0.1.28",
"@gluestack-ui/checkbox": "0.1.29",
"@gluestack-ui/divider": "0.1.8",
"@gluestack-ui/fab": "0.1.20",
"@gluestack-ui/form-control": "0.1.17",
Expand All @@ -59,21 +59,21 @@
"@gluestack-ui/pressable": "0.1.16",
"@gluestack-ui/progress": "0.1.14",
"@gluestack-ui/provider": "0.1.12",
"@gluestack-ui/radio": "0.1.29",
"@gluestack-ui/radio": "0.1.30",
"@gluestack-ui/select": "0.1.26",
"@gluestack-ui/slider": "0.1.24",
"@gluestack-ui/spinner": "0.1.14",
"@gluestack-ui/switch": "0.1.21",
"@gluestack-ui/tabs": "0.1.16",
"@gluestack-ui/textarea": "0.1.22",
"@gluestack-ui/themed": "1.1.31",
"@gluestack-ui/themed": "1.1.32",
"@gluestack-ui/toast": "1.0.4",
"@gluestack-ui/tooltip": "0.1.30",
"@legendapp/motion": "latest"
},
"peerDependencies": {
"@gluestack-style/react": ">=1.0.56",
"@gluestack-ui/themed": ">=1.1.31"
"@gluestack-ui/themed": ">=1.1.32"
},
"release-it": {
"git": {
Expand Down
8 changes: 8 additions & 0 deletions packages/themed/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# @gluestack-ui/themed

## 1.1.32

### Patch Changes

- Updated dependencies
- @gluestack-ui/checkbox@0.1.29
- @gluestack-ui/radio@0.1.30

## 1.1.31

### Patch Changes
Expand Down
6 changes: 3 additions & 3 deletions packages/themed/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gluestack-ui/themed",
"version": "1.1.31",
"version": "1.1.32",
"main": "build/index.js",
"types": "build/index.d.ts",
"module": "build/index",
Expand Down Expand Up @@ -43,7 +43,7 @@
"@gluestack-ui/alert-dialog": "0.1.29",
"@gluestack-ui/avatar": "0.1.16",
"@gluestack-ui/button": "1.0.5",
"@gluestack-ui/checkbox": "0.1.28",
"@gluestack-ui/checkbox": "0.1.29",
"@gluestack-ui/divider": "0.1.8",
"@gluestack-ui/fab": "0.1.20",
"@gluestack-ui/form-control": "0.1.17",
Expand All @@ -58,7 +58,7 @@
"@gluestack-ui/pressable": "0.1.16",
"@gluestack-ui/progress": "0.1.14",
"@gluestack-ui/provider": "0.1.12",
"@gluestack-ui/radio": "0.1.29",
"@gluestack-ui/radio": "0.1.30",
"@gluestack-ui/select": "0.1.26",
"@gluestack-ui/slider": "0.1.24",
"@gluestack-ui/spinner": "0.1.14",
Expand Down
6 changes: 6 additions & 0 deletions packages/unstyled/checkbox/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @gluestack-ui/checkbox

## 0.1.29

### Patch Changes

- fix: removed radio and checkbox icons states

## 0.1.28

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/unstyled/checkbox/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gluestack-ui/checkbox",
"version": "0.1.28",
"version": "0.1.29",
"main": "lib/commonjs/index",
"module": "lib/module/index",
"types": "lib/typescript/index.d.ts",
Expand Down
39 changes: 2 additions & 37 deletions packages/unstyled/checkbox/src/CheckboxIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,47 +3,12 @@ import { useCheckbox } from './CheckboxProvider';

const CheckboxIcon = (StyledCheckboxIcon: any) =>
forwardRef(({ children, ...props }: any, ref?: any) => {
const {
isChecked,
isDisabled,
isHovered,
isInvalid,
isReadOnly,
isPressed,
isFocused,
isIndeterminate,
isFocusVisible,
} = useCheckbox('CheckboxContext');
const { isChecked } = useCheckbox('CheckboxContext');

return (
<>
{isChecked && (
<StyledCheckboxIcon
states={{
hover: isHovered,
checked: isChecked,
disabled: isDisabled,
focusVisible: isFocusVisible,
invalid: isInvalid,
readOnly: isReadOnly,
pressed: isPressed,
focused: isFocused,
indeterminate: isIndeterminate,
}}
dataSet={{
hover: isHovered ? 'true' : 'false',
checked: isChecked ? 'true' : 'false',
disabled: isDisabled ? 'true' : 'false',
focusVisible: isFocusVisible ? 'true' : 'false',
invalid: isInvalid ? 'true' : 'false',
readOnly: isReadOnly ? 'true' : 'false',
pressed: isPressed ? 'true' : 'false',
focused: isFocused ? 'true' : 'false',
indeterminate: isIndeterminate ? 'true' : 'false',
}}
{...props}
ref={ref}
>
<StyledCheckboxIcon {...props} ref={ref}>
{children}
</StyledCheckboxIcon>
)}
Expand Down
6 changes: 6 additions & 0 deletions packages/unstyled/radio/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @gluestack-ui/radio

## 0.1.30

### Patch Changes

- fix: removed radio and checkbox icons states

## 0.1.29

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/unstyled/radio/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gluestack-ui/radio",
"version": "0.1.29",
"version": "0.1.30",
"main": "lib/commonjs/index",
"module": "lib/module/index",
"types": "lib/typescript/index.d.ts",
Expand Down
39 changes: 2 additions & 37 deletions packages/unstyled/radio/src/RadioIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,47 +3,12 @@ import { useRadio } from './RadioProvider';

export const RadioIcon = (StyledRadioIcon: any) =>
forwardRef(({ children, ...props }: any, ref?: any) => {
const {
isHovered,
isChecked,
isDisabled,
isFocusVisible,
isInvalid,
isFocused,
isReadOnly,
isIndeterminate,
isPressed,
} = useRadio('RadioContext');
const { isChecked } = useRadio('RadioContext');

return (
<>
{isChecked && (
<StyledRadioIcon
states={{
checked: isChecked,
disabled: isDisabled,
focusVisible: isFocused || isFocusVisible,
hover: isHovered,
invalid: isInvalid,
readonly: isReadOnly,
indeterminate: isIndeterminate,
focus: isFocused,
active: isPressed,
}}
dataSet={{
checked: isChecked ? 'true' : 'false',
disabled: isDisabled ? 'true' : 'false',
focusVisible: isFocused || isFocusVisible ? 'true' : 'false',
hover: isHovered ? 'true' : 'false',
invalid: isInvalid ? 'true' : 'false',
readonly: isReadOnly ? 'true' : 'false',
indeterminate: isIndeterminate ? 'true' : 'false',
focus: isFocused ? 'true' : 'false',
active: isPressed ? 'true' : 'false',
}}
{...props}
ref={ref}
>
<StyledRadioIcon {...props} ref={ref}>
{children}
</StyledRadioIcon>
)}
Expand Down

0 comments on commit fb97248

Please sign in to comment.